@garygentry/feature-forge 0.2.3 → 0.2.5

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 (159) hide show
  1. package/README.md +6 -1
  2. package/adapters/GENERATION-REPORT.md +5 -1
  3. package/adapters/claude/.feature-forge-bundle.json +1 -1
  4. package/adapters/claude/references/forge-config-schema.json +25 -3
  5. package/adapters/claude/references/pipeline-state-schema.json +3 -2
  6. package/adapters/claude/references/portable-root.md +6 -3
  7. package/adapters/claude/references/process-overview.md +10 -0
  8. package/adapters/claude/references/shared-conventions.md +27 -9
  9. package/adapters/claude/references/stage-exit-protocol.md +206 -0
  10. package/adapters/claude/scripts/epic-manifest.py +10 -0
  11. package/adapters/claude/scripts/forge-bootstrap.py +94 -16
  12. package/adapters/claude/scripts/forge-init.sh +7 -1
  13. package/adapters/claude/scripts/forge-root.sh +20 -1
  14. package/adapters/claude/scripts/forge-session.py +866 -31
  15. package/adapters/claude/skills/forge/SKILL.md +29 -15
  16. package/adapters/claude/skills/forge-0-epic/SKILL.md +19 -24
  17. package/adapters/claude/skills/forge-0-epic/references/edit-mode.md +6 -4
  18. package/adapters/claude/skills/forge-0-epic/references/epic-manifest-subcommands.md +1 -1
  19. package/adapters/claude/skills/forge-1-prd/SKILL.md +13 -4
  20. package/adapters/claude/skills/forge-2-tech/SKILL.md +13 -3
  21. package/adapters/claude/skills/forge-3-specs/SKILL.md +13 -3
  22. package/adapters/claude/skills/forge-4-backlog/SKILL.md +15 -5
  23. package/adapters/claude/skills/forge-5-loop/SKILL.md +19 -21
  24. package/adapters/claude/skills/forge-5-loop/references/result-reporting.md +10 -5
  25. package/adapters/claude/skills/forge-6-docs/SKILL.md +6 -6
  26. package/adapters/claude/skills/forge-bootstrap/SKILL.md +4 -4
  27. package/adapters/claude/skills/forge-fix/SKILL.md +29 -6
  28. package/adapters/claude/skills/forge-guide/SKILL.md +182 -0
  29. package/adapters/claude/skills/forge-init/SKILL.md +29 -1
  30. package/adapters/claude/skills/forge-verify/SKILL.md +46 -15
  31. package/adapters/claude/skills/forge-verify/references/verification-checklists.md +1 -1
  32. package/adapters/codex/.feature-forge-bundle.json +1 -1
  33. package/adapters/codex/references/forge-config-schema.json +25 -3
  34. package/adapters/codex/references/pipeline-state-schema.json +3 -2
  35. package/adapters/codex/references/portable-root.md +6 -3
  36. package/adapters/codex/references/process-overview.md +10 -0
  37. package/adapters/codex/references/shared-conventions.md +27 -9
  38. package/adapters/codex/references/stage-exit-protocol.md +206 -0
  39. package/adapters/codex/scripts/epic-manifest.py +10 -0
  40. package/adapters/codex/scripts/forge-bootstrap.py +94 -16
  41. package/adapters/codex/scripts/forge-init.sh +7 -1
  42. package/adapters/codex/scripts/forge-root.sh +20 -1
  43. package/adapters/codex/scripts/forge-session.py +866 -31
  44. package/adapters/codex/skills/forge/SKILL.md +34 -20
  45. package/adapters/codex/skills/forge-0-epic/SKILL.md +20 -25
  46. package/adapters/codex/skills/forge-0-epic/references/edit-mode.md +6 -4
  47. package/adapters/codex/skills/forge-0-epic/references/epic-manifest-subcommands.md +1 -1
  48. package/adapters/codex/skills/forge-1-prd/SKILL.md +13 -4
  49. package/adapters/codex/skills/forge-2-tech/SKILL.md +14 -4
  50. package/adapters/codex/skills/forge-3-specs/SKILL.md +13 -3
  51. package/adapters/codex/skills/forge-4-backlog/SKILL.md +15 -5
  52. package/adapters/codex/skills/forge-5-loop/SKILL.md +21 -23
  53. package/adapters/codex/skills/forge-5-loop/references/result-reporting.md +10 -5
  54. package/adapters/codex/skills/forge-6-docs/SKILL.md +6 -6
  55. package/adapters/codex/skills/forge-bootstrap/SKILL.md +4 -4
  56. package/adapters/codex/skills/forge-fix/SKILL.md +29 -6
  57. package/adapters/codex/skills/forge-guide/SKILL.md +191 -0
  58. package/adapters/codex/skills/forge-init/SKILL.md +29 -1
  59. package/adapters/codex/skills/forge-verify/SKILL.md +45 -14
  60. package/adapters/codex/skills/forge-verify/references/verification-checklists.md +1 -1
  61. package/adapters/copilot/.feature-forge-bundle.json +1 -1
  62. package/adapters/copilot/references/forge-config-schema.json +25 -3
  63. package/adapters/copilot/references/pipeline-state-schema.json +3 -2
  64. package/adapters/copilot/references/portable-root.md +6 -3
  65. package/adapters/copilot/references/process-overview.md +10 -0
  66. package/adapters/copilot/references/shared-conventions.md +27 -9
  67. package/adapters/copilot/references/stage-exit-protocol.md +206 -0
  68. package/adapters/copilot/scripts/epic-manifest.py +10 -0
  69. package/adapters/copilot/scripts/forge-bootstrap.py +94 -16
  70. package/adapters/copilot/scripts/forge-init.sh +7 -1
  71. package/adapters/copilot/scripts/forge-root.sh +20 -1
  72. package/adapters/copilot/scripts/forge-session.py +866 -31
  73. package/adapters/copilot/skills/forge/forge.md +34 -20
  74. package/adapters/copilot/skills/forge-0-epic/forge-0-epic.md +20 -25
  75. package/adapters/copilot/skills/forge-0-epic/references/edit-mode.md +6 -4
  76. package/adapters/copilot/skills/forge-0-epic/references/epic-manifest-subcommands.md +1 -1
  77. package/adapters/copilot/skills/forge-1-prd/forge-1-prd.md +13 -4
  78. package/adapters/copilot/skills/forge-2-tech/forge-2-tech.md +14 -4
  79. package/adapters/copilot/skills/forge-3-specs/forge-3-specs.md +13 -3
  80. package/adapters/copilot/skills/forge-4-backlog/forge-4-backlog.md +15 -5
  81. package/adapters/copilot/skills/forge-5-loop/forge-5-loop.md +21 -23
  82. package/adapters/copilot/skills/forge-5-loop/references/result-reporting.md +10 -5
  83. package/adapters/copilot/skills/forge-6-docs/forge-6-docs.md +6 -6
  84. package/adapters/copilot/skills/forge-bootstrap/forge-bootstrap.md +4 -4
  85. package/adapters/copilot/skills/forge-fix/forge-fix.md +29 -6
  86. package/adapters/copilot/skills/forge-guide/forge-guide.md +191 -0
  87. package/adapters/copilot/skills/forge-init/forge-init.md +29 -1
  88. package/adapters/copilot/skills/forge-verify/forge-verify.md +45 -14
  89. package/adapters/copilot/skills/forge-verify/references/verification-checklists.md +1 -1
  90. package/adapters/cursor/.feature-forge-bundle.json +1 -1
  91. package/adapters/cursor/references/forge-config-schema.json +25 -3
  92. package/adapters/cursor/references/pipeline-state-schema.json +3 -2
  93. package/adapters/cursor/references/portable-root.md +6 -3
  94. package/adapters/cursor/references/process-overview.md +10 -0
  95. package/adapters/cursor/references/shared-conventions.md +27 -9
  96. package/adapters/cursor/references/stage-exit-protocol.md +206 -0
  97. package/adapters/cursor/scripts/epic-manifest.py +10 -0
  98. package/adapters/cursor/scripts/forge-bootstrap.py +94 -16
  99. package/adapters/cursor/scripts/forge-init.sh +7 -1
  100. package/adapters/cursor/scripts/forge-root.sh +20 -1
  101. package/adapters/cursor/scripts/forge-session.py +866 -31
  102. package/adapters/cursor/skills/forge/forge.mdc +34 -20
  103. package/adapters/cursor/skills/forge-0-epic/forge-0-epic.mdc +20 -25
  104. package/adapters/cursor/skills/forge-0-epic/references/edit-mode.md +6 -4
  105. package/adapters/cursor/skills/forge-0-epic/references/epic-manifest-subcommands.md +1 -1
  106. package/adapters/cursor/skills/forge-1-prd/forge-1-prd.mdc +13 -4
  107. package/adapters/cursor/skills/forge-2-tech/forge-2-tech.mdc +14 -4
  108. package/adapters/cursor/skills/forge-3-specs/forge-3-specs.mdc +13 -3
  109. package/adapters/cursor/skills/forge-4-backlog/forge-4-backlog.mdc +15 -5
  110. package/adapters/cursor/skills/forge-5-loop/forge-5-loop.mdc +21 -23
  111. package/adapters/cursor/skills/forge-5-loop/references/result-reporting.md +10 -5
  112. package/adapters/cursor/skills/forge-6-docs/forge-6-docs.mdc +6 -6
  113. package/adapters/cursor/skills/forge-bootstrap/forge-bootstrap.mdc +4 -4
  114. package/adapters/cursor/skills/forge-fix/forge-fix.mdc +29 -6
  115. package/adapters/cursor/skills/forge-guide/forge-guide.mdc +192 -0
  116. package/adapters/cursor/skills/forge-init/forge-init.mdc +29 -1
  117. package/adapters/cursor/skills/forge-verify/forge-verify.mdc +45 -14
  118. package/adapters/cursor/skills/forge-verify/references/verification-checklists.md +1 -1
  119. package/adapters/gemini/.feature-forge-bundle.json +1 -1
  120. package/adapters/gemini/gemini-extension.json +5 -1
  121. package/adapters/gemini/references/forge-config-schema.json +25 -3
  122. package/adapters/gemini/references/pipeline-state-schema.json +3 -2
  123. package/adapters/gemini/references/portable-root.md +6 -3
  124. package/adapters/gemini/references/process-overview.md +10 -0
  125. package/adapters/gemini/references/shared-conventions.md +27 -9
  126. package/adapters/gemini/references/stage-exit-protocol.md +206 -0
  127. package/adapters/gemini/scripts/epic-manifest.py +10 -0
  128. package/adapters/gemini/scripts/forge-bootstrap.py +94 -16
  129. package/adapters/gemini/scripts/forge-init.sh +7 -1
  130. package/adapters/gemini/scripts/forge-root.sh +20 -1
  131. package/adapters/gemini/scripts/forge-session.py +866 -31
  132. package/adapters/gemini/skills/forge/forge.md +34 -20
  133. package/adapters/gemini/skills/forge-0-epic/forge-0-epic.md +20 -25
  134. package/adapters/gemini/skills/forge-0-epic/references/edit-mode.md +6 -4
  135. package/adapters/gemini/skills/forge-0-epic/references/epic-manifest-subcommands.md +1 -1
  136. package/adapters/gemini/skills/forge-1-prd/forge-1-prd.md +13 -4
  137. package/adapters/gemini/skills/forge-2-tech/forge-2-tech.md +14 -4
  138. package/adapters/gemini/skills/forge-3-specs/forge-3-specs.md +13 -3
  139. package/adapters/gemini/skills/forge-4-backlog/forge-4-backlog.md +15 -5
  140. package/adapters/gemini/skills/forge-5-loop/forge-5-loop.md +21 -23
  141. package/adapters/gemini/skills/forge-5-loop/references/result-reporting.md +10 -5
  142. package/adapters/gemini/skills/forge-6-docs/forge-6-docs.md +6 -6
  143. package/adapters/gemini/skills/forge-bootstrap/forge-bootstrap.md +4 -4
  144. package/adapters/gemini/skills/forge-fix/forge-fix.md +29 -6
  145. package/adapters/gemini/skills/forge-guide/forge-guide.md +191 -0
  146. package/adapters/gemini/skills/forge-init/forge-init.md +29 -1
  147. package/adapters/gemini/skills/forge-verify/forge-verify.md +45 -14
  148. package/adapters/gemini/skills/forge-verify/references/verification-checklists.md +1 -1
  149. package/dist/apply.js +34 -8
  150. package/dist/cli.js +40 -4
  151. package/dist/fsutil.d.ts +0 -12
  152. package/dist/fsutil.js +10 -1
  153. package/dist/manifest.d.ts +1 -1
  154. package/dist/plan.js +22 -2
  155. package/dist/rauf.d.ts +4 -4
  156. package/dist/rauf.js +3 -3
  157. package/dist/report.js +1 -1
  158. package/dist/types.d.ts +1 -1
  159. package/package.json +1 -1
