Move type validation from CLI-level (update.go) to storage layer
(UpdateIssueInTx), matching the create path. The CLI-level validation
failed when GetCustomTypes() was unavailable (subprocess context,
circuit breaker) and config.yaml lacked types.custom (because bd config
set only writes to Dolt). The storage layer reads custom types within
the same transaction, so it always works.
Co-authored-by: mayor <rastislav.marko@panzarobotics.com>
Co-authored-by: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
* fix(update): set status=deferred when --defer is provided (GH#3233)
`bd update --defer <date>` only set defer_until, leaving status=open,
so the ❄ icon (driven by status) was missing in `bd list`. `bd defer`
already sets both fields; align `bd update --defer` with that behavior.
Explicit --status wins if provided in the same invocation.
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
* fix(update): handle past-date and clear cases for --defer (GH#3233)
Address review feedback on the previous commit:
- Past-date --defer no longer flips status to deferred. The warning at
this path promises the issue "will appear in bd ready immediately",
which requires status to stay open.
- --defer="" now restores status=open (only when the issue was actually
deferred), so the help text "show in bd ready immediately" holds.
Non-deferred statuses like in_progress are preserved.
Explicit --status continues to win in both directions.
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
---------
Co-authored-by: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
* feat: move hook firing into storage layer via decorator
Add HookFiringStore decorator that wraps DoltStorage and automatically
fires on_create/on_update/on_close hooks after successful mutations.
This replaces manual hookRunner.Run() calls scattered across 8+ CLI
command files, ensuring ALL mutations fire hooks — including future
commands that haven't been written yet.
Key features:
- Decorator pattern: storage layer stays clean (no hooks dependency)
- Transaction support: hookTrackingTransaction accumulates pending
hooks during RunInTransaction, fires them only after successful
commit. Rollback = no hooks.
- Covers all mutation methods: CreateIssue(s), UpdateIssue, CloseIssue,
ReopenIssue, UpdateIssueType, Add/RemoveDependency, Add/RemoveLabel,
AddIssueComment
- DeleteIssue intentionally skipped (destructive, no issue to pass)
- Nil runner safe (passthrough only, no panics)
Removed hookRunner.Run() from: create.go, update.go, close.go,
note.go, assign.go, tag.go, priority.go.
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
* feat: add BD_NO_HOOKS env var to disable all hook firing
Allows opting out of the HookFiringStore decorator entirely via
BD_NO_HOOKS=1. Useful for bulk imports, migrations, or environments
where eventing should not run.
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
---------
Co-authored-by: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
Previously, `bd update --status closed` only fired on_update but not on_close,
and `bd close` only fired on_close but not on_update. Hooks should fire
symmetrically for both commands since both change status to closed.
The fix adds cross-hook firing with a state-transition guard: hooks only fire
when the status actually changes (closing an already-closed issue is a no-op
for the cross-hook).
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
LogFieldChange now accepts a reason parameter — bd close passes the
--reason text so cleanup context survives Dolt GC flatten. Also adds
CHANGELOG.md entry and info.go versionChanges for v0.62.0.
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
Dolt GC flatten destroys commit history, which was the only record of
status changes. Add LogFieldChange to the audit package and call it from
bd update and bd close so that status/assignee/priority changes are
appended to .beads/interactions.jsonl — an append-only file that
survives GC.
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
Replace gastown-specific references with generic alternatives throughout
the codebase:
- Rename --gastown flag to --orchestrator in bd doctor
- Rename gastownMode/gastownThreshold params to orchestratorMode/orchestratorThreshold
- Rename isGasTownTownRoot() to isOrchestratorRoot()
- Replace "gastown" in CLI examples with generic rig names (my-project, other-project)
- Update comments replacing "Gas Town" with "orchestrator" or "multi-agent workspace"
- Update active docs (DOLT.md, CONFIG.md, ADVANCED.md, etc.)
- Update test data to use generic names instead of "gastown"
- Update role templates (deacon, witness, refinery) to use generic language
Preserved as historical (not changed):
- CHANGELOG.md entries (historical record)
- ARTICLES.md (links to real published articles)
- info.go version notes (historical release notes)
- gastown/ file path references in dolt-concurrency.md (point to actual repo)
Guard against accidental description blanking when a producer fails but
still pipes empty input into bd update. Empty DESCRIPTION replacement
from --body-file, --description-file, --stdin, and dash shorthand now
requires --allow-empty-description. Inline --description "" unchanged.
Closes#2713
Co-Authored-By: Gary <gary@algorune.com>
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
Separates "no git history" from "garbage-collectible" for beads stored in the
wisps table. Previously --ephemeral bundled both behaviors, causing agent identity
beads to be incorrectly GC'd.
Changes:
- Add NoHistory field to types.Issue and wisps/issues schema (migration 011)
- Route NoHistory issues to wisps table, skip DOLT_COMMIT, but leave ephemeral=0
- Wire --no-history flag in bd create and bd update (with --history to undo)
- Add --exclude-type flag to bd mol wisp gc
- Add --type filter flag to bd mol wisp list
- Include type and labels in wisp list JSON output
- Move ephemeral/no-history mutual exclusion to validation layer
- Migrate issues between tables when --no-history/--ephemeral set on update
- Fix ExcludeTypes filter self-join subquery inefficiency
- Ensure JSONL export/import roundtrip preserves no_history
- Remove dead AllEphemeral function (superseded by AllWisps)
- Comprehensive test coverage for all new flags and edge cases
Resolves: steveyegge/beads#2619
Refs: steveyegge/gastown#2768
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Adds support for reading design content from files or stdin, making it easier to manage longer design notes.
The new `--design-file` flag is mutually exclusive with the inline `--design` flag. Includes comprehensive tests for all code paths.
bd update --metadata now merges new keys into existing metadata instead
of replacing the entire object, preventing silent data loss of existing
metadata keys.
Co-Authored-By: mrmaxsteel <mrmaxsteel@users.noreply.github.com>
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Add surgical metadata edits to bd update: --set-metadata key=value and --unset-metadata key.
Values are type-aware (numbers, bools, null preserved as JSON types). Cannot be combined
with --metadata (full replacement). Thorough test coverage.
Co-Authored-By: Joseph Turian <turian@gmail.com>
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
bd update --status previously accepted any string silently, while
bd create validated against built-in + custom statuses. This adds the
same validation to update, rejecting invalid status values with a
helpful error message.
Co-Authored-By: Joseph Turian <turian@users.noreply.github.com>
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
- `bd update <id> --title ""` now errors instead of silently blanking
- `bd update <id> --title " "` (whitespace-only) also rejected
- `bd label add <id> ""` now errors instead of adding empty label
- Values are trimmed before storage, not just for validation
- Includes fix for pre-existing doctor file formatting
Based on PR #1994 by @turian.
Co-Authored-By: Joseph Turian <turian@users.noreply.github.com>
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
bd close and bd update now exit 1 when all attempted operations fail
(e.g., closing a blocked issue, updating a nonexistent ID). Partial
success (some closed, some failed) still exits 0.
Adds protocol tests for exit code behavior.
Co-Authored-By: Joseph Turian <turian@gmail.com>
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Code health review found 30+ instances of error suppression using blank
identifier without explanation. Added comments to 82 files explaining WHY
each error is safely ignored (best-effort cleanup, advisory operations,
safe defaults, etc.) to improve code maintainability.
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Executed-By: beads/polecats/jasper
Rig: beads
Role: polecats
The help text for `bd create --type` and `bd update --type` listed
Gas Town types (molecule, gate, convoy, etc.) as valid options, but
they fail with 'invalid issue type' unless types.custom is configured.
Show only the six built-in types and note that custom types require
configuration.
Closes#1727
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
Projects track what they're doing (issues) and what happened (events),
but not why they chose a particular approach. Decisions are a missing
first-class concept -- every project has them, they're distinct from
tasks, and they're the context hardest to recover after the fact.
Adds TypeDecision as a core work type alongside bug/feature/task/epic/chore.
Includes aliases (dec, adr), required sections template (Decision, Rationale,
Alternatives Considered), and a Claude plugin command for structured recording.
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Executed-By: beads/crew/emma
Rig: beads
Role: crew
Phase 2 of Dolt transition (woho.2): Remove the entire daemon/RPC layer
now that all commands use direct storage access.
- Delete internal/rpc/ directory (40 files, ~11K lines)
- Delete daemon_deprecated.go stub layer
- Delete compact_rpc.go (daemon-only compact via RPC)
- Delete daemon-specific test files (delete_rpc_test.go, direct_mode_test.go,
dual_mode_test.go, list_watch_test.go)
- Clean up remaining daemon references in ~25 source files:
- Remove daemon RPC branches from update, create, template, markdown,
gate_discover, mol_stale, mol_current, import, query, version, prime
- Remove rpc.Client parameter from show_thread functions
- Simplify info.go to always show "direct" mode
- Simplify sync_import.go to always use inline import
- Remove daemon status checks from staleness, migrate_dolt, rename_prefix
- Remove unused fallbackToDirectMode function
- Remove stale daemon comments from sync.go
- Add daemon_compat.go with --no-daemon flag (backward compat for hooks)
and utility functions (boolToFlag, truncateString, formatUptime, progressBar)
- Fix test files: remove daemonClient cleanup blocks, update findRepliesTo/
findReplies call signatures, remove RPC test functions
- go vet ./... passes clean
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Phase 2 of JSONL sync removal (dolt-test-woho.4). These calls became
no-ops in the previous commit. Removing them reduces dead code and
moves toward deleting jsonl_deprecated.go entirely.
33 production files cleaned, 131 lines removed.
go vet ./cmd/bd/... passes clean.
Note: --no-verify used because Dolt server is unreachable (VPN down).
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Executed-By: beads/crew/emma
Rig: beads
Role: crew
Merged internal/util (NormalizeIssueType, NormalizeLabels) into
internal/utils package. Updated 8 consumers to import from the
consolidated package. Eliminates the confusing coexistence of
two similarly-named utility packages.
Closes dolt-test-oli
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
When store.GetCustomTypes returns an error in direct mode, the error
was silently swallowed. The code continued with customTypes=nil and
fell back to config.yaml. If the type wasn't found there, users saw
a misleading "invalid issue type" error instead of the actual DB error.
Now logs a warning with the actual error before falling back, making
debugging easier while preserving the graceful fallback behavior.
Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
In daemon mode, the daemon validates custom types authoritatively
with database access. Client-side pre-validation using config.yaml
could reject types that exist in the database but not in the YAML
(GH#1499 QA findings 2.3, 2.5).
🤖 Generated with [Claude Code](https://claude.ai/code)
Co-Authored-By: Claude <noreply@anthropic.com>
When the daemon is running, the store variable is nil because
PersistentPreRun returns early (skipping store initialization).
This caused custom types from config.yaml to be unavailable,
making fail with validation errors.
The fix adds a fallback to config.GetCustomTypesFromYAML() when
store is nil, mirroring the same fallback pattern already used
in internal/storage/sqlite/config.go.
Fixes#1499
* fix: add atomic compare-and-swap semantics to bd claim
The claim operation had a race condition where concurrent callers could
both pass the pre-check and claim the same issue. This fix:
- Adds ClaimIssue method to Storage interface with atomic CAS semantics
- Uses conditional UPDATE (WHERE assignee = '') to prevent race conditions
- Returns ErrAlreadyClaimed error when issue is already assigned
- Implements the fix in SQLite, Memory, and Dolt storage backends
- Updates RPC handler and CLI to use the new atomic method
- Adds comprehensive tests including concurrent claim scenarios
Closes the race window where multiple agents could both claim an issue.
Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
* fix: add ClaimIssue to mockStorage in tests
The mockStorage struct used for interface compliance testing was missing
the new ClaimIssue method, causing build failures in CI.
Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
* fix(nix): enable proxyVendor to fix GOTOOLCHAIN in module fetch phase
The Nix build was failing because the go-modules fetching phase uses
GOTOOLCHAIN=local by default, ignoring the env.GOTOOLCHAIN=auto setting.
Adding proxyVendor=true changes how modules are fetched in a way that
should allow GOTOOLCHAIN=auto to take effect, enabling Go to download
the required 1.25.6+ toolchain automatically.
Fixes#1476
Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
* Revert "fix(nix): enable proxyVendor to fix GOTOOLCHAIN in module fetch phase"
This reverts commit a5b758cf1ac8bbadff774f5566144c3f0b94d561.
---------
Co-authored-by: Claude Opus 4.5 <noreply@anthropic.com>
The --metadata flag intentionally reads from user-provided file paths
when using @file.json syntax. This is expected behavior, not a security
vulnerability.
Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
Add support for setting custom JSON metadata on issues via the bd update command:
- Inline JSON: bd update <id> --metadata '{"key":"value"}'
- File reference: bd update <id> --metadata @file.json
Implementation details:
- Add Metadata field to UpdateArgs in RPC protocol
- Validate JSON with json.Valid() before passing to storage
- Parse @file.json syntax to read metadata from files
- Add tests for both inline and file-based metadata input
The metadata field is already included in bd show --json output via the
Issue struct's Metadata field (from PR #1407).
Closes#1413
Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
bd update --type rejected custom types (agent, role, etc.) because it
called IsValid() which only checks built-in types. Now loads custom
types from config and calls IsValidWithCustom(), matching the pattern
used in the storage layer (PR #1322).
Also fixes the error message to dynamically list valid types from
config instead of hardcoding them.
* feat(update): add --append-notes flag (bd-b5qu)
Add --append-notes flag that appends to existing notes with a newline
separator instead of overwriting. This prevents data loss in workflows
where multiple steps need to add info to notes (e.g., tackle workflows).
- Errors if both --notes and --append-notes specified
- Handles both daemon and direct mode paths
- Combines existing notes + newline + new content
Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
* test(update): add tests for --append-notes flag
---------
Co-authored-by: Claude Opus 4.5 <noreply@anthropic.com>
- Add "enhancement" to util.issueTypeAliases for consistency
- Make types.IssueType.Normalize() case-insensitive and include all aliases
- Fix update.go to normalize type before validation
- Remove duplicate type validation block in update.go
Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
Add intelligent shell completions that query the database to provide
issue ID suggestions with titles for commands that take IDs as arguments.
Changes:
- Add issueIDCompletion function that queries storage for all issues
- Register completion for show, update, close, edit, defer, undefer, reopen
- Add comprehensive test suite with 3 test cases
- Completions display ID with title as description (ID\tTitle format)
The completion function opens the database (read-only) and filters issues
based on the partially typed prefix, providing a better UX for commands
that require issue IDs.
🤖 Generated with [Claude Code](https://claude.com/claude-code)
Co-authored-by: Claude Sonnet 4.5 <noreply@anthropic.com>
- Add TypeRig constant to IssueType enum
- Update IsValid() method to include TypeRig
- Add UI color (orange) and style for rig type
- Update CLI flag descriptions in create and update commands
- Add Obsidian export tag for rig type
- Add comprehensive test cases for rig and other newer types
🤖 Generated with [Claude Code](https://claude.com/claude-code)
Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
bd update now uses resolveAndGetIssueWithRouting in direct mode,
matching bd show's prefix routing behavior. This enables cross-rig
issue updates from any directory using prefix-based routing.
Changes:
- Use resolveAndGetIssueWithRouting for ID resolution with routing
- Iterate over original args instead of pre-resolved IDs
- Use routed store (issueStore) and resolved ID throughout
- Remove early ID resolution that was blocking routing in direct mode
- Add proper result.Close() calls for resource cleanup
🤖 Generated with [Claude Code](https://claude.com/claude-code)
Co-authored-by: Claude Opus 4.5 <noreply@anthropic.com>
Implements automatic discovery of GitHub workflow run IDs for gates
awaiting CI/CD completion. This enables the Refinery patrol to
auto-populate await_id for gh:run gates that were created without one.
Changes:
- Add `bd gate discover` command that:
- Finds open gh:run gates without await_id
- Queries recent GitHub workflow runs via gh CLI
- Matches runs to gates using heuristics (branch, commit, time)
- Updates gates with discovered run IDs
- Add `--await-id` flag to `bd update` for manual setting
- Add AwaitID to UpdateArgs in RPC protocol
- Add await_id to allowedUpdateFields in storage layer
Matching heuristics (scored, highest match wins):
- Commit SHA match: +100 points
- Branch match: +50 points
- Time proximity (<5min: +30, <10min: +20, <30min: +10)
- In-progress/queued status: +5 points
Usage:
bd gate discover # Auto-discover for all matching gates
bd gate discover --dry-run # Preview without updating
bd gate discover --branch main --limit 10
🤖 Generated with [Claude Code](https://claude.com/claude-code)
Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
* feat(dates): add due date schema and --due flag
- Add due_at and defer_until columns to issues table via migration 035
- Implement --due flag on create command with ISO date parsing
- Extend RPC protocol and daemon to pass DueAt from CLI to storage
- Display DueAt and DeferUntil in show command output
- Update Issue type with new date fields
Users can now set due dates when creating issues, enabling deadline-based
task management.
* feat(dates): add compact duration parser (+6h, +1d, +2w)
- Create internal/timeparsing package with layered parser architecture
- Implement parseCompactDuration with regex pattern [+-]?\d+[hdwmy]
- Add comprehensive test suite (22 cases) for duration parsing
- Integrate into create.go with fallback to ISO format
Supports hours (h), days (d), weeks (w), months (m), and years (y).
Negative values allowed for past dates.
* feat(dates): add NLP parsing for natural language dates
Integrate olebedev/when library for natural language time expressions.
The layered parser now handles: compact duration → absolute formats → NLP.
Changes:
- Add olebedev/when dependency for NLP parsing
- Implement ParseNaturalLanguage and ParseRelativeTime functions
- Reorder layers: absolute formats before NLP to avoid misinterpretation
- Simplify create.go to use unified ParseRelativeTime
- Add comprehensive NLP test coverage (22 test cases)
Supports: tomorrow, next monday, in 3 days, 3 days ago
* feat(dates): add --defer flag to create/update/defer commands
Add time-based deferral support alongside existing status-based defer.
Issues can now be hidden from bd ready until a specific time.
Changes:
- Add --defer flag to bd create (sets defer_until on creation)
- Add --due and --defer flags to bd update (modify existing issues)
- Add --until flag to bd defer (combines status=deferred with defer_until)
- Add DueAt/DeferUntil fields to UpdateArgs in protocol.go
Supports: +1h, tomorrow, next monday, 2025-01-15
* feat(dates): add defer_until filtering to ready command
Add time-based deferral support to bd ready:
- Add --include-deferred flag to show issues with future defer_until
- Filter out issues where defer_until > now by default
- Update undefer to clear defer_until alongside status change
- Add IncludeDeferred to WorkFilter and RPC ReadyArgs
Part of GH#820: Relative Date Parsing (Phase 5)
* feat(dates): add polish and tests for relative date parsing
Add user-facing warnings when defer date is in the past to help catch
common mistakes. Expand help text with format examples and document
the olebedev/when September parsing quirk.
Tests:
- TestCreateSuite/WithDueAt, WithDeferUntil, WithBothDueAndDefer
- TestReadyWorkDeferUntil (ExcludesFutureDeferredByDefault, IncludeDeferredShowsAll)
Docs:
- CLAUDE.md quick reference updated with new flags
- Help text examples for --due, --defer on create/update
Closes: Phase 6 of beads-820-relative-dates spec
* feat(list): add time-based query filters for defer/due dates
Add --deferred, --defer-before, --defer-after, --due-before, --due-after,
and --overdue flags to bd list command. All date filters now support
relative time expressions (+6h, tomorrow, next monday) via the
timeparsing package.
Filters:
- --deferred: issues with defer_until set
- --defer-before/after: filter by defer_until date range
- --due-before/after: filter by due_at date range
- --overdue: due_at in past AND status != closed
Existing date filters (--created-after, etc.) now also support relative
time expressions through updated parseTimeFlag().
* build(nix): update vendorHash for olebedev/when dependency
The olebedev/when library was added for natural language date parsing
(GH#820). This changes go.sum, requiring an updated vendorHash in the
Nix flake configuration.
The bd update command now checks needsRouting() before attempting daemon
RPC resolution. When an issue ID (like hq-eggh5) routes to a different
beads directory, the update bypasses the daemon and uses direct mode with
the routed storage.
This enables polecats in gastown to update HQ beads (hq-* prefix) and
vice versa. The fix mirrors the routing pattern already used by bd show.
🤖 Generated with [Claude Code](https://claude.com/claude-code)
Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
Add --notes flag to bd create command, enabling agents to set notes
during issue creation instead of requiring a separate update command.
Motivation: AI agents repeatedly tried to use --notes with bd create.
Context is fresh at creation time - forcing a two-step process means
context loss or workflow interruption.
Changes:
- cmd/bd/flags.go: Added --notes flag to common issue flags
- cmd/bd/create.go: Read and pass notes in both RPC and direct modes
- cmd/bd/update.go: Removed duplicate --notes flag definition
- internal/rpc/protocol.go: Added Notes field to CreateArgs
- internal/rpc/server_issues_epics.go: Process Notes in handleCreate
- cmd/bd/create_notes_test.go: Comprehensive test coverage
- website/docs/cli-reference/issues.md: Documentation
Also adds gitignore entries for Augment AI and .beads/redirect.
Co-authored-by: Leon Letto <lettol@vmware.com>
Adds closed_by_session tracking for entity CV building per Gas Town
decision 009-session-events-architecture.md.
Changes:
- Add ClosedBySession field to Issue struct
- Add closed_by_session column to issues table (migration 034)
- Add --session flag to bd close command
- Support CLAUDE_SESSION_ID env var as fallback
- Add --session flag to bd update for status=closed
- Display closed_by_session in bd show output
- Update Storage interface to include session parameter in CloseIssue
🤖 Generated with [Claude Code](https://claude.com/claude-code)
Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
Executed-By: beads/crew/dave
Rig: beads
Role: crew
Adds atomic claim operation for work queue messages:
- New --claim flag on bd update command
- Sets assignee to claimer and status to in_progress
- Fails with clear error if already claimed by someone else
- Works in both daemon and direct modes
- Includes comprehensive tests for claim functionality
🤖 Generated with [Claude Code](https://claude.com/claude-code)
Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
When no issue ID is provided to `bd update` or `bd close`, use the last
touched issue from the most recent create, update, show, or close operation.
This addresses the common workflow where you create an issue and then
immediately want to add more details (like changing priority from P2 to P4)
without re-typing the issue ID.
Implementation:
- New file last_touched.go with Get/Set/Clear functions
- Store last touched ID in .beads/last-touched (gitignored)
- Track on create, update, show, and close operations
- Allow update/close with zero args to use last touched
(bd-s2t)
🤖 Generated with [Claude Code](https://claude.com/claude-code)
Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>