forgedock 1.1.1 → 1.1.3

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 (174) hide show
  1. package/README.md +53 -8
  2. package/bin/batch-runner.mjs +339 -0
  3. package/bin/demo.mjs +92 -7
  4. package/bin/engine/phases.mjs +24 -2
  5. package/bin/engine/state.mjs +8 -3
  6. package/bin/engine-cli.mjs +177 -5
  7. package/bin/forgedock.mjs +409 -26
  8. package/bin/hooks/interactive-engine.mjs +509 -0
  9. package/bin/hooks/pre-tool-use.mjs +498 -0
  10. package/bin/hooks/subagent-stop-enforce.mjs +197 -0
  11. package/bin/journey.mjs +72 -14
  12. package/bin/registry.mjs +139 -0
  13. package/bin/report.mjs +447 -0
  14. package/bin/runner.mjs +70 -20
  15. package/bin/settings-hook.mjs +235 -1
  16. package/commands/adopt.md +4 -1
  17. package/commands/analytics.md +4 -1
  18. package/commands/audit-agents.md +110 -27
  19. package/commands/audit.md +20 -1
  20. package/commands/autopilot.md +518 -361
  21. package/commands/changelog.md +2 -1
  22. package/commands/ci-audit.md +2 -1
  23. package/commands/cleanup.md +161 -1
  24. package/commands/compat-audit.md +2 -1
  25. package/commands/deploy-info.md +58 -1
  26. package/commands/deploy-pr.md +485 -0
  27. package/commands/design-bench.md +5 -1
  28. package/commands/design-render-critique-loop.md +1 -1
  29. package/commands/diagnose.md +2 -1
  30. package/commands/explain.md +2 -1
  31. package/commands/fix-ci.md +577 -0
  32. package/commands/forge-stats.md +121 -2
  33. package/commands/forgedock-init.md +1 -1
  34. package/commands/geo-audit.md +3 -0
  35. package/commands/incident-response.md +2 -1
  36. package/commands/issue.md +23 -2
  37. package/commands/milestone.md +77 -12
  38. package/commands/optimize.md +2 -1
  39. package/commands/orchestrate/config.md +67 -0
  40. package/commands/orchestrate/phase-1-resolve.md +159 -0
  41. package/commands/orchestrate/phase-2-triage.md +126 -0
  42. package/commands/orchestrate/phase-2.5-synthesis.md +156 -0
  43. package/commands/orchestrate/phase-3-dependency.md +591 -0
  44. package/commands/orchestrate/phase-4-execution.md +962 -0
  45. package/commands/orchestrate/phase-5-cleanup.md +47 -0
  46. package/commands/orchestrate/phase-6-report.md +198 -0
  47. package/commands/orchestrate/safety.md +62 -0
  48. package/commands/orchestrate.md +25 -2045
  49. package/commands/pipeline-health/config.md +34 -0
  50. package/commands/pipeline-health/phase-1-context.md +180 -0
  51. package/commands/pipeline-health/phase-2-metrics.md +1729 -0
  52. package/commands/pipeline-health/phase-3-analyze.md +204 -0
  53. package/commands/pipeline-health/phase-4-proposals.md +117 -0
  54. package/commands/pipeline-health/phase-5-report.md +284 -0
  55. package/commands/pipeline-health/phase-6-summary.md +52 -0
  56. package/commands/pipeline-health.md +25 -2401
  57. package/commands/pipeline-resume.md +24 -1
  58. package/commands/pipeline-status.md +65 -0
  59. package/commands/qa-sweep.md +4 -1
  60. package/commands/quality-gate.md +248 -10
  61. package/commands/recover-orphans.md +576 -0
  62. package/commands/replay.md +2 -1
  63. package/commands/review-pr-agents/api.md +135 -0
  64. package/commands/review-pr-agents/auth.md +137 -0
  65. package/commands/review-pr-agents/billing.md +101 -0
  66. package/commands/review-pr-agents/concurrency.md +145 -0
  67. package/commands/review-pr-agents/database.md +103 -0
  68. package/commands/review-pr-agents/frontend.md +89 -0
  69. package/commands/review-pr-agents/infra.md +385 -0
  70. package/commands/review-pr-agents/protocols.md +185 -0
  71. package/commands/review-pr-agents/scraper.md +185 -0
  72. package/commands/review-pr-agents/security.md +406 -0
  73. package/commands/review-pr-agents.md +45 -1722
  74. package/commands/review-pr-staging.md +196 -40
  75. package/commands/review-pr.md +591 -52
  76. package/commands/rollback.md +2 -1
  77. package/commands/scope.md +2 -1
  78. package/commands/security-audit.md +2 -1
  79. package/commands/signal-planner.md +623 -0
  80. package/commands/sync-ecosystem.md +1 -0
  81. package/commands/test-gate.md +17 -1
  82. package/commands/validate.md +2 -1
  83. package/commands/work-on/build/architect.md +28 -0
  84. package/commands/work-on/build/context.md +2 -0
  85. package/commands/work-on/build/implement.md +3 -1
  86. package/commands/work-on/build/validate.md +26 -7
  87. package/commands/work-on/build.md +163 -24
  88. package/commands/work-on/close.md +130 -3
  89. package/commands/work-on/decompose.md +19 -1
  90. package/commands/work-on/investigate.md +117 -2
  91. package/commands/work-on/review.md +24 -4
  92. package/commands/work-on-monolithic.md +7 -2
  93. package/commands/work-on.md +202 -4
  94. package/docs/BRAND.md +14 -7
  95. package/docs/CI.md +16 -2
  96. package/docs/CODEX.md +36 -1
  97. package/docs/CONFIG.md +5 -8
  98. package/docs/FORGE-PROTOCOL.md +15 -1064
  99. package/docs/anthropic-devrel-outreach.md +2 -2
  100. package/docs/articles/command-decomposition-token-savings.md +214 -0
  101. package/docs/articles/model-release-playbook.md +131 -0
  102. package/docs/articles/per-repo-adaptive-scripts-token-savings.md +27 -25
  103. package/docs/claude-breakpoints.json +75 -5
  104. package/docs/design/abc-benchmark.md +1 -1
  105. package/docs/design/design-spec-schema.md +1 -1
  106. package/docs/design/divergent-generation.md +1 -1
  107. package/docs/design/eval-gate-runbook.md +178 -0
  108. package/docs/design/show-hn-draft.md +26 -1
  109. package/docs/design/token-cost-baseline-1298.md +59 -0
  110. package/docs/eval/README.md +120 -0
  111. package/docs/eval/corpus/seed-v1.json +6 -0
  112. package/docs/eval/published/claude-sonnet-4-6-2026-07-04.json +33 -0
  113. package/docs/site/annotations-explained.md +24 -0
  114. package/docs/site/command-learning-path.md +51 -14
  115. package/docs/site/command-reference.md +386 -111
  116. package/docs/site/for-companies.md +95 -0
  117. package/docs/site/forge-annotation-protocol.md +12 -256
  118. package/docs/site/getting-started.md +43 -4
  119. package/docs/site/github-is-the-memory.md +113 -0
  120. package/docs/site/how-it-works.md +3 -13
  121. package/docs/site/index.md +9 -1
  122. package/docs/spec/eval-run-result.md +147 -0
  123. package/docs/spec/forge-protocol-v1.md +441 -18
  124. package/docs/spec/label-state-machine.md +55 -0
  125. package/docs/spec/review-protocol.md +158 -0
  126. package/docs/spec-graph-schema.md +28 -0
  127. package/docs/superpowers/specs/2026-07-04-economic-self-governance-design.md +181 -0
  128. package/docs/superpowers/specs/2026-07-04-provenance-trail-design.md +189 -0
  129. package/examples/forgedock-demo/README.md +41 -22
  130. package/examples/forgedock-demo/issues/06-bug-tags-type-validation.md +43 -0
  131. package/examples/forgedock-demo/issues/07-bug-negative-offset-pagination.md +42 -0
  132. package/examples/forgedock-demo/issues/08-bug-patch-mass-assignment.md +49 -0
  133. package/examples/forgedock-demo/issues/09-bug-count-injection.md +47 -0
  134. package/examples/forgedock-demo/issues/10-feature-sort-param.md +39 -0
  135. package/examples/forgedock-demo/issues/11-feature-patch-tags.md +37 -0
  136. package/examples/forgedock-demo/issues/12-feature-bulk-create.md +42 -0
  137. package/examples/forgedock-demo/issues/13-feature-archive-notes.md +46 -0
  138. package/examples/forgedock-demo/issues/14-refactor-extract-title-validation.md +41 -0
  139. package/examples/forgedock-demo/issues/15-refactor-protected-route-flag.md +43 -0
  140. package/examples/forgedock-demo/issues/16-refactor-extract-store.md +45 -0
  141. package/examples/forgedock-demo/issues/17-perf-tags-dedup-set.md +35 -0
  142. package/examples/forgedock-demo/issues/18-perf-remove-redundant-sort.md +37 -0
  143. package/examples/forgedock-demo/issues/19-docs-api-reference-full.md +53 -0
  144. package/examples/forgedock-demo/issues/20-docs-intentional-flaw-convention.md +46 -0
  145. package/examples/forgedock-demo/scripts/smoke.js +18 -1
  146. package/examples/forgedock-demo/src/db.js +36 -11
  147. package/examples/forgedock-demo/src/routes/notes.js +106 -9
  148. package/examples/forgedock-demo/src/server.js +4 -1
  149. package/package.json +3 -1
  150. package/packages/protocol/LICENSE +21 -0
  151. package/packages/protocol/src/cli.js +135 -0
  152. package/packages/protocol/src/emit.js +146 -0
  153. package/packages/protocol/src/index.js +43 -0
  154. package/packages/protocol/src/parse.js +254 -0
  155. package/packages/protocol/src/types.js +171 -0
  156. package/packages/protocol/src/validate.js +122 -0
  157. package/scripts/bench-topology-cost.mjs +372 -0
  158. package/scripts/check-command-docs-drift.sh +198 -0
  159. package/scripts/check-protocol-restatements.sh +176 -0
  160. package/scripts/check-registry/README.md +72 -0
  161. package/scripts/check-registry/manifest.json +6 -0
  162. package/scripts/code-index.sh +454 -0
  163. package/scripts/conformance-check.mjs +168 -0
  164. package/scripts/doctor-pipeline-state.sh +484 -0
  165. package/scripts/eval-gate-baseline.json +17 -0
  166. package/scripts/eval-gate-scorecard.mjs +242 -0
  167. package/scripts/eval-scorecard-aggregator.mjs +252 -0
  168. package/scripts/flaky-quarantine.sh +241 -0
  169. package/scripts/forge-annotation.sh +567 -0
  170. package/scripts/issue-dedup.sh +236 -0
  171. package/scripts/validate-annotation-node.mjs +233 -0
  172. package/scripts/worktree-lifecycle.sh +3 -3
  173. package/templates/devdocs/agent/using-forgedock.md +14 -0
  174. package/docs/site/.vitepress/config.mjs +0 -85
