bd sync: 2025-12-23 03:48:52

This commit is contained in:
Steve Yegge
2025-12-23 03:48:52 -08:00
parent ee04b1ea96
commit ce85fd4930

View File

@@ -444,7 +444,7 @@
{"id":"bd-xj2e","title":"GH#522: Add --type flag to bd update command","description":"Add --type flag to bd update for changing issue type (task/epic/bug/feature). Storage layer already supports it. See GitHub issue #522.","status":"tombstone","priority":2,"issue_type":"task","created_at":"2025-12-16T01:03:12.506583-08:00","updated_at":"2025-12-17T16:11:17.070763-08:00","deleted_at":"2025-12-17T16:11:17.070763-08:00","deleted_by":"batch delete","delete_reason":"batch delete","original_type":"task"}
{"id":"bd-xo1o","title":"Dynamic Molecule Bonding: Fanout patterns for patrol molecules","description":"## Vision\n\nEnable molecules to dynamically spawn child molecules at runtime based on discovered\nwork. This is the foundation for the \"Christmas Ornament\" pattern where a patrol\nmolecule grows arms per-polecat.\n\n## The Activity Feed Vision\n\nInstead of parsing agent logs, users see structured work state:\n\n```\n[14:32:08] + patrol-x7k.arm-ace bonded (5 steps)\n[14:32:08] + patrol-x7k.arm-nux bonded (5 steps)\n[14:32:09] → patrol-x7k.arm-ace.capture in_progress\n[14:32:10] ✓ patrol-x7k.arm-ace.capture completed\n[14:32:14] ✓ patrol-x7k.arm-ace.decide completed (action: nudge-1)\n```\n\nThis requires beads to track molecule step state transitions in real-time.\n\n## Key Primitives Needed\n\n### 1. Dynamic Bond with Variables\n```bash\nbd mol bond mol-polecat-arm \u003cparent-wisp-id\u003e \\\n --var polecat_name=ace \\\n --var rig=gastown\n```\n\nCreates wisp children under the parent:\n- parent-id.arm-ace\n- parent-id.arm-ace.capture\n- parent-id.arm-ace.assess\n- etc.\n\n### 2. WaitsFor Directive\n```markdown\n## Step: aggregate\nCollect outcomes from all dynamically-bonded children.\nWaitsFor: all-children\nNeeds: survey-workers\n```\n\nThe `WaitsFor: all-children` directive makes this a fanout gate - it can't\nproceed until ALL dynamically-bonded children complete.\n\n### 3. Activity Feed Query\n```bash\nbd activity --follow # Real-time state stream\nbd activity --mol \u003cid\u003e # Activity for specific molecule\nbd activity --since 5m # Last 5 minutes\n```\n\n### 4. Parallel Step Detection\nSteps with no inter-dependencies should be flagged as parallelizable.\nWhen arms are bonded, their steps can run in parallel across arms.\n\n## Use Case: mol-witness-patrol\n\nThe Witness monitors N polecats where N varies at runtime:\n\n```\nsurvey-workers discovers: [ace, nux, toast]\nFor each polecat:\n bd mol bond mol-polecat-arm \u003cpatrol-id\u003e --var polecat_name=\u003cname\u003e\naggregate step waits for all arms to complete\n```\n\nThis creates the Christmas Ornament shape:\n- Trunk: preflight steps\n- Arms: per-polecat inspection molecules\n- Base: cleanup after all arms complete\n\n## Design Docs\n\nSee Gas Town docs:\n- docs/molecular-chemistry.md (updated with Christmas Ornament pattern)\n- docs/architecture.md (activity feed section)\n\n## Dependencies\n\nThis epic may depend on:\n- Wisp storage (.beads-wisp/) - already implemented\n- Variable substitution in molecules - may need enhancement","status":"in_progress","priority":1,"issue_type":"epic","created_at":"2025-12-23T02:32:43.173305-08:00","updated_at":"2025-12-23T02:37:17.760387-08:00"}
{"id":"bd-xo1o.1","title":"bd mol bond: Dynamic bond with variable substitution","description":"Implement dynamic molecule bonding with runtime variable substitution.\n\n## Command\n```bash\nbd mol bond \u003cproto-id\u003e \u003cparent-wisp-id\u003e --var key=value --var key2=value2\n```\n\n## Behavior\n1. Parse proto molecule template\n2. Substitute {{key}} placeholders with provided values\n3. Create wisp children under the parent molecule\n4. Child IDs follow pattern: parent-id.child-ref (e.g., patrol-x7k.arm-ace)\n5. Nested children: parent-id.child-ref.step-ref (e.g., patrol-x7k.arm-ace.capture)\n\n## Variable Substitution\n- In step titles: \"Inspect {{polecat_name}}\" -\u003e \"Inspect ace\"\n- In descriptions: Full template substitution\n- In Needs directives: Allow referencing parent steps\n\n## Output\n```\n✓ Bonded mol-polecat-arm to patrol-x7k\n Created: patrol-x7k.arm-ace (5 steps)\n```","status":"closed","priority":1,"issue_type":"task","created_at":"2025-12-23T02:33:13.878996-08:00","updated_at":"2025-12-23T03:38:03.54745-08:00","closed_at":"2025-12-23T03:38:03.54745-08:00","close_reason":"Implemented dynamic molecule bonding with --ref flag for custom child IDs (Christmas Ornament pattern)","dependencies":[{"issue_id":"bd-xo1o.1","depends_on_id":"bd-xo1o","type":"parent-child","created_at":"2025-12-23T02:33:13.879419-08:00","created_by":"daemon"}]}
{"id":"bd-xo1o.2","title":"WaitsFor directive: Fanout gate for dynamic children","description":"Implement WaitsFor directive for molecules that spawn dynamic children.\n\n## Syntax\n```markdown\n## Step: aggregate\nCollect outcomes from all dynamically-bonded children.\nWaitsFor: all-children\nNeeds: survey-workers\n```\n\n## Behavior\n1. Parse WaitsFor directive during molecule step parsing\n2. Track which steps spawn dynamic children (the spawner)\n3. Gate step waits until ALL children of the spawner complete\n4. Works with bd ready - gate step not ready until children done\n\n## Gate Types\n- `WaitsFor: all-children` - Wait for all dynamic children\n- `WaitsFor: any-children` - Proceed when first child completes (future)\n- `WaitsFor: \u003cstep-ref\u003e.children` - Wait for specific spawner's children\n\n## Integration\n- bd ready should skip gate steps until children complete\n- bd show \u003cmol\u003e should display gate status and child count","status":"open","priority":1,"issue_type":"task","created_at":"2025-12-23T02:33:14.946475-08:00","updated_at":"2025-12-23T02:33:14.946475-08:00","dependencies":[{"issue_id":"bd-xo1o.2","depends_on_id":"bd-xo1o","type":"parent-child","created_at":"2025-12-23T02:33:14.950008-08:00","created_by":"daemon"}]}
{"id":"bd-xo1o.2","title":"WaitsFor directive: Fanout gate for dynamic children","description":"Implement WaitsFor directive for molecules that spawn dynamic children.\n\n## Syntax\n```markdown\n## Step: aggregate\nCollect outcomes from all dynamically-bonded children.\nWaitsFor: all-children\nNeeds: survey-workers\n```\n\n## Behavior\n1. Parse WaitsFor directive during molecule step parsing\n2. Track which steps spawn dynamic children (the spawner)\n3. Gate step waits until ALL children of the spawner complete\n4. Works with bd ready - gate step not ready until children done\n\n## Gate Types\n- `WaitsFor: all-children` - Wait for all dynamic children\n- `WaitsFor: any-children` - Proceed when first child completes (future)\n- `WaitsFor: \u003cstep-ref\u003e.children` - Wait for specific spawner's children\n\n## Integration\n- bd ready should skip gate steps until children complete\n- bd show \u003cmol\u003e should display gate status and child count","status":"in_progress","priority":1,"issue_type":"task","created_at":"2025-12-23T02:33:14.946475-08:00","updated_at":"2025-12-23T03:48:27.389135-08:00","dependencies":[{"issue_id":"bd-xo1o.2","depends_on_id":"bd-xo1o","type":"parent-child","created_at":"2025-12-23T02:33:14.950008-08:00","created_by":"daemon"}]}
{"id":"bd-xo1o.3","title":"bd activity: Real-time molecule state feed","description":"Implement activity feed command for watching molecule state transitions.\n\n## Commands\n```bash\nbd activity --follow # Real-time streaming\nbd activity --mol \u003cid\u003e # Activity for specific molecule\nbd activity --since 5m # Last 5 minutes\nbd activity --type step # Only step transitions\n```\n\n## Output Format\n```\n[14:32:01] ✓ patrol-x7k.inbox-check completed\n[14:32:03] ✓ patrol-x7k.check-refinery completed\n[14:32:08] + patrol-x7k.arm-ace bonded (5 steps)\n[14:32:09] → patrol-x7k.arm-ace.capture in_progress\n[14:32:10] ✓ patrol-x7k.arm-ace.capture completed\n[14:32:14] ✓ patrol-x7k.arm-ace.decide completed (action: nudge-1)\n[14:32:17] ✓ patrol-x7k.arm-ace COMPLETE\n[14:32:23] ✓ patrol-x7k SQUASHED → digest-x7k\n```\n\n## Event Types\n- `+` bonded - New molecule/step created\n- `→` in_progress - Step started\n- `✓` completed - Step/molecule finished\n- `✗` failed - Step failed\n- `⊘` burned - Wisp discarded\n- `◉` squashed - Wisp condensed to digest\n\n## Implementation\n- Could use SQLite triggers or polling\n- --follow uses OS file watching or polling\n- Filter by mol ID, type, time range","status":"closed","priority":1,"issue_type":"task","created_at":"2025-12-23T02:33:16.298764-08:00","updated_at":"2025-12-23T03:18:33.434079-08:00","closed_at":"2025-12-23T03:18:33.434079-08:00","close_reason":"Implemented bd activity command with real-time feed, filtering, and new mutation event types","dependencies":[{"issue_id":"bd-xo1o.3","depends_on_id":"bd-xo1o","type":"parent-child","created_at":"2025-12-23T02:33:16.301522-08:00","created_by":"daemon"}]}
{"id":"bd-xo1o.4","title":"Parallel step detection in molecules","description":"Detect and flag parallelizable steps in molecules.\n\n## Detection Rules\nSteps can run in parallel when:\n1. No Needs dependencies between them\n2. Not in same sequential chain\n3. Across dynamic arms (arm-ace and arm-nux can parallelize)\n\n## Output in bd mol show\n```\npatrol-x7k (mol-witness-patrol)\n├── inbox-check [completed]\n├── survey-workers [completed]\n│ ├── arm-ace [parallel group A]\n│ │ ├── capture [can parallelize]\n│ │ ├── assess [needs: capture]\n│ │ └── execute [needs: assess]\n│ └── arm-nux [parallel group A]\n│ ├── capture [can parallelize]\n│ └── ...\n├── aggregate [gate: waits for all-children]\n```\n\n## Flags\n- `bd mol show \u003cid\u003e --parallel` - Highlight parallel opportunities\n- `bd ready --mol \u003cid\u003e` - List all steps that can run now\n\n## Future: Parallel Execution Hints\nFor agents using Task tool subagents:\n- Identify independent arms that can run simultaneously\n- Suggest parallelization strategy","status":"open","priority":2,"issue_type":"task","created_at":"2025-12-23T02:33:17.660368-08:00","updated_at":"2025-12-23T02:33:17.660368-08:00","dependencies":[{"issue_id":"bd-xo1o.4","depends_on_id":"bd-xo1o","type":"parent-child","created_at":"2025-12-23T02:33:17.662232-08:00","created_by":"daemon"}]}
{"id":"bd-xsl9","title":"Remove legacy autoflush code paths","description":"## Problem\n\nThe autoflush system has dual code paths - an old timer-based approach and a new FlushManager. Both are actively used based on whether flushManager is nil.\n\n## Locations\n\n- main.go:78-81: isDirty, needsFullExport, flushTimer marked 'used by legacy code'\n- autoflush.go:291-369: Functions with 'Legacy path for backward compatibility with tests'\n\n## Current Behavior\n\n```go\n// In markDirtyAndScheduleFlush():\nif flushManager != nil {\n flushManager.MarkDirty(false)\n return\n}\n// Legacy path for backward compatibility with tests\n```\n\n## Proposed Fix\n\n1. Ensure flushManager is always initialized (even in tests)\n2. Remove the legacy timer-based code paths\n3. Remove isDirty, needsFullExport, flushTimer globals\n4. Update tests to use FlushManager\n\n## Risk\n\nLow - the FlushManager is the production path. Legacy code only runs when flushManager is nil (test scenarios).","status":"closed","priority":3,"issue_type":"task","created_at":"2025-12-21T15:49:30.83769-08:00","updated_at":"2025-12-23T01:54:59.09333-08:00","closed_at":"2025-12-23T01:54:59.09333-08:00","close_reason":"Removed legacy autoflush code: isDirty, needsFullExport, flushTimer globals and flushToJSONL() wrapper. FlushManager is now the only code path."}
@@ -457,6 +457,7 @@
{"id":"bd-y8tn","title":"Test Molecule","description":"A test molecule","status":"closed","priority":2,"issue_type":"molecule","created_at":"2025-12-19T18:30:24.491279-08:00","updated_at":"2025-12-19T18:31:12.49898-08:00","closed_at":"2025-12-19T18:31:12.49898-08:00","close_reason":"test molecule - deleting"}
{"id":"bd-yck","title":"Fix checkExistingBeadsData to be worktree-aware","description":"The checkExistingBeadsData function in cmd/bd/init.go checks for .beads in the current working directory, but for worktrees it should check the main repository root instead. This prevents proper worktree compatibility.","status":"open","priority":2,"issue_type":"bug","created_at":"2025-12-07T16:48:32.082776345-07:00","updated_at":"2025-12-07T16:48:32.082776345-07:00"}
{"id":"bd-ykd9","title":"Add bd doctor --fix flag to automatically repair issues","description":"Implement a --fix flag for bd doctor that can automatically repair detected issues.\n\nRequirements:\n- Add --fix flag to bd doctor command\n- Show all fixable issues and prompt for confirmation before applying fixes\n- Organize fix implementations under doctor/fix/\u003ctype_of_fix\u003e.go\n- Each fix type should have its own file (e.g., doctor/fix/hooks.go, doctor/fix/sync.go)\n- Display what will be fixed and ask user to confirm (Y/n) before proceeding\n- Support fixing issues like:\n - Missing or broken git hooks\n - Sync problems with remote\n - File permission issues\n - Any other auto-repairable issues doctor detects\n\nImplementation notes:\n- Maintain separation between detection (existing doctor code) and repair (new fix code)\n- Each fix should be idempotent and safe to run multiple times\n- Provide clear output about what was fixed\n- Log any fixes that fail with actionable error messages","status":"open","priority":2,"issue_type":"feature","created_at":"2025-11-14T18:17:48.411264-08:00","updated_at":"2025-11-14T18:17:58.88609-08:00"}
{"id":"bd-ymqn","title":"Code review: bd mol bond --ref and bd activity (bd-xo1o work)","description":"Review dave's recent commits for bd-xo1o (Dynamic Molecule Bonding):\n\n## Commits to Review\n- ee04b1ea: feat: add dynamic molecule bonding with --ref flag (bd-xo1o.1)\n- be520d90: feat: add bd activity command for real-time state feed (bd-xo1o.3)\n\n## Review Focus\n1. Code quality and correctness\n2. Error handling\n3. Edge cases\n4. Test coverage\n5. Documentation\n\n## Deliverables\n- File beads for any issues found\n- Note any concerns or suggestions\n- Verify the implementation matches the bd-xo1o epic requirements","status":"in_progress","priority":1,"issue_type":"task","assignee":"beads/ace","created_at":"2025-12-23T03:47:55.217363-08:00","updated_at":"2025-12-23T03:48:52.455436-08:00"}
{"id":"bd-yqhh","title":"bd list --parent: filter by parent issue","description":"Add --parent flag to bd list to filter issues by parent.\n\nExample:\n```bash\nbd list --parent=gt-h5n --status=open\n```\n\nWould show all open children of gt-h5n.\n\nUseful for:\n- Checking epic progress\n- Finding swarmable work within an epic\n- Molecule step listing","status":"closed","priority":2,"issue_type":"feature","created_at":"2025-12-23T01:51:26.830952-08:00","updated_at":"2025-12-23T02:10:12.909803-08:00","closed_at":"2025-12-23T02:10:12.909803-08:00","close_reason":"Implemented --parent flag for bd list. Filters children by parent issue using parent-child dependencies."}
{"id":"bd-z86n","title":"Code Review: PR #551 - Persist close_reason to issues table","description":"Code review of PR #551 which fixes close_reason persistence bug.\n\n## Summary\nThe PR correctly fixes a bug where close_reason was only stored in the events table, not in the issues.close_reason column. This caused `bd show --json` to return empty close_reason.\n\n## What Was Fixed\n- ✅ CloseIssue now updates both close_reason and closed_at\n- ✅ ReOpenIssue clears both close_reason and closed_at\n- ✅ Comprehensive tests added for both storage and CLI layers\n- ✅ Clear documentation in queries.go about dual storage strategy\n\n## Quality Assessment\n✅ Tests cover both storage layer and CLI JSON output\n✅ Handles reopen case (clearing close_reason)\n✅ Good comments explaining dual-storage design\n✅ No known issues\n\n## Potential Followups\nSee linked issues for suggestions.","status":"open","priority":2,"issue_type":"task","created_at":"2025-12-14T14:25:06.887069-08:00","updated_at":"2025-12-14T14:25:06.887069-08:00"}
{"id":"bd-z8a6","title":"bd delete --from-file should add deleted issues to deletions manifest","description":"When using bd delete --from-file to bulk delete issues, the deleted issue IDs are not being added to the deletions.jsonl manifest.\n\nThis causes those issues to be resurrected during bd sync when git history scanning finds them in old commits.\n\nExpected: All deleted issues should be added to deletions.jsonl so they wont be reimported from git history.\n\nWorkaround: Manually add deletion records to deletions.jsonl.","status":"tombstone","priority":1,"issue_type":"bug","created_at":"2025-12-16T01:48:14.099855-08:00","updated_at":"2025-12-17T16:11:17.070763-08:00","deleted_at":"2025-12-17T16:11:17.070763-08:00","deleted_by":"batch delete","delete_reason":"batch delete","original_type":"bug"}