@@ -59,7 +59,7 @@ Every bash invocation begins with the byte-identical portable-root prelude, then
59
59
  helper. Pass `--specs-dir ./specs` (the default) so the gate allow-lists the specs directory.
60
60
 
61
61
  ```bash
62
- R="$(for d in "$HOME"/.claude/skills/feature-forge "$HOME"/.claude/plugins/*/feature-forge "$HOME"/.agents/skills/feature-forge ./.agents/skills/feature-forge; do [ -x "$d/scripts/forge-root.sh" ] && exec "$d/scripts/forge-root.sh"; done)"
62
+ R="$(bash -c 'for d in "$HOME"/.claude/skills/feature-forge "$HOME"/.claude/plugins/cache/*/feature-forge/* "$HOME"/.claude/plugins/*/feature-forge "$HOME"/.agents/skills/feature-forge ./.agents/skills/feature-forge; do [ -x "$d/scripts/forge-root.sh" ] && exec "$d/scripts/forge-root.sh"; done')"
63
63
  [ -n "$R" ] || { echo "feature-forge: cannot locate plugin root" >&2; exit 1; }
64
64
  python3 "$R/scripts/forge-bootstrap.py" check "<target-dir>" --json --specs-dir ./specs
65
65
  ```
@@ -136,7 +136,7 @@ when running under a Claude host (e.g. `AskUserQuestion` is available), else `"c
136
136
  `CLAUDE.md` only when `host == "claude"`.
137
137
 
138
138
  ```bash
139
- R="$(for d in "$HOME"/.claude/skills/feature-forge "$HOME"/.claude/plugins/*/feature-forge "$HOME"/.agents/skills/feature-forge ./.agents/skills/feature-forge; do [ -x "$d/scripts/forge-root.sh" ] && exec "$d/scripts/forge-root.sh"; done)"
139
+ R="$(bash -c 'for d in "$HOME"/.claude/skills/feature-forge "$HOME"/.claude/plugins/cache/*/feature-forge/* "$HOME"/.claude/plugins/*/feature-forge "$HOME"/.agents/skills/feature-forge ./.agents/skills/feature-forge; do [ -x "$d/scripts/forge-root.sh" ] && exec "$d/scripts/forge-root.sh"; done')"
140
140
  [ -n "$R" ] || { echo "feature-forge: cannot locate plugin root" >&2; exit 1; }
141
141
  python3 "$R/scripts/forge-bootstrap.py" scaffold "<target-dir>" --json --answers '<Answers JSON>'
142
142
  ```
@@ -144,7 +144,7 @@ python3 "$R/scripts/forge-bootstrap.py" scaffold "<target-dir>" --json --answers
144
144
  ### Step 5 — verify
145
145
 
146
146
  ```bash
