forge-workflow 0.0.9 → 0.0.10

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (102) hide show
  1. package/.claude/commands/dev.md +2 -2
  2. package/.claude/commands/plan.md +2 -2
  3. package/.claude/commands/ship.md +2 -2
  4. package/.claude/commands/status.md +4 -4
  5. package/.cline/workflows/dev.md +2 -2
  6. package/.cline/workflows/plan.md +2 -2
  7. package/.cline/workflows/ship.md +2 -2
  8. package/.cline/workflows/status.md +4 -4
  9. package/.codex/skills/dev/SKILL.md +2 -2
  10. package/.codex/skills/plan/SKILL.md +2 -2
  11. package/.codex/skills/ship/SKILL.md +2 -2
  12. package/.codex/skills/status/SKILL.md +4 -4
  13. package/.cursor/commands/dev.md +2 -2
  14. package/.cursor/commands/plan.md +2 -2
  15. package/.cursor/commands/ship.md +2 -2
  16. package/.cursor/commands/status.md +4 -4
  17. package/.github/prompts/dev.prompt.md +2 -2
  18. package/.github/prompts/plan.prompt.md +2 -2
  19. package/.github/prompts/ship.prompt.md +2 -2
  20. package/.github/prompts/status.prompt.md +4 -4
  21. package/.github/workflows/beads-to-github.yml +43 -10
  22. package/.github/workflows/github-to-beads.yml +10 -7
  23. package/.kilocode/workflows/dev.md +2 -2
  24. package/.kilocode/workflows/plan.md +2 -2
  25. package/.kilocode/workflows/ship.md +2 -2
  26. package/.kilocode/workflows/status.md +4 -4
  27. package/.opencode/commands/dev.md +2 -2
  28. package/.opencode/commands/plan.md +2 -2
  29. package/.opencode/commands/ship.md +2 -2
  30. package/.opencode/commands/status.md +4 -4
  31. package/.roo/commands/dev.md +2 -2
  32. package/.roo/commands/plan.md +2 -2
  33. package/.roo/commands/ship.md +2 -2
  34. package/.roo/commands/status.md +4 -4
  35. package/AGENTS.md +1 -0
  36. package/CLAUDE.md +12 -0
  37. package/bin/forge.js +10 -5
  38. package/docs/BEADS_GITHUB_SYNC.md +26 -0
  39. package/docs/TOOLCHAIN.md +130 -148
  40. package/lib/beads-bootstrap.js +225 -0
  41. package/lib/beads-health-check.js +55 -10
  42. package/lib/beads-setup.js +104 -28
  43. package/lib/beads-sync-scaffold.js +11 -6
  44. package/lib/commands/_issue.js +11 -1
  45. package/lib/commands/issues.js +49 -0
  46. package/lib/commands/recommend.js +22 -1
  47. package/lib/commands/setup.js +16 -10
  48. package/lib/commands/status.js +181 -0
  49. package/lib/commands/team.js +11 -1
  50. package/lib/commands/test.js +37 -2
  51. package/lib/commands/validate.js +14 -8
  52. package/lib/commands/worktree.js +27 -54
  53. package/lib/dep-guard/keyword-ripple.js +184 -0
  54. package/lib/detect-worktree.js +9 -10
  55. package/lib/forge-issues.js +326 -0
  56. package/lib/issue-sync/authority.js +100 -0
  57. package/lib/issue-sync/github-pull.js +184 -0
  58. package/lib/issue-sync/import-primitives.js +98 -0
  59. package/lib/issue-sync/legacy-link-bridge.js +436 -0
  60. package/lib/issue-sync/link-store.js +292 -0
  61. package/lib/issue-sync/project-github.js +123 -0
  62. package/lib/issue-sync/reconcile.js +195 -0
  63. package/lib/issue-sync/schema.js +126 -0
  64. package/lib/lefthook-check.js +5 -2
  65. package/lib/project-memory.js +564 -0
  66. package/lib/runtime-health.js +100 -12
  67. package/lib/smart-status/conflicts.js +205 -0
  68. package/lib/smart-status/scoring.js +177 -0
  69. package/lib/status/beads-snapshot.js +102 -0
  70. package/lib/status/presenter.js +65 -0
  71. package/lib/workflow/enforce-stage.js +3 -1
  72. package/lib/workflow/state-manager.js +164 -8
  73. package/package.json +12 -4
  74. package/scripts/beads-context.sh +124 -5
  75. package/scripts/beads-context.test.js +21 -4
  76. package/scripts/beads-migrate-to-dolt.sh +7 -0
  77. package/scripts/beads-upgrade-smoke.sh +263 -0
  78. package/scripts/behavioral-judge.sh +115 -11
  79. package/scripts/benchmark.js +349 -63
  80. package/scripts/dep-guard-analyze.js +52 -17
  81. package/scripts/dep-guard-keyword-ripple.js +29 -0
  82. package/scripts/dep-guard-render-review.js +86 -0
  83. package/scripts/dep-guard.sh +45 -232
  84. package/scripts/forge-team/lib/sync-github.sh +160 -28
  85. package/scripts/forge-team/tests/sync-github.test.sh +195 -58
  86. package/scripts/github-beads-sync/index.mjs +122 -98
  87. package/scripts/github-beads-sync/mapping.mjs +54 -0
  88. package/scripts/github-beads-sync/reverse-sync-cli.mjs +2 -2
  89. package/scripts/github-beads-sync/reverse-sync.mjs +31 -7
  90. package/scripts/lib/beads-migrate-to-dolt.mjs +503 -0
  91. package/scripts/preflight.sh +181 -0
  92. package/scripts/smart-status-score.js +31 -0
  93. package/scripts/smart-status-sessions.js +51 -0
  94. package/scripts/smart-status.sh +74 -329
  95. package/scripts/sync-agentic-workflow.js +48 -0
  96. package/scripts/test-ci-shard.js +244 -0
  97. package/scripts/test-dashboard.js +188 -52
  98. package/scripts/test-full-suite.js +186 -0
  99. package/scripts/test-profile.js +278 -0
  100. package/scripts/test.js +219 -28
  101. package/scripts/validate.js +143 -0
  102. package/scripts/validate.sh +18 -1
