forge-workflow 0.0.8 → 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 (135) hide show
  1. package/.claude/commands/dev.md +2 -2
  2. package/.claude/commands/plan.md +2 -2
  3. package/.claude/commands/premerge.md +2 -2
  4. package/.claude/commands/review.md +5 -2
  5. package/.claude/commands/ship.md +6 -5
  6. package/.claude/commands/status.md +4 -4
  7. package/.claude/rules/greptile-review-process.md +4 -4
  8. package/.cline/workflows/dev.md +2 -2
  9. package/.cline/workflows/plan.md +2 -2
  10. package/.cline/workflows/premerge.md +2 -2
  11. package/.cline/workflows/review.md +5 -2
  12. package/.cline/workflows/ship.md +6 -5
  13. package/.cline/workflows/status.md +4 -4
  14. package/.codex/skills/dev/SKILL.md +2 -2
  15. package/.codex/skills/plan/SKILL.md +2 -2
  16. package/.codex/skills/premerge/SKILL.md +2 -2
  17. package/.codex/skills/review/SKILL.md +5 -2
  18. package/.codex/skills/ship/SKILL.md +6 -5
  19. package/.codex/skills/status/SKILL.md +4 -4
  20. package/.cursor/commands/dev.md +2 -2
  21. package/.cursor/commands/plan.md +2 -2
  22. package/.cursor/commands/premerge.md +2 -2
  23. package/.cursor/commands/review.md +5 -2
  24. package/.cursor/commands/ship.md +6 -5
  25. package/.cursor/commands/status.md +4 -4
  26. package/.github/prompts/dev.prompt.md +2 -2
  27. package/.github/prompts/plan.prompt.md +2 -2
  28. package/.github/prompts/premerge.prompt.md +2 -2
  29. package/.github/prompts/review.prompt.md +5 -2
  30. package/.github/prompts/ship.prompt.md +6 -5
  31. package/.github/prompts/status.prompt.md +4 -4
  32. package/.github/workflows/beads-to-github.yml +44 -11
  33. package/.github/workflows/github-to-beads.yml +11 -8
  34. package/.kilocode/workflows/dev.md +2 -2
  35. package/.kilocode/workflows/plan.md +2 -2
  36. package/.kilocode/workflows/premerge.md +2 -2
  37. package/.kilocode/workflows/review.md +5 -2
  38. package/.kilocode/workflows/ship.md +6 -5
  39. package/.kilocode/workflows/status.md +4 -4
  40. package/.opencode/commands/dev.md +2 -2
  41. package/.opencode/commands/plan.md +2 -2
  42. package/.opencode/commands/premerge.md +2 -2
  43. package/.opencode/commands/review.md +5 -2
  44. package/.opencode/commands/ship.md +6 -5
  45. package/.opencode/commands/status.md +4 -4
  46. package/.roo/commands/dev.md +2 -2
  47. package/.roo/commands/plan.md +2 -2
  48. package/.roo/commands/premerge.md +2 -2
  49. package/.roo/commands/review.md +5 -2
  50. package/.roo/commands/ship.md +6 -5
  51. package/.roo/commands/status.md +4 -4
  52. package/AGENTS.md +10 -9
  53. package/CLAUDE.md +12 -0
  54. package/README.md +12 -6
  55. package/bin/forge.js +24 -8
  56. package/docs/BEADS_GITHUB_SYNC.md +32 -2
  57. package/docs/EXAMPLES.md +22 -22
  58. package/docs/ROADMAP.md +3 -3
  59. package/docs/TOOLCHAIN.md +150 -160
  60. package/lib/agents/codex.plugin.json +3 -0
  61. package/lib/agents-config.js +18 -12
  62. package/lib/beads-bootstrap.js +225 -0
  63. package/lib/beads-health-check.js +55 -10
  64. package/lib/beads-setup.js +104 -28
  65. package/lib/beads-sync-scaffold.js +11 -6
  66. package/lib/codex-skills.js +54 -1
  67. package/lib/commands/_issue.js +11 -1
  68. package/lib/commands/issues.js +49 -0
  69. package/lib/commands/plan.js +5 -2
  70. package/lib/commands/recommend.js +22 -1
  71. package/lib/commands/setup.js +247 -27
  72. package/lib/commands/ship.js +188 -5
  73. package/lib/commands/status.js +187 -19
  74. package/lib/commands/team.js +11 -1
  75. package/lib/commands/test.js +125 -25
  76. package/lib/commands/validate.js +232 -9
  77. package/lib/commands/worktree.js +27 -54
  78. package/lib/dep-guard/keyword-ripple.js +184 -0
  79. package/lib/detect-worktree.js +9 -10
  80. package/lib/forge-issues.js +326 -0
  81. package/lib/issue-sync/authority.js +100 -0
  82. package/lib/issue-sync/github-pull.js +184 -0
  83. package/lib/issue-sync/import-primitives.js +98 -0
  84. package/lib/issue-sync/legacy-link-bridge.js +436 -0
  85. package/lib/issue-sync/link-store.js +292 -0
  86. package/lib/issue-sync/project-github.js +123 -0
  87. package/lib/issue-sync/reconcile.js +195 -0
  88. package/lib/issue-sync/schema.js +126 -0
  89. package/lib/lefthook-check.js +5 -2
  90. package/lib/project-memory.js +564 -0
  91. package/lib/runtime-health.js +100 -12
  92. package/lib/setup-action-log.js +2 -0
  93. package/lib/setup-summary-renderer.js +15 -11
  94. package/lib/smart-status/conflicts.js +205 -0
  95. package/lib/smart-status/scoring.js +177 -0
  96. package/lib/status/beads-snapshot.js +102 -0
  97. package/lib/status/presenter.js +65 -0
  98. package/lib/workflow/enforce-stage.js +14 -8
  99. package/lib/workflow/state-manager.js +349 -0
  100. package/package.json +12 -4
  101. package/scripts/beads-context.sh +124 -5
  102. package/scripts/beads-context.test.js +21 -4
  103. package/scripts/beads-migrate-to-dolt.sh +7 -0
  104. package/scripts/beads-upgrade-smoke.sh +263 -0
  105. package/scripts/behavioral-judge.sh +115 -11
  106. package/scripts/benchmark.js +349 -63
  107. package/scripts/dep-guard-analyze.js +52 -17
  108. package/scripts/dep-guard-keyword-ripple.js +29 -0
  109. package/scripts/dep-guard-render-review.js +86 -0
  110. package/scripts/dep-guard.sh +45 -222
  111. package/scripts/forge-team/lib/hooks.sh +1 -1
  112. package/scripts/forge-team/lib/sync-github.sh +160 -28
  113. package/scripts/forge-team/lib/verify.sh +1 -1
  114. package/scripts/forge-team/lib/workload.sh +56 -27
  115. package/scripts/forge-team/tests/sync-github.test.sh +195 -58
  116. package/scripts/forge-team/tests/workload.test.sh +35 -4
  117. package/scripts/github-beads-sync/index.mjs +122 -98
  118. package/scripts/github-beads-sync/mapping.mjs +54 -0
  119. package/scripts/github-beads-sync/reverse-sync-cli.mjs +2 -2
  120. package/scripts/github-beads-sync/reverse-sync.mjs +31 -7
  121. package/scripts/github-beads-sync/run-bd.mjs +4 -2
  122. package/scripts/lib/beads-migrate-to-dolt.mjs +503 -0
  123. package/scripts/preflight.sh +181 -0
  124. package/scripts/smart-status-score.js +31 -0
  125. package/scripts/smart-status-sessions.js +51 -0
  126. package/scripts/smart-status.sh +84 -330
  127. package/scripts/sync-agentic-workflow.js +48 -0
  128. package/scripts/sync-utils.sh +39 -0
  129. package/scripts/test-ci-shard.js +244 -0
  130. package/scripts/test-dashboard.js +188 -52
  131. package/scripts/test-full-suite.js +186 -0
  132. package/scripts/test-profile.js +278 -0
  133. package/scripts/test.js +335 -38
  134. package/scripts/validate.js +143 -0
  135. package/scripts/validate.sh +18 -1
