Commit Graph

3776 Commits

Author SHA1 Message Date
Steve Yegge
fcf5e6aab6 chore: bump version to v0.35.0
Adds release notes for v0.35.0 including:
- Dynamic molecule bonding with --ref flag
- bd activity command for real-time state feed
- waits-for dependency type for fanout gates
- Parallel step detection for molecules
- bd list --parent flag
- Molecule navigation commands
- Performance indexes and bug fixes

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

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2025-12-23 04:58:19 -08:00
Steve Yegge
379f80d7f7 bd sync: 2025-12-23 04:58:04 2025-12-23 04:58:04 -08:00
Steve Yegge
0c14054a52 bd sync: 2025-12-23 04:49:44 2025-12-23 04:49:44 -08:00
Steve Yegge
90edbc41cc bd sync: 2025-12-23 04:49:14 2025-12-23 04:49:14 -08:00
Steve Yegge
f66f246546 bd sync: 2025-12-23 04:48:32 2025-12-23 04:48:32 -08:00
Steve Yegge
a097886b98 bd sync: 2025-12-23 04:47:20 2025-12-23 04:47:20 -08:00
Steve Yegge
064e9229ed bd sync: 2025-12-23 04:46:23 2025-12-23 04:46:23 -08:00
Steve Yegge
ee1dc988da bd sync: 2025-12-23 04:45:33 2025-12-23 04:45:33 -08:00
Steve Yegge
ee4750f606 bd sync: 2025-12-23 04:45:01 2025-12-23 04:45:01 -08:00
Steve Yegge
5e4a3001d5 bd sync: 2025-12-23 04:44:17 2025-12-23 04:44:17 -08:00
Steve Yegge
cc227dbcc3 bd sync: 2025-12-23 04:43:29 2025-12-23 04:43:29 -08:00
Steve Yegge
b295768435 bd sync: 2025-12-23 04:35:08 2025-12-23 04:35:08 -08:00
Steve Yegge
bea883057e bd sync: 2025-12-23 04:35:03 2025-12-23 04:35:03 -08:00
Steve Yegge
356fda3a32 bd sync: 2025-12-23 04:33:43 2025-12-23 04:33:43 -08:00
Steve Yegge
41aedacd7a bd sync: 2025-12-23 04:20:56 2025-12-23 04:20:56 -08:00
Steve Yegge
0bc421f1af bd sync: 2025-12-23 04:16:32 2025-12-23 04:16:53 -08:00
Steve Yegge
09e5104ee7 bd sync: 2025-12-23 04:01:07 2025-12-23 04:16:53 -08:00
Steve Yegge
90573511e4 bd sync: 2025-12-23 04:00:13 2025-12-23 04:16:53 -08:00
Steve Yegge
da809061db fix: emit rich mutation events for status changes (bd-313v)
- Add emitRichMutation() function for events with metadata
- handleClose now emits MutationStatus with old/new status
- handleUpdate detects status changes and emits MutationStatus
- Add comprehensive tests for rich mutation events

Also:
- Add activity.go test coverage (bd-3jcw):
  - Tests for parseDurationString, filterEvents, formatEvent
  - Tests for all mutation type displays
- Fix silent error handling in --follow mode (bd-csnr):
  - Track consecutive daemon failures
  - Show warning after 5 failures (rate-limited to 30s)
  - Show reconnection message on recovery

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

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2025-12-23 04:16:26 -08:00
Steve Yegge
3f51ca5454 chore: gitignore .runtime/ (Claude Code runtime) 2025-12-23 04:07:16 -08:00
Steve Yegge
fa9a88e2a3 feat: add waits-for dependency type for fanout gates (bd-xo1o.2)
Adds 'waits-for' dependency type for dynamic molecule bonding:
- DepWaitsFor blocks an issue until spawner's children are closed
- Two gate types: all-children (wait for all) or any-children (first)
- Updated blocked_cache.go CTE to handle waits-for dependencies
- Added --waits-for and --waits-for-gate flags to bd create command
- Added WaitsForMeta struct for gate metadata storage
- Full test coverage for all gate types and dynamic child scenarios

This enables patrol molecules to wait for dynamically-bonded arms to
complete before proceeding (Christmas Ornament pattern).

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

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2025-12-23 04:00:00 -08:00
Steve Yegge
37fd1ce614 feat: add parallel step detection for molecules (bd-xo1o.4)
Add --parallel flag to `bd mol show` that analyzes molecule structure
and identifies which steps can run in parallel. Also add --mol flag to
`bd ready` to list ready steps within a specific molecule.

