forge-orkes 0.3.2 → 0.3.4

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.3.2",
3
+ "version": "0.3.4",
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"
@@ -22,7 +22,7 @@ Execute plan tasks precisely. You have full development tool access but operate
22
22
 
23
23
  ## Upstream Input
24
24
 
25
- - Plan from Planner agent: `.forge/phases/{N}-{name}/plan.md`
25
+ - Plan from Planner agent: `.forge/phases/m{M}-{N}-{name}/plan.md`
26
26
  - Context: `.forge/context.md` (locked decisions, deferred ideas)
27
27
  - State: `.forge/state/milestone-{id}.yml` (current position for active milestone)
28
28
 
@@ -74,7 +74,7 @@ Need to deviate from plan?
74
74
 
75
75
  ### 1. Read the Plan
76
76
  ```
77
- Read: .forge/phases/{N}-{name}/plan.md
77
+ Read: .forge/phases/m{M}-{N}-{name}/plan.md
78
78
  Read: .forge/context.md
79
79
  Read: .forge/state/milestone-{id}.yml
80
80
  ```
@@ -28,9 +28,9 @@ Transform research findings into actionable, verified plans. Ensure every plan p
28
28
  ## Downstream Output
29
29
 
30
30
  Files created/updated in `.forge/`:
31
- - `phases/{N}-{name}/plan.md` — Task plan with XML tasks
32
- - `phases/{N}-{name}/specs/` — Test spec files (when Step 7 is invoked)
33
- - `phases/{N}-{name}/requirements.yml` — Structured requirements
31
+ - `phases/m{M}-{N}-{name}/plan.md` — Task plan with XML tasks
32
+ - `phases/m{M}-{N}-{name}/specs/` — Test spec files (when Step 7 is invoked)
33
+ - `phases/m{M}-{N}-{name}/requirements.yml` — Structured requirements
34
34
  - `context.md` — Locked decisions and deferred ideas
35
35
  - `state/milestone-{id}.yml` — Updated with current phase/plan
36
36
 
@@ -20,7 +20,7 @@ Perform goal-backward verification: start from what was promised (must_haves), w
20
20
 
21
21
  ## Upstream Input
22
22
 
23
- - Plan with must_haves: `.forge/phases/{N}-{name}/plan.md`
23
+ - Plan with must_haves: `.forge/phases/m{M}-{N}-{name}/plan.md`
24
24
  - Execution summary from Executor
25
25
  - Source code (read-only inspection)
26
26
  - Milestone state file (what was completed, any deviations)
@@ -78,7 +78,7 @@ Verification report:
78
78
 
79
79
  ### 1. Load Verification Criteria
80
80
  ```
81
- Read: .forge/phases/{N}-{name}/plan.md → extract must_haves
81
+ Read: .forge/phases/m{M}-{N}-{name}/plan.md → extract must_haves
82
82
  Read: .forge/state/milestone-{id}.yml → check reported progress
83
83
  Read: .forge/context.md → know locked decisions
84
84
  ```
@@ -161,7 +161,7 @@ Check for common issues the Executor might have left:
161
161
 
162
162
  ### 7. Requirements Coverage
163
163
 
164
- Cross-reference requirements from `.forge/phases/{N}-{name}/requirements.yml`:
164
+ Cross-reference requirements from `.forge/phases/m{M}-{N}-{name}/requirements.yml`:
165
165
  - Every `must-have` requirement should have corresponding implemented code
166
166
  - Every acceptance criterion should be testable
167
167
  - Flag any requirements with no corresponding implementation
@@ -97,7 +97,7 @@ When designing data models:
97
97
  4. Consider indexing needs (what will be queried frequently?)
98
98
  5. Plan for evolution (what might change? Use nullable fields over rigid schemas)
99
99
 
100
- Document in `.forge/phases/{N}-{name}/data-model.md`.
100
+ Document in `.forge/phases/m{M}-{N}-{name}/data-model.md`.
101
101
 
102
102
  ## API Contract Design
103
103
 
@@ -109,7 +109,7 @@ When designing APIs:
109
109
  4. Consider pagination for list endpoints
110
110
  5. Plan authentication requirements per endpoint
111
111
 
112
- Document in `.forge/phases/{N}-{name}/contracts/`.
112
+ Document in `.forge/phases/m{M}-{N}-{name}/contracts/`.
113
113
 
114
114
  ## Output
115
115
 
