forge-orkes 0.3.10 → 0.3.13
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/bin/create-forge.js +16 -5
- package/package.json +1 -1
- package/template/.claude/agents/executor.md +44 -95
- package/template/.claude/agents/planner.md +46 -75
- package/template/.claude/agents/researcher.md +34 -70
- package/template/.claude/agents/reviewer.md +54 -117
- package/template/.claude/agents/verifier.md +51 -102
- package/template/.claude/skills/discussing/SKILL.md +69 -121
- package/template/.claude/skills/forge/SKILL.md +129 -129
- package/template/.claude/skills/initializing/SKILL.md +72 -174
- package/template/.claude/skills/planning/SKILL.md +92 -118
- package/template/.claude/skills/reviewing/SKILL.md +82 -177
- package/template/.forge/templates/constitution.md +10 -0
- package/template/.forge/templates/project.yml +17 -0
- package/template/CLAUDE.md +105 -115
|
@@ -1,95 +1,80 @@
|
|
|
1
1
|
---
|
|
2
2
|
name: planning
|
|
3
|
-
description: "Break work into executable tasks with verification gates.
|
|
3
|
+
description: "Break work into executable tasks with verification gates. Enforces constitutional gates, structures requirements, decomposes tasks, goal-backward verification."
|
|
4
4
|
---
|
|
5
5
|
|
|
6
6
|
# Planning
|
|
7
7
|
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
> **Do NOT use `EnterPlanMode`.** All planning output goes to `.forge/phases/` as structured plan files. Follow the steps below directly.
|
|
8
|
+
> **Do NOT use `EnterPlanMode`.** Output -> `.forge/phases/`.
|
|
11
9
|
|
|
12
10
|
## Step 1: Resolution Gate
|
|
13
11
|
|
|
14
|
-
Read `.forge/context.md
|
|
15
|
-
|
|
16
|
-
If unresolved items exist (unchecked `- [ ]` items):
|
|
17
|
-
|
|
18
|
-
Present all items and ask the user to decide on each:
|
|
19
|
-
*"Before we plan, {N} items need your input: [list]. For each: lock, defer, fix, or drop?"*
|
|
12
|
+
Read `.forge/context.md` **Needs Resolution**. If unchecked `- [ ]` items:
|
|
13
|
+
*"{N} items need input: [list]. For each: lock, defer, fix, or drop?"*
|
|
20
14
|
|
|
21
15
|
| Choice | Action |
|
|
22
16
|
|--------|--------|
|
|
23
17
|
| Lock | Record in Locked Decisions |
|
|
24
|
-
| Defer | Move to Deferred Ideas
|
|
25
|
-
| Fix | Add as FR-xxx in `.forge/requirements.yml`
|
|
18
|
+
| Defer | Move to Deferred Ideas + revisit date |
|
|
19
|
+
| Fix | Add as FR-xxx in `.forge/requirements.yml` |
|
|
26
20
|
| Drop | Note in Amendment Log |
|
|
27
21
|
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
Target: 2-5 minutes. Quick human decisions so planning proceeds with accurate info.
|
|
22
|
+
Mark resolved `- [x]`. Target: 2-5 min.
|
|
23
|
+
Scan **Carried Forward** -- items affecting current phase get same triage.
|
|
31
24
|
|
|
32
|
-
|
|
25
|
+
## Step 2: Constitutional Gate
|
|
33
26
|
|
|
34
|
-
|
|
27
|
+
Read `.forge/constitution.md`. Per article:
|
|
28
|
+
- Check gate checkboxes
|
|
29
|
+
- Fail -> **STOP.** Resolve first.
|
|
30
|
+
- Needs amendment -> flag for user (discuss phase)
|
|
35
31
|
|
|
36
|
-
|
|
37
|
-
- Check the gate checkboxes
|
|
38
|
-
- Gate fails → **STOP.** Resolve before planning.
|
|
39
|
-
- Article needs amendment → flag for user decision (discuss phase)
|
|
32
|
+
Record results in plan frontmatter.
|
|
40
33
|
|
|
41
|
-
|
|
34
|
+
## Step 3: Lock Decisions
|
|
42
35
|
|
|
43
|
-
|
|
36
|
+
If missing, create `.forge/context.md` from template:
|
|
37
|
+
1. Ask user key decisions (framework, constraints, preferences)
|
|
38
|
+
2. **Locked Decisions** (contracts)
|
|
39
|
+
3. **Deferred Ideas** (out of scope)
|
|
40
|
+
4. **Discretion Areas** (agent picks)
|
|
44
41
|
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
1. Ask user about key decisions (framework choices, constraints, preferences)
|
|
48
|
-
2. Record as **Locked Decisions** — these are contracts
|
|
49
|
-
3. Record **Deferred Ideas** — explicitly out of scope
|
|
50
|
-
4. Record **Discretion Areas** — agent picks best approach
|
|
51
|
-
|
|
52
|
-
Do this BEFORE creating plans. Plans must reference context.md.
|
|
42
|
+
Must complete BEFORE plans. Plans reference context.md.
|
|
53
43
|
|
|
54
44
|
## Step 4: Structure Requirements
|
|
55
45
|
|
|
56
|
-
If `.forge/requirements.yml`
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
6. List deferred items explicitly (DEF-001, etc.)
|
|
46
|
+
If `.forge/requirements.yml` missing, create from template:
|
|
47
|
+
1. Extract from user description + research
|
|
48
|
+
2. IDs: FR-001, FR-002...
|
|
49
|
+
3. Acceptance: Given/When/Then
|
|
50
|
+
4. Uncertain: `[NEEDS CLARIFICATION]`
|
|
51
|
+
5. P1 (must) / P2 (should) / P3 (nice)
|
|
52
|
+
6. Deferred: DEF-001...
|
|
64
53
|
|
|
65
|
-
**
|
|
54
|
+
**Blocks until all P1 `[NEEDS CLARIFICATION]` resolved.**
|
|
66
55
|
|
|
67
56
|
## Step 5: Create Roadmap
|
|
68
57
|
|
|
69
|
-
If `.forge/roadmap.yml`
|
|
58
|
+
If `.forge/roadmap.yml` missing (Full only):
|
|
59
|
+
1. Group by delivery boundaries
|
|
60
|
+
2. Inter-group dependencies
|
|
61
|
+
3. Phases (coherent, verifiable)
|
|
62
|
+
4. Every FR -> one phase, no orphans
|
|
63
|
+
5. Waves: independent=1, dependent=2+
|
|
70
64
|
|
|
71
|
-
|
|
72
|
-
2. Identify dependencies between groups
|
|
73
|
-
3. Create phases (coherent, verifiable capabilities)
|
|
74
|
-
4. Assign requirements to phases (every FR → exactly one phase, no orphans)
|
|
75
|
-
5. Analyze waves (independent phases = Wave 1, dependencies = Wave 2+)
|
|
65
|
+
## Step 6: Decompose Tasks
|
|
76
66
|
|
|
77
|
-
|
|
67
|
+
Per phase (or feature, Standard tier):
|
|
78
68
|
|
|
79
|
-
|
|
80
|
-
|
|
81
|
-
|
|
82
|
-
|
|
83
|
-
|
|
84
|
-
-
|
|
85
|
-
-
|
|
86
|
-
-
|
|
87
|
-
|
|
88
|
-
3. Create goal-backward must_haves:
|
|
89
|
-
- **Truths:** Observable from user perspective when done (3-7)
|
|
90
|
-
- **Artifacts:** Files that must exist and be substantive, not stubs
|
|
91
|
-
- **Key Links:** Critical connections between artifacts
|
|
92
|
-
4. Decompose into XML tasks (2-3 per plan, 15-60 min each):
|
|
69
|
+
1. `.forge/templates/plan.md` -> `.forge/phases/m{M}-{N}-{name}/plan-{NN}.md`
|
|
70
|
+
- `{M}`=milestone, `{N}`=phase#, `{name}`=kebab, `{NN}`=seq
|
|
71
|
+
- Ex: `.forge/phases/m3-2-providers/plan-01.md`
|
|
72
|
+
2. Frontmatter: phase, plan#, wave, deps
|
|
73
|
+
3. must_haves:
|
|
74
|
+
- **Truths:** User-observable outcomes (3-7)
|
|
75
|
+
- **Artifacts:** Must exist, substantive not stubs
|
|
76
|
+
- **Key Links:** Connections between artifacts
|
|
77
|
+
4. XML tasks (2-3/plan, 15-60 min):
|
|
93
78
|
|
|
94
79
|
```xml
|
|
95
80
|
<task type="auto">
|
|
@@ -123,7 +108,7 @@ For each phase (or single feature in Standard tier):
|
|
|
123
108
|
Plan 01: User feature (model + API + UI) → Wave 1
|
|
124
109
|
Plan 02: Product feature (model + API + UI) → Wave 1
|
|
125
110
|
```
|
|
126
|
-
Independent plans run
|
|
111
|
+
Independent plans run parallel.
|
|
127
112
|
|
|
128
113
|
### Avoid Horizontal Layers
|
|
129
114
|
```
|
|
@@ -131,36 +116,31 @@ Plan 01: All models → Wave 1
|
|
|
131
116
|
Plan 02: All APIs → Wave 2 (depends on 01)
|
|
132
117
|
Plan 03: All UI → Wave 3 (depends on 02)
|
|
133
118
|
```
|
|
134
|
-
|
|
119
|
+
Sequential. Only when architecturally required.
|
|
135
120
|
|
|
136
|
-
## Step 7: Test
|
|
121
|
+
## Step 7: Test Specs (Optional)
|
|
137
122
|
|
|
138
|
-
**When
|
|
123
|
+
**When:** Testable contracts (APIs, libraries, transforms, services). Skip UI-heavy.
|
|
139
124
|
|
|
140
|
-
### Detect
|
|
125
|
+
### Detect Contracts
|
|
141
126
|
|
|
142
|
-
Scan tasks
|
|
143
|
-
- API endpoints
|
|
144
|
-
- Library
|
|
145
|
-
-
|
|
146
|
-
-
|
|
147
|
-
- Business logic
|
|
127
|
+
Scan tasks. Candidate if:
|
|
128
|
+
- API endpoints -- shapes, codes, errors
|
|
129
|
+
- Library interfaces -- typed functions, outputs
|
|
130
|
+
- Transforms -- parsers, validators, input->output
|
|
131
|
+
- Services -- external calls, payloads, errors
|
|
132
|
+
- Business logic -- calculations, state machines
|
|
148
133
|
|
|
149
|
-
|
|
134
|
+
None -> skip to Step 8.
|
|
150
135
|
|
|
151
|
-
### Generate
|
|
136
|
+
### Generate Specs
|
|
152
137
|
|
|
153
138
|
**Location:** `.forge/phases/m{M}-{N}-{name}/specs/`
|
|
154
|
-
|
|
155
|
-
|
|
156
|
-
|
|
157
|
-
|
|
158
|
-
|
|
159
|
-
- Happy path from acceptance criteria
|
|
160
|
-
- Edge cases from requirements (empty input, max limits, invalid data)
|
|
161
|
-
- Error cases from `<done>` criteria
|
|
162
|
-
3. Assert outcomes, not internals
|
|
163
|
-
4. Mark as pending/skipped (`it.skip()`, `@pytest.mark.skip`, `t.Skip()`) so CI doesn't break before implementation
|
|
139
|
+
Test files (`.test.ts`, `_test.go`, `test_*.py`):
|
|
140
|
+
1. Import from `<files>` path
|
|
141
|
+
2. Behavior from requirements (happy, edge, error)
|
|
142
|
+
3. Assert outcomes not internals
|
|
143
|
+
4. Mark pending (`it.skip()`, `@pytest.mark.skip`, `t.Skip()`)
|
|
164
144
|
|
|
165
145
|
```typescript
|
|
166
146
|
// Example: .forge/phases/m1-1-auth/specs/login-endpoint.test.ts
|
|
@@ -183,9 +163,9 @@ describe('POST /api/auth/login', () => {
|
|
|
183
163
|
});
|
|
184
164
|
```
|
|
185
165
|
|
|
186
|
-
### Update
|
|
166
|
+
### Update Tasks
|
|
187
167
|
|
|
188
|
-
|
|
168
|
+
Specs -> type becomes `tdd`:
|
|
189
169
|
|
|
190
170
|
```xml
|
|
191
171
|
<task type="tdd">
|
|
@@ -198,45 +178,39 @@ For tasks with generated test specs, update the task XML to reference the spec:
|
|
|
198
178
|
</task>
|
|
199
179
|
```
|
|
200
180
|
|
|
201
|
-
|
|
181
|
+
Executor TDD (RED -> GREEN -> REFACTOR) auto-activates.
|
|
202
182
|
|
|
203
|
-
###
|
|
204
|
-
- UI
|
|
205
|
-
-
|
|
206
|
-
-
|
|
207
|
-
- Undefined interfaces (spec after architecting
|
|
183
|
+
### Do NOT Spec
|
|
184
|
+
- UI rendering (must_haves truths)
|
|
185
|
+
- Layout/styling (human verify)
|
|
186
|
+
- Multi-component integration (key_links)
|
|
187
|
+
- Undefined interfaces (spec after architecting)
|
|
208
188
|
|
|
209
189
|
## Step 8: Verify Plans
|
|
210
190
|
|
|
211
|
-
|
|
212
|
-
|
|
213
|
-
|
|
214
|
-
|
|
215
|
-
|
|
216
|
-
|
|
217
|
-
|
|
218
|
-
|
|
219
|
-
|
|
220
|
-
8. **Spec Validity** (when Step 7 used) — Valid syntax, correct paths, derived from requirements not assumptions
|
|
221
|
-
|
|
222
|
-
Issues found → fix and re-verify. Max 3 revision cycles.
|
|
223
|
-
|
|
224
|
-
## Step 9: Present to User
|
|
191
|
+
8 dimensions:
|
|
192
|
+
1. **Requirement Coverage** -- every req has task(s)
|
|
193
|
+
2. **Task Completeness** -- files + action + verify + done
|
|
194
|
+
3. **Deps** -- valid DAG, no cycles
|
|
195
|
+
4. **Key Links** -- wired, not orphaned
|
|
196
|
+
5. **Scope** -- 2-3 tasks/plan, ~50% context
|
|
197
|
+
6. **Verification** -- must_haves trace to goal
|
|
198
|
+
7. **Context** -- honors locked, excludes deferred
|
|
199
|
+
8. **Spec Validity** -- valid syntax, correct paths
|
|
225
200
|
|
|
226
|
-
|
|
227
|
-
1. Requirements summary (P1/P2/P3 counts, clarifications needed)
|
|
228
|
-
2. Phase/plan structure with wave analysis
|
|
229
|
-
3. Estimated effort per phase
|
|
230
|
-
4. Ask: "Does this plan match your expectations? Any changes?"
|
|
201
|
+
Issues -> fix, re-verify. Max 3 cycles.
|
|
231
202
|
|
|
232
|
-
|
|
203
|
+
## Step 9: Present
|
|
233
204
|
|
|
234
|
-
|
|
205
|
+
1. Requirements (P1/P2/P3, clarifications)
|
|
206
|
+
2. Phase/plan structure + waves
|
|
207
|
+
3. Effort estimates
|
|
208
|
+
4. "Does this plan match expectations? Changes?"
|
|
235
209
|
|
|
236
|
-
|
|
210
|
+
Done when approved.
|
|
237
211
|
|
|
238
|
-
|
|
239
|
-
2. **Update state** — Set `current.status` to `executing` in `.forge/state/milestone-{id}.yml`
|
|
240
|
-
3. **Recommend context clear:**
|
|
212
|
+
## Handoff
|
|
241
213
|
|
|
242
|
-
|
|
214
|
+
1. **Persist** -- plans `.forge/phases/`, reqs `.forge/requirements.yml`, roadmap `.forge/roadmap.yml`, context `.forge/context.md`
|
|
215
|
+
2. **State** -- `current.status` = `executing` in `.forge/state/milestone-{id}.yml`
|
|
216
|
+
3. *"Plan written. `/clear` then `/forge` to continue."*
|