forge-dev-framework 1.1.0 → 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 (107) hide show
  1. package/.claude/commands/forge/README.md +156 -189
  2. package/.claude/commands/forge/add-phase.md +4 -3
  3. package/.claude/commands/forge/complete-milestone.md +1 -1
  4. package/.claude/commands/forge/convert.md +31 -0
  5. package/.claude/commands/forge/debug.md +12 -154
  6. package/.claude/commands/forge/discuss.md +60 -107
  7. package/.claude/commands/forge/execute.md +67 -142
  8. package/.claude/commands/forge/generate.md +8 -107
  9. package/.claude/commands/forge/help.md +9 -114
  10. package/.claude/commands/forge/init.md +10 -74
  11. package/.claude/commands/forge/insert-phase.md +4 -3
  12. package/.claude/commands/forge/new-milestone.md +1 -1
  13. package/.claude/commands/forge/new-project.md +12 -91
  14. package/.claude/commands/forge/pause-work.md +2 -2
  15. package/.claude/commands/forge/plan.md +114 -129
  16. package/.claude/commands/forge/quick.md +17 -106
  17. package/.claude/commands/forge/remove-phase.md +3 -2
  18. package/.claude/commands/forge/resume.md +22 -0
  19. package/.claude/commands/forge/team-add.md +24 -0
  20. package/.claude/commands/forge/team-create.md +22 -0
  21. package/.claude/commands/forge/team-remove.md +24 -0
  22. package/.claude/commands/forge/team-start.md +22 -0
  23. package/.claude/commands/forge/team-view.md +18 -0
  24. package/.claude/commands/forge/verify.md +68 -147
  25. package/.claude/hooks/forge-context-cleanup.cjs +79 -0
  26. package/.claude/hooks/forge-event-guard.cjs +36 -0
  27. package/.claude/hooks/forge-size-guard.cjs +55 -0
  28. package/.claude/rules/api-patterns.md +13 -98
  29. package/.claude/rules/context-efficiency.md +10 -0
  30. package/.claude/rules/security-baseline.md +18 -204
  31. package/.claude/rules/testing-standards.md +16 -177
  32. package/.claude/rules/ui-conventions.md +17 -142
  33. package/bin/forge.js +5 -3
  34. package/dist/bin/forge.js +5 -3
  35. package/dist/cli/index.d.ts.map +1 -1
  36. package/dist/cli/index.js +15 -1
  37. package/dist/cli/index.js.map +1 -1
  38. package/dist/commands/convert.d.ts +6 -0
  39. package/dist/commands/convert.d.ts.map +1 -0
  40. package/dist/commands/convert.js +132 -0
  41. package/dist/commands/convert.js.map +1 -0
  42. package/dist/commands/generate.d.ts.map +1 -1
  43. package/dist/commands/generate.js +3 -2
  44. package/dist/commands/generate.js.map +1 -1
  45. package/dist/commands/index.d.ts +4 -4
  46. package/dist/commands/index.d.ts.map +1 -1
  47. package/dist/commands/index.js +4 -4
  48. package/dist/commands/index.js.map +1 -1
  49. package/dist/generators/gsd-converter.d.ts +100 -0
  50. package/dist/generators/gsd-converter.d.ts.map +1 -0
  51. package/dist/generators/gsd-converter.js +335 -0
  52. package/dist/generators/gsd-converter.js.map +1 -0
  53. package/dist/templates/.claude/rules/api-patterns.md.template +212 -0
  54. package/dist/templates/.claude/rules/security-baseline.md.template +322 -0
  55. package/dist/templates/.claude/rules/testing-standards.md.template +280 -0
  56. package/dist/templates/.claude/rules/ui-conventions.md.template +264 -0
  57. package/dist/templates/.planning/forge.config.json.template +75 -0
  58. package/dist/templates/CLAUDE.md.template +161 -0
  59. package/dist/templates/PLAN.md.template +177 -0
  60. package/dist/templates/PROJECT.md.template +156 -0
  61. package/dist/templates/REQUIREMENTS.md.template +221 -0
  62. package/dist/templates/ROADMAP.md.template +130 -0
  63. package/dist/types/index.d.ts +2 -2
  64. package/dist/types/index.d.ts.map +1 -1
  65. package/dist/types/index.js +2 -2
  66. package/dist/types/index.js.map +1 -1
  67. package/dist/utils/index.d.ts +5 -5
  68. package/dist/utils/index.d.ts.map +1 -1
  69. package/dist/utils/index.js +5 -5
  70. package/dist/utils/index.js.map +1 -1
  71. package/dist/utils/template-client.d.ts.map +1 -1
  72. package/dist/utils/template-client.js +3 -2
  73. package/dist/utils/template-client.js.map +1 -1
  74. package/package.json +6 -4
  75. package/.claude/commands/forge/resume-work.md +0 -122
  76. package/dist/git/__tests__/worktree.test.d.ts +0 -5
  77. package/dist/git/__tests__/worktree.test.d.ts.map +0 -1
  78. package/dist/git/__tests__/worktree.test.js +0 -121
  79. package/dist/git/__tests__/worktree.test.js.map +0 -1
  80. package/dist/git/codeowners.d.ts +0 -101
  81. package/dist/git/codeowners.d.ts.map +0 -1
  82. package/dist/git/codeowners.js +0 -216
  83. package/dist/git/codeowners.js.map +0 -1
  84. package/dist/git/commit.d.ts +0 -135
  85. package/dist/git/commit.d.ts.map +0 -1
  86. package/dist/git/commit.js +0 -223
  87. package/dist/git/commit.js.map +0 -1
  88. package/dist/git/hooks/commit-msg.d.ts +0 -8
  89. package/dist/git/hooks/commit-msg.d.ts.map +0 -1
  90. package/dist/git/hooks/commit-msg.js +0 -34
  91. package/dist/git/hooks/commit-msg.js.map +0 -1
  92. package/dist/git/hooks/pre-commit.d.ts +0 -8
  93. package/dist/git/hooks/pre-commit.d.ts.map +0 -1
  94. package/dist/git/hooks/pre-commit.js +0 -34
  95. package/dist/git/hooks/pre-commit.js.map +0 -1
  96. package/dist/git/pre-commit-hooks.d.ts +0 -117
  97. package/dist/git/pre-commit-hooks.d.ts.map +0 -1
  98. package/dist/git/pre-commit-hooks.js +0 -270
  99. package/dist/git/pre-commit-hooks.js.map +0 -1
  100. package/dist/git/wipe-protocol.d.ts +0 -281
  101. package/dist/git/wipe-protocol.d.ts.map +0 -1
  102. package/dist/git/wipe-protocol.js +0 -237
  103. package/dist/git/wipe-protocol.js.map +0 -1
  104. package/dist/git/worktree.d.ts +0 -69
  105. package/dist/git/worktree.d.ts.map +0 -1
  106. package/dist/git/worktree.js +0 -202
  107. package/dist/git/worktree.js.map +0 -1