@@ -124,7 +124,7 @@ After completing architectural work:
124
124
 
125
125
  After architectural decisions are documented:
126
126
 
127
- 1. **Verify persistence** — Confirm ADRs are written to `.forge/decisions/`, data models and API contracts to `.forge/phases/{N}-{name}/`
127
+ 1. **Verify persistence** — Confirm ADRs are written to `.forge/decisions/`, data models and API contracts to `.forge/phases/m{M}-{N}-{name}/`
128
128
  2. **Update state** — Set `current.status` to `planning` in `.forge/state/milestone-{id}.yml`
129
129
  3. **Recommend context clear:**
130
130
 
@@ -224,7 +224,7 @@ When invoked on an existing phase or plan:
224
224
  ### Step 1: Load Context
225
225
 
226
226
  Read the relevant files:
227
- - The plan being discussed (`.forge/phases/{N}-{name}/plan-{NN}.md`)
227
+ - The plan being discussed (`.forge/phases/m{M}-{N}-{name}/plan-{NN}.md`)
228
228
  - Requirements it's based on (`.forge/requirements.yml`)
229
229
  - Locked decisions (`.forge/context.md`)
230
230
  - Constitution (`.forge/constitution.md`)
@@ -10,7 +10,7 @@ Build to plan with atomic commits, smart deviation handling, and context enginee
10
10
  ## Pre-Execution Checklist
11
11
 
12
12
  Before writing any code:
13
- - [ ] Plan exists (`.forge/phases/{N}-{name}/plan-{NN}.md`)
13
+ - [ ] Plan exists (`.forge/phases/m{M}-{N}-{name}/plan-{NN}.md`)
14
14
  - [ ] Context.md reviewed (locked decisions noted)
15
15
  - [ ] Constitution.md gates satisfied (from planning phase)
16
16
  - [ ] Current milestone state (`.forge/state/milestone-{id}.yml`) updated to `status: executing`
@@ -18,16 +18,22 @@ Check for state files in this order:
18
18
 
19
19
  **When milestone-aware state exists (`state/index.yml`):**
20
20
  1. Read `.forge/state/index.yml` to get the list of active milestones
21
- 2. **If multiple active milestones:**
22
- - Present all milestones with their progress and `last_updated` timestamp
21
+ 2. **Check for milestone argument first.** If the user invoked `/forge` with an argument (e.g., `/forge 2`, `/forge "Auth system"`):
22
+ - Match the argument against milestone IDs (exact number match) or milestone names (case-insensitive substring match)
23
+ - If a match is found → auto-select it immediately, skip the confirmation prompt: *"Resuming milestone {id}: [{name}] — status: {current.status}, tasks: {overall_percent}%"*
24
+ - If no match → warn and fall through to the interactive prompt: *"No milestone matching '{arg}' found. Here are your active milestones:"*
25
+ 3. **If multiple active milestones (and no argument provided):**
26
+ - Present all milestones with their status and `last_updated` timestamp
23
27
  - Default to the most recently updated milestone
24
- - Ask user to confirm or switch: *"You have {N} active milestones. Most recent: [{name}] ({progress}%, last touched {date}). Work on this one, or switch?"*
25
- 3. **If one milestone:** Auto-select it. Inform user: *"Resuming milestone: [{name}] ({progress}%)"*
26
- 4. **If no active milestones:** Proceed to init or ask user to create one.
27
- 5. Load the selected milestone's state file (`.forge/state/milestone-{id}.yml`)
28
- 6. Report position from the milestone-specific state:
28
+ - Ask user to confirm or switch: *"You have {N} active milestones. Most recent: [{name}] (status: {current.status}, last touched {date}). Work on this one, or switch?"*
29
+ 4. **If one milestone:** Auto-select it. Inform user: *"Resuming milestone: [{name}] — status: {current.status}, tasks: {overall_percent}%"*
30
+ 5. **If no active milestones:** Proceed to init or ask user to create one.
31
+ 6. Load the selected milestone's state file (`.forge/state/milestone-{id}.yml`)
32
+ 7. **Route based on `current.status`, NOT on `overall_percent`.** The `current.status` field is the authoritative workflow position. A milestone is only complete when `current.status` equals `complete`. Even if `overall_percent` is 100%, the milestone still needs to go through any remaining workflow steps (verifying, auditing, refactoring) before it is truly done.
33
+ 8. Report position from the milestone-specific state:
34
+ - **Workflow status** (`current.status`) — this is the primary indicator of where you are
29
35
  - Current phase, plan, task