@@ -1,17 +1,21 @@
1
1
  ---
2
2
  title: "ForgeDock Complete Command Reference"
3
- description: "Complete reference for all ForgeDock slash commands for Claude Code. Usage, options, and examples for all 25+ commands covering the full AI development pipeline."
3
+ description: "Complete reference for all ForgeDock slash commands for Claude Code. Usage, options, and examples covering the full AI development pipeline."
4
4
  keywords: ["claude code slash commands", "claude code extensions", "claude code commands list", "forgedock commands", "ai development pipeline commands"]
5
5
  ---
6
6
 
7
7
  # Complete Command Reference
8
8
 
9
- ForgeDock installs 25+ slash commands into Claude Code. Each command is a detailed prompt spec that guides an AI agent through a specific phase of the development pipeline.
9
+ ForgeDock installs slash commands into Claude Code. Each command is a detailed prompt spec that guides an AI agent through a specific phase of the development pipeline.
10
10
 
11
- Install all commands with:
11
+ Commands ship in two tiers:
12
+
13
+ - **Core** (default install) — the commands that cover the full pipeline: `work-on`, `issue`, `review-pr`, `quality-gate`, `orchestrate`, `forgedock-init`, and their sub-phases.
14
+ - **Extras** (opt-in) — analytics, audit, ops, and project-specific commands. Install with `--extras`.
12
15
 
