@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
|
@@ -0,0 +1,335 @@
|
|
|
1
|
+
---
|
|
2
|
+
name: tool-usage-guide
|
|
3
|
+
description: >
|
|
4
|
+
Decision guide for selecting the right Claude Code tool (Read, Grep, Glob, Bash, Task) for each situation in MORPH-SPEC workflows. Reference when unsure which tool to use.
|
|
5
|
+
user-invocable: true
|
|
6
|
+
allowed-tools: Read, Write, Edit, Bash, Glob, Grep
|
|
7
|
+
---
|
|
8
|
+
|
|
9
|
+
# Tool Usage Guide for MORPH Workflows
|
|
10
|
+
|
|
11
|
+
> Operational guide for selecting the correct Claude Code tools and MCP tools at each morph-spec phase. Each phase uses a distinct set of tools optimized for its goals.
|
|
12
|
+
>
|
|
13
|
+
> **Ref:** `framework/standards/integration/mcp/mcp-tools.md` for detailed MCP examples.
|
|
14
|
+
|
|
15
|
+
---
|
|
16
|
+
|
|
17
|
+
## Decision Flowchart
|
|
18
|
+
|
|
19
|
+
```
|
|
20
|
+
┌──────────────────────────────┐
|
|
21
|
+
│ I need to complete an action │
|
|
22
|
+
└──────────────┬───────────────┘
|
|
23
|
+
│
|
|
24
|
+
▼
|
|
25
|
+
┌───────────────────────────────────────┐
|
|
26
|
+
│ Is it a SEARCH for a specific file, │
|
|
27
|
+
│ keyword, or function? │
|
|
28
|
+
└──────┬──────────────────┬─────────────┘
|
|
29
|
+
│ YES │ NO
|
|
30
|
+
▼ ▼
|
|
31
|
+
Use Glob/Grep ┌─────────────────────────┐
|
|
32
|
+
or Read │ Does it need STRUCTURED │
|
|
33
|
+
│ external data (schema, │
|
|
34
|
+
│ API docs, design tokens)?│
|
|
35
|
+
└──┬──────────────┬────────┘
|
|
36
|
+
│ YES │ NO
|
|
37
|
+
▼ ▼
|
|
38
|
+
Use MCP tool ┌──────────────────┐
|
|
39
|
+
(+ fallback) │ Does it require │
|
|
40
|
+
│ MULTI-STEP │
|
|
41
|
+
│ exploration of │
|
|
42
|
+
│ many files? │
|
|
43
|
+
└──┬──────────┬─────┘
|
|
44
|
+
│ YES │ NO
|
|
45
|
+
▼ ▼
|
|
46
|
+
Use Task Do it
|
|
47
|
+
(subagent) directly
|
|
48
|
+
```
|
|
49
|
+
|
|
50
|
+
---
|
|
51
|
+
|
|
52
|
+
## Tools Per Phase
|
|
53
|
+
|
|
54
|
+
### Phase 0 — Proposal
|
|
55
|
+
|
|
56
|
+
**Goal:** Understand the feature request and create proposal.md
|
|
57
|
+
|
|
58
|
+
| Action | Tool | Why |
|
|
59
|
+
|--------|------|-----|
|
|
60
|
+
| Read project context | **Read** `.morph/context/README.md` | Single known file |
|
|
61
|
+
| Read config | **Read** `.morph/config.json` | Single known file |
|
|
62
|
+
| Find existing features | **Glob** `.morph/features/*/0-proposal/proposal.md` | Pattern search |
|
|
63
|
+
| Detect project stack | **Bash** `npx morph-spec detect-agents --json "..."` | CLI command |
|
|
64
|
+
| Research external requirement | **WebSearch** | Current information needed |
|
|
65
|
+
| Render proposal template | **Bash** `npx morph-spec template render docs/proposal ...` | CLI command |
|
|
66
|
+
| Update state | **Bash** `npx morph-spec state mark-output ...` | CLI command |
|
|
67
|
+
|
|
68
|
+
**MCPs used:** None typically. GitHub MCP if feature comes from an issue.
|
|
69
|
+
|
|
70
|
+
**Anti-patterns:**
|
|
71
|
+
- ❌ Task agent to read proposal template (just use Read)
|
|
72
|
+
- ❌ Bash `cat` to read files (use Read tool)
|
|
73
|
+
- ❌ Bash `find` to locate files (use Glob tool)
|
|
74
|
+
|
|
75
|
+
---
|
|
76
|
+
|
|
77
|
+
### Phase 1 — Setup
|
|
78
|
+
|
|
79
|
+
**Goal:** Load context, detect stack, activate agents
|
|
80
|
+
|
|
81
|
+
| Action | Tool | Why |
|
|
82
|
+
|--------|------|-----|
|
|
83
|
+
| Verify feature state | **Bash** `npx morph-spec state get {feature}` | CLI command |
|
|
84
|
+
| Detect agents + standards | **Bash** `npx morph-spec detect-agents --json "..."` | CLI command, returns JSON with standards |
|
|
85
|
+
| Read project context | **Read** `.morph/context/README.md` | Single file |
|
|
86
|
+
| Read config | **Read** `.morph/config.json` | Single file |
|
|
87
|
+
| Scan project structure | **Glob** `src/**/*.{ts,tsx,cs}` | Understand codebase layout |
|
|
88
|
+
| Get repo metadata | **GitHub MCP** `get_repo()` | Structured repo info (if MCP available) |
|
|
89
|
+
| Update state | **Bash** `npx morph-spec state set ...` | CLI command |
|
|
90
|
+
|
|
91
|
+
**MCPs used:** GitHub (optional — for repo metadata).
|
|
92
|
+
|
|
93
|
+
**Anti-patterns:**
|
|
94
|
+
- ❌ Task agent to detect project stack (detect-agents CLI does this)
|
|
95
|
+
- ❌ WebSearch for project info (it's local, use Read/Glob)
|
|
96
|
+
- ❌ Manual parsing of agents.json (detect-agents handles it)
|
|
97
|
+
|
|
98
|
+
---
|
|
99
|
+
|
|
100
|
+
### Phase 1.5 — UI/UX Design
|
|
101
|
+
|
|
102
|
+
**Goal:** Create UI mockups, design system, component specs, user flows
|
|
103
|
+
|
|
104
|
+
| Action | Tool | Why |
|
|
105
|
+
|--------|------|-----|
|
|
106
|
+
| Check existing design system | **Read** `.morph/context/design-system.md` | Single file |
|
|
107
|
+
| Read user-provided screenshots | **Read** (image files) | Claude Code reads images natively |
|
|
108
|
+
| Search for existing CSS variables | **Grep** `--root:` or `--color-` in `*.css,*.scss` | Find existing design tokens |
|
|
109
|
+
| Find existing UI components | **Glob** `**/Components/**/*.razor` or `**/components/**/*.tsx` | Existing patterns |
|
|
110
|
+
| Get Figma design tokens | **Figma MCP** `get_file({ fileKey })` | Extract colors, typography from Figma |
|
|
111
|
+
| Look up component library API | **Context7 MCP** `query_docs({ libraryId, query })` | Accurate component props/events |
|
|
112
|
+
| Preview de página existente | **Playwright MCP** `browser_navigate()` + `browser_take_screenshot()` | **WebFetch** URL |
|
|
113
|
+
| Inspecionar estrutura da página | **Playwright MCP** `browser_snapshot()` | **WebFetch** + parse manual |
|
|
114
|
+
| Testar layout responsivo | **Playwright MCP** `browser_resize()` + `browser_take_screenshot()` | Manual testing |
|
|
115
|
+
| Search for design references | **WebSearch** + **WebFetch** | External inspiration |
|
|
116
|
+
| Render UI templates | **Bash** `npx morph-spec template render docs/ui-mockups ...` | CLI command |
|
|
117
|
+
| Generate design system from CSS | **Bash** `npx morph-spec generate design-system --scan` | CLI command |
|
|
118
|
+
| Update state | **Bash** `npx morph-spec state mark-output ...` | CLI command |
|
|
119
|
+
|
|
120
|
+
**MCPs used:** Figma (design tokens), Playwright (live preview, page inspection), Context7 (component docs).
|
|
121
|
+
|
|
122
|
+
**Anti-patterns:**
|
|
123
|
+
- ❌ WebSearch for MudBlazor docs (use Context7 MCP — more accurate)
|
|
124
|
+
- ❌ Task agent to read a single screenshot (just use Read tool on the image)
|
|
125
|
+
- ❌ Manually guessing component props (use Context7 to get real API)
|
|
126
|
+
|
|
127
|
+
---
|
|
128
|
+
|
|
129
|
+
### Phase 2 — Design (Technical Spec)
|
|
130
|
+
|
|
131
|
+
**Goal:** Analyze schema, create spec.md, contracts.cs, decisions.md
|
|
132
|
+
|
|
133
|
+
| Action | Tool | Why |
|
|
134
|
+
|--------|------|-----|
|
|
135
|
+
| Read proposal + UI specs | **Read** output files | Single known files |
|
|
136
|
+
| Get database schema | **Supabase MCP** `list_tables()`, `get_table_schema()` | **PREFERRED** — real schema data |
|
|
137
|
+
| Get table relationships | **Supabase MCP** `get_relationships()` | Real FK/constraint data |
|
|
138
|
+
| Get RLS policies | **Supabase MCP** `query()` with pg_policies | Security analysis |
|
|
139
|
+
| **Fallback:** Find query files | **Grep** `\.from\(` or `\.select\(` in `*.ts,*.tsx,*.js,*.cs` | When no DB MCP available |
|
|
140
|
+
| **Fallback:** Find type definitions | **Glob** `src/**/types/**/*.ts` or `**/Entities/**/*.cs` | When no DB MCP available |
|
|
141
|
+
| **Fallback:** Read query/type files | **Read** each matched file | Extract field names manually |
|
|
142
|
+
| Look up library for ADR | **Context7 MCP** `query_docs()` | Compare library capabilities |
|
|
143
|
+
| Check existing code patterns | **GitHub MCP** `search_code()` | Find patterns in large repos |
|
|
144
|
+
| **Fallback:** Search codebase | **Grep** patterns across project | When no GitHub MCP |
|
|
145
|
+
| Render contracts template | **Bash** `npx morph-spec template render code/dotnet/contracts/contracts.cs ...` | CLI command |
|
|
146
|
+
| Render spec template | **Bash** `npx morph-spec template render docs/spec ...` | CLI command |
|
|
147
|
+
| Render decisions template | **Bash** `npx morph-spec template render docs/decisions ...` | CLI command |
|
|
148
|
+
| Create schema-analysis.md | **Write** to output directory | Document findings |
|
|
149
|
+
| Update state | **Bash** `npx morph-spec state mark-output ...` | CLI command |
|
|
150
|
+
|
|
151
|
+
**MCPs used:** Supabase (schema analysis), Context7 (library research), GitHub (code search).
|
|
152
|
+
|
|
153
|
+
**Anti-patterns:**
|
|
154
|
+
- ❌ Guessing field names without checking schema (use MCP or Grep first!)
|
|
155
|
+
- ❌ Task agent to read a single spec file (just use Read)
|
|
156
|
+
- ❌ WebSearch for database schema (use Supabase MCP or code analysis)
|
|
157
|
+
- ❌ Manually writing contracts.cs from scratch (use template render)
|
|
158
|
+
|
|
159
|
+
---
|
|
160
|
+
|
|
161
|
+
### Phase 3 — Clarify
|
|
162
|
+
|
|
163
|
+
**Goal:** Identify ambiguities, ask clarification questions, update spec
|
|
164
|
+
|
|
165
|
+
| Action | Tool | Why |
|
|
166
|
+
|--------|------|-----|
|
|
167
|
+
| Read spec.md in detail | **Read** spec.md | Full content analysis |
|
|
168
|
+
| Read contracts.cs | **Read** contracts.cs | Check contract consistency |
|
|
169
|
+
| Read schema-analysis.md | **Read** schema-analysis.md | Cross-reference with spec |
|
|
170
|
+
| Verify library capabilities | **Context7 MCP** `query_docs()` | Confirm feasibility of spec requirements |
|
|
171
|
+
| Check known issues/limitations | **GitHub MCP** `search_issues()` | Library bugs affecting design |
|
|
172
|
+
| Research edge case behavior | **WebSearch** | External knowledge for edge cases |
|
|
173
|
+
| Update spec with clarifications | **Edit** spec.md | Preserve existing content, add sections |
|
|
174
|
+
| Create clarifications.md | **Bash** `npx morph-spec template render docs/clarifications ...` | Use template |
|
|
175
|
+
| Update state | **Bash** `npx morph-spec state mark-output ... clarifications` | CLI command |
|
|
176
|
+
|
|
177
|
+
**MCPs used:** Context7 (validate feasibility), GitHub (known issues).
|
|
178
|
+
|
|
179
|
+
**Anti-patterns:**
|
|
180
|
+
- ❌ Task agent to read spec (just Read it directly)
|
|
181
|
+
- ❌ Rewriting spec from scratch (use Edit to update sections)
|
|
182
|
+
- ❌ Skipping schema-analysis.md cross-reference (critical for accuracy)
|
|
183
|
+
|
|
184
|
+
---
|
|
185
|
+
|
|
186
|
+
### Phase 4 — Tasks
|
|
187
|
+
|
|
188
|
+
**Goal:** Break spec into tasks, define dependencies, set checkpoints
|
|
189
|
+
|
|
190
|
+
| Action | Tool | Why |
|
|
191
|
+
|--------|------|-----|
|
|
192
|
+
| Read spec + contracts + decisions | **Read** all output files | Full context needed |
|
|
193
|
+
| Analyze implementation complexity | **Grep** patterns in existing code | Estimate effort from codebase size |
|
|
194
|
+
| Count existing similar patterns | **Glob** `**/Services/**/*.cs` | Understand scope |
|
|
195
|
+
| Look up implementation patterns | **Context7 MCP** `query_docs()` | Estimate task complexity accurately |
|
|
196
|
+
| Create GitHub issues from tasks | **GitHub MCP** `create_issue()` | Sync tasks to project management |
|
|
197
|
+
| **Fallback:** Create issues via CLI | **Bash** `gh issue create ...` | When no GitHub MCP |
|
|
198
|
+
| Render tasks template | **Bash** `npx morph-spec template render docs/tasks ...` | CLI command |
|
|
199
|
+
| Update state with task count | **Bash** `npx morph-spec state set ... tasks.total N` | CLI command |
|
|
200
|
+
|
|
201
|
+
**MCPs used:** Context7 (complexity estimation), GitHub (issue creation).
|
|
202
|
+
|
|
203
|
+
**Anti-patterns:**
|
|
204
|
+
- ❌ Task agent to break down a simple spec (do it directly, specs are already structured)
|
|
205
|
+
- ✅ Task agent for complex specs with 50+ requirements (legitimate multi-step work)
|
|
206
|
+
- ❌ Manually writing tasks.json without reading all outputs first
|
|
207
|
+
|
|
208
|
+
---
|
|
209
|
+
|
|
210
|
+
### Phase 5 — Implement
|
|
211
|
+
|
|
212
|
+
**Goal:** Implement tasks, checkpoint every 3, create recap
|
|
213
|
+
|
|
214
|
+
| Action | Tool | Why |
|
|
215
|
+
|--------|------|-----|
|
|
216
|
+
| Read task details | **Read** tasks.json, spec.md, contracts.cs | Implementation reference |
|
|
217
|
+
| Create new files | **Write** new source files | New entities, services, pages |
|
|
218
|
+
| Modify existing files | **Edit** existing source files | Add features to existing code |
|
|
219
|
+
| Look up API during coding | **Context7 MCP** `query_docs()` | Accurate library usage |
|
|
220
|
+
| Run database migrations | **Supabase MCP** `query()` | DDL statements directly |
|
|
221
|
+
| **Fallback:** Run migrations | **Bash** `npx supabase migration ...` or `dotnet ef ...` | CLI tools |
|
|
222
|
+
| Build project | **Bash** `dotnet build` or `npm run build` | Verify compilation |
|
|
223
|
+
| Run tests | **Bash** `dotnet test` or `npm test` | Verify implementation |
|
|
224
|
+
| Checkpoint validation | **Bash** `npx morph-spec checkpoint ...` | Every 3 tasks |
|
|
225
|
+
| Create RLS policies | **Supabase MCP** `query()` | Security policies |
|
|
226
|
+
| Create infrastructure | **Bash** `az bicep ...` or Bicep files via Write | IaC |
|
|
227
|
+
| Create PR | **GitHub MCP** `create_pull_request()` or **Bash** `gh pr create` | Ship code |
|
|
228
|
+
| Mark task done | **Bash** `npx morph-spec task done T001` | State tracking |
|
|
229
|
+
| Smoke test feature no browser | **Playwright MCP** `browser_navigate()` + `browser_snapshot()` | Manual testing |
|
|
230
|
+
| Verificar erros de console | **Playwright MCP** `browser_console_messages()` | Browser DevTools |
|
|
231
|
+
| Screenshot para recap.md | **Playwright MCP** `browser_take_screenshot()` | Manual screenshot |
|
|
232
|
+
| Multi-file refactoring | **Task** (subagent) | Complex parallel changes |
|
|
233
|
+
| Update state | **Bash** `npx morph-spec state set ...` | CLI command |
|
|
234
|
+
|
|
235
|
+
**MCPs used:** Supabase (migrations, RLS), Context7 (API lookup), GitHub (PRs), Playwright (smoke test, verification).
|
|
236
|
+
|
|
237
|
+
**Anti-patterns:**
|
|
238
|
+
- ❌ Task agent for a single file edit (use Edit directly)
|
|
239
|
+
- ✅ Task agent for implementing a full service layer across 5+ files
|
|
240
|
+
- ❌ Bash `cat` to create files (use Write tool)
|
|
241
|
+
- ❌ Bash `sed` to modify code (use Edit tool)
|
|
242
|
+
- ❌ Implementing without reading contracts.cs first (contracts are the source of truth)
|
|
243
|
+
|
|
244
|
+
---
|
|
245
|
+
|
|
246
|
+
## Tool Selection Rules
|
|
247
|
+
|
|
248
|
+
### Claude Code Native Tools
|
|
249
|
+
|
|
250
|
+
| Tool | When to Use | When NOT to Use |
|
|
251
|
+
|------|-------------|-----------------|
|
|
252
|
+
| **Read** | Read 1-3 specific known files | Don't use for searching |
|
|
253
|
+
| **Glob** | Find files by name pattern | Don't use Bash `find` |
|
|
254
|
+
| **Grep** | Search content across files | Don't use Bash `grep` or `rg` |
|
|
255
|
+
| **Edit** | Modify existing files | Don't use Bash `sed` or `awk` |
|
|
256
|
+
| **Write** | Create new files | Don't use Bash `echo >` or heredoc |
|
|
257
|
+
| **Bash** | CLI commands, build, test, git | Don't use for file read/write/search |
|
|
258
|
+
| **WebSearch** | Current external information | Don't use for local codebase info |
|
|
259
|
+
| **WebFetch** | Specific URL content | Don't use for authenticated services |
|
|
260
|
+
| **Task** (subagent) | Multi-file exploration, complex analysis | Don't use for single-file operations |
|
|
261
|
+
|
|
262
|
+
### MCP Tools
|
|
263
|
+
|
|
264
|
+
| MCP | When to Use | Fallback |
|
|
265
|
+
|-----|-------------|----------|
|
|
266
|
+
| **Supabase** | Schema analysis, migrations, RLS | Grep + Read code files |
|
|
267
|
+
| **GitHub** | Issues, PRs, repo metadata, code search | Bash `gh` CLI |
|
|
268
|
+
| **Figma** | Design tokens, component specs | Read CSS/SCSS files |
|
|
269
|
+
| **Context7** | Library documentation lookups | WebSearch + WebFetch |
|
|
270
|
+
| **Playwright** | Browser automation, screenshots, page inspection, smoke tests | WebFetch (read-only), Manual testing |
|
|
271
|
+
| **Azure** | Cloud resource management | Bash `az` CLI |
|
|
272
|
+
| **Docker** | Container management | Bash `docker` CLI |
|
|
273
|
+
|
|
274
|
+
### The 3-Question Test
|
|
275
|
+
|
|
276
|
+
Before choosing a tool, ask:
|
|
277
|
+
|
|
278
|
+
1. **Is the data local or external?**
|
|
279
|
+
- Local → Read/Grep/Glob
|
|
280
|
+
- External structured → MCP
|
|
281
|
+
- External unstructured → WebSearch/WebFetch
|
|
282
|
+
|
|
283
|
+
2. **Am I reading or writing?**
|
|
284
|
+
- Reading → Read/Grep/Glob/MCP
|
|
285
|
+
- Writing → Write/Edit/Bash (for CLI)
|
|
286
|
+
|
|
287
|
+
3. **How many files are involved?**
|
|
288
|
+
- 1-3 files → Direct tools (Read, Edit, Write)
|
|
289
|
+
- 4+ files of known names → Parallel Read calls
|
|
290
|
+
- Unknown files needing exploration → Glob/Grep, then Read
|
|
291
|
+
- Complex multi-step analysis → Task subagent
|
|
292
|
+
|
|
293
|
+
---
|
|
294
|
+
|
|
295
|
+
## MCP Registry
|
|
296
|
+
|
|
297
|
+
For the canonical list of MCPs, their tools, phase relevance, and fallbacks, see:
|
|
298
|
+
|
|
299
|
+
**`framework/skills/level-0-meta/mcp-registry.json`**
|
|
300
|
+
|
|
301
|
+
### Phase → MCP Quick Reference
|
|
302
|
+
|
|
303
|
+
| Phase | Primary MCPs | Fallback |
|
|
304
|
+
|-------|-------------|----------|
|
|
305
|
+
| Proposal | Context7 | WebSearch |
|
|
306
|
+
| Setup | GitHub | `gh` CLI |
|
|
307
|
+
| UI/UX | Playwright, Figma, Context7 | WebFetch, Read CSS |
|
|
308
|
+
| Design | Supabase, Context7, GitHub | Grep + Read code |
|
|
309
|
+
| Clarify | Context7, GitHub | WebSearch |
|
|
310
|
+
| Tasks | Context7, GitHub | WebSearch, `gh` CLI |
|
|
311
|
+
| Implement | Supabase, Context7, Playwright, GitHub | CLI tools |
|
|
312
|
+
|
|
313
|
+
### Detected Plugins & MCPs
|
|
314
|
+
|
|
315
|
+
If `morph-spec init` was run with Claude Code environment detection, check `.morph/config/integrations.json` for the detected plugins and MCPs available in this project.
|
|
316
|
+
|
|
317
|
+
---
|
|
318
|
+
|
|
319
|
+
## Superpowers Integration
|
|
320
|
+
|
|
321
|
+
When the `superpowers` plugin is installed, additional skills enhance each phase:
|
|
322
|
+
|
|
323
|
+
| Phase | Superpowers Skill | Purpose |
|
|
324
|
+
|-------|------------------|---------|
|
|
325
|
+
| Setup | `using-git-worktrees` | Isolate feature work |
|
|
326
|
+
| Design | `writing-plans`, `brainstorming` | Structure approach, explore alternatives |
|
|
327
|
+
| Clarify | `systematic-debugging` | Investigate technical ambiguities |
|
|
328
|
+
| Tasks | `writing-plans`, `executing-plans` | Plan and execute implementation |
|
|
329
|
+
| Implement | `test-driven-development`, `systematic-debugging`, `requesting-code-review` | TDD, debug failures, review |
|
|
330
|
+
|
|
331
|
+
See each phase skill for detailed integration instructions.
|
|
332
|
+
|
|
333
|
+
---
|
|
334
|
+
|
|
335
|
+
*MORPH-SPEC by Polymorphism Tech*
|
|
@@ -0,0 +1,145 @@
|
|
|
1
|
+
---
|
|
2
|
+
name: verification-before-completion
|
|
3
|
+
description: Morph-spec-aware verification checklist before claiming any work is complete. Runs validation, checks outputs, and confirms with evidence.
|
|
4
|
+
---
|
|
5
|
+
|
|
6
|
+
# Verification Before Completion — MORPH-SPEC Integrated
|
|
7
|
+
|
|
8
|
+
> Never claim work is complete without running verification. Evidence before assertions.
|
|
9
|
+
|
|
10
|
+
## When to Use
|
|
11
|
+
|
|
12
|
+
- Before marking any task as done (`morph-spec task done`)
|
|
13
|
+
- Before advancing to the next phase
|
|
14
|
+
- Before claiming a feature is complete
|
|
15
|
+
- Before creating a PR or commit
|
|
16
|
+
|
|
17
|
+
---
|
|
18
|
+
|
|
19
|
+
## Phase-Specific Checklists
|
|
20
|
+
|
|
21
|
+
### Phase 0 — Proposal
|
|
22
|
+
|
|
23
|
+
- [ ] `proposal.md` exists in `.morph/features/{feature}/0-proposal/`
|
|
24
|
+
- [ ] Proposal contains: Goal, Scope, Constraints, Success Criteria
|
|
25
|
+
- [ ] `morph-spec state get {feature}` shows `phase: proposal`
|
|
26
|
+
- [ ] `morph-spec state mark-output {feature} proposal` was called
|
|
27
|
+
|
|
28
|
+
### Phase 1 — Setup
|
|
29
|
+
|
|
30
|
+
- [ ] `morph-spec state get {feature}` shows `activeAgents` populated
|
|
31
|
+
- [ ] Stack and architecture confirmed in context
|
|
32
|
+
- [ ] State updated to `phase: setup`
|
|
33
|
+
|
|
34
|
+
### Phase 1.5 — UI/UX (if applicable)
|
|
35
|
+
|
|
36
|
+
- [ ] `ui-design-system.md` exists with color tokens, typography, spacing
|
|
37
|
+
- [ ] `ui-mockups.md` exists with wireframes/ASCII mockups
|
|
38
|
+
- [ ] `morph-spec validate-feature {feature} --phase uiux` passes
|
|
39
|
+
|
|
40
|
+
### Phase 2 — Design
|
|
41
|
+
|
|
42
|
+
- [ ] `spec.md` contains: Overview, Functional Requirements, Technical Architecture, Data Model
|
|
43
|
+
- [ ] `contracts.cs` exists with DTOs matching `schema-analysis.md`
|
|
44
|
+
- [ ] `decisions.md` contains at least 1 ADR
|
|
45
|
+
- [ ] `morph-spec validate-feature {feature} --phase design` passes
|
|
46
|
+
|
|
47
|
+
### Phase 3 — Clarify
|
|
48
|
+
|
|
49
|
+
- [ ] All clarification questions answered by user
|
|
50
|
+
- [ ] `spec.md` updated with Clarifications section
|
|
51
|
+
- [ ] No unresolved ambiguities in spec
|
|
52
|
+
|
|
53
|
+
### Phase 4 — Tasks
|
|
54
|
+
|
|
55
|
+
- [ ] `tasks.md` or `tasks.json` exists
|
|
56
|
+
- [ ] All tasks have: ID, title, description, dependencies
|
|
57
|
+
- [ ] Checkpoints defined (every 3 tasks)
|
|
58
|
+
- [ ] `morph-spec state set {feature} tasks.total N` called
|
|
59
|
+
|
|
60
|
+
### Phase 5 — Implement
|
|
61
|
+
|
|
62
|
+
- [ ] All tasks marked as completed
|
|
63
|
+
- [ ] Build succeeds (`npm run build` or `dotnet build`)
|
|
64
|
+
- [ ] Tests pass (`npm test` or `dotnet test`)
|
|
65
|
+
- [ ] `recap.md` generated with implementation summary
|
|
66
|
+
- [ ] `morph-spec validate-feature {feature}` passes all checks
|
|
67
|
+
|
|
68
|
+
---
|
|
69
|
+
|
|
70
|
+
## Verification Commands
|
|
71
|
+
|
|
72
|
+
```bash
|
|
73
|
+
# Run content-aware validation
|
|
74
|
+
npx morph-spec validate-feature {feature-name}
|
|
75
|
+
|
|
76
|
+
# Run with specific phase
|
|
77
|
+
npx morph-spec validate-feature {feature-name} --phase design
|
|
78
|
+
|
|
79
|
+
# Check feature status
|
|
80
|
+
npx morph-spec status {feature-name} --verbose
|
|
81
|
+
|
|
82
|
+
# Run full project validation
|
|
83
|
+
npx morph-spec validate
|
|
84
|
+
```
|
|
85
|
+
|
|
86
|
+
---
|
|
87
|
+
|
|
88
|
+
## Integration with Task Done
|
|
89
|
+
|
|
90
|
+
Before running `morph-spec task done`:
|
|
91
|
+
|
|
92
|
+
1. **Run the relevant test** for the task being completed
|
|
93
|
+
2. **Run `morph-spec validate-feature`** if completing a checkpoint task
|
|
94
|
+
3. **Read the task spec** and verify all acceptance criteria are met
|
|
95
|
+
4. **Check for build errors** — run build command
|
|
96
|
+
|
|
97
|
+
```bash
|
|
98
|
+
# Verify before marking done
|
|
99
|
+
npx morph-spec validate-feature {feature} --phase implement
|
|
100
|
+
npx morph-spec task done {feature} T001
|
|
101
|
+
```
|
|
102
|
+
|
|
103
|
+
---
|
|
104
|
+
|
|
105
|
+
## Integration with Checkpoints
|
|
106
|
+
|
|
107
|
+
Every 3 tasks, run full checkpoint validation:
|
|
108
|
+
|
|
109
|
+
```bash
|
|
110
|
+
npx morph-spec checkpoint-save {feature}
|
|
111
|
+
npx morph-spec validate-feature {feature}
|
|
112
|
+
```
|
|
113
|
+
|
|
114
|
+
If validation fails:
|
|
115
|
+
1. **Do NOT mark the task as done**
|
|
116
|
+
2. **Fix the issues** identified by validation
|
|
117
|
+
3. **Re-run validation** until it passes
|
|
118
|
+
4. **Then** mark the task as done
|
|
119
|
+
|
|
120
|
+
---
|
|
121
|
+
|
|
122
|
+
## Integration with Superpowers
|
|
123
|
+
|
|
124
|
+
> Available when the `superpowers` plugin is installed.
|
|
125
|
+
|
|
126
|
+
This skill replaces `superpowers:verification-before-completion` within morph-spec workflows. It adds:
|
|
127
|
+
- Phase-specific checklists (not just generic verification)
|
|
128
|
+
- `morph-spec validate-feature` integration
|
|
129
|
+
- Checkpoint system integration
|
|
130
|
+
- State tracking verification
|
|
131
|
+
|
|
132
|
+
For verification **outside** morph-spec workflows, the original `superpowers:verification-before-completion` skill remains available.
|
|
133
|
+
|
|
134
|
+
---
|
|
135
|
+
|
|
136
|
+
## Anti-patterns
|
|
137
|
+
|
|
138
|
+
- Never claim "tests pass" without actually running them
|
|
139
|
+
- Never skip validation because "the change is small"
|
|
140
|
+
- Never mark a task done if build is broken
|
|
141
|
+
- Never advance phases without checking the phase checklist
|
|
142
|
+
|
|
143
|
+
---
|
|
144
|
+
|
|
145
|
+
*MORPH-SPEC by Polymorphism Tech*
|
|
@@ -1,3 +1,11 @@
|
|
|
1
|
+
---
|
|
2
|
+
name: morph-replicate
|
|
3
|
+
description: >
|
|
4
|
+
Replicates a completed MORPH-SPEC feature into a new feature, copying and adapting phase outputs. Called when a user wants to clone an existing feature as a starting point.
|
|
5
|
+
user-invocable: false
|
|
6
|
+
allowed-tools: Read, Write, Edit, Bash, Glob, Grep
|
|
7
|
+
---
|
|
8
|
+
|
|
1
9
|
# Skill: /morph-replicate
|
|
2
10
|
|
|
3
11
|
> Workflow simplificado para replicar prototipos HTML em Blazor.
|
|
@@ -210,4 +218,4 @@ Mapeamento HTML → Blazor:
|
|
|
210
218
|
|
|
211
219
|
---
|
|
212
220
|
|
|
213
|
-
*MORPH-SPEC v2.2.0 by Polymorphism Tech*
|
|
221
|
+
*MORPH-SPEC v2.2.0 by Polymorphism Tech*
|
|
@@ -1,3 +1,12 @@
|
|
|
1
|
+
---
|
|
2
|
+
name: phase-clarify
|
|
3
|
+
description: >
|
|
4
|
+
MORPH-SPEC Phase 3 (Clarify). Resolves ambiguities from the design phase, producing clarifications.md and updating the spec. Called after design approval.
|
|
5
|
+
argument-hint: "[feature-name]"
|
|
6
|
+
user-invocable: false
|
|
7
|
+
allowed-tools: Read, Write, Edit, Bash, Glob, Grep
|
|
8
|
+
---
|
|
9
|
+
|
|
1
10
|
# MORPH Clarify - FASE 3
|
|
2
11
|
|
|
3
12
|
> INTERNAL: Workflow skill used by /morph-proposal during automated phase orchestration. Not a user command.
|
|
@@ -10,11 +19,38 @@ Identifique ambiguidades na especificação e faça perguntas de clarificação
|
|
|
10
19
|
- [ ] `spec.md` aprovado pelo usuário
|
|
11
20
|
- [ ] `contracts.cs` definidos
|
|
12
21
|
|
|
22
|
+
## Ferramentas Recomendadas
|
|
23
|
+
|
|
24
|
+
> **Ref:** `framework/skills/level-0-meta/tool-usage-guide.md` para guia completo.
|
|
25
|
+
> **Ref:** `framework/standards/integration/mcp/mcp-tools.md` para referência MCP.
|
|
26
|
+
|
|
27
|
+
| Ação | Ferramenta | Alternativa |
|
|
28
|
+
|------|------------|-------------|
|
|
29
|
+
| Ler spec.md completo | **Read** spec.md | — |
|
|
30
|
+
| Ler contracts.cs | **Read** contracts.cs | — |
|
|
31
|
+
| Ler schema-analysis.md | **Read** schema-analysis.md | — |
|
|
32
|
+
| Verificar viabilidade de requisito | **Context7 MCP** `query_docs()` | **WebSearch** + **WebFetch** |
|
|
33
|
+
| Verificar issues/limitações conhecidas | **GitHub MCP** `search_issues()` | **Bash** `gh issue list --search "..."` |
|
|
34
|
+
| Pesquisar edge cases externos | **WebSearch** | — |
|
|
35
|
+
| Verificar comportamento UI existente | **Playwright MCP** `browser_navigate()` + `browser_snapshot()` | **WebFetch** URL |
|
|
36
|
+
| Atualizar spec com clarificações | **Edit** spec.md | — |
|
|
37
|
+
| Criar clarifications.md | **Bash** `npx morph-spec template render docs/clarifications ...` | — |
|
|
38
|
+
| Atualizar state | **Bash** `npx morph-spec state mark-output ... clarifications` | — |
|
|
39
|
+
|
|
40
|
+
**MCPs desta fase:** Context7 (validar viabilidade), GitHub (issues conhecidas), Playwright (verificar UI existente).
|
|
41
|
+
|
|
42
|
+
**Anti-padrões:**
|
|
43
|
+
- ❌ Task agent para ler spec (use Read direto)
|
|
44
|
+
- ❌ Reescrever spec do zero (use Edit para atualizar seções)
|
|
45
|
+
- ❌ Pular cross-reference com schema-analysis.md (crítico para precisão)
|
|
46
|
+
|
|
47
|
+
---
|
|
48
|
+
|
|
13
49
|
## Workflow
|
|
14
50
|
|
|
15
51
|
### Passo 1: Analisar Spec
|
|
16
52
|
|
|
17
|
-
Leia `.morph/
|
|
53
|
+
Leia `.morph/features/$ARGUMENTS/1-design/spec.md` em detalhes e identifique:
|
|
18
54
|
|
|
19
55
|
#### 1.1. Ambiguidades
|
|
20
56
|
- Requisitos vagos ou genéricos
|
|
@@ -90,6 +126,21 @@ Após receber respostas do usuário, atualize o spec com:
|
|
|
90
126
|
|
|
91
127
|
2. **Atualizar seções relevantes** com detalhes adicionados
|
|
92
128
|
|
|
129
|
+
### CHECKPOINT: Validar Respostas Completas
|
|
130
|
+
|
|
131
|
+
**⏸️ PAUSE - Antes de atualizar spec:**
|
|
132
|
+
|
|
133
|
+
- [ ] Todas as perguntas foram respondidas pelo usuário?
|
|
134
|
+
- [ ] Nenhuma resposta é ambígua ou contraditória?
|
|
135
|
+
- [ ] Respostas são consistentes com `contracts.cs` existente?
|
|
136
|
+
- [ ] Respostas são consistentes com `schema-analysis.md`?
|
|
137
|
+
|
|
138
|
+
**❌ Se alguma checkbox NÃO estiver marcada:**
|
|
139
|
+
→ Voltar e pedir esclarecimento adicional ao usuário
|
|
140
|
+
|
|
141
|
+
**✅ Se TODAS as checkboxes estiverem marcadas:**
|
|
142
|
+
→ Prosseguir para atualizar spec.md
|
|
143
|
+
|
|
93
144
|
### Passo 6: Validar Edge Cases
|
|
94
145
|
|
|
95
146
|
Documente no spec como lidar com cada edge case identificado:
|
|
@@ -106,12 +157,12 @@ Documente no spec como lidar com cada edge case identificado:
|
|
|
106
157
|
### Passo 7: Atualizar State
|
|
107
158
|
|
|
108
159
|
```bash
|
|
109
|
-
npx morph-spec state set
|
|
160
|
+
npx morph-spec state set $ARGUMENTS phase clarify
|
|
110
161
|
```
|
|
111
162
|
|
|
112
163
|
## Outputs Gerados/Atualizados
|
|
113
164
|
|
|
114
|
-
- `.morph/
|
|
165
|
+
- `.morph/features/$ARGUMENTS/1-design/spec.md` - Atualizado com:
|
|
115
166
|
- Seção "Clarifications" com perguntas e respostas
|
|
116
167
|
- Edge cases documentados
|
|
117
168
|
- Requisitos mais específicos
|
|
@@ -128,4 +179,14 @@ npx morph-spec state set {feature-name} phase clarify
|
|
|
128
179
|
|
|
129
180
|
---
|
|
130
181
|
|
|
131
|
-
|
|
182
|
+
## Integração com Superpowers
|
|
183
|
+
|
|
184
|
+
> Disponível quando o plugin `superpowers` está instalado.
|
|
185
|
+
|
|
186
|
+
| Skill | Quando Usar | Invocação |
|
|
187
|
+
|-------|-------------|-----------|
|
|
188
|
+
| `systematic-debugging` | Para investigar ambiguidades técnicas complexas | `Skill(superpowers:systematic-debugging)` |
|
|
189
|
+
|
|
190
|
+
---
|
|
191
|
+
|
|
192
|
+
Continuar automaticamente para FASE 4 (Tasks) após clarificações resolvidas.
|