@garygentry/feature-forge 0.3.5 → 0.3.6

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 (164) hide show
  1. package/README.md +1 -1
  2. package/adapters/claude/.feature-forge-bundle.json +1 -1
  3. package/adapters/claude/references/forge-config-schema.json +4 -4
  4. package/adapters/claude/references/ralph-loop-contract.md +12 -8
  5. package/adapters/claude/references/shared-conventions.md +1 -1
  6. package/adapters/claude/scripts/forge-session.py +30 -26
  7. package/adapters/claude/skills/forge/references/shared-conventions.md +1 -1
  8. package/adapters/claude/skills/forge-0-epic/references/shared-conventions.md +1 -1
  9. package/adapters/claude/skills/forge-1-prd/references/shared-conventions.md +1 -1
  10. package/adapters/claude/skills/forge-2-tech/references/shared-conventions.md +1 -1
  11. package/adapters/claude/skills/forge-3-specs/references/shared-conventions.md +1 -1
  12. package/adapters/claude/skills/forge-4-backlog/references/shared-conventions.md +1 -1
  13. package/adapters/claude/skills/forge-5-loop/SKILL.md +3 -3
  14. package/adapters/claude/skills/forge-5-loop/references/ralph-loop-contract.md +12 -8
  15. package/adapters/claude/skills/forge-5-loop/references/runner-contract.md +2 -2
  16. package/adapters/claude/skills/forge-5-loop/references/shared-conventions.md +1 -1
  17. package/adapters/claude/skills/forge-6-docs/references/shared-conventions.md +1 -1
  18. package/adapters/claude/skills/forge-fix/references/shared-conventions.md +1 -1
  19. package/adapters/claude/skills/forge-guide/references/forge-config-schema.json +4 -4
  20. package/adapters/claude/skills/forge-guide/references/ralph-loop-contract.md +12 -8
  21. package/adapters/claude/skills/forge-guide/references/shared-conventions.md +1 -1
  22. package/adapters/claude/skills/forge-verify/SKILL.md +5 -3
  23. package/adapters/claude/skills/forge-verify/references/findings-template.md +6 -6
  24. package/adapters/claude/skills/forge-verify/references/shared-conventions.md +1 -1
  25. package/adapters/codex/.feature-forge-bundle.json +1 -1
  26. package/adapters/codex/references/forge-config-schema.json +4 -4
  27. package/adapters/codex/references/ralph-loop-contract.md +12 -8
  28. package/adapters/codex/references/shared-conventions.md +1 -1
  29. package/adapters/codex/scripts/forge-session.py +30 -26
  30. package/adapters/codex/skills/forge/references/shared-conventions.md +1 -1
  31. package/adapters/codex/skills/forge-0-epic/references/shared-conventions.md +1 -1
  32. package/adapters/codex/skills/forge-1-prd/references/shared-conventions.md +1 -1
  33. package/adapters/codex/skills/forge-2-tech/references/shared-conventions.md +1 -1
  34. package/adapters/codex/skills/forge-3-specs/references/shared-conventions.md +1 -1
  35. package/adapters/codex/skills/forge-4-backlog/references/shared-conventions.md +1 -1
  36. package/adapters/codex/skills/forge-5-loop/SKILL.md +3 -3
  37. package/adapters/codex/skills/forge-5-loop/references/ralph-loop-contract.md +12 -8
  38. package/adapters/codex/skills/forge-5-loop/references/runner-contract.md +2 -2
  39. package/adapters/codex/skills/forge-5-loop/references/shared-conventions.md +1 -1
  40. package/adapters/codex/skills/forge-6-docs/references/shared-conventions.md +1 -1
  41. package/adapters/codex/skills/forge-fix/references/shared-conventions.md +1 -1
  42. package/adapters/codex/skills/forge-guide/references/forge-config-schema.json +4 -4
  43. package/adapters/codex/skills/forge-guide/references/ralph-loop-contract.md +12 -8
  44. package/adapters/codex/skills/forge-guide/references/shared-conventions.md +1 -1
  45. package/adapters/codex/skills/forge-verify/SKILL.md +5 -3
  46. package/adapters/codex/skills/forge-verify/references/findings-template.md +6 -6
  47. package/adapters/codex/skills/forge-verify/references/shared-conventions.md +1 -1
  48. package/adapters/copilot/.feature-forge-bundle.json +1 -1
  49. package/adapters/copilot/references/forge-config-schema.json +4 -4
  50. package/adapters/copilot/references/ralph-loop-contract.md +12 -8
  51. package/adapters/copilot/references/shared-conventions.md +1 -1
  52. package/adapters/copilot/scripts/forge-session.py +30 -26
  53. package/adapters/copilot/skills/forge/references/shared-conventions.md +1 -1
  54. package/adapters/copilot/skills/forge-0-epic/references/shared-conventions.md +1 -1
  55. package/adapters/copilot/skills/forge-1-prd/references/shared-conventions.md +1 -1
  56. package/adapters/copilot/skills/forge-2-tech/references/shared-conventions.md +1 -1
  57. package/adapters/copilot/skills/forge-3-specs/references/shared-conventions.md +1 -1
  58. package/adapters/copilot/skills/forge-4-backlog/references/shared-conventions.md +1 -1
  59. package/adapters/copilot/skills/forge-5-loop/forge-5-loop.md +3 -3
  60. package/adapters/copilot/skills/forge-5-loop/references/ralph-loop-contract.md +12 -8
  61. package/adapters/copilot/skills/forge-5-loop/references/runner-contract.md +2 -2
  62. package/adapters/copilot/skills/forge-5-loop/references/shared-conventions.md +1 -1
  63. package/adapters/copilot/skills/forge-6-docs/references/shared-conventions.md +1 -1
  64. package/adapters/copilot/skills/forge-fix/references/shared-conventions.md +1 -1
  65. package/adapters/copilot/skills/forge-guide/references/forge-config-schema.json +4 -4
  66. package/adapters/copilot/skills/forge-guide/references/ralph-loop-contract.md +12 -8
  67. package/adapters/copilot/skills/forge-guide/references/shared-conventions.md +1 -1
  68. package/adapters/copilot/skills/forge-verify/forge-verify.md +5 -3
  69. package/adapters/copilot/skills/forge-verify/references/findings-template.md +6 -6
  70. package/adapters/copilot/skills/forge-verify/references/shared-conventions.md +1 -1
  71. package/adapters/cursor/.feature-forge-bundle.json +1 -1
  72. package/adapters/cursor/references/forge-config-schema.json +4 -4
  73. package/adapters/cursor/references/ralph-loop-contract.md +12 -8
  74. package/adapters/cursor/references/shared-conventions.md +1 -1
  75. package/adapters/cursor/scripts/forge-session.py +30 -26
  76. package/adapters/cursor/skills/forge/references/shared-conventions.md +1 -1
  77. package/adapters/cursor/skills/forge-0-epic/references/shared-conventions.md +1 -1
  78. package/adapters/cursor/skills/forge-1-prd/references/shared-conventions.md +1 -1
  79. package/adapters/cursor/skills/forge-2-tech/references/shared-conventions.md +1 -1
  80. package/adapters/cursor/skills/forge-3-specs/references/shared-conventions.md +1 -1
  81. package/adapters/cursor/skills/forge-4-backlog/references/shared-conventions.md +1 -1
  82. package/adapters/cursor/skills/forge-5-loop/forge-5-loop.mdc +3 -3
  83. package/adapters/cursor/skills/forge-5-loop/references/ralph-loop-contract.md +12 -8
  84. package/adapters/cursor/skills/forge-5-loop/references/runner-contract.md +2 -2
  85. package/adapters/cursor/skills/forge-5-loop/references/shared-conventions.md +1 -1
  86. package/adapters/cursor/skills/forge-6-docs/references/shared-conventions.md +1 -1
  87. package/adapters/cursor/skills/forge-fix/references/shared-conventions.md +1 -1
  88. package/adapters/cursor/skills/forge-guide/references/forge-config-schema.json +4 -4
  89. package/adapters/cursor/skills/forge-guide/references/ralph-loop-contract.md +12 -8
  90. package/adapters/cursor/skills/forge-guide/references/shared-conventions.md +1 -1
  91. package/adapters/cursor/skills/forge-verify/forge-verify.mdc +5 -3
  92. package/adapters/cursor/skills/forge-verify/references/findings-template.md +6 -6
  93. package/adapters/cursor/skills/forge-verify/references/shared-conventions.md +1 -1
  94. package/adapters/gemini/.feature-forge-bundle.json +1 -1
  95. package/adapters/gemini/gemini-extension.json +1 -1
  96. package/adapters/gemini/references/forge-config-schema.json +4 -4
  97. package/adapters/gemini/references/ralph-loop-contract.md +12 -8
  98. package/adapters/gemini/references/shared-conventions.md +1 -1
  99. package/adapters/gemini/scripts/forge-session.py +30 -26
  100. package/adapters/gemini/skills/forge/references/shared-conventions.md +1 -1
  101. package/adapters/gemini/skills/forge-0-epic/references/shared-conventions.md +1 -1
  102. package/adapters/gemini/skills/forge-1-prd/references/shared-conventions.md +1 -1
  103. package/adapters/gemini/skills/forge-2-tech/references/shared-conventions.md +1 -1
  104. package/adapters/gemini/skills/forge-3-specs/references/shared-conventions.md +1 -1
  105. package/adapters/gemini/skills/forge-4-backlog/references/shared-conventions.md +1 -1
  106. package/adapters/gemini/skills/forge-5-loop/forge-5-loop.md +3 -3
  107. package/adapters/gemini/skills/forge-5-loop/references/ralph-loop-contract.md +12 -8
  108. package/adapters/gemini/skills/forge-5-loop/references/runner-contract.md +2 -2
  109. package/adapters/gemini/skills/forge-5-loop/references/shared-conventions.md +1 -1
  110. package/adapters/gemini/skills/forge-6-docs/references/shared-conventions.md +1 -1
  111. package/adapters/gemini/skills/forge-fix/references/shared-conventions.md +1 -1
  112. package/adapters/gemini/skills/forge-guide/references/forge-config-schema.json +4 -4
  113. package/adapters/gemini/skills/forge-guide/references/ralph-loop-contract.md +12 -8
  114. package/adapters/gemini/skills/forge-guide/references/shared-conventions.md +1 -1
  115. package/adapters/gemini/skills/forge-verify/forge-verify.md +5 -3
  116. package/adapters/gemini/skills/forge-verify/references/findings-template.md +6 -6
  117. package/adapters/gemini/skills/forge-verify/references/shared-conventions.md +1 -1
  118. package/adapters/pi/.feature-forge-bundle.json +1 -1
  119. package/adapters/pi/extensions/forge-loop-supervisor/events.ts +90 -0
  120. package/adapters/pi/extensions/forge-loop-supervisor/index.ts +114 -0
  121. package/adapters/pi/extensions/forge-loop-supervisor/registry.ts +137 -0
  122. package/adapters/pi/extensions/forge-loop-supervisor/supervisor.ts +185 -0
  123. package/adapters/pi/extensions/forge-loop-supervisor/tailer.ts +137 -0
  124. package/adapters/pi/extensions/forge-loop-supervisor/types.ts +87 -0
  125. package/adapters/pi/extensions/forge-loop-supervisor/wiring.ts +423 -0
  126. package/adapters/pi/package.json +2 -1
  127. package/adapters/pi/references/forge-config-schema.json +4 -4
  128. package/adapters/pi/references/ralph-loop-contract.md +12 -8
  129. package/adapters/pi/references/shared-conventions.md +1 -1
  130. package/adapters/pi/scripts/forge-session.py +30 -26
  131. package/adapters/pi/skills/forge/SKILL.md +4 -1
  132. package/adapters/pi/skills/forge/references/shared-conventions.md +1 -1
  133. package/adapters/pi/skills/forge-0-epic/SKILL.md +4 -1
  134. package/adapters/pi/skills/forge-0-epic/references/shared-conventions.md +1 -1
  135. package/adapters/pi/skills/forge-1-prd/SKILL.md +4 -1
  136. package/adapters/pi/skills/forge-1-prd/references/shared-conventions.md +1 -1
  137. package/adapters/pi/skills/forge-2-tech/SKILL.md +4 -1
  138. package/adapters/pi/skills/forge-2-tech/references/shared-conventions.md +1 -1
  139. package/adapters/pi/skills/forge-3-specs/SKILL.md +4 -1
  140. package/adapters/pi/skills/forge-3-specs/references/shared-conventions.md +1 -1
  141. package/adapters/pi/skills/forge-4-backlog/SKILL.md +4 -1
  142. package/adapters/pi/skills/forge-4-backlog/references/shared-conventions.md +1 -1
  143. package/adapters/pi/skills/forge-5-loop/SKILL.md +14 -8
  144. package/adapters/pi/skills/forge-5-loop/references/ralph-loop-contract.md +12 -8
  145. package/adapters/pi/skills/forge-5-loop/references/runner-contract.md +8 -5
  146. package/adapters/pi/skills/forge-5-loop/references/shared-conventions.md +1 -1
  147. package/adapters/pi/skills/forge-6-docs/SKILL.md +4 -1
  148. package/adapters/pi/skills/forge-6-docs/references/shared-conventions.md +1 -1
  149. package/adapters/pi/skills/forge-bootstrap/SKILL.md +4 -1
  150. package/adapters/pi/skills/forge-fix/SKILL.md +4 -1
  151. package/adapters/pi/skills/forge-fix/references/shared-conventions.md +1 -1
  152. package/adapters/pi/skills/forge-guide/SKILL.md +4 -1
  153. package/adapters/pi/skills/forge-guide/references/forge-config-schema.json +4 -4
  154. package/adapters/pi/skills/forge-guide/references/ralph-loop-contract.md +12 -8
  155. package/adapters/pi/skills/forge-guide/references/shared-conventions.md +1 -1
  156. package/adapters/pi/skills/forge-init/SKILL.md +4 -1
  157. package/adapters/pi/skills/forge-verify/SKILL.md +9 -4
  158. package/adapters/pi/skills/forge-verify/references/findings-template.md +6 -6
  159. package/adapters/pi/skills/forge-verify/references/shared-conventions.md +1 -1
  160. package/dist/manifest.d.ts +1 -1
  161. package/dist/rauf.d.ts +3 -3
  162. package/dist/rauf.js +2 -2
  163. package/dist/types.d.ts +1 -1
  164. package/package.json +8 -2