13
16
  ```bash
14
- npx forgedock
17
+ npx forgedock # Core tier only (default)
18
+ npx forgedock --extras # Core + extras tier
15
19
  ```
16
20
 
17
21
  After installation, every command is available as `/command-name` in any Claude Code session.
@@ -20,7 +24,7 @@ After installation, every command is available as `/command-name` in any Claude
20
24
 
21
25
  ---
22
26
 
23
- ## Core Pipeline Commands
27
+ ## Core Loop
24
28
 
25
29
  These are the commands you use most. They cover the full lifecycle from issue to merged PR.
26
30
 
@@ -53,6 +57,19 @@ Runs the complete investigate → build → review → merge → close pipeline
53
57
 
54
58
  ---
55
59
 
60
+ ### `/issue`
61
+
62
+ **Structured issue creator.**
63
+
64
+ Creates a well-structured GitHub issue with all sections the pipeline needs (Problem, Affected Files, Expected Behavior, Acceptance Criteria).
65
+
66
+ ```bash
67
+ /issue "The login button is misaligned on mobile Safari"
68
+ /issue "Add dark mode support to the dashboard"
69
+ ```
70
+
71
+ ---
72
+
56
73
  ### `/review-pr`
57
74
 
58
75
  **Context-aware PR reviewer.**
@@ -100,6 +117,21 @@ Catches the defects a reviewer would flag — before the commit is made.
100
117
 
101
118
  ---
102
119
 
120
+ #### `/test-gate`
121
+
122
+ **Acceptance verification gate.**
123
+
124
+ Deterministically verifies a staging→main bundle's acceptance criteria against running code before deploy.
125
+
126
+ ```bash
127
+ /test-gate # Verify current staging
128
+ /test-gate --issue 42 # Verify acceptance criteria for issue #42
129
+ ```
130
+
131
+ *Runs automatically as part of the deploy pipeline. Use manually to verify before triggering a deploy.*
132
+
133
+ ---
134
+
103
135
  ### `/orchestrate`
104
136
 
105
137
  **Parallel multi-issue pipeline.**
@@ -118,252 +150,340 @@ Each sub-agent gets its own git worktree and GitHub issue thread. No interferenc
118
150
 
119
151
  ---
120
152
 
121
- ### `/autopilot`
153
+ #### `/milestone`
122
154
 
123
- **Self-improvement cycle.**
155
+ **Milestone manager.**
124
156
 
125
- Runs recon, triage, and optionally fixes top-priority issues automatically.
157
+ Creates, manages, and ships milestones — the top-level planning layer for feature development.
126
158
 
127
159
  ```bash
128
- /autopilot # Recon + triage only
129
- /autopilot --fix # Recon + triage + fix top issues
130
- /autopilot --fix --limit 5 # Fix top 5 issues
131
- /autopilot --recon-only # Recon only, no triage
132
- /autopilot --dry-run # Show what would be done
160
+ /milestone create "Q3 Auth Improvements" # Create a new milestone
161
+ /milestone status # Current milestone status
162
+ /milestone ship q3-auth # Ship a milestone
163
+ /milestone sync q3-auth # Sync issues to board
133
164
  ```
