@polymorphism-tech/morph-spec 7.3.0 → 7.5.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 (61) hide show
  1. package/CLAUDE.md +1 -1
  2. package/README.md +2 -2
  3. package/bin/morph-spec.js +22 -2
  4. package/claude-plugin.json +1 -1
  5. package/docs/CHEATSHEET.md +1 -1
  6. package/docs/QUICKSTART.md +1 -1
  7. package/framework/CLAUDE.md +10 -5
  8. package/framework/MORPH.md +31 -14
  9. package/framework/agents.json +132 -132
  10. package/framework/commands/create-umbraco-lp.md +35 -0
  11. package/framework/commands/migrate-lp-to-umbraco.md +33 -0
  12. package/framework/commands/morph-archive.md +17 -27
  13. package/framework/evals/rubrics/README.md +9 -8
  14. package/framework/hooks/README.md +2 -0
  15. package/framework/hooks/claude-code/core/enforce-phase-writes.js +115 -90
  16. package/framework/hooks/claude-code/core/gate-guard.js +160 -0
  17. package/framework/hooks/claude-code/core/protect-spec-files.js +32 -30
  18. package/framework/hooks/claude-code/core/state-sync.js +16 -36
  19. package/framework/hooks/claude-code/core/validate-completion.js +105 -0
  20. package/framework/hooks/shared/state-reader.js +302 -221
  21. package/framework/hooks/shared/state-writer.js +124 -0
  22. package/framework/rules/morph-task-tracking.md +69 -49
  23. package/framework/rules/morph-workflow.md +192 -191
  24. package/framework/skills/README.md +1 -1
  25. package/framework/skills/core/create-umbraco-lp/SKILL.md +252 -0
  26. package/framework/skills/core/migrate-lp-to-umbraco/SKILL.md +452 -0
  27. package/framework/skills/core/morph-apply/SKILL.md +69 -27
  28. package/framework/skills/core/morph-brainstorming/SKILL.md +6 -2
  29. package/framework/skills/core/morph-eval/SKILL.md +4 -5
  30. package/framework/skills/core/morph-implement/SKILL.md +51 -22
  31. package/framework/skills/core/morph-plan/SKILL.md +10 -4
  32. package/framework/skills/core/morph-proposal/SKILL.md +8 -7
  33. package/framework/skills/core/morph-review/SKILL.md +15 -8
  34. package/framework/skills/core/morph-stack-scan/SKILL.md +1 -1
  35. package/framework/skills/core/morph-standards/SKILL.md +1 -1
  36. package/framework/standards/ai-agents/setup.md +258 -244
  37. package/framework/templates/REGISTRY.json +1 -3
  38. package/framework/templates/context/CONTEXT-FEATURE.md +10 -17
  39. package/framework/templates/context/CONTEXT.md +181 -180
  40. package/framework/templates/docs/onboarding.md +122 -118
  41. package/framework/templates/docs/proposal.md +10 -0
  42. package/framework/templates/docs/spec.md +228 -228
  43. package/framework/templates/meta-prompts/parallel-workers/parallel-worker.md +80 -80
  44. package/framework/templates/meta-prompts/squad-leaders/backend-squad.md +90 -89
  45. package/framework/templates/meta-prompts/squad-leaders/frontend-squad.md +2 -1
  46. package/framework/templates/meta-prompts/squad-leaders/squad-leader.md +44 -43
  47. package/framework/templates/meta-prompts/validators/checkpoint-validator.md +107 -107
  48. package/package.json +1 -1
  49. package/src/commands/project/init.js +517 -515
  50. package/src/commands/project/update.js +415 -368
  51. package/src/commands/project/worktree.js +212 -210
  52. package/src/commands/state/advance.js +82 -0
  53. package/src/commands/state/approve.js +251 -213
  54. package/src/commands/state/archive.js +111 -0
  55. package/src/commands/validation/validate-feature.js +244 -79
  56. package/src/core/state/state-manager.js +256 -74
  57. package/src/dashboard/scanner/state-scanner.js +35 -8
  58. package/src/lib/generators/context-generator.js +12 -8
  59. package/src/lib/risk-detector.js +2 -2
  60. package/src/utils/file-copier.js +7 -0
  61. package/src/utils/hooks-installer.js +527 -516
@@ -1,49 +1,69 @@
1
- ---
2
- stacks:
3
- - "*"
4
- ---
5
-
6
- # MORPH-SPEC Task Tracking
7
-
8
- > Session tasks are MANDATORY in every MORPH-SPEC phase. They track real progress and must be
9
- > created BEFORE any phase work begins.
10
-
11
- ## Rules
12
-
13
- 1. **Every phase skill MUST create session tasks** using `TaskCreate` before reading files or generating outputs
14
- 2. **Tasks are dynamic** — analyze the phase workflow and create tasks that reflect YOUR actual planned actions for this session
15
- 3. **Every task MUST be updated**: `in_progress` before starting, `completed` after finishing
16
- 4. **Pipeline orchestrators** (`/morph-proposal`, `/morph-apply`) MUST create master tasks for each phase
17
- 5. **Never skip task creation** — even if resuming mid-phase, create tasks for remaining steps
18
- 6. **Granularity**: minimum 2, typically 3-7 tasks per phase — adjust to complexity
19
- 7. **For iterative work** (clarification rounds, quality loops): update task `subject` with round/score progress
20
-
21
- ## Task Update Pattern
22
-
23
- ```
24
- TaskUpdate(taskId, status="in_progress") // before starting the step
25
- // ... do the work ...
26
- TaskUpdate(taskId, status="completed") // after step finishes
27
- ```
28
-
29
- For iterative tasks:
30
- ```
31
- TaskUpdate(taskId, subject="Round 3 — score 82/100")
32
- ```
33
-
34
- ## Deviation Tracking
35
-
36
- When completing a task differently than originally planned, record the reason:
37
-
38
- ```
39
- morph-spec task done <feature> <taskId> --note "Reason for deviation"
40
- ```
41
-
42
- For after-the-fact annotation (supports multiple types):
43
- ```
44
- morph-spec task annotate <feature> <taskId> "Reason" --type deviation
45
- morph-spec task annotate <feature> <taskId> "Context info" --type context
46
- morph-spec task annotate <feature> <taskId> "Resolved" --type blocker-resolved
47
- ```
48
-
49
- Note types: `deviation` (default), `context`, `blocker-resolved`
1
+ ---
2
+ stacks:
3
+ - "*"
4
+ ---
5
+
6
+ # MORPH-SPEC Task Tracking
7
+
8
+ > Session tasks are MANDATORY in every MORPH-SPEC phase. They track real progress and must be
9
+ > created BEFORE any phase work begins.
10
+
11
+ ## Rules
12
+
13
+ 1. **Every phase skill MUST create session tasks** using `TaskCreate` before reading files or generating outputs
14
+ 2. **Tasks are dynamic** — analyze the phase workflow and create tasks that reflect YOUR actual planned actions for this session
15
+ 3. **Every task MUST be updated**: `in_progress` before starting, `completed` after finishing
16
+ 4. **Pipeline orchestrators** (`/morph-proposal`, `/morph-apply`) MUST create master tasks for each phase
17
+ 5. **Never skip task creation** — even if resuming mid-phase, create tasks for remaining steps
18
+ 6. **Granularity**: minimum 2, typically 3-7 tasks per phase — adjust to complexity
19
+ 7. **For iterative work** (clarification rounds, quality loops): update task `subject` with round/score progress
20
+
21
+ ## Task Update Pattern
22
+
23
+ ```
24
+ TaskUpdate(taskId, status="in_progress") // before starting the step
25
+ // ... do the work ...
26
+ TaskUpdate(taskId, status="completed") // after step finishes
27
+ ```
28
+
29
+ For iterative tasks:
30
+ ```
31
+ TaskUpdate(taskId, subject="Round 3 — score 82/100")
32
+ ```
33
+
34
+ ## Persisting Progress to `tasks.json`
35
+
36
+ Native session tasks (`TaskCreate`/`TaskUpdate`) track your live work. To persist
37
+ task progress for the feature, write `.morph/features/{feature}/2-plan/tasks.json`,
38
+ touching ONLY the mutable fields:
39
+
40
+ - `status` — `pending` → `in_progress` → `completed`
41
+ - `outputs` — the files the task produced
42
+ - `notes` — free-text record (deviations, context, resolved blockers)
43
+
44
+ The plan contract — `title`, `description`, `dependencies`, `effort`, `doneCriteria`,
45
+ `group` — is frozen after Gate 2. Any attempt to change it is blocked by the
46
+ `protect-spec-files` hook.
47
+
48
+ Use the `Write` tool (whole-file rewrite) OR the `Edit` tool — `Edit` is allowed
49
+ as long as it touches only `status`, `outputs`, and `notes`. State is then synced
50
+ automatically by the `state-sync` PostToolUse hook; you do not call a CLI to mark
51
+ output.
52
+
53
+ ## Deviation Tracking
54
+
55
+ When completing a task differently than originally planned, record the reason in the
56
+ task's `notes` field. Use the `notes` array to capture deviations, added context, or
57
+ resolved blockers — for example:
58
+
59
+ ```json
60
+ {
61
+ "id": "T3",
62
+ "status": "completed",
63
+ "outputs": ["Features/User/Update/Handler.cs"],
64
+ "notes": [
65
+ "deviation: split validation into a separate validator for testability",
66
+ "blocker-resolved: EF migration conflict fixed by regenerating the snapshot"
67
+ ]
68
+ }
69
+ ```
@@ -1,191 +1,192 @@
1
- ---
2
- stacks:
3
- - "*"
4
- ---
5
-
6
- # MORPH-SPEC Workflow Rules
7
-
8
- > Always-active rules for all MORPH-SPEC managed projects.
9
-
10
- ---
11
-
12
- ## Spec-First Mandate
13
-
14
- **NEVER skip to code without a specification.** Every feature must progress through phases:
15
-
16
- 1. **Proposal** — Problem statement + acceptance criteria (`0-proposal/proposal.md`)
17
- 2. **Design** (optional, UI-heavy) — Design system + mockups + flows (`1-design/`)
18
- 3. **Plan** — Technical spec + mandate + tasks (`2-plan/spec.md`, `mandate.md`, `tasks.json`)
19
- 4. **Implement** — Code + recap (`3-implement/recap.md`)
20
- 5. **Review** — Review report + Gate 3 (`4-review/review-report.md`)
21
-
22
- ---
23
-
24
- ## Phase Sequence
25
-
26
- ```
27
- proposal → [design] → plan → implement → review
28
- ```
29
-
30
- Use `morph-spec status {feature}` to see current phase and pending approval gates.
31
-
32
- ---
33
-
34
- ## Phase Commands
35
-
36
- | Command | Purpose |
37
- |---------|---------|
38
- | `/morph-proposal {feature}` | Full spec pipeline (phases 1-4, pauses for approval) |
39
- | `/morph-apply {feature}` | Implement feature (phase 5) |
40
- | `/morph-status` | Feature dashboard |
41
-
42
- ---
43
-
44
- ## State & Outputs
45
-
46
- | Path | Notes |
47
- |------|-------|
48
- | `.morph/state.json` | **READ-ONLY** — use `morph-spec` CLI to update |
49
- | `.morph/features/{feature}/{phase}/` | Feature outputs organized by phase |
50
- | `.morph/framework/` | **READ-ONLY** — framework files managed by morph-spec |
51
- | `.morph/config/config.json` | Project configuration (editable) |
52
-
53
- ### output types
54
-
55
- Output types are defined in `src/core/paths/output-schema.js`. State sync is
56
- handled automatically by the `state-sync.js` PostToolUse hook — the agent
57
- does not need to call mark-output explicitly.
58
-
59
- ---
60
-
61
- ## Output Paths
62
-
63
- All outputs go in `.morph/features/{feature}/`:
64
-
65
- | Phase | Path |
66
- |-------|------|
67
- | Proposal | `0-proposal/proposal.md`, `stack-scan.md`, `migration-plan.md` (optional) |
68
- | Design (optional) | `1-design/design-system.md`, `mockups.md`, `components.md`, `flows.md` |
69
- | Plan | `2-plan/spec.md`, `mandate.md`, `tasks.json`, `decisions.md` |
70
- | Implement | `3-implement/recap.md` + source code |
71
- | Review | `4-review/review-report.md` |
72
-
73
- ---
74
-
75
- ## Checkpoints
76
-
77
- Run a checkpoint every 3 completed tasks:
78
- - Validate architecture compliance
79
- - Check package versions
80
- - Scan for security issues
81
- - Verify design system adherence (UI features)
82
-
83
- ---
84
-
85
- ## Approval Gates
86
-
87
- Before completing any phase, verify pending approval gates:
88
- - `morph-spec approval-status <feature>` — check which gates are pending
89
- - `morph-spec approve <feature> <gate>` — approve a gate (design, plan, tasks, uiux)
90
- - Gates must be approved before advancing to the next phase
91
-
92
- ---
93
-
94
- ## Protected Files
95
-
96
- **NEVER directly edit:**
97
- - `.morph/state.json` — Managed by CLI only
98
- - `.morph/framework/**` — Read-only framework content
99
-
100
- ---
101
-
102
- ## Test File Policy
103
-
104
- When a test fails, always follow this order:
105
-
106
- 1. **Analyze first** — determine if the IMPLEMENTATION is wrong or the TEST SPEC is wrong
107
- 2. **Fix implementation first** — the test is the spec; trust it by default
108
- 3. **Only modify a test file if the test expectation itself is incorrect** — wrong expected value, wrong behavior modeled
109
- 4. **Before modifying any test file, explain WHY the test spec is wrong** — what the correct behavior is and why the test doesn't model it
110
-
111
- Do not modify test files to make a failing test pass when the implementation is the actual problem.
112
-
113
- ---
114
-
115
- ## Context Maintenance
116
-
117
- After making structural changes (new packages, dependencies, project config changes), update the project context:
118
- - Edit `.morph/context/README.md` — update Tech Stack, Architecture, Key Integrations sections
119
- - Update `.morph/config/config.json` — update stack, architecture, integrations, paths
120
- - Structural changes include: package.json, .csproj, next.config.*, tsconfig.json, docker-compose.yml
121
-
122
- ---
123
-
124
- ## Spec-Driven Task Execution (implement phase)
125
-
126
- BEFORE implementing ANY task during the implement phase:
127
-
128
- 1. **Read tasks.json** → identify the current task object (`id`, `description`, `doneCriteria`, `dependencies`)
129
- 2. **Read spec.md** → the FR sections that the task `description` references
130
- 3. **Read the contracts** → the DTOs/interfaces are defined inside `spec.md` (v5 keeps contracts in the spec, not separate files)
131
- 4. Only then begin implementation
132
-
133
- This is **NON-NEGOTIABLE**. The spec is the source of truth. Code that doesn't match the spec is a bug.
134
-
135
- Every task in `tasks.json` MUST reference its FR(s) in the `description` field so the link to the spec is explicit:
136
- ```json
137
- {
138
- "id": "T1",
139
- "title": "Create user endpoint",
140
- "description": "Implement user CRUD (FR001) and input validation (FR003). Contracts: CreateUserRequest, CreateUserResponse, UserErrors.",
141
- "dependencies": [],
142
- "effort": "M",
143
- "doneCriteria": "POST /users creates a user and rejects invalid input",
144
- "status": "pending",
145
- "outputs": ["Features/UserFeature/Create/Handler.cs", "Validator.cs", "Endpoint.cs"],
146
- "group": "backend"
147
- }
148
- ```
149
-
150
- ---
151
-
152
- ## Mandatory Skills per Phase
153
-
154
- During implementation, these skills MUST be invoked at the specified triggers:
155
-
156
- ### Implement Phase
157
- | Trigger | Skill | When |
158
- |---------|-------|------|
159
- | Before each task | `superpowers:test-driven-development` | Invoke BEFORE writing any code for a task |
160
- | Before task done | `morph-verification-before-completion` | Invoke BEFORE running `morph-spec task done` |
161
- | On bug/unexpected | `superpowers:systematic-debugging` | Invoke IF a bug or unexpected behavior is encountered |
162
- | After all tasks | `morph-post-implementation` | Invoke AFTER all tasks completed |
163
- | Before PR | `morph-checklist` | Invoke BEFORE creating pull request |
164
-
165
- ### Tasks Phase
166
- | Trigger | Skill | When |
167
- |---------|-------|------|
168
- | On parallel tasks | `superpowers:dispatching-parallel-agents` | When parallel task groups are identified |
169
- | Before completion | `morph-verification-before-completion` | Before completing the tasks phase |
170
-
171
- These are MANDATORY. Use the `Skill()` tool. Do NOT skip.
172
-
173
- ---
174
-
175
- ## Scope Escalation
176
-
177
- If during implementation a task reveals significantly more complexity than estimated:
178
- - **Low impact:** `morph-spec task expand <feature> <task-id> --into "T00Xa: Sub" "T00Xb: Sub"`
179
- - **Medium/High impact:** `/morph-scope-escalation <feature>`
180
- - **Never** implement extra functionality within a task without registering it as a subtask
181
-
182
- ---
183
-
184
- ## Context Window Tip
185
-
186
- When using 3+ MCPs, add `"experimental": { "mcpCliMode": true }` to `.claude/settings.json`.
187
- MCP tools load on-demand instead of all at startup — keeps context clean for actual work.
188
-
189
- ---
190
-
191
- *MORPH-SPEC by Polymorphism Tech*
1
+ ---
2
+ stacks:
3
+ - "*"
4
+ ---
5
+
6
+ # MORPH-SPEC Workflow Rules
7
+
8
+ > Always-active rules for all MORPH-SPEC managed projects.
9
+
10
+ ---
11
+
12
+ ## Spec-First Mandate
13
+
14
+ **NEVER skip to code without a specification.** Every feature must progress through phases:
15
+
16
+ 1. **Proposal** — Problem statement + acceptance criteria (`0-proposal/proposal.md`)
17
+ 2. **Design** (optional, UI-heavy) — Design system + mockups + flows (`1-design/`)
18
+ 3. **Plan** — Technical spec + mandate + tasks (`2-plan/spec.md`, `mandate.md`, `tasks.json`)
19
+ 4. **Implement** — Code + recap (`3-implement/recap.md`)
20
+ 5. **Review** — Review report + Gate 3 (`4-review/review-report.md`)
21
+
22
+ ---
23
+
24
+ ## Phase Sequence
25
+
26
+ ```
27
+ proposal → [design] → plan → implement → review
28
+ ```
29
+
30
+ Use `morph-spec status {feature}` to see current phase and pending approval gates.
31
+
32
+ ---
33
+
34
+ ## Phase Commands
35
+
36
+ | Command | Purpose |
37
+ |---------|---------|
38
+ | `/morph-proposal {feature}` | Full spec pipeline (phases 1-4, pauses for approval) |
39
+ | `/morph-apply {feature}` | Implement feature (phase 5) |
40
+ | `/morph-status` | Feature dashboard |
41
+
42
+ ---
43
+
44
+ ## State & Outputs
45
+
46
+ | Path | Notes |
47
+ |------|-------|
48
+ | `.morph/state.json` | **READ-ONLY** — updated automatically by the `state-sync` hook |
49
+ | `.morph/features/{feature}/{phase}/` | Feature outputs organized by phase |
50
+ | `.morph/framework/` | **READ-ONLY** — framework files managed by morph-spec |
51
+ | `.morph/config/config.json` | Project configuration (editable) |
52
+
53
+ ### output types
54
+
55
+ Output types are defined in `src/core/paths/output-schema.js`. State sync is
56
+ handled automatically by the `state-sync.js` PostToolUse hook — the agent
57
+ does not need to record outputs through any CLI call.
58
+
59
+ ---
60
+
61
+ ## Output Paths
62
+
63
+ All outputs go in `.morph/features/{feature}/`:
64
+
65
+ | Phase | Path |
66
+ |-------|------|
67
+ | Proposal | `0-proposal/proposal.md`, `stack-scan.md`, `migration-plan.md` (optional) |
68
+ | Design (optional) | `1-design/design-system.md`, `mockups.md`, `components.md`, `flows.md` |
69
+ | Plan | `2-plan/spec.md`, `mandate.md`, `tasks.json`, `decisions.md` |
70
+ | Implement | `3-implement/recap.md` + source code |
71
+ | Review | `4-review/review-report.md` |
72
+
73
+ ---
74
+
75
+ ## Checkpoints
76
+
77
+ Run a checkpoint every 3 completed tasks:
78
+ - Validate architecture compliance
79
+ - Check package versions
80
+ - Scan for security issues
81
+ - Verify design system adherence (UI features)
82
+
83
+ ---
84
+
85
+ ## Approval Gates
86
+
87
+ Before completing any phase, verify pending approval gates:
88
+ - `morph-spec approval-status <feature>` — check which gates are pending
89
+ - `morph-spec approve <feature> <gate>` — approve a gate (`proposal`, `plan`, `review`; `uiux` if applicable)
90
+ - `morph-spec advance <feature>` — approve the current gate AND scaffold the next phase folder in one step
91
+ - Gates must be approved before advancing to the next phase
92
+
93
+ ---
94
+
95
+ ## Protected Files
96
+
97
+ **NEVER directly edit:**
98
+ - `.morph/state.json` — Managed by CLI only
99
+ - `.morph/framework/**` — Read-only framework content
100
+
101
+ ---
102
+
103
+ ## Test File Policy
104
+
105
+ When a test fails, always follow this order:
106
+
107
+ 1. **Analyze first** — determine if the IMPLEMENTATION is wrong or the TEST SPEC is wrong
108
+ 2. **Fix implementation first** — the test is the spec; trust it by default
109
+ 3. **Only modify a test file if the test expectation itself is incorrect** — wrong expected value, wrong behavior modeled
110
+ 4. **Before modifying any test file, explain WHY the test spec is wrong** — what the correct behavior is and why the test doesn't model it
111
+
112
+ Do not modify test files to make a failing test pass when the implementation is the actual problem.
113
+
114
+ ---
115
+
116
+ ## Context Maintenance
117
+
118
+ After making structural changes (new packages, dependencies, project config changes), update the project context:
119
+ - Edit `.morph/context/README.md` — update Tech Stack, Architecture, Key Integrations sections
120
+ - Update `.morph/config/config.json` — update stack, architecture, integrations, paths
121
+ - Structural changes include: package.json, .csproj, next.config.*, tsconfig.json, docker-compose.yml
122
+
123
+ ---
124
+
125
+ ## Spec-Driven Task Execution (implement phase)
126
+
127
+ BEFORE implementing ANY task during the implement phase:
128
+
129
+ 1. **Read tasks.json** → identify the current task object (`id`, `description`, `doneCriteria`, `dependencies`)
130
+ 2. **Read spec.md** → the FR sections that the task `description` references
131
+ 3. **Read the contracts** → the DTOs/interfaces are defined inside `spec.md` (v5 keeps contracts in the spec, not separate files)
132
+ 4. Only then begin implementation
133
+
134
+ This is **NON-NEGOTIABLE**. The spec is the source of truth. Code that doesn't match the spec is a bug.
135
+
136
+ Every task in `tasks.json` MUST reference its FR(s) in the `description` field so the link to the spec is explicit:
137
+ ```json
138
+ {
139
+ "id": "T1",
140
+ "title": "Create user endpoint",
141
+ "description": "Implement user CRUD (FR001) and input validation (FR003). Contracts: CreateUserRequest, CreateUserResponse, UserErrors.",
142
+ "dependencies": [],
143
+ "effort": "M",
144
+ "doneCriteria": "POST /users creates a user and rejects invalid input",
145
+ "status": "pending",
146
+ "outputs": ["Features/UserFeature/Create/Handler.cs", "Validator.cs", "Endpoint.cs"],
147
+ "group": "backend"
148
+ }
149
+ ```
150
+
151
+ ---
152
+
153
+ ## Mandatory Skills per Phase
154
+
155
+ During implementation, these skills MUST be invoked at the specified triggers:
156
+
157
+ ### Implement Phase
158
+ | Trigger | Skill | When |
159
+ |---------|-------|------|
160
+ | Before each task | `superpowers:test-driven-development` | Invoke BEFORE writing any code for a task |
161
+ | Before marking a task complete | `morph-verification-before-completion` | Invoke BEFORE setting a task's `status` to `completed` in `tasks.json` |
162
+ | On bug/unexpected | `superpowers:systematic-debugging` | Invoke IF a bug or unexpected behavior is encountered |
163
+ | After all tasks | `morph-post-implementation` | Invoke AFTER all tasks completed |
164
+ | Before PR | `morph-checklist` | Invoke BEFORE creating pull request |
165
+
166
+ ### Tasks Phase
167
+ | Trigger | Skill | When |
168
+ |---------|-------|------|
169
+ | On parallel tasks | `superpowers:dispatching-parallel-agents` | When parallel task groups are identified |
170
+ | Before completion | `morph-verification-before-completion` | Before completing the tasks phase |
171
+
172
+ These are MANDATORY. Use the `Skill()` tool. Do NOT skip.
173
+
174
+ ---
175
+
176
+ ## Scope Escalation
177
+
178
+ If during implementation a task reveals significantly more complexity than estimated:
179
+ - **Low impact:** record the added scope in the task's `notes` field (in `tasks.json`) and track the sub-steps with native `TaskCreate`/`TaskUpdate` for the current session
180
+ - **Medium/High impact:** `/morph-scope-escalation <feature>` — re-opens the plan so the frozen contract (`title`/`description`/`dependencies`/`doneCriteria`) can be amended through the gate
181
+ - **Never** implement extra functionality within a task without registering it — in `notes` for small additions, or via scope escalation for anything that changes the plan contract
182
+
183
+ ---
184
+
185
+ ## Context Window Tip
186
+
187
+ When using 3+ MCPs, add `"experimental": { "mcpCliMode": true }` to `.claude/settings.json`.
188
+ MCP tools load on-demand instead of all at startup — keeps context clean for actual work.
189
+
190
+ ---
191
+
192
+ *MORPH-SPEC by Polymorphism Tech*
@@ -16,7 +16,7 @@ These are the only skills the harness needs. MORPH.md references them by path.
16
16
  | `morph-stack-scan` | Detect stack drift in existing projects, generate migration-plan.md | yes |
17
17
  | `morph-plan` | Produce spec.md + mandate.md + tasks.json (Gate 2) | yes |
18
18
  | `morph-implement` | Execute each task with standard + persona, auto-advance between tasks| no |
19
- | `morph-eval` | Score work 0-10 across 4 dimensions, silence on score >= 8 | no |
19
+ | `morph-eval` | Score work 0-10 across 4 dimensions, silence on score >= 9 | no |
20
20
  | `morph-review` | Final review report with scores + recommendation (Gate 3) | yes |
21
21
  | `morph-standards` | Locate and load a specific standard on demand | no |
22
22