@garygentry/feature-forge 0.3.1 → 0.3.2

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 (314) hide show
  1. package/adapters/claude/.feature-forge-bundle.json +1 -1
  2. package/adapters/claude/references/epic-manifest-schema.json +6 -1
  3. package/adapters/claude/references/forge-config-schema.json +1 -1
  4. package/adapters/claude/references/pipeline-state-schema.json +4 -2
  5. package/adapters/claude/references/shared-conventions.md +63 -0
  6. package/adapters/claude/references/stage-exit-protocol.md +344 -140
  7. package/adapters/claude/scripts/epic-manifest.py +413 -87
  8. package/adapters/claude/scripts/forge-bootstrap.py +57 -5
  9. package/adapters/claude/scripts/forge-session.py +3136 -139
  10. package/adapters/claude/scripts/validate-traceability.py +86 -5
  11. package/adapters/claude/skills/forge/SKILL.md +7 -6
  12. package/adapters/claude/skills/forge/references/pipeline-state-schema.json +4 -2
  13. package/adapters/claude/skills/forge/references/shared-conventions.md +63 -0
  14. package/adapters/claude/skills/forge/references/stage-exit-protocol.md +344 -140
  15. package/adapters/claude/skills/forge-0-epic/SKILL.md +7 -2
  16. package/adapters/claude/skills/forge-0-epic/references/edit-mode.md +24 -24
  17. package/adapters/claude/skills/forge-0-epic/references/pipeline-state-schema.json +4 -2
  18. package/adapters/claude/skills/forge-0-epic/references/shared-conventions.md +63 -0
  19. package/adapters/claude/skills/forge-0-epic/references/stage-exit-protocol.md +344 -140
  20. package/adapters/claude/skills/forge-1-prd/SKILL.md +14 -3
  21. package/adapters/claude/skills/forge-1-prd/references/shared-conventions.md +63 -0
  22. package/adapters/claude/skills/forge-1-prd/references/stage-exit-protocol.md +344 -140
  23. package/adapters/claude/skills/forge-2-tech/SKILL.md +13 -3
  24. package/adapters/claude/skills/forge-2-tech/references/shared-conventions.md +63 -0
  25. package/adapters/claude/skills/forge-2-tech/references/stage-exit-protocol.md +344 -140
  26. package/adapters/claude/skills/forge-3-specs/SKILL.md +4 -2
  27. package/adapters/claude/skills/forge-3-specs/references/shared-conventions.md +63 -0
  28. package/adapters/claude/skills/forge-3-specs/references/spec-archetypes.md +9 -0
  29. package/adapters/claude/skills/forge-3-specs/references/stage-exit-protocol.md +344 -140
  30. package/adapters/claude/skills/forge-4-backlog/SKILL.md +16 -3
  31. package/adapters/claude/skills/forge-4-backlog/references/shared-conventions.md +63 -0
  32. package/adapters/claude/skills/forge-4-backlog/references/stage-exit-protocol.md +344 -140
  33. package/adapters/claude/skills/forge-5-loop/SKILL.md +40 -42
  34. package/adapters/claude/skills/forge-5-loop/references/result-reporting.md +70 -31
  35. package/adapters/claude/skills/forge-5-loop/references/runner-contract.md +4 -2
  36. package/adapters/claude/skills/forge-5-loop/references/shared-conventions.md +63 -0
  37. package/adapters/claude/skills/forge-5-loop/references/stage-exit-protocol.md +344 -140
  38. package/adapters/claude/skills/forge-6-docs/SKILL.md +48 -4
  39. package/adapters/claude/skills/forge-6-docs/references/shared-conventions.md +63 -0
  40. package/adapters/claude/skills/forge-6-docs/references/stage-exit-protocol.md +472 -0
  41. package/adapters/claude/skills/forge-fix/SKILL.md +85 -33
  42. package/adapters/claude/skills/forge-fix/references/shared-conventions.md +63 -0
  43. package/adapters/claude/skills/forge-fix/references/stage-exit-protocol.md +344 -140
  44. package/adapters/claude/skills/forge-guide/references/forge-config-schema.json +1 -1
  45. package/adapters/claude/skills/forge-guide/references/shared-conventions.md +63 -0
  46. package/adapters/claude/skills/forge-verify/SKILL.md +73 -41
  47. package/adapters/claude/skills/forge-verify/references/findings-template.md +39 -49
  48. package/adapters/claude/skills/forge-verify/references/shared-conventions.md +63 -0
  49. package/adapters/claude/skills/forge-verify/references/stage-exit-protocol.md +472 -0
  50. package/adapters/claude/skills/forge-verify/references/verification-checklists/epic.md +4 -3
  51. package/adapters/claude/skills/forge-verify/references/verification-checklists/specs.md +2 -0
  52. package/adapters/codex/.feature-forge-bundle.json +1 -1
  53. package/adapters/codex/references/epic-manifest-schema.json +6 -1
  54. package/adapters/codex/references/forge-config-schema.json +1 -1
  55. package/adapters/codex/references/pipeline-state-schema.json +4 -2
  56. package/adapters/codex/references/shared-conventions.md +63 -0
  57. package/adapters/codex/references/stage-exit-protocol.md +344 -140
  58. package/adapters/codex/scripts/epic-manifest.py +413 -87
  59. package/adapters/codex/scripts/forge-bootstrap.py +57 -5
  60. package/adapters/codex/scripts/forge-session.py +3136 -139
  61. package/adapters/codex/scripts/validate-traceability.py +86 -5
  62. package/adapters/codex/skills/forge/SKILL.md +7 -6
  63. package/adapters/codex/skills/forge/references/pipeline-state-schema.json +4 -2
  64. package/adapters/codex/skills/forge/references/shared-conventions.md +63 -0
  65. package/adapters/codex/skills/forge/references/stage-exit-protocol.md +344 -140
  66. package/adapters/codex/skills/forge-0-epic/SKILL.md +7 -2
  67. package/adapters/codex/skills/forge-0-epic/references/edit-mode.md +24 -24
  68. package/adapters/codex/skills/forge-0-epic/references/pipeline-state-schema.json +4 -2
  69. package/adapters/codex/skills/forge-0-epic/references/shared-conventions.md +63 -0
  70. package/adapters/codex/skills/forge-0-epic/references/stage-exit-protocol.md +344 -140
  71. package/adapters/codex/skills/forge-1-prd/SKILL.md +14 -3
  72. package/adapters/codex/skills/forge-1-prd/references/shared-conventions.md +63 -0
  73. package/adapters/codex/skills/forge-1-prd/references/stage-exit-protocol.md +344 -140
  74. package/adapters/codex/skills/forge-2-tech/SKILL.md +13 -3
  75. package/adapters/codex/skills/forge-2-tech/references/shared-conventions.md +63 -0
  76. package/adapters/codex/skills/forge-2-tech/references/stage-exit-protocol.md +344 -140
  77. package/adapters/codex/skills/forge-3-specs/SKILL.md +4 -2
  78. package/adapters/codex/skills/forge-3-specs/references/shared-conventions.md +63 -0
  79. package/adapters/codex/skills/forge-3-specs/references/spec-archetypes.md +9 -0
  80. package/adapters/codex/skills/forge-3-specs/references/stage-exit-protocol.md +344 -140
  81. package/adapters/codex/skills/forge-4-backlog/SKILL.md +16 -3
  82. package/adapters/codex/skills/forge-4-backlog/references/shared-conventions.md +63 -0
  83. package/adapters/codex/skills/forge-4-backlog/references/stage-exit-protocol.md +344 -140
  84. package/adapters/codex/skills/forge-5-loop/SKILL.md +40 -42
  85. package/adapters/codex/skills/forge-5-loop/references/result-reporting.md +70 -31
  86. package/adapters/codex/skills/forge-5-loop/references/runner-contract.md +4 -2
  87. package/adapters/codex/skills/forge-5-loop/references/shared-conventions.md +63 -0
  88. package/adapters/codex/skills/forge-5-loop/references/stage-exit-protocol.md +344 -140
  89. package/adapters/codex/skills/forge-6-docs/SKILL.md +48 -4
  90. package/adapters/codex/skills/forge-6-docs/references/shared-conventions.md +63 -0
  91. package/adapters/codex/skills/forge-6-docs/references/stage-exit-protocol.md +472 -0
  92. package/adapters/codex/skills/forge-fix/SKILL.md +84 -32
  93. package/adapters/codex/skills/forge-fix/references/shared-conventions.md +63 -0
  94. package/adapters/codex/skills/forge-fix/references/stage-exit-protocol.md +344 -140
  95. package/adapters/codex/skills/forge-guide/references/forge-config-schema.json +1 -1
  96. package/adapters/codex/skills/forge-guide/references/shared-conventions.md +63 -0
  97. package/adapters/codex/skills/forge-verify/SKILL.md +72 -40
  98. package/adapters/codex/skills/forge-verify/references/findings-template.md +39 -49
  99. package/adapters/codex/skills/forge-verify/references/shared-conventions.md +63 -0
  100. package/adapters/codex/skills/forge-verify/references/stage-exit-protocol.md +472 -0
  101. package/adapters/codex/skills/forge-verify/references/verification-checklists/epic.md +4 -3
  102. package/adapters/codex/skills/forge-verify/references/verification-checklists/specs.md +2 -0
  103. package/adapters/copilot/.feature-forge-bundle.json +1 -1
  104. package/adapters/copilot/references/epic-manifest-schema.json +6 -1
  105. package/adapters/copilot/references/forge-config-schema.json +1 -1
  106. package/adapters/copilot/references/pipeline-state-schema.json +4 -2
  107. package/adapters/copilot/references/shared-conventions.md +63 -0
  108. package/adapters/copilot/references/stage-exit-protocol.md +344 -140
  109. package/adapters/copilot/scripts/epic-manifest.py +413 -87
  110. package/adapters/copilot/scripts/forge-bootstrap.py +57 -5
  111. package/adapters/copilot/scripts/forge-session.py +3136 -139
  112. package/adapters/copilot/scripts/validate-traceability.py +86 -5
  113. package/adapters/copilot/skills/forge/forge.md +7 -6
  114. package/adapters/copilot/skills/forge/references/pipeline-state-schema.json +4 -2
  115. package/adapters/copilot/skills/forge/references/shared-conventions.md +63 -0
  116. package/adapters/copilot/skills/forge/references/stage-exit-protocol.md +344 -140
  117. package/adapters/copilot/skills/forge-0-epic/forge-0-epic.md +7 -2
  118. package/adapters/copilot/skills/forge-0-epic/references/edit-mode.md +24 -24
  119. package/adapters/copilot/skills/forge-0-epic/references/pipeline-state-schema.json +4 -2
  120. package/adapters/copilot/skills/forge-0-epic/references/shared-conventions.md +63 -0
  121. package/adapters/copilot/skills/forge-0-epic/references/stage-exit-protocol.md +344 -140
  122. package/adapters/copilot/skills/forge-1-prd/forge-1-prd.md +14 -3
  123. package/adapters/copilot/skills/forge-1-prd/references/shared-conventions.md +63 -0
  124. package/adapters/copilot/skills/forge-1-prd/references/stage-exit-protocol.md +344 -140
  125. package/adapters/copilot/skills/forge-2-tech/forge-2-tech.md +13 -3
  126. package/adapters/copilot/skills/forge-2-tech/references/shared-conventions.md +63 -0
  127. package/adapters/copilot/skills/forge-2-tech/references/stage-exit-protocol.md +344 -140
  128. package/adapters/copilot/skills/forge-3-specs/forge-3-specs.md +4 -2
  129. package/adapters/copilot/skills/forge-3-specs/references/shared-conventions.md +63 -0
  130. package/adapters/copilot/skills/forge-3-specs/references/spec-archetypes.md +9 -0
  131. package/adapters/copilot/skills/forge-3-specs/references/stage-exit-protocol.md +344 -140
  132. package/adapters/copilot/skills/forge-4-backlog/forge-4-backlog.md +16 -3
  133. package/adapters/copilot/skills/forge-4-backlog/references/shared-conventions.md +63 -0
  134. package/adapters/copilot/skills/forge-4-backlog/references/stage-exit-protocol.md +344 -140
  135. package/adapters/copilot/skills/forge-5-loop/forge-5-loop.md +40 -42
  136. package/adapters/copilot/skills/forge-5-loop/references/result-reporting.md +70 -31
  137. package/adapters/copilot/skills/forge-5-loop/references/runner-contract.md +4 -2
  138. package/adapters/copilot/skills/forge-5-loop/references/shared-conventions.md +63 -0
  139. package/adapters/copilot/skills/forge-5-loop/references/stage-exit-protocol.md +344 -140
  140. package/adapters/copilot/skills/forge-6-docs/forge-6-docs.md +48 -4
  141. package/adapters/copilot/skills/forge-6-docs/references/shared-conventions.md +63 -0
  142. package/adapters/copilot/skills/forge-6-docs/references/stage-exit-protocol.md +472 -0
  143. package/adapters/copilot/skills/forge-fix/forge-fix.md +84 -32
  144. package/adapters/copilot/skills/forge-fix/references/shared-conventions.md +63 -0
  145. package/adapters/copilot/skills/forge-fix/references/stage-exit-protocol.md +344 -140
  146. package/adapters/copilot/skills/forge-guide/references/forge-config-schema.json +1 -1
  147. package/adapters/copilot/skills/forge-guide/references/shared-conventions.md +63 -0
  148. package/adapters/copilot/skills/forge-verify/forge-verify.md +72 -40
  149. package/adapters/copilot/skills/forge-verify/references/findings-template.md +39 -49
  150. package/adapters/copilot/skills/forge-verify/references/shared-conventions.md +63 -0
  151. package/adapters/copilot/skills/forge-verify/references/stage-exit-protocol.md +472 -0
  152. package/adapters/copilot/skills/forge-verify/references/verification-checklists/epic.md +4 -3
  153. package/adapters/copilot/skills/forge-verify/references/verification-checklists/specs.md +2 -0
  154. package/adapters/cursor/.feature-forge-bundle.json +1 -1
  155. package/adapters/cursor/references/epic-manifest-schema.json +6 -1
  156. package/adapters/cursor/references/forge-config-schema.json +1 -1
  157. package/adapters/cursor/references/pipeline-state-schema.json +4 -2
  158. package/adapters/cursor/references/shared-conventions.md +63 -0
  159. package/adapters/cursor/references/stage-exit-protocol.md +344 -140
  160. package/adapters/cursor/scripts/epic-manifest.py +413 -87
  161. package/adapters/cursor/scripts/forge-bootstrap.py +57 -5
  162. package/adapters/cursor/scripts/forge-session.py +3136 -139
  163. package/adapters/cursor/scripts/validate-traceability.py +86 -5
  164. package/adapters/cursor/skills/forge/forge.mdc +7 -6
  165. package/adapters/cursor/skills/forge/references/pipeline-state-schema.json +4 -2
  166. package/adapters/cursor/skills/forge/references/shared-conventions.md +63 -0
  167. package/adapters/cursor/skills/forge/references/stage-exit-protocol.md +344 -140
  168. package/adapters/cursor/skills/forge-0-epic/forge-0-epic.mdc +7 -2
  169. package/adapters/cursor/skills/forge-0-epic/references/edit-mode.md +24 -24
  170. package/adapters/cursor/skills/forge-0-epic/references/pipeline-state-schema.json +4 -2
  171. package/adapters/cursor/skills/forge-0-epic/references/shared-conventions.md +63 -0
  172. package/adapters/cursor/skills/forge-0-epic/references/stage-exit-protocol.md +344 -140
  173. package/adapters/cursor/skills/forge-1-prd/forge-1-prd.mdc +14 -3
  174. package/adapters/cursor/skills/forge-1-prd/references/shared-conventions.md +63 -0
  175. package/adapters/cursor/skills/forge-1-prd/references/stage-exit-protocol.md +344 -140
  176. package/adapters/cursor/skills/forge-2-tech/forge-2-tech.mdc +13 -3
  177. package/adapters/cursor/skills/forge-2-tech/references/shared-conventions.md +63 -0
  178. package/adapters/cursor/skills/forge-2-tech/references/stage-exit-protocol.md +344 -140
  179. package/adapters/cursor/skills/forge-3-specs/forge-3-specs.mdc +4 -2
  180. package/adapters/cursor/skills/forge-3-specs/references/shared-conventions.md +63 -0
  181. package/adapters/cursor/skills/forge-3-specs/references/spec-archetypes.md +9 -0
  182. package/adapters/cursor/skills/forge-3-specs/references/stage-exit-protocol.md +344 -140
  183. package/adapters/cursor/skills/forge-4-backlog/forge-4-backlog.mdc +16 -3
  184. package/adapters/cursor/skills/forge-4-backlog/references/shared-conventions.md +63 -0
  185. package/adapters/cursor/skills/forge-4-backlog/references/stage-exit-protocol.md +344 -140
  186. package/adapters/cursor/skills/forge-5-loop/forge-5-loop.mdc +40 -42
  187. package/adapters/cursor/skills/forge-5-loop/references/result-reporting.md +70 -31
  188. package/adapters/cursor/skills/forge-5-loop/references/runner-contract.md +4 -2
  189. package/adapters/cursor/skills/forge-5-loop/references/shared-conventions.md +63 -0
  190. package/adapters/cursor/skills/forge-5-loop/references/stage-exit-protocol.md +344 -140
  191. package/adapters/cursor/skills/forge-6-docs/forge-6-docs.mdc +48 -4
  192. package/adapters/cursor/skills/forge-6-docs/references/shared-conventions.md +63 -0
  193. package/adapters/cursor/skills/forge-6-docs/references/stage-exit-protocol.md +472 -0
  194. package/adapters/cursor/skills/forge-fix/forge-fix.mdc +84 -32
  195. package/adapters/cursor/skills/forge-fix/references/shared-conventions.md +63 -0
  196. package/adapters/cursor/skills/forge-fix/references/stage-exit-protocol.md +344 -140
  197. package/adapters/cursor/skills/forge-guide/references/forge-config-schema.json +1 -1
  198. package/adapters/cursor/skills/forge-guide/references/shared-conventions.md +63 -0
  199. package/adapters/cursor/skills/forge-verify/forge-verify.mdc +72 -40
  200. package/adapters/cursor/skills/forge-verify/references/findings-template.md +39 -49
  201. package/adapters/cursor/skills/forge-verify/references/shared-conventions.md +63 -0
  202. package/adapters/cursor/skills/forge-verify/references/stage-exit-protocol.md +472 -0
  203. package/adapters/cursor/skills/forge-verify/references/verification-checklists/epic.md +4 -3
  204. package/adapters/cursor/skills/forge-verify/references/verification-checklists/specs.md +2 -0
  205. package/adapters/gemini/.feature-forge-bundle.json +1 -1
  206. package/adapters/gemini/gemini-extension.json +1 -1
  207. package/adapters/gemini/references/epic-manifest-schema.json +6 -1
  208. package/adapters/gemini/references/forge-config-schema.json +1 -1
  209. package/adapters/gemini/references/pipeline-state-schema.json +4 -2
  210. package/adapters/gemini/references/shared-conventions.md +63 -0
  211. package/adapters/gemini/references/stage-exit-protocol.md +344 -140
  212. package/adapters/gemini/scripts/epic-manifest.py +413 -87
  213. package/adapters/gemini/scripts/forge-bootstrap.py +57 -5
  214. package/adapters/gemini/scripts/forge-session.py +3136 -139
  215. package/adapters/gemini/scripts/validate-traceability.py +86 -5
  216. package/adapters/gemini/skills/forge/forge.md +7 -6
  217. package/adapters/gemini/skills/forge/references/pipeline-state-schema.json +4 -2
  218. package/adapters/gemini/skills/forge/references/shared-conventions.md +63 -0
  219. package/adapters/gemini/skills/forge/references/stage-exit-protocol.md +344 -140
  220. package/adapters/gemini/skills/forge-0-epic/forge-0-epic.md +7 -2
  221. package/adapters/gemini/skills/forge-0-epic/references/edit-mode.md +24 -24
  222. package/adapters/gemini/skills/forge-0-epic/references/pipeline-state-schema.json +4 -2
  223. package/adapters/gemini/skills/forge-0-epic/references/shared-conventions.md +63 -0
  224. package/adapters/gemini/skills/forge-0-epic/references/stage-exit-protocol.md +344 -140
  225. package/adapters/gemini/skills/forge-1-prd/forge-1-prd.md +14 -3
  226. package/adapters/gemini/skills/forge-1-prd/references/shared-conventions.md +63 -0
  227. package/adapters/gemini/skills/forge-1-prd/references/stage-exit-protocol.md +344 -140
  228. package/adapters/gemini/skills/forge-2-tech/forge-2-tech.md +13 -3
  229. package/adapters/gemini/skills/forge-2-tech/references/shared-conventions.md +63 -0
  230. package/adapters/gemini/skills/forge-2-tech/references/stage-exit-protocol.md +344 -140
  231. package/adapters/gemini/skills/forge-3-specs/forge-3-specs.md +4 -2
  232. package/adapters/gemini/skills/forge-3-specs/references/shared-conventions.md +63 -0
  233. package/adapters/gemini/skills/forge-3-specs/references/spec-archetypes.md +9 -0
  234. package/adapters/gemini/skills/forge-3-specs/references/stage-exit-protocol.md +344 -140
  235. package/adapters/gemini/skills/forge-4-backlog/forge-4-backlog.md +16 -3
  236. package/adapters/gemini/skills/forge-4-backlog/references/shared-conventions.md +63 -0
  237. package/adapters/gemini/skills/forge-4-backlog/references/stage-exit-protocol.md +344 -140
  238. package/adapters/gemini/skills/forge-5-loop/forge-5-loop.md +40 -42
  239. package/adapters/gemini/skills/forge-5-loop/references/result-reporting.md +70 -31
  240. package/adapters/gemini/skills/forge-5-loop/references/runner-contract.md +4 -2
  241. package/adapters/gemini/skills/forge-5-loop/references/shared-conventions.md +63 -0
  242. package/adapters/gemini/skills/forge-5-loop/references/stage-exit-protocol.md +344 -140
  243. package/adapters/gemini/skills/forge-6-docs/forge-6-docs.md +48 -4
  244. package/adapters/gemini/skills/forge-6-docs/references/shared-conventions.md +63 -0
  245. package/adapters/gemini/skills/forge-6-docs/references/stage-exit-protocol.md +472 -0
  246. package/adapters/gemini/skills/forge-fix/forge-fix.md +84 -32
  247. package/adapters/gemini/skills/forge-fix/references/shared-conventions.md +63 -0
  248. package/adapters/gemini/skills/forge-fix/references/stage-exit-protocol.md +344 -140
  249. package/adapters/gemini/skills/forge-guide/references/forge-config-schema.json +1 -1
  250. package/adapters/gemini/skills/forge-guide/references/shared-conventions.md +63 -0
  251. package/adapters/gemini/skills/forge-verify/forge-verify.md +72 -40
  252. package/adapters/gemini/skills/forge-verify/references/findings-template.md +39 -49
  253. package/adapters/gemini/skills/forge-verify/references/shared-conventions.md +63 -0
  254. package/adapters/gemini/skills/forge-verify/references/stage-exit-protocol.md +472 -0
  255. package/adapters/gemini/skills/forge-verify/references/verification-checklists/epic.md +4 -3
  256. package/adapters/gemini/skills/forge-verify/references/verification-checklists/specs.md +2 -0
  257. package/adapters/pi/.feature-forge-bundle.json +1 -1
  258. package/adapters/pi/references/epic-manifest-schema.json +6 -1
  259. package/adapters/pi/references/forge-config-schema.json +1 -1
  260. package/adapters/pi/references/pipeline-state-schema.json +4 -2
  261. package/adapters/pi/references/shared-conventions.md +63 -0
  262. package/adapters/pi/references/stage-exit-protocol.md +344 -140
  263. package/adapters/pi/scripts/epic-manifest.py +413 -87
  264. package/adapters/pi/scripts/forge-bootstrap.py +57 -5
  265. package/adapters/pi/scripts/forge-session.py +3136 -139
  266. package/adapters/pi/scripts/validate-traceability.py +86 -5
  267. package/adapters/pi/skills/forge/SKILL.md +7 -6
  268. package/adapters/pi/skills/forge/references/pipeline-state-schema.json +4 -2
  269. package/adapters/pi/skills/forge/references/shared-conventions.md +63 -0
  270. package/adapters/pi/skills/forge/references/stage-exit-protocol.md +344 -140
  271. package/adapters/pi/skills/forge-0-epic/SKILL.md +7 -2
  272. package/adapters/pi/skills/forge-0-epic/references/edit-mode.md +24 -24
  273. package/adapters/pi/skills/forge-0-epic/references/pipeline-state-schema.json +4 -2
  274. package/adapters/pi/skills/forge-0-epic/references/shared-conventions.md +63 -0
  275. package/adapters/pi/skills/forge-0-epic/references/stage-exit-protocol.md +344 -140
  276. package/adapters/pi/skills/forge-1-prd/SKILL.md +14 -3
  277. package/adapters/pi/skills/forge-1-prd/references/shared-conventions.md +63 -0
  278. package/adapters/pi/skills/forge-1-prd/references/stage-exit-protocol.md +344 -140
  279. package/adapters/pi/skills/forge-2-tech/SKILL.md +13 -3
  280. package/adapters/pi/skills/forge-2-tech/references/shared-conventions.md +63 -0
  281. package/adapters/pi/skills/forge-2-tech/references/stage-exit-protocol.md +344 -140
  282. package/adapters/pi/skills/forge-3-specs/SKILL.md +4 -2
  283. package/adapters/pi/skills/forge-3-specs/references/shared-conventions.md +63 -0
  284. package/adapters/pi/skills/forge-3-specs/references/spec-archetypes.md +9 -0
  285. package/adapters/pi/skills/forge-3-specs/references/stage-exit-protocol.md +344 -140
  286. package/adapters/pi/skills/forge-4-backlog/SKILL.md +16 -3
  287. package/adapters/pi/skills/forge-4-backlog/references/shared-conventions.md +63 -0
  288. package/adapters/pi/skills/forge-4-backlog/references/stage-exit-protocol.md +344 -140
  289. package/adapters/pi/skills/forge-5-loop/SKILL.md +40 -42
  290. package/adapters/pi/skills/forge-5-loop/references/result-reporting.md +70 -31
  291. package/adapters/pi/skills/forge-5-loop/references/runner-contract.md +4 -2
  292. package/adapters/pi/skills/forge-5-loop/references/shared-conventions.md +63 -0
  293. package/adapters/pi/skills/forge-5-loop/references/stage-exit-protocol.md +344 -140
  294. package/adapters/pi/skills/forge-6-docs/SKILL.md +48 -4
  295. package/adapters/pi/skills/forge-6-docs/references/shared-conventions.md +63 -0
  296. package/adapters/pi/skills/forge-6-docs/references/stage-exit-protocol.md +472 -0
  297. package/adapters/pi/skills/forge-fix/SKILL.md +84 -32
  298. package/adapters/pi/skills/forge-fix/references/shared-conventions.md +63 -0
  299. package/adapters/pi/skills/forge-fix/references/stage-exit-protocol.md +344 -140
  300. package/adapters/pi/skills/forge-guide/references/forge-config-schema.json +1 -1
  301. package/adapters/pi/skills/forge-guide/references/shared-conventions.md +63 -0
  302. package/adapters/pi/skills/forge-verify/SKILL.md +72 -40
  303. package/adapters/pi/skills/forge-verify/references/findings-template.md +39 -49
  304. package/adapters/pi/skills/forge-verify/references/shared-conventions.md +63 -0
  305. package/adapters/pi/skills/forge-verify/references/stage-exit-protocol.md +472 -0
  306. package/adapters/pi/skills/forge-verify/references/verification-checklists/epic.md +4 -3
  307. package/adapters/pi/skills/forge-verify/references/verification-checklists/specs.md +2 -0
  308. package/package.json +1 -1
  309. package/adapters/claude/skills/forge-verify/references/pipeline-state-schema.json +0 -191
  310. package/adapters/codex/skills/forge-verify/references/pipeline-state-schema.json +0 -191
  311. package/adapters/copilot/skills/forge-verify/references/pipeline-state-schema.json +0 -191
  312. package/adapters/cursor/skills/forge-verify/references/pipeline-state-schema.json +0 -191
  313. package/adapters/gemini/skills/forge-verify/references/pipeline-state-schema.json +0 -191
  314. package/adapters/pi/skills/forge-verify/references/pipeline-state-schema.json +0 -191
