forge-orkes 0.5.1 → 0.8.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/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "forge-orkes",
3
- "version": "0.5.1",
3
+ "version": "0.8.0",
4
4
  "description": "Set up the Forge meta-prompting framework for Claude Code in your project",
5
5
  "bin": {
6
6
  "create-forge": "./bin/create-forge.js"
@@ -40,6 +40,33 @@ Sessions `/clear` or die mid-discussion. Previous behavior: decisions lived only
40
40
 
41
41
  Now: any `/clear` preserves everything decided so far. Worst case on interruption = last answer lost, not all answers.
42
42
 
43
+ ## Functionality Distillation
44
+
45
+ Per feature, force behavioral clarity. Surface assumptions + edge cases.
46
+
47
+ **L1 (Happy Path):** *"See first?" / "Sequence?" / "Confirms success?"*
48
+ **L2 (Rules):** *"Who can?" / "Limits?" / "Trigger type?"*
49
+ **L3 (Failures):** *"Invalid/down/cancel?" / "Retry/fail/alert?" / "Concurrent?"*
50
+ **L4 (Side Effects):** *"Else updates?" / "Notify?" / "Undo?"*
51
+ **L5 (Evolution):** *"v1 or final?" / "Essential vs nice-to-have?"*
52
+
53
+ **Listen for:** Contradictions ("Simple" + "12 states"), Vague ("Just work" → push for example), Assumed knowledge ("Like Stripe" → confirm specifics), Energy shifts (excitement/boredom = signal).
54
+
55
+ Not all 5 mechanically. 2-3 questions, deeper on uncertainty. `AskUserQuestion` for discrete; prose to explain.
56
+
57
+ Example -- L3:
58
+ ```
59
+ question: "When the enrichment API is down, what should the system do?"
60
+ header: "Failure mode"
61
+ options:
62
+ - label: "Retry with backoff (Recommended)"
63
+ description: "Queue retries at 1m/5m/30m. Adds complexity but self-heals."
64
+ - label: "Fail and alert"
65
+ description: "Mark failed, send alert. Simple but requires manual re-trigger."
66
+ - label: "Skip and continue"
67
+ description: "Process remaining items, revisit failures in next sweep."
68
+ ```
69
+
43
70
  ## Pre-Planning Discussion
44
71
 
45
72
  ### Step 0: Load Context
@@ -114,33 +141,10 @@ Open-ended via prose: *"Tried before?" / "Must-haves or must-nots?"* 1-2 at a ti
114
141
 
115
142
  ### Step 4: Functionality Distillation
116
143
 
117
- Per feature, force behavioral clarity. Surface assumptions + edge cases.
118
-
119
- **L1 (Happy Path):** *"See first?" / "Sequence?" / "Confirms success?"*
120
- **L2 (Rules):** *"Who can?" / "Limits?" / "Trigger type?"*
121
- **L3 (Failures):** *"Invalid/down/cancel?" / "Retry/fail/alert?" / "Concurrent?"*
122
- **L4 (Side Effects):** *"Else updates?" / "Notify?" / "Undo?"*
123
- **L5 (Evolution):** *"v1 or final?" / "Essential vs nice-to-have?"*
124
-
125
- **Listen for:** Contradictions ("Simple" + "12 states"), Vague ("Just work" → push for example), Assumed knowledge ("Like Stripe" → confirm specifics), Energy shifts (excitement/boredom = signal).
126
-
127
- Not all 5 mechanically. 2-3 questions, deeper on uncertainty. `AskUserQuestion` for discrete; prose to explain.
144
+ Apply Functionality Distillation (above), grounded in research findings.
128
145
 
129
146
  **After each user response:** write confirmed behavioral decisions to `context.md` immediately.
130
147
 
131
- Example -- L3:
132
- ```
133
- question: "When the enrichment API is down, what should the system do?"
134
- header: "Failure mode"
135
- options:
136
- - label: "Retry with backoff (Recommended)"
137
- description: "Queue retries at 1m/5m/30m. Adds complexity but self-heals."
138
- - label: "Fail and alert"
139
- description: "Mark failed, send alert. Simple but requires manual re-trigger."
140
- - label: "Skip and continue"
141
- description: "Process remaining items, revisit failures in next sweep."
142
- ```
143
-
144
148
  ### Step 5: Converge
145
149
 
146
150
  Summarize decided items, then confirm:
@@ -157,8 +161,6 @@ options:
157
161
  description: "Topics we haven't covered yet."
158
162
  ```
159
163
 
160
- Decisions written to `.forge/context.md` at Phase Handoff (below).
161
-
162
164
  ## Post-Planning Discussion
163
165
 
164
166
  ### Step 1: Load Context
@@ -184,7 +186,7 @@ Translate into meaning, don't recite. Example: *"Phase 2: 3 plans, 8 tasks. Plan
184
186
 
185
187
  ### Step 4: Drill Functionality
186
188
 
187
- Apply **Functionality Distillation** (Step 4 above), grounded in tasks:
189
+ Apply Functionality Distillation (above), grounded in plan tasks:
188
190
 
189
191
  - *"Notification service send failure -- retry or log?"*
190
192
  - *"Dashboard-to-API -- poll or push?"*
@@ -248,6 +250,34 @@ Re-plan? Route to `planning` with summary.
248
250
 
249
251
  After convergence:
250
252
 
253
+ ### Step A: Milestone Gate (Advisory → Tier Escalation)
254
+
255
+ If no milestone exists (advisory discussion — forge routed here without tier/milestone):
256
+
257
+ 1. **Assess decisions.** Do locked decisions require code changes?
258
+ - Schema changes, field renames, new files, API changes, multi-file edits, refactoring → **yes, changes needed**
259
+ - Documentation only, config tweaks, "no changes needed" → **no** → end. *"No code changes needed. Discussion complete."*
260
+ 2. **Detect tier from decisions scope.**
261
+ - Single file, <50 lines, trivial → **Quick**
262
+ - Multi-file, refactor, feature, service changes → **Standard**
263
+ - Major architectural, multi-subsystem, multi-phase → **Full**
264
+ 3. **Create milestone.**
265
+ - Read `.forge/state/index.yml` (create from `.forge/templates/state/index.yml` if missing)
266
+ - Next ID = max existing ID + 1 (or 1 if none)
267
+ - Create `milestone-{id}.yml` from `.forge/templates/state/milestone.yml`:
268
+ - `milestone.id` = {id}, `milestone.name` = brief summary of discussion topic
269
+ - `current.tier` = detected tier
270
+ - `current.status` = `planning` (Standard) / `architecting` (Full) / `not_started` (Quick)
271
+ - `decisions[]` = locked decisions from `context.md`
272
+ - Add entry to `index.yml`: `id`, `name`, `status: active`, `last_updated: now`
273
+ 4. **Update `context.md`** — scope decisions under `### M{id} — {name} (locked {date})`
274
+ 5. **Quick tier?** → *"Scope is Quick. `/clear` then `/forge {id}` for quick-tasking."* End.
275
+ 6. Proceed to Step B with new milestone.
276
+
277
+ If milestone exists → skip to Step B.
278
+
279
+ ### Step B: Standard Handoff
280
+
251
281
  1. **Promote decisions in `context.md`** -- Rename milestone heading from `(drafting)` → `(locked {date})`. Decisions already written progressively — just finalize:
252
282
  - Verify all confirmed decisions present under `## Locked Decisions`
253
283
  - Verify deferred items under `## Deferred Ideas`
@@ -255,6 +285,4 @@ After convergence:
255
285
  - Add any unresolved items to `## Needs Resolution`
256
286
  - If `context.md` already exists (post-planning discussion), update relevant sections + log amendments
257
287
  2. **Update state** -- `current.status` = `planning` (`architecting` for Full) in milestone yml
258
- 3. **Recommend clear:**
259
-
260
- *"Decisions written to `.forge/context.md`. State updated. `/clear` then `/forge` to continue with {planning/architecting}."*
288
+ 3. **Recommend clear:** *"State written. `/clear` then `/forge` for {planning/architecting}."*
@@ -22,9 +22,9 @@ Check state files:
22
22
  - Match IDs (exact) or names (case-insensitive substring)
23
23
  - Found → auto-select: *"Resuming {id}: [{name}] -- {current.status}, {overall_percent}%"*
24
24
  - No match → *"No match for '{arg}'. Active:"*
25
- 3. **Multiple (no arg):** Show all + status + `last_updated`. Default recent. *"{N} active. Most recent: [{name}] ({current.status}, {date}). This one, or switch?"*
25
+ 3. **Multiple (no arg):** Show active + not_started milestones with status + `last_updated`. Default most recent. After main list, show **Deferred:** section (id, name, frozen status `was: {current.status}`, defer date, reason). *"{N} active. Most recent: [{name}] ({current.status}, {date}). This one, or switch?"*
26
26
  4. **One:** Auto-select. *"Resuming: [{name}] -- {current.status}, {overall_percent}%"*
27
- 5. **None:** Init or create.
27
+ 5. **None active:** If deferred exist, mention them: *"No active milestones. {N} deferred — 'resume milestone {id}' to reactivate."* Else → init or create.
28
28
  6. Load `milestone-{id}.yml`
29
29
  7. **Route on `current.status`, NOT `overall_percent`.** Complete only at `complete`. 100% tasks ≠ done -- verifying + reviewing must run.
30
30
  8. Report + **immediately route** (Step 3). Show: `current.status`, phase labels (Executed/Verified/Pending/In progress -- **never "Complete" for unverified**), `overall_percent`. **No menus.** Position → action → invoke.
@@ -43,6 +43,60 @@ Check `desire_paths` 3+ occurrences:
43
43
 
44
44
  No `project.yml` + Standard/Full → **Step 2A**. State exists → **Step 2B**.
45
45
 
46
+ ## Step 1.5: Lifecycle Operations
47
+
48
+ Before tier detection, check if user request matches lifecycle patterns:
49
+ - "defer milestone {id}" / "defer {id}" / "pause milestone {id}" → **Defer**
50
+ - "resume milestone {id}" / "undefer {id}" / "reactivate milestone {id}" → **Resume**
51
+ - "delete milestone {id}" / "archive milestone {id}" / "remove milestone {id}" → **Delete** (see below)
52
+
53
+ No match → fall through to Step 2B (tier detection).
54
+
55
+ ### Defer Operation
56
+
57
+ 1. Validate: milestone in `index.yml`, status not `deferred`
58
+ 2. Extract reason (text after "—"/"-" or second sentence). None → ask: *"Reason for deferring?"*
59
+ 3. Update `index.yml`: `status: deferred`, `last_updated`
60
+ 4. Update `milestone-{id}.yml`:
61
+ - `lifecycle.deferred_at` = ISO 8601 now
62
+ - `lifecycle.deferred_reason` = reason
63
+ - `lifecycle.status_before_defer` = copy of `current.status`
64
+ 5. Update `roadmap.yml`: all phases belonging to this milestone → `status: deferred`
65
+ 6. Confirm: *"Deferred milestone {id}: {name}. Was {status}, frozen at {current.status}. Reason: {reason}."*
66
+
67
+ ### Resume Operation
68
+
69
+ 1. Validate: milestone in `index.yml`, status is `deferred`
70
+ 2. Update `index.yml`: `status: active`, `last_updated`
71
+ 3. Update `milestone-{id}.yml`: `lifecycle.resumed_at` = ISO 8601 now
72
+ 4. Confirm + route: *"Resumed milestone {id}: {name}. Picking up at {current.status}."*
73
+ 5. Fall through to normal routing (Step 3) — `current.status` already frozen at correct position
74
+
75
+ ### Delete (Archive) Operation
76
+
77
+ 1. Validate: milestone in `index.yml` (any status — active, deferred, complete, not_started)
78
+ 2. Build manifest — scan for associated files:
79
+ - `.forge/state/milestone-{id}.yml`
80
+ - `.forge/phases/m{id}-*/` (glob all phase dirs)
81
+ - `.forge/research/milestone-{id}.md` (if exists)
82
+ - `.forge/audits/milestone-{id}-*` (if exists)
83
+ - Note: `.forge/context.md` is shared — do NOT archive or modify. M{id} decisions stay as history.
84
+ 3. Show manifest + confirm:
85
+ *"Archiving milestone {id}: {name}\n - {list files}\n → .forge/archive/milestone-{id}/\n\nProceed?"*
86
+ 4. On confirm:
87
+ a. Create `.forge/archive/milestone-{id}/`
88
+ b. Copy `milestone-{id}.yml` → archive as `state.yml`
89
+ c. Copy phase dirs → archive `phases/`
90
+ d. Copy research file → archive `research.md` (if exists)
91
+ e. Copy audit files → archive `audits/` (if exists)
92
+ f. Remove originals after successful copy
93
+ g. Remove milestone entry from `index.yml`
94
+ h. Remove milestone + its phases from `roadmap.yml`
95
+ i. Update `index.yml` `last_updated`
96
+ 5. Confirm: *"Archived milestone {id}: {name} → .forge/archive/milestone-{id}/. Removed from active state."*
97
+
98
+ **Safety:** Copy-then-delete, not move. If copy fails, originals intact.
99
+
46
100
  ### Parent Session Model Advisory
47
101
 
48
102
  Check `models.parent_session` from `project.yml`. **Always display:** *"Session model: {current}. Project recommends: {parent_session}."*
@@ -71,6 +125,12 @@ ANY: new project, major arch change, multi-phase, multi-subsystem, days of work,
71
125
  ### Direct Utility
72
126
  "upgrade"/"update forge"/"sync forge" → `upgrading` (bypasses tiers)
73
127
 
128
+ ### Advisory (Tier Deferred)
129
+ ANY: "review"/"advise"/"assess"/"evaluate" + specific system/component/feature, scope unclear, "what do you think about"
130
+ → No `project.yml` → init first. Then `discussing` (no milestone — tier detected post-discussion).
131
+
132
+ Can't know upfront if "review X" → "it's fine" or "restructure 6 files." Discussion determines scope. Discussing skill detects tier at convergence, creates milestone if code changes needed.
133
+
74
134
  ### User Override
75
135
  "Use Quick/Standard/Full tier" → honor.
76
136
 
@@ -119,6 +179,8 @@ Subagents via `Agent` tool → same precedence, enforced via `model` param.
119
179
  | discussing | sonnet | Conversation |
120
180
  | testing | sonnet | Code gen (author) + audit judgment (analyst) — matches executing/reviewing |
121
181
 
182
+ *Model enforced only for Agent-dispatched skills (verifying, quick-tasking). Skill-routed phases are advisory — use `/model` to switch.*
183
+
122
184
  | `current.status` | Route To | Method |
123
185
  |-------------------|----------|--------|
124
186
  | `not_started` | Detect tier, start | — |
@@ -130,51 +192,83 @@ Subagents via `Agent` tool → same precedence, enforced via `model` param.
130
192
  | `verifying` | Agent-dispatched → reviewing | **Agent** |
131
193
  | `reviewing` | `Skill(reviewing)` → complete | Skill |
132
194
  | `complete` | Done. Ask what's next. | — |
195
+ | `deferred` | Milestone frozen. *"Resume milestone {id}" to reactivate.* | — |
196
+ | `quick-tasking` | Agent-dispatched (Quick tier / refactor-backlog) | **Agent** |
197
+
198
+ **Phases marked Agent MUST use `Agent()` with `model` param. Never `Skill()` — model enforcement only works through `Agent()`.**
133
199
 
134
200
  ### Agent-Dispatched Phases
135
201
 
136
- Some phases run as spawned agents instead of in-session skills. This **enforces model routing** — the `Agent` tool's `model` param guarantees the correct model runs.
202
+ Phases marked **Agent** run as spawned agents to enforce model routing. `Agent` tool's `model` param = only enforcement point.
137
203
 
138
- #### Verifying (Agent-Dispatched)
204
+ **Skill contract:** Each dispatched skill carries a guard header — if parent loads via Skill(), guard says STOP.
139
205
 
140
- When `current.status == verifying`, do NOT call `Skill(verifying)`. Instead:
206
+ **Parent protocol:**
207
+ 1. Resolve model: `models.skills.{skill}` → `models.default` → parent
208
+ 2. On return: read updated state, display *"Result: {outcome}. Model: {model} (enforced)."*, route next
141
209
 
142
- 1. Read milestone state: `.forge/state/milestone-{id}.yml`
143
- 2. Identify the plan path from state: `.forge/phases/m{M}-{N}-{name}/plan-{NN}.md`
144
- 3. Resolve model: `models.skills.verifying` → `models.default` → parent
145
- 4. Spawn agent:
210
+ **Agent prompt requirements:** `touch .forge/.active-skill` (pre-commit guard) + "Report resolved model in summary."
211
+
212
+ #### Verifying
213
+
214
+ When `current.status == verifying`:
215
+
216
+ 1. Read milestone state → identify plan path
217
+ 2. Spawn:
146
218
 
147
219
  ```
148
220
  Agent(
149
- model: "{resolved_model}",
221
+ model: "{model}",
150
222
  description: "Verify milestone {id}: {name}",
151
- prompt: "You are a verifier agent. Your job: prove completed work delivers what was promised.
223
+ prompt: "You are a verifier agent. Prove completed work delivers what was promised.
152
224
 
153
- FIRST: Run `touch .forge/.active-skill` to satisfy the pre-commit hook guard. Without this, all Write/Edit operations will be blocked.
225
+ FIRST: Run `touch .forge/.active-skill`
154
226
 
155
- Read these files for context:
156
- - .claude/skills/verifying/SKILL.md — your full process instructions
157
- - .claude/agents/verifier.md — your role, tools, output format
227
+ Read:
228
+ - .claude/skills/verifying/SKILL.md — process instructions
229
+ - .claude/agents/verifier.md — role, tools, output format
158
230
  - .forge/state/milestone-{id}.yml — current state
159
- - .forge/phases/{phase_path}/plan-{NN}.md — must_haves to verify
160
- - .forge/project.yml — tech stack, verification commands
231
+ - .forge/phases/{phase_path}/plan-{NN}.md — must_haves
232
+ - .forge/project.yml — stack, verification commands
161
233
  - .forge/context.md — locked decisions
162
- - .forge/requirements.yml — requirement IDs for coverage
234
+ - .forge/requirements.yml — requirement coverage
163
235
 
164
- Follow the 3-level verification process in verifying/SKILL.md exactly.
165
- Write verification results to the plan directory.
166
- Update milestone state: set current.status to 'reviewing' if PASSED, keep 'verifying' if GAPS FOUND.
167
- End with a verification summary for the parent session."
236
+ Follow verifying/SKILL.md 3-level process exactly.
237
+ Write results to plan directory.
238
+ Update state: 'reviewing' if PASSED, keep 'verifying' if GAPS.
239
+ Report resolved model in summary."
168
240
  )
169
241
  ```
170
242
 
171
- 5. On agent return:
172
- - Read updated `milestone-{id}.yml`
173
- - Display result: *"Verification {PASSED|GAPS FOUND}. Model: {model} (enforced)."*
174
- - PASSED → route to reviewing
175
- - GAPS FOUND route back to planning (gap-closure mode)
243
+ 3. On return: PASSED → reviewing. GAPS → planning (gap-closure).
244
+
245
+ #### Quick-Tasking
246
+
247
+ Quick-tasking runs as Agent from Quick tier or refactor-backlog. Parent constructs prompt based on milestone context:
248
+
249
+ ```
250
+ Agent(
251
+ model: "{model}",
252
+ description: "Quick fix: {description}",
253
+ prompt: "You are a quick-tasking agent. Small, scoped fix.
254
+
255
+ FIRST: Run `touch .forge/.active-skill`
256
+
257
+ Read:
258
+ - .claude/skills/quick-tasking/SKILL.md — workflow
259
+ - .forge/project.yml — stack, verification commands
260
+ [with milestone: + .forge/state/milestone-{id}.yml, .forge/context.md]
261
+
262
+ Task: {description}
263
+
264
+ Follow quick-tasking/SKILL.md workflow.
265
+ [with milestone: After commit, update milestone-{id}.yml (increment progress, log deviations).]
266
+ [without milestone: No state management.]
267
+ Report resolved model in summary."
268
+ )
269
+ ```
176
270
 
177
- - Skip before `current.status`; resume current.
271
+ On return: display result + model. With milestone → read updated state.
178
272
 
179
273
  ### Status Advancement Check
180
274
 
@@ -233,8 +327,9 @@ After clear, skills load from disk via "Read Context"/"Pre-Execution Checklist".
233
327
  ## State Transitions
234
328
 
235
329
  ```
236
- Standard: not_started → [init?] → researching → discussing → planning → executing → verifying → reviewing → complete
237
- Full: not_started → [init?] → researching → discussing → architecting → planning → executing → verifying → reviewing → complete
330
+ Standard: not_started → [init?] → researching → discussing → planning → executing → verifying → reviewing → complete
331
+ Full: not_started → [init?] → researching → discussing → architecting → planning → executing → verifying → reviewing → complete
332
+ Advisory: [init?] → discussing → [tier gate] → planning → executing → verifying → reviewing → complete
238
333
 
239
334
  Branches (any tier, on-demand): debugging (stuck) · designing (UI) · securing (auth/data/API) · testing (e2e/integration/flake)
240
335
  Phase boundaries: `[clear]` recommended between phases to reset context.
@@ -312,7 +312,7 @@ User selects per stack.
312
312
  milestones:
313
313
  - id: 1
314
314
  name: "{project name}"
315
- status: active
315
+ status: active # not_started | active | deferred | complete
316
316
  last_updated: "{date}"
317
317
  ```
318
318
  - `.forge/state/milestone-1.yml`:
@@ -3,6 +3,8 @@ name: quick-tasking
3
3
  description: "Small, scoped changes: typo fixes, config updates, minor bugs, dependency bumps, doc tweaks. Under 50 lines, 1-2 files, no architectural decisions. Quick tier — skip ceremony."
4
4
  ---
5
5
 
6
+ > **AGENT-DISPATCHED:** If reading in parent session, STOP — use Agent() via forge/SKILL.md § Agent-Dispatched Phases.
7
+
6
8
  # Quick-Tasking
7
9
 
8
10
  Small change? Skip ceremony. Do it right, do it fast.
@@ -60,6 +62,27 @@ Example: `fix(docs): correct typo in API reference`
60
62
  ### 6. Done
61
63
  No verification ceremony. Move on.
62
64
 
65
+ ## Milestone Context
66
+
67
+ Quick-tasking handles two contexts. Existing workflow steps (Identify → Validate → Execute → Test → Commit → Done) apply in both — this section adds state management around them.
68
+
69
+ ### With Milestone
70
+
71
+ Invoked via forge routing (mid-workflow or refactor-backlog item with milestone context):
72
+
73
+ 1. Read `.forge/state/milestone-{id}.yml` for current position
74
+ 2. Follow standard workflow (above)
75
+ 3. After commit: update milestone state — increment `progress.overall_percent`, log deviations if any Rule 1-3 applied
76
+ 4. Report: fix description, files changed, milestone progress update
77
+
78
+ ### Without Milestone
79
+
80
+ Standalone quick fix (no forge state exists or no milestone context provided):
81
+
82
+ 1. Follow standard workflow (above)
83
+ 2. No state reads or writes
84
+ 3. Report: fix description, files changed
85
+
63
86
  ## Scope Creep Detection
64
87
 
65
88
  During execution, if you discover:
@@ -3,6 +3,8 @@ name: verifying
3
3
  description: "Prove completed work delivers what was promised. Goal-backward verification with 3 levels: Observable Truths, Artifacts, and Key Links. Task completion ≠ goal achievement."
4
4
  ---
5
5
 
6
+ > **AGENT-DISPATCHED:** If reading in parent session, STOP — use Agent() via forge/SKILL.md § Agent-Dispatched Phases.
7
+
6
8
  # Verifying
7
9
 
8
10
  Prove completed work delivers what was promised. Task completion ≠ goal achievement.
@@ -194,8 +196,6 @@ After PASSED verdict:
194
196
 
195
197
  1. **Persist** — Confirm verification results documented, desire paths logged to `.forge/state/index.yml`
196
198
  2. **Update state** — Set `current.status` to `reviewing` in `.forge/state/milestone-{id}.yml`
197
- 3. **Recommend context clear:**
198
-
199
- *"Verification passed. State written. `/clear` then `/forge` to continue with reviewing."*
199
+ 3. **Recommend clear:** *"State written. `/clear` then `/forge` for reviewing."*
200
200
 
201
201
  If GAPS found, route back to planning in gap-closure mode. Context clear applies after re-verified PASSED verdict.
@@ -4,13 +4,16 @@
4
4
 
5
5
  roadmap:
6
6
  # Milestones group phases into concurrent work streams.
7
- # Phases keep global IDs. Milestones reference them.
7
+ # Each milestone contains its own phases numbered sequentially (1, 2, 3...).
8
8
  # Different milestones can be worked on in parallel across sessions.
9
9
  milestones:
10
10
  - id: 1
11
11
  name: "" # e.g., "MVP", "Admin Dashboard"
12
- phases: [] # List of phase IDs belonging to this milestone
12
+ phases: [] # List of phase numbers belonging to this milestone
13
13
 
14
+ # Phases are scoped within milestones. Each phase has a local number (1, 2, 3...)
15
+ # within its milestone. Directory naming: .forge/phases/m{milestone_id}-{phase_num}-{name}/
16
+ # Example: m1-1-foundation/, m1-2-auth/, m2-1-dashboard/
14
17
  phases:
15
18
  - id: 1
16
19
  name: "" # e.g., "Foundation & Architecture"
@@ -21,7 +24,7 @@ roadmap:
21
24
  - "" # e.g., "User can see the landing page"
22
25
  - "" # e.g., "API returns valid JSON for /users"
23
26
  estimated_hours: null
24
- status: pending # pending | researching | planning | executing | verifying | complete
27
+ status: pending # pending | researching | planning | executing | verifying | deferred | complete
25
28
 
26
29
  - id: 2
27
30
  name: ""
@@ -5,7 +5,7 @@
5
5
  milestones: # Active milestones and their high-level status
6
6
  - id: 1
7
7
  name: "" # Human-readable milestone name from roadmap
8
- status: not_started # not_started | active | complete
8
+ status: not_started # not_started | active | deferred | complete
9
9
  last_updated: null # ISO 8601 timestamp — used for resume default selection
10
10
 
11
11
  metrics:
@@ -46,3 +46,11 @@ deviations: # Tracked deviations during execution
46
46
  plan: null
47
47
  task: null
48
48
  resolution: ""
49
+
50
+ # Lifecycle — events separate from workflow position (current:).
51
+ # current.status stays frozen when deferred — it IS the resume point.
52
+ lifecycle:
53
+ deferred_at: null # ISO 8601 — when milestone was deferred
54
+ deferred_reason: "" # User-provided reason for deferring
55
+ status_before_defer: null # Workflow status when deferred (mirrors frozen current.status)
56
+ resumed_at: null # ISO 8601 — when milestone was resumed
@@ -36,6 +36,10 @@ Auto-detects complexity. Override: "Use Quick/Standard/Full tier."
36
36
  **Flow:** `researching` → `discussing` → `architecting` → `planning` → `executing` → `verifying` → `reviewing` → done
37
37
  **Optional:** `designing` (UI), `securing` (auth/data/API), `debugging` (stuck), `testing` (e2e/integration/flake)
38
38
 
39
+ ### Advisory (tier deferred)
40
+ **Triggers:** "review"/"advise"/"assess"/"evaluate" + specific system/component, scope unclear upfront
41
+ **Flow:** `discussing` → [tier gate detects scope] → `planning` → `executing` → `verifying` → `reviewing` → done
42
+
39
43
  ## Skill Routing
40
44
 
41
45
  | Need to... | Skill | Tier |
@@ -130,8 +134,10 @@ State lives in `.forge/`:
130
134
  - `research/milestone-{id}.md` — Research findings snapshot (dated, immutable)
131
135
  - `phases/m{M}-{N}-{name}/plan-{NN}.md` — Task plans with must_haves frontmatter
132
136
  - `refactor-backlog.yml` — Refactoring catalog, worked via quick-tasking
137
+ - `archive/milestone-{id}/` — Archived milestone artifacts (archive-delete)
133
138
 
134
- **Milestones** group phases into concurrent streams. Own state file — no conflicts across sessions.
139
+ **Milestones** group phases into concurrent streams. Own state file — no conflicts across sessions. Can be deferred (frozen in place) or archive-deleted.
140
+ `index.yml status` gates routing: `not_started | active | deferred | complete`.
135
141
  **Format**: YAML for machine state, Markdown for human content.
136
142
  **`current.status` is authoritative.** Complete only at `current.status == complete`. 100% tasks ≠ done — still needs verifying + reviewing.
137
143