@@ -1,10 +1,10 @@
1
1
  # FORGE Command Reference
2
2
 
3
- FORGE commands are now available as slash commands in Claude Code, similar to how GSD works.
3
+ FORGE commands are available as slash commands in Claude Code.
4
4
 
5
5
  ## Available Commands
6
6
 
7
- ### Core Commands (Milestone 1 ✅)
7
+ ### Core Commands
8
8
 
9
9
  | Command | Description | Usage |
10
10
  |---------|-------------|-------|
@@ -15,19 +15,14 @@ FORGE commands are now available as slash commands in Claude Code, similar to ho
15
15
  | `/forge:generate` | Generate artifact from template | `/forge:generate <artifact> [-f]` |
16
16
  | `/forge:help` | Show command reference | `/forge:help [command]` |
17
17
 
18
- ### Planning Commands (Milestone 2 🚧)
18
+ ### Planning Commands
19
19
 
20
20
  | Command | Description | Usage |
21
21
  |---------|-------------|-------|
22
- | `/forge:discuss` | Capture phase context | `/forge:discuss <phase-name>` |
23
- | `/forge:plan` | Generate task breakdown | `/forge:plan <phase-name>` |
24
- | `/forge:verify` | Verify plan against requirements | `/forge:verify <phase-name>` |
25
-
26
- ### Execution Commands (Milestone 3 📋)
27
-
28
- | Command | Description | Usage |
29
- |---------|-------------|-------|
30
- | `/forge:execute` | Execute phase with agent teams | `/forge:execute <phase-name>` |
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]` |
31
26
 
32
27
  ### Phase Management Commands
33
28
 
@@ -49,10 +44,136 @@ FORGE commands are now available as slash commands in Claude Code, similar to ho
49
44
  | Command | Description | Usage |
50
45
  |---------|-------------|-------|
51
46
  | `/forge:pause-work` | Create context handoff | `/forge:pause-work` |
52
- | `/forge:resume-work` | Resume from previous session | `/forge:resume-work` |
47
+ | `/forge:resume` | Resume from previous session | `/forge:resume` |
53
48
  | `/forge:quick` | Execute quick task with guarantees | `/forge:quick <task-description>` |
54
49
  | `/forge:debug` | Systematic debugging | `/forge:debug [issue description]` |
55
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
+
56
177
  ## Quick Start
57
178
 
58
179
  ### 1. Initialize a New FORGE Project
@@ -61,87 +182,65 @@ FORGE commands are now available as slash commands in Claude Code, similar to ho
61
182
  /forge:new-project my-app
62
183
  ```