@@ -9,28 +9,27 @@ alwaysApply: false
9
9
 
10
10
  Apply fixes from the most recent forge-verify findings document, with step-level tracking for crash recovery.
11
11
 
12
- Usually invoked by the user, but an **`autoFix` caller** may also invoke this skill automatically
13
- when `autoFix: true` is configured **and** its preconditions hold (the findings document has zero
14
- unresolved decision points, the working tree is clean, and a mandatory re-verify passes afterward).
15
- Two callers drive that chain: an **authoring stage's in-stage auto-verify** (the primary path — see
16
- `references/stage-exit-protocol.md`, the in-stage verify block) and the **`/feature-forge:forge`
17
- navigator's catch-up** (§3b). The **fix application** below is identical either way — this skill is
18
- not "auto-aware" about *applying* findings; it always applies the latest findings document. The
19
- **caller** owns the gating decisions, including the closing re-verify: the Step 6 gate is presented
20
- **only on a direct invocation**, because under an `autoFix` chain the caller (stage skill or
21
- navigator) runs the mandatory re-verify itself.
12
+ Usually invoked by the user. An **`autoFix` caller** may also dispatch this skill automatically when `autoFix: true` is configured **and** its preconditions hold (the findings document has zero unresolved decision points, the working tree is clean, and a mandatory re-verify passes afterward). Two callers drive that chain: an **authoring stage's in-stage auto-verify** (the primary path — see `references/stage-exit-protocol.md`, the in-stage verify block) and the **`/feature-forge:forge` navigator's catch-up** (§3b). The **fix application** below is identical either way — this skill is not "auto-aware" about *applying* findings; it always applies the selected findings document. What differs is **branch ownership**, and ownership is read from the literal `owner:` token described under Prerequisites, never inferred from how the invocation happened to be phrased.
22
13
 