Features:
- `bd mol show <id> --parallel`: Shows parallel group annotations
- `bd ready --mol <id>`: Lists ready steps with parallel opportunities
- Detects steps at same blocking depth that can parallelize
- Groups steps without mutual blocking deps into parallel groups
- JSON output includes full parallel analysis

Algorithm:
- Build dependency graph from blocking deps (blocks, conditional-blocks)
- Calculate blocking depth (distance from unblocked state)
- Group steps at same depth with no mutual blocking into parallel groups
- Mark steps as ready if open/in_progress with no open blockers

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

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2025-12-23 03:57:08 -08:00
Steve Yegge
72c1c431ef bd sync: 2025-12-23 03:56:58 2025-12-23 03:56:58 -08:00
Steve Yegge
ce85fd4930 bd sync: 2025-12-23 03:48:52 2025-12-23 03:48:52 -08:00
Steve Yegge
ee04b1ea96 feat: add dynamic molecule bonding with --ref flag (bd-xo1o.1)
Implements the Christmas Ornament pattern for patrol molecules:
- Add CloneOptions struct with ParentID and ChildRef for dynamic bonding
- Add generateBondedID() to create custom IDs like "patrol-x7k.arm-ace"
- Add --ref flag to `bd mol bond` for custom child references
- Variable substitution in childRef (e.g., "arm-{{polecat_name}}")

This enables:
  bd mol bond mol-polecat-arm bd-patrol --ref arm-{{name}} --var name=ace
  # Creates: bd-patrol.arm-ace, bd-patrol.arm-ace.capture, etc.

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

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2025-12-23 03:38:38 -08:00
Steve Yegge
3c86144d26 bd sync: 2025-12-23 03:38:21 2025-12-23 03:38:21 -08:00
Steve Yegge
ac07b2259f bd sync: 2025-12-23 03:22:14 2025-12-23 03:22:25 -08:00
Steve Yegge
be520d90fe feat: add bd activity command for real-time state feed (bd-xo1o.3)
Implements activity feed for watching molecule/issue state changes:
- bd activity: show last 100 events
- bd activity --follow: real-time streaming
- bd activity --mol <id>: filter by molecule prefix
- bd activity --since 5m: time-based filtering
- bd activity --type update: filter by event type

Adds new mutation event types for richer activity display:
- MutationBonded: molecule bonded to parent
- MutationSquashed: wisp squashed to digest
- MutationBurned: wisp discarded
- MutationStatus: status transitions with old/new state

