Commit Graph

7 Commits

Author SHA1 Message Date
Steve Yegge
5e971bd90a docs: add molecular chemistry documentation (bd-ul59)
Create docs/MOLECULES.md with comprehensive coverage of:
- Layer cake architecture (formulas → protos → molecules → epics → issues)
- Phase metaphor (solid/proto, liquid/mol, vapor/wisp)
- Phase transitions (pour, wisp create, squash, burn)
- Bonding patterns (proto+proto, proto+mol, mol+mol)
- Agent pitfalls (temporal language, forgetting to squash)
- Orphan vs stale matrix
- Progress tracking (computed, not stored)
- Parallelism model (default parallel, opt-in sequential)

Update CLI_REFERENCE.md with Molecular Chemistry section covering:
- Proto/template commands
- Pour command
- Wisp commands
- Bonding commands
- Squash and burn commands

Update ARCHITECTURE.md with cross-reference to new MOLECULES.md.

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2025-12-24 19:31:14 -08:00
Steve Yegge
9ad70cce64 refactor(mol): remove bd mol spawn - use pour/wisp only (bd-8y9t)
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
2025-12-24 12:52:47 -08:00
Steve Yegge
98d665c6fd docs: add Wisps and Molecules architecture section
Document that wisps are intentionally local-only and use hard delete
instead of tombstones. This is by design - wisps never sync to other
clones, so tombstones are unnecessary overhead.

Closes bd-4bsb
2025-12-21 21:08:57 -08:00
Steve Yegge
166d66205c docs: update beads.jsonl references to issues.jsonl
Fixes GH#409 - Documentation inconsistently referred to beads.jsonl
as the canonical filename when issues.jsonl has been the default
since v0.25.1 (bd-6xd).

Updated files:
- docs/ARCHITECTURE.md
- docs/CLI_REFERENCE.md
- docs/PROTECTED_BRANCHES.md
- docs/ADVANCED.md
- docs/GIT_INTEGRATION.md
- docs/MULTI_REPO_AGENTS.md
- docs/MULTI_REPO_MIGRATION.md
- docs/TROUBLESHOOTING.md
- examples/*/README.md
- skills/beads/references/CLI_REFERENCE.md

Note: beads.jsonl is still supported for backward compatibility.

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2025-12-16 01:08:46 -08:00
Steve Yegge
c3e4172be7 bd sync: 2025-11-25 11:35:26 2025-11-25 11:35:26 -08:00
Steve Yegge
fcd6ca694e Document blocked_issues_cache architecture and behavior
Add comprehensive documentation for the blocked_issues_cache optimization
that improved GetReadyWork performance from 752ms to 29ms (25x speedup).

Documentation locations:
- blocked_cache.go: Detailed package comment covering architecture,
  invalidation strategy, transaction safety, edge cases, and future
  optimizations
- ready.go: Enhanced comment at query site explaining the optimization
  and maintenance triggers
- ARCHITECTURE.md: New section with diagrams, blocking semantics,
  performance characteristics, and testing instructions

Closes bd-1w6i

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude <noreply@anthropic.com>
2025-11-24 01:14:21 -08:00
Steve Yegge
a9b2f9f553 Fix race condition in auto-flush mechanism (issue bd-52)
Critical fixes to code review findings:

1. Remove global state access from flushToJSONLWithState
   - FlushManager now has true single ownership of flush state
   - No more race conditions from concurrent global state access
   - flushToJSONLWithState trusts only the flushState parameter
   - Legacy wrapper handles success detection via failure count

2. Fix shutdown timeout data loss risk
   - Increased timeout from 5s → 30s to prevent data loss
   - Added detailed comments explaining the timeout rationale
   - Better error message indicates potential data loss scenario

Implementation details:
- New FlushManager uses event-driven single-owner pattern
- Channels eliminate shared mutable state (markDirtyCh, flushNowCh, etc.)
- Comprehensive race detector tests verify concurrency safety
- Backward compatible with existing tests via legacy code path
- ARCHITECTURE.md documents design principles and guarantees

Test results:
- All race detector tests pass (TestFlushManager*)
- Legacy API compatibility verified (TestMarkDirtyAndScheduleFlush*)
- No race conditions detected under concurrent load

Future improvements tracked as beads:
- bd-gdn: Add functional tests for flush correctness verification
- bd-5xt: Log errors from timer-triggered flushes
- bd-i00: Convert magic numbers to named constants

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude <noreply@anthropic.com>
2025-11-20 21:24:31 -05:00