147
- R="$(for d in "$HOME"/.claude/skills/feature-forge "$HOME"/.claude/plugins/*/feature-forge "$HOME"/.agents/skills/feature-forge ./.agents/skills/feature-forge; do [ -x "$d/scripts/forge-root.sh" ] && exec "$d/scripts/forge-root.sh"; done)"
147
+ R="$(bash -c 'for d in "$HOME"/.claude/skills/feature-forge "$HOME"/.claude/plugins/cache/*/feature-forge/* "$HOME"/.claude/plugins/*/feature-forge "$HOME"/.agents/skills/feature-forge ./.agents/skills/feature-forge; do [ -x "$d/scripts/forge-root.sh" ] && exec "$d/scripts/forge-root.sh"; done')"
148
148
  [ -n "$R" ] || { echo "feature-forge: cannot locate plugin root" >&2; exit 1; }
149
149
  python3 "$R/scripts/forge-bootstrap.py" verify "<target-dir>" --json --answers '<Answers JSON>'
150
150
  ```
@@ -170,7 +170,7 @@ and removes the sentinel before staging so it never enters history. Read
170
170
  leave the sentinel in-progress (resumable) — do **not** declare success.
171
171
 
172
172
  ```bash
173
- R="$(for d in "$HOME"/.claude/skills/feature-forge "$HOME"/.claude/plugins/*/feature-forge "$HOME"/.agents/skills/feature-forge ./.agents/skills/feature-forge; do [ -x "$d/scripts/forge-root.sh" ] && exec "$d/scripts/forge-root.sh"; done)"
173
+ R="$(bash -c 'for d in "$HOME"/.claude/skills/feature-forge "$HOME"/.claude/plugins/cache/*/feature-forge/* "$HOME"/.claude/plugins/*/feature-forge "$HOME"/.agents/skills/feature-forge ./.agents/skills/feature-forge; do [ -x "$d/scripts/forge-root.sh" ] && exec "$d/scripts/forge-root.sh"; done')"
174
174
  [ -n "$R" ] || { echo "feature-forge: cannot locate plugin root" >&2; exit 1; }
175
175
  python3 "$R/scripts/forge-bootstrap.py" commit "<target-dir>" --json --answers '<Answers JSON>' [--stage-only]