@@ -168,10 +168,10 @@ After PR is created, sync issue state to GitHub and verify 1:1 mapping:
168
168
 
169
169
  ```bash
170
170
  # Sync issue state to GitHub
171
- bash scripts/forge-team/index.sh sync 2>&1 || true
171
+ forge team sync 2>&1 || true
172
172
 
173
173
  # Verify 1:1 mapping
174
- bash scripts/forge-team/index.sh verify 2>&1 || true
174
+ forge team verify 2>&1 || true
175
175
  ```
176
176
 
177
177
  ## Example Output
@@ -186,9 +186,10 @@ bash scripts/forge-team/index.sh verify 2>&1 || true
186
186
  - Beads linked: forge-xyz
187
187
  - Implementation details in collapsible section
188
188
 
189
- ⏸️ PR created, awaiting automated checks (Greptile, SonarCloud, GitHub Actions)
189
+ ⏸️ PR created, checks started (Greptile, SonarCloud, GitHub Actions)
190
+ Poll for up to 60 seconds. If checks are still pending, stop here.
190
191
 
191
- Next: /review <pr-number> (after automated checks complete)
192
+ Next: /review <pr-number> (when automated checks complete or new feedback appears)
192
193
  ```
193
194
 
194
195
  ## Integration with Workflow
@@ -210,5 +211,5 @@ Stage 7: /verify → Post-merge CI check on main
210
211
  - **Fill every section**: Even if "N/A" — empty/missing sections cause review friction
211
212
  - **Include "Closes beads-xxx"**: Required for auto-close in /verify
212
213
  - **Concrete data only**: Test counts, file paths, commit SHAs — not placeholder text
213
- - **Wait for checks**: Let GitHub Actions, Greptile, SonarCloud run
214
+ - **Poll briefly, then stop**: Check PR status for up to 60 seconds, then hand off if checks are still pending
214
215
  - **NO auto-merge**: Always wait for /review phase
@@ -22,7 +22,7 @@ This command helps you understand the current state of the project before starti
22
22
 
23
23
  ```bash