63
184
 
64
- This creates a complete FORGE project structure with:
65
- - CLAUDE.md (project constitution)
66
- - state/STATE.json (event-sourced state)
67
- - .planning/forge.config.json (configuration)
68
- - Templates and generators
69
- - Git integration with hooks
70
-
71
- ### 2. Plan a Phase
72
-
73
- First, capture context:
185
+ ### 2. Gather Context
74
186
 
75
187
  ```bash
76
188
  /forge:discuss M2-planning-engine
77
189
  ```
78
190
 
79
- Then generate tasks:
191
+ Identifies gray areas, asks focused questions, produces structured CONTEXT.md.
192
+
193
+ ### 3. Plan the Phase
80
194
 
81
195
  ```bash
82
196
  /forge:plan M2-planning-engine
83
197
  ```
84
198
 
85
- This creates a PLAN.md with:
86
- - 5-6 atomic tasks (FORGE hard rule)
87
- - Mermaid dependency graph
88
- - Requirements coverage matrix
89
- - Acceptance criteria
199
+ Researches (→ RESEARCH.md), generates multiple numbered plan files with frontmatter and wave assignments.
90
200
 
91
- ### 3. Verify the Plan
201
+ Running `/forge:plan` again when plans exist gives options: add more, verify, execute, or replan.
202
+
203
+ ### 4. Verify Plans
92
204
 
93
205
  ```bash
94
206
  /forge:verify M2-planning-engine
95
207
  ```
96
208
 
97
- This validates:
98
- - Requirements coverage
99
- - Goal-backward verification
100
- - Integration completeness
101
- - Task atomicity
209
+ Checks all plans against requirements. If gaps found, generates gap closure plan files (numbered after existing plans).
102
210
 
103
- ### 4. Execute the Phase
211
+ ### 5. Execute the Phase
104
212
 
105
213
  ```bash
106
214
  /forge:execute M2-planning-engine
107
215
  ```
108
216
 
109
- This spawns agent teams to execute tasks with:
110
- - Wave-based parallelization
111
- - Wipe Protocol (fresh context per task)
112
- - Atomic commits (one task = one commit)
113
- - Contract-first coordination
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.
114
218
 
115
- ## Artifact Generation
219
+ ### 6. Execute Gap Remediation (if needed)
116
220
 
117
- Generate specific artifacts using `/forge:generate`:
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
118
228
 
119
229
  ```bash
120
230
  /forge:generate claude # CLAUDE.md
121
231
  /forge:generate requirements # REQUIREMENTS.md
122
232
  /forge:generate roadmap # ROADMAP.md
123
- /forge:generate plan # PLAN.md
124
233
  /forge:generate config # forge.config.json
125
234
  /forge:generate rules # .claude/rules/*.md
126
235
  ```
127
236
 
128
237
  ## Configuration
129
238
 
130
- View configuration:
131
-
132
- ```bash
133
- /forge:config
134
- ```
135
-
136
- Edit a setting:
137
-
138
239
  ```bash
139
- /forge:config maxTeammates 6
140
- /forge:config taskLimit 5
240
+ /forge:config # View all settings
241
+ /forge:config maxTeammates 6 # Set a value
141
242
  ```
142
243
 
143
- Available settings:
144
-
145
244
  | Key | Type | Default | Description |
146
245
  |-----|------|---------|-------------|
147
246
  | mode | enum | interactive | yolo, interactive, standard |
@@ -151,77 +250,8 @@ Available settings:
151
250
  | conventionalCommits | bool | true | Enforce commit format |
152
251
  | worktreeIsolation | bool | true | Use worktrees for tasks |
153
252
 