30
- - Progress percentage
36
+ - Task progress percentage (`overall_percent`) — this measures task completion, not workflow completion
31
37
  - Active blockers
32
38
  - Recent decisions
33
39
 
@@ -496,7 +502,22 @@ Based on detected tier and current state, tell the user which skill comes next a
496
502
 
497
503
  If resuming mid-workflow:
498
504
  - Read the selected milestone's state file (`.forge/state/milestone-{id}.yml`) for current position
499
- - Skip completed phases
505
+ - **Use `current.status` to determine the next skill** — this is the authoritative workflow position:
506
+
507
+ | `current.status` | Next Action |
508
+ |-------------------|-------------|
509
+ | `not_started` | Detect tier, start workflow |
510
+ | `researching` | Resume or complete `researching`, then → `discussing` |
511
+ | `discussing` | Resume or complete `discussing`, then → `planning` (or `architecting` for Full) |
512
+ | `planning` | Resume or complete `planning`, then → `executing` |
513
+ | `executing` | Resume or complete `executing`, then → `verifying` |
514
+ | `verifying` | Resume or complete `verifying`, then → `auditing` |
515
+ | `auditing` | Resume or complete `auditing`, then → `refactoring` |
516
+ | `refactoring` | Resume or complete `refactoring`, then → `complete` |
517
+ | `complete` | Milestone is done. Ask user what's next. |
518
+
519
+ - **Never treat a milestone as complete just because `overall_percent` is 100%.** Task completion and workflow completion are different. All planned tasks being done (100%) means execution is finished — verification, auditing, and refactoring still need to run.
520
+ - Skip completed phases (phases before `current.status`)
500
521
  - Resume from current phase
501
522
 
502
523
  ### On-Demand Discussion
@@ -77,7 +77,12 @@ If `.forge/roadmap.yml` doesn't exist (Full tier only):
77
77
 
78
78
  For each phase (or the single feature in Standard tier):
79
79
 
80
- 1. Copy `.forge/templates/plan.md` → `.forge/phases/{N}-{name}/plan-{NN}.md`
80
+ 1. Copy `.forge/templates/plan.md` → `.forge/phases/m{M}-{N}-{name}/plan-{NN}.md`
81
+ - **`{M}`** = milestone ID from `roadmap.yml` (e.g., `1`, `2`, `24`)
82
+ - **`{N}`** = phase number within the milestone (sequential: `1`, `2`, `3`...)
83
+ - **`{name}`** = phase `name` from `roadmap.yml` in kebab-case
84
+ - **`{NN}`** = plan sequence within the phase (`01`, `02`, etc.)
85
+ - Example: `.forge/phases/m3-2-providers/plan-01.md` = milestone 3, phase 2, plan 01
81
86
  2. Fill in frontmatter (phase, plan number, wave, dependencies)
82
87
  3. Create goal-backward must_haves:
83
88
  - **Truths:** Observable from user perspective when done (3-7)
@@ -142,7 +147,7 @@ If no testable contracts are found, skip to Step 8.
142
147
 
143
148
  For each testable contract, create a test spec file alongside the plan:
144
149
 
145
- **Location:** `.forge/phases/{N}-{name}/specs/`
150
+ **Location:** `.forge/phases/m{M}-{N}-{name}/specs/`
146
151
 
147
152
  **Format:** Language-appropriate test files (e.g., `.test.ts`, `_test.go`, `test_*.py`) that:
148
153
 
@@ -155,7 +160,7 @@ For each testable contract, create a test spec file alongside the plan:
155
160
  4. **Mark as pending/skipped** — tests should be valid syntax but marked to skip (e.g., `it.skip()`, `@pytest.mark.skip`, `t.Skip()`) so they don't break CI before implementation
156
161
 