23
14
  ## Prerequisites
24
15
 
25
16
  Read and follow `references/shared-conventions.md` for feature name validation, configuration reading, and force mode handling before proceeding.
26
17
 
18
+ **Ownership.** Determine branch ownership **at entry**, from the literal `owner: nested` / `owner: direct` token in the prompt that dispatched you. **Absent the token you are `direct`** — a user-typed `/feature-forge:forge-fix` is the only path that carries no dispatcher. Judge the token, never the phrasing of the invocation. Preserve that value unchanged through any re-verify and pass it straight through as `--owner` in Step 7. A **direct** fix stays the terminal owner through its optional re-verify; a **nested** fix invokes nested verify and returns its structured result to the outer stage, printing no terminal block at all. `references/stage-exit-protocol.md` § "Branch ownership: the `owner:` token" owns this rule.
19
+
27
20
  **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.
28
21
 
29
- ## Step 1: Locate Findings Document
22
+ ## Step 1: Locate Findings and Establish the Served Stage
30
23
 
31
24
  1. Read `forge.config.json` for `specsDir` (default: `./specs`)
32
25
  2. Resolve the feature directory via the **Feature Directory Resolution** block in `references/shared-conventions.md` (a standalone feature resolves to its flat `{specsDir}/{feature}/` path exactly as today; an epic member resolves to its nested path). Then find the most recent `VERIFY-*-*.md` file in `{resolvedFeatureDir}/.verification/`.
