- Remove cross-store squash logic from mol_squash.go
- Delete runWispSquash() and squashWispToPermanent() functions
- Simplify runMolSquash() to work with main store only
- Update mol_burn.go to work with main database
- Remove .beads-wisp/ directory references
- Look for Wisp=true issues in main store instead
- Update mol_bond.go to use Wisp flag instead of separate store
- --wisp now creates issues with Wisp=true in main store
- --pour creates issues with Wisp=false (persistent)
- Update bondProtoMol signature to accept both flags
- Deprecate wisp storage functions in beads.go
- WispDirName, FindWispDir, FindWispDatabasePath
- NewWispStorage, EnsureWispGitignore, IsWispDatabase
- All marked deprecated with reference to bd-bkul
- Remove obsolete cross-store squash tests
- TestSquashWispToPermanent
- TestSquashWispToPermanentWithSummary
- TestSquashWispToPermanentKeepChildren
All tests pass. Build succeeds.
🤖 Generated with [Claude Code](https://claude.com/claude-code)
Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
Progress on eliminating separate .beads-wisp/ directory:
- Add --wisp flag to bd create (creates issue with Wisp=true)
- Update bd wisp create to use main db instead of separate wisp storage
- Update bd wisp list to query main db with Wisp filter
- Update bd wisp gc to work with main database
- Add Wisp field to RPC ListArgs for daemon mode support
- Fix terminology: use "old/abandoned" for time-based cleanup,
reserve "stale" for graph-pressure staleness (per Gas Town taxonomy)
Still TODO:
- Finish mol squash simplification (remove cross-store logic)
- Remove runWispSquash and squashWispToPermanent functions
- Update mol burn similarly
- Deprecate .beads-wisp/ functions in internal/beads/beads.go
- Test all changes
🤖 Generated with [Claude Code](https://claude.com/claude-code)
Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
Completely rewrote the molecular chemistry doc to be more practical:
- Start with execution semantics (what users care about)
- TL;DR section at top with 5 key concepts
- Explain dependency types and blocking behavior
- Clarify molecules = epics (no special types needed)
- Move chemistry metaphor to secondary section
- Add common patterns (sequential, fanout, dynamic bonding)
- Keep agent pitfalls and quick reference
The doc now reads like a reference manual with examples rather than
a philosophical treatise on work composition.
Filed gt-qe9w for Gas Town docs to follow same pattern.
🤖 Generated with [Claude Code](https://claude.com/claude-code)
Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
Adds release notes for v0.36.0 including:
- Formula system and gate issue type
- bd list --pretty --watch enhancements
- Child→parent dep prevention (LLM temporal trap)
- Multiple bug fixes
🤖 Generated with [Claude Code](https://claude.com/claude-code)
Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
Highlights that this prevents a common LLM temporal reasoning trap
where 'Phase 1 before Phase 2' gets modeled as Phase 1 blocking Phase 2
instead of Phase 2 depending on Phase 1.
🤖 Generated with [Claude Code](https://claude.com/claude-code)
Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
extractParentChain was using strings.Split(id, ".") which incorrectly
parsed prefixes containing dots (like "alicealexandra.com"). This caused
--parent to fail with "parent does not exist" even when the parent was
present in the database.
The fix uses IsHierarchicalID to walk up the hierarchy correctly, only
splitting on dots followed by numeric suffixes (the actual hierarchy
delimiter).
Example:
- "test.example-abc.1" now correctly returns ["test.example-abc"]
- Previously it incorrectly returned ["test", "test.example-abc"]
🤖 Generated with [Claude Code](https://claude.com/claude-code)
Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
The buildAllowedPrefixSet function now parses the allowed_prefixes config
and includes those prefixes when validating imports. This allows mol-*
prefixes to be imported without errors when configured.
Config example: bd config set allowed_prefixes "gt-,mol-"
- bd-hr39: Add `needs` field to Step as alias for depends_on. Converts
to blocking dependencies between sibling steps during cooking.
- bd-j4cr: Add `waits_for` field to Step. Values: all-children or
any-children. Preserved as gate:<value> label during cooking.
- bd-47qx: Add --prefix flag to bd cook command to prepend a prefix
to proto IDs, enabling use of project prefixes like gt-.
Includes validation, dry-run output, and comprehensive tests.
🤖 Generated with [Claude Code](https://claude.com/claude-code)
Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
Fixes from self-review of formula parser and bd cook:
1. Atomicity: Add cleanup on failure in cookFormula - if labels/deps
transaction fails, delete the already-created issues
2. Validation: Add recursive depends_on validation for child steps
and validate priority ranges for children
3. Documentation: Mark unimplemented fields (Expand, ExpandVars,
Condition, Gate) with TODO(future) comments
4. Thread safety: Add note that Parser is NOT thread-safe
5. Error messages: Track first definition location for duplicate ID
errors (e.g., "duplicate id at steps[1], first defined at steps[0]")
🤖 Generated with [Claude Code](https://claude.com/claude-code)
Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
Implements a new formula system for defining workflow templates in YAML:
- internal/formula/types.go: YAML schema types for .formula.yaml files
- Formula, Step, VarDef, ComposeRules, BondPoint, Gate types
- Support for workflow, expansion, and aspect formula types
- Variable definitions with required, default, enum, and pattern
- internal/formula/parser.go: Parser with extends/inheritance support
- Parse formula files from multiple search paths
- Resolve extends references for formula inheritance
- Variable extraction and substitution
- Variable validation (required, enum, pattern)
- cmd/bd/cook.go: bd cook command to compile formulas into protos
- Parse and resolve formula YAML
- Create proto bead with template label
- Create child issues for each step
- Set up parent-child and blocking dependencies
- Support --dry-run, --force, --search-path flags
Example workflow:
bd cook mol-feature.formula.yaml
bd pour mol-feature --var component=Auth --var framework=react
🤖 Generated with [Claude Code](https://claude.com/claude-code)
Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
When creating issues with explicit hierarchical IDs (e.g., bd-test.1, bd-test.2
via --id flag or import), the child_counters table was not being updated.
This caused GetNextChildID to return colliding IDs when later called with
--parent.
Changes:
- Add ensureChildCounterUpdatedWithConn() to update counter on explicit child creation
- Add ParseHierarchicalID() to extract parent and child number from IDs
- Update CreateIssue to call counter update after hierarchical ID validation
- Update EnsureIDs to call counter update when parent exists
- Add post-insert phase in batch operations to update counters after FK
constraint can be satisfied
- Update tests to reflect new behavior where counter is properly initialized
🤖 Generated with [Claude Code](https://claude.com/claude-code)
Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
This prevents a common mistake where users add dependencies from child
issues to their parent epics. This creates a deadlock:
- Child can't start (blocked by open parent)
- Parent can't close (children not done)
Changes:
- dep.go: Reject child→parent deps at creation time with clear error
- server_labels_deps_comments.go: Same check for daemon RPC
- doctor/validation.go: New check detects existing bad deps
- doctor/fix/validation.go: Auto-fix removes bad deps
- doctor.go: Wire up check and fix handler
🤖 Generated with [Claude Code](https://claude.com/claude-code)
Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
Remove the spawn command from bd mol. Proto instantiation now uses:
- bd pour <proto> - Instantiate as persistent mol (liquid phase)
- bd wisp create <proto> - Instantiate as ephemeral wisp (vapor phase)
Rationale:
- 'spawn' doesn't fit the chemistry metaphor
- Two phase transitions (pour/wisp) are clearer than one command with flags
- Avoids confusion about defaults
Changes:
- Delete mol_spawn.go
- Update mol.go, mol_catalog.go, mol_distill.go to reference pour/wisp
- Update pour.go and wisp.go to remove 'Equivalent to spawn' comments
- Update info.go changelog entries
- Update CHANGELOG.md, ARCHITECTURE.md, DELETIONS.md
Closes bd-8y9t
Comment timestamps were being overwritten with CURRENT_TIMESTAMP during
import, causing infinite sync loops between hosts as each import would
update timestamps.
Added ImportIssueComment() method that accepts and preserves the original
timestamp from JSONL, and updated importComments() to use it.
Closes#735
The daemon sync functions (gitPushFromWorktree, syncBranchPull) were
checking git's branch tracking config and falling back to 'origin',
but ignoring bd's sync.remote config setting.
Now these functions check sync.remote config first, matching the
behavior of sync_check.go and sync_import.go.
Closes#736
Removes unnecessary parenthetical explanation about possible JSONL file names since findJSONLPath() already encapsulates that logic.
Co-authored-by: Charles P. Cross <cpdata@users.noreply.github.com>
Remove verbose parenthetical explanation from comment on line 73.
The comment now reads '// Get the actual JSONL path' instead of
'// Get the actual JSONL path (could be issues.jsonl, beads.base.jsonl, etc.)'
This is a documentation cleanup with no functional changes.
When 'bd doctor --fix' detects DB has more issues than JSONL, it runs 'bd export' to sync them. However, 'bd export' without -o flag outputs to stdout instead of writing to .beads/issues.jsonl, making the fix a no-op.
Add -o .beads/issues.jsonl --force to the export command to ensure the JSONL file is actually updated.
Co-authored-by: matt wilkie <maphew@gmail.com>
When 'bd doctor --fix' detects DB has more issues than JSONL, it runs
'bd export' to sync them. However, 'bd export' without -o flag outputs
to stdout instead of writing to .beads/issues.jsonl, making the fix a
no-op.
Add -o .beads/issues.jsonl --force to the export command to ensure the
JSONL file is actually updated.