forge-orkes 0.3.3 → 0.3.5

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.3",
3
+ "version": "0.3.5",
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`
@@ -42,22 +42,63 @@ After 3 auto-fix attempts on a single task → STOP fixing. Document remaining i
42
42
  ### Scope Boundary
43
43
  Only fix issues DIRECTLY caused by the current task. Pre-existing warnings, tech debt, unrelated bugs → log to `.forge/deferred-issues.md`, don't fix.
44
44
 
45
+ ## Native Task Tracking (Hybrid Approach)
46
+
47
+ Use Claude Code's native task tools (`TaskCreate`, `TaskUpdate`, `TaskList`) for **in-session visibility** during execution. The `.forge/state/milestone-{id}.yml` remains the **cross-session source of truth** — native tasks are a UI layer on top.
48
+
49
+ ### On Plan Start
50
+
51
+ After loading the plan file, create native tasks from the XML task blocks:
52
+
53
+ 1. Parse all `<task>` XML blocks from the plan
54
+ 2. For each task, call `TaskCreate`:
55
+ - `subject`: The task's `<name>` value
56
+ - `description`: Combine `<action>`, `<verify>`, and `<done>` fields
57
+ - `activeForm`: Present-continuous form of the task name (e.g., "Implementing login form")
58
+ 3. If the plan has ordered tasks (task 2 depends on task 1), set dependencies via `TaskUpdate` with `addBlockedBy`
59
+ 4. Store the mapping: native task ID → plan task number (track mentally or in first task's metadata)
60
+
61
+ ### On Task Start
62
+
63
+ Before implementing each task:
64
+ 1. Call `TaskUpdate` with `status: "in_progress"` on the current native task
65
+ 2. This gives the user a visible spinner with the `activeForm` text
66
+
67
+ ### On Task Complete
68
+
69
+ After each task's commit:
70
+ 1. Call `TaskUpdate` with `status: "completed"` on the finished native task
71
+ 2. The next task automatically becomes unblocked (if dependencies were set)
72
+
73
+ ### On Plan Complete
74
+
75
+ Native tasks are session-scoped — they disappear on `/clear` or session end. No cleanup needed. The authoritative state has already been written to `.forge/state/milestone-{id}.yml`.
76
+
77
+ ### When NOT to Create Native Tasks
78
+
79
+ - **Spawned fresh agents**: Subagents don't share the parent's task list. The parent agent creates the native tasks; the subagent just does the work.
80
+ - **Single-task plans**: If the plan has only 1 task, skip native task creation — the overhead isn't worth it.
81
+
82
+ ---
83
+
45
84
  ## Task Execution Flow
46
85
 
47
86
  For each task in the plan:
48
87
 
49
88
  1. **Read** the task XML (name, files, action, verify, done)
50
- 2. **Check** context.md does this task touch a locked decision? Honor it exactly.
51
- 3. **Implement** following the action instructions
52
- 4. **Verify** using the verify step (run tests, inspect output)
53
- 5. **Confirm** done criteria are met
54
- 6. **Commit** atomically
89
+ 2. **Mark in-progress** — `TaskUpdate` the native task to `in_progress`
90
+ 3. **Check** context.md does this task touch a locked decision? Honor it exactly.
91
+ 4. **Implement** following the action instructions
92
+ 5. **Verify** using the verify step (run tests, inspect output)
93
+ 6. **Confirm** done criteria are met
94
+ 7. **Commit** atomically
95
+ 8. **Mark complete** — `TaskUpdate` the native task to `completed`
55
96
 
56
97
  ## TDD Flow (When task type="tdd")
57
98
 
58
99
  ### With Test Spec (from planning Step 7)
59
100
  When the task has a `<spec>` field, test specs already exist:
60
- 1. **Copy spec to test location:** Move from `.forge/phases/` to the project's test directory
101
+ 1. **Copy spec to test location:** Move from `.forge/phases/m{M}-{N}-{name}/specs/` to the project's test directory
61
102
  2. **RED:** Remove `skip` markers from the first test. Confirm it fails. Commit: `test({scope}): activate spec tests for {feature}`
62
103
  3. **GREEN:** Write minimal code to make it pass. Repeat for each test in the spec.
63
104
  4. **REFACTOR:** Clean up. Commit: `feat({scope}): implement {feature}`
@@ -112,7 +153,7 @@ After each task, mentally assess context usage:
112
153
  After completing all tasks in a plan, create a summary:
113
154
 
114
155
  ```markdown