24
24
  # Sync team state before showing status
25
- bash scripts/sync-utils.sh auto-sync
25
+ forge sync || true
26
26
  ```
27
27
 
28
28
  ### Step 1: Smart Status (ranked issues with conflict detection)
@@ -30,7 +30,7 @@ bash scripts/sync-utils.sh auto-sync
30
30
  ```bash
31
31
  bash scripts/smart-status.sh
32
32
  ```
33
- 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.
33
+ 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.
34
34
 
35
35
  For full context on any issue: `bd show <id>`
36
36
 
@@ -79,10 +79,10 @@ Show current developer's active work and team overview:
79
79
 
80
80
  ```bash
81
81
  # Show my active issues
82
- bash scripts/forge-team/index.sh workload --me 2>&1 || true
82
+ forge team workload --me 2>&1 || true
83
83
 
84
84
  # One-line team summary
85
- bash scripts/forge-team/index.sh dashboard 2>&1 | head -5 || true
85
+ forge team dashboard 2>&1 | head -5 || true
86
86
  ```
87
87
 
88
88
  ## Next Steps
@@ -5,6 +5,7 @@ on:
5
5
  branches: [master]
6
6
  paths:
7
7
  - '.beads/**'
8
+ - '.github/beads-snapshots/issues.jsonl'
8
9
 
9
10
  # Serialize with forward-sync to prevent race conditions
10
11
  concurrency:
@@ -30,27 +31,59 @@ jobs:
30
31
 
31
32
  - name: Checkout current
32
33
  if: env.SKIP != 'true'
33
- uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4
34
+ uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v4
34
35
  with:
35
36
  fetch-depth: 0
36
37
 
38
+ - name: Install Beads CLI (pinned to v1.0.0)
39
+ if: env.SKIP != 'true'
40
+ run: |
41
+ BD_VERSION="1.0.0"
42
+ BD_URL="https://github.com/steveyegge/beads/releases/download/v${BD_VERSION}/beads_${BD_VERSION}_linux_amd64.tar.gz"
43
+ mkdir -p "$HOME/.local/bin"
44
+ curl -fsSL "$BD_URL" | tar -xz -C "$HOME/.local/bin" bd
45
+ chmod +x "$HOME/.local/bin/bd"
46
+ echo "$HOME/.local/bin" >> "$GITHUB_PATH"
47
+
37
48
  - name: Detect and close
38
49
  if: env.SKIP != 'true'
39
50
  env:
40
51
  GH_TOKEN: ${{ secrets.GITHUB_TOKEN }}
41
52
  BEFORE_SHA: ${{ github.event.before }}
42
53
  run: |
43
- # Get old and new versions of .beads/issues.jsonl
44
- # Use github.event.before (pre-push SHA) to catch multi-commit pushes
54
+ OLD_SNAPSHOT_PATH="$RUNNER_TEMP/old-issues.jsonl"
55
+ NEW_SNAPSHOT_PATH="$RUNNER_TEMP/new-issues.jsonl"
56
+ BEFORE_WORKTREE="$RUNNER_TEMP/beads-before"
57
+
58
+ generate_snapshot() {
59
+ local repo_root="$1"
60
+ local output_path="$2"
61
+
62
+ BEADS_DIR="$repo_root/.beads" bd init 2>/dev/null || true
63
+ if BEADS_DIR="$repo_root/.beads" bd backup --force 2>/dev/null; then
64
+ cp "$repo_root/.beads/backup/issues.jsonl" "$output_path"
65
+ else
66
+ : > "$output_path"
67
+ fi
68
+ }
69
+
70
+ # Rebuild the current snapshot from the pushed Beads state so local bd close
71
+ # transitions are reflected even when the tracked snapshot file was not updated.
72
+ generate_snapshot "$GITHUB_WORKSPACE" "$NEW_SNAPSHOT_PATH"
73
+
74
+ # Use github.event.before (pre-push SHA) to catch multi-commit pushes.
75
+ # Rebuild the previous snapshot from that tree's Beads state when possible.
45
76
  if [ "$BEFORE_SHA" = "0000000000000000000000000000000000000000" ] || [ -z "$BEFORE_SHA" ]; then
46
- OLD_CONTENT=""
77
+ : > "$OLD_SNAPSHOT_PATH"
78
+ elif git cat-file -e "$BEFORE_SHA:.beads" 2>/dev/null; then
79
+ rm -rf "$BEFORE_WORKTREE"
80
+ mkdir -p "$BEFORE_WORKTREE"
81
+ git archive "$BEFORE_SHA" .beads | tar -x -C "$BEFORE_WORKTREE"
82
+ generate_snapshot "$BEFORE_WORKTREE" "$OLD_SNAPSHOT_PATH"
47
83
  else
48
- OLD_CONTENT=$(git show "$BEFORE_SHA":.beads/issues.jsonl 2>/dev/null || echo "")
84
+ # Fallback for historical commits that predate tracked .beads state.
85
+ OLD_CONTENT=$(git show "$BEFORE_SHA":.github/beads-snapshots/issues.jsonl 2>/dev/null || echo "")
86
+ printf '%s' "$OLD_CONTENT" > "$OLD_SNAPSHOT_PATH"
49
87
  fi
50
- NEW_CONTENT=$(cat .beads/issues.jsonl 2>/dev/null || echo "")
51
-
52
- # Export via temp files to avoid shell injection
53
- printf '%s' "$OLD_CONTENT" > /tmp/old-issues.jsonl
54
- printf '%s' "$NEW_CONTENT" > /tmp/new-issues.jsonl
55
88
 
56
- node scripts/github-beads-sync/reverse-sync-cli.mjs /tmp/old-issues.jsonl /tmp/new-issues.jsonl
89
+ node scripts/github-beads-sync/reverse-sync-cli.mjs "$OLD_SNAPSHOT_PATH" "$NEW_SNAPSHOT_PATH"
@@ -20,7 +20,7 @@ jobs:
20
20
  if: github.actor != 'github-actions[bot]'
21
21
  steps:
22
22
  - name: Checkout code
23
- uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4
23
+ uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v4
24
24
  with:
25
25
  # Need full history for push
26
26
  fetch-depth: 0
@@ -30,9 +30,9 @@ jobs:
30
30
  - name: Setup Bun
31
31
  uses: oven-sh/setup-bun@4bc047ad259df6fc24a6c9b0f9a0cb08cf17fbe5 # v2
32
32
 
33
- - name: Install Beads CLI (pinned to v0.49.1)
33
+ - name: Install Beads CLI (pinned to v1.0.0)
34
34
  run: |
35
- BD_VERSION="0.49.1"
35
+ BD_VERSION="1.0.0"
36
36
  BD_URL="https://github.com/steveyegge/beads/releases/download/v${BD_VERSION}/beads_${BD_VERSION}_linux_amd64.tar.gz"
37
37
  mkdir -p "$HOME/.local/bin"
38
38
  curl -fsSL "$BD_URL" | tar -xz -C "$HOME/.local/bin" bd
@@ -43,7 +43,7 @@ jobs:
43
43
  BEADS_DIR: ${{ github.workspace }}/.beads
44
44
  run: |
45
45
  bd --version
46
- # Initialize SQLite DB from JSONL on fresh checkout
46
+ # Initialize the current Dolt-backed layout on fresh checkout
47
47
  bd init 2>/dev/null || true
48
48
 
49
49
  - name: Run sync
@@ -57,10 +57,13 @@ jobs:
57
57
  run: |
58
58
  node scripts/github-beads-sync/index.mjs "$SYNC_ACTION"
59
59
 
60
- - name: Export database to JSONL
60
+ - name: Export backup snapshot
61
61
  env:
62
62
  BEADS_DIR: ${{ github.workspace }}/.beads
63
- run: bd sync
63
+ run: |
64
+ bd backup --force
65
+ mkdir -p .github/beads-snapshots
66
+ cp .beads/backup/issues.jsonl .github/beads-snapshots/issues.jsonl
64
67
 
65
68
  - name: Commit and push changes
66
69
  env:
@@ -69,8 +72,8 @@ jobs:
69
72
  git config user.name "github-actions[bot]"
70
73
  git config user.email "github-actions[bot]@users.noreply.github.com"
71
74
 
72
- # Stage beads and mapping changes
73
- git add .beads/ .github/beads-mapping.json || true
75
+ # Stage beads state, mapping changes, and the tracked issue snapshot
76
+ git add .beads/ .github/beads-mapping.json .github/beads-snapshots/issues.jsonl || true
74
77
 
75
78
  # Only commit if there are changes
76
79
  if git diff --cached --quiet; then
@@ -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).
@@ -95,7 +95,7 @@ git commit -m "docs: update documentation for <feature-name>
95
95
  git push
96
96
  ```
