@polymorphism-tech/morph-spec 4.5.0 → 4.7.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 +77 -56
- package/README.md +394 -700
- package/docs/ARCHITECTURE.md +331 -0
- package/docs/CHEATSHEET.md +221 -0
- package/docs/COMMAND-FLOWS.md +368 -0
- package/docs/QUICKSTART.md +212 -0
- package/docs/examples/order-management/contracts.cs +84 -0
- package/docs/examples/order-management/proposal.md +24 -0
- package/docs/examples/order-management/spec.md +162 -0
- package/docs/plans/2026-02-23-ddd-architecture-refactor.md +1153 -0
- package/docs/plans/2026-02-23-ddd-nextsteps.md +682 -0
- package/docs/plans/2026-02-23-infra-architect-refactor.md +437 -0
- package/docs/plans/2026-02-23-nextjs-code-review-design.md +156 -0
- package/docs/plans/2026-02-23-nextjs-code-review-impl.md +1254 -0
- package/docs/plans/2026-02-23-nextjs-standards-design.md +149 -0
- package/docs/plans/2026-02-23-nextjs-standards-impl.md +1846 -0
- package/framework/{skills/level-2-domains → agents}/README.md +14 -14
- package/framework/{skills/level-2-domains → agents}/ai-agents/ai-system-architect.md +1 -4
- package/framework/{skills/level-2-domains → agents}/architecture/po-pm-advisor.md +1 -2
- package/framework/{skills/level-2-domains → agents}/architecture/prompt-engineer.md +1 -2
- package/framework/{skills/level-2-domains → agents}/architecture/seo-growth-hacker.md +1 -2
- package/framework/{skills/level-2-domains → agents}/architecture/standards-architect.md +159 -162
- package/framework/agents/backend/api-designer.md +103 -0
- package/framework/{skills/level-2-domains → agents}/backend/dotnet-senior.md +1 -2
- package/framework/agents/backend/ef-modeler.md +119 -0
- package/framework/{skills/level-2-domains → agents}/backend/hangfire-orchestrator.md +1 -4
- package/framework/{skills/level-2-domains → agents}/backend/ms-agent-expert.md +1 -4
- package/framework/{skills/level-2-domains → agents}/frontend/blazor-builder.md +1 -4
- package/framework/agents/frontend/nextjs-expert.md +118 -0
- package/framework/{skills/level-2-domains → agents}/frontend/ui-ux-designer.md +1 -2
- package/framework/{skills/level-2-domains → agents}/infrastructure/azure-architect.md +147 -148
- package/framework/{skills/level-2-domains → agents}/infrastructure/azure-deploy-specialist.md +1 -2
- package/framework/{skills/level-2-domains → agents}/infrastructure/bicep-architect.md +1 -4
- package/framework/{skills/level-2-domains → agents}/infrastructure/container-specialist.md +1 -4
- package/framework/{skills/level-2-domains → agents}/infrastructure/devops-engineer.md +1 -4
- package/framework/agents/infrastructure/infra-architect.md +45 -0
- package/framework/{skills/level-2-domains → agents}/integrations/asaas-financial.md +1 -4
- package/framework/{skills/level-2-domains → agents}/integrations/azure-identity.md +1 -4
- package/framework/{skills/level-2-domains → agents}/integrations/clerk-auth.md +1 -4
- package/framework/{skills/level-2-domains → agents}/integrations/hangfire-integration.md +1 -2
- package/framework/{skills/level-2-domains → agents}/integrations/resend-email.md +1 -4
- package/framework/{skills/level-2-domains → agents}/quality/code-analyzer.md +1 -4
- package/framework/{skills/level-2-domains → agents}/quality/testing-specialist.md +1 -4
- package/framework/agents.json +1145 -278
- package/framework/hooks/claude-code/statusline.py +384 -85
- package/framework/hooks/shared/phase-utils.js +129 -129
- package/framework/rules/frontend-standards.md +0 -3
- package/framework/rules/nextjs-standards.md +17 -0
- package/framework/skills/README.md +66 -0
- package/framework/skills/level-0-meta/{brainstorming.md → brainstorming/SKILL.md} +3 -1
- package/framework/skills/level-0-meta/brainstorming/references/proposal-example.md +138 -0
- package/framework/skills/level-0-meta/{code-review.md → code-review/SKILL.md} +3 -2
- package/framework/skills/level-0-meta/code-review/references/review-example.md +164 -0
- package/framework/skills/level-0-meta/code-review/scripts/scan-csharp.mjs +121 -0
- package/framework/skills/level-0-meta/code-review-nextjs/SKILL.md +147 -0
- package/framework/skills/level-0-meta/code-review-nextjs/references/review-example-nextjs.md +254 -0
- package/framework/skills/level-0-meta/{morph-checklist.md → morph-checklist/SKILL.md} +2 -5
- package/framework/skills/{level-1-workflows/morph-replicate.md → level-0-meta/morph-replicate/SKILL.md} +6 -7
- package/framework/skills/level-0-meta/{simulation-checklist.md → simulation-checklist/SKILL.md} +3 -6
- package/framework/skills/level-0-meta/{tool-usage-guide.md → tool-usage-guide/SKILL.md} +4 -5
- package/framework/skills/level-0-meta/{verification-before-completion.md → verification-before-completion/SKILL.md} +3 -1
- package/framework/skills/level-0-meta/verification-before-completion/scripts/check-phase-outputs.mjs +110 -0
- package/framework/skills/level-1-workflows/{phase-clarify.md → phase-clarify/SKILL.md} +3 -3
- package/framework/skills/level-1-workflows/phase-clarify/references/clarifications-example.md +117 -0
- package/framework/skills/level-1-workflows/{phase-codebase-analysis.md → phase-codebase-analysis/SKILL.md} +2 -3
- package/framework/skills/level-1-workflows/{phase-design.md → phase-design/SKILL.md} +46 -182
- package/framework/skills/level-1-workflows/phase-design/references/spec-example.md +253 -0
- package/framework/skills/level-1-workflows/{phase-implement.md → phase-implement/SKILL.md} +3 -3
- package/framework/skills/level-1-workflows/phase-implement/references/recap-example.md +132 -0
- package/framework/skills/level-1-workflows/{phase-setup.md → phase-setup/SKILL.md} +2 -3
- package/framework/skills/level-1-workflows/{phase-tasks.md → phase-tasks/SKILL.md} +42 -3
- package/framework/skills/level-1-workflows/phase-tasks/references/tasks-example.md +231 -0
- package/framework/skills/level-1-workflows/phase-tasks/scripts/validate-tasks.mjs +112 -0
- package/framework/skills/level-1-workflows/{phase-uiux.md → phase-uiux/SKILL.md} +2 -3
- package/framework/standards/STANDARDS.json +121 -0
- package/framework/standards/architecture/ddd/bounded-contexts.md +105 -0
- package/framework/standards/architecture/ddd/complexity-levels.md +108 -0
- package/framework/standards/architecture/ddd/ubiquitous-language.md +58 -0
- package/framework/standards/frontend/nextjs/app-router.md +123 -0
- package/framework/standards/frontend/nextjs/components.md +132 -0
- package/framework/standards/frontend/nextjs/data-fetching.md +126 -0
- package/framework/standards/frontend/nextjs/forms.md +128 -0
- package/framework/standards/frontend/nextjs/naming-conventions.md +67 -0
- package/framework/standards/frontend/nextjs/project-structure.md +102 -0
- package/framework/standards/frontend/nextjs/state-management.md +72 -0
- package/framework/standards/frontend/nextjs/testing.md +111 -0
- package/framework/templates/REGISTRY.json +538 -142
- package/framework/templates/code/dotnet/contracts/contracts-level1.cs +69 -0
- package/framework/templates/code/dotnet/contracts/contracts-level2.cs +86 -0
- package/framework/templates/code/dotnet/contracts/contracts-level3.cs +41 -0
- package/framework/templates/docs/spec.md +49 -0
- package/framework/templates/frontend/nextjs/Dockerfile.nextjs.hbs +43 -0
- package/framework/templates/frontend/nextjs/client-component.tsx.hbs +26 -0
- package/framework/templates/frontend/nextjs/env.mjs.hbs +32 -0
- package/framework/templates/frontend/nextjs/feature-form.tsx.hbs +56 -0
- package/framework/templates/frontend/nextjs/page.tsx.hbs +22 -0
- package/framework/templates/frontend/nextjs/tsconfig.json.hbs +26 -0
- package/framework/templates/frontend/nextjs/use-feature.ts.hbs +54 -0
- package/framework/templates/project-structure/dotnet-ddd.md +70 -0
- package/framework/workflows/docs/enforcement-pipeline.md +2 -1
- package/package.json +1 -1
- package/scripts/scan-nextjs.mjs +169 -0
- package/src/commands/project/doctor.js +52 -1
- package/src/commands/project/init.js +19 -65
- package/src/commands/project/update.js +7 -63
- package/src/lib/detectors/claude-config-detector.js +1 -3
- package/src/lib/standards/standards-context-injector.js +5 -0
- package/src/lib/validators/nextjs/index.js +6 -0
- package/src/lib/validators/nextjs/next-component-validator.js +181 -0
- package/src/lib/validators/validation-runner.js +5 -0
- package/src/utils/agents-installer.js +16 -4
- package/src/utils/skills-installer.js +59 -15
- package/.morph/.morphversion +0 -5
- package/.morph/analytics/threads-log.jsonl +0 -44
- package/.morph/config/config.json +0 -8
- package/.morph/context/README.md +0 -17
- package/.morph/framework/agents.json +0 -948
- package/.morph/framework/standards/STANDARDS.json +0 -812
- package/.morph/framework/standards/ai-agents/blazor-ui.md +0 -364
- package/.morph/framework/standards/ai-agents/production.md +0 -415
- package/.morph/framework/standards/ai-agents/setup.md +0 -418
- package/.morph/framework/standards/ai-agents/team-orchestration.md +0 -479
- package/.morph/framework/standards/ai-agents/workflows.md +0 -354
- package/.morph/framework/standards/architecture/ddd/aggregates.md +0 -120
- package/.morph/framework/standards/architecture/ddd/entities.md +0 -99
- package/.morph/framework/standards/architecture/ddd/value-objects.md +0 -124
- package/.morph/framework/standards/backend/api/minimal-api.md +0 -494
- package/.morph/framework/standards/backend/api/rest.md +0 -492
- package/.morph/framework/standards/backend/api/validation.md +0 -88
- package/.morph/framework/standards/backend/authentication/passkeys.md +0 -428
- package/.morph/framework/standards/backend/database/ef-core.md +0 -199
- package/.morph/framework/standards/backend/database/migrations.md +0 -393
- package/.morph/framework/standards/backend/database/postgresql/database.md +0 -352
- package/.morph/framework/standards/backend/database/repository-patterns.md +0 -528
- package/.morph/framework/standards/backend/database/vector-search-rag.md +0 -541
- package/.morph/framework/standards/backend/dotnet/async.md +0 -366
- package/.morph/framework/standards/backend/dotnet/core.md +0 -117
- package/.morph/framework/standards/backend/dotnet/di.md +0 -439
- package/.morph/framework/standards/backend/dotnet/program-cs-checklist.md +0 -92
- package/.morph/framework/standards/backend/integrations/asaas/asaas-api.md +0 -216
- package/.morph/framework/standards/backend/integrations/clerk/clerk-auth.md +0 -290
- package/.morph/framework/standards/backend/integrations/hangfire/hangfire-jobs.md +0 -350
- package/.morph/framework/standards/backend/integrations/resend/resend-email.md +0 -385
- package/.morph/framework/standards/context/analytics.md +0 -96
- package/.morph/framework/standards/context/bundles.md +0 -110
- package/.morph/framework/standards/context/priming.md +0 -78
- package/.morph/framework/standards/core/architecture.md +0 -185
- package/.morph/framework/standards/core/coding.md +0 -214
- package/.morph/framework/standards/core/git-branching-strategy.md +0 -403
- package/.morph/framework/standards/core/git.md +0 -185
- package/.morph/framework/standards/core/testing.md +0 -295
- package/.morph/framework/standards/data/nosql/blob-storage.md +0 -102
- package/.morph/framework/standards/data/nosql/cache/redis.md +0 -97
- package/.morph/framework/standards/data/nosql/cosmos-db.md +0 -118
- package/.morph/framework/standards/data/vector-search/azure-ai-search.md +0 -121
- package/.morph/framework/standards/data/vector-search/rag-chunking.md +0 -104
- package/.morph/framework/standards/frontend/blazor/design-checklist.md +0 -222
- package/.morph/framework/standards/frontend/blazor/fluent-ui-setup.md +0 -595
- package/.morph/framework/standards/frontend/blazor/fluent-ui.md +0 -137
- package/.morph/framework/standards/frontend/blazor/html-conversion.md +0 -184
- package/.morph/framework/standards/frontend/blazor/lifecycle.md +0 -195
- package/.morph/framework/standards/frontend/blazor/pitfalls.md +0 -198
- package/.morph/framework/standards/frontend/blazor/state.md +0 -191
- package/.morph/framework/standards/frontend/design-system/animations.md +0 -151
- package/.morph/framework/standards/frontend/design-system/naming.md +0 -64
- package/.morph/framework/standards/frontend/nextjs/nextjs-patterns.md +0 -198
- package/.morph/framework/standards/infrastructure/azure/azure.md +0 -624
- package/.morph/framework/standards/infrastructure/azure/bicep/bicep-patterns.md +0 -422
- package/.morph/framework/standards/infrastructure/azure/devops/azure-devops-setup.md +0 -516
- package/.morph/framework/standards/infrastructure/azure/devops/local-development.md +0 -520
- package/.morph/framework/standards/infrastructure/azure/services/functions.md +0 -486
- package/.morph/framework/standards/infrastructure/azure/services/service-bus.md +0 -459
- package/.morph/framework/standards/infrastructure/azure/services/storage.md +0 -407
- package/.morph/framework/standards/infrastructure/docker/easypanel-deploy.md +0 -196
- package/.morph/framework/standards/infrastructure/supabase/mcp-setup.md +0 -252
- package/.morph/framework/standards/infrastructure/supabase/supabase-auth.md +0 -176
- package/.morph/framework/standards/infrastructure/supabase/supabase-pgvector.md +0 -169
- package/.morph/framework/standards/infrastructure/supabase/supabase-rls.md +0 -184
- package/.morph/framework/standards/infrastructure/supabase/supabase-storage.md +0 -153
- package/.morph/framework/standards/integration/api/graphql.md +0 -91
- package/.morph/framework/standards/integration/api/grpc.md +0 -114
- package/.morph/framework/standards/integration/api/rest-design.md +0 -95
- package/.morph/framework/standards/integration/event-driven/cqrs.md +0 -101
- package/.morph/framework/standards/integration/event-driven/event-sourcing.md +0 -124
- package/.morph/framework/standards/integration/event-driven/service-bus.md +0 -95
- package/.morph/framework/standards/integration/mcp/mcp-tools.md +0 -384
- package/.morph/framework/standards/observability/logging.md +0 -131
- package/.morph/framework/standards/observability/metrics.md +0 -121
- package/.morph/framework/standards/observability/monitoring.md +0 -114
- package/.morph/framework/standards/observability/tracing.md +0 -132
- package/.morph/framework/standards/workflows/parallel-execution.md +0 -112
- package/.morph/framework/standards/workflows/thread-management.md +0 -113
- package/.morph/framework/templates/.idea/morph-templates.xml +0 -92
- package/.morph/framework/templates/.vscode/morph-templates.code-snippets +0 -186
- package/.morph/framework/templates/IDE-SNIPPETS.md +0 -266
- package/.morph/framework/templates/README.md +0 -814
- package/.morph/framework/templates/REGISTRY.json +0 -1492
- package/.morph/framework/templates/code/dotnet/backend/repository.cs +0 -141
- package/.morph/framework/templates/code/dotnet/backend/service.cs +0 -139
- package/.morph/framework/templates/code/dotnet/contracts/Commands.cs +0 -74
- package/.morph/framework/templates/code/dotnet/contracts/Entities.cs +0 -25
- package/.morph/framework/templates/code/dotnet/contracts/Queries.cs +0 -74
- package/.morph/framework/templates/code/dotnet/contracts/README.md +0 -74
- package/.morph/framework/templates/code/dotnet/contracts/api-contracts.cs +0 -173
- package/.morph/framework/templates/code/dotnet/contracts/contracts.cs +0 -217
- package/.morph/framework/templates/code/dotnet/contracts/contracts.cs.hbs +0 -172
- package/.morph/framework/templates/code/dotnet/database/migration.cs +0 -83
- package/.morph/framework/templates/code/dotnet/frontend/component.razor +0 -239
- package/.morph/framework/templates/code/dotnet/jobs/agent.cs +0 -163
- package/.morph/framework/templates/code/dotnet/jobs/job.cs +0 -171
- package/.morph/framework/templates/code/dotnet/test.cs +0 -239
- package/.morph/framework/templates/code/sql/rls-policy.sql +0 -57
- package/.morph/framework/templates/code/sql/supabase-migration.sql +0 -100
- package/.morph/framework/templates/code/sql/supabase-migration.template.sql +0 -113
- package/.morph/framework/templates/code/typescript/contracts.ts +0 -168
- package/.morph/framework/templates/context/CONTEXT-FEATURE.md +0 -276
- package/.morph/framework/templates/context/CONTEXT.md +0 -181
- package/.morph/framework/templates/docs/clarifications.md +0 -253
- package/.morph/framework/templates/docs/onboarding.md +0 -123
- package/.morph/framework/templates/docs/proposal.md +0 -182
- package/.morph/framework/templates/docs/schema-analysis.md +0 -119
- package/.morph/framework/templates/docs/spec.md +0 -149
- package/.morph/framework/templates/docs/ui-components.md +0 -124
- package/.morph/framework/templates/docs/ui-design-system.md +0 -76
- package/.morph/framework/templates/docs/ui-flows.md +0 -167
- package/.morph/framework/templates/docs/ui-mockups.md +0 -98
- package/.morph/framework/templates/examples/design-system-examples.md +0 -357
- package/.morph/framework/templates/examples/spec-examples.md +0 -90
- package/.morph/framework/templates/feature/decisions.md +0 -187
- package/.morph/framework/templates/feature/recap.md +0 -146
- package/.morph/framework/templates/feature/tasks.md +0 -199
- package/.morph/framework/templates/infrastructure/azure/Dockerfile.example +0 -82
- package/.morph/framework/templates/infrastructure/azure/README.md +0 -286
- package/.morph/framework/templates/infrastructure/azure/app-insights.bicep +0 -63
- package/.morph/framework/templates/infrastructure/azure/app-service.bicep +0 -164
- package/.morph/framework/templates/infrastructure/azure/container-app-env.bicep +0 -49
- package/.morph/framework/templates/infrastructure/azure/container-app.bicep +0 -156
- package/.morph/framework/templates/infrastructure/azure/deploy-checklist.md +0 -426
- package/.morph/framework/templates/infrastructure/azure/deploy.ps1 +0 -229
- package/.morph/framework/templates/infrastructure/azure/deploy.sh +0 -208
- package/.morph/framework/templates/infrastructure/azure/key-vault.bicep +0 -91
- package/.morph/framework/templates/infrastructure/azure/main.bicep +0 -189
- package/.morph/framework/templates/infrastructure/azure/parameters.dev.json +0 -29
- package/.morph/framework/templates/infrastructure/azure/parameters.prod.json +0 -29
- package/.morph/framework/templates/infrastructure/azure/parameters.staging.json +0 -29
- package/.morph/framework/templates/infrastructure/azure/sql-database.bicep +0 -103
- package/.morph/framework/templates/infrastructure/azure/storage.bicep +0 -106
- package/.morph/framework/templates/infrastructure/docker/Dockerfile.template +0 -58
- package/.morph/framework/templates/infrastructure/docker/docker-compose.template.yml +0 -67
- package/.morph/framework/templates/infrastructure/docker/dockerfile-api.dockerfile +0 -38
- package/.morph/framework/templates/infrastructure/docker/dockerfile-web.dockerfile +0 -48
- package/.morph/framework/templates/infrastructure/docker/easypanel.template.json +0 -54
- package/.morph/framework/templates/infrastructure/github/README.md +0 -593
- package/.morph/framework/templates/infrastructure/github/actions/azure-auth/action.yml.hbs +0 -22
- package/.morph/framework/templates/infrastructure/github/actions/docker-build-push/action.yml.hbs +0 -45
- package/.morph/framework/templates/infrastructure/github/actions/health-check/action.yml.hbs +0 -27
- package/.morph/framework/templates/infrastructure/github/workflows/deploy-azure-app-service.yml.hbs +0 -61
- package/.morph/framework/templates/infrastructure/github/workflows/deploy-easypanel.yml.hbs +0 -31
- package/.morph/framework/templates/infrastructure/github/workflows/docker-build-push.yml.hbs +0 -59
- package/.morph/framework/templates/infrastructure/github/workflows/dotnet-build.yml.hbs +0 -39
- package/.morph/framework/templates/integrations/asaas-client.cs +0 -387
- package/.morph/framework/templates/integrations/asaas-webhook.cs +0 -351
- package/.morph/framework/templates/integrations/azure-identity-config.cs +0 -288
- package/.morph/framework/templates/integrations/clerk-config.cs +0 -258
- package/.morph/framework/templates/meta-prompts/fusion/fusion-agent.md +0 -76
- package/.morph/framework/templates/meta-prompts/fusion/fusion-aggregator.md +0 -100
- package/.morph/framework/templates/meta-prompts/hops/hop-retry.md +0 -78
- package/.morph/framework/templates/meta-prompts/hops/hop-validation.md +0 -97
- package/.morph/framework/templates/meta-prompts/hops/hop-wrapper.md +0 -36
- package/.morph/framework/templates/meta-prompts/parallel-workers/parallel-coordinator.md +0 -113
- package/.morph/framework/templates/meta-prompts/parallel-workers/parallel-worker.md +0 -80
- package/.morph/framework/templates/meta-prompts/squad-leaders/backend-squad.md +0 -90
- package/.morph/framework/templates/meta-prompts/squad-leaders/frontend-squad.md +0 -126
- package/.morph/framework/templates/meta-prompts/squad-leaders/squad-leader.md +0 -43
- package/.morph/framework/templates/meta-prompts/validators/checkpoint-validator.md +0 -107
- package/.morph/framework/templates/meta-prompts/validators/pre-commit-validator.md +0 -95
- package/.morph/framework/templates/saas/subscription.cs +0 -347
- package/.morph/framework/templates/saas/tenant.cs +0 -338
- package/.morph/framework/templates/state.template.json +0 -17
- package/.morph/framework/templates/ui/FluentDesignTheme.cs +0 -149
- package/.morph/framework/templates/ui/MudTheme.cs +0 -281
- package/.morph/framework/templates/ui/design-system.css +0 -226
- package/.morph/logs/tool-failures.log +0 -51
- package/.morph/memory/pre-compact-2026-02-22T17-01-01-658Z.json +0 -16
- package/.morph/state.json +0 -48
- package/framework/skills/level-2-domains/backend/api-designer.md +0 -66
- package/framework/skills/level-2-domains/backend/ef-modeler.md +0 -65
- package/framework/skills/level-2-domains/frontend/nextjs-expert.md +0 -161
- package/framework/skills/level-3-technologies/README.md +0 -7
- package/framework/skills/level-4-patterns/README.md +0 -7
- package/framework/templates/code/dotnet/contracts/contracts.cs +0 -217
- package/framework/templates/code/dotnet/contracts/contracts.cs.hbs +0 -172
|
@@ -1,7 +1,6 @@
|
|
|
1
1
|
---
|
|
2
2
|
name: morph-replicate
|
|
3
|
-
description:
|
|
4
|
-
Replicates a completed MORPH-SPEC feature into a new feature, copying and adapting phase outputs. Called when a user wants to clone an existing feature as a starting point.
|
|
3
|
+
description: Simplified workflow for converting HTML prototypes into functional Blazor components, extracting design patterns and mapping HTML elements to Fluent UI/MudBlazor equivalents. Use when an approved HTML prototype exists and needs conversion to Blazor without a full MORPH-SPEC spec pipeline.
|
|
5
4
|
user-invocable: false
|
|
6
5
|
allowed-tools: Read, Write, Edit, Bash, Glob, Grep
|
|
7
6
|
---
|
|
@@ -209,12 +208,12 @@ Mapeamento HTML → Blazor:
|
|
|
209
208
|
|
|
210
209
|
---
|
|
211
210
|
|
|
212
|
-
##
|
|
211
|
+
## Referências
|
|
213
212
|
|
|
214
|
-
-
|
|
215
|
-
-
|
|
216
|
-
-
|
|
217
|
-
-
|
|
213
|
+
- **Ref:** `framework/standards/frontend/blazor/html-conversion.md`
|
|
214
|
+
- **Ref:** `framework/standards/frontend/design-system/naming.md`
|
|
215
|
+
- **Ref:** `framework/standards/frontend/design-system/animations.md`
|
|
216
|
+
- **Ref:** `framework/standards/frontend/blazor/fluent-ui.md`
|
|
218
217
|
|
|
219
218
|
---
|
|
220
219
|
|
package/framework/skills/level-0-meta/{simulation-checklist.md → simulation-checklist/SKILL.md}
RENAMED
|
@@ -1,16 +1,13 @@
|
|
|
1
1
|
---
|
|
2
2
|
name: simulation-checklist
|
|
3
|
-
description:
|
|
4
|
-
Checklist for simulating a full MORPH-SPEC workflow run to validate phase outputs and state consistency. Use to verify the framework is working correctly.
|
|
3
|
+
description: Checklist for implementing mock/simulation clients for external .NET services (AI APIs, payments, email). Use when setting up simulation mode without real API access, when creating fake service implementations for development/testing, or when debugging external service integrations.
|
|
5
4
|
user-invocable: true
|
|
6
5
|
allowed-tools: Read, Write, Edit, Bash, Glob, Grep
|
|
7
6
|
---
|
|
8
7
|
|
|
9
|
-
#
|
|
8
|
+
# Simulation Checklist
|
|
10
9
|
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
Checklist for simulating external services (AI, payment, email APIs).
|
|
10
|
+
Checklist for simulating external services (AI, payment, email APIs) in .NET projects.
|
|
14
11
|
|
|
15
12
|
## Pre-Implementation
|
|
16
13
|
|
|
@@ -1,7 +1,6 @@
|
|
|
1
1
|
---
|
|
2
2
|
name: tool-usage-guide
|
|
3
|
-
description:
|
|
4
|
-
Decision guide for selecting the right Claude Code tool (Read, Grep, Glob, Bash, Task) for each situation in MORPH-SPEC workflows. Reference when unsure which tool to use.
|
|
3
|
+
description: Decision flowchart and per-phase reference for selecting the right Claude Code tool (Read, Grep, Glob, Bash, Task) or MCP tool in MORPH-SPEC workflows. Use when unsure which tool to use for a given action, when choosing between native tools and MCPs, or when deciding whether to use a subagent vs direct tools.
|
|
5
4
|
user-invocable: true
|
|
6
5
|
allowed-tools: Read, Write, Edit, Bash, Glob, Grep
|
|
7
6
|
---
|
|
@@ -128,7 +127,7 @@ allowed-tools: Read, Write, Edit, Bash, Glob, Grep
|
|
|
128
127
|
|
|
129
128
|
### Phase 2 — Design (Technical Spec)
|
|
130
129
|
|
|
131
|
-
**Goal:** Analyze schema, create spec.md, contracts.cs, decisions.md
|
|
130
|
+
**Goal:** Analyze schema, create spec.md, contracts-level{N}.cs, decisions.md
|
|
132
131
|
|
|
133
132
|
| Action | Tool | Why |
|
|
134
133
|
|--------|------|-----|
|
|
@@ -142,7 +141,7 @@ allowed-tools: Read, Write, Edit, Bash, Glob, Grep
|
|
|
142
141
|
| Look up library for ADR | **Context7 MCP** `query_docs()` | Compare library capabilities |
|
|
143
142
|
| Check existing code patterns | **GitHub MCP** `search_code()` | Find patterns in large repos |
|
|
144
143
|
| **Fallback:** Search codebase | **Grep** patterns across project | When no GitHub MCP |
|
|
145
|
-
| Render contracts template | **Bash** `npx morph-spec template render code/dotnet/contracts/contracts.cs ...` | CLI command |
|
|
144
|
+
| Render contracts template (detected level) | **Bash** `npx morph-spec template render code/dotnet/contracts/contracts-level{N}.cs ...` where N = level detected | CLI command |
|
|
146
145
|
| Render spec template | **Bash** `npx morph-spec template render docs/spec ...` | CLI command |
|
|
147
146
|
| Render decisions template | **Bash** `npx morph-spec template render docs/decisions ...` | CLI command |
|
|
148
147
|
| Create schema-analysis.md | **Write** to output directory | Document findings |
|
|
@@ -154,7 +153,7 @@ allowed-tools: Read, Write, Edit, Bash, Glob, Grep
|
|
|
154
153
|
- ❌ Guessing field names without checking schema (use MCP or Grep first!)
|
|
155
154
|
- ❌ Task agent to read a single spec file (just use Read)
|
|
156
155
|
- ❌ WebSearch for database schema (use Supabase MCP or code analysis)
|
|
157
|
-
- ❌ Manually writing contracts.cs from scratch (use template render)
|
|
156
|
+
- ❌ Manually writing contracts-level{N}.cs from scratch (use template render)
|
|
158
157
|
|
|
159
158
|
---
|
|
160
159
|
|
|
@@ -1,11 +1,13 @@
|
|
|
1
1
|
---
|
|
2
2
|
name: verification-before-completion
|
|
3
|
-
description:
|
|
3
|
+
description: Phase-specific verification checklists and morph-spec validation commands for confirming MORPH-SPEC outputs are complete and correct. Use before marking any task done, before advancing to the next phase, before committing, or before creating PRs.
|
|
4
4
|
---
|
|
5
5
|
|
|
6
6
|
# Verification Before Completion — MORPH-SPEC Integrated
|
|
7
7
|
|
|
8
8
|
> Never claim work is complete without running verification. Evidence before assertions.
|
|
9
|
+
>
|
|
10
|
+
> **Script:** Run `node scripts/check-phase-outputs.mjs <feature> [phase]` to check required output files exist.
|
|
9
11
|
|
|
10
12
|
## When to Use
|
|
11
13
|
|
package/framework/skills/level-0-meta/verification-before-completion/scripts/check-phase-outputs.mjs
ADDED
|
@@ -0,0 +1,110 @@
|
|
|
1
|
+
#!/usr/bin/env node
|
|
2
|
+
/**
|
|
3
|
+
* check-phase-outputs.mjs
|
|
4
|
+
*
|
|
5
|
+
* Verifies that required MORPH-SPEC output files exist for a feature/phase.
|
|
6
|
+
* Executed locally by Claude via Bash — output is returned to Claude.
|
|
7
|
+
*
|
|
8
|
+
* Usage:
|
|
9
|
+
* node check-phase-outputs.mjs <feature> [phase]
|
|
10
|
+
*
|
|
11
|
+
* Examples:
|
|
12
|
+
* node check-phase-outputs.mjs photo-processing design
|
|
13
|
+
* node check-phase-outputs.mjs photo-processing # checks all phases
|
|
14
|
+
*
|
|
15
|
+
* Output: JSON array of { phase, file, exists, required }
|
|
16
|
+
*/
|
|
17
|
+
|
|
18
|
+
import { existsSync } from 'fs';
|
|
19
|
+
import { join } from 'path';
|
|
20
|
+
|
|
21
|
+
const PHASE_OUTPUTS = {
|
|
22
|
+
proposal: [
|
|
23
|
+
{ file: '0-proposal/proposal.md', required: true },
|
|
24
|
+
],
|
|
25
|
+
design: [
|
|
26
|
+
{ file: '1-design/spec.md', required: true },
|
|
27
|
+
{ file: '1-design/contracts.cs', required: true },
|
|
28
|
+
{ file: '1-design/decisions.md', required: true },
|
|
29
|
+
{ file: '1-design/schema-analysis.md', required: false },
|
|
30
|
+
],
|
|
31
|
+
uiux: [
|
|
32
|
+
{ file: '2-ui/design-system.md', required: true },
|
|
33
|
+
{ file: '2-ui/mockups.md', required: true },
|
|
34
|
+
{ file: '2-ui/components.md', required: true },
|
|
35
|
+
{ file: '2-ui/flows.md', required: false },
|
|
36
|
+
],
|
|
37
|
+
tasks: [
|
|
38
|
+
{ file: '3-tasks/tasks.md', required: true },
|
|
39
|
+
],
|
|
40
|
+
implement: [
|
|
41
|
+
{ file: '4-implement/recap.md', required: true },
|
|
42
|
+
],
|
|
43
|
+
};
|
|
44
|
+
|
|
45
|
+
const feature = process.argv[2];
|
|
46
|
+
const targetPhase = process.argv[3];
|
|
47
|
+
|
|
48
|
+
if (!feature) {
|
|
49
|
+
console.error(JSON.stringify({ error: 'Usage: check-phase-outputs.mjs <feature> [phase]' }));
|
|
50
|
+
process.exit(1);
|
|
51
|
+
}
|
|
52
|
+
|
|
53
|
+
// Walk up to find .morph/ directory
|
|
54
|
+
let cwd = process.cwd();
|
|
55
|
+
let morphDir = null;
|
|
56
|
+
for (let i = 0; i < 5; i++) {
|
|
57
|
+
const candidate = join(cwd, '.morph');
|
|
58
|
+
if (existsSync(candidate)) {
|
|
59
|
+
morphDir = candidate;
|
|
60
|
+
break;
|
|
61
|
+
}
|
|
62
|
+
const parent = join(cwd, '..');
|
|
63
|
+
if (parent === cwd) break;
|
|
64
|
+
cwd = parent;
|
|
65
|
+
}
|
|
66
|
+
|
|
67
|
+
if (!morphDir) {
|
|
68
|
+
console.error(JSON.stringify({ error: '.morph/ directory not found. Run from inside a MORPH-SPEC project.' }));
|
|
69
|
+
process.exit(1);
|
|
70
|
+
}
|
|
71
|
+
|
|
72
|
+
const featureDir = join(morphDir, 'features', feature);
|
|
73
|
+
if (!existsSync(featureDir)) {
|
|
74
|
+
console.error(JSON.stringify({ error: `Feature directory not found: .morph/features/${feature}` }));
|
|
75
|
+
process.exit(1);
|
|
76
|
+
}
|
|
77
|
+
|
|
78
|
+
const phases = targetPhase
|
|
79
|
+
? { [targetPhase]: PHASE_OUTPUTS[targetPhase] }
|
|
80
|
+
: PHASE_OUTPUTS;
|
|
81
|
+
|
|
82
|
+
if (targetPhase && !PHASE_OUTPUTS[targetPhase]) {
|
|
83
|
+
console.error(JSON.stringify({ error: `Unknown phase: ${targetPhase}. Valid: ${Object.keys(PHASE_OUTPUTS).join(', ')}` }));
|
|
84
|
+
process.exit(1);
|
|
85
|
+
}
|
|
86
|
+
|
|
87
|
+
const results = [];
|
|
88
|
+
let missingRequired = 0;
|
|
89
|
+
|
|
90
|
+
for (const [phase, outputs] of Object.entries(phases)) {
|
|
91
|
+
for (const { file, required } of outputs) {
|
|
92
|
+
const fullPath = join(featureDir, file);
|
|
93
|
+
const exists = existsSync(fullPath);
|
|
94
|
+
if (required && !exists) missingRequired++;
|
|
95
|
+
results.push({ phase, file, exists, required });
|
|
96
|
+
}
|
|
97
|
+
}
|
|
98
|
+
|
|
99
|
+
const summary = {
|
|
100
|
+
feature,
|
|
101
|
+
featureDir: featureDir.replace(/\\/g, '/'),
|
|
102
|
+
checks: results.length,
|
|
103
|
+
passed: results.filter(r => r.exists).length,
|
|
104
|
+
missingRequired,
|
|
105
|
+
ready: missingRequired === 0,
|
|
106
|
+
results,
|
|
107
|
+
};
|
|
108
|
+
|
|
109
|
+
console.log(JSON.stringify(summary, null, 2));
|
|
110
|
+
process.exit(missingRequired > 0 ? 1 : 0);
|
|
@@ -1,7 +1,6 @@
|
|
|
1
1
|
---
|
|
2
2
|
name: phase-clarify
|
|
3
|
-
description:
|
|
4
|
-
MORPH-SPEC Phase 3 (Clarify). Resolves ambiguities from the design phase, producing clarifications.md and updating the spec. Called after design approval.
|
|
3
|
+
description: MORPH-SPEC Phase 3 (Clarify). Reviews spec.md for ambiguities, generates 3-7 targeted clarification questions, waits for user answers, then updates spec with edge cases and clarification sections. Use after design approval to eliminate spec ambiguities before task breakdown begins.
|
|
5
4
|
argument-hint: "[feature-name]"
|
|
6
5
|
user-invocable: false
|
|
7
6
|
allowed-tools: Read, Write, Edit, Bash, Glob, Grep
|
|
@@ -21,8 +20,9 @@ Identifique ambiguidades na especificação e faça perguntas de clarificação
|
|
|
21
20
|
|
|
22
21
|
## Ferramentas Recomendadas
|
|
23
22
|
|
|
24
|
-
> **Ref:** `framework/skills/level-0-meta/tool-usage-guide.md` para guia completo.
|
|
23
|
+
> **Ref:** `framework/skills/level-0-meta/tool-usage-guide/SKILL.md` para guia completo.
|
|
25
24
|
> **Ref:** `framework/standards/integration/mcp/mcp-tools.md` para referência MCP.
|
|
25
|
+
> **Example:** `references/clarifications-example.md` — filled-in clarifications.md showing expected Q&A format.
|
|
26
26
|
|
|
27
27
|
| Ação | Ferramenta | Alternativa |
|
|
28
28
|
|------|------------|-------------|
|
|
@@ -0,0 +1,117 @@
|
|
|
1
|
+
# Clarifications - Photo Processing Pipeline
|
|
2
|
+
|
|
3
|
+
> Example of a well-structured clarifications.md. Filled-in reference — not a template.
|
|
4
|
+
> Each Q&A is concise: question raised during design review → answer → spec update.
|
|
5
|
+
|
|
6
|
+
**Feature**: photo-processing
|
|
7
|
+
**Phase**: CLARIFY (Phase 3)
|
|
8
|
+
**Status**: Resolved — all items incorporated into spec.md
|
|
9
|
+
|
|
10
|
+
---
|
|
11
|
+
|
|
12
|
+
## Questions & Answers
|
|
13
|
+
|
|
14
|
+
### Q1: File size limit — 10MB for all users or tiered?
|
|
15
|
+
|
|
16
|
+
**Question:** The spec says max 10MB but the proposal mentioned "higher for pro users." Should we implement tiered limits now?
|
|
17
|
+
|
|
18
|
+
**Answer:** Free tier: 10MB. Pro tier: 50MB. Enforce via `[Authorize]` + claims check in the upload endpoint. YAGNI — don't build a generic tier system, just check the plan claim directly.
|
|
19
|
+
|
|
20
|
+
**Spec Updates:**
|
|
21
|
+
- Updated `spec.md` FR1 to specify tiered limits
|
|
22
|
+
- Added `CanUploadLargeFile` policy to Security section
|
|
23
|
+
- Updated `UploadPhotoCommand` to accept `userPlan` claim
|
|
24
|
+
|
|
25
|
+
**Priority:** High — affects contracts
|
|
26
|
+
**Resolved:** ✅ Yes
|
|
27
|
+
|
|
28
|
+
---
|
|
29
|
+
|
|
30
|
+
### Q2: Processed photo retention — indefinite or expiring?
|
|
31
|
+
|
|
32
|
+
**Question:** Should processed photos in Blob Storage be kept forever, or do they expire?
|
|
33
|
+
|
|
34
|
+
**Answer:** Auto-delete after 30 days via Blob lifecycle policy (no code needed, configured in Azure). Free tier: 7 days. Pro tier: 30 days. This is infrastructure-only — `ProcessingJob.ProcessedPhotoUrl` stays in DB but becomes a dead link after expiry.
|
|
35
|
+
|
|
36
|
+
**Spec Updates:**
|
|
37
|
+
- Added ADR-003 (Blob lifecycle policy over code-based cleanup)
|
|
38
|
+
- Added note to `AzureBlobStorageService` about lifecycle dependency
|
|
39
|
+
|
|
40
|
+
**Priority:** Low — no code change
|
|
41
|
+
**Resolved:** ✅ Yes
|
|
42
|
+
|
|
43
|
+
---
|
|
44
|
+
|
|
45
|
+
### Q3: AI API — async webhook or polling?
|
|
46
|
+
|
|
47
|
+
**Question:** spec.md assumed Hangfire polls job completion, but the AI vendor docs mention a webhook callback option.
|
|
48
|
+
|
|
49
|
+
**Answer:** Use fire-and-forget HTTP call + Hangfire continuation (not webhook). The AI API's webhook requires a public URL we don't have in dev. Fire-and-forget is simpler and testable. If the vendor SLA changes, we can swap to webhook via `IPhotoProcessingJob` interface — no consumer changes needed.
|
|
50
|
+
|
|
51
|
+
**Spec Updates:**
|
|
52
|
+
- Clarified Processing Flow in spec.md to show fire-and-forget + await pattern
|
|
53
|
+
- Added to Risks: "AI API webhook migration path if needed"
|
|
54
|
+
|
|
55
|
+
**Priority:** High — affects job implementation
|
|
56
|
+
**Resolved:** ✅ Yes
|
|
57
|
+
|
|
58
|
+
---
|
|
59
|
+
|
|
60
|
+
## Edge Cases
|
|
61
|
+
|
|
62
|
+
### EC1: Upload during Hangfire downtime
|
|
63
|
+
|
|
64
|
+
**Scenario:** User uploads successfully but Hangfire server is stopped — job never executes.
|
|
65
|
+
|
|
66
|
+
**Expected Behavior:** Job stays in `Pending` indefinitely. On next Hangfire server start, job auto-resumes (Hangfire persistent storage).
|
|
67
|
+
|
|
68
|
+
**Solution:** No code change. Add monitoring alert if job stays Pending > 10 minutes.
|
|
69
|
+
|
|
70
|
+
**Acceptance Criteria:**
|
|
71
|
+
- [ ] `ProcessingJob` with status `Pending` survives Hangfire restart
|
|
72
|
+
- [ ] Hangfire picks up orphaned jobs on startup (built-in behavior, covered by docs)
|
|
73
|
+
|
|
74
|
+
---
|
|
75
|
+
|
|
76
|
+
### EC2: Concurrent uploads of same file
|
|
77
|
+
|
|
78
|
+
**Scenario:** User double-clicks Upload button, sending two identical requests simultaneously.
|
|
79
|
+
|
|
80
|
+
**Expected Behavior:** Two separate `ProcessingJob` records created. Both process independently. No deduplication (not required at MVP scale).
|
|
81
|
+
|
|
82
|
+
**Solution:** No code change. Each request gets a fresh GUID. If deduplication becomes needed, add idempotency key header in v2.
|
|
83
|
+
|
|
84
|
+
---
|
|
85
|
+
|
|
86
|
+
## Business Rules Clarified
|
|
87
|
+
|
|
88
|
+
### BR1: Only the uploading user can download their processed photo
|
|
89
|
+
|
|
90
|
+
**Rule:** `GET /api/download/{jobId}` must check `job.UserId == currentUserId`. Return 403 if mismatch.
|
|
91
|
+
|
|
92
|
+
**Rationale:** Users might guess sequential GUIDs (they can't since we use random GUIDs, but defense in depth).
|
|
93
|
+
|
|
94
|
+
**Implementation:** Add `[Authorize]` + ownership check to download endpoint. Already in Security section of spec.md.
|
|
95
|
+
|
|
96
|
+
---
|
|
97
|
+
|
|
98
|
+
## Summary
|
|
99
|
+
|
|
100
|
+
| | Count |
|
|
101
|
+
|---|---|
|
|
102
|
+
| Questions Answered | 3 / 3 |
|
|
103
|
+
| Edge Cases Documented | 2 |
|
|
104
|
+
| Business Rules Clarified | 1 |
|
|
105
|
+
| Spec Updates Made | 6 |
|
|
106
|
+
|
|
107
|
+
## Next Steps
|
|
108
|
+
|
|
109
|
+
1. [x] All questions resolved
|
|
110
|
+
2. [x] `spec.md` updated with all clarifications
|
|
111
|
+
3. [x] `contracts.cs` updated (`UploadPhotoCommand` + plan claim)
|
|
112
|
+
4. [x] Stakeholder approval received
|
|
113
|
+
5. [ ] Advance to Phase 4 (Tasks)
|
|
114
|
+
|
|
115
|
+
---
|
|
116
|
+
|
|
117
|
+
*MORPH-SPEC by Polymorphism Tech*
|
|
@@ -1,7 +1,6 @@
|
|
|
1
1
|
---
|
|
2
2
|
name: phase-codebase-analysis
|
|
3
|
-
description:
|
|
4
|
-
MORPH-SPEC sub-phase of Design. Analyzes existing codebase patterns, architecture, and conventions before writing the spec. Called automatically at the start of Design phase.
|
|
3
|
+
description: MORPH-SPEC Design sub-phase that analyzes existing codebase and database schema, producing schema-analysis.md with real column names, types, relationships, and field mismatches. Use at the start of Design phase before generating contracts.cs to prevent incorrect field names or types.
|
|
5
4
|
user-invocable: false
|
|
6
5
|
allowed-tools: Read, Write, Edit, Bash, Glob, Grep
|
|
7
6
|
---
|
|
@@ -21,7 +20,7 @@ Automatiza a análise de código existente para gerar `schema-analysis.md` com d
|
|
|
21
20
|
|
|
22
21
|
## Ferramentas Recomendadas
|
|
23
22
|
|
|
24
|
-
> **Ref:** `framework/skills/level-0-meta/tool-usage-guide.md` para guia completo.
|
|
23
|
+
> **Ref:** `framework/skills/level-0-meta/tool-usage-guide/SKILL.md` para guia completo.
|
|
25
24
|
> **Ref:** `framework/standards/integration/mcp/mcp-tools.md` para referência MCP.
|
|
26
25
|
|
|
27
26
|
| Ação | Ferramenta | Alternativa |
|