Event symbols: + created, → in_progress, ✓ completed, ⊘ deleted, ◉ squashed

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

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2025-12-23 03:19:09 -08:00
Steve Yegge
47339f89dd bd sync: 2025-12-23 03:18:57 2025-12-23 03:18:57 -08:00
Steve Yegge
625d5fb374 bd sync: 2025-12-23 02:38:39 2025-12-23 02:39:01 -08:00
Steve Yegge
ff3b8fb8ed docs: draft CHANGELOG for v0.35.0 2025-12-23 02:30:53 -08:00
Ryan
e8d0860571 fix(doctor): use --fix instead of manual commands (#715)
UX improvement: doctor advice now recommends bd doctor --fix instead of manual commands
2025-12-23 02:30:33 -08:00
Steve Yegge
14e1f5a2e0 feat: add --parent flag to bd list command (bd-yqhh)
Filters issues by parent issue ID using parent-child dependencies.

Example: bd list --parent=bd-xyz --status=open

Changes:
- Add ParentID field to IssueFilter type
- Add --parent flag to list command
- Forward parent filter through RPC
- Implement filtering in SQLite and memory storage

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

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2025-12-23 02:10:42 -08:00
Steve Yegge
a3e967b956 bd sync: 2025-12-23 02:10:31 2025-12-23 02:10:31 -08:00
Steve Yegge
a441559c1c bd sync: 2025-12-23 01:58:29 2025-12-23 01:58:39 -08:00
Steve Yegge
92e6f4c079 refactor: remove legacy autoflush code paths (bd-xsl9)
Remove dual code paths in the autoflush system. FlushManager is now the
only code path for auto-flush operations.

Changes:
- Remove legacy globals: isDirty, needsFullExport, flushTimer
- Remove flushToJSONL() wrapper function (was backward-compat shim)
- Simplify markDirtyAndScheduleFlush/FullExport to just call FlushManager
- Update tests to use FlushManager or flushToJSONLWithState directly

FlushManager handles all flush state internally in its run() goroutine,
eliminating the need for global state. Sandbox mode and tests that do
not need flushing get a no-op when FlushManager is nil.

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

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2025-12-23 01:56:19 -08:00
Steve Yegge
da15363e2b bd sync: 2025-12-23 01:56:10 2025-12-23 01:56:10 -08:00
Steve Yegge
4a91acb53d bd sync: 2025-12-23 01:42:22 2025-12-23 01:42:22 -08:00
Steve Yegge
b2d3577309 bd sync: 2025-12-23 01:39:41 2025-12-23 01:39:41 -08:00
Steve Yegge
618804560e bd sync: 2025-12-23 01:33:42 2025-12-23 01:33:54 -08:00
Steve Yegge
6f2d1603f5 bd sync: 2025-12-23 01:26:59 2025-12-23 01:33:54 -08:00
Steve Yegge
7fb92ff78c feat: implement conditional bond type for mol bond (bd-kzda)
Conditional bonds now work as documented: "B runs only if A fails".

Implementation:
- Add DepConditionalBlocks dependency type to types.go
- Add IsFailureClose() helper to detect failure keywords in close_reason
- Update blocked cache to handle conditional-blocks:
  - B is blocked while A is open
  - B stays blocked if A closes with success
  - B becomes unblocked if A closes with failure

Failure keywords: failed, rejected, wontfix, cancelled, abandoned,
blocked, error, timeout, aborted (case-insensitive)

Updated bondProtoProto, bondProtoMol, bondMolMol to use
DepConditionalBlocks for conditional bond type.

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

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2025-12-23 01:32:31 -08:00
Steve Yegge
aa1ce63156 feat: consolidate maintenance commands into bd doctor --fix (bd-bqcc)
Add new Maintenance category to bd doctor with checks for:
- Stale closed issues (older than 30 days)
- Expired tombstones (older than TTL)
- Compaction candidates (info only)

Add fix handlers for cleanup and tombstone pruning via bd doctor --fix.
Add deprecation hints to cleanup, compact, and detect-pollution commands
suggesting users try bd doctor instead.

This consolidation reduces cognitive load - users just need to remember
'bd doctor' for health checks and 'bd doctor --fix' for maintenance.

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

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2025-12-23 01:31:18 -08:00
Steve Yegge
cfe823da61 refactor: add testEnv helpers, reduce SQLite test file sizes (bd-4opy)
- Add testEnv struct with common test helper methods to test_helpers.go
- Methods include CreateIssue, CreateEpic, AddDep, AddParentChild, Close,
  GetReadyWork, AssertReady, AssertBlocked
- Migrate 12+ tests in ready_test.go to use new helpers (-252 lines)
- Migrate 3 tests in dependencies_test.go to use new helpers (-34 lines)
- Total reduction: ~286 lines from test files

The testEnv pattern makes tests more readable and maintainable by:
- Eliminating boilerplate setup (store, cleanup, ctx)
- Providing semantic helper methods (AddDep vs manual AddDependency)
- Using t.Cleanup for automatic resource management

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

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2025-12-23 01:30:06 -08:00
Steve Yegge
59b57f8d06 test: add mol current tests (bd-nurq)
Add tests for molecule progress tracking:
- TestGetMoleculeProgress: tests loading molecule and computing progress
- TestFindParentMolecule: tests walking up parent-child chain
- TestAdvanceToNextStep: tests auto-advancing to next step
- TestAdvanceToNextStepMoleculeComplete: tests molecule completion detection
- TestAdvanceToNextStepOrphanIssue: tests non-molecule issue handling

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

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2025-12-23 01:24:36 -08:00
Steve Yegge
4bef1fd712 bd sync: 2025-12-23 01:24:24 2025-12-23 01:24:24 -08:00
Steve Yegge
2a2142aca0 bd sync: 2025-12-23 00:55:12 2025-12-23 00:55:49 -08:00
Steve Yegge
97c2c48a49 bd sync: 2025-12-23 00:13:18 2025-12-23 00:55:49 -08:00
Steve Yegge
ecadb83a1c bd sync: 2025-12-23 00:12:57 2025-12-23 00:55:49 -08:00
Steve Yegge
22ef563597 bd sync: 2025-12-23 00:12:38 2025-12-23 00:55:49 -08:00