@garygentry/feature-forge 0.1.4 → 0.2.0

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 (322) hide show
  1. package/README.md +19 -1
  2. package/adapters/GENERATION-REPORT.md +17 -13
  3. package/adapters/claude/.feature-forge-bundle.json +6 -0
  4. package/adapters/claude/references/forge-config-schema.json +36 -10
  5. package/adapters/claude/references/pipeline-state-schema.json +4 -0
  6. package/adapters/claude/references/portable-root.md +8 -5
  7. package/adapters/claude/references/process-overview.md +15 -5
  8. package/adapters/claude/references/shared-conventions.md +69 -4
  9. package/adapters/claude/references/stack-resolution.md +4 -1
  10. package/adapters/claude/references/stacks/go.md +1 -1
  11. package/adapters/claude/references/stacks/python.md +1 -1
  12. package/adapters/claude/references/stacks/rust.md +1 -1
  13. package/adapters/claude/references/stacks/typescript.md +1 -1
  14. package/adapters/claude/references/templates/specs-hygiene/AGENTS.md +23 -0
  15. package/adapters/claude/references/templates/specs-hygiene/CLAUDE.md +22 -0
  16. package/adapters/claude/scripts/epic-manifest.py +1379 -0
  17. package/adapters/claude/scripts/forge-bootstrap.py +991 -0
  18. package/adapters/claude/scripts/forge-init.sh +44 -0
  19. package/adapters/claude/scripts/forge-root.sh +30 -8
  20. package/adapters/claude/scripts/validate-traceability.py +150 -0
  21. package/adapters/claude/skills/forge/SKILL.md +5 -5
  22. package/adapters/claude/skills/forge-0-epic/SKILL.md +13 -15
  23. package/adapters/claude/skills/forge-0-epic/references/edit-mode.md +2 -2
  24. package/adapters/claude/skills/forge-0-epic/references/epic-manifest-subcommands.md +1 -1
  25. package/adapters/claude/skills/forge-1-prd/SKILL.md +6 -4
  26. package/adapters/claude/skills/forge-2-tech/SKILL.md +8 -7
  27. package/adapters/claude/skills/forge-2-tech/references/stack-discovery-checklist.md +4 -4
  28. package/adapters/claude/skills/forge-3-specs/SKILL.md +1 -1
  29. package/adapters/claude/skills/forge-4-backlog/SKILL.md +2 -2
  30. package/adapters/claude/skills/forge-5-loop/SKILL.md +20 -18
  31. package/adapters/claude/skills/forge-5-loop/references/result-reporting.md +13 -0
  32. package/adapters/claude/skills/forge-5-loop/references/runner-contract.md +40 -0
  33. package/adapters/claude/skills/forge-6-docs/SKILL.md +11 -1
  34. package/adapters/claude/skills/forge-bootstrap/SKILL.md +240 -0
  35. package/adapters/claude/skills/forge-bootstrap/references/templates/ci/github-actions.yml +12 -0
  36. package/adapters/claude/skills/forge-bootstrap/references/templates/generic/run.sh +3 -0
  37. package/adapters/claude/skills/forge-bootstrap/references/templates/generic/test.sh +13 -0
  38. package/adapters/claude/skills/forge-bootstrap/references/templates/go/go.mod +3 -0
  39. package/adapters/claude/skills/forge-bootstrap/references/templates/go/main.go +12 -0
  40. package/adapters/claude/skills/forge-bootstrap/references/templates/go/main_test.go +11 -0
  41. package/adapters/claude/skills/forge-bootstrap/references/templates/hygiene/AGENTS.md +24 -0
  42. package/adapters/claude/skills/forge-bootstrap/references/templates/hygiene/CLAUDE.md +25 -0
  43. package/adapters/claude/skills/forge-bootstrap/references/templates/hygiene/README.md +11 -0
  44. package/adapters/claude/skills/forge-bootstrap/references/templates/licenses/Apache-2.0/LICENSE +198 -0
  45. package/adapters/claude/skills/forge-bootstrap/references/templates/licenses/MIT/LICENSE +21 -0
  46. package/adapters/claude/skills/forge-bootstrap/references/templates/python/pyproject.toml +24 -0
  47. package/adapters/claude/skills/forge-bootstrap/references/templates/python/src/{{PKG}}/__init__.py +5 -0
  48. package/adapters/claude/skills/forge-bootstrap/references/templates/python/src/{{PKG}}/main.py +13 -0
  49. package/adapters/claude/skills/forge-bootstrap/references/templates/python/tests/test_smoke.py +8 -0
  50. package/adapters/claude/skills/forge-bootstrap/references/templates/rust/Cargo.toml +15 -0
  51. package/adapters/claude/skills/forge-bootstrap/references/templates/rust/src/lib.rs +7 -0
  52. package/adapters/claude/skills/forge-bootstrap/references/templates/rust/src/main.rs +5 -0
  53. package/adapters/claude/skills/forge-bootstrap/references/templates/rust/tests/smoke.rs +6 -0
  54. package/adapters/claude/skills/forge-bootstrap/references/templates/typescript/package.json +15 -0
  55. package/adapters/claude/skills/forge-bootstrap/references/templates/typescript/src/index.ts +4 -0
  56. package/adapters/claude/skills/forge-bootstrap/references/templates/typescript/test/smoke.test.ts +6 -0
  57. package/adapters/claude/skills/forge-bootstrap/references/templates/typescript/tsconfig.json +14 -0
  58. package/adapters/claude/skills/forge-fix/SKILL.md +1 -1
  59. package/adapters/claude/skills/forge-init/SKILL.md +1 -1
  60. package/adapters/claude/skills/forge-verify/SKILL.md +7 -2
  61. package/adapters/claude/skills/forge-verify/references/verification-checklists.md +1 -1
  62. package/adapters/codex/.feature-forge-bundle.json +6 -0
  63. package/adapters/codex/agents/{forge-researcher.md → forge-researcher.toml} +4 -4
  64. package/adapters/codex/agents/{forge-spec-writer.md → forge-spec-writer.toml} +4 -4
  65. package/adapters/codex/agents/{forge-verifier.md → forge-verifier.toml} +4 -4
  66. package/adapters/codex/references/forge-config-schema.json +36 -10
  67. package/adapters/codex/references/pipeline-state-schema.json +4 -0
  68. package/adapters/codex/references/portable-root.md +8 -5
  69. package/adapters/codex/references/process-overview.md +15 -5
  70. package/adapters/codex/references/shared-conventions.md +69 -4
  71. package/adapters/codex/references/stack-resolution.md +4 -1
  72. package/adapters/codex/references/stacks/go.md +1 -1
  73. package/adapters/codex/references/stacks/python.md +1 -1
  74. package/adapters/codex/references/stacks/rust.md +1 -1
  75. package/adapters/codex/references/stacks/typescript.md +1 -1
  76. package/adapters/codex/references/templates/specs-hygiene/AGENTS.md +23 -0
  77. package/adapters/codex/references/templates/specs-hygiene/CLAUDE.md +22 -0
  78. package/adapters/codex/scripts/epic-manifest.py +1379 -0
  79. package/adapters/codex/scripts/forge-bootstrap.py +991 -0
  80. package/adapters/codex/scripts/forge-init.sh +44 -0
  81. package/adapters/codex/scripts/forge-root.sh +30 -8
  82. package/adapters/codex/scripts/validate-traceability.py +150 -0
  83. package/adapters/codex/skills/forge/{forge.md → SKILL.md} +16 -6
  84. package/adapters/codex/skills/forge-0-epic/{forge-0-epic.md → SKILL.md} +33 -25
  85. package/adapters/codex/skills/forge-0-epic/references/edit-mode.md +2 -2
  86. package/adapters/codex/skills/forge-0-epic/references/epic-manifest-subcommands.md +1 -1
  87. package/adapters/codex/skills/forge-1-prd/{forge-1-prd.md → SKILL.md} +22 -10
  88. package/adapters/codex/skills/forge-2-tech/{forge-2-tech.md → SKILL.md} +26 -15
  89. package/adapters/codex/skills/forge-2-tech/references/stack-discovery-checklist.md +4 -4
  90. package/adapters/codex/skills/forge-3-specs/{forge-3-specs.md → SKILL.md} +16 -6
  91. package/adapters/codex/skills/forge-4-backlog/{forge-4-backlog.md → SKILL.md} +15 -5
  92. package/adapters/codex/skills/forge-5-loop/{forge-5-loop.md → SKILL.md} +40 -28
  93. package/adapters/codex/skills/forge-5-loop/references/result-reporting.md +13 -0
  94. package/adapters/codex/skills/forge-5-loop/references/runner-contract.md +40 -0
  95. package/adapters/codex/skills/forge-6-docs/{forge-6-docs.md → SKILL.md} +26 -6
  96. package/adapters/codex/skills/forge-bootstrap/SKILL.md +249 -0
  97. package/adapters/codex/skills/forge-bootstrap/references/templates/ci/github-actions.yml +12 -0
  98. package/adapters/codex/skills/forge-bootstrap/references/templates/generic/run.sh +3 -0
  99. package/adapters/codex/skills/forge-bootstrap/references/templates/generic/test.sh +13 -0
  100. package/adapters/codex/skills/forge-bootstrap/references/templates/go/go.mod +3 -0
  101. package/adapters/codex/skills/forge-bootstrap/references/templates/go/main.go +12 -0
  102. package/adapters/codex/skills/forge-bootstrap/references/templates/go/main_test.go +11 -0
  103. package/adapters/codex/skills/forge-bootstrap/references/templates/hygiene/AGENTS.md +24 -0
  104. package/adapters/codex/skills/forge-bootstrap/references/templates/hygiene/CLAUDE.md +25 -0
  105. package/adapters/codex/skills/forge-bootstrap/references/templates/hygiene/README.md +11 -0
  106. package/adapters/codex/skills/forge-bootstrap/references/templates/licenses/Apache-2.0/LICENSE +198 -0
  107. package/adapters/codex/skills/forge-bootstrap/references/templates/licenses/MIT/LICENSE +21 -0
  108. package/adapters/codex/skills/forge-bootstrap/references/templates/python/pyproject.toml +24 -0
  109. package/adapters/codex/skills/forge-bootstrap/references/templates/python/src/{{PKG}}/__init__.py +5 -0
  110. package/adapters/codex/skills/forge-bootstrap/references/templates/python/src/{{PKG}}/main.py +13 -0
  111. package/adapters/codex/skills/forge-bootstrap/references/templates/python/tests/test_smoke.py +8 -0
  112. package/adapters/codex/skills/forge-bootstrap/references/templates/rust/Cargo.toml +15 -0
  113. package/adapters/codex/skills/forge-bootstrap/references/templates/rust/src/lib.rs +7 -0
  114. package/adapters/codex/skills/forge-bootstrap/references/templates/rust/src/main.rs +5 -0
  115. package/adapters/codex/skills/forge-bootstrap/references/templates/rust/tests/smoke.rs +6 -0
  116. package/adapters/codex/skills/forge-bootstrap/references/templates/typescript/package.json +15 -0
  117. package/adapters/codex/skills/forge-bootstrap/references/templates/typescript/src/index.ts +4 -0
  118. package/adapters/codex/skills/forge-bootstrap/references/templates/typescript/test/smoke.test.ts +6 -0
  119. package/adapters/codex/skills/forge-bootstrap/references/templates/typescript/tsconfig.json +14 -0
  120. package/adapters/codex/skills/forge-fix/{forge-fix.md → SKILL.md} +12 -2
  121. package/adapters/codex/skills/forge-init/{forge-init.md → SKILL.md} +11 -1
  122. package/adapters/codex/skills/forge-verify/{forge-verify.md → SKILL.md} +24 -9
  123. package/adapters/codex/skills/forge-verify/references/verification-checklists.md +1 -1
  124. package/adapters/copilot/.feature-forge-bundle.json +6 -0
  125. package/adapters/copilot/references/forge-config-schema.json +36 -10
  126. package/adapters/copilot/references/pipeline-state-schema.json +4 -0
  127. package/adapters/copilot/references/portable-root.md +8 -5
  128. package/adapters/copilot/references/process-overview.md +15 -5
  129. package/adapters/copilot/references/shared-conventions.md +69 -4
  130. package/adapters/copilot/references/stack-resolution.md +4 -1
  131. package/adapters/copilot/references/stacks/go.md +1 -1
  132. package/adapters/copilot/references/stacks/python.md +1 -1
  133. package/adapters/copilot/references/stacks/rust.md +1 -1
  134. package/adapters/copilot/references/stacks/typescript.md +1 -1
  135. package/adapters/copilot/references/templates/specs-hygiene/AGENTS.md +23 -0
  136. package/adapters/copilot/references/templates/specs-hygiene/CLAUDE.md +22 -0
  137. package/adapters/copilot/scripts/epic-manifest.py +1379 -0
  138. package/adapters/copilot/scripts/forge-bootstrap.py +991 -0
  139. package/adapters/copilot/scripts/forge-init.sh +44 -0
  140. package/adapters/copilot/scripts/forge-root.sh +30 -8
  141. package/adapters/copilot/scripts/validate-traceability.py +150 -0
  142. package/adapters/copilot/skills/forge/forge.md +16 -6
  143. package/adapters/copilot/skills/forge-0-epic/forge-0-epic.md +33 -25
  144. package/adapters/copilot/skills/forge-0-epic/references/edit-mode.md +2 -2
  145. package/adapters/copilot/skills/forge-0-epic/references/epic-manifest-subcommands.md +1 -1
  146. package/adapters/copilot/skills/forge-1-prd/forge-1-prd.md +22 -10
  147. package/adapters/copilot/skills/forge-2-tech/forge-2-tech.md +26 -15
  148. package/adapters/copilot/skills/forge-2-tech/references/stack-discovery-checklist.md +4 -4
  149. package/adapters/copilot/skills/forge-3-specs/forge-3-specs.md +16 -6
  150. package/adapters/copilot/skills/forge-4-backlog/forge-4-backlog.md +15 -5
  151. package/adapters/copilot/skills/forge-5-loop/forge-5-loop.md +40 -28
  152. package/adapters/copilot/skills/forge-5-loop/references/result-reporting.md +13 -0
  153. package/adapters/copilot/skills/forge-5-loop/references/runner-contract.md +40 -0
  154. package/adapters/copilot/skills/forge-6-docs/forge-6-docs.md +26 -6
  155. package/adapters/copilot/skills/forge-bootstrap/forge-bootstrap.md +249 -0
  156. package/adapters/copilot/skills/forge-bootstrap/references/templates/ci/github-actions.yml +12 -0
  157. package/adapters/copilot/skills/forge-bootstrap/references/templates/generic/run.sh +3 -0
  158. package/adapters/copilot/skills/forge-bootstrap/references/templates/generic/test.sh +13 -0
  159. package/adapters/copilot/skills/forge-bootstrap/references/templates/go/go.mod +3 -0
  160. package/adapters/copilot/skills/forge-bootstrap/references/templates/go/main.go +12 -0
  161. package/adapters/copilot/skills/forge-bootstrap/references/templates/go/main_test.go +11 -0
  162. package/adapters/copilot/skills/forge-bootstrap/references/templates/hygiene/AGENTS.md +24 -0
  163. package/adapters/copilot/skills/forge-bootstrap/references/templates/hygiene/CLAUDE.md +25 -0
  164. package/adapters/copilot/skills/forge-bootstrap/references/templates/hygiene/README.md +11 -0
  165. package/adapters/copilot/skills/forge-bootstrap/references/templates/licenses/Apache-2.0/LICENSE +198 -0
  166. package/adapters/copilot/skills/forge-bootstrap/references/templates/licenses/MIT/LICENSE +21 -0
  167. package/adapters/copilot/skills/forge-bootstrap/references/templates/python/pyproject.toml +24 -0
  168. package/adapters/copilot/skills/forge-bootstrap/references/templates/python/src/{{PKG}}/__init__.py +5 -0
  169. package/adapters/copilot/skills/forge-bootstrap/references/templates/python/src/{{PKG}}/main.py +13 -0
  170. package/adapters/copilot/skills/forge-bootstrap/references/templates/python/tests/test_smoke.py +8 -0
  171. package/adapters/copilot/skills/forge-bootstrap/references/templates/rust/Cargo.toml +15 -0
  172. package/adapters/copilot/skills/forge-bootstrap/references/templates/rust/src/lib.rs +7 -0
  173. package/adapters/copilot/skills/forge-bootstrap/references/templates/rust/src/main.rs +5 -0
  174. package/adapters/copilot/skills/forge-bootstrap/references/templates/rust/tests/smoke.rs +6 -0
  175. package/adapters/copilot/skills/forge-bootstrap/references/templates/typescript/package.json +15 -0
  176. package/adapters/copilot/skills/forge-bootstrap/references/templates/typescript/src/index.ts +4 -0
  177. package/adapters/copilot/skills/forge-bootstrap/references/templates/typescript/test/smoke.test.ts +6 -0
  178. package/adapters/copilot/skills/forge-bootstrap/references/templates/typescript/tsconfig.json +14 -0
  179. package/adapters/copilot/skills/forge-fix/forge-fix.md +12 -2
  180. package/adapters/copilot/skills/forge-init/forge-init.md +11 -1
  181. package/adapters/copilot/skills/forge-verify/forge-verify.md +24 -9
  182. package/adapters/copilot/skills/forge-verify/references/verification-checklists.md +1 -1
  183. package/adapters/cursor/.feature-forge-bundle.json +6 -0
  184. package/adapters/cursor/references/forge-config-schema.json +36 -10
  185. package/adapters/cursor/references/pipeline-state-schema.json +4 -0
  186. package/adapters/cursor/references/portable-root.md +8 -5
  187. package/adapters/cursor/references/process-overview.md +15 -5
  188. package/adapters/cursor/references/shared-conventions.md +69 -4
  189. package/adapters/cursor/references/stack-resolution.md +4 -1
  190. package/adapters/cursor/references/stacks/go.md +1 -1
  191. package/adapters/cursor/references/stacks/python.md +1 -1
  192. package/adapters/cursor/references/stacks/rust.md +1 -1
  193. package/adapters/cursor/references/stacks/typescript.md +1 -1
  194. package/adapters/cursor/references/templates/specs-hygiene/AGENTS.md +23 -0
  195. package/adapters/cursor/references/templates/specs-hygiene/CLAUDE.md +22 -0
  196. package/adapters/cursor/scripts/epic-manifest.py +1379 -0
  197. package/adapters/cursor/scripts/forge-bootstrap.py +991 -0
  198. package/adapters/cursor/scripts/forge-init.sh +44 -0
  199. package/adapters/cursor/scripts/forge-root.sh +30 -8
  200. package/adapters/cursor/scripts/validate-traceability.py +150 -0
  201. package/adapters/cursor/skills/forge/forge.mdc +16 -6
  202. package/adapters/cursor/skills/forge-0-epic/forge-0-epic.mdc +33 -25
  203. package/adapters/cursor/skills/forge-0-epic/references/edit-mode.md +2 -2
  204. package/adapters/cursor/skills/forge-0-epic/references/epic-manifest-subcommands.md +1 -1
  205. package/adapters/cursor/skills/forge-1-prd/forge-1-prd.mdc +22 -10
  206. package/adapters/cursor/skills/forge-2-tech/forge-2-tech.mdc +26 -15
  207. package/adapters/cursor/skills/forge-2-tech/references/stack-discovery-checklist.md +4 -4
  208. package/adapters/cursor/skills/forge-3-specs/forge-3-specs.mdc +16 -6
  209. package/adapters/cursor/skills/forge-4-backlog/forge-4-backlog.mdc +15 -5
  210. package/adapters/cursor/skills/forge-5-loop/forge-5-loop.mdc +40 -28
  211. package/adapters/cursor/skills/forge-5-loop/references/result-reporting.md +13 -0
  212. package/adapters/cursor/skills/forge-5-loop/references/runner-contract.md +40 -0
  213. package/adapters/cursor/skills/forge-6-docs/forge-6-docs.mdc +26 -6
  214. package/adapters/cursor/skills/forge-bootstrap/forge-bootstrap.mdc +250 -0
  215. package/adapters/cursor/skills/forge-bootstrap/references/templates/ci/github-actions.yml +12 -0
  216. package/adapters/cursor/skills/forge-bootstrap/references/templates/generic/run.sh +3 -0
  217. package/adapters/cursor/skills/forge-bootstrap/references/templates/generic/test.sh +13 -0
  218. package/adapters/cursor/skills/forge-bootstrap/references/templates/go/go.mod +3 -0
  219. package/adapters/cursor/skills/forge-bootstrap/references/templates/go/main.go +12 -0
  220. package/adapters/cursor/skills/forge-bootstrap/references/templates/go/main_test.go +11 -0
  221. package/adapters/cursor/skills/forge-bootstrap/references/templates/hygiene/AGENTS.md +24 -0
  222. package/adapters/cursor/skills/forge-bootstrap/references/templates/hygiene/CLAUDE.md +25 -0
  223. package/adapters/cursor/skills/forge-bootstrap/references/templates/hygiene/README.md +11 -0
  224. package/adapters/cursor/skills/forge-bootstrap/references/templates/licenses/Apache-2.0/LICENSE +198 -0
  225. package/adapters/cursor/skills/forge-bootstrap/references/templates/licenses/MIT/LICENSE +21 -0
  226. package/adapters/cursor/skills/forge-bootstrap/references/templates/python/pyproject.toml +24 -0
  227. package/adapters/cursor/skills/forge-bootstrap/references/templates/python/src/{{PKG}}/__init__.py +5 -0
  228. package/adapters/cursor/skills/forge-bootstrap/references/templates/python/src/{{PKG}}/main.py +13 -0
  229. package/adapters/cursor/skills/forge-bootstrap/references/templates/python/tests/test_smoke.py +8 -0
  230. package/adapters/cursor/skills/forge-bootstrap/references/templates/rust/Cargo.toml +15 -0
  231. package/adapters/cursor/skills/forge-bootstrap/references/templates/rust/src/lib.rs +7 -0
  232. package/adapters/cursor/skills/forge-bootstrap/references/templates/rust/src/main.rs +5 -0
  233. package/adapters/cursor/skills/forge-bootstrap/references/templates/rust/tests/smoke.rs +6 -0
  234. package/adapters/cursor/skills/forge-bootstrap/references/templates/typescript/package.json +15 -0
  235. package/adapters/cursor/skills/forge-bootstrap/references/templates/typescript/src/index.ts +4 -0
  236. package/adapters/cursor/skills/forge-bootstrap/references/templates/typescript/test/smoke.test.ts +6 -0
  237. package/adapters/cursor/skills/forge-bootstrap/references/templates/typescript/tsconfig.json +14 -0
  238. package/adapters/cursor/skills/forge-fix/forge-fix.mdc +12 -2
  239. package/adapters/cursor/skills/forge-init/forge-init.mdc +11 -1
  240. package/adapters/cursor/skills/forge-verify/forge-verify.mdc +24 -9
  241. package/adapters/cursor/skills/forge-verify/references/verification-checklists.md +1 -1
  242. package/adapters/gemini/.feature-forge-bundle.json +6 -0
  243. package/adapters/gemini/gemini-extension.json +5 -1
  244. package/adapters/gemini/references/forge-config-schema.json +36 -10
  245. package/adapters/gemini/references/pipeline-state-schema.json +4 -0
  246. package/adapters/gemini/references/portable-root.md +8 -5
  247. package/adapters/gemini/references/process-overview.md +15 -5
  248. package/adapters/gemini/references/shared-conventions.md +69 -4
  249. package/adapters/gemini/references/stack-resolution.md +4 -1
  250. package/adapters/gemini/references/stacks/go.md +1 -1
  251. package/adapters/gemini/references/stacks/python.md +1 -1
  252. package/adapters/gemini/references/stacks/rust.md +1 -1
  253. package/adapters/gemini/references/stacks/typescript.md +1 -1
  254. package/adapters/gemini/references/templates/specs-hygiene/AGENTS.md +23 -0
  255. package/adapters/gemini/references/templates/specs-hygiene/CLAUDE.md +22 -0
  256. package/adapters/gemini/scripts/epic-manifest.py +1379 -0
  257. package/adapters/gemini/scripts/forge-bootstrap.py +991 -0
  258. package/adapters/gemini/scripts/forge-init.sh +44 -0
  259. package/adapters/gemini/scripts/forge-root.sh +30 -8
  260. package/adapters/gemini/scripts/validate-traceability.py +150 -0
  261. package/adapters/gemini/skills/forge/forge.md +16 -6
  262. package/adapters/gemini/skills/forge-0-epic/forge-0-epic.md +33 -25
  263. package/adapters/gemini/skills/forge-0-epic/references/edit-mode.md +2 -2
  264. package/adapters/gemini/skills/forge-0-epic/references/epic-manifest-subcommands.md +1 -1
  265. package/adapters/gemini/skills/forge-1-prd/forge-1-prd.md +22 -10
  266. package/adapters/gemini/skills/forge-2-tech/forge-2-tech.md +26 -15
  267. package/adapters/gemini/skills/forge-2-tech/references/stack-discovery-checklist.md +4 -4
  268. package/adapters/gemini/skills/forge-3-specs/forge-3-specs.md +16 -6
  269. package/adapters/gemini/skills/forge-4-backlog/forge-4-backlog.md +15 -5
  270. package/adapters/gemini/skills/forge-5-loop/forge-5-loop.md +40 -28
  271. package/adapters/gemini/skills/forge-5-loop/references/result-reporting.md +13 -0
  272. package/adapters/gemini/skills/forge-5-loop/references/runner-contract.md +40 -0
  273. package/adapters/gemini/skills/forge-6-docs/forge-6-docs.md +26 -6
  274. package/adapters/gemini/skills/forge-bootstrap/forge-bootstrap.md +249 -0
  275. package/adapters/gemini/skills/forge-bootstrap/references/templates/ci/github-actions.yml +12 -0
  276. package/adapters/gemini/skills/forge-bootstrap/references/templates/generic/run.sh +3 -0
  277. package/adapters/gemini/skills/forge-bootstrap/references/templates/generic/test.sh +13 -0
  278. package/adapters/gemini/skills/forge-bootstrap/references/templates/go/go.mod +3 -0
  279. package/adapters/gemini/skills/forge-bootstrap/references/templates/go/main.go +12 -0
  280. package/adapters/gemini/skills/forge-bootstrap/references/templates/go/main_test.go +11 -0
  281. package/adapters/gemini/skills/forge-bootstrap/references/templates/hygiene/AGENTS.md +24 -0
  282. package/adapters/gemini/skills/forge-bootstrap/references/templates/hygiene/CLAUDE.md +25 -0
  283. package/adapters/gemini/skills/forge-bootstrap/references/templates/hygiene/README.md +11 -0
  284. package/adapters/gemini/skills/forge-bootstrap/references/templates/licenses/Apache-2.0/LICENSE +198 -0
  285. package/adapters/gemini/skills/forge-bootstrap/references/templates/licenses/MIT/LICENSE +21 -0
  286. package/adapters/gemini/skills/forge-bootstrap/references/templates/python/pyproject.toml +24 -0
  287. package/adapters/gemini/skills/forge-bootstrap/references/templates/python/src/{{PKG}}/__init__.py +5 -0
  288. package/adapters/gemini/skills/forge-bootstrap/references/templates/python/src/{{PKG}}/main.py +13 -0
  289. package/adapters/gemini/skills/forge-bootstrap/references/templates/python/tests/test_smoke.py +8 -0
  290. package/adapters/gemini/skills/forge-bootstrap/references/templates/rust/Cargo.toml +15 -0
  291. package/adapters/gemini/skills/forge-bootstrap/references/templates/rust/src/lib.rs +7 -0
  292. package/adapters/gemini/skills/forge-bootstrap/references/templates/rust/src/main.rs +5 -0
  293. package/adapters/gemini/skills/forge-bootstrap/references/templates/rust/tests/smoke.rs +6 -0
  294. package/adapters/gemini/skills/forge-bootstrap/references/templates/typescript/package.json +15 -0
  295. package/adapters/gemini/skills/forge-bootstrap/references/templates/typescript/src/index.ts +4 -0
  296. package/adapters/gemini/skills/forge-bootstrap/references/templates/typescript/test/smoke.test.ts +6 -0
  297. package/adapters/gemini/skills/forge-bootstrap/references/templates/typescript/tsconfig.json +14 -0
  298. package/adapters/gemini/skills/forge-fix/forge-fix.md +12 -2
  299. package/adapters/gemini/skills/forge-init/forge-init.md +11 -1
  300. package/adapters/gemini/skills/forge-verify/forge-verify.md +24 -9
  301. package/adapters/gemini/skills/forge-verify/references/verification-checklists.md +1 -1
  302. package/dist/agent-targets.d.ts +20 -4
  303. package/dist/agent-targets.js +29 -4
  304. package/dist/apply.js +245 -18
  305. package/dist/cli.js +12 -6
  306. package/dist/hash.d.ts +5 -0
  307. package/dist/hash.js +7 -0
  308. package/dist/manifest.d.ts +4 -2
  309. package/dist/manifest.js +58 -2
  310. package/dist/placements.d.ts +69 -0
  311. package/dist/placements.js +116 -0
  312. package/dist/plan.d.ts +7 -0
  313. package/dist/plan.js +87 -1
  314. package/dist/rauf.d.ts +4 -4
  315. package/dist/rauf.js +3 -3
  316. package/dist/report.js +21 -0
  317. package/dist/source.d.ts +4 -3
  318. package/dist/source.js +4 -3
  319. package/dist/types.d.ts +163 -19
  320. package/dist/types.js +42 -11
  321. package/package.json +1 -1
  322. package/adapters/codex/agents/openai.yaml +0 -10
