forge-dev-framework 1.0.1 → 1.2.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.
Files changed (109) hide show
  1. package/.claude/commands/forge/README.md +281 -0
  2. package/.claude/commands/forge/add-phase.md +90 -0
  3. package/.claude/commands/forge/complete-milestone.md +130 -0
  4. package/.claude/commands/forge/config.md +115 -0
  5. package/.claude/commands/forge/convert.md +31 -0
  6. package/.claude/commands/forge/debug.md +31 -0
  7. package/.claude/commands/forge/discuss.md +78 -0
  8. package/.claude/commands/forge/execute.md +85 -0
  9. package/.claude/commands/forge/generate.md +21 -0
  10. package/.claude/commands/forge/help.md +18 -0
  11. package/.claude/commands/forge/init.md +21 -0
  12. package/.claude/commands/forge/insert-phase.md +99 -0
  13. package/.claude/commands/forge/new-milestone.md +114 -0
  14. package/.claude/commands/forge/new-project.md +24 -0
  15. package/.claude/commands/forge/pause-work.md +111 -0
  16. package/.claude/commands/forge/plan.md +129 -0
  17. package/.claude/commands/forge/quick.md +41 -0
  18. package/.claude/commands/forge/remove-phase.md +92 -0
  19. package/.claude/commands/forge/resume.md +22 -0
  20. package/.claude/commands/forge/status.md +87 -0
  21. package/.claude/commands/forge/team-add.md +24 -0
  22. package/.claude/commands/forge/team-create.md +22 -0
  23. package/.claude/commands/forge/team-remove.md +24 -0
  24. package/.claude/commands/forge/team-start.md +22 -0
  25. package/.claude/commands/forge/team-view.md +18 -0
  26. package/.claude/commands/forge/verify.md +95 -0
  27. package/.claude/hooks/forge-context-cleanup.cjs +79 -0
  28. package/.claude/hooks/forge-event-guard.cjs +36 -0
  29. package/.claude/hooks/forge-size-guard.cjs +55 -0
  30. package/.claude/rules/api-patterns.md +13 -98
  31. package/.claude/rules/context-efficiency.md +10 -0
  32. package/.claude/rules/security-baseline.md +18 -204
  33. package/.claude/rules/testing-standards.md +16 -177
  34. package/.claude/rules/ui-conventions.md +17 -142
  35. package/README.md +1 -0
  36. package/bin/forge.js +5 -3
  37. package/dist/bin/forge.js +5 -3
  38. package/dist/cli/index.d.ts.map +1 -1
  39. package/dist/cli/index.js +15 -1
  40. package/dist/cli/index.js.map +1 -1
  41. package/dist/commands/convert.d.ts +6 -0
  42. package/dist/commands/convert.d.ts.map +1 -0
  43. package/dist/commands/convert.js +132 -0
  44. package/dist/commands/convert.js.map +1 -0
  45. package/dist/commands/generate.d.ts.map +1 -1
  46. package/dist/commands/generate.js +3 -2
  47. package/dist/commands/generate.js.map +1 -1
  48. package/dist/commands/index.d.ts +4 -4
  49. package/dist/commands/index.d.ts.map +1 -1
  50. package/dist/commands/index.js +4 -4
  51. package/dist/commands/index.js.map +1 -1
  52. package/dist/generators/gsd-converter.d.ts +100 -0
  53. package/dist/generators/gsd-converter.d.ts.map +1 -0
  54. package/dist/generators/gsd-converter.js +335 -0
  55. package/dist/generators/gsd-converter.js.map +1 -0
  56. package/dist/templates/.claude/rules/api-patterns.md.template +212 -0
  57. package/dist/templates/.claude/rules/security-baseline.md.template +322 -0
  58. package/dist/templates/.claude/rules/testing-standards.md.template +280 -0
  59. package/dist/templates/.claude/rules/ui-conventions.md.template +264 -0
  60. package/dist/templates/.planning/forge.config.json.template +75 -0
  61. package/dist/templates/CLAUDE.md.template +161 -0
  62. package/dist/templates/PLAN.md.template +177 -0
  63. package/dist/templates/PROJECT.md.template +156 -0
  64. package/dist/templates/REQUIREMENTS.md.template +221 -0
  65. package/dist/templates/ROADMAP.md.template +130 -0
  66. package/dist/types/index.d.ts +2 -2
  67. package/dist/types/index.d.ts.map +1 -1
  68. package/dist/types/index.js +2 -2
  69. package/dist/types/index.js.map +1 -1
  70. package/dist/utils/index.d.ts +5 -5
  71. package/dist/utils/index.d.ts.map +1 -1
  72. package/dist/utils/index.js +5 -5
  73. package/dist/utils/index.js.map +1 -1
  74. package/dist/utils/template-client.d.ts.map +1 -1
  75. package/dist/utils/template-client.js +3 -2
  76. package/dist/utils/template-client.js.map +1 -1
  77. package/package.json +6 -4
  78. package/dist/git/__tests__/worktree.test.d.ts +0 -5
  79. package/dist/git/__tests__/worktree.test.d.ts.map +0 -1
  80. package/dist/git/__tests__/worktree.test.js +0 -121
  81. package/dist/git/__tests__/worktree.test.js.map +0 -1
  82. package/dist/git/codeowners.d.ts +0 -101
  83. package/dist/git/codeowners.d.ts.map +0 -1
  84. package/dist/git/codeowners.js +0 -216
  85. package/dist/git/codeowners.js.map +0 -1
  86. package/dist/git/commit.d.ts +0 -135
  87. package/dist/git/commit.d.ts.map +0 -1
  88. package/dist/git/commit.js +0 -223
  89. package/dist/git/commit.js.map +0 -1
  90. package/dist/git/hooks/commit-msg.d.ts +0 -8
  91. package/dist/git/hooks/commit-msg.d.ts.map +0 -1
  92. package/dist/git/hooks/commit-msg.js +0 -34
  93. package/dist/git/hooks/commit-msg.js.map +0 -1
  94. package/dist/git/hooks/pre-commit.d.ts +0 -8
  95. package/dist/git/hooks/pre-commit.d.ts.map +0 -1
  96. package/dist/git/hooks/pre-commit.js +0 -34
  97. package/dist/git/hooks/pre-commit.js.map +0 -1
  98. package/dist/git/pre-commit-hooks.d.ts +0 -117
  99. package/dist/git/pre-commit-hooks.d.ts.map +0 -1
  100. package/dist/git/pre-commit-hooks.js +0 -270
  101. package/dist/git/pre-commit-hooks.js.map +0 -1
  102. package/dist/git/wipe-protocol.d.ts +0 -281
  103. package/dist/git/wipe-protocol.d.ts.map +0 -1
  104. package/dist/git/wipe-protocol.js +0 -237
  105. package/dist/git/wipe-protocol.js.map +0 -1
  106. package/dist/git/worktree.d.ts +0 -69
  107. package/dist/git/worktree.d.ts.map +0 -1
  108. package/dist/git/worktree.js +0 -202
  109. package/dist/git/worktree.js.map +0 -1