@@ -310,4 +310,7 @@ This Pi bundle preserves Claude's `AskUserQuestion` references because it ships
310
310
  - **User input:** use `AskUserQuestion` for genuine user decisions. It supports multiple questions, option descriptions, recommended ordering, multi-select, previews, and free-form Other/custom answers.
311
311
  - **Skill dispatch:** Pi uses `/skill:<name>` commands. If you cannot invoke a skill directly, print the exact `/skill:<name> ...` command for the user to run.
312
312
  - **Subagents:** this bundle declares its custom agents (`forge-researcher`, `forge-spec-writer`, `forge-verifier`) as package agents. If a `subagent` tool is registered, dispatch one with `{ agent: "forge-verifier", task: "..." }`, or fan several out concurrently with `{ tasks: [{ agent: "forge-spec-writer", task: "..." }, ...] }`. If no `subagent` tool is available, run that step inline yourself.
313
- - **Background / monitoring:** run long-lived commands in the foreground and report progress as it arrives.
313
+ - **Background / monitoring (forge-5-loop):** Pi has no built-in background bash, persistent monitor, or push-notification, so do **not** run the loop runner in the foreground and do **not** try to arm one. This bundle registers a **forge-loop-supervisor** extension that IS the "background-execution mechanism" and "monitoring mechanism" Steps 3b–3f refer to. Concretely:
314
+ - **Launch (Step 3b):** call **`forge_loop_launch`** with the backlog dir (and `review` / `agent` / `iterations` as resolved from config). It starts the loop **detached** — it runs in rauf's server and outlives this session — and returns immediately; you do not build or redirect a command yourself.
315
+ - **Supervise (Steps 3d–3f):** the extension then watches the runner's `events.ndjson` for you. It reports each completed item as one quiet line and **wakes this session automatically** on needs-human, blocked, stuck, review-failed, error, and completion — so do **not** arm a monitor, set a continuous tail, send a notification, poll, or foreground-sleep, and do not treat any manual stop as the terminal signal. When completion wakes you, go straight to Step 4 and read the authoritative counts with the status/list command. Use **`forge_loop_status`** to check progress on demand.
316
+ - **Stop / session end:** **`forge_loop_stop`** deliberately stops the runner; use it only when the user wants the loop to actually stop. Ending the Pi session does **not** stop the loop (it is detached), and the next session **reattaches automatically** without re-reporting what you already saw.
@@ -206,7 +206,7 @@ If a `state-*` verb exits 2, surface the plain `Error:` line from stderr verbati
206
206
 
207
207
  ### `state-verify` — verification results and provenance
208
208
 
209
- `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:
209
+ `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 carry `--findings-file` + `--findings-count` for a clean report (count `0`), an **advisory-only** report (`inconsistency`/`improvement` findings only), or accepted residual findings. The stage resolves without a fix round and the report stays attached, making a completed verification round directly resumable if provenance recording is interrupted. A bare `passed` remains accepted for backward compatibility:
210
210
 