97
97
 
98
- ⚠️ **After pushing**: CI will re-trigger (Greptile, SonarCloud, etc.). Wait for checks to pass. If new Greptile comments appear on the doc changes, run `/review <pr-number>` again.
98
+ ⚠️ **After pushing**: CI will re-trigger (Greptile, SonarCloud, etc.). Poll for up to 60 seconds. If checks are still pending after that, stop and ask the user to return to `/premerge <pr-number>` later. If new Greptile comments appear on the doc changes, run `/review <pr-number>` again.
99
99
 
100
100
  ### Step 4: Sync Beads
101
101
 
@@ -154,7 +154,7 @@ Do NOT suggest merging.
154
154
  - README.md: Features list updated
155
155
  - CLAUDE.md: USER section updated with new pattern
156
156
  - Committed: docs: update documentation for auth-refresh
157
- ✓ CI re-triggered after doc push — all checks still passing
157
+ ✓ CI re-triggered after doc push — checks passed within the 60 second poll window
158
158
  ✓ Beads synced
159
159
 
160
160
  ✅ PR #89 is ready to merge
@@ -299,10 +299,13 @@ git push
299
299
  ### Step 9: Verify ALL Checks Pass
300
300
 
301
301
  ```bash
302
- # Wait for checks to complete
302
+ # Check status immediately, then poll for at most 60 seconds
303
303
  gh pr checks <pr-number>
304
304
 
305
- # Ensure all status checks are green:
305
+ # If checks are still pending after 60 seconds: STOP and tell the user to return
306
+ # when CI finishes or new review feedback appears.
307
+ #
308
+ # Ensure all completed status checks are green:
306
309
  # ✓ GitHub Actions workflows
307
310
  # ✓ Greptile review (no unresolved critical comments)
308
311
  # ✓ SonarCloud quality gate
@@ -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
@@ -185,9 +185,10 @@ bash scripts/forge-team/index.sh verify 2>&1 || true
185
185
  - Beads linked: forge-xyz
186
186
  - Implementation details in collapsible section
187
187
 
188
- ⏸️ PR created, awaiting automated checks (Greptile, SonarCloud, GitHub Actions)
188
+ ⏸️ PR created, checks started (Greptile, SonarCloud, GitHub Actions)
189
+ Poll for up to 60 seconds. If checks are still pending, stop here.
189
190
 
190
- Next: /review <pr-number> (after automated checks complete)
191
+ Next: /review <pr-number> (when automated checks complete or new feedback appears)
191
192
  ```
