diff --git a/.beads/issues.jsonl b/.beads/issues.jsonl index e4e1dd25..f304d179 100644 --- a/.beads/issues.jsonl +++ b/.beads/issues.jsonl @@ -458,11 +458,11 @@ {"id":"bd-mol-117","title":"Restart daemons","description":"Restart bd daemons to pick up new version.\n\n```bash\nbd daemons killall\n```\n\nDaemons will auto-restart with new version on next bd command.\n\nVerify:\n```bash\nbd daemons list\n```","status":"tombstone","priority":2,"issue_type":"task","created_at":"2025-12-27T19:31:50.999837-08:00","updated_at":"2025-12-28T01:24:39.175701-08:00","dependencies":[{"issue_id":"bd-mol-117","depends_on_id":"bd-mol-9ea","type":"parent-child","created_at":"2025-12-27T19:31:51.011531-08:00","created_by":"beads/crew/dave"}],"deleted_at":"2025-12-28T01:24:39.175701-08:00","deleted_by":"daemon","delete_reason":"delete","original_type":"task"} {"id":"bd-mol-172","title":"Review changes since last release","description":"Understand what's being released.\n\n```bash\ngit log $(git describe --tags --abbrev=0)..HEAD --oneline\n```\n\nCategorize changes:\n- Features (feat:)\n- Fixes (fix:)\n- Breaking changes\n- Documentation","status":"tombstone","priority":2,"issue_type":"task","created_at":"2025-12-27T19:31:50.996753-08:00","updated_at":"2025-12-28T01:24:39.177206-08:00","dependencies":[{"issue_id":"bd-mol-172","depends_on_id":"bd-mol-9ea","type":"parent-child","created_at":"2025-12-27T19:31:51.0023-08:00","created_by":"beads/crew/dave"},{"issue_id":"bd-mol-172","depends_on_id":"bd-mol-408","type":"blocks","created_at":"2025-12-27T19:31:51.013483-08:00","created_by":"beads/crew/dave"}],"deleted_at":"2025-12-28T01:24:39.177206-08:00","deleted_by":"daemon","delete_reason":"delete","original_type":"task"} {"id":"bd-mol-1y0","title":"Preflight: Check git status","description":"Ensure working tree is clean before starting release.\n\n```bash\ngit status\n```\n\nIf there are uncommitted changes, either:\n- Commit them first\n- Stash them: `git stash`\n- Abort and resolve","status":"tombstone","priority":2,"issue_type":"task","created_at":"2025-12-27T19:31:50.996088-08:00","updated_at":"2025-12-28T01:24:39.178729-08:00","dependencies":[{"issue_id":"bd-mol-1y0","depends_on_id":"bd-mol-9ea","type":"parent-child","created_at":"2025-12-27T19:31:51.000422-08:00","created_by":"beads/crew/dave"}],"deleted_at":"2025-12-28T01:24:39.178729-08:00","deleted_by":"daemon","delete_reason":"delete","original_type":"task"} -{"id":"bd-mol-408","title":"Preflight: Pull latest","description":"Ensure we're up to date with origin.\n\n```bash\ngit pull --rebase\n```\n\nResolve any conflicts before proceeding.","status":"open","priority":2,"issue_type":"task","created_at":"2025-12-27T19:31:50.996456-08:00","updated_at":"2025-12-27T19:31:50.996456-08:00","dependencies":[{"issue_id":"bd-mol-408","depends_on_id":"bd-mol-9ea","type":"parent-child","created_at":"2025-12-27T19:31:51.001603-08:00","created_by":"beads/crew/dave"},{"issue_id":"bd-mol-408","depends_on_id":"bd-mol-1y0","type":"blocks","created_at":"2025-12-27T19:31:51.012791-08:00","created_by":"beads/crew/dave"}]} +{"id":"bd-mol-408","title":"Preflight: Pull latest","description":"Ensure we're up to date with origin.\n\n```bash\ngit pull --rebase\n```\n\nResolve any conflicts before proceeding.","status":"tombstone","priority":2,"issue_type":"task","created_at":"2025-12-27T19:31:50.996456-08:00","updated_at":"2025-12-29T12:39:45.160561-08:00","dependencies":[{"issue_id":"bd-mol-408","depends_on_id":"bd-mol-9ea","type":"parent-child","created_at":"2025-12-27T19:31:51.001603-08:00","created_by":"beads/crew/dave"},{"issue_id":"bd-mol-408","depends_on_id":"bd-mol-1y0","type":"blocks","created_at":"2025-12-27T19:31:51.012791-08:00","created_by":"beads/crew/dave"}],"deleted_at":"2025-12-29T12:39:45.160561-08:00","deleted_by":"daemon","delete_reason":"stale release mol steps","original_type":"task"} {"id":"bd-mol-4bi","title":"Update local installation","description":"Update local bd to the new version.\n\nOption 1 - Homebrew:\n```bash\nbrew upgrade bd\n```\n\nOption 2 - Install script:\n```bash\ncurl -fsSL https://raw.githubusercontent.com/steveyegge/beads/main/scripts/install.sh | bash\n```\n\nVerify:\n```bash\nbd --version\n```\n\nShould show 0.39.0.","status":"tombstone","priority":2,"issue_type":"task","created_at":"2025-12-27T19:34:09.560034-08:00","updated_at":"2025-12-28T01:24:39.180156-08:00","dependencies":[{"issue_id":"bd-mol-4bi","depends_on_id":"bd-mol-5h4","type":"blocks","created_at":"2025-12-27T19:34:09.61331-08:00","created_by":"beads/crew/dave"},{"issue_id":"bd-mol-4bi","depends_on_id":"bd-mol-v3g","type":"blocks","created_at":"2025-12-27T19:34:09.615361-08:00","created_by":"beads/crew/dave"}],"deleted_at":"2025-12-28T01:24:39.180156-08:00","deleted_by":"daemon","delete_reason":"delete","original_type":"task"} {"id":"bd-mol-4zt","title":"Wait for CI","description":"Monitor GitHub Actions for release completion.\n\nhttps://github.com/steveyegge/beads/actions\n\nExpected time: 5-10 minutes\n\nWatch for:\n- Build artifacts (all platforms)\n- Test suite pass\n- npm publish\n- PyPI publish","status":"tombstone","priority":2,"issue_type":"task","created_at":"2025-12-27T19:34:09.559177-08:00","updated_at":"2025-12-28T01:24:39.181582-08:00","dependencies":[{"issue_id":"bd-mol-4zt","depends_on_id":"bd-mol-9ry","type":"blocks","created_at":"2025-12-27T19:34:09.605511-08:00","created_by":"beads/crew/dave"}],"deleted_at":"2025-12-28T01:24:39.181582-08:00","deleted_by":"daemon","delete_reason":"delete","original_type":"task"} {"id":"bd-mol-5h4","title":"Verify npm package","description":"Confirm npm package published.\n\n```bash\nnpm show @beads/bd version\n```\n\nShould show 0.39.0.\n\nAlso check: https://www.npmjs.com/package/@beads/bd","status":"tombstone","priority":2,"issue_type":"task","created_at":"2025-12-27T19:34:09.55961-08:00","updated_at":"2025-12-28T01:24:39.182917-08:00","dependencies":[{"issue_id":"bd-mol-5h4","depends_on_id":"bd-mol-68e","type":"blocks","created_at":"2025-12-27T19:34:09.609272-08:00","created_by":"beads/crew/dave"}],"deleted_at":"2025-12-28T01:24:39.182917-08:00","deleted_by":"daemon","delete_reason":"delete","original_type":"task"} -{"id":"bd-mol-678","title":"Create release tag","description":"Create annotated git tag.\n\n```bash\ngit tag -a v0.39.0 -m \"Release v0.39.0\"\n```\n\nVerify: `git tag -l | tail -5`","status":"open","priority":2,"issue_type":"task","created_at":"2025-12-27T19:31:50.998148-08:00","updated_at":"2025-12-27T19:31:50.998148-08:00","dependencies":[{"issue_id":"bd-mol-678","depends_on_id":"bd-mol-9ea","type":"parent-child","created_at":"2025-12-27T19:31:51.006262-08:00","created_by":"beads/crew/dave"},{"issue_id":"bd-mol-678","depends_on_id":"bd-mol-8ep","type":"blocks","created_at":"2025-12-27T19:31:51.018908-08:00","created_by":"beads/crew/dave"}]} +{"id":"bd-mol-678","title":"Create release tag","description":"Create annotated git tag.\n\n```bash\ngit tag -a v0.39.0 -m \"Release v0.39.0\"\n```\n\nVerify: `git tag -l | tail -5`","status":"tombstone","priority":2,"issue_type":"task","created_at":"2025-12-27T19:31:50.998148-08:00","updated_at":"2025-12-29T12:39:45.162388-08:00","dependencies":[{"issue_id":"bd-mol-678","depends_on_id":"bd-mol-9ea","type":"parent-child","created_at":"2025-12-27T19:31:51.006262-08:00","created_by":"beads/crew/dave"},{"issue_id":"bd-mol-678","depends_on_id":"bd-mol-8ep","type":"blocks","created_at":"2025-12-27T19:31:51.018908-08:00","created_by":"beads/crew/dave"}],"deleted_at":"2025-12-29T12:39:45.162388-08:00","deleted_by":"daemon","delete_reason":"stale release mol steps","original_type":"task"} {"id":"bd-mol-68e","title":"Verify GitHub release","description":"Check the GitHub releases page.\n\nhttps://github.com/steveyegge/beads/releases/tag/v0.39.0\n\nVerify:\n- Release created\n- Binaries attached (linux, darwin, windows)\n- Checksums present","status":"tombstone","priority":2,"issue_type":"task","created_at":"2025-12-27T19:34:09.559402-08:00","updated_at":"2025-12-28T01:24:39.184285-08:00","dependencies":[{"issue_id":"bd-mol-68e","depends_on_id":"bd-mol-4zt","type":"blocks","created_at":"2025-12-27T19:34:09.607353-08:00","created_by":"beads/crew/dave"}],"deleted_at":"2025-12-28T01:24:39.184285-08:00","deleted_by":"daemon","delete_reason":"delete","original_type":"task"} {"id":"bd-mol-7tp","title":"Push to main","description":"Push the release commit to origin.\n\n```bash\ngit push origin main\n```\n\nIf rejected, someone else pushed. Pull, rebase, try again.","status":"tombstone","priority":2,"issue_type":"task","created_at":"2025-12-27T19:34:09.558743-08:00","updated_at":"2025-12-28T01:24:39.186846-08:00","dependencies":[{"issue_id":"bd-mol-7tp","depends_on_id":"bd-mol-h3l","type":"blocks","created_at":"2025-12-27T19:34:09.601974-08:00","created_by":"beads/crew/dave"}],"deleted_at":"2025-12-28T01:24:39.186846-08:00","deleted_by":"daemon","delete_reason":"delete","original_type":"task"} {"id":"bd-mol-8ep","title":"Commit release","description":"Stage and commit all version changes.\n\n```bash\ngit add -A\ngit commit -m \"chore: Bump version to 0.39.0\"\n```\n\nReview the commit to ensure all expected files are included.","status":"tombstone","priority":2,"issue_type":"task","created_at":"2025-12-27T19:31:50.99794-08:00","updated_at":"2025-12-28T01:24:39.188062-08:00","dependencies":[{"issue_id":"bd-mol-8ep","depends_on_id":"bd-mol-9ea","type":"parent-child","created_at":"2025-12-27T19:31:51.005611-08:00","created_by":"beads/crew/dave"},{"issue_id":"bd-mol-8ep","depends_on_id":"bd-mol-mht","type":"blocks","created_at":"2025-12-27T19:31:51.017961-08:00","created_by":"beads/crew/dave"}],"deleted_at":"2025-12-28T01:24:39.188062-08:00","deleted_by":"daemon","delete_reason":"delete","original_type":"task"} @@ -471,7 +471,7 @@ {"id":"bd-mol-9ea","title":"beads-release","description":"Beads release workflow - from version bump to verified release.\n\nThis formula orchestrates a complete release cycle:\n1. Preflight checks (clean git, up to date)\n2. Documentation updates (CHANGELOG, info.go)\n3. Version bump (all components)\n4. Git operations (commit, tag, push)\n5. CI verification (GitHub Actions)\n6. Artifact verification (GitHub, npm, PyPI)\n7. Local installation update\n8. Daemon restart\n\n## Usage\n\n```bash\nbd wisp create beads-release --var version=0.37.0\n```\n\nOr assign to a polecat:\n```bash\ngt sling beads/polecats/p1 --formula beads-release --var version=0.37.0\n```","status":"tombstone","priority":2,"issue_type":"epic","created_at":"2025-12-27T19:31:50.995481-08:00","updated_at":"2025-12-28T02:21:04.82393-08:00","deleted_at":"2025-12-28T02:21:04.82393-08:00","deleted_by":"daemon","delete_reason":"delete","original_type":"epic"} {"id":"bd-mol-9ry","title":"Push release tag","description":"Push the version tag to trigger CI release.\n\n```bash\ngit push origin v0.39.0\n```\n\nThis triggers GitHub Actions to build artifacts and publish.","status":"tombstone","priority":2,"issue_type":"task","created_at":"2025-12-27T19:34:09.55896-08:00","updated_at":"2025-12-28T01:24:39.191874-08:00","dependencies":[{"issue_id":"bd-mol-9ry","depends_on_id":"bd-mol-7tp","type":"blocks","created_at":"2025-12-27T19:34:09.603722-08:00","created_by":"beads/crew/dave"}],"deleted_at":"2025-12-28T01:24:39.191874-08:00","deleted_by":"daemon","delete_reason":"delete","original_type":"task"} {"id":"bd-mol-bfs","title":"Run bump-version.sh","description":"Update all component versions atomically.\n\n```bash\n./scripts/bump-version.sh 0.39.0\n```\n\nThis updates:\n- cmd/bd/version.go\n- .claude-plugin/*.json\n- integrations/beads-mcp/pyproject.toml\n- integrations/beads-mcp/src/beads_mcp/__init__.py\n- npm-package/package.json\n- Hook templates\n- README.md\n- CHANGELOG.md (adds date)","status":"tombstone","priority":2,"issue_type":"task","created_at":"2025-12-27T19:34:09.557864-08:00","updated_at":"2025-12-28T01:24:39.192947-08:00","deleted_at":"2025-12-28T01:24:39.192947-08:00","deleted_by":"daemon","delete_reason":"delete","original_type":"task"} -{"id":"bd-mol-cs7","title":"Verify PyPI package","description":"Confirm PyPI package published.\n\n```bash\npip index versions beads-mcp 2\u003e/dev/null | head -3\n```\n\nOr check: https://pypi.org/project/beads-mcp/\n\nShould show 0.39.0.","status":"open","priority":2,"issue_type":"task","created_at":"2025-12-27T19:31:50.99942-08:00","updated_at":"2025-12-27T19:31:50.99942-08:00","dependencies":[{"issue_id":"bd-mol-cs7","depends_on_id":"bd-mol-9ea","type":"parent-child","created_at":"2025-12-27T19:31:51.010276-08:00","created_by":"beads/crew/dave"}]} +{"id":"bd-mol-cs7","title":"Verify PyPI package","description":"Confirm PyPI package published.\n\n```bash\npip index versions beads-mcp 2\u003e/dev/null | head -3\n```\n\nOr check: https://pypi.org/project/beads-mcp/\n\nShould show 0.39.0.","status":"tombstone","priority":2,"issue_type":"task","created_at":"2025-12-27T19:31:50.99942-08:00","updated_at":"2025-12-29T12:39:45.163674-08:00","dependencies":[{"issue_id":"bd-mol-cs7","depends_on_id":"bd-mol-9ea","type":"parent-child","created_at":"2025-12-27T19:31:51.010276-08:00","created_by":"beads/crew/dave"}],"deleted_at":"2025-12-29T12:39:45.163674-08:00","deleted_by":"daemon","delete_reason":"stale release mol steps","original_type":"task"} {"id":"bd-mol-eft","title":"Update info.go versionChanges","description":"Add entry to versionChanges in cmd/bd/info.go.\n\nThis powers `bd info --whats-new` for agents.\n\n```go\n\"0.39.0\": {\n \"summary\": \"Brief description\",\n \"changes\": []string{\n \"Key change 1\",\n \"Key change 2\",\n },\n},\n```\n\nFocus on workflow-impacting changes agents need to know.","status":"tombstone","priority":2,"issue_type":"task","created_at":"2025-12-27T19:31:50.997255-08:00","updated_at":"2025-12-28T01:24:39.195032-08:00","dependencies":[{"issue_id":"bd-mol-eft","depends_on_id":"bd-mol-9ea","type":"parent-child","created_at":"2025-12-27T19:31:51.003429-08:00","created_by":"beads/crew/dave"}],"deleted_at":"2025-12-28T01:24:39.195032-08:00","deleted_by":"daemon","delete_reason":"delete","original_type":"task"} {"id":"bd-mol-h3l","title":"Create release tag","description":"Create annotated git tag.\n\n```bash\ngit tag -a v0.39.0 -m \"Release v0.39.0\"\n```\n\nVerify: `git tag -l | tail -5`","status":"tombstone","priority":2,"issue_type":"task","created_at":"2025-12-27T19:34:09.558525-08:00","updated_at":"2025-12-28T01:24:39.196075-08:00","deleted_at":"2025-12-28T01:24:39.196075-08:00","deleted_by":"daemon","delete_reason":"delete","original_type":"task"} {"id":"bd-mol-mht","title":"Verify version consistency","description":"Confirm all versions match 0.39.0.\n\n```bash\ngrep 'Version = ' cmd/bd/version.go\njq -r '.version' .claude-plugin/plugin.json\njq -r '.version' npm-package/package.json\ngrep 'version = ' integrations/beads-mcp/pyproject.toml\n```\n\nAll should show 0.39.0.","status":"tombstone","priority":2,"issue_type":"task","created_at":"2025-12-27T19:31:50.997714-08:00","updated_at":"2025-12-28T01:24:39.198003-08:00","dependencies":[{"issue_id":"bd-mol-mht","depends_on_id":"bd-mol-9ea","type":"parent-child","created_at":"2025-12-27T19:31:51.00493-08:00","created_by":"beads/crew/dave"}],"deleted_at":"2025-12-28T01:24:39.198003-08:00","deleted_by":"daemon","delete_reason":"delete","original_type":"task"} diff --git a/cmd/bd/delete.go b/cmd/bd/delete.go index 35425f88..4736f240 100644 --- a/cmd/bd/delete.go +++ b/cmd/bd/delete.go @@ -128,6 +128,10 @@ the issues will not resurrect from remote branches.`, dryRun, _ := cmd.Flags().GetBool("dry-run") cascade, _ := cmd.Flags().GetBool("cascade") hardDelete, _ := cmd.Flags().GetBool("hard") + reason, _ := cmd.Flags().GetString("reason") + if reason == "" { + reason = "delete" + } // Use global jsonOutput set by PersistentPreRun // Collect issue IDs from args and/or file issueIDs := make([]string, 0, len(args)) @@ -150,7 +154,7 @@ the issues will not resurrect from remote branches.`, // Use daemon if available, otherwise use direct mode if daemonClient != nil { - deleteViaDaemon(issueIDs, force, dryRun, cascade, jsonOutput, "delete") + deleteViaDaemon(issueIDs, force, dryRun, cascade, jsonOutput, reason) return } @@ -164,7 +168,7 @@ the issues will not resurrect from remote branches.`, // Handle batch deletion in direct mode if len(issueIDs) > 1 { - deleteBatch(cmd, issueIDs, force, dryRun, cascade, jsonOutput, hardDelete, "batch delete") + deleteBatch(cmd, issueIDs, force, dryRun, cascade, jsonOutput, hardDelete, reason) return } @@ -305,7 +309,7 @@ the issues will not resurrect from remote branches.`, } // 4. Create tombstone (instead of deleting from database) // Phase 1 dual-write: still writes to deletions.jsonl (step 0), now also creates tombstone - if err := createTombstone(ctx, issueID, deleteActor, "manual delete"); err != nil { + if err := createTombstone(ctx, issueID, deleteActor, reason); err != nil { fmt.Fprintf(os.Stderr, "Error creating tombstone: %v\n", err) os.Exit(1) } @@ -688,5 +692,6 @@ func init() { deleteCmd.Flags().Bool("dry-run", false, "Preview what would be deleted without making changes") deleteCmd.Flags().Bool("cascade", false, "Recursively delete all dependent issues") deleteCmd.Flags().Bool("hard", false, "Permanently delete (skip tombstone, cannot be recovered via sync)") + deleteCmd.Flags().String("reason", "", "Reason for deletion (stored in tombstone for audit trail)") rootCmd.AddCommand(deleteCmd) }