211
211
  **`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*.
212
212
 
@@ -191,4 +191,7 @@ This Pi bundle preserves Claude's `AskUserQuestion` references because it ships
191
191
  - **User input:** use `AskUserQuestion` for genuine user decisions. It supports multiple questions, option descriptions, recommended ordering, multi-select, previews, and free-form Other/custom answers.
192
192
  - **Skill dispatch:** Pi uses `/skill:<name>` commands. If you cannot invoke a skill directly, print the exact `/skill:<name> ...` command for the user to run.
193
193
  - **Subagents:** this bundle declares its custom agents (`forge-researcher`, `forge-spec-writer`, `forge-verifier`) as package agents. If a `subagent` tool is registered, dispatch one with `{ agent: "forge-verifier", task: "..." }`, or fan several out concurrently with `{ tasks: [{ agent: "forge-spec-writer", task: "..." }, ...] }`. If no `subagent` tool is available, run that step inline yourself.
194
- - **Background / monitoring:** run long-lived commands in the foreground and report progress as it arrives.
194
+ - **Background / monitoring (forge-5-loop):** Pi has no built-in background bash, persistent monitor, or push-notification, so do **not** run the loop runner in the foreground and do **not** try to arm one. This bundle registers a **forge-loop-supervisor** extension that IS the "background-execution mechanism" and "monitoring mechanism" Steps 3b–3f refer to. Concretely:
195
+ - **Launch (Step 3b):** call **`forge_loop_launch`** with the backlog dir (and `review` / `agent` / `iterations` as resolved from config). It starts the loop **detached** — it runs in rauf's server and outlives this session — and returns immediately; you do not build or redirect a command yourself.
196
+ - **Supervise (Steps 3d–3f):** the extension then watches the runner's `events.ndjson` for you. It reports each completed item as one quiet line and **wakes this session automatically** on needs-human, blocked, stuck, review-failed, error, and completion — so do **not** arm a monitor, set a continuous tail, send a notification, poll, or foreground-sleep, and do not treat any manual stop as the terminal signal. When completion wakes you, go straight to Step 4 and read the authoritative counts with the status/list command. Use **`forge_loop_status`** to check progress on demand.
197
+ - **Stop / session end:** **`forge_loop_stop`** deliberately stops the runner; use it only when the user wants the loop to actually stop. Ending the Pi session does **not** stop the loop (it is detached), and the next session **reattaches automatically** without re-reporting what you already saw.
@@ -206,7 +206,7 @@ If a `state-*` verb exits 2, surface the plain `Error:` line from stderr verbati
206
206
 
207
207
  ### `state-verify` — verification results and provenance
208
208
 
209
- `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:
209
+ `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 carry `--findings-file` + `--findings-count` for a clean report (count `0`), an **advisory-only** report (`inconsistency`/`improvement` findings only), or accepted residual findings. The stage resolves without a fix round and the report stays attached, making a completed verification round directly resumable if provenance recording is interrupted. A bare `passed` remains accepted for backward compatibility:
210
210
 
211
211
  **`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*.
212
212
 
@@ -254,4 +254,7 @@ This Pi bundle preserves Claude's `AskUserQuestion` references because it ships
254
254
  - **User input:** use `AskUserQuestion` for genuine user decisions. It supports multiple questions, option descriptions, recommended ordering, multi-select, previews, and free-form Other/custom answers.
255
255
  - **Skill dispatch:** Pi uses `/skill:<name>` commands. If you cannot invoke a skill directly, print the exact `/skill:<name> ...` command for the user to run.
256
256
  - **Subagents:** this bundle declares its custom agents (`forge-researcher`, `forge-spec-writer`, `forge-verifier`) as package agents. If a `subagent` tool is registered, dispatch one with `{ agent: "forge-verifier", task: "..." }`, or fan several out concurrently with `{ tasks: [{ agent: "forge-spec-writer", task: "..." }, ...] }`. If no `subagent` tool is available, run that step inline yourself.
257
- - **Background / monitoring:** run long-lived commands in the foreground and report progress as it arrives.
257
+ - **Background / monitoring (forge-5-loop):** Pi has no built-in background bash, persistent monitor, or push-notification, so do **not** run the loop runner in the foreground and do **not** try to arm one. This bundle registers a **forge-loop-supervisor** extension that IS the "background-execution mechanism" and "monitoring mechanism" Steps 3b–3f refer to. Concretely:
258
+ - **Launch (Step 3b):** call **`forge_loop_launch`** with the backlog dir (and `review` / `agent` / `iterations` as resolved from config). It starts the loop **detached** — it runs in rauf's server and outlives this session — and returns immediately; you do not build or redirect a command yourself.
259
+ - **Supervise (Steps 3d–3f):** the extension then watches the runner's `events.ndjson` for you. It reports each completed item as one quiet line and **wakes this session automatically** on needs-human, blocked, stuck, review-failed, error, and completion — so do **not** arm a monitor, set a continuous tail, send a notification, poll, or foreground-sleep, and do not treat any manual stop as the terminal signal. When completion wakes you, go straight to Step 4 and read the authoritative counts with the status/list command. Use **`forge_loop_status`** to check progress on demand.
260
+ - **Stop / session end:** **`forge_loop_stop`** deliberately stops the runner; use it only when the user wants the loop to actually stop. Ending the Pi session does **not** stop the loop (it is detached), and the next session **reattaches automatically** without re-reporting what you already saw.
@@ -206,7 +206,7 @@ If a `state-*` verb exits 2, surface the plain `Error:` line from stderr verbati
206
206
 
207
207
  ### `state-verify` — verification results and provenance
208
208
 
209
- `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:
209
+ `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 carry `--findings-file` + `--findings-count` for a clean report (count `0`), an **advisory-only** report (`inconsistency`/`improvement` findings only), or accepted residual findings. The stage resolves without a fix round and the report stays attached, making a completed verification round directly resumable if provenance recording is interrupted. A bare `passed` remains accepted for backward compatibility:
210
210
 
211
211
  **`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*.
212
212
 
@@ -198,4 +198,7 @@ This Pi bundle preserves Claude's `AskUserQuestion` references because it ships
198
198
  - **User input:** use `AskUserQuestion` for genuine user decisions. It supports multiple questions, option descriptions, recommended ordering, multi-select, previews, and free-form Other/custom answers.
199
199
  - **Skill dispatch:** Pi uses `/skill:<name>` commands. If you cannot invoke a skill directly, print the exact `/skill:<name> ...` command for the user to run.
200
200
  - **Subagents:** this bundle declares its custom agents (`forge-researcher`, `forge-spec-writer`, `forge-verifier`) as package agents. If a `subagent` tool is registered, dispatch one with `{ agent: "forge-verifier", task: "..." }`, or fan several out concurrently with `{ tasks: [{ agent: "forge-spec-writer", task: "..." }, ...] }`. If no `subagent` tool is available, run that step inline yourself.
201
- - **Background / monitoring:** run long-lived commands in the foreground and report progress as it arrives.
201
+ - **Background / monitoring (forge-5-loop):** Pi has no built-in background bash, persistent monitor, or push-notification, so do **not** run the loop runner in the foreground and do **not** try to arm one. This bundle registers a **forge-loop-supervisor** extension that IS the "background-execution mechanism" and "monitoring mechanism" Steps 3b–3f refer to. Concretely:
202
+ - **Launch (Step 3b):** call **`forge_loop_launch`** with the backlog dir (and `review` / `agent` / `iterations` as resolved from config). It starts the loop **detached** — it runs in rauf's server and outlives this session — and returns immediately; you do not build or redirect a command yourself.
203
+ - **Supervise (Steps 3d–3f):** the extension then watches the runner's `events.ndjson` for you. It reports each completed item as one quiet line and **wakes this session automatically** on needs-human, blocked, stuck, review-failed, error, and completion — so do **not** arm a monitor, set a continuous tail, send a notification, poll, or foreground-sleep, and do not treat any manual stop as the terminal signal. When completion wakes you, go straight to Step 4 and read the authoritative counts with the status/list command. Use **`forge_loop_status`** to check progress on demand.
204
+ - **Stop / session end:** **`forge_loop_stop`** deliberately stops the runner; use it only when the user wants the loop to actually stop. Ending the Pi session does **not** stop the loop (it is detached), and the next session **reattaches automatically** without re-reporting what you already saw.
@@ -206,7 +206,7 @@ If a `state-*` verb exits 2, surface the plain `Error:` line from stderr verbati
206
206
 
207
207
  ### `state-verify` — verification results and provenance
208
208
 
209
- `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:
209
+ `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 carry `--findings-file` + `--findings-count` for a clean report (count `0`), an **advisory-only** report (`inconsistency`/`improvement` findings only), or accepted residual findings. The stage resolves without a fix round and the report stays attached, making a completed verification round directly resumable if provenance recording is interrupted. A bare `passed` remains accepted for backward compatibility:
210
210
 
211
211
  **`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*.
212
212
 
@@ -239,4 +239,7 @@ This Pi bundle preserves Claude's `AskUserQuestion` references because it ships
239
239
  - **User input:** use `AskUserQuestion` for genuine user decisions. It supports multiple questions, option descriptions, recommended ordering, multi-select, previews, and free-form Other/custom answers.
240
240
  - **Skill dispatch:** Pi uses `/skill:<name>` commands. If you cannot invoke a skill directly, print the exact `/skill:<name> ...` command for the user to run.
241
241
  - **Subagents:** this bundle declares its custom agents (`forge-researcher`, `forge-spec-writer`, `forge-verifier`) as package agents. If a `subagent` tool is registered, dispatch one with `{ agent: "forge-verifier", task: "..." }`, or fan several out concurrently with `{ tasks: [{ agent: "forge-spec-writer", task: "..." }, ...] }`. If no `subagent` tool is available, run that step inline yourself.
