Fixes:
- P0 priority preserved - omitempty removed from Priority field (GH#671)
- nil pointer check in markdown parsing (GH#674)
🤖 Generated with [Claude Code](https://claude.com/claude-code)
Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
Remove cleanupSnapshots() and validateSnapshotConsistency() from
deletion_tracking.go - both were marked deprecated and never called.
The other two deprecated functions (getSnapshotStats, initializeSnapshotsIfNeeded)
are still used by tests and production code respectively.
Filed bd-xsl9 to track removal of legacy autoflush dual-path code.
🤖 Generated with [Claude Code](https://claude.com/claude-code)
Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
- Remove omitempty from Priority field so P0 issues preserve priority:0
- Add nil check for store in createIssuesFromMarkdown
🤖 Generated with [Claude Code](https://claude.com/claude-code)
Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
gosec G204 warning - the cmdName comes from user configuration
(mail_delegate setting), not untrusted input.
🤖 Generated with [Claude Code](https://claude.com/claude-code)
Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
Wisp = ephemeral vapor produced by the Steam Engine (Gas Town).
This aligns with the metaphor:
- Claude = Fire
- Claude Code = Steam
- Gas Town = Steam Engine
- Wisps = ephemeral vapor it produces
Changes:
- types.Issue.Ephemeral → types.Issue.Wisp
- types.IssueFilter.Ephemeral → types.IssueFilter.Wisp
- JSON field: "ephemeral" → "wisp"
- CLI flag: --ephemeral → --wisp (bd cleanup)
- All tests updated
Note: SQLite column remains "ephemeral" (no migration needed).
This is a breaking change for JSON consumers using 0.33.0.
🤖 Generated with [Claude Code](https://claude.com/claude-code)
Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
Ephemeral molecules release:
- bd mol spawn creates ephemeral issues by default
- Ephemeral issues never export to JSONL
- bd mol squash with --summary for agent summaries
🤖 Generated with [Claude Code](https://claude.com/claude-code)
Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
Ephemeral issues should never be exported to issues.jsonl. They exist only
in SQLite and are shared via .beads/redirect pointers. This prevents
"zombie" issues from resurrecting after mol squash deletes them.
Changes:
- Filter ephemeral issues in autoflush, export, and multirepo_export
- Add --summary flag to bd mol squash for agent-provided summaries
- Fix DeleteIssue to also remove comments (missing cascade)
- Add tests for ephemeral filtering and comment deletion
🤖 Generated with [Claude Code](https://claude.com/claude-code)
Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
Implements Tier 2 of the ephemeral molecule cleanup workflow. The squash
command compresses a molecule's ephemeral children into a single digest issue.
Features:
- Collects all ephemeral child issues of a molecule
- Generates a structured digest with execution summary
- Creates a non-ephemeral digest issue linked to the root
- Optionally deletes ephemeral children (default behavior)
- Supports --dry-run and --keep-children flags
🤖 Generated with [Claude Code](https://claude.com/claude-code)
Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
Molecule spawning now creates ephemeral issues that can be bulk-deleted
when closed using `bd cleanup --ephemeral`. This supports the ephemeral
molecule workflow pattern where execution traces are cleaned up while
outcomes persist.
Changes:
- Add `ephemeral` parameter to cloneSubgraph() and spawnMolecule()
- mol spawn: ephemeral=true by default, add --persistent flag to opt out
- mol run: ephemeral=true (molecule execution)
- mol bond: ephemeral=true (bonded protos)
- template instantiate: ephemeral=false (deprecated, backwards compat)
This is Tier 1 of the ephemeral molecule workflow epic (bd-2vh3).
🤖 Generated with [Claude Code](https://claude.com/claude-code)
Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
Add done channel to runGitCmdWithTimeoutMsg and runCmdWithTimeoutMessage
so goroutines exit immediately when command completes, rather than
waiting for the full timeout duration.
Follow-up to PR #678.
🤖 Generated with [Claude Code](https://claude.com/claude-code)
Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
Code review found that bondProtoProto was setting Labels on the compound
issue, but CreateIssue doesn't persist labels (they're stored separately.
Fixed by calling AddLabel after creating the compound.
Also added comprehensive tests for:
- isProto() - template label detection
- operandType() - proto vs molecule string
- minPriority() - priority comparison
- bondProtoProto() - compound proto creation with deps and labels
- bondProtoMol() - spawn proto and attach to molecule
- bondMolMol() - join two molecules with sequential/parallel bonds
Tests verify dependency types (blocks vs parent-child) based on bond type.
🤖 Generated with [Claude Code](https://claude.com/claude-code)
Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
EOF
)
The timerChan and timeoutChan variables were created but never read from,
causing lint errors. Removed them since we don't need channel synchronization -
we only want the timeout to trigger a message, not block anything.
Agents naturally use spawn-style (variable=value) for both spawn and
distill commands. Now distill accepts both:
- --var branch=feature-auth (spawn-style)
- --var feature-auth=branch (substitution-style)
Smart detection checks which side appears in the epic text:
- Right side found → spawn-style (left is varname)
- Left side found → substitution-style (left is value)
- Both found → prefers spawn-style (more common guess)
Embodies the Beads philosophy: watch what agents do, make their guess correct.
🤖 Generated with [Claude Code](https://claude.com/claude-code)
Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
When git push or other git operations hang waiting for credential/browser
auth, show a helpful message to the user after 5 seconds of inactivity
instead of appearing frozen.
Added:
- runCmdWithTimeoutMessage() in internal/syncbranch/worktree.go
- runGitCmdWithTimeoutMsg() in cmd/bd/sync.go
- Both functions print a message after timeout delay with advice
to check for browser auth prompts
Fixes issue #647 (bd sync frozen waiting for browser auth)
Adds --attach (repeatable) and --attach-type flags to bd mol spawn
for on-the-fly composition of molecules.
Usage:
bd mol spawn mol-feature --attach mol-testing --attach mol-docs
Each attached proto is spawned and bonded to the primary molecule
using the specified bond type (default: sequential).
Also fixes a pre-existing bug where bondProtoMol and bondMolMol tried
to add both parent-child AND blocks dependencies between the same
issues, violating the UNIQUE constraint on (issue_id, depends_on_id).
Now sequential bonds use blocks type, parallel/conditional use
parent-child.
Closes bd-obep
🤖 Generated with [Claude Code](https://claude.com/claude-code)
Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
Implements bd mol distill to reverse the spawn operation:
- molecule → proto (spawn is proto → molecule)
Features:
- --as flag for custom proto title
- --var value=variable to replace concrete values with placeholders
- --dry-run to preview the distilled structure
- Preserves full subgraph structure and dependencies
- Adds template label to all cloned issues
Also updates AGENTS.md with landing checklist.
Closes: bd-iq19
🤖 Generated with [Claude Code](https://claude.com/claude-code)
Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
- Modified fix.DBJSONLSync() to detect which direction to sync:
- If DB > JSONL: run 'bd export' to sync JSONL (DB has newer data)
- If JSONL > DB: run 'bd sync --import-only' to import (JSONL is source of truth)
- If equal but different timestamps: use file mtime to decide direction
- Updated CheckDatabaseJSONLSync() error messages to recommend correct fix direction:
- Shows different guidance based on whether DB or JSONL has more issues
- Added helper functions:
- countDatabaseIssues() to count issues in SQLite
- countJSONLIssues() to count issues in JSONL (local, avoids circular import)
- Added tests for countJSONLIssues() with edge cases
Fixes issue where 'bd doctor --fix' would recommend 'bd sync --import-only'
when DB > JSONL, which would be a no-op since JSONL hasn't changed.
Implement bd mol bond for composing protos and molecules:
- proto + proto → compound proto (reusable template)
- proto + mol → spawn proto, attach to molecule
- mol + proto → spawn proto, attach to molecule
- mol + mol → join into compound molecule
Supports --type (sequential/parallel/conditional) and --dry-run flags.
Closes bd-o91r.
🤖 Generated with [Claude Code](https://claude.com/claude-code)
Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
Agents naturally type 'bd mail' when working with beads, but mail
functionality is provided by orchestrators like Gas Town. This command
bridges that gap by delegating to a configured mail provider.
Configuration options (checked in order):
1. BEADS_MAIL_DELEGATE or BD_MAIL_DELEGATE env var
2. mail.delegate config setting
Example usage:
export BEADS_MAIL_DELEGATE="gt mail"
bd mail inbox # Runs: gt mail inbox
bd mail send mayor/... # Runs: gt mail send mayor/...
🤖 Generated with [Claude Code](https://claude.com/claude-code)
Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
bd mol run = bond + assign + pin:
- Bonds the molecule (creates issues from template)
- Assigns root to the caller
- Sets root status to in_progress
- Pins root issue for session recovery
After a crash or session reset, the pinned root ensures the agent
can resume from where it left off by checking 'bd ready'.
This is the Gas Town integration point that makes molecules immortal.
Closes: bd-icnf
Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
The simple single-issue instantiation in molecule.go is superseded by
the full DAG-based mol commands. Use 'bd mol bond' for all molecule
instantiation - it handles both single-issue and multi-issue molecules.
Closes: bd-8b0x
Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
Adds the mol command group for molecule workflows:
- bd mol catalog - list available molecules
- bd mol show <id> - show molecule structure and variables
- bd mol bond <id> --var k=v - instantiate a molecule
Molecules are templates with workflow semantics - they are the
orchestration primitive for Gas Town. This unifies the template
system under the mol command.
The template commands are deprecated but still work:
- bd template list -> use bd mol catalog
- bd template show -> use bd mol show
- bd template instantiate -> use bd mol bond
Closes: bd-ffjt
Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
BD_GUIDE.md generation was removed in 125e36d5 when bd onboard was
simplified to output a minimal snippet pointing to bd prime.
This commit:
- Removes stale BD_GUIDE.md references from CLAUDE.md
- Removes dead checkAndSuggestBDGuideUpdate() code from version_tracking.go
- Removes BD_GUIDE.md from UNINSTALLING.md file list
Closes#660 (already fixed in v0.30.7 via f1380e8b)
🤖 Generated with [Claude Code](https://claude.com/claude-code)
Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
The 'bd pin' command was failing with "invalid field for update: pinned"
because the pinned field was missing from allowedUpdateFields.
Fixes:
- Add 'pinned' to allowedUpdateFields in queries.go
- Update importer to include pinned field in updates during import
- Add equalBool comparator for IssueDataChanged to detect pinned changes
- Fix stats query to count pinned=1 instead of status='pinned'
- Fix pinIndicator in list.go to check issue.Pinned instead of status
This unblocks gt mail --pinned functionality.
🤖 Generated with [Claude Code](https://claude.com/claude-code)
Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
Add ResolveForWrite helper that resolves symlinks before writing, so
atomic writes go to the symlink target instead of replacing the symlink.
This prevents `bd setup claude` from overwriting nix/home-manager
managed ~/.claude/settings.json symlinks.
Closes#665
Co-authored-by: qmx <qmx@qmx.me>
Mail is orchestration, not data plane. The bd mail commands were just
sugar over bd create/list/show with type=message. Gas Town (gt) now
owns mail routing and delivery.
Removed:
- cmd/bd/mail.go - all mail subcommands (send, inbox, read, ack, reply)
- cmd/bd/mail_test.go - mail command tests
- docs/messaging.md - dedicated mail documentation
- EventMessage hook - no longer triggered
Kept (data plane):
- type=message as valid issue type
- Sender, Ephemeral fields on issues
- replies_to dependency type for threading
Coordination: gt-9xg implements native mail in Gas Town.
🤖 Generated with [Claude Code](https://claude.com/claude-code)
Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
Resolves conflicts and converts new defer/undefer commands from
fatih/color to the lipgloss semantic color system.
Key changes:
- Added StatusDeferred case in graph.go with ui.RenderAccent
- Converted status.go to use ui package for colorized output
- Converted defer.go/undefer.go to use ui package
- Merged GroupID and Aliases for status command
- Updated pre-commit hook version to 0.31.0
- Ran go mod tidy to remove fatih/color dependency
- Update nix vendorHash after fatih/color removal
- Bump version to 0.30.7
- Add GroupID to remaining commands for proper cobra grouping
- Apply semantic color rendering to list and stale commands
- Update pre-commit hook template
Replace all fatih/color usages with internal/ui package that provides:
- Semantic color tokens (Pass, Warn, Fail, Accent, Muted)
- Adaptive light/dark mode support via Lipgloss AdaptiveColor
- Ayu theme colors for consistent, accessible output
- Tufte-inspired data-ink ratio principles
Files migrated: 35 command files in cmd/bd/
Add docs/ui-philosophy.md documenting:
- Semantic token usage guidelines
- Light/dark terminal optimization rationale
- Tufte and perceptual UI/UX theory application
- When to use (and not use) color in CLI output
The doctor's version tracking check was looking at metadata.json:LastBdVersion,
but version tracking was moved to .local_version file (gitignored). This caused
the "LastBdVersion field is empty" warning to persist even after running bd
commands, because those commands update .local_version but not metadata.json.
- Update CheckMetadataVersionTracking to read from .local_version
- Rename check from "Metadata Version Tracking" to "Version Tracking"
- Update tests to use .local_version instead of metadata.json
- Remove unused configfile import
🤖 Generated with [Claude Code](https://claude.com/claude-code)
Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
Add 'deferred' as a valid issue status for issues that are deliberately
put on ice - not blocked by dependencies, just postponed for later.
Changes:
- Add StatusDeferred constant and update IsValid() validation
- Add DeferredIssues to Statistics struct with counting in both SQLite
and memory storage
- Add 'bd defer' command to set status to deferred
- Add 'bd undefer' command to restore status to open
- Update help text across list, search, count, dep, stale, and config
- Update MCP server models and tools to accept deferred status
- Add deferred to blocker status checks (schema, cache, ready, compact)
- Add StatusDeferred to public API exports (beads.go, internal/beads)
- Add snowflake styling for deferred in dep tree and graph views
Semantics:
- deferred vs blocked: deferred is a choice, blocked is forced
- deferred vs closed: deferred will be revisited, closed is done
- Deferred issues excluded from 'bd ready' (already works since
default filter only includes open/in_progress)
- Deferred issues still block dependents (they are not done!)
- Deferred issues visible in 'bd list' and 'bd stale'
🤖 Generated with [Claude Code](https://claude.com/claude-code)
Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
Consolidate `bd stats` and `bd status` into a unified command:
- Add `stats` as alias for `status` command
- Add colorized output with emoji header
- Include all Statistics fields (tombstones, pinned, epics, lead time)
- Add `--no-activity` flag to skip git activity parsing
- Remove standalone statsCmd from ready.go (~90 lines)
- Update StatusOutput to use types.Statistics directly
🤖 Generated with [Claude Code](https://claude.com/claude-code)
Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>