33
- 3. If no findings document exists, tell the user: "No verification findings found. Run `/feature-forge:forge-verify {feature}` first."
26
+ 3. **Establish the served production stage before any mutation**, in this order:
27
+ - An explicit `--served-stage {stage}` argument on this invocation is authoritative — that is what `forge-verify` and the scripted exit pass when they route here.
28
+ - Otherwise read it from the **selected report's own mode/header**: the `{mode}` in its `VERIFY-{mode}-{YYYY-MM-DD}.md` name together with the mode recorded in the report header, mapped as `epic` → `forge-0-epic`, `prd` → `forge-1-prd`, `tech` → `forge-2-tech`, `specs` → `forge-3-specs`, `backlog` → `forge-4-backlog`, `impl` → `forge-5-loop`.
29
+ - If both are present and disagree, fail closed rather than picking one.
30
+ - Never derive the served stage from conversational context, from `currentStage`, or from whichever feature stage happens to be newest. The report you are applying decides which stage this diversion serves.
31
+ 4. **An unestablishable served stage is a fail-closed error, not a guess.** If a report exists but its mode is missing, malformed, or ambiguous (for example two same-day reports for different modes, or a header whose mode does not match the filename) and no explicit `--served-stage` was supplied, mutate nothing: list the reports you found and tell the user to re-invoke as `/feature-forge:forge-fix {feature} --served-stage {stage}` or to re-run `/feature-forge:forge-verify {feature} {stage}`. Stop there — with no served stage there is no stage to close against, so do not run Step 7.
32
+ 5. **No applicable findings → `no-findings`.** If `.verification/` holds no findings document, or none whose steps still apply, the outcome is `no-findings`: mutate nothing and take the served stage from **authoritative pipeline state** — the production stage whose `stages.forge-verify-*` entry is unresolved (`findings-reported`, `findings-applied`, `auto-verify-pending`, or `pending`) — then close through Step 7. If no verification is outstanding either, there is nothing for this pass to serve: tell the user "No verification findings found. Run `/feature-forge:forge-verify {feature}` first." and stop without closing a stage.
34
33
 
