@garygentry/feature-forge 0.3.2 → 0.3.4

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (384) hide show
  1. package/adapters/claude/.feature-forge-bundle.json +1 -1
  2. package/adapters/claude/agents/forge-verifier.md +3 -1
  3. package/adapters/claude/references/decisions/single-writer-threat-model.md +53 -0
  4. package/adapters/claude/references/epic-state-schema.json +50 -0
  5. package/adapters/claude/references/forge-config-schema.json +18 -0
  6. package/adapters/claude/references/forge-decisions-schema.json +33 -0
  7. package/adapters/claude/references/pipeline-state-schema.json +34 -2
  8. package/adapters/claude/references/ralph-loop-contract.md +6 -3
  9. package/adapters/claude/references/shared-conventions.md +15 -4
  10. package/adapters/claude/references/stage-exit-protocol.md +55 -11
  11. package/adapters/claude/scripts/epic-manifest.py +82 -4
  12. package/adapters/claude/scripts/fix-sweep.py +1180 -0
  13. package/adapters/claude/scripts/forge-session.py +1124 -26
  14. package/adapters/claude/skills/forge/SKILL.md +5 -5
  15. package/adapters/claude/skills/forge/references/pipeline-state-schema.json +34 -2
  16. package/adapters/claude/skills/forge/references/shared-conventions.md +15 -4
  17. package/adapters/claude/skills/forge/references/stage-exit-protocol.md +55 -11
  18. package/adapters/claude/skills/forge-0-epic/references/edit-mode.md +5 -1
  19. package/adapters/claude/skills/forge-0-epic/references/epic-manifest-subcommands.md +5 -0
  20. package/adapters/claude/skills/forge-0-epic/references/pipeline-state-schema.json +34 -2
  21. package/adapters/claude/skills/forge-0-epic/references/shared-conventions.md +15 -4
  22. package/adapters/claude/skills/forge-0-epic/references/stage-exit-protocol.md +55 -11
  23. package/adapters/claude/skills/forge-1-prd/SKILL.md +3 -1
  24. package/adapters/claude/skills/forge-1-prd/references/shared-conventions.md +15 -4
  25. package/adapters/claude/skills/forge-1-prd/references/stage-exit-protocol.md +55 -11
  26. package/adapters/claude/skills/forge-2-tech/SKILL.md +5 -1
  27. package/adapters/claude/skills/forge-2-tech/references/shared-conventions.md +15 -4
  28. package/adapters/claude/skills/forge-2-tech/references/stage-exit-protocol.md +55 -11
  29. package/adapters/claude/skills/forge-3-specs/SKILL.md +5 -1
  30. package/adapters/claude/skills/forge-3-specs/references/shared-conventions.md +15 -4
  31. package/adapters/claude/skills/forge-3-specs/references/stage-exit-protocol.md +55 -11
  32. package/adapters/claude/skills/forge-4-backlog/SKILL.md +41 -3
  33. package/adapters/claude/skills/forge-4-backlog/references/shared-conventions.md +15 -4
  34. package/adapters/claude/skills/forge-4-backlog/references/stage-exit-protocol.md +55 -11
  35. package/adapters/claude/skills/forge-5-loop/SKILL.md +36 -36
  36. package/adapters/claude/skills/forge-5-loop/references/agent-selection.md +16 -0
  37. package/adapters/claude/skills/forge-5-loop/references/ralph-loop-contract.md +6 -3
  38. package/adapters/claude/skills/forge-5-loop/references/recovery-procedure.md +349 -0
  39. package/adapters/claude/skills/forge-5-loop/references/result-reporting.md +40 -11
  40. package/adapters/claude/skills/forge-5-loop/references/runner-contract.md +22 -4
  41. package/adapters/claude/skills/forge-5-loop/references/shared-conventions.md +15 -4
  42. package/adapters/claude/skills/forge-5-loop/references/stage-exit-protocol.md +55 -11
  43. package/adapters/claude/skills/forge-6-docs/SKILL.md +29 -6
  44. package/adapters/claude/skills/forge-6-docs/references/shared-conventions.md +15 -4
  45. package/adapters/claude/skills/forge-6-docs/references/stage-exit-protocol.md +55 -11
  46. package/adapters/claude/skills/forge-fix/SKILL.md +34 -0
  47. package/adapters/claude/skills/forge-fix/references/shared-conventions.md +15 -4
  48. package/adapters/claude/skills/forge-fix/references/stage-exit-protocol.md +55 -11
  49. package/adapters/claude/skills/forge-guide/references/forge-config-schema.json +18 -0
  50. package/adapters/claude/skills/forge-guide/references/ralph-loop-contract.md +6 -3
  51. package/adapters/claude/skills/forge-guide/references/shared-conventions.md +15 -4
  52. package/adapters/claude/skills/forge-verify/SKILL.md +10 -11
  53. package/adapters/claude/skills/forge-verify/references/decisions/single-writer-threat-model.md +53 -0
  54. package/adapters/claude/skills/forge-verify/references/findings-template.md +30 -0
  55. package/adapters/claude/skills/forge-verify/references/shared-conventions.md +15 -4
  56. package/adapters/claude/skills/forge-verify/references/stage-exit-protocol.md +55 -11
  57. package/adapters/claude/skills/forge-verify/references/verification-checklists/backlog.md +73 -0
  58. package/adapters/claude/skills/forge-verify/references/verification-checklists/impl.md +85 -0
  59. package/adapters/claude/skills/forge-verify/references/verification-checklists/specs.md +43 -1
  60. package/adapters/codex/.feature-forge-bundle.json +1 -1
  61. package/adapters/codex/agents/forge-verifier.toml +3 -1
  62. package/adapters/codex/references/decisions/single-writer-threat-model.md +53 -0
  63. package/adapters/codex/references/epic-state-schema.json +50 -0
  64. package/adapters/codex/references/forge-config-schema.json +18 -0
  65. package/adapters/codex/references/forge-decisions-schema.json +33 -0
  66. package/adapters/codex/references/pipeline-state-schema.json +34 -2
  67. package/adapters/codex/references/process-overview.md +2 -2
  68. package/adapters/codex/references/ralph-loop-contract.md +6 -3
  69. package/adapters/codex/references/shared-conventions.md +44 -33
  70. package/adapters/codex/references/stage-exit-protocol.md +64 -20
  71. package/adapters/codex/scripts/epic-manifest.py +82 -4
  72. package/adapters/codex/scripts/fix-sweep.py +1180 -0
  73. package/adapters/codex/scripts/forge-session.py +1124 -26
  74. package/adapters/codex/skills/forge/SKILL.md +8 -8
  75. package/adapters/codex/skills/forge/references/pipeline-state-schema.json +34 -2
  76. package/adapters/codex/skills/forge/references/process-overview.md +2 -2
  77. package/adapters/codex/skills/forge/references/shared-conventions.md +44 -33
  78. package/adapters/codex/skills/forge/references/stage-exit-protocol.md +64 -20
  79. package/adapters/codex/skills/forge-0-epic/references/edit-mode.md +14 -10
  80. package/adapters/codex/skills/forge-0-epic/references/epic-manifest-subcommands.md +8 -3
  81. package/adapters/codex/skills/forge-0-epic/references/pipeline-state-schema.json +34 -2
  82. package/adapters/codex/skills/forge-0-epic/references/shared-conventions.md +44 -33
  83. package/adapters/codex/skills/forge-0-epic/references/stage-exit-protocol.md +64 -20
  84. package/adapters/codex/skills/forge-1-prd/SKILL.md +3 -1
  85. package/adapters/codex/skills/forge-1-prd/references/shared-conventions.md +44 -33
  86. package/adapters/codex/skills/forge-1-prd/references/stage-exit-protocol.md +64 -20
  87. package/adapters/codex/skills/forge-2-tech/SKILL.md +5 -1
  88. package/adapters/codex/skills/forge-2-tech/references/shared-conventions.md +44 -33
  89. package/adapters/codex/skills/forge-2-tech/references/stage-exit-protocol.md +64 -20
  90. package/adapters/codex/skills/forge-3-specs/SKILL.md +5 -1
  91. package/adapters/codex/skills/forge-3-specs/references/shared-conventions.md +44 -33
  92. package/adapters/codex/skills/forge-3-specs/references/stage-exit-protocol.md +64 -20
  93. package/adapters/codex/skills/forge-4-backlog/SKILL.md +41 -3
  94. package/adapters/codex/skills/forge-4-backlog/references/shared-conventions.md +44 -33
  95. package/adapters/codex/skills/forge-4-backlog/references/stage-exit-protocol.md +64 -20
  96. package/adapters/codex/skills/forge-5-loop/SKILL.md +36 -36
  97. package/adapters/codex/skills/forge-5-loop/references/agent-selection.md +17 -1
  98. package/adapters/codex/skills/forge-5-loop/references/ralph-loop-contract.md +6 -3
  99. package/adapters/codex/skills/forge-5-loop/references/recovery-procedure.md +349 -0
  100. package/adapters/codex/skills/forge-5-loop/references/result-reporting.md +40 -11
  101. package/adapters/codex/skills/forge-5-loop/references/runner-contract.md +26 -8
  102. package/adapters/codex/skills/forge-5-loop/references/shared-conventions.md +44 -33
  103. package/adapters/codex/skills/forge-5-loop/references/stage-exit-protocol.md +64 -20
  104. package/adapters/codex/skills/forge-6-docs/SKILL.md +29 -6
  105. package/adapters/codex/skills/forge-6-docs/references/shared-conventions.md +44 -33
  106. package/adapters/codex/skills/forge-6-docs/references/stage-exit-protocol.md +64 -20
  107. package/adapters/codex/skills/forge-fix/SKILL.md +34 -0
  108. package/adapters/codex/skills/forge-fix/references/shared-conventions.md +44 -33
  109. package/adapters/codex/skills/forge-fix/references/stage-exit-protocol.md +64 -20
  110. package/adapters/codex/skills/forge-guide/SKILL.md +1 -1
  111. package/adapters/codex/skills/forge-guide/references/forge-config-schema.json +18 -0
  112. package/adapters/codex/skills/forge-guide/references/process-overview.md +2 -2
  113. package/adapters/codex/skills/forge-guide/references/ralph-loop-contract.md +6 -3
  114. package/adapters/codex/skills/forge-guide/references/shared-conventions.md +44 -33
  115. package/adapters/codex/skills/forge-init/SKILL.md +1 -1
  116. package/adapters/codex/skills/forge-verify/SKILL.md +11 -12
  117. package/adapters/codex/skills/forge-verify/references/decisions/single-writer-threat-model.md +53 -0
  118. package/adapters/codex/skills/forge-verify/references/findings-template.md +32 -2
  119. package/adapters/codex/skills/forge-verify/references/shared-conventions.md +44 -33
  120. package/adapters/codex/skills/forge-verify/references/stage-exit-protocol.md +64 -20
  121. package/adapters/codex/skills/forge-verify/references/verification-checklists/backlog.md +73 -0
  122. package/adapters/codex/skills/forge-verify/references/verification-checklists/epic.md +1 -1
  123. package/adapters/codex/skills/forge-verify/references/verification-checklists/impl.md +85 -0
  124. package/adapters/codex/skills/forge-verify/references/verification-checklists/specs.md +43 -1
  125. package/adapters/copilot/.feature-forge-bundle.json +1 -1
  126. package/adapters/copilot/agents/forge-verifier.md +3 -1
  127. package/adapters/copilot/references/decisions/single-writer-threat-model.md +53 -0
  128. package/adapters/copilot/references/epic-state-schema.json +50 -0
  129. package/adapters/copilot/references/forge-config-schema.json +18 -0
  130. package/adapters/copilot/references/forge-decisions-schema.json +33 -0
  131. package/adapters/copilot/references/pipeline-state-schema.json +34 -2
  132. package/adapters/copilot/references/process-overview.md +2 -2
  133. package/adapters/copilot/references/ralph-loop-contract.md +6 -3
  134. package/adapters/copilot/references/shared-conventions.md +44 -33
  135. package/adapters/copilot/references/stage-exit-protocol.md +64 -20
  136. package/adapters/copilot/scripts/epic-manifest.py +82 -4
  137. package/adapters/copilot/scripts/fix-sweep.py +1180 -0
  138. package/adapters/copilot/scripts/forge-session.py +1124 -26
  139. package/adapters/copilot/skills/forge/forge.md +8 -8
  140. package/adapters/copilot/skills/forge/references/pipeline-state-schema.json +34 -2
  141. package/adapters/copilot/skills/forge/references/process-overview.md +2 -2
  142. package/adapters/copilot/skills/forge/references/shared-conventions.md +44 -33
  143. package/adapters/copilot/skills/forge/references/stage-exit-protocol.md +64 -20
  144. package/adapters/copilot/skills/forge-0-epic/references/edit-mode.md +14 -10
  145. package/adapters/copilot/skills/forge-0-epic/references/epic-manifest-subcommands.md +8 -3
  146. package/adapters/copilot/skills/forge-0-epic/references/pipeline-state-schema.json +34 -2
  147. package/adapters/copilot/skills/forge-0-epic/references/shared-conventions.md +44 -33
  148. package/adapters/copilot/skills/forge-0-epic/references/stage-exit-protocol.md +64 -20
  149. package/adapters/copilot/skills/forge-1-prd/forge-1-prd.md +3 -1
  150. package/adapters/copilot/skills/forge-1-prd/references/shared-conventions.md +44 -33
  151. package/adapters/copilot/skills/forge-1-prd/references/stage-exit-protocol.md +64 -20
  152. package/adapters/copilot/skills/forge-2-tech/forge-2-tech.md +5 -1
  153. package/adapters/copilot/skills/forge-2-tech/references/shared-conventions.md +44 -33
  154. package/adapters/copilot/skills/forge-2-tech/references/stage-exit-protocol.md +64 -20
  155. package/adapters/copilot/skills/forge-3-specs/forge-3-specs.md +5 -1
  156. package/adapters/copilot/skills/forge-3-specs/references/shared-conventions.md +44 -33
  157. package/adapters/copilot/skills/forge-3-specs/references/stage-exit-protocol.md +64 -20
  158. package/adapters/copilot/skills/forge-4-backlog/forge-4-backlog.md +41 -3
  159. package/adapters/copilot/skills/forge-4-backlog/references/shared-conventions.md +44 -33
  160. package/adapters/copilot/skills/forge-4-backlog/references/stage-exit-protocol.md +64 -20
  161. package/adapters/copilot/skills/forge-5-loop/forge-5-loop.md +36 -36
  162. package/adapters/copilot/skills/forge-5-loop/references/agent-selection.md +17 -1
  163. package/adapters/copilot/skills/forge-5-loop/references/ralph-loop-contract.md +6 -3
  164. package/adapters/copilot/skills/forge-5-loop/references/recovery-procedure.md +349 -0
  165. package/adapters/copilot/skills/forge-5-loop/references/result-reporting.md +40 -11
  166. package/adapters/copilot/skills/forge-5-loop/references/runner-contract.md +26 -8
  167. package/adapters/copilot/skills/forge-5-loop/references/shared-conventions.md +44 -33
  168. package/adapters/copilot/skills/forge-5-loop/references/stage-exit-protocol.md +64 -20
  169. package/adapters/copilot/skills/forge-6-docs/forge-6-docs.md +29 -6
  170. package/adapters/copilot/skills/forge-6-docs/references/shared-conventions.md +44 -33
  171. package/adapters/copilot/skills/forge-6-docs/references/stage-exit-protocol.md +64 -20
  172. package/adapters/copilot/skills/forge-fix/forge-fix.md +34 -0
  173. package/adapters/copilot/skills/forge-fix/references/shared-conventions.md +44 -33
  174. package/adapters/copilot/skills/forge-fix/references/stage-exit-protocol.md +64 -20
  175. package/adapters/copilot/skills/forge-guide/forge-guide.md +1 -1
  176. package/adapters/copilot/skills/forge-guide/references/forge-config-schema.json +18 -0
  177. package/adapters/copilot/skills/forge-guide/references/process-overview.md +2 -2
  178. package/adapters/copilot/skills/forge-guide/references/ralph-loop-contract.md +6 -3
  179. package/adapters/copilot/skills/forge-guide/references/shared-conventions.md +44 -33
  180. package/adapters/copilot/skills/forge-init/forge-init.md +1 -1
  181. package/adapters/copilot/skills/forge-verify/forge-verify.md +11 -12
  182. package/adapters/copilot/skills/forge-verify/references/decisions/single-writer-threat-model.md +53 -0
  183. package/adapters/copilot/skills/forge-verify/references/findings-template.md +32 -2
  184. package/adapters/copilot/skills/forge-verify/references/shared-conventions.md +44 -33
  185. package/adapters/copilot/skills/forge-verify/references/stage-exit-protocol.md +64 -20
  186. package/adapters/copilot/skills/forge-verify/references/verification-checklists/backlog.md +73 -0
  187. package/adapters/copilot/skills/forge-verify/references/verification-checklists/epic.md +1 -1
  188. package/adapters/copilot/skills/forge-verify/references/verification-checklists/impl.md +85 -0
  189. package/adapters/copilot/skills/forge-verify/references/verification-checklists/specs.md +43 -1
  190. package/adapters/cursor/.feature-forge-bundle.json +1 -1
  191. package/adapters/cursor/agents/forge-verifier.mdc +3 -1
  192. package/adapters/cursor/references/decisions/single-writer-threat-model.md +53 -0
  193. package/adapters/cursor/references/epic-state-schema.json +50 -0
  194. package/adapters/cursor/references/forge-config-schema.json +18 -0
  195. package/adapters/cursor/references/forge-decisions-schema.json +33 -0
  196. package/adapters/cursor/references/pipeline-state-schema.json +34 -2
  197. package/adapters/cursor/references/process-overview.md +2 -2
  198. package/adapters/cursor/references/ralph-loop-contract.md +6 -3
  199. package/adapters/cursor/references/shared-conventions.md +44 -33
  200. package/adapters/cursor/references/stage-exit-protocol.md +64 -20
  201. package/adapters/cursor/scripts/epic-manifest.py +82 -4
  202. package/adapters/cursor/scripts/fix-sweep.py +1180 -0
  203. package/adapters/cursor/scripts/forge-session.py +1124 -26
  204. package/adapters/cursor/skills/forge/forge.mdc +8 -8
  205. package/adapters/cursor/skills/forge/references/pipeline-state-schema.json +34 -2
  206. package/adapters/cursor/skills/forge/references/process-overview.md +2 -2
  207. package/adapters/cursor/skills/forge/references/shared-conventions.md +44 -33
  208. package/adapters/cursor/skills/forge/references/stage-exit-protocol.md +64 -20
  209. package/adapters/cursor/skills/forge-0-epic/references/edit-mode.md +14 -10
  210. package/adapters/cursor/skills/forge-0-epic/references/epic-manifest-subcommands.md +8 -3
  211. package/adapters/cursor/skills/forge-0-epic/references/pipeline-state-schema.json +34 -2
  212. package/adapters/cursor/skills/forge-0-epic/references/shared-conventions.md +44 -33
  213. package/adapters/cursor/skills/forge-0-epic/references/stage-exit-protocol.md +64 -20
  214. package/adapters/cursor/skills/forge-1-prd/forge-1-prd.mdc +3 -1
  215. package/adapters/cursor/skills/forge-1-prd/references/shared-conventions.md +44 -33
  216. package/adapters/cursor/skills/forge-1-prd/references/stage-exit-protocol.md +64 -20
  217. package/adapters/cursor/skills/forge-2-tech/forge-2-tech.mdc +5 -1
  218. package/adapters/cursor/skills/forge-2-tech/references/shared-conventions.md +44 -33
  219. package/adapters/cursor/skills/forge-2-tech/references/stage-exit-protocol.md +64 -20
  220. package/adapters/cursor/skills/forge-3-specs/forge-3-specs.mdc +5 -1
  221. package/adapters/cursor/skills/forge-3-specs/references/shared-conventions.md +44 -33
  222. package/adapters/cursor/skills/forge-3-specs/references/stage-exit-protocol.md +64 -20
  223. package/adapters/cursor/skills/forge-4-backlog/forge-4-backlog.mdc +41 -3
  224. package/adapters/cursor/skills/forge-4-backlog/references/shared-conventions.md +44 -33
  225. package/adapters/cursor/skills/forge-4-backlog/references/stage-exit-protocol.md +64 -20
  226. package/adapters/cursor/skills/forge-5-loop/forge-5-loop.mdc +36 -36
  227. package/adapters/cursor/skills/forge-5-loop/references/agent-selection.md +17 -1
  228. package/adapters/cursor/skills/forge-5-loop/references/ralph-loop-contract.md +6 -3
  229. package/adapters/cursor/skills/forge-5-loop/references/recovery-procedure.md +349 -0
  230. package/adapters/cursor/skills/forge-5-loop/references/result-reporting.md +40 -11
  231. package/adapters/cursor/skills/forge-5-loop/references/runner-contract.md +26 -8
  232. package/adapters/cursor/skills/forge-5-loop/references/shared-conventions.md +44 -33
  233. package/adapters/cursor/skills/forge-5-loop/references/stage-exit-protocol.md +64 -20
  234. package/adapters/cursor/skills/forge-6-docs/forge-6-docs.mdc +29 -6
  235. package/adapters/cursor/skills/forge-6-docs/references/shared-conventions.md +44 -33
  236. package/adapters/cursor/skills/forge-6-docs/references/stage-exit-protocol.md +64 -20
  237. package/adapters/cursor/skills/forge-fix/forge-fix.mdc +34 -0
  238. package/adapters/cursor/skills/forge-fix/references/shared-conventions.md +44 -33
  239. package/adapters/cursor/skills/forge-fix/references/stage-exit-protocol.md +64 -20
  240. package/adapters/cursor/skills/forge-guide/forge-guide.mdc +1 -1
  241. package/adapters/cursor/skills/forge-guide/references/forge-config-schema.json +18 -0
  242. package/adapters/cursor/skills/forge-guide/references/process-overview.md +2 -2
  243. package/adapters/cursor/skills/forge-guide/references/ralph-loop-contract.md +6 -3
  244. package/adapters/cursor/skills/forge-guide/references/shared-conventions.md +44 -33
  245. package/adapters/cursor/skills/forge-init/forge-init.mdc +1 -1
  246. package/adapters/cursor/skills/forge-verify/forge-verify.mdc +11 -12
  247. package/adapters/cursor/skills/forge-verify/references/decisions/single-writer-threat-model.md +53 -0
  248. package/adapters/cursor/skills/forge-verify/references/findings-template.md +32 -2
  249. package/adapters/cursor/skills/forge-verify/references/shared-conventions.md +44 -33
  250. package/adapters/cursor/skills/forge-verify/references/stage-exit-protocol.md +64 -20
  251. package/adapters/cursor/skills/forge-verify/references/verification-checklists/backlog.md +73 -0
  252. package/adapters/cursor/skills/forge-verify/references/verification-checklists/epic.md +1 -1
  253. package/adapters/cursor/skills/forge-verify/references/verification-checklists/impl.md +85 -0
  254. package/adapters/cursor/skills/forge-verify/references/verification-checklists/specs.md +43 -1
  255. package/adapters/gemini/.feature-forge-bundle.json +1 -1
  256. package/adapters/gemini/agents/forge-verifier.md +3 -1
  257. package/adapters/gemini/gemini-extension.json +1 -1
  258. package/adapters/gemini/references/decisions/single-writer-threat-model.md +53 -0
  259. package/adapters/gemini/references/epic-state-schema.json +50 -0
  260. package/adapters/gemini/references/forge-config-schema.json +18 -0
  261. package/adapters/gemini/references/forge-decisions-schema.json +33 -0
  262. package/adapters/gemini/references/pipeline-state-schema.json +34 -2
  263. package/adapters/gemini/references/process-overview.md +2 -2
  264. package/adapters/gemini/references/ralph-loop-contract.md +6 -3
  265. package/adapters/gemini/references/shared-conventions.md +44 -33
  266. package/adapters/gemini/references/stage-exit-protocol.md +64 -20
  267. package/adapters/gemini/scripts/epic-manifest.py +82 -4
  268. package/adapters/gemini/scripts/fix-sweep.py +1180 -0
  269. package/adapters/gemini/scripts/forge-session.py +1124 -26
  270. package/adapters/gemini/skills/forge/forge.md +8 -8
  271. package/adapters/gemini/skills/forge/references/pipeline-state-schema.json +34 -2
  272. package/adapters/gemini/skills/forge/references/process-overview.md +2 -2
  273. package/adapters/gemini/skills/forge/references/shared-conventions.md +44 -33
  274. package/adapters/gemini/skills/forge/references/stage-exit-protocol.md +64 -20
  275. package/adapters/gemini/skills/forge-0-epic/references/edit-mode.md +14 -10
  276. package/adapters/gemini/skills/forge-0-epic/references/epic-manifest-subcommands.md +8 -3
  277. package/adapters/gemini/skills/forge-0-epic/references/pipeline-state-schema.json +34 -2
  278. package/adapters/gemini/skills/forge-0-epic/references/shared-conventions.md +44 -33
  279. package/adapters/gemini/skills/forge-0-epic/references/stage-exit-protocol.md +64 -20
  280. package/adapters/gemini/skills/forge-1-prd/forge-1-prd.md +3 -1
  281. package/adapters/gemini/skills/forge-1-prd/references/shared-conventions.md +44 -33
  282. package/adapters/gemini/skills/forge-1-prd/references/stage-exit-protocol.md +64 -20
  283. package/adapters/gemini/skills/forge-2-tech/forge-2-tech.md +5 -1
  284. package/adapters/gemini/skills/forge-2-tech/references/shared-conventions.md +44 -33
  285. package/adapters/gemini/skills/forge-2-tech/references/stage-exit-protocol.md +64 -20
  286. package/adapters/gemini/skills/forge-3-specs/forge-3-specs.md +5 -1
  287. package/adapters/gemini/skills/forge-3-specs/references/shared-conventions.md +44 -33
  288. package/adapters/gemini/skills/forge-3-specs/references/stage-exit-protocol.md +64 -20
  289. package/adapters/gemini/skills/forge-4-backlog/forge-4-backlog.md +41 -3
  290. package/adapters/gemini/skills/forge-4-backlog/references/shared-conventions.md +44 -33
  291. package/adapters/gemini/skills/forge-4-backlog/references/stage-exit-protocol.md +64 -20
  292. package/adapters/gemini/skills/forge-5-loop/forge-5-loop.md +36 -36
  293. package/adapters/gemini/skills/forge-5-loop/references/agent-selection.md +17 -1
  294. package/adapters/gemini/skills/forge-5-loop/references/ralph-loop-contract.md +6 -3
  295. package/adapters/gemini/skills/forge-5-loop/references/recovery-procedure.md +349 -0
  296. package/adapters/gemini/skills/forge-5-loop/references/result-reporting.md +40 -11
  297. package/adapters/gemini/skills/forge-5-loop/references/runner-contract.md +26 -8
  298. package/adapters/gemini/skills/forge-5-loop/references/shared-conventions.md +44 -33
  299. package/adapters/gemini/skills/forge-5-loop/references/stage-exit-protocol.md +64 -20
  300. package/adapters/gemini/skills/forge-6-docs/forge-6-docs.md +29 -6
  301. package/adapters/gemini/skills/forge-6-docs/references/shared-conventions.md +44 -33
  302. package/adapters/gemini/skills/forge-6-docs/references/stage-exit-protocol.md +64 -20
  303. package/adapters/gemini/skills/forge-fix/forge-fix.md +34 -0
  304. package/adapters/gemini/skills/forge-fix/references/shared-conventions.md +44 -33
  305. package/adapters/gemini/skills/forge-fix/references/stage-exit-protocol.md +64 -20
  306. package/adapters/gemini/skills/forge-guide/forge-guide.md +1 -1
  307. package/adapters/gemini/skills/forge-guide/references/forge-config-schema.json +18 -0
  308. package/adapters/gemini/skills/forge-guide/references/process-overview.md +2 -2
  309. package/adapters/gemini/skills/forge-guide/references/ralph-loop-contract.md +6 -3
  310. package/adapters/gemini/skills/forge-guide/references/shared-conventions.md +44 -33
  311. package/adapters/gemini/skills/forge-init/forge-init.md +1 -1
  312. package/adapters/gemini/skills/forge-verify/forge-verify.md +11 -12
  313. package/adapters/gemini/skills/forge-verify/references/decisions/single-writer-threat-model.md +53 -0
  314. package/adapters/gemini/skills/forge-verify/references/findings-template.md +32 -2
  315. package/adapters/gemini/skills/forge-verify/references/shared-conventions.md +44 -33
  316. package/adapters/gemini/skills/forge-verify/references/stage-exit-protocol.md +64 -20
  317. package/adapters/gemini/skills/forge-verify/references/verification-checklists/backlog.md +73 -0
  318. package/adapters/gemini/skills/forge-verify/references/verification-checklists/epic.md +1 -1
  319. package/adapters/gemini/skills/forge-verify/references/verification-checklists/impl.md +85 -0
  320. package/adapters/gemini/skills/forge-verify/references/verification-checklists/specs.md +43 -1
  321. package/adapters/pi/.feature-forge-bundle.json +1 -1
  322. package/adapters/pi/agents/forge-verifier.md +3 -1
  323. package/adapters/pi/references/decisions/single-writer-threat-model.md +53 -0
  324. package/adapters/pi/references/epic-state-schema.json +50 -0
  325. package/adapters/pi/references/forge-config-schema.json +18 -0
  326. package/adapters/pi/references/forge-decisions-schema.json +33 -0
  327. package/adapters/pi/references/pipeline-state-schema.json +34 -2
  328. package/adapters/pi/references/process-overview.md +2 -2
  329. package/adapters/pi/references/ralph-loop-contract.md +6 -3
  330. package/adapters/pi/references/shared-conventions.md +33 -22
  331. package/adapters/pi/references/stage-exit-protocol.md +63 -19
  332. package/adapters/pi/scripts/epic-manifest.py +82 -4
  333. package/adapters/pi/scripts/fix-sweep.py +1180 -0
  334. package/adapters/pi/scripts/forge-session.py +1124 -26
  335. package/adapters/pi/skills/forge/SKILL.md +5 -5
  336. package/adapters/pi/skills/forge/references/pipeline-state-schema.json +34 -2
  337. package/adapters/pi/skills/forge/references/process-overview.md +2 -2
  338. package/adapters/pi/skills/forge/references/shared-conventions.md +33 -22
  339. package/adapters/pi/skills/forge/references/stage-exit-protocol.md +63 -19
  340. package/adapters/pi/skills/forge-0-epic/references/edit-mode.md +8 -4
  341. package/adapters/pi/skills/forge-0-epic/references/epic-manifest-subcommands.md +6 -1
  342. package/adapters/pi/skills/forge-0-epic/references/pipeline-state-schema.json +34 -2
  343. package/adapters/pi/skills/forge-0-epic/references/shared-conventions.md +33 -22
  344. package/adapters/pi/skills/forge-0-epic/references/stage-exit-protocol.md +63 -19
  345. package/adapters/pi/skills/forge-1-prd/SKILL.md +3 -1
  346. package/adapters/pi/skills/forge-1-prd/references/shared-conventions.md +33 -22
  347. package/adapters/pi/skills/forge-1-prd/references/stage-exit-protocol.md +63 -19
  348. package/adapters/pi/skills/forge-2-tech/SKILL.md +5 -1
  349. package/adapters/pi/skills/forge-2-tech/references/shared-conventions.md +33 -22
  350. package/adapters/pi/skills/forge-2-tech/references/stage-exit-protocol.md +63 -19
  351. package/adapters/pi/skills/forge-3-specs/SKILL.md +5 -1
  352. package/adapters/pi/skills/forge-3-specs/references/shared-conventions.md +33 -22
  353. package/adapters/pi/skills/forge-3-specs/references/stage-exit-protocol.md +63 -19
  354. package/adapters/pi/skills/forge-4-backlog/SKILL.md +41 -3
  355. package/adapters/pi/skills/forge-4-backlog/references/shared-conventions.md +33 -22
  356. package/adapters/pi/skills/forge-4-backlog/references/stage-exit-protocol.md +63 -19
  357. package/adapters/pi/skills/forge-5-loop/SKILL.md +36 -36
  358. package/adapters/pi/skills/forge-5-loop/references/agent-selection.md +16 -0
  359. package/adapters/pi/skills/forge-5-loop/references/ralph-loop-contract.md +6 -3
  360. package/adapters/pi/skills/forge-5-loop/references/recovery-procedure.md +349 -0
  361. package/adapters/pi/skills/forge-5-loop/references/result-reporting.md +40 -11
  362. package/adapters/pi/skills/forge-5-loop/references/runner-contract.md +25 -7
  363. package/adapters/pi/skills/forge-5-loop/references/shared-conventions.md +33 -22
  364. package/adapters/pi/skills/forge-5-loop/references/stage-exit-protocol.md +63 -19
  365. package/adapters/pi/skills/forge-6-docs/SKILL.md +29 -6
  366. package/adapters/pi/skills/forge-6-docs/references/shared-conventions.md +33 -22
  367. package/adapters/pi/skills/forge-6-docs/references/stage-exit-protocol.md +63 -19
  368. package/adapters/pi/skills/forge-fix/SKILL.md +34 -0
  369. package/adapters/pi/skills/forge-fix/references/shared-conventions.md +33 -22
  370. package/adapters/pi/skills/forge-fix/references/stage-exit-protocol.md +63 -19
  371. package/adapters/pi/skills/forge-guide/references/forge-config-schema.json +18 -0
  372. package/adapters/pi/skills/forge-guide/references/process-overview.md +2 -2
  373. package/adapters/pi/skills/forge-guide/references/ralph-loop-contract.md +6 -3
  374. package/adapters/pi/skills/forge-guide/references/shared-conventions.md +33 -22
  375. package/adapters/pi/skills/forge-verify/SKILL.md +10 -11
  376. package/adapters/pi/skills/forge-verify/references/decisions/single-writer-threat-model.md +53 -0
  377. package/adapters/pi/skills/forge-verify/references/findings-template.md +31 -1
  378. package/adapters/pi/skills/forge-verify/references/shared-conventions.md +33 -22
  379. package/adapters/pi/skills/forge-verify/references/stage-exit-protocol.md +63 -19
  380. package/adapters/pi/skills/forge-verify/references/verification-checklists/backlog.md +73 -0
  381. package/adapters/pi/skills/forge-verify/references/verification-checklists/epic.md +1 -1
  382. package/adapters/pi/skills/forge-verify/references/verification-checklists/impl.md +85 -0
  383. package/adapters/pi/skills/forge-verify/references/verification-checklists/specs.md +43 -1
  384. package/package.json +1 -1