134
165
 
135
166
  ---
136
167
 
137
- ## Investigation & Validation
168
+ ## Observe & Recover
169
+
170
+ These commands implement the durable-state story: situational awareness, failure diagnosis, and crash-safe resume for pipeline runs.
138
171
 
139
172
  ---
140
173
 
141
- ### `/validate`
174
+ #### `/pipeline-status`
142
175
 
143
- **Pre-build issue validation.**
176
+ **Pipeline-wide situational awareness.**
144
177
 
145
- Independently verifies whether a reported issue is actually a real problem before any code changes.
178
+ Groups open issues by workflow state, shows active PRs with age, flags stale items, and reports milestone progress. Fully read-only.
179
+
180
+ With the durable engine, also shows **engine lease state** for issues with a `FORGE:STATE` block — distinguishing `LEASED (agent, Nm left)` from `STALLED (lease expired Nm ago)`. Issues without engine state fall back to `updatedAt`-based staleness.
146
181
 
147
182
  ```bash
148
- /validate 42 # Validate issue #42
149
- /validate "login button broken" # Validate by description
183
+ /pipeline-status # Full dashboard
184
+ /pipeline-status --stale-days 3 # Custom stale threshold
185
+ /pipeline-status --repo org/repo # Specific repo
150
186
  ```
151
187
 
152
- Returns: CONFIRMED, PARTIAL, or INVALID with evidence.
188
+ ---
189
+
190
+ #### `/pipeline-resume`
191
+
192
+ **Context recovery after compaction.**
193
+
194
+ Finds the most recently active issue, reconstructs FORGE annotations, and re-enters the pipeline at the correct phase via `/work-on`.
195
+
196
+ ```bash
197
+ /pipeline-resume # Auto-detect most recent issue
198
+ /pipeline-resume 610 # Resume specific issue
199
+ /pipeline-resume --all-stalled # Fleet recovery: scan + re-dispatch all stalled issues
200
+ /pipeline-resume --all-stalled --dry-run # List stalled issues without dispatching
201
+ ```
202
+
203
+ The `--all-stalled` mode delegates to `npx forgedock resume-stalled`, which uses the engine's `scanStalls()` for ground-truth expired-lease detection rather than timestamp heuristics.
153
204
 
154
205
  ---
155
206
 
156
- ### `/audit`
207
+ #### `/diagnose`
157
208
 
158
- **Production issue tracer.**
209
+ **Pipeline failure tracer.**
159
210
 
160
- Traces a production failure end-to-end through GitHub artifacts (commits, PRs, issues) and files an improvement issue.
211
+ Traces a failed or stalled pipeline run — identifies which FORGE annotation is missing or malformed, pinpoints the failure phase, and suggests specific remediation steps.
161
212
 
162
213
  ```bash
163
- /audit "payments 500 errors started after deploy"
164
- /audit --issue 42 # Trace based on existing issue
165
- /audit --pr 123 # Trace based on PR
214
+ /diagnose 42 # Diagnose issue #42
215
+ /diagnose --stale # Find all stalled runs
166
216
  ```
167
217
 
168
218
  ---
169
219
 
170
- ### `/security-audit`
220
+ #### `/explain`
171
221
 
172
- **Periodic security posture audit.**
222
+ **FORGE annotation translator.**
173
223
 
174
- Runs a 4-phase security checklist against repo files (not just diffs). Creates GitHub issues for confirmed findings.
224
+ Produces a plain-English narrative of everything that happened on a GitHub issue — translates FORGE pipeline annotations into a human-readable summary for teammates and PMs who don't read raw annotations.
175
225
 
176
226
  ```bash
177
- /security-audit # All 4 phases
178
- /security-audit --phase 1 # Specific phase
179
- /security-audit --dry-run # Show findings without creating issues
227
+ /explain 42 # Explain what happened on issue #42
228
+ /explain 123 --pr # Explain a PR's review trail
180
229
  ```
181
230
 
182
231
  ---
183
232
 
184
- ### `/qa-sweep`
233
+ #### `/replay`
185
234
 
186
- **Full platform QA sweep.**
235
+ **Read-only audit trail playback.**
187
236
 
188
- Auto-discovers pages and tests UI elements via browser automation. Creates GitHub issues for all findings.
237
+ Steps through a completed pipeline run phase by phase, showing each FORGE annotation with timestamps. Useful for understanding exactly what an agent did and when.
189
238
 
190
239
  ```bash
191
- /qa-sweep all # Full sweep
192
- /qa-sweep dashboard # Dashboard area only
193
- /qa-sweep page /settings # Specific route
194
- /qa-sweep journey # Critical user journeys
195
- /qa-sweep a11y # Accessibility only
240
+ /replay 42 # Replay issue #42 run
241
+ /replay 42 --phase build # Replay only the build phase
196
242
  ```
197
243
 
198
244
  ---
199
245
 