154
- ## Status Tracking
155
-
156
- Check project progress:
157
-
158
- ```bash
159
- /forge:status
160
- ```
161
-
162
- Verbose mode (shows all tasks):
163
-
164
- ```bash
165
- /forge:status -v
166
- ```
167
-
168
- ## Command Lifecycle
169
-
170
- ```
171
- ┌─────────────────┐
172
- │ forge:new-project │ ← Create new FORGE project
173
- └────────┬────────┘
174
-
175
- ┌─────────────────┐
176
- │ forge:new-milestone │ ← Start new milestone
177
- └────────┬────────┘
178
-
179
- ┌─────────────────┐
180
- │ forge:discuss │ ← Capture phase context
181
- └────────┬────────┘
182
-
183
- ┌─────────────────┐
184
- │ forge:plan │ ← Generate 5-6 atomic tasks
185
- └────────┬────────┘
186
-
187
- ┌─────────────────┐
188
- │ forge:verify │ ← Validate against requirements
189
- └────────┬────────┘
190
-
191
- ┌─────────────────┐
192
- │ forge:execute │ ← Execute with agent teams
193
- └────────┬────────┘
194
-
195
- ┌─────────────────────┐
196
- │ forge:pause-work │ ← Pause mid-phase (optional)
197
- └────────┬────────────┘
198
-
199
- ┌─────────────────────┐
200
- │ forge:resume-work │ ← Resume with full context
201
- └────────┬────────────┘
202
-
203
- ┌─────────────────────┐
204
- │forge:complete-milestone│ ← Archive milestone
205
- └─────────────────────┘
206
- ```
207
-
208
- ## Quick Tasks & Debugging
209
-
210
- For ad-hoc work outside the planned phases:
211
-
212
- ```bash
213
- /forge:quick "Fix login bug" # Execute small task with atomic commits
214
- /forge:debug "API not responding" # Systematic debugging workflow
215
- ```
216
-
217
- **Quick tasks** live in `.planning/quick/` separate from planned phases and update the quick tasks table in STATE.json.
218
-
219
- **Debug sessions** create `.planning/debug/*.md` files with investigation state that persists across context resets.
220
-
221
253
  ## FORGE Architecture
222
254
 
223
- FORGE uses an event-sourced state engine with single-writer merge:
224
-
225
255
  ```
226
256
  All Agents → state/events/*.json (append-only)
227
257
 
@@ -237,19 +267,8 @@ All Agents → state/events/*.json (append-only)
237
267
  - **Contract-First**: API contracts negotiated before cross-domain work
238
268
  - **File Ownership**: Each agent writes only within owned paths
239
269
  - **Wipe Protocol**: Fresh agent context per task
240
- - **5-6 Task Limit**: Maximum tasks per phase
241
270
  - **Atomic Commits**: One task = one commit
242
271
 
243
- ## Milestone Status
244
-
245
- | Milestone | Name | Status |
246
- |-----------|------|--------|
247
- | M1 | Foundation | ✅ Complete |
248
- | M2 | Planning Engine | 🚧 In Progress |
249
- | M3 | Parallel Execution | 📋 Planned |
250
- | M4 | Adversarial Review | 📋 Planned |
251
- | M5 | CLI & TUI | 📋 Planned |
252
-
253
272
  ## Getting Help
254
273
 
255
274
  ```bash
