forge-workflow 0.0.2 → 0.0.4

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 (175) hide show
  1. package/.claude/commands/dev.md +26 -0
  2. package/.claude/commands/plan.md +141 -9
  3. package/.claude/commands/premerge.md +0 -3
  4. package/.claude/commands/rollback.md +4 -4
  5. package/.claude/commands/ship.md +71 -41
  6. package/.claude/commands/status.md +9 -38
  7. package/.claude/commands/validate.md +47 -2
  8. package/.cline/workflows/dev.md +337 -0
  9. package/.cline/workflows/plan.md +518 -0
  10. package/.cline/workflows/premerge.md +173 -0
  11. package/.cline/workflows/research.md +39 -0
  12. package/.cline/workflows/review.md +439 -0
  13. package/.cline/workflows/rollback.md +718 -0
  14. package/.cline/workflows/ship.md +161 -0
  15. package/.cline/workflows/sonarcloud.md +146 -0
  16. package/.cline/workflows/status.md +45 -0
  17. package/.cline/workflows/validate.md +279 -0
  18. package/.cline/workflows/verify.md +218 -0
  19. package/.codex/config.toml +11 -0
  20. package/.codex/skills/dev/SKILL.md +340 -0
  21. package/.codex/skills/plan/SKILL.md +521 -0
  22. package/.codex/skills/premerge/SKILL.md +176 -0
  23. package/.codex/skills/research/SKILL.md +42 -0
  24. package/.codex/skills/review/SKILL.md +442 -0
  25. package/.codex/skills/rollback/SKILL.md +721 -0
  26. package/.codex/skills/ship/SKILL.md +164 -0
  27. package/.codex/skills/sonarcloud/SKILL.md +149 -0
  28. package/.codex/skills/status/SKILL.md +48 -0
  29. package/.codex/skills/validate/SKILL.md +282 -0
  30. package/.codex/skills/verify/SKILL.md +221 -0
  31. package/.cursor/commands/dev.md +337 -0
  32. package/.cursor/commands/plan.md +518 -0
  33. package/.cursor/commands/premerge.md +173 -0
  34. package/.cursor/commands/research.md +39 -0
  35. package/.cursor/commands/review.md +439 -0
  36. package/.cursor/commands/rollback.md +718 -0
  37. package/.cursor/commands/ship.md +161 -0
  38. package/.cursor/commands/sonarcloud.md +146 -0
  39. package/.cursor/commands/status.md +45 -0
  40. package/.cursor/commands/validate.md +279 -0
  41. package/.cursor/commands/verify.md +218 -0
  42. package/.cursor/hooks/state/continual-learning-index.json +19 -0
  43. package/.cursor/hooks/state/continual-learning.json +8 -0
  44. package/.cursor/rules/permissions-guidance.mdc +37 -0
  45. package/.github/prompts/dev.prompt.md +342 -0
  46. package/.github/prompts/plan.prompt.md +523 -0
  47. package/.github/prompts/premerge.prompt.md +178 -0
  48. package/.github/prompts/research.prompt.md +44 -0
  49. package/.github/prompts/review.prompt.md +444 -0
  50. package/.github/prompts/rollback.prompt.md +723 -0
  51. package/.github/prompts/ship.prompt.md +166 -0
  52. package/.github/prompts/sonarcloud.prompt.md +151 -0
  53. package/.github/prompts/status.prompt.md +50 -0
  54. package/.github/prompts/validate.prompt.md +284 -0
  55. package/.github/prompts/verify.prompt.md +223 -0
  56. package/.kilocode/workflows/dev.md +341 -0
  57. package/.kilocode/workflows/plan.md +522 -0
  58. package/.kilocode/workflows/premerge.md +177 -0
  59. package/.kilocode/workflows/research.md +43 -0
  60. package/.kilocode/workflows/review.md +443 -0
  61. package/.kilocode/workflows/rollback.md +722 -0
  62. package/.kilocode/workflows/ship.md +165 -0
  63. package/.kilocode/workflows/sonarcloud.md +150 -0
  64. package/.kilocode/workflows/status.md +49 -0
  65. package/.kilocode/workflows/validate.md +283 -0
  66. package/.kilocode/workflows/verify.md +222 -0
  67. package/.opencode/commands/dev.md +340 -0
  68. package/.opencode/commands/plan.md +521 -0
  69. package/.opencode/commands/premerge.md +176 -0
  70. package/.opencode/commands/research.md +42 -0
  71. package/.opencode/commands/review.md +442 -0
  72. package/.opencode/commands/rollback.md +721 -0
  73. package/.opencode/commands/ship.md +164 -0
  74. package/.opencode/commands/sonarcloud.md +149 -0
  75. package/.opencode/commands/status.md +48 -0
  76. package/.opencode/commands/validate.md +282 -0
  77. package/.opencode/commands/verify.md +221 -0
  78. package/.roo/commands/dev.md +341 -0
  79. package/.roo/commands/plan.md +522 -0
  80. package/.roo/commands/premerge.md +177 -0
  81. package/.roo/commands/research.md +43 -0
  82. package/.roo/commands/review.md +443 -0
  83. package/.roo/commands/rollback.md +722 -0
  84. package/.roo/commands/ship.md +165 -0
  85. package/.roo/commands/sonarcloud.md +150 -0
  86. package/.roo/commands/status.md +49 -0
  87. package/.roo/commands/validate.md +283 -0
  88. package/.roo/commands/verify.md +222 -0
  89. package/AGENTS.md +7 -1
  90. package/CLAUDE.md +5 -4
  91. package/README.md +21 -19
  92. package/bin/{forge-validate.js → forge-preflight.js} +21 -15
  93. package/bin/forge.js +209 -138
  94. package/docs/AGENT_INSTALL_PROMPT.md +1 -1
  95. package/docs/BEADS_GITHUB_SYNC.md +251 -0
  96. package/docs/ENHANCED_ONBOARDING.md +8 -8
  97. package/docs/EXAMPLES.md +4 -4
  98. package/docs/GREPTILE_SETUP.md +1 -1
  99. package/docs/MANUAL_REVIEW_GUIDE.md +1 -1
  100. package/docs/ROADMAP.md +6 -6
  101. package/docs/SETUP.md +1 -2
  102. package/docs/TOOLCHAIN.md +15 -234
  103. package/docs/VALIDATION.md +11 -11
  104. package/install.sh +33 -39
  105. package/lib/agents-config.js +3 -3
  106. package/lib/commands/plan.js +11 -15
  107. package/lib/commands/recommend.js +2 -2
  108. package/lib/dep-guard/analyzer.js +294 -0
  109. package/lib/dep-guard/behavior-detector.js +98 -0
  110. package/lib/dep-guard/contract-detector.js +162 -0
  111. package/lib/dep-guard/import-detector.js +498 -0
  112. package/lib/dep-guard/path-utils.js +13 -0
  113. package/lib/dep-guard/rubric.js +120 -0
  114. package/lib/dep-guard/task-parser.js +318 -0
  115. package/lib/detect-agent.js +191 -0
  116. package/lib/detect-worktree.js +47 -0
  117. package/lib/file-hash.js +26 -0
  118. package/lib/plugin-catalog.js +18 -28
  119. package/lib/setup-action-log.js +139 -0
  120. package/lib/setup-summary-renderer.js +106 -0
  121. package/lib/setup.js +75 -1
  122. package/lib/workflow-profiles.js +5 -11
  123. package/package.json +17 -7
  124. package/skills/parallel-deep-research/SKILL.md +108 -0
  125. package/skills/parallel-deep-research/evals/README.md +27 -0
  126. package/skills/parallel-deep-research/evals/evals.json +62 -0
  127. package/skills/sonarcloud-analysis/SKILL.md +171 -0
  128. package/skills/sonarcloud-analysis/evals/README.md +27 -0
  129. package/skills/sonarcloud-analysis/evals/evals.json +50 -0
  130. package/skills/sonarcloud-analysis/references/api-reference.md +466 -0
  131. package/docs/WORKFLOW.md +0 -400
  132. package/docs/planning/PROGRESS.md +0 -396
  133. package/docs/plans/.gitkeep +0 -0
  134. package/docs/plans/2026-02-27-forge-test-suite-v2-decisions.md +0 -21
  135. package/docs/plans/2026-02-27-forge-test-suite-v2-design.md +0 -362
  136. package/docs/plans/2026-02-27-forge-test-suite-v2-tasks.md +0 -343
  137. package/docs/plans/2026-03-02-superpowers-gaps-decisions.md +0 -26
  138. package/docs/plans/2026-03-02-superpowers-gaps-design.md +0 -239
  139. package/docs/plans/2026-03-02-superpowers-gaps-tasks.md +0 -260
  140. package/docs/plans/2026-03-04-agent-command-parity-design.md +0 -163
  141. package/docs/plans/2026-03-04-verify-worktree-cleanup-decisions.md +0 -7
  142. package/docs/plans/2026-03-04-verify-worktree-cleanup-design.md +0 -165
  143. package/docs/plans/2026-03-05-forge-uto-decisions.md +0 -6
  144. package/docs/plans/2026-03-05-forge-uto-design.md +0 -116
  145. package/docs/plans/2026-03-05-forge-uto-tasks.md +0 -244
  146. package/docs/plans/2026-03-10-command-creator-and-eval-decisions.md +0 -52
  147. package/docs/plans/2026-03-10-command-creator-and-eval-design.md +0 -350
  148. package/docs/plans/2026-03-10-command-creator-and-eval-tasks.md +0 -426
  149. package/docs/plans/2026-03-10-stale-workflow-refs-decisions.md +0 -8
  150. package/docs/plans/2026-03-10-stale-workflow-refs-design.md +0 -80
  151. package/docs/plans/2026-03-10-stale-workflow-refs-tasks.md +0 -90
  152. package/docs/plans/2026-03-14-beads-plan-context-decisions.md +0 -9
  153. package/docs/plans/2026-03-14-beads-plan-context-design.md +0 -171
  154. package/docs/plans/2026-03-14-beads-plan-context-tasks.md +0 -160
  155. package/docs/plans/2026-03-14-skill-eval-loop-decisions.md +0 -33
  156. package/docs/plans/2026-03-14-skill-eval-loop-design.md +0 -118
  157. package/docs/plans/2026-03-14-skill-eval-loop-results.md +0 -78
  158. package/docs/plans/2026-03-14-skill-eval-loop-tasks.md +0 -160
  159. package/docs/plans/2026-03-15-agent-command-parity-v2-decisions.md +0 -11
  160. package/docs/plans/2026-03-15-agent-command-parity-v2-design.md +0 -145
  161. package/docs/plans/2026-03-15-agent-command-parity-v2-tasks.md +0 -211
  162. package/docs/research/TEMPLATE.md +0 -292
  163. package/docs/research/advanced-testing.md +0 -297
  164. package/docs/research/agent-permissions.md +0 -167
  165. package/docs/research/dependency-chain.md +0 -328
  166. package/docs/research/forge-workflow-v2.md +0 -550
  167. package/docs/research/plugin-architecture.md +0 -772
  168. package/docs/research/pr4-cli-automation.md +0 -326
  169. package/docs/research/premerge-verify-restructure.md +0 -205
  170. package/docs/research/skills-restructure.md +0 -508
  171. package/docs/research/sonarcloud-perfection-plan.md +0 -166
  172. package/docs/research/sonarcloud-quality-gate.md +0 -184
  173. package/docs/research/superpowers-integration.md +0 -403
  174. package/docs/research/superpowers.md +0 -319
  175. package/docs/research/test-environment.md +0 -519