@@ -29,7 +29,7 @@ Before interviewing, you need to understand the existing codebase. This involves
29
29
 
30
30
  ### Recommended: Delegate to forge-researcher Subagent
31
31
 
32
- Spawn the `forge-researcher` subagent via the Agent tool to scan the codebase. Pass a prompt like: "Research the codebase for planning the {feature} feature. Focus on integration points, established patterns, and relevant packages."
32
+ Spawn the `forge-researcher` subagent via the host's subagent mechanism to scan the codebase. Pass a prompt like: "Research the codebase for planning the {feature} feature. Focus on integration points, established patterns, and relevant packages."
33
33
 
34
34
  If this feature belongs to an epic, also add to the dispatch prompt: "If this feature belongs to an epic, also account for these epic contracts: {paste this feature's `consumes` and the `exposes` of its direct deps}, and the completed dependency tech-specs at {paths}. Do not re-research transitive deps." This threads epic context into the researcher without changing the agent's behavior.
35
35
 
@@ -38,7 +38,7 @@ The researcher runs in its own context window, reads the project structure, and
38
38
  **Single vs. parallel research.** For a small or well-understood codebase, **one**
39
39
  researcher is the right default. For a **large codebase or uncertain scope** (many
40
40
  packages, several integration surfaces, monorepo), dispatch **multiple `forge-researcher`