242
- - **Background / monitoring:** run long-lived commands in the foreground and report progress as it arrives.
242
+ - **Background / monitoring (forge-5-loop):** Pi has no built-in background bash, persistent monitor, or push-notification, so do **not** run the loop runner in the foreground and do **not** try to arm one. This bundle registers a **forge-loop-supervisor** extension that IS the "background-execution mechanism" and "monitoring mechanism" Steps 3b–3f refer to. Concretely:
243
+ - **Launch (Step 3b):** call **`forge_loop_launch`** with the backlog dir (and `review` / `agent` / `iterations` as resolved from config). It starts the loop **detached** — it runs in rauf's server and outlives this session — and returns immediately; you do not build or redirect a command yourself.
244
+ - **Supervise (Steps 3d–3f):** the extension then watches the runner's `events.ndjson` for you. It reports each completed item as one quiet line and **wakes this session automatically** on needs-human, blocked, stuck, review-failed, error, and completion — so do **not** arm a monitor, set a continuous tail, send a notification, poll, or foreground-sleep, and do not treat any manual stop as the terminal signal. When completion wakes you, go straight to Step 4 and read the authoritative counts with the status/list command. Use **`forge_loop_status`** to check progress on demand.
245
+ - **Stop / session end:** **`forge_loop_stop`** deliberately stops the runner; use it only when the user wants the loop to actually stop. Ending the Pi session does **not** stop the loop (it is detached), and the next session **reattaches automatically** without re-reporting what you already saw.
@@ -206,7 +206,7 @@ If a `state-*` verb exits 2, surface the plain `Error:` line from stderr verbati
206
206
 
207
207
  ### `state-verify` — verification results and provenance
208
208
 
209
- `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:
209
+ `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 carry `--findings-file` + `--findings-count` for a clean report (count `0`), an **advisory-only** report (`inconsistency`/`improvement` findings only), or accepted residual findings. The stage resolves without a fix round and the report stays attached, making a completed verification round directly resumable if provenance recording is interrupted. A bare `passed` remains accepted for backward compatibility:
210
210
 
211
211
  **`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*.
212
212
 
@@ -83,8 +83,8 @@ This gate runs **before** the runner version/setup gates (1c/1d) so a blocked fe
83
83
  Enforce `loopRunner.minRunnerVersion` **before** doing anything else with the runner. This is what turns "the runner is missing or too old" into a clear, actionable stop instead of a cryptic mid-run failure.
84
84
 
85
85
  1. Run the **version command** (`loopRunner.versionCommand`, default `rauf version --json`) via Bash.
86
- 2. Parse `{ "version": "<semver>" }` from stdout. Do NOT use plain `rauf version` (its human output is `rauf v0.6.0` with a `v` prefix) — always the `--json` form.
87
- 3. **Semver-compare** (NOT string-compare) the reported version against `loopRunner.minRunnerVersion` (default `0.6.0`), numerically by major, then minor, then patch.
86
+ 2. Parse `{ "version": "<semver>" }` from stdout. Do NOT use plain `rauf version` (its human output is `rauf v0.14.0` with a `v` prefix) — always the `--json` form.
87
+ 3. **Semver-compare** (NOT string-compare) the reported version against `loopRunner.minRunnerVersion` (default `0.14.0`), numerically by major, then minor, then patch.
88
88
 
89
89
  **Any of the following is a HARD GATE FAILURE — do NOT proceed to run the loop.** STOP, show `loopRunner.installHint`, and include the raw command output for diagnosis:
90
90
 
@@ -92,7 +92,7 @@ Enforce `loopRunner.minRunnerVersion` **before** doing anything else with the ru
92
92
  - Its stdout is not valid JSON, has no `version` field, or `version` is not a valid semver string.
93
93
  - The reported version is **< `minRunnerVersion`**.
94
94
 
95
- For the version-too-old case, phrase it concretely, e.g.: "Your rauf is {reported}, but feature-forge needs ≥ {minRunnerVersion} — 0.6.0 is the floor that ships the agent-selection surface (`--agent` / `rauf agents`) the loop relies on. {installHint}". When the gate fails because the output couldn't be parsed, say so and show what the command printed before the `installHint`.
95
+ For the version-too-old case, phrase it concretely, e.g.: "Your rauf is {reported}, but feature-forge needs ≥ {minRunnerVersion} — 0.14.0 is the version the package pins and the floor for full needs-human recovery. {installHint}". When the gate fails because the output couldn't be parsed, say so and show what the command printed before the `installHint`.
96
96
 
97
97
  > `installHint` points at the runner **CLI** install/upgrade — distinct from
98
98
  > `setupHint` (1d), which installs the runner's per-project artifacts.
@@ -198,6 +198,9 @@ Then commit this state write before launching (mandatory). The runner refuses to
198
198
 
199
199
  ### 3b. Launch Background Process
200
200
 
201
+ > **On Pi, do not perform Steps 3b–3f by hand.** Pi has no background or monitor surface; this bundle's `forge-loop-supervisor` extension IS the "background-execution mechanism" and "monitoring mechanism" these steps name. Call **`forge_loop_launch`** with the backlog dir (plus `review` / `agent` / `iterations` from config) — it launches the loop **detached** and supervises `events.ndjson` for you, reporting each completed item and waking this session on needs-human / blocked / stuck / review-failed / error / completion. **Read the rest of Steps 3b–3f, and the launch/monitor detail in `references/runner-contract.md`, as a description of what that tool does — not as commands to run.** Use `forge_loop_status` to check progress and `forge_loop_stop` only to deliberately stop the runner; full detail is in "Host execution notes (Pi)" at the end of this skill.
202
+
203
+
201
204
  Launch the loop **backgrounded** (the host's background-execution mechanism) so it survives session end and does not block the session. For a runner that **persists its own structured event file** (the default — rauf writes `{stateDir}/events.ndjson` natively and rotates it per run), launch the **plain `runCommand`** with **no stdout redirect** and supervise the runner's **native** `events.ndjson` directly; do **not** redirect `--ndjson` into `{stateDir}` (it is redundant and collides with the runner's own writer — see `references/runner-contract.md`). Only a stdout-only runner (no native event file) uses `eventStreamCommand`, redirected to a file **outside** `{stateDir}`. The background task's exit notification is the single authoritative terminal signal (Step 4). For the exact launch commands (incl. the `mkdir -p` state-dir guard and the root→`IS_SANDBOX` sandbox guard) and the self-persisting vs. stdout-only detail, read `references/runner-contract.md`.
202
205
 
203
206
  ### 3c. Inform User
@@ -207,16 +210,16 @@ Follow the **Inform-user output template (Step 3c)** section of `references/runn
207
210
  ### 3d. Arm a Monitor on the event stream, and react to events
208
211
 
209
212
  Arm the **host's monitoring mechanism** on the structured event stream (the NDJSON file, or the
210
- human log as fallback) with **`persistent: true`**, a coverage-complete filter
213
+ human log as fallback) with **a continuous watch**, a coverage-complete filter
211
214
  matching every terminal and exception state (silence is not success), and react to
212
215
  each event as it arrives. The exact Monitor commands, the filter event list, and the
213
216
  full per-event reaction rules (`needs_human` / `loop_error` surfaced immediately with
214
- a `PushNotification`, `item_completed` coalesced into milestones, `llm_stuck_warning`
217
+ an automatic session wake, `item_completed` coalesced into milestones, `llm_stuck_warning`
215
218
  as a hang warning) are in `references/runner-contract.md` — follow them verbatim.
216
219
 
217
220
  ### 3f. Reach completion
218
221
 
219
- Step 4 is reached when the backgrounded process exits (its completion notification is authoritative); the `loop_completed` / `loop_error` / `loop_cancelled` event is the live heads-up that it's imminent. Stop the Monitor (it ends on its own when `tail` sees the process-ended log, or via `TaskStop`) and proceed to Step 4. Do NOT foreground-sleep or poll — the harness drives both the Monitor events and the completion notification.
222
+ Step 4 is reached when the backgrounded process exits (its completion notification is authoritative); the `loop_completed` / `loop_error` / `loop_cancelled` event is the live heads-up that it's imminent. Stop the Monitor (it ends on its own when `tail` sees the process-ended log, or via the supervisor's own teardown) and proceed to Step 4. Do NOT foreground-sleep or poll — the harness drives both the Monitor events and the completion notification.
220
223
 
221
224
  ## Step 4: Check Results
222
225
 
@@ -296,7 +299,7 @@ Add `--epic "{epic}"` when this feature is an epic member — required, per the
296
299
  - `{backlogDir}` is a **directory path**, not a file path. Pass `specs/auth`, not `specs/auth/backlog.json`.