@@ -20,7 +20,7 @@ This command helps you understand the current state of the project before starti
20
20
 
21
21
  ```bash
22
22
  # Sync team state before showing status
23
- bash scripts/sync-utils.sh auto-sync
23
+ forge sync || true
24
24
  ```
25
25
 
26
26
  ### Step 1: Smart Status (ranked issues with conflict detection)
@@ -28,7 +28,7 @@ bash scripts/sync-utils.sh auto-sync
28
28
  ```bash
29
29
  bash scripts/smart-status.sh
30
30
  ```
31
- This script dynamically computes and displays all issues ranked by composite score (priority, dependency impact, type, staleness, epic proximity). Output includes active sessions, conflict risk annotations, and grouped categories. No manual querying needed — the script handles everything.
31
+ This command dynamically computes and displays all issues ranked by composite score (priority, dependency impact, type, staleness, epic proximity). Output includes active sessions, conflict risk annotations, and grouped categories. No manual querying needed.
32
32
 
33
33
  For full context on any issue: `bd show <id>`
34
34
 
@@ -77,10 +77,10 @@ Show current developer's active work and team overview:
77
77
 
78
78
  ```bash
79
79
  # Show my active issues
80
- bash scripts/forge-team/index.sh workload --me 2>&1 || true
80
+ forge team workload --me 2>&1 || true
81
81
 
82
82
  # One-line team summary
83
- bash scripts/forge-team/index.sh dashboard 2>&1 | head -5 || true
83
+ forge team dashboard 2>&1 | head -5 || true
84
84
  ```
85
85
 
86
86
  ## Next Steps
@@ -70,8 +70,8 @@ Do NOT write any code until ALL confirmed:
70
70
  Before starting the per-task loop, check for cross-developer conflicts:
71
71
 
72
72
  ```bash
73
- # Auto-sync to get latest team state
74
- bash scripts/sync-utils.sh auto-sync
73
+ # Auto-sync to get latest team state (non-blocking)
74
+ forge sync || true
75
75
 
76
76
  # Check for conflicts with the current beads issue
77
77
  bash scripts/conflict-detect.sh --issue <beads-id>
@@ -58,7 +58,7 @@ Before proceeding to Phase 1, check for cross-developer conflicts:
58
58
 
59
59
  ```bash