200
- ## Issue & Milestone Management
246
+ #### `/changelog`
247
+
248
+ **Release notes generator.**
249
+
250
+ Auto-generates release notes from merged PRs and `FORGE:TRAJECTORY` annotations, grouped by conventional commit type. Produces a diff-accurate, human-readable changelog with no manual curation.
251
+
252
+ ```bash
253
+ /changelog # Notes since last release
254
+ /changelog v1.2.0..v1.3.0 # Specific version range
255
+ /changelog --milestone q3-auth # Milestone-scoped notes
256
+ ```
201
257
 
202
258
  ---
203
259
 
204
- ### `/issue`
260
+ ## Ops
205
261
 
206
- **Structured issue creator.**
262
+ Commands for production operations, incident response, and keeping the repo healthy.
207
263
 
208
- Creates a well-structured GitHub issue with all sections the pipeline needs (Problem, Affected Files, Expected Behavior, Acceptance Criteria).
264
+ ---
265
+
266
+ #### `/deploy-info`
267
+
268
+ **Pre-deploy diff.**
269
+
270
+ Shows what will deploy next — diff between staging and main with issue/PR summary, risk assessment, and deploy checklist.
209
271
 
210
272
  ```bash
211
- /issue "The login button is misaligned on mobile Safari"
212
- /issue "Add dark mode support to the dashboard"
273
+ /deploy-info # staging vs. main
274
+ /deploy-info staging # Explicit staging
275
+ /deploy-info milestone/q3-auth # Milestone branch
276
+ /deploy-info compare my-branch # Custom comparison
213
277
  ```
214
278
 
215
279
  ---
216
280
 
217
- ### `/milestone`
281
+ ### `/deploy-pr`
218
282
 
219
- **Milestone manager.**
283
+ **PR ship orchestrator.**
220
284
 
221
- Creates, manages, and ships milestones — the top-level planning layer for feature development.
285
+ Ships a branch to its deploy target — detects or creates the PR, runs CI fixing via `/fix-ci`, runs the review gate via `/review-pr`, merges after both pass, and returns a structured result. Designed to be invoked by `/autopilot` as part of the autonomous deploy loop.
222
286
 
223
287
  ```bash
224
- /milestone create "Q3 Auth Improvements" # Create a new milestone
225
- /milestone status # Current milestone status
226
- /milestone ship q3-auth # Ship a milestone
227
- /milestone sync q3-auth # Sync issues to board
288
+ /deploy-pr staging # Ship staging → main
289
+ /deploy-pr milestone/my-feature # Ship milestone → staging
290
+ /deploy-pr feat/my-branch --target staging # Ship any branch → staging
291
+ /deploy-pr staging --dry-run # Simulate without merging
292
+ /deploy-pr staging --issue 1234 # Reference parent issue in PR body
228
293
  ```
229
294
 
295
+ **Branch routing**: `staging` → `main` (Deploy), `milestone/*` → `staging` (Ship), other → `staging` (Merge). Never force-merges. Returns `{ pr, source, target, status, ci_fixes, review_findings }`.
296
+
230
297
  ---
231
298
 
232
- ### `/cleanup`
299
+ ### `/fix-ci`
233
300
 
234
- **Repository hygiene sweep.**
301
+ **Automated CI failure resolution loop.**
235
302
 
236
- Cleans up stale labels, missing workflow state, project board gaps, dangling worktrees, and orphaned branches.
303
+ Diagnoses CI failures on a PR, applies targeted fixes, pushes new commits, and loops until green or max attempts reached. Invoked automatically by `/deploy-pr` as the CI gate step; can also be run directly.
237
304
 
238
305
  ```bash
239
- /cleanup labels # Fix stale labels
240
- /cleanup branches # Prune merged branches
241
- /cleanup milestones # Archive shipped milestones
242
- /cleanup board # Fix project board gaps
243
- /cleanup orphans # Remove dangling worktrees
244
- /cleanup all # Everything
306
+ /fix-ci 123 # Fix CI on PR #123
307
+ /fix-ci 123 --max-attempts 5 # Allow up to 5 fix iterations
308
+ /fix-ci 123 --repo owner/repo # Explicit repo
245
309
  ```
246
310
 
311
+ Returns `{ pr, status, attempts, fixes_applied }`.
312
+
247
313
  ---
248
314
 
249
- ## Observability & Analytics
315
+ #### `/rollback`
316
+
317
+ **Revert PR creator.**
318
+
319
+ Creates a revert PR to roll back a shipped feature or fix that caused a production incident.
320
+
321
+ ```bash
322
+ /rollback 123 # Revert PR #123
323
+ /rollback last # Revert most recent deploy
324
+ ```
250
325
 
251
326
  ---
252
327
 
253
- ### `/analytics`
328
+ #### `/incident-response`
254
329
 
255
- **Production analytics audit.**
330
+ **P0 incident coordinator.**
256
331
 
257
- Pulls analytics from multiple sources (GSC, Bing Webmaster, Clarity, Umami, Cloudflare, Stripe, GA4) and generates actionable GitHub issues.
332
+ Coordinates P0 incident response — hotfix validation, timeline reconstruction, and post-incident analysis.
258
333
 
259
334
  ```bash
260
- /analytics # Full analytics audit
335
+ /incident-response 42 # Respond to issue #42
336
+ /incident-response active # Current active incident
337
+ /incident-response postmortem 42 # Post-incident analysis
261
338
  ```
262
339
 