@@ -0,0 +1,281 @@
1
+ # FORGE Command Reference
2
+
3
+ FORGE commands are available as slash commands in Claude Code.
4
+
5
+ ## Available Commands
6
+
7
+ ### Core Commands
8
+
9
+ | Command | Description | Usage |
10
+ |---------|-------------|-------|
11
+ | `/forge:new-project` | Initialize a new FORGE project | `/forge:new-project [project-name]` |
12
+ | `/forge:init` | Initialize FORGE in current directory | `/forge:init [--quick]` |
13
+ | `/forge:status` | Show project progress | `/forge:status [-v]` |
14
+ | `/forge:config` | View/edit configuration | `/forge:config [key] [value]` |
15
+ | `/forge:generate` | Generate artifact from template | `/forge:generate <artifact> [-f]` |
16
+ | `/forge:help` | Show command reference | `/forge:help [command]` |
17
+
18
+ ### Planning Commands
19
+
20
+ | Command | Description | Usage |
21
+ |---------|-------------|-------|
22
+ | `/forge:discuss` | Structured context gathering with decisions | `/forge:discuss <phase-name>` |
23
+ | `/forge:plan` | Research-first multi-plan generation | `/forge:plan <phase-name> [flags]` |
24
+ | `/forge:verify` | Verify plans + generate gap closure plans | `/forge:verify <phase-name>` |
25
+ | `/forge:execute` | Wave-based multi-plan execution | `/forge:execute <phase-name> [--gaps]` |
26
+
27
+ ### Phase Management Commands
28
+
29
+ | Command | Description | Usage |
30
+ |---------|-------------|-------|
31
+ | `/forge:add-phase` | Add phase to end of current milestone | `/forge:add-phase <description>` |
32
+ | `/forge:insert-phase` | Insert urgent work as decimal phase | `/forge:insert-phase <after-phase> <description>` |
33
+ | `/forge:remove-phase` | Remove future phase and renumber | `/forge:remove-phase <phase-number>` |
34
+
35
+ ### Milestone Commands
36
+
37
+ | Command | Description | Usage |
38
+ |---------|-------------|-------|
39
+ | `/forge:new-milestone` | Start new milestone cycle | `/forge:new-milestone` |
40
+ | `/forge:complete-milestone` | Archive completed milestone | `/forge:complete-milestone` |
41
+
42
+ ### Workflow Commands
43
+
44
+ | Command | Description | Usage |
45
+ |---------|-------------|-------|
46
+ | `/forge:pause-work` | Create context handoff | `/forge:pause-work` |
47
+ | `/forge:resume` | Resume from previous session | `/forge:resume` |
48
+ | `/forge:quick` | Execute quick task with guarantees | `/forge:quick <task-description>` |
49
+ | `/forge:debug` | Systematic debugging | `/forge:debug [issue description]` |
50
+
51
+ ### Team Commands
52
+
53
+ | Command | Description | Usage |
54
+ |---------|-------------|-------|
55
+ | `/forge:team-create` | Create agent team from AgentTeam.md | `/forge:team-create` |
56
+ | `/forge:team-view` | View team members and config | `/forge:team-view` |
57
+ | `/forge:team-add` | Add member to agent team | `/forge:team-add` |
58
+ | `/forge:team-remove` | Remove member from agent team | `/forge:team-remove` |
59
+ | `/forge:team-start` | Start all teammates | `/forge:team-start` |
60
+
61
+ ## Command Lifecycle
62
+
63
+ ```
64
+ forge:new-project
65
+
66
+ forge:new-milestone
67
+
68
+ forge:discuss ←──── Structured gray area identification
69
+ ↓ Produces CONTEXT.md with:
70
+ ↓ • Implementation Decisions (locked)
71
+ ↓ • Claude's Discretion (flexible)
72
+ ↓ • Deferred Ideas (out of scope)
73
+
74
+ forge:plan ←─────── Research-first planning
75
+ ↓ 1. Research (→ RESEARCH.md)
76
+ ↓ 2. Multi-plan generation (→ *-PLAN.md files)
77
+ ↓ 3. Verification
78
+
79
+ ↓ ┌──────── If plans exist: add more / verify / execute / replan
80
+ ↓ ↓
81
+ forge:verify ←───── Goal-backward verification
82
+ ↓ Checks all *-PLAN.md files
83
+ ↓ If gaps → generates gap closure *-PLAN.md files
84
+
85
+ ↓ (pass) ↓ (gaps found)
86
+ forge:execute forge:execute --gaps
87
+ ↓ ↓
88
+ ↓ Wave-based execution:
89
+ ↓ • Discovers all *-PLAN.md files
90
+ ↓ • Groups by wave from frontmatter
91
+ ↓ • Executes waves sequentially
92
+ ↓ • Plans within wave in parallel
93
+ ↓ • Each plan → *-SUMMARY.md
94
+
95
+ forge:verify ←───── Post-execution verification
96
+
97
+ forge:complete-milestone
98
+ ```
99
+
100
+ ## Phase Directory Structure
101
+
102
+ After running the full workflow, a phase directory looks like:
103
+
104
+ ```
105
+ .planning/phases/M2-planning-engine/
106
+ ├── M2-CONTEXT.md # From /forge:discuss
107
+ ├── M2-RESEARCH.md # From research step in /forge:plan
108
+ ├── M2-01-PLAN.md # Wave 1 — Schema design (2-3 tasks)
109
+ ├── M2-02-PLAN.md # Wave 1 — Event types (2-3 tasks)
110
+ ├── M2-03-PLAN.md # Wave 2 — Merge logic (depends on 01, 02)
111
+ ├── M2-04-PLAN.md # Wave 2 — CLI commands
112
+ ├── M2-05-PLAN.md # Wave 3 — Integration (depends on 03, 04)
113
+ ├── M2-01-SUMMARY.md # After plan 01 execution
114
+ ├── M2-02-SUMMARY.md # After plan 02 execution
115
+ ├── ...
116
+ ├── VERIFICATION.md # From /forge:verify
117
+ ├── M2-06-PLAN.md # Gap closure plan (gap_closure: true)
118
+ └── EXECUTION.md # Execution log with wave/plan status
119
+ ```
120
+
121
+ ## CONTEXT.md Sections
122
+
123
+ The discuss command produces CONTEXT.md with structured sections that downstream agents consume differently:
124
+
125
+ | Section | Researcher reads as | Planner reads as |
126
+ |---------|-------------------|-----------------|
127
+ | **Implementation Decisions** | Research deeply, no alternatives | Must implement exactly as specified |
128
+ | **Claude's Discretion** | Research options, recommend best | Can choose freely, pick best approach |
129
+ | **Deferred Ideas** | Ignore completely | Must NOT include in plans |
130
+ | **Specific Ideas** | Research referenced patterns | Incorporate user inspirations |
131
+
132
+ ## Plan Frontmatter Reference
133
+
134
+ Every `*-PLAN.md` file starts with YAML frontmatter:
135
+
136
+ ```yaml
137
+ ---
138
+ phase: M2-planning-engine # Phase identifier
139
+ plan: 01 # Sequential plan number
140
+ wave: 1 # Execution wave (parallel within wave)
141
+ depends_on: [] # Plan numbers this depends on
142
+ files_modified: [src/foo.ts] # Files this plan touches
143
+ autonomous: true # false if has checkpoints needing user input
144
+ gap_closure: false # true for gap remediation plans
145
+ ---
146
+ ```
147
+
148
+ **Wave assignment rules:**
149
+ - Plans with no dependencies → wave 1
150
+ - Plans with dependencies → `wave = max(waves[dep] for dep in depends_on) + 1`
151
+ - Plans in the same wave execute in parallel
152
+ - Waves execute sequentially
153
+
154
+ ## Research Workflow
155
+
156
+ The `/forge:plan` command includes a research step that produces `RESEARCH.md`:
157
+
158
+ 1. Researcher reads CONTEXT.md to scope the research
159
+ 2. Uses WebSearch, WebFetch, and codebase analysis
160
+ 3. Produces structured findings with confidence levels (HIGH/MEDIUM/LOW)
161
+ 4. Each major finding may become a separate plan file
162
+
163
+ Control with flags:
164
+ - `--research` — force re-run even if RESEARCH.md exists
165
+ - `--skip-research` — skip research entirely
166
+
167
+ ## Plan Flags Reference
168
+
169
+ | Flag | Command | Effect |
170
+ |------|---------|--------|
171
+ | `--research` | `/forge:plan` | Force re-run research |
172
+ | `--skip-research` | `/forge:plan` | Skip research step |
173
+ | `--skip-verify` | `/forge:plan` | Skip plan verification |
174
+ | `--gaps` | `/forge:plan` | Generate gap closure plans only |
175
+ | `--gaps` | `/forge:execute` | Execute only gap_closure plans |
176
+
177
+ ## Quick Start
178
+
179
+ ### 1. Initialize a New FORGE Project
180
+
181
+ ```bash
182
+ /forge:new-project my-app
183
+ ```
184
+
185
+ ### 2. Gather Context
186
+
187
+ ```bash
188
+ /forge:discuss M2-planning-engine
189
+ ```
190
+
191
+ Identifies gray areas, asks focused questions, produces structured CONTEXT.md.
192
+
193
+ ### 3. Plan the Phase
194
+
195
+ ```bash
196
+ /forge:plan M2-planning-engine
197
+ ```
198
+
199
+ Researches (→ RESEARCH.md), generates multiple numbered plan files with frontmatter and wave assignments.
200
+
201
+ Running `/forge:plan` again when plans exist gives options: add more, verify, execute, or replan.
202
+
203
+ ### 4. Verify Plans
204
+
205
+ ```bash
206
+ /forge:verify M2-planning-engine
207
+ ```
208
+
209
+ Checks all plans against requirements. If gaps found, generates gap closure plan files (numbered after existing plans).
210
+
211
+ ### 5. Execute the Phase
212
+
213
+ ```bash
214
+ /forge:execute M2-planning-engine
215
+ ```
216
+
217
+ Discovers all plan files, groups by wave, executes waves sequentially with plans in each wave running in parallel. Each completed plan produces a SUMMARY.md.
218
+
219
+ ### 6. Execute Gap Remediation (if needed)
220
+
221
+ ```bash
222
+ /forge:execute M2-planning-engine --gaps
223
+ ```
224
+
225
+ Executes only plans with `gap_closure: true` in their frontmatter.
226
+
227
+ ## Artifact Generation
228
+
229
+ ```bash
230
+ /forge:generate claude # CLAUDE.md
231
+ /forge:generate requirements # REQUIREMENTS.md
232
+ /forge:generate roadmap # ROADMAP.md
233
+ /forge:generate config # forge.config.json
234
+ /forge:generate rules # .claude/rules/*.md
235
+ ```
236
+
237
+ ## Configuration
238
+
239
+ ```bash
240
+ /forge:config # View all settings
241
+ /forge:config maxTeammates 6 # Set a value
242
+ ```
243
+
244
+ | Key | Type | Default | Description |
245
+ |-----|------|---------|-------------|
246
+ | mode | enum | interactive | yolo, interactive, standard |
247
+ | depth | enum | standard | quick, standard, comprehensive |
248
+ | maxTeammates | int | 5 | Max agents per phase (2-10) |
249
+ | taskLimit | int | 6 | Max tasks per phase (5-6 recommended) |
250
+ | conventionalCommits | bool | true | Enforce commit format |
251
+ | worktreeIsolation | bool | true | Use worktrees for tasks |
252
+
253
+ ## FORGE Architecture
254
+
255
+ ```
256
+ All Agents → state/events/*.json (append-only)
257
+
258
+ State Steward (single writer)
259
+
260
+ state/STATE.json (canonical)
261
+ ```
262
+
263
+ ### Key Principles
264
+
265
+ - **Event-Sourced State**: Append-only event log
266
+ - **Single-Writer**: Only State Steward writes STATE.json
267
+ - **Contract-First**: API contracts negotiated before cross-domain work
268
+ - **File Ownership**: Each agent writes only within owned paths
269
+ - **Wipe Protocol**: Fresh agent context per task
270
+ - **Atomic Commits**: One task = one commit
271
+
272
+ ## Getting Help
273
+
274
+ ```bash
275
+ /forge:help # Show all commands
276
+ /forge:help plan # Detailed help for specific command
277
+ ```
278
+
279
+ ## Version
280
+
281
+ FORGE v1.0-M1 — Milestone 1: Foundation (COMPLETE)
@@ -0,0 +1,90 @@
1
+ ---
2
+ name: forge:add-phase
3
+ description: Add phase to end of current milestone in roadmap
4
+ argument-hint: <description>
5
+ allowed-tools:
6
+ - Read
7
+ - Write
8
+ - Bash
9
+ ---
10
+
11
+ <objective>
12
+ Add a new integer phase to the end of the current milestone in the roadmap.
13
+
14
+ Routes to the add-phase workflow which handles:
15
+ - Phase number calculation (next sequential integer)
16
+ - Directory creation with slug generation
17
+ - Roadmap structure updates
18
+ - State evolution tracking
19
+ </objective>
20
+
21
+ <execution_context>
22
+ @state/STATE.json
23
+ @ROADMAP.md
24
+ @CLAUDE.md
25
+ </execution_context>
26
+
27
+ <context>
28
+ **Phase Description:** $ARGUMENTS
29
+
30
+ **Phase Assignment:**
31
+ 1. Read ROADMAP.md to find current milestone
32
+ 2. Calculate next integer phase (ignoring decimals)
33
+ 3. Generate slug from description
34
+ 4. Create phase directory structure
35
+ 5. Add to ROADMAP.md
36
+ </context>
37
+
38
+ <process>
39
+ **Execute add-phase workflow:**
40
+
41
+ 1. **Load State**
42
+ - Read state/STATE.json
43
+ - Read ROADMAP.md
44
+ - Identify current milestone
45
+
46
+ 2. **Calculate Phase Number**
47
+ - Find highest integer phase in current milestone
48
+ - Next phase = highest + 1
49
+ - Example: If phases are 70, 71, 71.1, 72 → next is 73
50
+
51
+ 3. **Generate Slug**
52
+ - Create URL-safe slug from description
53
+ - Format: `<phase-number>-<slug>`
54
+ - Example: "Implement auth" → "73-implement-auth"
55
+
56
+ 4. **Create Directory Structure**
57
+ ```bash
58
+ mkdir -p .planning/phases/<phase-slug>/
59
+ touch .planning/phases/<phase-slug>/CONTEXT.md
60
+ touch .planning/phases/<phase-slug>/PLAN.md
61
+ ```
62
+
63
+ 5. **Update ROADMAP.md**
64
+ - Add new phase entry to current milestone
65
+ - Use standard phase format
66
+ - Maintain proper heading hierarchy
67
+
68
+ 6. **Submit Event**
69
+ - Event type: PHASE_ADDED
70
+ - Include: phaseId, milestoneId, description
71
+ - Write to state/events/
72
+
73
+ 7. **Confirm**
74
+ - Show new phase info
75
+ - Suggest next: `/forge:discuss <phase-number>` or `/forge:plan <phase-number>`
76
+ </process>
77
+
78
+ <deliverables>
79
+ - .planning/phases/<phase-slug>/CONTEXT.md (empty template)
80
+ - .planning/phases/<phase-slug>/PLAN.md (empty template)
81
+ - ROADMAP.md updated with new phase
82
+ - Event: PHASE_ADDED in state/events/
83
+ - STATE.json updated
84
+ </deliverables>
85
+
86
+ <next_steps>
87
+ - Run `/forge:discuss <phase-number>` to capture phase context
88
+ - Run `/forge:plan <phase-number>` to generate task breakdown
89
+ - Tip: Use `/clear` to start from a fresh context
90
+ </next_steps>
@@ -0,0 +1,130 @@
1
+ ---
2
+ name: forge:complete-milestone
3
+ description: Archive completed milestone and prepare for next version
4
+ argument-hint: ""
5
+ allowed-tools:
6
+ - Read
7
+ - Write
8
+ - Bash
9
+ ---
10
+
11
+ <objective>
12
+ Archive the completed milestone and prepare the project for the next version.
13
+
14
+ Routes to audit-milestone workflow which validates completion before archiving.
15
+ </objective>
16
+
17
+ <execution_context>
18
+ @state/STATE.json
19
+ @ROADMAP.md
20
+ @CLAUDE.md
21
+ </execution_context>
22
+
23
+ <context>
24
+ **Milestone Completion Workflow:**
25
+ 1. Validate all phases in milestone are complete
26
+ 2. Generate milestone summary
27
+ 3. Archive milestone artifacts
28
+ 4. Update ROADMAP.md
29
+ 5. Prepare next milestone
30
+ 6. Tag and release (optional)
31
+ </context>
32
+
33
+ <process>
34
+ **Execute complete-milestone workflow:**
35
+
36
+ 1. **Load State**
37
+ - Read state/STATE.json
38
+ - Read ROADMAP.md
39
+ - Identify current milestone
40
+
41
+ 2. **Validate Completion**
42
+ Check all phases in current milestone:
43
+ - Status is "completed"
44
+ - All tasks complete
45
+ - All tests passing
46
+ - No pending blockers
47
+
48
+ If validation fails:
49
+ - Show incomplete phases
50
+ - Ask: "Continue anyway?" or "Fix issues first?"
51
+
52
+ 3. **Generate Milestone Summary**
53
+ ```markdown
54
+ # Milestone {name} Summary
55
+
56
+ **Completed:** {date}
57
+ **Duration:** {start-date} to {end-date}
58
+
59
+ ## Phases Delivered
60
+ - {phase-1}: {description}
61
+ - {phase-2}: {description}
62
+
63
+ ## Key Metrics
64
+ - Total Phases: {count}
65
+ - Total Tasks: {count}
66
+ - Completion Rate: {percentage}
67
+ - Test Coverage: {percentage}
68
+
69
+ ## Technical Highlights
70
+ - {highlight-1}
71
+ - {highlight-2}
72
+
73
+ ## Challenges Overcome
74
+ - {challenge-1}
75
+ - {challenge-2}
76
+
77
+ ## Next Steps
78
+ - {next-milestone-goals}
79
+ ```
80
+
81
+ 4. **Archive Artifacts**
82
+ ```bash
83
+ mkdir -p .planning/archive/milestone-{name}/
84
+ cp ROADMAP.md .planning/archive/milestone-{name}/
85
+ cp PLAN.md .planning/archive/milestone-{name}/ || true
86
+ cp -r .planning/phases/* .planning/archive/milestone-{name}/phases/ || true
87
+ ```
88
+
89
+ 5. **Update ROADMAP.md**
90
+ - Move completed milestone to "Completed" section
91
+ - Mark as ✅ COMPLETE
92
+ - Add milestone summary
93
+
94
+ 6. **Update STATE.json**
95
+ - Set `project.status` = "completed"
96
+ - Archive milestone data
97
+ - Prepare for next milestone
98
+
99
+ 7. **Submit Events**
100
+ - Event type: MILESTONE_COMPLETED
101
+ - Include: milestoneId, summary, metrics
102
+ - Write to state/events/
103
+
104
+ 8. **Git Tag** (optional)
105
+ - Ask: "Create git tag for this milestone?"
106
+ - If yes: `git tag -a milestone-{name} -m "Milestone {name} complete"`
107
+
108
+ 9. **Confirm**
109
+ - Show milestone summary
110
+ - List archived artifacts
111
+ - Suggest next: `/forge:new-milestone` or manual planning
112
+
113
+ 10. **Cleanup**
114
+ - Offer to remove completed phase directories
115
+ - Ask: "Clean up .planning/phases/?"
116
+ </process>
117
+
118
+ <deliverables>
119
+ - .planning/archive/milestone-{name}/ (archived artifacts)
120
+ - ROADMAP.md updated (milestone moved to completed)
121
+ - STATE.json updated (milestone archived)
122
+ - Event: MILESTONE_COMPLETED in state/events/
123
+ - Optional: Git tag milestone-{name}
124
+ </deliverables>
125
+
126
+ <next_steps>
127
+ - Run `forge new-milestone` to start next milestone
128
+ - Or manually plan next work
129
+ - Celebrate! 🎉
130
+ </next_steps>
@@ -0,0 +1,115 @@
1
+ ---
2
+ name: forge:config
3
+ description: View or edit FORGE configuration settings. Use when user says "forge config" or wants to change settings.
4
+ argument-hint: [key] [value]
5
+ allowed-tools:
6
+ - Read
7
+ - Write
8
+ - Bash
9
+ ---
10
+
11
+ <objective>
12
+ View current FORGE configuration or modify specific settings.
13
+
14
+ Purpose: Configure FORGE behavior for the project.
15
+ Output: Current settings or updated configuration.
16
+ </objective>
17
+
18
+ <execution_context>
19
+ **Load these files NOW:**
20
+
21
+ - @.planning/forge.config.json (Current configuration)
22
+ - @state/STATE.json (Project state)
23
+ </execution_context>
24
+
25
+ <context>
26
+ **Configuration File:** .planning/forge.config.json
27
+ **Operation:** View (no args) or Edit (key + value)
28
+ </context>
29
+
30
+ <process>
31
+ **Execute config command:**
32
+
33
+ 1. **View Configuration** (no arguments)
34
+ ```bash
35
+ forge config
36
+ ```
37
+
38
+ Output:
39
+ ```
40
+ FORGE Configuration:
41
+ ───────────────────────────────────────
42
+ mode: interactive # Interaction mode
43
+ depth: standard # Planning depth
44
+ maxTeammates: 5 # Max agents per phase
45
+ taskLimit: 6 # Max tasks per phase
46
+ conventionalCommits: true # Enforce commit format
47
+ worktreeIsolation: true # Use worktrees for tasks
48
+ ```
49
+
50
+ 2. **View Specific Key**
51
+ ```bash
52
+ forge config taskLimit
53
+ # Output: taskLimit = 6
54
+ ```
55
+
56
+ 3. **Edit Setting**
57
+ ```bash
58
+ forge config maxTeammates 6
59
+ # Updates: .planning/forge.config.json
60
+ ```
61
+
62
+ 4. **Validate Changes**
63
+ - Check value type
64
+ - Validate ranges (e.g., maxTeammates: 2-10)
65
+ - Verify schema compliance
66
+ - Update STATE.json if needed
67
+
68
+ 5. **Available Settings**
69
+
70
+ | Key | Type | Default | Description |
71
+ |-----|------|---------|-------------|
72
+ | mode | enum | interactive | yolo, interactive, standard |
73
+ | depth | enum | standard | quick, standard, comprehensive |
74
+ | maxTeammates | int | 5 | Max agents per phase (2-10) |
75
+ | taskLimit | int | 6 | Max tasks per phase (5-6 recommended) |
76
+ | conventionalCommits | bool | true | Enforce commit format |
77
+ | worktreeIsolation | bool | true | Use worktrees for tasks |
78
+ | autoMerge | bool | false | Auto-merge completed tasks |
79
+
80
+ 6. **Config Schema**
81
+ ```json
82
+ {
83
+ "$schema": "./config.schema.json",
84
+ "mode": "interactive",
85
+ "depth": "standard",
86
+ "maxTeammates": 5,
87
+ "taskLimit": 6,
88
+ "conventionalCommits": true,
89
+ "worktreeIsolation": true,
90
+ "autoMerge": false
91
+ }
92
+ ```
93
+ </process>
94
+
95
+ <validation>
96
+ - Type checking (int, bool, enum)
97
+ - Range validation (e.g., maxTeammates: 2-10)
98
+ - Schema compliance
99
+ </validation>
100
+
101
+ <examples>
102
+ ```bash
103
+ # View all config
104
+ forge config
105
+
106
+ # View specific setting
107
+ forge config taskLimit
108
+
109
+ # Change setting
110
+ forge config maxTeammates 6
111
+
112
+ # Reset to defaults
113
+ forge config --reset
114
+ ```
115
+ </examples>
@@ -0,0 +1,31 @@
1
+ ---
2
+ name: forge:convert
3
+ description: Convert GSD project to FORGE format.
4
+ argument-hint: [--dry-run] [--force]
5
+ allowed-tools:
6
+ - Read
7
+ - Write
8
+ - Edit
9
+ - Glob
10
+ - Grep
11
+ - Bash
12
+ - Task
13
+ - TeamCreate
14
+ - AskUserQuestion
15
+ ---
16
+
17
+ Convert existing GSD project to FORGE format, preserving roadmap and phase context.
18
+
19
+ **GSD → FORGE mapping:** PROJECT.md → CLAUDE.md | ROADMAP.md → preserved | .planning/phases → STATE.json tasks
20
+
21
+ **Steps:**
22
+
23
+ 1. Detect GSD project (PROJECT.md, ROADMAP.md, .planning/)
24
+ 2. If `--dry-run`, preview changes and exit
25
+ 3. Create FORGE structure: state/STATE.json, state/events/, contracts/, .planning/forge.config.json
26
+ 4. Generate CLAUDE.md from PROJECT.md with FORGE architecture patterns
27
+ 5. Extract tasks from phase plans into STATE.json
28
+ 6. If no AgentTeam.md, analyze codebase and generate one. Create team with TeamCreate.
29
+ 7. Verify with `/forge:status`
30
+
31
+ Use `--force` to overwrite existing FORGE files.
@@ -0,0 +1,31 @@
1
+ ---
2
+ name: forge:debug
3
+ description: Systematic debugging with persistent state across context resets
4
+ argument-hint: [issue description]
5
+ allowed-tools:
6
+ - Read
7
+ - Bash
8
+ - Task
9
+ - AskUserQuestion
10
+ ---
11
+
12
+ Debug issue "$ARGUMENTS" using scientific method with subagent isolation.
13
+
14
+ **Read:** state/STATE.json
15
+
16
+ **Steps:**
17
+
18
+ 1. Check for active debug sessions in `.planning/debug/`. If found and no args, list sessions for user to resume.
19
+
20
+ 2. Gather symptoms via AskUserQuestion: expected behavior, actual behavior, errors, timeline, reproduction steps.
21
+
22
+ 3. Create `.planning/debug/{slug}.md` with symptom data.
23
+
24
+ 4. Spawn debugger subagent via Task tool with symptoms context. Uses fresh 200k context for investigation.
25
+
26
+ 5. Handle agent return:
27
+ - **ROOT CAUSE FOUND:** Display cause + evidence, offer "Fix now" / "Plan fix" / "Manual fix"
28
+ - **CHECKPOINT REACHED:** Present to user, get response, spawn continuation agent
29
+ - **INCONCLUSIVE:** Show eliminated hypotheses, offer to continue or add context
30
+
31
+ 6. Submit DEBUG_SESSION_CREATED/RESOLVED event. Rename resolved files to `{slug}.resolved.md`.