176
176
  ```
@@ -9,6 +9,17 @@ argument-hint: <feature-name>
9
9
 
10
10
  Apply fixes from the most recent forge-verify findings document, with step-level tracking for crash recovery.
11
11
 
12
+ Usually invoked by the user, but an **`autoFix` caller** may also invoke this skill automatically
13
+ when `autoFix: true` is configured **and** its preconditions hold (the findings document has zero
14
+ unresolved decision points, the working tree is clean, and a mandatory re-verify passes afterward).
15
+ Two callers drive that chain: an **authoring stage's in-stage auto-verify** (the primary path — see
16
+ `references/stage-exit-protocol.md`, the in-stage verify block) and the **`/feature-forge:forge`
17
+ navigator's catch-up** (§3b). The **fix application** below is identical either way — this skill is
18
+ not "auto-aware" about *applying* findings; it always applies the latest findings document. The
19
+ **caller** owns the gating decisions, including the closing re-verify: the Step 6 gate is presented
20
+ **only on a direct invocation**, because under an `autoFix` chain the caller (stage skill or
21
+ navigator) runs the mandatory re-verify itself.
22
+
12
23
  ## Prerequisites
13
24
 
14
25
  Read and follow `references/shared-conventions.md` for feature name validation, configuration reading, and force mode handling before proceeding.
@@ -55,11 +66,23 @@ Follow the Git Commit Protocol in `references/shared-conventions.md`.
55
66
  1. Update `{resolvedFeatureDir}/.pipeline-state.json`:
56
67
  - Set the relevant `forge-verify-*` entry status to `findings-applied`
57
68
  - Record `fixedAt` timestamp
58
- 2. If `gitCommitAfterStage` is true, follow the Git Commit Protocol: stage files (`git add {resolvedFeatureDir}/` — or `{specsDir}/{epic}/` for an epic member so the member-state change commits atomically with the epic subtree), attempt commit with message `"{commitPrefix}({feature}): apply {mode} verification fixes"`, then record commit hash only on success.
69
+ - Record `verifiedStageVersion` = the current `version` of the production stage entry
70
+ this verify covers (e.g. fixing `tech` findings → `stages["forge-2-tech"].version`).
71
+ This keeps the navigator's freshness ledger accurate after a fix, so the verified
72
+ stage reads as `fresh` and auto-verify does not needlessly re-fire on an unchanged
73
+ artifact. (If the fix itself bumped the production stage's `version`, use the new
74
+ value so the ledger reflects what was actually verified/fixed.)
75
+ 2. If `gitCommitAfterStage` is true, follow the Git Commit Protocol: stage files (`git add {resolvedFeatureDir}/` — or `{specsDir}/{epic}/` for an epic member so the member-state change commits atomically with the epic subtree), attempt commit with message `"{commitPrefix}({feature}): apply {mode} verification fixes"` (writing `commitHash: null` in that commit), then record the artifact-commit hash via the protocol's two-commit follow-up (never `--amend`) only on success.
76
+
77
+ ## Step 6: Re-verify Gate
78
+
79
+ Fixes are applied and recorded (`findings-applied`), so the stage reads **fresh** in the navigator's ledger (Step 5 set `verifiedStageVersion` to the current version). A re-verify is nonetheless the only thing that *confirms* the fixes actually resolved the findings, so on a **direct/manual** `forge-fix` invocation, **prompt** it rather than leaving it as a passive suggestion — this is the same **Standard Verify Gate** the stage skills stamp (`references/stage-exit-protocol.md`).
80
+
81
+ **Skip this gate when an `autoFix` caller invoked you as part of a chain** — the authoring stage's in-stage auto-verify (`references/stage-exit-protocol.md`, in-stage verify block) or the navigator's catch-up (`skills/forge/SKILL.md` §3b step 2b): there the caller owns the mandatory re-verify, so a second gate here would block the unattended flow or double the re-verify. Just return and let the caller proceed.
59
82
 
60
- ## Step 6: Next Steps
83
+ On a direct invocation, present the gate using `AskUserQuestion` with these three options — but only when the host has a question mechanism **and** the clean-room path is available (the `Agent` tool plus a dispatchable `forge-verifier` subagent):
84
+ - **Re-verify {feature} now** *(recommended)* — dispatch the clean-room `forge-verifier` subagent from this session in require-clean mode to confirm every finding is resolved; the digest returns here so any remaining issue keeps its context. One-time — it does **not** change config.
85
+ - **Re-verify now + enable auto-verify going forward** — re-verify now **and** patch `"autoVerify": true` into `forge.config.json` in place (preserve formatting and every other key) so future stages verify automatically, no prompt. This complements the `forge-init` opt-in. **Do not auto-commit this config change** — treat it like `notes`: a user-facing edit the user commits on their own cadence, never folded into a stage's artifact commit.
86
+ - **Skip for now** — proceed without re-verifying; the fixes are already recorded, so the stage stays `findings-applied` (fresh in the ledger). Run `/feature-forge:forge {feature}` when you want pipeline status.
61
87
 
62
- Tell the user:
63
- "Fixes applied. Next steps:
64
- - Run `/feature-forge:forge-verify {feature}` again to confirm all issues are resolved
65
- - Or `/feature-forge:forge {feature}` to see pipeline status"
88
+ **Host / clean-room fallback (not a user-selectable option):** if the question mechanism, the `Agent` tool, or the `forge-verifier` subagent is unavailable, do **not** run clean-room — degrade to printing `/feature-forge:forge-verify {feature}` for the user to run inline/manually (mirroring `autoInvokeNextStage`), and offer the auto-verify enable as plain text only if a config write is possible.
@@ -0,0 +1,182 @@
1
+ ---
2
+ # GENERATED — DO NOT EDIT. Source: skills/forge-guide/SKILL.md. Regenerate: python3 scripts/build-adapters.py
3
+ name: forge-guide
4
+ description: Explain what feature-forge is, when to use it, how to configure it, and its best practices — advisory guidance, not stage execution. Use when the user or another agent asks what feature-forge is, whether/when to adopt it, how the pipeline works conceptually, how to set up or configure forge.config.json, or for usage tips and best practices. Do NOT trigger to RUN a pipeline stage (use forge-1-prd … forge-6-docs), to show a specific feature's status (use forge), or for general software questions unrelated to feature-forge.
5
+ argument-hint: '<optional topic: overview | when | setup | config | stages | verify | context | epics | loop | troubleshoot>'
6
+ ---
7
+
8
+ # Feature Forge — Usage & Best-Practices Guide
9
+
10
+ You are the **guide** for feature-forge: an advisor, not an operator. Your job is to
11
+ explain *what* forge is, *when* to use it, *how* to configure it, and *what the best
12
+ practices are* — in plain language, grounded in the repo's own docs. You do **not**
13
+ run pipeline stages; when the user is ready to act, point them at the right skill.
14
+
15
+ ## How to answer
16
+
17
+ 1. Identify the topic (the argument, or infer from the question).
18
+ 2. **Ground yourself in the canonical source before answering** — read the mapped
19
+ reference file(s) below rather than answering from memory. These are the source
20
+ of truth and stay current as the pipeline evolves.
21
+ 3. Answer concisely, then end with the concrete next command (`/feature-forge:forge-*`)
22
+ or doc pointer the user should go to.
23
+
24
+ | Topic | Read first |
25
+ |-------|-----------|
26
+ | Pipeline architecture, stage-by-stage flow | `references/process-overview.md` |
27
+ | Cross-stage conventions (naming, state, git, branch, epic injection) | `references/shared-conventions.md` |
28
+ | Config keys + defaults | `references/forge-config-schema.json` |
29
+ | Stack detection / language profiles | `references/stack-resolution.md`, `references/stacks/*.md` |
30
+ | Loop runner interface, signals & version gate | `references/ralph-loop-contract.md` |
31
+ | Deep dives, glossary, troubleshooting | `references/process-overview.md`, `references/shared-conventions.md` |
32
+
33
+ Those `references/` files are the guaranteed grounding path — they ship in every install.
34
+ The project's `README.md`, `COMPATIBILITY.md`, and the hosted docs site are richer but are
35
+ **not** part of an installed bundle, so treat them as optional enrichment (offer the docs-site
36
+ URL to a human) and never block an answer on opening them — fall back to the `references/`
37
+ files and your own knowledge.
38
+
39
+ Do NOT actually invoke stage skills or write files — this skill only explains and directs.
40
+
41
+ ## What feature-forge is
42
+
43
+ A **feature development pipeline** that refines a vague idea into shipped code through
44
+ discrete, auditable stages — like a compiler for features. Each stage narrows scope and
45
+ adds structure, reading the previous stage's artifacts as standalone contracts:
46
+
47
+ - **PRD** — *what* to build (requirements only, no technology).
48
+ - **Tech spec** — *how* to build it (design, grounded in the codebase).
49
+ - **Implementation specs** — build-ready detail (types, signatures, contracts, tests).
50
+ - **Backlog** — self-contained work items for autonomous execution.
51
+ - **Loop** — a fresh-context runner implements each item, tests, and commits.
52
+ - **Docs** — architecture reference generated from the real implementation.
53
+
54
+ `REQ-XXX-NN` requirement IDs form a traceability spine from PRD through implementation.
55
+ **Verification gates** are available after any stage and run clean-room in a fresh subagent.
56
+
57
+ ## When to use it — and when not
58
+
59
+ **Use forge when:** you have a well-defined feature or small epic to ship; you want
60
+ requirements captured cleanly before coding; you value traceability, thorough spec
61
+ verification, and autonomous loop execution with fresh context per item; you want
62
+ reproducible, auditable artifacts.
63
+
64
+ **Skip forge when:** the work is an exploratory spike with still-fluid requirements
65
+ (though Stage 1's interview can help clarify them); it's a one-line bug fix or trivial
66
+ patch where pipeline overhead isn't justified; or you're only extending mature code
67
+ along established patterns, where new specs become noise.
68
+
69
+ **Anti-patterns to warn against:** skipping the PRD and jumping to tech spec (the value
70
+ comes from separating *what* from *how*); treating specs as living contracts (they're
71
+ pre-implementation — drop an `AGENTS.md`/`CLAUDE.md` in the specs dir telling agents to
72
+ ignore drift); forcing an epic for a single feature; relying on conversation memory to
73
+ carry context across stages instead of reading upstream artifacts.
74
+
75
+ ## The pipeline at a glance
76
+
77
+ | Stage | Skill | Produces |
78
+ |-------|-------|----------|
79
+ | 0 (optional) | `forge-0-epic` | `epic-manifest.json` + `EPIC.md` (members, deps, `exposes`/`consumes` contracts) |
80
+ | 1 | `forge-1-prd` | `PRD.md` with `REQ-*` IDs |
81
+ | 2 | `forge-2-tech` | `tech-spec.md`; detects stack + test/typecheck commands |
82
+ | 3 | `forge-3-specs` | numbered spec suite + `TRACEABILITY.md` |
83
+ | 4 | `forge-4-backlog` | `backlog.json` (self-contained items) |
84
+ | 5 | `forge-5-loop` | implemented code, tested + committed per item |
85
+ | 6 | `forge-6-docs` | architecture docs from the real code |
86
+ | any | `forge-verify` → `forge-fix` | findings report → applied fixes |
87
+ | any | `forge` | status dashboard / navigator |
88
+
89
+ Drive the whole thing with the **navigator**: `/feature-forge:forge <feature>` shows the
90
+ current stage and offers the next; with `autoInvokeNextStage` it launches it directly.
91
+
92
+ ## Setup & configuration
93
+
94
+ **First-time setup:** `/feature-forge:forge-init` (existing repo) creates `forge.config.json`
95
+ with defaults. `/feature-forge:forge-bootstrap` scaffolds a *greenfield* (empty) repo to a
96
+ green baseline. On non-Claude agents, install via `npx @garygentry/feature-forge install`.
97
+
98
+ **Key `forge.config.json` knobs** (authoritative list: `references/forge-config-schema.json`):
99
+
100
+ - **Paths** — `specsDir` (`./specs`), `docsDir` (`./docs/architecture`), `backlogDir`.
101
+ - **Git** — `gitCommitAfterStage` (true), `commitPrefix` (`forge`); commits use a two-commit
102
+ protocol so the stage's commit hash is recorded in state without `--amend`.
103
+ - **Branch** — `branchPerFeature` (true), `branchPrefix` (`forge/`): isolate each feature.
104
+ - **Stack** — `stack`, `typeCheckCommand`, `testCommand`: null until Stage 2 auto-detects them.
105
+ - **Context** — `contextWindowTokens`, `contextWarnThreshold` (0.7): the navigator warns to
106
+ `/clear` past this fullness. On 1M-context models set `contextWindowTokens` explicitly.
107
+ - **Verification** — `autoVerify` (false; when on, each authoring stage verifies in-stage before its exit block), `autoVerifyStages`, `autoFix` (false).
108
+ - **Stage flow** — `autoInvokeNextStage` (true on Claude, print-only elsewhere).
109
+ - **Loop** — `loopRunner` block (binary, command templates, version gate, agent selection);
110
+ defaults to **rauf** when absent. `workspaces` supports monorepos.
111
+
112
+ ## Verification gates
113
+
114
+ `forge-verify <feature>` dispatches the read-only `forge-verifier` subagent to find gaps,
115
+ inconsistencies, and quality issues; it writes a findings doc, and `forge-fix` applies them.
116
+ Because verification runs in a **fresh subagent**, it's clean-room by construction — it never
117
+ needs a `/clear`, and it's safe to automate with `autoVerify: true`. When on, the just-completed
118
+ authoring stage runs verify **in-stage** — in the same session, right before its exit block — so
119
+ the digest and any fix land where the context still exists (the navigator only catches up if a
120
+ host couldn't run it clean-room). Fixing stays human-gated unless `autoFix: true`. The cost is one
121
+ extra clean-room verify per stage. **Always verify before Stage 5 (the loop)** — catching errors in
122
+ specs/backlog is far cheaper than mid-loop. Verifying after PRD and after backlog is also
123
+ recommended. A findings pass is fresh only while the artifact `version` matches what was
124
+ verified; revise upstream and downstream re-verifies.
125
+
126
+ ## Context management
127
+
128
+ Each stage reads upstream artifacts as standalone contracts, so you can (and usually should)
129
+ `/clear` between them:
130
+
131
+ - **Clear** between PRD → tech, tech → specs, specs → backlog, backlog → loop.
132
+ - **Stay warm** mid-interview (PRD, tech spec) — the interview needs a continuous thread.
133
+ - **No clear needed** for any → verify (runs in a fresh subagent).
134
+
135
+ The navigator warns when the session passes `contextWarnThreshold` (default 70% full).
136
+
137
+ ## Epics (large changes)
138
+
139
+ Use Stage 0 only when a change naturally splits into **several interdependent features** that
140
+ must agree on interfaces. `forge-0-epic` produces `epic-manifest.json` + `EPIC.md` with a
141
+ per-member charter, `exposes`/`consumes` contracts, and `dependsOn` edges. Each member then
142
+ runs the normal pipeline with epic context injected. At Stage 5 a **dependency gate** warns if
143
+ a member's dependencies are unmet. Epic support is purely additive — single-feature flows are
144
+ unchanged. Re-run `forge-0-epic` on an existing epic to enter edit mode.
145
+
146
+ ## The loop
147
+
148
+ Stage 5 runs a configurable runner (**rauf** by default) that gives each backlog item a fresh
149
+ agent session — implement → run the verification command → commit on pass. This is why items
150
+ must be truly **self-contained**; context bleed breaks the model. Per-item signals:
151
+
152
+ - `RAUF_DONE` — item passed; loop continues.
153
+ - `RAUF_BLOCKED` — missing dependency / unclear requirement; set aside, loop continues others.
154
+ - `RAUF_NEEDS_HUMAN` — decision or secret needed; set aside, loop continues.
155
+
156
+ The loop doesn't pause on blocked items. Supply what's missing, then `rauf resume <path>` to
157
+ retry set-aside items. The runner refuses to start with a **dirty working tree** and enforces
158
+ a minimum runner version (the version gate is described in `references/ralph-loop-contract.md`).
159
+
160
+ ## Best practices & gotchas
161
+
162
+ - Feature name is **required** for every stage command — never guess or infer it.
163
+ - Verify **before the loop**; a bad spec is cheap to fix now, expensive mid-loop.
164
+ - Keep backlog items self-contained — the loop has zero memory across items.
165
+ - Let stages commit for you; don't hand-edit `.pipeline-state.json` or backlog status.
166
+ - Re-running an upstream stage marks downstream stages **stale** — re-run them rather than
167
+ reaching for `--force`, which skips prerequisite checks and should be rare.
168
+ - Specs are pre-implementation artifacts, not living docs — don't cite them from generated code.
169
+ - Use the navigator (`/feature-forge:forge <feature>`) to orient; use `forge-verify` to inspect.
170
+
171
+ ## Troubleshooting starters
172
+
173
+ - **Stage 5 won't start:** backlog exists and is verified? runner installed and ≥ min version?
174
+ working tree clean? See `references/ralph-loop-contract.md` for the runner contract and version gate.
175
+ - **Loop stopped mid-run:** check the signal — `BLOCKED`/`NEEDS_HUMAN` items are set aside, not
176
+ failures; the loop keeps going.
177
+ - **Downstream flagged stale:** an upstream stage was revised; re-run the downstream stage.
178
+ - **Where am I?** `/feature-forge:forge <feature>` renders the full pipeline status.
179
+
180
+ For anything deeper, ground yourself in `references/process-overview.md` and
181
+ `references/shared-conventions.md`, and point the *user* at the hosted docs site —
182
+ <https://garygentry.github.io/feature-forge/> — for the full guides and glossary.
@@ -9,7 +9,7 @@ description: Initialize feature-forge configuration in the current project. Use
9
9
  Run the initialization script to create `forge.config.json` with default settings:
10
10
 
11
11
  ```bash
12
- R="$(for d in "$HOME"/.claude/skills/feature-forge "$HOME"/.claude/plugins/*/feature-forge "$HOME"/.agents/skills/feature-forge ./.agents/skills/feature-forge; do [ -x "$d/scripts/forge-root.sh" ] && exec "$d/scripts/forge-root.sh"; done)"
12
+ R="$(bash -c 'for d in "$HOME"/.claude/skills/feature-forge "$HOME"/.claude/plugins/cache/*/feature-forge/* "$HOME"/.claude/plugins/*/feature-forge "$HOME"/.agents/skills/feature-forge ./.agents/skills/feature-forge; do [ -x "$d/scripts/forge-root.sh" ] && exec "$d/scripts/forge-root.sh"; done')"
13
13
  [ -n "$R" ] || { echo "feature-forge: cannot locate plugin root" >&2; exit 1; }