263
- Trigger phrases: "check analytics", "look at prod analytics", "what's happening on the site", "check revenue".
340
+ ---
341
+
342
+ #### `/security-audit`
343
+
344
+ **Periodic security posture audit.**
345
+
346
+ Runs a 4-phase security checklist against repo files (not just diffs). Creates GitHub issues for confirmed findings.
347
+
348
+ ```bash
349
+ /security-audit # All 4 phases
350
+ /security-audit --phase 1 # Specific phase
351
+ /security-audit --dry-run # Show findings without creating issues
352
+ ```
264
353
 
265
354
  ---
266
355
 
267
- ### `/pipeline-health`
356
+ #### `/autopilot`
268
357
 
269
- **Pipeline performance analyzer.**
358
+ **Self-improvement cycle.**
270
359
 
271
- Measures pipeline performance, correlates with prompt changes, and proposes improvements.
360
+ Runs recon, triage, and optionally fixes top-priority issues automatically.
272
361
 
273
362
  ```bash
274
- /pipeline-health # All repos
275
- /pipeline-health my-app # Specific repo
363
+ /autopilot # Recon + triage only
364
+ /autopilot --fix # Recon + triage + fix top issues
365
+ /autopilot --fix --limit 5 # Fix top 5 issues
366
+ /autopilot --recon-only # Recon only, no triage
367
+ /autopilot --dry-run # Show what would be done
276
368
  ```
277
369
 
278
370
  ---
279
371
 
280
- ### `/forge-stats`
372
+ #### `/signal-planner`
281
373
 
282
- **Command size tracker.**
374
+ **Closed-loop production signal to verified resolution.**
283
375
 
284
- Tracks command file sizes, detects bloat, and compares against baselines.
376
+ Converts a production, analytics, or incident signal into a dependency-ordered issue DAG, executes via `/orchestrate`, then verifies the originating signal is resolved. Event-driven companion to `/autopilot`.
285
377
 
286
378
  ```bash
287
- /forge-stats # Current sizes
288
- /forge-stats diff # Changes since baseline
289
- /forge-stats baseline # Set current as baseline
290
- /forge-stats full # Full report
379
+ /signal-planner --geo # GEO signal → issues → verify
380
+ /signal-planner --metric "p95_latency 2000" # Latency signal
381
+ /signal-planner --incident 42 # Issue-originated signal
382
+ /signal-planner --dry-run # Show DAG without executing
383
+ /signal-planner --max-issues 5 # Cap spawned issues
291
384
  ```
292
385
 
386
+ *Applies to: projects with production signals (analytics, incidents, metrics) configured in `forge.yaml`.*
387
+
293
388
  ---
294
389
 
295
- ### `/geo-audit`
390
+ #### `/cleanup`
296
391
 
297
- **GEO (Generative Engine Optimization) audit.**
392
+ **Repository hygiene sweep.**
298
393
 
299
- Checks AI referral traffic and page compliance for AI search engines. Creates improvement issues.
394
+ Cleans up stale labels, missing workflow state, project board gaps, dangling worktrees, and orphaned branches.
300
395
 
301
396
  ```bash
302
- /geo-audit # Full GEO audit
397
+ /cleanup labels # Fix stale labels
398
+ /cleanup branches # Prune merged branches
399
+ /cleanup milestones # Archive shipped milestones
400
+ /cleanup board # Fix project board gaps
401
+ /cleanup orphans # Remove dangling worktrees
402
+ /cleanup all # Everything
303
403
  ```
304
404
 
305
405
  ---
306
406
 
307
- ### `/audit-agents`
407
+ ### `/recover-orphans`
308
408
 
309
- **Agent output analyzer.**
409
+ **Pipeline orphan recovery.**
310
410
 
311
- Audits agent outputs from an orchestration run — timeline analysis, stall detection, idle time breakdown.
411
+ Scans for issues stuck in intermediate workflow states (building, investigating, in-review) where the agent died mid-pipeline. Diagnoses each orphan's actual GitHub state and applies the appropriate recovery action — re-entering the pipeline via `/work-on` or `/review-pr`.
312
412
 
313
413
  ```bash
314
- /audit-agents latest # Most recent run
315
- /audit-agents {session-id} # Specific session
316
- /audit-agents {agent-id} # Specific agent
414
+ /recover-orphans # Scan and recover all orphans
415
+ /recover-orphans --dry-run # Show orphans without recovering
416
+ /recover-orphans --since 24 # Only orphans stalled > 24 hours
417
+ /recover-orphans --issue 42 # Recover a specific issue
317
418
  ```
318
419
 
319
420
  ---
320
421
 
321
- ## Operations & Deploy
422
+ #### `/pipeline-health`
423
+
424
+ **Pipeline performance analyzer.**
425
+
426
+ Measures pipeline performance, correlates with prompt changes, and proposes improvements.
427
+
428
+ ```bash
429
+ /pipeline-health # All repos
430
+ /pipeline-health my-app # Specific repo
431
+ ```
322
432
 
323
433
  ---
324
434
 
325
- ### `/deploy-info`
435
+ ## Investigation & Validation
436
+
437
+ ---
326
438
 
327
- **Pre-deploy diff.**
439
+ #### `/validate`
328
440
 