192
193
 
193
194
  ## Integration with Workflow
@@ -209,5 +210,5 @@ Stage 7: /verify → Post-merge CI check on main
209
210
  - **Fill every section**: Even if "N/A" — empty/missing sections cause review friction
210
211
  - **Include "Closes beads-xxx"**: Required for auto-close in /verify
211
212
  - **Concrete data only**: Test counts, file paths, commit SHAs — not placeholder text
212
- - **Wait for checks**: Let GitHub Actions, Greptile, SonarCloud run
213
+ - **Poll briefly, then stop**: Check PR status for up to 60 seconds, then hand off if checks are still pending
213
214
  - **NO auto-merge**: Always wait for /review phase
@@ -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
@@ -69,8 +69,8 @@ Do NOT write any code until ALL confirmed:
69
69
  Before starting the per-task loop, check for cross-developer conflicts:
70
70
 
71
71
  ```bash
72
- # Auto-sync to get latest team state
73
- bash scripts/sync-utils.sh auto-sync
72
+ # Auto-sync to get latest team state (non-blocking)
73
+ forge sync || true
74
74
 
75
75
  # Check for conflicts with the current beads issue
76
76
  bash scripts/conflict-detect.sh --issue <beads-id>
@@ -57,7 +57,7 @@ Before proceeding to Phase 1, check for cross-developer conflicts:
57
57
 
58
58
  ```bash