14
14
  bash "$R/scripts/forge-init.sh"
15
15
  ```
@@ -26,7 +26,35 @@ After initialization, the config file will contain defaults for:
26
26
  - `autoInvokeNextStage`: `true` (the navigator auto-starts the next stage after you confirm; set `false` to only print the command)
27
27
  - `contextWindowTokens`: `null` (the navigator infers the context window; set to your model's window, e.g. `1000000` for a 1M-context model, for accurate context-usage advice)
28
28
  - `contextWarnThreshold`: `0.7` (fraction of the window past which the navigator suggests a clean session)
29
+ - `autoVerify`: `false` (set `true` to run `forge-verify` automatically after each authoring stage completes — in-stage, in the same session, before the exit block; it costs an extra clean-room verify per stage, so it trades a little time/tokens for catching errors early)
30
+ - `autoVerifyStages`: `{}` (per-stage overrides for `autoVerify`)
31
+ - `autoFix`: `false` (set `true` to chain `forge-fix` after an auto-verify finds issues)
29
32
 
30
33
  If `forge.config.json` already exists, the script will not overwrite it.
31
34
 
35
+ ## Offer auto-verify
36
+
37
+ The template writes `autoVerify: false`. After the config is created (and only when the script
38
+ actually created it — skip this if it reported the file already exists), offer to turn
39
+ auto-verify on, then write the choice back into `forge.config.json`.
40
+
41
+ If the `AskUserQuestion` tool is available, ask exactly one question:
42
+
43
+ > **Enable auto-verify?** Verification runs in a clean-room subagent in-stage after each
44
+ > authoring stage completes — in the same session, before the exit block, so any fix
45
+ > decision keeps its context. It never needs a `/clear` and only returns a compact digest.
46
+ > **Recommended: on.** (Change later by editing `autoVerify` in `forge.config.json`.)
47
+
48
+ Options: **Enable (recommended)** / **Leave off**.
49
+
50
+ - On **Enable**: patch `"autoVerify": false` → `"autoVerify": true` in the generated
51
+ `forge.config.json` in place, preserving formatting and every other key.
52
+ - On **Leave off**: leave the config as written (`autoVerify: false`).
53
+
54
+ If the host lacks a structured question tool but can still prompt the user (e.g. Codex asks in
55
+ plain text), use that — ask the one question directly and wait for the reply; it is the same
56
+ choice, just rendered differently. Only when the host has **no** way to ask at all (a fully
57
+ non-interactive / headless run) do you skip the prompt: leave `autoVerify: false` and print the
58
+ one-line note `Set "autoVerify": true in forge.config.json to verify automatically after each stage.`
59
+
32
60
  After initialization, start the pipeline with `/feature-forge:forge-1-prd <feature-name>`.
@@ -2,7 +2,7 @@
2
2
  # GENERATED — DO NOT EDIT. Source: skills/forge-verify/SKILL.md. Regenerate: python3 scripts/build-adapters.py
3
3
  name: forge-verify
4
4
  description: Verify forge pipeline artifacts for completeness, consistency, and quality. Use when user runs /feature-forge:forge-verify or asks to check forge specs, backlog, or implementation for gaps. Do NOT trigger for general code review, quality checks, or verification tasks outside the forge pipeline.
5
- argument-hint: '<feature-name> [stage: prd|tech|specs|backlog|impl]'
5
+ argument-hint: '<feature-name> [stage: prd|tech|specs|backlog|impl] [--require-clean]'
6
6
  ---
7
7
 
8
8
  # forge-verify — Verification Gate
@@ -48,7 +48,7 @@ Pick based on how many checks the mode carries (see the per-mode totals in Step
48
48
 
49
49
  The verifier(s) are read-only — they return findings as their response; **you** (the
50
50
  parent) assemble and write the single document to
51
- `{specsDir}/{feature}/.verification/VERIFY-{mode}-{YYYY-MM-DD}.md`. When you fanned out:
51
+ `{resolvedFeatureDir}/.verification/VERIFY-{mode}-{YYYY-MM-DD}.md`. When you fanned out:
52
52
  1. Concatenate all instances' findings and **renumber `V-NNN` IDs uniquely** across the
53
53
  merged set.
54
54
  2. **Dedup** overlaps — when two instances flag the same file+location+issue (e.g. a
@@ -73,15 +73,39 @@ without subagents), fall back to running verification inline in the current sess
73
73
 
74
74
  **Inline execution guidance:** If running inline (not as subagent), process verification checklists one category at a time to manage context pressure. Load only the artifacts needed for each category, verify, summarize findings, then move to the next category.
75
75
 
76
+ ### Require-clean (`auto`) mode — unattended auto-verify
77
+
78
+ When the navigator auto-invokes this skill (its `autoVerify` path), it passes a
79
+ **require-clean** signal (e.g. args include `--require-clean`, or the invocation is
80
+ described as auto-verify). In this mode the clean-room guarantee is load-bearing: the
81
+ whole reason auto-verify is safe to run without a `/clear` is that the `forge-verifier`
82
+ subagent inherits none of the dispatching session's context. Running inline would break
83
+ that — it would consume the dispatching session's context and invalidate the no-clear
84
+ justification.
85
+
86
+ So in require-clean mode, **do NOT fall back to inline execution**. If the `Agent` tool
87
+ or `forge-verifier` subagent is not dispatchable, return a **sentinel** instead of doing
88
+ any work:
89
+
90
+ > `CLEAN_ROOM_UNAVAILABLE: forge-verifier subagent not dispatchable — verify not run.`
91
+
92
+ Do not analyze artifacts, do not write a findings document, and do not touch pipeline
93
+ state. The navigator detects this sentinel and degrades to its manual verify gate (Tier
94
+ 2/3), so verify state stays outstanding and the stage is never marked verified on false
95
+ assurance. **Manual / interactive invocation** (the normal `/feature-forge:forge-verify`
96
+ path, no require-clean signal) keeps the inline fallback above unchanged.
97
+
76
98
  ## Prerequisites
77
99
 
78
100
  Read and follow `references/shared-conventions.md` for feature name validation, configuration reading, and force mode handling before proceeding.
79
101
 
102
+ Resolve the feature directory via the **Feature Directory Resolution** block in `references/shared-conventions.md` (so a standalone feature resolves to its flat `{specsDir}/{feature}/` path exactly as today, and an epic member resolves to its nested `{specsDir}/{epic}/{feature}/` path). Use the resulting `{resolvedFeatureDir}` everywhere this skill reads or writes a per-feature artifact or state file — the `{specsDir}/{feature}/…` forms below are shorthand for the resolved path, not a literal flat layout. This does not apply to **epic mode**, whose paths are epic-scoped (`{specsDir}/{epic}/…`) by design.
103
+
80
104
  **Turn structure reminder:** Output analysis/context as text, then route ALL questions through `AskUserQuestion`. Never embed questions in text output — the user will not be prompted and the session will stall.
81
105
 
82
106
  ## Step 1: Read Configuration and Determine Mode
83
107
 
84
- Read `{specsDir}/{feature}/.pipeline-state.json` to understand current pipeline state.
108
+ Read `{resolvedFeatureDir}/.pipeline-state.json` to understand current pipeline state.
85
109
 
86
110
  ### Mode Selection
87
111
 
@@ -101,16 +125,16 @@ If ambiguous, use `AskUserQuestion` to ask which stage to verify.
101
125
  Load into context ALL artifacts for this feature based on mode:
102
126
 
103
127
  **For prd mode:**
104
- - `{specsDir}/{feature}/PRD.md`
128
+ - `{resolvedFeatureDir}/PRD.md`
105
129
 
106
130
  **For tech mode:**
107
- - `{specsDir}/{feature}/PRD.md`
108
- - `{specsDir}/{feature}/tech-spec.md`
131
+ - `{resolvedFeatureDir}/PRD.md`
132
+ - `{resolvedFeatureDir}/tech-spec.md`
109
133
 
110
134
  **For specs mode:**
111
- - `{specsDir}/{feature}/PRD.md`
112
- - `{specsDir}/{feature}/tech-spec.md`
113
- - `{specsDir}/{feature}/##-*.md` (all implementation specs)
135
+ - `{resolvedFeatureDir}/PRD.md`
136
+ - `{resolvedFeatureDir}/tech-spec.md`
137
+ - `{resolvedFeatureDir}/##-*.md` (all implementation specs)
114
138
 