329
- Shows what will deploy next — diff between staging and main with issue/PR summary, risk assessment, and deploy checklist.
441
+ **Pre-build issue validation.**
442
+
443
+ Independently verifies whether a reported issue is actually a real problem before any code changes.
330
444
 
331
445
  ```bash
332
- /deploy-info # staging vs. main
333
- /deploy-info staging # Explicit staging
334
- /deploy-info milestone/q3-auth # Milestone branch
335
- /deploy-info compare my-branch # Custom comparison
446
+ /validate 42 # Validate issue #42
447
+ /validate "login button broken" # Validate by description
336
448
  ```
337
449
 
450
+ Returns: CONFIRMED, PARTIAL, or INVALID with evidence.
451
+
338
452
  ---
339
453
 
340
- ### `/rollback`
454
+ #### `/audit`
341
455
 
342
- **Revert PR creator.**
456
+ **Production issue tracer.**
343
457
 
344
- Creates a revert PR to roll back a shipped feature or fix that caused a production incident.
458
+ Traces a production failure end-to-end through GitHub artifacts (commits, PRs, issues) and files an improvement issue.
345
459
 
346
460
  ```bash
347
- /rollback 123 # Revert PR #123
348
- /rollback last # Revert most recent deploy
461
+ /audit "payments 500 errors started after deploy"
462
+ /audit --issue 42 # Trace based on existing issue
463
+ /audit --pr 123 # Trace based on PR
349
464
  ```
350
465
 
351
466
  ---
352
467
 
353
- ### `/incident-response`
468
+ #### `/scope`
354
469
 
355
- **P0 incident coordinator.**
470
+ **Pre-flight complexity estimator.**
356
471
 
357
- Coordinates P0 incident response — hotfix validation, timeline reconstruction, and post-incident analysis.
472
+ Estimates issue complexity before running `/work-on` — surfaces affected files, blast radius, risk flags, and a decomposition recommendation. Strictly read-only; nothing is written to GitHub.
358
473
 
359
474
  ```bash
360
- /incident-response 42 # Respond to issue #42
361
- /incident-response active # Current active incident
362
- /incident-response postmortem 42 # Post-incident analysis
475
+ /scope 42 # Estimate issue #42
476
+ /scope 42 --repo owner/repo # Explicit repo
363
477
  ```
364
478
 
365
479
  ---
366
480
 