35
34
  ## Step 2: Parse Fix Execution Plan
36
35
 
@@ -45,6 +44,8 @@ If the "User Decisions Required" section has unresolved items:
45
44
  2. Wait for answers before proceeding
46
45
  3. Record decisions in the findings document under the "User Decisions Required" section (mark each as resolved)
47
46
 
47
+ If any decision is still unresolved when you stop — the user deferred it, the question mechanism was unavailable, or no answer arrived — do **not** apply the steps that depend on it. Close with `decisions` in Step 7: that is the specific outcome for unanswered decisions, it never advances the pipeline, and its resume action names the unresolved work. A user who explicitly defers the **whole fix pass** is `deferred` instead; an operational failure that is not merely an unanswered decision is `failed` (Step 7).
48
+
48
49
  ## Step 4: Execute Fix Steps
49
50
 
50
51
  For each step in the "Execution Steps" section, in order:
@@ -57,35 +58,86 @@ For each step in the "Execution Steps" section, in order:
57
58
  ```
58
59
  - Step {N}: [APPLIED] {date} — {short summary of what was done}
59
60
  ```
60
- 6. If a step fails or produces unexpected results, STOP. Report the issue to the user. Do not continue to dependent steps.
61
+ 6. If a step fails or produces unexpected results, STOP. Report the issue to the user. Do not continue to dependent steps. Any applied step stays recorded in `## Fix Progress` so a later run resumes rather than repeats, and this run closes with `failed` in Step 7 — no advancement.
62
+
63
+ **Shipped comments state intent, never measurement (anti-churn).** A fix pass writes **no empirical or quantified claims** into comments, docstrings, or test narration — no "measured", "probed and confirmed", no counts of what was checked, no blanket claims over enumerated cases. Every such claim is a fresh falsifiable surface for the next verify round; a chain of them is exactly how a fix loop stops converging. Shipped prose states what the code intends and what constraint binds it. The evidence — what was probed, how, with what result — belongs in the findings document's `## Fix Progress` entry (and the commit message), which are the sanctioned records for acceptance evidence.
64
+
65
+ ## Step 5: Record the Fixes Through `state-verify` and Commit
66
+
67
+ Never hand-author a verify entry, and never write a `verifiedStageVersion` value by hand. Record the fix pass with the `state-verify` verb described in the **Pipeline State Protocol** in `references/shared-conventions.md`, which owns its full flag surface, its status matrix, and the exit-2 failure protocol. `--stage` names the **served production stage** established in Step 1. `findings-applied` deliberately **clears** `verifiedStageVersion` and refuses `--verified-stage-version`: applying fixes is not verifying them, so the served stage's verification stays outstanding until a re-verify passes. Add `--epic "{epic}"` when the feature is an epic member — required, per the Pipeline State Protocol; omitting it for a member is an error and must never fall back to a same-named flat feature.
61
68
 