59
59
  # Auto-sync to get latest team state
60
- bash scripts/sync-utils.sh auto-sync
60
+ forge sync || true
61
61
 
62
62
  # Check for conflicts with this issue's planned work area
63
63
  bash scripts/conflict-detect.sh --issue <beads-id>
@@ -107,7 +107,7 @@ If merge conflicts or unmet dependencies are found:
107
107
  Before starting planning, verify team identity is mapped:
108
108
 
109
109
  ```bash
110
- bash scripts/forge-team/index.sh verify 2>&1 || true
110
+ forge team verify 2>&1 || true
111
111
  ```
112
112
 
113
113
  If verify reports issues, address them before proceeding (the output will include `FORGE_AGENT_7f3a:PROMPT:` directives with exact commands to run).
@@ -94,7 +94,7 @@ git commit -m "docs: update documentation for <feature-name>
94
94
  git push
95
95
  ```
96
96
 
97
- ⚠️ **After pushing**: CI will re-trigger (Greptile, SonarCloud, etc.). Wait for checks to pass. If new Greptile comments appear on the doc changes, run `/review <pr-number>` again.
97
+ ⚠️ **After pushing**: CI will re-trigger (Greptile, SonarCloud, etc.). Poll for up to 60 seconds. If checks are still pending after that, stop and ask the user to return to `/premerge <pr-number>` later. If new Greptile comments appear on the doc changes, run `/review <pr-number>` again.
98
98
 
99
99
  ### Step 4: Sync Beads
100
100
 
@@ -153,7 +153,7 @@ Do NOT suggest merging.
153
153
  - README.md: Features list updated
154
154
  - CLAUDE.md: USER section updated with new pattern
155
155
  - Committed: docs: update documentation for auth-refresh
156
- ✓ CI re-triggered after doc push — all checks still passing
156
+ ✓ CI re-triggered after doc push — checks passed within the 60 second poll window
157
157
  ✓ Beads synced
158
158
 
159
159
  ✅ PR #89 is ready to merge
@@ -298,10 +298,13 @@ git push
298
298
  ### Step 9: Verify ALL Checks Pass
299
299
 
300
300
  ```bash
301
- # Wait for checks to complete
301
+ # Check status immediately, then poll for at most 60 seconds
302
302
  gh pr checks <pr-number>
303
303
 