481
+ #### `/diagnose`
482
+
483
+ See [Observe & Recover > `/diagnose`](#diagnose) above.
484
+
485
+ ---
486
+
367
487
  ## Configuration & Setup
368
488
 
369
489
  ---
@@ -380,9 +500,25 @@ AI-powered `forge.yaml` generator — scans codebase, queries GitHub, and fills
380
500
  /forgedock-init --section review # Regenerate one section
381
501
  ```
382
502
 
503
+
504
+ ---
505
+
506
+ #### `/adopt`
507
+
508
+ **Repo bootstrap & backlog triage.**
509
+
510
+ Onboards an existing repo into the ForgeDock pipeline — scans open issues, classifies them, applies category and priority labels, suggests a starter milestone, and ranks the best `/work-on` first candidates. Run once after `npx forgedock init` + `/forgedock-init` to make a legacy backlog pipeline-ready.
511
+
512
+ ```bash
513
+ /adopt # Triage current repo
514
+ /adopt --dry-run # Preview without writing labels
515
+ /adopt --milestone # Also create a starter milestone
516
+ /adopt --limit 20 # Cap issues triaged
517
+ ```
518
+
383
519
  ---
384
520
 
385
- ### `/sync-ecosystem`
521
+ #### `/sync-ecosystem`
386
522
 
387
523
  **Cross-repo sync.**
388
524
 
@@ -398,6 +534,49 @@ Detects API changes, syncs satellite repos, and publishes releases.
398
534
 
399
535
  ---
400
536
 
537
+ ## Advanced Pipeline Tuning
538
+
539
+ ---
540
+
541
+ #### `/optimize`
542
+
543
+ **Adaptive script generator.**
544
+
545
+ Analyzes the repo and generates per-repo adaptive scripts from learned patterns, git history, and existing configuration — making repeated pipeline work faster over time.
546
+
547
+ ```bash
548
+ /optimize # Analyze and generate scripts
549
+ /optimize --dry-run # Preview recommendations
550
+ ```
551
+
552
+ ---
553
+
554
+ #### `/ci-audit`
555
+
556
+ **Stack-aware CI gap detection.**
557
+
558
+ Audits the project's GitHub Actions workflows against its declared tech stack and files issues for missing config-validation checks — ensuring CI enforces the right deterministic validators (e.g., `traefik validate`, `nginx -t`) for each stack component.
559
+
560
+ ```bash
561
+ /ci-audit # Full CI gap audit
562
+ /ci-audit --dry-run # Show gaps without creating issues
563
+ ```
564
+
565
+ ---
566
+
567
+ #### `/compat-audit`
568
+
569
+ **Claude Code compatibility report.**
570
+
571
+ Produces a point-in-time advisory report showing whether the installed Claude Code version is current and which ForgeDock features may behave differently on the current runtime.
572
+
573
+ ```bash
574
+ /compat-audit # Check current version
575
+ /compat-audit --refresh # Force refresh of breakpoints registry
576
+ ```
577
+
578
+ ---
579
+
401
580
  ## Sub-Phase Commands
402
581
 
403
582
  These are invoked automatically by `/work-on` but can also be run standalone.
@@ -413,7 +592,103 @@ These are invoked automatically by `/work-on` but can also be run standalone.
413
592
  | `/work-on/review` | Phase 5 | Review only |
414
593
  | `/work-on/close` | Phase 6 | Close & cleanup only |
415
594
  | `/work-on/decompose` | Phase 2 | Decompose into sub-issues |
416
- | `/review-pr-staging` | Staging | Review staging branch before deploy |
595
+ | `/review-pr-agents` | PR review | Agent catalog read by `/review-pr` during dispatch (not user-invokable directly) |
596
+
597
+ ---
598
+
599
+ ## Extras / Project-Specific
600
+
601
+ These commands are in the **extras tier** — not installed by default. Install them with `npx forgedock --extras`.
602
+
603
+ The following extras target **web-property and analytics workflows** specifically. They are useful for teams running a public web property with analytics platforms (GSC, GA4, Umami, Cloudflare, Stripe, Clarity) wired up in `forge.yaml`. If your project is not a web property or does not have those integrations configured, these commands will have nothing to act on.
604
+
605
+ ---
606
+
607
+ #### `/analytics`
608
+
609
+ **Production analytics audit.**
610
+
611
+ Pulls analytics from multiple sources (GSC, Bing Webmaster, Clarity, Umami, Cloudflare, Stripe, GA4) and generates actionable GitHub issues.
612
+
613
+ ```bash
614
+ /analytics # Full analytics audit
615
+ ```
616
+
617
+ Trigger phrases: "check analytics", "look at prod analytics", "what's happening on the site", "check revenue".
618
+
619
+ *Applies to: web properties with analytics configured in `forge.yaml`.*
620
+
621
+ ---
622
+
623
+ #### `/qa-sweep`
624
+
625
+ **Full platform QA sweep.**
626
+
627
+ Auto-discovers pages and tests UI elements via browser automation (requires Playwright MCP). Creates GitHub issues for all findings.
628
+
629
+ ```bash
630
+ /qa-sweep all # Full sweep
631
+ /qa-sweep dashboard # Dashboard area only
632
+ /qa-sweep page /settings # Specific route
633
+ /qa-sweep journey # Critical user journeys
634
+ /qa-sweep a11y # Accessibility only
635
+ ```
636
+
637
+ *Applies to: web applications. Requires `claude mcp add playwright npx @playwright/mcp@latest`.*
638
+
639
+ ---
640
+
641
+ #### `/geo-audit`
642
+
643
+ **GEO (Generative Engine Optimization) audit.**
644
+
645
+ Checks AI referral traffic and page compliance for AI search engines. Creates improvement issues.
646
+
647
+ ```bash
648
+ /geo-audit # Full GEO audit
649
+ ```
650
+
651
+ *Applies to: public web properties targeting AI search traffic.*
652
+
653
+ ---
654
+
655
+ #### `/audit-agents`
656
+
657
+ **Agent output analyzer.**
658
+
659
+ Audits agent outputs from an orchestration run — timeline analysis, stall detection, idle time breakdown. Useful for diagnosing inefficiency in large `/orchestrate` runs.
660
+
661
+ ```bash
662
+ /audit-agents latest # Most recent run
663
+ /audit-agents {session-id} # Specific session
664
+ /audit-agents {agent-id} # Specific agent
665
+ ```
666
+
667
+ *Applies to: teams running large parallel orchestrations who want per-agent performance breakdowns.*
668
+
669
+ ---
670
+
671
+ ---
672
+
673
+ ### `npx forgedock report`
674
+
675
+ **Pipeline impact receipts for your repo.**
676
+
677
+ Reads `forge.yaml` for `project.owner/repo` and queries GitHub to produce a 30-day (default) summary of pipeline-driven activity: issues closed, share with FORGE annotations, median and p90 open→close time, merged PR count and issue-link rate, defects caught by review, and machine-filed intent share.
678
+
679
+ ```bash
680
+ npx forgedock report # Terminal summary (default 30 days)
681
+ npx forgedock report --days 7 # Last 7 days
682
+ npx forgedock report --md # Paste-ready Markdown block (standups, reports)
683
+ npx forgedock report --json # Raw JSON for scripting
684
+ npx forgedock report --md --quiet # Markdown without the fleet pointer footer
685
+ ```
686
+
687
+ Requires an authenticated `gh` CLI and a `forge.yaml` with `project.owner` and `project.repo` set. Degrades gracefully: unauthenticated `gh` and missing `forge.yaml` produce actionable error messages. A repo with no ForgeDock history shows a "run /work-on on your first issue" pointer instead of an empty table.
688
+
689
+ Counts sourced from `gh issue list` / `gh pr list` at the 500-item limit are labeled approximate (`~`), consistent with the honesty convention used in the README.
690
+
691
+ *This is the local, single-repo seed of the [fleet dashboard](https://forgedock.com/fleet) — the same numbers, one repo, free.*
417
692
 
418
693
  ---
419
694