297
300
  - rauf resolves `RAUF.md` with fallback (`{backlogDir}/.rauf/RAUF.md` first, then the project's `.rauf/RAUF.md`). State files (state.json, {loopRunner.logFile}, etc.) land at `{backlogDir}/{loopRunner.stateDir}/`, isolated per backlog dir, so concurrent features don't collide.
298
301
  - If the session disconnects mid-loop, the runner process continues independently — check results later with the status / list commands. A stale lock from a previous run may need `--force` to clear.
299
- - Never run the run command in the foreground (without the host's background-execution mechanism) — it blocks and will hit the Bash tool timeout for any non-trivial backlog. "Don't block the foreground" is NOT "stay silent": supervise via the host's monitoring mechanism (3d) — `persistent: true`, the **structured** surface (`events.ndjson`), never raw `RAUF_*` tokens (they false-match in agent prose). A `needs_human`/`blocked`/`review` signal does **not** pause the loop — the runner sets the item aside and keeps going; surface it live but don't tell the user the loop is waiting. See `references/runner-contract.md` for the full monitoring rules.
302
+ - Never run the run command in the foreground (without the host's background-execution mechanism) — it blocks and will hit the Bash tool timeout for any non-trivial backlog. "Don't block the foreground" is NOT "stay silent": supervise via the host's monitoring mechanism (3d) — a continuous watch, the **structured** surface (`events.ndjson`), never raw `RAUF_*` tokens (they false-match in agent prose). A `needs_human`/`blocked`/`review` signal does **not** pause the loop — the runner sets the item aside and keeps going; surface it live but don't tell the user the loop is waiting. See `references/runner-contract.md` for the full monitoring rules.
300
303
  - The version gate (1c) uses the `--json` form on purpose; never parse `rauf version`'s human output.
301
304
  - **Implementation artifacts must not cite specs.** The loop should **read** specs and `backlog.json` freely — they are the source of truth, and the backlog rightly cites specs for provenance. But artifacts the loop **writes into the target repo** (source code, generated `SKILL.md`/agent files, configs, code comments) must be **self-contained**: no references to feature-forge spec files (no `See specs/{feature}/NN-*.md`, no "source spec" provenance notes) — specs are pre-implementation inputs that may be archived or deleted once the feature ships. This applies only to shipped implementation output, never to the backlog or spec documents, which keep citing specs.
302
305
 
@@ -309,4 +312,7 @@ This Pi bundle preserves Claude's `AskUserQuestion` references because it ships
309
312
  - **User input:** use `AskUserQuestion` for genuine user decisions. It supports multiple questions, option descriptions, recommended ordering, multi-select, previews, and free-form Other/custom answers.
310
313
  - **Skill dispatch:** Pi uses `/skill:<name>` commands. If you cannot invoke a skill directly, print the exact `/skill:<name> ...` command for the user to run.
311
314
  - **Subagents:** this bundle declares its custom agents (`forge-researcher`, `forge-spec-writer`, `forge-verifier`) as package agents. If a `subagent` tool is registered, dispatch one with `{ agent: "forge-verifier", task: "..." }`, or fan several out concurrently with `{ tasks: [{ agent: "forge-spec-writer", task: "..." }, ...] }`. If no `subagent` tool is available, run that step inline yourself.
312
- - **Background / monitoring:** run long-lived commands in the foreground and report progress as it arrives.
315
+ - **Background / monitoring (forge-5-loop):** Pi has no built-in background bash, persistent monitor, or push-notification, so do **not** run the loop runner in the foreground and do **not** try to arm one. This bundle registers a **forge-loop-supervisor** extension that IS the "background-execution mechanism" and "monitoring mechanism" Steps 3b–3f refer to. Concretely:
316
+ - **Launch (Step 3b):** call **`forge_loop_launch`** with the backlog dir (and `review` / `agent` / `iterations` as resolved from config). It starts the loop **detached** — it runs in rauf's server and outlives this session — and returns immediately; you do not build or redirect a command yourself.
317
+ - **Supervise (Steps 3d–3f):** the extension then watches the runner's `events.ndjson` for you. It reports each completed item as one quiet line and **wakes this session automatically** on needs-human, blocked, stuck, review-failed, error, and completion — so do **not** arm a monitor, set a continuous tail, send a notification, poll, or foreground-sleep, and do not treat any manual stop as the terminal signal. When completion wakes you, go straight to Step 4 and read the authoritative counts with the status/list command. Use **`forge_loop_status`** to check progress on demand.
318
+ - **Stop / session end:** **`forge_loop_stop`** deliberately stops the runner; use it only when the user wants the loop to actually stop. Ending the Pi session does **not** stop the loop (it is detached), and the next session **reattaches automatically** without re-reporting what you already saw.
@@ -156,11 +156,13 @@ to today. Degradation is **silent, not an error**, keeping alternate (non-rauf)
156
156
  runners first-class. The gate condition is owned by
157
157
  `02-config-schema-and-gating.md`.
158
158
 
159
- Independently, the **version gate** floors at the runner version that ships the
160
- agent surface. For rauf that is **0.6.0** (`loopRunner.minRunnerVersion`): the
161
- `--agent` flag, the `agents` probe, and the preset agent registry are present in
162
- rauf source at 0.6.0. A successful gate therefore guarantees those surfaces
163
- exist before any run. See `## Version gating` and
159
+ Independently, the **version gate** floors at the runner version the stage
160
+ depends on. For rauf that is **0.14.0** (`loopRunner.minRunnerVersion`): the
161
+ version the package pins and the floor for full needs-human recovery (0.14's
162
+ `backlog answer`). The agent surface — the `--agent` flag, the `agents` probe,
163
+ and the preset agent registry — has been present since rauf 0.6.0 and is
164
+ subsumed by the higher floor, so a successful gate guarantees both the recovery
165
+ and agent surfaces exist before any run. See `## Version gating` and
164
166
  `05-runner-discovery-version-gate.md`.
165
167
 
166
168
  **This document — the `## Agent selection` section, the `## Per-stage agent
@@ -210,9 +212,11 @@ belongs to execution only. If you find yourself adding `--agent` near a
210
212
 
211
213
  feature-forge requires a runner exposing `backlog validate` + backlog
212
214
  `schemaVersion`, and the unified exit-code/status contract it reads. The floor is
213
- now the **agent-surface floor**: the runner version that ships the `--agent`
214
- flag, the `agents` probe, and the preset agent registry. For rauf that is
215
- **0.6.0** (`loopRunner.minRunnerVersion`).
215
+ now the **capability floor** the stage actually depends on: the version the
216
+ package pins and the floor for full needs-human recovery (0.14's `backlog
217
+ answer`). It subsumes the older agent-surface floor (the `--agent` flag, the
218
+ `agents` probe, and the preset agent registry, present since 0.6.0). For rauf
219
+ that is **0.14.0** (`loopRunner.minRunnerVersion`).
216
220
  `forge-5-loop` runs `{bin} version --json`, semver-compares the reported version
217
221
  against `minRunnerVersion`, and on a missing-or-too-old runner stops with
218
222
  `loopRunner.installHint` (the CLI install/upgrade command) — **before** invoking
@@ -1,5 +1,8 @@
1
1
  # forge-5-loop — Loop-Runner Contract (launch, supervision, model precedence)
2
2
 
3
+ > **On Pi, do not perform Steps 3b–3f by hand.** Pi has no background or monitor surface; this bundle's `forge-loop-supervisor` extension IS the "background-execution mechanism" and "monitoring mechanism" these steps name. Call **`forge_loop_launch`** with the backlog dir (plus `review` / `agent` / `iterations` from config) — it launches the loop **detached** and supervises `events.ndjson` for you, reporting each completed item and waking this session on needs-human / blocked / stuck / review-failed / error / completion. **Read the rest of Steps 3b–3f, and the launch/monitor detail in `references/runner-contract.md`, as a description of what that tool does — not as commands to run.** Use `forge_loop_status` to check progress and `forge_loop_stop` only to deliberately stop the runner; full detail is in "Host execution notes (Pi)" at the end of this skill.
4
+
5
+
3
6
  This file holds the detailed loop-runner contract relocated out of
4
7
  `forge-5-loop/SKILL.md`: the event-stream vs. log-fallback **launch** detail
5
8
  (Steps 3b/3d/3e), the structured-surface **monitoring** caveats, and the **model
@@ -70,8 +73,8 @@ Notes:
70
73
  separate open-ended option for that.
71
74
  - **Option 3 is conditional.** Include it only when the Step 2a tally has `blocked
72
75
  > 0`; otherwise present options 1 and 2 only.
73
- - **Version floor.** rauf's explicit `review` signal ships in 0.5.0, below the
74
- `minRunnerVersion` floor (0.6.0) enforced at gate 1c — so `--review` is always
76
+ - **Version floor.** rauf's explicit `review` signal ships in 0.5.0, well below the
77
+ `minRunnerVersion` floor (0.14.0) enforced at gate 1c — so `--review` is always
75
78
  available once the loop is cleared to launch. No extra version check is needed.
76
79
  - **Non-rauf runners.** When `loopRunner.name != "rauf"`, add **no** Run-mode
77
80
  question — present the bare rendered command and let the user adjust via "Other",
@@ -143,7 +146,7 @@ backlog size).
143
146
  ## Arm a Monitor on the event stream (Step 3d)
144
147
 
145
148
  Arm the **host's monitoring mechanism** on the structured event stream so events flow back into
146
- this session as they happen. Use **`persistent: true`** — runs can exceed the host's monitoring mechanism's
149
+ this session as they happen. Use **a continuous watch** — runs can exceed the host's monitoring mechanism's
147
150
  maximum `timeout_ms` (1 hour), and a bounded timeout would silently stop watching a
148
151
  still-running loop.
149
152
 
@@ -189,7 +192,7 @@ high and the noise low:
189
192
  rather than echoing every line. For an exact breakdown, run the one-shot
190
193
  `{rendered statusJsonCommand}` and report `done/total` from `backlogSummary`.
191
194
  - **`needs_human`** (or `signal_parsed` with `signal: "needs_human"`) → **surface
192
- immediately** and send a **`PushNotification`** (an hours-long run means the user has
195
+ immediately** and send a **an automatic session wake** (an hours-long run means the user has
193
196
  likely stepped away). **Important — the loop is NOT paused:** the runner has set that
194
197
  item aside and kept working other items. So report *what* needs a human and *which*
195
198
  item, then either (a) collect the user's answer via `AskUserQuestion` and **record it via
@@ -204,7 +207,7 @@ high and the noise low:
204
207
  No action is needed now: Step 4c's recovery pass offers the unblock after the run
205
208
  ends — a blocked-only run (no `needs_human` event) still enters it.
206
209
  - **`loop_error`** → a real failure (this is also what a circuit-breaker halt — too many
207
- consecutive infra failures — emits). Surface now and `PushNotification`. Offer
210
+ consecutive infra failures — emits). Surface now and an automatic session wake. Offer
208
211
  inspection / `--force` / re-run as appropriate.
209
212
  - **Stall detection** → rauf emits an **`llm_stuck_warning`** event when an iteration
210
213
  stops making progress; the filter above includes it, so surface it live (a hang
@@ -206,7 +206,7 @@ If a `state-*` verb exits 2, surface the plain `Error:` line from stderr verbati
206
206
 
207
207
  ### `state-verify` — verification results and provenance
208
208
 
209
- `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:
209
+ `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 carry `--findings-file` + `--findings-count` for a clean report (count `0`), an **advisory-only** report (`inconsistency`/`improvement` findings only), or accepted residual findings. The stage resolves without a fix round and the report stays attached, making a completed verification round directly resumable if provenance recording is interrupted. A bare `passed` remains accepted for backward compatibility:
210
210
 
211
211
  **`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*.
212
212
 
@@ -272,4 +272,7 @@ This Pi bundle preserves Claude's `AskUserQuestion` references because it ships
272
272
  - **User input:** use `AskUserQuestion` for genuine user decisions. It supports multiple questions, option descriptions, recommended ordering, multi-select, previews, and free-form Other/custom answers.
273
273
  - **Skill dispatch:** Pi uses `/skill:<name>` commands. If you cannot invoke a skill directly, print the exact `/skill:<name> ...` command for the user to run.
274
274
  - **Subagents:** this bundle declares its custom agents (`forge-researcher`, `forge-spec-writer`, `forge-verifier`) as package agents. If a `subagent` tool is registered, dispatch one with `{ agent: "forge-verifier", task: "..." }`, or fan several out concurrently with `{ tasks: [{ agent: "forge-spec-writer", task: "..." }, ...] }`. If no `subagent` tool is available, run that step inline yourself.
275
- - **Background / monitoring:** run long-lived commands in the foreground and report progress as it arrives.
275
+ - **Background / monitoring (forge-5-loop):** Pi has no built-in background bash, persistent monitor, or push-notification, so do **not** run the loop runner in the foreground and do **not** try to arm one. This bundle registers a **forge-loop-supervisor** extension that IS the "background-execution mechanism" and "monitoring mechanism" Steps 3b–3f refer to. Concretely:
276
+ - **Launch (Step 3b):** call **`forge_loop_launch`** with the backlog dir (and `review` / `agent` / `iterations` as resolved from config). It starts the loop **detached** — it runs in rauf's server and outlives this session — and returns immediately; you do not build or redirect a command yourself.
277
+ - **Supervise (Steps 3d–3f):** the extension then watches the runner's `events.ndjson` for you. It reports each completed item as one quiet line and **wakes this session automatically** on needs-human, blocked, stuck, review-failed, error, and completion — so do **not** arm a monitor, set a continuous tail, send a notification, poll, or foreground-sleep, and do not treat any manual stop as the terminal signal. When completion wakes you, go straight to Step 4 and read the authoritative counts with the status/list command. Use **`forge_loop_status`** to check progress on demand.
278
+ - **Stop / session end:** **`forge_loop_stop`** deliberately stops the runner; use it only when the user wants the loop to actually stop. Ending the Pi session does **not** stop the loop (it is detached), and the next session **reattaches automatically** without re-reporting what you already saw.
@@ -206,7 +206,7 @@ If a `state-*` verb exits 2, surface the plain `Error:` line from stderr verbati
206
206
 
207
207
  ### `state-verify` — verification results and provenance
208
208
 
209
- `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:
209
+ `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 carry `--findings-file` + `--findings-count` for a clean report (count `0`), an **advisory-only** report (`inconsistency`/`improvement` findings only), or accepted residual findings. The stage resolves without a fix round and the report stays attached, making a completed verification round directly resumable if provenance recording is interrupted. A bare `passed` remains accepted for backward compatibility:
210
210
 
211
211
  **`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*.
212
212
 
@@ -247,4 +247,7 @@ This Pi bundle preserves Claude's `AskUserQuestion` references because it ships
247
247
  - **User input:** use `AskUserQuestion` for genuine user decisions. It supports multiple questions, option descriptions, recommended ordering, multi-select, previews, and free-form Other/custom answers.
248
248
  - **Skill dispatch:** Pi uses `/skill:<name>` commands. If you cannot invoke a skill directly, print the exact `/skill:<name> ...` command for the user to run.
249
249
  - **Subagents:** this bundle declares its custom agents (`forge-researcher`, `forge-spec-writer`, `forge-verifier`) as package agents. If a `subagent` tool is registered, dispatch one with `{ agent: "forge-verifier", task: "..." }`, or fan several out concurrently with `{ tasks: [{ agent: "forge-spec-writer", task: "..." }, ...] }`. If no `subagent` tool is available, run that step inline yourself.
250
- - **Background / monitoring:** run long-lived commands in the foreground and report progress as it arrives.
250
+ - **Background / monitoring (forge-5-loop):** Pi has no built-in background bash, persistent monitor, or push-notification, so do **not** run the loop runner in the foreground and do **not** try to arm one. This bundle registers a **forge-loop-supervisor** extension that IS the "background-execution mechanism" and "monitoring mechanism" Steps 3b–3f refer to. Concretely:
251
+ - **Launch (Step 3b):** call **`forge_loop_launch`** with the backlog dir (and `review` / `agent` / `iterations` as resolved from config). It starts the loop **detached** — it runs in rauf's server and outlives this session — and returns immediately; you do not build or redirect a command yourself.
252
+ - **Supervise (Steps 3d–3f):** the extension then watches the runner's `events.ndjson` for you. It reports each completed item as one quiet line and **wakes this session automatically** on needs-human, blocked, stuck, review-failed, error, and completion — so do **not** arm a monitor, set a continuous tail, send a notification, poll, or foreground-sleep, and do not treat any manual stop as the terminal signal. When completion wakes you, go straight to Step 4 and read the authoritative counts with the status/list command. Use **`forge_loop_status`** to check progress on demand.
253
+ - **Stop / session end:** **`forge_loop_stop`** deliberately stops the runner; use it only when the user wants the loop to actually stop. Ending the Pi session does **not** stop the loop (it is detached), and the next session **reattaches automatically** without re-reporting what you already saw.
@@ -181,4 +181,7 @@ This Pi bundle preserves Claude's `AskUserQuestion` references because it ships
181
181
  - **User input:** use `AskUserQuestion` for genuine user decisions. It supports multiple questions, option descriptions, recommended ordering, multi-select, previews, and free-form Other/custom answers.
182
182
  - **Skill dispatch:** Pi uses `/skill:<name>` commands. If you cannot invoke a skill directly, print the exact `/skill:<name> ...` command for the user to run.
183
183
  - **Subagents:** this bundle declares its custom agents (`forge-researcher`, `forge-spec-writer`, `forge-verifier`) as package agents. If a `subagent` tool is registered, dispatch one with `{ agent: "forge-verifier", task: "..." }`, or fan several out concurrently with `{ tasks: [{ agent: "forge-spec-writer", task: "..." }, ...] }`. If no `subagent` tool is available, run that step inline yourself.
184
- - **Background / monitoring:** run long-lived commands in the foreground and report progress as it arrives.
184
+ - **Background / monitoring (forge-5-loop):** Pi has no built-in background bash, persistent monitor, or push-notification, so do **not** run the loop runner in the foreground and do **not** try to arm one. This bundle registers a **forge-loop-supervisor** extension that IS the "background-execution mechanism" and "monitoring mechanism" Steps 3b–3f refer to. Concretely:
185
+ - **Launch (Step 3b):** call **`forge_loop_launch`** with the backlog dir (and `review` / `agent` / `iterations` as resolved from config). It starts the loop **detached** — it runs in rauf's server and outlives this session — and returns immediately; you do not build or redirect a command yourself.
186
+ - **Supervise (Steps 3d–3f):** the extension then watches the runner's `events.ndjson` for you. It reports each completed item as one quiet line and **wakes this session automatically** on needs-human, blocked, stuck, review-failed, error, and completion — so do **not** arm a monitor, set a continuous tail, send a notification, poll, or foreground-sleep, and do not treat any manual stop as the terminal signal. When completion wakes you, go straight to Step 4 and read the authoritative counts with the status/list command. Use **`forge_loop_status`** to check progress on demand.
187
+ - **Stop / session end:** **`forge_loop_stop`** deliberately stops the runner; use it only when the user wants the loop to actually stop. Ending the Pi session does **not** stop the loop (it is detached), and the next session **reattaches automatically** without re-reporting what you already saw.
@@ -206,7 +206,7 @@ If a `state-*` verb exits 2, surface the plain `Error:` line from stderr verbati
206
206
 
207
207
  ### `state-verify` — verification results and provenance
208
208
 
209
- `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:
209
+ `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 carry `--findings-file` + `--findings-count` for a clean report (count `0`), an **advisory-only** report (`inconsistency`/`improvement` findings only), or accepted residual findings. The stage resolves without a fix round and the report stays attached, making a completed verification round directly resumable if provenance recording is interrupted. A bare `passed` remains accepted for backward compatibility:
210
210
 
211
211
  **`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*.
212
212
 
@@ -189,4 +189,7 @@ This Pi bundle preserves Claude's `AskUserQuestion` references because it ships
189
189
  - **User input:** use `AskUserQuestion` for genuine user decisions. It supports multiple questions, option descriptions, recommended ordering, multi-select, previews, and free-form Other/custom answers.
190
190
  - **Skill dispatch:** Pi uses `/skill:<name>` commands. If you cannot invoke a skill directly, print the exact `/skill:<name> ...` command for the user to run.
191
191
  - **Subagents:** this bundle declares its custom agents (`forge-researcher`, `forge-spec-writer`, `forge-verifier`) as package agents. If a `subagent` tool is registered, dispatch one with `{ agent: "forge-verifier", task: "..." }`, or fan several out concurrently with `{ tasks: [{ agent: "forge-spec-writer", task: "..." }, ...] }`. If no `subagent` tool is available, run that step inline yourself.
192
- - **Background / monitoring:** run long-lived commands in the foreground and report progress as it arrives.
192
+ - **Background / monitoring (forge-5-loop):** Pi has no built-in background bash, persistent monitor, or push-notification, so do **not** run the loop runner in the foreground and do **not** try to arm one. This bundle registers a **forge-loop-supervisor** extension that IS the "background-execution mechanism" and "monitoring mechanism" Steps 3b–3f refer to. Concretely:
193
+ - **Launch (Step 3b):** call **`forge_loop_launch`** with the backlog dir (and `review` / `agent` / `iterations` as resolved from config). It starts the loop **detached** — it runs in rauf's server and outlives this session — and returns immediately; you do not build or redirect a command yourself.
194
+ - **Supervise (Steps 3d–3f):** the extension then watches the runner's `events.ndjson` for you. It reports each completed item as one quiet line and **wakes this session automatically** on needs-human, blocked, stuck, review-failed, error, and completion — so do **not** arm a monitor, set a continuous tail, send a notification, poll, or foreground-sleep, and do not treat any manual stop as the terminal signal. When completion wakes you, go straight to Step 4 and read the authoritative counts with the status/list command. Use **`forge_loop_status`** to check progress on demand.
195
+ - **Stop / session end:** **`forge_loop_stop`** deliberately stops the runner; use it only when the user wants the loop to actually stop. Ending the Pi session does **not** stop the loop (it is detached), and the next session **reattaches automatically** without re-reporting what you already saw.
@@ -235,8 +235,8 @@
235
235
  },
236
236
  "installHint": {
237
237
  "type": "string",
238
- "default": "Provision rauf for a multi-agent setup with the cross-agent installer: `npx @garygentry/feature-forge install` (records the pinned @garygentry/rauf@0.14.0 default). Or install/upgrade just the rauf CLI: `npx @garygentry/rauf@0.14.0 --version`, or `curl -fsSL https://raw.githubusercontent.com/garygentry/rauf/main/scripts/install-binary.sh | bash`.",
239
- "description": "Shown when the runner BINARY is missing or too old (version gate fails, minRunnerVersion floor) — how to obtain/upgrade the CLI itself. Names two distinct binary-provisioning paths: (1) the cross-agent installer (`npx @garygentry/feature-forge install`, the multi-agent provisioning path that pins @garygentry/rauf@0.14.0), and (2) the direct rauf-CLI install/upgrade one-liner. Distinct from setupHint (which installs per-project artifacts); a version-gate failure is ALWAYS this hint, never setupHint."
238
+ "default": "Provision rauf for a multi-agent setup with the cross-agent installer: `npx @garygentry/feature-forge install` (records the pinned @garygentry/rauf@0.15.0 default). Or install/upgrade just the rauf CLI: `npx @garygentry/rauf@0.15.0 --version`, or `curl -fsSL https://raw.githubusercontent.com/garygentry/rauf/main/scripts/install-binary.sh | bash`.",
239
+ "description": "Shown when the runner BINARY is missing or too old (version gate fails, minRunnerVersion floor) — how to obtain/upgrade the CLI itself. Names two distinct binary-provisioning paths: (1) the cross-agent installer (`npx @garygentry/feature-forge install`, the multi-agent provisioning path that pins @garygentry/rauf@0.15.0), and (2) the direct rauf-CLI install/upgrade one-liner. Distinct from setupHint (which installs per-project artifacts); a version-gate failure is ALWAYS this hint, never setupHint."
240
240
  },
241
241
  "schemaVersion": {
242
242
  "type": "string",
@@ -245,8 +245,8 @@
245
245
  },
246
246
  "minRunnerVersion": {
247
247
  "type": "string",
248
- "default": "0.6.0",
249
- "description": "Minimum runner version (semver). 0.6.0 is the AGENT-SURFACE FLOOR: the rauf version that ships the coding-agent selection surface (the --agent flag, the `agents` availability probe, and the preset agent registry) that this config's agentArgument/agentsProbeCommand consume. Flooring here guarantees a successful gate implies those surfaces exist. (0.5.0 was the prior grammar/contract-flip floor — unified exit codes, `loop run --detached`, explicit `review` signal, versioned events.ndjson — which predates the agent surface and so could not guarantee it.) forge-5 enforces this via versionCommand before any loop side-effects."
248
+ "default": "0.14.0",
249
+ "description": "Minimum runner version (semver). 0.14.0 is the CAPABILITY FLOOR the shipped stage actually depends on — it is the version needed for full post-run needs-human recovery: rauf 0.14's `backlog answer` injects a recorded answer into the next iteration (RECOVERY_MIN_RUNNER_VERSION in forge-session.py). Below it, recovery silently degrades to `backlog unblock` (answer not injected) and large Codex prompts retain the pre-0.14 argv-size (E2BIG) failure mode. Earlier surfaces are subsumed: 0.6.0 first shipped the coding-agent selection surface (--agent flag, `agents` availability probe, preset registry consumed by agentArgument/agentsProbeCommand); 0.5.0 added unified exit codes, `loop run --detached`, the explicit `review` signal, and versioned events.ndjson. Flooring at 0.14.0 guarantees a successful gate implies the recovery + agent surfaces both exist. The floor is distinct from the installer's `RAUF_PIN` (installHint) — the pin may sit ahead of the floor when a newer rauf ships nothing this floor's dependents need; it only rises when rauf ships a surface a shipped stage actually depends on. forge-5 enforces the floor via versionCommand before any loop side-effects."
250
250
  }
251
251
  }
252
252
  }
@@ -156,11 +156,13 @@ to today. Degradation is **silent, not an error**, keeping alternate (non-rauf)
156
156
  runners first-class. The gate condition is owned by
157
157
  `02-config-schema-and-gating.md`.
158
158
 
159
- Independently, the **version gate** floors at the runner version that ships the
160
- agent surface. For rauf that is **0.6.0** (`loopRunner.minRunnerVersion`): the
161
- `--agent` flag, the `agents` probe, and the preset agent registry are present in
162
- rauf source at 0.6.0. A successful gate therefore guarantees those surfaces
163
- exist before any run. See `## Version gating` and
159
+ Independently, the **version gate** floors at the runner version the stage
160
+ depends on. For rauf that is **0.14.0** (`loopRunner.minRunnerVersion`): the
161
+ version the package pins and the floor for full needs-human recovery (0.14's
162
+ `backlog answer`). The agent surface — the `--agent` flag, the `agents` probe,
163
+ and the preset agent registry — has been present since rauf 0.6.0 and is
164
+ subsumed by the higher floor, so a successful gate guarantees both the recovery
165
+ and agent surfaces exist before any run. See `## Version gating` and
164
166
  `05-runner-discovery-version-gate.md`.
165
167
 
166
168
  **This document — the `## Agent selection` section, the `## Per-stage agent
@@ -210,9 +212,11 @@ belongs to execution only. If you find yourself adding `--agent` near a
210
212
 
211
213
  feature-forge requires a runner exposing `backlog validate` + backlog
212
214
  `schemaVersion`, and the unified exit-code/status contract it reads. The floor is
213
- now the **agent-surface floor**: the runner version that ships the `--agent`
214
- flag, the `agents` probe, and the preset agent registry. For rauf that is
215
- **0.6.0** (`loopRunner.minRunnerVersion`).
215
+ now the **capability floor** the stage actually depends on: the version the
216
+ package pins and the floor for full needs-human recovery (0.14's `backlog
217
+ answer`). It subsumes the older agent-surface floor (the `--agent` flag, the
218
+ `agents` probe, and the preset agent registry, present since 0.6.0). For rauf
219
+ that is **0.14.0** (`loopRunner.minRunnerVersion`).
216
220
  `forge-5-loop` runs `{bin} version --json`, semver-compares the reported version
217
221
  against `minRunnerVersion`, and on a missing-or-too-old runner stops with
218
222
  `loopRunner.installHint` (the CLI install/upgrade command) — **before** invoking
@@ -206,7 +206,7 @@ If a `state-*` verb exits 2, surface the plain `Error:` line from stderr verbati
206
206
 
207
207
  ### `state-verify` — verification results and provenance
208
208
 
209
- `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:
209
+ `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 carry `--findings-file` + `--findings-count` for a clean report (count `0`), an **advisory-only** report (`inconsistency`/`improvement` findings only), or accepted residual findings. The stage resolves without a fix round and the report stays attached, making a completed verification round directly resumable if provenance recording is interrupted. A bare `passed` remains accepted for backward compatibility:
210
210
 
211
211
  **`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*.