115
- # Execution Summary: Phase {N}, Plan {NN}
156
+ # Execution Summary: m{M}-{N}-{name}, Plan {NN}
116
157
 
117
158
  ## Completed Tasks
118
159
  1. [Task name] — [one-line result]
@@ -498,22 +498,24 @@ If user explicitly says "Use Quick/Standard/Full tier" — honor it. No argument
498
498
 
499
499
  ## Step 3: Route to Next Skill
500
500
 
501
- Based on detected tier and current state, tell the user which skill comes next and invoke it.
501
+ Based on detected tier and current state, tell the user which skill comes next and **invoke it using the `Skill` tool**.
502
+
503
+ **CRITICAL: NEVER use `EnterPlanMode` or Claude Code's native plan mode.** All Forge phases are handled by Forge skills invoked via the `Skill` tool. When the workflow says "planning", that means invoke `Skill(planning)` — not enter native plan mode. Native plan mode writes to a different file format and bypasses Forge's constitutional gates, state management, and structured plan output.
502
504
 
503
505
  If resuming mid-workflow:
504
506
  - Read the selected milestone's state file (`.forge/state/milestone-{id}.yml`) for current position
505
507
  - **Use `current.status` to determine the next skill** — this is the authoritative workflow position:
506
508
 
507
- | `current.status` | Next Action |
509
+ | `current.status` | Next Action (invoke via `Skill` tool) |
508
510
  |-------------------|-------------|
509
511
  | `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` |
512
+ | `researching` | Invoke `Skill(researching)`, then → `discussing` |
513
+ | `discussing` | Invoke `Skill(discussing)`, then → `planning` (or `architecting` for Full) |
514
+ | `planning` | Invoke `Skill(planning)`, then → `executing` |
515
+ | `executing` | Invoke `Skill(executing)`, then → `verifying` |
516
+ | `verifying` | Invoke `Skill(verifying)`, then → `auditing` |
517
+ | `auditing` | Invoke `Skill(auditing)`, then → `refactoring` |
518
+ | `refactoring` | Invoke `Skill(refactoring)`, then → `complete` |
517
519
  | `complete` | Milestone is done. Ask user what's next. |
518
520
 
519
521
  - **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.
@@ -581,7 +583,7 @@ Each skill ends with a standard handoff message. The pattern is:
581
583
  | researching | Research summary (markdown in conversation or `.forge/` files) | discussing reads research findings |
582
584
  | discussing | Decision summary → carried into planning via context.md | planning reads context.md |
583
585
  | architecting | ADRs in `.forge/decisions/`, data models, API contracts | planning reads decisions |
584
- | planning | Plans in `.forge/phases/`, requirements.yml, roadmap.yml, context.md | executing reads plans |
586
+ | planning | Plans in `.forge/phases/m{M}-{N}-{name}/`, requirements.yml, roadmap.yml, context.md | executing reads plans |
585
587
  | executing | Committed code, execution summary, milestone state updated | verifying reads must_haves from plans |
586
588
  | verifying | Verification report, desire paths updated | auditing reads project.yml + source files |
587
589
  | auditing | Health report in `.forge/audits/` | refactoring reads health report + git diff |
@@ -7,6 +7,8 @@ description: "Use when you need to break work into executable tasks with verific
7
7
 
8
8
  Turn research and requirements into executable, verifiable plans.
9
9
 
10
+ > **IMPORTANT:** This skill replaces Claude Code's native plan mode. Do NOT use `EnterPlanMode` — all planning output goes to `.forge/phases/` as structured plan files, not to the native plan file. Follow the steps below directly in the conversation.
11
+
10
12
  ## Step 1: Resolution Gate
11
13
 
12
14
  Read `.forge/context.md`. Check the **Needs Resolution** section.
@@ -77,7 +79,12 @@ If `.forge/roadmap.yml` doesn't exist (Full tier only):
77
79
 
78
80
  For each phase (or the single feature in Standard tier):
79
81
 
80
- 1. Copy `.forge/templates/plan.md` → `.forge/phases/{N}-{name}/plan-{NN}.md`
82
+ 1. Copy `.forge/templates/plan.md` → `.forge/phases/m{M}-{N}-{name}/plan-{NN}.md`
83
+ - **`{M}`** = milestone ID from `roadmap.yml` (e.g., `1`, `2`, `24`)
84
+ - **`{N}`** = phase number within the milestone (sequential: `1`, `2`, `3`...)
85
+ - **`{name}`** = phase `name` from `roadmap.yml` in kebab-case
86
+ - **`{NN}`** = plan sequence within the phase (`01`, `02`, etc.)
87
+ - Example: `.forge/phases/m3-2-providers/plan-01.md` = milestone 3, phase 2, plan 01
81
88
  2. Fill in frontmatter (phase, plan number, wave, dependencies)