115
139
  **For backlog mode:**
116
140
  - All of the above, PLUS
@@ -151,7 +175,7 @@ Every finding must include:
151
175
 
152
176
  ## Step 4: Write Findings Document
153
177
 
154
- Ensure the `.verification/` subdirectory exists, then write findings to `{specsDir}/{feature}/.verification/VERIFY-{mode}-{YYYY-MM-DD}.md`.
178
+ Ensure the `.verification/` subdirectory exists, then write findings to `{resolvedFeatureDir}/.verification/VERIFY-{mode}-{YYYY-MM-DD}.md`.
155
179
 
156
180
  **For epic mode**, the target is `{specsDir}/{epic}/.verification/VERIFY-epic-{YYYY-MM-DD}.md` (the same format, with `{mode}=epic`).
157
181
 
@@ -187,9 +211,16 @@ Do NOT embed this question in your text output.
187
211
 
188
212
  Write pipeline state conforming to `references/pipeline-state-schema.json`.
189
213
 
190
- Update `{specsDir}/{feature}/.pipeline-state.json`:
191
- - Set the relevant verify entry status to `findings-reported`
214
+ Update `{resolvedFeatureDir}/.pipeline-state.json`:
215
+ - Set the relevant verify entry status to `findings-reported` (or `passed` when there
216
+ are zero findings)
192
217
  - Record `findingsFile`, `findingsCount`, `verifiedAt`
218
+ - Record `verifiedStageVersion` = the current `version` of the production stage entry
219
+ this verify covers (e.g. verifying `tech` → `stages["forge-2-tech"].version`). This
220
+ feeds the navigator's freshness ledger: a later revision to that artifact bumps its
221
+ `version`, so the recorded value no longer matches and auto-verify re-fires. Omitting
222
+ this leaves the verify looking stale (safe: the navigator re-verifies rather than
223
+ skips).
193
224
 