@@ -257,58 +276,6 @@ All Agents → state/events/*.json (append-only)
257
276
  /forge:help plan # Detailed help for specific command
258
277
  ```
259
278
 
260
- ## File Structure
261
-
262
- ```
263
- .forge-project/
264
- ├── CLAUDE.md # Project constitution
265
- ├── REQUIREMENTS.md # Functional requirements
266
- ├── ROADMAP.md # Milestone breakdown
267
- ├── PLAN.md # Task breakdown
268
- ├── state/
269
- │ ├── STATE.json # Canonical state (single-writer)
270
- │ ├── STATE.schema.json # State validation schema
271
- │ └── events/ # Append-only event log
272
- ├── contracts/ # API contracts
273
- ├── .planning/
274
- │ ├── forge.config.json # Configuration
275
- │ └── phases/ # Phase artifacts
276
- ├── .claude/
277
- │ └── rules/ # Scoped rules
278
- ├── src/
279
- │ ├── cli/ # CLI commands
280
- │ ├── commands/ # Command implementations
281
- │ ├── generators/ # Template engine
282
- │ ├── git/ # Git operations
283
- │ └── utils/ # Utilities
284
- └── .worktrees/ # Git worktrees for isolation
285
- ```
286
-
287
- ## Integration with Claude Code
288
-
289
- FORGE commands integrate seamlessly with Claude Code's agent teams:
290
-
291
- 1. **State Engine**: Manages project state deterministically
292
- 2. **Contract-First**: Agents negotiate interfaces before implementation
293
- 3. **File Ownership**: Clear boundaries prevent merge conflicts
294
- 4. **Wipe Protocol**: Fresh context prevents hallucination carry-over
295
- 5. **Atomic Commits**: One task = one git commit (enforced)
296
-
297
- ## Next Steps
298
-
299
- 1. Run `/forge:new-project` to create a new FORGE project
300
- 2. Run `/forge:discuss` to capture phase context
301
- 3. Run `/forge:plan` to generate task breakdown
302
- 4. Run `/forge:execute` to execute with agent teams
303
- 5. Run `/forge:status` to track progress
304
-
305
- ## Documentation
306
-
307
- - **CLAUDE.md**: Architecture, patterns, rules
308
- - **REQUIREMENTS.md**: Functional requirements
309
- - **ROADMAP.md**: 5-milestone implementation plan
310
- - **PLAN.md**: Detailed task breakdowns
311
-
312
279
  ## Version
313
280
 
314
- FORGE v1.0-M1 — Milestone 1: Foundation (COMPLETE)
281
+ FORGE v1.0-M1 — Milestone 1: Foundation (COMPLETE)
@@ -72,7 +72,7 @@ Routes to the add-phase workflow which handles:
72
72
 
73
73
  7. **Confirm**
74
74
  - Show new phase info
75
- - Suggest next: `forge discuss <phase>` or `forge plan <phase>`
75
+ - Suggest next: `/forge:discuss <phase-number>` or `/forge:plan <phase-number>`
76
76
  </process>
77
77
 
78
78
  <deliverables>
@@ -84,6 +84,7 @@ Routes to the add-phase workflow which handles:
84
84
  </deliverables>
85
85
 
86
86
  <next_steps>
87
- - Run `forge discuss <phase>` to capture phase context
88
- - Run `forge plan <phase>` to generate task breakdown
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
89
90
  </next_steps>
@@ -108,7 +108,7 @@ Routes to audit-milestone workflow which validates completion before archiving.
108
108
  9. **Confirm**
109
109
  - Show milestone summary
110
110
  - List archived artifacts
111
- - Suggest next: `forge new-milestone` or manual planning
111
+ - Suggest next: `/forge:new-milestone` or manual planning
112
112
 
113
113
  10. **Cleanup**
114
114
  - Offer to remove completed phase directories
@@ -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.
@@ -9,165 +9,23 @@ allowed-tools:
9
9
  - AskUserQuestion
10
10
  ---
11
11
 
12
- <objective>
13
- Debug issues using scientific method with subagent isolation.
12
+ Debug issue "$ARGUMENTS" using scientific method with subagent isolation.
14
13
 
15
- **Orchestrator role:** Gather symptoms, spawn debugger agent, handle checkpoints, spawn continuations.
14
+ **Read:** state/STATE.json
16
15
 
17
- **Why subagent:** Investigation burns context fast (reading files, forming hypotheses, testing). Fresh 200k context per investigation. Main context stays lean for user interaction.
18
- </objective>
16
+ **Steps:**
19
17
 
20
- <execution_context>
21
- @state/STATE.json
22
- @CLAUDE.md
23
- </execution_context>
18
+ 1. Check for active debug sessions in `.planning/debug/`. If found and no args, list sessions for user to resume.
24
19
 
25
- <context>
26
- **User's Issue:** $ARGUMENTS
20
+ 2. Gather symptoms via AskUserQuestion: expected behavior, actual behavior, errors, timeline, reproduction steps.
27
21
 
28
- **Debug Workflow:**
29
- 1. Check for active debug sessions
30
- 2. Gather symptoms (expected, actual, errors, timeline, reproduction)
31
- 3. Spawn debugger agent
32
- 4. Handle checkpoints and continuations
33
- 5. Confirm root cause before fixing
34
- </context>
22
+ 3. Create `.planning/debug/{slug}.md` with symptom data.
35
23
 
36
- <process>
37
- **Execute debug workflow:**
24
+ 4. Spawn debugger subagent via Task tool with symptoms context. Uses fresh 200k context for investigation.
38
25
 
39
- 1. **Check Active Sessions**
40
- ```bash
41
- find .planning/debug -name "*.md" -type f 2>/dev/null | grep -v resolved | head -5
42
- ```
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
43
30
 
44
- If active sessions exist AND no $ARGUMENTS:
45
- - List sessions with status, hypothesis, next action
46
- - User picks number to resume OR describes new issue
47
-
48
- If $ARGUMENTS provided OR user describes new issue:
49
- - Continue to symptom gathering
50
-
51
- 2. **Gather Symptoms** (if new issue)
52
- Use AskUserQuestion for each:
53
- - **Expected behavior:** What should happen?
54
- - **Actual behavior:** What happens instead?
55
- - **Error messages:** Any errors? (paste or describe)
56
- - **Timeline:** When did this start? Ever worked?
57
- - **Reproduction:** How do you trigger it?
58
-
59
- After gathering, confirm ready to investigate.
60
-
61
- 3. **Create Debug Session**
62
- - Generate slug from issue description
63
- - Create debug file: `.planning/debug/{slug}.md`
64
- - Initialize with symptom data
65
-
66
- 4. **Spawn Debugger Agent**
67
- Fill prompt and spawn:
68
- ```markdown
69
- <objective>
70
- Investigate issue: {slug}
71
-
72
- **Summary:** {trigger}
73
- </objective>
74
-
75
- <symptoms>
76
- expected: {expected}
77
- actual: {actual}
78
- errors: {errors}
79
- reproduction: {reproduction}
80
- timeline: {timeline}
81
- </symptoms>
82
-
83
- <mode>
84
- symptoms_prefilled: true
85
- goal: find_and_fix
86
- </mode>
87
-
88
- <debug_file>
89
- Create: .planning/debug/{slug}.md
90
- </debug_file>
91
- ```
92
-
93
- Spawn with Task tool:
94
- ```
95
- Task(
96
- prompt=filled_prompt,
97
- subagent_type="general-purpose",
98
- description="Debug {slug}"
99
- )
100
- ```
101
-
102
- 5. **Handle Agent Return**
103
-
104
- **If `## ROOT CAUSE FOUND`:**
105
- - Display root cause and evidence summary
106
- - Offer options:
107
- - "Fix now" - spawn fix subagent or fix directly
108
- - "Plan fix" - suggest `forge plan <phase>`
109
- - "Manual fix" - done
110
-
111
- **If `## CHECKPOINT REACHED`:**
112
- - Present checkpoint details to user
113
- - Get user response
114
- - Spawn continuation agent
115
-
116
- **If `## INVESTIGATION INCONCLUSIVE`:**
117
- - Show what was checked and eliminated
118
- - Offer options:
119
- - "Continue investigating" - spawn new agent
120
- - "Manual investigation" - done
121
- - "Add more context" - gather more symptoms
122
-
123
- 6. **Spawn Continuation Agent** (after checkpoint)
124
- When user responds to checkpoint, spawn fresh agent:
125
- ```markdown
126
- <objective>
127
- Continue debugging {slug}. Evidence is in the debug file.
128
- </objective>
129
-
130
- <prior_state>
131
- Debug file: @.planning/debug/{slug}.md
132
- </prior_state>
133
-
134
- <checkpoint_response>
135
- **Type:** {checkpoint_type}
136
- **Response:** {user_response}
137
- </checkpoint_response>
138
-
139
- <mode>
140
- goal: find_and_fix
141
- </mode>
142
- ```
143
-
144
- 7. **Submit Event**
145
- - Event type: DEBUG_SESSION_CREATED or DEBUG_RESOLVED
146
- - Include: issueSlug, status, rootCause (if found)
147
- - Write to state/events/
148
-
149
- 8. **Update Debug File**
150
- - Mark as resolved if root cause found
151
- - Rename to `{slug}.resolved.md`
152
- </process>
153
-
154
- <deliverables>
155
- - .planning/debug/{slug}.md (debug session file)
156
- - Root cause identified (or investigation results)
157
- - Event: DEBUG_SESSION_CREATED/RESOLVED in state/events/
158
- - Optional: Fix applied with atomic commit
159
- </deliverables>
160
-
161
- <success_criteria>
162
- - [ ] Active sessions checked
163
- - [ ] Symptoms gathered (if new)
164
- - [ ] Debugger spawned with context
165
- - [ ] Checkpoints handled correctly
166
- - [ ] Root cause confirmed before fixing
167
- </success_criteria>
168
-
169
- <next_steps>
170
- - If root cause found: Fix now or plan fix
171
- - If inconclusive: Continue investigating or manual investigation
172
- - Check progress: `forge status`
173
- </next_steps>
31
+ 6. Submit DEBUG_SESSION_CREATED/RESOLVED event. Rename resolved files to `{slug}.resolved.md`.