82
89
  3. Create goal-backward must_haves:
83
90
  - **Truths:** Observable from user perspective when done (3-7)
@@ -142,7 +149,7 @@ If no testable contracts are found, skip to Step 8.
142
149
 
143
150
  For each testable contract, create a test spec file alongside the plan:
144
151
 
145
- **Location:** `.forge/phases/{N}-{name}/specs/`
152
+ **Location:** `.forge/phases/m{M}-{N}-{name}/specs/`
146
153
 
147
154
  **Format:** Language-appropriate test files (e.g., `.test.ts`, `_test.go`, `test_*.py`) that:
148
155
 
@@ -155,7 +162,7 @@ For each testable contract, create a test spec file alongside the plan:
155
162
  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
163
 
157
164
  ```typescript
158
- // Example: .forge/phases/1-auth/specs/login-endpoint.test.ts
165
+ // Example: .forge/phases/m1-1-auth/specs/login-endpoint.test.ts
159
166
  describe('POST /api/auth/login', () => {
160
167
  it.skip('returns 200 with valid token for correct credentials', () => {
161
168
  // From FR-001: "User can log in with email and password"
@@ -183,7 +190,7 @@ For tasks with generated test specs, update the task XML to reference the spec:
183
190
  <task type="tdd">
184
191
  <name>Implement login endpoint</name>
185
192
  <files>src/api/auth/login.ts</files>
186
- <spec>.forge/phases/1-auth/specs/login-endpoint.test.ts</spec>
193
+ <spec>.forge/phases/m1-1-auth/specs/login-endpoint.test.ts</spec>
187
194
  <action>Make all tests in the spec file pass. Remove skip markers as you implement.</action>
188
195
  <verify>All spec tests pass: npm test -- login-endpoint</verify>
189
196
  <done>All skip markers removed, all tests green</done>
@@ -228,7 +235,7 @@ Planning is complete when user approves.
228
235
 
229
236
  After the user approves the plan:
230
237
 
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`
238
+ 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
239
  2. **Update state** — Set `current.status` to `executing` in `.forge/state/milestone-{id}.yml`
233
240
  3. **Recommend context clear:**
234
241
 
@@ -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
 
@@ -2,10 +2,16 @@
2
2
 
3
3
  A lean meta-prompting framework for Claude Code. Synthesizes context engineering (GSD) and constitutional governance (Spec-Kit) on Claude Code's native primitives.
4
4
 
5
+ ## Critical: No Native Plan Mode
6
+
7
+ **NEVER use the `EnterPlanMode` tool when the Forge framework is active** (i.e., when `.forge/` exists or a Forge skill is running). Forge has its own `planning` skill that writes structured plans to `.forge/phases/`. Claude Code's native plan mode writes to a separate plan file with a different format — this conflicts with Forge's workflow and state management.
8
+
9
+ When the workflow reaches the planning phase, **invoke the `planning` skill using the `Skill` tool** — do not enter native plan mode. This applies to all tiers (Standard and Full). The same rule applies to all other Forge phases: always invoke the corresponding Forge skill, never substitute a native Claude Code behavior.
10
+
5
11
  ## Core Principles
6
12
 
7
13
  1. **Lean by default, powerful when needed.** Quick fixes skip ceremony. Complex features get full governance. The framework adapts — you don't.
8
- 2. **Native-first.** Skills, agents, hooks, plugins — use Claude Code's built-in systems. No custom JavaScript, no reinvented orchestration.
14
+ 2. **Native-first.** Skills, agents, hooks, plugins — use Claude Code's built-in systems. No custom JavaScript, no reinvented orchestration. Periodically audit Forge features against Claude Code's current native capabilities — if a native tool now handles what a Forge feature does, deprecate the Forge version. Use native tools for session-scoped concerns (task UI, exploration) and Forge state for cross-session persistence. When in doubt, prefer native.
9
15
  3. **Context is sacred.** Every token earns its place. Size-gate all artifacts, lazy-load skills, spawn fresh agents for isolated work.
10
16
  4. **Decisions are contracts.** User decisions lock before building begins. Downstream agents honor contracts or flag violations — never silently override.
11
17
  5. **Verify against goals, not tasks.** "Does it work?" beats "Did we complete the checklist?" Goal-backward verification at every tier.