157
162
  ```typescript
158
- // Example: .forge/phases/1-auth/specs/login-endpoint.test.ts
163
+ // Example: .forge/phases/m1-1-auth/specs/login-endpoint.test.ts
159
164
  describe('POST /api/auth/login', () => {
160
165
  it.skip('returns 200 with valid token for correct credentials', () => {
161
166
  // From FR-001: "User can log in with email and password"
@@ -183,7 +188,7 @@ For tasks with generated test specs, update the task XML to reference the spec:
183
188
  <task type="tdd">
184
189
  <name>Implement login endpoint</name>
185
190
  <files>src/api/auth/login.ts</files>
186
- <spec>.forge/phases/1-auth/specs/login-endpoint.test.ts</spec>
191
+ <spec>.forge/phases/m1-1-auth/specs/login-endpoint.test.ts</spec>
187
192
  <action>Make all tests in the spec file pass. Remove skip markers as you implement.</action>
188
193
  <verify>All spec tests pass: npm test -- login-endpoint</verify>
189
194
  <done>All skip markers removed, all tests green</done>
@@ -228,7 +233,7 @@ Planning is complete when user approves.
228
233
 
229
234
  After the user approves the plan:
230
235
 
231
- 1. **Verify persistence** — Confirm all plans are written to `.forge/phases/{N}-{name}/plan-{NN}.md`, requirements to `.forge/requirements.yml`, roadmap to `.forge/roadmap.yml`, and context to `.forge/context.md`
236
+ 1. **Verify persistence** — Confirm all plans are written to `.forge/phases/m{M}-{N}-{name}/plan-{NN}.md`, requirements to `.forge/requirements.yml`, roadmap to `.forge/roadmap.yml`, and context to `.forge/context.md`
232
237
  2. **Update state** — Set `current.status` to `executing` in `.forge/state/milestone-{id}.yml`
233
238
  3. **Recommend context clear:**
234
239
 
@@ -19,7 +19,7 @@ When entering with a fresh context (after `/clear`):
19
19
  ```
20
20
  Read: .forge/state/milestone-{id}.yml → current phase, plans completed
21
21
  Read: .forge/project.yml → tech stack (for running tests)
22
- Read: .forge/phases/{N}-{name}/plan-{NN}.md → must_haves (truths, artifacts, key_links)
22
+ Read: .forge/phases/m{M}-{N}-{name}/plan-{NN}.md → must_haves (truths, artifacts, key_links)
23
23
  Read: .forge/context.md → locked decisions (to understand intent)
24
24
  Read: .forge/requirements.yml → requirement IDs for coverage check
25
25
  ```
@@ -1,6 +1,6 @@
1
1
  # Phase Plan Template
2
2
 
3
- Copy to `.forge/phases/{N}-{name}/plan-{NN}.md` for each plan in a phase.
3
+ Copy to `.forge/phases/m{M}-{N}-{name}/plan-{NN}.md` for each plan in a phase.
4
4
 
5
5
  ---
6
6
 
@@ -16,11 +16,16 @@ current:
16
16
  status: not_started # not_started | researching | discussing | planning | executing | verifying | auditing | refactoring | complete
17
17
 
18
18
  progress:
19
- phases_complete: 0
20
- phases_total: 0
21
- current_phase_percent: 0
22
- overall_percent: 0
19
+ phases_complete: 0 # Number of roadmap phases with all tasks done
20
+ phases_total: 0 # Total roadmap phases in this milestone
21
+ current_phase_percent: 0 # Task completion % within the current phase (0-100)
22
+ overall_percent: 0 # Task completion % across all phases (0-100)
23
23
  last_update: null # ISO 8601 timestamp
24
+ # NOTE: overall_percent measures TASK completion, not WORKFLOW completion.
25
+ # A milestone with 100% tasks done still needs verifying, auditing, and refactoring.
26
+ # The authoritative workflow position is current.status — not this percentage.
27
+ # Agents: do NOT set overall_percent above 100 or use it to determine if a milestone is "done".
28
+ # A milestone is only done when current.status == "complete".
24
29
 
25
30
  decisions: # Locked decisions (synced from context.md)
26
31
  - decision: ""
@@ -124,6 +124,9 @@ Milestones group phases into concurrent work streams. Each milestone has its own
124
124
  ### Machine-Readable State
125
125
  YAML for anything agents parse programmatically (project, requirements, roadmap, state). Markdown for human-facing content (constitution, context, verification reports). Never free-form prose for machine state.
126
126
 
127
+ ### Milestone Completion: Status vs. Percentage
128
+ **`current.status` is the authoritative workflow position.** A milestone is only complete when `current.status == complete`. The `progress.overall_percent` field measures task completion — not workflow completion. A milestone at 100% task completion still needs verifying, auditing, and refactoring before it is done. On resume, always check and display `current.status` to determine next steps.
129
+
127
130
  ## Deviation Rules (Executor Decision Tree)
128
131
 
129
132
  When the executor encounters issues during building: