@polymorphism-tech/morph-spec 4.10.9 → 4.11.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/CLAUDE.md +3 -3
- package/LICENSE +71 -71
- package/README.md +5 -11
- package/bin/morph-spec.js +23 -1
- package/bin/task-manager.js +5 -5
- package/claude-plugin.json +1 -1
- package/docs/CHEATSHEET.md +1 -1
- package/docs/QUICKSTART.md +2 -8
- package/framework/agents/README.md +14 -14
- package/framework/agents/architecture/standards-architect.md +159 -159
- package/framework/agents/frontend/css-specialist.md +1 -1
- package/framework/agents/infrastructure/azure-architect.md +149 -149
- package/framework/agents/infrastructure/azure-deploy-specialist.md +4 -4
- package/framework/agents/infrastructure/infra-architect.md +48 -48
- package/framework/commands/morph-apply.md +18 -18
- package/framework/commands/morph-preflight.md +3 -3
- package/framework/commands/morph-proposal.md +15 -15
- package/framework/commands/morph-status.md +3 -3
- package/framework/commands/morph-troubleshoot.md +1 -1
- package/framework/hooks/README.md +204 -204
- package/framework/hooks/claude-code/pre-tool-use/task-tracking-guard.js +2 -2
- package/framework/hooks/claude-code/session-start/inject-morph-context.js +1 -1
- package/framework/hooks/claude-code/teammate-idle/teammate-idle.js +3 -3
- package/framework/hooks/claude-code/user-prompt/enrich-prompt.js +2 -2
- package/framework/hooks/git/pre-commit/agents.sh +1 -1
- package/framework/hooks/shared/phase-utils.js +139 -139
- package/framework/rules/csharp-standards.md +13 -13
- package/framework/rules/frontend-standards.md +13 -13
- package/framework/rules/infrastructure-standards.md +16 -16
- package/framework/rules/testing-standards.md +14 -14
- package/framework/skills/level-0-meta/morph-brainstorming/SKILL.md +8 -8
- package/framework/skills/level-0-meta/morph-checklist/SKILL.md +3 -3
- package/framework/skills/level-0-meta/morph-code-review-nextjs/references/review-example-nextjs.md +254 -254
- package/framework/skills/level-0-meta/morph-frontend-review/SKILL.md +1 -1
- package/framework/skills/level-0-meta/morph-init/SKILL.md +11 -11
- package/framework/skills/level-0-meta/morph-post-implementation/SKILL.md +3 -3
- package/framework/skills/level-0-meta/morph-replicate/SKILL.md +1 -1
- package/framework/skills/level-0-meta/morph-simulation-checklist/SKILL.md +4 -4
- package/framework/skills/level-0-meta/morph-tool-usage-guide/references/tools-per-phase.md +25 -25
- package/framework/skills/level-0-meta/morph-verification-before-completion/SKILL.md +8 -8
- package/framework/skills/level-1-workflows/morph-phase-clarify/SKILL.md +7 -7
- package/framework/skills/level-1-workflows/morph-phase-codebase-analysis/SKILL.md +4 -4
- package/framework/skills/level-1-workflows/morph-phase-design/SKILL.md +23 -23
- package/framework/skills/level-1-workflows/morph-phase-design/references/architecture-analysis-guide.md +1 -1
- package/framework/skills/level-1-workflows/morph-phase-implement/.morph/logs/activity.json +38 -0
- package/framework/skills/level-1-workflows/morph-phase-implement/SKILL.md +29 -29
- package/framework/skills/level-1-workflows/morph-phase-implement/prompts/implementer-prompt.md +4 -4
- package/framework/skills/level-1-workflows/morph-phase-plan/SKILL.md +9 -9
- package/framework/skills/level-1-workflows/morph-phase-setup/SKILL.md +17 -17
- package/framework/skills/level-1-workflows/morph-phase-tasks/.morph/logs/activity.json +14 -0
- package/framework/skills/level-1-workflows/morph-phase-tasks/SKILL.md +12 -12
- package/framework/skills/level-1-workflows/morph-phase-uiux/SKILL.md +16 -16
- package/framework/skills/level-1-workflows/morph-scope-escalation/SKILL.md +5 -5
- package/framework/standards/STANDARDS.json +2338 -2041
- package/framework/standards/frontend/nextjs/nextjs-patterns.md +17 -17
- package/framework/standards/infrastructure/supabase/supabase-custom-jwt.md +206 -0
- package/framework/templates/.idea/morph-templates.xml +92 -0
- package/framework/templates/.vscode/morph-templates.code-snippets +186 -0
- package/framework/templates/README.md +814 -814
- package/framework/templates/code/dotnet/contracts/Commands.cs +74 -74
- package/framework/templates/code/dotnet/contracts/Entities.cs +25 -25
- package/framework/templates/code/dotnet/contracts/Queries.cs +74 -74
- package/framework/templates/code/dotnet/contracts/README.md +74 -74
- package/framework/templates/code/dotnet/contracts/api-contracts.cs +173 -173
- package/framework/templates/code/dotnet/frontend/component.razor +239 -239
- package/framework/templates/code/dotnet/jobs/agent.cs +163 -163
- package/framework/templates/code/dotnet/jobs/job.cs +171 -171
- package/framework/templates/code/dotnet/test.cs +239 -239
- package/framework/templates/code/sql/rls-policy.sql +57 -57
- package/framework/templates/code/sql/supabase-migration.sql +100 -100
- package/framework/templates/code/sql/supabase-migration.template.sql +113 -113
- package/framework/templates/code/typescript/contracts.ts +168 -168
- package/framework/templates/context/CONTEXT.md +181 -181
- package/framework/templates/docs/proposal.md +182 -182
- package/framework/templates/docs/user-stories.md +34 -34
- package/framework/templates/examples/design-system-examples.md +357 -357
- package/framework/templates/examples/spec-examples.md +90 -90
- package/framework/templates/feature/decisions.md +187 -187
- package/framework/templates/feature/recap.md +146 -146
- package/framework/templates/feature/tasks.md +199 -199
- package/framework/templates/infrastructure/azure/README.md +286 -286
- package/framework/templates/infrastructure/azure/deploy-checklist.md +426 -426
- package/framework/templates/infrastructure/azure/parameters.dev.json +29 -29
- package/framework/templates/infrastructure/azure/parameters.prod.json +29 -29
- package/framework/templates/infrastructure/azure/parameters.staging.json +29 -29
- package/framework/templates/infrastructure/docker/docker-compose.template.yml +67 -67
- package/framework/templates/infrastructure/docker/dockerfile-api.dockerfile +38 -38
- package/framework/templates/infrastructure/docker/dockerfile-web.dockerfile +48 -48
- package/framework/templates/infrastructure/docker/easypanel.template.json +54 -54
- package/framework/workflows/README.md +18 -18
- package/framework/workflows/docs/enforcement-pipeline.md +1 -1
- package/framework/workflows/docs/full-morph.md +2 -2
- package/package.json +1 -1
- package/src/commands/agents/dispatch-agents.js +17 -0
- package/src/commands/agents/index.js +13 -13
- package/src/commands/agents/project-metrics.js +74 -0
- package/src/commands/project/doctor.js +3 -4
- package/src/commands/project/install-plugin-cmd.js +28 -28
- package/src/commands/project/setup-infra-cmd.js +12 -12
- package/src/commands/project/status.js +8 -1
- package/src/commands/scope/escalate.js +5 -3
- package/src/commands/standards/context-budget.js +89 -0
- package/src/commands/tasks/index.js +4 -4
- package/src/commands/templates/index.js +5 -5
- package/src/commands/utils/index.js +3 -3
- package/src/commands/validation/index.js +4 -4
- package/src/commands/validation/validate-feature.js +32 -3
- package/src/core/state/phase-state-machine.js +217 -217
- package/src/lib/agents/metrics-aggregator.js +56 -0
- package/src/lib/generators/design-system-generator.js +298 -298
- package/src/lib/generators/index.js +10 -10
- package/src/lib/generators/metadata-extractor.js +387 -387
- package/src/lib/stack-filter.js +65 -65
- package/src/lib/standards/digest-builder.js +57 -3
- package/src/lib/standards/index.js +7 -7
- package/src/lib/standards/standards-context-injector.js +302 -302
- package/src/lib/validators/architecture/architecture-validator.js +387 -387
- package/src/lib/validators/architecture/index.js +7 -7
- package/src/lib/validators/blazor/blazor-concurrency-analyzer.js +316 -316
- package/src/lib/validators/blazor/blazor-state-validator.js +279 -279
- package/src/lib/validators/blazor/blazor-validator.js +369 -369
- package/src/lib/validators/blazor/index.js +9 -9
- package/src/lib/validators/content/content-validator.js +287 -287
- package/src/lib/validators/content/index.js +7 -7
- package/src/lib/validators/contracts/index.js +7 -7
- package/src/lib/validators/css/css-validator.js +352 -352
- package/src/lib/validators/css/index.js +7 -7
- package/src/lib/validators/design-system/design-system-validator.js +231 -231
- package/src/lib/validators/design-system/index.js +7 -7
- package/src/lib/validators/nextjs/index.js +6 -6
- package/src/lib/validators/nextjs/next-component-validator.js +183 -183
- package/src/lib/validators/packages/index.js +7 -7
- package/src/lib/validators/packages/package-validator.js +360 -360
- package/src/lib/validators/shared/index.js +12 -12
- package/src/lib/validators/shared/issue-counter.js +18 -18
- package/src/lib/validators/shared/result-formatter.js +124 -124
- package/src/lib/validators/ui/index.js +7 -7
- package/src/lib/validators/ui/ui-contrast-validator.js +422 -422
- package/src/scripts/global-install.js +112 -58
- package/src/scripts/install-plugin.js +126 -126
- package/src/utils/claude-md-injector.js +90 -90
- package/src/utils/file-copier.js +200 -200
- package/src/utils/logger.js +32 -32
- package/src/utils/skills-installer.js +178 -178
- package/src/utils/version-checker.js +169 -175
package/framework/skills/level-1-workflows/morph-phase-implement/prompts/implementer-prompt.md
CHANGED
|
@@ -20,7 +20,7 @@ You are implementing tasks for the feature '{{FEATURE_NAME}}' as agent '{{AGENT_
|
|
|
20
20
|
## Execution Rules
|
|
21
21
|
|
|
22
22
|
1. Before starting each task:
|
|
23
|
-
- Execute: `
|
|
23
|
+
- Execute: `morph-spec task start {{FEATURE_NAME}} {{TASK_ID}}`
|
|
24
24
|
|
|
25
25
|
2. For each task, follow TDD:
|
|
26
26
|
- Write the failing test first
|
|
@@ -32,11 +32,11 @@ You are implementing tasks for the feature '{{FEATURE_NAME}}' as agent '{{AGENT_
|
|
|
32
32
|
3. Before marking any task done:
|
|
33
33
|
- Verify build compiles: `dotnet build` or `npm run build`
|
|
34
34
|
- Run relevant tests
|
|
35
|
-
- Execute: `
|
|
35
|
+
- Execute: `morph-spec task done {{FEATURE_NAME}} {{TASK_ID}}`
|
|
36
36
|
|
|
37
37
|
4. Every 3 tasks:
|
|
38
|
-
- Execute: `
|
|
39
|
-
- Execute: `
|
|
38
|
+
- Execute: `morph-spec checkpoint-save {{FEATURE_NAME}}`
|
|
39
|
+
- Execute: `morph-spec validate-feature {{FEATURE_NAME}} --phase implement`
|
|
40
40
|
|
|
41
41
|
5. Contracts are the source of truth — all DTOs, interfaces, and types MUST match `contracts.cs` exactly
|
|
42
42
|
|
|
@@ -4,7 +4,7 @@ description: MORPH-SPEC Phase 4 (Plan). Generates a detailed implementation plan
|
|
|
4
4
|
argument-hint: "[feature-name]"
|
|
5
5
|
user-invocable: false
|
|
6
6
|
allowed-tools: Read, Write, Edit, Bash, Glob, Grep, AskUserQuestion
|
|
7
|
-
cliVersion: "4.
|
|
7
|
+
cliVersion: "4.11.0"
|
|
8
8
|
---
|
|
9
9
|
|
|
10
10
|
# MORPH Plan — Phase 4
|
|
@@ -28,8 +28,8 @@ Generate a detailed implementation plan with exact paths, TDD code, and executio
|
|
|
28
28
|
| Read spec + contracts + decisions | **Read** all outputs | — |
|
|
29
29
|
| Analyze existing codebase | **Glob** + **Grep** patterns | — |
|
|
30
30
|
| Look up library docs | **Context7 MCP** `query_docs()` | **WebSearch** |
|
|
31
|
-
| Dispatch agents for analysis | **Bash** `
|
|
32
|
-
| Update state | **Bash** `
|
|
31
|
+
| Dispatch agents for analysis | **Bash** `morph-spec dispatch-agents $ARGUMENTS plan` | — |
|
|
32
|
+
| Update state | **Bash** `morph-spec state mark-output $ARGUMENTS plan` | — |
|
|
33
33
|
|
|
34
34
|
**Anti-patterns:**
|
|
35
35
|
- Generating plan without reading contracts (contracts are the source of truth!)
|
|
@@ -45,12 +45,12 @@ Generate a detailed implementation plan with exact paths, TDD code, and executio
|
|
|
45
45
|
### 0. Ensure plan phase
|
|
46
46
|
|
|
47
47
|
```bash
|
|
48
|
-
|
|
48
|
+
morph-spec state get $ARGUMENTS
|
|
49
49
|
```
|
|
50
50
|
|
|
51
51
|
Check the `"phase"` field:
|
|
52
52
|
- `"phase": "plan"` → correct phase, proceed
|
|
53
|
-
- any other value → run `
|
|
53
|
+
- any other value → run `morph-spec phase advance $ARGUMENTS` and re-check
|
|
54
54
|
|
|
55
55
|
> **Rule:** Never write to `3-plan/` until the phase is `plan`.
|
|
56
56
|
|
|
@@ -101,7 +101,7 @@ cat .morph/config/config.json | grep -A3 '"architecture"'
|
|
|
101
101
|
Run the dispatch analysis:
|
|
102
102
|
|
|
103
103
|
```bash
|
|
104
|
-
|
|
104
|
+
morph-spec dispatch-agents $ARGUMENTS plan
|
|
105
105
|
```
|
|
106
106
|
|
|
107
107
|
**Factors for recommendation:**
|
|
@@ -185,7 +185,7 @@ git commit -m "{message}"
|
|
|
185
185
|
### Step 4: Update State
|
|
186
186
|
|
|
187
187
|
```bash
|
|
188
|
-
|
|
188
|
+
morph-spec state mark-output $ARGUMENTS plan
|
|
189
189
|
```
|
|
190
190
|
|
|
191
191
|
---
|
|
@@ -224,8 +224,8 @@ Use `AskUserQuestion` to capture approval before advancing. This gate prevents t
|
|
|
224
224
|
|
|
225
225
|
- **"Approve plan"** →
|
|
226
226
|
```bash
|
|
227
|
-
|
|
228
|
-
|
|
227
|
+
morph-spec approve $ARGUMENTS plan
|
|
228
|
+
morph-spec phase advance $ARGUMENTS
|
|
229
229
|
```
|
|
230
230
|
- **"I have feedback" or "Other"** → apply the feedback and repeat this PAUSE
|
|
231
231
|
|
|
@@ -4,7 +4,7 @@ description: MORPH-SPEC Phase 1 (Setup). Reads project context, detects tech sta
|
|
|
4
4
|
argument-hint: "[feature-name]"
|
|
5
5
|
user-invocable: false
|
|
6
6
|
allowed-tools: Read, Write, Edit, Bash, Glob, Grep, AskUserQuestion
|
|
7
|
-
cliVersion: "4.
|
|
7
|
+
cliVersion: "4.11.0"
|
|
8
8
|
---
|
|
9
9
|
|
|
10
10
|
# MORPH Setup — Phase 1
|
|
@@ -26,19 +26,19 @@ Initialize the context and prepare the environment for an approved feature.
|
|
|
26
26
|
|
|
27
27
|
| Action | Tool | Alternative |
|
|
28
28
|
|--------|------|-------------|
|
|
29
|
-
| Verify state | **Bash** `
|
|
30
|
-
| Detect agents + standards | **Bash** `
|
|
29
|
+
| Verify state | **Bash** `morph-spec state get` | — |
|
|
30
|
+
| Detect agents + standards | **Bash** `morph-spec detect-agents $ARGUMENTS --json` → parse → **Bash** `morph-spec state add-agent` | **Read** agents.json manually |
|
|
31
31
|
| Read project context | **Read** `.morph/context/README.md` | — |
|
|
32
32
|
| Read config | **Read** `.morph/config/config.json` | — |
|
|
33
33
|
| Detect VSA architecture | **Read** `.morph/config/config.json` → check `config.architecture.style` | — |
|
|
34
34
|
| Scan project structure | **Glob** `src/**/*.{ts,tsx,cs}` | — |
|
|
35
35
|
| Repository metadata | **GitHub MCP** `get_repo()` | **Bash** `gh repo view --json` |
|
|
36
|
-
| Update state | **Bash** `
|
|
36
|
+
| Update state | **Bash** `morph-spec state set` | — |
|
|
37
37
|
|
|
38
38
|
**MCPs for this phase:** GitHub (optional — repo metadata).
|
|
39
39
|
|
|
40
40
|
**Anti-patterns:**
|
|
41
|
-
- Do not read agents.json manually for keyword matching — use `
|
|
41
|
+
- Do not read agents.json manually for keyword matching — use `morph-spec detect-agents` CLI
|
|
42
42
|
- Do not use a Task agent for agent detection (CLI is faster and consistent)
|
|
43
43
|
- Do not use WebSearch for local project info (use Read/Glob)
|
|
44
44
|
|
|
@@ -76,7 +76,7 @@ Update each task to `in_progress` before its step and `completed` after.
|
|
|
76
76
|
Read these files first — they inform all subsequent decisions:
|
|
77
77
|
|
|
78
78
|
```bash
|
|
79
|
-
|
|
79
|
+
morph-spec state get $ARGUMENTS
|
|
80
80
|
```
|
|
81
81
|
|
|
82
82
|
If the feature doesn't exist in state, go back to Phase 0.
|
|
@@ -93,8 +93,8 @@ Read `.morph/config/config.json` and check `config.architecture.style`:
|
|
|
93
93
|
|
|
94
94
|
| Value | Action |
|
|
95
95
|
|-------|--------|
|
|
96
|
-
| `"vertical-slice"` | `
|
|
97
|
-
| absent / any other value | `
|
|
96
|
+
| `"vertical-slice"` | `morph-spec state add-agent $ARGUMENTS vsa-architect` |
|
|
97
|
+
| absent / any other value | `morph-spec state add-agent $ARGUMENTS domain-architect` |
|
|
98
98
|
|
|
99
99
|
Proceed with normal keyword detection for all other agents. The architect was already added above — skip it during keyword matching to avoid duplication.
|
|
100
100
|
|
|
@@ -103,7 +103,7 @@ Proceed with normal keyword detection for all other agents. The architect was al
|
|
|
103
103
|
Use the `detect-agents` CLI to match agent keywords against the proposal (excludes architects already handled in Step 2.0):
|
|
104
104
|
|
|
105
105
|
```bash
|
|
106
|
-
|
|
106
|
+
morph-spec detect-agents $ARGUMENTS --exclude domain-architect,vsa-architect --json
|
|
107
107
|
```
|
|
108
108
|
|
|
109
109
|
This reads the proposal from `.morph/features/$ARGUMENTS/0-proposal/proposal.md` and agents.json, returning JSON with `detected[]` and `skipped[]` arrays. Agents with `active_phases: ['*']` are always included.
|
|
@@ -111,7 +111,7 @@ This reads the proposal from `.morph/features/$ARGUMENTS/0-proposal/proposal.md`
|
|
|
111
111
|
Parse the JSON output and add each detected agent to state:
|
|
112
112
|
|
|
113
113
|
```bash
|
|
114
|
-
|
|
114
|
+
morph-spec state add-agent $ARGUMENTS {agent-id}
|
|
115
115
|
```
|
|
116
116
|
|
|
117
117
|
Run `add-agent` once per detected agent ID from the `detected[]` array.
|
|
@@ -156,7 +156,7 @@ Use `AskUserQuestion` with header `"{MCP}"` and options:
|
|
|
156
156
|
|
|
157
157
|
**4. For MCPs RECOMMENDED but NOT CONFIGURED:**
|
|
158
158
|
- Print `△ {MCP} — not configured (fallback: {registry.fallback})`
|
|
159
|
-
- Suggestion: `Tip: configure with /morph-init refresh or
|
|
159
|
+
- Suggestion: `Tip: configure with /morph-init refresh or morph-spec mcp setup`
|
|
160
160
|
|
|
161
161
|
**Summary:** Show a status table for each MCP before proceeding:
|
|
162
162
|
```
|
|
@@ -173,15 +173,15 @@ MCP Readiness:
|
|
|
173
173
|
Run a quick check to verify all expected agents are installed for this project's stack:
|
|
174
174
|
|
|
175
175
|
```bash
|
|
176
|
-
|
|
176
|
+
morph-spec doctor 2>&1 | grep -A 1 "agents completeness"
|
|
177
177
|
```
|
|
178
178
|
|
|
179
179
|
If the output shows **missing agents**, inform the user:
|
|
180
180
|
|
|
181
|
-
> ⚠ Some agents for your stack are not installed. Run `
|
|
181
|
+
> ⚠ Some agents for your stack are not installed. Run `morph-spec setup-infra` to install them.
|
|
182
182
|
|
|
183
183
|
Use `AskUserQuestion` with header `"Agents"` and options:
|
|
184
|
-
- **Install now** — run `
|
|
184
|
+
- **Install now** — run `morph-spec setup-infra` to reinstall with current stack tags
|
|
185
185
|
- **Continue without** — proceed with available agents (may lack specialized support)
|
|
186
186
|
|
|
187
187
|
If "Install now" is selected, run the command and continue.
|
|
@@ -200,7 +200,7 @@ Based on the proposal and context, confirm:
|
|
|
200
200
|
Show the agents detected from the proposal:
|
|
201
201
|
|
|
202
202
|
```bash
|
|
203
|
-
|
|
203
|
+
morph-spec state get $ARGUMENTS
|
|
204
204
|
```
|
|
205
205
|
|
|
206
206
|
Parse the JSON and list `activeAgents` with their emojis/icons and responsibilities (look up each agent in `.morph/framework/agents.json` for the `icon` field).
|
|
@@ -208,7 +208,7 @@ Parse the JSON and list `activeAgents` with their emojis/icons and responsibilit
|
|
|
208
208
|
**If there are 2+ specialist agents active**, show the dispatch plan for the next phase:
|
|
209
209
|
|
|
210
210
|
```bash
|
|
211
|
-
|
|
211
|
+
morph-spec dispatch-agents $ARGUMENTS design
|
|
212
212
|
```
|
|
213
213
|
|
|
214
214
|
This shows which agents will be dispatched in parallel during the design phase and which tasks they'll execute.
|
|
@@ -222,7 +222,7 @@ This shows which agents will be dispatched in parallel during the design phase a
|
|
|
222
222
|
Update the feature state:
|
|
223
223
|
|
|
224
224
|
```bash
|
|
225
|
-
|
|
225
|
+
morph-spec state set $ARGUMENTS status in_progress
|
|
226
226
|
```
|
|
227
227
|
|
|
228
228
|
**Determine the next phase** based on active agents:
|
|
@@ -4,7 +4,7 @@ description: MORPH-SPEC Phase 4 (Tasks). Breaks approved spec into bottom-up ord
|
|
|
4
4
|
argument-hint: "[feature-name]"
|
|
5
5
|
user-invocable: false
|
|
6
6
|
allowed-tools: Read, Write, Edit, Bash, Glob, Grep, AskUserQuestion
|
|
7
|
-
cliVersion: "4.
|
|
7
|
+
cliVersion: "4.11.0"
|
|
8
8
|
---
|
|
9
9
|
|
|
10
10
|
# MORPH Tasks — Phase 4
|
|
@@ -33,8 +33,8 @@ Break the approved specification into executable tasks, define execution order,
|
|
|
33
33
|
| Count similar existing patterns | **Glob** `**/Services/**/*.cs` | — |
|
|
34
34
|
| Look up implementation patterns | **Context7 MCP** `query_docs()` | **WebSearch** |
|
|
35
35
|
| Create GitHub issues from tasks | **GitHub MCP** `create_issue()` | **Bash** `gh issue create ...` |
|
|
36
|
-
| Render tasks template | **Bash** `
|
|
37
|
-
| Update state with task count | **Bash** `
|
|
36
|
+
| Render tasks template | **Bash** `morph-spec template render docs/tasks ...` | — |
|
|
37
|
+
| Update state with task count | **Bash** `morph-spec state set ... tasks.total N` | — |
|
|
38
38
|
|
|
39
39
|
**Phase MCPs:** Context7 (estimate complexity), GitHub (create issues).
|
|
40
40
|
|
|
@@ -54,7 +54,7 @@ Break the approved specification into executable tasks, define execution order,
|
|
|
54
54
|
### 0. Ensure tasks phase
|
|
55
55
|
|
|
56
56
|
```bash
|
|
57
|
-
|
|
57
|
+
morph-spec state get $ARGUMENTS
|
|
58
58
|
```
|
|
59
59
|
|
|
60
60
|
Check the `"phase"` field:
|
|
@@ -62,8 +62,8 @@ Check the `"phase"` field:
|
|
|
62
62
|
**If `"phase": "tasks"`** → correct phase, proceed.
|
|
63
63
|
|
|
64
64
|
**If `"phase": "clarify"`** → run in sequence:
|
|
65
|
-
1. `
|
|
66
|
-
2. `
|
|
65
|
+
1. `morph-spec state mark-output $ARGUMENTS clarifications`
|
|
66
|
+
2. `morph-spec phase advance $ARGUMENTS` (→ tasks)
|
|
67
67
|
|
|
68
68
|
**Any other value** → STOP — inconsistent state, report to user.
|
|
69
69
|
|
|
@@ -114,8 +114,8 @@ Before starting the breakdown:
|
|
|
114
114
|
If any checkbox is NOT checked → return to corresponding phase and resolve.
|
|
115
115
|
|
|
116
116
|
```bash
|
|
117
|
-
|
|
118
|
-
|
|
117
|
+
morph-spec state get $ARGUMENTS
|
|
118
|
+
morph-spec approval-status $ARGUMENTS
|
|
119
119
|
```
|
|
120
120
|
|
|
121
121
|
---
|
|
@@ -245,8 +245,8 @@ If there are Azure resources, add Bicep and migration tasks.
|
|
|
245
245
|
### Step 8: Update State
|
|
246
246
|
|
|
247
247
|
```bash
|
|
248
|
-
|
|
249
|
-
|
|
248
|
+
morph-spec state set $ARGUMENTS tasks.total {N}
|
|
249
|
+
morph-spec state mark-output $ARGUMENTS tasks
|
|
250
250
|
```
|
|
251
251
|
|
|
252
252
|
## Outputs
|
|
@@ -273,8 +273,8 @@ Use `AskUserQuestion` to capture explicit approval before advancing. This gate p
|
|
|
273
273
|
|
|
274
274
|
- **"Approve and implement"** →
|
|
275
275
|
```bash
|
|
276
|
-
|
|
277
|
-
|
|
276
|
+
morph-spec approve $ARGUMENTS tasks
|
|
277
|
+
morph-spec phase advance $ARGUMENTS
|
|
278
278
|
```
|
|
279
279
|
- **"I have feedback" or "Other"** → apply the feedback and repeat this PAUSE
|
|
280
280
|
|
|
@@ -4,7 +4,7 @@ description: MORPH-SPEC Phase 1.5 (UI/UX). Creates design-system.md, mockups.md,
|
|
|
4
4
|
argument-hint: "[feature-name]"
|
|
5
5
|
user-invocable: false
|
|
6
6
|
allowed-tools: Read, Write, Edit, Bash, Glob, Grep, AskUserQuestion
|
|
7
|
-
cliVersion: "4.
|
|
7
|
+
cliVersion: "4.11.0"
|
|
8
8
|
---
|
|
9
9
|
|
|
10
10
|
# MORPH UI/UX Design - Phase 1.5
|
|
@@ -36,9 +36,9 @@ Conditional phase for features with front-end. Collects UI/UX requirements, gene
|
|
|
36
36
|
| Inspect page structure | **Playwright MCP** `browser_snapshot()` | **WebFetch** + manual parse |
|
|
37
37
|
| Test responsive layout | **Playwright MCP** `browser_resize()` + `browser_take_screenshot()` | Manual testing |
|
|
38
38
|
| External design references | **WebSearch** + **WebFetch** | — |
|
|
39
|
-
| Render UI templates | **Bash** `
|
|
40
|
-
| Generate design system from existing CSS | **Bash** `
|
|
41
|
-
| Update state | **Bash** `
|
|
39
|
+
| Render UI templates | **Bash** `morph-spec template render docs/ui-mockups ...` | — |
|
|
40
|
+
| Generate design system from existing CSS | **Bash** `morph-spec generate design-system --scan` | — |
|
|
41
|
+
| Update state | **Bash** `morph-spec state mark-output ...` | — |
|
|
42
42
|
|
|
43
43
|
**MCPs for this phase:** Playwright (preview, inspection, responsiveness), Context7 (component docs).
|
|
44
44
|
|
|
@@ -54,7 +54,7 @@ Conditional phase for features with front-end. Collects UI/UX requirements, gene
|
|
|
54
54
|
### Step 0: Ensure uiux phase
|
|
55
55
|
|
|
56
56
|
```bash
|
|
57
|
-
|
|
57
|
+
morph-spec state get $ARGUMENTS
|
|
58
58
|
```
|
|
59
59
|
|
|
60
60
|
Check the `"phase"` field in the output:
|
|
@@ -62,7 +62,7 @@ Check the `"phase"` field in the output:
|
|
|
62
62
|
**If `"phase": "uiux"`** → correct phase, proceed.
|
|
63
63
|
|
|
64
64
|
**If `"phase": "setup"`** → execute:
|
|
65
|
-
1. `
|
|
65
|
+
1. `morph-spec phase advance $ARGUMENTS` (→ uiux)
|
|
66
66
|
|
|
67
67
|
**Any other value** → do not proceed — inconsistent state, report to user.
|
|
68
68
|
|
|
@@ -134,7 +134,7 @@ Print: `✓ Design system generated from [N] tokens — .morph/context/design-sy
|
|
|
134
134
|
Check if active agents include `ui-designer`:
|
|
135
135
|
|
|
136
136
|
```bash
|
|
137
|
-
|
|
137
|
+
morph-spec state get $ARGUMENTS
|
|
138
138
|
```
|
|
139
139
|
|
|
140
140
|
If `ui-designer` is NOT in `activeAgents`, skip this phase and continue to Phase 2 (Design).
|
|
@@ -290,7 +290,7 @@ mcp__plugin_playwright_playwright__browser_take_screenshot({}) → save as .morp
|
|
|
290
290
|
|
|
291
291
|
Create the following files in `.morph/features/$ARGUMENTS/`:
|
|
292
292
|
|
|
293
|
-
> **Use templates:** Use `
|
|
293
|
+
> **Use templates:** Use `morph-spec template render` to generate files from templates in `.morph/framework/templates/docs/`. Available templates: `ui-design-system`, `ui-mockups`, `ui-components`, `ui-flows`.
|
|
294
294
|
|
|
295
295
|
#### 4.1. `ui-design-system.md`
|
|
296
296
|
|
|
@@ -367,17 +367,17 @@ Document in UI files:
|
|
|
367
367
|
### Step 6: Update State
|
|
368
368
|
|
|
369
369
|
```bash
|
|
370
|
-
|
|
371
|
-
|
|
372
|
-
|
|
373
|
-
|
|
370
|
+
morph-spec state mark-output $ARGUMENTS ui-design-system
|
|
371
|
+
morph-spec state mark-output $ARGUMENTS ui-mockups
|
|
372
|
+
morph-spec state mark-output $ARGUMENTS ui-components
|
|
373
|
+
morph-spec state mark-output $ARGUMENTS ui-flows
|
|
374
374
|
```
|
|
375
375
|
|
|
376
376
|
> **Format note:** The `mark-output` commands accept BOTH kebab-case (`ui-design-system`)
|
|
377
377
|
> AND camelCase (`uiDesignSystem`). Both formats work equally! Use whichever is more
|
|
378
378
|
> comfortable for you. Examples:
|
|
379
|
-
> - `
|
|
380
|
-
> - `
|
|
379
|
+
> - `morph-spec state mark-output my-feature uiDesignSystem`
|
|
380
|
+
> - `morph-spec state mark-output my-feature ui-design-system`
|
|
381
381
|
|
|
382
382
|
## Generated Outputs
|
|
383
383
|
|
|
@@ -421,8 +421,8 @@ Use `AskUserQuestion` to capture explicit approval before advancing:
|
|
|
421
421
|
|
|
422
422
|
- **"Approve UI/UX"** →
|
|
423
423
|
```bash
|
|
424
|
-
|
|
425
|
-
|
|
424
|
+
morph-spec approve $ARGUMENTS uiux
|
|
425
|
+
morph-spec phase advance $ARGUMENTS
|
|
426
426
|
```
|
|
427
427
|
- **"I have feedback" or "Other"** → apply the received feedback and repeat this PAUSE
|
|
428
428
|
|
|
@@ -4,7 +4,7 @@ description: Guided workflow for mid-implementation scope escalation — analyze
|
|
|
4
4
|
user-invocable: true
|
|
5
5
|
argument-hint: "[feature-name]"
|
|
6
6
|
allowed-tools: Read, Write, Edit, Bash, Glob, Grep, AskUserQuestion
|
|
7
|
-
cliVersion: "4.
|
|
7
|
+
cliVersion: "4.11.0"
|
|
8
8
|
---
|
|
9
9
|
|
|
10
10
|
# Scope Escalation Workflow
|
|
@@ -57,7 +57,7 @@ Use `AskUserQuestion` to gather the details:
|
|
|
57
57
|
Run dry-run analysis:
|
|
58
58
|
|
|
59
59
|
```bash
|
|
60
|
-
|
|
60
|
+
morph-spec scope escalate <feature> --task <id> --reason "<reason>" --dry-run
|
|
61
61
|
```
|
|
62
62
|
|
|
63
63
|
Read the recommendation output. Additionally:
|
|
@@ -116,17 +116,17 @@ Based on approved action:
|
|
|
116
116
|
|
|
117
117
|
**For expansion (low impact):**
|
|
118
118
|
```bash
|
|
119
|
-
|
|
119
|
+
morph-spec task expand <feature> <task-id> --into "T017a: <title>" "T017b: <title>" ...
|
|
120
120
|
```
|
|
121
121
|
|
|
122
122
|
**For regression (medium/high impact):**
|
|
123
123
|
```bash
|
|
124
|
-
|
|
124
|
+
morph-spec scope escalate <feature> --task <id> --reason "<reason>"
|
|
125
125
|
```
|
|
126
126
|
|
|
127
127
|
Or with target override:
|
|
128
128
|
```bash
|
|
129
|
-
|
|
129
|
+
morph-spec scope escalate <feature> --task <id> --reason "<reason>" --target design
|
|
130
130
|
```
|
|
131
131
|
|
|
132
132
|
### Step 6: GUIDE Next Steps
|