@polymorphism-tech/morph-spec 3.0.0 → 3.1.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/CLAUDE.md +68 -400
- package/README.md +198 -76
- package/bin/detect-agents.js +227 -225
- package/bin/morph-spec.js +10 -0
- package/bin/render-template.js +303 -302
- package/bin/semantic-detect-agents.js +247 -246
- package/bin/{task-manager.js → task-manager.cjs} +12 -1
- package/bin/validate-agents-skills.js +257 -251
- package/bin/validate-agents.js +70 -69
- package/bin/validate-phase.js +263 -263
- package/docs/getting-started.md +3 -3
- package/package.json +3 -4
- package/scripts/reorganize-skills.cjs +175 -0
- package/scripts/validate-agents-structure.cjs +52 -0
- package/scripts/validate-skills.cjs +180 -0
- package/src/commands/create-story.js +354 -351
- package/src/commands/detect-agents.js +13 -2
- package/src/commands/detect.js +104 -104
- package/src/commands/state.js +334 -333
- package/src/commands/sync.js +167 -167
- package/src/commands/task.js +1 -1
- package/src/commands/update.js +13 -1
- package/src/lib/context-generator.js +7 -4
- package/{detectors → src/lib/detectors}/config-detector.js +223 -223
- package/{detectors → src/lib/detectors}/conversation-analyzer.js +163 -163
- package/{detectors → src/lib/detectors}/index.js +84 -84
- package/{detectors → src/lib/detectors}/standards-generator.js +275 -275
- package/src/lib/hook-executor.js +2 -1
- package/src/lib/stack-resolver.js +148 -0
- package/src/lib/standards-context-injector.js +4 -3
- package/src/lib/state-manager.js +21 -4
- package/src/lib/team-orchestrator.js +2 -1
- package/src/lib/troubleshoot-grep.js +13 -3
- package/src/lib/validation-runner.js +2 -1
- package/src/utils/file-copier.js +3 -1
- package/{content → stacks/blazor-azure}/.azure/README.md +293 -293
- package/{content → stacks/blazor-azure}/.azure/docs/azure-devops-setup.md +454 -454
- package/{content → stacks/blazor-azure}/.azure/docs/branch-strategy.md +398 -398
- package/{content → stacks/blazor-azure}/.azure/docs/local-development.md +515 -515
- package/{content → stacks/blazor-azure}/.azure/pipelines/pipeline-variables.yml +34 -34
- package/{content → stacks/blazor-azure}/.azure/pipelines/prod-pipeline.yml +319 -319
- package/{content → stacks/blazor-azure}/.azure/pipelines/staging-pipeline.yml +234 -234
- package/{content → stacks/blazor-azure}/.azure/pipelines/templates/build-dotnet.yml +75 -75
- package/{content → stacks/blazor-azure}/.azure/pipelines/templates/deploy-app-service.yml +94 -94
- package/{content → stacks/blazor-azure}/.azure/pipelines/templates/deploy-container-app.yml +120 -120
- package/{content → stacks/blazor-azure}/.azure/pipelines/templates/infra-deploy.yml +90 -90
- package/{content → stacks/blazor-azure}/.claude/commands/morph-archive.md +79 -79
- package/{content → stacks/blazor-azure}/.claude/commands/morph-deploy.md +529 -529
- package/{content → stacks/blazor-azure}/.claude/commands/morph-infra.md +209 -209
- package/{content → stacks/blazor-azure}/.claude/commands/morph-troubleshoot.md +1 -1
- package/{content → stacks/blazor-azure}/.claude/settings.local.json +15 -15
- package/{content → stacks/blazor-azure}/.claude/skills/level-1-workflows/phase-setup.md +1 -1
- package/{content/.claude/skills/specialists → stacks/blazor-azure/.claude/skills/level-2-domains/architecture}/prompt-engineer.md +189 -189
- package/{content/.claude/skills/specialists → stacks/blazor-azure/.claude/skills/level-2-domains/architecture}/seo-growth-hacker.md +320 -320
- package/{content/.claude/skills/infra → stacks/blazor-azure/.claude/skills/level-2-domains/infrastructure}/azure-deploy-specialist.md +699 -699
- package/{content → stacks/blazor-azure}/.morph/.morphversion +5 -5
- package/{content → stacks/blazor-azure}/.morph/archive/.gitkeep +25 -25
- package/{content → stacks/blazor-azure}/.morph/config/agents.json +7 -5
- package/{content → stacks/blazor-azure}/.morph/docs/STORY-DRIVEN-DEVELOPMENT.md +392 -392
- package/{content → stacks/blazor-azure}/.morph/docs/workflows/enforcement-pipeline.md +3 -3
- package/{content → stacks/blazor-azure}/.morph/examples/api-nextjs/README.md +241 -241
- package/{content → stacks/blazor-azure}/.morph/examples/api-nextjs/contracts.ts +307 -307
- package/{content → stacks/blazor-azure}/.morph/examples/api-nextjs/spec.md +399 -399
- package/{content → stacks/blazor-azure}/.morph/examples/api-nextjs/tasks.md +168 -168
- package/{content → stacks/blazor-azure}/.morph/examples/micro-saas/README.md +125 -125
- package/{content → stacks/blazor-azure}/.morph/examples/micro-saas/contracts.cs +358 -358
- package/{content → stacks/blazor-azure}/.morph/examples/micro-saas/decisions.md +246 -246
- package/{content → stacks/blazor-azure}/.morph/examples/micro-saas/spec.md +236 -236
- package/{content → stacks/blazor-azure}/.morph/examples/micro-saas/tasks.md +150 -150
- package/{content → stacks/blazor-azure}/.morph/examples/multi-agent/README.md +309 -309
- package/{content → stacks/blazor-azure}/.morph/examples/multi-agent/contracts.cs +433 -433
- package/{content → stacks/blazor-azure}/.morph/examples/multi-agent/spec.md +479 -479
- package/{content → stacks/blazor-azure}/.morph/examples/multi-agent/tasks.md +185 -185
- package/{content → stacks/blazor-azure}/.morph/examples/state-v3.json +188 -188
- package/{content → stacks/blazor-azure}/.morph/features/.gitkeep +25 -25
- package/{content → stacks/blazor-azure}/.morph/hooks/README.md +12 -12
- package/{content → stacks/blazor-azure}/.morph/hooks/pre-commit-all.sh +48 -48
- package/{content → stacks/blazor-azure}/.morph/hooks/pre-commit-specs.sh +49 -49
- package/{content → stacks/blazor-azure}/.morph/hooks/pre-commit-tests.sh +60 -60
- package/{content → stacks/blazor-azure}/.morph/project.md +160 -160
- package/{content → stacks/blazor-azure}/.morph/schemas/agent.schema.json +296 -296
- package/{content → stacks/blazor-azure}/.morph/specs/.gitkeep +20 -20
- package/{content → stacks/blazor-azure}/.morph/standards/agent-teams-workflow.md +2 -2
- package/{content → stacks/blazor-azure}/.morph/standards/coding.md +377 -377
- package/{content → stacks/blazor-azure}/.morph/standards/fluent-ui-setup.md +590 -590
- package/{content → stacks/blazor-azure}/.morph/standards/migration-guide.md +514 -514
- package/{content → stacks/blazor-azure}/.morph/standards/passkeys-auth.md +423 -423
- package/{content → stacks/blazor-azure}/.morph/standards/vector-search-rag.md +536 -536
- package/{content → stacks/blazor-azure}/.morph/state.json +17 -17
- package/{content → stacks/blazor-azure}/.morph/templates/FluentDesignTheme.cs +149 -149
- package/{content → stacks/blazor-azure}/.morph/templates/MudTheme.cs +281 -281
- package/{content → stacks/blazor-azure}/.morph/templates/component.razor +239 -239
- package/{content → stacks/blazor-azure}/.morph/templates/contracts.cs +217 -217
- package/{content → stacks/blazor-azure}/.morph/templates/design-system.css +226 -226
- package/{content → stacks/blazor-azure}/.morph/templates/infra/.dockerignore.example +89 -89
- package/{content → stacks/blazor-azure}/.morph/templates/infra/Dockerfile.example +82 -82
- package/{content → stacks/blazor-azure}/.morph/templates/infra/README.md +286 -286
- package/{content → stacks/blazor-azure}/.morph/templates/infra/app-insights.bicep +63 -63
- package/{content → stacks/blazor-azure}/.morph/templates/infra/app-service.bicep +164 -164
- package/{content → stacks/blazor-azure}/.morph/templates/infra/azure-pipelines-deploy.yml +480 -480
- package/{content → stacks/blazor-azure}/.morph/templates/infra/container-app-env.bicep +49 -49
- package/{content → stacks/blazor-azure}/.morph/templates/infra/container-app.bicep +156 -156
- package/{content → stacks/blazor-azure}/.morph/templates/infra/deploy.ps1 +229 -229
- package/{content → stacks/blazor-azure}/.morph/templates/infra/deploy.sh +208 -208
- package/{content → stacks/blazor-azure}/.morph/templates/infra/key-vault.bicep +91 -91
- package/{content → stacks/blazor-azure}/.morph/templates/infra/main.bicep +189 -189
- package/{content → stacks/blazor-azure}/.morph/templates/infra/parameters.dev.json +29 -29
- package/{content → stacks/blazor-azure}/.morph/templates/infra/parameters.prod.json +29 -29
- package/{content → stacks/blazor-azure}/.morph/templates/infra/parameters.staging.json +29 -29
- package/{content → stacks/blazor-azure}/.morph/templates/infra/sql-database.bicep +103 -103
- package/{content → stacks/blazor-azure}/.morph/templates/infra/storage.bicep +106 -106
- package/{content → stacks/blazor-azure}/.morph/templates/integrations/asaas-client.cs +387 -387
- package/{content → stacks/blazor-azure}/.morph/templates/integrations/asaas-webhook.cs +351 -351
- package/{content → stacks/blazor-azure}/.morph/templates/integrations/azure-identity-config.cs +288 -288
- package/{content → stacks/blazor-azure}/.morph/templates/integrations/clerk-config.cs +258 -258
- package/{content → stacks/blazor-azure}/.morph/templates/job.cs +171 -171
- package/{content → stacks/blazor-azure}/.morph/templates/migration.cs +83 -83
- package/{content → stacks/blazor-azure}/.morph/templates/repository.cs +141 -141
- package/{content → stacks/blazor-azure}/.morph/templates/saas/subscription.cs +347 -347
- package/{content → stacks/blazor-azure}/.morph/templates/saas/tenant.cs +338 -338
- package/{content → stacks/blazor-azure}/.morph/templates/service.cs +139 -139
- package/{content → stacks/blazor-azure}/.morph/templates/sprint-status.yaml +68 -68
- package/{content → stacks/blazor-azure}/.morph/templates/story.md +143 -143
- package/{content → stacks/blazor-azure}/.morph/templates/test.cs +239 -239
- package/{content → stacks/blazor-azure}/.morph/templates/ui-design-system.md +286 -286
- package/{content → stacks/blazor-azure}/.morph/templates/ui-flows.md +336 -336
- package/{content → stacks/blazor-azure}/.morph/templates/ui-mockups.md +133 -133
- package/{content → stacks/blazor-azure}/.morph/test-infra/example.bicep +59 -59
- package/{content → stacks/blazor-azure}/README.md +79 -79
- package/stacks/nextjs-supabase/.claude/skills/level-2-domains/backend/dotnet-supabase.md +244 -0
- package/stacks/nextjs-supabase/.claude/skills/level-2-domains/frontend/nextjs-supabase.md +335 -0
- package/stacks/nextjs-supabase/.claude/skills/level-2-domains/infrastructure/easypanel-deployer.md +189 -0
- package/stacks/nextjs-supabase/.claude/skills/level-2-domains/integrations/supabase-expert.md +170 -0
- package/stacks/nextjs-supabase/.morph/config/agents.json +345 -0
- package/stacks/nextjs-supabase/.morph/config/config.template.json +92 -0
- package/stacks/nextjs-supabase/.morph/docs/easypanel-setup.md +169 -0
- package/stacks/nextjs-supabase/.morph/docs/supabase-mcp-setup.md +247 -0
- package/stacks/nextjs-supabase/.morph/examples/crud-nextjs-supabase/README.md +697 -0
- package/stacks/nextjs-supabase/.morph/examples/crud-nextjs-supabase/spec.md +85 -0
- package/stacks/nextjs-supabase/.morph/examples/crud-nextjs-supabase/tasks.md +86 -0
- package/stacks/nextjs-supabase/.morph/examples/saas-nextjs-supabase/README.md +498 -0
- package/stacks/nextjs-supabase/.morph/examples/saas-nextjs-supabase/decisions.md +121 -0
- package/stacks/nextjs-supabase/.morph/examples/saas-nextjs-supabase/spec.md +138 -0
- package/stacks/nextjs-supabase/.morph/examples/saas-nextjs-supabase/tasks.md +162 -0
- package/stacks/nextjs-supabase/.morph/project.md +168 -0
- package/stacks/nextjs-supabase/.morph/standards/easypanel-deploy.md +191 -0
- package/stacks/nextjs-supabase/.morph/standards/nextjs-patterns.md +193 -0
- package/stacks/nextjs-supabase/.morph/standards/supabase-auth.md +171 -0
- package/stacks/nextjs-supabase/.morph/standards/supabase-pgvector.md +164 -0
- package/stacks/nextjs-supabase/.morph/standards/supabase-rls.md +179 -0
- package/stacks/nextjs-supabase/.morph/standards/supabase-storage.md +148 -0
- package/stacks/nextjs-supabase/.morph/templates/contracts.cs +173 -0
- package/stacks/nextjs-supabase/.morph/templates/contracts.ts +168 -0
- package/stacks/nextjs-supabase/.morph/templates/decisions.md +115 -0
- package/stacks/nextjs-supabase/.morph/templates/dockerfile-api.dockerfile +38 -0
- package/stacks/nextjs-supabase/.morph/templates/dockerfile-web.dockerfile +48 -0
- package/stacks/nextjs-supabase/.morph/templates/proposal.md +145 -0
- package/stacks/nextjs-supabase/.morph/templates/recap.md +134 -0
- package/stacks/nextjs-supabase/.morph/templates/rls-policy.sql +57 -0
- package/stacks/nextjs-supabase/.morph/templates/spec.md +231 -0
- package/stacks/nextjs-supabase/.morph/templates/supabase-migration.sql +100 -0
- package/stacks/nextjs-supabase/.morph/templates/tasks.md +257 -0
- package/stacks/nextjs-supabase/CLAUDE.md +149 -0
- package/stacks/nextjs-supabase/README.md +112 -0
- /package/{detectors → src/lib/detectors}/structure-detector.js +0 -0
- /package/{content → stacks/blazor-azure}/.claude/commands/morph-apply.md +0 -0
- /package/{content → stacks/blazor-azure}/.claude/commands/morph-preflight.md +0 -0
- /package/{content → stacks/blazor-azure}/.claude/commands/morph-proposal.md +0 -0
- /package/{content → stacks/blazor-azure}/.claude/commands/morph-status.md +0 -0
- /package/{content → stacks/blazor-azure}/.claude/skills/level-0-meta/README.md +0 -0
- /package/{content → stacks/blazor-azure}/.claude/skills/level-0-meta/code-review.md +0 -0
- /package/{content → stacks/blazor-azure}/.claude/skills/level-0-meta/morph-checklist.md +0 -0
- /package/{content → stacks/blazor-azure}/.claude/skills/level-0-meta/simulation-checklist.md +0 -0
- /package/{content → stacks/blazor-azure}/.claude/skills/level-1-workflows/README.md +0 -0
- /package/{content → stacks/blazor-azure}/.claude/skills/level-1-workflows/morph-replicate.md +0 -0
- /package/{content → stacks/blazor-azure}/.claude/skills/level-1-workflows/phase-clarify.md +0 -0
- /package/{content → stacks/blazor-azure}/.claude/skills/level-1-workflows/phase-design.md +0 -0
- /package/{content → stacks/blazor-azure}/.claude/skills/level-1-workflows/phase-tasks.md +0 -0
- /package/{content → stacks/blazor-azure}/.claude/skills/level-1-workflows/phase-uiux.md +0 -0
- /package/{content → stacks/blazor-azure}/.claude/skills/level-2-domains/README.md +0 -0
- /package/{content → stacks/blazor-azure}/.claude/skills/level-2-domains/ai-agents/ai-system-architect.md +0 -0
- /package/{content → stacks/blazor-azure}/.claude/skills/level-2-domains/architecture/po-pm-advisor.md +0 -0
- /package/{content → stacks/blazor-azure}/.claude/skills/level-2-domains/architecture/standards-architect.md +0 -0
- /package/{content → stacks/blazor-azure}/.claude/skills/level-2-domains/backend/dotnet-senior.md +0 -0
- /package/{content → stacks/blazor-azure}/.claude/skills/level-2-domains/backend/ef-modeler.md +0 -0
- /package/{content → stacks/blazor-azure}/.claude/skills/level-2-domains/backend/hangfire-orchestrator.md +0 -0
- /package/{content → stacks/blazor-azure}/.claude/skills/level-2-domains/backend/ms-agent-expert.md +0 -0
- /package/{content → stacks/blazor-azure}/.claude/skills/level-2-domains/frontend/blazor-builder.md +0 -0
- /package/{content → stacks/blazor-azure}/.claude/skills/level-2-domains/frontend/nextjs-expert.md +0 -0
- /package/{content → stacks/blazor-azure}/.claude/skills/level-2-domains/frontend/ui-ux-designer.md +0 -0
- /package/{content → stacks/blazor-azure}/.claude/skills/level-2-domains/infrastructure/azure-architect.md +0 -0
- /package/{content → stacks/blazor-azure}/.claude/skills/level-2-domains/infrastructure/bicep-architect.md +0 -0
- /package/{content → stacks/blazor-azure}/.claude/skills/level-2-domains/infrastructure/container-specialist.md +0 -0
- /package/{content → stacks/blazor-azure}/.claude/skills/level-2-domains/infrastructure/devops-engineer.md +0 -0
- /package/{content → stacks/blazor-azure}/.claude/skills/level-2-domains/integrations/asaas-financial.md +0 -0
- /package/{content → stacks/blazor-azure}/.claude/skills/level-2-domains/integrations/azure-identity.md +0 -0
- /package/{content → stacks/blazor-azure}/.claude/skills/level-2-domains/integrations/clerk-auth.md +0 -0
- /package/{content → stacks/blazor-azure}/.claude/skills/level-2-domains/integrations/resend-email.md +0 -0
- /package/{content → stacks/blazor-azure}/.claude/skills/level-2-domains/quality/code-analyzer.md +0 -0
- /package/{content → stacks/blazor-azure}/.claude/skills/level-2-domains/quality/testing-specialist.md +0 -0
- /package/{content → stacks/blazor-azure}/.claude/skills/level-3-technologies/README.md +0 -0
- /package/{content → stacks/blazor-azure}/.claude/skills/level-4-patterns/README.md +0 -0
- /package/{content → stacks/blazor-azure}/.morph/config/config.template.json +0 -0
- /package/{content → stacks/blazor-azure}/.morph/docs/workflows/design-impl.md +0 -0
- /package/{content → stacks/blazor-azure}/.morph/docs/workflows/fast-track.md +0 -0
- /package/{content → stacks/blazor-azure}/.morph/docs/workflows/full-morph.md +0 -0
- /package/{content → stacks/blazor-azure}/.morph/docs/workflows/standard.md +0 -0
- /package/{content → stacks/blazor-azure}/.morph/docs/workflows/ui-refresh.md +0 -0
- /package/{content → stacks/blazor-azure}/.morph/examples/scheduled-reports/decisions.md +0 -0
- /package/{content → stacks/blazor-azure}/.morph/examples/scheduled-reports/proposal.md +0 -0
- /package/{content → stacks/blazor-azure}/.morph/examples/scheduled-reports/spec.md +0 -0
- /package/{content → stacks/blazor-azure}/.morph/hooks/pre-commit-agents.sh +0 -0
- /package/{content → stacks/blazor-azure}/.morph/hooks/task-completed.js +0 -0
- /package/{content → stacks/blazor-azure}/.morph/hooks/teammate-idle.js +0 -0
- /package/{content → stacks/blazor-azure}/.morph/schemas/tasks.schema.json +0 -0
- /package/{content → stacks/blazor-azure}/.morph/standards/agent-framework-blazor-ui.md +0 -0
- /package/{content → stacks/blazor-azure}/.morph/standards/agent-framework-production.md +0 -0
- /package/{content → stacks/blazor-azure}/.morph/standards/agent-framework-setup.md +0 -0
- /package/{content → stacks/blazor-azure}/.morph/standards/agent-framework-workflows.md +0 -0
- /package/{content → stacks/blazor-azure}/.morph/standards/architecture.md +0 -0
- /package/{content → stacks/blazor-azure}/.morph/standards/azure.md +0 -0
- /package/{content → stacks/blazor-azure}/.morph/standards/dotnet10-migration.md +0 -0
- /package/{content → stacks/blazor-azure}/.morph/templates/CONTEXT-FEATURE.md +0 -0
- /package/{content → stacks/blazor-azure}/.morph/templates/CONTEXT.md +0 -0
- /package/{content → stacks/blazor-azure}/.morph/templates/agent.cs +0 -0
- /package/{content → stacks/blazor-azure}/.morph/templates/clarify-questions.md +0 -0
- /package/{content → stacks/blazor-azure}/.morph/templates/contracts/Commands.cs +0 -0
- /package/{content → stacks/blazor-azure}/.morph/templates/contracts/Entities.cs +0 -0
- /package/{content → stacks/blazor-azure}/.morph/templates/contracts/Queries.cs +0 -0
- /package/{content → stacks/blazor-azure}/.morph/templates/contracts/README.md +0 -0
- /package/{content → stacks/blazor-azure}/.morph/templates/decisions.md +0 -0
- /package/{content → stacks/blazor-azure}/.morph/templates/infra/deploy-checklist.md +0 -0
- /package/{content → stacks/blazor-azure}/.morph/templates/proposal.md +0 -0
- /package/{content → stacks/blazor-azure}/.morph/templates/recap.md +0 -0
- /package/{content → stacks/blazor-azure}/.morph/templates/simulation.md +0 -0
- /package/{content → stacks/blazor-azure}/.morph/templates/spec.md +0 -0
- /package/{content → stacks/blazor-azure}/.morph/templates/state.template.json +0 -0
- /package/{content → stacks/blazor-azure}/.morph/templates/tasks.md +0 -0
- /package/{content → stacks/blazor-azure}/.morph/templates/ui-components.md +0 -0
- /package/{content → stacks/blazor-azure}/CLAUDE.md +0 -0
package/docs/getting-started.md
CHANGED
|
@@ -15,9 +15,9 @@
|
|
|
15
15
|
git clone https://github.com/polymorphism-tech/morph-framework.git
|
|
16
16
|
|
|
17
17
|
# Copie o conteúdo para seu projeto
|
|
18
|
-
cp -r morph-framework/
|
|
19
|
-
cp -r morph-framework/
|
|
20
|
-
cp morph-framework/
|
|
18
|
+
cp -r morph-framework/stacks/blazor-azure/.morph /seu/projeto/
|
|
19
|
+
cp -r morph-framework/stacks/blazor-azure/.claude /seu/projeto/
|
|
20
|
+
cp morph-framework/stacks/blazor-azure/CLAUDE.md /seu/projeto/
|
|
21
21
|
```
|
|
22
22
|
|
|
23
23
|
### 2. Configurar
|
package/package.json
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@polymorphism-tech/morph-spec",
|
|
3
|
-
"version": "3.
|
|
4
|
-
"description": "MORPH-SPEC
|
|
3
|
+
"version": "3.1.0",
|
|
4
|
+
"description": "MORPH-SPEC v3: AI-First development framework with validation pipeline, .NET 10, Microsoft Agent Framework, and Fluent UI Blazor",
|
|
5
5
|
"keywords": [
|
|
6
6
|
"claude-code",
|
|
7
7
|
"claude",
|
|
@@ -27,8 +27,7 @@
|
|
|
27
27
|
"bin/",
|
|
28
28
|
"src/",
|
|
29
29
|
"scripts/",
|
|
30
|
-
"
|
|
31
|
-
"content/",
|
|
30
|
+
"stacks/",
|
|
32
31
|
"docs/",
|
|
33
32
|
"README.md",
|
|
34
33
|
"LICENSE",
|
|
@@ -0,0 +1,175 @@
|
|
|
1
|
+
const fs = require('fs');
|
|
2
|
+
const path = require('path');
|
|
3
|
+
|
|
4
|
+
// Define new 5-level structure with mapping
|
|
5
|
+
const skillMapping = {
|
|
6
|
+
// Level 0: Meta-Skills (user-facing, high-level orchestration)
|
|
7
|
+
'level-0-meta': [
|
|
8
|
+
'checklists/morph-checklist.md',
|
|
9
|
+
'checklists/simulation-checklist.md',
|
|
10
|
+
'checklists/code-review.md'
|
|
11
|
+
],
|
|
12
|
+
|
|
13
|
+
// Level 1: Workflows (phase orchestration)
|
|
14
|
+
'level-1-workflows': [
|
|
15
|
+
'workflows/phase-setup.md',
|
|
16
|
+
'workflows/phase-uiux.md',
|
|
17
|
+
'workflows/phase-design.md',
|
|
18
|
+
'workflows/phase-clarify.md',
|
|
19
|
+
'workflows/phase-tasks.md',
|
|
20
|
+
'workflows/morph-replicate.md'
|
|
21
|
+
],
|
|
22
|
+
|
|
23
|
+
// Level 2: Domains (domain expertise - maps to squads)
|
|
24
|
+
'level-2-domains/backend': [
|
|
25
|
+
'specialists/dotnet-senior.md',
|
|
26
|
+
'specialists/ef-modeler.md',
|
|
27
|
+
'specialists/hangfire-orchestrator.md',
|
|
28
|
+
'specialists/ms-agent-expert.md'
|
|
29
|
+
],
|
|
30
|
+
'level-2-domains/frontend': [
|
|
31
|
+
'specialists/ui-ux-designer.md',
|
|
32
|
+
'stacks/dotnet-blazor.md',
|
|
33
|
+
'stacks/dotnet-nextjs.md'
|
|
34
|
+
],
|
|
35
|
+
'level-2-domains/infrastructure': [
|
|
36
|
+
'specialists/azure-architect.md',
|
|
37
|
+
'infra/bicep-architect.md',
|
|
38
|
+
'infra/devops-engineer.md',
|
|
39
|
+
'infra/container-specialist.md'
|
|
40
|
+
],
|
|
41
|
+
'level-2-domains/quality': [
|
|
42
|
+
'specialists/testing-specialist.md',
|
|
43
|
+
'specialists/code-analyzer.md'
|
|
44
|
+
],
|
|
45
|
+
'level-2-domains/ai-agents': [
|
|
46
|
+
'specialists/ai-system-architect.md'
|
|
47
|
+
],
|
|
48
|
+
'level-2-domains/integrations': [
|
|
49
|
+
'integrations/asaas-financial.md',
|
|
50
|
+
'integrations/clerk-auth.md',
|
|
51
|
+
'integrations/azure-identity.md',
|
|
52
|
+
'integrations/resend-email.md'
|
|
53
|
+
],
|
|
54
|
+
'level-2-domains/architecture': [
|
|
55
|
+
'specialists/standards-architect.md',
|
|
56
|
+
'specialists/po-pm-advisor.md'
|
|
57
|
+
],
|
|
58
|
+
|
|
59
|
+
// Level 3: Technologies (empty for now, will populate in Phase 8/9)
|
|
60
|
+
'level-3-technologies': [],
|
|
61
|
+
|
|
62
|
+
// Level 4: Patterns (empty for now, will populate later)
|
|
63
|
+
'level-4-patterns': []
|
|
64
|
+
};
|
|
65
|
+
|
|
66
|
+
const baseDir = 'stacks/blazor-azure/.claude/skills';
|
|
67
|
+
|
|
68
|
+
// Create new directory structure
|
|
69
|
+
console.log('📁 Creating new 5-level directory structure...\n');
|
|
70
|
+
Object.keys(skillMapping).forEach(dir => {
|
|
71
|
+
const fullPath = path.join(baseDir, dir);
|
|
72
|
+
if (!fs.existsSync(fullPath)) {
|
|
73
|
+
fs.mkdirSync(fullPath, { recursive: true });
|
|
74
|
+
console.log(` ✅ Created: ${dir}`);
|
|
75
|
+
}
|
|
76
|
+
});
|
|
77
|
+
|
|
78
|
+
console.log('\n📦 Moving skill files...\n');
|
|
79
|
+
|
|
80
|
+
// Move files to new structure
|
|
81
|
+
let movedCount = 0;
|
|
82
|
+
Object.entries(skillMapping).forEach(([targetDir, files]) => {
|
|
83
|
+
files.forEach(relPath => {
|
|
84
|
+
const oldPath = path.join(baseDir, relPath);
|
|
85
|
+
const fileName = path.basename(relPath);
|
|
86
|
+
const newPath = path.join(baseDir, targetDir, fileName);
|
|
87
|
+
|
|
88
|
+
if (fs.existsSync(oldPath)) {
|
|
89
|
+
fs.copyFileSync(oldPath, newPath);
|
|
90
|
+
movedCount++;
|
|
91
|
+
console.log(` ✅ Moved: ${relPath} → ${targetDir}/${fileName}`);
|
|
92
|
+
} else {
|
|
93
|
+
console.log(` ⚠️ Not found: ${relPath}`);
|
|
94
|
+
}
|
|
95
|
+
});
|
|
96
|
+
});
|
|
97
|
+
|
|
98
|
+
console.log(`\n✅ Moved ${movedCount} skill files to new structure`);
|
|
99
|
+
|
|
100
|
+
// Create README files for each level
|
|
101
|
+
const readmes = {
|
|
102
|
+
'level-0-meta/README.md': `# Level 0: Meta-Skills
|
|
103
|
+
|
|
104
|
+
High-level orchestration skills and user-facing commands.
|
|
105
|
+
|
|
106
|
+
**Purpose:** Skills that orchestrate multiple workflows or provide top-level guidance.
|
|
107
|
+
|
|
108
|
+
**Examples:** morph-checklist, simulation-checklist, code-review
|
|
109
|
+
`,
|
|
110
|
+
|
|
111
|
+
'level-1-workflows/README.md': `# Level 1: Workflows
|
|
112
|
+
|
|
113
|
+
Phase orchestration and workflow management.
|
|
114
|
+
|
|
115
|
+
**Purpose:** Skills that implement MORPH workflow phases (FASE 0-6).
|
|
116
|
+
|
|
117
|
+
**Examples:** phase-setup, phase-design, phase-uiux
|
|
118
|
+
`,
|
|
119
|
+
|
|
120
|
+
'level-2-domains/README.md': `# Level 2: Domains
|
|
121
|
+
|
|
122
|
+
Domain expertise skills organized by squad.
|
|
123
|
+
|
|
124
|
+
**Purpose:** Skills that provide deep domain knowledge (backend, frontend, infra, quality, ai-agents, integrations).
|
|
125
|
+
|
|
126
|
+
**Squads:**
|
|
127
|
+
- backend/ - Backend Squad (led by dotnet-senior)
|
|
128
|
+
- frontend/ - Frontend Squad (led by ui-designer)
|
|
129
|
+
- infrastructure/ - Infrastructure Squad (led by azure-architect)
|
|
130
|
+
- quality/ - Quality Squad (coordinated by standards-architect)
|
|
131
|
+
- ai-agents/ - AI/Agent specialists
|
|
132
|
+
- integrations/ - External integration specialists
|
|
133
|
+
- architecture/ - Architecture and planning
|
|
134
|
+
`,
|
|
135
|
+
|
|
136
|
+
'level-3-technologies/README.md': `# Level 3: Technologies
|
|
137
|
+
|
|
138
|
+
Technology-specific implementation patterns.
|
|
139
|
+
|
|
140
|
+
**Purpose:** Skills for specific technologies (EF Core, Blazor, Hangfire, SignalR, etc.).
|
|
141
|
+
|
|
142
|
+
**To be populated in Phase 8/9.**
|
|
143
|
+
`,
|
|
144
|
+
|
|
145
|
+
'level-4-patterns/README.md': `# Level 4: Patterns
|
|
146
|
+
|
|
147
|
+
Architectural and design patterns.
|
|
148
|
+
|
|
149
|
+
**Purpose:** Skills for specific patterns (CQRS, Event Sourcing, DDD, Repository, etc.).
|
|
150
|
+
|
|
151
|
+
**To be populated later.**
|
|
152
|
+
`
|
|
153
|
+
};
|
|
154
|
+
|
|
155
|
+
console.log('\n📝 Creating README files...\n');
|
|
156
|
+
Object.entries(readmes).forEach(([file, content]) => {
|
|
157
|
+
const fullPath = path.join(baseDir, file);
|
|
158
|
+
fs.writeFileSync(fullPath, content, 'utf8');
|
|
159
|
+
console.log(` ✅ Created: ${file}`);
|
|
160
|
+
});
|
|
161
|
+
|
|
162
|
+
console.log('\n✅ Phase 0, Day 2: Skill reorganization COMPLETE');
|
|
163
|
+
console.log('\nNew structure:');
|
|
164
|
+
console.log(' level-0-meta/ (3 files)');
|
|
165
|
+
console.log(' level-1-workflows/ (6 files)');
|
|
166
|
+
console.log(' level-2-domains/ (7 subdirs, 20 files)');
|
|
167
|
+
console.log(' ├── backend/ (4 files)');
|
|
168
|
+
console.log(' ├── frontend/ (3 files)');
|
|
169
|
+
console.log(' ├── infrastructure/ (4 files)');
|
|
170
|
+
console.log(' ├── quality/ (2 files)');
|
|
171
|
+
console.log(' ├── ai-agents/ (1 file)');
|
|
172
|
+
console.log(' ├── integrations/ (4 files)');
|
|
173
|
+
console.log(' └── architecture/ (2 files)');
|
|
174
|
+
console.log(' level-3-technologies/ (empty - Phase 8/9)');
|
|
175
|
+
console.log(' level-4-patterns/ (empty - later)');
|
|
@@ -0,0 +1,52 @@
|
|
|
1
|
+
const fs = require('fs');
|
|
2
|
+
|
|
3
|
+
const agents = JSON.parse(fs.readFileSync('stacks/blazor-azure/.morph/config/agents.json', 'utf8'));
|
|
4
|
+
|
|
5
|
+
console.log('✅ Version:', agents.version);
|
|
6
|
+
console.log('✅ Total agents:', Object.keys(agents.agents || {}).length);
|
|
7
|
+
console.log('✅ Tiers breakdown:', JSON.stringify(agents.tiers, null, 2));
|
|
8
|
+
|
|
9
|
+
// Validate each agent has required fields
|
|
10
|
+
const requiredFields = ['tier', 'role', 'title', 'domains', 'keywords', 'always_active', 'validators', 'relationships', 'standards'];
|
|
11
|
+
const missing = [];
|
|
12
|
+
|
|
13
|
+
Object.entries(agents.agents || {}).forEach(([id, agent]) => {
|
|
14
|
+
if (id.startsWith('_comment')) return; // Skip comment entries
|
|
15
|
+
|
|
16
|
+
const agentMissing = requiredFields.filter(field => !(field in agent));
|
|
17
|
+
if (agentMissing.length > 0) {
|
|
18
|
+
missing.push({ id, missing: agentMissing });
|
|
19
|
+
}
|
|
20
|
+
|
|
21
|
+
// Validate relationships object
|
|
22
|
+
if (agent.relationships) {
|
|
23
|
+
const reqRelFields = ['reports_to', 'team_role'];
|
|
24
|
+
const relMissing = reqRelFields.filter(field => !(field in agent.relationships));
|
|
25
|
+
if (relMissing.length > 0) {
|
|
26
|
+
missing.push({ id, missing: relMissing.map(f => `relationships.${f}`) });
|
|
27
|
+
}
|
|
28
|
+
}
|
|
29
|
+
});
|
|
30
|
+
|
|
31
|
+
if (missing.length === 0) {
|
|
32
|
+
console.log('✅ All agents have required fields');
|
|
33
|
+
} else {
|
|
34
|
+
console.log('❌ Agents with missing fields:', missing.length);
|
|
35
|
+
missing.forEach(m => console.log(` - ${m.id}: missing ${m.missing.join(', ')}`));
|
|
36
|
+
}
|
|
37
|
+
|
|
38
|
+
// Count agents by tier
|
|
39
|
+
const tierCounts = { 1: 0, 2: 0, 3: 0, 4: 0 };
|
|
40
|
+
Object.entries(agents.agents || {}).forEach(([id, agent]) => {
|
|
41
|
+
if (!id.startsWith('_comment') && agent.tier) {
|
|
42
|
+
tierCounts[agent.tier]++;
|
|
43
|
+
}
|
|
44
|
+
});
|
|
45
|
+
|
|
46
|
+
console.log('\n✅ Agents per tier:');
|
|
47
|
+
console.log(' Tier 1 (Orchestrators):', tierCounts[1]);
|
|
48
|
+
console.log(' Tier 2 (Domain Leaders):', tierCounts[2]);
|
|
49
|
+
console.log(' Tier 3 (Specialists):', tierCounts[3]);
|
|
50
|
+
console.log(' Tier 4 (Validators):', tierCounts[4]);
|
|
51
|
+
|
|
52
|
+
console.log('\n✅ Phase 0, Day 1: COMPLETE - agents.json validated');
|
|
@@ -0,0 +1,180 @@
|
|
|
1
|
+
const fs = require('fs');
|
|
2
|
+
const path = require('path');
|
|
3
|
+
|
|
4
|
+
const skillsBase = 'stacks/blazor-azure/.claude/skills';
|
|
5
|
+
const agentsPath = 'stacks/blazor-azure/.morph/config/agents.json';
|
|
6
|
+
|
|
7
|
+
console.log('🧪 Validating MORPH 3.0 Skills Structure\n');
|
|
8
|
+
|
|
9
|
+
// Load agents.json
|
|
10
|
+
const agentsConfig = JSON.parse(fs.readFileSync(agentsPath, 'utf8'));
|
|
11
|
+
|
|
12
|
+
// Step 1: Verify 5-level directory structure
|
|
13
|
+
console.log('📁 Step 1: Verify 5-level directory structure');
|
|
14
|
+
const requiredDirs = [
|
|
15
|
+
'level-0-meta',
|
|
16
|
+
'level-1-workflows',
|
|
17
|
+
'level-2-domains',
|
|
18
|
+
'level-3-technologies',
|
|
19
|
+
'level-4-patterns'
|
|
20
|
+
];
|
|
21
|
+
|
|
22
|
+
const missingDirs = [];
|
|
23
|
+
requiredDirs.forEach(dir => {
|
|
24
|
+
const fullPath = path.join(skillsBase, dir);
|
|
25
|
+
if (!fs.existsSync(fullPath)) {
|
|
26
|
+
missingDirs.push(dir);
|
|
27
|
+
} else {
|
|
28
|
+
console.log(` ✅ ${dir}/`);
|
|
29
|
+
}
|
|
30
|
+
});
|
|
31
|
+
|
|
32
|
+
if (missingDirs.length > 0) {
|
|
33
|
+
console.log(` ❌ Missing directories: ${missingDirs.join(', ')}`);
|
|
34
|
+
}
|
|
35
|
+
console.log('');
|
|
36
|
+
|
|
37
|
+
// Step 2: Check level-2-domains subdirectories
|
|
38
|
+
console.log('📂 Step 2: Verify level-2-domains squads');
|
|
39
|
+
const requiredSquads = [
|
|
40
|
+
'backend', 'frontend', 'infrastructure', 'quality',
|
|
41
|
+
'ai-agents', 'integrations', 'architecture'
|
|
42
|
+
];
|
|
43
|
+
|
|
44
|
+
const level2Path = path.join(skillsBase, 'level-2-domains');
|
|
45
|
+
const existingSquads = fs.readdirSync(level2Path)
|
|
46
|
+
.filter(item => {
|
|
47
|
+
const itemPath = path.join(level2Path, item);
|
|
48
|
+
return fs.statSync(itemPath).isDirectory();
|
|
49
|
+
});
|
|
50
|
+
|
|
51
|
+
requiredSquads.forEach(squad => {
|
|
52
|
+
if (existingSquads.includes(squad)) {
|
|
53
|
+
const squadPath = path.join(level2Path, squad);
|
|
54
|
+
const skillCount = fs.readdirSync(squadPath).filter(f => f.endsWith('.md')).length;
|
|
55
|
+
console.log(` ✅ ${squad}/ (${skillCount} skills)`);
|
|
56
|
+
} else {
|
|
57
|
+
console.log(` ❌ Missing: ${squad}/`);
|
|
58
|
+
}
|
|
59
|
+
});
|
|
60
|
+
console.log('');
|
|
61
|
+
|
|
62
|
+
// Step 3: Count all skill files
|
|
63
|
+
console.log('📄 Step 3: Count skill files');
|
|
64
|
+
function countSkills(dir) {
|
|
65
|
+
let count = 0;
|
|
66
|
+
const items = fs.readdirSync(dir);
|
|
67
|
+
items.forEach(item => {
|
|
68
|
+
const fullPath = path.join(dir, item);
|
|
69
|
+
const stat = fs.statSync(fullPath);
|
|
70
|
+
if (stat.isDirectory()) {
|
|
71
|
+
count += countSkills(fullPath);
|
|
72
|
+
} else if (item.endsWith('.md') && item !== 'README.md') {
|
|
73
|
+
count++;
|
|
74
|
+
}
|
|
75
|
+
});
|
|
76
|
+
return count;
|
|
77
|
+
}
|
|
78
|
+
|
|
79
|
+
const totalSkills = countSkills(skillsBase);
|
|
80
|
+
console.log(` ✅ Total skill files: ${totalSkills}`);
|
|
81
|
+
console.log('');
|
|
82
|
+
|
|
83
|
+
// Step 4: Verify no old directories remain
|
|
84
|
+
console.log('🗑️ Step 4: Verify old directories removed');
|
|
85
|
+
const oldDirs = ['specialists', 'stacks', 'integrations', 'infra', 'workflows', 'checklists'];
|
|
86
|
+
const remainingOldDirs = oldDirs.filter(dir => {
|
|
87
|
+
return fs.existsSync(path.join(skillsBase, dir));
|
|
88
|
+
});
|
|
89
|
+
|
|
90
|
+
if (remainingOldDirs.length > 0) {
|
|
91
|
+
console.log(` ❌ Old directories still exist: ${remainingOldDirs.join(', ')}`);
|
|
92
|
+
} else {
|
|
93
|
+
console.log(' ✅ All old directories removed');
|
|
94
|
+
}
|
|
95
|
+
console.log('');
|
|
96
|
+
|
|
97
|
+
// Step 5: Verify agents → skills mapping (sample of key agents)
|
|
98
|
+
console.log('🎯 Step 5: Verify key agents have skills');
|
|
99
|
+
const agentSkillMap = {
|
|
100
|
+
'dotnet-senior': 'level-2-domains/backend/dotnet-senior.md',
|
|
101
|
+
'ef-modeler': 'level-2-domains/backend/ef-modeler.md',
|
|
102
|
+
'hangfire-orchestrator': 'level-2-domains/backend/hangfire-orchestrator.md',
|
|
103
|
+
'ms-agent-expert': 'level-2-domains/backend/ms-agent-expert.md',
|
|
104
|
+
'blazor-builder': 'level-2-domains/frontend/blazor-builder.md',
|
|
105
|
+
'nextjs-expert': 'level-2-domains/frontend/nextjs-expert.md',
|
|
106
|
+
'ui-ux-designer': 'level-2-domains/frontend/ui-ux-designer.md',
|
|
107
|
+
'azure-architect': 'level-2-domains/infrastructure/azure-architect.md',
|
|
108
|
+
'bicep-architect': 'level-2-domains/infrastructure/bicep-architect.md',
|
|
109
|
+
'devops-engineer': 'level-2-domains/infrastructure/devops-engineer.md',
|
|
110
|
+
'container-specialist': 'level-2-domains/infrastructure/container-specialist.md',
|
|
111
|
+
'testing-specialist': 'level-2-domains/quality/testing-specialist.md',
|
|
112
|
+
'code-analyzer': 'level-2-domains/quality/code-analyzer.md',
|
|
113
|
+
'standards-architect': 'level-2-domains/architecture/standards-architect.md',
|
|
114
|
+
'po-pm-advisor': 'level-2-domains/architecture/po-pm-advisor.md',
|
|
115
|
+
'ai-system-architect': 'level-2-domains/ai-agents/ai-system-architect.md',
|
|
116
|
+
'asaas-financial': 'level-2-domains/integrations/asaas-financial.md',
|
|
117
|
+
'clerk-auth': 'level-2-domains/integrations/clerk-auth.md',
|
|
118
|
+
'azure-identity': 'level-2-domains/integrations/azure-identity.md',
|
|
119
|
+
'resend-email': 'level-2-domains/integrations/resend-email.md'
|
|
120
|
+
};
|
|
121
|
+
|
|
122
|
+
let missingSkills = 0;
|
|
123
|
+
Object.entries(agentSkillMap).forEach(([agentId, skillPath]) => {
|
|
124
|
+
const fullPath = path.join(skillsBase, skillPath);
|
|
125
|
+
if (fs.existsSync(fullPath)) {
|
|
126
|
+
console.log(` ✅ ${agentId} → ${skillPath}`);
|
|
127
|
+
} else {
|
|
128
|
+
console.log(` ❌ ${agentId} → ${skillPath} (NOT FOUND)`);
|
|
129
|
+
missingSkills++;
|
|
130
|
+
}
|
|
131
|
+
});
|
|
132
|
+
console.log('');
|
|
133
|
+
|
|
134
|
+
// Step 6: Check skill file quality (headers, structure)
|
|
135
|
+
console.log('📋 Step 6: Check skill file structure');
|
|
136
|
+
let malformedSkills = 0;
|
|
137
|
+
Object.entries(agentSkillMap).forEach(([agentId, skillPath]) => {
|
|
138
|
+
const fullPath = path.join(skillsBase, skillPath);
|
|
139
|
+
if (fs.existsSync(fullPath)) {
|
|
140
|
+
const content = fs.readFileSync(fullPath, 'utf8');
|
|
141
|
+
const lines = content.split('\n');
|
|
142
|
+
|
|
143
|
+
// Check has markdown header (# Title)
|
|
144
|
+
if (!lines[0].startsWith('#')) {
|
|
145
|
+
console.log(` ⚠️ ${agentId}: Missing markdown header`);
|
|
146
|
+
malformedSkills++;
|
|
147
|
+
}
|
|
148
|
+
}
|
|
149
|
+
});
|
|
150
|
+
|
|
151
|
+
if (malformedSkills === 0) {
|
|
152
|
+
console.log(' ✅ All skills have proper structure');
|
|
153
|
+
} else {
|
|
154
|
+
console.log(` ⚠️ ${malformedSkills} skills have structure issues`);
|
|
155
|
+
}
|
|
156
|
+
console.log('');
|
|
157
|
+
|
|
158
|
+
// Final summary
|
|
159
|
+
console.log('='.repeat(60));
|
|
160
|
+
console.log('📊 VALIDATION SUMMARY');
|
|
161
|
+
console.log('='.repeat(60));
|
|
162
|
+
console.log(`✅ 5-level structure: ${missingDirs.length === 0 ? 'PASS' : 'FAIL'}`);
|
|
163
|
+
console.log(`✅ Squad directories: ${requiredSquads.every(s => existingSquads.includes(s)) ? 'PASS' : 'FAIL'}`);
|
|
164
|
+
console.log(`✅ Total skills: ${totalSkills} files`);
|
|
165
|
+
console.log(`✅ Old dirs removed: ${remainingOldDirs.length === 0 ? 'PASS' : 'FAIL'}`);
|
|
166
|
+
console.log(`✅ Agent→skill map: ${missingSkills === 0 ? 'PASS' : 'FAIL'}`);
|
|
167
|
+
console.log(`✅ Skill structure: ${malformedSkills === 0 ? 'PASS' : 'WARN'}`);
|
|
168
|
+
|
|
169
|
+
const allPassed = missingDirs.length === 0 &&
|
|
170
|
+
requiredSquads.every(s => existingSquads.includes(s)) &&
|
|
171
|
+
remainingOldDirs.length === 0 &&
|
|
172
|
+
missingSkills === 0;
|
|
173
|
+
|
|
174
|
+
if (allPassed) {
|
|
175
|
+
console.log('\n🎉 ALL CHECKS PASSED - Skills structure is valid!');
|
|
176
|
+
process.exit(0);
|
|
177
|
+
} else {
|
|
178
|
+
console.log('\n⚠️ SOME CHECKS FAILED - Review issues above');
|
|
179
|
+
process.exit(1);
|
|
180
|
+
}
|