@polymorphism-tech/morph-spec 4.11.1 → 4.13.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +21 -29
- package/bin/morph-spec.js +41 -24
- package/bin/task-manager.js +962 -1341
- package/bin/validate.js +1 -1
- package/claude-plugin.json +1 -1
- package/docs/CHEATSHEET.md +10 -11
- package/docs/QUICKSTART.md +15 -15
- package/framework/CLAUDE.md +5 -2
- package/framework/agents/README.md +3 -4
- package/framework/agents/ai-agents/ai-system-architect.md +6 -10
- package/framework/agents/architecture/seo-growth-hacker.md +166 -326
- package/framework/agents/architecture/standards-architect.md +21 -31
- package/framework/agents/backend/dotnet-senior.md +160 -86
- package/framework/agents/backend/ef-modeler.md +2 -6
- package/framework/agents/backend/hangfire-orchestrator.md +8 -9
- package/framework/agents/backend/ms-agent-expert.md +1 -1
- package/framework/agents/frontend/nextjs-expert.md +198 -133
- package/framework/agents/frontend/ui-ux-designer.md +226 -267
- package/framework/agents/infrastructure/infra-architect.md +191 -27
- package/framework/agents/integrations/clerk-auth.md +19 -26
- package/framework/agents/integrations/hangfire-integration.md +1 -4
- package/framework/agents.json +226 -1454
- package/framework/commands/morph-apply.md +4 -4
- package/framework/commands/morph-preflight.md +4 -26
- package/framework/commands/morph-proposal.md +19 -19
- package/framework/commands/morph-status.md +2 -2
- package/framework/commands/morph-troubleshoot.md +6 -13
- package/framework/hooks/README.md +1 -6
- package/framework/hooks/claude-code/post-tool-use/agent-complete.js +122 -0
- package/framework/hooks/claude-code/post-tool-use/validator-feedback.js +4 -6
- package/framework/hooks/claude-code/pre-compact/save-morph-context.js +12 -7
- package/framework/hooks/claude-code/pre-tool-use/enforce-phase-writes.js +2 -2
- package/framework/hooks/claude-code/pre-tool-use/protect-spec-files.js +2 -2
- package/framework/hooks/claude-code/pre-tool-use/task-tracking-guard.js +5 -10
- package/framework/hooks/claude-code/session-start/inject-morph-context.js +63 -30
- package/framework/hooks/claude-code/session-start/resume-context.js +77 -0
- package/framework/hooks/claude-code/statusline.py +4 -5
- package/framework/hooks/claude-code/stop/validate-completion.js +4 -4
- package/framework/hooks/claude-code/user-prompt/enrich-prompt.js +8 -8
- package/framework/hooks/shared/compact-restore.js +28 -5
- package/framework/hooks/shared/dispatch-helpers.js +17 -0
- package/framework/hooks/shared/phase-utils.js +4 -8
- package/framework/hooks/shared/state-reader.js +34 -3
- package/framework/phases.json +7 -45
- package/framework/rules/ai-agents-standards.md +15 -0
- package/framework/rules/asaas-standards.md +13 -0
- package/framework/rules/clerk-standards.md +13 -0
- package/framework/rules/csharp-standards.md +8 -4
- package/framework/rules/data-standards.md +18 -0
- package/framework/rules/dotnet-templates.md +87 -0
- package/framework/rules/frontend-standards.md +13 -13
- package/framework/rules/hangfire-standards.md +13 -0
- package/framework/rules/infrastructure-standards.md +27 -16
- package/framework/rules/morph-workflow.md +73 -13
- package/framework/rules/nextjs-standards.md +1 -0
- package/framework/rules/nextjs-templates.md +40 -0
- package/framework/rules/resend-standards.md +12 -0
- package/framework/rules/supabase-standards.md +29 -0
- package/framework/skills/README.md +6 -8
- package/framework/skills/level-0-meta/mcp-registry.json +21 -99
- package/framework/{standards/ai-agents/team-orchestration.md → skills/level-0-meta/morph-agent-teams/SKILL.md} +472 -479
- package/framework/skills/level-0-meta/morph-brainstorming/SKILL.md +28 -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 -5
- package/framework/skills/level-0-meta/morph-code-review/scripts/scan-csharp.mjs +1 -1
- package/framework/skills/level-0-meta/morph-frontend-review/SKILL.md +23 -41
- package/framework/skills/level-0-meta/morph-init/SKILL.md +18 -14
- package/framework/skills/level-0-meta/morph-parallel-dispatch/SKILL.md +225 -0
- package/framework/skills/level-0-meta/morph-post-implementation/SKILL.md +20 -0
- package/framework/skills/level-0-meta/morph-tool-usage-guide/SKILL.md +4 -8
- package/framework/skills/level-0-meta/morph-tool-usage-guide/references/tools-per-phase.md +15 -59
- package/framework/skills/level-0-meta/morph-verification-before-completion/SKILL.md +7 -19
- package/framework/skills/level-0-meta/morph-verification-before-completion/scripts/check-phase-outputs.mjs +8 -8
- package/framework/skills/level-1-workflows/README.md +1 -1
- package/framework/skills/level-1-workflows/morph-phase-codebase-analysis/SKILL.md +49 -50
- package/framework/skills/level-1-workflows/morph-phase-design/SKILL.md +58 -124
- package/framework/skills/level-1-workflows/morph-phase-design/references/architecture-analysis-guide.md +5 -50
- package/framework/skills/level-1-workflows/morph-phase-design/references/spec-example.md +1 -1
- package/framework/skills/level-1-workflows/morph-phase-implement/SKILL.md +127 -159
- package/framework/skills/level-1-workflows/morph-phase-implement/prompts/implementer-prompt.md +4 -3
- package/framework/skills/level-1-workflows/morph-phase-implement/prompts/spec-reviewer-prompt.md +2 -2
- package/framework/skills/level-1-workflows/morph-phase-implement/references/recap-example.md +1 -1
- package/framework/skills/level-1-workflows/morph-phase-plan/SKILL.md +17 -13
- package/framework/skills/level-1-workflows/morph-phase-tasks/SKILL.md +22 -40
- package/framework/skills/level-1-workflows/morph-phase-tasks/references/task-planning-patterns.md +0 -2
- package/framework/skills/level-1-workflows/morph-phase-tasks/references/tasks-example.md +5 -5
- package/framework/skills/level-1-workflows/morph-phase-uiux/SKILL.md +275 -61
- package/framework/skills/level-1-workflows/morph-scope-escalation/SKILL.md +1 -1
- package/framework/squad-templates/backend-only.json +6 -6
- package/framework/squad-templates/frontend-only.json +17 -8
- package/framework/squad-templates/full-stack.json +29 -24
- package/framework/standards/STANDARDS.json +1021 -2338
- package/framework/standards/backend/dotnet/fluent-validation-vsa.md +200 -0
- package/framework/standards/backend/dotnet/result-pattern.md +213 -0
- package/framework/standards/backend/dotnet/scalar-ui.md +172 -0
- package/framework/standards/backend/dotnet/scrutor.md +158 -0
- package/framework/standards/backend/dotnet/vsa-handler-patterns.md +274 -0
- package/framework/standards/frontend/nextjs/motion-patterns.md +1 -1
- package/framework/standards/infrastructure/supabase/mcp-setup.md +83 -193
- package/framework/standards/integration/mcp/mcp-tools.md +91 -77
- package/framework/templates/IDE-SNIPPETS.md +2 -6
- package/framework/templates/README.md +709 -814
- package/framework/templates/REGISTRY.json +223 -762
- package/framework/templates/code/dotnet/abstractions/api-endpoint.cs +7 -0
- package/framework/templates/code/dotnet/abstractions/error.cs +60 -0
- package/framework/templates/code/dotnet/abstractions/handler.cs +12 -0
- package/framework/templates/code/dotnet/abstractions/result.cs +74 -0
- package/framework/templates/code/dotnet/backend/repository.cs +148 -141
- package/framework/templates/code/dotnet/constants/api-tags.cs +6 -0
- package/framework/templates/code/dotnet/exceptions/exception-handler.cs +32 -0
- package/framework/templates/code/dotnet/extensions/database-extensions.cs +20 -0
- package/framework/templates/code/dotnet/extensions/handler-registration.cs +38 -0
- package/framework/templates/code/dotnet/extensions/health-checks.cs +24 -0
- package/framework/templates/code/dotnet/extensions/map-endpoints.cs +35 -0
- package/framework/templates/code/dotnet/extensions/result-extensions.cs +29 -0
- package/framework/templates/code/dotnet/feature/endpoint.cs.hbs +21 -0
- package/framework/templates/code/dotnet/feature/entity.cs.hbs +8 -0
- package/framework/templates/code/dotnet/feature/errors.cs.hbs +8 -0
- package/framework/templates/code/dotnet/feature/handler.cs.hbs +24 -0
- package/framework/templates/code/dotnet/feature/request.cs.hbs +4 -0
- package/framework/templates/code/dotnet/feature/response.cs.hbs +4 -0
- package/framework/templates/code/dotnet/feature/validator.cs.hbs +15 -0
- package/framework/templates/code/dotnet/jobs/job.cs +21 -17
- package/framework/templates/code/dotnet/pipelines/logging-decorator.cs +31 -0
- package/framework/templates/code/dotnet/pipelines/validation-decorator.cs +97 -0
- package/framework/templates/code/dotnet/test.cs +192 -106
- package/framework/templates/context/ARCHITECTURE.md +89 -0
- package/framework/templates/context/CONTEXT-FEATURE.md +2 -2
- package/framework/templates/context/CONTEXT.md +180 -181
- package/framework/templates/context/design-system.md +342 -211
- package/framework/templates/docs/onboarding.md +2 -3
- package/framework/templates/docs/proposal.md +171 -182
- package/framework/templates/docs/spec.md +1 -3
- package/framework/templates/docs/ui-components.md +0 -72
- package/framework/templates/examples/design-system-examples.md +4 -4
- package/framework/templates/feature/decisions.md +0 -66
- package/framework/templates/feature/recap.md +1 -2
- package/framework/templates/infrastructure/github/README.md +56 -593
- package/framework/templates/integrations/clerk-config.cs +0 -41
- package/framework/templates/meta-prompts/parallel-workers/parallel-worker.md +2 -2
- package/framework/templates/meta-prompts/squad-leaders/backend-squad.md +1 -2
- package/framework/templates/meta-prompts/squad-leaders/frontend-squad.md +83 -126
- package/framework/templates/meta-prompts/validators/pre-commit-validator.md +2 -2
- package/framework/templates/project/validate.js +2 -4
- package/framework/templates/ui/design-system.css +1 -1
- package/framework/workflows/README.md +8 -8
- package/framework/workflows/configs/fast-track.json +51 -0
- package/framework/workflows/configs/full.json +68 -0
- package/framework/workflows/configs/standard.json +7 -3
- package/framework/workflows/docs/STORY-DRIVEN-DEVELOPMENT.md +1 -1
- package/framework/workflows/docs/enforcement-pipeline.md +18 -19
- package/framework/workflows/docs/full-morph.md +69 -76
- package/framework/workflows/docs/standard.md +49 -44
- package/framework/workflows/docs/ui-refresh.md +1 -1
- package/package.json +3 -3
- package/src/commands/agents/dispatch-agents.js +55 -116
- package/src/commands/context/context-refresh.js +79 -0
- package/src/commands/mcp/mcp-setup.js +28 -6
- package/src/commands/phase/phase-reset.js +1 -1
- package/src/commands/project/doctor.js +10 -32
- package/src/commands/project/init.js +32 -1
- package/src/commands/project/status.js +6 -12
- package/src/commands/scaffold/scaffold.js +131 -0
- package/src/commands/scope/escalate.js +1 -1
- package/src/commands/state/advance-phase.js +15 -29
- package/src/commands/state/state.js +20 -5
- package/src/commands/tasks/task.js +0 -30
- package/src/commands/validation/validate-feature.js +3 -10
- package/src/core/paths/output-schema.js +12 -13
- package/src/core/state/phase-state-machine.js +211 -217
- package/src/core/state/state-manager.js +9 -9
- package/src/lib/agents/agents-manager.js +2 -2
- package/src/lib/agents/output-collector.js +1 -2
- package/src/lib/detectors/design-system-detector.js +4 -4
- package/src/lib/detectors/index.js +1 -11
- package/src/lib/generators/architecture-scanner.js +640 -0
- package/src/lib/generators/context-generator.js +3 -3
- package/src/lib/generators/design-system-generator.js +508 -298
- package/src/lib/generators/index.js +12 -10
- package/src/lib/generators/metadata-extractor.js +386 -387
- package/src/lib/generators/recap-generator.js +4 -4
- package/src/lib/generators/scaffold-generator.js +317 -0
- package/src/lib/generators/settings-generator.js +0 -1
- package/src/lib/phase-chain/phase-validator.js +64 -42
- package/src/lib/stack/stack-profile.js +2 -2
- package/src/lib/standards/digest-builder.js +72 -285
- package/src/lib/tasks/task-parser.js +11 -5
- package/src/lib/validators/architecture/architecture-validator.js +259 -387
- package/src/lib/validators/content/content-validator.js +287 -287
- package/src/lib/validators/css/css-validator.js +340 -352
- package/src/lib/validators/design-system/design-system-validator.js +11 -5
- package/src/lib/validators/packages/package-validator.js +347 -360
- package/src/lib/validators/shared/issue-counter.js +14 -18
- package/src/lib/validators/validation-runner.js +3 -19
- package/src/scripts/setup-infra.js +1 -1
- package/src/utils/agents-installer.js +24 -3
- package/src/utils/file-copier.js +1 -0
- package/src/utils/hooks-installer.js +21 -19
- package/src/utils/skills-installer.js +178 -178
- package/framework/agents/architecture/prompt-engineer.md +0 -195
- package/framework/agents/backend/api-designer.md +0 -106
- package/framework/agents/frontend/blazor-builder.md +0 -229
- package/framework/agents/frontend/nextjs-ui-specialist.md +0 -218
- package/framework/agents/infrastructure/azure-architect.md +0 -150
- package/framework/agents/infrastructure/azure-deploy-specialist.md +0 -707
- package/framework/agents/infrastructure/bicep-architect.md +0 -132
- package/framework/agents/infrastructure/container-specialist.md +0 -137
- package/framework/agents/infrastructure/devops-engineer.md +0 -126
- package/framework/agents/integrations/azure-identity.md +0 -148
- package/framework/agents/quality/code-analyzer.md +0 -239
- package/framework/agents/quality/testing-specialist.md +0 -130
- package/framework/hooks/claude-code/notification/approval-reminder.js +0 -57
- package/framework/hooks/claude-code/post-tool-use/context-refresh.js +0 -109
- package/framework/hooks/claude-code/post-tool-use/skill-reminder.js +0 -78
- package/framework/index/troubleshooting-index.json +0 -184
- package/framework/rules/testing-standards.md +0 -14
- package/framework/skills/level-0-meta/morph-replicate/SKILL.md +0 -230
- package/framework/skills/level-0-meta/morph-replicate/references/blazor-html-mapping.md +0 -70
- package/framework/skills/level-1-workflows/morph-phase-clarify/SKILL.md +0 -256
- package/framework/skills/level-1-workflows/morph-phase-clarify/references/clarifications-example.md +0 -117
- package/framework/skills/level-1-workflows/morph-phase-setup/SKILL.md +0 -269
- package/framework/standards/ai-agents/blazor-ui.md +0 -364
- package/framework/standards/architecture/ddd/aggregates.md +0 -120
- package/framework/standards/architecture/ddd/bounded-contexts.md +0 -105
- package/framework/standards/architecture/ddd/complexity-levels.md +0 -108
- package/framework/standards/architecture/ddd/entities.md +0 -99
- package/framework/standards/architecture/ddd/ubiquitous-language.md +0 -58
- package/framework/standards/architecture/ddd/value-objects.md +0 -124
- package/framework/standards/backend/api/minimal-api.md +0 -494
- package/framework/standards/backend/api/rest.md +0 -492
- package/framework/standards/backend/authentication/passkeys.md +0 -428
- package/framework/standards/backend/database/ef-core.md +0 -199
- package/framework/standards/backend/database/migrations.md +0 -393
- package/framework/standards/backend/database/repository-patterns.md +0 -528
- package/framework/standards/backend/dotnet/async.md +0 -366
- package/framework/standards/backend/dotnet/core.md +0 -117
- package/framework/standards/backend/dotnet/di.md +0 -439
- package/framework/standards/backend/dotnet/program-cs-checklist.md +0 -92
- package/framework/standards/context/analytics.md +0 -96
- package/framework/standards/context/bundles.md +0 -110
- package/framework/standards/context/priming.md +0 -78
- package/framework/standards/core/architecture.md +0 -185
- package/framework/standards/core/coding.md +0 -214
- package/framework/standards/core/git-branching-strategy.md +0 -403
- package/framework/standards/core/git.md +0 -185
- package/framework/standards/core/testing.md +0 -295
- package/framework/standards/data/nosql/blob-storage.md +0 -102
- package/framework/standards/data/vector-search/azure-ai-search.md +0 -121
- package/framework/standards/frontend/blazor/design-checklist.md +0 -222
- package/framework/standards/frontend/blazor/fluent-ui-setup.md +0 -595
- package/framework/standards/frontend/blazor/fluent-ui.md +0 -137
- package/framework/standards/frontend/blazor/html-conversion.md +0 -184
- package/framework/standards/frontend/blazor/lifecycle.md +0 -195
- package/framework/standards/frontend/blazor/pitfalls.md +0 -198
- package/framework/standards/frontend/blazor/state.md +0 -191
- package/framework/standards/frontend/design-system/aesthetic-direction.md +0 -213
- package/framework/standards/infrastructure/azure/azure.md +0 -624
- package/framework/standards/infrastructure/azure/bicep/bicep-patterns.md +0 -422
- package/framework/standards/infrastructure/azure/devops/azure-devops-setup.md +0 -516
- package/framework/standards/infrastructure/azure/devops/local-development.md +0 -520
- package/framework/standards/infrastructure/azure/services/functions.md +0 -486
- package/framework/standards/infrastructure/azure/services/service-bus.md +0 -459
- package/framework/standards/infrastructure/azure/services/storage.md +0 -407
- package/framework/standards/infrastructure/vercel/vercel-database.md +0 -106
- package/framework/standards/integration/api/graphql.md +0 -91
- package/framework/standards/integration/api/grpc.md +0 -114
- package/framework/standards/integration/api/rest-design.md +0 -95
- package/framework/standards/integration/event-driven/cqrs.md +0 -101
- package/framework/standards/integration/event-driven/event-sourcing.md +0 -124
- package/framework/standards/integration/event-driven/service-bus.md +0 -95
- package/framework/standards/observability/logging.md +0 -131
- package/framework/standards/observability/metrics.md +0 -121
- package/framework/standards/observability/monitoring.md +0 -114
- package/framework/standards/observability/tracing.md +0 -132
- package/framework/standards/workflows/parallel-execution.md +0 -112
- package/framework/standards/workflows/thread-management.md +0 -113
- package/framework/templates/code/dotnet/backend/service.cs +0 -139
- package/framework/templates/code/dotnet/contracts/Commands.cs +0 -74
- package/framework/templates/code/dotnet/contracts/Entities.cs +0 -25
- package/framework/templates/code/dotnet/contracts/Queries.cs +0 -74
- package/framework/templates/code/dotnet/contracts/api-contracts.cs +0 -173
- package/framework/templates/code/dotnet/contracts/contracts-level1.cs +0 -69
- package/framework/templates/code/dotnet/contracts/contracts-level2.cs +0 -86
- package/framework/templates/code/dotnet/contracts/contracts-level3.cs +0 -41
- package/framework/templates/code/dotnet/frontend/component.razor +0 -239
- package/framework/templates/infrastructure/azure/Dockerfile.example +0 -82
- package/framework/templates/infrastructure/azure/README.md +0 -286
- package/framework/templates/infrastructure/azure/app-insights.bicep +0 -63
- package/framework/templates/infrastructure/azure/app-service.bicep +0 -164
- package/framework/templates/infrastructure/azure/container-app-env.bicep +0 -49
- package/framework/templates/infrastructure/azure/container-app.bicep +0 -156
- package/framework/templates/infrastructure/azure/deploy-checklist.md +0 -426
- package/framework/templates/infrastructure/azure/deploy.ps1 +0 -229
- package/framework/templates/infrastructure/azure/deploy.sh +0 -208
- package/framework/templates/infrastructure/azure/key-vault.bicep +0 -91
- package/framework/templates/infrastructure/azure/main.bicep +0 -189
- package/framework/templates/infrastructure/azure/parameters.dev.json +0 -29
- package/framework/templates/infrastructure/azure/parameters.prod.json +0 -29
- package/framework/templates/infrastructure/azure/parameters.staging.json +0 -29
- package/framework/templates/infrastructure/azure/sql-database.bicep +0 -103
- package/framework/templates/infrastructure/azure/storage.bicep +0 -106
- package/framework/templates/infrastructure/github/actions/azure-auth/action.yml.hbs +0 -22
- package/framework/templates/infrastructure/github/workflows/deploy-azure-app-service.yml.hbs +0 -61
- package/framework/templates/integrations/azure-identity-config.cs +0 -288
- package/framework/templates/project-structure/dotnet-ddd.md +0 -70
- package/framework/templates/saas/subscription.cs +0 -347
- package/framework/templates/saas/tenant.cs +0 -338
- package/framework/templates/ui/FluentDesignTheme.cs +0 -149
- package/framework/templates/ui/MudTheme.cs +0 -281
- package/framework/workflows/configs/nodejs-cli.json +0 -40
- package/src/commands/standards/context-budget.js +0 -89
- package/src/lib/standards/index.js +0 -7
- package/src/lib/standards/standards-context-injector.js +0 -302
- package/src/lib/validators/blazor/blazor-concurrency-analyzer.js +0 -316
- package/src/lib/validators/blazor/blazor-state-validator.js +0 -279
- package/src/lib/validators/blazor/blazor-validator.js +0 -369
- package/src/lib/validators/blazor/index.js +0 -9
|
@@ -1,13 +1,13 @@
|
|
|
1
1
|
---
|
|
2
2
|
name: morph-phase-uiux
|
|
3
|
-
description: MORPH-SPEC Phase
|
|
3
|
+
description: MORPH-SPEC Phase 2 (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.
|
|
7
|
+
cliVersion: "4.13.0"
|
|
8
8
|
---
|
|
9
9
|
|
|
10
|
-
# MORPH UI/UX Design - Phase
|
|
10
|
+
# MORPH UI/UX Design - Phase 2
|
|
11
11
|
|
|
12
12
|
> INTERNAL: Workflow skill used by /morph-proposal during automated phase orchestration. Not a user command.
|
|
13
13
|
|
|
@@ -15,8 +15,8 @@ Conditional phase for features with front-end. Collects UI/UX requirements, gene
|
|
|
15
15
|
|
|
16
16
|
## Prerequisites
|
|
17
17
|
|
|
18
|
-
- [ ]
|
|
19
|
-
- [ ] Feature has detected UI keywords (
|
|
18
|
+
- [ ] Proposal approved by the user
|
|
19
|
+
- [ ] Feature has detected UI keywords (ui, component, page, dashboard, wizard, form, chart)
|
|
20
20
|
- [ ] `ui-designer` agent activated
|
|
21
21
|
|
|
22
22
|
## Recommended Tools
|
|
@@ -29,7 +29,7 @@ Conditional phase for features with front-end. Collects UI/UX requirements, gene
|
|
|
29
29
|
| Check existing design system | **Read** `.morph/context/design-system.md` | — |
|
|
30
30
|
| Read user screenshots | **Read** (image file) | — |
|
|
31
31
|
| Search for existing CSS variables | **Grep** `--root:` in `*.css,*.scss` | — |
|
|
32
|
-
| Find existing components | **Glob** `**/
|
|
32
|
+
| Find existing components | **Glob** `**/components/**/*.tsx` | — |
|
|
33
33
|
| UI component documentation | **Context7 MCP** `query_docs({ libraryId, query })` | **WebSearch** + **WebFetch** |
|
|
34
34
|
| Preview existing page | **Playwright MCP** `browser_navigate()` + `browser_take_screenshot()` | **WebFetch** URL |
|
|
35
35
|
| Generate visual mockup | **Playwright MCP** `browser_navigate()` + `browser_resize()` + `browser_take_screenshot()` | HTML file + manual screenshot |
|
|
@@ -39,11 +39,14 @@ Conditional phase for features with front-end. Collects UI/UX requirements, gene
|
|
|
39
39
|
| Render UI templates | **Bash** `morph-spec template render docs/ui-mockups ...` | — |
|
|
40
40
|
| Generate design system from existing CSS | **Bash** `morph-spec generate design-system --scan` | — |
|
|
41
41
|
| Update state | **Bash** `morph-spec state mark-output ...` | — |
|
|
42
|
+
| Auto-detect dev server | **Glob** `next.config.*`, `vite.config.*`, `*.csproj` | **Read** `package.json` scripts |
|
|
43
|
+
| Capture existing app | **Playwright MCP** `browser_navigate()` + `browser_take_screenshot()` | — |
|
|
44
|
+
| Read Tailwind config | **Read** `tailwind.config.{js,ts}` | **Grep** `colors:` |
|
|
45
|
+
| Trend research | **Context7 MCP** / **WebSearch** | — |
|
|
42
46
|
|
|
43
47
|
**MCPs for this phase:** Playwright (preview, inspection, responsiveness), Context7 (component docs).
|
|
44
48
|
|
|
45
49
|
**Anti-patterns:**
|
|
46
|
-
- WebSearch for MudBlazor docs (use Context7 MCP — more precise)
|
|
47
50
|
- Task agent to read a screenshot (use Read directly on image)
|
|
48
51
|
- Guess component props (use Context7 for actual API)
|
|
49
52
|
|
|
@@ -61,12 +64,119 @@ Check the `"phase"` field in the output:
|
|
|
61
64
|
|
|
62
65
|
**If `"phase": "uiux"`** → correct phase, proceed.
|
|
63
66
|
|
|
64
|
-
**If `"phase": "
|
|
65
|
-
1. `morph-spec
|
|
67
|
+
**If `"phase": "proposal"`** → execute in sequence:
|
|
68
|
+
1. `morph-spec state mark-output $ARGUMENTS proposal`
|
|
69
|
+
2. `morph-spec phase advance $ARGUMENTS` (→ uiux)
|
|
66
70
|
|
|
67
71
|
**Any other value** → do not proceed — inconsistent state, report to user.
|
|
68
72
|
|
|
69
|
-
> **Rule:** Never write to `
|
|
73
|
+
> **Rule:** Never write to `1-ui/` until the phase is `uiux`. The hook will block writes.
|
|
74
|
+
|
|
75
|
+
---
|
|
76
|
+
|
|
77
|
+
### Step 0.2: Capture Existing App (Playwright)
|
|
78
|
+
|
|
79
|
+
> **Purpose:** Before analyzing tokens, capture visual screenshots of the existing app to understand current design patterns.
|
|
80
|
+
> **Skip if:** Greenfield project (no existing UI pages).
|
|
81
|
+
|
|
82
|
+
#### 0.2.1 — Auto-detect dev server
|
|
83
|
+
|
|
84
|
+
Check in priority order:
|
|
85
|
+
|
|
86
|
+
1. **`config.json`**: Read `.morph/config/config.json` → check for `project.devServerUrl` field → use if present
|
|
87
|
+
2. **`package.json` port flags**: Read `package.json` scripts → scan for `--port`, `-p` flags → extract port
|
|
88
|
+
3. **Next.js**: Glob `next.config.*` → try `http://localhost:3000`
|
|
89
|
+
4. **Vite**: Glob `vite.config.*` → try `http://localhost:5173`
|
|
90
|
+
5. **.NET**: Glob `**/Properties/launchSettings.json` → Read → extract `applicationUrl`
|
|
91
|
+
|
|
92
|
+
Track: `detectedUrl` (string or null).
|
|
93
|
+
|
|
94
|
+
#### 0.2.2 — Attempt connection
|
|
95
|
+
|
|
96
|
+
If `detectedUrl` is not null:
|
|
97
|
+
|
|
98
|
+
```
|
|
99
|
+
mcp__plugin_playwright_playwright__browser_navigate({ url: detectedUrl })
|
|
100
|
+
```
|
|
101
|
+
|
|
102
|
+
- **Timeout:** 5 seconds
|
|
103
|
+
- **If connects:** proceed to 0.2.3
|
|
104
|
+
- **If fails (timeout/error):**
|
|
105
|
+
|
|
106
|
+
```json
|
|
107
|
+
{
|
|
108
|
+
"questions": [{
|
|
109
|
+
"header": "Dev Server",
|
|
110
|
+
"question": "Could not connect to dev server at {detectedUrl}. How to proceed?",
|
|
111
|
+
"multiSelect": false,
|
|
112
|
+
"options": [
|
|
113
|
+
{ "label": "Start server first", "description": "I'll start the dev server — wait for me" },
|
|
114
|
+
{ "label": "Use different URL", "description": "I'll provide the correct URL (Other)" },
|
|
115
|
+
{ "label": "Skip screenshots", "description": "Continue without existing app screenshots" }
|
|
116
|
+
]
|
|
117
|
+
}]
|
|
118
|
+
}
|
|
119
|
+
```
|
|
120
|
+
|
|
121
|
+
If `detectedUrl` is null (no indicators found):
|
|
122
|
+
|
|
123
|
+
```json
|
|
124
|
+
{
|
|
125
|
+
"questions": [{
|
|
126
|
+
"header": "Existing UI?",
|
|
127
|
+
"question": "Does this project have existing UI pages I should capture?",
|
|
128
|
+
"multiSelect": false,
|
|
129
|
+
"options": [
|
|
130
|
+
{ "label": "Yes, provide URL", "description": "I'll provide the URL in the field below (Other)" },
|
|
131
|
+
{ "label": "No, greenfield", "description": "Skip — this is a new project" }
|
|
132
|
+
]
|
|
133
|
+
}]
|
|
134
|
+
}
|
|
135
|
+
```
|
|
136
|
+
|
|
137
|
+
#### 0.2.3 — Screenshot main pages
|
|
138
|
+
|
|
139
|
+
Once connected, take screenshots of up to 5 pages:
|
|
140
|
+
|
|
141
|
+
1. **Current page** (usually home/root)
|
|
142
|
+
2. Navigate to common routes: `/dashboard`, `/admin`, `/settings`, or detect from sidebar links via `browser_snapshot()`
|
|
143
|
+
3. For each page:
|
|
144
|
+
```
|
|
145
|
+
mcp__plugin_playwright_playwright__browser_resize({ width: 1440, height: 900 })
|
|
146
|
+
mcp__plugin_playwright_playwright__browser_take_screenshot({})
|
|
147
|
+
```
|
|
148
|
+
4. Save screenshots to `.morph/features/$ARGUMENTS/1-ui/existing-*.png`
|
|
149
|
+
|
|
150
|
+
#### 0.2.4 — Visual analysis
|
|
151
|
+
|
|
152
|
+
Analyze the captured screenshots and write `.morph/features/$ARGUMENTS/1-ui/existing-ui-analysis.md`:
|
|
153
|
+
|
|
154
|
+
> **Note:** This is an intermediate artifact — NOT a tracked output in `output-schema.js`. It will not appear in `state mark-output`. Advisory warnings from `task-tracking-guard.js` are expected.
|
|
155
|
+
|
|
156
|
+
```markdown
|
|
157
|
+
# Existing UI Analysis — {Feature}
|
|
158
|
+
|
|
159
|
+
## Visual Summary
|
|
160
|
+
- **Color palette:** [dominant colors observed]
|
|
161
|
+
- **Typography:** [serif/sans/mono, approximate weights, scale]
|
|
162
|
+
- **Layout:** [sidebar/topbar/fullwidth, grid system, card patterns]
|
|
163
|
+
- **Sophistication level:** [basic/intermediate/advanced]
|
|
164
|
+
- **Dark/Light mode:** [which mode detected, or both]
|
|
165
|
+
|
|
166
|
+
## Design Tokens Detected Visually
|
|
167
|
+
- Primary color: [approx hex from screenshots]
|
|
168
|
+
- Background: [surface colors observed]
|
|
169
|
+
- Border style: [rounded/sharp, thickness]
|
|
170
|
+
- Shadow style: [flat/elevated/colored]
|
|
171
|
+
|
|
172
|
+
## Patterns Worth Preserving
|
|
173
|
+
- [List patterns that work well and should be maintained]
|
|
174
|
+
|
|
175
|
+
## Opportunities for Improvement
|
|
176
|
+
- [List areas where modern techniques could improve the UI]
|
|
177
|
+
```
|
|
178
|
+
|
|
179
|
+
This analysis feeds into Step 0.5 (cross-check with extracted tokens) and Step 1.5 (domain-adaptive direction).
|
|
70
180
|
|
|
71
181
|
---
|
|
72
182
|
|
|
@@ -74,11 +184,12 @@ Check the `"phase"` field in the output:
|
|
|
74
184
|
|
|
75
185
|
**This step is MANDATORY and must always run before Step 1.**
|
|
76
186
|
|
|
77
|
-
#### Step 0.5.1 — Scan frontend for
|
|
187
|
+
#### Step 0.5.1 — Scan frontend for design tokens (ALWAYS)
|
|
78
188
|
|
|
79
|
-
Search for existing
|
|
189
|
+
Search for existing design tokens across ALL supported stacks. Run these scans in parallel:
|
|
80
190
|
|
|
81
|
-
|
|
191
|
+
**A. CSS Custom Properties (all stacks):**
|
|
192
|
+
Glob these patterns (exclude `node_modules/`, `.next/`, `dist/`, `build/`, `obj/`, `bin/`):
|
|
82
193
|
```
|
|
83
194
|
wwwroot/**/*.css
|
|
84
195
|
wwwroot/**/*.scss
|
|
@@ -88,16 +199,34 @@ src/**/*.css
|
|
|
88
199
|
src/**/*.scss
|
|
89
200
|
src/**/*.module.css
|
|
90
201
|
public/**/*.css
|
|
202
|
+
app/**/*.css
|
|
91
203
|
```
|
|
204
|
+
For each file found, Grep for `:root {` blocks containing `--` custom properties.
|
|
92
205
|
|
|
93
|
-
|
|
206
|
+
**B. Tailwind Config (Next.js / Vite):**
|
|
207
|
+
Glob: `tailwind.config.{js,ts,mjs,cjs}`
|
|
208
|
+
If found, Read the file and extract:
|
|
209
|
+
- `theme.colors` / `theme.extend.colors` → map to color tokens
|
|
210
|
+
- `theme.fontFamily` → map to font tokens
|
|
211
|
+
- `theme.spacing` → map to spacing tokens
|
|
212
|
+
- `theme.borderRadius` → map to radius tokens
|
|
94
213
|
|
|
95
|
-
|
|
96
|
-
|
|
97
|
-
|
|
98
|
-
- **Spacing**: `--space-*`, `--gap-*`, `--size-*` with rem/px values
|
|
214
|
+
**C. shadcn/ui Config:**
|
|
215
|
+
Glob: `components.json`
|
|
216
|
+
If found and contains `"style"` field, also scan `src/lib/utils.ts` or `lib/utils.ts` for CSS var references.
|
|
99
217
|
|
|
100
|
-
|
|
218
|
+
**D. Global theme files:**
|
|
219
|
+
Glob: `**/theme.{ts,js}`, `**/tokens.{ts,js}`, `**/design-tokens.{ts,js}`
|
|
220
|
+
If found, Read and extract exported color/spacing/font objects.
|
|
221
|
+
|
|
222
|
+
Classify ALL found tokens into:
|
|
223
|
+
- **Colors**: `--color-*`, hex values, rgb()
|
|
224
|
+
- **Fonts**: `--font-*`, `font-family:`, fontFamily config
|
|
225
|
+
- **Spacing**: `--space-*`, `--gap-*`, spacing config
|
|
226
|
+
- **Radius**: `--radius-*`, borderRadius config
|
|
227
|
+
- **Shadows**: `--shadow-*`, boxShadow config
|
|
228
|
+
|
|
229
|
+
Track: `tokensFound` (object by category), `tokenSources` (array of {file, stack, tokenCount}).
|
|
101
230
|
|
|
102
231
|
#### Step 0.5.2 — Check if design-system.md exists
|
|
103
232
|
|
|
@@ -113,7 +242,7 @@ Track: `dsExists` (bool).
|
|
|
113
242
|
|------|-----------|--------|
|
|
114
243
|
| **A** | `dsExists` AND `cssTokensFound` | Cross-check DS vs scanned tokens. If >2 colors diverge, flag misalignment and ask user if they want to update DS with `AskUserQuestion`. Proceed to Step 1. |
|
|
115
244
|
| **B** | `dsExists` AND NOT `cssTokensFound` | Print: `✓ Design system found (no CSS tokens to cross-check)`. Proceed to Step 1. |
|
|
116
|
-
| **C** | NOT `dsExists` AND
|
|
245
|
+
| **C** | NOT `dsExists` AND tokens found | Auto-generate `.morph/context/design-system.md` from ALL scanned token sources (CSS vars, Tailwind config, etc.). Merge tokens from multiple sources, preferring Tailwind/Theme config over raw CSS. If Step 0.2 produced `existing-ui-analysis.md`, cross-reference visual analysis with extracted tokens. Proceed to Step 1. |
|
|
117
246
|
| **D** | NOT `dsExists` AND NOT `cssTokensFound` | Greenfield project. Ask user for aesthetic direction + brand color using `AskUserQuestion` (same options as morph-init). Scaffold from template. Proceed to Step 1. |
|
|
118
247
|
|
|
119
248
|
**Case C — auto-generate from scanned tokens:**
|
|
@@ -127,7 +256,7 @@ Create `.morph/context/design-system.md` with these sections populated from scan
|
|
|
127
256
|
|
|
128
257
|
Print: `✓ Design system generated from [N] tokens — .morph/context/design-system.md`
|
|
129
258
|
|
|
130
|
-
> **Design system is mandatory** for UI features. The implementation gate (Phase
|
|
259
|
+
> **Design system is mandatory** for UI features. The implementation gate (Phase 7) will block if no design system exists.
|
|
131
260
|
|
|
132
261
|
## MANDATORY: Session Tasks
|
|
133
262
|
|
|
@@ -145,11 +274,65 @@ Check if active agents include `ui-designer`:
|
|
|
145
274
|
morph-spec state get $ARGUMENTS
|
|
146
275
|
```
|
|
147
276
|
|
|
148
|
-
If `ui-designer` is NOT in `activeAgents`, skip this phase and continue to Phase
|
|
277
|
+
If `ui-designer` is NOT in `activeAgents`, skip this phase and continue to Phase 3 (Design).
|
|
149
278
|
|
|
150
|
-
### Step 1.
|
|
279
|
+
### Step 1.3: Trend Research
|
|
280
|
+
|
|
281
|
+
> **Purpose:** Before defining aesthetic direction, research current design trends relevant to this project's domain.
|
|
282
|
+
> Use Context7 MCP or web search for current design trends.
|
|
283
|
+
|
|
284
|
+
#### 1.3.1 — Research current trends
|
|
285
|
+
|
|
286
|
+
> **MCP:** Use **WebSearch** to research current design trends for the detected domain (e.g., "{currentYear} UI design trends {detectedDomain}"). WebSearch provides real-time results that are more current than any static reference. If WebSearch is not available, use **Context7 MCP** to query UI library documentation for latest component patterns and best practices. If neither is available, rely on your training knowledge of current design trends.
|
|
287
|
+
|
|
288
|
+
Research current design trends relevant to the project's domain and stack. Identify 3-5 techniques that fit the project.
|
|
289
|
+
|
|
290
|
+
#### 1.3.2 — Detect project domain
|
|
291
|
+
|
|
292
|
+
Scan `.morph/features/$ARGUMENTS/0-proposal/proposal.md` for domain keywords:
|
|
293
|
+
|
|
294
|
+
| Domain | Keywords |
|
|
295
|
+
|--------|----------|
|
|
296
|
+
| SaaS Dashboard | dashboard, analytics, metrics, monitoring, kpi, chart |
|
|
297
|
+
| E-commerce | e-commerce, store, product, cart, checkout, catalog |
|
|
298
|
+
| Landing Page | landing, marketing, site, hero, launch, waitlist |
|
|
299
|
+
| Internal Tool | admin, backoffice, internal, settings, management |
|
|
300
|
+
| Social/Community | social, feed, community, chat, post, notification |
|
|
301
|
+
|
|
302
|
+
Count keyword hits per domain. Use the domain with most hits. If zero hits across all domains, skip domain-specific filtering.
|
|
303
|
+
|
|
304
|
+
#### 1.3.3 — Research current trends (optional enhancement)
|
|
305
|
+
|
|
306
|
+
If Context7 MCP or WebSearch is available:
|
|
307
|
+
- Search: "{currentYear} UI design trends {detectedDomain}"
|
|
308
|
+
- Extract 2-3 additional techniques not in the curated catalog
|
|
309
|
+
- Evaluate if they are production-ready (browser support, performance)
|
|
310
|
+
|
|
311
|
+
#### 1.3.4 — Present recommendations
|
|
312
|
+
|
|
313
|
+
Use `AskUserQuestion` to present 3-4 recommended modern techniques:
|
|
314
|
+
|
|
315
|
+
```json
|
|
316
|
+
{
|
|
317
|
+
"questions": [{
|
|
318
|
+
"header": "Trends",
|
|
319
|
+
"question": "Based on your project domain ({detectedDomain}), these modern techniques are recommended. Which ones do you want to incorporate?",
|
|
320
|
+
"multiSelect": true,
|
|
321
|
+
"options": [
|
|
322
|
+
{ "label": "{Technique 1}", "description": "{Brief description + when to use}" },
|
|
323
|
+
{ "label": "{Technique 2}", "description": "{Brief description + when to use}" },
|
|
324
|
+
{ "label": "{Technique 3}", "description": "{Brief description + when to use}" },
|
|
325
|
+
{ "label": "None / custom", "description": "Skip trends or describe your own preference (Other)" }
|
|
326
|
+
]
|
|
327
|
+
}]
|
|
328
|
+
}
|
|
329
|
+
```
|
|
151
330
|
|
|
152
|
-
|
|
331
|
+
Selected trends feed into Step 1.5 (Aesthetic Direction) and Step 4 (Deliverables).
|
|
332
|
+
|
|
333
|
+
---
|
|
334
|
+
|
|
335
|
+
### Step 1.5: Design Thinking — Aesthetic Direction
|
|
153
336
|
|
|
154
337
|
**BEFORE collecting technical requirements**, define visual direction with 4 questions:
|
|
155
338
|
|
|
@@ -158,9 +341,46 @@ If `ui-designer` is NOT in `activeAgents`, skip this phase and continue to Phase
|
|
|
158
341
|
3. **Differentiation**: What is the 1 memorable element of this interface?
|
|
159
342
|
4. **Constraints**: Framework, performance budget, existing brand guidelines
|
|
160
343
|
|
|
161
|
-
**CRITICAL:** Commit to direction BEFORE technical specs. Document in `
|
|
344
|
+
**CRITICAL:** Commit to direction BEFORE technical specs. Document in `design-system.md`
|
|
162
345
|
in section `## Aesthetic Direction` (template available in the standard above).
|
|
163
346
|
|
|
347
|
+
#### Domain-Adaptive Patterns
|
|
348
|
+
|
|
349
|
+
After defining aesthetic direction, apply domain-specific pattern suggestions:
|
|
350
|
+
|
|
351
|
+
Based on the domain detected in Step 1.3.2, suggest domain-adaptive patterns:
|
|
352
|
+
|
|
353
|
+
| Domain | Preferred Directions | Key Patterns to Suggest |
|
|
354
|
+
|--------|---------------------|------------------------|
|
|
355
|
+
| SaaS Dashboard | Industrial, Minimal Refined | Dense bento grid KPIs, skeleton loaders, sidebar glassmorphism, dark mode default |
|
|
356
|
+
| E-commerce | Modern Luxury, Soft Professional | Product card hover lift, CTA colored shadows, image-first layouts, scroll galleries |
|
|
357
|
+
| Landing Page | Editorial, Modern Luxury | Hero aurora gradient, scroll-driven narrative, fluid typography, overlapping layers |
|
|
358
|
+
| Internal Tool | Industrial, Minimal Refined | Compact forms, dense tables, status chips, monospace data displays |
|
|
359
|
+
| Social/Community | Soft Professional, Editorial | Card feed, notification badges, avatar systems, drawer navigation |
|
|
360
|
+
|
|
361
|
+
If the user's chosen direction conflicts with domain recommendations (e.g., Industrial for E-commerce), present an `AskUserQuestion` advisory:
|
|
362
|
+
|
|
363
|
+
```json
|
|
364
|
+
{
|
|
365
|
+
"questions": [{
|
|
366
|
+
"header": "Direction",
|
|
367
|
+
"question": "You chose {direction} for a {domain} project. The recommended directions are {recommended}. Keep your choice or adapt?",
|
|
368
|
+
"multiSelect": false,
|
|
369
|
+
"options": [
|
|
370
|
+
{ "label": "Keep {direction}", "description": "I have specific reasons for this choice" },
|
|
371
|
+
{ "label": "Switch to {recommended[0]}", "description": "{Brief rationale}" }
|
|
372
|
+
]
|
|
373
|
+
}]
|
|
374
|
+
}
|
|
375
|
+
```
|
|
376
|
+
|
|
377
|
+
#### Integration with Selected Trends
|
|
378
|
+
|
|
379
|
+
Incorporate the trends selected in Step 1.3.4 into the aesthetic direction documentation:
|
|
380
|
+
|
|
381
|
+
- Add selected trends to `## Aesthetic Direction` in `design-system.md`
|
|
382
|
+
- Document how each trend maps to the chosen direction
|
|
383
|
+
|
|
164
384
|
**Anti-patterns to avoid:**
|
|
165
385
|
- Purple gradient on white background (AI cliche)
|
|
166
386
|
- Inter/Roboto as display font
|
|
@@ -188,16 +408,14 @@ in section `## Aesthetic Direction` (template available in the standard above).
|
|
|
188
408
|
|
|
189
409
|
Detect the stack from `.morph/config/config.json` and recommend the appropriate library:
|
|
190
410
|
|
|
191
|
-
**Blazor stack:**
|
|
192
|
-
- **Fluent UI Blazor** — dashboards, simple forms, AI components, Microsoft design language
|
|
193
|
-
- **MudBlazor** — advanced data grids, complex charts, material design
|
|
194
|
-
|
|
195
411
|
**Next.js stack:**
|
|
196
412
|
- **shadcn/ui + Radix** (recommended) — composable primitives, full control, Tailwind-native
|
|
197
413
|
- **MUI** — feature-rich, enterprise-grade, material design
|
|
198
414
|
|
|
199
415
|
**Document the decision as an ADR in `decisions.md`** with: context, options considered, decision, and rationale.
|
|
200
416
|
|
|
417
|
+
> **MCP:** After selecting the UI library, use **Context7 MCP** (`resolve-library-id` → `query-docs`) to fetch the library's latest component API (e.g., shadcn/ui primitives, Radix props, MUI component APIs). This ensures component specs in `components.md` reference real, current props — not outdated or hallucinated ones. If Context7 is not available, use **WebSearch** + **WebFetch** to check the official component documentation.
|
|
418
|
+
|
|
201
419
|
### Step 3.5: Visual Mockup (Playwright MCP)
|
|
202
420
|
|
|
203
421
|
> **Purpose:** Generate a real HTML preview using project design tokens before writing formal specs.
|
|
@@ -214,7 +432,7 @@ Create an HTML file that represents the main screen/layout using **real tokens f
|
|
|
214
432
|
- Include representative content (realistic text, placeholder images)
|
|
215
433
|
- All colors via CSS variables: `color: var(--color-primary)` not `color: #3b82f6`
|
|
216
434
|
|
|
217
|
-
**Save to:** `.morph/features/$ARGUMENTS/
|
|
435
|
+
**Save to:** `.morph/features/$ARGUMENTS/1-ui/mockup.html`
|
|
218
436
|
|
|
219
437
|
Example structure:
|
|
220
438
|
```html
|
|
@@ -257,7 +475,7 @@ Example structure:
|
|
|
257
475
|
|
|
258
476
|
**Navigate to the file:**
|
|
259
477
|
```
|
|
260
|
-
mcp__plugin_playwright_playwright__browser_navigate({ url: "file:///[ABSOLUTE_PATH_TO].morph/features/$ARGUMENTS/
|
|
478
|
+
mcp__plugin_playwright_playwright__browser_navigate({ url: "file:///[ABSOLUTE_PATH_TO].morph/features/$ARGUMENTS/1-ui/mockup.html" })
|
|
261
479
|
```
|
|
262
480
|
|
|
263
481
|
**Take screenshots at 3 breakpoints** (resize then screenshot for each):
|
|
@@ -265,19 +483,19 @@ mcp__plugin_playwright_playwright__browser_navigate({ url: "file:///[ABSOLUTE_PA
|
|
|
265
483
|
**Mobile (375px):**
|
|
266
484
|
```
|
|
267
485
|
mcp__plugin_playwright_playwright__browser_resize({ width: 375, height: 812 })
|
|
268
|
-
mcp__plugin_playwright_playwright__browser_take_screenshot({}) → save as .morph/features/$ARGUMENTS/
|
|
486
|
+
mcp__plugin_playwright_playwright__browser_take_screenshot({}) → save as .morph/features/$ARGUMENTS/1-ui/mockup-mobile.png
|
|
269
487
|
```
|
|
270
488
|
|
|
271
489
|
**Tablet (768px):**
|
|
272
490
|
```
|
|
273
491
|
mcp__plugin_playwright_playwright__browser_resize({ width: 768, height: 1024 })
|
|
274
|
-
mcp__plugin_playwright_playwright__browser_take_screenshot({}) → save as .morph/features/$ARGUMENTS/
|
|
492
|
+
mcp__plugin_playwright_playwright__browser_take_screenshot({}) → save as .morph/features/$ARGUMENTS/1-ui/mockup-tablet.png
|
|
275
493
|
```
|
|
276
494
|
|
|
277
495
|
**Desktop (1440px):**
|
|
278
496
|
```
|
|
279
497
|
mcp__plugin_playwright_playwright__browser_resize({ width: 1440, height: 900 })
|
|
280
|
-
mcp__plugin_playwright_playwright__browser_take_screenshot({}) → save as .morph/features/$ARGUMENTS/
|
|
498
|
+
mcp__plugin_playwright_playwright__browser_take_screenshot({}) → save as .morph/features/$ARGUMENTS/1-ui/mockup-desktop.png
|
|
281
499
|
```
|
|
282
500
|
|
|
283
501
|
#### 3.5.3 — Present and Iterate
|
|
@@ -289,7 +507,7 @@ mcp__plugin_playwright_playwright__browser_take_screenshot({}) → save as .morp
|
|
|
289
507
|
3. **Iterate:** Refine `mockup.html` → re-take screenshots → show updated previews
|
|
290
508
|
4. **Continue only when user approves** this visual direction
|
|
291
509
|
|
|
292
|
-
> **Note:** `
|
|
510
|
+
> **Note:** `mockups.md` (Step 4.2) continues to exist as the reference for states and interactions.
|
|
293
511
|
> The PNGs are the visual reference; the .md covers behavior and edge cases.
|
|
294
512
|
|
|
295
513
|
---
|
|
@@ -300,22 +518,22 @@ Create the following files in `.morph/features/$ARGUMENTS/`:
|
|
|
300
518
|
|
|
301
519
|
> **Use templates:** Use `morph-spec template render` to generate files from templates in `.morph/framework/templates/docs/`. Available templates: `ui-design-system`, `ui-mockups`, `ui-components`, `ui-flows`.
|
|
302
520
|
|
|
303
|
-
#### 4.1. `
|
|
521
|
+
#### 4.1. `design-system.md`
|
|
304
522
|
|
|
305
523
|
**If project-level design system exists (`.morph/context/design-system.md`):**
|
|
306
524
|
- Reference it in specs: "Uses project design system at .morph/context/design-system.md"
|
|
307
|
-
- Create `
|
|
525
|
+
- Create `design-system.md` only if there are feature-specific colors/components
|
|
308
526
|
|
|
309
527
|
**If it doesn't exist:**
|
|
310
528
|
- Create complete feature-level design system with:
|
|
311
|
-
- **Section `## Aesthetic Direction
|
|
529
|
+
- **Section `## Aesthetic Direction`**:
|
|
312
530
|
direction, font pair, color philosophy, motion intent, composition approach
|
|
313
531
|
- Color palette (primary, secondary, accent, semantic)
|
|
314
532
|
- Typography (heading scales, body text, code)
|
|
315
533
|
- Spacing and layout (grid, margins, paddings)
|
|
316
534
|
- Base components (buttons, inputs, cards)
|
|
317
535
|
|
|
318
|
-
#### 4.2. `
|
|
536
|
+
#### 4.2. `mockups.md`
|
|
319
537
|
|
|
320
538
|
ASCII wireframes + descriptions:
|
|
321
539
|
- General layout of each screen/page
|
|
@@ -323,15 +541,15 @@ ASCII wireframes + descriptions:
|
|
|
323
541
|
- Responsiveness (desktop, tablet, mobile)
|
|
324
542
|
- States (loading, error, empty, success)
|
|
325
543
|
|
|
326
|
-
#### 4.3. `
|
|
544
|
+
#### 4.3. `components.md`
|
|
327
545
|
|
|
328
|
-
Technical specs for
|
|
329
|
-
- Component to use (
|
|
546
|
+
Technical specs for UI library components:
|
|
547
|
+
- Component to use (Button, DataTable, etc.)
|
|
330
548
|
- Props and configurations
|
|
331
549
|
- Events and bindings
|
|
332
550
|
- Validations and states
|
|
333
551
|
|
|
334
|
-
#### 4.4. `
|
|
552
|
+
#### 4.4. `flows.md`
|
|
335
553
|
|
|
336
554
|
Complete user flows:
|
|
337
555
|
- User stories
|
|
@@ -343,7 +561,7 @@ Complete user flows:
|
|
|
343
561
|
|
|
344
562
|
**PAUSE - Before proceeding to accessibility:**
|
|
345
563
|
|
|
346
|
-
- [ ] Aesthetic direction defined and documented in `
|
|
564
|
+
- [ ] Aesthetic direction defined and documented in `design-system.md`?
|
|
347
565
|
- [ ] Font pair specified (not just Inter/Roboto for display)?
|
|
348
566
|
- [ ] Color philosophy: dominant + accent + rationale documented?
|
|
349
567
|
- [ ] Design system defined (project-level or feature-level)?
|
|
@@ -389,11 +607,11 @@ morph-spec state mark-output $ARGUMENTS ui-flows
|
|
|
389
607
|
|
|
390
608
|
## Generated Outputs
|
|
391
609
|
|
|
392
|
-
- `.morph/features/$ARGUMENTS/
|
|
393
|
-
- `.morph/features/$ARGUMENTS/
|
|
394
|
-
- `.morph/features/$ARGUMENTS/
|
|
395
|
-
- `.morph/features/$ARGUMENTS/
|
|
396
|
-
- `.morph/features/$ARGUMENTS/
|
|
610
|
+
- `.morph/features/$ARGUMENTS/1-ui/design-system.md`
|
|
611
|
+
- `.morph/features/$ARGUMENTS/1-ui/mockups.md`
|
|
612
|
+
- `.morph/features/$ARGUMENTS/1-ui/components.md`
|
|
613
|
+
- `.morph/features/$ARGUMENTS/1-ui/flows.md`
|
|
614
|
+
- `.morph/features/$ARGUMENTS/2-design/decisions.md` (updated with UI library ADR)
|
|
397
615
|
|
|
398
616
|
### Step 7: Validate Design with Frontend Review
|
|
399
617
|
|
|
@@ -448,19 +666,15 @@ Use `AskUserQuestion` to capture explicit approval before advancing:
|
|
|
448
666
|
|
|
449
667
|
## Phase Outputs
|
|
450
668
|
|
|
451
|
-
<!-- morph-outputs:uiux -->
|
|
452
|
-
| Output | Caminho |
|
|
453
|
-
|--------|---------|
|
|
454
|
-
| `uiDesignSystem` | `.morph/features/{feature}/
|
|
455
|
-
| `uiMockups` | `.morph/features/{feature}/
|
|
456
|
-
| `uiComponents` | `.morph/features/{feature}/
|
|
457
|
-
| `uiFlows` | `.morph/features/{feature}/
|
|
458
|
-
| `uiMockupHtml` | `.morph/features/{feature}/2-ui/mockup.html` |
|
|
459
|
-
| `uiMockupMobile` | `.morph/features/{feature}/2-ui/mockup-mobile.png` |
|
|
460
|
-
| `uiMockupTablet` | `.morph/features/{feature}/2-ui/mockup-tablet.png` |
|
|
461
|
-
| `uiMockupDesktop` | `.morph/features/{feature}/2-ui/mockup-desktop.png` |
|
|
669
|
+
<!-- morph-outputs:uiux -->
|
|
670
|
+
| Output | Caminho |
|
|
671
|
+
|--------|---------|
|
|
672
|
+
| `uiDesignSystem` | `.morph/features/{feature}/1-ui/design-system.md` |
|
|
673
|
+
| `uiMockups` | `.morph/features/{feature}/1-ui/mockups.md` |
|
|
674
|
+
| `uiComponents` | `.morph/features/{feature}/1-ui/components.md` |
|
|
675
|
+
| `uiFlows` | `.morph/features/{feature}/1-ui/flows.md` |
|
|
462
676
|
<!-- /morph-outputs -->
|
|
463
677
|
|
|
464
678
|
---
|
|
465
679
|
|
|
466
|
-
Continue automatically to Phase
|
|
680
|
+
Continue automatically to Phase 3 (Design) after approval.
|
|
@@ -4,7 +4,7 @@ description: Guided workflow for mid-implementation scope escalation — analyze
|
|
|
4
4
|
user-invocable: true
|
|
5
5
|
argument-hint: "[feature-name]"
|
|
6
6
|
allowed-tools: Read, Write, Edit, Bash, Glob, Grep, AskUserQuestion
|
|
7
|
-
cliVersion: "4.
|
|
7
|
+
cliVersion: "4.13.0"
|
|
8
8
|
---
|
|
9
9
|
|
|
10
10
|
# Scope Escalation Workflow
|
|
@@ -19,16 +19,16 @@
|
|
|
19
19
|
"standards": ["coding.md", "ef-core.md"]
|
|
20
20
|
},
|
|
21
21
|
{
|
|
22
|
-
"id": "
|
|
23
|
-
"role": "
|
|
22
|
+
"id": "hangfire-orchestrator",
|
|
23
|
+
"role": "Background Jobs & Scheduling",
|
|
24
24
|
"domain": "backend",
|
|
25
|
-
"standards": ["coding.md"
|
|
25
|
+
"standards": ["coding.md"]
|
|
26
26
|
}
|
|
27
27
|
],
|
|
28
28
|
"deliverables": {
|
|
29
|
-
"dotnet-senior": "Application services, business logic, command/query handlers",
|
|
29
|
+
"dotnet-senior": "Application services, business logic, command/query handlers, API endpoints, DTOs",
|
|
30
30
|
"ef-modeler": "Entity models, DbContext, migrations",
|
|
31
|
-
"
|
|
31
|
+
"hangfire-orchestrator": "Background jobs, recurring tasks, job scheduling"
|
|
32
32
|
},
|
|
33
33
|
"estimatedParallelGain": "2-3x throughput vs sequential",
|
|
34
34
|
"agent_team": {
|
|
@@ -38,7 +38,7 @@
|
|
|
38
38
|
{
|
|
39
39
|
"id": "dotnet-senior",
|
|
40
40
|
"spawn_context": "standards/coding.md, standards/architecture/, contracts.cs, spec.md",
|
|
41
|
-
"task_scope": "backend tasks (domain logic, application services, EF Core, API endpoints, DTOs)"
|
|
41
|
+
"task_scope": "backend tasks (domain logic, application services, EF Core, API endpoints, DTOs, background jobs)"
|
|
42
42
|
}
|
|
43
43
|
],
|
|
44
44
|
"coordination_notes": "Single-domain squad — Agent Teams not required. Use subagents for parallelization.",
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"id": "frontend-only",
|
|
3
3
|
"name": "Frontend Squad",
|
|
4
|
-
"description": "Frontend-focused squad:
|
|
4
|
+
"description": "Frontend-focused squad: UI components + CSS + UX",
|
|
5
5
|
"parallel": true,
|
|
6
6
|
"coordination": "ui-designer",
|
|
7
7
|
"waitForAll": true,
|
|
@@ -10,24 +10,33 @@
|
|
|
10
10
|
"id": "ui-designer",
|
|
11
11
|
"role": "UI Design Lead",
|
|
12
12
|
"domain": "frontend",
|
|
13
|
-
"standards": [
|
|
13
|
+
"standards": [
|
|
14
|
+
"css-architecture.md",
|
|
15
|
+
"css-design-system.md"
|
|
16
|
+
]
|
|
14
17
|
},
|
|
15
18
|
{
|
|
16
|
-
"id": "
|
|
17
|
-
"role": "
|
|
19
|
+
"id": "nextjs-expert",
|
|
20
|
+
"role": "Frontend Developer",
|
|
18
21
|
"domain": "frontend",
|
|
19
|
-
"standards": [
|
|
22
|
+
"standards": [
|
|
23
|
+
"coding.md",
|
|
24
|
+
"nextjs-components.md"
|
|
25
|
+
]
|
|
20
26
|
},
|
|
21
27
|
{
|
|
22
28
|
"id": "css-specialist",
|
|
23
29
|
"role": "CSS/Design System Specialist",
|
|
24
30
|
"domain": "frontend",
|
|
25
|
-
"standards": [
|
|
31
|
+
"standards": [
|
|
32
|
+
"css-architecture.md",
|
|
33
|
+
"css-design-system.md"
|
|
34
|
+
]
|
|
26
35
|
}
|
|
27
36
|
],
|
|
28
37
|
"deliverables": {
|
|
29
38
|
"ui-designer": "Design system tokens, component specs, mockup annotations",
|
|
30
|
-
"
|
|
39
|
+
"nextjs-expert": "React components, pages, state management",
|
|
31
40
|
"css-specialist": "CSS modules, design system implementation, responsive layout"
|
|
32
41
|
},
|
|
33
42
|
"estimatedParallelGain": "2x throughput vs sequential",
|
|
@@ -38,7 +47,7 @@
|
|
|
38
47
|
{
|
|
39
48
|
"id": "ui-designer",
|
|
40
49
|
"spawn_context": "standards/css-architecture.md, standards/css-design-system.md, design-system.md, spec.md",
|
|
41
|
-
"task_scope": "frontend tasks (
|
|
50
|
+
"task_scope": "frontend tasks (UI components, CSS, design system implementation, responsive layout)"
|
|
42
51
|
}
|
|
43
52
|
],
|
|
44
53
|
"coordination_notes": "Single-domain squad — Agent Teams not required. Use subagents for parallelization.",
|