41
- subagents in parallel — a single message with multiple Agent calls** (the
41
+ subagents in parallel — a single message with multiple subagent calls** (the
42
42
  `superpowers:dispatching-parallel-agents` pattern), each scoped to a **disjoint focus**
43
43
  so they don't re-read the same ground:
44
44
  - one on **project structure & conventions** (layout, build, naming, error/test patterns),
@@ -56,7 +56,7 @@ If the `forge-researcher` subagent is not available, perform the research inline
56
56
  ### Manual Research (fallback)
57
57
 
58
58
  1. **Read the PRD thoroughly**: Understand all requirements and constraints
59
- 2. **Check for project-level stack decisions**: Look for `.claude/references/stack-decisions.md` in the project root. If present, read it — these are established technology choices that should be respected unless there's a strong reason to deviate.
59
+ 2. **Check for project-level stack decisions**: Look for a project stack-decisions file, first existing path wins: `.feature-forge/stack-decisions.md` (preferred), then `.agents/references/stack-decisions.md`, then `.claude/references/stack-decisions.md` (legacy alias). If present, read it — these are established technology choices that should be respected unless there's a strong reason to deviate.
60
60
  3. **Read the plugin's default stack reference**: Read `references/stack-discovery-checklist.md` for general stack context (only if no project-level override exists)
61
61
  4. **Examine the existing codebase**: Look at `package.json` files, existing packages, directory structure, and established patterns. Understand what conventions are already in place.
62
62
  5. **Review other features' tech specs**: Check `{specsDir}/*/tech-spec.md` and `{specsDir}/*/*/tech-spec.md` (depth-2, to find nested epic members) for consistency in approach and to identify shared infrastructure. Apply the **feature-shaped-dir bound**: only treat a directory as a feature if it directly contains a `.pipeline-state.json` (filter matches whose parent directory holds one, or enumerate members via the helper). A flat-only tree has no depth-2 feature dirs, so this gains no new matches there (REQ-COMPAT-01).
@@ -67,9 +67,9 @@ If the `forge-researcher` subagent is not available, perform the research inline
67
67
  After researching the codebase, identify the primary stack (language, build tool, package manager, framework). Read `references/stack-resolution.md` for the full resolution protocol.
68
68
 
69
69
  1. Check if `forge.config.json` already has a `stack` field — if so, use it
70
- 2. Otherwise, detect from project files and use `AskUserQuestion` to confirm: "I detected this as a {stack} project. Correct?"
70
+ 2. Otherwise, detect from project files and use the host's question mechanism to confirm: "I detected this as a {stack} project. Correct?"
71
71
  3. Update `forge.config.json` with `stack`, `typeCheckCommand`, and `testCommand`
72
- 4. Verify that a matching stack profile exists at `references/stacks/{stack}.md`. If it does, load it for stack-specific guidance during this and all subsequent stages. If no profile exists, inform the user: "No dedicated profile for {stack}. Using generic fallback — spec conventions, verification checks, and examples will be language-neutral. Consider creating a project-level override at `.claude/references/stack-decisions.md`." Then load `references/stacks/_generic.md`.
72
+ 4. Verify that a matching stack profile exists at `references/stacks/{stack}.md`. If it does, load it for stack-specific guidance during this and all subsequent stages. If no profile exists, inform the user: "No dedicated profile for {stack}. Using generic fallback — spec conventions, verification checks, and examples will be language-neutral. Consider creating a project-level override at `.feature-forge/stack-decisions.md`." Then load `references/stacks/_generic.md`.
73
73
 
74
74
  ## Step 3: Conduct the Interview
75
75
 
@@ -77,17 +77,18 @@ Interview the user about technology decisions. Unlike the PRD interview, here yo
77
77
 
78
78
  ### Interview Approach
79
79
 
80
- **Turn structure:** Output your research findings, analysis, or technical proposals as regular text. Then use `AskUserQuestion` for the actual questions. NEVER put questions in your text output — they MUST go through `AskUserQuestion`.
80
+ **Turn structure:** Output your research findings, analysis, or technical proposals as regular text. Then use the host's question mechanism for the actual questions. NEVER put questions in your text output — they MUST go through the host's question mechanism.
81
81
 
82
- **Pacing:** Present 1-2 decision areas per `AskUserQuestion` call and STOP to wait for the user's response before continuing. After receiving answers, probe deeper on anything incomplete before moving to the next topic. Signal progress in your text before the next question batch. Do NOT dump all decision areas in a single message — the interview is a conversation, not a document.
82
+ **Pacing:** Present 1-2 decision areas per the host's question mechanism call and STOP to wait for the user's response before continuing. After receiving answers, probe deeper on anything incomplete before moving to the next topic. Signal progress in your text before the next question batch. Do NOT dump all decision areas in a single message — the interview is a conversation, not a document.
83
83
 
84
- **First message pattern:** Output the research summary as text, then use `AskUserQuestion` to confirm the stack and ask about the first decision area (typically package/module structure). Wait for the user to respond before proceeding to subsequent areas.
84
+ **First message pattern:** Output the research summary as text, then use the host's question mechanism to confirm the stack and ask about the first decision area (typically package/module structure). Wait for the user to respond before proceeding to subsequent areas.
85
85
 
86
- **Question strategies** (use these as content for `AskUserQuestion`, not as inline prose):
87
- - For each PRD requirement, propose a technical approach and ask for confirmation or alternatives
88
- - Proactively suggest approaches consistent with the established stack
89
- - Challenge over-engineering: does the feature need this, or is a simpler approach sufficient?
90
- - Ask about every integration point and how the feature interacts with existing modules
86
+ **Question strategies** (use these as content for the host's question mechanism, not as inline prose). Follow the **Decision Support** protocol in `references/shared-conventions.md` — this interview is the richest decision surface in the pipeline, so don't just list options; lead with a recommended approach, put the trade-off in each option's description, and give a one-line rationale:
87
+ - For each PRD requirement, propose a technical approach **with its trade-off and your recommendation**, then ask for confirmation or alternatives — don't present competing approaches flatly. You've just researched the codebase; spend that research here.
88
+ - Recommend approaches consistent with the established stack, and say *why* the convention favors it (evidence-backed mode). Where the choice is genuine taste (e.g. folder layout, naming), give a default but flag it as preference.
89
+ - Challenge over-engineering: does the feature need this, or is a simpler approach sufficient? Frame the simpler option's trade-off (less flexibility now vs. less to maintain).
90
+ - Ask about every integration point and how the feature interacts with existing modules.
91
+ - For competing module structures or code-shape choices, use the the host's question mechanism `preview` field to show the candidates side-by-side.
91
92
 
92
93
  **Parking lot:** If the user raises a concern that belongs to a different pipeline stage (e.g., backlog granularity, documentation format), acknowledge it and note it in the pipeline state's `notes` field: "Good point — I've noted that for the [specs/backlog/docs stage]. Let's continue with the tech spec."
93
94
 
@@ -175,7 +176,7 @@ Present the complete tech spec. Ask:
175
176
  - "Any patterns from the existing codebase I missed?"
176
177
  - "Are the integration points complete?"
177
178
 
178
- Use `AskUserQuestion` to collect this feedback.
179
+ Use the host's question mechanism to collect this feedback.
179
180
 
180
181
  ## Step 7: Update Pipeline State and Commit
181
182
 
@@ -186,7 +187,7 @@ Write pipeline state conforming to `references/pipeline-state-schema.json`.
186
187
  - Record `artifacts`, `completedAt`, `version`
187
188
  - Set `stages.forge-2-tech.basedOnVersions` to `{"forge-1-prd": <current forge-1-prd version>}`
188
189
  - Check downstream stages (forge-3-specs, forge-4-backlog, forge-5-loop, forge-6-docs). If any have `basedOnVersions` referencing an older version of forge-2-tech, set their status to `stale`
189
- 2. Use `AskUserQuestion` to ask about notes to persist
190
+ 2. Use the host's question mechanism to ask about notes to persist
190
191
  3. If `gitCommitAfterStage` is true, follow the Git Commit Protocol in `references/shared-conventions.md`: stage files, attempt commit with message `"{commitPrefix}({feature}): complete tech-spec v{n}"`, then set `stages.forge-2-tech.status` to `complete` with commit hash only on success. If commit fails, leave status as `in-progress`.
191
192
  5. Tell the user: "Tech spec complete. Next steps:\n - `/feature-forge:forge-verify {feature}` to verify the tech spec\n - `/feature-forge:forge-3-specs {feature}` to create implementation specs\n - `/feature-forge:forge {feature}` to see full pipeline status"
192
193
 
@@ -196,3 +197,13 @@ Write pipeline state conforming to `references/pipeline-state-schema.json`.
196
197
  - When the user's stack decisions differ from what you'd recommend, document their choice AND note your concern as an "Alternatives Considered" item — don't silently override their preference.
197
198
  - Integration points are the #1 source of implementation surprises. Spend extra time here. Read the actual code of packages this feature touches, don't just guess at their APIs.
198
199
  - If the existing codebase has inconsistent patterns (it happens), call it out and ask which pattern should be followed for this feature.
200
+
201
+ ---
202
+
203
+ ## Host execution notes
204
+
205
+ This skill was authored Claude-first; the body above refers to "the host's question mechanism", "the host's subagent mechanism", and "the host's background-execution mechanism". Use your runtime's equivalent for each — and if your runtime has no such tool:
206
+
207
+ - **User input:** ask the question directly and wait for the answer before proceeding. Do not skip a required question or assume an answer.
208
+ - **Subagents:** if your host cannot dispatch the named custom agent, run that step inline yourself.
209
+ - **Background / monitoring:** run long-lived commands in the foreground (or your host's background facility) and report progress as it arrives.
@@ -1,16 +1,16 @@
1
1
  # Stack Discovery Checklist (Plugin Default)
2
2
 
3
- This file contains a default stack discovery protocol for the feature-forge plugin. Projects can override this by placing a `stack-decisions.md` in `.claude/references/` at the project root.
3
+ This file contains a default stack discovery protocol for the feature-forge plugin. Projects can override this by placing a `stack-decisions.md` at `.feature-forge/stack-decisions.md` (preferred; legacy alias `.claude/references/stack-decisions.md`) in the project root.
4
4
 
5
5
  ## Note to Agent
6
6
 
7
- This is a DISCOVERY PROTOCOL — it helps you identify what stack the project uses. It is NOT a set of decisions. Always check `.claude/references/stack-decisions.md` first — if present, it takes precedence.
7
+ This is a DISCOVERY PROTOCOL — it helps you identify what stack the project uses. It is NOT a set of decisions. Always check for a project stack-decisions file first (`.feature-forge/stack-decisions.md`, then `.agents/references/stack-decisions.md`, then the legacy `.claude/references/stack-decisions.md`) — if present, it takes precedence.
8
8
 
9
9
  After discovering the stack, check if `references/stacks/{stack}.md` exists in the plugin for stack-specific guidance. See `references/stack-resolution.md` for the full resolution protocol.
10
10
 
11
11
  ## Purpose
12
12
 
13
- This is a default discovery guide for understanding a project's technology stack. Projects should create `.claude/references/stack-decisions.md` with their actual stack decisions, which takes precedence over this checklist.
13
+ This is a default discovery guide for understanding a project's technology stack. Projects should create `.feature-forge/stack-decisions.md` (legacy alias: `.claude/references/stack-decisions.md`) with their actual stack decisions, which takes precedence over this checklist.
14
14
 
15
15
  ## Stack Discovery Protocol
16
16
 
@@ -68,7 +68,7 @@ Examine the dependency manifest for:
68
68
 
69
69
  ## How to Create a Project-Level Override
70
70
 
71
- Create `.claude/references/stack-decisions.md` in your project root with your specific stack decisions. See `references/stacks/typescript.md` or `references/stacks/python.md` for stack-specific examples of what to include.
71
+ Create `.feature-forge/stack-decisions.md` (legacy alias: `.claude/references/stack-decisions.md`) in your project root with your specific stack decisions. See `references/stacks/typescript.md` or `references/stacks/python.md` for stack-specific examples of what to include.
72
72
 
73
73
  ```markdown
74
74
  # Stack Decisions
@@ -13,7 +13,7 @@ Generate a comprehensive suite of numbered implementation specification document
13
13
 
14
14
  Read and follow `references/shared-conventions.md` for feature name validation, configuration reading, and force mode handling before proceeding.
15
15
 
16
- **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.
16
+ **Turn structure reminder:** Output analysis/context as text, then route ALL questions through the host's question mechanism. Never embed questions in text output — the user will not be prompted and the session will stall.
17
17
 
18
18
  ## Step 1: Validate Prerequisites
19
19
 
@@ -37,7 +37,7 @@ After reading the PRD and tech spec, invoke the **Epic Context Injection** block
37
37
 
38
38
  Read `references/spec-archetypes.md` for the menu of document types.
39
39
 
40
- Based on the feature's complexity, propose a document plan to the user before writing. Output the document list as text, then use `AskUserQuestion` for the question — do NOT include the question in your text output.
40
+ Based on the feature's complexity, propose a document plan to the user before writing. Output the document list as text, then use the host's question mechanism for the question — do NOT include the question in your text output.
41
41
 
42
42
  **Example text output (no question here):**
43
43
  ```
@@ -54,7 +54,7 @@ Feature-specific:
54
54
  04-integration-points.md — Integration with existing project modules
55
55
  ```
56
56
 
57
- **Then call `AskUserQuestion`** with: "Does this look right? Should I add or remove any documents?"
57
+ **Then call the host's question mechanism** following the **Decision Support** protocol in `references/shared-conventions.md`: recommend this plan as the default (it's your evidence-backed read of the feature's complexity) and name the trade-off so the user can push back knowingly — more documents means finer separation of concerns but more to keep in sync; fewer means tighter docs but risks one document carrying multiple concerns. Lead with: "I recommend this plan. Add or remove any documents?" Note the guidance below — resist splitting a concern into a sub-50-line document.
58
58
 
59
59
  **Incremental artifact tracking:** After each spec document is written (by you or a writer subagent), immediately update the `artifacts` array in `.pipeline-state.json` with the new file path. This enables crash recovery if the session is interrupted mid-suite (see shared-conventions.md "Crash Recovery").
60
60
 
@@ -73,7 +73,7 @@ and the directory/exports map, so they must exist and be stable first.
73
73
  ### 4b. Domain fan-out (parallel `forge-spec-writer` subagents)
74
74
 
75
75
  Once the foundation is written, dispatch the remaining numbered docs in parallel — **one
76
- `forge-spec-writer` subagent per document, in a single message with multiple Agent
76
+ `forge-spec-writer` subagent per document, in a single message with multiple subagent
77
77
  calls** (the `superpowers:dispatching-parallel-agents` pattern). Each writer is given:
78
78
  - the PRD and tech-spec,
79
79
  - the just-written `00-core-definitions.md` and `01-architecture-layout.md` (so it builds
@@ -128,7 +128,7 @@ List any gaps or inconsistencies found and resolve them.
128
128
 
129
129
  ## Step 6: Review with User
130
130
 
131
- Present a summary of all documents created as text, with key decisions highlighted. Then use `AskUserQuestion` to collect feedback — do NOT include these questions in your text output:
131
+ Present a summary of all documents created as text, with key decisions highlighted. Then use the host's question mechanism to collect feedback — do NOT include these questions in your text output:
132
132
 
133
133
  "1. Does the level of detail match what you need? 2. Any areas that need more depth? 3. Any missing subsystems or concerns?"
134
134
 
@@ -141,7 +141,7 @@ Write pipeline state conforming to `references/pipeline-state-schema.json`.
141
141
  - Record all created files in `artifacts`, including `TRACEABILITY.md`
142
142
  - Set `stages.forge-3-specs.basedOnVersions` to `{"forge-1-prd": <current version>, "forge-2-tech": <current version>}`
143
143
  - Check downstream stages (forge-4-backlog, forge-5-loop, forge-6-docs). If any have `basedOnVersions` referencing older versions, set their status to `stale`
144
- 2. Use `AskUserQuestion` to ask about notes to persist
144
+ 2. Use the host's question mechanism to ask about notes to persist
145
145
  3. If `gitCommitAfterStage` is true, follow the Git Commit Protocol in `references/shared-conventions.md`: stage files, attempt commit with message `"{commitPrefix}({feature}): complete implementation specs v{n}"`, then set `stages.forge-3-specs.status` to `complete` with commit hash only on success. If commit fails, leave status as `in-progress`.
146
146
  5. Tell the user: "Implementation specs complete. Next steps:\n - `/feature-forge:forge-verify {feature}` to verify the specs (strongly recommended)\n - `/feature-forge:forge-4-backlog {feature}` to generate the backlog\n - `/feature-forge:forge {feature}` to see full pipeline status"
147
147
 
@@ -152,3 +152,13 @@ Write pipeline state conforming to `references/pipeline-state-schema.json`.
152
152
  - Resist the urge to create too many documents. Each document should represent a major concern. If a "document" would be under 50 lines, it probably belongs as a section in another document.
153
153
  - Watch for implicit dependencies between subsystems. If subsystem A's types are used by subsystem B, the spec should explicitly state this and ensure the types are defined in the shared types document.
154
154
  - If the feature is large, the spec suite might be 8-12 documents. If it's simple, 3-4 is fine. Match complexity to the feature, not a fixed template.
155
+
156
+ ---
157
+
158
+ ## Host execution notes
159
+
160
+ This skill was authored Claude-first; the body above refers to "the host's question mechanism", "the host's subagent mechanism", and "the host's background-execution mechanism". Use your runtime's equivalent for each — and if your runtime has no such tool:
161
+
162
+ - **User input:** ask the question directly and wait for the answer before proceeding. Do not skip a required question or assume an answer.
163
+ - **Subagents:** if your host cannot dispatch the named custom agent, run that step inline yourself.
164
+ - **Background / monitoring:** run long-lived commands in the foreground (or your host's background facility) and report progress as it arrives.
@@ -31,7 +31,7 @@ This is the **single** place this rule is implemented. forge-5-loop's backlog-fi
31
31
 
32
32
  Resolve the **loop runner** from the `loopRunner` block in `forge.config.json`, filling missing fields from the defaults in `references/forge-config-schema.json` (defaults to rauf). You need its `bin`, `validateCommand`, `versionCommand`, `minRunnerVersion`, and `installHint`.
33
33
 
34
- **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.
34
+ **Turn structure reminder:** Output analysis/context as text, then route ALL questions through the host's question mechanism. Never embed questions in text output — the user will not be prompted and the session will stall.
35
35
 
36
36
  ## Step 1: Validate Prerequisites
37
37
 
@@ -39,7 +39,7 @@ Resolve the **loop runner** from the `loopRunner` block in `forge.config.json`,
39
39
 
40
40
  **Prerequisite check:** Read `{resolvedFeatureDir}/.pipeline-state.json`. If not in force mode, stages `forge-1-prd`, `forge-2-tech`, and `forge-3-specs` must all be `complete`. If not, STOP and tell the user which prerequisites are missing.
41
41
 
42
- **Strongly recommended:** Check if specs have been verified. If not, use `AskUserQuestion` to warn: "Specs haven't been verified yet. It's recommended to run `/feature-forge:forge-verify {feature}` first. Continue anyway?"
42
+ **Strongly recommended:** Check if specs have been verified. If not, use the host's question mechanism to warn with the cost of skipping: "Specs haven't been verified yet. Recommended: run `/feature-forge:forge-verify {feature}` first — unverified specs can carry gaps or contradictions that get baked into backlog items and only surface mid-loop, where they're far more expensive to fix. Continue anyway?" Offer **Verify first (recommended)** · **Continue without verifying**.
43
43
 
44
44
  ## Step 2: Load All Specs
45
45
 
@@ -68,7 +68,7 @@ Proposed backlog for {feature} ({N} items):
68
68
  ...
69
69
  ```
70
70
 
71
- After presenting the plan as text, use `AskUserQuestion` to ask: "Does this breakdown look right? Any items to split, merge, or reorder?" Do NOT include this question in your text output. Wait for the user's response before generating the JSON.
71
+ After presenting the plan as text, use the host's question mechanism following the **Decision Support** protocol in `references/shared-conventions.md`: recommend this breakdown as the default (it's your evidence-backed read of the specs and dependency order) and name the trade-off that governs item granularity — finer items are each easier to verify in one loop iteration but multiply coordination and dependency edges; coarser items mean fewer handoffs but risk an item too big to complete or verify in a single iteration. Lead with: "I recommend this breakdown. Any items to split, merge, or reorder?" Do NOT include this question in your text output. Wait for the user's response before generating the JSON.
72
72
 
73
73
  ## Step 4: Author backlog.json — delegate to `author-backlog`
74
74
 
@@ -123,7 +123,7 @@ Interpret the result:
123
123
 
124
124
  Present a summary: total items N, dependency-chain depth, estimated loop iterations (`ceil(pendingItems * loopIterationMultiplier)`). Note whether validation passed or was skipped (runner not yet available).
125
125
 
126
- Use `AskUserQuestion` to ask: "Ready to proceed, or any adjustments needed?"
126
+ Use the host's question mechanism to ask: "Ready to proceed, or any adjustments needed?"
127
127
 
128
128
  ## Step 7: Update Pipeline State and Commit
129
129
 
@@ -134,7 +134,7 @@ Write pipeline state conforming to `references/pipeline-state-schema.json`. Foll
134
134
  - Set `stages.forge-4-backlog.basedOnVersions` to `{"forge-1-prd": <current version>, "forge-2-tech": <current version>, "forge-3-specs": <current version>}`
135
135
  - Set `currentStage` to `forge-5-loop`
136
136
  - Check downstream stages (`forge-5-loop`, `forge-6-docs`). If any have `basedOnVersions` referencing an older version of `forge-4-backlog`, set their status to `stale`.
137
- 2. Use `AskUserQuestion` to ask about notes to persist
137
+ 2. Use the host's question mechanism to ask about notes to persist
138
138
  3. If `gitCommitAfterStage` is true, follow the Git Commit Protocol: stage files, attempt commit, then set status to `complete` with commit hash only on success. If commit fails, leave status as `in-progress`.
139
139
  4. If verification was available but the user chose to skip it, record `stages.forge-verify-backlog.status` as `"skipped"` in pipeline state.
140
140
  5. Tell user: "Backlog complete with {N} items. Next steps:\n - `/feature-forge:forge-verify {feature}` to verify the backlog\n - `/feature-forge:forge-5-loop {feature}` to run the loop\n - `/feature-forge:forge {feature}` to see full pipeline status"
@@ -144,3 +144,13 @@ Write pipeline state conforming to `references/pipeline-state-schema.json`. Foll
144
144
  - The loop runs each item in a FRESH context. Every item description must be self-contained — `author-backlog` enforces this, but double-check Step-3 plan items aren't "same as above."
145
145
  - Spec references must be project-root-relative paths that actually exist — the validate command enforces this when `--specs-dir` is passed (resolving them from the project root).
146
146
  - Don't present a backlog to the user before it validates (or before you've explicitly recorded that validation was skipped because the runner isn't installed yet).
147
+
148
+ ---
149
+
150
+ ## Host execution notes
151
+
152
+ This skill was authored Claude-first; the body above refers to "the host's question mechanism", "the host's subagent mechanism", and "the host's background-execution mechanism". Use your runtime's equivalent for each — and if your runtime has no such tool:
153
+
154
+ - **User input:** ask the question directly and wait for the answer before proceeding. Do not skip a required question or assume an answer.
155
+ - **Subagents:** if your host cannot dispatch the named custom agent, run that step inline yourself.
156
+ - **Background / monitoring:** run long-lived commands in the foreground (or your host's background facility) and report progress as it arrives.
@@ -36,7 +36,7 @@ Token substitution applies to every `*Command` string. Substitute:
36
36
  Whenever this skill says "run the **run command**" / "**status command**" /
37
37
  etc., it means the corresponding substituted `loopRunner.*Command`.
38
38
 
39
- **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.
39
+ **Turn structure reminder:** Output analysis/context as text, then route ALL questions through the host's question mechanism. Never embed questions in text output — the user will not be prompted and the session will stall.
40
40
 
41
41
  ## Step 1: Validate Prerequisites
42
42
 
@@ -50,9 +50,9 @@ Read `{resolvedFeatureDir}/.pipeline-state.json`. If not in force mode, `stages.
50
50
 
51
51
  ### 1b. Verification Check
52
52
 
53
- Check if `stages.forge-verify-backlog` exists and has status `passed` or `findings-applied`. If not, use `AskUserQuestion` to warn:
53
+ Check if `stages.forge-verify-backlog` exists and has status `passed` or `findings-applied`. If not, use the host's question mechanism to warn:
54
54
 
55
- "Backlog hasn't been verified yet. It's recommended to run `/feature-forge:forge-verify {feature}` first to catch issues before implementation. Continue anyway?"
55
+ "Backlog hasn't been verified yet. Recommended: run `/feature-forge:forge-verify {feature}` first — the loop implements items autonomously and commits as it goes, so a bad item (wrong scope, missing dependency, untestable acceptance criteria) is far cheaper to catch now than after several commits build on it. Continue anyway?" Offer **Verify first (recommended)** · **Continue without verifying**.
56
56
 
57
57
  ### 1b-epic. Epic Dependency Gate
58
58
 
@@ -61,7 +61,7 @@ Read the resolved feature's `.pipeline-state.json`. **If it has no `epic` key, s
61
61
  1. Run `render-status "{epic}" --specs-dir "{specsDir}" --json` via the helper:
62
62
 
63
63
  ```bash
64
- R="$(for d in "$HOME"/.claude/skills/feature-forge "$HOME"/.claude/plugins/*/feature-forge; do [ -x "$d/scripts/forge-root.sh" ] && exec "$d/scripts/forge-root.sh"; done)"
64
+ 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)"
65
65
  [ -n "$R" ] || { echo "feature-forge: cannot locate plugin root" >&2; exit 1; }
66
66
  python3 "$R/scripts/epic-manifest.py" \
67
67
  render-status "{epic}" --specs-dir "{specsDir}" --json
@@ -69,7 +69,7 @@ python3 "$R/scripts/epic-manifest.py" \
69
69
 
70
70
  2. Find this feature's entry; read its `unmetDeps` (the direct `dependsOn` not yet complete-for-orchestration per `00-core-definitions.md §7`).
71
71
  3. **If `unmetDeps` is empty**, proceed to 1c with no prompt.
72
- 4. **If `unmetDeps` is non-empty**, use `AskUserQuestion` (do NOT inline the question as prose) to warn that the feature depends on the unmet dependencies, which are not yet complete, and that running the loop now means implementing against contracts that may still change:
72
+ 4. **If `unmetDeps` is non-empty**, use the host's question mechanism (do NOT inline the question as prose) to warn that the feature depends on the unmet dependencies, which are not yet complete, and that running the loop now means implementing against contracts that may still change:
73
73
 
74
74
  > "{feature} depends on {unmetDeps joined}, which are not yet complete. Running the loop now means implementing against contracts that may still change. Proceed anyway, or stop and finish the dependencies first?"
75
75
 
@@ -101,13 +101,8 @@ For the version-too-old case, phrase it concretely, e.g.: "Your rauf is {reporte
101
101
 
102
102
  Check that `loopRunner.preconditionFile` (default `.rauf.json`) exists in the project root. If not:
103
103
 
104
- - **If `loopRunner.name == "rauf"` and a legacy `.ralph.json` (or `.ralph/` directory) exists**, this is an un-migrated Ralph project. STOP and tell the user:
105
-
106
- "This project is still on the legacy **Ralph** layout. Run `rauf migrate .` first (the loop runner only understands `.rauf/` and `RAUF_*` signals), then re-run `/feature-forge:forge-5-loop {feature}`."
107
-
108
- - **Otherwise**, STOP and show `loopRunner.setupHint` (default: "Run `rauf install .` …"), e.g.:
109
-
110
- "The loop runner isn't set up in this project ({preconditionFile} is missing). {setupHint}"
104
+ - **If `loopRunner.name == "rauf"` and a legacy `.ralph.json` (or `.ralph/` directory) exists**, this is an un-migrated Ralph project. STOP: "This project is still on the legacy **Ralph** layout. Run `rauf migrate .` first (the loop runner only understands `.rauf/` and `RAUF_*` signals), then re-run `/feature-forge:forge-5-loop {feature}`."
105
+ - **Otherwise**, STOP and show `loopRunner.setupHint` (default: "Run `rauf install .` …"), e.g. "The loop runner isn't set up in this project ({preconditionFile} is missing). {setupHint}"
111
106
 
112
107
  ### 1e. Backlog File Check
113
108
 
@@ -117,6 +112,10 @@ Resolve the backlog file path (matching forge-4-backlog's composition rule, item
117
112
 
118
113
  Verify the file exists on disk. If not, STOP and tell the user: "No backlog.json found at {path}. Run `/feature-forge:forge-4-backlog {feature}` to generate it."
119
114
 
115
+ ### 1f. Branch Pre-flight (if using git)
116
+
117
+ The runner commits each completed item straight onto the current branch, so guard against committing onto the default branch. Skip if not a git repo or `branchPerFeature` is false. Read the current branch (`git rev-parse --abbrev-ref HEAD`) and default branch (`git symbolic-ref --quiet refs/remotes/origin/HEAD`, else `main`/`master`). If `.pipeline-state.json` records a `branch` that differs from the current one, warn via the host's question mechanism (offer **switch back** or **proceed here**). Otherwise, if the current branch **is** the default, strongly recommend via the host's question mechanism creating/switching to `{branchPrefix}{feature}` (`git switch -c`, then record it to the state `branch` field) before the loop commits — still allowing **proceed on `{defaultBranch}`**. Never hard-stop.
118
+
120
119
  ## Step 2: Construct the Loop Command
121
120
 
122
121
  ### 2a. Analyze Backlog
@@ -148,7 +147,7 @@ rauf loop run . --backlog specs/auth --iterations 15
148
147
 
149
148
  ### 2d. Confirm with User
150
149
 
151
- Use `AskUserQuestion` to present the rendered run command and options. The following block is the content for `AskUserQuestion` — do NOT output it as text:
150
+ Use the host's question mechanism to present the rendered run command and options. The following block is the content for the host's question mechanism — do NOT output it as text:
152
151
 
153
152
  ```
154
153
  Ready to run the loop for {feature}:
@@ -177,9 +176,10 @@ For the full loop-runner contract — event-stream vs. log-fallback launch, the
177
176
  **Capability gate.** Everything below applies **only when** the effective `loopRunner.agentArgument` is present and non-empty. **When it is absent or empty, Step 2d is exactly the confirmation above — no probe, no agent question, no availability listing, no `Agent:` line — byte-identical to today** (REQ-PLUG-02, REQ-COMPAT-01). The full algorithm, precedence, and verbatim message shapes are in `## Agent selection` of `references/runner-contract.md`; read it. When the gate is on, augment Step 2d in order:
178
177
 
179
178
  - **(a) Probe once.** Before confirming, run `loopRunner.agentsProbeCommand` (default `{bin} agents --json`) **exactly once** (no retries, no second probe); it exits 0 with `{ agents: [...] }`. Parse `agents[]`; build the advertised set `{ row.id }` — this one parsed array drives (b)–(d).
180
- - **(b) Agent question.** Add an **"agent"** question to the same `AskUserQuestion` surface: **one option per advertised row** labelled `"{displayName} ({id}) — available/not found"`, **plus an explicit `"default (claude-cli)"` choice mapping to `run_selection = None`**. Resolve the pick (run > project, empty/whitespace unset, an explicit runner-default pick collapses to the default path) into `{resolved.agent, resolved.source}`. Precedence: `item.provider > --agent > project defaultAgent > runner default` (forge never reads a backlog item's provider).
179
+ - **(b) Agent question.** Add an **"agent"** question to the same the host's question mechanism surface: **one option per advertised row** labelled `"{displayName} ({id}) — available/not found"`, **plus an explicit `"default (claude-cli)"` choice mapping to `run_selection = None`**. Resolve the pick (run > project, empty/whitespace unset, an explicit runner-default pick collapses to the default path) into `{resolved.agent, resolved.source}`. Precedence: `item.provider > --agent > project defaultAgent > runner default` (forge never reads a backlog item's provider).
181
180
  - **(c) Availability listing.** From the **same** parsed `agents[]` (no second probe), list `id` / `displayName` / available (`yes`/`no`, `detail` on unavailable rows).
182
- - **(d) Verdict** — only for a **non-default** resolved agent (default path `None`/`claude-cli` → no probe, byte-identical to today). Classify by **membership** then `available` (never by exit code): **UNKNOWN** (`∉` set) → **hard-reject BEFORE any loop side-effect**, error lists the **sorted** valid ids, **NO proceed-anyway**; **UNAVAILABLE** (member, `available False`) → warn with `detail`, `AskUserQuestion` offering **proceed-anyway OR choose-another** (re-presents the same `agents[]`), never silent; **AVAILABLE** → proceed, the validated id fills `{agent}`; **probe failure** (non-zero exit / unparseable / missing or empty `agents[]` / row lacking `id`) → surface it, offer **choose-another OR abort**, **never launch the non-default agent unvalidated** and never silently fall back to the default.
181
+ - **(d) Verdict** — only for a **non-default** resolved agent (default path `None`/`claude-cli` → no probe, byte-identical to today). Classify by **membership** then `available` (never by exit code): **UNKNOWN** (`∉` set) → **hard-reject BEFORE any loop side-effect**, error lists the **sorted** valid ids, **NO proceed-anyway**; **UNAVAILABLE** (member, `available False`) → warn with `detail`, the host's question mechanism offering **proceed-anyway OR choose-another** (re-presents the same `agents[]`), never silent; **AVAILABLE** → proceed, the validated id fills `{agent}`; **probe failure** (non-zero exit / unparseable / missing or empty `agents[]` / row lacking `id`) → surface it, offer **choose-another OR abort**, **never launch the non-default agent unvalidated** and never silently fall back to the default.
182
+ - **(d-model) Claude-only model-alias guard.** Runs **only** when the resolved agent is **non-default** (not the default / `claude-cli` path). Read the backlog.json (Step 1e path); collect items whose `model` is a **Claude-specific alias** (tier `opus`/`sonnet`/`haiku` or a `claude-*` id). **If none, skip silently.** Otherwise warn before launch via the host's question mechanism (NOT prose): `item.model` outranks `--agent`, so the alias is forwarded verbatim to `{agent}`, which will likely reject it (e.g. codex 400 *"The 'sonnet' model is not supported…"*) — every spawn exits 1 and rauf circuit-breaks (*"3 consecutive infra failures — halting"*) with no hint of the cause. Offer: **(1) Strip `model` for this run (recommended)** — rewrite backlog.json removing the `model` key from each affected item (persistent edit; re-run forge-4-backlog to restore), then proceed; **(2) Proceed as-is** — only safe if `{agent}` understands the pinned ids. forge touches only `model`, never `provider`. Full rationale: `references/runner-contract.md`.
183
183
  - **(e) Optional-flags line.** Replace the confirmation's optional-flags line with one that lists `--agent <id>` first plus the agent precedence pointer (`item.provider > --agent > project defaultAgent > runner default`) alongside the model precedence.
184
184
  - **(f) Resolved-agent line.** Add to the confirmation block: `Agent: {resolved.agent or claude-cli} (source: {sourceLabel})` — `sourceLabel`: `RUN` → `"per-run selection"`, `PROJECT` → `"project default (loopRunner.defaultAgent)"`, `DEFAULT` → `"runner default — claude-cli"`.
185
185
 
@@ -193,11 +193,11 @@ Before launching, update `{resolvedFeatureDir}/.pipeline-state.json`:
193
193
  - Set `currentStage` to `forge-5-loop`
194
194
  - Update `updatedAt`
195
195
 
196
- ### 3b. Launch Background Process
196
+ Then commit this state write before launching (mandatory). The runner refuses to run with uncommitted changes (*"…pass --force"*), and this marker is itself one — so an otherwise-clean repo fails its first launch unless committed. Commit it via the shared-conventions **Git Commit Protocol** (epic members: stage `{specsDir}/{epic}/`): `{commitPrefix}({feature}): forge-5-loop in-progress` — a launch precondition, required regardless of `gitCommitAfterStage`. Unrelated leftover changes still trip the refusal; surface it, never auto-pass `--force`. See `references/runner-contract.md`.
197
197
 
198
- Launch the loop **backgrounded** (`run_in_background: true`) so it survives session end and does not block the session, and prefer the machine-readable event stream (`loopRunner.eventStreamCommand`, default for rauf) redirected to a stable `events.ndjson` so the session can supervise it live; fall back to the plain `runCommand` (tailing the human log) when no `eventStreamCommand` is configured. The background task's exit notification is the single authoritative terminal signal (Step 4). For the exact launch commands (incl. the `mkdir -p` state-dir guard) and the event-stream vs. log-fallback detail, read `references/runner-contract.md`.
198
+ ### 3b. Launch Background Process
199
199
 
200
- Loop runs can take significant time (minutes to hours depending on backlog size).
200
+ Launch the loop **backgrounded** (the host's background-execution mechanism) so it survives session end and does not block the session, and prefer the machine-readable event stream (`loopRunner.eventStreamCommand`, default for rauf) redirected to a stable `events.ndjson` so the session can supervise it live; fall back to the plain `runCommand` (tailing the human log) when no `eventStreamCommand` is configured. The background task's exit notification is the single authoritative terminal signal (Step 4). Loop runs can take significant time (minutes to hours depending on backlog size). For the exact launch commands (incl. the `mkdir -p` state-dir guard) and the event-stream vs. log-fallback detail, read `references/runner-contract.md`.
201
201
 
202
202
  ### 3c. Inform User
203
203
 
@@ -211,9 +211,9 @@ verbatim "Loop started…" inform-user output template is in
211
211
 
212
212
  ### 3d. Arm a Monitor on the event stream, and react to events
213
213
 
214
- Arm the **`Monitor` tool** on the structured event stream (the NDJSON file, or the
214
+ Arm the **the host's monitoring mechanism** on the structured event stream (the NDJSON file, or the
215
215
  human log as fallback) so events flow back into this session as they happen. Use
216
- **`persistent: true`** — runs can exceed `Monitor`'s maximum `timeout_ms` (1 hour),
216
+ **`persistent: true`** — runs can exceed the host's monitoring mechanism's maximum `timeout_ms` (1 hour),
217
217
  and a bounded timeout would silently stop watching a still-running loop. The filter
218
218
  MUST match every terminal and exception state, not just the happy path (silence is
219
219
  not success). Monitor the **structured** surface, never raw `RAUF_*` tokens.
@@ -246,7 +246,7 @@ Run the **status-json command** (`loopRunner.statusJsonCommand`) and read
246
246
  `backlogSummary` for the authoritative counts — it separates the three non-done
247
247
  outcomes: genuine `blocked`, `needsHuman`, and runner-`deferred` ("false blocks").
248
248
  Fall back to the **list command** (`loopRunner.listCommand`) if `statusJsonCommand`
249
- is not configured. You will already have most of this from the live tally in 3e.
249
+ is not configured. You will already have most of this from the live tally in 3e. If the run used a review flag (e.g. rauf's `--review`), also read any `review_completed` event (event stream, or `{loopRunner.stateDir}/events.ndjson`) for its `itemsCreated`/`summary` to surface in 4b — see `references/result-reporting.md`.
250
250
 
251
251
  ### 4b. Report Results
252
252
 
@@ -267,15 +267,17 @@ Update `{resolvedFeatureDir}/.pipeline-state.json`:
267
267
  2. If all items complete: set `currentStage` to `"forge-6-docs"`
268
268
  3. Update `updatedAt`
269
269
 
270
- **No git commit is needed** — the loop runner commits atomically per completed item during the run. The implementation code is already committed.
270
+ **No git commit is needed** — the loop runner commits implementation code atomically per completed item during the run. (Step 6's commit, epic members only, is of pipeline state / manifest — a distinct artifact.)
271
271
 
272
- > **Note:** Step 5's "no git commit needed" remark refers to *implementation code*, which the runner commits per-item. The epic handoff's commit in Step 6 below is of *pipeline state / manifest* — a distinct artifact — and applies only to epic members.
272
+ ## Step 5b: Offer Impl-Verify (standalone path)
273
+
274
+ **Gate:** run only if (a) the feature's `.pipeline-state.json` has **no** `epic` key **and** (b) Step 5 set `stages.forge-5-loop.status` to `complete`. Otherwise **skip** — partial runs end as today, and epic members get the equivalent offer in Step 6.1 (do **not** prompt twice). This standalone counterpart to Step 6.1 nudges verification interactively rather than via the easily-missed "Next steps" text. Use the host's question mechanism (NOT inline prose) to offer: *"{feature}'s loop is complete. Recommended: run `/feature-forge:forge-verify {feature} impl` to audit the implementation before generating docs. Run it now, or skip to forge-6-docs?"* On **run**, hand off to `/feature-forge:forge-verify {feature} impl`. On **skip**, record `stages.forge-verify-impl.status` as `"skipped"` (mirrors `forge-4-backlog`'s skip handling) and point the user at `/feature-forge:forge-6-docs {feature}` — the forge-6-docs backstop re-surfaces the skip.
273
275
 
274
276
  ## Step 6: Epic Handoff
275
277
 
276
- **Gate:** only run this step if (a) the resolved feature's `.pipeline-state.json` has an `epic` key **and** (b) Step 5 set `stages.forge-5-loop.status` to `complete` (all backlog items done). If either is false, **skip** — standalone features and partial runs end exactly as today (REQ-COMPAT-01).
278
+ **Gate:** only run this step if (a) the resolved feature's `.pipeline-state.json` has an `epic` key **and** (b) Step 5 set `stages.forge-5-loop.status` to `complete` (all backlog items done). If either is false, **skip** — standalone completed features are handled by Step 5b, and partial runs end as today (REQ-COMPAT-01).
277
279
 
278
- 1. **Offer impl-verify first (recommended, skippable).** Per the completion rule (`00-core-definitions.md §7`), a feature whose `forge-verify-impl.status == findings-reported` does **not** unblock dependents. Use `AskUserQuestion` (NOT inline prose) to offer:
280
+ 1. **Offer impl-verify first (recommended, skippable).** Per the completion rule (`00-core-definitions.md §7`), a feature whose `forge-verify-impl.status == findings-reported` does **not** unblock dependents. Use the host's question mechanism (NOT inline prose) to offer:
279
281
 
280
282
  > "{feature}'s loop is done. Recommended: run `/feature-forge:forge-verify {feature} impl` before unblocking dependents. Run it now, or skip and continue the handoff?"
281
283
 
@@ -285,7 +287,7 @@ Update `{resolvedFeatureDir}/.pipeline-state.json`:
285
287
  - **None actionable** (everything done, or remaining features still blocked): say so.
286
288
  - If `rollup.total > 0` **AND** `rollup.complete == rollup.total`, suggest `/feature-forge:forge-6-docs {feature}` and note the epic-level documentation offer (§10). The `rollup.total > 0` guard prevents an **empty epic** (`0 == 0`) from being reported complete.
287
289
  - Otherwise, list what is still blocked and on which dependencies. End — do not prompt to start a feature that cannot start.
288
- - **One or more actionable:** use `AskUserQuestion` presenting **each actionable feature** as an option (plus "stop here"). Execution is **serial** — the user picks exactly one (REQ-ORCH-03). Do **not** autonomously chain into the next pipeline.
290
+ - **One or more actionable:** use the host's question mechanism presenting **each actionable feature** as an option (plus "stop here"). Execution is **serial** — the user picks exactly one (REQ-ORCH-03). Do **not** autonomously chain into the next pipeline.
289
291
  4. **Begin the chosen feature.** For the picked feature:
290
292
  - **PRD absent** (no `PRD.md`, or `stages.forge-1-prd` not complete): offer to author it now — "Start `/feature-forge:forge-1-prd {chosen}`?" (REQ-ORCH-02). On yes, hand off to forge-1-prd (which injects epic context per §5.1).
291
293
  - **PRD present:** point the user at the chosen feature's `nextCommand` from render-status.
@@ -297,7 +299,17 @@ Update `{resolvedFeatureDir}/.pipeline-state.json`:
297
299
  - rauf resolves `RAUF.md` with fallback: checks `{backlogDir}/.rauf/RAUF.md` first, then the project's `.rauf/RAUF.md`. As long as the runner is installed in the project, the prompt template will be found.
298
300
  - State files (state.json, {loopRunner.logFile}, etc.) are created at `{backlogDir}/{loopRunner.stateDir}/` — this is within the feature's spec directory and is expected. State is isolated per backlog dir, so concurrent features don't collide.
299
301
  - If the session disconnects during a long-running loop, the runner process continues independently. The user can check results later with the status / list commands.
300
- - Never run the run command in the foreground (without `run_in_background`) — it blocks and will hit the Bash tool timeout for any non-trivial backlog. "Don't block the foreground" is NOT "stay silent": supervise via the `Monitor` tool (3d), which is harness-driven, not a sleep loop. Never `sleep`/poll in the foreground to wait for the loop.
301
- - The `Monitor` must use `persistent: true` (not a bounded `timeout_ms`), watch the **structured** surface (`events.ndjson`), and never filter on raw `RAUF_*` tokens — they appear in agent prose and false-match. A `needs_human`/`blocked`/`review` signal does **not** pause the loop — the runner sets the item aside and keeps going; surface it live but don't tell the user the loop is waiting. See `references/runner-contract.md` for the full monitoring rules.
302
+ - Never run the run command in the foreground (without the host's background-execution mechanism) — it blocks and will hit the Bash tool timeout for any non-trivial backlog. "Don't block the foreground" is NOT "stay silent": supervise via the host's monitoring mechanism (3d), never `sleep`/poll in the foreground. The the host's monitoring mechanism must use `persistent: true` (not a bounded `timeout_ms`), watch the **structured** surface (`events.ndjson`), and never filter on raw `RAUF_*` tokens — they appear in agent prose and false-match. A `needs_human`/`blocked`/`review` signal does **not** pause the loop the runner sets the item aside and keeps going; surface it live but don't tell the user the loop is waiting. See `references/runner-contract.md` for the full monitoring rules.
302
303
  - If a previous loop run left a stale lock, the user may need to pass `--force` to clear it. rauf will report this error clearly.
303
304
  - The version gate (1c) uses the `--json` form on purpose; never parse `rauf version`'s human output.
305
+ - **Implementation artifacts must not cite specs.** The loop should **read** the specs and `backlog.json` freely — they are the source of truth for what to build, and the backlog rightly references specs for provenance. But the artifacts the loop **writes into the target repo** (source code, generated `SKILL.md`/agent files, configs, code comments) must be **self-contained**: they must NOT reference feature-forge spec files (no `See specs/{feature}/NN-*.md`, no "source spec" provenance notes in shipped output). Specs are pre-implementation inputs that may be archived or deleted once the feature ships; the implementation must stand on its own. This applies only to shipped implementation output — never to the backlog or spec documents, which should keep citing specs.
306
+
307
+ ---
308
+
309
+ ## Host execution notes
310
+
311
+ This skill was authored Claude-first; the body above refers to "the host's question mechanism", "the host's subagent mechanism", and "the host's background-execution mechanism". Use your runtime's equivalent for each — and if your runtime has no such tool:
312
+
313
+ - **User input:** ask the question directly and wait for the answer before proceeding. Do not skip a required question or assume an answer.
314
+ - **Subagents:** if your host cannot dispatch the named custom agent, run that step inline yourself.
315
+ - **Background / monitoring:** run long-lived commands in the foreground (or your host's background facility) and report progress as it arrives.
@@ -13,6 +13,19 @@ Next steps:
13
13
  - /feature-forge:forge-6-docs {feature} Generate architecture docs
14
14
  ```
15
15
 
16
+ **Runner review pass.** A review flag (e.g. rauf's `--review`) makes the runner run
17
+ a post-loop review that **auto-creates and implements fix items** rather than handing
18
+ findings to the user — distinct from `forge-verify impl` (a clean-context audit that
19
+ writes a findings doc). When Step 4a captured a `review_completed` event, add a line
20
+ **above** "Next steps" so the pass's effect is visible and not mistaken for "nothing
21
+ happened":
22
+ ```
23
+ Runner review pass: {itemsCreated} fix item(s) created and implemented.
24
+ {summary}
25
+ ```
26
+ Omit this line when no `review_completed` event was emitted (no review flag passed).
27
+ The created items are already counted in the totals above.
28
+
16
29
  **Some items need a human:**
17
30
  ```
18
31
  Loop completed for {feature}.
@@ -70,6 +70,38 @@ The default / `claude-cli` path runs **no** probe (zero extra cost). See
70
70
  `04-availability-precheck.md` for the full pre-check, classification, and allow-list,
71
71
  and `02-config-schema-and-gating.md` for the capability gate.
72
72
 
73
+ > **Probe false-negative for Claude Code installs (advisory).** `rauf agents` may
74
+ > report `claude-cli` **unavailable** (e.g. *"credentials file not found:
75
+ > ~/.config/claude-code/credentials.json"*) even when a working `claude` CLI
76
+ > authenticates elsewhere — the probe's credential heuristic doesn't cover every
77
+ > install. This is a rauf probe concern, not something forge-5-loop fixes. The
78
+ > **default-agent path skips the probe entirely**, so an ordinary default run is
79
+ > unaffected; only an **explicit** `--agent claude-cli` would be flagged UNAVAILABLE,
80
+ > and the existing **proceed-anyway** path (above) covers it. Do not attempt to
81
+ > patch rauf's probe from here.
82
+
83
+ ### Claude-only model-alias guard (Step 2d, sub-step d-model)
84
+
85
+ When the resolved agent is **non-default** (not the default / `claude-cli` path),
86
+ forge must guard against a backlog whose items pin **Claude-specific** model aliases.
87
+ forge-4-backlog (via the rauf author-backlog skill) writes Claude tier aliases
88
+ (`opus` / `sonnet`) into each item's `model`. Because rauf's precedence puts
89
+ `item.model` **above** `--agent`, the alias is forwarded verbatim to the selected
90
+ agent; a non-Claude agent (e.g. codex) then 400s — *"The 'sonnet' model is not
91
+ supported when using Codex with a ChatGPT account."* — so **every** spawn exits 1 and
92
+ rauf reports *"Circuit breaker: 3 consecutive infra failures — halting"* with no hint
93
+ of the real cause. forge-5-loop therefore detects Claude-specific `model` aliases in
94
+ the backlog (tier aliases `opus`/`sonnet`/`haiku` or `claude-*` ids) and, before
95
+ launch, **warns** and offers (via `AskUserQuestion`) to **strip `model` for this run**
96
+ (remove the key from each affected item so each spawn uses the agent's own default) or
97
+ **proceed as-is**. forge only ever touches the `model` field — never `provider`. The
98
+ default / `claude-cli` path skips this guard (the aliases are valid there).
99
+
100
+ > **Follow-up (out of scope here — rauf repo).** The durable fix would be for the
101
+ > rauf `author-backlog` skill to keep `model` **provider-neutral** by default (or to
102
+ > document that writing a tier alias binds the backlog to Claude agents). That lives
103
+ > in the separate rauf plugin/repo, not feature-forge; tracked as a follow-up.
104
+
73
105
  ## Optional flags catalog (Step 2d, rauf)
74
106
 
75
107
  These are the optional flags the user may add to the rendered run command. If the
@@ -92,6 +124,14 @@ Launch the loop **backgrounded** so it survives session end and does not block t
92
124
  session, and prefer the machine-readable event stream so the session can supervise
93
125
  it live.
94
126
 
127
+ > **Clean-tree precondition.** rauf refuses to run with uncommitted changes
128
+ > (*"Refusing to run the loop with uncommitted changes… pass --force"*). Step 3a's
129
+ > in-progress `.pipeline-state.json` write is itself an uncommitted change, so it
130
+ > **must be committed before launch** (Step 3a) — otherwise the first launch on an
131
+ > otherwise-clean repo always fails. If the tree still has unrelated uncommitted
132
+ > changes after that commit, surface it and let the user commit/stash or pass
133
+ > `--force`; never auto-pass `--force`.
134
+
95
135
  - **If `loopRunner.eventStreamCommand` is configured (default for rauf):** render it
96
136
  (it appends `--ndjson` to the run) and launch via the Bash tool with
97
137
  `run_in_background: true`, redirecting stdout to a stable events file: