@garygentry/feature-forge 0.3.0 → 0.3.1
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.
- package/adapters/claude/.feature-forge-bundle.json +1 -1
- package/adapters/claude/agents/forge-verifier.md +1 -1
- package/adapters/claude/references/pipeline-state-schema.json +1 -1
- package/adapters/claude/references/shared-conventions.md +62 -12
- package/adapters/claude/references/stage-exit-protocol.md +14 -4
- package/adapters/claude/references/vendor-construct-inventory.md +1 -1
- package/adapters/claude/scripts/epic-manifest.py +49 -6
- package/adapters/claude/scripts/forge-session.py +1149 -1
- package/adapters/claude/scripts/validate-traceability.py +6 -1
- package/adapters/claude/skills/forge/SKILL.md +11 -5
- package/adapters/claude/skills/forge/references/pipeline-state-schema.json +1 -1
- package/adapters/claude/skills/forge/references/shared-conventions.md +62 -12
- package/adapters/claude/skills/forge/references/stage-exit-protocol.md +14 -4
- package/adapters/claude/skills/forge-0-epic/SKILL.md +1 -1
- package/adapters/claude/skills/forge-0-epic/references/pipeline-state-schema.json +1 -1
- package/adapters/claude/skills/forge-0-epic/references/shared-conventions.md +62 -12
- package/adapters/claude/skills/forge-0-epic/references/stage-exit-protocol.md +14 -4
- package/adapters/claude/skills/forge-1-prd/SKILL.md +25 -8
- package/adapters/claude/skills/forge-1-prd/references/shared-conventions.md +62 -12
- package/adapters/claude/skills/forge-1-prd/references/stage-exit-protocol.md +14 -4
- package/adapters/claude/skills/forge-2-tech/SKILL.md +25 -7
- package/adapters/claude/skills/forge-2-tech/references/shared-conventions.md +62 -12
- package/adapters/claude/skills/forge-2-tech/references/stage-exit-protocol.md +14 -4
- package/adapters/claude/skills/forge-3-specs/SKILL.md +24 -7
- package/adapters/claude/skills/forge-3-specs/references/shared-conventions.md +62 -12
- package/adapters/claude/skills/forge-3-specs/references/stage-exit-protocol.md +14 -4
- package/adapters/claude/skills/forge-4-backlog/SKILL.md +23 -7
- package/adapters/claude/skills/forge-4-backlog/references/shared-conventions.md +62 -12
- package/adapters/claude/skills/forge-4-backlog/references/stage-exit-protocol.md +14 -4
- package/adapters/claude/skills/forge-5-loop/SKILL.md +25 -25
- package/adapters/claude/skills/forge-5-loop/references/agent-selection.md +116 -0
- package/adapters/claude/skills/forge-5-loop/references/runner-contract.md +14 -107
- package/adapters/claude/skills/forge-5-loop/references/shared-conventions.md +62 -12
- package/adapters/claude/skills/forge-5-loop/references/stage-exit-protocol.md +14 -4
- package/adapters/claude/skills/forge-6-docs/SKILL.md +11 -5
- package/adapters/claude/skills/forge-6-docs/references/shared-conventions.md +62 -12
- package/adapters/claude/skills/forge-fix/references/shared-conventions.md +62 -12
- package/adapters/claude/skills/forge-fix/references/stage-exit-protocol.md +14 -4
- package/adapters/claude/skills/forge-guide/references/shared-conventions.md +62 -12
- package/adapters/claude/skills/forge-verify/SKILL.md +22 -12
- package/adapters/claude/skills/forge-verify/references/findings-template.md +157 -0
- package/adapters/claude/skills/forge-verify/references/pipeline-state-schema.json +1 -1
- package/adapters/claude/skills/forge-verify/references/shared-conventions.md +62 -12
- package/adapters/claude/skills/forge-verify/references/verification-checklists/backlog.md +97 -0
- package/adapters/claude/skills/forge-verify/references/verification-checklists/epic.md +79 -0
- package/adapters/claude/skills/forge-verify/references/verification-checklists/impl.md +48 -0
- package/adapters/claude/skills/forge-verify/references/verification-checklists/prd.md +31 -0
- package/adapters/claude/skills/forge-verify/references/verification-checklists/specs.md +64 -0
- package/adapters/claude/skills/forge-verify/references/verification-checklists/tech.md +35 -0
- package/adapters/codex/.feature-forge-bundle.json +1 -1
- package/adapters/codex/agents/forge-verifier.toml +1 -1
- package/adapters/codex/references/pipeline-state-schema.json +1 -1
- package/adapters/codex/references/shared-conventions.md +62 -12
- package/adapters/codex/references/stage-exit-protocol.md +14 -4
- package/adapters/codex/references/vendor-construct-inventory.md +1 -1
- package/adapters/codex/scripts/epic-manifest.py +49 -6
- package/adapters/codex/scripts/forge-session.py +1149 -1
- package/adapters/codex/scripts/validate-traceability.py +6 -1
- package/adapters/codex/skills/forge/SKILL.md +11 -5
- package/adapters/codex/skills/forge/references/pipeline-state-schema.json +1 -1
- package/adapters/codex/skills/forge/references/shared-conventions.md +62 -12
- package/adapters/codex/skills/forge/references/stage-exit-protocol.md +14 -4
- package/adapters/codex/skills/forge-0-epic/SKILL.md +1 -1
- package/adapters/codex/skills/forge-0-epic/references/pipeline-state-schema.json +1 -1
- package/adapters/codex/skills/forge-0-epic/references/shared-conventions.md +62 -12
- package/adapters/codex/skills/forge-0-epic/references/stage-exit-protocol.md +14 -4
- package/adapters/codex/skills/forge-1-prd/SKILL.md +25 -8
- package/adapters/codex/skills/forge-1-prd/references/shared-conventions.md +62 -12
- package/adapters/codex/skills/forge-1-prd/references/stage-exit-protocol.md +14 -4
- package/adapters/codex/skills/forge-2-tech/SKILL.md +25 -7
- package/adapters/codex/skills/forge-2-tech/references/shared-conventions.md +62 -12
- package/adapters/codex/skills/forge-2-tech/references/stage-exit-protocol.md +14 -4
- package/adapters/codex/skills/forge-3-specs/SKILL.md +24 -7
- package/adapters/codex/skills/forge-3-specs/references/shared-conventions.md +62 -12
- package/adapters/codex/skills/forge-3-specs/references/stage-exit-protocol.md +14 -4
- package/adapters/codex/skills/forge-4-backlog/SKILL.md +23 -7
- package/adapters/codex/skills/forge-4-backlog/references/shared-conventions.md +62 -12
- package/adapters/codex/skills/forge-4-backlog/references/stage-exit-protocol.md +14 -4
- package/adapters/codex/skills/forge-5-loop/SKILL.md +25 -25
- package/adapters/codex/skills/forge-5-loop/references/agent-selection.md +116 -0
- package/adapters/codex/skills/forge-5-loop/references/runner-contract.md +14 -107
- package/adapters/codex/skills/forge-5-loop/references/shared-conventions.md +62 -12
- package/adapters/codex/skills/forge-5-loop/references/stage-exit-protocol.md +14 -4
- package/adapters/codex/skills/forge-6-docs/SKILL.md +11 -5
- package/adapters/codex/skills/forge-6-docs/references/shared-conventions.md +62 -12
- package/adapters/codex/skills/forge-fix/references/shared-conventions.md +62 -12
- package/adapters/codex/skills/forge-fix/references/stage-exit-protocol.md +14 -4
- package/adapters/codex/skills/forge-guide/references/shared-conventions.md +62 -12
- package/adapters/codex/skills/forge-verify/SKILL.md +22 -12
- package/adapters/codex/skills/forge-verify/references/findings-template.md +157 -0
- package/adapters/codex/skills/forge-verify/references/pipeline-state-schema.json +1 -1
- package/adapters/codex/skills/forge-verify/references/shared-conventions.md +62 -12
- package/adapters/codex/skills/forge-verify/references/verification-checklists/backlog.md +97 -0
- package/adapters/codex/skills/forge-verify/references/verification-checklists/epic.md +79 -0
- package/adapters/codex/skills/forge-verify/references/verification-checklists/impl.md +48 -0
- package/adapters/codex/skills/forge-verify/references/verification-checklists/prd.md +31 -0
- package/adapters/codex/skills/forge-verify/references/verification-checklists/specs.md +64 -0
- package/adapters/codex/skills/forge-verify/references/verification-checklists/tech.md +35 -0
- package/adapters/copilot/.feature-forge-bundle.json +1 -1
- package/adapters/copilot/agents/forge-verifier.md +1 -1
- package/adapters/copilot/references/pipeline-state-schema.json +1 -1
- package/adapters/copilot/references/shared-conventions.md +62 -12
- package/adapters/copilot/references/stage-exit-protocol.md +14 -4
- package/adapters/copilot/references/vendor-construct-inventory.md +1 -1
- package/adapters/copilot/scripts/epic-manifest.py +49 -6
- package/adapters/copilot/scripts/forge-session.py +1149 -1
- package/adapters/copilot/scripts/validate-traceability.py +6 -1
- package/adapters/copilot/skills/forge/forge.md +11 -5
- package/adapters/copilot/skills/forge/references/pipeline-state-schema.json +1 -1
- package/adapters/copilot/skills/forge/references/shared-conventions.md +62 -12
- package/adapters/copilot/skills/forge/references/stage-exit-protocol.md +14 -4
- package/adapters/copilot/skills/forge-0-epic/forge-0-epic.md +1 -1
- package/adapters/copilot/skills/forge-0-epic/references/pipeline-state-schema.json +1 -1
- package/adapters/copilot/skills/forge-0-epic/references/shared-conventions.md +62 -12
- package/adapters/copilot/skills/forge-0-epic/references/stage-exit-protocol.md +14 -4
- package/adapters/copilot/skills/forge-1-prd/forge-1-prd.md +25 -8
- package/adapters/copilot/skills/forge-1-prd/references/shared-conventions.md +62 -12
- package/adapters/copilot/skills/forge-1-prd/references/stage-exit-protocol.md +14 -4
- package/adapters/copilot/skills/forge-2-tech/forge-2-tech.md +25 -7
- package/adapters/copilot/skills/forge-2-tech/references/shared-conventions.md +62 -12
- package/adapters/copilot/skills/forge-2-tech/references/stage-exit-protocol.md +14 -4
- package/adapters/copilot/skills/forge-3-specs/forge-3-specs.md +24 -7
- package/adapters/copilot/skills/forge-3-specs/references/shared-conventions.md +62 -12
- package/adapters/copilot/skills/forge-3-specs/references/stage-exit-protocol.md +14 -4
- package/adapters/copilot/skills/forge-4-backlog/forge-4-backlog.md +23 -7
- package/adapters/copilot/skills/forge-4-backlog/references/shared-conventions.md +62 -12
- package/adapters/copilot/skills/forge-4-backlog/references/stage-exit-protocol.md +14 -4
- package/adapters/copilot/skills/forge-5-loop/forge-5-loop.md +25 -25
- package/adapters/copilot/skills/forge-5-loop/references/agent-selection.md +116 -0
- package/adapters/copilot/skills/forge-5-loop/references/runner-contract.md +14 -107
- package/adapters/copilot/skills/forge-5-loop/references/shared-conventions.md +62 -12
- package/adapters/copilot/skills/forge-5-loop/references/stage-exit-protocol.md +14 -4
- package/adapters/copilot/skills/forge-6-docs/forge-6-docs.md +11 -5
- package/adapters/copilot/skills/forge-6-docs/references/shared-conventions.md +62 -12
- package/adapters/copilot/skills/forge-fix/references/shared-conventions.md +62 -12
- package/adapters/copilot/skills/forge-fix/references/stage-exit-protocol.md +14 -4
- package/adapters/copilot/skills/forge-guide/references/shared-conventions.md +62 -12
- package/adapters/copilot/skills/forge-verify/forge-verify.md +22 -12
- package/adapters/copilot/skills/forge-verify/references/findings-template.md +157 -0
- package/adapters/copilot/skills/forge-verify/references/pipeline-state-schema.json +1 -1
- package/adapters/copilot/skills/forge-verify/references/shared-conventions.md +62 -12
- package/adapters/copilot/skills/forge-verify/references/verification-checklists/backlog.md +97 -0
- package/adapters/copilot/skills/forge-verify/references/verification-checklists/epic.md +79 -0
- package/adapters/copilot/skills/forge-verify/references/verification-checklists/impl.md +48 -0
- package/adapters/copilot/skills/forge-verify/references/verification-checklists/prd.md +31 -0
- package/adapters/copilot/skills/forge-verify/references/verification-checklists/specs.md +64 -0
- package/adapters/copilot/skills/forge-verify/references/verification-checklists/tech.md +35 -0
- package/adapters/cursor/.feature-forge-bundle.json +1 -1
- package/adapters/cursor/agents/forge-verifier.mdc +1 -1
- package/adapters/cursor/references/pipeline-state-schema.json +1 -1
- package/adapters/cursor/references/shared-conventions.md +62 -12
- package/adapters/cursor/references/stage-exit-protocol.md +14 -4
- package/adapters/cursor/references/vendor-construct-inventory.md +1 -1
- package/adapters/cursor/scripts/epic-manifest.py +49 -6
- package/adapters/cursor/scripts/forge-session.py +1149 -1
- package/adapters/cursor/scripts/validate-traceability.py +6 -1
- package/adapters/cursor/skills/forge/forge.mdc +11 -5
- package/adapters/cursor/skills/forge/references/pipeline-state-schema.json +1 -1
- package/adapters/cursor/skills/forge/references/shared-conventions.md +62 -12
- package/adapters/cursor/skills/forge/references/stage-exit-protocol.md +14 -4
- package/adapters/cursor/skills/forge-0-epic/forge-0-epic.mdc +1 -1
- package/adapters/cursor/skills/forge-0-epic/references/pipeline-state-schema.json +1 -1
- package/adapters/cursor/skills/forge-0-epic/references/shared-conventions.md +62 -12
- package/adapters/cursor/skills/forge-0-epic/references/stage-exit-protocol.md +14 -4
- package/adapters/cursor/skills/forge-1-prd/forge-1-prd.mdc +25 -8
- package/adapters/cursor/skills/forge-1-prd/references/shared-conventions.md +62 -12
- package/adapters/cursor/skills/forge-1-prd/references/stage-exit-protocol.md +14 -4
- package/adapters/cursor/skills/forge-2-tech/forge-2-tech.mdc +25 -7
- package/adapters/cursor/skills/forge-2-tech/references/shared-conventions.md +62 -12
- package/adapters/cursor/skills/forge-2-tech/references/stage-exit-protocol.md +14 -4
- package/adapters/cursor/skills/forge-3-specs/forge-3-specs.mdc +24 -7
- package/adapters/cursor/skills/forge-3-specs/references/shared-conventions.md +62 -12
- package/adapters/cursor/skills/forge-3-specs/references/stage-exit-protocol.md +14 -4
- package/adapters/cursor/skills/forge-4-backlog/forge-4-backlog.mdc +23 -7
- package/adapters/cursor/skills/forge-4-backlog/references/shared-conventions.md +62 -12
- package/adapters/cursor/skills/forge-4-backlog/references/stage-exit-protocol.md +14 -4
- package/adapters/cursor/skills/forge-5-loop/forge-5-loop.mdc +25 -25
- package/adapters/cursor/skills/forge-5-loop/references/agent-selection.md +116 -0
- package/adapters/cursor/skills/forge-5-loop/references/runner-contract.md +14 -107
- package/adapters/cursor/skills/forge-5-loop/references/shared-conventions.md +62 -12
- package/adapters/cursor/skills/forge-5-loop/references/stage-exit-protocol.md +14 -4
- package/adapters/cursor/skills/forge-6-docs/forge-6-docs.mdc +11 -5
- package/adapters/cursor/skills/forge-6-docs/references/shared-conventions.md +62 -12
- package/adapters/cursor/skills/forge-fix/references/shared-conventions.md +62 -12
- package/adapters/cursor/skills/forge-fix/references/stage-exit-protocol.md +14 -4
- package/adapters/cursor/skills/forge-guide/references/shared-conventions.md +62 -12
- package/adapters/cursor/skills/forge-verify/forge-verify.mdc +22 -12
- package/adapters/cursor/skills/forge-verify/references/findings-template.md +157 -0
- package/adapters/cursor/skills/forge-verify/references/pipeline-state-schema.json +1 -1
- package/adapters/cursor/skills/forge-verify/references/shared-conventions.md +62 -12
- package/adapters/cursor/skills/forge-verify/references/verification-checklists/backlog.md +97 -0
- package/adapters/cursor/skills/forge-verify/references/verification-checklists/epic.md +79 -0
- package/adapters/cursor/skills/forge-verify/references/verification-checklists/impl.md +48 -0
- package/adapters/cursor/skills/forge-verify/references/verification-checklists/prd.md +31 -0
- package/adapters/cursor/skills/forge-verify/references/verification-checklists/specs.md +64 -0
- package/adapters/cursor/skills/forge-verify/references/verification-checklists/tech.md +35 -0
- package/adapters/gemini/.feature-forge-bundle.json +1 -1
- package/adapters/gemini/agents/forge-verifier.md +1 -1
- package/adapters/gemini/gemini-extension.json +1 -1
- package/adapters/gemini/references/pipeline-state-schema.json +1 -1
- package/adapters/gemini/references/shared-conventions.md +62 -12
- package/adapters/gemini/references/stage-exit-protocol.md +14 -4
- package/adapters/gemini/references/vendor-construct-inventory.md +1 -1
- package/adapters/gemini/scripts/epic-manifest.py +49 -6
- package/adapters/gemini/scripts/forge-session.py +1149 -1
- package/adapters/gemini/scripts/validate-traceability.py +6 -1
- package/adapters/gemini/skills/forge/forge.md +11 -5
- package/adapters/gemini/skills/forge/references/pipeline-state-schema.json +1 -1
- package/adapters/gemini/skills/forge/references/shared-conventions.md +62 -12
- package/adapters/gemini/skills/forge/references/stage-exit-protocol.md +14 -4
- package/adapters/gemini/skills/forge-0-epic/forge-0-epic.md +1 -1
- package/adapters/gemini/skills/forge-0-epic/references/pipeline-state-schema.json +1 -1
- package/adapters/gemini/skills/forge-0-epic/references/shared-conventions.md +62 -12
- package/adapters/gemini/skills/forge-0-epic/references/stage-exit-protocol.md +14 -4
- package/adapters/gemini/skills/forge-1-prd/forge-1-prd.md +25 -8
- package/adapters/gemini/skills/forge-1-prd/references/shared-conventions.md +62 -12
- package/adapters/gemini/skills/forge-1-prd/references/stage-exit-protocol.md +14 -4
- package/adapters/gemini/skills/forge-2-tech/forge-2-tech.md +25 -7
- package/adapters/gemini/skills/forge-2-tech/references/shared-conventions.md +62 -12
- package/adapters/gemini/skills/forge-2-tech/references/stage-exit-protocol.md +14 -4
- package/adapters/gemini/skills/forge-3-specs/forge-3-specs.md +24 -7
- package/adapters/gemini/skills/forge-3-specs/references/shared-conventions.md +62 -12
- package/adapters/gemini/skills/forge-3-specs/references/stage-exit-protocol.md +14 -4
- package/adapters/gemini/skills/forge-4-backlog/forge-4-backlog.md +23 -7
- package/adapters/gemini/skills/forge-4-backlog/references/shared-conventions.md +62 -12
- package/adapters/gemini/skills/forge-4-backlog/references/stage-exit-protocol.md +14 -4
- package/adapters/gemini/skills/forge-5-loop/forge-5-loop.md +25 -25
- package/adapters/gemini/skills/forge-5-loop/references/agent-selection.md +116 -0
- package/adapters/gemini/skills/forge-5-loop/references/runner-contract.md +14 -107
- package/adapters/gemini/skills/forge-5-loop/references/shared-conventions.md +62 -12
- package/adapters/gemini/skills/forge-5-loop/references/stage-exit-protocol.md +14 -4
- package/adapters/gemini/skills/forge-6-docs/forge-6-docs.md +11 -5
- package/adapters/gemini/skills/forge-6-docs/references/shared-conventions.md +62 -12
- package/adapters/gemini/skills/forge-fix/references/shared-conventions.md +62 -12
- package/adapters/gemini/skills/forge-fix/references/stage-exit-protocol.md +14 -4
- package/adapters/gemini/skills/forge-guide/references/shared-conventions.md +62 -12
- package/adapters/gemini/skills/forge-verify/forge-verify.md +22 -12
- package/adapters/gemini/skills/forge-verify/references/findings-template.md +157 -0
- package/adapters/gemini/skills/forge-verify/references/pipeline-state-schema.json +1 -1
- package/adapters/gemini/skills/forge-verify/references/shared-conventions.md +62 -12
- package/adapters/gemini/skills/forge-verify/references/verification-checklists/backlog.md +97 -0
- package/adapters/gemini/skills/forge-verify/references/verification-checklists/epic.md +79 -0
- package/adapters/gemini/skills/forge-verify/references/verification-checklists/impl.md +48 -0
- package/adapters/gemini/skills/forge-verify/references/verification-checklists/prd.md +31 -0
- package/adapters/gemini/skills/forge-verify/references/verification-checklists/specs.md +64 -0
- package/adapters/gemini/skills/forge-verify/references/verification-checklists/tech.md +35 -0
- package/adapters/pi/.feature-forge-bundle.json +1 -1
- package/adapters/pi/agents/forge-verifier.md +1 -1
- package/adapters/pi/references/pipeline-state-schema.json +1 -1
- package/adapters/pi/references/shared-conventions.md +62 -12
- package/adapters/pi/references/stage-exit-protocol.md +14 -4
- package/adapters/pi/references/vendor-construct-inventory.md +1 -1
- package/adapters/pi/scripts/epic-manifest.py +49 -6
- package/adapters/pi/scripts/forge-session.py +1149 -1
- package/adapters/pi/scripts/validate-traceability.py +6 -1
- package/adapters/pi/skills/forge/SKILL.md +11 -5
- package/adapters/pi/skills/forge/references/pipeline-state-schema.json +1 -1
- package/adapters/pi/skills/forge/references/shared-conventions.md +62 -12
- package/adapters/pi/skills/forge/references/stage-exit-protocol.md +14 -4
- package/adapters/pi/skills/forge-0-epic/SKILL.md +1 -1
- package/adapters/pi/skills/forge-0-epic/references/pipeline-state-schema.json +1 -1
- package/adapters/pi/skills/forge-0-epic/references/shared-conventions.md +62 -12
- package/adapters/pi/skills/forge-0-epic/references/stage-exit-protocol.md +14 -4
- package/adapters/pi/skills/forge-1-prd/SKILL.md +25 -8
- package/adapters/pi/skills/forge-1-prd/references/shared-conventions.md +62 -12
- package/adapters/pi/skills/forge-1-prd/references/stage-exit-protocol.md +14 -4
- package/adapters/pi/skills/forge-2-tech/SKILL.md +25 -7
- package/adapters/pi/skills/forge-2-tech/references/shared-conventions.md +62 -12
- package/adapters/pi/skills/forge-2-tech/references/stage-exit-protocol.md +14 -4
- package/adapters/pi/skills/forge-3-specs/SKILL.md +24 -7
- package/adapters/pi/skills/forge-3-specs/references/shared-conventions.md +62 -12
- package/adapters/pi/skills/forge-3-specs/references/stage-exit-protocol.md +14 -4
- package/adapters/pi/skills/forge-4-backlog/SKILL.md +23 -7
- package/adapters/pi/skills/forge-4-backlog/references/shared-conventions.md +62 -12
- package/adapters/pi/skills/forge-4-backlog/references/stage-exit-protocol.md +14 -4
- package/adapters/pi/skills/forge-5-loop/SKILL.md +25 -25
- package/adapters/pi/skills/forge-5-loop/references/agent-selection.md +116 -0
- package/adapters/pi/skills/forge-5-loop/references/runner-contract.md +14 -107
- package/adapters/pi/skills/forge-5-loop/references/shared-conventions.md +62 -12
- package/adapters/pi/skills/forge-5-loop/references/stage-exit-protocol.md +14 -4
- package/adapters/pi/skills/forge-6-docs/SKILL.md +11 -5
- package/adapters/pi/skills/forge-6-docs/references/shared-conventions.md +62 -12
- package/adapters/pi/skills/forge-fix/references/shared-conventions.md +62 -12
- package/adapters/pi/skills/forge-fix/references/stage-exit-protocol.md +14 -4
- package/adapters/pi/skills/forge-guide/references/shared-conventions.md +62 -12
- package/adapters/pi/skills/forge-verify/SKILL.md +22 -12
- package/adapters/pi/skills/forge-verify/references/findings-template.md +157 -0
- package/adapters/pi/skills/forge-verify/references/pipeline-state-schema.json +1 -1
- package/adapters/pi/skills/forge-verify/references/shared-conventions.md +62 -12
- package/adapters/pi/skills/forge-verify/references/verification-checklists/backlog.md +97 -0
- package/adapters/pi/skills/forge-verify/references/verification-checklists/epic.md +79 -0
- package/adapters/pi/skills/forge-verify/references/verification-checklists/impl.md +48 -0
- package/adapters/pi/skills/forge-verify/references/verification-checklists/prd.md +31 -0
- package/adapters/pi/skills/forge-verify/references/verification-checklists/specs.md +64 -0
- package/adapters/pi/skills/forge-verify/references/verification-checklists/tech.md +35 -0
- package/package.json +1 -1
- package/adapters/claude/skills/forge-1-prd/references/pipeline-state-schema.json +0 -191
- package/adapters/claude/skills/forge-2-tech/references/pipeline-state-schema.json +0 -191
- package/adapters/claude/skills/forge-3-specs/references/pipeline-state-schema.json +0 -191
- package/adapters/claude/skills/forge-4-backlog/references/forge-config-schema.json +0 -236
- package/adapters/claude/skills/forge-4-backlog/references/pipeline-state-schema.json +0 -191
- package/adapters/claude/skills/forge-5-loop/references/forge-config-schema.json +0 -236
- package/adapters/claude/skills/forge-6-docs/references/pipeline-state-schema.json +0 -191
- package/adapters/claude/skills/forge-verify/references/verification-checklists.md +0 -477
- package/adapters/codex/skills/forge-1-prd/references/pipeline-state-schema.json +0 -191
- package/adapters/codex/skills/forge-2-tech/references/pipeline-state-schema.json +0 -191
- package/adapters/codex/skills/forge-3-specs/references/pipeline-state-schema.json +0 -191
- package/adapters/codex/skills/forge-4-backlog/references/forge-config-schema.json +0 -236
- package/adapters/codex/skills/forge-4-backlog/references/pipeline-state-schema.json +0 -191
- package/adapters/codex/skills/forge-5-loop/references/forge-config-schema.json +0 -236
- package/adapters/codex/skills/forge-6-docs/references/pipeline-state-schema.json +0 -191
- package/adapters/codex/skills/forge-verify/references/verification-checklists.md +0 -477
- package/adapters/copilot/skills/forge-1-prd/references/pipeline-state-schema.json +0 -191
- package/adapters/copilot/skills/forge-2-tech/references/pipeline-state-schema.json +0 -191
- package/adapters/copilot/skills/forge-3-specs/references/pipeline-state-schema.json +0 -191
- package/adapters/copilot/skills/forge-4-backlog/references/forge-config-schema.json +0 -236
- package/adapters/copilot/skills/forge-4-backlog/references/pipeline-state-schema.json +0 -191
- package/adapters/copilot/skills/forge-5-loop/references/forge-config-schema.json +0 -236
- package/adapters/copilot/skills/forge-6-docs/references/pipeline-state-schema.json +0 -191
- package/adapters/copilot/skills/forge-verify/references/verification-checklists.md +0 -477
- package/adapters/cursor/skills/forge-1-prd/references/pipeline-state-schema.json +0 -191
- package/adapters/cursor/skills/forge-2-tech/references/pipeline-state-schema.json +0 -191
- package/adapters/cursor/skills/forge-3-specs/references/pipeline-state-schema.json +0 -191
- package/adapters/cursor/skills/forge-4-backlog/references/forge-config-schema.json +0 -236
- package/adapters/cursor/skills/forge-4-backlog/references/pipeline-state-schema.json +0 -191
- package/adapters/cursor/skills/forge-5-loop/references/forge-config-schema.json +0 -236
- package/adapters/cursor/skills/forge-6-docs/references/pipeline-state-schema.json +0 -191
- package/adapters/cursor/skills/forge-verify/references/verification-checklists.md +0 -477
- package/adapters/gemini/skills/forge-1-prd/references/pipeline-state-schema.json +0 -191
- package/adapters/gemini/skills/forge-2-tech/references/pipeline-state-schema.json +0 -191
- package/adapters/gemini/skills/forge-3-specs/references/pipeline-state-schema.json +0 -191
- package/adapters/gemini/skills/forge-4-backlog/references/forge-config-schema.json +0 -236
- package/adapters/gemini/skills/forge-4-backlog/references/pipeline-state-schema.json +0 -191
- package/adapters/gemini/skills/forge-5-loop/references/forge-config-schema.json +0 -236
- package/adapters/gemini/skills/forge-6-docs/references/pipeline-state-schema.json +0 -191
- package/adapters/gemini/skills/forge-verify/references/verification-checklists.md +0 -477
- package/adapters/pi/skills/forge-1-prd/references/pipeline-state-schema.json +0 -191
- package/adapters/pi/skills/forge-2-tech/references/pipeline-state-schema.json +0 -191
- package/adapters/pi/skills/forge-3-specs/references/pipeline-state-schema.json +0 -191
- package/adapters/pi/skills/forge-4-backlog/references/forge-config-schema.json +0 -236
- package/adapters/pi/skills/forge-4-backlog/references/pipeline-state-schema.json +0 -191
- package/adapters/pi/skills/forge-5-loop/references/forge-config-schema.json +0 -236
- package/adapters/pi/skills/forge-6-docs/references/pipeline-state-schema.json +0 -191
- package/adapters/pi/skills/forge-verify/references/verification-checklists.md +0 -477
|
@@ -0,0 +1,116 @@
|
|
|
1
|
+
# forge-5-loop — Agent Selection (Step 2d, conditional)
|
|
2
|
+
|
|
3
|
+
The agent-selection surface, its Claude-only model-alias guard, and the optional-
|
|
4
|
+
flags catalog. Loaded ONLY when `loopRunner.agentArgument` is present (the Step 2d
|
|
5
|
+
capability gate); when the gate is off, Step 2d is byte-identical to today and this
|
|
6
|
+
file is never read.
|
|
7
|
+
|
|
8
|
+
## Agent selection (Step 2d)
|
|
9
|
+
|
|
10
|
+
This section is **parallel** to `## Model selection precedence` in
|
|
11
|
+
`references/runner-contract.md`: it governs which **coding agent** rauf drives for the
|
|
12
|
+
run. The entire surface is
|
|
13
|
+
**presence-gated** on `loopRunner.agentArgument` — when that field is absent or
|
|
14
|
+
empty, there is no selector, no probe, and no `{agent}` substitution, and Step 2d /
|
|
15
|
+
Step 3c are byte-identical to today (capability gate;
|
|
16
|
+
`02-config-schema-and-gating.md`, REQ-PLUG-02). The rest assumes the gate is on.
|
|
17
|
+
|
|
18
|
+
**Precedence (highest wins):**
|
|
19
|
+
|
|
20
|
+
```
|
|
21
|
+
item.provider > --agent (run selection) > loopRunner.defaultAgent (project) > runner default (claude-cli)
|
|
22
|
+
```
|
|
23
|
+
|
|
24
|
+
**Run-layer mapping — why forge never re-implements rauf's resolver.** forge owns
|
|
25
|
+
**only** its run and project layers and collapses them into **one** value
|
|
26
|
+
(`resolve()`: `run_selection or defaultAgent or none`), which it emits as a single
|
|
27
|
+
`--agent {agent}` occupying rauf's **run layer only**. rauf alone resolves
|
|
28
|
+
item-vs-run via its own 5-layer resolver, sitting the per-item `BacklogItem.provider`
|
|
29
|
+
**above** forge's run layer — so a run selection can never clobber a deliberate
|
|
30
|
+
per-item agent. forge **never reads, writes, or overrides** `BacklogItem.provider`
|
|
31
|
+
(REQ-AGENT-05). When forge sends nothing (the default path), rauf applies its own
|
|
32
|
+
default `claude-cli`, byte-identical to today. Empty/whitespace selections are
|
|
33
|
+
treated as unset, and an explicit pick of the runner default id collapses to the
|
|
34
|
+
default path (append nothing, run no probe). See
|
|
35
|
+
`03-selection-resolution-observability.md §3–§4`.
|
|
36
|
+
|
|
37
|
+
**Availability pre-check + disambiguation.** For a **non-default** resolved id only,
|
|
38
|
+
forge runs `loopRunner.agentsProbeCommand` **once** (no retries) and classifies the
|
|
39
|
+
id by **membership** in the advertised set (`{ row.id for row in agents }`), then the
|
|
40
|
+
matching row's `available` flag — **never** by exit code, because `rauf agents
|
|
41
|
+
--json` always exits 0 (an unknown id is simply absent; a known-unavailable one is
|
|
42
|
+
present with `available: false`):
|
|
43
|
+
|
|
44
|
+
- **UNKNOWN** (`∉` advertised set): hard-reject **before any loop side-effect**,
|
|
45
|
+
listing the sorted valid ids; **no proceed-anyway**; the value never interpolates
|
|
46
|
+
into `{agent}` (the advertised set IS the allow-list — REQ-SEC-01).
|
|
47
|
+
- **UNAVAILABLE** (member, `available == False`): warn with the row's `detail`, then
|
|
48
|
+
offer **proceed-anyway OR choose-another** — never silent.
|
|
49
|
+
- **AVAILABLE** (member, `available == True`): proceed; the validated id fills
|
|
50
|
+
`{agent}`.
|
|
51
|
+
- **Probe failure** (non-zero exit / unparseable / wrong shape / empty `agents[]` /
|
|
52
|
+
row missing `id`): surface it and offer **choose-another OR abort**; never launch
|
|
53
|
+
the non-default agent unvalidated, never silently fall back to the default.
|
|
54
|
+
|
|
55
|
+
The default / `claude-cli` path runs **no** probe (zero extra cost). See
|
|
56
|
+
`04-availability-precheck.md` for the full pre-check, classification, and allow-list,
|
|
57
|
+
and `02-config-schema-and-gating.md` for the capability gate.
|
|
58
|
+
|
|
59
|
+
> **Probe false-negative for Claude Code installs (advisory).** `rauf agents` may
|
|
60
|
+
> report `claude-cli` **unavailable** (e.g. *"credentials file not found:
|
|
61
|
+
> ~/.config/claude-code/credentials.json"*) even when a working `claude` CLI
|
|
62
|
+
> authenticates elsewhere — the probe's credential heuristic doesn't cover every
|
|
63
|
+
> install. This is a rauf probe concern, not something forge-5-loop fixes. The
|
|
64
|
+
> **default-agent path skips the probe entirely**, so an ordinary default run is
|
|
65
|
+
> unaffected; only an **explicit** `--agent claude-cli` would be flagged UNAVAILABLE,
|
|
66
|
+
> and the existing **proceed-anyway** path (above) covers it. Do not attempt to
|
|
67
|
+
> patch rauf's probe from here.
|
|
68
|
+
|
|
69
|
+
### Claude-only model-alias guard (Step 2d, sub-step d-model)
|
|
70
|
+
|
|
71
|
+
When the resolved agent is **non-default** (not the default / `claude-cli` path),
|
|
72
|
+
forge must guard against a backlog whose items pin **Claude-specific** model aliases.
|
|
73
|
+
forge-4-backlog (via the rauf author-backlog skill) writes Claude tier aliases
|
|
74
|
+
(`opus` / `sonnet`) into each item's `model`. Because rauf's precedence puts
|
|
75
|
+
`item.model` **above** `--agent`, the alias is forwarded verbatim to the selected
|
|
76
|
+
agent; a non-Claude agent (e.g. codex) then 400s — *"The 'sonnet' model is not
|
|
77
|
+
supported when using Codex with a ChatGPT account."* — so **every** spawn exits 1 and
|
|
78
|
+
rauf reports *"Circuit breaker: 3 consecutive infra failures — halting"* with no hint
|
|
79
|
+
of the real cause. forge-5-loop therefore detects Claude-specific `model` aliases in
|
|
80
|
+
the backlog (tier aliases `opus`/`sonnet`/`haiku` or `claude-*` ids) and, before
|
|
81
|
+
launch, **warns** and offers (via `AskUserQuestion`) to **strip `model` for this run**
|
|
82
|
+
(remove the key from each affected item so each spawn uses the agent's own default) or
|
|
83
|
+
**proceed as-is**. forge only ever touches the `model` field — never `provider`. The
|
|
84
|
+
default / `claude-cli` path skips this guard (the aliases are valid there).
|
|
85
|
+
|
|
86
|
+
> **Follow-up (out of scope here — rauf repo).** The durable fix would be for the
|
|
87
|
+
> rauf `author-backlog` skill to keep `model` **provider-neutral** by default (or to
|
|
88
|
+
> document that writing a tier alias binds the backlog to Claude agents). That lives
|
|
89
|
+
> in the separate rauf plugin/repo, not feature-forge; tracked as a follow-up.
|
|
90
|
+
>
|
|
91
|
+
> **Follow-up (out of scope here — rauf repo).** The durable fix for the root/sandbox
|
|
92
|
+
> refusal (see "Root/sandbox env guard" under
|
|
93
|
+
> `## Launch detail (Step 3b — background process)` in `references/runner-contract.md`)
|
|
94
|
+
> is for **rauf itself** to honor
|
|
95
|
+
> `IS_SANDBOX` when it launches `claude --dangerously-skip-permissions` as root (or to
|
|
96
|
+
> detect root+flag-refused and emit a clear error instead of an opaque circuit-break).
|
|
97
|
+
> feature-forge's launch-time export is the mitigation; the upstream fix lives in the
|
|
98
|
+
> rauf plugin/repo. Track as a follow-up.
|
|
99
|
+
|
|
100
|
+
## Optional flags catalog (Step 2d, rauf)
|
|
101
|
+
|
|
102
|
+
These are the optional flags the user may add to the rendered run command. If the
|
|
103
|
+
user requests additional flags, append them to the rendered run command.
|
|
104
|
+
|
|
105
|
+
```
|
|
106
|
+
--agent <id> Coding agent rauf drives this run (see `## Agent selection` above).
|
|
107
|
+
Only the runner's advertised ids are valid; an unknown id is
|
|
108
|
+
rejected before launch. Shown only when the runner advertises
|
|
109
|
+
an agent surface (loopRunner.agentArgument present).
|
|
110
|
+
--review Run a review pass after all iterations (extra agent session)
|
|
111
|
+
--model <model> Override the model (see `## Model selection precedence` in
|
|
112
|
+
`references/runner-contract.md`)
|
|
113
|
+
--timeout <min> Per-session timeout in minutes (default: 60)
|
|
114
|
+
--retry-blocked Unblock and retry previously blocked items
|
|
115
|
+
```
|
|
116
|
+
|
|
@@ -2,8 +2,10 @@
|
|
|
2
2
|
|
|
3
3
|
This file holds the detailed loop-runner contract relocated out of
|
|
4
4
|
`forge-5-loop/SKILL.md`: the event-stream vs. log-fallback **launch** detail
|
|
5
|
-
(Steps 3b/3d/3e), the structured-surface **monitoring** caveats, the **model
|
|
6
|
-
precedence** rule
|
|
5
|
+
(Steps 3b/3d/3e), the structured-surface **monitoring** caveats, and the **model
|
|
6
|
+
precedence** rule. The agent-selection surface, its Claude-only model-alias guard,
|
|
7
|
+
and the optional-flags catalog live in `references/agent-selection.md`, which is
|
|
8
|
+
read **only** when the Step 2d `loopRunner.agentArgument` capability gate is on.
|
|
7
9
|
Every command below is rendered from `loopRunner` with token substitution, as in
|
|
8
10
|
the skill body.
|
|
9
11
|
|
|
@@ -20,95 +22,6 @@ run, which overrides the project's configured default, which overrides the
|
|
|
20
22
|
runner/provider default. Pass `--model <model>` (optional flag below) to override
|
|
21
23
|
the project default for the whole run.
|
|
22
24
|
|
|
23
|
-
## Agent selection (Step 2d)
|
|
24
|
-
|
|
25
|
-
This section is **parallel** to `## Model selection precedence` above: it governs
|
|
26
|
-
which **coding agent** rauf drives for the run. The entire surface is
|
|
27
|
-
**presence-gated** on `loopRunner.agentArgument` — when that field is absent or
|
|
28
|
-
empty, there is no selector, no probe, and no `{agent}` substitution, and Step 2d /
|
|
29
|
-
Step 3c are byte-identical to today (capability gate;
|
|
30
|
-
`02-config-schema-and-gating.md`, REQ-PLUG-02). The rest assumes the gate is on.
|
|
31
|
-
|
|
32
|
-
**Precedence (highest wins):**
|
|
33
|
-
|
|
34
|
-
```
|
|
35
|
-
item.provider > --agent (run selection) > loopRunner.defaultAgent (project) > runner default (claude-cli)
|
|
36
|
-
```
|
|
37
|
-
|
|
38
|
-
**Run-layer mapping — why forge never re-implements rauf's resolver.** forge owns
|
|
39
|
-
**only** its run and project layers and collapses them into **one** value
|
|
40
|
-
(`resolve()`: `run_selection or defaultAgent or none`), which it emits as a single
|
|
41
|
-
`--agent {agent}` occupying rauf's **run layer only**. rauf alone resolves
|
|
42
|
-
item-vs-run via its own 5-layer resolver, sitting the per-item `BacklogItem.provider`
|
|
43
|
-
**above** forge's run layer — so a run selection can never clobber a deliberate
|
|
44
|
-
per-item agent. forge **never reads, writes, or overrides** `BacklogItem.provider`
|
|
45
|
-
(REQ-AGENT-05). When forge sends nothing (the default path), rauf applies its own
|
|
46
|
-
default `claude-cli`, byte-identical to today. Empty/whitespace selections are
|
|
47
|
-
treated as unset, and an explicit pick of the runner default id collapses to the
|
|
48
|
-
default path (append nothing, run no probe). See
|
|
49
|
-
`03-selection-resolution-observability.md §3–§4`.
|
|
50
|
-
|
|
51
|
-
**Availability pre-check + disambiguation.** For a **non-default** resolved id only,
|
|
52
|
-
forge runs `loopRunner.agentsProbeCommand` **once** (no retries) and classifies the
|
|
53
|
-
id by **membership** in the advertised set (`{ row.id for row in agents }`), then the
|
|
54
|
-
matching row's `available` flag — **never** by exit code, because `rauf agents
|
|
55
|
-
--json` always exits 0 (an unknown id is simply absent; a known-unavailable one is
|
|
56
|
-
present with `available: false`):
|
|
57
|
-
|
|
58
|
-
- **UNKNOWN** (`∉` advertised set): hard-reject **before any loop side-effect**,
|
|
59
|
-
listing the sorted valid ids; **no proceed-anyway**; the value never interpolates
|
|
60
|
-
into `{agent}` (the advertised set IS the allow-list — REQ-SEC-01).
|
|
61
|
-
- **UNAVAILABLE** (member, `available == False`): warn with the row's `detail`, then
|
|
62
|
-
offer **proceed-anyway OR choose-another** — never silent.
|
|
63
|
-
- **AVAILABLE** (member, `available == True`): proceed; the validated id fills
|
|
64
|
-
`{agent}`.
|
|
65
|
-
- **Probe failure** (non-zero exit / unparseable / wrong shape / empty `agents[]` /
|
|
66
|
-
row missing `id`): surface it and offer **choose-another OR abort**; never launch
|
|
67
|
-
the non-default agent unvalidated, never silently fall back to the default.
|
|
68
|
-
|
|
69
|
-
The default / `claude-cli` path runs **no** probe (zero extra cost). See
|
|
70
|
-
`04-availability-precheck.md` for the full pre-check, classification, and allow-list,
|
|
71
|
-
and `02-config-schema-and-gating.md` for the capability gate.
|
|
72
|
-
|
|
73
|
-
> **Probe false-negative for Claude Code installs (advisory).** `rauf agents` may
|
|
74
|
-
> report `claude-cli` **unavailable** (e.g. *"credentials file not found:
|
|
75
|
-
> ~/.config/claude-code/credentials.json"*) even when a working `claude` CLI
|
|
76
|
-
> authenticates elsewhere — the probe's credential heuristic doesn't cover every
|
|
77
|
-
> install. This is a rauf probe concern, not something forge-5-loop fixes. The
|
|
78
|
-
> **default-agent path skips the probe entirely**, so an ordinary default run is
|
|
79
|
-
> unaffected; only an **explicit** `--agent claude-cli` would be flagged UNAVAILABLE,
|
|
80
|
-
> and the existing **proceed-anyway** path (above) covers it. Do not attempt to
|
|
81
|
-
> patch rauf's probe from here.
|
|
82
|
-
|
|
83
|
-
### Claude-only model-alias guard (Step 2d, sub-step d-model)
|
|
84
|
-
|
|
85
|
-
When the resolved agent is **non-default** (not the default / `claude-cli` path),
|
|
86
|
-
forge must guard against a backlog whose items pin **Claude-specific** model aliases.
|
|
87
|
-
forge-4-backlog (via the rauf author-backlog skill) writes Claude tier aliases
|
|
88
|
-
(`opus` / `sonnet`) into each item's `model`. Because rauf's precedence puts
|
|
89
|
-
`item.model` **above** `--agent`, the alias is forwarded verbatim to the selected
|
|
90
|
-
agent; a non-Claude agent (e.g. codex) then 400s — *"The 'sonnet' model is not
|
|
91
|
-
supported when using Codex with a ChatGPT account."* — so **every** spawn exits 1 and
|
|
92
|
-
rauf reports *"Circuit breaker: 3 consecutive infra failures — halting"* with no hint
|
|
93
|
-
of the real cause. forge-5-loop therefore detects Claude-specific `model` aliases in
|
|
94
|
-
the backlog (tier aliases `opus`/`sonnet`/`haiku` or `claude-*` ids) and, before
|
|
95
|
-
launch, **warns** and offers (via `AskUserQuestion`) to **strip `model` for this run**
|
|
96
|
-
(remove the key from each affected item so each spawn uses the agent's own default) or
|
|
97
|
-
**proceed as-is**. forge only ever touches the `model` field — never `provider`. The
|
|
98
|
-
default / `claude-cli` path skips this guard (the aliases are valid there).
|
|
99
|
-
|
|
100
|
-
> **Follow-up (out of scope here — rauf repo).** The durable fix would be for the
|
|
101
|
-
> rauf `author-backlog` skill to keep `model` **provider-neutral** by default (or to
|
|
102
|
-
> document that writing a tier alias binds the backlog to Claude agents). That lives
|
|
103
|
-
> in the separate rauf plugin/repo, not feature-forge; tracked as a follow-up.
|
|
104
|
-
>
|
|
105
|
-
> **Follow-up (out of scope here — rauf repo).** The durable fix for the root/sandbox
|
|
106
|
-
> refusal (see "Root/sandbox env guard" under Step 3b) is for **rauf itself** to honor
|
|
107
|
-
> `IS_SANDBOX` when it launches `claude --dangerously-skip-permissions` as root (or to
|
|
108
|
-
> detect root+flag-refused and emit a clear error instead of an opaque circuit-break).
|
|
109
|
-
> feature-forge's launch-time export is the mitigation; the upstream fix lives in the
|
|
110
|
-
> rauf plugin/repo. Track as a follow-up.
|
|
111
|
-
|
|
112
25
|
## Run mode (Step 2d, rauf)
|
|
113
26
|
|
|
114
27
|
**Applies only when `loopRunner.name == "rauf"`.** rauf's `--review` runs a review
|
|
@@ -150,22 +63,6 @@ Notes:
|
|
|
150
63
|
byte-identical to the pre-review-default behavior. `--review` is a rauf-specific
|
|
151
64
|
flag; a swapped-in runner conforming to the contract need not support it.
|
|
152
65
|
|
|
153
|
-
## Optional flags catalog (Step 2d, rauf)
|
|
154
|
-
|
|
155
|
-
These are the optional flags the user may add to the rendered run command. If the
|
|
156
|
-
user requests additional flags, append them to the rendered run command.
|
|
157
|
-
|
|
158
|
-
```
|
|
159
|
-
--agent <id> Coding agent rauf drives this run (see Agent selection below).
|
|
160
|
-
Only the runner's advertised ids are valid; an unknown id is
|
|
161
|
-
rejected before launch. Shown only when the runner advertises
|
|
162
|
-
an agent surface (loopRunner.agentArgument present).
|
|
163
|
-
--review Run a review pass after all iterations (extra agent session)
|
|
164
|
-
--model <model> Override the model (see precedence above)
|
|
165
|
-
--timeout <min> Per-session timeout in minutes (default: 60)
|
|
166
|
-
--retry-blocked Unblock and retry previously blocked items
|
|
167
|
-
```
|
|
168
|
-
|
|
169
66
|
## Launch detail (Step 3b — background process)
|
|
170
67
|
|
|
171
68
|
Launch the loop **backgrounded** so it survives session end and does not block the
|
|
@@ -299,6 +196,16 @@ high and the noise low:
|
|
|
299
196
|
|
|
300
197
|
## Inform-user output template (Step 3c)
|
|
301
198
|
|
|
199
|
+
Step 3c's instruction, relocated verbatim from the SKILL body:
|
|
200
|
+
|
|
201
|
+
> Tell the user the run has started and that **this session is now actively
|
|
202
|
+
> supervising it** — they don't need to babysit a terminal — and surface the rendered
|
|
203
|
+
> `loopRunner` monitoring commands (`statusCommand` / `followCommand` / `logCommand` /
|
|
204
|
+
> `listCommand`) and the state-file locations under
|
|
205
|
+
> `{backlogDir}/{loopRunner.stateDir}/` so they can watch directly if they like. The
|
|
206
|
+
> verbatim "Loop started…" inform-user output template is in
|
|
207
|
+
> `references/runner-contract.md`.
|
|
208
|
+
|
|
302
209
|
This is the verbatim "Loop started…" output the session shows the user after
|
|
303
210
|
launch. Commands are the rendered `loopRunner` monitoring commands.
|
|
304
211
|
|
|
@@ -133,6 +133,8 @@ mkdir -p "<specsDir>"
|
|
|
133
133
|
If the host is Claude (the `AskUserQuestion` tool is available), also ensure the Claude-framed variant:
|
|
134
134
|
|
|
135
135
|
```bash
|
|
136
|
+
R="$(bash -c 'for d in "${CLAUDE_PLUGIN_ROOT:-}" "$HOME"/.claude/skills/feature-forge "$HOME"/.claude/plugins/cache/*/feature-forge/* "$HOME"/.claude/plugins/*/feature-forge "$HOME"/.agents/skills/feature-forge ./.agents/skills/feature-forge; do [ -x "$d/scripts/forge-root.sh" ] && exec "$d/scripts/forge-root.sh"; done')"
|
|
137
|
+
[ -n "$R" ] || { echo "feature-forge: cannot locate plugin root" >&2; exit 1; }
|
|
136
138
|
[ -f "<specsDir>/CLAUDE.md" ] || cp "$R/references/templates/specs-hygiene/CLAUDE.md" "<specsDir>/CLAUDE.md"
|
|
137
139
|
```
|
|
138
140
|
|
|
@@ -183,7 +185,11 @@ If the helper is unavailable (a non-Claude host without the resolver), skip this
|
|
|
183
185
|
|
|
184
186
|
## Pipeline State Protocol
|
|
185
187
|
|
|
186
|
-
|
|
188
|
+
Pipeline state is written by the `state-*` verbs of `scripts/forge-session.py` — never by hand. Each verb writes `{resolvedFeatureDir}/.pipeline-state.json` atomically, conforms to `references/pipeline-state-schema.json` by construction, and refreshes `updatedAt` for you, so no stage needs to read the schema in order to author state.
|
|
189
|
+
|
|
190
|
+
**Epic members MUST pass `--epic`.** Every `state-*` verb takes an optional `--epic "{epic}"`, and it is **required** whenever the feature is an epic member (its resolved directory is `{specsDir}/{epic}/{feature}/`, i.e. its state carries an `epic` back-pointer) — append it to **every** `state-*` call in this file and in every skill body, exactly as the `state-ecr` calls already do. Omit it only for a standalone feature. Without it the verb resolves the bare name itself and, mirroring `epic-manifest.py resolve`, refuses with exit 2 whenever more than one directory carries a state file rather than guessing which feature to write — so a same-named standalone feature can never be mutated in a member's place.
|
|
191
|
+
|
|
192
|
+
If a `state-*` verb exits 2, surface the plain `Error:` line from stderr verbatim, do **not** proceed to the next step of the surrounding protocol, and do **not** hand-author the JSON as a workaround. The stage remains resumable because the entry stamp is already on disk — re-run the verb once the cause is fixed.
|
|
187
193
|
|
|
188
194
|
### Staleness Detection (Read-Time)
|
|
189
195
|
|
|
@@ -214,7 +220,16 @@ Invoke this block at the **very start** of a pipeline entry point — `forge-1-p
|
|
|
214
220
|
- **Create** → `git switch -c {branchPrefix}{label}` (or `git checkout -b` if `switch` is unavailable). If the branch already exists, `git switch {branchPrefix}{label}`.
|
|
215
221
|
- **Stay** → proceed on the default branch; note that subsequent commits (and any `forge-5-loop` run) will land directly on `{defaultBranch}`.
|
|
216
222
|
|
|
217
|
-
**Record the branch.** After this block resolves,
|
|
223
|
+
**Record the branch.** After this block resolves, record the resulting branch name in the feature's top-level `branch` field by running `state-branch` (create/update it when the state file is first written for this stage). Emit the call **once the feature directory exists** — i.e. after Feature Directory Resolution and the Entry Stamp, **not** at this block: Branch Setup runs at the very start of the entry point, before any directory resolution, and a brand-new standalone feature may have no directory yet. Add `--epic "{epic}"` to the call when this feature is an epic member — required, per the Pipeline State Protocol.
|
|
224
|
+
|
|
225
|
+
```bash
|
|
226
|
+
R="$(bash -c 'for d in "${CLAUDE_PLUGIN_ROOT:-}" "$HOME"/.claude/skills/feature-forge "$HOME"/.claude/plugins/cache/*/feature-forge/* "$HOME"/.claude/plugins/*/feature-forge "$HOME"/.agents/skills/feature-forge ./.agents/skills/feature-forge; do [ -x "$d/scripts/forge-root.sh" ] && exec "$d/scripts/forge-root.sh"; done')"
|
|
227
|
+
[ -n "$R" ] || { echo "feature-forge: cannot locate plugin root" >&2; exit 1; }
|
|
228
|
+
python3 "$R/scripts/forge-session.py" state-branch \
|
|
229
|
+
--feature "{feature}" --branch "<name>" --specs-dir "{specsDir}"
|
|
230
|
+
```
|
|
231
|
+
|
|
232
|
+
Downstream stages and `forge-5-loop` read it to detect drift back onto the default branch.
|
|
218
233
|
|
|
219
234
|
## Branch Reconciliation
|
|
220
235
|
|
|
@@ -227,10 +242,19 @@ python3 "$R/scripts/forge-session.py" reconcile-branch --feature "{feature}" --s
|
|
|
227
242
|
```
|
|
228
243
|
|
|
229
244
|
Act on the emitted `action` (source of truth is where the state actually resolves, not the recorded field):
|
|
230
|
-
- **`adopt-current`** — you are on a non-default topic branch where the state resolves, and the recorded `branch` differs (a stale/imposed value).
|
|
245
|
+
- **`adopt-current`** — you are on a non-default topic branch where the state resolves, and the recorded `branch` differs (a stale/imposed value). Run `state-branch` (below) to write `newBranch` into the state `branch` field, with a **visible one-line note** ("recorded branch was `{stateBranch}`; work is on `{currentBranch}` — updating to match") — never silently, and **never push the user back** to the recorded branch (offer that only as a plain alternative).
|
|
231
246
|
- **`warn-drift`** — you are on the **default** branch and the state records a topic branch. Via `AskUserQuestion`, strongly recommend creating/switching to `{branchPrefix}{feature}` (then record it), still allowing **proceed on the default branch**. Never hard-stop.
|
|
232
247
|
- **`none`** / **`not-resolved`** — nothing to do; proceed.
|
|
233
248
|
|
|
249
|
+
The `adopt-current` write, with the portable plugin-root prelude. Add `--epic "{epic}"` when this feature is an epic member — required, per the Pipeline State Protocol:
|
|
250
|
+
|
|
251
|
+
```bash
|
|
252
|
+
R="$(bash -c 'for d in "${CLAUDE_PLUGIN_ROOT:-}" "$HOME"/.claude/skills/feature-forge "$HOME"/.claude/plugins/cache/*/feature-forge/* "$HOME"/.claude/plugins/*/feature-forge "$HOME"/.agents/skills/feature-forge ./.agents/skills/feature-forge; do [ -x "$d/scripts/forge-root.sh" ] && exec "$d/scripts/forge-root.sh"; done')"
|
|
253
|
+
[ -n "$R" ] || { echo "feature-forge: cannot locate plugin root" >&2; exit 1; }
|
|
254
|
+
python3 "$R/scripts/forge-session.py" state-branch \
|
|
255
|
+
--feature "{feature}" --branch "{newBranch}" --specs-dir "{specsDir}"
|
|
256
|
+
```
|
|
257
|
+
|
|
234
258
|
If the helper is unavailable (non-Claude host without the resolver), fall back to the manual check: current branch differs from recorded → adopt the current branch unless it is the default, in which case recommend creating `{branchPrefix}{feature}`.
|
|
235
259
|
|
|
236
260
|
## Git Commit Protocol
|
|
@@ -240,14 +264,29 @@ When `gitCommitAfterStage` is true, follow this exact order to avoid state incon
|
|
|
240
264
|
**Why two commits.** The stage's `.pipeline-state.json` is itself part of the staged commit, but the stage's `commitHash` cannot be known until *after* that commit is made. Recording it *inside* the same commit is a chicken-and-egg with no single-commit solution. Resolve it with a **deterministic two-commit sequence**, and **never** with `git commit --amend`: amending rewrites HEAD, so a hash captured before the amend points at an orphaned commit that is not in the final history (the exact defect this protocol exists to prevent).
|
|
241
265
|
|
|
242
266
|
1. **Stage specific files only:** `git add {specsDir}/{feature}/` — never use `git add -A` or `git add .`
|
|
243
|
-
2. **Commit 1 — artifacts + state, hash not yet known:**
|
|
244
|
-
3. **If Commit 1 succeeds — Commit 2 records the hash:** Capture the hash of Commit 1 (`git rev-parse HEAD`)
|
|
245
|
-
4. **If Commit 1 fails:** do NOT update pipeline state to complete. Report the error to the user and leave state as `in-progress` so the stage can be resumed. Common failure causes:
|
|
267
|
+
2. **Commit 1 — artifacts + state, hash not yet known:** Run `state-complete --feature {feature} --stage {stage} --version N …` (which sets this stage's `status: "complete"`, `completedAt`, `version`, `basedOnVersions`, `artifacts` and `commitHash: null`, and applies the downstream staleness cascade), then `git commit -m "{commitPrefix}({feature}): <action>"`. This is the stage's **artifact commit**; its hash is the provenance hash callers rely on.
|
|
268
|
+
3. **If Commit 1 succeeds — Commit 2 records the hash:** Capture the hash of Commit 1 (`git rev-parse HEAD`) by running `state-complete --feature {feature} --stage {stage} --version N --commit-hash $(git rev-parse HEAD)`, which writes it into this stage's `commitHash` and touches nothing else, then commit only that one-line change: `git add {specsDir}/{feature}/.pipeline-state.json && git commit -m "{commitPrefix}({feature}): record stage commit hash"`. The stored `commitHash` now points at the artifact commit (Commit 1) — never at Commit 2, and never at an orphaned amend. The working tree is clean afterward, so the next stage's dirty-tree check passes.
|
|
269
|
+
4. **If Commit 1 fails:** do NOT update pipeline state to complete. Report the error to the user and leave state as `in-progress` so the stage can be resumed. Do that with `state-complete --feature {feature} --stage {stage} --version N --resumable`, which records **only** `status` — no `completedAt`, no version bump, no `basedOnVersions`/`artifacts`, no `commitHash` reset, and no staleness cascade, so the stage stays resumable. (`--version` is still REQUIRED by argparse and must be passed even though `--resumable` does not write it; omitting it makes the recovery command exit 2 every time.) Common failure causes:
|
|
246
270
|
- **Pre-commit hook failure:** Report the hook output. Never use `--no-verify` to bypass. Help the user fix the underlying issue.
|
|
247
271
|
- **Merge conflicts:** Report conflicting files. Suggest resolution steps appropriate to the conflict.
|
|
248
|
-
- **Nothing to commit:** If all artifacts were already committed, this is fine — mark the stage `complete`, leave `commitHash` at its existing value (or `null` if there was never an artifact commit), and skip Commit 2. There is no new artifact commit to record.
|
|
272
|
+
- **Nothing to commit:** If all artifacts were already committed, this is fine — mark the stage `complete`, leave `commitHash` at its existing value (or `null` if there was never an artifact commit), and skip Commit 2. Pass `--preserve-commit-hash` on the Commit-1 `state-complete` call so the recorded hash is left alone instead of being reset to `null`. There is no new artifact commit to record.
|
|
249
273
|
5. **Never** use `git add -A`, `--amend`, `--no-verify`, or `--force` flags
|
|
250
274
|
|
|
275
|
+
The two `state-complete` calls, with the portable plugin-root prelude. Add `--epic "{epic}"` to each when this feature is an epic member — required, per the Pipeline State Protocol:
|
|
276
|
+
|
|
277
|
+
```bash
|
|
278
|
+
R="$(bash -c 'for d in "${CLAUDE_PLUGIN_ROOT:-}" "$HOME"/.claude/skills/feature-forge "$HOME"/.claude/plugins/cache/*/feature-forge/* "$HOME"/.claude/plugins/*/feature-forge "$HOME"/.agents/skills/feature-forge ./.agents/skills/feature-forge; do [ -x "$d/scripts/forge-root.sh" ] && exec "$d/scripts/forge-root.sh"; done')"
|
|
279
|
+
[ -n "$R" ] || { echo "feature-forge: cannot locate plugin root" >&2; exit 1; }
|
|
280
|
+
# Commit 1 — before `git commit`
|
|
281
|
+
python3 "$R/scripts/forge-session.py" state-complete \
|
|
282
|
+
--feature "{feature}" --stage "{stage}" --version {n} \
|
|
283
|
+
--based-on "<upstream>=<n>" --artifact "<file>" --specs-dir "{specsDir}"
|
|
284
|
+
# Commit 2 — after Commit 1 lands, so its hash exists
|
|
285
|
+
python3 "$R/scripts/forge-session.py" state-complete \
|
|
286
|
+
--feature "{feature}" --stage "{stage}" --version {n} \
|
|
287
|
+
--commit-hash "$(git rev-parse HEAD)" --specs-dir "{specsDir}"
|
|
288
|
+
```
|
|
289
|
+
|
|
251
290
|
## Stage-Entry Guard
|
|
252
291
|
|
|
253
292
|
Invoke this block at the **start of an authoring stage** (`forge-1-prd`..`forge-4-backlog`), **after** Feature Directory Resolution and **before** any interview or (re-)authoring. It prevents a re-entered stage — an injected skill body or a re-invoked `Skill` — from blindly re-running the interview over an in-progress or already-complete draft. `{stage}` is the invoking skill's id (e.g. `forge-2-tech`).
|
|
@@ -263,16 +302,27 @@ Invoke this block at the **start of an authoring stage** (`forge-1-prd`..`forge-
|
|
|
263
302
|
|
|
264
303
|
3. **Re-authoring** (`status: "complete"` or `"stale"`) — a finished draft exists. Warn via `AskUserQuestion` before overwriting: "A completed {stage} artifact already exists for '{feature}' (v{n}{, marked stale}). Continuing will create a new version. Proceed?" On confirm, proceed to the Entry Stamp and author a new version (the version increments at exit, per that stage's Update-Pipeline-State step).
|
|
265
304
|
|
|
266
|
-
**Entry Stamp** (fresh, restart, and re-author paths — NOT the resume path). Before authoring, write
|
|
267
|
-
|
|
268
|
-
|
|
269
|
-
|
|
305
|
+
**Entry Stamp** (fresh, restart, and re-author paths — NOT the resume path). Before authoring, record the entry stamp by running `state-enter` — one atomic write that sets `stages.{stage}.status` → `"in-progress"`, `stages.{stage}.startedAt` → current ISO-8601 UTC timestamp, top-level `currentStage` → `"{stage}"` (where the pipeline IS, per O1), and refreshes `updatedAt`. Add `--epic "{epic}"` when this feature is an epic member — required, per the Pipeline State Protocol:
|
|
306
|
+
|
|
307
|
+
```bash
|
|
308
|
+
R="$(bash -c 'for d in "${CLAUDE_PLUGIN_ROOT:-}" "$HOME"/.claude/skills/feature-forge "$HOME"/.claude/plugins/cache/*/feature-forge/* "$HOME"/.claude/plugins/*/feature-forge "$HOME"/.agents/skills/feature-forge ./.agents/skills/feature-forge; do [ -x "$d/scripts/forge-root.sh" ] && exec "$d/scripts/forge-root.sh"; done')"
|
|
309
|
+
[ -n "$R" ] || { echo "feature-forge: cannot locate plugin root" >&2; exit 1; }
|
|
310
|
+
python3 "$R/scripts/forge-session.py" state-enter \
|
|
311
|
+
--feature "{feature}" --stage "{stage}" --specs-dir "{specsDir}"
|
|
312
|
+
```
|
|
270
313
|
|
|
271
314
|
This write is **left uncommitted**: it is staged and committed as part of this stage's existing exit commit (Git Commit Protocol), so no extra commit is needed at entry. If the run is interrupted after the stamp but before the exit commit, the marker survives on disk (uncommitted) and the next entry classifies as **Interrupted** — which is exactly the intent.
|
|
272
315
|
|
|
273
316
|
**Force Mode.** When `--force` is passed, skip the interactive gate: do not prompt for resume-vs-restart or the re-author warning. Treat entry as a fresh restart — apply the Entry Stamp and author. (`--force` already skips prerequisite checks; here it likewise bypasses the self-stage gate. Existing on-disk artifacts are still loaded per Force Mode.)
|
|
274
317
|
|
|
275
|
-
**Incremental artifact tracking:** When a stage writes multiple files (e.g. forge-3-specs writing a suite of spec documents),
|
|
318
|
+
**Incremental artifact tracking:** When a stage writes multiple files (e.g. forge-3-specs writing a suite of spec documents), run `state-artifact --feature {feature} --stage {stage} --path <file>` after writing each file — not just at stage completion. This is what makes the Interrupted inventory above precise about which files were successfully written. Add `--epic "{epic}"` when this feature is an epic member — required, per the Pipeline State Protocol.
|
|
319
|
+
|
|
320
|
+
```bash
|
|
321
|
+
R="$(bash -c 'for d in "${CLAUDE_PLUGIN_ROOT:-}" "$HOME"/.claude/skills/feature-forge "$HOME"/.claude/plugins/cache/*/feature-forge/* "$HOME"/.claude/plugins/*/feature-forge "$HOME"/.agents/skills/feature-forge ./.agents/skills/feature-forge; do [ -x "$d/scripts/forge-root.sh" ] && exec "$d/scripts/forge-root.sh"; done')"
|
|
322
|
+
[ -n "$R" ] || { echo "feature-forge: cannot locate plugin root" >&2; exit 1; }
|
|
323
|
+
python3 "$R/scripts/forge-session.py" state-artifact \
|
|
324
|
+
--feature "{feature}" --stage "{stage}" --path "<file>" --specs-dir "{specsDir}"
|
|
325
|
+
```
|
|
276
326
|
|
|
277
327
|
## Stage-Completion Re-check
|
|
278
328
|
|
|
@@ -182,10 +182,20 @@ concrete cache backend that `forge-2-tech` will design). Soliciting it here gues
|
|
|
182
182
|
of the stage that owns the context, and the answer has nowhere durable to live.
|
|
183
183
|
|
|
184
184
|
Instead, when you notice a decision that belongs downstream, **record it structurally** as
|
|
185
|
-
a `deferredDecisions[]` entry on this feature's `.pipeline-state.json`
|
|
186
|
-
`
|
|
187
|
-
`
|
|
188
|
-
|
|
185
|
+
a `deferredDecisions[]` entry on this feature's `.pipeline-state.json` by running
|
|
186
|
+
`state-decision` (`--rationale` and `--target-stage` are optional; the verb stamps
|
|
187
|
+
`raisedAt` and `status: "open"` for you). Add `--epic "{epic}"` when this feature is an
|
|
188
|
+
epic member — required, per the Pipeline State Protocol in `references/shared-conventions.md`:
|
|
189
|
+
|
|
190
|
+
```bash
|
|
191
|
+
R="$(bash -c 'for d in "${CLAUDE_PLUGIN_ROOT:-}" "$HOME"/.claude/skills/feature-forge "$HOME"/.claude/plugins/cache/*/feature-forge/* "$HOME"/.claude/plugins/*/feature-forge "$HOME"/.agents/skills/feature-forge ./.agents/skills/feature-forge; do [ -x "$d/scripts/forge-root.sh" ] && exec "$d/scripts/forge-root.sh"; done')"
|
|
192
|
+
[ -n "$R" ] || { echo "feature-forge: cannot locate plugin root" >&2; exit 1; }
|
|
193
|
+
python3 "$R/scripts/forge-session.py" state-decision \
|
|
194
|
+
--feature "{feature}" --question "<phrased for the target stage>" \
|
|
195
|
+
--rationale "<why it belongs downstream>" --target-stage "<owning stage>" \
|
|
196
|
+
--raised-by "{stage}" --specs-dir "{specsDir}"
|
|
197
|
+
```
|
|
198
|
+
|
|
189
199
|
This keeps the exit focused on *this* stage's next-step routing while carrying the open
|
|
190
200
|
question forward for the owning stage to resolve (it flips `status` to `addressed` when it
|
|
191
201
|
does). Prefer a `deferredDecisions[]` entry over stuffing the same thing into the free-text
|
|
@@ -170,12 +170,18 @@ Present the docs as text. Then use `AskUserQuestion` to collect feedback — do
|
|
|
170
170
|
|
|
171
171
|
## Step 5: Update Pipeline State and Commit
|
|
172
172
|
|
|
173
|
-
|
|
173
|
+
Pipeline state is written by the `state-*` verbs — see the Pipeline State Protocol in `references/shared-conventions.md`. The `state-complete` call for item 1, with the portable plugin-root prelude. Add `--epic "{epic}"` when this feature is an epic member — required, per that same protocol:
|
|
174
174
|
|
|
175
|
-
|
|
176
|
-
|
|
177
|
-
|
|
178
|
-
|
|
175
|
+
```bash
|
|
176
|
+
R="$(bash -c 'for d in "${CLAUDE_PLUGIN_ROOT:-}" "$HOME"/.claude/skills/feature-forge "$HOME"/.claude/plugins/cache/*/feature-forge/* "$HOME"/.claude/plugins/*/feature-forge "$HOME"/.agents/skills/feature-forge ./.agents/skills/feature-forge; do [ -x "$d/scripts/forge-root.sh" ] && exec "$d/scripts/forge-root.sh"; done')"
|
|
177
|
+
[ -n "$R" ] || { echo "feature-forge: cannot locate plugin root" >&2; exit 1; }
|
|
178
|
+
python3 "$R/scripts/forge-session.py" state-complete \
|
|
179
|
+
--feature "{feature}" --stage forge-6-docs --version {n} \
|
|
180
|
+
--based-on "forge-1-prd=<n>" --based-on "forge-2-tech=<n>" --based-on "forge-3-specs=<n>" \
|
|
181
|
+
--artifact "<doc file>" --specs-dir "{specsDir}"
|
|
182
|
+
```
|
|
183
|
+
|
|
184
|
+
1. Record completion by running the `state-complete` call above with `--version`, one `--artifact` per doc file this stage produced, and one `--based-on STAGE=<version>` per completed upstream stage. Always include forge-1-prd, forge-2-tech, forge-3-specs. Include forge-4-backlog and forge-5-loop ONLY if they have status `complete`. The verb sets `status: "complete"`, `completedAt`, the version, `basedOnVersions` and `artifacts`, and refreshes `updatedAt`.
|
|
179
185
|
2. If `gitCommitAfterStage` is true, follow the Git Commit Protocol in `references/shared-conventions.md`: stage files (`git add {docsDir}/{feature}/ {resolvedFeatureDir}/` — and **also** `{docsDir}/{epic}/` when an epic-level doc was written in Step 1), attempt commit with message `"{commitPrefix}({feature}): complete architecture docs"` (marking `stages.forge-6-docs.status` `complete` with `commitHash: null` in that commit), then record the artifact-commit hash via the protocol's two-commit follow-up (never `--amend`) only on success. If commit fails, leave status as `in-progress`.
|
|
180
186
|
4. Tell user: "Documentation complete. Feature pipeline for '{feature}' is finished!\n `/feature-forge:forge {feature}` to see the final pipeline status." Then **hand off to the next unit of work** — do not dead-end here (Issue #124):
|
|
181
187
|
|
|
@@ -133,6 +133,8 @@ mkdir -p "<specsDir>"
|
|
|
133
133
|
If the host is Claude (the `AskUserQuestion` tool is available), also ensure the Claude-framed variant:
|
|
134
134
|
|
|
135
135
|
```bash
|
|
136
|
+
R="$(bash -c 'for d in "${CLAUDE_PLUGIN_ROOT:-}" "$HOME"/.claude/skills/feature-forge "$HOME"/.claude/plugins/cache/*/feature-forge/* "$HOME"/.claude/plugins/*/feature-forge "$HOME"/.agents/skills/feature-forge ./.agents/skills/feature-forge; do [ -x "$d/scripts/forge-root.sh" ] && exec "$d/scripts/forge-root.sh"; done')"
|
|
137
|
+
[ -n "$R" ] || { echo "feature-forge: cannot locate plugin root" >&2; exit 1; }
|
|
136
138
|
[ -f "<specsDir>/CLAUDE.md" ] || cp "$R/references/templates/specs-hygiene/CLAUDE.md" "<specsDir>/CLAUDE.md"
|
|
137
139
|
```
|
|
138
140
|
|
|
@@ -183,7 +185,11 @@ If the helper is unavailable (a non-Claude host without the resolver), skip this
|
|
|
183
185
|
|
|
184
186
|
## Pipeline State Protocol
|
|
185
187
|
|
|
186
|
-
|
|
188
|
+
Pipeline state is written by the `state-*` verbs of `scripts/forge-session.py` — never by hand. Each verb writes `{resolvedFeatureDir}/.pipeline-state.json` atomically, conforms to `references/pipeline-state-schema.json` by construction, and refreshes `updatedAt` for you, so no stage needs to read the schema in order to author state.
|
|
189
|
+
|
|
190
|
+
**Epic members MUST pass `--epic`.** Every `state-*` verb takes an optional `--epic "{epic}"`, and it is **required** whenever the feature is an epic member (its resolved directory is `{specsDir}/{epic}/{feature}/`, i.e. its state carries an `epic` back-pointer) — append it to **every** `state-*` call in this file and in every skill body, exactly as the `state-ecr` calls already do. Omit it only for a standalone feature. Without it the verb resolves the bare name itself and, mirroring `epic-manifest.py resolve`, refuses with exit 2 whenever more than one directory carries a state file rather than guessing which feature to write — so a same-named standalone feature can never be mutated in a member's place.
|
|
191
|
+
|
|
192
|
+
If a `state-*` verb exits 2, surface the plain `Error:` line from stderr verbatim, do **not** proceed to the next step of the surrounding protocol, and do **not** hand-author the JSON as a workaround. The stage remains resumable because the entry stamp is already on disk — re-run the verb once the cause is fixed.
|
|
187
193
|
|
|
188
194
|
### Staleness Detection (Read-Time)
|
|
189
195
|
|
|
@@ -214,7 +220,16 @@ Invoke this block at the **very start** of a pipeline entry point — `forge-1-p
|
|
|
214
220
|
- **Create** → `git switch -c {branchPrefix}{label}` (or `git checkout -b` if `switch` is unavailable). If the branch already exists, `git switch {branchPrefix}{label}`.
|
|
215
221
|
- **Stay** → proceed on the default branch; note that subsequent commits (and any `forge-5-loop` run) will land directly on `{defaultBranch}`.
|
|
216
222
|
|
|
217
|
-
**Record the branch.** After this block resolves,
|
|
223
|
+
**Record the branch.** After this block resolves, record the resulting branch name in the feature's top-level `branch` field by running `state-branch` (create/update it when the state file is first written for this stage). Emit the call **once the feature directory exists** — i.e. after Feature Directory Resolution and the Entry Stamp, **not** at this block: Branch Setup runs at the very start of the entry point, before any directory resolution, and a brand-new standalone feature may have no directory yet. Add `--epic "{epic}"` to the call when this feature is an epic member — required, per the Pipeline State Protocol.
|
|
224
|
+
|
|
225
|
+
```bash
|
|
226
|
+
R="$(bash -c 'for d in "${CLAUDE_PLUGIN_ROOT:-}" "$HOME"/.claude/skills/feature-forge "$HOME"/.claude/plugins/cache/*/feature-forge/* "$HOME"/.claude/plugins/*/feature-forge "$HOME"/.agents/skills/feature-forge ./.agents/skills/feature-forge; do [ -x "$d/scripts/forge-root.sh" ] && exec "$d/scripts/forge-root.sh"; done')"
|
|
227
|
+
[ -n "$R" ] || { echo "feature-forge: cannot locate plugin root" >&2; exit 1; }
|
|
228
|
+
python3 "$R/scripts/forge-session.py" state-branch \
|
|
229
|
+
--feature "{feature}" --branch "<name>" --specs-dir "{specsDir}"
|
|
230
|
+
```
|
|
231
|
+
|
|
232
|
+
Downstream stages and `forge-5-loop` read it to detect drift back onto the default branch.
|
|
218
233
|
|
|
219
234
|
## Branch Reconciliation
|
|
220
235
|
|
|
@@ -227,10 +242,19 @@ python3 "$R/scripts/forge-session.py" reconcile-branch --feature "{feature}" --s
|
|
|
227
242
|
```
|
|
228
243
|
|
|
229
244
|
Act on the emitted `action` (source of truth is where the state actually resolves, not the recorded field):
|
|
230
|
-
- **`adopt-current`** — you are on a non-default topic branch where the state resolves, and the recorded `branch` differs (a stale/imposed value).
|
|
245
|
+
- **`adopt-current`** — you are on a non-default topic branch where the state resolves, and the recorded `branch` differs (a stale/imposed value). Run `state-branch` (below) to write `newBranch` into the state `branch` field, with a **visible one-line note** ("recorded branch was `{stateBranch}`; work is on `{currentBranch}` — updating to match") — never silently, and **never push the user back** to the recorded branch (offer that only as a plain alternative).
|
|
231
246
|
- **`warn-drift`** — you are on the **default** branch and the state records a topic branch. Via `AskUserQuestion`, strongly recommend creating/switching to `{branchPrefix}{feature}` (then record it), still allowing **proceed on the default branch**. Never hard-stop.
|
|
232
247
|
- **`none`** / **`not-resolved`** — nothing to do; proceed.
|
|
233
248
|
|
|
249
|
+
The `adopt-current` write, with the portable plugin-root prelude. Add `--epic "{epic}"` when this feature is an epic member — required, per the Pipeline State Protocol:
|
|
250
|
+
|
|
251
|
+
```bash
|
|
252
|
+
R="$(bash -c 'for d in "${CLAUDE_PLUGIN_ROOT:-}" "$HOME"/.claude/skills/feature-forge "$HOME"/.claude/plugins/cache/*/feature-forge/* "$HOME"/.claude/plugins/*/feature-forge "$HOME"/.agents/skills/feature-forge ./.agents/skills/feature-forge; do [ -x "$d/scripts/forge-root.sh" ] && exec "$d/scripts/forge-root.sh"; done')"
|
|
253
|
+
[ -n "$R" ] || { echo "feature-forge: cannot locate plugin root" >&2; exit 1; }
|
|
254
|
+
python3 "$R/scripts/forge-session.py" state-branch \
|
|
255
|
+
--feature "{feature}" --branch "{newBranch}" --specs-dir "{specsDir}"
|
|
256
|
+
```
|
|
257
|
+
|
|
234
258
|
If the helper is unavailable (non-Claude host without the resolver), fall back to the manual check: current branch differs from recorded → adopt the current branch unless it is the default, in which case recommend creating `{branchPrefix}{feature}`.
|
|
235
259
|
|
|
236
260
|
## Git Commit Protocol
|
|
@@ -240,14 +264,29 @@ When `gitCommitAfterStage` is true, follow this exact order to avoid state incon
|
|
|
240
264
|
**Why two commits.** The stage's `.pipeline-state.json` is itself part of the staged commit, but the stage's `commitHash` cannot be known until *after* that commit is made. Recording it *inside* the same commit is a chicken-and-egg with no single-commit solution. Resolve it with a **deterministic two-commit sequence**, and **never** with `git commit --amend`: amending rewrites HEAD, so a hash captured before the amend points at an orphaned commit that is not in the final history (the exact defect this protocol exists to prevent).
|
|
241
265
|
|
|
242
266
|
1. **Stage specific files only:** `git add {specsDir}/{feature}/` — never use `git add -A` or `git add .`
|
|
243
|
-
2. **Commit 1 — artifacts + state, hash not yet known:**
|
|
244
|
-
3. **If Commit 1 succeeds — Commit 2 records the hash:** Capture the hash of Commit 1 (`git rev-parse HEAD`)
|
|
245
|
-
4. **If Commit 1 fails:** do NOT update pipeline state to complete. Report the error to the user and leave state as `in-progress` so the stage can be resumed. Common failure causes:
|
|
267
|
+
2. **Commit 1 — artifacts + state, hash not yet known:** Run `state-complete --feature {feature} --stage {stage} --version N …` (which sets this stage's `status: "complete"`, `completedAt`, `version`, `basedOnVersions`, `artifacts` and `commitHash: null`, and applies the downstream staleness cascade), then `git commit -m "{commitPrefix}({feature}): <action>"`. This is the stage's **artifact commit**; its hash is the provenance hash callers rely on.
|
|
268
|
+
3. **If Commit 1 succeeds — Commit 2 records the hash:** Capture the hash of Commit 1 (`git rev-parse HEAD`) by running `state-complete --feature {feature} --stage {stage} --version N --commit-hash $(git rev-parse HEAD)`, which writes it into this stage's `commitHash` and touches nothing else, then commit only that one-line change: `git add {specsDir}/{feature}/.pipeline-state.json && git commit -m "{commitPrefix}({feature}): record stage commit hash"`. The stored `commitHash` now points at the artifact commit (Commit 1) — never at Commit 2, and never at an orphaned amend. The working tree is clean afterward, so the next stage's dirty-tree check passes.
|
|
269
|
+
4. **If Commit 1 fails:** do NOT update pipeline state to complete. Report the error to the user and leave state as `in-progress` so the stage can be resumed. Do that with `state-complete --feature {feature} --stage {stage} --version N --resumable`, which records **only** `status` — no `completedAt`, no version bump, no `basedOnVersions`/`artifacts`, no `commitHash` reset, and no staleness cascade, so the stage stays resumable. (`--version` is still REQUIRED by argparse and must be passed even though `--resumable` does not write it; omitting it makes the recovery command exit 2 every time.) Common failure causes:
|
|
246
270
|
- **Pre-commit hook failure:** Report the hook output. Never use `--no-verify` to bypass. Help the user fix the underlying issue.
|
|
247
271
|
- **Merge conflicts:** Report conflicting files. Suggest resolution steps appropriate to the conflict.
|
|
248
|
-
- **Nothing to commit:** If all artifacts were already committed, this is fine — mark the stage `complete`, leave `commitHash` at its existing value (or `null` if there was never an artifact commit), and skip Commit 2. There is no new artifact commit to record.
|
|
272
|
+
- **Nothing to commit:** If all artifacts were already committed, this is fine — mark the stage `complete`, leave `commitHash` at its existing value (or `null` if there was never an artifact commit), and skip Commit 2. Pass `--preserve-commit-hash` on the Commit-1 `state-complete` call so the recorded hash is left alone instead of being reset to `null`. There is no new artifact commit to record.
|
|
249
273
|
5. **Never** use `git add -A`, `--amend`, `--no-verify`, or `--force` flags
|
|
250
274
|
|
|
275
|
+
The two `state-complete` calls, with the portable plugin-root prelude. Add `--epic "{epic}"` to each when this feature is an epic member — required, per the Pipeline State Protocol:
|
|
276
|
+
|
|
277
|
+
```bash
|
|
278
|
+
R="$(bash -c 'for d in "${CLAUDE_PLUGIN_ROOT:-}" "$HOME"/.claude/skills/feature-forge "$HOME"/.claude/plugins/cache/*/feature-forge/* "$HOME"/.claude/plugins/*/feature-forge "$HOME"/.agents/skills/feature-forge ./.agents/skills/feature-forge; do [ -x "$d/scripts/forge-root.sh" ] && exec "$d/scripts/forge-root.sh"; done')"
|
|
279
|
+
[ -n "$R" ] || { echo "feature-forge: cannot locate plugin root" >&2; exit 1; }
|
|
280
|
+
# Commit 1 — before `git commit`
|
|
281
|
+
python3 "$R/scripts/forge-session.py" state-complete \
|
|
282
|
+
--feature "{feature}" --stage "{stage}" --version {n} \
|
|
283
|
+
--based-on "<upstream>=<n>" --artifact "<file>" --specs-dir "{specsDir}"
|
|
284
|
+
# Commit 2 — after Commit 1 lands, so its hash exists
|
|
285
|
+
python3 "$R/scripts/forge-session.py" state-complete \
|
|
286
|
+
--feature "{feature}" --stage "{stage}" --version {n} \
|
|
287
|
+
--commit-hash "$(git rev-parse HEAD)" --specs-dir "{specsDir}"
|
|
288
|
+
```
|
|
289
|
+
|
|
251
290
|
## Stage-Entry Guard
|
|
252
291
|
|
|
253
292
|
Invoke this block at the **start of an authoring stage** (`forge-1-prd`..`forge-4-backlog`), **after** Feature Directory Resolution and **before** any interview or (re-)authoring. It prevents a re-entered stage — an injected skill body or a re-invoked `Skill` — from blindly re-running the interview over an in-progress or already-complete draft. `{stage}` is the invoking skill's id (e.g. `forge-2-tech`).
|
|
@@ -263,16 +302,27 @@ Invoke this block at the **start of an authoring stage** (`forge-1-prd`..`forge-
|
|
|
263
302
|
|
|
264
303
|
3. **Re-authoring** (`status: "complete"` or `"stale"`) — a finished draft exists. Warn via `AskUserQuestion` before overwriting: "A completed {stage} artifact already exists for '{feature}' (v{n}{, marked stale}). Continuing will create a new version. Proceed?" On confirm, proceed to the Entry Stamp and author a new version (the version increments at exit, per that stage's Update-Pipeline-State step).
|
|
265
304
|
|
|
266
|
-
**Entry Stamp** (fresh, restart, and re-author paths — NOT the resume path). Before authoring, write
|
|
267
|
-
|
|
268
|
-
|
|
269
|
-
|
|
305
|
+
**Entry Stamp** (fresh, restart, and re-author paths — NOT the resume path). Before authoring, record the entry stamp by running `state-enter` — one atomic write that sets `stages.{stage}.status` → `"in-progress"`, `stages.{stage}.startedAt` → current ISO-8601 UTC timestamp, top-level `currentStage` → `"{stage}"` (where the pipeline IS, per O1), and refreshes `updatedAt`. Add `--epic "{epic}"` when this feature is an epic member — required, per the Pipeline State Protocol:
|
|
306
|
+
|
|
307
|
+
```bash
|
|
308
|
+
R="$(bash -c 'for d in "${CLAUDE_PLUGIN_ROOT:-}" "$HOME"/.claude/skills/feature-forge "$HOME"/.claude/plugins/cache/*/feature-forge/* "$HOME"/.claude/plugins/*/feature-forge "$HOME"/.agents/skills/feature-forge ./.agents/skills/feature-forge; do [ -x "$d/scripts/forge-root.sh" ] && exec "$d/scripts/forge-root.sh"; done')"
|
|
309
|
+
[ -n "$R" ] || { echo "feature-forge: cannot locate plugin root" >&2; exit 1; }
|
|
310
|
+
python3 "$R/scripts/forge-session.py" state-enter \
|
|
311
|
+
--feature "{feature}" --stage "{stage}" --specs-dir "{specsDir}"
|
|
312
|
+
```
|
|
270
313
|
|
|
271
314
|
This write is **left uncommitted**: it is staged and committed as part of this stage's existing exit commit (Git Commit Protocol), so no extra commit is needed at entry. If the run is interrupted after the stamp but before the exit commit, the marker survives on disk (uncommitted) and the next entry classifies as **Interrupted** — which is exactly the intent.
|
|
272
315
|
|
|
273
316
|
**Force Mode.** When `--force` is passed, skip the interactive gate: do not prompt for resume-vs-restart or the re-author warning. Treat entry as a fresh restart — apply the Entry Stamp and author. (`--force` already skips prerequisite checks; here it likewise bypasses the self-stage gate. Existing on-disk artifacts are still loaded per Force Mode.)
|
|
274
317
|
|
|
275
|
-
**Incremental artifact tracking:** When a stage writes multiple files (e.g. forge-3-specs writing a suite of spec documents),
|
|
318
|
+
**Incremental artifact tracking:** When a stage writes multiple files (e.g. forge-3-specs writing a suite of spec documents), run `state-artifact --feature {feature} --stage {stage} --path <file>` after writing each file — not just at stage completion. This is what makes the Interrupted inventory above precise about which files were successfully written. Add `--epic "{epic}"` when this feature is an epic member — required, per the Pipeline State Protocol.
|
|
319
|
+
|
|
320
|
+
```bash
|
|
321
|
+
R="$(bash -c 'for d in "${CLAUDE_PLUGIN_ROOT:-}" "$HOME"/.claude/skills/feature-forge "$HOME"/.claude/plugins/cache/*/feature-forge/* "$HOME"/.claude/plugins/*/feature-forge "$HOME"/.agents/skills/feature-forge ./.agents/skills/feature-forge; do [ -x "$d/scripts/forge-root.sh" ] && exec "$d/scripts/forge-root.sh"; done')"
|
|
322
|
+
[ -n "$R" ] || { echo "feature-forge: cannot locate plugin root" >&2; exit 1; }
|
|
323
|
+
python3 "$R/scripts/forge-session.py" state-artifact \
|
|
324
|
+
--feature "{feature}" --stage "{stage}" --path "<file>" --specs-dir "{specsDir}"
|
|
325
|
+
```
|
|
276
326
|
|
|
277
327
|
## Stage-Completion Re-check
|
|
278
328
|
|