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