212
212
 
@@ -69,4 +69,7 @@ This Pi bundle preserves Claude's `AskUserQuestion` references because it ships
69
69
  - **User input:** use `AskUserQuestion` for genuine user decisions. It supports multiple questions, option descriptions, recommended ordering, multi-select, previews, and free-form Other/custom answers.
70
70
  - **Skill dispatch:** Pi uses `/skill:<name>` commands. If you cannot invoke a skill directly, print the exact `/skill:<name> ...` command for the user to run.
71
71
  - **Subagents:** this bundle declares its custom agents (`forge-researcher`, `forge-spec-writer`, `forge-verifier`) as package agents. If a `subagent` tool is registered, dispatch one with `{ agent: "forge-verifier", task: "..." }`, or fan several out concurrently with `{ tasks: [{ agent: "forge-spec-writer", task: "..." }, ...] }`. If no `subagent` tool is available, run that step inline yourself.
72
- - **Background / monitoring:** run long-lived commands in the foreground and report progress as it arrives.
72
+ - **Background / monitoring (forge-5-loop):** Pi has no built-in background bash, persistent monitor, or push-notification, so do **not** run the loop runner in the foreground and do **not** try to arm one. This bundle registers a **forge-loop-supervisor** extension that IS the "background-execution mechanism" and "monitoring mechanism" Steps 3b–3f refer to. Concretely:
73
+ - **Launch (Step 3b):** call **`forge_loop_launch`** with the backlog dir (and `review` / `agent` / `iterations` as resolved from config). It starts the loop **detached** — it runs in rauf's server and outlives this session — and returns immediately; you do not build or redirect a command yourself.
74
+ - **Supervise (Steps 3d–3f):** the extension then watches the runner's `events.ndjson` for you. It reports each completed item as one quiet line and **wakes this session automatically** on needs-human, blocked, stuck, review-failed, error, and completion — so do **not** arm a monitor, set a continuous tail, send a notification, poll, or foreground-sleep, and do not treat any manual stop as the terminal signal. When completion wakes you, go straight to Step 4 and read the authoritative counts with the status/list command. Use **`forge_loop_status`** to check progress on demand.
75
+ - **Stop / session end:** **`forge_loop_stop`** deliberately stops the runner; use it only when the user wants the loop to actually stop. Ending the Pi session does **not** stop the loop (it is detached), and the next session **reattaches automatically** without re-reporting what you already saw.
@@ -227,14 +227,16 @@ Do NOT embed this question in your text output.
227
227
 
228
228
  ## Step 6: Record the Result Through `state-verify`
229
229
 
230
- Never hand-author a verify entry. Every `stages.forge-verify-*` transition is written by 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. Write `findings-reported` when the report lists at least one **blocking** finding (`error`/`gap`); write `passed` when it lists none — including an **advisory-only** report (`inconsistency`/`improvement` findings only), which records `passed` with the report still attached: pass `--findings-file` and `--findings-count` alongside `--status passed` so the advisories remain discoverable without blocking the stage. (One exception routes blocking findings to `passed`: residual findings the user explicitly accepted at the round-ledger escalation — recorded first as a `state-decision`, then `passed` with the report attached, per "Escalation" in `references/stage-exit-protocol.md`.) Never write `findings-applied` here — that belongs to the fix pass. `--stage` names the **served production stage** (Step 1's mode, mapped through the served-stage mapping in Step 7), `--findings-file` is the report path **relative to** the feature directory (the Step 4 filename, round discriminator included), and `--verified-stage-version` is that production stage entry's current `version`, so a later revision of the artifact makes this verification read stale and re-fires. 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.
230
+ Never hand-author a verify entry. Every `stages.forge-verify-*` transition is written by 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. Write `findings-reported` when the report lists at least one **blocking** finding (`error`/`gap`); otherwise write `passed`. **Always attach the Step 4 report**, including a clean report with count `0`, so the completed round remains resumable and auditable. Advisory-only reports (`inconsistency`/`improvement`) use `passed` with their positive count and advance without a fix round. (One exception routes blocking findings to `passed`: residual findings the user explicitly accepted at the round-ledger escalation — recorded first as a `state-decision`, then `passed` with the report attached, per "Escalation" in `references/stage-exit-protocol.md`.) Never write `findings-applied` here — that belongs to the fix pass. `--stage` names the **served production stage** (Step 1's mode, mapped through the served-stage mapping in Step 7), `--findings-file` is the report path **relative to** the feature directory (the Step 4 filename, round discriminator included), and `--verified-stage-version` is that production stage entry's current `version`, so a later revision of the artifact makes this verification read stale and re-fires. 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.
231
+
232
+ Choose result arguments from the report outcome, never a combined placeholder: clean uses `--status passed --findings-count 0`; advisory-only uses `--status passed` with its positive count; blocking uses `--status findings-reported` with its positive total count. All variants attach the Step 4 report:
231
233
 
232
234
  ```bash
233
235
  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')"
234
236
  [ -n "$R" ] || { echo "feature-forge: cannot locate plugin root" >&2; exit 1; }
235
237
  python3 "$R/scripts/forge-session.py" state-verify \
236
- --feature "{feature}" --stage "{servedStage}" --status "{passed|findings-reported}" \
237
- --findings-file "{relative findings path}" --findings-count {n} \
238
+ --feature "{feature}" --stage "{servedStage}" --status "{outcome-specific status}" \
239
+ --findings-file "{relative findings path}" --findings-count {outcome-specific count} \
238
240
  --verified-stage-version {version} --specs-dir "{specsDir}"
239
241
  ```
240
242
 
@@ -311,4 +313,7 @@ This Pi bundle preserves Claude's `AskUserQuestion` references because it ships
311
313
  - **User input:** use `AskUserQuestion` for genuine user decisions. It supports multiple questions, option descriptions, recommended ordering, multi-select, previews, and free-form Other/custom answers.
312
314
  - **Skill dispatch:** Pi uses `/skill:<name>` commands. If you cannot invoke a skill directly, print the exact `/skill:<name> ...` command for the user to run.
313
315
  - **Subagents:** this bundle declares its custom agents (`forge-researcher`, `forge-spec-writer`, `forge-verifier`) as package agents. If a `subagent` tool is registered, dispatch one with `{ agent: "forge-verifier", task: "..." }`, or fan several out concurrently with `{ tasks: [{ agent: "forge-spec-writer", task: "..." }, ...] }`. If no `subagent` tool is available, run that step inline yourself.
314
- - **Background / monitoring:** run long-lived commands in the foreground and report progress as it arrives.
316
+ - **Background / monitoring (forge-5-loop):** Pi has no built-in background bash, persistent monitor, or push-notification, so do **not** run the loop runner in the foreground and do **not** try to arm one. This bundle registers a **forge-loop-supervisor** extension that IS the "background-execution mechanism" and "monitoring mechanism" Steps 3b–3f refer to. Concretely:
317
+ - **Launch (Step 3b):** call **`forge_loop_launch`** with the backlog dir (and `review` / `agent` / `iterations` as resolved from config). It starts the loop **detached** — it runs in rauf's server and outlives this session — and returns immediately; you do not build or redirect a command yourself.
318
+ - **Supervise (Steps 3d–3f):** the extension then watches the runner's `events.ndjson` for you. It reports each completed item as one quiet line and **wakes this session automatically** on needs-human, blocked, stuck, review-failed, error, and completion — so do **not** arm a monitor, set a continuous tail, send a notification, poll, or foreground-sleep, and do not treat any manual stop as the terminal signal. When completion wakes you, go straight to Step 4 and read the authoritative counts with the status/list command. Use **`forge_loop_status`** to check progress on demand.
319
+ - **Stop / session end:** **`forge_loop_stop`** deliberately stops the runner; use it only when the user wants the loop to actually stop. Ending the Pi session does **not** stop the loop (it is detached), and the next session **reattaches automatically** without re-reporting what you already saw.