@polymorphism-tech/morph-spec 4.3.2 → 4.3.4
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/analytics/threads-log.jsonl +9 -0
- package/{stacks/blazor-azure/.morph → .morph}/config/config.json +9 -9
- package/.morph/state.json +48 -0
- package/bin/detect-agents.js +1 -2
- package/bin/morph-spec.js +2 -15
- package/{stacks/nextjs-supabase/.morph/config → framework}/agents.json +948 -948
- package/{stacks/nextjs-supabase/.claude → framework}/commands/morph-infra.md +1 -1
- package/framework/hooks/README.md +282 -0
- package/framework/hooks/agent-stop/validate-and-continue.js +96 -0
- package/framework/hooks/agent-stop/validate-checkpoints.js +101 -0
- package/framework/hooks/agent-stop/validate-tests.js +109 -0
- package/framework/hooks/agent-teams/dispatch.js +67 -0
- package/framework/hooks/agent-teams/phase-advanced.js +80 -0
- package/framework/hooks/agent-teams/task-completed.js +76 -0
- package/framework/hooks/agent-teams/teammate-idle.js +70 -0
- package/framework/hooks/commit-msg/conventional-commits.sh +33 -0
- package/framework/hooks/pre-commit/agents.sh +25 -0
- package/framework/hooks/pre-commit/orchestrator.sh +64 -0
- package/framework/hooks/pre-commit/specs.sh +50 -0
- package/framework/hooks/pre-push/run-tests.sh +44 -0
- package/framework/index/troubleshooting-index.json +184 -0
- package/framework/memory/patterns-learned.md +766 -0
- package/framework/skills/level-0-meta/README.md +7 -0
- package/framework/skills/level-0-meta/code-review.md +226 -0
- package/framework/skills/level-0-meta/morph-checklist.md +117 -0
- package/framework/skills/level-0-meta/simulation-checklist.md +77 -0
- package/framework/skills/level-1-workflows/README.md +7 -0
- package/framework/skills/level-1-workflows/morph-replicate.md +213 -0
- package/framework/skills/level-1-workflows/phase-clarify.md +131 -0
- package/framework/skills/level-1-workflows/phase-design.md +213 -0
- package/framework/skills/level-1-workflows/phase-setup.md +106 -0
- package/framework/skills/level-1-workflows/phase-tasks.md +164 -0
- package/framework/skills/level-1-workflows/phase-uiux.md +169 -0
- package/framework/skills/level-2-domains/README.md +14 -0
- package/framework/skills/level-2-domains/ai-agents/ai-system-architect.md +192 -0
- package/framework/skills/level-2-domains/architecture/po-pm-advisor.md +197 -0
- package/framework/skills/level-2-domains/architecture/prompt-engineer.md +189 -0
- package/framework/skills/level-2-domains/architecture/seo-growth-hacker.md +320 -0
- package/framework/skills/level-2-domains/architecture/standards-architect.md +156 -0
- package/framework/skills/level-2-domains/backend/api-designer.md +59 -0
- package/framework/skills/level-2-domains/backend/dotnet-senior.md +77 -0
- package/framework/skills/level-2-domains/backend/ef-modeler.md +58 -0
- package/framework/skills/level-2-domains/backend/hangfire-orchestrator.md +126 -0
- package/framework/skills/level-2-domains/backend/ms-agent-expert.md +45 -0
- package/framework/skills/level-2-domains/frontend/blazor-builder.md +210 -0
- package/framework/skills/level-2-domains/frontend/nextjs-expert.md +154 -0
- package/framework/skills/level-2-domains/frontend/ui-ux-designer.md +191 -0
- package/framework/skills/level-2-domains/infrastructure/azure-architect.md +142 -0
- package/framework/skills/level-2-domains/infrastructure/azure-deploy-specialist.md +699 -0
- package/framework/skills/level-2-domains/infrastructure/bicep-architect.md +126 -0
- package/framework/skills/level-2-domains/infrastructure/container-specialist.md +131 -0
- package/framework/skills/level-2-domains/infrastructure/devops-engineer.md +119 -0
- package/framework/skills/level-2-domains/integrations/asaas-financial.md +130 -0
- package/framework/skills/level-2-domains/integrations/azure-identity.md +142 -0
- package/framework/skills/level-2-domains/integrations/clerk-auth.md +108 -0
- package/framework/skills/level-2-domains/integrations/hangfire-orchestrator.md +64 -0
- package/framework/skills/level-2-domains/integrations/resend-email.md +119 -0
- package/framework/skills/level-2-domains/quality/code-analyzer.md +235 -0
- package/framework/skills/level-2-domains/quality/testing-specialist.md +126 -0
- package/framework/skills/level-3-technologies/README.md +7 -0
- package/framework/skills/level-4-patterns/README.md +7 -0
- package/framework/squad-templates/backend-only.json +34 -0
- package/framework/squad-templates/frontend-only.json +34 -0
- package/framework/squad-templates/full-stack.json +52 -0
- package/framework/templates/.idea/morph-templates.xml +92 -0
- package/framework/templates/.vscode/morph-templates.code-snippets +186 -0
- package/framework/templates/IDE-SNIPPETS.md +266 -0
- package/framework/templates/README.md +814 -0
- package/framework/templates/REGISTRY.json +1677 -0
- package/framework/templates/code/dotnet/backend/repository.cs +141 -0
- package/framework/templates/code/dotnet/backend/service.cs +139 -0
- package/framework/templates/code/dotnet/contracts/Commands.cs +74 -0
- package/framework/templates/code/dotnet/contracts/Entities.cs +25 -0
- package/framework/templates/code/dotnet/contracts/Queries.cs +74 -0
- package/framework/templates/code/dotnet/contracts/README.md +74 -0
- package/framework/templates/code/dotnet/contracts/api-contracts.cs +173 -0
- package/framework/templates/code/dotnet/contracts/contracts.cs +217 -0
- package/framework/templates/code/dotnet/database/migration.cs +83 -0
- package/framework/templates/code/dotnet/frontend/component.razor +239 -0
- package/framework/templates/code/dotnet/jobs/agent.cs +163 -0
- package/framework/templates/code/dotnet/jobs/job.cs +171 -0
- package/framework/templates/code/dotnet/test.cs +239 -0
- package/framework/templates/code/sql/rls-policy.sql +57 -0
- package/framework/templates/code/sql/supabase-migration.sql +100 -0
- package/framework/templates/code/sql/supabase-migration.template.sql +113 -0
- package/framework/templates/code/typescript/contracts.ts +168 -0
- package/framework/templates/context/CONTEXT-FEATURE.md +276 -0
- package/framework/templates/context/CONTEXT.md +181 -0
- package/framework/templates/docs/proposal.md +182 -0
- package/framework/templates/docs/spec.md +149 -0
- package/framework/templates/examples/design-system-examples.md +357 -0
- package/framework/templates/examples/spec-examples.md +90 -0
- package/framework/templates/feature/decisions.md +187 -0
- package/framework/templates/feature/recap.md +146 -0
- package/framework/templates/feature/tasks.md +199 -0
- package/framework/templates/infrastructure/azure/Dockerfile.example +82 -0
- package/framework/templates/infrastructure/azure/README.md +286 -0
- package/framework/templates/infrastructure/azure/app-insights.bicep +63 -0
- package/framework/templates/infrastructure/azure/app-service.bicep +164 -0
- package/framework/templates/infrastructure/azure/container-app-env.bicep +49 -0
- package/framework/templates/infrastructure/azure/container-app.bicep +156 -0
- package/framework/templates/infrastructure/azure/deploy-checklist.md +426 -0
- package/framework/templates/infrastructure/azure/deploy.ps1 +229 -0
- package/framework/templates/infrastructure/azure/deploy.sh +208 -0
- package/framework/templates/infrastructure/azure/key-vault.bicep +91 -0
- package/framework/templates/infrastructure/azure/main.bicep +189 -0
- package/framework/templates/infrastructure/azure/parameters.dev.json +29 -0
- package/framework/templates/infrastructure/azure/parameters.prod.json +29 -0
- package/framework/templates/infrastructure/azure/parameters.staging.json +29 -0
- package/framework/templates/infrastructure/azure/sql-database.bicep +103 -0
- package/framework/templates/infrastructure/azure/storage.bicep +106 -0
- package/framework/templates/infrastructure/docker/Dockerfile.template +58 -0
- package/framework/templates/infrastructure/docker/docker-compose.template.yml +67 -0
- package/framework/templates/infrastructure/docker/dockerfile-api.dockerfile +38 -0
- package/framework/templates/infrastructure/docker/dockerfile-web.dockerfile +48 -0
- package/framework/templates/infrastructure/docker/easypanel.template.json +54 -0
- package/framework/templates/infrastructure/github/README.md +593 -0
- package/framework/templates/infrastructure/github/actions/azure-auth/action.yml.hbs +22 -0
- package/framework/templates/infrastructure/github/actions/docker-build-push/action.yml.hbs +45 -0
- package/framework/templates/infrastructure/github/actions/health-check/action.yml.hbs +27 -0
- package/framework/templates/infrastructure/github/workflows/deploy-azure-app-service.yml.hbs +61 -0
- package/framework/templates/infrastructure/github/workflows/deploy-easypanel.yml.hbs +31 -0
- package/framework/templates/infrastructure/github/workflows/docker-build-push.yml.hbs +59 -0
- package/framework/templates/infrastructure/github/workflows/dotnet-build.yml.hbs +39 -0
- package/framework/templates/integrations/asaas-client.cs +387 -0
- package/framework/templates/integrations/asaas-webhook.cs +351 -0
- package/framework/templates/integrations/azure-identity-config.cs +288 -0
- package/framework/templates/integrations/clerk-config.cs +258 -0
- package/framework/templates/meta-prompts/fusion/fusion-agent.md +76 -0
- package/framework/templates/meta-prompts/fusion/fusion-aggregator.md +100 -0
- package/framework/templates/meta-prompts/hops/hop-retry.md +78 -0
- package/framework/templates/meta-prompts/hops/hop-validation.md +97 -0
- package/framework/templates/meta-prompts/hops/hop-wrapper.md +36 -0
- package/framework/templates/meta-prompts/parallel-workers/parallel-coordinator.md +113 -0
- package/framework/templates/meta-prompts/parallel-workers/parallel-worker.md +80 -0
- package/framework/templates/meta-prompts/squad-leaders/backend-squad.md +90 -0
- package/framework/templates/meta-prompts/squad-leaders/frontend-squad.md +126 -0
- package/framework/templates/meta-prompts/squad-leaders/squad-leader.md +43 -0
- package/framework/templates/meta-prompts/validators/checkpoint-validator.md +107 -0
- package/framework/templates/meta-prompts/validators/pre-commit-validator.md +95 -0
- package/framework/templates/saas/subscription.cs +347 -0
- package/framework/templates/saas/tenant.cs +338 -0
- package/framework/templates/state.template.json +17 -0
- package/framework/templates/ui/FluentDesignTheme.cs +149 -0
- package/framework/templates/ui/MudTheme.cs +281 -0
- package/framework/templates/ui/design-system.css +226 -0
- package/framework/workflows/README.md +1041 -0
- package/framework/workflows/configs/design-impl.json +49 -0
- package/framework/workflows/configs/fast-track.json +42 -0
- package/framework/workflows/configs/full-morph.json +79 -0
- package/framework/workflows/configs/fusion.json +39 -0
- package/framework/workflows/configs/long-running.json +33 -0
- package/framework/workflows/configs/standard.json +60 -0
- package/framework/workflows/configs/ui-refresh.json +49 -0
- package/framework/workflows/configs/zero-touch.json +75 -0
- package/framework/workflows/docs/STORY-DRIVEN-DEVELOPMENT.md +392 -0
- package/framework/workflows/docs/design-impl.md +37 -0
- package/framework/workflows/docs/enforcement-pipeline.md +668 -0
- package/framework/workflows/docs/fast-track.md +29 -0
- package/framework/workflows/docs/full-morph.md +76 -0
- package/framework/workflows/docs/standard.md +44 -0
- package/framework/workflows/docs/ui-refresh.md +39 -0
- package/package.json +3 -3
- package/src/commands/feature/create-story.js +11 -7
- package/src/commands/project/detect-agents.js +1 -2
- package/src/commands/project/init.js +78 -31
- package/src/commands/project/update.js +9 -5
- package/src/commands/templates/template-customize.js +3 -17
- package/src/commands/templates/template-list.js +1 -15
- package/src/commands/templates/template-render.js +2 -3
- package/src/commands/templates/template-show.js +3 -5
- package/src/core/templates/template-registry.js +9 -23
- package/src/lib/detectors/structure-detector.js +3 -3
- package/src/lib/generators/context-generator.js +18 -6
- package/src/lib/hooks/hook-executor.js +0 -2
- package/src/lib/orchestration/team-orchestrator.js +1 -2
- package/src/lib/standards/standards-context-injector.js +3 -4
- package/src/lib/troubleshooting/troubleshoot-grep.js +3 -9
- package/src/lib/validators/validation-runner.js +1 -2
- package/src/utils/file-copier.js +1 -2
- package/docs/README.md +0 -144
- package/docs/api/fonts/Montserrat/Montserrat-Bold.eot +0 -0
- package/docs/api/fonts/Montserrat/Montserrat-Bold.ttf +0 -0
- package/docs/api/fonts/Montserrat/Montserrat-Bold.woff +0 -0
- package/docs/api/fonts/Montserrat/Montserrat-Bold.woff2 +0 -0
- package/docs/api/fonts/Montserrat/Montserrat-Regular.eot +0 -0
- package/docs/api/fonts/Montserrat/Montserrat-Regular.ttf +0 -0
- package/docs/api/fonts/Montserrat/Montserrat-Regular.woff +0 -0
- package/docs/api/fonts/Montserrat/Montserrat-Regular.woff2 +0 -0
- package/docs/api/fonts/Source-Sans-Pro/sourcesanspro-light-webfont.eot +0 -0
- package/docs/api/fonts/Source-Sans-Pro/sourcesanspro-light-webfont.svg +0 -978
- package/docs/api/fonts/Source-Sans-Pro/sourcesanspro-light-webfont.ttf +0 -0
- package/docs/api/fonts/Source-Sans-Pro/sourcesanspro-light-webfont.woff +0 -0
- package/docs/api/fonts/Source-Sans-Pro/sourcesanspro-light-webfont.woff2 +0 -0
- package/docs/api/fonts/Source-Sans-Pro/sourcesanspro-regular-webfont.eot +0 -0
- package/docs/api/fonts/Source-Sans-Pro/sourcesanspro-regular-webfont.svg +0 -1049
- package/docs/api/fonts/Source-Sans-Pro/sourcesanspro-regular-webfont.ttf +0 -0
- package/docs/api/fonts/Source-Sans-Pro/sourcesanspro-regular-webfont.woff +0 -0
- package/docs/api/fonts/Source-Sans-Pro/sourcesanspro-regular-webfont.woff2 +0 -0
- package/docs/api/scripts/collapse.js +0 -39
- package/docs/api/scripts/commonNav.js +0 -28
- package/docs/api/scripts/linenumber.js +0 -25
- package/docs/api/scripts/nav.js +0 -12
- package/docs/api/scripts/polyfill.js +0 -4
- package/docs/api/scripts/prettify/Apache-License-2.0.txt +0 -202
- package/docs/api/scripts/prettify/lang-css.js +0 -2
- package/docs/api/scripts/prettify/prettify.js +0 -28
- package/docs/api/scripts/search.js +0 -99
- package/docs/api/styles/jsdoc.css +0 -776
- package/docs/api/styles/prettify.css +0 -80
- package/docs/cli-auto-detection.md +0 -219
- package/docs/getting-started.md +0 -296
- package/docs/installation.md +0 -361
- package/docs/next-generation/AGENTS.md +0 -521
- package/docs/next-generation/ANALYSIS.md +0 -555
- package/docs/next-generation/ARCHITECTURE.md +0 -436
- package/docs/next-generation/CONTEXT-OPTIMIZATION.md +0 -267
- package/docs/next-generation/EXECUTION-FLOW.md +0 -274
- package/docs/next-generation/FEATURES.md +0 -688
- package/docs/next-generation/META-PROMPTS.md +0 -235
- package/docs/next-generation/MIGRATION-GUIDE.md +0 -253
- package/docs/next-generation/README.md +0 -231
- package/docs/next-generation/ROADMAP.md +0 -801
- package/docs/next-generation/THREAD-MANAGEMENT.md +0 -240
- package/docs/templates.md +0 -418
- package/docs/troubleshooting.md +0 -269
- package/docs/validation-checklist.md +0 -264
- package/scripts/postinstall.js +0 -132
- package/src/lib/stacks/index.js +0 -7
- package/src/lib/stacks/stack-resolver.js +0 -180
- package/stacks/blazor-azure/.claude/commands/morph-deploy.md +0 -529
- package/stacks/blazor-azure/.claude/commands/morph-infra.md +0 -209
- package/stacks/blazor-azure/.morph/.morphversion +0 -5
- package/stacks/blazor-azure/.morph/archive/.gitkeep +0 -25
- package/stacks/blazor-azure/.morph/config/agents.json +0 -948
- package/stacks/blazor-azure/.morph/config/config.template.json +0 -122
- package/stacks/blazor-azure/.morph/features/.gitkeep +0 -25
- package/stacks/blazor-azure/.morph/hooks/pre-commit/tests-csharp.sh +0 -61
- package/stacks/blazor-azure/.morph/project/context/README.md +0 -17
- package/stacks/blazor-azure/.morph/project.md +0 -160
- package/stacks/blazor-azure/.morph/schemas/agent.schema.json +0 -296
- package/stacks/blazor-azure/.morph/schemas/tasks.schema.json +0 -220
- package/stacks/blazor-azure/.morph/specs/.gitkeep +0 -20
- package/stacks/blazor-azure/.morph/state.json +0 -18
- package/stacks/blazor-azure/.morph/test-infra/example.bicep +0 -59
- package/stacks/blazor-azure/CLAUDE.md +0 -155
- package/stacks/blazor-azure/README.md +0 -79
- package/stacks/nextjs-supabase/.claude/commands/morph-apply.md +0 -221
- package/stacks/nextjs-supabase/.claude/commands/morph-archive.md +0 -79
- package/stacks/nextjs-supabase/.claude/commands/morph-deploy.md +0 -529
- package/stacks/nextjs-supabase/.claude/commands/morph-preflight.md +0 -227
- package/stacks/nextjs-supabase/.claude/commands/morph-proposal.md +0 -122
- package/stacks/nextjs-supabase/.claude/commands/morph-status.md +0 -86
- package/stacks/nextjs-supabase/.claude/commands/morph-troubleshoot.md +0 -122
- package/stacks/nextjs-supabase/.morph/.morphversion +0 -5
- package/stacks/nextjs-supabase/.morph/config/config.json +0 -9
- package/stacks/nextjs-supabase/.morph/config/config.template.json +0 -92
- package/stacks/nextjs-supabase/.morph/hooks/pre-commit/tests-typescript.sh +0 -61
- package/stacks/nextjs-supabase/.morph/project/context/README.md +0 -17
- package/stacks/nextjs-supabase/.morph/project.md +0 -168
- package/stacks/nextjs-supabase/.morph/standards/ai-agents/blazor-ui.md +0 -364
- package/stacks/nextjs-supabase/.morph/standards/ai-agents/production.md +0 -415
- package/stacks/nextjs-supabase/.morph/standards/ai-agents/setup.md +0 -418
- package/stacks/nextjs-supabase/.morph/standards/ai-agents/team-orchestration.md +0 -479
- package/stacks/nextjs-supabase/.morph/standards/ai-agents/workflows.md +0 -354
- package/stacks/nextjs-supabase/.morph/standards/architecture/ddd/aggregates.md +0 -120
- package/stacks/nextjs-supabase/.morph/standards/architecture/ddd/entities.md +0 -99
- package/stacks/nextjs-supabase/.morph/standards/architecture/ddd/value-objects.md +0 -124
- package/stacks/nextjs-supabase/.morph/standards/backend/api/minimal-api.md +0 -494
- package/stacks/nextjs-supabase/.morph/standards/backend/api/rest.md +0 -492
- package/stacks/nextjs-supabase/.morph/standards/backend/api/validation.md +0 -88
- package/stacks/nextjs-supabase/.morph/standards/backend/authentication/passkeys.md +0 -428
- package/stacks/nextjs-supabase/.morph/standards/backend/database/ef-core.md +0 -199
- package/stacks/nextjs-supabase/.morph/standards/backend/database/migrations.md +0 -393
- package/stacks/nextjs-supabase/.morph/standards/backend/database/postgresql/database.md +0 -352
- package/stacks/nextjs-supabase/.morph/standards/backend/database/repository-patterns.md +0 -528
- package/stacks/nextjs-supabase/.morph/standards/backend/database/vector-search-rag.md +0 -541
- package/stacks/nextjs-supabase/.morph/standards/backend/dotnet/async.md +0 -366
- package/stacks/nextjs-supabase/.morph/standards/backend/dotnet/core.md +0 -117
- package/stacks/nextjs-supabase/.morph/standards/backend/dotnet/di.md +0 -439
- package/stacks/nextjs-supabase/.morph/standards/backend/dotnet/program-cs-checklist.md +0 -92
- package/stacks/nextjs-supabase/.morph/standards/backend/integrations/asaas/asaas-api.md +0 -216
- package/stacks/nextjs-supabase/.morph/standards/backend/integrations/clerk/clerk-auth.md +0 -290
- package/stacks/nextjs-supabase/.morph/standards/backend/integrations/hangfire/hangfire-jobs.md +0 -350
- package/stacks/nextjs-supabase/.morph/standards/backend/integrations/resend/resend-email.md +0 -385
- package/stacks/nextjs-supabase/.morph/standards/context/analytics.md +0 -96
- package/stacks/nextjs-supabase/.morph/standards/context/bundles.md +0 -110
- package/stacks/nextjs-supabase/.morph/standards/context/priming.md +0 -78
- package/stacks/nextjs-supabase/.morph/standards/core/architecture.md +0 -185
- package/stacks/nextjs-supabase/.morph/standards/core/coding.md +0 -214
- package/stacks/nextjs-supabase/.morph/standards/core/git-branching-strategy.md +0 -403
- package/stacks/nextjs-supabase/.morph/standards/core/git.md +0 -185
- package/stacks/nextjs-supabase/.morph/standards/core/testing.md +0 -295
- package/stacks/nextjs-supabase/.morph/standards/data/nosql/blob-storage.md +0 -102
- package/stacks/nextjs-supabase/.morph/standards/data/nosql/cache/redis.md +0 -97
- package/stacks/nextjs-supabase/.morph/standards/data/nosql/cosmos-db.md +0 -118
- package/stacks/nextjs-supabase/.morph/standards/data/vector-search/azure-ai-search.md +0 -121
- package/stacks/nextjs-supabase/.morph/standards/data/vector-search/rag-chunking.md +0 -104
- package/stacks/nextjs-supabase/.morph/standards/frontend/blazor/design-checklist.md +0 -222
- package/stacks/nextjs-supabase/.morph/standards/frontend/blazor/fluent-ui-setup.md +0 -595
- package/stacks/nextjs-supabase/.morph/standards/frontend/blazor/fluent-ui.md +0 -137
- package/stacks/nextjs-supabase/.morph/standards/frontend/blazor/html-conversion.md +0 -184
- package/stacks/nextjs-supabase/.morph/standards/frontend/blazor/lifecycle.md +0 -195
- package/stacks/nextjs-supabase/.morph/standards/frontend/blazor/pitfalls.md +0 -198
- package/stacks/nextjs-supabase/.morph/standards/frontend/blazor/state.md +0 -191
- package/stacks/nextjs-supabase/.morph/standards/frontend/design-system/animations.md +0 -151
- package/stacks/nextjs-supabase/.morph/standards/frontend/design-system/naming.md +0 -64
- package/stacks/nextjs-supabase/.morph/standards/frontend/nextjs/nextjs-patterns.md +0 -198
- package/stacks/nextjs-supabase/.morph/standards/infrastructure/azure/azure.md +0 -624
- package/stacks/nextjs-supabase/.morph/standards/infrastructure/azure/bicep/bicep-patterns.md +0 -422
- package/stacks/nextjs-supabase/.morph/standards/infrastructure/azure/devops/azure-devops-setup.md +0 -516
- package/stacks/nextjs-supabase/.morph/standards/infrastructure/azure/devops/local-development.md +0 -520
- package/stacks/nextjs-supabase/.morph/standards/infrastructure/azure/services/functions.md +0 -486
- package/stacks/nextjs-supabase/.morph/standards/infrastructure/azure/services/service-bus.md +0 -459
- package/stacks/nextjs-supabase/.morph/standards/infrastructure/azure/services/storage.md +0 -407
- package/stacks/nextjs-supabase/.morph/standards/infrastructure/docker/easypanel-deploy.md +0 -196
- package/stacks/nextjs-supabase/.morph/standards/infrastructure/supabase/mcp-setup.md +0 -252
- package/stacks/nextjs-supabase/.morph/standards/infrastructure/supabase/supabase-auth.md +0 -176
- package/stacks/nextjs-supabase/.morph/standards/infrastructure/supabase/supabase-pgvector.md +0 -169
- package/stacks/nextjs-supabase/.morph/standards/infrastructure/supabase/supabase-rls.md +0 -184
- package/stacks/nextjs-supabase/.morph/standards/infrastructure/supabase/supabase-storage.md +0 -153
- package/stacks/nextjs-supabase/.morph/standards/integration/api/graphql.md +0 -91
- package/stacks/nextjs-supabase/.morph/standards/integration/api/grpc.md +0 -114
- package/stacks/nextjs-supabase/.morph/standards/integration/api/rest-design.md +0 -95
- package/stacks/nextjs-supabase/.morph/standards/integration/event-driven/cqrs.md +0 -101
- package/stacks/nextjs-supabase/.morph/standards/integration/event-driven/event-sourcing.md +0 -124
- package/stacks/nextjs-supabase/.morph/standards/integration/event-driven/service-bus.md +0 -95
- package/stacks/nextjs-supabase/.morph/standards/observability/logging.md +0 -131
- package/stacks/nextjs-supabase/.morph/standards/observability/metrics.md +0 -121
- package/stacks/nextjs-supabase/.morph/standards/observability/monitoring.md +0 -114
- package/stacks/nextjs-supabase/.morph/standards/observability/tracing.md +0 -132
- package/stacks/nextjs-supabase/.morph/standards/workflows/parallel-execution.md +0 -112
- package/stacks/nextjs-supabase/.morph/standards/workflows/thread-management.md +0 -113
- package/stacks/nextjs-supabase/CLAUDE.md +0 -155
- package/stacks/nextjs-supabase/README.md +0 -103
- /package/{stacks/blazor-azure/.claude → framework}/commands/morph-apply.md +0 -0
- /package/{stacks/blazor-azure/.claude → framework}/commands/morph-archive.md +0 -0
- /package/{stacks/blazor-azure/.claude → framework}/commands/morph-preflight.md +0 -0
- /package/{stacks/blazor-azure/.claude → framework}/commands/morph-proposal.md +0 -0
- /package/{stacks/blazor-azure/.claude → framework}/commands/morph-status.md +0 -0
- /package/{stacks/blazor-azure/.claude → framework}/commands/morph-troubleshoot.md +0 -0
- /package/{stacks/blazor-azure/.morph → framework}/standards/ai-agents/blazor-ui.md +0 -0
- /package/{stacks/blazor-azure/.morph → framework}/standards/ai-agents/production.md +0 -0
- /package/{stacks/blazor-azure/.morph → framework}/standards/ai-agents/setup.md +0 -0
- /package/{stacks/blazor-azure/.morph → framework}/standards/ai-agents/team-orchestration.md +0 -0
- /package/{stacks/blazor-azure/.morph → framework}/standards/ai-agents/workflows.md +0 -0
- /package/{stacks/blazor-azure/.morph → framework}/standards/architecture/ddd/aggregates.md +0 -0
- /package/{stacks/blazor-azure/.morph → framework}/standards/architecture/ddd/entities.md +0 -0
- /package/{stacks/blazor-azure/.morph → framework}/standards/architecture/ddd/value-objects.md +0 -0
- /package/{stacks/blazor-azure/.morph → framework}/standards/backend/api/minimal-api.md +0 -0
- /package/{stacks/blazor-azure/.morph → framework}/standards/backend/api/rest.md +0 -0
- /package/{stacks/blazor-azure/.morph → framework}/standards/backend/api/validation.md +0 -0
- /package/{stacks/blazor-azure/.morph → framework}/standards/backend/authentication/passkeys.md +0 -0
- /package/{stacks/blazor-azure/.morph → framework}/standards/backend/database/ef-core.md +0 -0
- /package/{stacks/blazor-azure/.morph → framework}/standards/backend/database/migrations.md +0 -0
- /package/{stacks/blazor-azure/.morph → framework}/standards/backend/database/postgresql/database.md +0 -0
- /package/{stacks/blazor-azure/.morph → framework}/standards/backend/database/repository-patterns.md +0 -0
- /package/{stacks/blazor-azure/.morph → framework}/standards/backend/database/vector-search-rag.md +0 -0
- /package/{stacks/blazor-azure/.morph → framework}/standards/backend/dotnet/async.md +0 -0
- /package/{stacks/blazor-azure/.morph → framework}/standards/backend/dotnet/core.md +0 -0
- /package/{stacks/blazor-azure/.morph → framework}/standards/backend/dotnet/di.md +0 -0
- /package/{stacks/blazor-azure/.morph → framework}/standards/backend/dotnet/program-cs-checklist.md +0 -0
- /package/{stacks/blazor-azure/.morph → framework}/standards/backend/integrations/asaas/asaas-api.md +0 -0
- /package/{stacks/blazor-azure/.morph → framework}/standards/backend/integrations/clerk/clerk-auth.md +0 -0
- /package/{stacks/blazor-azure/.morph → framework}/standards/backend/integrations/hangfire/hangfire-jobs.md +0 -0
- /package/{stacks/blazor-azure/.morph → framework}/standards/backend/integrations/resend/resend-email.md +0 -0
- /package/{stacks/blazor-azure/.morph → framework}/standards/context/analytics.md +0 -0
- /package/{stacks/blazor-azure/.morph → framework}/standards/context/bundles.md +0 -0
- /package/{stacks/blazor-azure/.morph → framework}/standards/context/priming.md +0 -0
- /package/{stacks/blazor-azure/.morph → framework}/standards/core/architecture.md +0 -0
- /package/{stacks/blazor-azure/.morph → framework}/standards/core/coding.md +0 -0
- /package/{stacks/blazor-azure/.morph → framework}/standards/core/git-branching-strategy.md +0 -0
- /package/{stacks/blazor-azure/.morph → framework}/standards/core/git.md +0 -0
- /package/{stacks/blazor-azure/.morph → framework}/standards/core/testing.md +0 -0
- /package/{stacks/blazor-azure/.morph → framework}/standards/data/nosql/blob-storage.md +0 -0
- /package/{stacks/blazor-azure/.morph → framework}/standards/data/nosql/cache/redis.md +0 -0
- /package/{stacks/blazor-azure/.morph → framework}/standards/data/nosql/cosmos-db.md +0 -0
- /package/{stacks/blazor-azure/.morph → framework}/standards/data/vector-search/azure-ai-search.md +0 -0
- /package/{stacks/blazor-azure/.morph → framework}/standards/data/vector-search/rag-chunking.md +0 -0
- /package/{stacks/blazor-azure/.morph → framework}/standards/frontend/blazor/design-checklist.md +0 -0
- /package/{stacks/blazor-azure/.morph → framework}/standards/frontend/blazor/fluent-ui-setup.md +0 -0
- /package/{stacks/blazor-azure/.morph → framework}/standards/frontend/blazor/fluent-ui.md +0 -0
- /package/{stacks/blazor-azure/.morph → framework}/standards/frontend/blazor/html-conversion.md +0 -0
- /package/{stacks/blazor-azure/.morph → framework}/standards/frontend/blazor/lifecycle.md +0 -0
- /package/{stacks/blazor-azure/.morph → framework}/standards/frontend/blazor/pitfalls.md +0 -0
- /package/{stacks/blazor-azure/.morph → framework}/standards/frontend/blazor/state.md +0 -0
- /package/{stacks/blazor-azure/.morph → framework}/standards/frontend/design-system/animations.md +0 -0
- /package/{stacks/blazor-azure/.morph → framework}/standards/frontend/design-system/naming.md +0 -0
- /package/{stacks/blazor-azure/.morph → framework}/standards/frontend/nextjs/nextjs-patterns.md +0 -0
- /package/{stacks/blazor-azure/.morph → framework}/standards/infrastructure/azure/azure.md +0 -0
- /package/{stacks/blazor-azure/.morph → framework}/standards/infrastructure/azure/bicep/bicep-patterns.md +0 -0
- /package/{stacks/blazor-azure/.morph → framework}/standards/infrastructure/azure/devops/azure-devops-setup.md +0 -0
- /package/{stacks/blazor-azure/.morph → framework}/standards/infrastructure/azure/devops/local-development.md +0 -0
- /package/{stacks/blazor-azure/.morph → framework}/standards/infrastructure/azure/services/functions.md +0 -0
- /package/{stacks/blazor-azure/.morph → framework}/standards/infrastructure/azure/services/service-bus.md +0 -0
- /package/{stacks/blazor-azure/.morph → framework}/standards/infrastructure/azure/services/storage.md +0 -0
- /package/{stacks/blazor-azure/.morph → framework}/standards/infrastructure/docker/easypanel-deploy.md +0 -0
- /package/{stacks/blazor-azure/.morph → framework}/standards/infrastructure/supabase/mcp-setup.md +0 -0
- /package/{stacks/blazor-azure/.morph → framework}/standards/infrastructure/supabase/supabase-auth.md +0 -0
- /package/{stacks/blazor-azure/.morph → framework}/standards/infrastructure/supabase/supabase-pgvector.md +0 -0
- /package/{stacks/blazor-azure/.morph → framework}/standards/infrastructure/supabase/supabase-rls.md +0 -0
- /package/{stacks/blazor-azure/.morph → framework}/standards/infrastructure/supabase/supabase-storage.md +0 -0
- /package/{stacks/blazor-azure/.morph → framework}/standards/integration/api/graphql.md +0 -0
- /package/{stacks/blazor-azure/.morph → framework}/standards/integration/api/grpc.md +0 -0
- /package/{stacks/blazor-azure/.morph → framework}/standards/integration/api/rest-design.md +0 -0
- /package/{stacks/blazor-azure/.morph → framework}/standards/integration/event-driven/cqrs.md +0 -0
- /package/{stacks/blazor-azure/.morph → framework}/standards/integration/event-driven/event-sourcing.md +0 -0
- /package/{stacks/blazor-azure/.morph → framework}/standards/integration/event-driven/service-bus.md +0 -0
- /package/{stacks/blazor-azure/.morph → framework}/standards/observability/logging.md +0 -0
- /package/{stacks/blazor-azure/.morph → framework}/standards/observability/metrics.md +0 -0
- /package/{stacks/blazor-azure/.morph → framework}/standards/observability/monitoring.md +0 -0
- /package/{stacks/blazor-azure/.morph → framework}/standards/observability/tracing.md +0 -0
- /package/{stacks/blazor-azure/.morph → framework}/standards/workflows/parallel-execution.md +0 -0
- /package/{stacks/blazor-azure/.morph → framework}/standards/workflows/thread-management.md +0 -0
|
@@ -0,0 +1,80 @@
|
|
|
1
|
+
#!/usr/bin/env node
|
|
2
|
+
// Scope: universal | Validates feature outputs when phase is advanced
|
|
3
|
+
// MORPH-SPEC Agent Teams Hook: PhaseAdvanced Event
|
|
4
|
+
|
|
5
|
+
import { executeHook, formatHookResults } from '../../../src/lib/hooks/hook-executor.js';
|
|
6
|
+
import { join, dirname } from 'path';
|
|
7
|
+
import { fileURLToPath } from 'url';
|
|
8
|
+
|
|
9
|
+
const __filename = fileURLToPath(import.meta.url);
|
|
10
|
+
const __dirname = dirname(__filename);
|
|
11
|
+
|
|
12
|
+
// Parse arguments
|
|
13
|
+
const args = process.argv.slice(2);
|
|
14
|
+
const [featureName, fromPhase, toPhase] = args.filter(arg => !arg.startsWith('--'));
|
|
15
|
+
|
|
16
|
+
if (!featureName || !fromPhase || !toPhase) {
|
|
17
|
+
console.error('Usage: phase-advanced.js <feature> <from-phase> <to-phase> [--dry-run] [--verbose]');
|
|
18
|
+
console.error('');
|
|
19
|
+
console.error('Example:');
|
|
20
|
+
console.error(' node phase-advanced.js user-auth design clarify');
|
|
21
|
+
process.exit(2);
|
|
22
|
+
}
|
|
23
|
+
|
|
24
|
+
const dryRun = args.includes('--dry-run');
|
|
25
|
+
const verbose = args.includes('--verbose');
|
|
26
|
+
|
|
27
|
+
// Project path is 3 levels up from framework/hooks/agent-teams/
|
|
28
|
+
const projectPath = join(__dirname, '../../..');
|
|
29
|
+
|
|
30
|
+
async function main() {
|
|
31
|
+
if (verbose) {
|
|
32
|
+
console.log(`🔍 PhaseAdvanced Hook triggered:`);
|
|
33
|
+
console.log(` Feature: ${featureName}`);
|
|
34
|
+
console.log(` Transition: ${fromPhase} → ${toPhase}`);
|
|
35
|
+
console.log(` Mode: ${dryRun ? 'DRY RUN' : 'LIVE'}`);
|
|
36
|
+
console.log('');
|
|
37
|
+
}
|
|
38
|
+
|
|
39
|
+
try {
|
|
40
|
+
const results = await executeHook(projectPath, featureName, 'PhaseAdvanced', {
|
|
41
|
+
fromPhase,
|
|
42
|
+
toPhase,
|
|
43
|
+
dryRun,
|
|
44
|
+
verbose
|
|
45
|
+
});
|
|
46
|
+
|
|
47
|
+
const output = formatHookResults(results, 'PhaseAdvanced');
|
|
48
|
+
console.log(output);
|
|
49
|
+
|
|
50
|
+
if (results.blocked) {
|
|
51
|
+
console.error('');
|
|
52
|
+
console.error('❌ Cannot advance phase - fix errors above');
|
|
53
|
+
console.error('');
|
|
54
|
+
console.error('To override (not recommended):');
|
|
55
|
+
console.error(` npx morph-spec advance-phase ${featureName} ${toPhase} --skip-validation`);
|
|
56
|
+
process.exit(1);
|
|
57
|
+
}
|
|
58
|
+
|
|
59
|
+
if (verbose) {
|
|
60
|
+
console.log('');
|
|
61
|
+
console.log('✅ Phase advancement validated successfully');
|
|
62
|
+
}
|
|
63
|
+
|
|
64
|
+
process.exit(0);
|
|
65
|
+
} catch (error) {
|
|
66
|
+
console.error('');
|
|
67
|
+
console.error('❌ Hook execution failed:');
|
|
68
|
+
console.error(` ${error.message}`);
|
|
69
|
+
|
|
70
|
+
if (verbose && error.stack) {
|
|
71
|
+
console.error('');
|
|
72
|
+
console.error('Stack trace:');
|
|
73
|
+
console.error(error.stack);
|
|
74
|
+
}
|
|
75
|
+
|
|
76
|
+
process.exit(1);
|
|
77
|
+
}
|
|
78
|
+
}
|
|
79
|
+
|
|
80
|
+
main();
|
|
@@ -0,0 +1,76 @@
|
|
|
1
|
+
#!/usr/bin/env node
|
|
2
|
+
|
|
3
|
+
// Scope: universal | Task completion validation
|
|
4
|
+
|
|
5
|
+
/**
|
|
6
|
+
* TaskCompleted Hook - Claude Code Agent Teams
|
|
7
|
+
*
|
|
8
|
+
* Triggered when a task is marked as completed.
|
|
9
|
+
* Validates the task deliverables before allowing the task to be marked done.
|
|
10
|
+
*
|
|
11
|
+
* Usage (from Claude Code hooks):
|
|
12
|
+
* task-completed.js <feature-name> <task-id> [--dry-run] [--verbose]
|
|
13
|
+
*
|
|
14
|
+
* Exit codes:
|
|
15
|
+
* 0 - All validators passed
|
|
16
|
+
* 1 - Validation failed and blocked
|
|
17
|
+
* 2 - Configuration error
|
|
18
|
+
*/
|
|
19
|
+
|
|
20
|
+
import { executeHook, formatHookResults } from '../../../src/lib/hooks/hook-executor.js';
|
|
21
|
+
import { fileURLToPath } from 'url';
|
|
22
|
+
import { dirname, join } from 'path';
|
|
23
|
+
|
|
24
|
+
const __filename = fileURLToPath(import.meta.url);
|
|
25
|
+
const __dirname = dirname(__filename);
|
|
26
|
+
|
|
27
|
+
// Get project root (3 levels up from framework/hooks/agent-teams/)
|
|
28
|
+
const projectPath = join(__dirname, '../../..');
|
|
29
|
+
|
|
30
|
+
async function main() {
|
|
31
|
+
const args = process.argv.slice(2);
|
|
32
|
+
|
|
33
|
+
if (args.length < 2) {
|
|
34
|
+
console.error('Usage: task-completed.js <feature-name> <task-id> [--dry-run] [--verbose]');
|
|
35
|
+
process.exit(2);
|
|
36
|
+
}
|
|
37
|
+
|
|
38
|
+
const featureName = args[0];
|
|
39
|
+
const taskId = args[1];
|
|
40
|
+
const dryRun = args.includes('--dry-run');
|
|
41
|
+
const verbose = args.includes('--verbose');
|
|
42
|
+
|
|
43
|
+
console.log('🔔 TaskCompleted Hook Triggered');
|
|
44
|
+
console.log(` Feature: ${featureName}`);
|
|
45
|
+
console.log(` Task: ${taskId}`);
|
|
46
|
+
console.log(` Event: Task marked complete, validating deliverables...\n`);
|
|
47
|
+
|
|
48
|
+
try {
|
|
49
|
+
const results = await executeHook(projectPath, featureName, 'TaskCompleted', {
|
|
50
|
+
dryRun,
|
|
51
|
+
verbose,
|
|
52
|
+
taskId
|
|
53
|
+
});
|
|
54
|
+
|
|
55
|
+
const output = formatHookResults(results, 'TaskCompleted');
|
|
56
|
+
console.log(output);
|
|
57
|
+
|
|
58
|
+
if (results.blocked) {
|
|
59
|
+
console.log('\n💡 TIP: Fix the errors above before the task can be marked complete.');
|
|
60
|
+
console.log(` Run: morph-spec task done ${featureName} ${taskId} --skip-validation`);
|
|
61
|
+
console.log(' (Not recommended - only use if you know what you\'re doing)');
|
|
62
|
+
process.exit(1);
|
|
63
|
+
}
|
|
64
|
+
|
|
65
|
+
console.log('\n✅ Task deliverables validated successfully.');
|
|
66
|
+
process.exit(0);
|
|
67
|
+
} catch (err) {
|
|
68
|
+
console.error(`\n❌ Hook execution error: ${err.message}`);
|
|
69
|
+
if (verbose) {
|
|
70
|
+
console.error(err.stack);
|
|
71
|
+
}
|
|
72
|
+
process.exit(2);
|
|
73
|
+
}
|
|
74
|
+
}
|
|
75
|
+
|
|
76
|
+
main();
|
|
@@ -0,0 +1,70 @@
|
|
|
1
|
+
#!/usr/bin/env node
|
|
2
|
+
|
|
3
|
+
// Scope: universal | Agent Teams idle event validation
|
|
4
|
+
|
|
5
|
+
/**
|
|
6
|
+
* TeammateIdle Hook - Claude Code Agent Teams
|
|
7
|
+
*
|
|
8
|
+
* Triggered when a teammate is idle and waiting for next instructions.
|
|
9
|
+
* Validates the teammate's recent work before allowing them to proceed.
|
|
10
|
+
*
|
|
11
|
+
* Usage (from Claude Code hooks):
|
|
12
|
+
* teammate-idle.js <feature-name> [--dry-run] [--verbose]
|
|
13
|
+
*
|
|
14
|
+
* Exit codes:
|
|
15
|
+
* 0 - All validators passed
|
|
16
|
+
* 1 - Validation failed and blocked
|
|
17
|
+
* 2 - Configuration error
|
|
18
|
+
*/
|
|
19
|
+
|
|
20
|
+
import { executeHook, formatHookResults } from '../../../src/lib/hooks/hook-executor.js';
|
|
21
|
+
import { fileURLToPath } from 'url';
|
|
22
|
+
import { dirname, join } from 'path';
|
|
23
|
+
|
|
24
|
+
const __filename = fileURLToPath(import.meta.url);
|
|
25
|
+
const __dirname = dirname(__filename);
|
|
26
|
+
|
|
27
|
+
// Get project root (3 levels up from framework/hooks/agent-teams/)
|
|
28
|
+
const projectPath = join(__dirname, '../../..');
|
|
29
|
+
|
|
30
|
+
async function main() {
|
|
31
|
+
const args = process.argv.slice(2);
|
|
32
|
+
|
|
33
|
+
if (args.length === 0) {
|
|
34
|
+
console.error('Usage: teammate-idle.js <feature-name> [--dry-run] [--verbose]');
|
|
35
|
+
process.exit(2);
|
|
36
|
+
}
|
|
37
|
+
|
|
38
|
+
const featureName = args[0];
|
|
39
|
+
const dryRun = args.includes('--dry-run');
|
|
40
|
+
const verbose = args.includes('--verbose');
|
|
41
|
+
|
|
42
|
+
console.log('🔔 TeammateIdle Hook Triggered');
|
|
43
|
+
console.log(` Feature: ${featureName}`);
|
|
44
|
+
console.log(` Event: Teammate is idle, validating recent work...\n`);
|
|
45
|
+
|
|
46
|
+
try {
|
|
47
|
+
const results = await executeHook(projectPath, featureName, 'TeammateIdle', {
|
|
48
|
+
dryRun,
|
|
49
|
+
verbose
|
|
50
|
+
});
|
|
51
|
+
|
|
52
|
+
const output = formatHookResults(results, 'TeammateIdle');
|
|
53
|
+
console.log(output);
|
|
54
|
+
|
|
55
|
+
if (results.blocked) {
|
|
56
|
+
console.log('\n💡 TIP: Fix the errors above before the teammate can proceed.');
|
|
57
|
+
process.exit(1);
|
|
58
|
+
}
|
|
59
|
+
|
|
60
|
+
process.exit(0);
|
|
61
|
+
} catch (err) {
|
|
62
|
+
console.error(`\n❌ Hook execution error: ${err.message}`);
|
|
63
|
+
if (verbose) {
|
|
64
|
+
console.error(err.stack);
|
|
65
|
+
}
|
|
66
|
+
process.exit(2);
|
|
67
|
+
}
|
|
68
|
+
}
|
|
69
|
+
|
|
70
|
+
main();
|
|
@@ -0,0 +1,33 @@
|
|
|
1
|
+
#!/usr/bin/env bash
|
|
2
|
+
# Scope: universal | Validates commit message format (Conventional Commits)
|
|
3
|
+
# MORPH-SPEC Commit Message Hook
|
|
4
|
+
# Enforces Conventional Commits specification
|
|
5
|
+
|
|
6
|
+
COMMIT_MSG_FILE="$1"
|
|
7
|
+
COMMIT_MSG=$(cat "$COMMIT_MSG_FILE")
|
|
8
|
+
|
|
9
|
+
# Conventional Commits pattern: type(scope): description
|
|
10
|
+
# Types: feat, fix, docs, style, refactor, perf, test, chore, build, ci, revert
|
|
11
|
+
PATTERN="^(feat|fix|docs|style|refactor|perf|test|chore|build|ci|revert)(\(.+\))?: .{1,100}"
|
|
12
|
+
|
|
13
|
+
if ! echo "$COMMIT_MSG" | grep -qE "$PATTERN"; then
|
|
14
|
+
echo "❌ Invalid commit message format!"
|
|
15
|
+
echo ""
|
|
16
|
+
echo "Required format: <type>(<scope>): <description>"
|
|
17
|
+
echo ""
|
|
18
|
+
echo "Types: feat, fix, docs, style, refactor, perf, test, chore, build, ci, revert"
|
|
19
|
+
echo ""
|
|
20
|
+
echo "Examples:"
|
|
21
|
+
echo " feat(auth): add JWT refresh token rotation"
|
|
22
|
+
echo " fix(api): resolve null reference in UserService"
|
|
23
|
+
echo " docs(readme): update installation instructions"
|
|
24
|
+
echo ""
|
|
25
|
+
echo "Your message:"
|
|
26
|
+
echo " $COMMIT_MSG"
|
|
27
|
+
echo ""
|
|
28
|
+
echo "Override with: git commit --no-verify"
|
|
29
|
+
exit 1
|
|
30
|
+
fi
|
|
31
|
+
|
|
32
|
+
echo "✅ Commit message format valid"
|
|
33
|
+
exit 0
|
|
@@ -0,0 +1,25 @@
|
|
|
1
|
+
#!/bin/bash
|
|
2
|
+
# Scope: universal | Validates agents.json Schema
|
|
3
|
+
# MORPH-SPEC Pre-Commit Hook: Agent Configuration Validation
|
|
4
|
+
# Uses validate-agents.js to check agents.json
|
|
5
|
+
|
|
6
|
+
echo "🤖 Validating agent configuration..."
|
|
7
|
+
|
|
8
|
+
# Check if agents.json is being modified
|
|
9
|
+
if git diff --cached --name-only | grep -q 'agents\.json$'; then
|
|
10
|
+
echo "Detected changes to agents.json"
|
|
11
|
+
|
|
12
|
+
# Run validator
|
|
13
|
+
if ! npx morph-spec validate-agents-skills; then
|
|
14
|
+
echo ""
|
|
15
|
+
echo "❌ COMMIT BLOCKED: agents.json validation failed"
|
|
16
|
+
echo " Fix errors above before committing"
|
|
17
|
+
exit 1
|
|
18
|
+
fi
|
|
19
|
+
|
|
20
|
+
echo "✓ agents.json is valid"
|
|
21
|
+
else
|
|
22
|
+
echo "✓ No changes to agents.json"
|
|
23
|
+
fi
|
|
24
|
+
|
|
25
|
+
exit 0
|
|
@@ -0,0 +1,64 @@
|
|
|
1
|
+
#!/usr/bin/env bash
|
|
2
|
+
# Scope: universal | Orchestrates framework + stack-specific pre-commit hooks
|
|
3
|
+
# MORPH-SPEC Master Pre-Commit Hook
|
|
4
|
+
# Runs universal framework hooks + stack-specific hooks in sequence
|
|
5
|
+
|
|
6
|
+
echo "╔════════════════════════════════════════════════╗"
|
|
7
|
+
echo "║ MORPH-SPEC PRE-COMMIT VALIDATION ║"
|
|
8
|
+
echo "╚════════════════════════════════════════════════╝"
|
|
9
|
+
echo ""
|
|
10
|
+
|
|
11
|
+
FRAMEWORK_HOOKS_DIR="$(dirname "$0")"
|
|
12
|
+
STACK_HOOKS_DIR=".morph/hooks/pre-commit"
|
|
13
|
+
|
|
14
|
+
HAS_FAILURES=false
|
|
15
|
+
|
|
16
|
+
# Run framework hooks (universal - all stacks)
|
|
17
|
+
echo "📦 Running framework hooks (universal)..."
|
|
18
|
+
for hook in "$FRAMEWORK_HOOKS_DIR"/*.sh; do
|
|
19
|
+
# Skip orchestrator itself
|
|
20
|
+
if [[ "$hook" == */orchestrator.sh ]]; then
|
|
21
|
+
continue
|
|
22
|
+
fi
|
|
23
|
+
|
|
24
|
+
if [[ -f "$hook" ]]; then
|
|
25
|
+
hook_name=$(basename "$hook")
|
|
26
|
+
echo "─────────────────────────────────────────────────"
|
|
27
|
+
if ! bash "$hook"; then
|
|
28
|
+
HAS_FAILURES=true
|
|
29
|
+
echo "❌ Framework hook failed: $hook_name"
|
|
30
|
+
fi
|
|
31
|
+
echo ""
|
|
32
|
+
fi
|
|
33
|
+
done
|
|
34
|
+
|
|
35
|
+
# Run stack-specific hooks (if exist)
|
|
36
|
+
if [[ -d "$STACK_HOOKS_DIR" ]]; then
|
|
37
|
+
echo "🎯 Running stack-specific hooks..."
|
|
38
|
+
for hook in "$STACK_HOOKS_DIR"/*.sh; do
|
|
39
|
+
if [[ -f "$hook" ]]; then
|
|
40
|
+
hook_name=$(basename "$hook")
|
|
41
|
+
echo "─────────────────────────────────────────────────"
|
|
42
|
+
if ! bash "$hook"; then
|
|
43
|
+
HAS_FAILURES=true
|
|
44
|
+
echo "❌ Stack hook failed: $hook_name"
|
|
45
|
+
fi
|
|
46
|
+
echo ""
|
|
47
|
+
fi
|
|
48
|
+
done
|
|
49
|
+
else
|
|
50
|
+
echo "ℹ️ No stack-specific hooks found (optional)"
|
|
51
|
+
echo ""
|
|
52
|
+
fi
|
|
53
|
+
|
|
54
|
+
echo "═════════════════════════════════════════════════"
|
|
55
|
+
|
|
56
|
+
if [[ "$HAS_FAILURES" == "true" ]]; then
|
|
57
|
+
echo "❌ PRE-COMMIT VALIDATION FAILED"
|
|
58
|
+
echo " Fix errors above before committing"
|
|
59
|
+
echo " Or use: git commit --no-verify to skip"
|
|
60
|
+
exit 1
|
|
61
|
+
fi
|
|
62
|
+
|
|
63
|
+
echo "✅ ALL PRE-COMMIT VALIDATIONS PASSED"
|
|
64
|
+
exit 0
|
|
@@ -0,0 +1,50 @@
|
|
|
1
|
+
#!/bin/bash
|
|
2
|
+
# Scope: universal | Validates spec.md required sections
|
|
3
|
+
# MORPH-SPEC Pre-Commit Hook: Spec Validation
|
|
4
|
+
# Validates that spec.md files have required sections
|
|
5
|
+
|
|
6
|
+
echo "🔍 Validating spec files..."
|
|
7
|
+
|
|
8
|
+
# Find modified spec.md files
|
|
9
|
+
SPEC_FILES=$(git diff --cached --name-only --diff-filter=ACM | grep 'spec\.md$')
|
|
10
|
+
|
|
11
|
+
if [ -z "$SPEC_FILES" ]; then
|
|
12
|
+
echo "✓ No spec files modified"
|
|
13
|
+
exit 0
|
|
14
|
+
fi
|
|
15
|
+
|
|
16
|
+
HAS_ERRORS=false
|
|
17
|
+
|
|
18
|
+
for spec_file in $SPEC_FILES; do
|
|
19
|
+
echo "Checking: $spec_file"
|
|
20
|
+
|
|
21
|
+
# Required sections
|
|
22
|
+
REQUIRED_SECTIONS=(
|
|
23
|
+
"## 📋 Metadata"
|
|
24
|
+
"## 🎯 Overview"
|
|
25
|
+
"## 🏗️ Technical Design"
|
|
26
|
+
"## ✅ Acceptance Criteria"
|
|
27
|
+
)
|
|
28
|
+
|
|
29
|
+
for section in "${REQUIRED_SECTIONS[@]}"; do
|
|
30
|
+
if ! grep -q "$section" "$spec_file"; then
|
|
31
|
+
echo " ❌ Missing section: $section"
|
|
32
|
+
HAS_ERRORS=true
|
|
33
|
+
fi
|
|
34
|
+
done
|
|
35
|
+
|
|
36
|
+
# Check if has at least one user story or requirement
|
|
37
|
+
if ! grep -qi "user story\|requirement\|acceptance criteria" "$spec_file"; then
|
|
38
|
+
echo " ⚠️ Warning: No user stories or requirements found"
|
|
39
|
+
fi
|
|
40
|
+
done
|
|
41
|
+
|
|
42
|
+
if [ "$HAS_ERRORS" = true ]; then
|
|
43
|
+
echo ""
|
|
44
|
+
echo "❌ COMMIT BLOCKED: spec.md files are incomplete"
|
|
45
|
+
echo " Add missing sections before committing"
|
|
46
|
+
exit 1
|
|
47
|
+
fi
|
|
48
|
+
|
|
49
|
+
echo "✓ All spec files are valid"
|
|
50
|
+
exit 0
|
|
@@ -0,0 +1,44 @@
|
|
|
1
|
+
#!/usr/bin/env bash
|
|
2
|
+
# Scope: universal | Runs test suite before push
|
|
3
|
+
# MORPH-SPEC Pre-Push Hook
|
|
4
|
+
# Ensures all tests pass before pushing to remote
|
|
5
|
+
|
|
6
|
+
echo "🧪 Running test suite before push..."
|
|
7
|
+
echo ""
|
|
8
|
+
|
|
9
|
+
# Detect project type and run appropriate tests
|
|
10
|
+
if [[ -f *.csproj ]] || find . -maxdepth 2 -name "*.csproj" 2>/dev/null | grep -q .; then
|
|
11
|
+
# .NET project detected
|
|
12
|
+
echo "📦 Detected .NET project"
|
|
13
|
+
|
|
14
|
+
if ! dotnet test --verbosity minimal --no-build --no-restore 2>/dev/null; then
|
|
15
|
+
echo ""
|
|
16
|
+
echo "❌ .NET tests failed!"
|
|
17
|
+
echo ""
|
|
18
|
+
echo "Fix failing tests before pushing."
|
|
19
|
+
echo "Override with: git push --no-verify"
|
|
20
|
+
exit 1
|
|
21
|
+
fi
|
|
22
|
+
|
|
23
|
+
elif [[ -f package.json ]]; then
|
|
24
|
+
# Node.js project detected
|
|
25
|
+
echo "📦 Detected Node.js project"
|
|
26
|
+
|
|
27
|
+
if ! npm test 2>/dev/null; then
|
|
28
|
+
echo ""
|
|
29
|
+
echo "❌ Node.js tests failed!"
|
|
30
|
+
echo ""
|
|
31
|
+
echo "Fix failing tests before pushing."
|
|
32
|
+
echo "Override with: git push --no-verify"
|
|
33
|
+
exit 1
|
|
34
|
+
fi
|
|
35
|
+
|
|
36
|
+
else
|
|
37
|
+
echo "⚠️ No recognized test framework found"
|
|
38
|
+
echo " Skipping test execution"
|
|
39
|
+
exit 0
|
|
40
|
+
fi
|
|
41
|
+
|
|
42
|
+
echo ""
|
|
43
|
+
echo "✅ All tests passed - safe to push"
|
|
44
|
+
exit 0
|
|
@@ -0,0 +1,184 @@
|
|
|
1
|
+
{
|
|
2
|
+
"version": "1.0.0",
|
|
3
|
+
"lastUpdated": "2025-01-25",
|
|
4
|
+
"problems": [
|
|
5
|
+
{
|
|
6
|
+
"id": "efcore-pending-changes",
|
|
7
|
+
"title": "PendingModelChangesWarning no EF Core 10",
|
|
8
|
+
"keywords": ["PendingModelChanges", "migration", "EF Core", "database update", "pending", "model changed"],
|
|
9
|
+
"errorPattern": "PendingModelChangesException|pending changes|model.*has pending changes",
|
|
10
|
+
"file": "framework/standards/backend/database/ef-core.md",
|
|
11
|
+
"section": "Migrations - .NET 10 PendingModelChangesWarning",
|
|
12
|
+
"severity": "critical",
|
|
13
|
+
"scope": "blazor-azure,nextjs-supabase",
|
|
14
|
+
"category": "efcore",
|
|
15
|
+
"cause": "EF Core 10 lança exceção se modelo mudou desde última migration.",
|
|
16
|
+
"solution": "dotnet ef migrations add <Name> antes de database update"
|
|
17
|
+
},
|
|
18
|
+
{
|
|
19
|
+
"id": "dbcontext-concurrent",
|
|
20
|
+
"title": "DbContext Concurrency Error",
|
|
21
|
+
"keywords": ["DbContext", "concurrent", "second operation", "Task.Run", "background", "thread"],
|
|
22
|
+
"errorPattern": "A second operation was started|concurrently using the same instance",
|
|
23
|
+
"file": "framework/standards/backend/database/ef-core.md",
|
|
24
|
+
"section": "The Problem: DbContext Concurrency",
|
|
25
|
+
"severity": "critical",
|
|
26
|
+
"scope": "blazor-azure,nextjs-supabase",
|
|
27
|
+
"category": "efcore",
|
|
28
|
+
"cause": "DbContext scoped está sendo usado em operações paralelas/background.",
|
|
29
|
+
"solution": "Usar IDbContextFactory para operações em background"
|
|
30
|
+
},
|
|
31
|
+
{
|
|
32
|
+
"id": "navigation-include-empty",
|
|
33
|
+
"title": "Include() retorna coleção vazia",
|
|
34
|
+
"keywords": ["Include", "HasMany", "navigation", "empty", "vazia", "collection", "ICollection"],
|
|
35
|
+
"errorPattern": "Items\\.Count == 0|collection.*empty|Include.*not working",
|
|
36
|
+
"file": "framework/standards/backend/database/ef-core.md",
|
|
37
|
+
"section": "Navigation Properties - Correct Configuration",
|
|
38
|
+
"severity": "high",
|
|
39
|
+
"scope": "blazor-azure,nextjs-supabase",
|
|
40
|
+
"category": "efcore",
|
|
41
|
+
"cause": "HasMany<T>() sem navigation property causa Include() falhar silenciosamente.",
|
|
42
|
+
"solution": "Usar HasMany(x => x.Property) em vez de HasMany<T>()"
|
|
43
|
+
},
|
|
44
|
+
{
|
|
45
|
+
"id": "azure-identity-conflict",
|
|
46
|
+
"title": "Azure.Identity Version Conflict",
|
|
47
|
+
"keywords": ["Azure.Identity", "NU1605", "downgrade", "version", "conflict", "package"],
|
|
48
|
+
"errorPattern": "NU1605.*Azure\\.Identity|package downgrade.*Azure\\.Identity",
|
|
49
|
+
"file": "framework/standards/infrastructure/azure/azure.md",
|
|
50
|
+
"section": "Package Version Conflicts",
|
|
51
|
+
"severity": "high",
|
|
52
|
+
"scope": "blazor-azure",
|
|
53
|
+
"category": "azure",
|
|
54
|
+
"cause": "Dependências transitivas puxam versões diferentes do Azure.Identity.",
|
|
55
|
+
"solution": "<PackageReference Include=\"Azure.Identity\" Version=\"1.14.2\" />"
|
|
56
|
+
},
|
|
57
|
+
{
|
|
58
|
+
"id": "keyvault-di-fail",
|
|
59
|
+
"title": "Key Vault não carrega em Development",
|
|
60
|
+
"keywords": ["KeyVault", "IsDevelopment", "DI", "secrets", "not registered", "service"],
|
|
61
|
+
"errorPattern": "IBlobStorageService.*not registered|IPaymentService.*not registered|service.*not registered",
|
|
62
|
+
"file": "framework/standards/infrastructure/azure/azure.md",
|
|
63
|
+
"section": "Key Vault Configuration",
|
|
64
|
+
"severity": "critical",
|
|
65
|
+
"scope": "blazor-azure",
|
|
66
|
+
"category": "azure",
|
|
67
|
+
"cause": "Key Vault condicionado ao ambiente (!IsDevelopment) não carrega secrets.",
|
|
68
|
+
"solution": "Não condicionar Key Vault ao ambiente - carregar sempre que URI existir"
|
|
69
|
+
},
|
|
70
|
+
{
|
|
71
|
+
"id": "credential-slow",
|
|
72
|
+
"title": "DefaultAzureCredential lento no container",
|
|
73
|
+
"keywords": ["DefaultAzureCredential", "slow", "timeout", "container", "startup", "30 seconds"],
|
|
74
|
+
"errorPattern": "timeout|30 seconds|startup.*slow|credential.*timeout",
|
|
75
|
+
"file": "framework/standards/infrastructure/azure/azure.md",
|
|
76
|
+
"section": "DefaultAzureCredential Optimization",
|
|
77
|
+
"severity": "medium",
|
|
78
|
+
"scope": "blazor-azure",
|
|
79
|
+
"category": "azure",
|
|
80
|
+
"cause": "DefaultAzureCredential tenta múltiplos métodos de autenticação sequencialmente.",
|
|
81
|
+
"solution": "Desabilitar credenciais não usadas com ExcludeXxxCredential = true"
|
|
82
|
+
},
|
|
83
|
+
{
|
|
84
|
+
"id": "containerapp-not-updating",
|
|
85
|
+
"title": "Container App não atualiza após push",
|
|
86
|
+
"keywords": ["Container App", "revision", "not updating", "old version", "push", "deploy"],
|
|
87
|
+
"errorPattern": "old version|not updating|same image",
|
|
88
|
+
"file": "framework/standards/infrastructure/azure/azure.md",
|
|
89
|
+
"section": "Container App Deployment Issues",
|
|
90
|
+
"severity": "medium",
|
|
91
|
+
"scope": "blazor-azure",
|
|
92
|
+
"category": "azure",
|
|
93
|
+
"cause": "Mesmo digest de imagem não triggera nova revisão.",
|
|
94
|
+
"solution": "Usar DEPLOY_TIMESTAMP=$(date +%s) para forçar nova revisão"
|
|
95
|
+
},
|
|
96
|
+
{
|
|
97
|
+
"id": "migrations-not-applied",
|
|
98
|
+
"title": "Invalid object name - Tabela não existe",
|
|
99
|
+
"keywords": ["Invalid object name", "table", "migration", "not applied", "database"],
|
|
100
|
+
"errorPattern": "Invalid object name|table.*does not exist|object.*not found",
|
|
101
|
+
"file": "framework/standards/backend/database/ef-core.md",
|
|
102
|
+
"section": "Auto-Migration on Startup",
|
|
103
|
+
"severity": "high",
|
|
104
|
+
"scope": "blazor-azure,nextjs-supabase",
|
|
105
|
+
"category": "efcore",
|
|
106
|
+
"cause": "Migrations não foram aplicadas ao banco de dados.",
|
|
107
|
+
"solution": "Rodar dotnet ef database update ou adicionar auto-migration no startup"
|
|
108
|
+
},
|
|
109
|
+
{
|
|
110
|
+
"id": "di-httpcontext",
|
|
111
|
+
"title": "HttpContext null em background thread",
|
|
112
|
+
"keywords": ["HttpContext", "null", "background", "Task.Run", "accessor"],
|
|
113
|
+
"errorPattern": "HttpContext.*null|IHttpContextAccessor.*null",
|
|
114
|
+
"file": "framework/standards/frontend/blazor/pitfalls.md",
|
|
115
|
+
"section": "Dependency Injection Pattern",
|
|
116
|
+
"severity": "critical",
|
|
117
|
+
"scope": "blazor-azure",
|
|
118
|
+
"category": "blazor",
|
|
119
|
+
"cause": "HttpContext não está disponível em threads background.",
|
|
120
|
+
"solution": "Capturar dados do HttpContext antes de iniciar Task.Run"
|
|
121
|
+
},
|
|
122
|
+
{
|
|
123
|
+
"id": "jsruntime-prerender",
|
|
124
|
+
"title": "JSRuntime error during prerendering",
|
|
125
|
+
"keywords": ["JSRuntime", "prerender", "JavaScript", "interop", "OnInitializedAsync"],
|
|
126
|
+
"errorPattern": "JavaScript interop.*prerendering|JSRuntime.*not available",
|
|
127
|
+
"file": "framework/standards/frontend/blazor/pitfalls.md",
|
|
128
|
+
"section": "JSRuntime Lifecycle",
|
|
129
|
+
"severity": "high",
|
|
130
|
+
"scope": "blazor-azure",
|
|
131
|
+
"category": "blazor",
|
|
132
|
+
"cause": "JSRuntime não disponível durante prerendering.",
|
|
133
|
+
"solution": "Usar OnAfterRenderAsync com firstRender check"
|
|
134
|
+
},
|
|
135
|
+
{
|
|
136
|
+
"id": "static-files-404",
|
|
137
|
+
"title": "Static files retornando 404",
|
|
138
|
+
"keywords": ["static files", "wwwroot", "CSS", "JS", "404", "assets"],
|
|
139
|
+
"errorPattern": "static.*404|wwwroot.*not found|css.*404|js.*404",
|
|
140
|
+
"file": "framework/standards/frontend/blazor/pitfalls.md",
|
|
141
|
+
"section": "Static Files",
|
|
142
|
+
"severity": "high",
|
|
143
|
+
"scope": "blazor-azure",
|
|
144
|
+
"category": "blazor",
|
|
145
|
+
"cause": "UseStaticFiles() não configurado ou arquivos não em wwwroot.",
|
|
146
|
+
"solution": "Adicionar app.UseStaticFiles() e verificar caminho dos arquivos"
|
|
147
|
+
},
|
|
148
|
+
{
|
|
149
|
+
"id": "rendermode-mismatch",
|
|
150
|
+
"title": "Componente não renderiza interativamente",
|
|
151
|
+
"keywords": ["RenderMode", "InteractiveServer", "static", "onclick", "not working"],
|
|
152
|
+
"errorPattern": "@onclick.*not working|button.*not responding|interactive.*not working",
|
|
153
|
+
"file": "framework/standards/frontend/blazor/pitfalls.md",
|
|
154
|
+
"section": "RenderModes",
|
|
155
|
+
"severity": "high",
|
|
156
|
+
"scope": "blazor-azure",
|
|
157
|
+
"category": "blazor",
|
|
158
|
+
"cause": "Componente está em modo estático mas precisa de interatividade.",
|
|
159
|
+
"solution": "Adicionar @rendermode InteractiveServer no componente"
|
|
160
|
+
}
|
|
161
|
+
],
|
|
162
|
+
"categories": {
|
|
163
|
+
"blazor": {
|
|
164
|
+
"name": "Blazor Server/WASM",
|
|
165
|
+
"description": "Problemas com componentes Blazor, lifecycle, renderização"
|
|
166
|
+
},
|
|
167
|
+
"efcore": {
|
|
168
|
+
"name": "Entity Framework Core",
|
|
169
|
+
"description": "Problemas com DbContext, migrations, queries"
|
|
170
|
+
},
|
|
171
|
+
"azure": {
|
|
172
|
+
"name": "Azure Infrastructure",
|
|
173
|
+
"description": "Problemas com Azure services, deploy, identity"
|
|
174
|
+
},
|
|
175
|
+
"auth": {
|
|
176
|
+
"name": "Authentication/Authorization",
|
|
177
|
+
"description": "Problemas com login, tokens, claims"
|
|
178
|
+
},
|
|
179
|
+
"deploy": {
|
|
180
|
+
"name": "Deployment/CI-CD",
|
|
181
|
+
"description": "Problemas com build, deploy, pipelines"
|
|
182
|
+
}
|
|
183
|
+
}
|
|
184
|
+
}
|