60
60
  # Auto-sync to get latest team state
61
- bash scripts/sync-utils.sh auto-sync
61
+ forge sync || true
62
62
 
63
63
  # Check for conflicts with this issue's planned work area
64
64
  bash scripts/conflict-detect.sh --issue <beads-id>
@@ -108,7 +108,7 @@ If merge conflicts or unmet dependencies are found:
108
108
  Before starting planning, verify team identity is mapped:
109
109
 
110
110
  ```bash
111
- bash scripts/forge-team/index.sh verify 2>&1 || true
111
+ forge team verify 2>&1 || true
112
112
  ```
113
113
 
114
114
  If verify reports issues, address them before proceeding (the output will include `FORGE_AGENT_7f3a:PROMPT:` directives with exact commands to run).
@@ -167,10 +167,10 @@ After PR is created, sync issue state to GitHub and verify 1:1 mapping:
167
167
 
168
168
  ```bash
169
169
  # Sync issue state to GitHub
170
- bash scripts/forge-team/index.sh sync 2>&1 || true
170
+ forge team sync 2>&1 || true
171
171
 
172
172
  # Verify 1:1 mapping
173
- bash scripts/forge-team/index.sh verify 2>&1 || true
173
+ forge team verify 2>&1 || true
174
174
  ```
175
175
 
176
176
  ## Example Output
@@ -21,7 +21,7 @@ This command helps you understand the current state of the project before starti
21
21
 
22
22
  ```bash
23
23
  # Sync team state before showing status
24
- bash scripts/sync-utils.sh auto-sync
24
+ forge sync || true
25
25
  ```
26
26
 
27
27
  ### Step 1: Smart Status (ranked issues with conflict detection)
@@ -29,7 +29,7 @@ bash scripts/sync-utils.sh auto-sync
29
29
  ```bash
30
30
  bash scripts/smart-status.sh
31
31
  ```
32
- This script dynamically computes and displays all issues ranked by composite score (priority, dependency impact, type, staleness, epic proximity). Output includes active sessions, conflict risk annotations, and grouped categories. No manual querying needed — the script handles everything.
32
+ This command dynamically computes and displays all issues ranked by composite score (priority, dependency impact, type, staleness, epic proximity). Output includes active sessions, conflict risk annotations, and grouped categories. No manual querying needed.
33
33
 
34
34
  For full context on any issue: `bd show <id>`
35
35
 
@@ -78,10 +78,10 @@ Show current developer's active work and team overview:
78
78
 
79
79
  ```bash
80
80
  # Show my active issues
81
- bash scripts/forge-team/index.sh workload --me 2>&1 || true
81
+ forge team workload --me 2>&1 || true
82
82
 
83
83
  # One-line team summary
84
- bash scripts/forge-team/index.sh dashboard 2>&1 | head -5 || true
84
+ forge team dashboard 2>&1 | head -5 || true
85
85
  ```
86
86
 
87
87
  ## Next Steps
package/AGENTS.md CHANGED
@@ -269,4 +269,5 @@ forge close <id> # Complete work
269
269
  - NEVER stop before pushing - that leaves work stranded locally
270
270
  - NEVER say "ready to push when you are" - YOU must push
271
271
  - If push fails, resolve and retry until it succeeds
272
+ - After fixing review feedback, always push the changes and resolve the related GitHub review threads via the GraphQL API before considering the work complete
272
273
  <!-- END BEADS INTEGRATION -->
package/CLAUDE.md CHANGED
@@ -50,6 +50,17 @@ See [docs/TOOLCHAIN.md](docs/TOOLCHAIN.md) for detailed MCP setup instructions.
50
50
 
51
51
  Setup prompts for Beads during interactive installation. Manual install: see [docs/TOOLCHAIN.md](docs/TOOLCHAIN.md).
52
52
 
