@garygentry/feature-forge 0.3.1 → 0.3.4
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/adapters/claude/.feature-forge-bundle.json +1 -1
- package/adapters/claude/agents/forge-verifier.md +3 -1
- package/adapters/claude/references/decisions/single-writer-threat-model.md +53 -0
- package/adapters/claude/references/epic-manifest-schema.json +6 -1
- package/adapters/claude/references/epic-state-schema.json +50 -0
- package/adapters/claude/references/forge-config-schema.json +19 -1
- package/adapters/claude/references/forge-decisions-schema.json +33 -0
- package/adapters/claude/references/pipeline-state-schema.json +38 -4
- package/adapters/claude/references/ralph-loop-contract.md +6 -3
- package/adapters/claude/references/shared-conventions.md +77 -3
- package/adapters/claude/references/stage-exit-protocol.md +391 -143
- package/adapters/claude/scripts/epic-manifest.py +495 -91
- package/adapters/claude/scripts/fix-sweep.py +1180 -0
- package/adapters/claude/scripts/forge-bootstrap.py +57 -5
- package/adapters/claude/scripts/forge-session.py +4241 -146
- package/adapters/claude/scripts/validate-traceability.py +86 -5
- package/adapters/claude/skills/forge/SKILL.md +10 -9
- package/adapters/claude/skills/forge/references/pipeline-state-schema.json +38 -4
- package/adapters/claude/skills/forge/references/shared-conventions.md +77 -3
- package/adapters/claude/skills/forge/references/stage-exit-protocol.md +391 -143
- package/adapters/claude/skills/forge-0-epic/SKILL.md +7 -2
- package/adapters/claude/skills/forge-0-epic/references/edit-mode.md +29 -25
- package/adapters/claude/skills/forge-0-epic/references/epic-manifest-subcommands.md +5 -0
- package/adapters/claude/skills/forge-0-epic/references/pipeline-state-schema.json +38 -4
- package/adapters/claude/skills/forge-0-epic/references/shared-conventions.md +77 -3
- package/adapters/claude/skills/forge-0-epic/references/stage-exit-protocol.md +391 -143
- package/adapters/claude/skills/forge-1-prd/SKILL.md +17 -4
- package/adapters/claude/skills/forge-1-prd/references/shared-conventions.md +77 -3
- package/adapters/claude/skills/forge-1-prd/references/stage-exit-protocol.md +391 -143
- package/adapters/claude/skills/forge-2-tech/SKILL.md +18 -4
- package/adapters/claude/skills/forge-2-tech/references/shared-conventions.md +77 -3
- package/adapters/claude/skills/forge-2-tech/references/stage-exit-protocol.md +391 -143
- package/adapters/claude/skills/forge-3-specs/SKILL.md +9 -3
- package/adapters/claude/skills/forge-3-specs/references/shared-conventions.md +77 -3
- package/adapters/claude/skills/forge-3-specs/references/spec-archetypes.md +9 -0
- package/adapters/claude/skills/forge-3-specs/references/stage-exit-protocol.md +391 -143
- package/adapters/claude/skills/forge-4-backlog/SKILL.md +56 -5
- package/adapters/claude/skills/forge-4-backlog/references/shared-conventions.md +77 -3
- package/adapters/claude/skills/forge-4-backlog/references/stage-exit-protocol.md +391 -143
- package/adapters/claude/skills/forge-5-loop/SKILL.md +67 -69
- package/adapters/claude/skills/forge-5-loop/references/agent-selection.md +16 -0
- package/adapters/claude/skills/forge-5-loop/references/ralph-loop-contract.md +6 -3
- package/adapters/claude/skills/forge-5-loop/references/recovery-procedure.md +349 -0
- package/adapters/claude/skills/forge-5-loop/references/result-reporting.md +101 -33
- package/adapters/claude/skills/forge-5-loop/references/runner-contract.md +26 -6
- package/adapters/claude/skills/forge-5-loop/references/shared-conventions.md +77 -3
- package/adapters/claude/skills/forge-5-loop/references/stage-exit-protocol.md +391 -143
- package/adapters/claude/skills/forge-6-docs/SKILL.md +75 -8
- package/adapters/claude/skills/forge-6-docs/references/shared-conventions.md +77 -3
- package/adapters/claude/skills/forge-6-docs/references/stage-exit-protocol.md +516 -0
- package/adapters/claude/skills/forge-fix/SKILL.md +119 -33
- package/adapters/claude/skills/forge-fix/references/shared-conventions.md +77 -3
- package/adapters/claude/skills/forge-fix/references/stage-exit-protocol.md +391 -143
- package/adapters/claude/skills/forge-guide/references/forge-config-schema.json +19 -1
- package/adapters/claude/skills/forge-guide/references/ralph-loop-contract.md +6 -3
- package/adapters/claude/skills/forge-guide/references/shared-conventions.md +77 -3
- package/adapters/claude/skills/forge-verify/SKILL.md +82 -51
- package/adapters/claude/skills/forge-verify/references/decisions/single-writer-threat-model.md +53 -0
- package/adapters/claude/skills/forge-verify/references/findings-template.md +69 -49
- package/adapters/claude/skills/forge-verify/references/shared-conventions.md +77 -3
- package/adapters/claude/skills/forge-verify/references/stage-exit-protocol.md +516 -0
- package/adapters/claude/skills/forge-verify/references/verification-checklists/backlog.md +73 -0
- package/adapters/claude/skills/forge-verify/references/verification-checklists/epic.md +4 -3
- package/adapters/claude/skills/forge-verify/references/verification-checklists/impl.md +85 -0
- package/adapters/claude/skills/forge-verify/references/verification-checklists/specs.md +45 -1
- package/adapters/codex/.feature-forge-bundle.json +1 -1
- package/adapters/codex/agents/forge-verifier.toml +3 -1
- package/adapters/codex/references/decisions/single-writer-threat-model.md +53 -0
- package/adapters/codex/references/epic-manifest-schema.json +6 -1
- package/adapters/codex/references/epic-state-schema.json +50 -0
- package/adapters/codex/references/forge-config-schema.json +19 -1
- package/adapters/codex/references/forge-decisions-schema.json +33 -0
- package/adapters/codex/references/pipeline-state-schema.json +38 -4
- package/adapters/codex/references/process-overview.md +2 -2
- package/adapters/codex/references/ralph-loop-contract.md +6 -3
- package/adapters/codex/references/shared-conventions.md +102 -28
- package/adapters/codex/references/stage-exit-protocol.md +395 -147
- package/adapters/codex/scripts/epic-manifest.py +495 -91
- package/adapters/codex/scripts/fix-sweep.py +1180 -0
- package/adapters/codex/scripts/forge-bootstrap.py +57 -5
- package/adapters/codex/scripts/forge-session.py +4241 -146
- package/adapters/codex/scripts/validate-traceability.py +86 -5
- package/adapters/codex/skills/forge/SKILL.md +13 -12
- package/adapters/codex/skills/forge/references/pipeline-state-schema.json +38 -4
- package/adapters/codex/skills/forge/references/process-overview.md +2 -2
- package/adapters/codex/skills/forge/references/shared-conventions.md +102 -28
- package/adapters/codex/skills/forge/references/stage-exit-protocol.md +395 -147
- package/adapters/codex/skills/forge-0-epic/SKILL.md +7 -2
- package/adapters/codex/skills/forge-0-epic/references/edit-mode.md +37 -33
- package/adapters/codex/skills/forge-0-epic/references/epic-manifest-subcommands.md +8 -3
- package/adapters/codex/skills/forge-0-epic/references/pipeline-state-schema.json +38 -4
- package/adapters/codex/skills/forge-0-epic/references/shared-conventions.md +102 -28
- package/adapters/codex/skills/forge-0-epic/references/stage-exit-protocol.md +395 -147
- package/adapters/codex/skills/forge-1-prd/SKILL.md +17 -4
- package/adapters/codex/skills/forge-1-prd/references/shared-conventions.md +102 -28
- package/adapters/codex/skills/forge-1-prd/references/stage-exit-protocol.md +395 -147
- package/adapters/codex/skills/forge-2-tech/SKILL.md +18 -4
- package/adapters/codex/skills/forge-2-tech/references/shared-conventions.md +102 -28
- package/adapters/codex/skills/forge-2-tech/references/stage-exit-protocol.md +395 -147
- package/adapters/codex/skills/forge-3-specs/SKILL.md +9 -3
- package/adapters/codex/skills/forge-3-specs/references/shared-conventions.md +102 -28
- package/adapters/codex/skills/forge-3-specs/references/spec-archetypes.md +9 -0
- package/adapters/codex/skills/forge-3-specs/references/stage-exit-protocol.md +395 -147
- package/adapters/codex/skills/forge-4-backlog/SKILL.md +56 -5
- package/adapters/codex/skills/forge-4-backlog/references/shared-conventions.md +102 -28
- package/adapters/codex/skills/forge-4-backlog/references/stage-exit-protocol.md +395 -147
- package/adapters/codex/skills/forge-5-loop/SKILL.md +67 -69
- package/adapters/codex/skills/forge-5-loop/references/agent-selection.md +17 -1
- package/adapters/codex/skills/forge-5-loop/references/ralph-loop-contract.md +6 -3
- package/adapters/codex/skills/forge-5-loop/references/recovery-procedure.md +349 -0
- package/adapters/codex/skills/forge-5-loop/references/result-reporting.md +101 -33
- package/adapters/codex/skills/forge-5-loop/references/runner-contract.md +30 -10
- package/adapters/codex/skills/forge-5-loop/references/shared-conventions.md +102 -28
- package/adapters/codex/skills/forge-5-loop/references/stage-exit-protocol.md +395 -147
- package/adapters/codex/skills/forge-6-docs/SKILL.md +75 -8
- package/adapters/codex/skills/forge-6-docs/references/shared-conventions.md +102 -28
- package/adapters/codex/skills/forge-6-docs/references/stage-exit-protocol.md +516 -0
- package/adapters/codex/skills/forge-fix/SKILL.md +118 -32
- package/adapters/codex/skills/forge-fix/references/shared-conventions.md +102 -28
- package/adapters/codex/skills/forge-fix/references/stage-exit-protocol.md +395 -147
- package/adapters/codex/skills/forge-guide/SKILL.md +1 -1
- package/adapters/codex/skills/forge-guide/references/forge-config-schema.json +19 -1
- package/adapters/codex/skills/forge-guide/references/process-overview.md +2 -2
- package/adapters/codex/skills/forge-guide/references/ralph-loop-contract.md +6 -3
- package/adapters/codex/skills/forge-guide/references/shared-conventions.md +102 -28
- package/adapters/codex/skills/forge-init/SKILL.md +1 -1
- package/adapters/codex/skills/forge-verify/SKILL.md +82 -51
- package/adapters/codex/skills/forge-verify/references/decisions/single-writer-threat-model.md +53 -0
- package/adapters/codex/skills/forge-verify/references/findings-template.md +70 -50
- package/adapters/codex/skills/forge-verify/references/shared-conventions.md +102 -28
- package/adapters/codex/skills/forge-verify/references/stage-exit-protocol.md +516 -0
- package/adapters/codex/skills/forge-verify/references/verification-checklists/backlog.md +73 -0
- package/adapters/codex/skills/forge-verify/references/verification-checklists/epic.md +5 -4
- package/adapters/codex/skills/forge-verify/references/verification-checklists/impl.md +85 -0
- package/adapters/codex/skills/forge-verify/references/verification-checklists/specs.md +45 -1
- package/adapters/copilot/.feature-forge-bundle.json +1 -1
- package/adapters/copilot/agents/forge-verifier.md +3 -1
- package/adapters/copilot/references/decisions/single-writer-threat-model.md +53 -0
- package/adapters/copilot/references/epic-manifest-schema.json +6 -1
- package/adapters/copilot/references/epic-state-schema.json +50 -0
- package/adapters/copilot/references/forge-config-schema.json +19 -1
- package/adapters/copilot/references/forge-decisions-schema.json +33 -0
- package/adapters/copilot/references/pipeline-state-schema.json +38 -4
- package/adapters/copilot/references/process-overview.md +2 -2
- package/adapters/copilot/references/ralph-loop-contract.md +6 -3
- package/adapters/copilot/references/shared-conventions.md +102 -28
- package/adapters/copilot/references/stage-exit-protocol.md +395 -147
- package/adapters/copilot/scripts/epic-manifest.py +495 -91
- package/adapters/copilot/scripts/fix-sweep.py +1180 -0
- package/adapters/copilot/scripts/forge-bootstrap.py +57 -5
- package/adapters/copilot/scripts/forge-session.py +4241 -146
- package/adapters/copilot/scripts/validate-traceability.py +86 -5
- package/adapters/copilot/skills/forge/forge.md +13 -12
- package/adapters/copilot/skills/forge/references/pipeline-state-schema.json +38 -4
- package/adapters/copilot/skills/forge/references/process-overview.md +2 -2
- package/adapters/copilot/skills/forge/references/shared-conventions.md +102 -28
- package/adapters/copilot/skills/forge/references/stage-exit-protocol.md +395 -147
- package/adapters/copilot/skills/forge-0-epic/forge-0-epic.md +7 -2
- package/adapters/copilot/skills/forge-0-epic/references/edit-mode.md +37 -33
- package/adapters/copilot/skills/forge-0-epic/references/epic-manifest-subcommands.md +8 -3
- package/adapters/copilot/skills/forge-0-epic/references/pipeline-state-schema.json +38 -4
- package/adapters/copilot/skills/forge-0-epic/references/shared-conventions.md +102 -28
- package/adapters/copilot/skills/forge-0-epic/references/stage-exit-protocol.md +395 -147
- package/adapters/copilot/skills/forge-1-prd/forge-1-prd.md +17 -4
- package/adapters/copilot/skills/forge-1-prd/references/shared-conventions.md +102 -28
- package/adapters/copilot/skills/forge-1-prd/references/stage-exit-protocol.md +395 -147
- package/adapters/copilot/skills/forge-2-tech/forge-2-tech.md +18 -4
- package/adapters/copilot/skills/forge-2-tech/references/shared-conventions.md +102 -28
- package/adapters/copilot/skills/forge-2-tech/references/stage-exit-protocol.md +395 -147
- package/adapters/copilot/skills/forge-3-specs/forge-3-specs.md +9 -3
- package/adapters/copilot/skills/forge-3-specs/references/shared-conventions.md +102 -28
- package/adapters/copilot/skills/forge-3-specs/references/spec-archetypes.md +9 -0
- package/adapters/copilot/skills/forge-3-specs/references/stage-exit-protocol.md +395 -147
- package/adapters/copilot/skills/forge-4-backlog/forge-4-backlog.md +56 -5
- package/adapters/copilot/skills/forge-4-backlog/references/shared-conventions.md +102 -28
- package/adapters/copilot/skills/forge-4-backlog/references/stage-exit-protocol.md +395 -147
- package/adapters/copilot/skills/forge-5-loop/forge-5-loop.md +67 -69
- package/adapters/copilot/skills/forge-5-loop/references/agent-selection.md +17 -1
- package/adapters/copilot/skills/forge-5-loop/references/ralph-loop-contract.md +6 -3
- package/adapters/copilot/skills/forge-5-loop/references/recovery-procedure.md +349 -0
- package/adapters/copilot/skills/forge-5-loop/references/result-reporting.md +101 -33
- package/adapters/copilot/skills/forge-5-loop/references/runner-contract.md +30 -10
- package/adapters/copilot/skills/forge-5-loop/references/shared-conventions.md +102 -28
- package/adapters/copilot/skills/forge-5-loop/references/stage-exit-protocol.md +395 -147
- package/adapters/copilot/skills/forge-6-docs/forge-6-docs.md +75 -8
- package/adapters/copilot/skills/forge-6-docs/references/shared-conventions.md +102 -28
- package/adapters/copilot/skills/forge-6-docs/references/stage-exit-protocol.md +516 -0
- package/adapters/copilot/skills/forge-fix/forge-fix.md +118 -32
- package/adapters/copilot/skills/forge-fix/references/shared-conventions.md +102 -28
- package/adapters/copilot/skills/forge-fix/references/stage-exit-protocol.md +395 -147
- package/adapters/copilot/skills/forge-guide/forge-guide.md +1 -1
- package/adapters/copilot/skills/forge-guide/references/forge-config-schema.json +19 -1
- package/adapters/copilot/skills/forge-guide/references/process-overview.md +2 -2
- package/adapters/copilot/skills/forge-guide/references/ralph-loop-contract.md +6 -3
- package/adapters/copilot/skills/forge-guide/references/shared-conventions.md +102 -28
- package/adapters/copilot/skills/forge-init/forge-init.md +1 -1
- package/adapters/copilot/skills/forge-verify/forge-verify.md +82 -51
- package/adapters/copilot/skills/forge-verify/references/decisions/single-writer-threat-model.md +53 -0
- package/adapters/copilot/skills/forge-verify/references/findings-template.md +70 -50
- package/adapters/copilot/skills/forge-verify/references/shared-conventions.md +102 -28
- package/adapters/copilot/skills/forge-verify/references/stage-exit-protocol.md +516 -0
- package/adapters/copilot/skills/forge-verify/references/verification-checklists/backlog.md +73 -0
- package/adapters/copilot/skills/forge-verify/references/verification-checklists/epic.md +5 -4
- package/adapters/copilot/skills/forge-verify/references/verification-checklists/impl.md +85 -0
- package/adapters/copilot/skills/forge-verify/references/verification-checklists/specs.md +45 -1
- package/adapters/cursor/.feature-forge-bundle.json +1 -1
- package/adapters/cursor/agents/forge-verifier.mdc +3 -1
- package/adapters/cursor/references/decisions/single-writer-threat-model.md +53 -0
- package/adapters/cursor/references/epic-manifest-schema.json +6 -1
- package/adapters/cursor/references/epic-state-schema.json +50 -0
- package/adapters/cursor/references/forge-config-schema.json +19 -1
- package/adapters/cursor/references/forge-decisions-schema.json +33 -0
- package/adapters/cursor/references/pipeline-state-schema.json +38 -4
- package/adapters/cursor/references/process-overview.md +2 -2
- package/adapters/cursor/references/ralph-loop-contract.md +6 -3
- package/adapters/cursor/references/shared-conventions.md +102 -28
- package/adapters/cursor/references/stage-exit-protocol.md +395 -147
- package/adapters/cursor/scripts/epic-manifest.py +495 -91
- package/adapters/cursor/scripts/fix-sweep.py +1180 -0
- package/adapters/cursor/scripts/forge-bootstrap.py +57 -5
- package/adapters/cursor/scripts/forge-session.py +4241 -146
- package/adapters/cursor/scripts/validate-traceability.py +86 -5
- package/adapters/cursor/skills/forge/forge.mdc +13 -12
- package/adapters/cursor/skills/forge/references/pipeline-state-schema.json +38 -4
- package/adapters/cursor/skills/forge/references/process-overview.md +2 -2
- package/adapters/cursor/skills/forge/references/shared-conventions.md +102 -28
- package/adapters/cursor/skills/forge/references/stage-exit-protocol.md +395 -147
- package/adapters/cursor/skills/forge-0-epic/forge-0-epic.mdc +7 -2
- package/adapters/cursor/skills/forge-0-epic/references/edit-mode.md +37 -33
- package/adapters/cursor/skills/forge-0-epic/references/epic-manifest-subcommands.md +8 -3
- package/adapters/cursor/skills/forge-0-epic/references/pipeline-state-schema.json +38 -4
- package/adapters/cursor/skills/forge-0-epic/references/shared-conventions.md +102 -28
- package/adapters/cursor/skills/forge-0-epic/references/stage-exit-protocol.md +395 -147
- package/adapters/cursor/skills/forge-1-prd/forge-1-prd.mdc +17 -4
- package/adapters/cursor/skills/forge-1-prd/references/shared-conventions.md +102 -28
- package/adapters/cursor/skills/forge-1-prd/references/stage-exit-protocol.md +395 -147
- package/adapters/cursor/skills/forge-2-tech/forge-2-tech.mdc +18 -4
- package/adapters/cursor/skills/forge-2-tech/references/shared-conventions.md +102 -28
- package/adapters/cursor/skills/forge-2-tech/references/stage-exit-protocol.md +395 -147
- package/adapters/cursor/skills/forge-3-specs/forge-3-specs.mdc +9 -3
- package/adapters/cursor/skills/forge-3-specs/references/shared-conventions.md +102 -28
- package/adapters/cursor/skills/forge-3-specs/references/spec-archetypes.md +9 -0
- package/adapters/cursor/skills/forge-3-specs/references/stage-exit-protocol.md +395 -147
- package/adapters/cursor/skills/forge-4-backlog/forge-4-backlog.mdc +56 -5
- package/adapters/cursor/skills/forge-4-backlog/references/shared-conventions.md +102 -28
- package/adapters/cursor/skills/forge-4-backlog/references/stage-exit-protocol.md +395 -147
- package/adapters/cursor/skills/forge-5-loop/forge-5-loop.mdc +67 -69
- package/adapters/cursor/skills/forge-5-loop/references/agent-selection.md +17 -1
- package/adapters/cursor/skills/forge-5-loop/references/ralph-loop-contract.md +6 -3
- package/adapters/cursor/skills/forge-5-loop/references/recovery-procedure.md +349 -0
- package/adapters/cursor/skills/forge-5-loop/references/result-reporting.md +101 -33
- package/adapters/cursor/skills/forge-5-loop/references/runner-contract.md +30 -10
- package/adapters/cursor/skills/forge-5-loop/references/shared-conventions.md +102 -28
- package/adapters/cursor/skills/forge-5-loop/references/stage-exit-protocol.md +395 -147
- package/adapters/cursor/skills/forge-6-docs/forge-6-docs.mdc +75 -8
- package/adapters/cursor/skills/forge-6-docs/references/shared-conventions.md +102 -28
- package/adapters/cursor/skills/forge-6-docs/references/stage-exit-protocol.md +516 -0
- package/adapters/cursor/skills/forge-fix/forge-fix.mdc +118 -32
- package/adapters/cursor/skills/forge-fix/references/shared-conventions.md +102 -28
- package/adapters/cursor/skills/forge-fix/references/stage-exit-protocol.md +395 -147
- package/adapters/cursor/skills/forge-guide/forge-guide.mdc +1 -1
- package/adapters/cursor/skills/forge-guide/references/forge-config-schema.json +19 -1
- package/adapters/cursor/skills/forge-guide/references/process-overview.md +2 -2
- package/adapters/cursor/skills/forge-guide/references/ralph-loop-contract.md +6 -3
- package/adapters/cursor/skills/forge-guide/references/shared-conventions.md +102 -28
- package/adapters/cursor/skills/forge-init/forge-init.mdc +1 -1
- package/adapters/cursor/skills/forge-verify/forge-verify.mdc +82 -51
- package/adapters/cursor/skills/forge-verify/references/decisions/single-writer-threat-model.md +53 -0
- package/adapters/cursor/skills/forge-verify/references/findings-template.md +70 -50
- package/adapters/cursor/skills/forge-verify/references/shared-conventions.md +102 -28
- package/adapters/cursor/skills/forge-verify/references/stage-exit-protocol.md +516 -0
- package/adapters/cursor/skills/forge-verify/references/verification-checklists/backlog.md +73 -0
- package/adapters/cursor/skills/forge-verify/references/verification-checklists/epic.md +5 -4
- package/adapters/cursor/skills/forge-verify/references/verification-checklists/impl.md +85 -0
- package/adapters/cursor/skills/forge-verify/references/verification-checklists/specs.md +45 -1
- package/adapters/gemini/.feature-forge-bundle.json +1 -1
- package/adapters/gemini/agents/forge-verifier.md +3 -1
- package/adapters/gemini/gemini-extension.json +1 -1
- package/adapters/gemini/references/decisions/single-writer-threat-model.md +53 -0
- package/adapters/gemini/references/epic-manifest-schema.json +6 -1
- package/adapters/gemini/references/epic-state-schema.json +50 -0
- package/adapters/gemini/references/forge-config-schema.json +19 -1
- package/adapters/gemini/references/forge-decisions-schema.json +33 -0
- package/adapters/gemini/references/pipeline-state-schema.json +38 -4
- package/adapters/gemini/references/process-overview.md +2 -2
- package/adapters/gemini/references/ralph-loop-contract.md +6 -3
- package/adapters/gemini/references/shared-conventions.md +102 -28
- package/adapters/gemini/references/stage-exit-protocol.md +395 -147
- package/adapters/gemini/scripts/epic-manifest.py +495 -91
- package/adapters/gemini/scripts/fix-sweep.py +1180 -0
- package/adapters/gemini/scripts/forge-bootstrap.py +57 -5
- package/adapters/gemini/scripts/forge-session.py +4241 -146
- package/adapters/gemini/scripts/validate-traceability.py +86 -5
- package/adapters/gemini/skills/forge/forge.md +13 -12
- package/adapters/gemini/skills/forge/references/pipeline-state-schema.json +38 -4
- package/adapters/gemini/skills/forge/references/process-overview.md +2 -2
- package/adapters/gemini/skills/forge/references/shared-conventions.md +102 -28
- package/adapters/gemini/skills/forge/references/stage-exit-protocol.md +395 -147
- package/adapters/gemini/skills/forge-0-epic/forge-0-epic.md +7 -2
- package/adapters/gemini/skills/forge-0-epic/references/edit-mode.md +37 -33
- package/adapters/gemini/skills/forge-0-epic/references/epic-manifest-subcommands.md +8 -3
- package/adapters/gemini/skills/forge-0-epic/references/pipeline-state-schema.json +38 -4
- package/adapters/gemini/skills/forge-0-epic/references/shared-conventions.md +102 -28
- package/adapters/gemini/skills/forge-0-epic/references/stage-exit-protocol.md +395 -147
- package/adapters/gemini/skills/forge-1-prd/forge-1-prd.md +17 -4
- package/adapters/gemini/skills/forge-1-prd/references/shared-conventions.md +102 -28
- package/adapters/gemini/skills/forge-1-prd/references/stage-exit-protocol.md +395 -147
- package/adapters/gemini/skills/forge-2-tech/forge-2-tech.md +18 -4
- package/adapters/gemini/skills/forge-2-tech/references/shared-conventions.md +102 -28
- package/adapters/gemini/skills/forge-2-tech/references/stage-exit-protocol.md +395 -147
- package/adapters/gemini/skills/forge-3-specs/forge-3-specs.md +9 -3
- package/adapters/gemini/skills/forge-3-specs/references/shared-conventions.md +102 -28
- package/adapters/gemini/skills/forge-3-specs/references/spec-archetypes.md +9 -0
- package/adapters/gemini/skills/forge-3-specs/references/stage-exit-protocol.md +395 -147
- package/adapters/gemini/skills/forge-4-backlog/forge-4-backlog.md +56 -5
- package/adapters/gemini/skills/forge-4-backlog/references/shared-conventions.md +102 -28
- package/adapters/gemini/skills/forge-4-backlog/references/stage-exit-protocol.md +395 -147
- package/adapters/gemini/skills/forge-5-loop/forge-5-loop.md +67 -69
- package/adapters/gemini/skills/forge-5-loop/references/agent-selection.md +17 -1
- package/adapters/gemini/skills/forge-5-loop/references/ralph-loop-contract.md +6 -3
- package/adapters/gemini/skills/forge-5-loop/references/recovery-procedure.md +349 -0
- package/adapters/gemini/skills/forge-5-loop/references/result-reporting.md +101 -33
- package/adapters/gemini/skills/forge-5-loop/references/runner-contract.md +30 -10
- package/adapters/gemini/skills/forge-5-loop/references/shared-conventions.md +102 -28
- package/adapters/gemini/skills/forge-5-loop/references/stage-exit-protocol.md +395 -147
- package/adapters/gemini/skills/forge-6-docs/forge-6-docs.md +75 -8
- package/adapters/gemini/skills/forge-6-docs/references/shared-conventions.md +102 -28
- package/adapters/gemini/skills/forge-6-docs/references/stage-exit-protocol.md +516 -0
- package/adapters/gemini/skills/forge-fix/forge-fix.md +118 -32
- package/adapters/gemini/skills/forge-fix/references/shared-conventions.md +102 -28
- package/adapters/gemini/skills/forge-fix/references/stage-exit-protocol.md +395 -147
- package/adapters/gemini/skills/forge-guide/forge-guide.md +1 -1
- package/adapters/gemini/skills/forge-guide/references/forge-config-schema.json +19 -1
- package/adapters/gemini/skills/forge-guide/references/process-overview.md +2 -2
- package/adapters/gemini/skills/forge-guide/references/ralph-loop-contract.md +6 -3
- package/adapters/gemini/skills/forge-guide/references/shared-conventions.md +102 -28
- package/adapters/gemini/skills/forge-init/forge-init.md +1 -1
- package/adapters/gemini/skills/forge-verify/forge-verify.md +82 -51
- package/adapters/gemini/skills/forge-verify/references/decisions/single-writer-threat-model.md +53 -0
- package/adapters/gemini/skills/forge-verify/references/findings-template.md +70 -50
- package/adapters/gemini/skills/forge-verify/references/shared-conventions.md +102 -28
- package/adapters/gemini/skills/forge-verify/references/stage-exit-protocol.md +516 -0
- package/adapters/gemini/skills/forge-verify/references/verification-checklists/backlog.md +73 -0
- package/adapters/gemini/skills/forge-verify/references/verification-checklists/epic.md +5 -4
- package/adapters/gemini/skills/forge-verify/references/verification-checklists/impl.md +85 -0
- package/adapters/gemini/skills/forge-verify/references/verification-checklists/specs.md +45 -1
- package/adapters/pi/.feature-forge-bundle.json +1 -1
- package/adapters/pi/agents/forge-verifier.md +3 -1
- package/adapters/pi/references/decisions/single-writer-threat-model.md +53 -0
- package/adapters/pi/references/epic-manifest-schema.json +6 -1
- package/adapters/pi/references/epic-state-schema.json +50 -0
- package/adapters/pi/references/forge-config-schema.json +19 -1
- package/adapters/pi/references/forge-decisions-schema.json +33 -0
- package/adapters/pi/references/pipeline-state-schema.json +38 -4
- package/adapters/pi/references/process-overview.md +2 -2
- package/adapters/pi/references/ralph-loop-contract.md +6 -3
- package/adapters/pi/references/shared-conventions.md +91 -17
- package/adapters/pi/references/stage-exit-protocol.md +395 -147
- package/adapters/pi/scripts/epic-manifest.py +495 -91
- package/adapters/pi/scripts/fix-sweep.py +1180 -0
- package/adapters/pi/scripts/forge-bootstrap.py +57 -5
- package/adapters/pi/scripts/forge-session.py +4241 -146
- package/adapters/pi/scripts/validate-traceability.py +86 -5
- package/adapters/pi/skills/forge/SKILL.md +10 -9
- package/adapters/pi/skills/forge/references/pipeline-state-schema.json +38 -4
- package/adapters/pi/skills/forge/references/process-overview.md +2 -2
- package/adapters/pi/skills/forge/references/shared-conventions.md +91 -17
- package/adapters/pi/skills/forge/references/stage-exit-protocol.md +395 -147
- package/adapters/pi/skills/forge-0-epic/SKILL.md +7 -2
- package/adapters/pi/skills/forge-0-epic/references/edit-mode.md +31 -27
- package/adapters/pi/skills/forge-0-epic/references/epic-manifest-subcommands.md +6 -1
- package/adapters/pi/skills/forge-0-epic/references/pipeline-state-schema.json +38 -4
- package/adapters/pi/skills/forge-0-epic/references/shared-conventions.md +91 -17
- package/adapters/pi/skills/forge-0-epic/references/stage-exit-protocol.md +395 -147
- package/adapters/pi/skills/forge-1-prd/SKILL.md +17 -4
- package/adapters/pi/skills/forge-1-prd/references/shared-conventions.md +91 -17
- package/adapters/pi/skills/forge-1-prd/references/stage-exit-protocol.md +395 -147
- package/adapters/pi/skills/forge-2-tech/SKILL.md +18 -4
- package/adapters/pi/skills/forge-2-tech/references/shared-conventions.md +91 -17
- package/adapters/pi/skills/forge-2-tech/references/stage-exit-protocol.md +395 -147
- package/adapters/pi/skills/forge-3-specs/SKILL.md +9 -3
- package/adapters/pi/skills/forge-3-specs/references/shared-conventions.md +91 -17
- package/adapters/pi/skills/forge-3-specs/references/spec-archetypes.md +9 -0
- package/adapters/pi/skills/forge-3-specs/references/stage-exit-protocol.md +395 -147
- package/adapters/pi/skills/forge-4-backlog/SKILL.md +56 -5
- package/adapters/pi/skills/forge-4-backlog/references/shared-conventions.md +91 -17
- package/adapters/pi/skills/forge-4-backlog/references/stage-exit-protocol.md +395 -147
- package/adapters/pi/skills/forge-5-loop/SKILL.md +67 -69
- package/adapters/pi/skills/forge-5-loop/references/agent-selection.md +16 -0
- package/adapters/pi/skills/forge-5-loop/references/ralph-loop-contract.md +6 -3
- package/adapters/pi/skills/forge-5-loop/references/recovery-procedure.md +349 -0
- package/adapters/pi/skills/forge-5-loop/references/result-reporting.md +101 -33
- package/adapters/pi/skills/forge-5-loop/references/runner-contract.md +29 -9
- package/adapters/pi/skills/forge-5-loop/references/shared-conventions.md +91 -17
- package/adapters/pi/skills/forge-5-loop/references/stage-exit-protocol.md +395 -147
- package/adapters/pi/skills/forge-6-docs/SKILL.md +75 -8
- package/adapters/pi/skills/forge-6-docs/references/shared-conventions.md +91 -17
- package/adapters/pi/skills/forge-6-docs/references/stage-exit-protocol.md +516 -0
- package/adapters/pi/skills/forge-fix/SKILL.md +118 -32
- package/adapters/pi/skills/forge-fix/references/shared-conventions.md +91 -17
- package/adapters/pi/skills/forge-fix/references/stage-exit-protocol.md +395 -147
- package/adapters/pi/skills/forge-guide/references/forge-config-schema.json +19 -1
- package/adapters/pi/skills/forge-guide/references/process-overview.md +2 -2
- package/adapters/pi/skills/forge-guide/references/ralph-loop-contract.md +6 -3
- package/adapters/pi/skills/forge-guide/references/shared-conventions.md +91 -17
- package/adapters/pi/skills/forge-verify/SKILL.md +81 -50
- package/adapters/pi/skills/forge-verify/references/decisions/single-writer-threat-model.md +53 -0
- package/adapters/pi/skills/forge-verify/references/findings-template.md +69 -49
- package/adapters/pi/skills/forge-verify/references/shared-conventions.md +91 -17
- package/adapters/pi/skills/forge-verify/references/stage-exit-protocol.md +516 -0
- package/adapters/pi/skills/forge-verify/references/verification-checklists/backlog.md +73 -0
- package/adapters/pi/skills/forge-verify/references/verification-checklists/epic.md +5 -4
- package/adapters/pi/skills/forge-verify/references/verification-checklists/impl.md +85 -0
- package/adapters/pi/skills/forge-verify/references/verification-checklists/specs.md +45 -1
- package/package.json +1 -1
- package/adapters/claude/skills/forge-verify/references/pipeline-state-schema.json +0 -191
- package/adapters/codex/skills/forge-verify/references/pipeline-state-schema.json +0 -191
- package/adapters/copilot/skills/forge-verify/references/pipeline-state-schema.json +0 -191
- package/adapters/cursor/skills/forge-verify/references/pipeline-state-schema.json +0 -191
- package/adapters/gemini/skills/forge-verify/references/pipeline-state-schema.json +0 -191
- package/adapters/pi/skills/forge-verify/references/pipeline-state-schema.json +0 -191
|
@@ -2,41 +2,49 @@
|
|
|
2
2
|
# GENERATED — DO NOT EDIT. Source: skills/forge-fix/SKILL.md. Regenerate: python3 scripts/build-adapters.py
|
|
3
3
|
name: forge-fix
|
|
4
4
|
description: Apply fixes from the most recent forge-verify findings document. Use when user runs /feature-forge:forge-fix or asks to apply verification fixes for a forge feature. Do NOT trigger for general code fixes, bug fixes, or repairs outside the forge verification workflow.
|
|
5
|
-
argument-hint: <feature-name>
|
|
5
|
+
argument-hint: <feature-name> [--served-stage <production-stage>]
|
|
6
6
|
---
|
|
7
7
|
|
|
8
8
|
# forge-fix — Apply Verification Fixes
|
|
9
9
|
|
|
10
10
|
Apply fixes from the most recent forge-verify findings document, with step-level tracking for crash recovery.
|
|
11
11
|
|
|
12
|
-
Usually invoked by the user
|
|
13
|
-
when `autoFix: true` is configured **and** its preconditions hold (the findings document has zero
|
|
14
|
-
unresolved decision points, the working tree is clean, and a mandatory re-verify passes afterward).
|
|
15
|
-
Two callers drive that chain: an **authoring stage's in-stage auto-verify** (the primary path — see
|
|
16
|
-
`references/stage-exit-protocol.md`, the in-stage verify block) and the **`/feature-forge:forge`
|
|
17
|
-
navigator's catch-up** (§3b). The **fix application** below is identical either way — this skill is
|
|
18
|
-
not "auto-aware" about *applying* findings; it always applies the latest findings document. The
|
|
19
|
-
**caller** owns the gating decisions, including the closing re-verify: the Step 6 gate is presented
|
|
20
|
-
**only on a direct invocation**, because under an `autoFix` chain the caller (stage skill or
|
|
21
|
-
navigator) runs the mandatory re-verify itself.
|
|
12
|
+
Usually invoked by the user. An **`autoFix` caller** may also dispatch this skill automatically when `autoFix: true` is configured **and** its preconditions hold (the findings document has zero unresolved decision points, the working tree is clean, and a mandatory re-verify passes afterward). Two callers drive that chain: an **authoring stage's in-stage auto-verify** (the primary path — see `references/stage-exit-protocol.md`, the in-stage verify block) and the **`/feature-forge:forge` navigator's catch-up** (§3b). The **fix application** below is identical either way — this skill is not "auto-aware" about *applying* findings; it always applies the selected findings document. What differs is **branch ownership**, and ownership is read from the literal `owner:` token described under Prerequisites, never inferred from how the invocation happened to be phrased.
|
|
22
13
|
|
|
23
14
|
## Prerequisites
|
|
24
15
|
|
|
25
16
|
Read and follow `references/shared-conventions.md` for feature name validation, configuration reading, and force mode handling before proceeding.
|
|
26
17
|
|
|
18
|
+
**Ownership.** Determine branch ownership **at entry**, from the literal `owner: nested` / `owner: direct` token in the prompt that dispatched you. **Absent the token you are `direct`** — a user-typed `/feature-forge:forge-fix` is the only path that carries no dispatcher. Judge the token, never the phrasing of the invocation. Preserve that value unchanged through any re-verify and pass it straight through as `--owner` in Step 7. A **direct** fix stays the terminal owner through its optional re-verify; a **nested** fix invokes nested verify and returns its structured result to the outer stage, printing no terminal block at all. `references/stage-exit-protocol.md` § "Branch ownership: the `owner:` token" owns this rule.
|
|
19
|
+
|
|
27
20
|
**Turn structure reminder:** Output analysis/context as text, then route ALL questions through `AskUserQuestion`. Never embed questions in text output — the user will not be prompted and the session will stall.
|
|
28
21
|
|
|
29
|
-
## Step 1: Locate Findings
|
|
22
|
+
## Step 1: Locate Findings and Establish the Served Stage
|
|
30
23
|
|
|
31
24
|
1. Read `forge.config.json` for `specsDir` (default: `./specs`)
|
|
32
25
|
2. Resolve the feature directory via the **Feature Directory Resolution** block in `references/shared-conventions.md` (a standalone feature resolves to its flat `{specsDir}/{feature}/` path exactly as today; an epic member resolves to its nested path). Then find the most recent `VERIFY-*-*.md` file in `{resolvedFeatureDir}/.verification/`.
|
|
33
|
-
3.
|
|
26
|
+
3. **Establish the served production stage before any mutation**, in this order:
|
|
27
|
+
- An explicit `--served-stage {stage}` argument on this invocation is authoritative — that is what `forge-verify` and the scripted exit pass when they route here.
|
|
28
|
+
- Otherwise read it from the **selected report's own mode/header**: the `{mode}` in its `VERIFY-{mode}-{YYYY-MM-DD}.md` name together with the mode recorded in the report header, mapped as `epic` → `forge-0-epic`, `prd` → `forge-1-prd`, `tech` → `forge-2-tech`, `specs` → `forge-3-specs`, `backlog` → `forge-4-backlog`, `impl` → `forge-5-loop`.
|
|
29
|
+
- If both are present and disagree, fail closed rather than picking one.
|
|
30
|
+
- Never derive the served stage from conversational context, from `currentStage`, or from whichever feature stage happens to be newest. The report you are applying decides which stage this diversion serves.
|
|
31
|
+
4. **An unestablishable served stage is a fail-closed error, not a guess.** If a report exists but its mode is missing, malformed, or ambiguous (for example two same-day reports for different modes, or a header whose mode does not match the filename) and no explicit `--served-stage` was supplied, mutate nothing: list the reports you found and tell the user to re-invoke as `/feature-forge:forge-fix {feature} --served-stage {stage}` or to re-run `/feature-forge:forge-verify {feature} {stage}`. Stop there — with no served stage there is no stage to close against, so do not run Step 7.
|
|
32
|
+
5. **No applicable findings → `no-findings`.** If `.verification/` holds no findings document, or none whose steps still apply, the outcome is `no-findings`: mutate nothing and take the served stage from **authoritative pipeline state** — the production stage whose `stages.forge-verify-*` entry is unresolved (`findings-reported`, `findings-applied`, `auto-verify-pending`, or `pending`) — then close through Step 7. If no verification is outstanding either, there is nothing for this pass to serve: tell the user "No verification findings found. Run `/feature-forge:forge-verify {feature}` first." and stop without closing a stage.
|
|
34
33
|
|
|
35
34
|
## Step 2: Parse Fix Execution Plan
|
|
36
35
|
|
|
37
36
|
1. Read the "Fix Execution Plan" section of the findings document
|
|
38
37
|
2. Identify all execution steps and their dependencies
|
|
39
38
|
3. Check for a `## Fix Progress` section at the bottom of the findings document — if present, some steps were already applied in a previous interrupted run
|
|
39
|
+
4. **Assert the plan covers every finding** before any fix executes. Exit 1 is that assertion firing, not a tool failure; only exit 2 is a tool failure. Run:
|
|
40
|
+
|
|
41
|
+
```bash
|
|
42
|
+
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')"
|
|
43
|
+
[ -n "$R" ] || { echo "feature-forge: cannot locate plugin root" >&2; exit 1; }
|
|
44
|
+
python3 "$R/scripts/fix-sweep.py" plan-coverage "{resolvedFeatureDir}/.verification/{findingsFile}" --json
|
|
45
|
+
```
|
|
46
|
+
|
|
47
|
+
Exit 0 with `"applicable": false` means the document declares no findings set or no plan to assert — proceed silently. Exit 1 → surface the **named** uncovered findings and any `claimed N, actual M` total mismatch, then resolve each one through `AskUserQuestion` per the **Decision Support** protocol in `references/shared-conventions.md`: either **author a covering execution step** into the Fix Execution Plan and execute it in this pass's Step 4, or **record an explicit justification** against that finding in the findings document. Never resolve a mismatch by editing the claimed total to match — re-derive which finding is missing and name it. Any finding still uncovered when you stop closes with `decisions` in Step 7, no advancement. Exit 2 → surface the `Error:` line verbatim and close with `failed`.
|
|
40
48
|
|
|
41
49
|
## Step 3: Handle User Decisions
|
|
42
50
|
|
|
@@ -45,6 +53,8 @@ If the "User Decisions Required" section has unresolved items:
|
|
|
45
53
|
2. Wait for answers before proceeding
|
|
46
54
|
3. Record decisions in the findings document under the "User Decisions Required" section (mark each as resolved)
|
|
47
55
|
|
|
56
|
+
If any decision is still unresolved when you stop — the user deferred it, the question mechanism was unavailable, or no answer arrived — do **not** apply the steps that depend on it. Close with `decisions` in Step 7: that is the specific outcome for unanswered decisions, it never advances the pipeline, and its resume action names the unresolved work. A user who explicitly defers the **whole fix pass** is `deferred` instead; an operational failure that is not merely an unanswered decision is `failed` (Step 7).
|
|
57
|
+
|
|
48
58
|
## Step 4: Execute Fix Steps
|
|
49
59
|
|
|
50
60
|
For each step in the "Execution Steps" section, in order:
|
|
@@ -57,32 +67,108 @@ For each step in the "Execution Steps" section, in order:
|
|
|
57
67
|
```
|
|
58
68
|
- Step {N}: [APPLIED] {date} — {short summary of what was done}
|
|
59
69
|
```
|
|
60
|
-
6. If a step fails or produces unexpected results, STOP. Report the issue to the user. Do not continue to dependent steps.
|
|
70
|
+
6. If a step fails or produces unexpected results, STOP. Report the issue to the user. Do not continue to dependent steps. Any applied step stays recorded in `## Fix Progress` so a later run resumes rather than repeats, and this run closes with `failed` in Step 7 — no advancement.
|
|
71
|
+
|
|
72
|
+
**Shipped comments state intent, never measurement (anti-churn).** A fix pass writes **no empirical or quantified claims** into comments, docstrings, or test narration — no "measured", "probed and confirmed", no counts of what was checked, no blanket claims over enumerated cases. Every such claim is a fresh falsifiable surface for the next verify round; a chain of them is exactly how a fix loop stops converging. Shipped prose states what the code intends and what constraint binds it. The evidence — what was probed, how, with what result — belongs in the findings document's `## Fix Progress` entry (and the commit message), which are the sanctioned records for acceptance evidence.
|
|
73
|
+
|
|
74
|
+
**Closing sub-step — sweep for surviving occurrences of what you just corrected.** After the last plan step is applied and BEFORE Step 5 commits anything, while the working tree is still dirty, sweep this fix's own delta for text you removed that survives elsewhere. Pass no flags beyond `--json` — the exclusions the script applies by default are the correct ones in both a plugin repository and a consumer repository. Exit 1 means survivors were found: that is the sweep working, not a tool failure. Run:
|
|
75
|
+
|
|
76
|
+
```bash
|
|
77
|
+
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')"
|
|
78
|
+
[ -n "$R" ] || { echo "feature-forge: cannot locate plugin root" >&2; exit 1; }
|
|
79
|
+
python3 "$R/scripts/fix-sweep.py" sweep --json
|
|
80
|
+
```
|
|
81
|
+
|
|
82
|
+
**Disposition every hit before Step 5.** Each hit names the file, the line, and the removed text it matched, so nothing needs re-deriving. Give every hit exactly one disposition — `FIXED` (you corrected the survivor now, in this pass, so the edit joins this same delta), `JUSTIFIED: {reason}` (it stands by decision: a deliberate quote, a historical or audit record), or `FALSE-POSITIVE: {reason}` (the match is not the corrected claim) — and record the sweep with its dispositions in the `## Fix Progress` section of the findings document, in this shape:
|
|
83
|
+
|
|
84
|
+
```
|
|
85
|
+
- Sweep: {date} — {K} needle(s), {N} survivor(s), {M} disposition(s)
|
|
86
|
+
- {file}:{line} — "{matched removed text}" → FIXED {date}
|
|
87
|
+
- {file}:{line} — "{matched removed text}" → JUSTIFIED: {reason}
|
|
88
|
+
- {file}:{line} — "{matched removed text}" → FALSE-POSITIVE: {reason}
|
|
89
|
+
```
|
|
90
|
+
|
|
91
|
+
Detection is mechanical; disposition is judgment — a hit is a candidate, not automatically a defect. When you cannot classify a hit confidently, route that hit through `AskUserQuestion` following the same **Decision Support** protocol as Step 3: lead with a recommended disposition and put the trade-off in each option's description. A survivor left awaiting a user decision closes with `decisions` in Step 7; a survivor you can neither fix nor justify closes with `failed`; a fully dispositioned sweep leaves this pass on whatever outcome it otherwise maps to.
|
|
92
|
+
|
|
93
|
+
**Re-run the sweep once when a disposition edited files.** Those edits joined the same delta, so run the same command again to confirm they introduced no fresh survivors, and append a second `- Sweep:` block for the re-run. A hit already dispositioned `JUSTIFIED` or `FALSE-POSITIVE` — same file, same matched text — legitimately re-appears and needs no second disposition. A re-appearing hit that was dispositioned `FIXED` means the fix did not remove every occurrence: re-disposition it — correct it now, or close with `failed` — never leave it recorded as `FIXED`. One re-run is enough: do not loop. Exit 1 with no JSON payload on stdout is a crash, not survivors — surface the stderr traceback and close with `failed`.
|
|
94
|
+
|
|
95
|
+
**The sweep is never silent.** When the payload reports `"skipped": true` (exit 0 — no delta was available), append the visible notice `- Sweep: NOT RUN — no git delta ({reason})` under `## Fix Progress`, using the payload's `reason` verbatim, and continue on this pass's normal outcome. A skip is not a failure; exit 2 is — surface its `Error:` line verbatim and close with `failed`.
|
|
96
|
+
|
|
97
|
+
## Step 5: Record the Fixes Through `state-verify` and Commit
|
|
98
|
+
|
|
99
|
+
Never hand-author a verify entry, and never write a `verifiedStageVersion` value by hand. Record the fix pass with the `state-verify` verb described in the **Pipeline State Protocol** in `references/shared-conventions.md`, which owns its full flag surface, its status matrix, and the exit-2 failure protocol. `--stage` names the **served production stage** established in Step 1. `findings-applied` deliberately **clears** `verifiedStageVersion` and refuses `--verified-stage-version`: applying fixes is not verifying them, so the served stage's verification stays outstanding until a re-verify passes. Add `--epic "{epic}"` when the feature is an epic member — required, per the Pipeline State Protocol; omitting it for a member is an error and must never fall back to a same-named flat feature.
|
|
100
|
+
|
|
101
|
+
```bash
|
|
102
|
+
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')"
|
|
103
|
+
[ -n "$R" ] || { echo "feature-forge: cannot locate plugin root" >&2; exit 1; }
|
|
104
|
+
python3 "$R/scripts/forge-session.py" state-verify \
|
|
105
|
+
--feature "{feature}" --stage "{servedStage}" --status findings-applied \
|
|
106
|
+
--specs-dir "{specsDir}"
|
|
107
|
+
```
|
|
61
108
|
|
|
62
|
-
|
|
109
|
+
**Stage every disposition-edited path explicitly.** Commit 1's staging scope is the feature directory only, so a survivor you fixed outside it (Step 4's sweep) would otherwise be left uncommitted. Before committing, run one `git add <path>` per file recorded as `FIXED` in the sweep record — enumerated, one path at a time, never `git add -A` and never `git add .`. Those fixes then ride Commit 1 alongside the findings document that records them, and the tree is left clean for the re-verify and for the next stage's dirty-tree check.
|
|
63
110
|
|
|
64
|
-
|
|
111
|
+
Then follow the Git Commit Protocol in `references/shared-conventions.md`. If `gitCommitAfterStage` is true, stage files (`git add {resolvedFeatureDir}/` — or `{specsDir}/{epic}/` for an epic member so the member-state change commits atomically with the epic subtree) and commit with message `"{commitPrefix}({feature}): apply {mode} verification fixes"`. That is Commit 1, and the write above already recorded `commitHash: null` for it.
|
|
65
112
|
|
|
66
|
-
1
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
|
|
113
|
+
**Two-commit provenance — never `--amend`.** Record the provenance of Commit 1 in a second `state-verify` call, passing the **full 40-character** hash — an abbreviation is refused rather than expanded, and this call touches nothing but `commitHash`. Add `--epic "{epic}"` when the feature is an epic member — required, per the Pipeline State Protocol.
|
|
114
|
+
|
|
115
|
+
```bash
|
|
116
|
+
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')"
|
|
117
|
+
[ -n "$R" ] || { echo "feature-forge: cannot locate plugin root" >&2; exit 1; }
|
|
118
|
+
python3 "$R/scripts/forge-session.py" state-verify \
|
|
119
|
+
--feature "{feature}" --stage "{servedStage}" \
|
|
120
|
+
--commit-hash "$(git rev-parse HEAD)" --specs-dir "{specsDir}"
|
|
121
|
+
```
|
|
122
|
+
|
|
123
|
+
On exit 2 **nothing was recorded**: surface the `Error:` line verbatim together with the named feature (and epic), do not claim the fixes were persisted, and close with `failed` in Step 7 — the verify entry is unchanged, so no success block may be printed. A failed validation or a failed commit is `failed` for the same reason.
|
|
76
124
|
|
|
77
125
|
## Step 6: Re-verify Gate
|
|
78
126
|
|
|
79
|
-
Fixes are applied and recorded
|
|
127
|
+
Fixes are applied and recorded as `findings-applied`. That status makes **no** claim of freshness: the writer clears `verifiedStageVersion`, so the served stage's verification stays **outstanding** in the navigator's ledger, and only a re-verify that passes resolves it. Because a re-verify is the one thing that confirms the fixes actually resolved the findings, on a **direct** invocation **prompt** for it rather than leaving it as a passive suggestion — this is the same **Standard Verify Gate** the stage skills stamp (`references/stage-exit-protocol.md`).
|
|
128
|
+
|
|
129
|
+
**A nested owner presents no gate.** Return your structured result (served stage, outcome `applied`, findings file, steps applied) to the outer caller — it performs the mandatory re-verify itself — and print no terminal block of your own. This follows from the `owner:` token read at entry; it is never decided by how the invocation was phrased.
|
|
130
|
+
|
|
131
|
+
On a **direct** invocation, present the gate with `AskUserQuestion` using these three options — but only when your verify capability is `interactive` (Step 7):
|
|
132
|
+
- **Re-verify {feature} now** *(recommended)* — dispatch the clean-room `forge-verifier` subagent from this session in require-clean mode to confirm every finding is resolved. The dispatch is **scoped** per "Re-verify scope and convergence" in `references/stage-exit-protocol.md`: it confirms the prior report's findings against their acceptance evidence and examines this fix's delta — never a fresh full-checklist sweep — a finding with a recorded decision is never re-filed, and only an unresolved prior finding or a new blocking defect the fix introduced may block. The digest returns here so any remaining issue keeps its context. One-time — it does **not** change config. A clean-or-advisory-only result closes as `reverified`; unresolved prior findings or new blocking defects close as `reverify-findings` for the same served stage. **Escalation:** if that would be the second consecutive `reverify-findings` for this served stage (count the round-discriminated reports in `.verification/`), follow "Escalation (the round ledger)" in `references/stage-exit-protocol.md` before closing — present the digest and offer explicit acceptance of the residual findings; do not recommend another fix pass.
|
|
133
|
+
- **Re-verify now + enable auto-verify going forward** — re-verify now **and** patch `"autoVerify": true` into `forge.config.json` in place (preserve formatting and every other key) so future stages verify automatically, no prompt. This complements the `forge-init` opt-in. **Do not auto-commit this config change** — treat it like `notes`: a user-facing edit the user commits on their own cadence, never folded into a stage's artifact commit. Its outcome mapping is identical to the option above.
|
|
134
|
+
- **Skip for now** — an explicit deferral of the re-verify. It closes as **`deferred`**, never `reverified`: the fixes are recorded but nothing has confirmed them, and the served stage's verification stays outstanding until a re-verify passes, so the pipeline does not advance on this pass. Run `/feature-forge:forge {feature}` when you want pipeline status.
|
|
135
|
+
|
|
136
|
+
**Manual capability is not a skip, and not a deferral.** When your capability is `manual` (Step 7 — no question mechanism **and** no permitted dispatch), do not run clean-room and do not fabricate a choice nobody made: close with `applied`, and the script prints `/feature-forge:forge-verify {feature} --served-stage {servedStage}` as the primary action for the user to run. Offer the auto-verify enable as plain text only if a config write is possible.
|
|
137
|
+
|
|
138
|
+
**A re-verify that cannot run is an operational failure.** If the user chose to re-verify and the dispatch is refused, returns the `CLEAN_ROOM_UNAVAILABLE` sentinel, or returns no answer, the fixes remain recorded but nothing was confirmed: close with `failed`. Never report `reverified` on an unrun verify, and never treat an unavailable tool as an explicit user skip.
|
|
139
|
+
|
|
140
|
+
## Step 7: Close the Stage
|
|
141
|
+
|
|
142
|
+
**Ownership.** Pass the `owner: nested` / `owner: direct` value read at entry (absent the token: `direct`) straight through as `--owner`. As a **direct** owner you print the script's NEXT-STEPS block verbatim as your absolute final output, with nothing after its sentinel line. As a **nested** owner the payload carries `terminalOwnedBy: "outer"` and `nextSteps: null`: return your structured result to the caller and print no terminal block at all.
|
|
143
|
+
|
|
144
|
+
**Served stage.** Pass the stage established in Step 1 as `--served-stage`, so every branch command carries the diversion's thread forward. Never re-derive it here.
|
|
145
|
+
|
|
146
|
+
**Capability.** Determine `--verify-capability` before running the exit (full rule: `references/stage-exit-protocol.md`; summary: **Verify Capability** in `references/shared-conventions.md`). Pass `interactive` only when a question mechanism equivalent to `AskUserQuestion` is available **and** a clean-room `forge-verifier` may actually be dispatched right now; otherwise pass `manual`. Dispatch capability means **permitted** dispatch, not a listed tool — the test is "may I dispatch `forge-verifier` right now", not "is a dispatch tool in my tool surface". A session that bars *unsolicited* dispatch while offering a question mechanism is therefore **`interactive`, not `manual`**: the gate's affirmative choice is the user request that authorizes the dispatch. An auto-verify or re-verify directive under a no-unsolicited-dispatch bar is presented through the Step 6 gate and dispatched on the affirmative choice — never skipped, and never resolved by closing with an outcome that advances the pipeline.
|
|
147
|
+
|
|
148
|
+
**Outcome.** Invoke the exit **exactly once**, with the `--outcome` this run maps to. Every path lands on exactly one row; none may be left open:
|
|
149
|
+
|
|
150
|
+
| This run's result | `--outcome` | Authoritative action |
|
|
151
|
+
|---|---|---|
|
|
152
|
+
| No applicable findings document or steps (Step 1.5) | `no-findings` | Re-verify while verification is still owed; otherwise the live production successor |
|
|
153
|
+
| User decisions remain unresolved (Step 3) | `decisions` | Resume `forge-fix` naming the unresolved decisions; no advancement |
|
|
154
|
+
| A fix step, a validation, a commit, or a state write failed (Steps 4–6) | `failed` | Fix/navigator recovery; no advancement |
|
|
155
|
+
| Fixes persisted and re-verify has not been run (nested, or manual capability) | `applied` | Re-run `forge-verify` for the same served stage — re-verification is mandatory |
|
|
156
|
+
| A mandatory re-verify passed | `reverified` | The live production successor |
|
|
157
|
+
| A mandatory re-verify reported an unresolved prior finding or a new blocking defect (a clean-or-advisory-only result is `reverified`) | `reverify-findings` | `forge-fix` for the same served stage |
|
|
158
|
+
| The user explicitly deferred the fix pass or the re-verify (Steps 3, 6) | `deferred` | Deterministic `forge-fix`/navigator resume stating the findings remain unresolved; no advancement |
|
|
159
|
+
|
|
160
|
+
A cancellation, an unavailable tool, or a non-answer is `deferred` **only** when it was an explicit user choice and `failed` when it was an operational failure — an unavailable tool is never an explicit user skip, and neither ever becomes `reverified`. `applied` is not `reverified`: `findings-applied` cleared the freshness the writer deliberately dropped, so only `reverified` after a passing verify permits advancement.
|
|
161
|
+
|
|
162
|
+
**Round-ledger escalation binds this row on every capability.** Before closing `reverify-findings` that is the SECOND consecutive for this served stage (count the round-discriminated reports in `.verification/`), present the escalation dispositions per "Escalation (the round ledger)" in `references/stage-exit-protocol.md` — through the question mechanism when `interactive`, or printed as text (digest + the three dispositions, "Accept the residual findings" first) BEFORE the terminal block when `manual`. Never recommend another fix pass at this point.
|
|
163
|
+
|
|
164
|
+
Add `--epic "{epic}"` when the feature is an epic member. Pass no other flags.
|
|
80
165
|
|
|
81
|
-
**
|
|
166
|
+
**Close this stage with the Scripted Stage Exit** (contract: `references/stage-exit-protocol.md`; do not improvise a "Next steps" list). Run:
|
|
82
167
|
|
|
83
|
-
|
|
84
|
-
|
|
85
|
-
|
|
86
|
-
-
|
|
168
|
+
```bash
|
|
169
|
+
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')"
|
|
170
|
+
[ -n "$R" ] || { echo "feature-forge: cannot locate plugin root" >&2; exit 1; }
|
|
171
|
+
python3 "$R/scripts/forge-session.py" stage-exit --feature "{feature}" --stage forge-fix --owner "{owner}" --outcome "{FixOutcome}" --served-stage "{servedStage}" --specs-dir "{specsDir}" --host claude --verify-capability "{verify-capability}"
|
|
172
|
+
```
|
|
87
173
|
|
|
88
|
-
|
|
174
|
+
Obey the DIRECTIVES it prints, in the consumption order this protocol fixes: surface `invalidAutoVerifyKeys` and every `warnings` entry first; `runInStageVerify: true` → run the in-stage clean-room verify chain now (honoring `autoFixEligible`, and asking through the Standard Verify Gate first when you may not dispatch unsolicited); `verifyGate: "standard"` → present the Standard Verify Gate; `verifyGate: "manual-print"` → print the `verifyCommand` for the user and do **not** dispatch inline. Then, and only when `terminalOwnedBy` is `"self"`, **print the NEXT-STEPS block verbatim as your absolute last output — nothing after its sentinel line.** A `terminalOwnedBy: "outer"` payload carries `nextSteps: null`: return your structured result to the caller and print no terminal block at all.
|
|
@@ -36,7 +36,7 @@ I found that the codebase uses React and TanStack Router.
|
|
|
36
36
|
|
|
37
37
|
### Decision Support: Help the User Choose
|
|
38
38
|
|
|
39
|
-
When
|
|
39
|
+
When a question posed through `AskUserQuestion` carries substantive options (a real choice — not a trivial yes/no confirmation), do not just list them. The interview stages have already done codebase research and integration analysis; surfacing that synthesis at the decision moment is the whole point. For every such question:
|
|
40
40
|
|
|
41
41
|
- **Lead with a recommended option.** Place it first and label it `(recommended)` (matching the `AskUserQuestion` "(Recommended)" convention).
|
|
42
42
|
- **Put the trade-off in each option's `description`.** Say why you'd pick it and what you give up versus the alternatives — the cost, not just the benefit.
|
|
@@ -53,6 +53,17 @@ For genuinely comparable artifacts (competing module structures, two code snippe
|
|
|
53
53
|
|
|
54
54
|
The **Branch Setup** block below is the reference pattern: a strong recommendation as the first option, rationale inline, the alternative still available, never a hard-stop.
|
|
55
55
|
|
|
56
|
+
## Stage Review Gate
|
|
57
|
+
|
|
58
|
+
Every authoring stage ends its "Review with User" step in exactly one of two shapes. Which shape a stage uses is declared **here, once** — each stage's review step points at this block by title, and the shape is never re-derived from the surrounding prose or inferred from how sibling stages behave (three stages block and one does not; majority-shape inference is precisely the failure this block exists to prevent):
|
|
59
|
+
|
|
60
|
+
- **Blocking review (gate).** The stage presents the artifact and collects feedback through `AskUserQuestion`; it does **not** proceed until the user answers, iterating until they confirm. Stages: **forge-1-prd** (Step 5), **forge-2-tech** (Step 6), **forge-3-specs** (Step 6).
|
|
61
|
+
- **Non-blocking review (invitation).** The stage states the artifact is ready and invites adjustments **as a statement, not a question** — and then **proceeds to the next step in the same turn unless the user asks for changes**. The invitation obliges the agent to *continue*: emitting the invitation sentence and stopping treats the non-gate as a gate and strands the stage `in-progress` with its completion step unrun — a defect, not caution. Stage: **forge-4-backlog** (Step 6).
|
|
62
|
+
|
|
63
|
+
**Why the shapes differ.** A blocking review guards an artifact whose content was just authored from open-ended interview or synthesis — the user is the only authority on "complete", so the stage must wait. forge-4's backlog is *derived* from specs the user already approved, was planned interactively in its Step 3, and is machine-validated in its Step 5; a second hard gate would re-ask a settled question, and the loop never launches without forge-5-loop's own Step 2d confirmation anyway. The invitation is a courtesy checkpoint, not an approval gate (removed deliberately in #78's consistency sweep).
|
|
64
|
+
|
|
65
|
+
A stage that changes shape changes it **in this block first**; the per-stage pointer stays a pointer.
|
|
66
|
+
|
|
56
67
|
## Configuration Reading
|
|
57
68
|
|
|
58
69
|
Read `forge.config.json` from the project root. If it doesn't exist, use defaults.
|
|
@@ -130,7 +141,7 @@ mkdir -p "<specsDir>"
|
|
|
130
141
|
[ -f "<specsDir>/AGENTS.md" ] || cp "$R/references/templates/specs-hygiene/AGENTS.md" "<specsDir>/AGENTS.md"
|
|
131
142
|
```
|
|
132
143
|
|
|
133
|
-
If the host is Claude (the
|
|
144
|
+
If the host is Claude (the Claude-native question tool is available), also ensure the Claude-framed variant:
|
|
134
145
|
|
|
135
146
|
```bash
|
|
136
147
|
R="$(bash -c 'for d in "${CLAUDE_PLUGIN_ROOT:-}" "$HOME"/.claude/skills/feature-forge "$HOME"/.claude/plugins/cache/*/feature-forge/* "$HOME"/.claude/plugins/*/feature-forge "$HOME"/.agents/skills/feature-forge ./.agents/skills/feature-forge; do [ -x "$d/scripts/forge-root.sh" ] && exec "$d/scripts/forge-root.sh"; done')"
|
|
@@ -191,6 +202,44 @@ Pipeline state is written by the `state-*` verbs of `scripts/forge-session.py`
|
|
|
191
202
|
|
|
192
203
|
If a `state-*` verb exits 2, surface the plain `Error:` line from stderr verbatim, do **not** proceed to the next step of the surrounding protocol, and do **not** hand-author the JSON as a workaround. The stage remains resumable because the entry stamp is already on disk — re-run the verb once the cause is fixed.
|
|
193
204
|
|
|
205
|
+
**The nine `state-*` verbs.** `state-enter` (Stage-Entry Guard), `state-artifact` (incremental artifact tracking), `state-complete` (Git Commit Protocol), `state-skip` (the deliberate forge-6-docs documentation skip — scoped to that one stage; writes `status: "skipped"` + `skippedAt`, refuses to erase a record of docs that exist, and is the only sanctioned writer of a skipped docs stage), `state-branch` (Branch Setup and Branch Reconciliation), `state-note` (the Immediate Downstream Note below, and the optional completion note at stage closure), `state-decision` (deferred decisions), `state-ecr` (epic change requests), and `state-verify` (one `forge-verify-*` verification transition — below). The `--epic` member requirement and the exit-2 failure protocol above apply to **every** one of them, `state-verify` included; no verify entry is ever hand-authored.
|
|
206
|
+
|
|
207
|
+
### `state-verify` — verification results and provenance
|
|
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:
|
|
210
|
+
|
|
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
|
+
|
|
213
|
+
```bash
|
|
214
|
+
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')"
|
|
215
|
+
[ -n "$R" ] || { echo "feature-forge: cannot locate plugin root" >&2; exit 1; }
|
|
216
|
+
python3 "$R/scripts/forge-session.py" state-verify \
|
|
217
|
+
--feature "{feature}" --stage "{served-production-stage}" --status "<status>" \
|
|
218
|
+
--specs-dir "{specsDir}"
|
|
219
|
+
```
|
|
220
|
+
|
|
221
|
+
Provenance follows the same two-commit sequence as `state-complete`: the result transition above writes `commitHash: null`, Commit 1 records the findings document and the state, and a second `state-verify` call records the full 40-hex hash of Commit 1 and touches nothing else (never `--amend`; an abbreviated hash is refused rather than expanded). Add `--epic "{epic}"` for an epic member — required, per the member rule above:
|
|
222
|
+
|
|
223
|
+
```bash
|
|
224
|
+
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')"
|
|
225
|
+
[ -n "$R" ] || { echo "feature-forge: cannot locate plugin root" >&2; exit 1; }
|
|
226
|
+
python3 "$R/scripts/forge-session.py" state-verify \
|
|
227
|
+
--feature "{feature}" --stage "{served-production-stage}" \
|
|
228
|
+
--commit-hash "$(git rev-parse HEAD)" --specs-dir "{specsDir}"
|
|
229
|
+
```
|
|
230
|
+
|
|
231
|
+
Epic-scoped verification is the single exception to the member rule: with `--stage forge-0-epic`, `--feature` names the **epic** and `--epic` must be absent or exactly equal to it. That call writes `{specsDir}/{epic}/.epic-state.json` and never a member's `.pipeline-state.json`, and its freshness version is the epic manifest's `revision`, never a member's stage version:
|
|
232
|
+
|
|
233
|
+
```bash
|
|
234
|
+
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')"
|
|
235
|
+
[ -n "$R" ] || { echo "feature-forge: cannot locate plugin root" >&2; exit 1; }
|
|
236
|
+
python3 "$R/scripts/forge-session.py" state-verify \
|
|
237
|
+
--feature "{epic}" --stage forge-0-epic --status "<status>" \
|
|
238
|
+
--specs-dir "{specsDir}"
|
|
239
|
+
```
|
|
240
|
+
|
|
241
|
+
On exit 2 the verification result is **not** recorded: surface the `Error:` line verbatim, name the feature (and epic), and do not claim the verification was persisted or advance past it.
|
|
242
|
+
|
|
194
243
|
### Staleness Detection (Read-Time)
|
|
195
244
|
|
|
196
245
|
When loading upstream artifacts as prerequisites, check `basedOnVersions` in the pipeline state for this stage. If any upstream stage's current version is newer than the version recorded in `basedOnVersions`, warn the user before proceeding:
|
|
@@ -199,6 +248,31 @@ When loading upstream artifacts as prerequisites, check `basedOnVersions` in the
|
|
|
199
248
|
|
|
200
249
|
Frame the choice with its cost: re-running re-derives this stage from the current upstream (safest, but discards any hand-edits to this stage's artifacts); proceeding stale is faster but risks baking outdated assumptions into everything downstream. Recommend re-running unless the user knows the upstream change doesn't affect this stage.
|
|
201
250
|
|
|
251
|
+
## Immediate Downstream Note (Parking Lot)
|
|
252
|
+
|
|
253
|
+
When an interview raises a concern that belongs to a *later stage of this same feature*, acknowledge it and persist it **immediately, at the moment it is raised** — not at stage closure — by running `state-note` with a concise one-line statement of the concern. Add `--epic "{epic}"` when this feature is an epic member — required, per the Pipeline State Protocol above; omitting it for a member is an error and must never be allowed to fall back to a same-named flat feature.
|
|
254
|
+
|
|
255
|
+
```bash
|
|
256
|
+
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')"
|
|
257
|
+
[ -n "$R" ] || { echo "feature-forge: cannot locate plugin root" >&2; exit 1; }
|
|
258
|
+
python3 "$R/scripts/forge-session.py" state-note \
|
|
259
|
+
--feature "{feature}" --note "<concise downstream concern>" \
|
|
260
|
+
--specs-dir "{specsDir}"
|
|
261
|
+
```
|
|
262
|
+
|
|
263
|
+
`state-note` **overwrites** the single top-level `notes` string — it does not append. To preserve an earlier note, read the current `notes` value out of the feature's `.pipeline-state.json` first and pass one combined concise string in a single `--note`; never edit or round-trip the JSON by hand. This interview-time call is separate from the optional completion note offered at stage closure and must not be deferred until then — a session that ends before closure would otherwise lose the concern entirely.
|
|
264
|
+
|
|
265
|
+
On `UsageError`/exit 2, surface the `Error:` line verbatim together with the named feature (and epic) and the recovery instruction, and **stop claiming the concern was recorded** — it was not. Epic *decomposition* changes are not notes: they go through `state-ecr` into `epicChangeRequests`, never into `notes`.
|
|
266
|
+
|
|
267
|
+
## Verify Capability
|
|
268
|
+
|
|
269
|
+
Skills that close a stage pass `--verify-capability interactive|manual` to `stage-exit`. The full determination rule, the Standard Verify Gate, and the recovery path live in `references/stage-exit-protocol.md`; the two facts that are most often gotten wrong:
|
|
270
|
+
|
|
271
|
+
- **Dispatch capability is *permitted* dispatch, not a listed tool.** The question is "**may I dispatch `forge-verifier` right now**", not "is a subagent-dispatch tool in my tool surface". A session can carry a standing host instruction against dispatching subagents unless the user asked; such instructions are injected by the harness, sit outside this project's control, and outrank skill prose. Classify on permission, up front.
|
|
272
|
+
- **A consent requirement is `interactive`, not `manual`.** When dispatch is barred only *unless the user asked* and a question mechanism is available, pass `interactive`: the gate's own affirmative choice supplies the missing user request. Pass `manual` only when there is **no** question mechanism **and** **no** permitted dispatch.
|
|
273
|
+
|
|
274
|
+
A bar on unsolicited dispatch is never grounds to skip verification, and never grounds to fence the production successor while verification is unresolved. On the `runInStageVerify: true` path the emitted `verifyGate` stays `none`: reuse the Standard Verify Gate block for consent with **choice 2 omitted** (auto-verify is already effective, so "enable auto-verify going forward" is a no-op), leaving exactly two choices: *Verify now* (recommended) and *Skip for now*. The clean-room `forge-verifier` is **dispatched on the affirmative choice**, never merely printed for the user to run later; *Skip for now* is persisted as an explicit `skipped` before any advancing block.
|
|
275
|
+
|
|
202
276
|
## Branch Setup
|
|
203
277
|
|
|
204
278
|
Invoke this block at the **very start** of a pipeline entry point — `forge-1-prd` (standalone feature) and `forge-0-epic` (epic) — **before** any directory resolution or interview, so the rest of the run lands on the intended branch. `{label}` is the feature name (forge-1-prd) or epic name (forge-0-epic); `{scope}` is `feature` or `epic` correspondingly.
|
|
@@ -332,7 +406,7 @@ Invoke this block **at the head of any post-entry step that writes a stage artif
|
|
|
332
406
|
|
|
333
407
|
1. **Proceed** when `stages.{stage}.status` is `"in-progress"` (this session's Entry Stamp — you are finishing the run you started) or absent/`pending`. Run the write / exit normally.
|
|
334
408
|
|
|
335
|
-
2. **Detect-and-refuse** when ALL of these hold: `stages.{stage}.status ∈ {"complete", "stale"}` **AND** the stage's artifacts (incl. `TRACEABILITY.md` for forge-3-specs) exist on disk **AND** a `commitHash` is recorded for the stage **AND** you did **not** author this stage earlier in the current session. This is a stale/replayed continuation of an already-finished, committed stage. Do **not** overwrite the artifact or re-run the exit. Route instead to the **Stage-Entry Guard**'s *Re-authoring* path: surface the same `AskUserQuestion`
|
|
409
|
+
2. **Detect-and-refuse** when ALL of these hold: `stages.{stage}.status ∈ {"complete", "stale"}` **AND** the stage's artifacts (incl. `TRACEABILITY.md` for forge-3-specs) exist on disk **AND** a `commitHash` is recorded for the stage **AND** you did **not** author this stage earlier in the current session. This is a stale/replayed continuation of an already-finished, committed stage. Do **not** overwrite the artifact or re-run the exit. Route instead to the **Stage-Entry Guard**'s *Re-authoring* path: surface the same warning via `AskUserQuestion` ("A completed {stage} artifact already exists for '{feature}' (v{n}{, marked stale}). Continuing will create a new version. Proceed?"). Only on explicit confirmation re-enter from the Entry Stamp (the version bumps at exit); otherwise **stop** and report that the stage is already complete — cite the recorded `commitHash` and offer `/feature-forge:forge {feature}` to see true state.
|
|
336
410
|
|
|
337
411
|
When you cannot confirm you authored the current run, treat it as a replay and refuse: a false refuse costs one confirmation click; a false proceed overwrites a committed artifact and re-churns a stage version. `--force` follows Force Mode (skip the gate, treat as a deliberate re-author).
|
|
338
412
|
|