194
225
  Do NOT mark as `findings-applied` — that happens after the fix pass.
195
226
 
@@ -214,11 +245,11 @@ Do NOT mark as `findings-applied` — that happens after the fix pass.
214
245
  - Don't verify things that are intentionally left open (check the PRD's "Open Questions" section).
215
246
  - If you find zero issues, say so honestly. Don't manufacture findings to seem thorough. But zero findings on a complex feature is suspicious — double-check.
216
247
  - The findings document must be self-contained. A fresh agent reading it should be able to apply every fix without needing conversational context from this session.
217
- - For backlog verification, also run the loop runner's validate command (resolve `loopRunner` from `forge.config.json`, default rauf: `rauf backlog validate . --backlog {backlogDir} --specs-dir {specsDir}/{feature} --json`). Include any findings it reports (exit 1) as verification findings; if the runner isn't installed yet (command missing), note that backlog validation was skipped rather than failing.
248
+ - For backlog verification, also run the loop runner's validate command (resolve `loopRunner` from `forge.config.json`, default rauf: `rauf backlog validate . --backlog {backlogDir} --specs-dir {resolvedFeatureDir} --json`). Include any findings it reports (exit 1) as verification findings; if the runner isn't installed yet (command missing), note that backlog validation was skipped rather than failing.
218
249
  - For specs verification, also run the deterministic traceability validator to supplement agent-driven traceability checks. Include any uncovered requirements or orphaned references as findings:
219
250
 
220
251
  ```bash
221
- R="$(for d in "$HOME"/.claude/skills/feature-forge "$HOME"/.claude/plugins/*/feature-forge "$HOME"/.agents/skills/feature-forge ./.agents/skills/feature-forge; do [ -x "$d/scripts/forge-root.sh" ] && exec "$d/scripts/forge-root.sh"; done)"
252
+ R="$(bash -c 'for d in "$HOME"/.claude/skills/feature-forge "$HOME"/.claude/plugins/cache/*/feature-forge/* "$HOME"/.claude/plugins/*/feature-forge "$HOME"/.agents/skills/feature-forge ./.agents/skills/feature-forge; do [ -x "$d/scripts/forge-root.sh" ] && exec "$d/scripts/forge-root.sh"; done')"
222
253
  [ -n "$R" ] || { echo "feature-forge: cannot locate plugin root" >&2; exit 1; }
223
- python3 "$R/scripts/validate-traceability.py" {specsDir}/{feature}/PRD.md {specsDir}/{feature}/ --json
254
+ python3 "$R/scripts/validate-traceability.py" {resolvedFeatureDir}/PRD.md {resolvedFeatureDir}/ --json
224
255
  ```
@@ -192,7 +192,7 @@ findings to E01/E02/E03/E08. Then perform the judgment checks E04–E07 by readi
192
192
  manifest, EPIC.md, and completed members' specs.
193
193
 
194
194
  ```bash
195
- R="$(for d in "$HOME"/.claude/skills/feature-forge "$HOME"/.claude/plugins/*/feature-forge "$HOME"/.agents/skills/feature-forge ./.agents/skills/feature-forge; do [ -x "$d/scripts/forge-root.sh" ] && exec "$d/scripts/forge-root.sh"; done)"
195
+ R="$(bash -c 'for d in "$HOME"/.claude/skills/feature-forge "$HOME"/.claude/plugins/cache/*/feature-forge/* "$HOME"/.claude/plugins/*/feature-forge "$HOME"/.agents/skills/feature-forge ./.agents/skills/feature-forge; do [ -x "$d/scripts/forge-root.sh" ] && exec "$d/scripts/forge-root.sh"; done')"
196
196
  [ -n "$R" ] || { echo "feature-forge: cannot locate plugin root" >&2; exit 1; }
197
197
  python3 "$R/scripts/epic-manifest.py" validate "{epic}" --specs-dir "{specsDir}" --json
198
198
  ```
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "feature-forge",
3
- "version": "0.11.0",
3
+ "version": "0.12.0",
4
4
  "agent": "codex",
5
5
  "generatedBy": "python3 scripts/build-adapters.py"
6
6
  }
@@ -16,7 +16,8 @@
16
16
  },
17
17
  "backlogDir": {
18
18
  "type": ["string", "null"],
19
- "description": "Optional override for backlog location. If set, backlog.json is written here instead of with the feature specs. Default behavior (null): backlog.json is written to {specsDir}/{feature}/backlog.json."
19
+ "default": null,
20
+ "description": "Optional override for the backlog root. If set, the backlog is written to {backlogDir}/{feature}/backlog.json — the {feature} subdirectory is always composed in so multi-feature epics never collide. Default behavior (null): backlog.json is written to {specsDir}/{feature}/backlog.json with the feature specs."
20
21
  },
21
22
  "gitCommitAfterStage": {
22
23
  "type": "boolean",
@@ -61,6 +62,27 @@
61
62
  "default": true,
62
63
  "description": "When true (default), the /feature-forge:forge navigator auto-invokes the next pipeline stage via the Skill tool after the user confirms it, instead of only printing the command to copy. Set false to keep the old copy-paste behavior (the navigator suggests the command but never launches it). Ignored on non-Claude hosts, which always fall back to printing the command."
63
64
  },
65
+ "autoVerify": {
66
+ "type": "boolean",
67
+ "default": false,
68
+ "description": "When true, the /feature-forge:forge navigator automatically runs forge-verify after a stage completes, with no prompt. forge-verify runs in a fresh forge-verifier subagent (clean-room), so it never needs a context clear and costs the current session only a compact findings digest. Default false preserves today's manual-gate behavior. Ignored on non-Claude hosts, which always fall back to printing the verify command. Per-stage overrides in autoVerifyStages take precedence."
69
+ },
70
+ "autoVerifyStages": {
71
+ "type": "object",
72
+ "default": {},
73
+ "description": "Per-stage overrides for autoVerify. Maps a production stage id to a boolean; the effective value for a stage is autoVerifyStages[stage] if present, else autoVerify. Keys are constrained to the five verify-capable stages so a typo (e.g. 'forge-1-prod') is a schema error, not a silent no-op. forge-6-docs has no verify step and is not a valid key.",
74
+ "propertyNames": {
75
+ "enum": ["forge-1-prd", "forge-2-tech", "forge-3-specs", "forge-4-backlog", "forge-5-loop"]
76
+ },
77
+ "additionalProperties": {
78
+ "type": "boolean"
79
+ }
80
+ },
81
+ "autoFix": {
82
+ "type": "boolean",
83
+ "default": false,
84
+ "description": "When true, the navigator chains forge-fix automatically after an auto-verify that finds issues. Honored ONLY when auto-verify is effectively on for the stage, and ONLY when preconditions hold (findings doc has zero unresolved decision points, working tree is clean, and a mandatory re-verify passes) — otherwise it falls back to surfacing the findings digest and prompting. Default false keeps fixing human-gated."
85
+ },
64
86
  "contextWindowTokens": {
65
87
  "type": ["integer", "null"],
66
88
  "default": null,
@@ -190,8 +212,8 @@
190
212
  },