@@ -0,0 +1,43 @@
1
+ ---
2
+ description: Deep research with parallel-deep-research, document findings
3
+ mode: code
4
+ ---
5
+
6
+ > **Note**: `/research` is now Phase 2 of `/plan`.
7
+ >
8
+ > The research phase has been absorbed into the `/plan` command, which runs a full 3-phase workflow:
9
+ > - **Phase 1**: Brainstorming — design intent, constraints, success criteria
10
+ > - **Phase 2**: Technical research — web search, OWASP, codebase exploration, TDD scenarios
11
+ > - **Phase 3**: Setup — branch, worktree, Beads issue, task list
12
+ >
13
+ > Run `/plan <feature-slug>` to start the complete planning workflow.
14
+
15
+ # Research (Legacy Alias)
16
+
17
+ This command previously ran a standalone research phase. It is now embedded in `/plan` as Phase 2.
18
+
19
+ ## If you want to run just the research phase
20
+
21
+ Jump to Phase 2 of `/plan` manually:
22
+
23
+ 1. Read or create the design doc at `docs/plans/YYYY-MM-DD-<slug>-design.md`
24
+ 2. Run parallel web search using the `parallel-deep-research` skill
25
+ 3. Run OWASP Top 10 analysis for the feature
26
+ 4. Use the Explore agent for codebase exploration
27
+ 5. Identify at least 3 TDD test scenarios
28
+ 6. Append findings under `## Technical Research` in the design doc
29
+
30
+ Then continue with `/plan <slug> --continue` to run Phase 3 (setup + task list).
31
+
32
+ ## Integration with Workflow
33
+
34
+ ```
35
+ Utility: /status → Understand current context before starting
36
+ Stage 1: /plan → Design intent → research → branch + worktree + task list
37
+ Stage 2: /dev → Implement each task with subagent-driven TDD
38
+ Stage 3: /validate → Type check, lint, tests, security — all fresh output
39
+ Stage 4: /ship → Push + create PR
40
+ Stage 5: /review → Address GitHub Actions, Greptile, SonarCloud
41
+ Stage 6: /premerge → Update docs, hand off PR to user
42
+ Stage 7: /verify → Post-merge CI check on main
43
+ ```
@@ -0,0 +1,443 @@
1
+ ---
2
+ description: Address ALL PR issues (GitHub Actions, Greptile, SonarCloud, CI/CD)
3
+ mode: code
4
+ ---
5
+
6
+ Process ALL pull request issues including GitHub Actions failures, Greptile inline comments, SonarCloud analysis, and other CI/CD checks.
7
+
8
+ # Review
9
+
10
+ This command handles ALL issues that arise after creating a pull request.
11
+
12
+ ## Usage
13
+
14
+ ```bash
15
+ /review <pr-number>
16
+ ```
17
+
18
+ ## What This Command Does
19
+
20
+ ### Step 1: Fetch Complete PR Status
21
+ ```bash
22
+ # Get full PR details including all checks
23
+ gh pr view <pr-number> --json number,url,isDraft,reviews,statusCheckRollup,comments
24
+
25
+ # Check individual status checks
26
+ gh pr checks <pr-number>
27
+ ```
28
+
29
+ Review ALL status checks:
30
+ - GitHub Actions workflows
31
+ - Greptile code review (inline comments + summary)
32
+ - SonarCloud quality gate
33
+ - Any other CI/CD integrations
34
+ - Vercel deployments
35
+ - Security scanners
36
+
37
+ ### Step 2: Address GitHub Actions Failures
38
+
39
+ If any GitHub Actions workflows fail:
40
+
41
+ ```bash
42
+ # View failed workflow logs
43
+ gh run view <run-id> --log-failed
44
+
45
+ # Identify failure cause:
46
+ # - Build failures
47
+ # - Test failures
48
+ # - Lint/type check failures
49
+ # - Deployment failures
50
+ # - Security scan failures
51
+ ```
52
+
53
+ **For each failure**:
54
+ 1. **Analyze the error**: Read logs to understand root cause
55
+ 2. **Fix the issue**: Make necessary code changes
56
+ 3. **Re-run checks**: GitHub Actions will auto-rerun on push
57
+ 4. **Document fix**: Note what was fixed in commit message
58
+
59
+ **Common GitHub Actions Issues**:
60
+ - Build failures: Missing dependencies, compilation errors
61
+ - Test failures: Failing test cases (should not happen if /validate passed)
62
+ - Lint failures: Code style violations
63
+ - Type failures: TypeScript type errors
64
+ - Deployment failures: Env vars, configuration issues
65
+
66
+ ### Step 3: Process Greptile Review
67
+
68
+ Greptile provides TWO types of feedback:
69
+ 1. **Inline comments** on specific code lines
70
+ 2. **Summary** with overall recommendations
71
+
72
+ **IMPORTANT**: Use the **systematic Greptile resolution process** documented in `.claude/rules/greptile-review-process.md`. This process has been standardized to ensure:
73
+ - All threads are replied to directly (not as separate PR comments)
74
+ - All threads are marked as resolved after fixing
75
+ - No manual tracking overhead for maintainers
76
+
77
+ #### 3A. Check Greptile Inline Comments (Use Systematic Process)
78
+
79
+ **Step 1: List all unresolved threads**
80
+ ```bash
81
+ bash .claude/scripts/greptile-resolve.sh list <pr-number> --unresolved
82
+ ```
83
+
84
+ This shows:
85
+ - Thread ID (for resolving)
86
+ - Comment ID (for replying)
87
+ - File path and line number
88
+ - Issue description
89
+
90
+ **Step 2: For EACH unresolved thread:**
91
+
92
+ 1. **Understand the issue**
93
+ - Read the comment carefully
94
+ - Check the file and line number
95
+
96
+ 2. **Categorize the comment**:
97
+ - **Valid**: Should be implemented (security issue, bug, clear improvement)
98
+ - **Invalid**: Greptile misunderstood context
99
+ - **Conflicting**: Contradicts research decisions with good reason
100
+ - **Out of scope**: Valid but not for this PR
101
+
102
+ 3. **Fix the issue** (if valid)
103
+ - Make code changes
104
+ - Commit with clear message
105
+
106
+ 4. **Reply and resolve** (for ALL comments, even invalid ones)
107
+ ```bash
108
+ # For valid issues (fixed):
109
+ bash .claude/scripts/greptile-resolve.sh reply-and-resolve <pr-number> <comment-id> <thread-id> \
110
+ "✅ Fixed: [description]
111
+
112
+ Changed: [what was changed]
113
+ Reason: [why this fixes the issue]
114
+ Commit: [commit-sha]"
115
+
116
+ # For invalid/conflicting issues:
117
+ bash .claude/scripts/greptile-resolve.sh reply-and-resolve <pr-number> <comment-id> <thread-id> \
118
+ "This approach is correct because:
119
+ - Reasoning: [from design doc]
120
+ - Evidence: [link to source]
121
+ - Alternative considered: [what Greptile suggested]
122
+ - Why rejected: [specific reason]
123
+
124
+ See: docs/plans/YYYY-MM-DD-<slug>-design.md (Decision #X)"
125
+ ```
126
+
127
+ **Step 3: Verify all resolved**
128
+ ```bash
129
+ bash .claude/scripts/greptile-resolve.sh stats <pr-number>
130
+ ```
131
+ Should show: "✓ All Greptile threads resolved!"
132
+
133
+ **See complete process**: `.claude/rules/greptile-review-process.md`
134
+
135
+ #### 3B. Check Greptile Summary
136
+ ```bash
137
+ # Greptile usually posts a summary comment on the PR
138
+ # Review the overall assessment and recommendations
139
+ ```
140
+
141
+ The summary typically includes:
142
+ - Overall code quality assessment
143
+ - Key issues to address
144
+ - Security concerns
145
+ - Performance considerations
146
+ - Best practice violations
147
+
148
+ ### Step 4: Analyze SonarCloud (via sonarcloud skill)
149
+
150
+ ```bash
151
+ # Use sonarcloud skill to query PR-specific issues
152
+ /sonarcloud
153
+ ```
154
+
155
+ **What SonarCloud does**: Static code analysis for quality, security, and maintainability
156
+
157
+ **How it helps**:
158
+ - Identifies code smells and technical debt
159
+ - Finds security vulnerabilities (complementing OWASP Top 10)
160
+ - Calculates code coverage
161
+ - Tracks code duplication
162
+ - Assesses maintainability
163
+
164
+ **Query PR-specific data**:
165
+ - Quality gate status (pass/fail)
166
+ - New issues introduced in this PR
167
+ - Security hotspots
168
+ - Code coverage changes
169
+ - Technical debt added
170
+
171
+ **Prioritize issues**:
172
+ 1. **Blocker/Critical**: Must fix before merge
173
+ 2. **Major**: Should fix if valid
174
+ 3. **Minor/Info**: Optional improvements
175
+
176
+ ### Step 5: Check Other CI/CD Tools
177
+
178
+ Review any other automated checks:
179
+ - **Vercel**: Preview deployment successful?
180
+ - **Security scanners**: Any vulnerabilities detected?
181
+ - **Custom scripts**: Any failures?
182
+ - **Dependency checks**: Outdated or vulnerable packages?
183
+
184
+ ### Step 6: Categorize and Prioritize ALL Issues
185
+
186
+ Create a master list of all issues from:
187
+ - GitHub Actions failures
188
+ - Greptile inline comments
189
+ - Greptile summary recommendations
190
+ - SonarCloud issues
191
+ - Other CI/CD tool failures
192
+
193
+ Prioritize by:
194
+ 1. **Critical**: Blocks merge (failing tests, security vulnerabilities, build failures)
195
+ 2. **High**: Should address (valid bugs, important improvements)
196
+ 3. **Medium**: Optional but valuable (code quality, best practices)
197
+ 4. **Low**: Nice to have (minor refactorings, style suggestions)
198
+
199
+ ### Step 7: Address Issues Systematically
200
+
201
+ For **GitHub Actions failures** (Critical):
202
+ ```bash
203
+ # Fix the issue
204
+ # Commit with clear description
205
+ git add .
206
+ git commit -m "fix: resolve GitHub Actions failure in <workflow-name>
207
+
208
+ - Fixed: [specific issue]
209
+ - Root cause: [explanation]
210
+ - Solution: [what was changed]"
211
+
212
+ git push
213
+ # Actions will auto-rerun
214
+ ```
215
+
216
+ For **Greptile inline comments** (Use Systematic Script):
217
+ ```bash
218
+ # Use the standardized Greptile resolution script
219
+ # See .claude/rules/greptile-review-process.md for complete process
220
+
221
+ # For valid comments (fixed):
222
+ bash .claude/scripts/greptile-resolve.sh reply-and-resolve <pr-number> <comment-id> <thread-id> \
223
+ "✅ Fixed: [description]
224
+
225
+ Changed: [what was changed]
226
+ Reason: [why this fixes the issue]
227
+ Commit: [commit-sha]"
228
+
229
+ # For invalid/conflicting comments:
230
+ bash .claude/scripts/greptile-resolve.sh reply-and-resolve <pr-number> <comment-id> <thread-id> \
231
+ "This approach is correct because:
232
+ - Reasoning: [from design doc]
233
+ - Evidence: [link to source]
234
+ - Alternative considered: [what Greptile suggested]
235
+ - Why rejected: [specific reason]
236
+
237
+ See: docs/plans/YYYY-MM-DD-<slug>-design.md (Decision #X)"
238
+
239
+ # Verify all threads resolved:
240
+ bash .claude/scripts/greptile-resolve.sh stats <pr-number>
241
+ ```
242
+
243
+ For **Greptile summary recommendations**:
244
+ ```bash
245
+ # Add a PR comment addressing the summary
246
+ gh pr comment <pr-number> --body "## Greptile Summary Response
247
+
248
+ Addressed all key recommendations:
249
+ - [Recommendation 1]: ✓ Fixed in commit <sha>
250
+ - [Recommendation 2]: ✓ Explained (see inline response)
251
+ - [Recommendation 3]: ⏭️ Out of scope for this PR (created issue bd-xxx)
252
+
253
+ All critical and high-priority items resolved."
254
+ ```
255
+
256
+ For **SonarCloud issues** (via sonarcloud skill):
257
+ ```bash
258
+ # For critical/blocker issues: Fix immediately
259
+ # For security vulnerabilities: Fix immediately
260
+ # For code smells: Fix if valid, justify if not
261
+
262
+ # After fixes, SonarCloud will re-analyze on next push
263
+ ```
264
+
265
+ For **other CI/CD failures**:
266
+ ```bash
267
+ # Debug the specific tool's logs
268
+ # Fix the underlying issue
269
+ # Commit and push
270
+ # Verify the check passes
271
+ ```
272
+
273
+ ### Step 8: Commit ALL Fixes
274
+
275
+ ```bash
276
+ git add .
277
+ git commit -m "fix: address ALL PR review feedback
278
+
279
+ GitHub Actions:
280
+ - Fixed: [list of workflow failures resolved]
281
+
282
+ Greptile:
283
+ - Fixed: [list of valid inline comments addressed]
284
+ - Explained: [list of invalid comments with reasoning]
285
+ - Summary: [key recommendations addressed]
286
+
287
+ SonarCloud:
288
+ - Fixed: [security vulnerabilities and critical issues]
289
+ - Justified: [code smells that are intentional]
290
+
291
+ Other CI/CD:
292
+ - Fixed: [any other tool failures]
293
+
294
+ All review feedback resolved, all checks passing."
295
+
296
+ git push
297
+ ```
298
+
299
+ ### Step 9: Verify ALL Checks Pass
300
+
301
+ ```bash
302
+ # Wait for checks to complete
303
+ gh pr checks <pr-number>
304
+
305
+ # Ensure all status checks are green:
306
+ # ✓ GitHub Actions workflows
307
+ # ✓ Greptile review (no unresolved critical comments)
308
+ # ✓ SonarCloud quality gate
309
+ # ✓ Other CI/CD checks
310
+ ```
311
+
312
+ ### Step 10: Update Beads
313
+
314
+ ```bash
315
+ bd update <id> --comment "PR review complete: all issues addressed, all checks passing"
316
+ bd sync
317
+ ```
318
+
319
+ ## Example Output
320
+
321
+ ```
322
+ ✓ GitHub Actions: 3 workflows
323
+ - Build: ✓ Passing (was failing, fixed missing dependency)
324
+ - Tests: ✓ Passing
325
+ - Deploy Preview: ✓ Passing
326
+
327
+ ✓ Greptile Review:
328
+ Inline Comments: 8 total
329
+ - Valid: 5 → Fixed & replied inline
330
+ - Invalid: 2 → Explained with research evidence & replied inline
331
+ - Out of scope: 1 → Noted for future work & replied inline
332
+ - All marked resolved ✓
333
+
334
+ Summary:
335
+ - Key recommendations: 3/3 addressed
336
+ - Overall assessment: Ready for merge
337
+ - Posted summary response comment ✓
338
+
339
+ ✓ SonarCloud (via sonarcloud skill):
340
+ Quality Gate: ✓ Passing
341
+ Issues: 3 total
342
+ - Security: 1 → Fixed (SQL injection risk)
343
+ - Code smells: 2 → 1 fixed, 1 justified
344
+ - Coverage: Maintained at 85%
345
+
346
+ ✓ Vercel Preview: ✓ Deployed successfully
347
+ ✓ Security Scan: ✓ No vulnerabilities
348
+
349
+ ✓ All Issues Addressed:
350
+ - Critical: 2/2 fixed (GitHub Actions build, SonarCloud security)
351
+ - High: 5/5 fixed (Greptile valid comments)
352
+ - Medium: 3/3 addressed (1 fixed, 2 explained)
353
+ - Low: 0 (none found)
354
+
355
+ ✓ Fixes committed: 3c4d5e6
356
+ ✓ All checks passing: ✓
357
+ ✓ Beads updated: Ready for merge
358
+
359
+ Next: /premerge <pr-number>
360
+ ```
361
+
362
+ ```
363
+ <HARD-GATE: /review exit>
364
+ Do NOT declare /review complete until:
365
+ 1. bash .claude/scripts/greptile-resolve.sh stats <pr-number> shows "All Greptile threads resolved"
366
+ 2. ALL human reviewer comments are either resolved or have a reply with explanation
367
+ 3. gh pr checks <pr-number> shows all checks passing
368
+ 4. Stage transition: Run `bash scripts/beads-context.sh stage-transition <id> review premerge` → exit 0 confirmed
369
+ </HARD-GATE>
370
+ ```
371
+
372
+ ## Integration with Workflow
373
+
374
+ ```
375
+ Utility: /status → Understand current context before starting
376
+ Stage 1: /plan → Design intent → research → branch + worktree + task list
377
+ Stage 2: /dev → Implement each task with subagent-driven TDD
378
+ Stage 3: /validate → Type check, lint, tests, security — all fresh output
379
+ Stage 4: /ship → Push + create PR
380
+ Stage 5: /review → Address GitHub Actions, Greptile, SonarCloud (you are here)
381
+ Stage 6: /premerge → Update docs, hand off PR to user
382
+ Stage 7: /verify → Post-merge CI check on main
383
+ ```
384
+
385
+ ## Understanding the Tools
386
+
387
+ ### Greptile
388
+ - **What it is**: AI-powered code review bot
389
+ - **How it helps**:
390
+ - Context-aware code analysis
391
+ - Catches bugs and security issues
392
+ - Suggests improvements and best practices
393
+ - Provides inline comments and summary
394
+ - **How to use feedback**:
395
+ - Inline comments: Address specific code issues
396
+ - Summary: Get overall assessment and key recommendations
397
+ - Reply directly to each comment (not separate)
398
+ - Mark resolved after addressing
399
+
400
+ ### SonarCloud (via sonarcloud skill)
401
+ - **What it is**: Static code analysis platform
402
+ - **How it helps**:
403
+ - Quality gate enforcement
404
+ - Security vulnerability detection
405
+ - Code smell identification
406
+ - Technical debt tracking
407
+ - Test coverage analysis
408
+ - **How to use the skill**:
409
+ - Query PR-specific issues
410
+ - Get quality metrics
411
+ - Identify security hotspots
412
+ - Track code coverage changes
413
+ - **Prioritization**:
414
+ - Blocker/Critical: Must fix
415
+ - Major: Should fix if valid
416
+ - Minor/Info: Optional
417
+
418
+ ### GitHub Actions
419
+ - **What it is**: CI/CD automation platform
420
+ - **How it helps**:
421
+ - Automated testing
422
+ - Build verification
423
+ - Deployment automation
424
+ - Security scanning
425
+ - Quality checks
426
+ - **Common failures**:
427
+ - Build: Dependencies, compilation
428
+ - Tests: Failing test cases
429
+ - Lint: Code style violations
430
+ - Deploy: Configuration issues
431
+
432
+ ## Tips
433
+
434
+ - **Address ALL issues**: Not just Greptile and SonarCloud
435
+ - **Prioritize critical**: Fix blockers first (GitHub Actions failures, security issues)
436
+ - **Reply inline to Greptile**: Respond to each comment directly
437
+ - **Post summary response**: Address Greptile's overall assessment
438
+ - **Use sonarcloud skill**: Don't just check the web UI
439
+ - **Verify all checks**: Ensure everything is green before /premerge
440
+ - **Update Beads**: Keep issue status current
441
+ - **Research if needed**: Use WebSearch for unclear suggestions
442
+ - **Document fixes**: Clear commit messages for all fixes
443
+ - **Don't leave unresolved**: Address every comment and check