@polymorphism-tech/morph-spec 4.3.7 → 4.5.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/.morph/.morphversion +3 -3
- package/.morph/analytics/threads-log.jsonl +44 -9
- package/.morph/config/config.json +2 -3
- package/.morph/framework/standards/STANDARDS.json +812 -0
- package/.morph/{standards → framework/standards}/ai-agents/team-orchestration.md +3 -3
- package/.morph/framework/standards/integration/mcp/mcp-tools.md +384 -0
- package/.morph/{templates → framework/templates}/README.md +17 -17
- package/.morph/{templates → framework/templates}/REGISTRY.json +48 -233
- package/.morph/framework/templates/code/dotnet/contracts/contracts.cs.hbs +172 -0
- package/.morph/{templates → framework/templates}/context/CONTEXT-FEATURE.md +1 -1
- package/.morph/{templates → framework/templates}/context/CONTEXT.md +3 -3
- package/.morph/framework/templates/docs/clarifications.md +253 -0
- package/.morph/framework/templates/docs/onboarding.md +123 -0
- package/.morph/framework/templates/docs/schema-analysis.md +119 -0
- package/.morph/{templates → framework/templates}/docs/spec.md +149 -149
- package/.morph/framework/templates/docs/ui-components.md +124 -0
- package/.morph/framework/templates/docs/ui-design-system.md +76 -0
- package/.morph/framework/templates/docs/ui-flows.md +167 -0
- package/.morph/framework/templates/docs/ui-mockups.md +98 -0
- package/.morph/{templates → framework/templates}/examples/spec-examples.md +1 -1
- package/.morph/{templates → framework/templates}/infrastructure/github/README.md +11 -11
- package/.morph/{templates → framework/templates}/infrastructure/github/workflows/deploy-azure-app-service.yml.hbs +2 -2
- package/.morph/{templates → framework/templates}/meta-prompts/parallel-workers/parallel-worker.md +2 -2
- package/.morph/{templates → framework/templates}/meta-prompts/validators/pre-commit-validator.md +1 -1
- package/.morph/logs/tool-failures.log +51 -0
- package/.morph/memory/pre-compact-2026-02-22T17-01-01-658Z.json +16 -0
- package/.morph/state.json +1 -1
- package/CLAUDE.md +20 -119
- package/README.md +20 -18
- package/bin/detect-agents.js +1 -1
- package/bin/morph-spec.js +116 -266
- package/bin/task-manager.cjs +2 -2
- package/bin/validate.js +1 -1
- package/claude-plugin.json +14 -0
- package/docs/claude-alignment-report.md +137 -0
- package/docs/plans/2026-02-22-claude-docs-morph-alignment-analysis.md +512 -0
- package/docs/plans/2026-02-22-claude-settings.md +515 -0
- package/docs/plans/2026-02-22-morph-cc-alignment-impl.md +728 -0
- package/docs/plans/2026-02-22-morph-spec-next.md +478 -0
- package/docs/plans/2026-02-22-native-alignment-design.md +199 -0
- package/docs/plans/2026-02-22-native-alignment-impl.md +925 -0
- package/docs/plans/2026-02-22-native-enrichment-design.md +244 -0
- package/docs/plans/2026-02-22-native-enrichment.md +735 -0
- package/framework/CLAUDE.md +77 -0
- package/framework/commands/morph-apply.md +9 -9
- package/framework/commands/morph-archive.md +8 -8
- package/framework/commands/morph-infra.md +1 -1
- package/framework/commands/morph-proposal.md +9 -9
- package/framework/commands/morph-status.md +3 -3
- package/framework/commands/morph-troubleshoot.md +1 -1
- package/framework/hooks/README.md +201 -282
- package/framework/hooks/claude-code/notification/approval-reminder.js +52 -0
- package/framework/hooks/claude-code/post-tool-use/dispatch.js +83 -0
- package/framework/hooks/claude-code/post-tool-use/handle-tool-failure.js +42 -0
- package/framework/hooks/claude-code/pre-compact/save-morph-context.js +61 -0
- package/framework/hooks/claude-code/pre-tool-use/enforce-phase-writes.js +71 -0
- package/framework/hooks/claude-code/pre-tool-use/protect-readonly-files.js +58 -0
- package/framework/hooks/claude-code/pre-tool-use/protect-spec-files.js +64 -0
- package/framework/hooks/claude-code/session-start/inject-morph-context.js +94 -0
- package/framework/hooks/claude-code/statusline.py +239 -0
- package/framework/hooks/claude-code/statusline.sh +7 -0
- package/framework/hooks/claude-code/stop/validate-completion.js +88 -0
- package/framework/hooks/claude-code/user-prompt/enrich-prompt.js +91 -0
- package/framework/hooks/shared/hook-response.js +45 -0
- package/framework/hooks/shared/phase-utils.js +129 -0
- package/framework/hooks/shared/state-reader.js +138 -0
- package/framework/hooks/shared/stdin-reader.js +26 -0
- package/framework/phases.json +145 -0
- package/framework/rules/csharp-standards.md +10 -0
- package/framework/rules/frontend-standards.md +14 -0
- package/framework/rules/infrastructure-standards.md +13 -0
- package/framework/rules/morph-workflow.md +86 -0
- package/framework/rules/testing-standards.md +11 -0
- package/framework/skills/level-0-meta/brainstorming.md +133 -0
- package/framework/skills/level-0-meta/code-review.md +12 -4
- package/framework/skills/level-0-meta/mcp-registry.json +207 -0
- package/framework/skills/level-0-meta/morph-checklist.md +9 -1
- package/framework/skills/level-0-meta/simulation-checklist.md +9 -1
- package/framework/skills/level-0-meta/tool-usage-guide.md +335 -0
- package/framework/skills/level-0-meta/verification-before-completion.md +145 -0
- package/framework/skills/level-1-workflows/morph-replicate.md +9 -1
- package/framework/skills/level-1-workflows/phase-clarify.md +65 -4
- package/framework/skills/level-1-workflows/phase-codebase-analysis.md +182 -0
- package/framework/skills/level-1-workflows/phase-design.md +342 -80
- package/framework/skills/level-1-workflows/phase-implement.md +254 -0
- package/framework/skills/level-1-workflows/phase-setup.md +76 -10
- package/framework/skills/level-1-workflows/phase-tasks.md +88 -7
- package/framework/skills/level-1-workflows/phase-uiux.md +95 -17
- package/framework/skills/level-2-domains/ai-agents/ai-system-architect.md +8 -1
- package/framework/skills/level-2-domains/architecture/po-pm-advisor.md +8 -1
- package/framework/skills/level-2-domains/architecture/prompt-engineer.md +8 -1
- package/framework/skills/level-2-domains/architecture/seo-growth-hacker.md +8 -1
- package/framework/skills/level-2-domains/architecture/standards-architect.md +11 -4
- package/framework/skills/level-2-domains/backend/api-designer.md +8 -1
- package/framework/skills/level-2-domains/backend/dotnet-senior.md +8 -1
- package/framework/skills/level-2-domains/backend/ef-modeler.md +8 -1
- package/framework/skills/level-2-domains/backend/hangfire-orchestrator.md +9 -2
- package/framework/skills/level-2-domains/backend/ms-agent-expert.md +8 -1
- package/framework/skills/level-2-domains/frontend/blazor-builder.md +8 -1
- package/framework/skills/level-2-domains/frontend/nextjs-expert.md +8 -1
- package/framework/skills/level-2-domains/frontend/ui-ux-designer.md +9 -2
- package/framework/skills/level-2-domains/infrastructure/azure-architect.md +8 -1
- package/framework/skills/level-2-domains/infrastructure/azure-deploy-specialist.md +8 -1
- package/framework/skills/level-2-domains/infrastructure/bicep-architect.md +8 -1
- package/framework/skills/level-2-domains/infrastructure/container-specialist.md +8 -1
- package/framework/skills/level-2-domains/infrastructure/devops-engineer.md +8 -1
- package/framework/skills/level-2-domains/integrations/asaas-financial.md +8 -1
- package/framework/skills/level-2-domains/integrations/azure-identity.md +8 -1
- package/framework/skills/level-2-domains/integrations/clerk-auth.md +8 -1
- package/framework/skills/level-2-domains/integrations/{hangfire-orchestrator.md → hangfire-integration.md} +8 -1
- package/framework/skills/level-2-domains/integrations/resend-email.md +8 -1
- package/framework/skills/level-2-domains/quality/code-analyzer.md +10 -3
- package/framework/skills/level-2-domains/quality/testing-specialist.md +8 -1
- package/framework/standards/STANDARDS.json +812 -0
- package/framework/standards/ai-agents/team-orchestration.md +3 -3
- package/framework/standards/frontend/nextjs/nextjs-patterns.md +17 -0
- package/framework/standards/integration/mcp/mcp-tools.md +384 -0
- package/framework/templates/README.md +17 -17
- package/framework/templates/REGISTRY.json +48 -233
- package/framework/templates/code/dotnet/contracts/contracts.cs.hbs +172 -0
- package/framework/templates/context/CONTEXT-FEATURE.md +1 -1
- package/framework/templates/context/CONTEXT.md +3 -3
- package/framework/templates/docs/clarifications.md +253 -0
- package/framework/templates/docs/onboarding.md +123 -0
- package/framework/templates/docs/schema-analysis.md +119 -0
- package/framework/templates/docs/spec.md +149 -149
- package/framework/templates/docs/ui-components.md +124 -0
- package/framework/templates/docs/ui-design-system.md +76 -0
- package/framework/templates/docs/ui-flows.md +167 -0
- package/framework/templates/docs/ui-mockups.md +98 -0
- package/framework/templates/docs/user-stories.md +34 -0
- package/framework/templates/examples/spec-examples.md +1 -1
- package/framework/templates/infrastructure/github/README.md +11 -11
- package/framework/templates/infrastructure/github/workflows/deploy-azure-app-service.yml.hbs +2 -2
- package/framework/templates/meta-prompts/parallel-workers/parallel-worker.md +2 -2
- package/framework/templates/meta-prompts/validators/pre-commit-validator.md +1 -1
- package/framework/workflows/configs/express.json +45 -0
- package/framework/workflows/configs/spec-only.json +43 -0
- package/framework/workflows/docs/enforcement-pipeline.md +8 -8
- package/framework/workflows/docs/full-morph.md +3 -3
- package/package.json +3 -1
- package/scripts/generate-refs.js +336 -0
- package/scripts/generate-standards-registry.js +44 -0
- package/scripts/validate-real.mjs +255 -0
- package/src/commands/feature/create-story.js +362 -361
- package/src/commands/feature/shard-spec.js +225 -224
- package/src/commands/feature/sprint-status.js +1 -1
- package/src/commands/generation/generate-onboarding.js +169 -0
- package/src/commands/generation/generate.js +2 -2
- package/src/commands/mcp/mcp-setup.js +315 -0
- package/src/commands/project/changes.js +66 -0
- package/src/commands/project/checkpoint.js +209 -0
- package/src/commands/project/cost.js +179 -0
- package/src/commands/project/diff.js +278 -0
- package/src/commands/project/doctor.js +55 -7
- package/src/commands/project/init.js +318 -76
- package/src/commands/project/revert.js +173 -0
- package/src/commands/project/standards.js +80 -0
- package/src/commands/project/status.js +376 -0
- package/src/commands/project/update-agents.js +23 -0
- package/src/commands/project/update.js +63 -30
- package/src/commands/state/advance-phase.js +4 -3
- package/src/commands/state/state.js +10 -3
- package/src/commands/state/validate-phase.js +19 -2
- package/src/commands/templates/template-customize.js +4 -4
- package/src/commands/templates/template-render.js +1 -1
- package/src/commands/templates/template-show.js +1 -1
- package/src/commands/validation/validate-feature.js +359 -0
- package/src/core/orchestrator.js +3 -38
- package/src/core/paths/output-schema.js +135 -0
- package/src/core/state/state-manager.js +831 -592
- package/src/core/templates/template-registry.js +2 -2
- package/src/core/workflows/workflow-detector.js +17 -1
- package/src/lib/agents/micro-agent-factory.js +1 -1
- package/src/lib/context/context-bundler.js +2 -1
- package/src/lib/detectors/claude-config-detector.js +392 -0
- package/src/lib/detectors/conversation-analyzer.js +4 -4
- package/src/lib/detectors/design-system-detector.js +6 -5
- package/src/lib/detectors/standards-generator.js +2 -2
- package/src/lib/generators/context-generator.js +539 -538
- package/src/lib/generators/recap-generator.js +1 -1
- package/src/lib/generators/settings-generator.js +210 -0
- package/src/lib/hooks/hook-executor.js +1 -1
- package/src/lib/installers/mcp-installer.js +299 -0
- package/src/lib/learning/learning-system.js +3 -3
- package/src/lib/orchestration/team-orchestrator.js +1 -1
- package/src/lib/standards/standards-context-injector.js +7 -7
- package/src/lib/threads/thread-coordinator.js +1 -1
- package/src/lib/troubleshooting/troubleshoot-grep.js +1 -1
- package/src/lib/validators/contracts/contract-compliance-validator.js +274 -273
- package/src/lib/validators/design-system/design-system-validator.js +1 -1
- package/src/lib/validators/spec-validator.js +258 -258
- package/src/lib/validators/validation-runner.js +270 -269
- package/src/utils/agents-installer.js +206 -0
- package/src/utils/claude-settings-manager.js +258 -0
- package/src/utils/file-copier.js +1 -1
- package/src/utils/hooks-installer.js +354 -28
- package/src/utils/skills-installer.js +74 -0
- package/.morph/project/context/detection-log.md +0 -16
- package/.morph/project/standards/inferred.md +0 -59
- package/framework/hooks/agent-stop/validate-and-continue.js +0 -96
- package/framework/hooks/agent-stop/validate-checkpoints.js +0 -101
- package/framework/hooks/agent-stop/validate-tests.js +0 -109
- package/framework/hooks/agent-teams/dispatch.js +0 -67
- package/framework/hooks/agent-teams/phase-advanced.js +0 -80
- package/framework/hooks/agent-teams/task-completed.js +0 -76
- package/framework/hooks/agent-teams/teammate-idle.js +0 -70
- package/src/commands/agents/agents-fuse.js +0 -97
- package/src/commands/agents/micro-agent.js +0 -112
- package/src/commands/agents/spawn-team.js +0 -237
- package/src/commands/agents/squad-template.js +0 -146
- package/src/commands/analytics/analytics.js +0 -176
- package/src/commands/context/context-prime.js +0 -63
- package/src/commands/context/core-four.js +0 -54
- package/src/commands/generation/generate-context.js +0 -40
- package/src/commands/project/detect-agents.js +0 -207
- package/src/commands/project/detect-workflow.js +0 -174
- package/src/commands/threads/thread-template.js +0 -103
- package/src/commands/threads/threads.js +0 -261
- package/src/commands/utils/session-summary.js +0 -291
- package/src/llm/analyzer.js +0 -215
- package/src/llm/few-shot-examples.js +0 -216
- package/src/llm/project-config-schema.json +0 -188
- package/src/llm/prompt-builder.js +0 -96
- /package/.morph/{project/context → context}/README.md +0 -0
- /package/.morph/{config → framework}/agents.json +0 -0
- /package/.morph/{standards → framework/standards}/ai-agents/blazor-ui.md +0 -0
- /package/.morph/{standards → framework/standards}/ai-agents/production.md +0 -0
- /package/.morph/{standards → framework/standards}/ai-agents/setup.md +0 -0
- /package/.morph/{standards → framework/standards}/ai-agents/workflows.md +0 -0
- /package/.morph/{standards → framework/standards}/architecture/ddd/aggregates.md +0 -0
- /package/.morph/{standards → framework/standards}/architecture/ddd/entities.md +0 -0
- /package/.morph/{standards → framework/standards}/architecture/ddd/value-objects.md +0 -0
- /package/.morph/{standards → framework/standards}/backend/api/minimal-api.md +0 -0
- /package/.morph/{standards → framework/standards}/backend/api/rest.md +0 -0
- /package/.morph/{standards → framework/standards}/backend/api/validation.md +0 -0
- /package/.morph/{standards → framework/standards}/backend/authentication/passkeys.md +0 -0
- /package/.morph/{standards → framework/standards}/backend/database/ef-core.md +0 -0
- /package/.morph/{standards → framework/standards}/backend/database/migrations.md +0 -0
- /package/.morph/{standards → framework/standards}/backend/database/postgresql/database.md +0 -0
- /package/.morph/{standards → framework/standards}/backend/database/repository-patterns.md +0 -0
- /package/.morph/{standards → framework/standards}/backend/database/vector-search-rag.md +0 -0
- /package/.morph/{standards → framework/standards}/backend/dotnet/async.md +0 -0
- /package/.morph/{standards → framework/standards}/backend/dotnet/core.md +0 -0
- /package/.morph/{standards → framework/standards}/backend/dotnet/di.md +0 -0
- /package/.morph/{standards → framework/standards}/backend/dotnet/program-cs-checklist.md +0 -0
- /package/.morph/{standards → framework/standards}/backend/integrations/asaas/asaas-api.md +0 -0
- /package/.morph/{standards → framework/standards}/backend/integrations/clerk/clerk-auth.md +0 -0
- /package/.morph/{standards → framework/standards}/backend/integrations/hangfire/hangfire-jobs.md +0 -0
- /package/.morph/{standards → framework/standards}/backend/integrations/resend/resend-email.md +0 -0
- /package/.morph/{standards → framework/standards}/context/analytics.md +0 -0
- /package/.morph/{standards → framework/standards}/context/bundles.md +0 -0
- /package/.morph/{standards → framework/standards}/context/priming.md +0 -0
- /package/.morph/{standards → framework/standards}/core/architecture.md +0 -0
- /package/.morph/{standards → framework/standards}/core/coding.md +0 -0
- /package/.morph/{standards → framework/standards}/core/git-branching-strategy.md +0 -0
- /package/.morph/{standards → framework/standards}/core/git.md +0 -0
- /package/.morph/{standards → framework/standards}/core/testing.md +0 -0
- /package/.morph/{standards → framework/standards}/data/nosql/blob-storage.md +0 -0
- /package/.morph/{standards → framework/standards}/data/nosql/cache/redis.md +0 -0
- /package/.morph/{standards → framework/standards}/data/nosql/cosmos-db.md +0 -0
- /package/.morph/{standards → framework/standards}/data/vector-search/azure-ai-search.md +0 -0
- /package/.morph/{standards → framework/standards}/data/vector-search/rag-chunking.md +0 -0
- /package/.morph/{standards → framework/standards}/frontend/blazor/design-checklist.md +0 -0
- /package/.morph/{standards → framework/standards}/frontend/blazor/fluent-ui-setup.md +0 -0
- /package/.morph/{standards → framework/standards}/frontend/blazor/fluent-ui.md +0 -0
- /package/.morph/{standards → framework/standards}/frontend/blazor/html-conversion.md +0 -0
- /package/.morph/{standards → framework/standards}/frontend/blazor/lifecycle.md +0 -0
- /package/.morph/{standards → framework/standards}/frontend/blazor/pitfalls.md +0 -0
- /package/.morph/{standards → framework/standards}/frontend/blazor/state.md +0 -0
- /package/.morph/{standards → framework/standards}/frontend/design-system/animations.md +0 -0
- /package/.morph/{standards → framework/standards}/frontend/design-system/naming.md +0 -0
- /package/.morph/{standards → framework/standards}/frontend/nextjs/nextjs-patterns.md +0 -0
- /package/.morph/{standards → framework/standards}/infrastructure/azure/azure.md +0 -0
- /package/.morph/{standards → framework/standards}/infrastructure/azure/bicep/bicep-patterns.md +0 -0
- /package/.morph/{standards → framework/standards}/infrastructure/azure/devops/azure-devops-setup.md +0 -0
- /package/.morph/{standards → framework/standards}/infrastructure/azure/devops/local-development.md +0 -0
- /package/.morph/{standards → framework/standards}/infrastructure/azure/services/functions.md +0 -0
- /package/.morph/{standards → framework/standards}/infrastructure/azure/services/service-bus.md +0 -0
- /package/.morph/{standards → framework/standards}/infrastructure/azure/services/storage.md +0 -0
- /package/.morph/{standards → framework/standards}/infrastructure/docker/easypanel-deploy.md +0 -0
- /package/.morph/{standards → framework/standards}/infrastructure/supabase/mcp-setup.md +0 -0
- /package/.morph/{standards → framework/standards}/infrastructure/supabase/supabase-auth.md +0 -0
- /package/.morph/{standards → framework/standards}/infrastructure/supabase/supabase-pgvector.md +0 -0
- /package/.morph/{standards → framework/standards}/infrastructure/supabase/supabase-rls.md +0 -0
- /package/.morph/{standards → framework/standards}/infrastructure/supabase/supabase-storage.md +0 -0
- /package/.morph/{standards → framework/standards}/integration/api/graphql.md +0 -0
- /package/.morph/{standards → framework/standards}/integration/api/grpc.md +0 -0
- /package/.morph/{standards → framework/standards}/integration/api/rest-design.md +0 -0
- /package/.morph/{standards → framework/standards}/integration/event-driven/cqrs.md +0 -0
- /package/.morph/{standards → framework/standards}/integration/event-driven/event-sourcing.md +0 -0
- /package/.morph/{standards → framework/standards}/integration/event-driven/service-bus.md +0 -0
- /package/.morph/{standards → framework/standards}/observability/logging.md +0 -0
- /package/.morph/{standards → framework/standards}/observability/metrics.md +0 -0
- /package/.morph/{standards → framework/standards}/observability/monitoring.md +0 -0
- /package/.morph/{standards → framework/standards}/observability/tracing.md +0 -0
- /package/.morph/{standards → framework/standards}/workflows/parallel-execution.md +0 -0
- /package/.morph/{standards → framework/standards}/workflows/thread-management.md +0 -0
- /package/.morph/{templates → framework/templates}/.idea/morph-templates.xml +0 -0
- /package/.morph/{templates → framework/templates}/.vscode/morph-templates.code-snippets +0 -0
- /package/.morph/{templates → framework/templates}/IDE-SNIPPETS.md +0 -0
- /package/.morph/{templates → framework/templates}/code/dotnet/backend/repository.cs +0 -0
- /package/.morph/{templates → framework/templates}/code/dotnet/backend/service.cs +0 -0
- /package/.morph/{templates → framework/templates}/code/dotnet/contracts/Commands.cs +0 -0
- /package/.morph/{templates → framework/templates}/code/dotnet/contracts/Entities.cs +0 -0
- /package/.morph/{templates → framework/templates}/code/dotnet/contracts/Queries.cs +0 -0
- /package/.morph/{templates → framework/templates}/code/dotnet/contracts/README.md +0 -0
- /package/.morph/{templates → framework/templates}/code/dotnet/contracts/api-contracts.cs +0 -0
- /package/.morph/{templates → framework/templates}/code/dotnet/contracts/contracts.cs +0 -0
- /package/.morph/{templates → framework/templates}/code/dotnet/database/migration.cs +0 -0
- /package/.morph/{templates → framework/templates}/code/dotnet/frontend/component.razor +0 -0
- /package/.morph/{templates → framework/templates}/code/dotnet/jobs/agent.cs +0 -0
- /package/.morph/{templates → framework/templates}/code/dotnet/jobs/job.cs +0 -0
- /package/.morph/{templates → framework/templates}/code/dotnet/test.cs +0 -0
- /package/.morph/{templates → framework/templates}/code/sql/rls-policy.sql +0 -0
- /package/.morph/{templates → framework/templates}/code/sql/supabase-migration.sql +0 -0
- /package/.morph/{templates → framework/templates}/code/sql/supabase-migration.template.sql +0 -0
- /package/.morph/{templates → framework/templates}/code/typescript/contracts.ts +0 -0
- /package/.morph/{templates → framework/templates}/docs/proposal.md +0 -0
- /package/.morph/{templates → framework/templates}/examples/design-system-examples.md +0 -0
- /package/.morph/{templates → framework/templates}/feature/decisions.md +0 -0
- /package/.morph/{templates → framework/templates}/feature/recap.md +0 -0
- /package/.morph/{templates → framework/templates}/feature/tasks.md +0 -0
- /package/.morph/{templates → framework/templates}/infrastructure/azure/Dockerfile.example +0 -0
- /package/.morph/{templates → framework/templates}/infrastructure/azure/README.md +0 -0
- /package/.morph/{templates → framework/templates}/infrastructure/azure/app-insights.bicep +0 -0
- /package/.morph/{templates → framework/templates}/infrastructure/azure/app-service.bicep +0 -0
- /package/.morph/{templates → framework/templates}/infrastructure/azure/container-app-env.bicep +0 -0
- /package/.morph/{templates → framework/templates}/infrastructure/azure/container-app.bicep +0 -0
- /package/.morph/{templates → framework/templates}/infrastructure/azure/deploy-checklist.md +0 -0
- /package/.morph/{templates → framework/templates}/infrastructure/azure/deploy.ps1 +0 -0
- /package/.morph/{templates → framework/templates}/infrastructure/azure/deploy.sh +0 -0
- /package/.morph/{templates → framework/templates}/infrastructure/azure/key-vault.bicep +0 -0
- /package/.morph/{templates → framework/templates}/infrastructure/azure/main.bicep +0 -0
- /package/.morph/{templates → framework/templates}/infrastructure/azure/parameters.dev.json +0 -0
- /package/.morph/{templates → framework/templates}/infrastructure/azure/parameters.prod.json +0 -0
- /package/.morph/{templates → framework/templates}/infrastructure/azure/parameters.staging.json +0 -0
- /package/.morph/{templates → framework/templates}/infrastructure/azure/sql-database.bicep +0 -0
- /package/.morph/{templates → framework/templates}/infrastructure/azure/storage.bicep +0 -0
- /package/.morph/{templates → framework/templates}/infrastructure/docker/Dockerfile.template +0 -0
- /package/.morph/{templates → framework/templates}/infrastructure/docker/docker-compose.template.yml +0 -0
- /package/.morph/{templates → framework/templates}/infrastructure/docker/dockerfile-api.dockerfile +0 -0
- /package/.morph/{templates → framework/templates}/infrastructure/docker/dockerfile-web.dockerfile +0 -0
- /package/.morph/{templates → framework/templates}/infrastructure/docker/easypanel.template.json +0 -0
- /package/.morph/{templates → framework/templates}/infrastructure/github/actions/azure-auth/action.yml.hbs +0 -0
- /package/.morph/{templates → framework/templates}/infrastructure/github/actions/docker-build-push/action.yml.hbs +0 -0
- /package/.morph/{templates → framework/templates}/infrastructure/github/actions/health-check/action.yml.hbs +0 -0
- /package/.morph/{templates → framework/templates}/infrastructure/github/workflows/deploy-easypanel.yml.hbs +0 -0
- /package/.morph/{templates → framework/templates}/infrastructure/github/workflows/docker-build-push.yml.hbs +0 -0
- /package/.morph/{templates → framework/templates}/infrastructure/github/workflows/dotnet-build.yml.hbs +0 -0
- /package/.morph/{templates → framework/templates}/integrations/asaas-client.cs +0 -0
- /package/.morph/{templates → framework/templates}/integrations/asaas-webhook.cs +0 -0
- /package/.morph/{templates → framework/templates}/integrations/azure-identity-config.cs +0 -0
- /package/.morph/{templates → framework/templates}/integrations/clerk-config.cs +0 -0
- /package/.morph/{templates → framework/templates}/meta-prompts/fusion/fusion-agent.md +0 -0
- /package/.morph/{templates → framework/templates}/meta-prompts/fusion/fusion-aggregator.md +0 -0
- /package/.morph/{templates → framework/templates}/meta-prompts/hops/hop-retry.md +0 -0
- /package/.morph/{templates → framework/templates}/meta-prompts/hops/hop-validation.md +0 -0
- /package/.morph/{templates → framework/templates}/meta-prompts/hops/hop-wrapper.md +0 -0
- /package/.morph/{templates → framework/templates}/meta-prompts/parallel-workers/parallel-coordinator.md +0 -0
- /package/.morph/{templates → framework/templates}/meta-prompts/squad-leaders/backend-squad.md +0 -0
- /package/.morph/{templates → framework/templates}/meta-prompts/squad-leaders/frontend-squad.md +0 -0
- /package/.morph/{templates → framework/templates}/meta-prompts/squad-leaders/squad-leader.md +0 -0
- /package/.morph/{templates → framework/templates}/meta-prompts/validators/checkpoint-validator.md +0 -0
- /package/.morph/{templates → framework/templates}/saas/subscription.cs +0 -0
- /package/.morph/{templates → framework/templates}/saas/tenant.cs +0 -0
- /package/.morph/{templates → framework/templates}/state.template.json +0 -0
- /package/.morph/{templates → framework/templates}/ui/FluentDesignTheme.cs +0 -0
- /package/.morph/{templates → framework/templates}/ui/MudTheme.cs +0 -0
- /package/.morph/{templates → framework/templates}/ui/design-system.css +0 -0
- /package/framework/hooks/{commit-msg → git/commit-msg}/conventional-commits.sh +0 -0
- /package/framework/hooks/{pre-commit → git/pre-commit}/agents.sh +0 -0
- /package/framework/hooks/{pre-commit → git/pre-commit}/orchestrator.sh +0 -0
- /package/framework/hooks/{pre-commit → git/pre-commit}/specs.sh +0 -0
- /package/framework/hooks/{pre-push → git/pre-push}/run-tests.sh +0 -0
|
@@ -263,13 +263,13 @@ Each reviewer reports findings to the lead, then synthesize into review.md
|
|
|
263
263
|
- `CLAUDE.md` (MORPH-SPEC instructions)
|
|
264
264
|
- `.claude/skills/` (all available skills)
|
|
265
265
|
- `.morph/config.json` (project configuration)
|
|
266
|
-
- `framework/standards/` + `.morph/standards/`
|
|
266
|
+
- `framework/standards/` + `.morph/framework/standards/`
|
|
267
267
|
|
|
268
268
|
**Pass task-specific context in spawn prompt:**
|
|
269
269
|
```
|
|
270
270
|
Spawn backend teammate with prompt: "Implement scheduled reports feature.
|
|
271
271
|
Active agents: ef-modeler, hangfire-orchestrator, dotnet-senior.
|
|
272
|
-
Read .morph/
|
|
272
|
+
Read .morph/features/scheduled-reports/1-design/spec.md and contracts.cs.
|
|
273
273
|
Follow Blazor concurrency patterns from framework/standards/blazor-state.md.
|
|
274
274
|
All background jobs MUST use IDbContextFactory (scoped repository pattern)."
|
|
275
275
|
```
|
|
@@ -357,7 +357,7 @@ rm -rf ~/.claude/teams/scheduled-reports
|
|
|
357
357
|
```json
|
|
358
358
|
{
|
|
359
359
|
"dangerouslySkipPermissions": {
|
|
360
|
-
"allowedPaths": [".morph/
|
|
360
|
+
"allowedPaths": [".morph/features/**"],
|
|
361
361
|
"allowedCommands": ["morph-spec task done", "morph-spec validate-*"]
|
|
362
362
|
}
|
|
363
363
|
}
|
|
@@ -0,0 +1,384 @@
|
|
|
1
|
+
# Integration Standard: MCP Tools in MORPH Workflows
|
|
2
|
+
|
|
3
|
+
> Reference for using Model Context Protocol (MCP) tools across morph-spec phases. Each phase benefits from different MCPs depending on what data is needed.
|
|
4
|
+
|
|
5
|
+
## MCP Availability Detection
|
|
6
|
+
|
|
7
|
+
Before using any MCP tool, check if it's available in the current session:
|
|
8
|
+
|
|
9
|
+
```javascript
|
|
10
|
+
// Pattern: Attempt the call — if the tool doesn't exist, Claude Code will report it
|
|
11
|
+
// There is no "list MCPs" command; just try the most common operation
|
|
12
|
+
|
|
13
|
+
// Supabase MCP
|
|
14
|
+
await mcp__supabase__list_tables();
|
|
15
|
+
|
|
16
|
+
// GitHub MCP
|
|
17
|
+
await mcp__github__get_repo();
|
|
18
|
+
|
|
19
|
+
// Context7 (library docs)
|
|
20
|
+
await mcp__context7__resolve_library_id({ libraryName: "react" });
|
|
21
|
+
|
|
22
|
+
// Playwright (browser automation)
|
|
23
|
+
await mcp__playwright__browser_navigate({ url: "https://example.com" });
|
|
24
|
+
```
|
|
25
|
+
|
|
26
|
+
**Fallback rule:** If an MCP is not available, every phase has a manual alternative using Claude Code native tools (Read, Grep, Glob, Bash).
|
|
27
|
+
|
|
28
|
+
---
|
|
29
|
+
|
|
30
|
+
## MCP Providers by Phase
|
|
31
|
+
|
|
32
|
+
### Phase 1 (Setup) — Project Discovery
|
|
33
|
+
|
|
34
|
+
| MCP | Use Case | Example |
|
|
35
|
+
|-----|----------|---------|
|
|
36
|
+
| **GitHub** | Repo info, recent PRs, issues | `mcp__github__get_repo()` |
|
|
37
|
+
| **Filesystem** | Scan project structure | Native Glob/Read preferred |
|
|
38
|
+
|
|
39
|
+
```javascript
|
|
40
|
+
// Detect project type from repo metadata
|
|
41
|
+
const repo = await mcp__github__get_repo();
|
|
42
|
+
// → language, default_branch, topics
|
|
43
|
+
|
|
44
|
+
// Fallback: use Glob to detect stack
|
|
45
|
+
// Glob: "**/{package.json,*.csproj,*.sln,go.mod,Cargo.toml}"
|
|
46
|
+
```
|
|
47
|
+
|
|
48
|
+
### Phase 1.5 (UI/UX) — Design References
|
|
49
|
+
|
|
50
|
+
| MCP | Use Case | Example |
|
|
51
|
+
|-----|----------|---------|
|
|
52
|
+
| **Figma** | Extract design tokens, components | `mcp__figma__get_file({ fileKey })` |
|
|
53
|
+
| **Playwright** | Navigate, screenshot, inspect live pages | `mcp__playwright__browser_navigate({ url })` |
|
|
54
|
+
| **Context7** | Component library documentation | `mcp__context7__query_docs({ libraryId, query })` |
|
|
55
|
+
|
|
56
|
+
```javascript
|
|
57
|
+
// Get design tokens from Figma
|
|
58
|
+
const file = await mcp__figma__get_file({ fileKey: "abc123" });
|
|
59
|
+
// → colors, typography, spacing from design file
|
|
60
|
+
|
|
61
|
+
// Screenshot existing app for design reference
|
|
62
|
+
await mcp__playwright__browser_navigate({ url: "https://app.example.com/dashboard" });
|
|
63
|
+
const screenshot = await mcp__playwright__browser_take_screenshot();
|
|
64
|
+
// → Visual reference for UI/UX design
|
|
65
|
+
|
|
66
|
+
// Inspect page structure via accessibility tree
|
|
67
|
+
const snapshot = await mcp__playwright__browser_snapshot();
|
|
68
|
+
// → Structured element tree (headings, buttons, inputs, etc.)
|
|
69
|
+
|
|
70
|
+
// Test responsive layout
|
|
71
|
+
await mcp__playwright__browser_resize({ width: 375, height: 812 });
|
|
72
|
+
const mobileScreenshot = await mcp__playwright__browser_take_screenshot();
|
|
73
|
+
|
|
74
|
+
// Get MudBlazor component docs for UI specs
|
|
75
|
+
const libId = await mcp__context7__resolve_library_id({
|
|
76
|
+
libraryName: "mudblazor",
|
|
77
|
+
query: "data grid with sorting and filtering"
|
|
78
|
+
});
|
|
79
|
+
const docs = await mcp__context7__query_docs({
|
|
80
|
+
libraryId: libId,
|
|
81
|
+
query: "DataGrid component props and events"
|
|
82
|
+
});
|
|
83
|
+
|
|
84
|
+
// Fallback: WebSearch for component documentation
|
|
85
|
+
// WebFetch for specific component API pages
|
|
86
|
+
```
|
|
87
|
+
|
|
88
|
+
### Phase 2 (Design) — Schema & Architecture
|
|
89
|
+
|
|
90
|
+
| MCP | Use Case | Example |
|
|
91
|
+
|-----|----------|---------|
|
|
92
|
+
| **Supabase** | Database schema, tables, relationships, RLS | `mcp__supabase__get_table_schema({ table })` |
|
|
93
|
+
| **Database MCPs** | PostgreSQL, MySQL, SQL Server schema | Provider-specific tools |
|
|
94
|
+
| **Context7** | Library docs for architecture decisions | `mcp__context7__query_docs()` |
|
|
95
|
+
| **GitHub** | Check existing code patterns, PRs | `mcp__github__search_code()` |
|
|
96
|
+
|
|
97
|
+
```javascript
|
|
98
|
+
// === SCHEMA ANALYSIS (Critical for contracts.cs) ===
|
|
99
|
+
|
|
100
|
+
// 1. List all tables
|
|
101
|
+
const tables = await mcp__supabase__list_tables();
|
|
102
|
+
|
|
103
|
+
// 2. Get schema for each relevant table
|
|
104
|
+
const schema = await mcp__supabase__get_table_schema({ table: 'leads' });
|
|
105
|
+
// → column_name, data_type, is_nullable, column_default
|
|
106
|
+
|
|
107
|
+
// 3. Get foreign key relationships
|
|
108
|
+
const rels = await mcp__supabase__get_relationships({ table: 'leads' });
|
|
109
|
+
// → foreign_table, foreign_column, constraint_type
|
|
110
|
+
|
|
111
|
+
// 4. Run custom query for complex schema info
|
|
112
|
+
const result = await mcp__supabase__query({
|
|
113
|
+
query: `SELECT column_name, data_type, is_nullable
|
|
114
|
+
FROM information_schema.columns
|
|
115
|
+
WHERE table_name = 'leads'
|
|
116
|
+
ORDER BY ordinal_position`
|
|
117
|
+
});
|
|
118
|
+
|
|
119
|
+
// 5. Check RLS policies (security-critical)
|
|
120
|
+
const policies = await mcp__supabase__query({
|
|
121
|
+
query: `SELECT tablename, policyname, cmd, qual
|
|
122
|
+
FROM pg_policies
|
|
123
|
+
WHERE tablename = 'leads'`
|
|
124
|
+
});
|
|
125
|
+
```
|
|
126
|
+
|
|
127
|
+
**Fallback (no Supabase MCP):**
|
|
128
|
+
```
|
|
129
|
+
1. Grep: "\.from\(|\.select\(|SELECT |supabase\.|DbSet<" → find query files
|
|
130
|
+
2. Read each query file → extract table/column names
|
|
131
|
+
3. Glob: "src/**/types/**/*.ts" or "**/Entities/**/*.cs" → find type definitions
|
|
132
|
+
4. Read type files → map properties to database columns
|
|
133
|
+
```
|
|
134
|
+
|
|
135
|
+
### Phase 3 (Clarify) — Validation & Research
|
|
136
|
+
|
|
137
|
+
| MCP | Use Case | Example |
|
|
138
|
+
|-----|----------|---------|
|
|
139
|
+
| **Context7** | Verify library capabilities, API limits | `mcp__context7__query_docs()` |
|
|
140
|
+
| **GitHub** | Check issue discussions, known limitations | `mcp__github__search_issues()` |
|
|
141
|
+
|
|
142
|
+
```javascript
|
|
143
|
+
// Verify if library supports a required feature
|
|
144
|
+
const docs = await mcp__context7__query_docs({
|
|
145
|
+
libraryId: "/mudblazor/mudblazor",
|
|
146
|
+
query: "DataGrid server-side pagination with virtual scrolling"
|
|
147
|
+
});
|
|
148
|
+
// → Confirms capability or identifies limitation for spec update
|
|
149
|
+
|
|
150
|
+
// Fallback: WebSearch for library capabilities
|
|
151
|
+
```
|
|
152
|
+
|
|
153
|
+
### Phase 4 (Tasks) — Planning & Organization
|
|
154
|
+
|
|
155
|
+
| MCP | Use Case | Example |
|
|
156
|
+
|-----|----------|---------|
|
|
157
|
+
| **GitHub** | Create issues from tasks, link to milestone | `mcp__github__create_issue()` |
|
|
158
|
+
| **Context7** | Estimate complexity based on library docs | `mcp__context7__query_docs()` |
|
|
159
|
+
|
|
160
|
+
```javascript
|
|
161
|
+
// Create GitHub issues from tasks.json (if team uses GitHub Projects)
|
|
162
|
+
for (const task of tasks) {
|
|
163
|
+
await mcp__github__create_issue({
|
|
164
|
+
title: task.title,
|
|
165
|
+
body: task.description,
|
|
166
|
+
labels: [task.category],
|
|
167
|
+
milestone: featureMilestone
|
|
168
|
+
});
|
|
169
|
+
}
|
|
170
|
+
|
|
171
|
+
// Fallback: Bash with gh CLI
|
|
172
|
+
// gh issue create --title "T001: Create Entity Lead" --label "domain"
|
|
173
|
+
```
|
|
174
|
+
|
|
175
|
+
### Phase 5 (Implement) — Build & Deploy
|
|
176
|
+
|
|
177
|
+
| MCP | Use Case | Example |
|
|
178
|
+
|-----|----------|---------|
|
|
179
|
+
| **Supabase** | Run migrations, create RLS policies | `mcp__supabase__query()` |
|
|
180
|
+
| **GitHub** | Create PR, push branches | `mcp__github__create_pull_request()` |
|
|
181
|
+
| **Context7** | Look up API usage during coding | `mcp__context7__query_docs()` |
|
|
182
|
+
| **Playwright** | Smoke test deployed features, verify UI | `mcp__playwright__browser_navigate()` |
|
|
183
|
+
| **Azure** | Provision resources, check deployment status | Provider-specific |
|
|
184
|
+
| **Docker** | Build images, manage containers | Provider-specific |
|
|
185
|
+
|
|
186
|
+
```javascript
|
|
187
|
+
// Run migration after implementing data model
|
|
188
|
+
await mcp__supabase__query({
|
|
189
|
+
query: `ALTER TABLE leads ADD COLUMN status varchar(20) DEFAULT 'new'`
|
|
190
|
+
});
|
|
191
|
+
|
|
192
|
+
// Create RLS policy for new feature
|
|
193
|
+
await mcp__supabase__query({
|
|
194
|
+
query: `CREATE POLICY "Users can view own leads"
|
|
195
|
+
ON leads FOR SELECT
|
|
196
|
+
USING (auth.uid() = user_id)`
|
|
197
|
+
});
|
|
198
|
+
|
|
199
|
+
// Lookup API during implementation
|
|
200
|
+
const docs = await mcp__context7__query_docs({
|
|
201
|
+
libraryId: "/dotnet/efcore",
|
|
202
|
+
query: "owned entity types configuration"
|
|
203
|
+
});
|
|
204
|
+
|
|
205
|
+
// Smoke test deployed feature via browser
|
|
206
|
+
await mcp__playwright__browser_navigate({ url: "https://localhost:5001/leads" });
|
|
207
|
+
const snapshot = await mcp__playwright__browser_snapshot();
|
|
208
|
+
// → Verify page renders correctly, check for errors
|
|
209
|
+
|
|
210
|
+
// Check for console errors after deploy
|
|
211
|
+
const logs = await mcp__playwright__browser_console_messages();
|
|
212
|
+
// → Catch JavaScript errors, failed API calls
|
|
213
|
+
|
|
214
|
+
// Screenshot for recap.md documentation
|
|
215
|
+
const screenshot = await mcp__playwright__browser_take_screenshot();
|
|
216
|
+
|
|
217
|
+
// Fallback: Bash for migrations, gh CLI for PRs
|
|
218
|
+
```
|
|
219
|
+
|
|
220
|
+
---
|
|
221
|
+
|
|
222
|
+
## MCP vs Native Tools Decision
|
|
223
|
+
|
|
224
|
+
| Need | MCP Tool | Native Alternative |
|
|
225
|
+
|------|----------|--------------------|
|
|
226
|
+
| Database schema | Supabase/DB MCP | Grep queries + Read types |
|
|
227
|
+
| Repo metadata | GitHub MCP | Bash `gh` CLI |
|
|
228
|
+
| Design tokens | Figma MCP | Read CSS/SCSS variables |
|
|
229
|
+
| Library docs | Context7 | WebSearch + WebFetch |
|
|
230
|
+
| Live page preview | Playwright MCP | WebFetch URL |
|
|
231
|
+
| Page interaction (click, type, navigate) | Playwright MCP | Manual testing |
|
|
232
|
+
| Responsive layout testing | Playwright MCP (`browser_resize`) | Manual testing |
|
|
233
|
+
| Console error checking | Playwright MCP (`browser_console_messages`) | Browser DevTools |
|
|
234
|
+
| Container ops | Docker MCP | Bash `docker` CLI |
|
|
235
|
+
| Cloud resources | Azure MCP | Bash `az` CLI |
|
|
236
|
+
|
|
237
|
+
**Rule:** MCP tools provide structured data (JSON responses). Native tools require manual parsing. **Always prefer MCP when available** — fall back to native when not.
|
|
238
|
+
|
|
239
|
+
---
|
|
240
|
+
|
|
241
|
+
## Common MCP Patterns
|
|
242
|
+
|
|
243
|
+
### Browser (Playwright): Page Automation & Analysis
|
|
244
|
+
|
|
245
|
+
```javascript
|
|
246
|
+
// === SETUP ===
|
|
247
|
+
// Playwright MCP: npx @playwright/mcp@latest
|
|
248
|
+
// Config in .claude/settings.json or claude_desktop_config.json:
|
|
249
|
+
// { "mcpServers": { "playwright": { "command": "npx", "args": ["@playwright/mcp@latest"] } } }
|
|
250
|
+
|
|
251
|
+
// === NAVIGATION & SNAPSHOT ===
|
|
252
|
+
|
|
253
|
+
// 1. Navigate to a page
|
|
254
|
+
await mcp__playwright__browser_navigate({ url: "https://app.example.com/dashboard" });
|
|
255
|
+
|
|
256
|
+
// 2. Take accessibility snapshot (preferred — structured, LLM-friendly)
|
|
257
|
+
const snapshot = await mcp__playwright__browser_snapshot();
|
|
258
|
+
// → Returns accessibility tree with element refs for interaction
|
|
259
|
+
|
|
260
|
+
// 3. Take visual screenshot (requires --caps vision)
|
|
261
|
+
const screenshot = await mcp__playwright__browser_take_screenshot();
|
|
262
|
+
// → Returns PNG image of current page
|
|
263
|
+
|
|
264
|
+
// === INTERACTION ===
|
|
265
|
+
|
|
266
|
+
// 4. Click an element (use ref from snapshot)
|
|
267
|
+
await mcp__playwright__browser_click({ element: "Submit button", ref: "s1e15" });
|
|
268
|
+
|
|
269
|
+
// 5. Type into an input field
|
|
270
|
+
await mcp__playwright__browser_type({ element: "Search input", ref: "s1e8", text: "query" });
|
|
271
|
+
|
|
272
|
+
// 6. Fill a form field (replaces existing value)
|
|
273
|
+
await mcp__playwright__browser_fill_form({ ref: "s1e8", value: "new value" });
|
|
274
|
+
|
|
275
|
+
// 7. Select dropdown option
|
|
276
|
+
await mcp__playwright__browser_select_option({ element: "Status", ref: "s1e12", values: ["active"] });
|
|
277
|
+
|
|
278
|
+
// 8. Press keyboard key
|
|
279
|
+
await mcp__playwright__browser_press_key({ key: "Enter" });
|
|
280
|
+
|
|
281
|
+
// === TABS & NAVIGATION ===
|
|
282
|
+
|
|
283
|
+
// 9. List open tabs
|
|
284
|
+
const tabs = await mcp__playwright__browser_tabs();
|
|
285
|
+
|
|
286
|
+
// 10. Navigate back
|
|
287
|
+
await mcp__playwright__browser_navigate_back();
|
|
288
|
+
|
|
289
|
+
// 11. Close current tab
|
|
290
|
+
await mcp__playwright__browser_close();
|
|
291
|
+
|
|
292
|
+
// === ADVANCED ===
|
|
293
|
+
|
|
294
|
+
// 12. Evaluate JavaScript in page context
|
|
295
|
+
const result = await mcp__playwright__browser_evaluate({
|
|
296
|
+
expression: "document.querySelectorAll('.error').length"
|
|
297
|
+
});
|
|
298
|
+
|
|
299
|
+
// 13. Get console messages (debug)
|
|
300
|
+
const logs = await mcp__playwright__browser_console_messages();
|
|
301
|
+
|
|
302
|
+
// 14. Get network requests
|
|
303
|
+
const requests = await mcp__playwright__browser_network_requests();
|
|
304
|
+
|
|
305
|
+
// 15. Handle dialog (alert, confirm, prompt)
|
|
306
|
+
await mcp__playwright__browser_handle_dialog({ accept: true });
|
|
307
|
+
|
|
308
|
+
// 16. Resize viewport
|
|
309
|
+
await mcp__playwright__browser_resize({ width: 375, height: 812 }); // iPhone viewport
|
|
310
|
+
|
|
311
|
+
// 17. Save page as PDF (requires --caps pdf)
|
|
312
|
+
await mcp__playwright__browser_pdf_save();
|
|
313
|
+
|
|
314
|
+
// 18. Upload file
|
|
315
|
+
await mcp__playwright__browser_file_upload({ ref: "s1e20", paths: ["/path/to/file.png"] });
|
|
316
|
+
```
|
|
317
|
+
|
|
318
|
+
**Use cases by phase:**
|
|
319
|
+
|
|
320
|
+
| Phase | Use Case | Tool |
|
|
321
|
+
|-------|----------|------|
|
|
322
|
+
| UI/UX (1.5) | Screenshot reference pages for design | `browser_navigate` + `browser_take_screenshot` |
|
|
323
|
+
| UI/UX (1.5) | Inspect existing app structure | `browser_navigate` + `browser_snapshot` |
|
|
324
|
+
| UI/UX (1.5) | Test responsive layouts | `browser_resize` + `browser_take_screenshot` |
|
|
325
|
+
| Clarify (3) | Verify existing UI behavior | `browser_navigate` + `browser_snapshot` |
|
|
326
|
+
| Implement (5) | Smoke test deployed features | `browser_navigate` + `browser_click` + `browser_snapshot` |
|
|
327
|
+
| Implement (5) | Verify form flows end-to-end | `browser_fill_form` + `browser_click` + `browser_snapshot` |
|
|
328
|
+
| Implement (5) | Check console errors after deploy | `browser_navigate` + `browser_console_messages` |
|
|
329
|
+
| Implement (5) | Screenshot for recap.md | `browser_take_screenshot` |
|
|
330
|
+
|
|
331
|
+
---
|
|
332
|
+
|
|
333
|
+
### Supabase: Full Schema Discovery
|
|
334
|
+
|
|
335
|
+
```javascript
|
|
336
|
+
// Complete workflow for Phase 2 schema analysis
|
|
337
|
+
const tables = await mcp__supabase__list_tables();
|
|
338
|
+
|
|
339
|
+
for (const table of tables.filter(t => isRelevant(t))) {
|
|
340
|
+
const schema = await mcp__supabase__get_table_schema({ table: table.name });
|
|
341
|
+
const rels = await mcp__supabase__get_relationships({ table: table.name });
|
|
342
|
+
// → Write findings to schema-analysis.md
|
|
343
|
+
}
|
|
344
|
+
```
|
|
345
|
+
|
|
346
|
+
### Context7: Library Research
|
|
347
|
+
|
|
348
|
+
```javascript
|
|
349
|
+
// Workflow for any phase needing library documentation
|
|
350
|
+
// Step 1: Resolve library ID
|
|
351
|
+
const lib = await mcp__context7__resolve_library_id({
|
|
352
|
+
libraryName: "fluent-ui-blazor",
|
|
353
|
+
query: "dialog component with form validation"
|
|
354
|
+
});
|
|
355
|
+
|
|
356
|
+
// Step 2: Query specific documentation
|
|
357
|
+
const docs = await mcp__context7__query_docs({
|
|
358
|
+
libraryId: lib.id,
|
|
359
|
+
query: "FluentDialog component usage with EditForm validation"
|
|
360
|
+
});
|
|
361
|
+
```
|
|
362
|
+
|
|
363
|
+
### GitHub: Code Search Across Repo
|
|
364
|
+
|
|
365
|
+
```javascript
|
|
366
|
+
// Find patterns in large codebase during Phase 2
|
|
367
|
+
const results = await mcp__github__search_code({
|
|
368
|
+
query: "supabase.from leads repo:myorg/myrepo",
|
|
369
|
+
});
|
|
370
|
+
// → Find all places that query the leads table
|
|
371
|
+
```
|
|
372
|
+
|
|
373
|
+
---
|
|
374
|
+
|
|
375
|
+
## Security Considerations
|
|
376
|
+
|
|
377
|
+
- **Never pass secrets** in MCP tool parameters (API keys, tokens, passwords)
|
|
378
|
+
- **Supabase MCP** uses project-level auth — queries run with service role by default
|
|
379
|
+
- **GitHub MCP** inherits the configured token's permissions
|
|
380
|
+
- **Always validate MCP responses** before using in contracts or code generation
|
|
381
|
+
|
|
382
|
+
---
|
|
383
|
+
|
|
384
|
+
*MORPH-SPEC by Polymorphism Tech*
|
|
@@ -314,13 +314,13 @@ morph-spec template customize dotnet-backend-service --stack blazor-azure --forc
|
|
|
314
314
|
**Output:**
|
|
315
315
|
```
|
|
316
316
|
Source: framework/templates/code/dotnet/backend/service.cs
|
|
317
|
-
Destination: stacks/blazor-azure/.morph/templates/code/dotnet/backend/service.cs
|
|
317
|
+
Destination: stacks/blazor-azure/.morph/framework/templates/code/dotnet/backend/service.cs
|
|
318
318
|
|
|
319
319
|
✅ Template copied for customization
|
|
320
320
|
|
|
321
321
|
📝 Next Steps
|
|
322
322
|
1. Edit the template file:
|
|
323
|
-
stacks/blazor-azure/.morph/templates/code/dotnet/backend/service.cs
|
|
323
|
+
stacks/blazor-azure/.morph/framework/templates/code/dotnet/backend/service.cs
|
|
324
324
|
|
|
325
325
|
2. Template will now be used instead of framework version
|
|
326
326
|
(Stack-specific templates take precedence)
|
|
@@ -422,7 +422,7 @@ infrastructure/github/
|
|
|
422
422
|
|
|
423
423
|
### Example: Blazor-Azure CI/CD
|
|
424
424
|
|
|
425
|
-
**CI Build Workflow** (`stacks/blazor-azure/.morph/templates/infrastructure/github/workflows/ci-build.yml.hbs`):
|
|
425
|
+
**CI Build Workflow** (`stacks/blazor-azure/.morph/framework/templates/infrastructure/github/workflows/ci-build.yml.hbs`):
|
|
426
426
|
```yaml
|
|
427
427
|
name: CI Build
|
|
428
428
|
|
|
@@ -473,12 +473,12 @@ jobs:
|
|
|
473
473
|
### Stack-Specific Overrides
|
|
474
474
|
|
|
475
475
|
Stack-specific workflow templates in:
|
|
476
|
-
- `stacks/blazor-azure/.morph/templates/infrastructure/github/workflows/`
|
|
477
|
-
- `stacks/nextjs-supabase/.morph/templates/infrastructure/github/workflows/`
|
|
476
|
+
- `stacks/blazor-azure/.morph/framework/templates/infrastructure/github/workflows/`
|
|
477
|
+
- `stacks/nextjs-supabase/.morph/framework/templates/infrastructure/github/workflows/`
|
|
478
478
|
|
|
479
479
|
**Resolution Order:**
|
|
480
|
-
1. Project-local: `.morph/templates/infrastructure/github/workflows/ci-build.yml.hbs`
|
|
481
|
-
2. Stack default: `stacks/{stack}/.morph/templates/infrastructure/github/workflows/ci-build.yml.hbs`
|
|
480
|
+
1. Project-local: `.morph/framework/templates/infrastructure/github/workflows/ci-build.yml.hbs`
|
|
481
|
+
2. Stack default: `stacks/{stack}/.morph/framework/templates/infrastructure/github/workflows/ci-build.yml.hbs`
|
|
482
482
|
3. Framework fallback: `framework/templates/infrastructure/github/workflows/dotnet-build.yml.hbs`
|
|
483
483
|
|
|
484
484
|
---
|
|
@@ -488,10 +488,10 @@ Stack-specific workflow templates in:
|
|
|
488
488
|
**Resolution Order:**
|
|
489
489
|
|
|
490
490
|
1. **Stack-specific override** (highest priority)
|
|
491
|
-
- `stacks/{stack}/.morph/templates/code/dotnet/backend/service.cs`
|
|
491
|
+
- `stacks/{stack}/.morph/framework/templates/code/dotnet/backend/service.cs`
|
|
492
492
|
|
|
493
493
|
2. **Project-local override** (medium priority)
|
|
494
|
-
- `.morph/templates/code/dotnet/backend/service.cs`
|
|
494
|
+
- `.morph/framework/templates/code/dotnet/backend/service.cs`
|
|
495
495
|
|
|
496
496
|
3. **Framework template** (fallback)
|
|
497
497
|
- `framework/templates/code/dotnet/backend/service.cs`
|
|
@@ -500,8 +500,8 @@ Stack-specific workflow templates in:
|
|
|
500
500
|
|
|
501
501
|
| Scenario | Override Location | Example |
|
|
502
502
|
|----------|-------------------|---------|
|
|
503
|
-
| Stack-specific tweak | `stacks/{stack}/.morph/templates/` | Blazor uses different DI pattern |
|
|
504
|
-
| Project-wide customization | `.morph/templates/` | Company-specific code style |
|
|
503
|
+
| Stack-specific tweak | `stacks/{stack}/.morph/framework/templates/` | Blazor uses different DI pattern |
|
|
504
|
+
| Project-wide customization | `.morph/framework/templates/` | Company-specific code style |
|
|
505
505
|
| Use framework default | None (no override) | Standard templates work fine |
|
|
506
506
|
|
|
507
507
|
**Example:**
|
|
@@ -511,7 +511,7 @@ Stack-specific workflow templates in:
|
|
|
511
511
|
morph-spec template customize dotnet-backend-service --stack blazor-azure
|
|
512
512
|
|
|
513
513
|
# Edit the override
|
|
514
|
-
code stacks/blazor-azure/.morph/templates/code/dotnet/backend/service.cs
|
|
514
|
+
code stacks/blazor-azure/.morph/framework/templates/code/dotnet/backend/service.cs
|
|
515
515
|
|
|
516
516
|
# Now all renders for blazor-azure will use the override
|
|
517
517
|
morph-spec template render dotnet-backend-service UserService.cs '...' --stack blazor-azure
|
|
@@ -574,7 +574,7 @@ const dotnetTemplates = getTemplatesByTechnology('dotnet');
|
|
|
574
574
|
// Resolve path with fallback
|
|
575
575
|
const path = resolveTemplatePathById('dotnet-backend-service', '/project', 'blazor-azure');
|
|
576
576
|
// Returns: framework/templates/code/dotnet/backend/service.cs
|
|
577
|
-
// Or: stacks/blazor-azure/.morph/templates/code/dotnet/backend/service.cs (if override exists)
|
|
577
|
+
// Or: stacks/blazor-azure/.morph/framework/templates/code/dotnet/backend/service.cs (if override exists)
|
|
578
578
|
```
|
|
579
579
|
|
|
580
580
|
---
|
|
@@ -639,7 +639,7 @@ morph-spec template render dotnet-backend-my-template output.cs '{
|
|
|
639
639
|
|
|
640
640
|
| Aspect | v1 (Stack-Based) | v2 (Technology-Based) |
|
|
641
641
|
|--------|------------------|----------------------|
|
|
642
|
-
| **Location** | `stacks/{stack}/.morph/templates/` | `framework/templates/{technology}/` |
|
|
642
|
+
| **Location** | `stacks/{stack}/.morph/framework/templates/` | `framework/templates/{technology}/` |
|
|
643
643
|
| **Organization** | By stack (blazor-azure, nextjs-supabase) | By technology (dotnet, azure, docker) |
|
|
644
644
|
| **Duplication** | High (proposal.md × 2, decisions.md × 2) | Low (shared templates in framework) |
|
|
645
645
|
| **Template Engine** | 3 engines (custom, Handlebars, mixed) | 1 engine (Handlebars with helpers) |
|
|
@@ -653,13 +653,13 @@ morph-spec template render dotnet-backend-my-template output.cs '{
|
|
|
653
653
|
**1. Template Paths**
|
|
654
654
|
|
|
655
655
|
```diff
|
|
656
|
-
- stacks/blazor-azure/.morph/templates/service.cs
|
|
656
|
+
- stacks/blazor-azure/.morph/framework/templates/service.cs
|
|
657
657
|
+ framework/templates/code/dotnet/backend/service.cs
|
|
658
658
|
|
|
659
|
-
- stacks/blazor-azure/.morph/templates/infra/main.bicep
|
|
659
|
+
- stacks/blazor-azure/.morph/framework/templates/infra/main.bicep
|
|
660
660
|
+ framework/templates/infrastructure/azure/main.bicep
|
|
661
661
|
|
|
662
|
-
- stacks/nextjs-supabase/.morph/templates/dockerfile-web.dockerfile
|
|
662
|
+
- stacks/nextjs-supabase/.morph/framework/templates/dockerfile-web.dockerfile
|
|
663
663
|
+ framework/templates/infrastructure/docker/dockerfile-web.dockerfile
|
|
664
664
|
```
|
|
665
665
|
|