@garygentry/feature-forge 0.1.0
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/LICENSE +21 -0
- package/adapters/GENERATION-REPORT.md +128 -0
- package/adapters/claude/agents/forge-researcher.md +137 -0
- package/adapters/claude/agents/forge-spec-writer.md +115 -0
- package/adapters/claude/agents/forge-verifier.md +121 -0
- package/adapters/claude/references/epic-manifest-schema.json +120 -0
- package/adapters/claude/references/forge-config-schema.json +166 -0
- package/adapters/claude/references/pipeline-state-schema.json +110 -0
- package/adapters/claude/references/portable-root.md +56 -0
- package/adapters/claude/references/process-overview.md +123 -0
- package/adapters/claude/references/ralph-loop-contract.md +221 -0
- package/adapters/claude/references/shared-conventions.md +144 -0
- package/adapters/claude/references/skill-frontmatter.schema.json +17 -0
- package/adapters/claude/references/stack-resolution.md +51 -0
- package/adapters/claude/references/stacks/_generic.md +90 -0
- package/adapters/claude/references/stacks/go.md +138 -0
- package/adapters/claude/references/stacks/python.md +163 -0
- package/adapters/claude/references/stacks/rust.md +151 -0
- package/adapters/claude/references/stacks/typescript.md +111 -0
- package/adapters/claude/references/vendor-construct-inventory.md +49 -0
- package/adapters/claude/scripts/forge-root.sh +50 -0
- package/adapters/claude/skills/forge/SKILL.md +165 -0
- package/adapters/claude/skills/forge-0-epic/SKILL.md +303 -0
- package/adapters/claude/skills/forge-0-epic/references/edit-mode.md +222 -0
- package/adapters/claude/skills/forge-0-epic/references/epic-manifest-subcommands.md +64 -0
- package/adapters/claude/skills/forge-1-prd/SKILL.md +121 -0
- package/adapters/claude/skills/forge-1-prd/references/prd-template.md +106 -0
- package/adapters/claude/skills/forge-2-tech/SKILL.md +198 -0
- package/adapters/claude/skills/forge-2-tech/references/stack-discovery-checklist.md +95 -0
- package/adapters/claude/skills/forge-3-specs/SKILL.md +154 -0
- package/adapters/claude/skills/forge-3-specs/references/spec-archetypes.md +106 -0
- package/adapters/claude/skills/forge-3-specs/references/spec-examples.md +71 -0
- package/adapters/claude/skills/forge-4-backlog/SKILL.md +146 -0
- package/adapters/claude/skills/forge-5-loop/SKILL.md +303 -0
- package/adapters/claude/skills/forge-5-loop/references/result-reporting.md +63 -0
- package/adapters/claude/skills/forge-5-loop/references/runner-contract.md +214 -0
- package/adapters/claude/skills/forge-6-docs/SKILL.md +179 -0
- package/adapters/claude/skills/forge-6-docs/references/doc-conventions.md +126 -0
- package/adapters/claude/skills/forge-fix/SKILL.md +65 -0
- package/adapters/claude/skills/forge-init/SKILL.md +29 -0
- package/adapters/claude/skills/forge-verify/SKILL.md +219 -0
- package/adapters/claude/skills/forge-verify/references/verification-checklists.md +379 -0
- package/adapters/codex/agents/forge-researcher.md +133 -0
- package/adapters/codex/agents/forge-spec-writer.md +112 -0
- package/adapters/codex/agents/forge-verifier.md +115 -0
- package/adapters/codex/agents/openai.yaml +10 -0
- package/adapters/codex/references/epic-manifest-schema.json +120 -0
- package/adapters/codex/references/forge-config-schema.json +166 -0
- package/adapters/codex/references/pipeline-state-schema.json +110 -0
- package/adapters/codex/references/portable-root.md +56 -0
- package/adapters/codex/references/process-overview.md +123 -0
- package/adapters/codex/references/ralph-loop-contract.md +221 -0
- package/adapters/codex/references/shared-conventions.md +144 -0
- package/adapters/codex/references/skill-frontmatter.schema.json +17 -0
- package/adapters/codex/references/stack-resolution.md +51 -0
- package/adapters/codex/references/stacks/_generic.md +90 -0
- package/adapters/codex/references/stacks/go.md +138 -0
- package/adapters/codex/references/stacks/python.md +163 -0
- package/adapters/codex/references/stacks/rust.md +151 -0
- package/adapters/codex/references/stacks/typescript.md +111 -0
- package/adapters/codex/references/vendor-construct-inventory.md +49 -0
- package/adapters/codex/scripts/forge-root.sh +50 -0
- package/adapters/codex/skills/forge/forge.md +164 -0
- package/adapters/codex/skills/forge-0-epic/forge-0-epic.md +302 -0
- package/adapters/codex/skills/forge-0-epic/references/edit-mode.md +222 -0
- package/adapters/codex/skills/forge-0-epic/references/epic-manifest-subcommands.md +64 -0
- package/adapters/codex/skills/forge-1-prd/forge-1-prd.md +120 -0
- package/adapters/codex/skills/forge-1-prd/references/prd-template.md +106 -0
- package/adapters/codex/skills/forge-2-tech/forge-2-tech.md +197 -0
- package/adapters/codex/skills/forge-2-tech/references/stack-discovery-checklist.md +95 -0
- package/adapters/codex/skills/forge-3-specs/forge-3-specs.md +153 -0
- package/adapters/codex/skills/forge-3-specs/references/spec-archetypes.md +106 -0
- package/adapters/codex/skills/forge-3-specs/references/spec-examples.md +71 -0
- package/adapters/codex/skills/forge-4-backlog/forge-4-backlog.md +145 -0
- package/adapters/codex/skills/forge-5-loop/forge-5-loop.md +302 -0
- package/adapters/codex/skills/forge-5-loop/references/result-reporting.md +63 -0
- package/adapters/codex/skills/forge-5-loop/references/runner-contract.md +214 -0
- package/adapters/codex/skills/forge-6-docs/forge-6-docs.md +178 -0
- package/adapters/codex/skills/forge-6-docs/references/doc-conventions.md +126 -0
- package/adapters/codex/skills/forge-fix/forge-fix.md +64 -0
- package/adapters/codex/skills/forge-init/forge-init.md +29 -0
- package/adapters/codex/skills/forge-verify/forge-verify.md +218 -0
- package/adapters/codex/skills/forge-verify/references/verification-checklists.md +379 -0
- package/adapters/copilot/agents/forge-researcher.md +133 -0
- package/adapters/copilot/agents/forge-spec-writer.md +112 -0
- package/adapters/copilot/agents/forge-verifier.md +115 -0
- package/adapters/copilot/references/epic-manifest-schema.json +120 -0
- package/adapters/copilot/references/forge-config-schema.json +166 -0
- package/adapters/copilot/references/pipeline-state-schema.json +110 -0
- package/adapters/copilot/references/portable-root.md +56 -0
- package/adapters/copilot/references/process-overview.md +123 -0
- package/adapters/copilot/references/ralph-loop-contract.md +221 -0
- package/adapters/copilot/references/shared-conventions.md +144 -0
- package/adapters/copilot/references/skill-frontmatter.schema.json +17 -0
- package/adapters/copilot/references/stack-resolution.md +51 -0
- package/adapters/copilot/references/stacks/_generic.md +90 -0
- package/adapters/copilot/references/stacks/go.md +138 -0
- package/adapters/copilot/references/stacks/python.md +163 -0
- package/adapters/copilot/references/stacks/rust.md +151 -0
- package/adapters/copilot/references/stacks/typescript.md +111 -0
- package/adapters/copilot/references/vendor-construct-inventory.md +49 -0
- package/adapters/copilot/scripts/forge-root.sh +50 -0
- package/adapters/copilot/skills/forge/forge.md +164 -0
- package/adapters/copilot/skills/forge-0-epic/forge-0-epic.md +302 -0
- package/adapters/copilot/skills/forge-0-epic/references/edit-mode.md +222 -0
- package/adapters/copilot/skills/forge-0-epic/references/epic-manifest-subcommands.md +64 -0
- package/adapters/copilot/skills/forge-1-prd/forge-1-prd.md +120 -0
- package/adapters/copilot/skills/forge-1-prd/references/prd-template.md +106 -0
- package/adapters/copilot/skills/forge-2-tech/forge-2-tech.md +197 -0
- package/adapters/copilot/skills/forge-2-tech/references/stack-discovery-checklist.md +95 -0
- package/adapters/copilot/skills/forge-3-specs/forge-3-specs.md +153 -0
- package/adapters/copilot/skills/forge-3-specs/references/spec-archetypes.md +106 -0
- package/adapters/copilot/skills/forge-3-specs/references/spec-examples.md +71 -0
- package/adapters/copilot/skills/forge-4-backlog/forge-4-backlog.md +145 -0
- package/adapters/copilot/skills/forge-5-loop/forge-5-loop.md +302 -0
- package/adapters/copilot/skills/forge-5-loop/references/result-reporting.md +63 -0
- package/adapters/copilot/skills/forge-5-loop/references/runner-contract.md +214 -0
- package/adapters/copilot/skills/forge-6-docs/forge-6-docs.md +178 -0
- package/adapters/copilot/skills/forge-6-docs/references/doc-conventions.md +126 -0
- package/adapters/copilot/skills/forge-fix/forge-fix.md +64 -0
- package/adapters/copilot/skills/forge-init/forge-init.md +29 -0
- package/adapters/copilot/skills/forge-verify/forge-verify.md +218 -0
- package/adapters/copilot/skills/forge-verify/references/verification-checklists.md +379 -0
- package/adapters/cursor/agents/forge-researcher.mdc +134 -0
- package/adapters/cursor/agents/forge-spec-writer.mdc +113 -0
- package/adapters/cursor/agents/forge-verifier.mdc +116 -0
- package/adapters/cursor/references/epic-manifest-schema.json +120 -0
- package/adapters/cursor/references/forge-config-schema.json +166 -0
- package/adapters/cursor/references/pipeline-state-schema.json +110 -0
- package/adapters/cursor/references/portable-root.md +56 -0
- package/adapters/cursor/references/process-overview.md +123 -0
- package/adapters/cursor/references/ralph-loop-contract.md +221 -0
- package/adapters/cursor/references/shared-conventions.md +144 -0
- package/adapters/cursor/references/skill-frontmatter.schema.json +17 -0
- package/adapters/cursor/references/stack-resolution.md +51 -0
- package/adapters/cursor/references/stacks/_generic.md +90 -0
- package/adapters/cursor/references/stacks/go.md +138 -0
- package/adapters/cursor/references/stacks/python.md +163 -0
- package/adapters/cursor/references/stacks/rust.md +151 -0
- package/adapters/cursor/references/stacks/typescript.md +111 -0
- package/adapters/cursor/references/vendor-construct-inventory.md +49 -0
- package/adapters/cursor/scripts/forge-root.sh +50 -0
- package/adapters/cursor/skills/forge/forge.mdc +165 -0
- package/adapters/cursor/skills/forge-0-epic/forge-0-epic.mdc +303 -0
- package/adapters/cursor/skills/forge-0-epic/references/edit-mode.md +222 -0
- package/adapters/cursor/skills/forge-0-epic/references/epic-manifest-subcommands.md +64 -0
- package/adapters/cursor/skills/forge-1-prd/forge-1-prd.mdc +121 -0
- package/adapters/cursor/skills/forge-1-prd/references/prd-template.md +106 -0
- package/adapters/cursor/skills/forge-2-tech/forge-2-tech.mdc +198 -0
- package/adapters/cursor/skills/forge-2-tech/references/stack-discovery-checklist.md +95 -0
- package/adapters/cursor/skills/forge-3-specs/forge-3-specs.mdc +154 -0
- package/adapters/cursor/skills/forge-3-specs/references/spec-archetypes.md +106 -0
- package/adapters/cursor/skills/forge-3-specs/references/spec-examples.md +71 -0
- package/adapters/cursor/skills/forge-4-backlog/forge-4-backlog.mdc +146 -0
- package/adapters/cursor/skills/forge-5-loop/forge-5-loop.mdc +303 -0
- package/adapters/cursor/skills/forge-5-loop/references/result-reporting.md +63 -0
- package/adapters/cursor/skills/forge-5-loop/references/runner-contract.md +214 -0
- package/adapters/cursor/skills/forge-6-docs/forge-6-docs.mdc +179 -0
- package/adapters/cursor/skills/forge-6-docs/references/doc-conventions.md +126 -0
- package/adapters/cursor/skills/forge-fix/forge-fix.mdc +65 -0
- package/adapters/cursor/skills/forge-init/forge-init.mdc +30 -0
- package/adapters/cursor/skills/forge-verify/forge-verify.mdc +219 -0
- package/adapters/cursor/skills/forge-verify/references/verification-checklists.md +379 -0
- package/adapters/gemini/agents/forge-researcher.md +133 -0
- package/adapters/gemini/agents/forge-spec-writer.md +112 -0
- package/adapters/gemini/agents/forge-verifier.md +115 -0
- package/adapters/gemini/gemini-extension.json +54 -0
- package/adapters/gemini/references/epic-manifest-schema.json +120 -0
- package/adapters/gemini/references/forge-config-schema.json +166 -0
- package/adapters/gemini/references/pipeline-state-schema.json +110 -0
- package/adapters/gemini/references/portable-root.md +56 -0
- package/adapters/gemini/references/process-overview.md +123 -0
- package/adapters/gemini/references/ralph-loop-contract.md +221 -0
- package/adapters/gemini/references/shared-conventions.md +144 -0
- package/adapters/gemini/references/skill-frontmatter.schema.json +17 -0
- package/adapters/gemini/references/stack-resolution.md +51 -0
- package/adapters/gemini/references/stacks/_generic.md +90 -0
- package/adapters/gemini/references/stacks/go.md +138 -0
- package/adapters/gemini/references/stacks/python.md +163 -0
- package/adapters/gemini/references/stacks/rust.md +151 -0
- package/adapters/gemini/references/stacks/typescript.md +111 -0
- package/adapters/gemini/references/vendor-construct-inventory.md +49 -0
- package/adapters/gemini/scripts/forge-root.sh +50 -0
- package/adapters/gemini/skills/forge/forge.md +164 -0
- package/adapters/gemini/skills/forge-0-epic/forge-0-epic.md +302 -0
- package/adapters/gemini/skills/forge-0-epic/references/edit-mode.md +222 -0
- package/adapters/gemini/skills/forge-0-epic/references/epic-manifest-subcommands.md +64 -0
- package/adapters/gemini/skills/forge-1-prd/forge-1-prd.md +120 -0
- package/adapters/gemini/skills/forge-1-prd/references/prd-template.md +106 -0
- package/adapters/gemini/skills/forge-2-tech/forge-2-tech.md +197 -0
- package/adapters/gemini/skills/forge-2-tech/references/stack-discovery-checklist.md +95 -0
- package/adapters/gemini/skills/forge-3-specs/forge-3-specs.md +153 -0
- package/adapters/gemini/skills/forge-3-specs/references/spec-archetypes.md +106 -0
- package/adapters/gemini/skills/forge-3-specs/references/spec-examples.md +71 -0
- package/adapters/gemini/skills/forge-4-backlog/forge-4-backlog.md +145 -0
- package/adapters/gemini/skills/forge-5-loop/forge-5-loop.md +302 -0
- package/adapters/gemini/skills/forge-5-loop/references/result-reporting.md +63 -0
- package/adapters/gemini/skills/forge-5-loop/references/runner-contract.md +214 -0
- package/adapters/gemini/skills/forge-6-docs/forge-6-docs.md +178 -0
- package/adapters/gemini/skills/forge-6-docs/references/doc-conventions.md +126 -0
- package/adapters/gemini/skills/forge-fix/forge-fix.md +64 -0
- package/adapters/gemini/skills/forge-init/forge-init.md +29 -0
- package/adapters/gemini/skills/forge-verify/forge-verify.md +218 -0
- package/adapters/gemini/skills/forge-verify/references/verification-checklists.md +379 -0
- package/dist/agent-targets.d.ts +70 -0
- package/dist/agent-targets.js +111 -0
- package/dist/apply.d.ts +49 -0
- package/dist/apply.js +246 -0
- package/dist/cli.d.ts +94 -0
- package/dist/cli.js +508 -0
- package/dist/detect.d.ts +45 -0
- package/dist/detect.js +72 -0
- package/dist/fsutil.d.ts +56 -0
- package/dist/fsutil.js +175 -0
- package/dist/hash.d.ts +50 -0
- package/dist/hash.js +107 -0
- package/dist/index.d.ts +8 -0
- package/dist/index.js +9 -0
- package/dist/manifest.d.ts +72 -0
- package/dist/manifest.js +222 -0
- package/dist/plan.d.ts +66 -0
- package/dist/plan.js +166 -0
- package/dist/rauf.d.ts +83 -0
- package/dist/rauf.js +118 -0
- package/dist/report.d.ts +35 -0
- package/dist/report.js +110 -0
- package/dist/source.d.ts +69 -0
- package/dist/source.js +164 -0
- package/dist/types.d.ts +264 -0
- package/dist/types.js +57 -0
- package/package.json +42 -0
|
@@ -0,0 +1,110 @@
|
|
|
1
|
+
{
|
|
2
|
+
"$schema": "http://json-schema.org/draft-07/schema#",
|
|
3
|
+
"title": "Feature Forge Pipeline State",
|
|
4
|
+
"description": "Tracks pipeline progress for a single feature across sessions. Lives at {specsDir}/{feature}/.pipeline-state.json",
|
|
5
|
+
"type": "object",
|
|
6
|
+
"required": ["feature", "createdAt", "updatedAt", "currentStage", "stages", "pipelineStatus"],
|
|
7
|
+
"properties": {
|
|
8
|
+
"pipelineStatus": {
|
|
9
|
+
"type": "string",
|
|
10
|
+
"enum": ["active", "paused", "abandoned"],
|
|
11
|
+
"default": "active"
|
|
12
|
+
},
|
|
13
|
+
"feature": {
|
|
14
|
+
"type": "string",
|
|
15
|
+
"description": "Feature name (matches directory name under specsDir)"
|
|
16
|
+
},
|
|
17
|
+
"epic": {
|
|
18
|
+
"type": "string",
|
|
19
|
+
"description": "Back-pointer to the owning epic's name. Absent for standalone features. The epic-manifest.json is canonical on conflict (REQ-STATE-01)."
|
|
20
|
+
},
|
|
21
|
+
"createdAt": {
|
|
22
|
+
"type": "string",
|
|
23
|
+
"format": "date-time"
|
|
24
|
+
},
|
|
25
|
+
"updatedAt": {
|
|
26
|
+
"type": "string",
|
|
27
|
+
"format": "date-time"
|
|
28
|
+
},
|
|
29
|
+
"currentStage": {
|
|
30
|
+
"type": "string",
|
|
31
|
+
"enum": ["forge-1-prd", "forge-2-tech", "forge-3-specs", "forge-4-backlog", "forge-5-loop", "forge-6-docs", "complete", "forge-verify-prd", "forge-verify-tech", "forge-verify-specs", "forge-verify-backlog", "forge-verify-impl", "forge-0-epic", "forge-verify-epic"],
|
|
32
|
+
"description": "The stage currently in progress or next to start"
|
|
33
|
+
},
|
|
34
|
+
"notes": {
|
|
35
|
+
"type": "string",
|
|
36
|
+
"description": "Free-form notes persisted between sessions (user can add context before stepping away)"
|
|
37
|
+
},
|
|
38
|
+
"stages": {
|
|
39
|
+
"type": "object",
|
|
40
|
+
"properties": {
|
|
41
|
+
"forge-0-epic": { "$ref": "#/definitions/stageEntry" },
|
|
42
|
+
"forge-verify-epic": { "$ref": "#/definitions/verifyEntry" },
|
|
43
|
+
"forge-1-prd": { "$ref": "#/definitions/stageEntry" },
|
|
44
|
+
"forge-2-tech": { "$ref": "#/definitions/stageEntry" },
|
|
45
|
+
"forge-3-specs": { "$ref": "#/definitions/stageEntry" },
|
|
46
|
+
"forge-verify-specs": { "$ref": "#/definitions/verifyEntry" },
|
|
47
|
+
"forge-4-backlog": { "$ref": "#/definitions/stageEntry" },
|
|
48
|
+
"forge-verify-backlog": { "$ref": "#/definitions/verifyEntry" },
|
|
49
|
+
"forge-5-loop": { "$ref": "#/definitions/stageEntry" },
|
|
50
|
+
"forge-6-docs": { "$ref": "#/definitions/stageEntry" },
|
|
51
|
+
"forge-verify-impl": { "$ref": "#/definitions/verifyEntry" },
|
|
52
|
+
"forge-verify-prd": { "$ref": "#/definitions/verifyEntry" },
|
|
53
|
+
"forge-verify-tech": { "$ref": "#/definitions/verifyEntry" }
|
|
54
|
+
}
|
|
55
|
+
}
|
|
56
|
+
},
|
|
57
|
+
"definitions": {
|
|
58
|
+
"stageEntry": {
|
|
59
|
+
"type": "object",
|
|
60
|
+
"required": ["status"],
|
|
61
|
+
"properties": {
|
|
62
|
+
"status": {
|
|
63
|
+
"type": "string",
|
|
64
|
+
"enum": ["pending", "in-progress", "complete", "stale"]
|
|
65
|
+
},
|
|
66
|
+
"version": {
|
|
67
|
+
"type": "integer",
|
|
68
|
+
"description": "Incremented each time this stage's artifacts are revised"
|
|
69
|
+
},
|
|
70
|
+
"artifacts": {
|
|
71
|
+
"type": "array",
|
|
72
|
+
"items": { "type": "string" },
|
|
73
|
+
"description": "Relative paths to artifacts produced by this stage"
|
|
74
|
+
},
|
|
75
|
+
"startedAt": { "type": ["string", "null"], "format": "date-time" },
|
|
76
|
+
"completedAt": { "type": ["string", "null"], "format": "date-time" },
|
|
77
|
+
"commitHash": {
|
|
78
|
+
"type": ["string", "null"],
|
|
79
|
+
"description": "Git commit SHA after this stage completed"
|
|
80
|
+
},
|
|
81
|
+
"basedOnVersions": {
|
|
82
|
+
"type": "object",
|
|
83
|
+
"description": "Upstream stage versions this artifact was built against",
|
|
84
|
+
"additionalProperties": { "type": "integer" }
|
|
85
|
+
}
|
|
86
|
+
}
|
|
87
|
+
},
|
|
88
|
+
"verifyEntry": {
|
|
89
|
+
"type": "object",
|
|
90
|
+
"required": ["status"],
|
|
91
|
+
"properties": {
|
|
92
|
+
"status": {
|
|
93
|
+
"type": "string",
|
|
94
|
+
"enum": ["pending", "passed", "findings-reported", "findings-applied", "skipped"]
|
|
95
|
+
},
|
|
96
|
+
"findingsFile": {
|
|
97
|
+
"type": ["string", "null"],
|
|
98
|
+
"description": "Path to the verification findings document"
|
|
99
|
+
},
|
|
100
|
+
"findingsCount": {
|
|
101
|
+
"type": ["integer", "null"],
|
|
102
|
+
"description": "Number of findings reported"
|
|
103
|
+
},
|
|
104
|
+
"verifiedAt": { "type": ["string", "null"], "format": "date-time" },
|
|
105
|
+
"fixedAt": { "type": ["string", "null"], "format": "date-time" },
|
|
106
|
+
"commitHash": { "type": ["string", "null"] }
|
|
107
|
+
}
|
|
108
|
+
}
|
|
109
|
+
}
|
|
110
|
+
}
|
|
@@ -0,0 +1,56 @@
|
|
|
1
|
+
# Portable Script-Root Resolution
|
|
2
|
+
|
|
3
|
+
This file is the **single canonical home** of the feature-forge bootstrap prelude and the
|
|
4
|
+
portable invocation convention. Each fenced shell block an agent runs is a separate process
|
|
5
|
+
with no persisted state, so the plugin root must be re-resolved within the same block as every
|
|
6
|
+
bundled-script call. The prelude below is the fixed, byte-identical snippet that does this by
|
|
7
|
+
discovering and delegating to `scripts/forge-root.sh`. Downstream consumers
|
|
8
|
+
(`forge-agent-adapters-build`, `cross-agent-installer`) and the spec-purity checker treat this
|
|
9
|
+
file as authoritative: the checker's rule 5 compares every prelude occurrence across the canon
|
|
10
|
+
against the fenced block here, byte-for-byte.
|
|
11
|
+
|
|
12
|
+
## Canonical bootstrap prelude
|
|
13
|
+
|
|
14
|
+
```bash
|
|
15
|
+
R="$(for d in "$HOME"/.claude/skills/feature-forge "$HOME"/.claude/plugins/*/feature-forge; do [ -x "$d/scripts/forge-root.sh" ] && exec "$d/scripts/forge-root.sh"; done)"
|
|
16
|
+
[ -n "$R" ] || { echo "feature-forge: cannot locate plugin root" >&2; exit 1; }
|
|
17
|
+
```
|
|
18
|
+
|
|
19
|
+
## Usage
|
|
20
|
+
|
|
21
|
+
Prepend the prelude to a fenced shell block once, then invoke bundled scripts via `$R`:
|
|
22
|
+
`python3 "$R/scripts/<x>"` or `bash "$R/scripts/<x>"`. One prelude per fenced block — if a block
|
|
23
|
+
makes several calls, add the prelude once and reuse `$R` for each. A fresh block gets its own
|
|
24
|
+
prelude (per-block re-resolution). Worked example:
|
|
25
|
+
|
|
26
|
+
```bash
|
|
27
|
+
R="$(for d in "$HOME"/.claude/skills/feature-forge "$HOME"/.claude/plugins/*/feature-forge; do [ -x "$d/scripts/forge-root.sh" ] && exec "$d/scripts/forge-root.sh"; done)"
|
|
28
|
+
[ -n "$R" ] || { echo "feature-forge: cannot locate plugin root" >&2; exit 1; }
|
|
29
|
+
python3 "$R/scripts/epic-manifest.py" render-status "{epic}" --specs-dir "{specsDir}" --json
|
|
30
|
+
```
|
|
31
|
+
|
|
32
|
+
## Invariants (do NOT "fix" these)
|
|
33
|
+
|
|
34
|
+
1. **Probes paths, not the env var.** The prelude's `for d in …` enumerates directory paths to
|
|
35
|
+
locate an executable `forge-root.sh`; it contains no plugin-root environment variable. That is what lets
|
|
36
|
+
a prelude occurrence satisfy the "zero residual var in canonical surfaces" rule while staying
|
|
37
|
+
portable.
|
|
38
|
+
2. **First-discoverable-resolver-wins.** The `exec` inside the `$(…)` command substitution means
|
|
39
|
+
the loop stops at the first directory holding an executable `forge-root.sh` and delegates ALL
|
|
40
|
+
final root resolution to that script. The `for` list is a discovery order for `forge-root.sh`
|
|
41
|
+
itself, not a fallback chain for the plugin root. Removing the `exec` to "keep looping" is a
|
|
42
|
+
regression — once `exec`'d, the loop is replaced by the resolver process and never advances.
|
|
43
|
+
3. **Prelude candidate set is a minimal `$HOME` bootstrap subset.** The prelude's `for d` list
|
|
44
|
+
exists only to bootstrap-discover `forge-root.sh`; the authoritative multi-root probe lives in
|
|
45
|
+
`forge-root.sh` step 2. When adding an install root, update `forge-root.sh` first; extend the
|
|
46
|
+
prelude only if the new root is needed to bootstrap-discover `forge-root.sh` itself.
|
|
47
|
+
|
|
48
|
+
## The resolver
|
|
49
|
+
|
|
50
|
+
The prelude delegates to [`scripts/forge-root.sh`](../scripts/forge-root.sh) — the portable
|
|
51
|
+
skill/plugin-root resolver. It takes no arguments, prints the absolute plugin root to stdout and
|
|
52
|
+
exits `0`, or writes an actionable message to stderr and exits `1`. It resolves the root by
|
|
53
|
+
self-location → candidate-root probe → plugin-root environment-variable fallback → actionable failure,
|
|
54
|
+
and never sources or executes a discovered path — it only ever prints a directory string. The
|
|
55
|
+
spec-purity checker (rule 5) enforces that every prelude occurrence across the canon is
|
|
56
|
+
byte-identical to the fenced block in this file.
|
|
@@ -0,0 +1,123 @@
|
|
|
1
|
+
# Feature Forge Pipeline Overview
|
|
2
|
+
|
|
3
|
+
This document describes the end-to-end feature development pipeline managed by the feature-forge plugin. All forge skills reference this document to understand the overall flow and their position within it.
|
|
4
|
+
|
|
5
|
+
## Pipeline Stages
|
|
6
|
+
|
|
7
|
+
```
|
|
8
|
+
forge-1-prd → forge-2-tech → forge-3-specs → forge-verify → forge-4-backlog → forge-verify → forge-5-loop → forge-verify → forge-6-docs
|
|
9
|
+
```
|
|
10
|
+
|
|
11
|
+
### Stage 1: PRD (`/feature-forge:forge-1-prd <feature>`)
|
|
12
|
+
**Input:** User's feature idea and domain knowledge
|
|
13
|
+
**Output:** `{specsDir}/{feature}/PRD.md`
|
|
14
|
+
**Method:** Structured interview focused exclusively on requirements. No technology decisions.
|
|
15
|
+
|
|
16
|
+
### Stage 2: Tech Spec (`/feature-forge:forge-2-tech <feature>`)
|
|
17
|
+
**Input:** PRD.md
|
|
18
|
+
**Output:** `{specsDir}/{feature}/tech-spec.md`
|
|
19
|
+
**Method:** Structured interview for technology decisions, grounded in PRD requirements.
|
|
20
|
+
|
|
21
|
+
### Stage 3: Implementation Specs (`/feature-forge:forge-3-specs <feature>`)
|
|
22
|
+
**Input:** PRD.md + tech-spec.md
|
|
23
|
+
**Output:** `{specsDir}/{feature}/##-<name>.md` (suite of numbered documents)
|
|
24
|
+
**Method:** Generate detailed implementation documents from spec archetypes.
|
|
25
|
+
|
|
26
|
+
### Verification Gate (`/feature-forge:forge-verify <feature>`)
|
|
27
|
+
**Input:** All artifacts from current and prior stages
|
|
28
|
+
**Output:** `{specsDir}/{feature}/.verification/VERIFY-<stage>-<timestamp>.md` (includes both findings and a Fix Execution Plan)
|
|
29
|
+
**Method:** Clean-context analysis producing actionable findings with an ordered fix plan.
|
|
30
|
+
|
|
31
|
+
After verification, fixes can be applied via:
|
|
32
|
+
- `/feature-forge:forge-fix <feature>` — reads the Fix Execution Plan from the findings document and applies changes (works in any session)
|
|
33
|
+
- Plan mode workflow — enter plan mode, run verify, review plan, exit and execute
|
|
34
|
+
- Manual — read findings and apply fixes by hand
|
|
35
|
+
|
|
36
|
+
### Stage 4: Backlog (`/feature-forge:forge-4-backlog <feature>`)
|
|
37
|
+
**Input:** Full spec suite
|
|
38
|
+
**Output:** `{specsDir}/{feature}/backlog.json` (or `{backlogDir}/backlog.json` if backlogDir is configured)
|
|
39
|
+
**Method:** Generate structured backlog items with spec references, acceptance criteria, and dependencies. Backlog is collocated with feature specs by default.
|
|
40
|
+
|
|
41
|
+
### Stage 5: Rauf Loop (`/feature-forge:forge-5-loop <feature>`)
|
|
42
|
+
**Input:** `backlog.json` from Stage 4
|
|
43
|
+
**Output:** Implemented source code (committed per-item by rauf)
|
|
44
|
+
**Method:** Execute the rauf autonomous coding loop against the feature's backlog. Spawns a fresh Claude Code session per backlog item with full spec context.
|
|
45
|
+
|
|
46
|
+
### Stage 6: Documentation (`/feature-forge:forge-6-docs <feature>`)
|
|
47
|
+
**Input:** Specs + implementation
|
|
48
|
+
**Output:** `{docsDir}/{feature}/` documentation suite
|
|
49
|
+
**Method:** Generate developer-focused architecture documentation.
|
|
50
|
+
|
|
51
|
+
## Pipeline State
|
|
52
|
+
|
|
53
|
+
State is tracked in `{specsDir}/{feature}/.pipeline-state.json` and persists across session clears. The `/feature-forge:forge <feature>` navigator reads this file to show current progress.
|
|
54
|
+
|
|
55
|
+
## Git Discipline
|
|
56
|
+
|
|
57
|
+
Every stage completion should be followed by a git commit:
|
|
58
|
+
- Commit message format: `{commitPrefix}({feature}): <action>`
|
|
59
|
+
- Examples: `forge(auth): complete PRD v1`, `forge(auth): apply spec verification fixes`
|
|
60
|
+
- Before applying verification fixes, commit current state first (so pre-fix state is recoverable)
|
|
61
|
+
- After applying fixes, commit again
|
|
62
|
+
|
|
63
|
+
## Configuration
|
|
64
|
+
|
|
65
|
+
Read `forge.config.json` from project root for path overrides. See `references/forge-config-schema.json` for the full schema. If no config file exists, use defaults:
|
|
66
|
+
- specsDir: `./specs`
|
|
67
|
+
- docsDir: `./docs/architecture`
|
|
68
|
+
- backlogDir: (null — backlog defaults to {specsDir}/{feature}/backlog.json)
|
|
69
|
+
- gitCommitAfterStage: `true`
|
|
70
|
+
- commitPrefix: `forge`
|
|
71
|
+
|
|
72
|
+
## Git Workflow
|
|
73
|
+
|
|
74
|
+
Recommended: create a `forge/{feature}` branch before starting the pipeline. All forge commits go to this branch. After implementation, merge to your development branch.
|
|
75
|
+
|
|
76
|
+
If you prefer manual commit control, set `gitCommitAfterStage: false` in `forge.config.json`.
|
|
77
|
+
|
|
78
|
+
## Cross-Cutting Concerns
|
|
79
|
+
|
|
80
|
+
### Feature Name is Required
|
|
81
|
+
Every forge skill requires a feature name as the first argument. If not provided, STOP and ask. Never guess.
|
|
82
|
+
|
|
83
|
+
### Reference Existing Code
|
|
84
|
+
When creating specs, always examine the existing codebase for patterns, conventions, and integration points. Check:
|
|
85
|
+
- Other feature specs in `{specsDir}/`
|
|
86
|
+
- Existing documentation in `{docsDir}/`
|
|
87
|
+
- Module/package structure and exports in the project
|
|
88
|
+
- Shared types, utilities, and conventions
|
|
89
|
+
|
|
90
|
+
### Stack Context
|
|
91
|
+
The project's stack is detected during forge-2-tech and persisted in `forge.config.json` (the `stack`, `typeCheckCommand`, and `testCommand` fields). See `references/stack-resolution.md` for the full resolution protocol. The project may also have a `stack-decisions.md` in `.claude/references/` with established technology decisions — if present, it takes highest precedence.
|
|
92
|
+
|
|
93
|
+
## Subagents
|
|
94
|
+
|
|
95
|
+
The plugin includes three specialized subagents in `agents/` that enhance specific
|
|
96
|
+
pipeline steps. They use **model aliases** (`opus`/`sonnet`) rather than pinned IDs, so
|
|
97
|
+
they track the current model tier automatically.
|
|
98
|
+
|
|
99
|
+
### forge-verifier
|
|
100
|
+
- **Purpose:** Read-only verification of pipeline artifacts
|
|
101
|
+
- **Used by:** `forge-verify` skill (delegation via Agent tool)
|
|
102
|
+
- **Tools:** Read, Glob, Grep, Bash (read-only operations only)
|
|
103
|
+
- **Model:** Opus (judgement-heavy gap/inconsistency analysis)
|
|
104
|
+
- **Memory:** Project-scoped persistent memory — accumulates knowledge about recurring issues and project-specific patterns across sessions
|
|
105
|
+
- **Parallel:** For large modes (specs/backlog/impl), `forge-verify` dispatches several instances in parallel, one per **dimension group** (e.g. types/contracts, traceability, testing), and the parent merges their findings. An opt-in adversarial "deep verify" pass re-checks high-severity findings with a skeptic instance to cut false positives. A purely mechanical dimension (e.g. traceability validation) could run on a cheaper tier (Haiku) if cost matters.
|
|
106
|
+
- **Why a subagent:** Verification reads the entire spec suite, backlog, and potentially source code. Running this in a separate context window prevents context pressure on the main conversation. The read-only tool restriction also makes it impossible to accidentally modify specs during verification.
|
|
107
|
+
|
|
108
|
+
### forge-researcher
|
|
109
|
+
- **Purpose:** Codebase exploration and integration mapping
|
|
110
|
+
- **Used by:** `forge-2-tech` skill (spawned before the tech-spec interview)
|
|
111
|
+
- **Tools:** Read, Glob, Grep, Bash (read-only)
|
|
112
|
+
- **Model:** Sonnet (cost-efficient for exploration tasks)
|
|
113
|
+
- **Parallel:** For a large codebase or uncertain scope, `forge-2-tech` may dispatch several researchers in parallel, each with a disjoint focus (structure/conventions, per-subsystem integration surfaces), and merge the reports.
|
|
114
|
+
- **Why a subagent:** Tech-spec planning requires reading many files across the project to understand integration points. Running this in a separate context returns a concise report without consuming the main session's context, keeping the interview focused.
|
|
115
|
+
|
|
116
|
+
### forge-spec-writer
|
|
117
|
+
- **Purpose:** Author exactly one numbered implementation spec document to the forge-3-specs quality bar
|
|
118
|
+
- **Used by:** `forge-3-specs` skill (parallel fan-out after the shared foundation docs are written)
|
|
119
|
+
- **Tools:** Read, Glob, Grep, Bash, **Write** (the only authoring agent — constrained to write its single assigned file)
|
|
120
|
+
- **Model:** Opus (spec authoring is detail- and judgement-heavy)
|
|
121
|
+
- **Why a subagent:** Authoring the whole suite in the main session serializes the work and pressures context. Writing the foundation (00/01) first, then fanning out one writer per remaining doc, parallelizes authoring while the parent keeps the cross-reference + traceability finish in view.
|
|
122
|
+
|
|
123
|
+
All three subagents are optional. If the agents are not installed or the environment doesn't support subagents, the corresponding skills fall back to running inline (or, for spec authoring, batched in the main session).
|
|
@@ -0,0 +1,221 @@
|
|
|
1
|
+
# The Loop-Runner Contract (consumer side)
|
|
2
|
+
|
|
3
|
+
feature-forge's pipeline ends by handing a `backlog.json` to an autonomous
|
|
4
|
+
**loop runner** that implements each item. feature-forge does not embed any
|
|
5
|
+
runner's internals — it talks to the runner through one indirection point: the
|
|
6
|
+
**`loopRunner`** block in `forge.config.json`.
|
|
7
|
+
|
|
8
|
+
## The seam
|
|
9
|
+
|
|
10
|
+
Every command feature-forge runs against the runner is a template in
|
|
11
|
+
`loopRunner`, with `{bin}`, `{backlogDir}`, `{specsDir}`, and `{iterations}`
|
|
12
|
+
substituted at call time. `forge-5-loop` (execution), `forge-4-backlog`
|
|
13
|
+
(validation), and `forge-verify` (backlog validation) all render their commands
|
|
14
|
+
from this block — there are no hardcoded `rauf …` commands in the skills, and
|
|
15
|
+
even the human log filename is tokenized via `{loopRunner.logFile}`.
|
|
16
|
+
|
|
17
|
+
When `forge.config.json` has no `loopRunner` block, feature-forge uses the
|
|
18
|
+
built-in defaults (see `references/forge-config-schema.json`) and announces
|
|
19
|
+
"defaulting to the rauf loop runner."
|
|
20
|
+
|
|
21
|
+
## The contract a runner MUST satisfy
|
|
22
|
+
|
|
23
|
+
A conforming runner MUST implement the **backlog-tool / loop-runner contract**
|
|
24
|
+
defined authoritatively in rauf's
|
|
25
|
+
[`SPEC-BACKLOG-TOOL-CONTRACT.md`](https://github.com/garygentry/rauf/blob/main/docs/SPEC-BACKLOG-TOOL-CONTRACT.md)
|
|
26
|
+
(Part A). In summary, it must provide:
|
|
27
|
+
|
|
28
|
+
- **A backlog schema** with the published `$id` and an optional `schemaVersion`,
|
|
29
|
+
whose `type`/`status` vocabularies match the contract
|
|
30
|
+
(`type ∈ bug|bugfix|refactor|feature|chore|test`,
|
|
31
|
+
`status ∈ pending|in_progress|done|blocked`).
|
|
32
|
+
- **A `validate` verb** with exit codes `0` (valid) / `1` (findings) / `2`
|
|
33
|
+
(usage/IO) that emits `{ valid, findings[] }` under `--json`. This is the
|
|
34
|
+
single check feature-forge trusts — it never re-implements validation.
|
|
35
|
+
- **The signal protocol** (`RAUF_DONE` / `RAUF_BLOCKED` / `RAUF_NEEDS_HUMAN` /
|
|
36
|
+
`RAUF_REVIEW`). These are emitted by the *coding agent* into its stdout and
|
|
37
|
+
parsed by the runner — they are not runner-authored log lines, so consumers key
|
|
38
|
+
off the runner's parsed events (below), never the raw `RAUF_*` tokens (which can
|
|
39
|
+
also appear inside an agent's prose and produce false matches).
|
|
40
|
+
- **A machine-readable event stream** for live supervision (`loopRunner.eventStreamCommand`,
|
|
41
|
+
rauf: `loop run … --ndjson`): one JSON event per line with a stable `type`
|
|
42
|
+
vocabulary — `item_completed` / `item_blocked` / `needs_human` / `signal_parsed`
|
|
43
|
+
/ `loop_completed` / `loop_error` / `loop_cancelled` / `llm_stuck_warning` (a
|
|
44
|
+
circuit-breaker halt surfaces as `loop_error`) — plus a
|
|
45
|
+
derived-status JSON (`loopRunner.statusJsonCommand`, rauf: `status … --json`) and
|
|
46
|
+
per-iteration telemetry with a `stuckWarning` flag (`loopRunner.watchCommand`,
|
|
47
|
+
rauf: `status … --json` — the `loop watch` verb was removed in v0.5.0). `forge-5-loop` supervises the run through these,
|
|
48
|
+
**not** by parsing the human log. `followCommand` / `logCommand` are
|
|
49
|
+
human-formatted streams for a person watching in a terminal, not machine surfaces.
|
|
50
|
+
- **The state-dir layout** (per-`--backlog` isolation under `loopRunner.stateDir`).
|
|
51
|
+
- **The CLI verbs** mapped by `loopRunner`: run (+ event-stream) / validate /
|
|
52
|
+
status (+ `--json`) / list / follow / log / version.
|
|
53
|
+
- **A `version` verb** (`{bin} version --json` → `{ version: <semver> }`) so
|
|
54
|
+
feature-forge can enforce `loopRunner.minRunnerVersion` before running.
|
|
55
|
+
|
|
56
|
+
> **The runner does not pause for human input.** When the coding agent signals
|
|
57
|
+
> `RAUF_NEEDS_HUMAN`/`RAUF_BLOCKED`/`RAUF_REVIEW`, a conforming runner sets that
|
|
58
|
+
> item aside and **keeps working other runnable items to completion** (rauf:
|
|
59
|
+
> `runner.ts` needs_human handler). So a supervising session can surface those
|
|
60
|
+
> events live (visibility) and cancel early, but it cannot inject an answer and
|
|
61
|
+
> resume the set-aside item mid-run — resolution is a follow-up retry pass. A
|
|
62
|
+
> first-class pause/resume-with-answer capability is a desirable runner
|
|
63
|
+
> enhancement (see `plans/rauf-enhancement-recommendations.md`).
|
|
64
|
+
|
|
65
|
+
## rauf is the default and reference implementation
|
|
66
|
+
|
|
67
|
+
rauf owns the contract spec and is the runner feature-forge defaults to. The
|
|
68
|
+
authoring craft itself (how to decompose specs into well-scoped, verifiable
|
|
69
|
+
items) lives in rauf's **`author-backlog`** skill, which `forge-4-backlog`
|
|
70
|
+
delegates to — so the only thing binding feature-forge to a particular runner is
|
|
71
|
+
the schema + `validate` verb that this contract formalizes. A future runner swap
|
|
72
|
+
supplies its own `loopRunner` block (its own `bin`, schema, and `validate`
|
|
73
|
+
command) without touching any pipeline skill.
|
|
74
|
+
|
|
75
|
+
The coding-agent dimension this contract adds (below) is **additive and
|
|
76
|
+
presence-gated**: it exists only when the `loopRunner` block advertises it via
|
|
77
|
+
`agentArgument`. A runner that omits that field has no agent dimension at all —
|
|
78
|
+
the seam degrades to exactly today's behavior with no error, so default-to-rauf
|
|
79
|
+
and pluggability are unchanged. See `## Agent selection`.
|
|
80
|
+
|
|
81
|
+
## Agent selection
|
|
82
|
+
|
|
83
|
+
This section is **contract-level**: it states what a conforming runner exposes
|
|
84
|
+
and what forge does with it, and defers every algorithm to the owning specs
|
|
85
|
+
(`02`/`03`/`04`/`05`).
|
|
86
|
+
|
|
87
|
+
### What a conforming runner exposes (the consumed surface)
|
|
88
|
+
|
|
89
|
+
A runner that carries a coding-agent dimension exposes, in its `loopRunner`
|
|
90
|
+
block:
|
|
91
|
+
|
|
92
|
+
- an **`agentArgument`** template (rauf default `--agent {agent}`) — the
|
|
93
|
+
tokenized launch-time flag; its **presence** advertises the agent surface;
|
|
94
|
+
- an **`agentsProbeCommand`** (rauf default `{bin} agents --json`) emitting
|
|
95
|
+
`{ agents: [{ id, displayName, available, detail? }] }` and **always exiting
|
|
96
|
+
0**;
|
|
97
|
+
- an optional **`defaultAgent`** project-default id.
|
|
98
|
+
|
|
99
|
+
These three fields are specified in full in `references/forge-config-schema.json`
|
|
100
|
+
and are the schema half of this contract. forge consumes rauf's existing
|
|
101
|
+
`--agent <id>` flag, `rauf agents` probe, `BacklogItem.provider`, and 5-layer
|
|
102
|
+
precedence — it conforms to them, it does not redesign them.
|
|
103
|
+
|
|
104
|
+
### Precedence and the run-layer mapping
|
|
105
|
+
|
|
106
|
+
The agent-selection precedence is **`item > run > project > default`**,
|
|
107
|
+
deliberately parallel to the model-selection precedence (`item.model >
|
|
108
|
+
--model/options > project default > provider default`). It is realized as:
|
|
109
|
+
|
|
110
|
+
- **item** — `BacklogItem.provider`, applied by **rauf** from the backlog. forge
|
|
111
|
+
**never reads, writes, or overrides** it (pass-through), so a deliberate
|
|
112
|
+
per-item agent always wins.
|
|
113
|
+
- **run** — forge's per-run selector (`forge-5-loop` Step 2d).
|
|
114
|
+
- **project** — forge's `loopRunner.defaultAgent`.
|
|
115
|
+
- **default** — the runner's own default (`claude-cli` for rauf) when forge sends
|
|
116
|
+
nothing.
|
|
117
|
+
|
|
118
|
+
forge owns **only** the run and project layers. It collapses run-over-project
|
|
119
|
+
*inside itself* into the **single** `--agent {agent}` value it emits at the
|
|
120
|
+
**run layer**, and lets rauf apply the item override *above* that. forge **never
|
|
121
|
+
re-implements rauf's resolver**. The resolution algorithm itself lives in
|
|
122
|
+
`03-selection-resolution-observability.md`.
|
|
123
|
+
|
|
124
|
+
### Availability probe + unknown/unavailable disambiguation
|
|
125
|
+
|
|
126
|
+
When the resolved agent is a **non-default** id, forge runs `agentsProbeCommand`
|
|
127
|
+
**once (no retries)** before any loop side-effect, parses the advertised
|
|
128
|
+
`agents[]`, and builds the advertised id set. Because the probe **always exits
|
|
129
|
+
0**, an unknown id is distinguished from a known-but-unavailable one **only by
|
|
130
|
+
set membership**, not by exit code:
|
|
131
|
+
|
|
132
|
+
- **Unknown id** (not in the advertised set — a typo or unsupported agent):
|
|
133
|
+
**hard-reject before launch**, listing the valid ids. No proceed-anyway path.
|
|
134
|
+
No value is interpolated into `{agent}`.
|
|
135
|
+
- **Known but unavailable** (`available: false`): **warn** (showing the probe's
|
|
136
|
+
`detail`) and let the user **proceed-anyway or choose another** — never
|
|
137
|
+
silently abort, never silently proceed.
|
|
138
|
+
- **Available**: proceed.
|
|
139
|
+
|
|
140
|
+
The advertised id set is also the **allow-list**: the only value ever
|
|
141
|
+
interpolated into `{agent}` is a validated, advertised id. The **default /
|
|
142
|
+
claude path never reaches the probe** — it incurs no extra cost. The
|
|
143
|
+
`classify(...)` algorithm and the rejection-error text live in
|
|
144
|
+
`04-availability-precheck.md`.
|
|
145
|
+
|
|
146
|
+
### Capability gate + version floor
|
|
147
|
+
|
|
148
|
+
Agent selection is **capability-gated** on the runner advertising
|
|
149
|
+
`agentArgument`: a runner whose `loopRunner` omits (or empties) that field
|
|
150
|
+
exposes no agent surface, so the per-run selector, the probe, and any `{agent}`
|
|
151
|
+
substitution **vanish entirely** and no agent argument is sent — byte-identical
|
|
152
|
+
to today. Degradation is **silent, not an error**, keeping alternate (non-rauf)
|
|
153
|
+
runners first-class. The gate condition is owned by
|
|
154
|
+
`02-config-schema-and-gating.md`.
|
|
155
|
+
|
|
156
|
+
Independently, the **version gate** floors at the runner version that ships the
|
|
157
|
+
agent surface. For rauf that is **0.6.0** (`loopRunner.minRunnerVersion`): the
|
|
158
|
+
`--agent` flag, the `agents` probe, and the preset agent registry are present in
|
|
159
|
+
rauf source at 0.6.0. A successful gate therefore guarantees those surfaces
|
|
160
|
+
exist before any run. See `## Version gating` and
|
|
161
|
+
`05-runner-discovery-version-gate.md`.
|
|
162
|
+
|
|
163
|
+
**This document — the `## Agent selection` section, the `## Per-stage agent
|
|
164
|
+
applicability` table, and the `## validate is agent-agnostic` note — together
|
|
165
|
+
with the augmented `loopRunner` schema block in
|
|
166
|
+
`references/forge-config-schema.json` constitute the `forge-loop-runner-contract`
|
|
167
|
+
expose, consumed by the `packaging-docs-ci` capstone as documentation input.**
|
|
168
|
+
|
|
169
|
+
## Per-stage agent applicability
|
|
170
|
+
|
|
171
|
+
Every forge stage that invokes the loop runner is classified here. Only
|
|
172
|
+
`forge-5-loop` (execution) carries the coding-agent dimension; the two
|
|
173
|
+
validation-only stages are agent-agnostic.
|
|
174
|
+
|
|
175
|
+
| Stage | Runner verbs | Agent dimension |
|
|
176
|
+
|-------|-------------|-----------------|
|
|
177
|
+
| `forge-5-loop` | run / eventStream / status / version | **Full** — selector, probe, `--agent` |
|
|
178
|
+
| `forge-4-backlog` | `validate` | **None** — agent-agnostic |
|
|
179
|
+
| `forge-verify` | `validate` | **None** — agent-agnostic |
|
|
180
|
+
|
|
181
|
+
- **`forge-5-loop`** is the executor: it drives the run, so it renders the run /
|
|
182
|
+
event-stream / status / version verbs (and `list`) and carries the full agent
|
|
183
|
+
surface — the Step 2d selector, the availability probe, and the rendered
|
|
184
|
+
`agentArgument`.
|
|
185
|
+
- **`forge-4-backlog`** authors and then *validates* the backlog; its only runner
|
|
186
|
+
call is `validateCommand`. It also reads `versionCommand` for a graceful-degrade
|
|
187
|
+
check, but **passes no agent** and never runs `loop run`.
|
|
188
|
+
- **`forge-verify`** (backlog mode) re-runs the same `validateCommand` to surface
|
|
189
|
+
validation findings. It carries no agent dimension. This is **contract
|
|
190
|
+
coverage** of forge-verify (it is classified here), with an explicit agnostic
|
|
191
|
+
note (below) — **not** a new agent-driven run in forge-verify.
|
|
192
|
+
|
|
193
|
+
### `validate` is agent-agnostic
|
|
194
|
+
|
|
195
|
+
The `validate` verb (`loopRunner.validateCommand`) checks a `backlog.json`
|
|
196
|
+
against the backlog schema and spec references. **It does not run a coding agent
|
|
197
|
+
and has no agent dimension.** No agent argument — `--agent`, the `{agent}` token,
|
|
198
|
+
or any agent id — may **ever** be passed to backlog validation, in **any** stage
|
|
199
|
+
(`forge-4-backlog`, `forge-verify`, or any future caller). Backlog validation is
|
|
200
|
+
a pure, deterministic check; the coding agent is irrelevant to it. A contributor
|
|
201
|
+
who later adds agent selection to a *new* stage MUST confirm that stage runs the
|
|
202
|
+
*execution* surface (like `forge-5-loop`), not `validate` — agent selection
|
|
203
|
+
belongs to execution only. If you find yourself adding `--agent` near a
|
|
204
|
+
`validateCommand` render, that is a bug.
|
|
205
|
+
|
|
206
|
+
## Version gating
|
|
207
|
+
|
|
208
|
+
feature-forge requires a runner exposing `backlog validate` + backlog
|
|
209
|
+
`schemaVersion`, and the unified exit-code/status contract it reads. The floor is
|
|
210
|
+
now the **agent-surface floor**: the runner version that ships the `--agent`
|
|
211
|
+
flag, the `agents` probe, and the preset agent registry. For rauf that is
|
|
212
|
+
**0.6.0** (`loopRunner.minRunnerVersion`).
|
|
213
|
+
`forge-5-loop` runs `{bin} version --json`, semver-compares the reported version
|
|
214
|
+
against `minRunnerVersion`, and on a missing-or-too-old runner stops with
|
|
215
|
+
`loopRunner.installHint` (the CLI install/upgrade command) — **before** invoking
|
|
216
|
+
the loop. See `COMPATIBILITY.md` for the version matrix.
|
|
217
|
+
|
|
218
|
+
> **Two different "installs."** `installHint` obtains/upgrades the runner **CLI
|
|
219
|
+
> binary** (e.g. rauf's `install-binary.sh`). `setupHint` installs the runner's
|
|
220
|
+
> **per-project artifacts** (rauf: `rauf install .`). A failing version gate is
|
|
221
|
+
> always the former, never the latter.
|