304
- # Ensure all status checks are green:
304
+ # If checks are still pending after 60 seconds: STOP and tell the user to return
305
+ # when CI finishes or new review feedback appears.
306
+ #
307
+ # Ensure all completed status checks are green:
305
308
  # ✓ GitHub Actions workflows
306
309
  # ✓ Greptile review (no unresolved critical comments)
307
310
  # ✓ SonarCloud quality gate
@@ -166,10 +166,10 @@ After PR is created, sync issue state to GitHub and verify 1:1 mapping:
166
166
 
167
167
  ```bash
168
168
  # Sync issue state to GitHub
169
- bash scripts/forge-team/index.sh sync 2>&1 || true
169
+ forge team sync 2>&1 || true
170
170
 
171
171
  # Verify 1:1 mapping
172
- bash scripts/forge-team/index.sh verify 2>&1 || true
172
+ forge team verify 2>&1 || true
173
173
  ```
174
174
 
175
175
  ## Example Output
@@ -184,9 +184,10 @@ bash scripts/forge-team/index.sh verify 2>&1 || true
184
184
  - Beads linked: forge-xyz
185
185
  - Implementation details in collapsible section
186
186
 
187
- ⏸️ PR created, awaiting automated checks (Greptile, SonarCloud, GitHub Actions)
187
+ ⏸️ PR created, checks started (Greptile, SonarCloud, GitHub Actions)
188
+ Poll for up to 60 seconds. If checks are still pending, stop here.
188
189
 
189
- Next: /review <pr-number> (after automated checks complete)
190
+ Next: /review <pr-number> (when automated checks complete or new feedback appears)
190
191
  ```
191
192
 
192
193
  ## Integration with Workflow
@@ -208,5 +209,5 @@ Stage 7: /verify → Post-merge CI check on main
208
209
  - **Fill every section**: Even if "N/A" — empty/missing sections cause review friction
209
210
  - **Include "Closes beads-xxx"**: Required for auto-close in /verify
210
211
  - **Concrete data only**: Test counts, file paths, commit SHAs — not placeholder text
211
- - **Wait for checks**: Let GitHub Actions, Greptile, SonarCloud run
212
+ - **Poll briefly, then stop**: Check PR status for up to 60 seconds, then hand off if checks are still pending
212
213
  - **NO auto-merge**: Always wait for /review phase
@@ -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).
@@ -95,7 +95,7 @@ git commit -m "docs: update documentation for <feature-name>
95
95
  git push
96
96
  ```
97
97
 
98
- ⚠️ **After pushing**: CI will re-trigger (Greptile, SonarCloud, etc.). Wait for checks to pass. If new Greptile comments appear on the doc changes, run `/review <pr-number>` again.
98
+ ⚠️ **After pushing**: CI will re-trigger (Greptile, SonarCloud, etc.). Poll for up to 60 seconds. If checks are still pending after that, stop and ask the user to return to `/premerge <pr-number>` later. If new Greptile comments appear on the doc changes, run `/review <pr-number>` again.
99
99
 
100
100
  ### Step 4: Sync Beads
101
101
 
@@ -154,7 +154,7 @@ Do NOT suggest merging.
154
154
  - README.md: Features list updated
155
155
  - CLAUDE.md: USER section updated with new pattern
156
156
  - Committed: docs: update documentation for auth-refresh
157
- ✓ CI re-triggered after doc push — all checks still passing
157
+ ✓ CI re-triggered after doc push — checks passed within the 60 second poll window
158
158
  ✓ Beads synced
159
159
 
160
160
  ✅ PR #89 is ready to merge
@@ -299,10 +299,13 @@ git push
299
299
  ### Step 9: Verify ALL Checks Pass
300
300
 