53
+ ### Shell Model
54
+
55
+ Forge commands and repo scripts assume the following shell model:
56
+
57
+ | Platform | Shell used by Forge commands and scripts |
58
+ | --- | --- |
59
+ | Windows | Git Bash for helper-backed Forge stage flows |
60
+ | macOS/Linux | Default login shell |
61
+
62
+ On Windows, Forge runtime health enforces Git Bash for helper-backed stage flows. Native PowerShell is still used by some bootstrap paths, and WSL may be useful for adjacent development tasks. See [docs/TOOLCHAIN.md](docs/TOOLCHAIN.md#shell-model) for details.
63
+
53
64
  ---
54
65
 
55
66
  ## Git Workflow
@@ -106,5 +117,6 @@ As you work, when you give the same instruction twice, add it here:
106
117
  - **Pre-push test env**: `test-env/` fixture tests can fail during actual `git push` due to git mid-push state. Fix the root cause — never use `LEFTHOOK=0`.
107
118
  - **Command sync**: After editing `.claude/commands/*.md`, run `node scripts/sync-commands.js` to update all 7 agent directories. Use `--check` in CI to detect drift. Use `--dry-run` to preview.
108
119
  - **Dynamic commands**: Never hardcode example output in command files (`.claude/commands/*.md`) when a script generates that output dynamically. Command files should reference the script and describe what it does — not duplicate its output with fake data that becomes stale.
120
+ - **Review follow-up completion**: After fixing review feedback, always push the changes and resolve the related GitHub review threads via the GraphQL API before considering the work complete.
109
121
 
110
122
  <!-- USER:END -->
package/bin/forge.js CHANGED
@@ -64,7 +64,7 @@ const { createSymlinkOrCopy: libCreateSymlinkOrCopy } = require(path.join(packag
64
64
  const beadsSetupLib = require(path.join(packageDir, 'lib', 'beads-setup'));
65
65
  const { beadsHealthCheck } = require(path.join(packageDir, 'lib', 'beads-health-check'));
66
66
  const { setupPAT } = require(path.join(packageDir, 'lib', 'pat-setup'));
67
- const { detectDefaultBranch, detectBeadsVersion, templateWorkflows, scaffoldBeadsSync } = require(path.join(packageDir, 'lib', 'beads-sync-scaffold'));
67
+ const { DEFAULT_BEADS_VERSION, detectDefaultBranch, templateWorkflows, scaffoldBeadsSync } = require(path.join(packageDir, 'lib', 'beads-sync-scaffold'));
68
68
 
69
69
  // Load incremental setup modules
70
70
  const { detectEnvironment } = require('../lib/detect-agent');
@@ -2554,7 +2554,7 @@ function parseFlags() {
2554
2554
 
2555
2555
  // Issue passthrough commands delegate all flags to bd.
2556
2556
  // Skip global parsing so flags like --type, -p, --help reach the handler intact.
2557
- const issuePassthroughCommands = ['create', 'update', 'claim', 'close', 'show', 'list', 'ready', 'issue'];
2557
+ const issuePassthroughCommands = ['create', 'update', 'claim', 'close', 'show', 'list', 'ready', 'issue', 'issues'];
2558
2558
  if (issuePassthroughCommands.includes(args[0])) {
2559
2559
  return flags;
2560
2560
  }
@@ -4047,9 +4047,9 @@ async function handleSyncScaffold() {
4047
4047
  console.log(` Skipped: ${f} (already exists)`);
4048
4048
  }
4049
4049
 
4050
- // Detect default branch and Beads version, then template workflows
4050
+ // Detect default branch and pin forge-managed workflows to the repo baseline Beads version.
4051
4051
  const branch = detectDefaultBranch(projectRoot);
4052
- const beadsVersion = detectBeadsVersion();
4052
+ const beadsVersion = DEFAULT_BEADS_VERSION;
4053
4053
  const workflowDir = path.join(projectRoot, '.github', 'workflows');
4054
4054
  templateWorkflows(workflowDir, branch, beadsVersion, result.filesCreated || []);
4055
4055
  console.log(` Branch: ${branch}, Beads version: ${beadsVersion}`);
@@ -4813,4 +4813,9 @@ if (require.main === module) {
4813
4813
  })();
4814
4814
  }
4815
4815
 
4816
- module.exports = { getWorkflowCommands, ensureDirWithNote };
4816
+ module.exports = {
4817
+ ensureDirWithNote,
4818
+ getWorkflowCommands,
4819
+ validateDirectoryPathInput,
4820
+ validateUserInput,
4821
+ };
@@ -69,6 +69,32 @@ Three guards prevent infinite ping-pong:
69
69
  2. **Commit message prefix** -- Phase 2 workflow skips commits starting with `chore(beads):`
70
70
  3. **Opt-out label** -- `skip-beads-sync` label on any issue disables sync entirely
71
71
 
72
+ ### Normalized Core
73
+
74
+ GitHub-owned shared fields are the only fields that steady-state pull and initial import are allowed to overwrite:
75
+
76
+ - `github.number`
77
+ - `github.nodeId`
78
+ - `github.url`
79
+ - `shared.title`
80
+ - `shared.body`
81
+ - `shared.state`
82
+ - `shared.assignees`
83
+ - `shared.labels`
84
+ - `shared.milestone`
85
+ - `sync.remoteUpdatedAt`
86
+
87
+ Forge-owned workflow context stays local in Beads. That includes workflow stage, dependencies, progress notes, decisions, and other issue-engine metadata.
88
+
89
+ Both ongoing pull sync and the `forge-ij1` import bootstrap use the same primitive layer:
90
+
91
+ - `lib/issue-sync/link-store.js` resolves canonical GitHub/Beads links.
92
+ - `lib/issue-sync/github-pull.js` normalizes remote GitHub issues into shared records.
93
+ - `lib/issue-sync/reconcile.js` applies GitHub-owned fields and materializes the local cache row.
94
+ - `lib/issue-sync/import-primitives.js` exposes `listRemoteIssues`, `normalizeRemoteIssue`, `resolveSharedLink`, and `materializeLocalIssue` for import backfill.
95
+
96
+ `forge-ij1` depends on these primitives directly. It does not use a separate import-specific sync contract or an alternate reconciliation path.
97
+
72
98
  ---
73
99
 
74
100
  ## Setup
package/docs/TOOLCHAIN.md CHANGED
@@ -31,185 +31,166 @@ Complete reference for all tools integrated with the Forge workflow.
31
31
 
32
32
  ---
33
33
 
34
- ## Beads - Git-Backed Issue Tracking
34
+ ## Shell Model
35
35
 
36
- **Package**: `@beads/bd`
37
- **Repository**: [github.com/steveyegge/beads](https://github.com/steveyegge/beads)
36
+ Forge commands and repo scripts run under the shell shown below:
37
+
38
+ | Platform | Shell used by Forge commands and scripts |
39
+ | --- | --- |
40
+ | Windows | Git Bash for helper-backed Forge stage flows |
41
+ | macOS/Linux | Default login shell |
42
+
43
+ Windows gotchas:
44
+
45
+ - Forge runtime health enforces Git Bash on Windows for helper-backed flows and reports `Git Bash is required on Windows for helper-backed flows.` when it is missing.
46
+ - Native PowerShell is still used by some bootstrap paths, such as Beads installation, but it is not the enforced shell for helper-backed stage execution.
47
+ - WSL may be useful for adjacent development tasks, but it is not the Windows shell policy currently enforced by Forge runtime checks.
48
+
49
+ ---
50
+
51
+ ## Beads - Dolt-Backed Issue Tracking
52
+
53
+ **Package**: `@beads/bd`
54
+ **Repository**: [github.com/steveyegge/beads](https://github.com/steveyegge/beads)
38
55
  **Purpose**: Distributed issue tracking designed for AI coding agents
39
56
 
40
- ### Why Beads?
57
+ ### Current Forge Target
41
58
 
42
- - **Persists across sessions** - Issues survive context clearing, compaction, new chats
43
- - **Git-backed** - Version controlled, mergeable, team-shareable
44
- - **Dependency tracking** - Know what blocks what
45
- - **Ready detection** - `forge ready` finds unblocked work automatically
46
- - **AI-optimized** - JSON output, semantic compaction, audit trails
59
+ - Forge now targets the stable Beads `v1.0.0` release for repo setup and CI.
60
+ - Routine team sync still goes through `forge sync`.
61
+ - Use `bd` directly for Beads features Forge does not wrap yet, such as `bd init`, `bd comments`, `bd dep`, `bd blocked`, `bd backup`, and `bd dolt *`.
47
62
 
48
- ### Installation
63
+ ### Install or Update Beads
49
64
 
50
- **Auto-installation** (Recommended):
65
+ **Recommended**:
51
66
  ```bash
52
67
  bunx forge setup
53
- # Prompts: "Install Beads? (y/n)"
54
- # Automatically installs and initializes
55
- # On Windows: uses PowerShell installer (npm @beads/bd has an EPERM bug on Windows)
68
+ bd --version
56
69
  ```
57
70
 
58
- **Manual installation**:
71
+ **Manual install**:
59
72
  ```bash
60
- # macOS / Linux (global)
61
- bun add -g @beads/bd
62
- bd init
63
-
64
- # macOS / Linux (local)
65
- bun add -d @beads/bd
66
- bunx bd init
67
-
68
- # Windows (global) — use PowerShell installer, NOT npm/bun add -g
73
+ # Windows
69
74
  irm https://raw.githubusercontent.com/steveyegge/beads/main/install.ps1 | iex
70
- bd init
75
+ bd --version
71
76
 
72
- # Or with bunx (macOS/Linux, no install needed)
73
- bunx @beads/bd init
77
+ # CI / pinned Linux install
78
+ BD_VERSION="1.0.0"
79
+ BD_URL="https://github.com/steveyegge/beads/releases/download/v${BD_VERSION}/beads_${BD_VERSION}_linux_amd64.tar.gz"
80
+ mkdir -p "$HOME/.local/bin"
81
+ curl -fsSL "$BD_URL" | tar -xz -C "$HOME/.local/bin" bd
82
+ chmod +x "$HOME/.local/bin/bd"
74
83
  ```
75
84
 
76
- > **Windows note**: The `npm install -g @beads/bd` postinstall script uses `Expand-Archive`, which triggers an EPERM file-locking error on Windows (issue #1031, closed "not planned"). Use the PowerShell installer above instead.
85
+ Verify the installed CLI before using it:
86
+
87
+ ```bash
88
+ bd --version
89
+ bd doctor
90
+ ```
77
91
 
78
- ### File Structure
92
+ ### Supported Repo Layout
79
93
 
80
- After `bd init`, creates `.beads/` directory:
94
+ Forge treats `.beads/` as the repo-local Beads home directory. The layout in this repository currently includes:
81
95
 
82
- ```
96
+ ```text
83
97
  .beads/
84
- ├── issues.jsonl # Issue data (git-tracked, one JSON per line)
85
- ├── beads.db # SQLite cache (git-ignored, fast queries)
86
- ├── metadata.json # Database metadata
87
- ├── config.yaml # User configuration
88
- ├── interactions.jsonl # Agent audit log
89
- └── .gitignore # Ignores beads.db
98
+ ├── config.yaml
99
+ ├── issues.jsonl
100
+ ├── metadata.json
101
+ ├── team-map.jsonl
102
+ ├── hooks/
103
+ └── .gitignore
90
104
  ```
91
105
 
92
- **Dual-database architecture**: JSONL for git versioning, SQLite for fast local queries. Background daemon keeps them in sync.
106
+ Legacy local database cache files are no longer part of the supported Forge setup instructions. When you need JSONL snapshots for migration verification or CI diffing, generate them explicitly with `bd backup --force`.
107
+
108
+ ### Migrate Legacy SQLite Data
109
+
110
+ Use the repo wrapper instead of hand-editing `.beads/`:
111
+
112
+ ```bash
113
+ bash scripts/beads-migrate-to-dolt.sh
114
+ ```
93
115
 
94
- For day-to-day issue workflows, prefer the Forge wrapper commands (`forge ready`,
95
- `forge create`, `forge update`, `forge close`, `forge sync`). Use `bd` directly
96
- for Beads capabilities Forge does not wrap yet, such as `bd init`, `bd comments`,
97
- `bd dep`, `bd blocked`, and `bd dolt *`.
116
+ Default paths used by the wrapper:
98
117
 
99
- ### Complete Command Reference
118
+ - `--project-root`: current working directory
119
+ - `--legacy-backup-dir`: `.beads/backup`
120
+ - `--snapshot-root`: `.beads-migration-snapshots`
121
+ - `--migrated-dir`: `.beads-migrated`
122
+ - `--export-dir`: `.beads-migrated-export`
100
123
 
101
- #### Initialization
124
+ What the wrapper does:
125
+
126
+ 1. Snapshots the current `.beads/` directory into `.beads-migration-snapshots/<timestamp>/current-beads`.
127
+ 2. Restores the legacy JSONL backup into a fresh migrated workspace.
128
+ 3. Exports a fresh backup snapshot for parity verification.
129
+ 4. Verifies issue IDs, dependency edges, comment IDs, config keys, and record counts.
130
+ 5. Writes `.beads-migrated/migration-manifest.json` on success.
131
+
132
+ rollback behavior:
133
+
134
+ - The wrapper automatically restores the pre-migration `.beads/` snapshot if parity verification fails.
135
+ - If you need to inspect or restore manually, use the timestamped snapshot under `.beads-migration-snapshots/`.
136
+
137
+ See the script help for explicit path overrides:
102
138
 
103
139
  ```bash
104
- bd init # Initialize in project
105
- bd init --stealth # Local-only (don't commit to repo)
106
- bd init --contributor # Contributor mode
107
- bd init --prefix PROJ # Custom issue prefix (PROJ-xxx)
140
+ bash scripts/beads-migrate-to-dolt.sh --help
108
141
  ```
109
142
 
110
- #### Issue Management
143
+ ### Post-Upgrade Smoke Verification
144
+
145
+ Run the repo smoke harness after upgrading:
111
146
 
112
147
  ```bash
113
- # Create issues
114
- forge create "Title" # Basic issue
115
- forge create "Title" --type feature # With type (feature, bug, chore, etc.)
116
- forge create "Title" --priority 1 # With priority (0=critical, 4=backlog)
117
- forge create "Title" -p 0 -l "urgent,backend" # P0 with labels
118
-
119
- # View issues
120
- forge show <id> # Detailed view with audit trail
121
- forge list # All issues
122
- forge list --status open # Filter by status
123
- forge list --priority 1 # Filter by priority
124
- forge list --assignee bob # Filter by assignee
125
- forge list --label bug # Filter by label (AND logic)
126
- forge list --label-any bug,urgent # Filter by label (OR logic)
127
- forge list --type feature # Filter by type
128
- forge list --title-contains "auth" # Search titles
129
- forge list --limit 10 # Limit results
130
-
131
- # Update issues
132
- forge claim <id> # Claim work (sets in_progress)
133
- forge update <id> --priority 2 # Change priority
134
- forge update <id> --assignee bob # Assign
135
- forge update <id> --title "New title" # Update title
136
- forge update <id> --description "..." # Update description
137
- forge update <id> --notes "..." # Add notes
138
- forge update <id> --add-label urgent # Add label
139
-
140
- # Complete issues
141
- forge close <id> # Close single issue
142
- forge close <id1> <id2> <id3> # Close multiple (efficient)
143
- forge close <id> --reason "Completed auth" # Close with reason
144
- bd delete <id> # Delete issue
145
- bd delete <id> --cascade # Delete with dependents
146
- ```
147
-
148
- #### Workflow Commands
148
+ bash scripts/beads-upgrade-smoke.sh
149
+ ```
150
+
151
+ The harness records a machine-readable summary at `.artifacts/beads-upgrade-smoke/summary.json` by default and exercises this sequence:
152
+
153
+ 1. `bd create` primary smoke issue
154
+ 2. `bd create` dependent smoke issue
155
+ 3. `bd list --json --limit=0`
156
+ 4. `bd show <id> --json`
157
+ 5. `bd dep add <child> <parent>`
158
+ 6. `bd close <id>` cleanup for both smoke issues
159
+ 7. `bd sync` compatibility check
160
+
161
+ If any command fails, the summary captures `failedStep`, command output, and cleanup state. This is intentional: the harness does not silently substitute a different command for `bd sync`.
162
+
163
+ ### Day-to-Day Commands
149
164
 
150
165
  ```bash
151
166
  # Find work
152
- forge ready # Issues with NO open blockers (start here!)
153
- forge ready --priority 1 # Filter ready work by priority
154
- bd blocked # Issues that ARE blocked
155
-
156
- # Dependencies
157
- bd dep add <child> <parent> # child depends on parent (blocks)
158
- bd dep add <child> <parent> --type related # Soft reference (no blocking)
159
- bd dep add <child> <parent> --type parent-child # Hierarchical
160
- bd dep remove <child> <parent> # Remove dependency
161
- bd dep tree <id> # Visualize dependency tree
162
- bd dep cycles # Detect cycles
163
-
164
- # Comments
165
- bd comments <id> # View comments
166
- bd comments add <id> "Comment text" # Add comment
167
-
168
- # Git sync
169
- forge sync # Pull + push Beads state through the Forge wrapper
170
- bd dolt status # Check Dolt sync/server status
171
- bd hooks install # Install git hooks for auto-sync
172
-
173
- # Maintenance
174
- bd stats # Project statistics
175
- bd doctor # Check for issues
176
- bd admin compact --days 90 # Compact old closed issues
177
- ```
178
-
179
- #### Issue Statuses
180
-
181
- - `open` - Not started
182
- - `in_progress` - Being worked on
183
- - `blocked` - Waiting on something
184
- - `completed` - Done
185
- - `on_hold` - Paused
186
- - `cancelled` - Won't do
187
-
188
- #### Priority Levels
189
-
190
- | Priority | Meaning | Usage |
191
- |----------|---------|-------|
192
- | 0 (P0) | Critical | Drop everything, fix now |
193
- | 1 (P1) | High | Do this sprint |
194
- | 2 (P2) | Medium | Planned work |
195
- | 3 (P3) | Low | Nice to have |
196
- | 4 (P4) | Backlog | Someday/maybe |
197
-
198
- #### Dependency Types
199
-
200
- | Type | Blocks Ready? | Use Case |
201
- |------|---------------|----------|
202
- | `blocks` | YES | Hard dependency |
203
- | `related` | NO | Soft reference |
204
- | `parent-child` | YES | Hierarchy |
205
- | `discovered-from` | NO | Found during work |
167
+ forge ready
168
+ forge show <id>
169
+ forge claim <id>
170
+
171
+ # Issue operations
172
+ forge create "Title"
173
+ forge list
174
+ forge update <id> --priority 2
175
+ forge close <id>
176
+
177
+ # Direct beads operations
178
+ bd comments add <id> "Progress update"
179
+ bd dep add <child> <parent>
180
+ bd dep cycles
181
+ bd backup --force
182
+ bd dolt status
183
+
184
+ # Routine repo sync
185
+ forge sync
186
+ ```
206
187
 
207
188
  ### Session Workflow
208
189
 
209
190
  ```bash
210
191
  # Start of session
211
- forge ready # What can I work on?
212
- forge show <id> # Review the issue
192
+ forge ready
193
+ forge show <id>
213
194
  forge claim <id>
214
195
 
215
196
  # During work
@@ -217,9 +198,8 @@ bd comments add <id> "Progress update"
217
198
  forge update <id> --notes "Found edge case"
218
199
 
219
200
  # End of session
220
- forge close <id> # If done, or:
221
- forge update <id> --status blocked --comment "Needs API response"
222
- forge sync # Always sync at end!
201
+ forge close <id>
202
+ forge sync
223
203
  ```
224
204
 
225
205
  ---
@@ -546,7 +526,7 @@ gh issue create --title "..." --body "..."
546
526
 
547
527
  ### Beads (`bd`) — Minimum Version
548
528
 
549
- **Minimum version**: v0.49.x
529
+ **Recommended stable version**: `v1.0.0`
550
530
  **Check installed version**:
551
531
  ```bash
552
532
  bd --version
@@ -554,8 +534,8 @@ bd --version
554
534
 
555
535
  **Install / Update**:
556
536
  ```bash
557
- # macOS / Linux
558
- bun add -g @beads/bd
537
+ # Recommended
538
+ bunx forge setup
559
539
 
560
540
  # Windows — use PowerShell installer (npm has EPERM bug)
561
541
  irm https://raw.githubusercontent.com/steveyegge/beads/main/install.ps1 | iex
@@ -596,7 +576,9 @@ forge show <id> # View details
596
576
  forge update <id> --status X # Update status
597
577
  bd dep add <a> <b> # a depends on b
598
578
  forge close <id> # Complete
599
- forge sync # Beads sync
579
+ forge sync # Routine repo sync
580
+ bash scripts/beads-migrate-to-dolt.sh
581
+ bash scripts/beads-upgrade-smoke.sh
600
582
  ```
601
583
 
602
584
  ### GitHub CLI