@polymorphism-tech/morph-spec 4.9.0 → 4.10.1
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 +2 -2
- package/bin/morph-spec.js +30 -0
- package/bin/task-manager.js +34 -22
- package/claude-plugin.json +1 -1
- package/docs/CHEATSHEET.md +1 -1
- package/docs/QUICKSTART.md +1 -1
- package/framework/CLAUDE.md +35 -98
- package/framework/agents/backend/api-designer.md +3 -0
- package/framework/agents/backend/dotnet-senior.md +3 -0
- package/framework/agents/backend/ef-modeler.md +2 -0
- package/framework/agents/backend/hangfire-orchestrator.md +2 -0
- package/framework/agents/backend/ms-agent-expert.md +2 -0
- package/framework/agents/frontend/blazor-builder.md +2 -0
- package/framework/agents/frontend/nextjs-expert.md +2 -0
- package/framework/agents/infrastructure/azure-architect.md +2 -0
- package/framework/agents/infrastructure/azure-deploy-specialist.md +2 -0
- package/framework/agents/infrastructure/bicep-architect.md +2 -0
- package/framework/agents/infrastructure/container-specialist.md +2 -0
- package/framework/agents/infrastructure/devops-engineer.md +3 -0
- package/framework/agents/infrastructure/infra-architect.md +3 -0
- package/framework/agents/integrations/asaas-financial.md +2 -0
- package/framework/agents/integrations/azure-identity.md +2 -0
- package/framework/agents/integrations/clerk-auth.md +3 -0
- package/framework/agents/integrations/hangfire-integration.md +2 -0
- package/framework/agents/integrations/resend-email.md +2 -0
- package/framework/agents.json +37 -7
- package/framework/commands/commit.md +166 -0
- package/framework/commands/morph-apply.md +156 -155
- package/framework/commands/morph-archive.md +33 -27
- package/framework/commands/morph-infra.md +83 -77
- package/framework/commands/morph-preflight.md +97 -55
- package/framework/commands/morph-proposal.md +131 -58
- package/framework/commands/morph-status.md +36 -30
- package/framework/commands/morph-troubleshoot.md +68 -59
- package/framework/hooks/claude-code/notification/approval-reminder.js +3 -2
- package/framework/hooks/claude-code/post-tool-use/dispatch.js +154 -31
- package/framework/hooks/claude-code/post-tool-use/skill-reminder.js +7 -84
- package/framework/hooks/claude-code/post-tool-use/validator-feedback.js +8 -17
- package/framework/hooks/claude-code/pre-compact/save-morph-context.js +16 -3
- package/framework/hooks/claude-code/pre-tool-use/enforce-phase-writes.js +4 -3
- package/framework/hooks/claude-code/pre-tool-use/protect-spec-files.js +3 -2
- package/framework/hooks/claude-code/pre-tool-use/task-tracking-guard.js +60 -0
- package/framework/hooks/claude-code/session-start/inject-morph-context.js +55 -2
- package/framework/hooks/claude-code/session-start/post-compact-restore.js +41 -0
- package/framework/hooks/claude-code/stop/validate-completion.js +2 -15
- package/framework/hooks/claude-code/user-prompt/enrich-prompt.js +23 -5
- package/framework/hooks/shared/compact-restore.js +100 -0
- package/framework/hooks/shared/dispatch-helpers.js +116 -0
- package/framework/hooks/shared/phase-utils.js +9 -5
- package/framework/hooks/shared/state-reader.js +27 -3
- package/framework/phases.json +30 -7
- package/framework/rules/csharp-standards.md +3 -0
- package/framework/rules/frontend-standards.md +2 -0
- package/framework/rules/infrastructure-standards.md +3 -0
- package/framework/rules/morph-workflow.md +143 -86
- package/framework/rules/nextjs-standards.md +2 -0
- package/framework/rules/testing-standards.md +3 -0
- package/framework/skills/level-0-meta/mcp-registry.json +86 -51
- package/framework/skills/level-0-meta/morph-brainstorming/SKILL.md +139 -0
- package/framework/skills/level-0-meta/morph-checklist/SKILL.md +42 -19
- package/framework/skills/level-0-meta/{code-review → morph-code-review}/SKILL.md +8 -5
- package/framework/skills/level-0-meta/{code-review-nextjs → morph-code-review-nextjs}/SKILL.md +8 -6
- package/framework/skills/level-0-meta/morph-frontend-review/SKILL.md +362 -0
- package/framework/skills/level-0-meta/morph-init/SKILL.md +114 -20
- package/framework/skills/level-0-meta/morph-post-implementation/SKILL.md +362 -0
- package/framework/skills/level-0-meta/morph-replicate/SKILL.md +95 -87
- package/framework/skills/level-0-meta/{simulation-checklist → morph-simulation-checklist}/SKILL.md +24 -0
- package/framework/skills/level-0-meta/{tool-usage-guide → morph-tool-usage-guide}/SKILL.md +43 -43
- package/framework/skills/level-0-meta/{tool-usage-guide → morph-tool-usage-guide}/references/tools-per-phase.md +1 -2
- package/framework/skills/level-0-meta/{verification-before-completion → morph-verification-before-completion}/SKILL.md +23 -12
- package/framework/skills/level-0-meta/{verification-before-completion → morph-verification-before-completion}/scripts/check-phase-outputs.mjs +2 -2
- package/framework/skills/level-1-workflows/morph-phase-clarify/SKILL.md +247 -0
- package/framework/skills/level-1-workflows/morph-phase-codebase-analysis/SKILL.md +270 -0
- package/framework/skills/level-1-workflows/morph-phase-design/SKILL.md +499 -0
- 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 +472 -0
- package/framework/skills/level-1-workflows/morph-phase-implement/prompts/code-quality-reviewer-prompt.md +50 -0
- package/framework/skills/level-1-workflows/morph-phase-implement/prompts/implementer-prompt.md +45 -0
- package/framework/skills/level-1-workflows/morph-phase-implement/prompts/spec-reviewer-prompt.md +47 -0
- package/framework/skills/level-1-workflows/morph-phase-plan/SKILL.md +246 -0
- package/framework/skills/level-1-workflows/morph-phase-setup/SKILL.md +238 -0
- 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 +312 -0
- package/framework/skills/level-1-workflows/{phase-tasks → morph-phase-tasks}/scripts/validate-tasks.mjs +3 -3
- package/framework/skills/level-1-workflows/morph-phase-uiux/SKILL.md +324 -0
- package/framework/skills/level-1-workflows/morph-scope-escalation/SKILL.md +146 -0
- package/framework/standards/integration/mcp/mcp-tools.md +25 -7
- package/framework/templates/docs/onboarding.md +2 -2
- package/package.json +3 -4
- package/src/commands/agents/dispatch-agents.js +50 -3
- package/src/commands/mcp/mcp-setup.js +39 -2
- package/src/commands/phase/phase-reset.js +74 -0
- package/src/commands/project/doctor.js +26 -7
- package/src/commands/project/update.js +4 -4
- package/src/commands/scope/escalate.js +215 -0
- package/src/commands/state/advance-phase.js +27 -53
- package/src/commands/state/state.js +1 -1
- package/src/commands/task/expand.js +100 -0
- package/src/core/paths/output-schema.js +4 -3
- package/src/core/state/phase-state-machine.js +7 -4
- package/src/core/state/state-manager.js +4 -3
- package/src/lib/detectors/claude-config-detector.js +93 -347
- package/src/lib/detectors/design-system-detector.js +189 -189
- package/src/lib/detectors/index.js +155 -57
- package/src/lib/generators/context-generator.js +2 -2
- package/src/lib/installers/mcp-installer.js +37 -5
- package/src/lib/phase-chain/phase-validator.js +22 -16
- package/src/lib/scope/impact-analyzer.js +106 -0
- package/src/lib/stack-filter.js +58 -0
- package/src/lib/tasks/task-parser.js +1 -1
- package/src/lib/validators/shared/emit-validator-dispatch.js +64 -0
- package/src/scripts/setup-infra.js +68 -18
- package/src/utils/agents-installer.js +51 -17
- package/src/utils/claude-md-injector.js +90 -0
- package/src/utils/file-copier.js +0 -1
- package/src/utils/hooks-installer.js +16 -5
- package/src/utils/skills-installer.js +67 -7
- package/CLAUDE.md +0 -98
- package/framework/memory/patterns-learned.md +0 -766
- package/framework/skills/level-0-meta/brainstorming/SKILL.md +0 -137
- package/framework/skills/level-0-meta/frontend-review/SKILL.md +0 -359
- package/framework/skills/level-0-meta/post-implementation/SKILL.md +0 -362
- package/framework/skills/level-0-meta/terminal-title/SKILL.md +0 -61
- package/framework/skills/level-0-meta/terminal-title/scripts/set_title.sh +0 -65
- package/framework/skills/level-1-workflows/phase-clarify/SKILL.md +0 -216
- package/framework/skills/level-1-workflows/phase-codebase-analysis/SKILL.md +0 -252
- package/framework/skills/level-1-workflows/phase-design/SKILL.md +0 -383
- package/framework/skills/level-1-workflows/phase-implement/SKILL.md +0 -492
- package/framework/skills/level-1-workflows/phase-setup/SKILL.md +0 -195
- package/framework/skills/level-1-workflows/phase-tasks/SKILL.md +0 -271
- package/framework/skills/level-1-workflows/phase-uiux/SKILL.md +0 -286
- package/src/commands/project/index.js +0 -8
- package/src/core/index.js +0 -10
- package/src/core/state/index.js +0 -8
- package/src/core/templates/index.js +0 -9
- package/src/core/templates/template-data-sources.js +0 -325
- package/src/core/workflows/index.js +0 -7
- package/src/lib/detectors/config-detector.js +0 -223
- package/src/lib/detectors/standards-generator.js +0 -335
- package/src/lib/detectors/structure-detector.js +0 -275
- package/src/lib/monitor/agent-resolver.js +0 -144
- package/src/lib/monitor/renderer.js +0 -230
- package/src/lib/orchestration/index.js +0 -7
- package/src/lib/orchestration/team-orchestrator.js +0 -404
- package/src/sanitizer/context-sanitizer.js +0 -221
- package/src/sanitizer/patterns.js +0 -163
- package/src/writer/file-writer.js +0 -86
- /package/framework/skills/level-0-meta/{brainstorming → morph-brainstorming}/references/proposal-example.md +0 -0
- /package/framework/skills/level-0-meta/{code-review → morph-code-review}/references/review-example.md +0 -0
- /package/framework/skills/level-0-meta/{code-review → morph-code-review}/references/review-guidelines.md +0 -0
- /package/framework/skills/level-0-meta/{code-review → morph-code-review}/scripts/scan-csharp.mjs +0 -0
- /package/framework/skills/level-0-meta/{code-review-nextjs → morph-code-review-nextjs}/references/review-example-nextjs.md +0 -0
- /package/framework/skills/level-0-meta/{code-review-nextjs → morph-code-review-nextjs}/scripts/scan-nextjs.mjs +0 -0
- /package/framework/skills/level-0-meta/{frontend-review → morph-frontend-review}/scripts/scan-accessibility.mjs +0 -0
- /package/framework/skills/level-0-meta/{post-implementation → morph-post-implementation}/scripts/detect-dev-server.mjs +0 -0
- /package/framework/skills/level-0-meta/{post-implementation → morph-post-implementation}/scripts/detect-stack.mjs +0 -0
- /package/framework/skills/level-1-workflows/{phase-clarify → morph-phase-clarify}/references/clarifications-example.md +0 -0
- /package/framework/skills/level-1-workflows/{phase-design → morph-phase-design}/references/architecture-analysis-guide.md +0 -0
- /package/framework/skills/level-1-workflows/{phase-design → morph-phase-design}/references/spec-authoring-guide.md +0 -0
- /package/framework/skills/level-1-workflows/{phase-design → morph-phase-design}/references/spec-example.md +0 -0
- /package/framework/skills/level-1-workflows/{phase-implement → morph-phase-implement}/references/recap-example.md +0 -0
- /package/framework/skills/level-1-workflows/{phase-implement → morph-phase-implement}/references/vsa-implementation-guide.md +0 -0
- /package/framework/skills/level-1-workflows/{phase-tasks → morph-phase-tasks}/references/task-planning-patterns.md +0 -0
- /package/framework/skills/level-1-workflows/{phase-tasks → morph-phase-tasks}/references/tasks-example.md +0 -0
|
@@ -1,122 +1,195 @@
|
|
|
1
|
+
---
|
|
2
|
+
description: MORPH Spec Pipeline — creates or resumes feature planning through phases 0-6 with mandatory approval pauses. Use whenever the user wants to plan, spec, or design a new feature, or when they say /morph-proposal. This is the primary entry point for all MORPH-SPEC feature work.
|
|
3
|
+
argument-hint: <feature-name>
|
|
4
|
+
allowed-tools: Read, Write, Edit, Bash, Glob, Grep, AskUserQuestion
|
|
5
|
+
---
|
|
6
|
+
|
|
1
7
|
# MORPH Spec Pipeline
|
|
2
8
|
|
|
3
|
-
|
|
9
|
+
Guide a feature through the full planning pipeline (proposal through tasks) with mandatory approval pauses at each gate.
|
|
4
10
|
|
|
5
11
|
---
|
|
6
12
|
|
|
7
13
|
## 1. Resume Logic
|
|
8
14
|
|
|
9
|
-
|
|
15
|
+
Check if the feature already has state:
|
|
10
16
|
|
|
11
17
|
```bash
|
|
12
18
|
npx morph-spec state get {feature-name}
|
|
13
19
|
```
|
|
14
20
|
|
|
15
|
-
- **
|
|
16
|
-
- **
|
|
21
|
+
- **Exists:** Read the current phase and resume from where it stopped (skip completed phases)
|
|
22
|
+
- **Does not exist:** Start from scratch (PHASE 0)
|
|
17
23
|
|
|
18
24
|
---
|
|
19
25
|
|
|
20
|
-
## 2.
|
|
26
|
+
## 2. PHASE 0: PROPOSAL
|
|
27
|
+
|
|
28
|
+
### Step 1: Load project context
|
|
29
|
+
|
|
30
|
+
Read these files to understand the project before writing anything:
|
|
31
|
+
- `.morph/context/README.md` — project overview, tech stack, architecture
|
|
32
|
+
- `.morph/config/config.json` — project configuration (language, workflow, architecture style)
|
|
33
|
+
|
|
34
|
+
### Step 2: Detect agents
|
|
35
|
+
|
|
36
|
+
Read `framework/agents.json` (or `.morph/framework/agents.json` in client projects). For each agent:
|
|
37
|
+
1. Check if `always_active: true` — include automatically
|
|
38
|
+
2. Compare agent `keywords[]` and `domains[]` against the feature description — include on match
|
|
39
|
+
3. **Document false-positive exclusions**: for agents that match on keywords but are irrelevant to this feature, note why they were excluded (this helps audit agent selection later)
|
|
40
|
+
|
|
41
|
+
Register each selected agent:
|
|
42
|
+
```bash
|
|
43
|
+
npx morph-spec state add-agent {feature-name} {agent-id}
|
|
44
|
+
```
|
|
45
|
+
|
|
46
|
+
### Step 3: Determine if UI/UX phase is needed
|
|
47
|
+
|
|
48
|
+
If `ui-designer` is among the selected agents, the feature will trigger the UI/UX phase later. Note this decision — it affects the pipeline path.
|
|
49
|
+
|
|
50
|
+
### Step 4: Create proposal
|
|
21
51
|
|
|
22
|
-
|
|
52
|
+
Read the proposal template at `framework/templates/docs/proposal.md` first, then create:
|
|
53
|
+
|
|
54
|
+
```
|
|
55
|
+
.morph/features/{feature-name}/
|
|
56
|
+
0-proposal/proposal.md
|
|
57
|
+
```
|
|
23
58
|
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
59
|
+
Fill every section of the template. In particular:
|
|
60
|
+
- **Metadata table**: date, author, status, priority, stack
|
|
61
|
+
- **Problem Statement**: use the What/Who/Impact structure from the template
|
|
62
|
+
- **Proposed Solution**: technical approach, key features, user journey
|
|
63
|
+
- **Success Metrics**: quantified current vs target values
|
|
64
|
+
- **Scope**: explicit In Scope, Out of Scope, and Future Considerations
|
|
65
|
+
- **Risks**: table with likelihood, impact, mitigation
|
|
66
|
+
- **Dependencies**: checklist of prerequisites
|
|
67
|
+
- **Estimated Effort**: broken down by phase (in hours)
|
|
68
|
+
- **Questions & Clarifications**: seed 3-6 questions for the clarify phase — these become input for phase 3
|
|
28
69
|
|
|
29
|
-
|
|
30
|
-
- Para agentes com `skillPath` em agents.json, consulte o Skill correspondente
|
|
31
|
-
- Use conhecimento dos skills para enriquecer a proposta
|
|
70
|
+
### Step 5: Register state
|
|
32
71
|
|
|
33
|
-
|
|
72
|
+
```bash
|
|
73
|
+
npx morph-spec state init {feature-name}
|
|
74
|
+
npx morph-spec state set {feature-name} status draft
|
|
75
|
+
npx morph-spec state mark-output {feature-name} proposal
|
|
76
|
+
```
|
|
34
77
|
|
|
35
|
-
|
|
36
|
-
```
|
|
37
|
-
.morph/features/{feature-name}/
|
|
38
|
-
├── 0-proposal/proposal.md
|
|
39
|
-
├── 1-design/spec.md (iniciar)
|
|
40
|
-
└── 3-tasks/tasks.md (iniciar)
|
|
41
|
-
```
|
|
78
|
+
### MANDATORY PAUSE
|
|
42
79
|
|
|
43
|
-
|
|
80
|
+
Use `AskUserQuestion` to present the approval gate with these elements:
|
|
44
81
|
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
npx morph-spec state mark-output {feature-name} proposal
|
|
50
|
-
# Adicionar cada agente detectado:
|
|
51
|
-
npx morph-spec state add-agent {feature-name} {agent-id}
|
|
52
|
-
```
|
|
82
|
+
1. **Proposal summary** — 3-4 sentence overview of what was proposed
|
|
83
|
+
2. **Agents activated** — table showing agent ID, tier, role, and why selected
|
|
84
|
+
3. **Effort estimate** — total hours from the proposal
|
|
85
|
+
4. **Key decisions pending** — 2-3 design decisions that will be resolved in the design phase
|
|
53
86
|
|
|
54
|
-
|
|
87
|
+
Options: Approve proposal / Request changes / Reject
|
|
55
88
|
|
|
56
|
-
|
|
89
|
+
After approval:
|
|
90
|
+
```bash
|
|
91
|
+
npx morph-spec approve {feature-name} proposal
|
|
92
|
+
npx morph-spec phase advance {feature-name}
|
|
93
|
+
```
|
|
57
94
|
|
|
58
95
|
---
|
|
59
96
|
|
|
60
|
-
## 3.
|
|
97
|
+
## 3. PHASE 1: SETUP (automatic, no pause)
|
|
61
98
|
|
|
62
|
-
|
|
99
|
+
Invoke the `morph-phase-setup` skill.
|
|
63
100
|
|
|
64
|
-
|
|
101
|
+
Summary: load project context, confirm stack, list active agents, update state.
|
|
65
102
|
|
|
66
|
-
**
|
|
103
|
+
**No pause here.** Continue automatically to the next phase.
|
|
67
104
|
|
|
68
105
|
---
|
|
69
106
|
|
|
70
|
-
## 4.
|
|
107
|
+
## 4. PHASE 1.5: UI/UX (conditional)
|
|
71
108
|
|
|
72
|
-
|
|
73
|
-
- **
|
|
74
|
-
- **
|
|
109
|
+
Check if `ui-designer` is in `activeAgents`:
|
|
110
|
+
- **Yes:** Invoke the `morph-phase-uiux` skill. **MANDATORY PAUSE** after generating UI deliverables.
|
|
111
|
+
- **No:** Skip to PHASE 2.
|
|
112
|
+
|
|
113
|
+
After approval:
|
|
114
|
+
```bash
|
|
115
|
+
npx morph-spec approve {feature-name} uiux
|
|
116
|
+
npx morph-spec phase advance {feature-name}
|
|
117
|
+
```
|
|
75
118
|
|
|
76
119
|
---
|
|
77
120
|
|
|
78
|
-
## 5.
|
|
121
|
+
## 5. PHASE 2: DESIGN
|
|
79
122
|
|
|
80
|
-
|
|
123
|
+
Invoke the `morph-phase-design` skill.
|
|
81
124
|
|
|
82
|
-
|
|
125
|
+
Summary: generate spec.md, contracts.cs (or contracts-vsa.cs for VSA), decisions.md with ADRs.
|
|
83
126
|
|
|
84
|
-
###
|
|
127
|
+
### MANDATORY PAUSE
|
|
85
128
|
|
|
86
|
-
|
|
129
|
+
Present: spec, contracts, decisions, effort estimate. Use `AskUserQuestion` with options: Approve design / Adjust scope / Modify contracts.
|
|
130
|
+
|
|
131
|
+
After approval:
|
|
132
|
+
```bash
|
|
133
|
+
npx morph-spec approve {feature-name} design
|
|
134
|
+
npx morph-spec phase advance {feature-name}
|
|
135
|
+
```
|
|
87
136
|
|
|
88
137
|
---
|
|
89
138
|
|
|
90
|
-
## 6.
|
|
139
|
+
## 6. PHASE 3: CLARIFY (interactive)
|
|
91
140
|
|
|
92
|
-
|
|
141
|
+
Invoke the `morph-phase-clarify` skill.
|
|
93
142
|
|
|
94
|
-
|
|
143
|
+
Summary: identify ambiguities in spec.md, generate 3-7 targeted questions (building on the questions seeded in the proposal), wait for user answers, update spec with clarifications and edge cases.
|
|
95
144
|
|
|
96
|
-
**
|
|
145
|
+
**Wait for user responses before continuing.**
|
|
97
146
|
|
|
98
147
|
---
|
|
99
148
|
|
|
100
|
-
## 7.
|
|
149
|
+
## 7. PHASE 4: PLAN
|
|
150
|
+
|
|
151
|
+
Invoke the `morph-phase-plan` skill.
|
|
152
|
+
|
|
153
|
+
Summary: generate a detailed implementation plan with exact file paths, TDD structure, and context-aware execution strategy.
|
|
101
154
|
|
|
102
|
-
|
|
155
|
+
### MANDATORY PAUSE
|
|
103
156
|
|
|
104
|
-
|
|
157
|
+
Present: implementation plan with recommended strategy. Use `AskUserQuestion` with options: Approve plan / Adjust strategy / Modify plan.
|
|
105
158
|
|
|
106
|
-
|
|
159
|
+
After approval:
|
|
160
|
+
```bash
|
|
161
|
+
npx morph-spec approve {feature-name} plan
|
|
162
|
+
npx morph-spec phase advance {feature-name}
|
|
163
|
+
```
|
|
107
164
|
|
|
108
|
-
|
|
165
|
+
---
|
|
166
|
+
|
|
167
|
+
## 8. PHASE 5: TASKS
|
|
168
|
+
|
|
169
|
+
Invoke the `morph-phase-tasks` skill.
|
|
170
|
+
|
|
171
|
+
Summary: break spec into tasks T001-TXXX with dependencies, checkpoints, estimates.
|
|
172
|
+
|
|
173
|
+
### MANDATORY PAUSE
|
|
174
|
+
|
|
175
|
+
Present: task breakdown, execution order, total estimate. Use `AskUserQuestion` with options: Approve tasks / Reprioritize / Add or remove tasks.
|
|
176
|
+
|
|
177
|
+
After approval:
|
|
178
|
+
```bash
|
|
179
|
+
npx morph-spec approve {feature-name} tasks
|
|
180
|
+
npx morph-spec phase advance {feature-name}
|
|
181
|
+
```
|
|
109
182
|
|
|
110
183
|
---
|
|
111
184
|
|
|
112
|
-
##
|
|
185
|
+
## 9. Planning Complete
|
|
113
186
|
|
|
114
|
-
|
|
187
|
+
After task approval:
|
|
115
188
|
|
|
116
189
|
```
|
|
117
|
-
|
|
190
|
+
Planning complete! Run /morph-apply {feature-name} to start implementation.
|
|
118
191
|
```
|
|
119
192
|
|
|
120
193
|
---
|
|
121
194
|
|
|
122
|
-
**Feature
|
|
195
|
+
**Feature requested:** $ARGUMENTS
|
|
@@ -1,51 +1,57 @@
|
|
|
1
|
+
---
|
|
2
|
+
description: Show current MORPH project status and all features in development with their phases and approvals
|
|
3
|
+
argument-hint: [feature-name]
|
|
4
|
+
allowed-tools: Read, Bash
|
|
5
|
+
---
|
|
6
|
+
|
|
1
7
|
# MORPH Project Status
|
|
2
8
|
|
|
3
|
-
|
|
9
|
+
Show the current MORPH project status and features in development.
|
|
4
10
|
|
|
5
|
-
##
|
|
11
|
+
## Usage
|
|
6
12
|
|
|
7
|
-
**
|
|
13
|
+
**ALWAYS** use the state-manager CLI to get status:
|
|
8
14
|
|
|
9
15
|
```bash
|
|
10
16
|
npx morph-spec state list
|
|
11
17
|
```
|
|
12
18
|
|
|
13
|
-
|
|
14
|
-
-
|
|
15
|
-
-
|
|
16
|
-
-
|
|
17
|
-
-
|
|
18
|
-
-
|
|
19
|
+
This command automatically shows:
|
|
20
|
+
- All active features
|
|
21
|
+
- Current phase of each feature
|
|
22
|
+
- Task progress (X/Y)
|
|
23
|
+
- Active agents
|
|
24
|
+
- Estimated costs
|
|
19
25
|
|
|
20
|
-
##
|
|
26
|
+
## Additional Checks
|
|
21
27
|
|
|
22
|
-
### 1.
|
|
23
|
-
- [ ] `.morph/project.md`
|
|
24
|
-
- [ ] `.morph/config/config.json`
|
|
25
|
-
- [ ] `.morph/framework/standards/`
|
|
28
|
+
### 1. MORPH Configuration
|
|
29
|
+
- [ ] `.morph/project.md` exists and is filled in
|
|
30
|
+
- [ ] `.morph/config/config.json` configured
|
|
31
|
+
- [ ] `.morph/framework/standards/` present
|
|
26
32
|
|
|
27
|
-
### 2.
|
|
33
|
+
### 2. Specific Feature Details
|
|
28
34
|
|
|
29
|
-
|
|
35
|
+
To get detailed JSON for a feature:
|
|
30
36
|
|
|
31
37
|
```bash
|
|
32
38
|
npx morph-spec state get {feature-name}
|
|
33
39
|
```
|
|
34
40
|
|
|
35
|
-
### 3. Features
|
|
41
|
+
### 3. Archived Features
|
|
36
42
|
|
|
37
|
-
|
|
38
|
-
-
|
|
39
|
-
-
|
|
40
|
-
-
|
|
43
|
+
Check `.morph/archive/` manually if needed:
|
|
44
|
+
- How many features completed
|
|
45
|
+
- Total time spent
|
|
46
|
+
- Accumulated cost
|
|
41
47
|
|
|
42
|
-
### 4. Specs
|
|
48
|
+
### 4. Active Specs
|
|
43
49
|
|
|
44
|
-
|
|
50
|
+
Check `.morph/specs/` for consolidated specs.
|
|
45
51
|
|
|
46
52
|
## Output
|
|
47
53
|
|
|
48
|
-
|
|
54
|
+
The `npx morph-spec state list` command automatically generates a formatted dashboard:
|
|
49
55
|
|
|
50
56
|
```
|
|
51
57
|
╔════════════════════════════════════════════════════════════════╗
|
|
@@ -72,14 +78,14 @@ O comando `npx morph-spec state list` automaticamente gera um dashboard formatad
|
|
|
72
78
|
╚════════════════════════════════════════════════════════════════╝
|
|
73
79
|
```
|
|
74
80
|
|
|
75
|
-
**
|
|
81
|
+
**Simply run the command and show the result to the user.**
|
|
76
82
|
|
|
77
|
-
##
|
|
83
|
+
## Available Actions
|
|
78
84
|
|
|
79
|
-
|
|
80
|
-
- `/morph-proposal {feature}` -
|
|
81
|
-
- `/morph-apply {feature}` -
|
|
82
|
-
- `/morph-archive {feature}` -
|
|
85
|
+
Suggest next actions:
|
|
86
|
+
- `/morph-proposal {feature}` - Create a new feature
|
|
87
|
+
- `/morph-apply {feature}` - Implement a feature
|
|
88
|
+
- `/morph-archive {feature}` - Archive a completed feature
|
|
83
89
|
|
|
84
90
|
---
|
|
85
91
|
|
|
@@ -1,121 +1,130 @@
|
|
|
1
|
-
|
|
1
|
+
---
|
|
2
|
+
description: Find solutions for common .NET/Blazor/Azure development errors with root-cause analysis
|
|
3
|
+
argument-hint: "[error-message]"
|
|
4
|
+
allowed-tools: Read, Bash, Glob, Grep
|
|
5
|
+
---
|
|
6
|
+
|
|
7
|
+
# Troubleshoot - Find Solutions for Errors
|
|
2
8
|
|
|
3
|
-
|
|
9
|
+
Find solutions for common .NET/Blazor/Azure development errors and problems.
|
|
4
10
|
|
|
5
|
-
##
|
|
11
|
+
## Usage
|
|
6
12
|
|
|
7
13
|
```
|
|
8
|
-
/morph-troubleshoot <
|
|
14
|
+
/morph-troubleshoot <error description or keywords>
|
|
9
15
|
```
|
|
10
16
|
|
|
11
|
-
##
|
|
17
|
+
## Examples
|
|
12
18
|
|
|
13
19
|
```bash
|
|
14
20
|
/morph-troubleshoot blazor.web.js 404
|
|
15
21
|
/morph-troubleshoot DbContext second operation
|
|
16
22
|
/morph-troubleshoot Azure.Identity NU1605
|
|
17
|
-
/morph-troubleshoot Include
|
|
23
|
+
/morph-troubleshoot Include returns empty
|
|
18
24
|
/morph-troubleshoot PendingModelChanges
|
|
19
25
|
```
|
|
20
26
|
|
|
21
|
-
##
|
|
27
|
+
## 3-Level Workflow
|
|
22
28
|
|
|
23
|
-
###
|
|
29
|
+
### Level 1: Search Standards (Primary)
|
|
24
30
|
|
|
25
|
-
|
|
31
|
+
Search the known problems and standards files for matching patterns:
|
|
26
32
|
|
|
27
33
|
```bash
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
--category <cat> # Filtrar por categoria (blazor, efcore, azure)
|
|
32
|
-
--verbose # Mostrar conteúdo completo da solução
|
|
33
|
-
--list-categories # Listar categorias disponíveis
|
|
34
|
+
# Search in framework standards
|
|
35
|
+
Grep: "{keywords}" in framework/standards/ (glob: "*.md")
|
|
36
|
+
Grep: "{keywords}" in .morph/framework/standards/ (glob: "*.md")
|
|
34
37
|
```
|
|
35
38
|
|
|
36
|
-
|
|
39
|
+
Read matching files and extract the relevant solution sections.
|
|
40
|
+
|
|
41
|
+
### Level 2: Search Codebase (Automatic)
|
|
42
|
+
|
|
43
|
+
If standards don't cover the issue, search the codebase for the error pattern:
|
|
44
|
+
|
|
45
|
+
```bash
|
|
46
|
+
Grep: "{error pattern}" in src/ (glob: "*.cs,*.tsx,*.ts")
|
|
47
|
+
```
|
|
37
48
|
|
|
38
|
-
|
|
39
|
-
- `framework/standards/*.md`
|
|
40
|
-
- `.morph/framework/standards/*.md`
|
|
49
|
+
Check if similar patterns exist elsewhere in the codebase that work correctly.
|
|
41
50
|
|
|
42
|
-
###
|
|
51
|
+
### Level 3: Web Search (If needed)
|
|
43
52
|
|
|
44
|
-
**
|
|
53
|
+
**IMPORTANT:** If levels 1 and 2 don't find a solution, use Claude Code's native **WebSearch** tool to search the following sources:
|
|
45
54
|
|
|
46
|
-
**
|
|
55
|
+
**Recommended queries:**
|
|
47
56
|
|
|
48
57
|
```
|
|
49
58
|
# GitHub Issues (.NET)
|
|
50
|
-
site:github.com/dotnet/aspnetcore {
|
|
51
|
-
site:github.com/dotnet/efcore {
|
|
59
|
+
site:github.com/dotnet/aspnetcore {error}
|
|
60
|
+
site:github.com/dotnet/efcore {error}
|
|
52
61
|
|
|
53
62
|
# Stack Overflow
|
|
54
|
-
site:stackoverflow.com [blazor] {
|
|
55
|
-
site:stackoverflow.com [entity-framework-core] {
|
|
56
|
-
site:stackoverflow.com [azure] {
|
|
63
|
+
site:stackoverflow.com [blazor] {error}
|
|
64
|
+
site:stackoverflow.com [entity-framework-core] {error}
|
|
65
|
+
site:stackoverflow.com [azure] {error}
|
|
57
66
|
|
|
58
|
-
#
|
|
59
|
-
site:learn.microsoft.com {
|
|
60
|
-
site:learn.microsoft.com/azure {
|
|
67
|
+
# Microsoft Documentation
|
|
68
|
+
site:learn.microsoft.com {error}
|
|
69
|
+
site:learn.microsoft.com/azure {error}
|
|
61
70
|
```
|
|
62
71
|
|
|
63
|
-
**
|
|
72
|
+
**WebSearch usage example:**
|
|
64
73
|
|
|
65
|
-
|
|
66
|
-
1.
|
|
67
|
-
2.
|
|
68
|
-
3.
|
|
74
|
+
If the user asks about a SignalR error:
|
|
75
|
+
1. First: `npx morph-spec troubleshoot SignalR connection`
|
|
76
|
+
2. If not found: WebSearch with `site:github.com/dotnet/aspnetcore SignalR connection closed`
|
|
77
|
+
3. Return formatted relevant links
|
|
69
78
|
|
|
70
|
-
##
|
|
79
|
+
## Available Categories
|
|
71
80
|
|
|
72
|
-
|
|
|
81
|
+
| Category | Description |
|
|
73
82
|
|-----------|-----------|
|
|
74
|
-
| `blazor` | Blazor Server/WASM,
|
|
83
|
+
| `blazor` | Blazor Server/WASM, components, lifecycle, rendering |
|
|
75
84
|
| `efcore` | Entity Framework Core, DbContext, migrations, queries |
|
|
76
85
|
| `azure` | Azure services, deploy, identity, Key Vault |
|
|
77
86
|
| `auth` | Authentication, authorization, tokens, claims |
|
|
78
87
|
| `deploy` | Deployment, CI/CD, pipelines, containers |
|
|
79
88
|
|
|
80
|
-
##
|
|
89
|
+
## Output Format
|
|
81
90
|
|
|
82
|
-
|
|
91
|
+
When finding a solution, present in the following format:
|
|
83
92
|
|
|
84
93
|
```
|
|
85
94
|
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
|
|
86
95
|
|
|
87
|
-
🔴 CRITICAL: {
|
|
96
|
+
🔴 CRITICAL: {problem title}
|
|
88
97
|
|
|
89
|
-
📁
|
|
90
|
-
📂
|
|
98
|
+
📁 File: {path to file with solution}
|
|
99
|
+
📂 Section: {specific section}
|
|
91
100
|
|
|
92
|
-
❌
|
|
93
|
-
{
|
|
101
|
+
❌ Error:
|
|
102
|
+
{error pattern that identifies the problem}
|
|
94
103
|
|
|
95
|
-
💡
|
|
96
|
-
{
|
|
104
|
+
💡 Cause:
|
|
105
|
+
{root cause explanation}
|
|
97
106
|
|
|
98
|
-
✅
|
|
99
|
-
{
|
|
107
|
+
✅ Solution:
|
|
108
|
+
{code or steps to resolve}
|
|
100
109
|
|
|
101
|
-
📚
|
|
110
|
+
📚 See full: morph-spec read {file}
|
|
102
111
|
|
|
103
112
|
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
|
|
104
113
|
```
|
|
105
114
|
|
|
106
|
-
## Troubleshooting
|
|
115
|
+
## Quick Troubleshooting
|
|
107
116
|
|
|
108
|
-
###
|
|
117
|
+
### Most Common Problems
|
|
109
118
|
|
|
110
|
-
|
|
|
119
|
+
| Error | Quick Fix |
|
|
111
120
|
|------|----------------|
|
|
112
121
|
| `blazor.web.js 404` | `<RequiresAspNetWebAssets>true</RequiresAspNetWebAssets>` |
|
|
113
|
-
| `PendingModelChangesWarning` | `dotnet ef migrations add <Name>`
|
|
114
|
-
| `DbContext second operation` |
|
|
115
|
-
| `Include()
|
|
116
|
-
| `Azure.Identity NU1605` |
|
|
117
|
-
| `Key Vault
|
|
118
|
-
| `DefaultAzureCredential
|
|
122
|
+
| `PendingModelChangesWarning` | `dotnet ef migrations add <Name>` before update |
|
|
123
|
+
| `DbContext second operation` | Use `IDbContextFactory` for background tasks |
|
|
124
|
+
| `Include()` empty | Use `HasMany(x => x.Nav)` instead of `HasMany<T>()` |
|
|
125
|
+
| `Azure.Identity NU1605` | Specify explicit version in .csproj |
|
|
126
|
+
| `Key Vault won't load` | Don't condition on environment (IsDevelopment) |
|
|
127
|
+
| `DefaultAzureCredential slow` | Disable unused credentials |
|
|
119
128
|
|
|
120
129
|
---
|
|
121
130
|
|
|
@@ -10,7 +10,7 @@
|
|
|
10
10
|
* Fail-open: exits 0 on any error.
|
|
11
11
|
*/
|
|
12
12
|
|
|
13
|
-
import { stateExists, getActiveFeature, getPendingGates } from '../../shared/state-reader.js';
|
|
13
|
+
import { stateExists, getActiveFeature, getPendingGates, derivePhaseForFeature } from '../../shared/state-reader.js';
|
|
14
14
|
import { injectContext, pass } from '../../shared/hook-response.js';
|
|
15
15
|
import { logHookActivity } from '../../shared/activity-logger.js';
|
|
16
16
|
|
|
@@ -36,7 +36,8 @@ try {
|
|
|
36
36
|
implement: ['design', 'tasks']
|
|
37
37
|
};
|
|
38
38
|
|
|
39
|
-
const
|
|
39
|
+
const currentPhase = feature.phase || derivePhaseForFeature(name);
|
|
40
|
+
const relevantGates = phaseGateRelevance[currentPhase] || [];
|
|
40
41
|
const pendingRelevant = pending.filter(g => relevantGates.includes(g));
|
|
41
42
|
|
|
42
43
|
if (pendingRelevant.length === 0) pass();
|