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.
- package/.claude/commands/dev.md +2 -2
- package/.claude/commands/plan.md +2 -2
- package/.claude/commands/ship.md +2 -2
- package/.claude/commands/status.md +4 -4
- package/.cline/workflows/dev.md +2 -2
- package/.cline/workflows/plan.md +2 -2
- package/.cline/workflows/ship.md +2 -2
- package/.cline/workflows/status.md +4 -4
- package/.codex/skills/dev/SKILL.md +2 -2
- package/.codex/skills/plan/SKILL.md +2 -2
- package/.codex/skills/ship/SKILL.md +2 -2
- package/.codex/skills/status/SKILL.md +4 -4
- package/.cursor/commands/dev.md +2 -2
- package/.cursor/commands/plan.md +2 -2
- package/.cursor/commands/ship.md +2 -2
- package/.cursor/commands/status.md +4 -4
- package/.github/prompts/dev.prompt.md +2 -2
- package/.github/prompts/plan.prompt.md +2 -2
- package/.github/prompts/ship.prompt.md +2 -2
- package/.github/prompts/status.prompt.md +4 -4
- package/.github/workflows/beads-to-github.yml +43 -10
- package/.github/workflows/github-to-beads.yml +10 -7
- package/.kilocode/workflows/dev.md +2 -2
- package/.kilocode/workflows/plan.md +2 -2
- package/.kilocode/workflows/ship.md +2 -2
- package/.kilocode/workflows/status.md +4 -4
- package/.opencode/commands/dev.md +2 -2
- package/.opencode/commands/plan.md +2 -2
- package/.opencode/commands/ship.md +2 -2
- package/.opencode/commands/status.md +4 -4
- package/.roo/commands/dev.md +2 -2
- package/.roo/commands/plan.md +2 -2
- package/.roo/commands/ship.md +2 -2
- package/.roo/commands/status.md +4 -4
- package/AGENTS.md +1 -0
- package/CLAUDE.md +12 -0
- package/bin/forge.js +10 -5
- package/docs/BEADS_GITHUB_SYNC.md +26 -0
- package/docs/TOOLCHAIN.md +130 -148
- package/lib/beads-bootstrap.js +225 -0
- package/lib/beads-health-check.js +55 -10
- package/lib/beads-setup.js +104 -28
- package/lib/beads-sync-scaffold.js +11 -6
- package/lib/commands/_issue.js +11 -1
- package/lib/commands/issues.js +49 -0
- package/lib/commands/recommend.js +22 -1
- package/lib/commands/setup.js +16 -10
- package/lib/commands/status.js +181 -0
- package/lib/commands/team.js +11 -1
- package/lib/commands/test.js +37 -2
- package/lib/commands/validate.js +14 -8
- package/lib/commands/worktree.js +27 -54
- package/lib/dep-guard/keyword-ripple.js +184 -0
- package/lib/detect-worktree.js +9 -10
- package/lib/forge-issues.js +326 -0
- package/lib/issue-sync/authority.js +100 -0
- package/lib/issue-sync/github-pull.js +184 -0
- package/lib/issue-sync/import-primitives.js +98 -0
- package/lib/issue-sync/legacy-link-bridge.js +436 -0
- package/lib/issue-sync/link-store.js +292 -0
- package/lib/issue-sync/project-github.js +123 -0
- package/lib/issue-sync/reconcile.js +195 -0
- package/lib/issue-sync/schema.js +126 -0
- package/lib/lefthook-check.js +5 -2
- package/lib/project-memory.js +564 -0
- package/lib/runtime-health.js +100 -12
- package/lib/smart-status/conflicts.js +205 -0
- package/lib/smart-status/scoring.js +177 -0
- package/lib/status/beads-snapshot.js +102 -0
- package/lib/status/presenter.js +65 -0
- package/lib/workflow/enforce-stage.js +3 -1
- package/lib/workflow/state-manager.js +164 -8
- package/package.json +12 -4
- package/scripts/beads-context.sh +124 -5
- package/scripts/beads-context.test.js +21 -4
- package/scripts/beads-migrate-to-dolt.sh +7 -0
- package/scripts/beads-upgrade-smoke.sh +263 -0
- package/scripts/behavioral-judge.sh +115 -11
- package/scripts/benchmark.js +349 -63
- package/scripts/dep-guard-analyze.js +52 -17
- package/scripts/dep-guard-keyword-ripple.js +29 -0
- package/scripts/dep-guard-render-review.js +86 -0
- package/scripts/dep-guard.sh +45 -232
- package/scripts/forge-team/lib/sync-github.sh +160 -28
- package/scripts/forge-team/tests/sync-github.test.sh +195 -58
- package/scripts/github-beads-sync/index.mjs +122 -98
- package/scripts/github-beads-sync/mapping.mjs +54 -0
- package/scripts/github-beads-sync/reverse-sync-cli.mjs +2 -2
- package/scripts/github-beads-sync/reverse-sync.mjs +31 -7
- package/scripts/lib/beads-migrate-to-dolt.mjs +503 -0
- package/scripts/preflight.sh +181 -0
- package/scripts/smart-status-score.js +31 -0
- package/scripts/smart-status-sessions.js +51 -0
- package/scripts/smart-status.sh +74 -329
- package/scripts/sync-agentic-workflow.js +48 -0
- package/scripts/test-ci-shard.js +244 -0
- package/scripts/test-dashboard.js +188 -52
- package/scripts/test-full-suite.js +186 -0
- package/scripts/test-profile.js +278 -0
- package/scripts/test.js +219 -28
- package/scripts/validate.js +143 -0
- 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
|
-
|
|
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
|
|
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
|
-
|
|
80
|
+
forge team workload --me 2>&1 || true
|
|
81
81
|
|
|
82
82
|
# One-line team summary
|
|
83
|
-
|
|
83
|
+
forge team dashboard 2>&1 | head -5 || true
|
|
84
84
|
```
|
|
85
85
|
|
|
86
86
|
## Next Steps
|
package/.roo/commands/dev.md
CHANGED
|
@@ -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
|
-
|
|
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>
|
package/.roo/commands/plan.md
CHANGED
|
@@ -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
|
-
|
|
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
|
-
|
|
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).
|
package/.roo/commands/ship.md
CHANGED
|
@@ -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
|
-
|
|
170
|
+
forge team sync 2>&1 || true
|
|
171
171
|
|
|
172
172
|
# Verify 1:1 mapping
|
|
173
|
-
|
|
173
|
+
forge team verify 2>&1 || true
|
|
174
174
|
```
|
|
175
175
|
|
|
176
176
|
## Example Output
|
package/.roo/commands/status.md
CHANGED
|
@@ -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
|
-
|
|
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
|
|
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
|
-
|
|
81
|
+
forge team workload --me 2>&1 || true
|
|
82
82
|
|
|
83
83
|
# One-line team summary
|
|
84
|
-
|
|
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 {
|
|
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
|
|
4050
|
+
// Detect default branch and pin forge-managed workflows to the repo baseline Beads version.
|
|
4051
4051
|
const branch = detectDefaultBranch(projectRoot);
|
|
4052
|
-
const beadsVersion =
|
|
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 = {
|
|
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
|
-
##
|
|
34
|
+
## Shell Model
|
|
35
35
|
|
|
36
|
-
|
|
37
|
-
|
|
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
|
-
###
|
|
57
|
+
### Current Forge Target
|
|
41
58
|
|
|
42
|
-
-
|
|
43
|
-
-
|
|
44
|
-
-
|
|
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
|
-
###
|
|
63
|
+
### Install or Update Beads
|
|
49
64
|
|
|
50
|
-
**
|
|
65
|
+
**Recommended**:
|
|
51
66
|
```bash
|
|
52
67
|
bunx forge setup
|
|
53
|
-
|
|
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
|
|
71
|
+
**Manual install**:
|
|
59
72
|
```bash
|
|
60
|
-
#
|
|
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
|
|
75
|
+
bd --version
|
|
71
76
|
|
|
72
|
-
#
|
|
73
|
-
|
|
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
|
-
|
|
85
|
+
Verify the installed CLI before using it:
|
|
86
|
+
|
|
87
|
+
```bash
|
|
88
|
+
bd --version
|
|
89
|
+
bd doctor
|
|
90
|
+
```
|
|
77
91
|
|
|
78
|
-
###
|
|
92
|
+
### Supported Repo Layout
|
|
79
93
|
|
|
80
|
-
|
|
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
|
-
├──
|
|
85
|
-
├──
|
|
86
|
-
├── metadata.json
|
|
87
|
-
├──
|
|
88
|
-
├──
|
|
89
|
-
└── .gitignore
|
|
98
|
+
├── config.yaml
|
|
99
|
+
├── issues.jsonl
|
|
100
|
+
├── metadata.json
|
|
101
|
+
├── team-map.jsonl
|
|
102
|
+
├── hooks/
|
|
103
|
+
└── .gitignore
|
|
90
104
|
```
|
|
91
105
|
|
|
92
|
-
|
|
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
|
-
|
|
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
|
-
|
|
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
|
-
|
|
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
|
-
|
|
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
|
-
|
|
143
|
+
### Post-Upgrade Smoke Verification
|
|
144
|
+
|
|
145
|
+
Run the repo smoke harness after upgrading:
|
|
111
146
|
|
|
112
147
|
```bash
|
|
113
|
-
|
|
114
|
-
|
|
115
|
-
|
|
116
|
-
|
|
117
|
-
|
|
118
|
-
|
|
119
|
-
|
|
120
|
-
|
|
121
|
-
|
|
122
|
-
|
|
123
|
-
|
|
124
|
-
|
|
125
|
-
|
|
126
|
-
|
|
127
|
-
|
|
128
|
-
|
|
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
|
|
153
|
-
forge
|
|
154
|
-
|
|
155
|
-
|
|
156
|
-
#
|
|
157
|
-
|
|
158
|
-
|
|
159
|
-
|
|
160
|
-
|
|
161
|
-
|
|
162
|
-
|
|
163
|
-
|
|
164
|
-
|
|
165
|
-
bd
|
|
166
|
-
bd
|
|
167
|
-
|
|
168
|
-
|
|
169
|
-
|
|
170
|
-
|
|
171
|
-
|
|
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
|
|
212
|
-
forge show <id>
|
|
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>
|
|
221
|
-
forge
|
|
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
|
-
**
|
|
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
|
-
#
|
|
558
|
-
|
|
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 #
|
|
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
|