301
301
  ```bash
302
- # Wait for checks to complete
302
+ # Check status immediately, then poll for at most 60 seconds
303
303
  gh pr checks <pr-number>
304
304
 
305
- # Ensure all status checks are green:
305
+ # If checks are still pending after 60 seconds: STOP and tell the user to return
306
+ # when CI finishes or new review feedback appears.
307
+ #
308
+ # Ensure all completed status checks are green:
306
309
  # ✓ GitHub Actions workflows
307
310
  # ✓ Greptile review (no unresolved critical comments)
308
311
  # ✓ SonarCloud quality gate
@@ -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
@@ -185,9 +185,10 @@ bash scripts/forge-team/index.sh verify 2>&1 || true
185
185
  - Beads linked: forge-xyz
186
186
  - Implementation details in collapsible section
187
187
 
188
- ⏸️ PR created, awaiting automated checks (Greptile, SonarCloud, GitHub Actions)
188
+ ⏸️ PR created, checks started (Greptile, SonarCloud, GitHub Actions)
189
+ Poll for up to 60 seconds. If checks are still pending, stop here.
189
190
 
190
- Next: /review <pr-number> (after automated checks complete)
191
+ Next: /review <pr-number> (when automated checks complete or new feedback appears)
191
192
  ```
192
193
 
193
194
  ## Integration with Workflow
@@ -209,5 +210,5 @@ Stage 7: /verify → Post-merge CI check on main
209
210
  - **Fill every section**: Even if "N/A" — empty/missing sections cause review friction
210
211
  - **Include "Closes beads-xxx"**: Required for auto-close in /verify
211
212
  - **Concrete data only**: Test counts, file paths, commit SHAs — not placeholder text
212
- - **Wait for checks**: Let GitHub Actions, Greptile, SonarCloud run
213
+ - **Poll briefly, then stop**: Check PR status for up to 60 seconds, then hand off if checks are still pending
213
214
  - **NO auto-merge**: Always wait for /review phase
@@ -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
@@ -232,15 +232,15 @@ This project uses **bd (beads)** for issue tracking. Run `bd prime` to see full
232
232
  ### Quick Reference
233
233
 
234
234
  ```bash
235
- bd ready # Find available work
236
- bd show <id> # View issue details
237
- bd update <id> --claim # Claim work
238
- bd close <id> # Complete work
235
+ forge ready # Find available work
236
+ forge show <id> # View issue details
237
+ forge claim <id> # Claim work
238
+ forge close <id> # Complete work
239
239
  ```
240
240
 
241
241
  ### Rules
242
242
 
243
- - Use `bd` for ALL task tracking — do NOT use TodoWrite, TaskCreate, or markdown TODO lists. Exception: `/plan` Phase 3 generates task lists at `docs/plans/YYYY-MM-DD-<slug>-tasks.md` — these are approved artifacts consumed by `/dev`, but `bd` remains the source of truth for issue state. GitHub issues may be used for external/public tracking; CI may sync GitHub issue lifecycle to Beads (see `docs/BEADS_GITHUB_SYNC.md`).
243
+ - Use `forge` as the routine command surface for bd-backed issue tracking and sync workflows — do NOT use TodoWrite, TaskCreate, or markdown TODO lists. Exception: `/plan` Phase 3 generates task lists at `docs/plans/YYYY-MM-DD-<slug>-tasks.md` — these are approved artifacts consumed by `/dev`, but Beads (`bd`) remains the source of truth for issue state and IDs. Use `bd` directly only for operations Forge does not wrap yet, such as `bd init`, `bd comments`, `bd dep`, and `bd dolt *`. GitHub issues may be used for external/public tracking; CI may sync GitHub issue lifecycle to Beads (see `docs/BEADS_GITHUB_SYNC.md`).
244
244
  - Run `bd prime` for detailed command reference and session close protocol
245
245
  - Use `bd remember` for persistent knowledge — do NOT use MEMORY.md files
246
246
 
@@ -255,10 +255,10 @@ bd close <id> # Complete work
255
255
  3. **Update issue status** - Close finished work, update in-progress items
256
256
  4. **PUSH TO REMOTE** - This is MANDATORY:
257
257
  ```bash
258
- git pull --rebase
259
- bd dolt push # requires Dolt-backed Beads run 'bd init' if missing
260
- git push
261
- git status # MUST show "up to date with origin"
258
+ git pull --rebase
259
+ forge sync # wraps the supported Beads sync flow when Beads is configured
260
+ git push
261
+ git status # MUST show "up to date with origin"
262
262
  ```
263
263
  5. **Clean up** - Clear stashes, prune remote branches
264
264
  6. **Verify** - All changes committed AND pushed
@@ -269,4 +269,5 @@ bd 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 -->