@polymorphism-tech/morph-spec 4.10.4 → 4.10.6
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/README.md +7 -7
- package/bin/morph-spec.js +4 -2
- package/bin/task-manager.js +21 -5
- package/claude-plugin.json +1 -1
- package/docs/CHEATSHEET.md +5 -5
- package/docs/QUICKSTART.md +5 -5
- package/framework/CLAUDE.md +4 -4
- package/framework/agents/backend/hangfire-orchestrator.md +1 -1
- package/framework/agents/backend/ms-agent-expert.md +2 -1
- package/framework/agents/infrastructure/azure-deploy-specialist.md +1 -1
- package/framework/agents/integrations/asaas-financial.md +1 -1
- package/framework/agents/integrations/clerk-auth.md +1 -2
- package/framework/agents/integrations/hangfire-integration.md +1 -1
- package/framework/agents/integrations/resend-email.md +1 -1
- package/framework/agents/quality/code-analyzer.md +1 -1
- package/framework/commands/morph-apply.md +4 -4
- package/framework/commands/morph-infra.md +10 -10
- package/framework/commands/morph-preflight.md +3 -3
- package/framework/commands/morph-proposal.md +2 -2
- package/framework/commands/morph-status.md +3 -3
- package/framework/hooks/claude-code/post-tool-use/context-refresh.js +1 -1
- package/framework/hooks/claude-code/pre-compact/save-morph-context.js +1 -1
- package/framework/phases.json +17 -17
- package/framework/rules/morph-workflow.md +3 -3
- package/framework/skills/README.md +1 -1
- package/framework/skills/level-0-meta/morph-brainstorming/SKILL.md +1 -1
- package/framework/skills/level-0-meta/morph-checklist/SKILL.md +2 -2
- package/framework/skills/level-0-meta/morph-code-review/SKILL.md +1 -1
- package/framework/skills/level-0-meta/morph-code-review-nextjs/SKILL.md +1 -1
- package/framework/skills/level-0-meta/morph-frontend-review/SKILL.md +3 -3
- package/framework/skills/level-0-meta/morph-init/SKILL.md +8 -8
- package/framework/skills/level-0-meta/morph-post-implementation/SKILL.md +7 -7
- package/framework/skills/level-0-meta/morph-replicate/SKILL.md +4 -4
- package/framework/skills/level-0-meta/morph-replicate/references/blazor-html-mapping.md +1 -1
- package/framework/skills/level-0-meta/morph-simulation-checklist/SKILL.md +1 -1
- package/framework/skills/level-0-meta/morph-tool-usage-guide/SKILL.md +1 -1
- package/framework/skills/level-0-meta/morph-verification-before-completion/SKILL.md +1 -1
- package/framework/skills/level-1-workflows/morph-phase-clarify/SKILL.md +5 -5
- package/framework/skills/level-1-workflows/morph-phase-codebase-analysis/SKILL.md +2 -2
- package/framework/skills/level-1-workflows/morph-phase-design/SKILL.md +5 -5
- package/framework/skills/level-1-workflows/morph-phase-implement/SKILL.md +6 -7
- package/framework/skills/level-1-workflows/morph-phase-plan/SKILL.md +6 -7
- package/framework/skills/level-1-workflows/morph-phase-setup/SKILL.md +6 -6
- package/framework/skills/level-1-workflows/morph-phase-tasks/SKILL.md +6 -7
- package/framework/skills/level-1-workflows/morph-phase-uiux/SKILL.md +5 -5
- package/framework/skills/level-1-workflows/morph-scope-escalation/SKILL.md +3 -3
- package/framework/standards/ai-agents/team-orchestration.md +1 -1
- package/framework/workflows/docs/STORY-DRIVEN-DEVELOPMENT.md +1 -1
- package/package.json +1 -1
- package/src/commands/project/doctor.js +3 -3
- package/src/commands/project/init.js +11 -3
- package/src/commands/project/update.js +11 -8
- package/src/commands/state/advance-phase.js +24 -11
- package/src/commands/state/approve.js +1 -1
- package/src/commands/state/state.js +26 -5
- package/src/lib/phase-chain/phase-validator.js +6 -1
- package/src/lib/tasks/task-parser.js +4 -0
- package/src/scripts/setup-infra.js +2 -2
- package/src/utils/agents-installer.js +20 -11
- package/src/utils/banner.js +1 -1
- package/src/utils/hooks-installer.js +739 -739
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
---
|
|
2
|
-
name: morph
|
|
2
|
+
name: morph-frontend-review
|
|
3
3
|
description: Complete frontend audit — validates design outputs (design-system, WCAG contrast,
|
|
4
4
|
mockups), static accessibility scan (TSX + Razor), responsive screenshots at 3
|
|
5
5
|
breakpoints via Playwright, axe-core a11y at runtime, and SEO (Next.js metadata). Covers Next.js
|
|
@@ -193,7 +193,7 @@ Request explicit user confirmation before skipping screenshots:
|
|
|
193
193
|
Dev server not detected. Responsive screenshots via Playwright cannot be captured.
|
|
194
194
|
|
|
195
195
|
Options:
|
|
196
|
-
1. Start the server manually and re-run /morph
|
|
196
|
+
1. Start the server manually and re-run /morph-frontend-review
|
|
197
197
|
2. Explicitly confirm you want to skip screenshots and why
|
|
198
198
|
|
|
199
199
|
Cannot proceed to axe-core without dev server.
|
|
@@ -300,7 +300,7 @@ Create consolidated summary file:
|
|
|
300
300
|
mkdir -p ".morph/features/$ARGUMENTS/visual-screenshots"
|
|
301
301
|
```
|
|
302
302
|
|
|
303
|
-
Save to `.morph/features/$ARGUMENTS/visual-screenshots/morph
|
|
303
|
+
Save to `.morph/features/$ARGUMENTS/visual-screenshots/morph-frontend-review-summary.md`:
|
|
304
304
|
|
|
305
305
|
```markdown
|
|
306
306
|
# Frontend Review — {feature}
|
|
@@ -1,11 +1,11 @@
|
|
|
1
1
|
---
|
|
2
|
-
name: morph
|
|
2
|
+
name: morph-init
|
|
3
3
|
description: >
|
|
4
4
|
LLM-powered project initialization. Installs morph-spec infrastructure if
|
|
5
5
|
needed, auto-installs required plugins (superpowers, context7), analyzes any
|
|
6
6
|
project structure intelligently, generates rich context/README.md and
|
|
7
7
|
config.json, and configures MCPs. Use once per project after installing
|
|
8
|
-
@polymorphism-tech/morph-spec. Re-run with /morph
|
|
8
|
+
@polymorphism-tech/morph-spec. Re-run with /morph-init refresh to update
|
|
9
9
|
context as the project evolves.
|
|
10
10
|
argument-hint: "[refresh]"
|
|
11
11
|
user-invocable: true
|
|
@@ -15,7 +15,7 @@ allowed-tools: Read, Write, Edit, Bash, Glob, Grep
|
|
|
15
15
|
# morph-init — LLM-Powered Project Initialization
|
|
16
16
|
|
|
17
17
|
> Run once after `npm install @polymorphism-tech/morph-spec`.
|
|
18
|
-
> Re-run as `/morph
|
|
18
|
+
> Re-run as `/morph-init refresh` when your project evolves.
|
|
19
19
|
|
|
20
20
|
---
|
|
21
21
|
|
|
@@ -55,7 +55,7 @@ claude plugin install superpowers@claude-plugins-official
|
|
|
55
55
|
claude plugin install context7@claude-plugins-official
|
|
56
56
|
```
|
|
57
57
|
|
|
58
|
-
**If the command succeeds:** `✓ {plugin} installed. Restart Claude Code after /morph
|
|
58
|
+
**If the command succeeds:** `✓ {plugin} installed. Restart Claude Code after /morph-init completes.`
|
|
59
59
|
|
|
60
60
|
**If the command fails:** Show this and **STOP** — do not continue:
|
|
61
61
|
|
|
@@ -63,7 +63,7 @@ claude plugin install context7@claude-plugins-official
|
|
|
63
63
|
Plugin {plugin} could not be installed automatically.
|
|
64
64
|
Run manually and restart Claude Code:
|
|
65
65
|
claude plugin install {plugin}
|
|
66
|
-
Then re-run /morph
|
|
66
|
+
Then re-run /morph-init.
|
|
67
67
|
```
|
|
68
68
|
|
|
69
69
|
Both `superpowers` and `context7` are required. Do not continue if either is missing.
|
|
@@ -218,7 +218,7 @@ And inform the user:
|
|
|
218
218
|
→ morph-spec will use vsa-architect + contracts-vsa.cs for features
|
|
219
219
|
```
|
|
220
220
|
|
|
221
|
-
> This key is what activates `vsa-architect` instead of `domain-architect` during `/morph
|
|
221
|
+
> This key is what activates `vsa-architect` instead of `domain-architect` during `/morph-proposal`.
|
|
222
222
|
|
|
223
223
|
**If the project doesn't exist yet (new VSA project from scratch)**, also inform:
|
|
224
224
|
|
|
@@ -318,7 +318,7 @@ For each MCP configured in Step 7, run a health check to verify it actually work
|
|
|
318
318
|
Use `AskUserQuestion` with header `"{MCP} failed"` and these options:
|
|
319
319
|
- **Reconfigure credentials** — Loop back to Step 7 for this specific MCP. Maximum 2 retries per MCP. After 2 failures, force option 2.
|
|
320
320
|
- **Continue without {MCP}** — Show the `fallback` field from the registry (e.g., "WebSearch + WebFetch for library documentation") and proceed.
|
|
321
|
-
- **Stop init** — Abort initialization. User must fix MCP configuration manually and re-run `/morph
|
|
321
|
+
- **Stop init** — Abort initialization. User must fix MCP configuration manually and re-run `/morph-init`.
|
|
322
322
|
|
|
323
323
|
**Retry tracking:** Keep a counter per MCP. On the 2nd failure for the same MCP, skip the "Reconfigure" option and only offer "Continue without" or "Stop".
|
|
324
324
|
|
|
@@ -377,5 +377,5 @@ Before printing the summary, check `~/.claude/settings.local.json` for `env.CLAU
|
|
|
377
377
|
[If any plugin was newly installed:]
|
|
378
378
|
○ Restart Claude Code to activate newly installed plugins.
|
|
379
379
|
|
|
380
|
-
Next: /morph
|
|
380
|
+
Next: /morph-proposal [feature-name]
|
|
381
381
|
```
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
---
|
|
2
|
-
name: morph
|
|
2
|
+
name: morph-post-implementation
|
|
3
3
|
description: Orchestrates the complete post-implementation flow: stack detection,
|
|
4
4
|
automated scans (C#/Next.js), tests, validate-feature, smoke test via Playwright
|
|
5
5
|
(mandatory if dev server active), code review checklist by stack, checkpoint, and
|
|
@@ -61,8 +61,8 @@ node .claude/skills/morph-code-review-nextjs/scripts/scan-nextjs.mjs --diff
|
|
|
61
61
|
**🚫 BLOCK if any CRITICAL finding found.**
|
|
62
62
|
|
|
63
63
|
Fix all CRITICALs before continuing. To review the full checklist:
|
|
64
|
-
- .NET: `/morph
|
|
65
|
-
- Next.js: `/morph
|
|
64
|
+
- .NET: `/morph-code-review`
|
|
65
|
+
- Next.js: `/morph-code-review-nextjs`
|
|
66
66
|
|
|
67
67
|
---
|
|
68
68
|
|
|
@@ -222,7 +222,7 @@ Wait for both. **🚫 BLOCK if either returns unresolved CRITICAL.**
|
|
|
222
222
|
[ ] DTOs with descriptive names + correct types
|
|
223
223
|
```
|
|
224
224
|
|
|
225
|
-
> For full list: `/morph
|
|
225
|
+
> For full list: `/morph-code-review`
|
|
226
226
|
|
|
227
227
|
### If NEXTJS:
|
|
228
228
|
|
|
@@ -241,7 +241,7 @@ Wait for both. **🚫 BLOCK if either returns unresolved CRITICAL.**
|
|
|
241
241
|
[ ] No any type annotation
|
|
242
242
|
```
|
|
243
243
|
|
|
244
|
-
> For full list: `/morph
|
|
244
|
+
> For full list: `/morph-code-review-nextjs`
|
|
245
245
|
|
|
246
246
|
**🚫 BLOCK if any CRITICAL item is unresolved.**
|
|
247
247
|
|
|
@@ -296,7 +296,7 @@ This skill will:
|
|
|
296
296
|
Before creating the PR, invoke the compliance checklist:
|
|
297
297
|
|
|
298
298
|
```
|
|
299
|
-
Skill(morph
|
|
299
|
+
Skill(morph-checklist)
|
|
300
300
|
```
|
|
301
301
|
|
|
302
302
|
This skill checks: security, SEO, performance, accessibility, and LGPD compliance.
|
|
@@ -353,7 +353,7 @@ EOF
|
|
|
353
353
|
| Step 5 | Dev server not detected without explicit user confirmation |
|
|
354
354
|
| Step 6 | Any unresolved CRITICAL item in manual checklist |
|
|
355
355
|
| Step 8 | Tests failing in worktree before merge/PR |
|
|
356
|
-
| Step 9 | Unresolved CRITICAL item in `morph
|
|
356
|
+
| Step 9 | Unresolved CRITICAL item in `morph-checklist` |
|
|
357
357
|
|
|
358
358
|
**All BLOCKs must be resolved before creating the PR.**
|
|
359
359
|
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
---
|
|
2
|
-
name: morph
|
|
2
|
+
name: morph-replicate
|
|
3
3
|
description: Simplified workflow for converting HTML prototypes into functional Blazor components, extracting design patterns and mapping HTML elements to Fluent UI/MudBlazor equivalents. Use when an approved HTML prototype exists and needs conversion to Blazor without a full MORPH-SPEC spec pipeline.
|
|
4
4
|
user-invocable: true
|
|
5
5
|
argument-hint: "[feature-name] [prototype-path]"
|
|
@@ -16,12 +16,12 @@ stacks:
|
|
|
16
16
|
## Command
|
|
17
17
|
|
|
18
18
|
```bash
|
|
19
|
-
/morph
|
|
19
|
+
/morph-replicate {feature-name} {prototype-path}
|
|
20
20
|
```
|
|
21
21
|
|
|
22
22
|
**Example:**
|
|
23
23
|
```bash
|
|
24
|
-
/morph
|
|
24
|
+
/morph-replicate ui-redesign prototipo/
|
|
25
25
|
```
|
|
26
26
|
|
|
27
27
|
---
|
|
@@ -162,7 +162,7 @@ npx morph-spec state mark-output {feature-name} recap
|
|
|
162
162
|
## Execution Example
|
|
163
163
|
|
|
164
164
|
```markdown
|
|
165
|
-
/morph
|
|
165
|
+
/morph-replicate checkout-redesign prototipo/checkout/
|
|
166
166
|
|
|
167
167
|
📁 Analyzing prototype in prototipo/checkout/...
|
|
168
168
|
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
# HTML → Blazor Component Mapping Reference
|
|
2
2
|
|
|
3
3
|
> Reference for converting HTML prototype elements to Fluent UI / MudBlazor equivalents.
|
|
4
|
-
> Used during FASE 1 of the `/morph
|
|
4
|
+
> Used during FASE 1 of the `/morph-replicate` workflow.
|
|
5
5
|
|
|
6
6
|
## Common Component Mappings
|
|
7
7
|
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
---
|
|
2
|
-
name: morph
|
|
2
|
+
name: morph-simulation-checklist
|
|
3
3
|
description: Checklist for implementing mock/simulation clients for external .NET services (AI APIs, payments, email). Use when setting up simulation mode without real API access, when creating fake service implementations for development/testing, or when debugging external service integrations.
|
|
4
4
|
user-invocable: true
|
|
5
5
|
allowed-tools: Read, Write, Edit, Bash, Glob, Grep
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
---
|
|
2
|
-
name: morph
|
|
2
|
+
name: morph-tool-usage-guide
|
|
3
3
|
description: Decision flowchart and per-phase reference for selecting the right Claude Code tool (Read, Grep, Glob, Bash, Task) or MCP tool in MORPH-SPEC workflows. Use when unsure which tool to use for a given action, when choosing between native tools and MCPs, or when deciding whether to use a subagent vs direct tools.
|
|
4
4
|
user-invocable: true
|
|
5
5
|
allowed-tools: Read, Write, Edit, Bash, Glob, Grep
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
---
|
|
2
|
-
name: morph
|
|
2
|
+
name: morph-verification-before-completion
|
|
3
3
|
description: Phase-specific verification checklists and morph-spec validation commands for confirming MORPH-SPEC outputs are complete and correct. Use before marking any task done, before advancing to the next phase, before committing, or before creating PRs.
|
|
4
4
|
user-invocable: true
|
|
5
5
|
argument-hint: "[feature-name] [phase?]"
|
|
@@ -1,15 +1,15 @@
|
|
|
1
1
|
---
|
|
2
|
-
name: morph
|
|
2
|
+
name: morph-phase-clarify
|
|
3
3
|
description: MORPH-SPEC Phase 3 (Clarify). Iterative clarification loop driven by a satisfaction score (0-100). Generates targeted questions per round, always presents "End Clarify" as exit option, and stops when score >= 85 or user exits. Use after design approval to eliminate spec ambiguities before task breakdown begins.
|
|
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.10.
|
|
7
|
+
cliVersion: "4.10.6"
|
|
8
8
|
---
|
|
9
9
|
|
|
10
10
|
# MORPH Clarify — Phase 3
|
|
11
11
|
|
|
12
|
-
> INTERNAL: Workflow skill used by /morph
|
|
12
|
+
> INTERNAL: Workflow skill used by /morph-proposal during automated phase orchestration. Not a user command.
|
|
13
13
|
|
|
14
14
|
Eliminate spec ambiguities through an iterative question loop until the spec has sufficient quality to generate tasks.
|
|
15
15
|
|
|
@@ -224,11 +224,11 @@ npx morph-spec state mark-output $ARGUMENTS clarifications
|
|
|
224
224
|
|
|
225
225
|
## Phase Outputs
|
|
226
226
|
|
|
227
|
-
<!-- morph
|
|
227
|
+
<!-- morph-outputs:clarify -->
|
|
228
228
|
| Output | Path |
|
|
229
229
|
|--------|------|
|
|
230
230
|
| `clarifications` | `.morph/features/{feature}/1-design/clarifications.md` |
|
|
231
|
-
<!-- /morph
|
|
231
|
+
<!-- /morph-outputs -->
|
|
232
232
|
|
|
233
233
|
## Advancement Criteria
|
|
234
234
|
|
|
@@ -1,9 +1,9 @@
|
|
|
1
1
|
---
|
|
2
|
-
name: morph
|
|
2
|
+
name: morph-phase-codebase-analysis
|
|
3
3
|
description: MORPH-SPEC Design sub-phase that analyzes existing codebase and database schema, producing schema-analysis.md with real column names, types, relationships, and field mismatches. Use at the start of Design phase before generating contracts.cs to prevent incorrect field names or types.
|
|
4
4
|
user-invocable: false
|
|
5
5
|
allowed-tools: Read, Write, Edit, Bash, Glob, Grep, AskUserQuestion
|
|
6
|
-
cliVersion: "4.10.
|
|
6
|
+
cliVersion: "4.10.6"
|
|
7
7
|
---
|
|
8
8
|
|
|
9
9
|
# MORPH Codebase Analysis - Design Sub-phase
|
|
@@ -1,15 +1,15 @@
|
|
|
1
1
|
---
|
|
2
|
-
name: morph
|
|
2
|
+
name: morph-phase-design
|
|
3
3
|
description: MORPH-SPEC Phase 2 (Design). Schema-first interactive design: reads EF models/Supabase/DB, validates findings with user, then routes to VSA Blueprint or DDD Architecture Blueprint based on config.architecture.style, producing spec.md, contracts.cs, schema-analysis.md, and decisions.md through a quality loop (score 0-100). Use after setup phase to create technical specifications grounded in the real database schema.
|
|
4
4
|
argument-hint: "[feature-name]"
|
|
5
5
|
user-invocable: false
|
|
6
6
|
allowed-tools: Read, Write, Edit, Bash, Glob, Grep, AskUserQuestion, Agent
|
|
7
|
-
cliVersion: "4.10.
|
|
7
|
+
cliVersion: "4.10.6"
|
|
8
8
|
---
|
|
9
9
|
|
|
10
10
|
# MORPH Design — Phase 2
|
|
11
11
|
|
|
12
|
-
> INTERNAL: Workflow skill used by /morph
|
|
12
|
+
> INTERNAL: Workflow skill used by /morph-proposal during automated phase orchestration. Not a user command.
|
|
13
13
|
|
|
14
14
|
Schema-first interactive design: read the real schema, validate with user, generate blueprint, produce artifacts through a quality loop.
|
|
15
15
|
|
|
@@ -485,7 +485,7 @@ npx morph-spec state set $ARGUMENTS costs.estimated {X.XX}
|
|
|
485
485
|
|
|
486
486
|
---
|
|
487
487
|
|
|
488
|
-
<!-- morph
|
|
488
|
+
<!-- morph-outputs:design -->
|
|
489
489
|
| Output | Path |
|
|
490
490
|
|--------|------|
|
|
491
491
|
| `schemaAnalysis` | `.morph/features/{feature}/1-design/schema-analysis.md` |
|
|
@@ -494,6 +494,6 @@ npx morph-spec state set $ARGUMENTS costs.estimated {X.XX}
|
|
|
494
494
|
| `contractsTs` | `.morph/features/{feature}/1-design/contracts.ts` |
|
|
495
495
|
| `contractsVsa` | `.morph/features/{feature}/1-design/contracts-vsa.cs` |
|
|
496
496
|
| `decisions` | `.morph/features/{feature}/1-design/decisions.md` |
|
|
497
|
-
<!-- /morph
|
|
497
|
+
<!-- /morph-outputs -->
|
|
498
498
|
|
|
499
499
|
Continue automatically to Phase 3 (Clarify) after approval.
|
|
@@ -1,18 +1,17 @@
|
|
|
1
1
|
---
|
|
2
|
-
name: morph
|
|
2
|
+
name: morph-phase-implement
|
|
3
3
|
description: MORPH-SPEC Phase 5 (Implement). Executes feature tasks using TDD with checkpoint validation every 3 tasks, smoke tests via Playwright, and generates code + recap.md. Use after task list approval when starting feature implementation.
|
|
4
4
|
argument-hint: "[feature-name]"
|
|
5
|
-
disable-model-invocation: true
|
|
6
5
|
context: fork
|
|
7
6
|
agent: general-purpose
|
|
8
7
|
user-invocable: false
|
|
9
|
-
cliVersion: "4.10.
|
|
8
|
+
cliVersion: "4.10.6"
|
|
10
9
|
allowed-tools: Read, Write, Edit, Bash, Glob, Grep, AskUserQuestion, Agent
|
|
11
10
|
---
|
|
12
11
|
|
|
13
12
|
# MORPH Implement — Phase 5
|
|
14
13
|
|
|
15
|
-
> INTERNAL: Workflow skill used by /morph
|
|
14
|
+
> INTERNAL: Workflow skill used by /morph-apply during automated phase orchestration. Not a user command.
|
|
16
15
|
|
|
17
16
|
Implement the tasks defined in Phase 4, with checkpoints every 3 tasks and a final recap.
|
|
18
17
|
|
|
@@ -98,7 +97,7 @@ Before starting tasks, verify that MCPs needed for the implement phase are worki
|
|
|
98
97
|
Use `AskUserQuestion` with header `"{MCP}"` and options:
|
|
99
98
|
- **Continue without {MCP}** — Show `fallback` from registry. Implementation will use the fallback automatically.
|
|
100
99
|
- **Reconfigure credentials** — Collect credentials and update `.claude/settings.local.json`. Re-test after reconfiguring.
|
|
101
|
-
- **Stop implementation** — Abort. User must fix the MCP and re-run `/morph
|
|
100
|
+
- **Stop implementation** — Abort. User must fix the MCP and re-run `/morph-apply`.
|
|
102
101
|
|
|
103
102
|
> **Design:** This check is fail-open — consistent with morph-spec philosophy. The user gets explicit choice instead of tasks failing silently.
|
|
104
103
|
|
|
@@ -461,11 +460,11 @@ Agent(subagent_type=standards-architect, prompt=<filled prompts/code-quality-rev
|
|
|
461
460
|
|
|
462
461
|
## Phase Outputs
|
|
463
462
|
|
|
464
|
-
<!-- morph
|
|
463
|
+
<!-- morph-outputs:implement -->
|
|
465
464
|
| Output | Path |
|
|
466
465
|
|--------|------|
|
|
467
466
|
| `recap` | `.morph/features/{feature}/5-implement/recap.md` |
|
|
468
|
-
<!-- /morph
|
|
467
|
+
<!-- /morph-outputs -->
|
|
469
468
|
|
|
470
469
|
---
|
|
471
470
|
|
|
@@ -1,16 +1,15 @@
|
|
|
1
1
|
---
|
|
2
|
-
name: morph
|
|
2
|
+
name: morph-phase-plan
|
|
3
3
|
description: MORPH-SPEC Phase 4 (Plan). Generates a detailed implementation plan with exact file paths, TDD code blocks, and execution strategy analysis. Produces plan.md in 3-plan/. Use after clarify phase to create an actionable implementation plan before task breakdown.
|
|
4
4
|
argument-hint: "[feature-name]"
|
|
5
|
-
disable-model-invocation: true
|
|
6
5
|
user-invocable: false
|
|
7
6
|
allowed-tools: Read, Write, Edit, Bash, Glob, Grep, AskUserQuestion
|
|
8
|
-
cliVersion: "4.10.
|
|
7
|
+
cliVersion: "4.10.6"
|
|
9
8
|
---
|
|
10
9
|
|
|
11
10
|
# MORPH Plan — Phase 4
|
|
12
11
|
|
|
13
|
-
> INTERNAL: Workflow skill used by /morph
|
|
12
|
+
> INTERNAL: Workflow skill used by /morph-proposal during automated phase orchestration. Not a user command.
|
|
14
13
|
|
|
15
14
|
Generate a detailed implementation plan with exact paths, TDD code, and execution strategy.
|
|
16
15
|
|
|
@@ -118,7 +117,7 @@ Create `.morph/features/$ARGUMENTS/3-plan/plan.md` with this structure:
|
|
|
118
117
|
```markdown
|
|
119
118
|
# {Feature Name} Implementation Plan
|
|
120
119
|
|
|
121
|
-
> **For Claude:** Use morph
|
|
120
|
+
> **For Claude:** Use morph-phase-implement to execute this plan.
|
|
122
121
|
|
|
123
122
|
**Goal:** {One sentence describing what will be built}
|
|
124
123
|
|
|
@@ -223,11 +222,11 @@ Use `AskUserQuestion` to capture approval before advancing. This gate prevents t
|
|
|
223
222
|
|
|
224
223
|
## Phase Outputs
|
|
225
224
|
|
|
226
|
-
<!-- morph
|
|
225
|
+
<!-- morph-outputs:plan -->
|
|
227
226
|
| Output | Path |
|
|
228
227
|
|--------|------|
|
|
229
228
|
| `plan` | `.morph/features/{feature}/3-plan/plan.md` |
|
|
230
|
-
<!-- /morph
|
|
229
|
+
<!-- /morph-outputs -->
|
|
231
230
|
|
|
232
231
|
---
|
|
233
232
|
|
|
@@ -1,15 +1,15 @@
|
|
|
1
1
|
---
|
|
2
|
-
name: morph
|
|
2
|
+
name: morph-phase-setup
|
|
3
3
|
description: MORPH-SPEC Phase 1 (Setup). Reads project context, detects tech stack, activates relevant agents by reading agents.json, and confirms the feature environment. Use at the start of every MORPH-SPEC feature workflow after proposal approval to load standards and initialize the context.
|
|
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.10.
|
|
7
|
+
cliVersion: "4.10.6"
|
|
8
8
|
---
|
|
9
9
|
|
|
10
10
|
# MORPH Setup — Phase 1
|
|
11
11
|
|
|
12
|
-
> INTERNAL: Workflow skill used by /morph
|
|
12
|
+
> INTERNAL: Workflow skill used by /morph-proposal during automated phase orchestration. Not a user command.
|
|
13
13
|
|
|
14
14
|
Initialize the context and prepare the environment for an approved feature.
|
|
15
15
|
|
|
@@ -139,7 +139,7 @@ Use `AskUserQuestion` with header `"{MCP}"` and options:
|
|
|
139
139
|
|
|
140
140
|
**4. For MCPs RECOMMENDED but NOT CONFIGURED:**
|
|
141
141
|
- Print `△ {MCP} — not configured (fallback: {registry.fallback})`
|
|
142
|
-
- Suggestion: `Tip: configure with /morph
|
|
142
|
+
- Suggestion: `Tip: configure with /morph-init refresh or npx morph-spec mcp setup`
|
|
143
143
|
|
|
144
144
|
**Summary:** Show a status table for each MCP before proceeding:
|
|
145
145
|
```
|
|
@@ -161,10 +161,10 @@ npx morph-spec doctor 2>&1 | grep -A 1 "agents completeness"
|
|
|
161
161
|
|
|
162
162
|
If the output shows **missing agents**, inform the user:
|
|
163
163
|
|
|
164
|
-
> ⚠ Some agents for your stack are not installed. Run `npx morph-spec
|
|
164
|
+
> ⚠ Some agents for your stack are not installed. Run `npx morph-spec setup-infra` to install them.
|
|
165
165
|
|
|
166
166
|
Use `AskUserQuestion` with header `"Agents"` and options:
|
|
167
|
-
- **Install now** — run `npx morph-spec
|
|
167
|
+
- **Install now** — run `npx morph-spec setup-infra` to reinstall with current stack tags
|
|
168
168
|
- **Continue without** — proceed with available agents (may lack specialized support)
|
|
169
169
|
|
|
170
170
|
If "Install now" is selected, run the command and continue.
|
|
@@ -1,16 +1,15 @@
|
|
|
1
1
|
---
|
|
2
|
-
name: morph
|
|
2
|
+
name: morph-phase-tasks
|
|
3
3
|
description: MORPH-SPEC Phase 4 (Tasks). Breaks approved spec into bottom-up ordered implementation tasks (T001...TXXX) with dependencies, checkpoints every 3 tasks, and effort estimates, producing tasks.md. Use after design and clarification phases to create a structured implementation plan before coding starts.
|
|
4
4
|
argument-hint: "[feature-name]"
|
|
5
|
-
disable-model-invocation: true
|
|
6
5
|
user-invocable: false
|
|
7
6
|
allowed-tools: Read, Write, Edit, Bash, Glob, Grep, AskUserQuestion
|
|
8
|
-
cliVersion: "4.10.
|
|
7
|
+
cliVersion: "4.10.6"
|
|
9
8
|
---
|
|
10
9
|
|
|
11
10
|
# MORPH Tasks — Phase 4
|
|
12
11
|
|
|
13
|
-
> INTERNAL: Workflow skill used by /morph
|
|
12
|
+
> INTERNAL: Workflow skill used by /morph-proposal during automated phase orchestration. Not a user command.
|
|
14
13
|
|
|
15
14
|
Break the approved specification into executable tasks, define execution order, and establish checkpoints.
|
|
16
15
|
|
|
@@ -301,12 +300,12 @@ Use `AskUserQuestion` to capture explicit approval before advancing. This gate p
|
|
|
301
300
|
|
|
302
301
|
## Phase Outputs
|
|
303
302
|
|
|
304
|
-
<!-- morph
|
|
303
|
+
<!-- morph-outputs:tasks -->
|
|
305
304
|
| Output | Path |
|
|
306
305
|
|--------|------|
|
|
307
306
|
| `tasks` | `.morph/features/{feature}/4-tasks/tasks.md` |
|
|
308
|
-
<!-- /morph
|
|
307
|
+
<!-- /morph-outputs -->
|
|
309
308
|
|
|
310
309
|
---
|
|
311
310
|
|
|
312
|
-
After approval: "Planning complete! Run `/morph
|
|
311
|
+
After approval: "Planning complete! Run `/morph-apply $ARGUMENTS` to start implementation."
|
|
@@ -1,15 +1,15 @@
|
|
|
1
1
|
---
|
|
2
|
-
name: morph
|
|
2
|
+
name: morph-phase-uiux
|
|
3
3
|
description: MORPH-SPEC Phase 1.5 (UI/UX). Creates design-system.md, mockups.md, components.md, and flows.md using Playwright/Context7 MCPs. Use after setup for features with frontend UI components, pages, dashboards, forms, wizards, or visual interactions requiring design documentation.
|
|
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.10.
|
|
7
|
+
cliVersion: "4.10.6"
|
|
8
8
|
---
|
|
9
9
|
|
|
10
10
|
# MORPH UI/UX Design - Phase 1.5
|
|
11
11
|
|
|
12
|
-
> INTERNAL: Workflow skill used by /morph
|
|
12
|
+
> INTERNAL: Workflow skill used by /morph-proposal during automated phase orchestration. Not a user command.
|
|
13
13
|
|
|
14
14
|
Conditional phase for features with front-end. Collects UI/UX requirements, generates wireframes, component specs, and user flows.
|
|
15
15
|
|
|
@@ -310,14 +310,14 @@ Use `AskUserQuestion` to capture explicit approval before advancing:
|
|
|
310
310
|
|
|
311
311
|
## Phase Outputs
|
|
312
312
|
|
|
313
|
-
<!-- morph
|
|
313
|
+
<!-- morph-outputs:uiux -->
|
|
314
314
|
| Output | Path |
|
|
315
315
|
|--------|------|
|
|
316
316
|
| `uiDesignSystem` | `.morph/features/{feature}/2-ui/design-system.md` |
|
|
317
317
|
| `uiMockups` | `.morph/features/{feature}/2-ui/mockups.md` |
|
|
318
318
|
| `uiComponents` | `.morph/features/{feature}/2-ui/components.md` |
|
|
319
319
|
| `uiFlows` | `.morph/features/{feature}/2-ui/flows.md` |
|
|
320
|
-
<!-- /morph
|
|
320
|
+
<!-- /morph-outputs -->
|
|
321
321
|
|
|
322
322
|
---
|
|
323
323
|
|
|
@@ -1,10 +1,10 @@
|
|
|
1
1
|
---
|
|
2
|
-
name: morph
|
|
2
|
+
name: morph-scope-escalation
|
|
3
3
|
description: Guided workflow for mid-implementation scope escalation — analyzes complexity discovery, recommends action, and executes phase regression or task expansion
|
|
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.10.
|
|
7
|
+
cliVersion: "4.10.6"
|
|
8
8
|
---
|
|
9
9
|
|
|
10
10
|
# Scope Escalation Workflow
|
|
@@ -133,7 +133,7 @@ npx morph-spec scope escalate <feature> --task <id> --reason "<reason>" --target
|
|
|
133
133
|
|
|
134
134
|
After escalation:
|
|
135
135
|
|
|
136
|
-
- **If regressed to tasks:** "Re-analyze the affected tasks. Rewrite tasks.md with accurate scope. Run `/morph
|
|
136
|
+
- **If regressed to tasks:** "Re-analyze the affected tasks. Rewrite tasks.md with accurate scope. Run `/morph-proposal <feature>` to continue from the tasks phase."
|
|
137
137
|
- **If regressed to design:** "Re-analyze the spec. Update spec.md with the discovered architecture. Then regenerate tasks."
|
|
138
138
|
- **If expanded:** "Continue implementing. Use `morph-spec task start <feature> <sub-task-id>` to start the first sub-task."
|
|
139
139
|
|
|
@@ -406,7 +406,7 @@ morph-spec state set {feature} workflow full-morph
|
|
|
406
406
|
|
|
407
407
|
```bash
|
|
408
408
|
# FASES 0-4: Single Claude session
|
|
409
|
-
/morph
|
|
409
|
+
/morph-proposal scheduled-reports
|
|
410
410
|
# ... proposal approved, design approved, tasks generated ...
|
|
411
411
|
|
|
412
412
|
# FASE 5: Create agent team
|
package/package.json
CHANGED
|
@@ -707,7 +707,7 @@ export async function doctorCommand(options = {}) {
|
|
|
707
707
|
checks.push({
|
|
708
708
|
name: 'agents completeness',
|
|
709
709
|
status: 'warn',
|
|
710
|
-
msg: `${missing.length} agent(s) missing for [${projectTags.join(', ')}]: ${names} — run morph-spec
|
|
710
|
+
msg: `${missing.length} agent(s) missing for [${projectTags.join(', ')}]: ${names} — run morph-spec setup-infra`
|
|
711
711
|
});
|
|
712
712
|
hasWarnings = true;
|
|
713
713
|
} else {
|
|
@@ -780,7 +780,7 @@ export async function doctorCommand(options = {}) {
|
|
|
780
780
|
} catch { /* non-fatal */ }
|
|
781
781
|
|
|
782
782
|
// ── Claude Code Plugins ──────────────────────────────────────────────────
|
|
783
|
-
console.log(chalk.cyan('\n Claude Code Plugins (required for /morph
|
|
783
|
+
console.log(chalk.cyan('\n Claude Code Plugins (required for /morph-init)'));
|
|
784
784
|
const pluginsFile = join(homedir(), '.claude', 'plugins', 'installed_plugins.json');
|
|
785
785
|
let pluginData = { plugins: {} };
|
|
786
786
|
try {
|
|
@@ -871,7 +871,7 @@ export async function doctorCommand(options = {}) {
|
|
|
871
871
|
logger.blank();
|
|
872
872
|
|
|
873
873
|
if (hasErrors) {
|
|
874
|
-
logger.error('Some checks failed. Run "morph-spec
|
|
874
|
+
logger.error('Some checks failed. Run "morph-spec setup-infra" to fix.');
|
|
875
875
|
process.exit(1);
|
|
876
876
|
} else if (hasWarnings) {
|
|
877
877
|
logger.warn('Some checks need attention.');
|
|
@@ -10,7 +10,7 @@ import {
|
|
|
10
10
|
writeJson,
|
|
11
11
|
writeFile
|
|
12
12
|
} from '../../utils/file-copier.js';
|
|
13
|
-
import { getInstalledCLIVersion } from '../../utils/version-checker.js';
|
|
13
|
+
import { getInstalledCLIVersion, checkProjectOutdated } from '../../utils/version-checker.js';
|
|
14
14
|
import { installClaudeHooks } from '../../utils/claude-settings-manager.js';
|
|
15
15
|
import inquirer from 'inquirer';
|
|
16
16
|
import { detectProject } from '../../lib/detectors/index.js';
|
|
@@ -27,6 +27,7 @@ import { setupInfra, installRulesForStack } from '../../scripts/setup-infra.js';
|
|
|
27
27
|
import { installSkills } from '../../utils/skills-installer.js';
|
|
28
28
|
import { installAgents, installDomainAgents } from '../../utils/agents-installer.js';
|
|
29
29
|
import { getProjectTags } from '../../lib/stack-filter.js';
|
|
30
|
+
import { updateCommand } from './update.js';
|
|
30
31
|
|
|
31
32
|
export async function initCommand(options) {
|
|
32
33
|
const targetPath = options.path || process.cwd();
|
|
@@ -39,7 +40,14 @@ export async function initCommand(options) {
|
|
|
39
40
|
const morphPath = join(targetPath, '.morph');
|
|
40
41
|
if (await pathExists(morphPath)) {
|
|
41
42
|
if (!options.force) {
|
|
42
|
-
|
|
43
|
+
// Check if project version is outdated — auto-update instead of blocking
|
|
44
|
+
const projectCheck = await checkProjectOutdated(targetPath);
|
|
45
|
+
if (projectCheck.isOutdated) {
|
|
46
|
+
logger.info(`MORPH already initialized (v${projectCheck.current}). Framework update available (v${projectCheck.cliVersion}).`);
|
|
47
|
+
logger.blank();
|
|
48
|
+
return updateCommand(options);
|
|
49
|
+
}
|
|
50
|
+
logger.warn('MORPH already initialized in this directory (up to date).');
|
|
43
51
|
logger.dim('Use --force to overwrite existing installation.');
|
|
44
52
|
process.exit(1);
|
|
45
53
|
}
|
|
@@ -415,7 +423,7 @@ export async function initCommand(options) {
|
|
|
415
423
|
// Suggest tutorial for first-time users
|
|
416
424
|
if (integrationsCreated) {
|
|
417
425
|
logger.blank();
|
|
418
|
-
logger.info('First time using morph-spec? Run `/morph
|
|
426
|
+
logger.info('First time using morph-spec? Run `/morph-proposal <feature>` to start a new feature.');
|
|
419
427
|
}
|
|
420
428
|
|
|
421
429
|
logger.blank();
|