62
- ## Step 5: Update Pipeline State and Commit
69
+ ```bash
70
+ R="$(bash -c 'for d in "${FEATURE_FORGE_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')"
71
+ [ -n "$R" ] || { echo "feature-forge: cannot locate plugin root" >&2; exit 1; }
72
+ python3 "$R/scripts/forge-session.py" state-verify \
73
+ --feature "{feature}" --stage "{servedStage}" --status findings-applied \
74
+ --specs-dir "{specsDir}"
75
+ ```
63
76
 
64
- Follow the Git Commit Protocol in `references/shared-conventions.md`.
77
+ Then follow the Git Commit Protocol in `references/shared-conventions.md`. If `gitCommitAfterStage` is true, stage files (`git add {resolvedFeatureDir}/` — or `{specsDir}/{epic}/` for an epic member so the member-state change commits atomically with the epic subtree) and commit with message `"{commitPrefix}({feature}): apply {mode} verification fixes"`. That is Commit 1, and the write above already recorded `commitHash: null` for it.
65
78
 
66
- 1. Update `{resolvedFeatureDir}/.pipeline-state.json`:
67
- - Set the relevant `forge-verify-*` entry status to `findings-applied`
68
- - Record `fixedAt` timestamp
69
- - Record `verifiedStageVersion` = the current `version` of the production stage entry
70
- this verify covers (e.g. fixing `tech` findings → `stages["forge-2-tech"].version`).
71
- This keeps the navigator's freshness ledger accurate after a fix, so the verified
72
- stage reads as `fresh` and auto-verify does not needlessly re-fire on an unchanged
73
- artifact. (If the fix itself bumped the production stage's `version`, use the new
74
- value so the ledger reflects what was actually verified/fixed.)
75
- 2. If `gitCommitAfterStage` is true, follow the Git Commit Protocol: stage files (`git add {resolvedFeatureDir}/` — or `{specsDir}/{epic}/` for an epic member so the member-state change commits atomically with the epic subtree), attempt commit with message `"{commitPrefix}({feature}): apply {mode} verification fixes"` (writing `commitHash: null` in that commit), then record the artifact-commit hash via the protocol's two-commit follow-up (never `--amend`) only on success.
79
+ **Two-commit provenance — never `--amend`.** Record the provenance of Commit 1 in a second `state-verify` call, passing the **full 40-character** hash — an abbreviation is refused rather than expanded, and this call touches nothing but `commitHash`. Add `--epic "{epic}"` when the feature is an epic member — required, per the Pipeline State Protocol.
80
+
81
+ ```bash
82
+ R="$(bash -c 'for d in "${FEATURE_FORGE_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')"
83
+ [ -n "$R" ] || { echo "feature-forge: cannot locate plugin root" >&2; exit 1; }
84
+ python3 "$R/scripts/forge-session.py" state-verify \
85
+ --feature "{feature}" --stage "{servedStage}" \
86
+ --commit-hash "$(git rev-parse HEAD)" --specs-dir "{specsDir}"
87
+ ```
88
+
89
+ On exit 2 **nothing was recorded**: surface the `Error:` line verbatim together with the named feature (and epic), do not claim the fixes were persisted, and close with `failed` in Step 7 — the verify entry is unchanged, so no success block may be printed. A failed validation or a failed commit is `failed` for the same reason.
76
90
 
77
91
  ## Step 6: Re-verify Gate
78
92
 
79
- Fixes are applied and recorded (`findings-applied`), so the stage reads **fresh** in the navigator's ledger (Step 5 set `verifiedStageVersion` to the current version). A re-verify is nonetheless the only thing that *confirms* the fixes actually resolved the findings, so on a **direct/manual** `forge-fix` invocation, **prompt** it rather than leaving it as a passive suggestion — this is the same **Standard Verify Gate** the stage skills stamp (`references/stage-exit-protocol.md`).
93
+ Fixes are applied and recorded as `findings-applied`. That status makes **no** claim of freshness: the writer clears `verifiedStageVersion`, so the served stage's verification stays **outstanding** in the navigator's ledger, and only a re-verify that passes resolves it. Because a re-verify is the one thing that confirms the fixes actually resolved the findings, on a **direct** invocation **prompt** for it rather than leaving it as a passive suggestion — this is the same **Standard Verify Gate** the stage skills stamp (`references/stage-exit-protocol.md`).
94
+
95
+ **A nested owner presents no gate.** Return your structured result (served stage, outcome `applied`, findings file, steps applied) to the outer caller — it performs the mandatory re-verify itself — and print no terminal block of your own. This follows from the `owner:` token read at entry; it is never decided by how the invocation was phrased.
96
+
97
+ On a **direct** invocation, present the gate with the host's question mechanism using these three options — but only when your verify capability is `interactive` (Step 7):
98
+ - **Re-verify {feature} now** *(recommended)* — dispatch the clean-room `forge-verifier` subagent from this session in require-clean mode to confirm every finding is resolved. The dispatch is **scoped** per "Re-verify scope and convergence" in `references/stage-exit-protocol.md`: it confirms the prior report's findings against their acceptance evidence and examines this fix's delta — never a fresh full-checklist sweep — a finding with a recorded decision is never re-filed, and only an unresolved prior finding or a new blocking defect the fix introduced may block. The digest returns here so any remaining issue keeps its context. One-time — it does **not** change config. A clean-or-advisory-only result closes as `reverified`; unresolved prior findings or new blocking defects close as `reverify-findings` for the same served stage. **Escalation:** if that would be the second consecutive `reverify-findings` for this served stage (count the round-discriminated reports in `.verification/`), follow "Escalation (the round ledger)" in `references/stage-exit-protocol.md` before closing — present the digest and offer explicit acceptance of the residual findings; do not recommend another fix pass.
99
+ - **Re-verify now + enable auto-verify going forward** — re-verify now **and** patch `"autoVerify": true` into `forge.config.json` in place (preserve formatting and every other key) so future stages verify automatically, no prompt. This complements the `forge-init` opt-in. **Do not auto-commit this config change** — treat it like `notes`: a user-facing edit the user commits on their own cadence, never folded into a stage's artifact commit. Its outcome mapping is identical to the option above.
100
+ - **Skip for now** — an explicit deferral of the re-verify. It closes as **`deferred`**, never `reverified`: the fixes are recorded but nothing has confirmed them, and the served stage's verification stays outstanding until a re-verify passes, so the pipeline does not advance on this pass. Run `/feature-forge:forge {feature}` when you want pipeline status.
101
+
102
+ **Manual capability is not a skip, and not a deferral.** When your capability is `manual` (Step 7 — no question mechanism **and** no permitted dispatch), do not run clean-room and do not fabricate a choice nobody made: close with `applied`, and the script prints `/feature-forge:forge-verify {feature} --served-stage {servedStage}` as the primary action for the user to run. Offer the auto-verify enable as plain text only if a config write is possible.
103
+
104
+ **A re-verify that cannot run is an operational failure.** If the user chose to re-verify and the dispatch is refused, returns the `CLEAN_ROOM_UNAVAILABLE` sentinel, or returns no answer, the fixes remain recorded but nothing was confirmed: close with `failed`. Never report `reverified` on an unrun verify, and never treat an unavailable tool as an explicit user skip.
105
+
106
+ ## Step 7: Close the Stage
107
+
108
+ **Ownership.** Pass the `owner: nested` / `owner: direct` value read at entry (absent the token: `direct`) straight through as `--owner`. As a **direct** owner you print the script's NEXT-STEPS block verbatim as your absolute final output, with nothing after its sentinel line. As a **nested** owner the payload carries `terminalOwnedBy: "outer"` and `nextSteps: null`: return your structured result to the caller and print no terminal block at all.
109
+
110
+ **Served stage.** Pass the stage established in Step 1 as `--served-stage`, so every branch command carries the diversion's thread forward. Never re-derive it here.
111
+
112
+ **Capability.** Determine `--verify-capability` before running the exit (full rule: `references/stage-exit-protocol.md`; summary: **Verify Capability** in `references/shared-conventions.md`). Pass `interactive` only when a question mechanism equivalent to the host's question mechanism is available **and** a clean-room `forge-verifier` may actually be dispatched right now; otherwise pass `manual`. Dispatch capability means **permitted** dispatch, not a listed tool — the test is "may I dispatch `forge-verifier` right now", not "is a dispatch tool in my tool surface". A session that bars *unsolicited* dispatch while offering a question mechanism is therefore **`interactive`, not `manual`**: the gate's affirmative choice is the user request that authorizes the dispatch. An auto-verify or re-verify directive under a no-unsolicited-dispatch bar is presented through the Step 6 gate and dispatched on the affirmative choice — never skipped, and never resolved by closing with an outcome that advances the pipeline.
113
+
114
+ **Outcome.** Invoke the exit **exactly once**, with the `--outcome` this run maps to. Every path lands on exactly one row; none may be left open:
115
+
116
+ | This run's result | `--outcome` | Authoritative action |
117
+ |---|---|---|
118
+ | No applicable findings document or steps (Step 1.5) | `no-findings` | Re-verify while verification is still owed; otherwise the live production successor |
119
+ | User decisions remain unresolved (Step 3) | `decisions` | Resume `forge-fix` naming the unresolved decisions; no advancement |
120
+ | A fix step, a validation, a commit, or a state write failed (Steps 4–6) | `failed` | Fix/navigator recovery; no advancement |
121
+ | Fixes persisted and re-verify has not been run (nested, or manual capability) | `applied` | Re-run `forge-verify` for the same served stage — re-verification is mandatory |
122
+ | A mandatory re-verify passed | `reverified` | The live production successor |
123
+ | A mandatory re-verify reported an unresolved prior finding or a new blocking defect (a clean-or-advisory-only result is `reverified`) | `reverify-findings` | `forge-fix` for the same served stage |
124
+ | The user explicitly deferred the fix pass or the re-verify (Steps 3, 6) | `deferred` | Deterministic `forge-fix`/navigator resume stating the findings remain unresolved; no advancement |
125
+
126
+ A cancellation, an unavailable tool, or a non-answer is `deferred` **only** when it was an explicit user choice and `failed` when it was an operational failure — an unavailable tool is never an explicit user skip, and neither ever becomes `reverified`. `applied` is not `reverified`: `findings-applied` cleared the freshness the writer deliberately dropped, so only `reverified` after a passing verify permits advancement.
127
+
128
+ **Round-ledger escalation binds this row on every capability.** Before closing `reverify-findings` that is the SECOND consecutive for this served stage (count the round-discriminated reports in `.verification/`), present the escalation dispositions per "Escalation (the round ledger)" in `references/stage-exit-protocol.md` — through the question mechanism when `interactive`, or printed as text (digest + the three dispositions, "Accept the residual findings" first) BEFORE the terminal block when `manual`. Never recommend another fix pass at this point.
129
+
130
+ Add `--epic "{epic}"` when the feature is an epic member. Pass no other flags.
80
131
 
