@polymorphism-tech/morph-spec 4.3.7 → 4.6.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/.morph/.morphversion +3 -3
- package/.morph/analytics/threads-log.jsonl +6 -9
- package/.morph/config/config.json +2 -3
- package/.morph/framework/standards/STANDARDS.json +812 -0
- package/.morph/{standards → framework/standards}/ai-agents/team-orchestration.md +3 -3
- package/.morph/{standards → framework/standards}/frontend/nextjs/nextjs-patterns.md +17 -0
- package/.morph/framework/standards/integration/mcp/mcp-tools.md +384 -0
- package/.morph/{templates → framework/templates}/README.md +17 -17
- package/.morph/{templates → framework/templates}/REGISTRY.json +48 -233
- package/.morph/framework/templates/code/dotnet/contracts/contracts.cs.hbs +172 -0
- package/.morph/{templates → framework/templates}/context/CONTEXT-FEATURE.md +1 -1
- package/.morph/{templates → framework/templates}/context/CONTEXT.md +3 -3
- package/.morph/framework/templates/docs/clarifications.md +253 -0
- package/.morph/framework/templates/docs/onboarding.md +123 -0
- package/.morph/framework/templates/docs/schema-analysis.md +119 -0
- package/.morph/{templates → framework/templates}/docs/spec.md +149 -149
- package/.morph/framework/templates/docs/ui-components.md +124 -0
- package/.morph/framework/templates/docs/ui-design-system.md +76 -0
- package/.morph/framework/templates/docs/ui-flows.md +167 -0
- package/.morph/framework/templates/docs/ui-mockups.md +98 -0
- package/.morph/framework/templates/docs/user-stories.md +34 -0
- package/.morph/{templates → framework/templates}/examples/spec-examples.md +1 -1
- package/.morph/{templates → framework/templates}/infrastructure/github/README.md +11 -11
- package/.morph/{templates → framework/templates}/infrastructure/github/workflows/deploy-azure-app-service.yml.hbs +2 -2
- package/.morph/{templates → framework/templates}/meta-prompts/parallel-workers/parallel-worker.md +2 -2
- package/.morph/{templates → framework/templates}/meta-prompts/validators/pre-commit-validator.md +1 -1
- package/.morph/logs/tool-failures.log +7 -0
- package/.morph/memory/pre-compact-2026-02-23T15-43-03-521Z.json +16 -0
- package/.morph/state.json +1 -1
- package/CLAUDE.md +77 -155
- package/README.md +20 -18
- package/bin/detect-agents.js +1 -1
- package/bin/morph-spec.js +116 -266
- package/bin/task-manager.cjs +2 -2
- package/bin/validate.js +1 -1
- package/claude-plugin.json +14 -0
- package/docs/claude-alignment-report.md +137 -0
- package/docs/plans/2026-02-22-claude-docs-morph-alignment-analysis.md +512 -0
- package/docs/plans/2026-02-22-claude-settings.md +515 -0
- package/docs/plans/2026-02-22-morph-cc-alignment-impl.md +728 -0
- package/docs/plans/2026-02-22-morph-spec-next.md +478 -0
- package/docs/plans/2026-02-22-native-alignment-design.md +199 -0
- package/docs/plans/2026-02-22-native-alignment-impl.md +925 -0
- package/docs/plans/2026-02-22-native-enrichment-design.md +244 -0
- package/docs/plans/2026-02-22-native-enrichment.md +735 -0
- package/framework/CLAUDE.md +77 -0
- package/framework/{skills/level-2-domains → agents}/ai-agents/ai-system-architect.md +7 -3
- package/framework/{skills/level-2-domains → agents}/architecture/po-pm-advisor.md +7 -1
- package/framework/{skills/level-2-domains → agents}/architecture/prompt-engineer.md +7 -1
- package/framework/{skills/level-2-domains → agents}/architecture/seo-growth-hacker.md +7 -1
- package/framework/{skills/level-2-domains → agents}/architecture/standards-architect.md +10 -6
- package/framework/agents/backend/api-designer.md +103 -0
- package/framework/{skills/level-2-domains → agents}/backend/dotnet-senior.md +7 -1
- package/framework/agents/backend/ef-modeler.md +119 -0
- package/framework/{skills/level-2-domains → agents}/backend/hangfire-orchestrator.md +8 -4
- package/framework/{skills/level-2-domains → agents}/backend/ms-agent-expert.md +7 -3
- package/framework/{skills/level-2-domains → agents}/frontend/blazor-builder.md +7 -3
- package/framework/{skills/level-2-domains → agents}/frontend/nextjs-expert.md +7 -3
- package/framework/{skills/level-2-domains → agents}/frontend/ui-ux-designer.md +8 -2
- package/framework/{skills/level-2-domains → agents}/infrastructure/azure-architect.md +7 -1
- package/framework/{skills/level-2-domains → agents}/infrastructure/azure-deploy-specialist.md +7 -1
- package/framework/{skills/level-2-domains → agents}/infrastructure/bicep-architect.md +7 -3
- package/framework/{skills/level-2-domains → agents}/infrastructure/container-specialist.md +7 -3
- package/framework/{skills/level-2-domains → agents}/infrastructure/devops-engineer.md +7 -3
- package/framework/{skills/level-2-domains → agents}/integrations/asaas-financial.md +7 -3
- package/framework/{skills/level-2-domains → agents}/integrations/azure-identity.md +7 -3
- package/framework/{skills/level-2-domains → agents}/integrations/clerk-auth.md +7 -3
- package/framework/{skills/level-2-domains/integrations/hangfire-orchestrator.md → agents/integrations/hangfire-integration.md} +7 -1
- package/framework/{skills/level-2-domains → agents}/integrations/resend-email.md +7 -3
- package/framework/{skills/level-2-domains → agents}/quality/code-analyzer.md +9 -5
- package/framework/{skills/level-2-domains → agents}/quality/testing-specialist.md +7 -3
- package/framework/commands/morph-apply.md +9 -9
- package/framework/commands/morph-archive.md +8 -8
- package/framework/commands/morph-infra.md +1 -1
- package/framework/commands/morph-proposal.md +9 -9
- package/framework/commands/morph-status.md +3 -3
- package/framework/commands/morph-troubleshoot.md +1 -1
- package/framework/hooks/README.md +201 -282
- package/framework/hooks/claude-code/notification/approval-reminder.js +52 -0
- package/framework/hooks/claude-code/post-tool-use/dispatch.js +83 -0
- package/framework/hooks/claude-code/post-tool-use/handle-tool-failure.js +42 -0
- package/framework/hooks/claude-code/pre-compact/save-morph-context.js +61 -0
- package/framework/hooks/claude-code/pre-tool-use/enforce-phase-writes.js +71 -0
- package/framework/hooks/claude-code/pre-tool-use/protect-readonly-files.js +58 -0
- package/framework/hooks/claude-code/pre-tool-use/protect-spec-files.js +64 -0
- package/framework/hooks/claude-code/session-start/inject-morph-context.js +94 -0
- package/framework/hooks/claude-code/statusline.py +538 -0
- package/framework/hooks/claude-code/statusline.sh +7 -0
- package/framework/hooks/claude-code/stop/validate-completion.js +88 -0
- package/framework/hooks/claude-code/user-prompt/enrich-prompt.js +91 -0
- package/framework/hooks/shared/hook-response.js +45 -0
- package/framework/hooks/shared/phase-utils.js +129 -0
- package/framework/hooks/shared/state-reader.js +138 -0
- package/framework/hooks/shared/stdin-reader.js +26 -0
- package/framework/phases.json +145 -0
- package/framework/rules/csharp-standards.md +10 -0
- package/framework/rules/frontend-standards.md +14 -0
- package/framework/rules/infrastructure-standards.md +13 -0
- package/framework/rules/morph-workflow.md +86 -0
- package/framework/rules/testing-standards.md +11 -0
- package/framework/skills/README.md +66 -0
- package/framework/skills/level-0-meta/brainstorming/SKILL.md +135 -0
- 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} +13 -4
- 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/mcp-registry.json +207 -0
- package/framework/skills/level-0-meta/{morph-checklist.md → morph-checklist/SKILL.md} +8 -3
- package/framework/skills/{level-1-workflows/morph-replicate.md → level-0-meta/morph-replicate/SKILL.md} +13 -6
- package/framework/skills/level-0-meta/{simulation-checklist.md → simulation-checklist/SKILL.md} +9 -4
- package/framework/skills/level-0-meta/tool-usage-guide/SKILL.md +334 -0
- package/framework/skills/level-0-meta/verification-before-completion/SKILL.md +147 -0
- 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} +65 -4
- package/framework/skills/level-1-workflows/phase-clarify/references/clarifications-example.md +117 -0
- package/framework/skills/level-1-workflows/phase-codebase-analysis/SKILL.md +181 -0
- package/framework/skills/level-1-workflows/phase-design/SKILL.md +303 -0
- package/framework/skills/level-1-workflows/phase-design/references/spec-example.md +253 -0
- package/framework/skills/level-1-workflows/phase-implement/SKILL.md +254 -0
- package/framework/skills/level-1-workflows/phase-implement/references/recap-example.md +132 -0
- package/framework/skills/level-1-workflows/phase-setup/SKILL.md +171 -0
- package/framework/skills/level-1-workflows/{phase-tasks.md → phase-tasks/SKILL.md} +89 -7
- 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/SKILL.md +246 -0
- package/framework/standards/STANDARDS.json +812 -0
- package/framework/standards/ai-agents/team-orchestration.md +3 -3
- package/framework/standards/frontend/nextjs/nextjs-patterns.md +17 -0
- package/framework/standards/integration/mcp/mcp-tools.md +384 -0
- package/framework/templates/README.md +17 -17
- package/framework/templates/REGISTRY.json +48 -233
- package/framework/templates/code/dotnet/contracts/contracts.cs.hbs +172 -0
- package/framework/templates/context/CONTEXT-FEATURE.md +1 -1
- package/framework/templates/context/CONTEXT.md +3 -3
- package/framework/templates/docs/clarifications.md +253 -0
- package/framework/templates/docs/onboarding.md +123 -0
- package/framework/templates/docs/schema-analysis.md +119 -0
- package/framework/templates/docs/spec.md +149 -149
- package/framework/templates/docs/ui-components.md +124 -0
- package/framework/templates/docs/ui-design-system.md +76 -0
- package/framework/templates/docs/ui-flows.md +167 -0
- package/framework/templates/docs/ui-mockups.md +98 -0
- package/framework/templates/docs/user-stories.md +34 -0
- package/framework/templates/examples/spec-examples.md +1 -1
- package/framework/templates/infrastructure/github/README.md +11 -11
- package/framework/templates/infrastructure/github/workflows/deploy-azure-app-service.yml.hbs +2 -2
- package/framework/templates/meta-prompts/parallel-workers/parallel-worker.md +2 -2
- package/framework/templates/meta-prompts/validators/pre-commit-validator.md +1 -1
- package/framework/workflows/configs/express.json +45 -0
- package/framework/workflows/configs/spec-only.json +43 -0
- package/framework/workflows/docs/enforcement-pipeline.md +8 -8
- package/framework/workflows/docs/full-morph.md +3 -3
- package/package.json +3 -1
- package/scripts/generate-refs.js +336 -0
- package/scripts/generate-standards-registry.js +44 -0
- package/scripts/validate-real.mjs +255 -0
- package/src/commands/feature/create-story.js +362 -361
- package/src/commands/feature/shard-spec.js +225 -224
- package/src/commands/feature/sprint-status.js +1 -1
- package/src/commands/generation/generate-onboarding.js +169 -0
- package/src/commands/generation/generate.js +2 -2
- package/src/commands/mcp/mcp-setup.js +315 -0
- package/src/commands/project/changes.js +66 -0
- package/src/commands/project/checkpoint.js +209 -0
- package/src/commands/project/cost.js +179 -0
- package/src/commands/project/diff.js +278 -0
- package/src/commands/project/doctor.js +55 -7
- package/src/commands/project/init.js +318 -136
- package/src/commands/project/revert.js +173 -0
- package/src/commands/project/standards.js +80 -0
- package/src/commands/project/status.js +376 -0
- package/src/commands/project/update-agents.js +23 -0
- package/src/commands/project/update.js +60 -88
- package/src/commands/state/advance-phase.js +4 -3
- package/src/commands/state/state.js +10 -3
- package/src/commands/state/validate-phase.js +19 -2
- package/src/commands/templates/template-customize.js +4 -4
- package/src/commands/templates/template-render.js +1 -1
- package/src/commands/templates/template-show.js +1 -1
- package/src/commands/validation/validate-feature.js +359 -0
- package/src/core/orchestrator.js +3 -38
- package/src/core/paths/output-schema.js +135 -0
- package/src/core/state/state-manager.js +831 -592
- package/src/core/templates/template-registry.js +2 -2
- package/src/core/workflows/workflow-detector.js +17 -1
- package/src/lib/agents/micro-agent-factory.js +1 -1
- package/src/lib/context/context-bundler.js +2 -1
- package/src/lib/detectors/claude-config-detector.js +390 -0
- package/src/lib/detectors/conversation-analyzer.js +4 -4
- package/src/lib/detectors/design-system-detector.js +6 -5
- package/src/lib/detectors/standards-generator.js +2 -2
- package/src/lib/generators/context-generator.js +539 -538
- package/src/lib/generators/recap-generator.js +1 -1
- package/src/lib/generators/settings-generator.js +210 -0
- package/src/lib/hooks/hook-executor.js +1 -1
- package/src/lib/installers/mcp-installer.js +299 -0
- package/src/lib/learning/learning-system.js +3 -3
- package/src/lib/orchestration/team-orchestrator.js +1 -1
- package/src/lib/standards/standards-context-injector.js +7 -7
- package/src/lib/threads/thread-coordinator.js +1 -1
- package/src/lib/troubleshooting/troubleshoot-grep.js +1 -1
- package/src/lib/validators/contracts/contract-compliance-validator.js +274 -273
- package/src/lib/validators/design-system/design-system-validator.js +1 -1
- package/src/lib/validators/spec-validator.js +258 -258
- package/src/lib/validators/validation-runner.js +270 -269
- package/src/utils/agents-installer.js +206 -0
- package/src/utils/claude-settings-manager.js +258 -0
- package/src/utils/file-copier.js +1 -1
- package/src/utils/hooks-installer.js +354 -28
- package/src/utils/skills-installer.js +118 -0
- package/.morph/project/context/README.md +0 -17
- package/.morph/project/context/detection-log.md +0 -16
- package/.morph/project/standards/inferred.md +0 -59
- package/framework/hooks/agent-stop/validate-and-continue.js +0 -96
- package/framework/hooks/agent-stop/validate-checkpoints.js +0 -101
- package/framework/hooks/agent-stop/validate-tests.js +0 -109
- package/framework/hooks/agent-teams/dispatch.js +0 -67
- package/framework/hooks/agent-teams/phase-advanced.js +0 -80
- package/framework/hooks/agent-teams/task-completed.js +0 -76
- package/framework/hooks/agent-teams/teammate-idle.js +0 -70
- package/framework/skills/level-1-workflows/phase-design.md +0 -213
- package/framework/skills/level-1-workflows/phase-setup.md +0 -106
- package/framework/skills/level-1-workflows/phase-uiux.md +0 -169
- package/framework/skills/level-2-domains/backend/api-designer.md +0 -59
- package/framework/skills/level-2-domains/backend/ef-modeler.md +0 -58
- package/framework/skills/level-3-technologies/README.md +0 -7
- package/framework/skills/level-4-patterns/README.md +0 -7
- package/src/commands/agents/agents-fuse.js +0 -97
- package/src/commands/agents/micro-agent.js +0 -112
- package/src/commands/agents/spawn-team.js +0 -237
- package/src/commands/agents/squad-template.js +0 -146
- package/src/commands/analytics/analytics.js +0 -176
- package/src/commands/context/context-prime.js +0 -63
- package/src/commands/context/core-four.js +0 -54
- package/src/commands/generation/generate-context.js +0 -40
- package/src/commands/project/detect-agents.js +0 -207
- package/src/commands/project/detect-workflow.js +0 -174
- package/src/commands/threads/thread-template.js +0 -103
- package/src/commands/threads/threads.js +0 -261
- package/src/commands/utils/session-summary.js +0 -291
- package/src/llm/analyzer.js +0 -215
- package/src/llm/few-shot-examples.js +0 -216
- package/src/llm/project-config-schema.json +0 -188
- package/src/llm/prompt-builder.js +0 -96
- /package/.morph/{config → framework}/agents.json +0 -0
- /package/.morph/{standards → framework/standards}/ai-agents/blazor-ui.md +0 -0
- /package/.morph/{standards → framework/standards}/ai-agents/production.md +0 -0
- /package/.morph/{standards → framework/standards}/ai-agents/setup.md +0 -0
- /package/.morph/{standards → framework/standards}/ai-agents/workflows.md +0 -0
- /package/.morph/{standards → framework/standards}/architecture/ddd/aggregates.md +0 -0
- /package/.morph/{standards → framework/standards}/architecture/ddd/entities.md +0 -0
- /package/.morph/{standards → framework/standards}/architecture/ddd/value-objects.md +0 -0
- /package/.morph/{standards → framework/standards}/backend/api/minimal-api.md +0 -0
- /package/.morph/{standards → framework/standards}/backend/api/rest.md +0 -0
- /package/.morph/{standards → framework/standards}/backend/api/validation.md +0 -0
- /package/.morph/{standards → framework/standards}/backend/authentication/passkeys.md +0 -0
- /package/.morph/{standards → framework/standards}/backend/database/ef-core.md +0 -0
- /package/.morph/{standards → framework/standards}/backend/database/migrations.md +0 -0
- /package/.morph/{standards → framework/standards}/backend/database/postgresql/database.md +0 -0
- /package/.morph/{standards → framework/standards}/backend/database/repository-patterns.md +0 -0
- /package/.morph/{standards → framework/standards}/backend/database/vector-search-rag.md +0 -0
- /package/.morph/{standards → framework/standards}/backend/dotnet/async.md +0 -0
- /package/.morph/{standards → framework/standards}/backend/dotnet/core.md +0 -0
- /package/.morph/{standards → framework/standards}/backend/dotnet/di.md +0 -0
- /package/.morph/{standards → framework/standards}/backend/dotnet/program-cs-checklist.md +0 -0
- /package/.morph/{standards → framework/standards}/backend/integrations/asaas/asaas-api.md +0 -0
- /package/.morph/{standards → framework/standards}/backend/integrations/clerk/clerk-auth.md +0 -0
- /package/.morph/{standards → framework/standards}/backend/integrations/hangfire/hangfire-jobs.md +0 -0
- /package/.morph/{standards → framework/standards}/backend/integrations/resend/resend-email.md +0 -0
- /package/.morph/{standards → framework/standards}/context/analytics.md +0 -0
- /package/.morph/{standards → framework/standards}/context/bundles.md +0 -0
- /package/.morph/{standards → framework/standards}/context/priming.md +0 -0
- /package/.morph/{standards → framework/standards}/core/architecture.md +0 -0
- /package/.morph/{standards → framework/standards}/core/coding.md +0 -0
- /package/.morph/{standards → framework/standards}/core/git-branching-strategy.md +0 -0
- /package/.morph/{standards → framework/standards}/core/git.md +0 -0
- /package/.morph/{standards → framework/standards}/core/testing.md +0 -0
- /package/.morph/{standards → framework/standards}/data/nosql/blob-storage.md +0 -0
- /package/.morph/{standards → framework/standards}/data/nosql/cache/redis.md +0 -0
- /package/.morph/{standards → framework/standards}/data/nosql/cosmos-db.md +0 -0
- /package/.morph/{standards → framework/standards}/data/vector-search/azure-ai-search.md +0 -0
- /package/.morph/{standards → framework/standards}/data/vector-search/rag-chunking.md +0 -0
- /package/.morph/{standards → framework/standards}/frontend/blazor/design-checklist.md +0 -0
- /package/.morph/{standards → framework/standards}/frontend/blazor/fluent-ui-setup.md +0 -0
- /package/.morph/{standards → framework/standards}/frontend/blazor/fluent-ui.md +0 -0
- /package/.morph/{standards → framework/standards}/frontend/blazor/html-conversion.md +0 -0
- /package/.morph/{standards → framework/standards}/frontend/blazor/lifecycle.md +0 -0
- /package/.morph/{standards → framework/standards}/frontend/blazor/pitfalls.md +0 -0
- /package/.morph/{standards → framework/standards}/frontend/blazor/state.md +0 -0
- /package/.morph/{standards → framework/standards}/frontend/design-system/animations.md +0 -0
- /package/.morph/{standards → framework/standards}/frontend/design-system/naming.md +0 -0
- /package/.morph/{standards → framework/standards}/infrastructure/azure/azure.md +0 -0
- /package/.morph/{standards → framework/standards}/infrastructure/azure/bicep/bicep-patterns.md +0 -0
- /package/.morph/{standards → framework/standards}/infrastructure/azure/devops/azure-devops-setup.md +0 -0
- /package/.morph/{standards → framework/standards}/infrastructure/azure/devops/local-development.md +0 -0
- /package/.morph/{standards → framework/standards}/infrastructure/azure/services/functions.md +0 -0
- /package/.morph/{standards → framework/standards}/infrastructure/azure/services/service-bus.md +0 -0
- /package/.morph/{standards → framework/standards}/infrastructure/azure/services/storage.md +0 -0
- /package/.morph/{standards → framework/standards}/infrastructure/docker/easypanel-deploy.md +0 -0
- /package/.morph/{standards → framework/standards}/infrastructure/supabase/mcp-setup.md +0 -0
- /package/.morph/{standards → framework/standards}/infrastructure/supabase/supabase-auth.md +0 -0
- /package/.morph/{standards → framework/standards}/infrastructure/supabase/supabase-pgvector.md +0 -0
- /package/.morph/{standards → framework/standards}/infrastructure/supabase/supabase-rls.md +0 -0
- /package/.morph/{standards → framework/standards}/infrastructure/supabase/supabase-storage.md +0 -0
- /package/.morph/{standards → framework/standards}/integration/api/graphql.md +0 -0
- /package/.morph/{standards → framework/standards}/integration/api/grpc.md +0 -0
- /package/.morph/{standards → framework/standards}/integration/api/rest-design.md +0 -0
- /package/.morph/{standards → framework/standards}/integration/event-driven/cqrs.md +0 -0
- /package/.morph/{standards → framework/standards}/integration/event-driven/event-sourcing.md +0 -0
- /package/.morph/{standards → framework/standards}/integration/event-driven/service-bus.md +0 -0
- /package/.morph/{standards → framework/standards}/observability/logging.md +0 -0
- /package/.morph/{standards → framework/standards}/observability/metrics.md +0 -0
- /package/.morph/{standards → framework/standards}/observability/monitoring.md +0 -0
- /package/.morph/{standards → framework/standards}/observability/tracing.md +0 -0
- /package/.morph/{standards → framework/standards}/workflows/parallel-execution.md +0 -0
- /package/.morph/{standards → framework/standards}/workflows/thread-management.md +0 -0
- /package/.morph/{templates → framework/templates}/.idea/morph-templates.xml +0 -0
- /package/.morph/{templates → framework/templates}/.vscode/morph-templates.code-snippets +0 -0
- /package/.morph/{templates → framework/templates}/IDE-SNIPPETS.md +0 -0
- /package/.morph/{templates → framework/templates}/code/dotnet/backend/repository.cs +0 -0
- /package/.morph/{templates → framework/templates}/code/dotnet/backend/service.cs +0 -0
- /package/.morph/{templates → framework/templates}/code/dotnet/contracts/Commands.cs +0 -0
- /package/.morph/{templates → framework/templates}/code/dotnet/contracts/Entities.cs +0 -0
- /package/.morph/{templates → framework/templates}/code/dotnet/contracts/Queries.cs +0 -0
- /package/.morph/{templates → framework/templates}/code/dotnet/contracts/README.md +0 -0
- /package/.morph/{templates → framework/templates}/code/dotnet/contracts/api-contracts.cs +0 -0
- /package/.morph/{templates → framework/templates}/code/dotnet/contracts/contracts.cs +0 -0
- /package/.morph/{templates → framework/templates}/code/dotnet/database/migration.cs +0 -0
- /package/.morph/{templates → framework/templates}/code/dotnet/frontend/component.razor +0 -0
- /package/.morph/{templates → framework/templates}/code/dotnet/jobs/agent.cs +0 -0
- /package/.morph/{templates → framework/templates}/code/dotnet/jobs/job.cs +0 -0
- /package/.morph/{templates → framework/templates}/code/dotnet/test.cs +0 -0
- /package/.morph/{templates → framework/templates}/code/sql/rls-policy.sql +0 -0
- /package/.morph/{templates → framework/templates}/code/sql/supabase-migration.sql +0 -0
- /package/.morph/{templates → framework/templates}/code/sql/supabase-migration.template.sql +0 -0
- /package/.morph/{templates → framework/templates}/code/typescript/contracts.ts +0 -0
- /package/.morph/{templates → framework/templates}/docs/proposal.md +0 -0
- /package/.morph/{templates → framework/templates}/examples/design-system-examples.md +0 -0
- /package/.morph/{templates → framework/templates}/feature/decisions.md +0 -0
- /package/.morph/{templates → framework/templates}/feature/recap.md +0 -0
- /package/.morph/{templates → framework/templates}/feature/tasks.md +0 -0
- /package/.morph/{templates → framework/templates}/infrastructure/azure/Dockerfile.example +0 -0
- /package/.morph/{templates → framework/templates}/infrastructure/azure/README.md +0 -0
- /package/.morph/{templates → framework/templates}/infrastructure/azure/app-insights.bicep +0 -0
- /package/.morph/{templates → framework/templates}/infrastructure/azure/app-service.bicep +0 -0
- /package/.morph/{templates → framework/templates}/infrastructure/azure/container-app-env.bicep +0 -0
- /package/.morph/{templates → framework/templates}/infrastructure/azure/container-app.bicep +0 -0
- /package/.morph/{templates → framework/templates}/infrastructure/azure/deploy-checklist.md +0 -0
- /package/.morph/{templates → framework/templates}/infrastructure/azure/deploy.ps1 +0 -0
- /package/.morph/{templates → framework/templates}/infrastructure/azure/deploy.sh +0 -0
- /package/.morph/{templates → framework/templates}/infrastructure/azure/key-vault.bicep +0 -0
- /package/.morph/{templates → framework/templates}/infrastructure/azure/main.bicep +0 -0
- /package/.morph/{templates → framework/templates}/infrastructure/azure/parameters.dev.json +0 -0
- /package/.morph/{templates → framework/templates}/infrastructure/azure/parameters.prod.json +0 -0
- /package/.morph/{templates → framework/templates}/infrastructure/azure/parameters.staging.json +0 -0
- /package/.morph/{templates → framework/templates}/infrastructure/azure/sql-database.bicep +0 -0
- /package/.morph/{templates → framework/templates}/infrastructure/azure/storage.bicep +0 -0
- /package/.morph/{templates → framework/templates}/infrastructure/docker/Dockerfile.template +0 -0
- /package/.morph/{templates → framework/templates}/infrastructure/docker/docker-compose.template.yml +0 -0
- /package/.morph/{templates → framework/templates}/infrastructure/docker/dockerfile-api.dockerfile +0 -0
- /package/.morph/{templates → framework/templates}/infrastructure/docker/dockerfile-web.dockerfile +0 -0
- /package/.morph/{templates → framework/templates}/infrastructure/docker/easypanel.template.json +0 -0
- /package/.morph/{templates → framework/templates}/infrastructure/github/actions/azure-auth/action.yml.hbs +0 -0
- /package/.morph/{templates → framework/templates}/infrastructure/github/actions/docker-build-push/action.yml.hbs +0 -0
- /package/.morph/{templates → framework/templates}/infrastructure/github/actions/health-check/action.yml.hbs +0 -0
- /package/.morph/{templates → framework/templates}/infrastructure/github/workflows/deploy-easypanel.yml.hbs +0 -0
- /package/.morph/{templates → framework/templates}/infrastructure/github/workflows/docker-build-push.yml.hbs +0 -0
- /package/.morph/{templates → framework/templates}/infrastructure/github/workflows/dotnet-build.yml.hbs +0 -0
- /package/.morph/{templates → framework/templates}/integrations/asaas-client.cs +0 -0
- /package/.morph/{templates → framework/templates}/integrations/asaas-webhook.cs +0 -0
- /package/.morph/{templates → framework/templates}/integrations/azure-identity-config.cs +0 -0
- /package/.morph/{templates → framework/templates}/integrations/clerk-config.cs +0 -0
- /package/.morph/{templates → framework/templates}/meta-prompts/fusion/fusion-agent.md +0 -0
- /package/.morph/{templates → framework/templates}/meta-prompts/fusion/fusion-aggregator.md +0 -0
- /package/.morph/{templates → framework/templates}/meta-prompts/hops/hop-retry.md +0 -0
- /package/.morph/{templates → framework/templates}/meta-prompts/hops/hop-validation.md +0 -0
- /package/.morph/{templates → framework/templates}/meta-prompts/hops/hop-wrapper.md +0 -0
- /package/.morph/{templates → framework/templates}/meta-prompts/parallel-workers/parallel-coordinator.md +0 -0
- /package/.morph/{templates → framework/templates}/meta-prompts/squad-leaders/backend-squad.md +0 -0
- /package/.morph/{templates → framework/templates}/meta-prompts/squad-leaders/frontend-squad.md +0 -0
- /package/.morph/{templates → framework/templates}/meta-prompts/squad-leaders/squad-leader.md +0 -0
- /package/.morph/{templates → framework/templates}/meta-prompts/validators/checkpoint-validator.md +0 -0
- /package/.morph/{templates → framework/templates}/saas/subscription.cs +0 -0
- /package/.morph/{templates → framework/templates}/saas/tenant.cs +0 -0
- /package/.morph/{templates → framework/templates}/state.template.json +0 -0
- /package/.morph/{templates → framework/templates}/ui/FluentDesignTheme.cs +0 -0
- /package/.morph/{templates → framework/templates}/ui/MudTheme.cs +0 -0
- /package/.morph/{templates → framework/templates}/ui/design-system.css +0 -0
- /package/framework/{skills/level-2-domains → agents}/README.md +0 -0
- /package/framework/hooks/{commit-msg → git/commit-msg}/conventional-commits.sh +0 -0
- /package/framework/hooks/{pre-commit → git/pre-commit}/agents.sh +0 -0
- /package/framework/hooks/{pre-commit → git/pre-commit}/orchestrator.sh +0 -0
- /package/framework/hooks/{pre-commit → git/pre-commit}/specs.sh +0 -0
- /package/framework/hooks/{pre-push → git/pre-push}/run-tests.sh +0 -0
|
@@ -0,0 +1,77 @@
|
|
|
1
|
+
# MORPH-SPEC Runtime Instructions
|
|
2
|
+
|
|
3
|
+
> by Polymorphism Tech — Spec-driven development for .NET/Blazor/Next.js/Azure
|
|
4
|
+
|
|
5
|
+
---
|
|
6
|
+
|
|
7
|
+
## Project Context
|
|
8
|
+
|
|
9
|
+
@.morph/context/README.md
|
|
10
|
+
|
|
11
|
+
---
|
|
12
|
+
|
|
13
|
+
## Critical Rules
|
|
14
|
+
|
|
15
|
+
**NEVER:**
|
|
16
|
+
- Skip to code without a specification
|
|
17
|
+
- Implement without design approval
|
|
18
|
+
- Ignore standards in `.morph/framework/standards/`
|
|
19
|
+
- Create infrastructure manually
|
|
20
|
+
- Generate code without defined contracts
|
|
21
|
+
|
|
22
|
+
**ALWAYS:**
|
|
23
|
+
- Follow the mandatory phases
|
|
24
|
+
- Generate outputs in `.morph/features/{feature}/`
|
|
25
|
+
- Document decisions in `decisions.md`
|
|
26
|
+
- Checkpoint every 3 implemented tasks
|
|
27
|
+
- Use Infrastructure as Code
|
|
28
|
+
|
|
29
|
+
---
|
|
30
|
+
|
|
31
|
+
## Quick Reference
|
|
32
|
+
|
|
33
|
+
| Command | Purpose |
|
|
34
|
+
|---------|---------|
|
|
35
|
+
| `/morph-proposal {feature}` | Full spec pipeline (phases 1–4, pauses for approval) |
|
|
36
|
+
| `/morph-apply {feature}` | Implement feature (phase 5) |
|
|
37
|
+
| `/morph-status` | Feature status dashboard |
|
|
38
|
+
| `/morph-preflight` | Pre-implementation validation |
|
|
39
|
+
|
|
40
|
+
---
|
|
41
|
+
|
|
42
|
+
## State & Outputs
|
|
43
|
+
|
|
44
|
+
| Path | Notes |
|
|
45
|
+
|------|-------|
|
|
46
|
+
| `.morph/state.json` | **READ-ONLY** — use `morph-spec` CLI to update |
|
|
47
|
+
| `.morph/features/{feature}/{phase}/` | Feature outputs organized by phase |
|
|
48
|
+
| `.morph/framework/` | **READ-ONLY** — framework files managed by morph-spec |
|
|
49
|
+
| `.morph/config/config.json` | Project configuration (editable) |
|
|
50
|
+
|
|
51
|
+
---
|
|
52
|
+
|
|
53
|
+
## Phase Sequence
|
|
54
|
+
|
|
55
|
+
```
|
|
56
|
+
proposal → setup → [uiux] → design → clarify → tasks → implement → [sync]
|
|
57
|
+
```
|
|
58
|
+
|
|
59
|
+
Use `morph-spec state show {feature}` to see current phase and pending approval gates.
|
|
60
|
+
|
|
61
|
+
---
|
|
62
|
+
|
|
63
|
+
## Agents
|
|
64
|
+
|
|
65
|
+
Tier-1 and tier-2 MORPH agents are available as native subagents in `.claude/agents/`.
|
|
66
|
+
They can be invoked directly by Claude Code during multi-agent workflows.
|
|
67
|
+
|
|
68
|
+
---
|
|
69
|
+
|
|
70
|
+
## Context Window Tip
|
|
71
|
+
|
|
72
|
+
When using 3+ MCPs, add `"experimental": { "mcpCliMode": true }` to `.claude/settings.json`.
|
|
73
|
+
MCP tools load on-demand instead of all at startup — keeps context clean for actual work.
|
|
74
|
+
|
|
75
|
+
---
|
|
76
|
+
|
|
77
|
+
*MORPH-SPEC v4.5.0 by Polymorphism Tech*
|
|
@@ -1,9 +1,13 @@
|
|
|
1
|
+
---
|
|
2
|
+
name: ai-system-architect
|
|
3
|
+
description: AI System Architect specialist for designing multi-agent systems, LLM orchestration, RAG pipelines, and Semantic Kernel patterns. Use when designing AI agent architectures, implementing LLM-powered features, building RAG pipelines, or integrating Microsoft Agent Framework.
|
|
4
|
+
allowed-tools: Read, Write, Edit, Bash, Glob, Grep
|
|
5
|
+
---
|
|
6
|
+
|
|
1
7
|
# AI System Architect
|
|
2
8
|
|
|
3
9
|
Expert in agentic system architecture, multi-agent orchestration, and RAG pipelines.
|
|
4
10
|
|
|
5
|
-
> **Layer:** 2 | **Load:** on-keyword | **Keywords:** orchestration, multi-agent, rag, vector search, embedding, agentic, memory, reasoning
|
|
6
|
-
|
|
7
11
|
> **Ref:** `framework/standards/ai-agents/workflows.md` — Workflow patterns with AgentWorkflowBuilder
|
|
8
12
|
> **Ref:** `framework/standards/ai-agents/production.md` — Middleware, A2A, MCP, caching
|
|
9
13
|
> **Ref:** `framework/standards/backend/database/vector-search-rag.md` — Vector Search + RAG with EF Core 10
|
|
@@ -189,4 +193,4 @@ Immutability, versioning, low cost, fallback on processing bugs, audit trail.
|
|
|
189
193
|
|
|
190
194
|
---
|
|
191
195
|
|
|
192
|
-
*MORPH-SPEC by Polymorphism Tech*
|
|
196
|
+
*MORPH-SPEC by Polymorphism Tech*
|
|
@@ -1,3 +1,9 @@
|
|
|
1
|
+
---
|
|
2
|
+
name: po-pm-advisor
|
|
3
|
+
description: PO/PM Advisor specialist for clarifying product requirements, defining acceptance criteria, writing user stories, and evaluating feature ROI. Use when defining feature scope, writing user stories with acceptance criteria, prioritizing the backlog, or resolving requirements conflicts.
|
|
4
|
+
allowed-tools: Read, Write, Edit, Bash, Glob, Grep
|
|
5
|
+
---
|
|
6
|
+
|
|
1
7
|
# PO/PM Advisor
|
|
2
8
|
|
|
3
9
|
Especialista em requisitos, priorização e gestão de produto para clarificar features e ROI.
|
|
@@ -194,4 +200,4 @@ Alertar quando detectar:
|
|
|
194
200
|
|
|
195
201
|
---
|
|
196
202
|
|
|
197
|
-
*MORPH-SPEC by Polymorphism Tech*
|
|
203
|
+
*MORPH-SPEC by Polymorphism Tech*
|
|
@@ -1,3 +1,9 @@
|
|
|
1
|
+
---
|
|
2
|
+
name: prompt-engineer
|
|
3
|
+
description: Prompt Engineer specialist for designing system prompts, few-shot examples, chain-of-thought patterns, and LLM interaction optimization. Use when building AI features, writing or improving system prompts, designing LLM agent instructions, or optimizing prompt performance.
|
|
4
|
+
allowed-tools: Read, Write, Edit, Bash, Glob, Grep
|
|
5
|
+
---
|
|
6
|
+
|
|
1
7
|
# Prompt Engineer
|
|
2
8
|
|
|
3
9
|
Especialista em engenharia de prompts para LLMs e sistemas de IA. Use PROATIVAMENTE ao construir features de IA, melhorar performance de agentes ou criar system prompts.
|
|
@@ -186,4 +192,4 @@ Explain why this approach is best.
|
|
|
186
192
|
2. **Sem formato de output**: Sempre definir estrutura esperada
|
|
187
193
|
3. **Instruções contraditórias**: Revisar consistência antes de usar
|
|
188
194
|
4. **Overloading**: Muitas instruções = confusão. Priorize as essenciais
|
|
189
|
-
5. **Falta de exemplos**: Few-shot geralmente supera zero-shot
|
|
195
|
+
5. **Falta de exemplos**: Few-shot geralmente supera zero-shot
|
|
@@ -1,3 +1,9 @@
|
|
|
1
|
+
---
|
|
2
|
+
name: seo-growth-hacker
|
|
3
|
+
description: SEO and Growth specialist for technical SEO, Core Web Vitals optimization, content strategy, and organic growth for SaaS and landing pages. Use when optimizing for search engine ranking, improving Lighthouse scores, implementing SEO for Next.js/Blazor pages, or planning content-driven growth.
|
|
4
|
+
allowed-tools: Read, Write, Edit, Bash, Glob, Grep
|
|
5
|
+
---
|
|
6
|
+
|
|
1
7
|
# SEO Growth Hacker
|
|
2
8
|
|
|
3
9
|
Especialista híbrido em SEO técnico + Content Marketing. Use PROATIVAMENTE para SaaS, microsaas, landing pages e sites que precisam de crescimento orgânico.
|
|
@@ -317,4 +323,4 @@ Keywords: `seo`, `landing page`, `saas`, `meta tags`, `core web vitals`, `blog`,
|
|
|
317
323
|
- Landing page conversion: > 3%
|
|
318
324
|
- Email open rate: > 25%
|
|
319
325
|
- Email CTR: > 3%
|
|
320
|
-
- Social engagement: > 2% engagement rate
|
|
326
|
+
- Social engagement: > 2% engagement rate
|
|
@@ -1,15 +1,19 @@
|
|
|
1
|
-
|
|
1
|
+
---
|
|
2
|
+
name: standards-architect
|
|
3
|
+
description: Standards Architect (Tier 1 Orchestrator) that enforces MORPH-SPEC naming conventions, coding standards, and cross-cutting compliance across all outputs. Always active in MORPH-SPEC workflows. Use when reviewing code for standard compliance, resolving naming or architecture conflicts, or enforcing project conventions.
|
|
4
|
+
allowed-tools: Read, Write, Edit, Bash, Glob, Grep
|
|
5
|
+
---
|
|
2
6
|
|
|
3
|
-
|
|
7
|
+
# Standards Architect
|
|
4
8
|
|
|
5
9
|
Guardiao dos padroes de codigo, nomenclatura e arquitetura. Valida aderencia aos standards antes de aprovar merges.
|
|
6
10
|
|
|
7
|
-
> **Ref:** `framework/standards/coding.md` for complete C# naming conventions and .editorconfig template.
|
|
8
|
-
> **Ref:** `framework/standards/architecture.md` for Clean Architecture layers, SOLID, service patterns.
|
|
11
|
+
> **Ref:** `framework/standards/core/coding.md` for complete C# naming conventions and .editorconfig template.
|
|
12
|
+
> **Ref:** `framework/standards/core/architecture.md` for Clean Architecture layers, SOLID, service patterns.
|
|
9
13
|
|
|
10
14
|
## Responsabilidades
|
|
11
15
|
|
|
12
|
-
1. **Garantir aderencia aos padroes** definidos em `framework/standards/` e `.morph/
|
|
16
|
+
1. **Garantir aderencia aos padroes** definidos em `framework/standards/` e `.morph/context/`
|
|
13
17
|
2. **Validar nomenclatura** contra `coding.md` (PascalCase, _camelCase, etc.)
|
|
14
18
|
3. **Revisar codigo** antes de aprovar merges
|
|
15
19
|
4. **Definir convencoes** de projeto
|
|
@@ -153,4 +157,4 @@ src/
|
|
|
153
157
|
|
|
154
158
|
---
|
|
155
159
|
|
|
156
|
-
*MORPH-SPEC by Polymorphism Tech*
|
|
160
|
+
*MORPH-SPEC by Polymorphism Tech*
|
|
@@ -0,0 +1,103 @@
|
|
|
1
|
+
---
|
|
2
|
+
name: api-designer
|
|
3
|
+
description: API Designer specialist for REST API design, OpenAPI/Swagger specs, endpoint architecture, and HTTP contract definitions. Use when designing API endpoints, creating OpenAPI specs, defining REST contracts, or implementing Minimal API controllers in .NET.
|
|
4
|
+
allowed-tools: Read, Write, Edit, Bash, Glob, Grep
|
|
5
|
+
---
|
|
6
|
+
|
|
7
|
+
# API Designer
|
|
8
|
+
|
|
9
|
+
REST API design specialist for .NET Minimal API. Focuses on clean endpoint design, DTO contracts, and HTTP semantics.
|
|
10
|
+
|
|
11
|
+
## Standards
|
|
12
|
+
|
|
13
|
+
- `framework/standards/backend/api/rest.md`
|
|
14
|
+
- `framework/standards/backend/api/validation.md`
|
|
15
|
+
- `framework/standards/backend/dotnet/async.md`
|
|
16
|
+
- `framework/standards/core/coding.md`
|
|
17
|
+
|
|
18
|
+
---
|
|
19
|
+
|
|
20
|
+
## Minimal API Pattern
|
|
21
|
+
|
|
22
|
+
```csharp
|
|
23
|
+
// Endpoint group — one file per feature
|
|
24
|
+
public static class PhotoProcessingEndpoints
|
|
25
|
+
{
|
|
26
|
+
public static IEndpointRouteBuilder MapPhotoProcessing(this IEndpointRouteBuilder app)
|
|
27
|
+
{
|
|
28
|
+
var group = app.MapGroup("/api/photos").RequireAuthorization();
|
|
29
|
+
|
|
30
|
+
group.MapPost("/upload", UploadAsync)
|
|
31
|
+
.DisableAntiforgery();
|
|
32
|
+
|
|
33
|
+
group.MapGet("/status/{jobId:guid}", GetStatusAsync);
|
|
34
|
+
group.MapGet("/download/{jobId:guid}", DownloadAsync);
|
|
35
|
+
|
|
36
|
+
return app;
|
|
37
|
+
}
|
|
38
|
+
|
|
39
|
+
private static async Task<IResult> UploadAsync(
|
|
40
|
+
IFormFile file,
|
|
41
|
+
IPhotoProcessingService service,
|
|
42
|
+
ClaimsPrincipal user,
|
|
43
|
+
CancellationToken ct)
|
|
44
|
+
{
|
|
45
|
+
var result = await service.UploadAsync(new(file, user.GetUserId()), ct);
|
|
46
|
+
return result.IsSuccess
|
|
47
|
+
? TypedResults.Ok(new { result.Value.JobId })
|
|
48
|
+
: TypedResults.ValidationProblem(result.Errors);
|
|
49
|
+
}
|
|
50
|
+
}
|
|
51
|
+
```
|
|
52
|
+
|
|
53
|
+
## HTTP Status Codes
|
|
54
|
+
|
|
55
|
+
| Scenario | Code | Method |
|
|
56
|
+
|----------|------|--------|
|
|
57
|
+
| Created resource | 201 | `TypedResults.Created(location, dto)` |
|
|
58
|
+
| Success, no body | 204 | `TypedResults.NoContent()` |
|
|
59
|
+
| Validation error | 400 | `TypedResults.ValidationProblem(errors)` |
|
|
60
|
+
| Unauthorized | 401 | `TypedResults.Unauthorized()` |
|
|
61
|
+
| Forbidden | 403 | `TypedResults.Forbid()` |
|
|
62
|
+
| Not found | 404 | `TypedResults.NotFound()` |
|
|
63
|
+
| Server error | 500 | let exception middleware handle |
|
|
64
|
+
|
|
65
|
+
## DTO Rules
|
|
66
|
+
|
|
67
|
+
```csharp
|
|
68
|
+
// Request DTOs: record + required init
|
|
69
|
+
public record UploadPhotoCommand(IFormFile Photo, Guid UserId);
|
|
70
|
+
|
|
71
|
+
// Response DTOs: include only what UI needs
|
|
72
|
+
public record JobStatusDto(Guid JobId, ProcessingStatus Status, string? DownloadUrl, DateTime CreatedAt);
|
|
73
|
+
|
|
74
|
+
// Never expose domain entities directly — always map to DTO
|
|
75
|
+
```
|
|
76
|
+
|
|
77
|
+
## Validation (FluentValidation)
|
|
78
|
+
|
|
79
|
+
```csharp
|
|
80
|
+
public class UploadPhotoCommandValidator : AbstractValidator<UploadPhotoCommand>
|
|
81
|
+
{
|
|
82
|
+
public UploadPhotoCommandValidator()
|
|
83
|
+
{
|
|
84
|
+
RuleFor(x => x.Photo).NotNull();
|
|
85
|
+
RuleFor(x => x.Photo.Length).LessThanOrEqualTo(10 * 1024 * 1024)
|
|
86
|
+
.WithMessage("File must be under 10MB");
|
|
87
|
+
RuleFor(x => x.Photo.ContentType)
|
|
88
|
+
.Must(t => t is "image/jpeg" or "image/png")
|
|
89
|
+
.WithMessage("Only JPG and PNG are allowed");
|
|
90
|
+
}
|
|
91
|
+
}
|
|
92
|
+
```
|
|
93
|
+
|
|
94
|
+
## Collaborates With
|
|
95
|
+
|
|
96
|
+
- **dotnet-senior** — service layer consumed by endpoints
|
|
97
|
+
- **ef-modeler** — entity → DTO mapping
|
|
98
|
+
- **blazor-builder** — frontend consuming API
|
|
99
|
+
- **testing-specialist** — integration tests
|
|
100
|
+
|
|
101
|
+
---
|
|
102
|
+
|
|
103
|
+
*MORPH-SPEC by Polymorphism Tech*
|
|
@@ -1,3 +1,9 @@
|
|
|
1
|
+
---
|
|
2
|
+
name: dotnet-senior
|
|
3
|
+
description: Senior .NET engineer and Backend Squad Leader for C#, Minimal API, async patterns, and Clean Architecture implementation. Use when implementing .NET/C# services, designing backend architecture, implementing async operations with CancellationToken, or coordinating backend domain specialists.
|
|
4
|
+
allowed-tools: Read, Write, Edit, Bash, Glob, Grep
|
|
5
|
+
---
|
|
6
|
+
|
|
1
7
|
# .NET Senior Engineer
|
|
2
8
|
|
|
3
9
|
**Tier:** 2 (Domain Leader)
|
|
@@ -74,4 +80,4 @@ framework/standards/backend/api/rest.md
|
|
|
74
80
|
|
|
75
81
|
---
|
|
76
82
|
|
|
77
|
-
*MORPH-SPEC by Polymorphism Tech*
|
|
83
|
+
*MORPH-SPEC by Polymorphism Tech*
|
|
@@ -0,0 +1,119 @@
|
|
|
1
|
+
---
|
|
2
|
+
name: ef-modeler
|
|
3
|
+
description: Entity Framework Modeler specialist for database schema design, EF Core migrations, DbContext configuration, and ORM patterns including IDbContextFactory. Use when designing database models, creating EF Core migrations, configuring DbContext, or implementing repository patterns with EF Core.
|
|
4
|
+
allowed-tools: Read, Write, Edit, Bash, Glob, Grep
|
|
5
|
+
---
|
|
6
|
+
|
|
7
|
+
# EF Modeler
|
|
8
|
+
|
|
9
|
+
Entity Framework Core specialist for database modeling, entities, configurations, and migrations.
|
|
10
|
+
|
|
11
|
+
## Standards
|
|
12
|
+
|
|
13
|
+
- `framework/standards/backend/database/ef-core.md`
|
|
14
|
+
- `framework/standards/backend/database/migrations.md`
|
|
15
|
+
- `framework/standards/backend/database/repository-patterns.md`
|
|
16
|
+
- `framework/standards/core/coding.md`
|
|
17
|
+
|
|
18
|
+
---
|
|
19
|
+
|
|
20
|
+
## Entity Pattern
|
|
21
|
+
|
|
22
|
+
```csharp
|
|
23
|
+
// Private setters + factory method + domain state methods
|
|
24
|
+
public sealed class ProcessingJob
|
|
25
|
+
{
|
|
26
|
+
private ProcessingJob() { } // EF constructor
|
|
27
|
+
|
|
28
|
+
public Guid Id { get; private set; }
|
|
29
|
+
public string OriginalPhotoUrl { get; private set; } = default!;
|
|
30
|
+
public string? ProcessedPhotoUrl { get; private set; }
|
|
31
|
+
public ProcessingStatus Status { get; private set; }
|
|
32
|
+
public int RetryCount { get; private set; }
|
|
33
|
+
public DateTime CreatedAt { get; private set; }
|
|
34
|
+
public DateTime UpdatedAt { get; private set; }
|
|
35
|
+
|
|
36
|
+
// Factory method — enforces invariants at creation
|
|
37
|
+
public static ProcessingJob Create(string originalPhotoUrl)
|
|
38
|
+
{
|
|
39
|
+
ArgumentException.ThrowIfNullOrEmpty(originalPhotoUrl);
|
|
40
|
+
return new() { Id = Guid.NewGuid(), OriginalPhotoUrl = originalPhotoUrl,
|
|
41
|
+
Status = ProcessingStatus.Pending, CreatedAt = DateTime.UtcNow,
|
|
42
|
+
UpdatedAt = DateTime.UtcNow };
|
|
43
|
+
}
|
|
44
|
+
|
|
45
|
+
// Domain state methods — encapsulate transitions
|
|
46
|
+
public void MarkProcessing() => (Status, UpdatedAt) = (ProcessingStatus.Processing, DateTime.UtcNow);
|
|
47
|
+
|
|
48
|
+
public void MarkCompleted(string processedUrl)
|
|
49
|
+
{
|
|
50
|
+
ProcessedPhotoUrl = processedUrl;
|
|
51
|
+
Status = ProcessingStatus.Completed;
|
|
52
|
+
UpdatedAt = DateTime.UtcNow;
|
|
53
|
+
}
|
|
54
|
+
|
|
55
|
+
public void MarkFailed() { RetryCount++; Status = RetryCount >= 3 ? ProcessingStatus.Failed : ProcessingStatus.Pending;
|
|
56
|
+
UpdatedAt = DateTime.UtcNow; }
|
|
57
|
+
}
|
|
58
|
+
```
|
|
59
|
+
|
|
60
|
+
## Configuration Pattern
|
|
61
|
+
|
|
62
|
+
```csharp
|
|
63
|
+
// One IEntityTypeConfiguration per entity — never configure in OnModelCreating
|
|
64
|
+
public sealed class ProcessingJobConfiguration : IEntityTypeConfiguration<ProcessingJob>
|
|
65
|
+
{
|
|
66
|
+
public void Configure(EntityTypeBuilder<ProcessingJob> builder)
|
|
67
|
+
{
|
|
68
|
+
builder.HasKey(j => j.Id);
|
|
69
|
+
builder.Property(j => j.OriginalPhotoUrl).HasMaxLength(500).IsRequired();
|
|
70
|
+
builder.Property(j => j.ProcessedPhotoUrl).HasMaxLength(500);
|
|
71
|
+
builder.Property(j => j.Status).HasConversion<int>();
|
|
72
|
+
builder.Property(j => j.CreatedAt).HasDefaultValueSql("GETUTCDATE()");
|
|
73
|
+
builder.HasIndex(j => j.Status); // index frequently filtered columns
|
|
74
|
+
}
|
|
75
|
+
}
|
|
76
|
+
```
|
|
77
|
+
|
|
78
|
+
## Migration Checklist
|
|
79
|
+
|
|
80
|
+
```bash
|
|
81
|
+
# 1. Create migration
|
|
82
|
+
dotnet ef migrations add AddProcessingJob --project src/Infrastructure --startup-project src/Web
|
|
83
|
+
|
|
84
|
+
# 2. Review generated migration — check Up() and Down() for correctness
|
|
85
|
+
# 3. Apply
|
|
86
|
+
dotnet ef database update --project src/Infrastructure --startup-project src/Web
|
|
87
|
+
```
|
|
88
|
+
|
|
89
|
+
- Never use `EnsureCreated()` in production — always explicit migrations
|
|
90
|
+
- Never edit a migration that's been applied to a shared environment — add a new one
|
|
91
|
+
- Soft-delete columns: add nullable `DeletedAt`, filter in repository (`HasQueryFilter`)
|
|
92
|
+
|
|
93
|
+
## IDbContextFactory (Background Jobs)
|
|
94
|
+
|
|
95
|
+
```csharp
|
|
96
|
+
// DbContext is HTTP-scoped — background jobs MUST use IDbContextFactory
|
|
97
|
+
public class PhotoProcessingJob(IDbContextFactory<AppDbContext> dbFactory)
|
|
98
|
+
{
|
|
99
|
+
public async Task ProcessAsync(Guid jobId, CancellationToken ct)
|
|
100
|
+
{
|
|
101
|
+
await using var db = await dbFactory.CreateDbContextAsync(ct);
|
|
102
|
+
var job = await db.ProcessingJobs.FindAsync([jobId], ct)
|
|
103
|
+
?? throw new InvalidOperationException($"Job {jobId} not found");
|
|
104
|
+
job.MarkProcessing();
|
|
105
|
+
await db.SaveChangesAsync(ct);
|
|
106
|
+
// ... process ...
|
|
107
|
+
}
|
|
108
|
+
}
|
|
109
|
+
```
|
|
110
|
+
|
|
111
|
+
## Collaborates With
|
|
112
|
+
|
|
113
|
+
- **dotnet-senior** — service layer consuming repositories
|
|
114
|
+
- **api-designer** — DTO mapping from entities
|
|
115
|
+
- **azure-architect** — Azure SQL / Cosmos DB provisioning
|
|
116
|
+
|
|
117
|
+
---
|
|
118
|
+
|
|
119
|
+
*MORPH-SPEC by Polymorphism Tech*
|
|
@@ -1,6 +1,10 @@
|
|
|
1
|
-
|
|
1
|
+
---
|
|
2
|
+
name: hangfire-orchestrator
|
|
3
|
+
description: Hangfire Orchestrator specialist for background job design, recurring task scheduling, queue management, and idempotent job patterns in .NET. Use when implementing background jobs, scheduling recurring tasks, managing job queues, or integrating Hangfire with .NET services.
|
|
4
|
+
allowed-tools: Read, Write, Edit, Bash, Glob, Grep
|
|
5
|
+
---
|
|
2
6
|
|
|
3
|
-
|
|
7
|
+
# Hangfire Orchestrator
|
|
4
8
|
|
|
5
9
|
Especialista em background jobs, tarefas agendadas e processamento assíncrono com Hangfire.
|
|
6
10
|
|
|
@@ -62,7 +66,7 @@ app.UseHangfireDashboard("/hangfire", new DashboardOptions
|
|
|
62
66
|
|
|
63
67
|
## CRITICAL: Scoped Repository Pattern
|
|
64
68
|
|
|
65
|
-
> **Ref:** `framework/standards/
|
|
69
|
+
> **Ref:** `framework/standards/backend/database/ef-core.md` — Repository Factory pattern
|
|
66
70
|
|
|
67
71
|
**Hangfire jobs run OUTSIDE the HTTP request.** The scoped DbContext does NOT exist.
|
|
68
72
|
|
|
@@ -123,4 +127,4 @@ public class HangfireAuthorizationFilter : IDashboardAuthorizationFilter
|
|
|
123
127
|
|
|
124
128
|
---
|
|
125
129
|
|
|
126
|
-
*MORPH-SPEC by Polymorphism Tech*
|
|
130
|
+
*MORPH-SPEC by Polymorphism Tech*
|
|
@@ -1,6 +1,10 @@
|
|
|
1
|
-
|
|
1
|
+
---
|
|
2
|
+
name: ms-agent-expert
|
|
3
|
+
description: Microsoft Agent Framework Expert for Semantic Kernel, AI extensions, function calling, MCP/A2A protocols, and agentic pipeline implementation. Use when building AI agents with Semantic Kernel, implementing tool/plugin calling, designing multi-agent workflows, or integrating LLMs with .NET services.
|
|
4
|
+
allowed-tools: Read, Write, Edit, Bash, Glob, Grep
|
|
5
|
+
---
|
|
2
6
|
|
|
3
|
-
|
|
7
|
+
# Agent Framework Expert
|
|
4
8
|
|
|
5
9
|
## Identity
|
|
6
10
|
|
|
@@ -42,4 +46,4 @@ When working on AI agent tasks:
|
|
|
42
46
|
|
|
43
47
|
---
|
|
44
48
|
|
|
45
|
-
*MORPH-SPEC by Polymorphism Tech*
|
|
49
|
+
*MORPH-SPEC by Polymorphism Tech*
|
|
@@ -1,3 +1,9 @@
|
|
|
1
|
+
---
|
|
2
|
+
name: blazor-builder
|
|
3
|
+
description: Blazor Builder specialist for .NET + Blazor Server stack, Razor components, Fluent UI Blazor, MudBlazor, and .NET 10 patterns. Use when implementing Blazor components and pages, configuring Program.cs, handling Blazor lifecycle patterns, or choosing between Fluent UI and MudBlazor libraries.
|
|
4
|
+
allowed-tools: Read, Write, Edit, Bash, Glob, Grep
|
|
5
|
+
---
|
|
6
|
+
|
|
1
7
|
# .NET + Blazor Stack
|
|
2
8
|
|
|
3
9
|
Stack principal para aplicações web com .NET e Blazor Server.
|
|
@@ -11,8 +17,6 @@ Stack principal para aplicações web com .NET e Blazor Server.
|
|
|
11
17
|
| **Background** | Hangfire |
|
|
12
18
|
| **AI** | Microsoft Agent Framework |
|
|
13
19
|
|
|
14
|
-
**Triggers:** `blazor`, `razor`, `server-side`, `.net`, `csharp`, `dotnet`
|
|
15
|
-
|
|
16
20
|
---
|
|
17
21
|
|
|
18
22
|
## Critical Standards (Read FIRST)
|
|
@@ -207,4 +211,4 @@ builder.Services.AddOpenTelemetry()
|
|
|
207
211
|
|
|
208
212
|
---
|
|
209
213
|
|
|
210
|
-
*MORPH-SPEC by Polymorphism Tech*
|
|
214
|
+
*MORPH-SPEC by Polymorphism Tech*
|
|
@@ -1,6 +1,10 @@
|
|
|
1
|
-
|
|
1
|
+
---
|
|
2
|
+
name: nextjs-expert
|
|
3
|
+
description: Next.js Expert specialist for React, App Router, Pages Router, SSR/SSG patterns, and TypeScript-first frontend development. Use when implementing Next.js pages or components, configuring App Router, handling SSR/SSG, or building TypeScript React frontends.
|
|
4
|
+
allowed-tools: Read, Write, Edit, Bash, Glob, Grep
|
|
5
|
+
---
|
|
2
6
|
|
|
3
|
-
|
|
7
|
+
# .NET + Next.js Stack
|
|
4
8
|
|
|
5
9
|
| Aspect | Technology |
|
|
6
10
|
|--------|------------|
|
|
@@ -151,4 +155,4 @@ services:
|
|
|
151
155
|
|
|
152
156
|
---
|
|
153
157
|
|
|
154
|
-
*MORPH-SPEC by Polymorphism Tech*
|
|
158
|
+
*MORPH-SPEC by Polymorphism Tech*
|
|
@@ -1,10 +1,16 @@
|
|
|
1
|
+
---
|
|
2
|
+
name: ui-ux-designer
|
|
3
|
+
description: UI/UX Designer specialist for wireframes, design systems, component specs, user flows, and Fluent UI/MudBlazor component selection. Use when creating UI mockups, designing component specifications, building design systems, or deciding between UI component libraries for Blazor.
|
|
4
|
+
allowed-tools: Read, Write, Edit, Bash, Glob, Grep
|
|
5
|
+
---
|
|
6
|
+
|
|
1
7
|
# UI/UX Designer
|
|
2
8
|
|
|
3
9
|
Especialista em design de interfaces, UX e componentes Blazor. Domina **Fluent UI Blazor** e **MudBlazor**.
|
|
4
10
|
|
|
5
11
|
> **FASE 1.5: UI/UX DESIGN** - Obrigatória para features com front-end.
|
|
6
12
|
> Gera wireframes, specs de componentes e fluxos ANTES do design técnico.
|
|
7
|
-
> **Ref:** `framework/standards/fluent-ui
|
|
13
|
+
> **Ref:** `framework/standards/frontend/blazor/fluent-ui.md` para API details e armadilhas.
|
|
8
14
|
|
|
9
15
|
## Triggers
|
|
10
16
|
|
|
@@ -188,4 +194,4 @@ Per flow: Trigger, steps, happy path, edge cases, ASCII flowchart diagram.
|
|
|
188
194
|
|
|
189
195
|
---
|
|
190
196
|
|
|
191
|
-
*MORPH-SPEC by Polymorphism Tech*
|
|
197
|
+
*MORPH-SPEC by Polymorphism Tech*
|
|
@@ -1,3 +1,9 @@
|
|
|
1
|
+
---
|
|
2
|
+
name: azure-architect
|
|
3
|
+
description: Azure Architect specialist for designing Azure infrastructure, creating Bicep IaC templates, estimating resource costs, and enforcing zero-portal policy. Use when designing Azure architecture, provisioning cloud resources, creating Bicep templates, or planning multi-environment deployments.
|
|
4
|
+
allowed-tools: Read, Write, Edit, Bash, Glob, Grep
|
|
5
|
+
---
|
|
6
|
+
|
|
1
7
|
# Azure Architect
|
|
2
8
|
|
|
3
9
|
Especialista em infraestrutura Azure com foco em Infrastructure as Code (Bicep).
|
|
@@ -139,4 +145,4 @@ az deployment group what-if \
|
|
|
139
145
|
|
|
140
146
|
---
|
|
141
147
|
|
|
142
|
-
*MORPH-SPEC by Polymorphism Tech*
|
|
148
|
+
*MORPH-SPEC by Polymorphism Tech*
|
package/framework/{skills/level-2-domains → agents}/infrastructure/azure-deploy-specialist.md
RENAMED
|
@@ -1,3 +1,9 @@
|
|
|
1
|
+
---
|
|
2
|
+
name: azure-deploy-specialist
|
|
3
|
+
description: Azure Deploy Specialist for end-to-end deployments to Azure Container Apps using systematic playbooks, validation checklists, and accumulated deployment knowledge. Use when deploying to Azure Container Apps, debugging deployment failures, configuring CI/CD pipelines, or performing pre-flight deployment validation.
|
|
4
|
+
allowed-tools: Read, Write, Edit, Bash, Glob, Grep
|
|
5
|
+
---
|
|
6
|
+
|
|
1
7
|
# Azure Deploy Specialist
|
|
2
8
|
|
|
3
9
|
Especialista em deploy end-to-end para Azure Container Apps com abordagem de playbook rigoroso. Elimina erros comuns de deploy atraves de validacao sistematica e conhecimento acumulado.
|
|
@@ -696,4 +702,4 @@ az containerapp revision restart --name $APP --resource-group $RG --revision $re
|
|
|
696
702
|
|
|
697
703
|
---
|
|
698
704
|
|
|
699
|
-
*Azure Deploy Specialist v1.0 - MORPH-SPEC by Polymorphism Tech*
|
|
705
|
+
*Azure Deploy Specialist v1.0 - MORPH-SPEC by Polymorphism Tech*
|
|
@@ -1,6 +1,10 @@
|
|
|
1
|
-
|
|
1
|
+
---
|
|
2
|
+
name: bicep-architect
|
|
3
|
+
description: Bicep Architect specialist for Azure Infrastructure as Code, modular Bicep templates, ARM deployments, and resource configuration. Use when writing Bicep templates, structuring IaC modules, validating Azure deployments with what-if, or converting ARM JSON to Bicep.
|
|
4
|
+
allowed-tools: Read, Write, Edit, Bash, Glob, Grep
|
|
5
|
+
---
|
|
2
6
|
|
|
3
|
-
|
|
7
|
+
# Bicep Architect
|
|
4
8
|
|
|
5
9
|
Especialista em Infrastructure as Code com Azure Bicep. **Zero Portal** — all infra via code.
|
|
6
10
|
|
|
@@ -123,4 +127,4 @@ az deployment group create -g rg-app-dev -f infra/main.bicep -p @infra/parameter
|
|
|
123
127
|
|
|
124
128
|
---
|
|
125
129
|
|
|
126
|
-
*MORPH-SPEC by Polymorphism Tech*
|
|
130
|
+
*MORPH-SPEC by Polymorphism Tech*
|
|
@@ -1,6 +1,10 @@
|
|
|
1
|
-
|
|
1
|
+
---
|
|
2
|
+
name: container-specialist
|
|
3
|
+
description: Container Specialist for Docker, Compose, Azure Container Registry, and containerized .NET application patterns. Use when creating Dockerfiles, configuring multi-stage builds, setting up container registries, or containerizing .NET applications for Azure Container Apps.
|
|
4
|
+
allowed-tools: Read, Write, Edit, Bash, Glob, Grep
|
|
5
|
+
---
|
|
2
6
|
|
|
3
|
-
|
|
7
|
+
# Container Specialist
|
|
4
8
|
|
|
5
9
|
Especialista em containerização com Docker e deploy para Azure Container Apps.
|
|
6
10
|
|
|
@@ -128,4 +132,4 @@ volumes:
|
|
|
128
132
|
|
|
129
133
|
---
|
|
130
134
|
|
|
131
|
-
*MORPH-SPEC by Polymorphism Tech*
|
|
135
|
+
*MORPH-SPEC by Polymorphism Tech*
|
|
@@ -1,6 +1,10 @@
|
|
|
1
|
-
|
|
1
|
+
---
|
|
2
|
+
name: devops-engineer
|
|
3
|
+
description: DevOps Engineer (Tier 2 Domain Leader) for CI/CD pipeline strategy, GitHub Actions workflows, Azure DevOps, monitoring, and release automation. Use when designing deployment pipelines, configuring GitHub Actions, setting up Azure DevOps, or planning release strategies.
|
|
4
|
+
allowed-tools: Read, Write, Edit, Bash, Glob, Grep
|
|
5
|
+
---
|
|
2
6
|
|
|
3
|
-
|
|
7
|
+
# DevOps Engineer
|
|
4
8
|
|
|
5
9
|
Especialista em CI/CD, pipelines e automação de deploy.
|
|
6
10
|
|
|
@@ -116,4 +120,4 @@ jobs:
|
|
|
116
120
|
|
|
117
121
|
---
|
|
118
122
|
|
|
119
|
-
*MORPH-SPEC by Polymorphism Tech*
|
|
123
|
+
*MORPH-SPEC by Polymorphism Tech*
|
|
@@ -1,6 +1,10 @@
|
|
|
1
|
-
|
|
1
|
+
---
|
|
2
|
+
name: asaas-financial
|
|
3
|
+
description: Asaas Financial specialist for Asaas API integration, payment processing, Pix/boleto billing, and subscription management in Brazilian projects. Use when integrating Asaas payments, implementing billing flows, handling payment webhooks, or building subscription management features.
|
|
4
|
+
allowed-tools: Read, Write, Edit, Bash, Glob, Grep
|
|
5
|
+
---
|
|
2
6
|
|
|
3
|
-
|
|
7
|
+
# Asaas Financial
|
|
4
8
|
|
|
5
9
|
Integração com Asaas para pagamentos no Brasil. API REST, sem SDK .NET oficial. Suporta PIX, Boleto, Cartão.
|
|
6
10
|
|
|
@@ -127,4 +131,4 @@ public class AsaasWebhookController(IPaymentService payments, ILogger<AsaasWebho
|
|
|
127
131
|
|
|
128
132
|
---
|
|
129
133
|
|
|
130
|
-
*MORPH-SPEC by Polymorphism Tech*
|
|
134
|
+
*MORPH-SPEC by Polymorphism Tech*
|
|
@@ -1,6 +1,10 @@
|
|
|
1
|
-
|
|
1
|
+
---
|
|
2
|
+
name: azure-identity
|
|
3
|
+
description: Azure Identity specialist for Microsoft Entra ID, OAuth 2.0/OIDC, MSAL, JWT authentication, and enterprise SSO patterns. Use when implementing Microsoft authentication, configuring Entra ID app registrations, securing APIs with OAuth/JWT, or setting up enterprise SSO with Azure AD.
|
|
4
|
+
allowed-tools: Read, Write, Edit, Bash, Glob, Grep
|
|
5
|
+
---
|
|
2
6
|
|
|
3
|
-
|
|
7
|
+
# Azure Identity (Microsoft Identity)
|
|
4
8
|
|
|
5
9
|
Microsoft Identity Platform for .NET/Blazor. SDK: `Microsoft.Identity.Web`.
|
|
6
10
|
|
|
@@ -139,4 +143,4 @@ builder.Services.AddAuthorization(o => {
|
|
|
139
143
|
|
|
140
144
|
---
|
|
141
145
|
|
|
142
|
-
*MORPH-SPEC by Polymorphism Tech*
|
|
146
|
+
*MORPH-SPEC by Polymorphism Tech*
|