@@ -97,7 +97,7 @@ After rendering a **per-feature** dashboard for an **active** pipeline (skip thi
97
97
  - **Epic member** (this feature's `rank-features` row has a non-null `epic`, i.e. its `.pipeline-state.json` carries an `epic` back-pointer): run `epic-manifest.py render-status "{epic}" --specs-dir "{specsDir}" --json` (standard prelude; you likely already have this from the Tier-1 epic rollup — reuse it rather than re-running). Then:
98
98
  - If `actionable` is non-empty, offer the next member via `AskUserQuestion`: *"Epic '{epic}' has {total−complete} feature(s) left — next up: **{actionable[0].name}** (`{actionable[0].nextCommand}`). Start it now?"* On accept, drive it exactly like a normal next stage (honor `autoInvokeNextStage` + `Skill`-tool availability per step 3's Continue-in-this-session rule; else print `{nextCommand}`). List any remaining `actionable` members as also-available.
99
99
  - If `actionable` is empty but the epic is **not** fully complete (members blocked on unmet `dependsOn`), say so and point at the blockers rather than offering a start.
100
- - If the epic is **fully complete** (`rollup.complete == rollup.total`, `total > 0`), congratulate on the whole epic and offer the epic-level architecture doc (`/feature-forge:forge-6-docs` already surfaces this — mention it) and/or that the epic can be marked complete (`/feature-forge:forge {epic}` renders the finished dashboard).
100
+ - If the epic is **fully complete** (`rollup.complete == rollup.total`, `total > 0`), congratulate on the whole epic. Offer the epic-level architecture doc **only when every member row's `docsStatus` is `complete` or `skipped`** (#173 — the orchestration rollup counts loop-completeness, so it reads full before any docs exist; a `skipped` docs stage satisfies by decision, #197). When some members' docs are still unwritten, point at the next docs run (`/feature-forge:forge-6-docs {member}`) instead of the epic doc. Either way, mention the epic can be marked complete (`/feature-forge:forge {epic}` renders the finished dashboard).
101
101
  - **Standalone** (row's `epic` is null): offer to start a fresh feature — *"Start a new feature: `/feature-forge:forge-1-prd <feature-name>` (or group several with `/feature-forge:forge-0-epic <epic-name>`)."* Then, from the `rank-features` `active` list, surface any **other** active pipelines (exclude this just-completed one) as a one-line list with their `nextCommand`s so the user can jump straight back into in-flight work. If the **detached-epic hint above fired** for this feature, lead with that recovery path (`docs/recovery-detached-epic-member.md`) — the split-brain reconcile is the more likely next action than starting something new.
102
102
 
103
103
  **2. Check the context window.** Run the context-usage helper so you can advise whether to continue here or start the next stage in a fresh session:
@@ -111,7 +111,7 @@ python3 "$R/scripts/forge-session.py" context-usage --json
111
111
 
112
112
  **2b. Auto-verify catch-up (when `verifyPending` is true).** Under this behavior the just-completed authoring stage runs auto-verify **in-stage** (`references/stage-exit-protocol.md`, in-stage verify block), which clears `verifyPending` — so on the normal path this branch does **nothing**. It fires only as a **catch-up**, for any of three reasons: the producing stage could not dispatch a clean-room subagent (non-Claude host); it ran before this behavior landed; or the stage exit **recorded durable `auto-verify-pending` debt** that was never discharged — the row's `verifyState` is `auto-pending`, meaning verification was scheduled on disk and never ran (a dropped or declined in-stage dispatch, a crash, or a cleared session). **This branch fires on an `auto-pending` row**: the debt is owed and recorded, so treat it exactly like any other outstanding verification and never as "never verified" or as already discharged. Lead with the obligation sentence from the legend before acting. When it does fire, decide whether verify runs automatically (identical logic to the in-stage run, so a stage that already verified is never double-verified):
113
113
 
114
- - **`autoVerify` is true for the just-completed `verifyStage`** → **skip the verify question entirely** and run verify now, *provided it can run clean-room*. Auto-verify is safe to run unattended only because verify executes in a fresh `forge-verifier` subagent that inherits none of this session's context (so no `/clear` is needed and only a compact digest returns). Guard the clean-room assumption: proceed unattended **only when the `Agent` tool + `forge-verifier` subagent are available**. Invoke `feature-forge:forge-verify` via the `Skill` tool in **require-clean (`auto`) mode**, passing the literal `owner: nested` token in the invocation prompt — you are the dispatcher here, so **you** are the sole terminal owner and the branch skill prints no terminal block of its own (see "Branch ownership: the `owner:` token" in `references/stage-exit-protocol.md`). In require-clean mode forge-verify refuses to run inline and returns a sentinel if the subagent is not dispatchable (see `skills/forge-verify/SKILL.md`). Then:
114
+ - **`autoVerify` is true for the just-completed `verifyStage`** → **skip the verify question entirely** and run verify now, *provided it can run clean-room*. Auto-verify is safe to run unattended only because verify executes in a fresh `forge-verifier` subagent that inherits none of this session's context (so no `/clear` is needed and only a compact digest returns). Guard the clean-room assumption: proceed unattended **only when the `Agent` tool + `forge-verifier` subagent are available**. Invoke `feature-forge:forge-verify` via the `Skill` tool in **require-clean (`auto`) mode**, passing the literal `owner: nested` token in the invocation prompt — you are the dispatcher here, so **you** are the sole terminal owner and the branch skill prints no terminal block of its own (see "Branch ownership: the `owner:` token" in `references/stage-exit-protocol.md`). This is a **delegate-and-resume** site (see "Caller-side resumption" in the same reference): on the sub-skill's return, control returns here — continue at the matching outcome branch below. In require-clean mode forge-verify refuses to run inline and returns a sentinel if the subagent is not dispatchable (see `skills/forge-verify/SKILL.md`). Then:
115
115
  - **Sentinel returned (clean-room unavailable)** → do **not** run verify inline. Degrade to the manual gate: fall through to step 3 with the **"Verify `{stage}` first (manual)"** option included, and if `overThreshold`, recommend "/clear, then verify in a clean session." Verify state stays outstanding; the stage is never advanced on false assurance.
116
116
  - **Verify passed / no findings** → proceed to the normal advance gate (step 3), no verify option.
117
117
  - **Verify found findings** →
@@ -129,8 +129,8 @@ python3 "$R/scripts/forge-session.py" context-usage --json
129
129
 
130
130
  **4. Act on the choice.**
131
131
  - **Clean session** (the default) → give the exact next command and the `/clear`-then-re-run instruction; do not invoke anything (you cannot `/clear` for the user).
132
- - **Continue in this session** → if `autoInvokeNextStage` is true (default) **and** the `Skill` tool is available, invoke the chosen stage **via the `Skill` tool** in this same session (e.g. `skill: "feature-forge:forge-3-specs"`, `args: "{feature}"`) — no retyping, no paste. If `autoInvokeNextStage` is false, or the `Skill` tool is unavailable (a non-Claude host), fall back to printing `{nextCommand}` prominently for the user to run.
133
- - **Verify now / Verify now + enable auto-verify** → invoke `feature-forge:forge-verify` via the `Skill` tool (require-clean mode) with the literal `owner: nested` token. **Every navigator dispatch of `forge-verify`/`forge-fix` — the step 2b catch-up chain, this gate, and the "Apply fixes now" choice of the findings digest — carries `owner: nested`**, so the branch skill returns its structured result and prints no terminal block, and the navigator stays the sole terminal owner. For the **enable-auto-verify** variant, additionally patch `autoVerify: true` into `forge.config.json` in place (preserve formatting and other keys) — never a silent write. On a non-Claude host or when degrading to the manual/inline gate, print `{verifyCommand}` instead.
132
+ - **Continue in this session** → if `autoInvokeNextStage` is true (default) **and** the `Skill` tool is available, invoke the chosen stage **via the `Skill` tool** in this same session (e.g. `skill: "feature-forge:forge-3-specs"`, `args: "{feature}"`) — no retyping, no paste. This advance is a **terminal handoff** (see "Caller-side resumption" in `references/stage-exit-protocol.md`): the invoked stage owns the terminal from here — the navigator's job ends at the invocation, deliberately, not by omission. If `autoInvokeNextStage` is false, or the `Skill` tool is unavailable (a non-Claude host), fall back to printing `{nextCommand}` prominently for the user to run.
133
+ - **Verify now / Verify now + enable auto-verify** → invoke `feature-forge:forge-verify` via the `Skill` tool (require-clean mode) with the literal `owner: nested` token. **Every navigator dispatch of `forge-verify`/`forge-fix` — the step 2b catch-up chain, this gate, and the "Apply fixes now" choice of the findings digest — carries `owner: nested`**, so the branch skill returns its structured result and prints no terminal block, and the navigator stays the sole terminal owner. Each is a **delegate-and-resume** site: on return, control returns to this gate's flow — act on the result (digest, gate, or advance) yourself; the branch skill's own close never ends the dashboard turn. For the **enable-auto-verify** variant, additionally patch `autoVerify: true` into `forge.config.json` in place (preserve formatting and other keys) — never a silent write. On a non-Claude host or when degrading to the manual/inline gate, print `{verifyCommand}` instead.
134
134
  - **Different stage** → honor the free-form request.
135
135
 
136
136
  **Host fallback.** On a non-Claude host or when the `Skill`/`Agent` tools are unavailable, auto-verify never runs unattended — fall back to printing `{verifyCommand}` exactly as today, mirroring `autoInvokeNextStage`.
@@ -215,7 +215,7 @@ Support these sub-commands for pipeline lifecycle management:
215
215
  - `/feature-forge:forge run [{feature}]` — **Opt-in auto-advance.** Drive the feature through consecutive stages in one session instead of confirming each boundary. This is a convenience wrapper over **3b. Drive to the Next Stage** — same stage order, same context gate — just looped:
216
216
  1. Resolve the feature (if omitted, use the recency default from `rank-features`; if multiple are equally plausible, ask once via `AskUserQuestion`).
217
217
  2. **Before each stage,** run `forge-session.py context-usage`. If `overThreshold` is true, **stop** and recommend a clean session (give the exact `{nextCommand}` and the `/clear`-then-re-run instruction) — never auto-`/clear`.
218
- 3. Otherwise invoke the next stage's skill via the `Skill` tool, let it run to its natural stopping point, then re-read state and continue from step 2.
218
+ 3. Otherwise invoke the next stage's skill via the `Skill` tool as a **delegate-and-resume** invocation, declaring the resume point at the invocation (see "Caller-side resumption: the declared resume point" in `references/stage-exit-protocol.md`): when the stage skill returns, control returns to **this loop, at step 2**, in the same turn — re-read state and continue. The invoked stage's own closing posture never ends the `run` loop.
219
219
  4. **Stop conditions:** the next stage is an interview/decision point that calls `AskUserQuestion` (PRD and tech inherently pause for input — let them); `nextStage` is `null` (pipeline complete); context over threshold; or a stage signals it needs human input / is blocked. Always report where the loop stopped and why.
220
220
  Per-stage confirmation (3b) remains the default — `run` is only used when the user explicitly asks to "run" / "drive" / "auto-advance" the pipeline. On a non-Claude host where the `Skill` tool is unavailable, fall back to printing the ordered list of commands to run.
221
221
 
@@ -37,7 +37,7 @@
37
37
  },
38
38
  "notes": {
39
39
  "type": "string",
40
- "description": "Free-form notes persisted between sessions (user can add context before stepping away)"
40
+ "description": "Free-form notes persisted between sessions (user can add context before stepping away). A single string with latest-note-wins semantics: `state-note` (its only sanctioned writer) OVERWRITES the previous value — an author folds any still-relevant earlier note into the one combined string. Read by the navigator dashboard AND by each downstream stage's Step 1 carried-over note check (forge-2-tech through forge-5-loop), which surfaces it as stage input; it never overrides artifacts or config."
41
41
  },
42
42
  "epicChangeRequests": {
43
43
  "type": "array",
@@ -127,7 +127,7 @@
127
127
  "forge-4-backlog": { "$ref": "#/definitions/stageEntry" },
128
128
  "forge-verify-backlog": { "$ref": "#/definitions/verifyEntry" },
129
129
  "forge-5-loop": { "$ref": "#/definitions/stageEntry" },
130
- "forge-6-docs": { "$ref": "#/definitions/stageEntry" },
130
+ "forge-6-docs": { "$ref": "#/definitions/docsStageEntry" },
131
131
  "forge-verify-impl": { "$ref": "#/definitions/verifyEntry" },
132
132
  "forge-verify-prd": { "$ref": "#/definitions/verifyEntry" },
133
133
  "forge-verify-tech": { "$ref": "#/definitions/verifyEntry" }
@@ -165,6 +165,38 @@
165
165
  }
166
166
  }
167
167
  },
168
+ "docsStageEntry": {
169
+ "type": "object",
170
+ "required": ["status"],
171
+ "description": "The forge-6-docs stage entry: identical to stageEntry except that `skipped` is a legal status and `skippedAt` records when the deliberate skip was written (by the `state-skip` verb, never by hand). `skipped` is a terminal, done-for-selection status — the pipeline ends without the stage claiming artifacts it never produced (#197). Deliberately scoped to the docs stage: a skipped PRD or specs stage is not a representable state, so the shared stageEntry enum does NOT carry `skipped`.",
172
+ "properties": {
173
+ "status": {
174
+ "type": "string",
175
+ "enum": ["pending", "in-progress", "complete", "stale", "skipped"]
176
+ },
177
+ "version": {
178
+ "type": "integer",
179
+ "description": "Incremented each time this stage's artifacts are revised"
180
+ },
181
+ "artifacts": {
182
+ "type": "array",
183
+ "items": { "type": "string" },
184
+ "description": "Relative paths to artifacts produced by this stage"
185
+ },
186
+ "startedAt": { "type": ["string", "null"], "format": "date-time" },
187
+ "completedAt": { "type": ["string", "null"], "format": "date-time" },
188
+ "skippedAt": { "type": ["string", "null"], "format": "date-time", "description": "UTC ISO-8601 timestamp of the deliberate skip (status: skipped). Written by `state-skip`; absent on every other status." },
189
+ "commitHash": {
190
+ "type": ["string", "null"],
191
+ "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)."
192
+ },
193
+ "basedOnVersions": {
194
+ "type": "object",
195
+ "description": "Upstream stage versions this artifact was built against",
196
+ "additionalProperties": { "type": "integer" }
197
+ }
198
+ }
199
+ },
168
200
  "verifyEntry": {
169
201
  "type": "object",
170
202
  "required": ["status"],
@@ -36,7 +36,7 @@ I found that the codebase uses React and TanStack Router.
36
36
 
37
37
  ### Decision Support: Help the User Choose
38
38
 
39
- When an `AskUserQuestion` carries substantive options (a real choice — not a trivial yes/no confirmation), do not just list them. The interview stages have already done codebase research and integration analysis; surfacing that synthesis at the decision moment is the whole point. For every such question:
39
+ When a question posed through `AskUserQuestion` carries substantive options (a real choice — not a trivial yes/no confirmation), do not just list them. The interview stages have already done codebase research and integration analysis; surfacing that synthesis at the decision moment is the whole point. For every such question:
40
40
 
41
41
  - **Lead with a recommended option.** Place it first and label it `(recommended)` (matching the `AskUserQuestion` "(Recommended)" convention).
42
42
  - **Put the trade-off in each option's `description`.** Say why you'd pick it and what you give up versus the alternatives — the cost, not just the benefit.
@@ -53,6 +53,17 @@ For genuinely comparable artifacts (competing module structures, two code snippe
53
53
 
54
54
  The **Branch Setup** block below is the reference pattern: a strong recommendation as the first option, rationale inline, the alternative still available, never a hard-stop.
55
55
 
56
+ ## Stage Review Gate
57
+
58
+ Every authoring stage ends its "Review with User" step in exactly one of two shapes. Which shape a stage uses is declared **here, once** — each stage's review step points at this block by title, and the shape is never re-derived from the surrounding prose or inferred from how sibling stages behave (three stages block and one does not; majority-shape inference is precisely the failure this block exists to prevent):
59
+
60
+ - **Blocking review (gate).** The stage presents the artifact and collects feedback through `AskUserQuestion`; it does **not** proceed until the user answers, iterating until they confirm. Stages: **forge-1-prd** (Step 5), **forge-2-tech** (Step 6), **forge-3-specs** (Step 6).
61
+ - **Non-blocking review (invitation).** The stage states the artifact is ready and invites adjustments **as a statement, not a question** — and then **proceeds to the next step in the same turn unless the user asks for changes**. The invitation obliges the agent to *continue*: emitting the invitation sentence and stopping treats the non-gate as a gate and strands the stage `in-progress` with its completion step unrun — a defect, not caution. Stage: **forge-4-backlog** (Step 6).
62
+
63
+ **Why the shapes differ.** A blocking review guards an artifact whose content was just authored from open-ended interview or synthesis — the user is the only authority on "complete", so the stage must wait. forge-4's backlog is *derived* from specs the user already approved, was planned interactively in its Step 3, and is machine-validated in its Step 5; a second hard gate would re-ask a settled question, and the loop never launches without forge-5-loop's own Step 2d confirmation anyway. The invitation is a courtesy checkpoint, not an approval gate (removed deliberately in #78's consistency sweep).
64
+
65
+ A stage that changes shape changes it **in this block first**; the per-stage pointer stays a pointer.
66
+
56
67
  ## Configuration Reading
57
68
 
58
69
  Read `forge.config.json` from the project root. If it doesn't exist, use defaults.
@@ -130,7 +141,7 @@ mkdir -p "<specsDir>"
130
141
  [ -f "<specsDir>/AGENTS.md" ] || cp "$R/references/templates/specs-hygiene/AGENTS.md" "<specsDir>/AGENTS.md"
131
142
  ```
132
143
 
133
- If the host is Claude (the `AskUserQuestion` tool is available), also ensure the Claude-framed variant:
144
+ If the host is Claude (the Claude-native question tool is available), also ensure the Claude-framed variant:
134
145
 
135
146
  ```bash
136
147
  R="$(bash -c 'for d in "${CLAUDE_PLUGIN_ROOT:-}" "$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')"
@@ -191,7 +202,7 @@ Pipeline state is written by the `state-*` verbs of `scripts/forge-session.py`
191
202
 
192
203
  If a `state-*` verb exits 2, surface the plain `Error:` line from stderr verbatim, do **not** proceed to the next step of the surrounding protocol, and do **not** hand-author the JSON as a workaround. The stage remains resumable because the entry stamp is already on disk — re-run the verb once the cause is fixed.
193
204
 
194
- **The eight `state-*` verbs.** `state-enter` (Stage-Entry Guard), `state-artifact` (incremental artifact tracking), `state-complete` (Git Commit Protocol), `state-branch` (Branch Setup and Branch Reconciliation), `state-note` (the Immediate Downstream Note below, and the optional completion note at stage closure), `state-decision` (deferred decisions), `state-ecr` (epic change requests), and `state-verify` (one `forge-verify-*` verification transition — below). The `--epic` member requirement and the exit-2 failure protocol above apply to **every** one of them, `state-verify` included; no verify entry is ever hand-authored.
205
+ **The nine `state-*` verbs.** `state-enter` (Stage-Entry Guard), `state-artifact` (incremental artifact tracking), `state-complete` (Git Commit Protocol), `state-skip` (the deliberate forge-6-docs documentation skip — scoped to that one stage; writes `status: "skipped"` + `skippedAt`, refuses to erase a record of docs that exist, and is the only sanctioned writer of a skipped docs stage), `state-branch` (Branch Setup and Branch Reconciliation), `state-note` (the Immediate Downstream Note below, and the optional completion note at stage closure), `state-decision` (deferred decisions), `state-ecr` (epic change requests), and `state-verify` (one `forge-verify-*` verification transition — below). The `--epic` member requirement and the exit-2 failure protocol above apply to **every** one of them, `state-verify` included; no verify entry is ever hand-authored.
195
206
 
196
207
  ### `state-verify` — verification results and provenance
197
208
 
@@ -395,7 +406,7 @@ Invoke this block **at the head of any post-entry step that writes a stage artif
395
406
 
396
407
  1. **Proceed** when `stages.{stage}.status` is `"in-progress"` (this session's Entry Stamp — you are finishing the run you started) or absent/`pending`. Run the write / exit normally.
397
408
 
398
- 2. **Detect-and-refuse** when ALL of these hold: `stages.{stage}.status ∈ {"complete", "stale"}` **AND** the stage's artifacts (incl. `TRACEABILITY.md` for forge-3-specs) exist on disk **AND** a `commitHash` is recorded for the stage **AND** you did **not** author this stage earlier in the current session. This is a stale/replayed continuation of an already-finished, committed stage. Do **not** overwrite the artifact or re-run the exit. Route instead to the **Stage-Entry Guard**'s *Re-authoring* path: surface the same `AskUserQuestion` warning ("A completed {stage} artifact already exists for '{feature}' (v{n}{, marked stale}). Continuing will create a new version. Proceed?"). Only on explicit confirmation re-enter from the Entry Stamp (the version bumps at exit); otherwise **stop** and report that the stage is already complete — cite the recorded `commitHash` and offer `/feature-forge:forge {feature}` to see true state.
409
+ 2. **Detect-and-refuse** when ALL of these hold: `stages.{stage}.status ∈ {"complete", "stale"}` **AND** the stage's artifacts (incl. `TRACEABILITY.md` for forge-3-specs) exist on disk **AND** a `commitHash` is recorded for the stage **AND** you did **not** author this stage earlier in the current session. This is a stale/replayed continuation of an already-finished, committed stage. Do **not** overwrite the artifact or re-run the exit. Route instead to the **Stage-Entry Guard**'s *Re-authoring* path: surface the same warning via `AskUserQuestion` ("A completed {stage} artifact already exists for '{feature}' (v{n}{, marked stale}). Continuing will create a new version. Proceed?"). Only on explicit confirmation re-enter from the Entry Stamp (the version bumps at exit); otherwise **stop** and report that the stage is already complete — cite the recorded `commitHash` and offer `/feature-forge:forge {feature}` to see true state.
399
410
 
400
411
  When you cannot confirm you authored the current run, treat it as a replay and refuse: a false refuse costs one confirmation click; a false proceed overwrites a committed artifact and re-churns a stage version. `--force` follows Force Mode (skip the gate, treat as a deliberate re-author).
401
412
 
@@ -47,8 +47,8 @@ an epic member. Only the flags below are stage-specific; pass no others.
47
47
  |---|---|---|
48
48
  | `forge-0-epic` | `forge-0-epic` | `--next-feature "{member}"` when a concrete member exists |
49
49
  | `forge-1-prd` … `forge-4-backlog` | that stage's own id | none beyond identity/capability |
50
- | `forge-5-loop` | `forge-5-loop` | `--outcome` — one of `complete`, `partial`, `blocked`, `needs-human`, `deferred` |
51
- | `forge-6-docs` | `forge-6-docs` | `--outcome` — `complete` or `blocked` |
50
+ | `forge-5-loop` | `forge-5-loop` | `--outcome` — one of `complete`, `partial`, `blocked`, `needs-human`, `deferred`, `resolved`; optional `--cause dependency-starvation` with `--outcome partial` |
51
+ | `forge-6-docs` | `forge-6-docs` | `--outcome` — `complete`, `blocked`, or `skipped` (deliberate docs skip, persisted via `state-skip` before the exit; routes like `complete` with honest wording) |
52
52
  | direct `forge-verify` | `forge-verify` | `--owner direct`, `--outcome` (`passed`, `findings`, `skipped`, `failed`), and served-stage metadata |
53
53
  | nested `forge-verify` | `forge-verify` | `--owner nested`, plus the same outcome and served-stage metadata |
54
54
  | direct/nested `forge-fix` | `forge-fix` | the matching `--owner`, a `FixOutcome` (`no-findings`, `decisions`, `failed`, `applied`, `reverified`, `reverify-findings`, `deferred`), and served-stage metadata |
@@ -100,9 +100,9 @@ Obey the DIRECTIVES it prints, in the consumption order this protocol fixes: sur
100
100
 
101
101
  The stamp is shown with `--host claude`; the adapter build substitutes `pi`/`generic` per
102
102
  target, and §"Host and capability determination" below governs the value. The literal is
103
- deliberate — `scripts/build-adapters.py` keys its host translation on the exact string
104
- `--host claude`, and the stamp sites are compared byte-for-byte, so it is the one token in
105
- that line that is not a placeholder.
103
+ deliberate — `scripts/build-adapters.py` keys its host translation on the exact canon
104
+ value of that flag, and the stamp sites are compared byte-for-byte, so it is the one token
105
+ in that line that is not a placeholder.
106
106
 
107
107
  ## Host and capability determination
108
108
 
@@ -110,8 +110,9 @@ Before the call, compute the two inputs independently. They are unrelated: **a h
110
110
  implies a capability**, and the script takes `--verify-capability` at face value.
111
111
 
112
112
  **`--host`** describes only the active adapter command surface — `claude`, `pi`, or
113
- `generic`. It selects command syntax (`/feature-forge:` vs `/skill:` vs host-neutral) and
114
- fresh-session wording (`/clear` vs `/new` vs neutral prose). Nothing else.
113
+ `generic`. It selects command syntax (Claude's stage-command prefix vs Pi's `/skill:` vs
114
+ host-neutral) and fresh-session wording (Claude's clear command vs Pi's `/new` vs neutral
115
+ prose). Nothing else.
115
116
 
116
117
  **`--verify-capability interactive`** is passed only when **both** of these hold:
117
118
 
@@ -151,7 +152,8 @@ production successor** while verification is unresolved.
151
152
  - a capable Pi session is `--host pi --verify-capability interactive`, and receives the
152
153
  same logical gate a capable Claude session does;
153
154
  - Pi without a dispatchable verifier is `--host pi --verify-capability manual`;
154
- - a Claude session that cannot dispatch is `--host claude --verify-capability manual`.
155
+ - a Claude session that cannot dispatch keeps the Claude host value with
156
+ `--verify-capability manual`.
155
157
 
156
158
  Interactive gate options keep their explicit labels, their recommended default, and their
157
159
  one-line trade-off descriptions (below). The manual path prints the verify command as the
@@ -199,6 +201,44 @@ second sentinel-terminated block **inside** an outer stage's exit, breaking the
199
201
  exactly-one-terminal-block rule — and the canon guard cannot catch it, because both
200
202
  wordings legitimately appear in the same file. Judge the token, not the phrasing.
201
203
 
204
+ ## Caller-side resumption: the declared resume point
205
+
206
+ The `owner:` token and `terminalOwnedBy` arbitrate who prints — but they specify only
207
+ the **callee** side: a nested skill stays quiet and returns its structured result. This
208
+ section is the reciprocal, caller-side half of that contract.
209
+
210
+ **On a sub-skill's return, the caller re-owns the terminal.** Every closing instruction
211
+ in the callee's own body — its report-and-stop posture, its "confirm the result" close,
212
+ its own next-steps habits — is void for this turn. The caller resumes at its **declared
213
+ resume point**, in the same turn, and its remaining steps run to its own terminal.
214
+
215
+ **Every Skill-tool delegation site declares, at the invocation, what happens on
216
+ return.** Suppression without resumption is the failure mode this section closes: the
217
+ callee's closing posture is the freshest instruction in context while the caller's next
218
+ step is the oldest, so an undeclared return silently ends the run one layer too early —
219
+ the caller's remaining steps (validation, state writes, commit, stage exit) dropped,
220
+ with no error surfaced. An implicit "let it run to its natural stopping point" is that
221
+ bug spelled politely, and it is banned on delegation sites. A site takes one of two
222
+ declared postures:
223
+
224
+ - **Delegate-and-resume** — the callee is a sub-step of the caller: the site names the
225
+ caller's own step that control returns to, and the caller continues there in the same
226
+ turn. The callee never owns the caller's terminal. The worked instance is
227
+ `forge-4-backlog` Step 4's **Return contract** for the `author-backlog` delegation
228
+ (control returns at Step 5; the sub-skill's direct-invocation posture — its approval
229
+ gate and its validate-and-confirm close — is explicitly disapplied on the delegated
230
+ path). New delegation sites follow that pattern rather than re-deriving it.
231
+ - **Terminal handoff** — the caller's job ends at the invocation and the invoked skill
232
+ owns the terminal from there on (e.g. the navigator's `autoInvokeNextStage`
233
+ "continue in this session" advance into the next production stage). Declaring the
234
+ handoff is what keeps it distinct from an accidental drop.
235
+
236
+ Scope: this contract governs **Skill-tool delegation within one session**. The
237
+ truncated-verifier-return guard (forge-verify's `findings-template.md`, "Truncated
238
+ Verifier Returns") is a different mechanism — it polices what an **Agent-dispatched
239
+ subagent's** return payload must contain, not where a caller resumes. A dispatch site
240
+ can be subject to both; satisfy each on its own terms.
241
+
202
242
  ## Directive consumption order
203
243
 
204
244
  `stage-exit` emits a DIRECTIVES object and (for a direct owner) a NEXT-STEPS block. The
@@ -299,7 +339,11 @@ first:
299
339
  a stage's artifact commit.
300
340
  - **Skip for now** — go straight to the NEXT-STEPS block without verifying. Record this
301
341
  stage's verify status as `skipped` in pipeline state (via `state-verify`, never by hand)
302
- **only** on an explicit skip — a skip does not go stale.
342
+ **only** on an explicit skip — a skip does not go stale. Exception: if the existing
343
+ entry records `passed` or `findings-applied` (a resolved result whose freshness has
344
+ merely lapsed), write **nothing** — `state-verify` refuses to demote a resolved status
345
+ to `skipped` (#203), and the recorded result stands on its own; the user's decline is
346
+ honored by simply not re-verifying.
303
347
 
304
348
  **Advancement is allowed only after a pass, or after an explicit skip has been
305
349
  persisted.** Choosing to stop, or losing the interaction, produces no advancing terminal
@@ -358,8 +402,8 @@ directive is informational — you do **not** re-derive the wording:
358
402
  unchanged; the block appends a non-blocking reminder line ("You also flagged N epic
359
403
  change(s) to reconcile when convenient …"). This is *finish-then-edit*.
360
404
 
361
- Either way the added lines are host-neutral (no literal `/clear`) and sit **above** the
362
- sentinel; just print the NEXT-STEPS block verbatim as always.
405
+ Either way the added lines are host-neutral (they name no fresh-session command) and sit
406
+ **above** the sentinel; just print the NEXT-STEPS block verbatim as always.
363
407
 
364
408
  ### Deferred decisions — do not solicit next-stage decisions at this exit
365
409
 
@@ -80,6 +80,7 @@ Use `AskUserQuestion` to offer the edit operations, each mapping to one helper m
80
80
  | Remove a feature | `remove-feature` |
81
81
  | Reorder features | `reorder` |
82
82
  | Change a dependency edge | `set-dep` |
83
+ | Rewrite a feature's charter | `set-charter` |
83
84
  | Change epic lifecycle status | `set-status` |
84
85
 
85
86
  For **add-feature**, first run `check-name "{feature}"` (exactly as C2) so no new duplicate is
@@ -97,7 +98,10 @@ exact `epic-manifest.py` mutator flag surface and per-subcommand exit-code handl
97
98
  **Contracts have no mutator.** `add-feature` seeds empty `exposes`/`consumes`. To populate the
98
99
  new feature's contracts, edit its `exposes`/`consumes` arrays **directly in the composed manifest
99
100
  entry** (exactly as creation C5 does), then re-run `validate "{epic}" --json` to confirm — there
100
- is intentionally no `--exposes-json`/`--consumes-json` flag.
101
+ is intentionally no `--exposes-json`/`--consumes-json` flag. This carve-out is contracts-only:
102
+ a **charter** rewrite goes through `set-charter` (#166), never a direct edit — the mutator gives
103
+ it the same atomic write, re-validation, and revision bump as every other manifest mutation.
104
+ After a charter change, patch the feature's EPIC.md section in E5 like any other mutation.
101
105
 
102
106
  **remove-feature leaves the member directory in place (§7.5).** The mutator drops only the
103
107
  manifest entry. The skill does **not** delete or relocate `{specsDir}/{epic}/{feature}/`. WARN the
@@ -30,6 +30,11 @@ python3 "$R/scripts/epic-manifest.py" reorder "{epic}" \
30
30
  python3 "$R/scripts/epic-manifest.py" set-dep "{epic}" "{feature}" \
31
31
  --depends-on "config-store,token-service" --specs-dir "{specsDir}"
32
32
 
33
+ # Replace a member feature's charter (the field most likely to need revision after
34
+ # creation — an ADR lands, a boundary moves). Refuses a blank charter (empty-charter).
35
+ python3 "$R/scripts/epic-manifest.py" set-charter "{epic}" "{feature}" \
36
+ --charter "…" --specs-dir "{specsDir}"
37
+
33
38
  # Change epic lifecycle status (active|paused|abandoned|complete).
34
39
  python3 "$R/scripts/epic-manifest.py" set-status "{epic}" \
35
40
  --status paused --specs-dir "{specsDir}"
@@ -37,7 +37,7 @@
37
37
  },
38
38
  "notes": {
39
39
  "type": "string",
40
- "description": "Free-form notes persisted between sessions (user can add context before stepping away)"
40
+ "description": "Free-form notes persisted between sessions (user can add context before stepping away). A single string with latest-note-wins semantics: `state-note` (its only sanctioned writer) OVERWRITES the previous value — an author folds any still-relevant earlier note into the one combined string. Read by the navigator dashboard AND by each downstream stage's Step 1 carried-over note check (forge-2-tech through forge-5-loop), which surfaces it as stage input; it never overrides artifacts or config."
41
41
  },
42
42
  "epicChangeRequests": {
43
43
  "type": "array",
@@ -127,7 +127,7 @@
127
127
  "forge-4-backlog": { "$ref": "#/definitions/stageEntry" },
128
128
  "forge-verify-backlog": { "$ref": "#/definitions/verifyEntry" },
129
129
  "forge-5-loop": { "$ref": "#/definitions/stageEntry" },
130
- "forge-6-docs": { "$ref": "#/definitions/stageEntry" },
130
+ "forge-6-docs": { "$ref": "#/definitions/docsStageEntry" },
131
131
  "forge-verify-impl": { "$ref": "#/definitions/verifyEntry" },
132
132
  "forge-verify-prd": { "$ref": "#/definitions/verifyEntry" },
133
133
  "forge-verify-tech": { "$ref": "#/definitions/verifyEntry" }
@@ -165,6 +165,38 @@
165
165
  }
166
166
  }
167
167
  },
168
+ "docsStageEntry": {
169
+ "type": "object",
170
+ "required": ["status"],
171
+ "description": "The forge-6-docs stage entry: identical to stageEntry except that `skipped` is a legal status and `skippedAt` records when the deliberate skip was written (by the `state-skip` verb, never by hand). `skipped` is a terminal, done-for-selection status — the pipeline ends without the stage claiming artifacts it never produced (#197). Deliberately scoped to the docs stage: a skipped PRD or specs stage is not a representable state, so the shared stageEntry enum does NOT carry `skipped`.",
172
+ "properties": {
173
+ "status": {
174
+ "type": "string",
175
+ "enum": ["pending", "in-progress", "complete", "stale", "skipped"]
176
+ },
177
+ "version": {
178
+ "type": "integer",
179
+ "description": "Incremented each time this stage's artifacts are revised"
180
+ },
181
+ "artifacts": {
182
+ "type": "array",
183
+ "items": { "type": "string" },
184
+ "description": "Relative paths to artifacts produced by this stage"
185
+ },
186
+ "startedAt": { "type": ["string", "null"], "format": "date-time" },
187
+ "completedAt": { "type": ["string", "null"], "format": "date-time" },
188
+ "skippedAt": { "type": ["string", "null"], "format": "date-time", "description": "UTC ISO-8601 timestamp of the deliberate skip (status: skipped). Written by `state-skip`; absent on every other status." },
189
+ "commitHash": {
190
+ "type": ["string", "null"],
191
+ "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)."
192
+ },
193
+ "basedOnVersions": {
194
+ "type": "object",
195
+ "description": "Upstream stage versions this artifact was built against",
196
+ "additionalProperties": { "type": "integer" }
197
+ }
198
+ }
199
+ },
168
200
  "verifyEntry": {
169
201
  "type": "object",
170
202
  "required": ["status"],
@@ -36,7 +36,7 @@ I found that the codebase uses React and TanStack Router.
36
36
 
37
37
  ### Decision Support: Help the User Choose
38
38
 
39
- When an `AskUserQuestion` carries substantive options (a real choice — not a trivial yes/no confirmation), do not just list them. The interview stages have already done codebase research and integration analysis; surfacing that synthesis at the decision moment is the whole point. For every such question:
39
+ When a question posed through `AskUserQuestion` carries substantive options (a real choice — not a trivial yes/no confirmation), do not just list them. The interview stages have already done codebase research and integration analysis; surfacing that synthesis at the decision moment is the whole point. For every such question:
40
40
 
41
41
  - **Lead with a recommended option.** Place it first and label it `(recommended)` (matching the `AskUserQuestion` "(Recommended)" convention).
42
42
  - **Put the trade-off in each option's `description`.** Say why you'd pick it and what you give up versus the alternatives — the cost, not just the benefit.
@@ -53,6 +53,17 @@ For genuinely comparable artifacts (competing module structures, two code snippe
53
53
 
54
54
  The **Branch Setup** block below is the reference pattern: a strong recommendation as the first option, rationale inline, the alternative still available, never a hard-stop.
55
55
 
56
+ ## Stage Review Gate
57
+
58
+ Every authoring stage ends its "Review with User" step in exactly one of two shapes. Which shape a stage uses is declared **here, once** — each stage's review step points at this block by title, and the shape is never re-derived from the surrounding prose or inferred from how sibling stages behave (three stages block and one does not; majority-shape inference is precisely the failure this block exists to prevent):
59
+
60
+ - **Blocking review (gate).** The stage presents the artifact and collects feedback through `AskUserQuestion`; it does **not** proceed until the user answers, iterating until they confirm. Stages: **forge-1-prd** (Step 5), **forge-2-tech** (Step 6), **forge-3-specs** (Step 6).
61
+ - **Non-blocking review (invitation).** The stage states the artifact is ready and invites adjustments **as a statement, not a question** — and then **proceeds to the next step in the same turn unless the user asks for changes**. The invitation obliges the agent to *continue*: emitting the invitation sentence and stopping treats the non-gate as a gate and strands the stage `in-progress` with its completion step unrun — a defect, not caution. Stage: **forge-4-backlog** (Step 6).
62
+
63
+ **Why the shapes differ.** A blocking review guards an artifact whose content was just authored from open-ended interview or synthesis — the user is the only authority on "complete", so the stage must wait. forge-4's backlog is *derived* from specs the user already approved, was planned interactively in its Step 3, and is machine-validated in its Step 5; a second hard gate would re-ask a settled question, and the loop never launches without forge-5-loop's own Step 2d confirmation anyway. The invitation is a courtesy checkpoint, not an approval gate (removed deliberately in #78's consistency sweep).
64
+
65
+ A stage that changes shape changes it **in this block first**; the per-stage pointer stays a pointer.
66
+
56
67
  ## Configuration Reading
57
68
 
58
69
  Read `forge.config.json` from the project root. If it doesn't exist, use defaults.
@@ -130,7 +141,7 @@ mkdir -p "<specsDir>"
130
141
  [ -f "<specsDir>/AGENTS.md" ] || cp "$R/references/templates/specs-hygiene/AGENTS.md" "<specsDir>/AGENTS.md"
131
142
  ```
132
143
 
133
- If the host is Claude (the `AskUserQuestion` tool is available), also ensure the Claude-framed variant:
144
+ If the host is Claude (the Claude-native question tool is available), also ensure the Claude-framed variant:
134
145
 
135
146
  ```bash
136
147
  R="$(bash -c 'for d in "${CLAUDE_PLUGIN_ROOT:-}" "$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')"
@@ -191,7 +202,7 @@ Pipeline state is written by the `state-*` verbs of `scripts/forge-session.py`
191
202
 
192
203
  If a `state-*` verb exits 2, surface the plain `Error:` line from stderr verbatim, do **not** proceed to the next step of the surrounding protocol, and do **not** hand-author the JSON as a workaround. The stage remains resumable because the entry stamp is already on disk — re-run the verb once the cause is fixed.
193
204
 
194
- **The eight `state-*` verbs.** `state-enter` (Stage-Entry Guard), `state-artifact` (incremental artifact tracking), `state-complete` (Git Commit Protocol), `state-branch` (Branch Setup and Branch Reconciliation), `state-note` (the Immediate Downstream Note below, and the optional completion note at stage closure), `state-decision` (deferred decisions), `state-ecr` (epic change requests), and `state-verify` (one `forge-verify-*` verification transition — below). The `--epic` member requirement and the exit-2 failure protocol above apply to **every** one of them, `state-verify` included; no verify entry is ever hand-authored.
205
+ **The nine `state-*` verbs.** `state-enter` (Stage-Entry Guard), `state-artifact` (incremental artifact tracking), `state-complete` (Git Commit Protocol), `state-skip` (the deliberate forge-6-docs documentation skip — scoped to that one stage; writes `status: "skipped"` + `skippedAt`, refuses to erase a record of docs that exist, and is the only sanctioned writer of a skipped docs stage), `state-branch` (Branch Setup and Branch Reconciliation), `state-note` (the Immediate Downstream Note below, and the optional completion note at stage closure), `state-decision` (deferred decisions), `state-ecr` (epic change requests), and `state-verify` (one `forge-verify-*` verification transition — below). The `--epic` member requirement and the exit-2 failure protocol above apply to **every** one of them, `state-verify` included; no verify entry is ever hand-authored.
195
206
 
196
207
  ### `state-verify` — verification results and provenance
197
208
 
@@ -395,7 +406,7 @@ Invoke this block **at the head of any post-entry step that writes a stage artif
395
406
 
396
407
  1. **Proceed** when `stages.{stage}.status` is `"in-progress"` (this session's Entry Stamp — you are finishing the run you started) or absent/`pending`. Run the write / exit normally.
397
408
 
398
- 2. **Detect-and-refuse** when ALL of these hold: `stages.{stage}.status ∈ {"complete", "stale"}` **AND** the stage's artifacts (incl. `TRACEABILITY.md` for forge-3-specs) exist on disk **AND** a `commitHash` is recorded for the stage **AND** you did **not** author this stage earlier in the current session. This is a stale/replayed continuation of an already-finished, committed stage. Do **not** overwrite the artifact or re-run the exit. Route instead to the **Stage-Entry Guard**'s *Re-authoring* path: surface the same `AskUserQuestion` warning ("A completed {stage} artifact already exists for '{feature}' (v{n}{, marked stale}). Continuing will create a new version. Proceed?"). Only on explicit confirmation re-enter from the Entry Stamp (the version bumps at exit); otherwise **stop** and report that the stage is already complete — cite the recorded `commitHash` and offer `/feature-forge:forge {feature}` to see true state.
409
+ 2. **Detect-and-refuse** when ALL of these hold: `stages.{stage}.status ∈ {"complete", "stale"}` **AND** the stage's artifacts (incl. `TRACEABILITY.md` for forge-3-specs) exist on disk **AND** a `commitHash` is recorded for the stage **AND** you did **not** author this stage earlier in the current session. This is a stale/replayed continuation of an already-finished, committed stage. Do **not** overwrite the artifact or re-run the exit. Route instead to the **Stage-Entry Guard**'s *Re-authoring* path: surface the same warning via `AskUserQuestion` ("A completed {stage} artifact already exists for '{feature}' (v{n}{, marked stale}). Continuing will create a new version. Proceed?"). Only on explicit confirmation re-enter from the Entry Stamp (the version bumps at exit); otherwise **stop** and report that the stage is already complete — cite the recorded `commitHash` and offer `/feature-forge:forge {feature}` to see true state.
399
410
 
400
411
  When you cannot confirm you authored the current run, treat it as a replay and refuse: a false refuse costs one confirmation click; a false proceed overwrites a committed artifact and re-churns a stage version. `--force` follows Force Mode (skip the gate, treat as a deliberate re-author).
401
412
 
@@ -47,8 +47,8 @@ an epic member. Only the flags below are stage-specific; pass no others.
47
47
  |---|---|---|
48
48
  | `forge-0-epic` | `forge-0-epic` | `--next-feature "{member}"` when a concrete member exists |
49
49
  | `forge-1-prd` … `forge-4-backlog` | that stage's own id | none beyond identity/capability |
50
- | `forge-5-loop` | `forge-5-loop` | `--outcome` — one of `complete`, `partial`, `blocked`, `needs-human`, `deferred` |
51
- | `forge-6-docs` | `forge-6-docs` | `--outcome` — `complete` or `blocked` |
50
+ | `forge-5-loop` | `forge-5-loop` | `--outcome` — one of `complete`, `partial`, `blocked`, `needs-human`, `deferred`, `resolved`; optional `--cause dependency-starvation` with `--outcome partial` |
51
+ | `forge-6-docs` | `forge-6-docs` | `--outcome` — `complete`, `blocked`, or `skipped` (deliberate docs skip, persisted via `state-skip` before the exit; routes like `complete` with honest wording) |
52
52
  | direct `forge-verify` | `forge-verify` | `--owner direct`, `--outcome` (`passed`, `findings`, `skipped`, `failed`), and served-stage metadata |
53
53
  | nested `forge-verify` | `forge-verify` | `--owner nested`, plus the same outcome and served-stage metadata |
54
54
  | direct/nested `forge-fix` | `forge-fix` | the matching `--owner`, a `FixOutcome` (`no-findings`, `decisions`, `failed`, `applied`, `reverified`, `reverify-findings`, `deferred`), and served-stage metadata |
@@ -100,9 +100,9 @@ Obey the DIRECTIVES it prints, in the consumption order this protocol fixes: sur
100
100
 
101
101
  The stamp is shown with `--host claude`; the adapter build substitutes `pi`/`generic` per
102
102
  target, and §"Host and capability determination" below governs the value. The literal is
103
- deliberate — `scripts/build-adapters.py` keys its host translation on the exact string
104
- `--host claude`, and the stamp sites are compared byte-for-byte, so it is the one token in
105
- that line that is not a placeholder.
103
+ deliberate — `scripts/build-adapters.py` keys its host translation on the exact canon
104
+ value of that flag, and the stamp sites are compared byte-for-byte, so it is the one token
105
+ in that line that is not a placeholder.
106
106
 
107
107
  ## Host and capability determination
108
108
 
@@ -110,8 +110,9 @@ Before the call, compute the two inputs independently. They are unrelated: **a h
110
110
  implies a capability**, and the script takes `--verify-capability` at face value.
111
111
 
112
112
  **`--host`** describes only the active adapter command surface — `claude`, `pi`, or
113
- `generic`. It selects command syntax (`/feature-forge:` vs `/skill:` vs host-neutral) and
114
- fresh-session wording (`/clear` vs `/new` vs neutral prose). Nothing else.
113
+ `generic`. It selects command syntax (Claude's stage-command prefix vs Pi's `/skill:` vs
114
+ host-neutral) and fresh-session wording (Claude's clear command vs Pi's `/new` vs neutral
115
+ prose). Nothing else.
115
116
 
116
117
  **`--verify-capability interactive`** is passed only when **both** of these hold:
117
118
 
@@ -151,7 +152,8 @@ production successor** while verification is unresolved.
151
152
  - a capable Pi session is `--host pi --verify-capability interactive`, and receives the
152
153
  same logical gate a capable Claude session does;
153
154
  - Pi without a dispatchable verifier is `--host pi --verify-capability manual`;
154
- - a Claude session that cannot dispatch is `--host claude --verify-capability manual`.
155
+ - a Claude session that cannot dispatch keeps the Claude host value with
156
+ `--verify-capability manual`.
155
157
 
156
158
  Interactive gate options keep their explicit labels, their recommended default, and their
157
159
  one-line trade-off descriptions (below). The manual path prints the verify command as the
@@ -199,6 +201,44 @@ second sentinel-terminated block **inside** an outer stage's exit, breaking the
199
201
  exactly-one-terminal-block rule — and the canon guard cannot catch it, because both
200
202
  wordings legitimately appear in the same file. Judge the token, not the phrasing.
201
203
 
204
+ ## Caller-side resumption: the declared resume point
205
+
206
+ The `owner:` token and `terminalOwnedBy` arbitrate who prints — but they specify only
207
+ the **callee** side: a nested skill stays quiet and returns its structured result. This
208
+ section is the reciprocal, caller-side half of that contract.
209
+
210
+ **On a sub-skill's return, the caller re-owns the terminal.** Every closing instruction
211
+ in the callee's own body — its report-and-stop posture, its "confirm the result" close,
212
+ its own next-steps habits — is void for this turn. The caller resumes at its **declared
213
+ resume point**, in the same turn, and its remaining steps run to its own terminal.
214
+
215
+ **Every Skill-tool delegation site declares, at the invocation, what happens on
216
+ return.** Suppression without resumption is the failure mode this section closes: the
217
+ callee's closing posture is the freshest instruction in context while the caller's next
218
+ step is the oldest, so an undeclared return silently ends the run one layer too early —
219
+ the caller's remaining steps (validation, state writes, commit, stage exit) dropped,
220
+ with no error surfaced. An implicit "let it run to its natural stopping point" is that
221
+ bug spelled politely, and it is banned on delegation sites. A site takes one of two
222
+ declared postures:
223
+
224
+ - **Delegate-and-resume** — the callee is a sub-step of the caller: the site names the
225
+ caller's own step that control returns to, and the caller continues there in the same
226
+ turn. The callee never owns the caller's terminal. The worked instance is
227
+ `forge-4-backlog` Step 4's **Return contract** for the `author-backlog` delegation
228
+ (control returns at Step 5; the sub-skill's direct-invocation posture — its approval
229
+ gate and its validate-and-confirm close — is explicitly disapplied on the delegated
230
+ path). New delegation sites follow that pattern rather than re-deriving it.
231
+ - **Terminal handoff** — the caller's job ends at the invocation and the invoked skill
232
+ owns the terminal from there on (e.g. the navigator's `autoInvokeNextStage`
233
+ "continue in this session" advance into the next production stage). Declaring the
234
+ handoff is what keeps it distinct from an accidental drop.
235
+
236
+ Scope: this contract governs **Skill-tool delegation within one session**. The
237
+ truncated-verifier-return guard (forge-verify's `findings-template.md`, "Truncated
238
+ Verifier Returns") is a different mechanism — it polices what an **Agent-dispatched
239
+ subagent's** return payload must contain, not where a caller resumes. A dispatch site
240
+ can be subject to both; satisfy each on its own terms.
241
+
202
242
  ## Directive consumption order
203
243
 
204
244
  `stage-exit` emits a DIRECTIVES object and (for a direct owner) a NEXT-STEPS block. The
@@ -299,7 +339,11 @@ first:
299
339
  a stage's artifact commit.
300
340
  - **Skip for now** — go straight to the NEXT-STEPS block without verifying. Record this
301
341
  stage's verify status as `skipped` in pipeline state (via `state-verify`, never by hand)
302
- **only** on an explicit skip — a skip does not go stale.
342
+ **only** on an explicit skip — a skip does not go stale. Exception: if the existing
343
+ entry records `passed` or `findings-applied` (a resolved result whose freshness has
344
+ merely lapsed), write **nothing** — `state-verify` refuses to demote a resolved status
345
+ to `skipped` (#203), and the recorded result stands on its own; the user's decline is
346
+ honored by simply not re-verifying.
303
347
 
304
348
  **Advancement is allowed only after a pass, or after an explicit skip has been
305
349
  persisted.** Choosing to stop, or losing the interaction, produces no advancing terminal
@@ -358,8 +402,8 @@ directive is informational — you do **not** re-derive the wording:
358
402
  unchanged; the block appends a non-blocking reminder line ("You also flagged N epic
359
403
  change(s) to reconcile when convenient …"). This is *finish-then-edit*.
360
404
 
361
- Either way the added lines are host-neutral (no literal `/clear`) and sit **above** the
362
- sentinel; just print the NEXT-STEPS block verbatim as always.
405
+ Either way the added lines are host-neutral (they name no fresh-session command) and sit
406
+ **above** the sentinel; just print the NEXT-STEPS block verbatim as always.
363
407
 
364
408
  ### Deferred decisions — do not solicit next-stage decisions at this exit
365
409
 
@@ -129,6 +129,8 @@ After writing the PRD (this is the point where `{specsDir}/{feature}/` is first
129
129
 
130
130
  ## Step 5: Review with User
131
131
 
132
+ This is a **blocking review** — per the **Stage Review Gate** in `references/shared-conventions.md`, do not proceed until the user confirms.
133
+
132
134
  Present the complete PRD to the user. Ask:
133
135
  - "Does this capture everything? Any requirements missing?"
134
136
  - "Are the priorities correct?"
@@ -145,7 +147,7 @@ Before writing state or running the stage exit, invoke the **Stage-Completion Re
145
147
  Pipeline state is written by the `state-*` verbs — see the Pipeline State Protocol in `references/shared-conventions.md`.
146
148
 
147
149
  1. Record completion by running `state-complete` (below) with `--version` 1 (or the incremented version if revising) and one `--artifact` per file this stage produced. It sets `status: "complete"`, `completedAt`, the version and `basedOnVersions` (`{}` here — no upstream dependencies), and applies the downstream staleness cascade deterministically, so no downstream status is set by hand.
148
- 2. **Offer a note — don't force one.** As a statement (not a blocking question), let the user know they can jot anything worth preserving across sessions and you'll store it in the `notes` field. If they volunteer something, store it; otherwise proceed.
150
+ 2. **Offer a note — don't force one.** As a statement (not a blocking question), let the user know they can jot anything worth preserving across sessions and you'll store it in the `notes` field. If they volunteer something, store it via `state-note` — it **overwrites** the single `notes` string (latest note wins), so fold any still-relevant existing note into the one combined string; otherwise proceed. The next stage's Step 1 reads and surfaces this note.
149
151
  3. If `gitCommitAfterStage` is true, follow the Git Commit Protocol in `references/shared-conventions.md`: stage files (including `{specsDir}/AGENTS.md` / `{specsDir}/CLAUDE.md` if the Specs Directory Hygiene step just wrote them), attempt commit with message `"{commitPrefix}({feature}): complete PRD v{n}"` (marking `stages.forge-1-prd.status` `complete` with `commitHash: null` in that commit), then record the artifact-commit hash via the protocol's two-commit follow-up (never `--amend`) only on success. If commit fails, leave status as `in-progress`.
150
152
  4. **Close with the Stage Exit Protocol** (single-sourced in `references/stage-exit-protocol.md`; do not improvise a "Next steps" list):
151
153