@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
|
@@ -4,58 +4,61 @@ description: Simplified workflow for converting HTML prototypes into functional
|
|
|
4
4
|
user-invocable: true
|
|
5
5
|
argument-hint: "[feature-name] [prototype-path]"
|
|
6
6
|
allowed-tools: Read, Write, Edit, Bash, Glob, Grep
|
|
7
|
+
stacks:
|
|
8
|
+
- blazor
|
|
7
9
|
---
|
|
8
10
|
|
|
9
11
|
# MORPH Replicate — HTML to Blazor Conversion
|
|
10
12
|
|
|
11
|
-
>
|
|
12
|
-
> Use
|
|
13
|
+
> Simplified workflow for replicating HTML prototypes in Blazor.
|
|
14
|
+
> Use when you have a ready HTML prototype and need to convert it to functional Blazor code.
|
|
13
15
|
|
|
14
|
-
##
|
|
16
|
+
## Command
|
|
15
17
|
|
|
16
18
|
```bash
|
|
17
19
|
/morph:replicate {feature-name} {prototype-path}
|
|
18
20
|
```
|
|
19
21
|
|
|
20
|
-
**
|
|
22
|
+
**Example:**
|
|
21
23
|
```bash
|
|
22
24
|
/morph:replicate ui-redesign prototipo/
|
|
23
25
|
```
|
|
24
26
|
|
|
25
27
|
---
|
|
26
28
|
|
|
27
|
-
## Workflow
|
|
29
|
+
## Simplified Workflow
|
|
28
30
|
|
|
29
|
-
###
|
|
31
|
+
### PHASE 1: PROTOTYPE ANALYSIS
|
|
30
32
|
|
|
31
|
-
1. **
|
|
33
|
+
1. **Read all HTML files in `{prototype-path}/`**
|
|
32
34
|
```bash
|
|
33
|
-
#
|
|
35
|
+
# Find all HTML files
|
|
34
36
|
glob: {prototype-path}/**/*.html
|
|
35
|
-
glob: {prototype-path}/**/code.html #
|
|
37
|
+
glob: {prototype-path}/**/code.html # Common prototype pattern
|
|
36
38
|
```
|
|
37
39
|
|
|
38
|
-
2. **
|
|
39
|
-
- Layout (grid, flexbox,
|
|
40
|
-
-
|
|
41
|
-
-
|
|
42
|
-
-
|
|
43
|
-
-
|
|
44
|
-
-
|
|
40
|
+
2. **Extract patterns from each file:**
|
|
41
|
+
- Layout (grid, flexbox, structure)
|
|
42
|
+
- Components (cards, buttons, forms, modals)
|
|
43
|
+
- Colors (extract from inline styles and CSS)
|
|
44
|
+
- Fonts (font-family, sizes)
|
|
45
|
+
- Spacing (padding, margin, gap)
|
|
46
|
+
- CSS classes used
|
|
45
47
|
|
|
46
|
-
3. **
|
|
48
|
+
3. **Generate HTML → Blazor mapping:**
|
|
47
49
|
|
|
48
|
-
|
|
50
|
+
**Read the reference file first:** `references/blazor-html-mapping.md` — this contains the complete mapping table for HTML→Fluent UI and HTML→MudBlazor conversions. Load it before generating the prototype-specific mapping.
|
|
49
51
|
|
|
50
|
-
|
|
52
|
+
Then document the relevant mappings for this specific prototype, citing the reference:
|
|
51
53
|
```markdown
|
|
52
|
-
##
|
|
53
|
-
|
|
54
|
+
## HTML → Blazor Mapping (this prototype)
|
|
55
|
+
> Source: references/blazor-html-mapping.md
|
|
56
|
+
- <HTML element> → <BlazorComponent>
|
|
54
57
|
```
|
|
55
58
|
|
|
56
|
-
4. **
|
|
59
|
+
4. **Generate list of CSS classes to create:**
|
|
57
60
|
```markdown
|
|
58
|
-
##
|
|
61
|
+
## Required CSS Classes
|
|
59
62
|
|
|
60
63
|
- [ ] .page-layout
|
|
61
64
|
- [ ] .home-hero
|
|
@@ -65,72 +68,72 @@ allowed-tools: Read, Write, Edit, Bash, Glob, Grep
|
|
|
65
68
|
- [ ] .animate-slideInUp
|
|
66
69
|
```
|
|
67
70
|
|
|
68
|
-
**
|
|
71
|
+
**PAUSE:** Approve mapping and CSS list
|
|
69
72
|
|
|
70
73
|
---
|
|
71
74
|
|
|
72
|
-
###
|
|
75
|
+
### PHASE 2: TASKS (Screen List)
|
|
73
76
|
|
|
74
|
-
|
|
77
|
+
Generate screen list to implement in correct order:
|
|
75
78
|
|
|
76
79
|
```markdown
|
|
77
|
-
## Tasks
|
|
80
|
+
## Implementation Tasks
|
|
78
81
|
|
|
79
82
|
### T001: Setup Design System
|
|
80
|
-
-
|
|
81
|
-
-
|
|
82
|
-
-
|
|
83
|
-
|
|
84
|
-
### T002: {
|
|
85
|
-
-
|
|
86
|
-
-
|
|
87
|
-
-
|
|
83
|
+
- Create/update wwwroot/css/design-system.css
|
|
84
|
+
- Add all listed CSS classes
|
|
85
|
+
- Validate with `morph-spec validate`
|
|
86
|
+
|
|
87
|
+
### T002: {Screen Name 1}
|
|
88
|
+
- Read: {prototype-path}/{screen1}.html
|
|
89
|
+
- Create/Update: Pages/{Screen1}.razor
|
|
90
|
+
- Components: FluentCard, FluentButton, etc.
|
|
88
91
|
- CSS: .home-hero, .card-premium
|
|
89
92
|
|
|
90
|
-
### T003: {
|
|
91
|
-
-
|
|
92
|
-
-
|
|
93
|
+
### T003: {Screen Name 2}
|
|
94
|
+
- Read: {prototype-path}/{screen2}.html
|
|
95
|
+
- Create/Update: Pages/{Screen2}.razor
|
|
93
96
|
- ...
|
|
94
97
|
|
|
95
|
-
### TXXX:
|
|
96
|
-
-
|
|
98
|
+
### TXXX: Final Validation
|
|
99
|
+
- Full build
|
|
97
100
|
- `morph-spec validate`
|
|
98
|
-
-
|
|
101
|
+
- Test responsiveness
|
|
99
102
|
```
|
|
100
103
|
|
|
101
|
-
**
|
|
104
|
+
**PAUSE:** Approve task list
|
|
102
105
|
|
|
103
106
|
---
|
|
104
107
|
|
|
105
|
-
###
|
|
108
|
+
### PHASE 3: IMPLEMENT (Per Screen)
|
|
106
109
|
|
|
107
|
-
|
|
110
|
+
For each screen, follow this flow:
|
|
108
111
|
|
|
109
|
-
1. **
|
|
112
|
+
1. **Read prototype HTML**
|
|
110
113
|
```
|
|
111
|
-
Read: {prototype-path}/{
|
|
114
|
+
Read: {prototype-path}/{screen}.html
|
|
112
115
|
```
|
|
113
116
|
|
|
114
|
-
2. **
|
|
117
|
+
2. **Read current .razor file** (if exists)
|
|
115
118
|
```
|
|
116
|
-
Read: Pages/{
|
|
119
|
+
Read: Pages/{Screen}.razor
|
|
117
120
|
```
|
|
118
121
|
|
|
119
|
-
3. **
|
|
120
|
-
-
|
|
121
|
-
-
|
|
122
|
-
-
|
|
122
|
+
3. **Rewrite .razor using Fluent UI/MudBlazor**
|
|
123
|
+
- Keep prototype layout structure
|
|
124
|
+
- Replace HTML elements with Blazor components
|
|
125
|
+
- Apply design-system CSS classes
|
|
123
126
|
|
|
124
|
-
4. **
|
|
125
|
-
-
|
|
126
|
-
-
|
|
127
|
+
4. **Add CSS to design-system.css**
|
|
128
|
+
- If new class was used in .razor
|
|
129
|
+
- Follow naming pattern (prefix by page)
|
|
127
130
|
|
|
128
|
-
5. **Build
|
|
131
|
+
5. **Build to validate**
|
|
129
132
|
```bash
|
|
130
133
|
dotnet build
|
|
131
134
|
```
|
|
132
135
|
|
|
133
|
-
6. **
|
|
136
|
+
6. **Validate CSS**
|
|
134
137
|
```bash
|
|
135
138
|
morph-spec validate src/MyApp.Web
|
|
136
139
|
```
|
|
@@ -139,38 +142,43 @@ Para cada tela, seguir este fluxo:
|
|
|
139
142
|
|
|
140
143
|
## Outputs
|
|
141
144
|
|
|
142
|
-
|
|
145
|
+
All outputs go in `.morph/features/{feature-name}/5-implement/`:
|
|
143
146
|
|
|
144
|
-
|
|
|
145
|
-
|
|
146
|
-
| `.razor` files |
|
|
147
|
-
| `design-system.css` | CSS
|
|
148
|
-
| `recap.md` |
|
|
147
|
+
| File | Location | Description |
|
|
148
|
+
|---------|----------|-----------|
|
|
149
|
+
| `.razor` files | Project source (Pages/, Components/, Shared/) | Converted pages |
|
|
150
|
+
| `design-system.css` | `wwwroot/css/design-system.css` | Updated CSS |
|
|
151
|
+
| `recap.md` | `.morph/features/{feature-name}/5-implement/recap.md` | Implementation summary |
|
|
149
152
|
|
|
150
|
-
|
|
153
|
+
After completion, mark the output:
|
|
154
|
+
```bash
|
|
155
|
+
npx morph-spec state mark-output {feature-name} recap
|
|
156
|
+
```
|
|
157
|
+
|
|
158
|
+
**Does NOT generate:** proposal.md, spec.md, contracts.cs, tasks.md
|
|
151
159
|
|
|
152
160
|
---
|
|
153
161
|
|
|
154
|
-
##
|
|
162
|
+
## Execution Example
|
|
155
163
|
|
|
156
164
|
```markdown
|
|
157
165
|
/morph:replicate checkout-redesign prototipo/checkout/
|
|
158
166
|
|
|
159
|
-
📁
|
|
167
|
+
📁 Analyzing prototype in prototipo/checkout/...
|
|
160
168
|
|
|
161
|
-
**
|
|
169
|
+
**Files found:**
|
|
162
170
|
- step1-cart.html
|
|
163
171
|
- step2-payment.html
|
|
164
172
|
- step3-confirmation.html
|
|
165
173
|
|
|
166
|
-
**
|
|
174
|
+
**Extracted patterns:**
|
|
167
175
|
|
|
168
|
-
|
|
176
|
+
Colors:
|
|
169
177
|
- Primary: #FF6B35
|
|
170
178
|
- Secondary: #2D3047
|
|
171
179
|
- Background: #FAFAFA
|
|
172
180
|
|
|
173
|
-
|
|
181
|
+
CSS classes to create:
|
|
174
182
|
- [ ] .checkout-layout
|
|
175
183
|
- [ ] .checkout-steps
|
|
176
184
|
- [ ] .checkout-form
|
|
@@ -178,39 +186,39 @@ Classes CSS a criar:
|
|
|
178
186
|
- [ ] .payment-options
|
|
179
187
|
- [ ] .confirmation-message
|
|
180
188
|
|
|
181
|
-
|
|
189
|
+
HTML → Blazor Mapping:
|
|
182
190
|
- form.checkout-form → EditForm + FluentTextField
|
|
183
191
|
- div.payment-card → FluentCard
|
|
184
192
|
- button.btn-pay → FluentButton Accent
|
|
185
193
|
|
|
186
194
|
---
|
|
187
195
|
|
|
188
|
-
⛔ **
|
|
196
|
+
⛔ **MANDATORY PAUSE**
|
|
189
197
|
|
|
190
|
-
**
|
|
191
|
-
1. ✅
|
|
192
|
-
2. 🔄
|
|
193
|
-
3. 📋
|
|
198
|
+
**Next steps:**
|
|
199
|
+
1. ✅ Approve and generate implementation tasks
|
|
200
|
+
2. 🔄 Adjust mapping
|
|
201
|
+
3. 📋 See more component details
|
|
194
202
|
```
|
|
195
203
|
|
|
196
204
|
---
|
|
197
205
|
|
|
198
|
-
##
|
|
206
|
+
## When to Use
|
|
199
207
|
|
|
200
|
-
- ✅
|
|
201
|
-
- ✅ Design
|
|
202
|
-
- ✅
|
|
203
|
-
- ✅
|
|
208
|
+
- ✅ HTML prototype ready (hand-coded, exported, etc.)
|
|
209
|
+
- ✅ Design already approved by client
|
|
210
|
+
- ✅ Visual conversion only (no new business logic)
|
|
211
|
+
- ✅ Existing Blazor code to update
|
|
204
212
|
|
|
205
|
-
##
|
|
213
|
+
## When NOT to Use
|
|
206
214
|
|
|
207
|
-
- ❌
|
|
208
|
-
- ❌
|
|
209
|
-
- ❌
|
|
215
|
+
- ❌ New feature with complex logic (use FULL MORPH)
|
|
216
|
+
- ❌ Azure infrastructure needed (use FULL MORPH)
|
|
217
|
+
- ❌ No prototype defined (use STANDARD or FULL MORPH)
|
|
210
218
|
|
|
211
219
|
---
|
|
212
220
|
|
|
213
|
-
##
|
|
221
|
+
## References
|
|
214
222
|
|
|
215
223
|
- **Ref:** `framework/standards/frontend/blazor/html-conversion.md`
|
|
216
224
|
- **Ref:** `framework/standards/frontend/design-system/naming.md`
|
|
@@ -219,4 +227,4 @@ Mapeamento HTML → Blazor:
|
|
|
219
227
|
|
|
220
228
|
---
|
|
221
229
|
|
|
222
|
-
*MORPH-SPEC by Polymorphism Tech*
|
|
230
|
+
*MORPH-SPEC by Polymorphism Tech*
|
package/framework/skills/level-0-meta/{simulation-checklist → morph-simulation-checklist}/SKILL.md
RENAMED
|
@@ -3,6 +3,8 @@ 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
|
|
6
|
+
stacks:
|
|
7
|
+
- dotnet
|
|
6
8
|
---
|
|
7
9
|
|
|
8
10
|
# Simulation Checklist
|
|
@@ -52,11 +54,33 @@ else
|
|
|
52
54
|
services.AddProductionClients(configuration);
|
|
53
55
|
```
|
|
54
56
|
|
|
57
|
+
## MORPH-SPEC Integration
|
|
58
|
+
|
|
59
|
+
When implementing simulation as a morph-spec task:
|
|
60
|
+
|
|
61
|
+
```bash
|
|
62
|
+
# Track the simulation setup task
|
|
63
|
+
npx morph-spec task start {feature} {task-id}
|
|
64
|
+
|
|
65
|
+
# After implementation, validate the feature
|
|
66
|
+
npx morph-spec validate-feature {feature}
|
|
67
|
+
|
|
68
|
+
# Complete the task (triggers Tier-4 validators)
|
|
69
|
+
npx morph-spec task done {feature} {task-id}
|
|
70
|
+
```
|
|
71
|
+
|
|
72
|
+
Reference the project's service lifetime patterns:
|
|
73
|
+
```bash
|
|
74
|
+
# Check existing DI patterns in the project
|
|
75
|
+
grep -r "AddSingleton\|AddScoped\|AddTransient" src/ --include="*.cs" -l
|
|
76
|
+
```
|
|
77
|
+
|
|
55
78
|
## Post-Implementation
|
|
56
79
|
|
|
57
80
|
- [ ] Validate DI: `dotnet build && dotnet run` + health check
|
|
58
81
|
- [ ] Test full flow end-to-end (not just unit tests)
|
|
59
82
|
- [ ] Verify simulation logs — confirm mocks are being called
|
|
83
|
+
- [ ] Run `npx morph-spec validate-feature {feature}` to check architecture compliance
|
|
60
84
|
|
|
61
85
|
## Common Errors
|
|
62
86
|
|
|
@@ -82,66 +82,67 @@ Feature with multiple active agents?
|
|
|
82
82
|
|
|
83
83
|
---
|
|
84
84
|
|
|
85
|
-
##
|
|
85
|
+
## User Communication
|
|
86
86
|
|
|
87
|
-
### AskUserQuestion vs.
|
|
87
|
+
### AskUserQuestion vs. Plain Text
|
|
88
88
|
|
|
89
|
-
|
|
|
89
|
+
| Situation | Tool |
|
|
90
90
|
|---|---|
|
|
91
|
-
| ≥2
|
|
92
|
-
|
|
|
93
|
-
|
|
|
94
|
-
|
|
|
91
|
+
| ≥2 mutually exclusive options | `AskUserQuestion` (options[]) |
|
|
92
|
+
| Binary yes/no choice | `AskUserQuestion` (2 options) |
|
|
93
|
+
| Plan approval | `ExitPlanMode` |
|
|
94
|
+
| Explanation, progress, confirmation | Direct text |
|
|
95
95
|
|
|
96
|
-
**
|
|
96
|
+
**Rule:** NEVER present multiple options as plain text. Use `AskUserQuestion` with `options[]` to ensure structured, unambiguous choices.
|
|
97
97
|
|
|
98
98
|
### EnterPlanMode
|
|
99
99
|
|
|
100
|
-
Use **
|
|
101
|
-
- Refactor
|
|
102
|
-
-
|
|
103
|
-
-
|
|
100
|
+
Use **BEFORE** starting implementation when:
|
|
101
|
+
- Refactor touches ≥5 files or changes architecture
|
|
102
|
+
- Estimated tasks ≥20
|
|
103
|
+
- Choosing between ≥2 significantly different design approaches
|
|
104
104
|
|
|
105
|
-
|
|
106
|
-
-
|
|
107
|
-
-
|
|
108
|
-
-
|
|
105
|
+
Do NOT use for:
|
|
106
|
+
- Point fix of 1-3 files
|
|
107
|
+
- User already specified detailed approach
|
|
108
|
+
- Implement phase with tasks.md already approved
|
|
109
109
|
|
|
110
110
|
---
|
|
111
111
|
|
|
112
|
-
###
|
|
112
|
+
### Parallel Read Rule (CRITICAL)
|
|
113
113
|
|
|
114
|
-
|
|
114
|
+
Independent files = a single message with multiple Read calls.
|
|
115
115
|
|
|
116
116
|
```
|
|
117
|
-
#
|
|
117
|
+
# WRONG (sequential)
|
|
118
118
|
Read: state.json → Read: spec.md → Read: tasks.md # 3 round-trips
|
|
119
119
|
|
|
120
|
-
#
|
|
120
|
+
# CORRECT (parallel, 1 round-trip)
|
|
121
121
|
Read: state.json + Read: spec.md + Read: tasks.md
|
|
122
122
|
```
|
|
123
123
|
|
|
124
|
-
|
|
124
|
+
Criterion: if reading file B does not depend on the CONTENT of file A, read both together.
|
|
125
125
|
|
|
126
|
-
**
|
|
126
|
+
**Independence examples:** spec.md ↔ decisions.md ↔ contracts.cs ↔ tasks.md (all read together when investigating a phase).
|
|
127
127
|
|
|
128
128
|
---
|
|
129
129
|
|
|
130
130
|
## Tools Per Phase
|
|
131
131
|
|
|
132
|
-
>
|
|
132
|
+
> For detailed per-phase tool tables, see `references/tools-per-phase.md`
|
|
133
133
|
|
|
134
|
-
**
|
|
134
|
+
**Quick summary by phase:**
|
|
135
135
|
|
|
136
|
-
|
|
|
137
|
-
|
|
138
|
-
| Proposal | GitHub (
|
|
139
|
-
| Setup | GitHub (
|
|
140
|
-
| UI/UX | Playwright,
|
|
141
|
-
| Design | Supabase, Context7, GitHub |
|
|
142
|
-
| Clarify | Context7, GitHub |
|
|
143
|
-
|
|
|
144
|
-
|
|
|
136
|
+
| Phase | Primary MCPs | Dispatch subagents? |
|
|
137
|
+
|-------|-------------|---------------------|
|
|
138
|
+
| Proposal | GitHub (optional) | No |
|
|
139
|
+
| Setup | GitHub (optional) | No |
|
|
140
|
+
| UI/UX | Playwright, Context7 | No |
|
|
141
|
+
| Design | Supabase, Context7, GitHub | Yes (domain-architect + schema in parallel) |
|
|
142
|
+
| Clarify | Context7, GitHub | No |
|
|
143
|
+
| Plan | Context7, GitHub | No |
|
|
144
|
+
| Tasks | Context7, GitHub | Yes (when spec has 20+ reqs or 3+ domains) |
|
|
145
|
+
| Implement | Supabase, Context7, Playwright, GitHub | Yes (when tasks.total ≥ 6 and 2+ domains) |
|
|
145
146
|
|
|
146
147
|
---
|
|
147
148
|
|
|
@@ -167,7 +168,6 @@ Critério: se a leitura de arquivo B não depende do CONTEÚDO de arquivo A, lei
|
|
|
167
168
|
|-----|-------------|----------|
|
|
168
169
|
| **Supabase** | Schema analysis, migrations, RLS | Grep + Read code files |
|
|
169
170
|
| **GitHub** | Issues, PRs, repo metadata, code search | Bash `gh` CLI |
|
|
170
|
-
| **Figma** | Design tokens, component specs | Read CSS/SCSS files |
|
|
171
171
|
| **Context7** | Library documentation lookups | WebSearch + WebFetch |
|
|
172
172
|
| **Playwright** | Browser automation, screenshots, page inspection, smoke tests | WebFetch (read-only), Manual testing |
|
|
173
173
|
| **Azure** | Cloud resource management | Bash `az` CLI |
|
|
@@ -192,15 +192,15 @@ Before choosing a tool, ask:
|
|
|
192
192
|
- Unknown files needing exploration → Glob/Grep, then Read
|
|
193
193
|
- Complex multi-step analysis → Task subagent
|
|
194
194
|
|
|
195
|
-
### Anti-
|
|
195
|
+
### Global Anti-Patterns
|
|
196
196
|
|
|
197
|
-
- ❌ **WebFetch
|
|
198
|
-
-
|
|
199
|
-
-
|
|
200
|
-
- WebFetch
|
|
201
|
-
- ❌ **
|
|
202
|
-
-
|
|
203
|
-
-
|
|
197
|
+
- ❌ **WebFetch for GitHub URLs** → Use `gh api` or `gh` CLI
|
|
198
|
+
- Correct: `gh api repos/owner/repo/git/trees/main --field recursive=1`
|
|
199
|
+
- Correct: `gh pr view 123`, `gh issue view 456`
|
|
200
|
+
- WebFetch for GitHub returns HTML/redirect; `gh` uses the authenticated API
|
|
201
|
+
- ❌ **Multi-option questions as plain text** → Use `AskUserQuestion` with `options[]`
|
|
202
|
+
- Correct: `AskUserQuestion({ question: "Which approach?", options: [{label: "A"}, {label: "B"}] })`
|
|
203
|
+
- Plain text creates ambiguity and requires manual response parsing
|
|
204
204
|
|
|
205
205
|
---
|
|
206
206
|
|
|
@@ -216,7 +216,7 @@ For the canonical list of MCPs, their tools, phase relevance, and fallbacks, see
|
|
|
216
216
|
|-------|-------------|----------|
|
|
217
217
|
| Proposal | Context7 | WebSearch |
|
|
218
218
|
| Setup | GitHub | `gh` CLI |
|
|
219
|
-
| UI/UX | Playwright,
|
|
219
|
+
| UI/UX | Playwright, Context7 | WebFetch, Read CSS |
|
|
220
220
|
| Design | Supabase, Context7, GitHub | Grep + Read code |
|
|
221
221
|
| Clarify | Context7, GitHub | WebSearch |
|
|
222
222
|
| Tasks | Context7, GitHub | WebSearch, `gh` CLI |
|
|
@@ -62,7 +62,6 @@
|
|
|
62
62
|
| Read user-provided screenshots | **Read** (image files) | Claude Code reads images natively |
|
|
63
63
|
| Search for existing CSS variables | **Grep** `--root:` or `--color-` in `*.css,*.scss` | Find existing design tokens |
|
|
64
64
|
| Find existing UI components | **Glob** `**/Components/**/*.razor` or `**/components/**/*.tsx` | Existing patterns |
|
|
65
|
-
| Get Figma design tokens | **Figma MCP** `get_file({ fileKey })` | Extract colors, typography from Figma |
|
|
66
65
|
| Look up component library API | **Context7 MCP** `query_docs({ libraryId, query })` | Accurate component props/events |
|
|
67
66
|
| Preview de página existente | **Playwright MCP** `browser_navigate()` + `browser_take_screenshot()` | **WebFetch** URL |
|
|
68
67
|
| Inspecionar estrutura da página | **Playwright MCP** `browser_snapshot()` | **WebFetch** + parse manual |
|
|
@@ -72,7 +71,7 @@
|
|
|
72
71
|
| Generate design system from CSS | **Bash** `npx morph-spec generate design-system --scan` | CLI command |
|
|
73
72
|
| Update state | **Bash** `npx morph-spec state mark-output {feature} uiDesignSystem && npx morph-spec state mark-output {feature} uiMockups && npx morph-spec state mark-output {feature} uiComponents && npx morph-spec state mark-output {feature} uiFlows` | CLI command |
|
|
74
73
|
|
|
75
|
-
**MCPs used:**
|
|
74
|
+
**MCPs used:** Playwright (live preview, page inspection), Context7 (component docs).
|
|
76
75
|
|
|
77
76
|
**Anti-patterns:**
|
|
78
77
|
- ❌ WebSearch for MudBlazor docs (use Context7 MCP — more accurate)
|
|
@@ -3,13 +3,14 @@ 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?]"
|
|
6
|
+
allowed-tools: Read, Bash, Glob, Grep
|
|
6
7
|
---
|
|
7
8
|
|
|
8
9
|
# Verification Before Completion — MORPH-SPEC Integrated
|
|
9
10
|
|
|
10
11
|
> Never claim work is complete without running verification. Evidence before assertions.
|
|
11
12
|
>
|
|
12
|
-
> **Script:** Run `node .claude/skills/verification-before-completion/scripts/check-phase-outputs.mjs <feature> [phase]` to check required output files exist.
|
|
13
|
+
> **Script:** Run `node .claude/skills/morph-verification-before-completion/scripts/check-phase-outputs.mjs <feature> [phase]` to check required output files exist.
|
|
13
14
|
|
|
14
15
|
## When to Use
|
|
15
16
|
|
|
@@ -52,16 +53,26 @@ argument-hint: "[feature-name] [phase?]"
|
|
|
52
53
|
|
|
53
54
|
- [ ] All clarification questions answered by user
|
|
54
55
|
- [ ] `spec.md` updated with Clarifications section
|
|
56
|
+
- [ ] `clarifications.md` exists in `1-design/`
|
|
55
57
|
- [ ] No unresolved ambiguities in spec
|
|
56
58
|
|
|
57
|
-
### Phase 4 —
|
|
59
|
+
### Phase 4 — Plan
|
|
58
60
|
|
|
59
|
-
- [ ] `
|
|
61
|
+
- [ ] `plan.md` exists in `.morph/features/{feature}/3-plan/`
|
|
62
|
+
- [ ] Plan contains: Goal, Architecture, Execution Strategy, Task Groups
|
|
63
|
+
- [ ] Each task has exact file paths and complete code
|
|
64
|
+
- [ ] Execution strategy defined (single / subagents / agent-teams)
|
|
65
|
+
- [ ] `morph-spec state mark-output {feature} plan` was called
|
|
66
|
+
- [ ] User approved plan via `morph-spec approve {feature} plan`
|
|
67
|
+
|
|
68
|
+
### Phase 5 — Tasks
|
|
69
|
+
|
|
70
|
+
- [ ] `tasks.md` exists
|
|
60
71
|
- [ ] All tasks have: ID, title, description, dependencies
|
|
61
72
|
- [ ] Checkpoints defined (every 3 tasks)
|
|
62
73
|
- [ ] `morph-spec state set {feature} tasks.total N` called
|
|
63
74
|
|
|
64
|
-
### Phase
|
|
75
|
+
### Phase 6 — Implement
|
|
65
76
|
|
|
66
77
|
- [ ] All tasks marked as completed
|
|
67
78
|
- [ ] Build succeeds (`npm run build` or `dotnet build`)
|
|
@@ -74,17 +85,17 @@ argument-hint: "[feature-name] [phase?]"
|
|
|
74
85
|
## Verification Commands
|
|
75
86
|
|
|
76
87
|
```bash
|
|
77
|
-
# Run
|
|
88
|
+
# Run full feature validation
|
|
78
89
|
npx morph-spec validate-feature {feature-name}
|
|
79
90
|
|
|
80
|
-
#
|
|
81
|
-
npx morph-spec
|
|
91
|
+
# Check feature state and phase
|
|
92
|
+
npx morph-spec state get {feature-name}
|
|
82
93
|
|
|
83
|
-
# Check
|
|
84
|
-
npx morph-spec status {feature-name}
|
|
94
|
+
# Check approval gates
|
|
95
|
+
npx morph-spec approval-status {feature-name}
|
|
85
96
|
|
|
86
|
-
#
|
|
87
|
-
npx morph-spec
|
|
97
|
+
# Check overall project status
|
|
98
|
+
npx morph-spec status
|
|
88
99
|
```
|
|
89
100
|
|
|
90
101
|
---
|
|
@@ -100,7 +111,7 @@ Before running `morph-spec task done`:
|
|
|
100
111
|
|
|
101
112
|
```bash
|
|
102
113
|
# Verify before marking done
|
|
103
|
-
npx morph-spec validate-feature {feature}
|
|
114
|
+
npx morph-spec validate-feature {feature}
|
|
104
115
|
npx morph-spec task done {feature} T001
|
|
105
116
|
```
|
|
106
117
|
|
|
@@ -35,10 +35,10 @@ const PHASE_OUTPUTS = {
|
|
|
35
35
|
{ file: '2-ui/flows.md', required: false },
|
|
36
36
|
],
|
|
37
37
|
tasks: [
|
|
38
|
-
{ file: '
|
|
38
|
+
{ file: '4-tasks/tasks.md', required: true },
|
|
39
39
|
],
|
|
40
40
|
implement: [
|
|
41
|
-
{ file: '
|
|
41
|
+
{ file: '5-implement/recap.md', required: true },
|
|
42
42
|
],
|
|
43
43
|
};
|
|
44
44
|
|