81
- **Skip this gate when an `autoFix` caller invoked you as part of a chain** — the authoring stage's in-stage auto-verify (`references/stage-exit-protocol.md`, in-stage verify block) or the navigator's catch-up (`skills/forge/SKILL.md` §3b step 2b): there the caller owns the mandatory re-verify, so a second gate here would block the unattended flow or double the re-verify. Just return and let the caller proceed.
132
+ **Close this stage with the Scripted Stage Exit** (contract: `references/stage-exit-protocol.md`; do not improvise a "Next steps" list). Run:
82
133
 
83
- On a direct invocation, present the gate using the host's question mechanism with these three options — but only when the host has a question mechanism **and** the clean-room path is available (the host's subagent mechanism plus a dispatchable `forge-verifier` subagent):
84
- - **Re-verify {feature} now** *(recommended)* — dispatch the clean-room `forge-verifier` subagent from this session in require-clean mode to confirm every finding is resolved; the digest returns here so any remaining issue keeps its context. One-time — it does **not** change config.
85
- - **Re-verify now + enable auto-verify going forward** — re-verify now **and** patch `"autoVerify": true` into `forge.config.json` in place (preserve formatting and every other key) so future stages verify automatically, no prompt. This complements the `forge-init` opt-in. **Do not auto-commit this config change** — treat it like `notes`: a user-facing edit the user commits on their own cadence, never folded into a stage's artifact commit.
86
- - **Skip for now** — proceed without re-verifying; the fixes are already recorded, so the stage stays `findings-applied` (fresh in the ledger). Run `/feature-forge:forge {feature}` when you want pipeline status.
134
+ ```bash
135
+ R="$(bash -c 'for d in "${FEATURE_FORGE_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')"
136
+ [ -n "$R" ] || { echo "feature-forge: cannot locate plugin root" >&2; exit 1; }
137
+ python3 "$R/scripts/forge-session.py" stage-exit --feature "{feature}" --stage forge-fix --owner "{owner}" --outcome "{FixOutcome}" --served-stage "{servedStage}" --specs-dir "{specsDir}" --host generic --verify-capability "{verify-capability}"
138
+ ```
87
139
 
88
- **Host / clean-room fallback (not a user-selectable option):** if the question mechanism, the host's subagent mechanism, or the `forge-verifier` subagent is unavailable, do **not** run clean-room — degrade to printing `/feature-forge:forge-verify {feature}` for the user to run inline/manually (mirroring `autoInvokeNextStage`), and offer the auto-verify enable as plain text only if a config write is possible.
140
+ Obey the DIRECTIVES it prints, in the consumption order this protocol fixes: surface `invalidAutoVerifyKeys` and every `warnings` entry first; `runInStageVerify: true` → run the in-stage clean-room verify chain now (honoring `autoFixEligible`, and asking through the Standard Verify Gate first when you may not dispatch unsolicited); `verifyGate: "standard"` → present the Standard Verify Gate; `verifyGate: "manual-print"` → print the `verifyCommand` for the user and do **not** dispatch inline. Then, and only when `terminalOwnedBy` is `"self"`, **print the NEXT-STEPS block verbatim as your absolute last output — nothing after its sentinel line.** A `terminalOwnedBy: "outer"` payload carries `nextSteps: null`: return your structured result to the caller and print no terminal block at all.
89
141
 
90
142
  ---
91
143
 
@@ -191,6 +191,44 @@ Pipeline state is written by the `state-*` verbs of `scripts/forge-session.py`
191
191
 
192
192
  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