191
213
  "installHint": {
192
214
  "type": "string",
193
- "default": "Provision rauf for a multi-agent setup with the cross-agent installer: `npx @garygentry/feature-forge install` (records the pinned @garygentry/rauf@0.11.0 default). Or install/upgrade just the rauf CLI: `npx @garygentry/rauf@0.11.0 --version`, or `curl -fsSL https://raw.githubusercontent.com/garygentry/rauf/main/scripts/install-binary.sh | bash`.",
194
- "description": "Shown when the runner BINARY is missing or too old (version gate fails, minRunnerVersion floor) — how to obtain/upgrade the CLI itself. Names two distinct binary-provisioning paths: (1) the cross-agent installer (`npx @garygentry/feature-forge install`, the multi-agent provisioning path that pins @garygentry/rauf@0.11.0), and (2) the direct rauf-CLI install/upgrade one-liner. Distinct from setupHint (which installs per-project artifacts); a version-gate failure is ALWAYS this hint, never setupHint."
215
+ "default": "Provision rauf for a multi-agent setup with the cross-agent installer: `npx @garygentry/feature-forge install` (records the pinned @garygentry/rauf@0.12.0 default). Or install/upgrade just the rauf CLI: `npx @garygentry/rauf@0.12.0 --version`, or `curl -fsSL https://raw.githubusercontent.com/garygentry/rauf/main/scripts/install-binary.sh | bash`.",
216
+ "description": "Shown when the runner BINARY is missing or too old (version gate fails, minRunnerVersion floor) — how to obtain/upgrade the CLI itself. Names two distinct binary-provisioning paths: (1) the cross-agent installer (`npx @garygentry/feature-forge install`, the multi-agent provisioning path that pins @garygentry/rauf@0.12.0), and (2) the direct rauf-CLI install/upgrade one-liner. Distinct from setupHint (which installs per-project artifacts); a version-gate failure is ALWAYS this hint, never setupHint."
195
217
  },
196
218
  "schemaVersion": {
197
219
  "type": "string",
@@ -80,7 +80,7 @@
80
80
  "completedAt": { "type": ["string", "null"], "format": "date-time" },
81
81
  "commitHash": {
82
82
  "type": ["string", "null"],
83
- "description": "Git commit SHA after this stage completed"
83
+ "description": "Git commit SHA of this stage's artifact commit (Commit 1 of the two-commit Git Commit Protocol in shared-conventions.md). Written by a small follow-up commit so it points at the artifact commit itself, never at an orphaned amend or the hash-recording commit. null until recorded (or when there was no new artifact commit)."
84
84
  },
85
85
  "basedOnVersions": {
86
86
  "type": "object",
@@ -107,7 +107,8 @@
107
107
  },
108
108
  "verifiedAt": { "type": ["string", "null"], "format": "date-time" },
109
109
  "fixedAt": { "type": ["string", "null"], "format": "date-time" },
110
- "commitHash": { "type": ["string", "null"] }
110
+ "commitHash": { "type": ["string", "null"], "description": "Git commit SHA of the verify/fix artifact commit. Recorded via the two-commit Git Commit Protocol (shared-conventions.md) so it points at the artifact commit, never an orphaned amend." },
111
+ "verifiedStageVersion": { "type": ["integer", "null"], "description": "The production stage's `version` at the moment this verify was resolved. The navigator's freshness ledger compares it to the stage's current `version`: equal means the verify is fresh; a mismatch (artifact revised since) or an absent field (legacy state) means stale, so auto-verify re-fires. Recorded by forge-verify/forge-fix when writing a passed/findings-applied status." }
111
112
  }
112
113
  }
113
114
  }
@@ -12,7 +12,7 @@ against the fenced block here, byte-for-byte.
12
12
  ## Canonical bootstrap prelude
13
13
 
14
14
  ```bash
15
- R="$(for d in "$HOME"/.claude/skills/feature-forge "$HOME"/.claude/plugins/*/feature-forge "$HOME"/.agents/skills/feature-forge ./.agents/skills/feature-forge; do [ -x "$d/scripts/forge-root.sh" ] && exec "$d/scripts/forge-root.sh"; done)"
15
+ R="$(bash -c 'for d in "$HOME"/.claude/skills/feature-forge "$HOME"/.claude/plugins/cache/*/feature-forge/* "$HOME"/.claude/plugins/*/feature-forge "$HOME"/.agents/skills/feature-forge ./.agents/skills/feature-forge; do [ -x "$d/scripts/forge-root.sh" ] && exec "$d/scripts/forge-root.sh"; done')"
16
16
  [ -n "$R" ] || { echo "feature-forge: cannot locate plugin root" >&2; exit 1; }
17
17
  ```
18
18
 
@@ -24,7 +24,7 @@ makes several calls, add the prelude once and reuse `$R` for each. A fresh block
24
24
  prelude (per-block re-resolution). Worked example:
25
25
 
26
26
  ```bash
27
- R="$(for d in "$HOME"/.claude/skills/feature-forge "$HOME"/.claude/plugins/*/feature-forge "$HOME"/.agents/skills/feature-forge ./.agents/skills/feature-forge; do [ -x "$d/scripts/forge-root.sh" ] && exec "$d/scripts/forge-root.sh"; done)"
27
+ R="$(bash -c 'for d in "$HOME"/.claude/skills/feature-forge "$HOME"/.claude/plugins/cache/*/feature-forge/* "$HOME"/.claude/plugins/*/feature-forge "$HOME"/.agents/skills/feature-forge ./.agents/skills/feature-forge; do [ -x "$d/scripts/forge-root.sh" ] && exec "$d/scripts/forge-root.sh"; done')"
28
28
  [ -n "$R" ] || { echo "feature-forge: cannot locate plugin root" >&2; exit 1; }
29
29
  python3 "$R/scripts/epic-manifest.py" render-status "{epic}" --specs-dir "{specsDir}" --json
30
30
  ```
@@ -43,7 +43,10 @@ python3 "$R/scripts/epic-manifest.py" render-status "{epic}" --specs-dir "{specs
43
43
  3. **Prelude candidate set is an agent-neutral bootstrap subset.** The prelude's `for d` list
44
44
  exists only to bootstrap-discover `forge-root.sh`; the authoritative multi-root probe lives in
45
45
  `forge-root.sh` step 2. The list enumerates install roots across agents — the Claude
46
- skill/plugin dirs **and** the agent-neutral `.agents/skills/feature-forge` dirs (`$HOME` and the
46
+ skill/plugin dirs — including the marketplace-cache layout
47
+ `~/.claude/plugins/cache/<marketplace>/feature-forge/<version>/`, listed before the
48
+ single-star plugins glob so a versioned cache install always beats the marketplace clone —
49
+ **and** the agent-neutral `.agents/skills/feature-forge` dirs (`$HOME` and the
47
50
  project-relative `./.agents/...`) — so a non-Claude install (e.g. Codex under `.agents/skills`)
48
51
  can still discover the resolver. When adding an install root, update `forge-root.sh` first;
49
52
  extend the prelude only if the new root is needed to bootstrap-discover `forge-root.sh` itself.
@@ -36,6 +36,16 @@ The pipeline compiles a fuzzy feature idea into a machine-executable `backlog.js
36
36
  **Output:** `{specsDir}/{feature}/.verification/VERIFY-<stage>-<timestamp>.md` (includes both findings and a Fix Execution Plan)
37
37
  **Method:** Clean-context analysis producing actionable findings with an ordered fix plan.
38
38
 
39
+ **Manual or automatic.** By default the navigator offers verification after each stage. Because
40
+ it runs in a fresh, read-only subagent (clean-room by construction, never needs a `/clear`), it is
41
+ safe to automate: set `autoVerify: true` (or per-stage via `autoVerifyStages`) in
42
+ `forge.config.json` and the navigator runs `forge-verify` automatically once a stage completes,
43
+ returning only a compact digest to the session. The freshness ledger (verify entries record the
44
+ artifact `version` they ran against) means a stage is re-verified only when its artifact changes,
45
+ and an explicitly `skipped` verify is respected. Fixing stays human-gated unless `autoFix: true` is
46
+ also set, which chains `forge-fix` only when preconditions hold (zero unresolved decisions, clean
47
+ tree, passing re-verify). See `references/shared-conventions.md` for the config keys.
48
+
39
49
  After verification, fixes can be applied via:
40
50
  - `/feature-forge:forge-fix <feature>` — reads the Fix Execution Plan from the findings document and applies changes (works in any session)
41
51
  - Plan mode workflow — enter plan mode, run verify, review plan, exit and execute