193
 
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.
195
+
196
+ ### `state-verify` — verification results and provenance
197
+
198
+ `state-verify` writes exactly one `stages.forge-verify-{token}` entry — the verification result for the production stage named by `--stage` — plus the top-level `updatedAt`, and nothing else. `--stage` takes the **served production stage** (`forge-0-epic` through `forge-5-loop`; `forge-6-docs` has no verification token and is rejected). Add `--epic "{epic}"` when the feature is an epic member — required, per the member rule above. Result mode passes `--status` (`auto-verify-pending`, `passed`, `findings-reported`, `findings-applied`, or `skipped`) with whatever `--findings-file`, `--findings-count`, and `--verified-stage-version` that status requires; contradictory metadata is refused before any write. `passed` may additionally carry `--findings-file` + `--findings-count` together for an **advisory-only** report (`inconsistency`/`improvement` findings only, per forge-verify's severity floor) — the stage resolves without a fix round and the report stays attached:
199
+
200
+ **`auto-verify-pending` is not a skill-facing status.** It is written by `stage-exit`'s scheduling boundary, which records the debt automatically when auto-verify is effective for a stage. The value is accepted on this CLI so the entry stays inspectable and repairable, not so a skill can hand-schedule verification: no skill body and no reference passes it, and none should. Every other status in the list is the recorded *result* of a verification that ran (or was explicitly skipped); this one records that one was *owed*.
201
+
202
+ ```bash
203
+ 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')"
204
+ [ -n "$R" ] || { echo "feature-forge: cannot locate plugin root" >&2; exit 1; }
205
+ python3 "$R/scripts/forge-session.py" state-verify \
206
+ --feature "{feature}" --stage "{served-production-stage}" --status "<status>" \
207
+ --specs-dir "{specsDir}"
208
+ ```
209
+
210
+ Provenance follows the same two-commit sequence as `state-complete`: the result transition above writes `commitHash: null`, Commit 1 records the findings document and the state, and a second `state-verify` call records the full 40-hex hash of Commit 1 and touches nothing else (never `--amend`; an abbreviated hash is refused rather than expanded). Add `--epic "{epic}"` for an epic member — required, per the member rule above:
211
+
212
+ ```bash
213
+ 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')"
214
+ [ -n "$R" ] || { echo "feature-forge: cannot locate plugin root" >&2; exit 1; }
215
+ python3 "$R/scripts/forge-session.py" state-verify \
216
+ --feature "{feature}" --stage "{served-production-stage}" \
217
+ --commit-hash "$(git rev-parse HEAD)" --specs-dir "{specsDir}"
218
+ ```
219
+
220
+ Epic-scoped verification is the single exception to the member rule: with `--stage forge-0-epic`, `--feature` names the **epic** and `--epic` must be absent or exactly equal to it. That call writes `{specsDir}/{epic}/.epic-state.json` and never a member's `.pipeline-state.json`, and its freshness version is the epic manifest's `revision`, never a member's stage version:
221
+
222
+ ```bash
223
+ 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')"
224
+ [ -n "$R" ] || { echo "feature-forge: cannot locate plugin root" >&2; exit 1; }
225
+ python3 "$R/scripts/forge-session.py" state-verify \
226
+ --feature "{epic}" --stage forge-0-epic --status "<status>" \
227
+ --specs-dir "{specsDir}"
228
+ ```
229
+
230
+ On exit 2 the verification result is **not** recorded: surface the `Error:` line verbatim, name the feature (and epic), and do not claim the verification was persisted or advance past it.
231
+
194
232
  ### Staleness Detection (Read-Time)
195
233
 
196
234
  When loading upstream artifacts as prerequisites, check `basedOnVersions` in the pipeline state for this stage. If any upstream stage's current version is newer than the version recorded in `basedOnVersions`, warn the user before proceeding:
@@ -199,6 +237,31 @@ When loading upstream artifacts as prerequisites, check `basedOnVersions` in the
199
237
 
200
238
  Frame the choice with its cost: re-running re-derives this stage from the current upstream (safest, but discards any hand-edits to this stage's artifacts); proceeding stale is faster but risks baking outdated assumptions into everything downstream. Recommend re-running unless the user knows the upstream change doesn't affect this stage.
201
239
 
240
+ ## Immediate Downstream Note (Parking Lot)
241
+
242
+ When an interview raises a concern that belongs to a *later stage of this same feature*, acknowledge it and persist it **immediately, at the moment it is raised** — not at stage closure — by running `state-note` with a concise one-line statement of the concern. Add `--epic "{epic}"` when this feature is an epic member — required, per the Pipeline State Protocol above; omitting it for a member is an error and must never be allowed to fall back to a same-named flat feature.
243
+
244
+ ```bash
245
+ 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')"
246
+ [ -n "$R" ] || { echo "feature-forge: cannot locate plugin root" >&2; exit 1; }
247
+ python3 "$R/scripts/forge-session.py" state-note \
248
+ --feature "{feature}" --note "<concise downstream concern>" \
249
+ --specs-dir "{specsDir}"
250
+ ```
251
+
252
+ `state-note` **overwrites** the single top-level `notes` string — it does not append. To preserve an earlier note, read the current `notes` value out of the feature's `.pipeline-state.json` first and pass one combined concise string in a single `--note`; never edit or round-trip the JSON by hand. This interview-time call is separate from the optional completion note offered at stage closure and must not be deferred until then — a session that ends before closure would otherwise lose the concern entirely.
253
+
254
+ On `UsageError`/exit 2, surface the `Error:` line verbatim together with the named feature (and epic) and the recovery instruction, and **stop claiming the concern was recorded** — it was not. Epic *decomposition* changes are not notes: they go through `state-ecr` into `epicChangeRequests`, never into `notes`.
255
+
256
+ ## Verify Capability
257
+
258
+ Skills that close a stage pass `--verify-capability interactive|manual` to `stage-exit`. The full determination rule, the Standard Verify Gate, and the recovery path live in `references/stage-exit-protocol.md`; the two facts that are most often gotten wrong:
259
+
260
+ - **Dispatch capability is *permitted* dispatch, not a listed tool.** The question is "**may I dispatch `forge-verifier` right now**", not "is a subagent-dispatch tool in my tool surface". A session can carry a standing host instruction against dispatching subagents unless the user asked; such instructions are injected by the harness, sit outside this project's control, and outrank skill prose. Classify on permission, up front.
261
+ - **A consent requirement is `interactive`, not `manual`.** When dispatch is barred only *unless the user asked* and a question mechanism is available, pass `interactive`: the gate's own affirmative choice supplies the missing user request. Pass `manual` only when there is **no** question mechanism **and** **no** permitted dispatch.
262
+
263
+ A bar on unsolicited dispatch is never grounds to skip verification, and never grounds to fence the production successor while verification is unresolved. On the `runInStageVerify: true` path the emitted `verifyGate` stays `none`: reuse the Standard Verify Gate block for consent with **choice 2 omitted** (auto-verify is already effective, so "enable auto-verify going forward" is a no-op), leaving exactly two choices: *Verify now* (recommended) and *Skip for now*. The clean-room `forge-verifier` is **dispatched on the affirmative choice**, never merely printed for the user to run later; *Skip for now* is persisted as an explicit `skipped` before any advancing block.
264
+
202
265
  ## Branch Setup
203
266
 
204
267
  Invoke this block at the **very start** of a pipeline entry point — `forge-1-prd` (standalone feature) and `forge-0-epic` (epic) — **before** any directory resolution or interview, so the rest of the run lands on the intended branch. `{label}` is the feature name (forge-1-prd) or epic name (forge-0-epic); `{scope}` is `feature` or `epic` correspondingly.