@polymorphism-tech/morph-spec 4.3.4 → 4.3.5

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.
Files changed (164) hide show
  1. package/.morph/.morphversion +5 -0
  2. package/.morph/config/agents.json +948 -0
  3. package/.morph/config/config.json +9 -9
  4. package/.morph/project/context/README.md +17 -0
  5. package/.morph/project/context/detection-log.md +16 -0
  6. package/.morph/project/standards/inferred.md +59 -0
  7. package/.morph/standards/ai-agents/blazor-ui.md +364 -0
  8. package/.morph/standards/ai-agents/production.md +415 -0
  9. package/.morph/standards/ai-agents/setup.md +418 -0
  10. package/.morph/standards/ai-agents/team-orchestration.md +479 -0
  11. package/.morph/standards/ai-agents/workflows.md +354 -0
  12. package/.morph/standards/architecture/ddd/aggregates.md +120 -0
  13. package/.morph/standards/architecture/ddd/entities.md +99 -0
  14. package/.morph/standards/architecture/ddd/value-objects.md +124 -0
  15. package/.morph/standards/backend/api/minimal-api.md +494 -0
  16. package/.morph/standards/backend/api/rest.md +492 -0
  17. package/.morph/standards/backend/api/validation.md +88 -0
  18. package/.morph/standards/backend/authentication/passkeys.md +428 -0
  19. package/.morph/standards/backend/database/ef-core.md +199 -0
  20. package/.morph/standards/backend/database/migrations.md +393 -0
  21. package/.morph/standards/backend/database/postgresql/database.md +352 -0
  22. package/.morph/standards/backend/database/repository-patterns.md +528 -0
  23. package/.morph/standards/backend/database/vector-search-rag.md +541 -0
  24. package/.morph/standards/backend/dotnet/async.md +366 -0
  25. package/.morph/standards/backend/dotnet/core.md +117 -0
  26. package/.morph/standards/backend/dotnet/di.md +439 -0
  27. package/.morph/standards/backend/dotnet/program-cs-checklist.md +92 -0
  28. package/.morph/standards/backend/integrations/asaas/asaas-api.md +216 -0
  29. package/.morph/standards/backend/integrations/clerk/clerk-auth.md +290 -0
  30. package/.morph/standards/backend/integrations/hangfire/hangfire-jobs.md +350 -0
  31. package/.morph/standards/backend/integrations/resend/resend-email.md +385 -0
  32. package/.morph/standards/context/analytics.md +96 -0
  33. package/.morph/standards/context/bundles.md +110 -0
  34. package/.morph/standards/context/priming.md +78 -0
  35. package/.morph/standards/core/architecture.md +185 -0
  36. package/.morph/standards/core/coding.md +214 -0
  37. package/.morph/standards/core/git-branching-strategy.md +403 -0
  38. package/.morph/standards/core/git.md +185 -0
  39. package/.morph/standards/core/testing.md +295 -0
  40. package/.morph/standards/data/nosql/blob-storage.md +102 -0
  41. package/.morph/standards/data/nosql/cache/redis.md +97 -0
  42. package/.morph/standards/data/nosql/cosmos-db.md +118 -0
  43. package/.morph/standards/data/vector-search/azure-ai-search.md +121 -0
  44. package/.morph/standards/data/vector-search/rag-chunking.md +104 -0
  45. package/.morph/standards/frontend/blazor/design-checklist.md +222 -0
  46. package/.morph/standards/frontend/blazor/fluent-ui-setup.md +595 -0
  47. package/.morph/standards/frontend/blazor/fluent-ui.md +137 -0
  48. package/.morph/standards/frontend/blazor/html-conversion.md +184 -0
  49. package/.morph/standards/frontend/blazor/lifecycle.md +195 -0
  50. package/.morph/standards/frontend/blazor/pitfalls.md +198 -0
  51. package/.morph/standards/frontend/blazor/state.md +191 -0
  52. package/.morph/standards/frontend/design-system/animations.md +151 -0
  53. package/.morph/standards/frontend/design-system/naming.md +64 -0
  54. package/.morph/standards/frontend/nextjs/nextjs-patterns.md +198 -0
  55. package/.morph/standards/infrastructure/azure/azure.md +624 -0
  56. package/.morph/standards/infrastructure/azure/bicep/bicep-patterns.md +422 -0
  57. package/.morph/standards/infrastructure/azure/devops/azure-devops-setup.md +516 -0
  58. package/.morph/standards/infrastructure/azure/devops/local-development.md +520 -0
  59. package/.morph/standards/infrastructure/azure/services/functions.md +486 -0
  60. package/.morph/standards/infrastructure/azure/services/service-bus.md +459 -0
  61. package/.morph/standards/infrastructure/azure/services/storage.md +407 -0
  62. package/.morph/standards/infrastructure/docker/easypanel-deploy.md +196 -0
  63. package/.morph/standards/infrastructure/supabase/mcp-setup.md +252 -0
  64. package/.morph/standards/infrastructure/supabase/supabase-auth.md +176 -0
  65. package/.morph/standards/infrastructure/supabase/supabase-pgvector.md +169 -0
  66. package/.morph/standards/infrastructure/supabase/supabase-rls.md +184 -0
  67. package/.morph/standards/infrastructure/supabase/supabase-storage.md +153 -0
  68. package/.morph/standards/integration/api/graphql.md +91 -0
  69. package/.morph/standards/integration/api/grpc.md +114 -0
  70. package/.morph/standards/integration/api/rest-design.md +95 -0
  71. package/.morph/standards/integration/event-driven/cqrs.md +101 -0
  72. package/.morph/standards/integration/event-driven/event-sourcing.md +124 -0
  73. package/.morph/standards/integration/event-driven/service-bus.md +95 -0
  74. package/.morph/standards/observability/logging.md +131 -0
  75. package/.morph/standards/observability/metrics.md +121 -0
  76. package/.morph/standards/observability/monitoring.md +114 -0
  77. package/.morph/standards/observability/tracing.md +132 -0
  78. package/.morph/standards/workflows/parallel-execution.md +112 -0
  79. package/.morph/standards/workflows/thread-management.md +113 -0
  80. package/.morph/templates/.idea/morph-templates.xml +92 -0
  81. package/.morph/templates/.vscode/morph-templates.code-snippets +186 -0
  82. package/.morph/templates/IDE-SNIPPETS.md +266 -0
  83. package/.morph/templates/README.md +814 -0
  84. package/.morph/templates/REGISTRY.json +1677 -0
  85. package/.morph/templates/code/dotnet/backend/repository.cs +141 -0
  86. package/.morph/templates/code/dotnet/backend/service.cs +139 -0
  87. package/.morph/templates/code/dotnet/contracts/Commands.cs +74 -0
  88. package/.morph/templates/code/dotnet/contracts/Entities.cs +25 -0
  89. package/.morph/templates/code/dotnet/contracts/Queries.cs +74 -0
  90. package/.morph/templates/code/dotnet/contracts/README.md +74 -0
  91. package/.morph/templates/code/dotnet/contracts/api-contracts.cs +173 -0
  92. package/.morph/templates/code/dotnet/contracts/contracts.cs +217 -0
  93. package/.morph/templates/code/dotnet/database/migration.cs +83 -0
  94. package/.morph/templates/code/dotnet/frontend/component.razor +239 -0
  95. package/.morph/templates/code/dotnet/jobs/agent.cs +163 -0
  96. package/.morph/templates/code/dotnet/jobs/job.cs +171 -0
  97. package/.morph/templates/code/dotnet/test.cs +239 -0
  98. package/.morph/templates/code/sql/rls-policy.sql +57 -0
  99. package/.morph/templates/code/sql/supabase-migration.sql +100 -0
  100. package/.morph/templates/code/sql/supabase-migration.template.sql +113 -0
  101. package/.morph/templates/code/typescript/contracts.ts +168 -0
  102. package/.morph/templates/context/CONTEXT-FEATURE.md +276 -0
  103. package/.morph/templates/context/CONTEXT.md +181 -0
  104. package/.morph/templates/docs/proposal.md +182 -0
  105. package/.morph/templates/docs/spec.md +149 -0
  106. package/.morph/templates/examples/design-system-examples.md +357 -0
  107. package/.morph/templates/examples/spec-examples.md +90 -0
  108. package/.morph/templates/feature/decisions.md +187 -0
  109. package/.morph/templates/feature/recap.md +146 -0
  110. package/.morph/templates/feature/tasks.md +199 -0
  111. package/.morph/templates/infrastructure/azure/Dockerfile.example +82 -0
  112. package/.morph/templates/infrastructure/azure/README.md +286 -0
  113. package/.morph/templates/infrastructure/azure/app-insights.bicep +63 -0
  114. package/.morph/templates/infrastructure/azure/app-service.bicep +164 -0
  115. package/.morph/templates/infrastructure/azure/container-app-env.bicep +49 -0
  116. package/.morph/templates/infrastructure/azure/container-app.bicep +156 -0
  117. package/.morph/templates/infrastructure/azure/deploy-checklist.md +426 -0
  118. package/.morph/templates/infrastructure/azure/deploy.ps1 +229 -0
  119. package/.morph/templates/infrastructure/azure/deploy.sh +208 -0
  120. package/.morph/templates/infrastructure/azure/key-vault.bicep +91 -0
  121. package/.morph/templates/infrastructure/azure/main.bicep +189 -0
  122. package/.morph/templates/infrastructure/azure/parameters.dev.json +29 -0
  123. package/.morph/templates/infrastructure/azure/parameters.prod.json +29 -0
  124. package/.morph/templates/infrastructure/azure/parameters.staging.json +29 -0
  125. package/.morph/templates/infrastructure/azure/sql-database.bicep +103 -0
  126. package/.morph/templates/infrastructure/azure/storage.bicep +106 -0
  127. package/.morph/templates/infrastructure/docker/Dockerfile.template +58 -0
  128. package/.morph/templates/infrastructure/docker/docker-compose.template.yml +67 -0
  129. package/.morph/templates/infrastructure/docker/dockerfile-api.dockerfile +38 -0
  130. package/.morph/templates/infrastructure/docker/dockerfile-web.dockerfile +48 -0
  131. package/.morph/templates/infrastructure/docker/easypanel.template.json +54 -0
  132. package/.morph/templates/infrastructure/github/README.md +593 -0
  133. package/.morph/templates/infrastructure/github/actions/azure-auth/action.yml.hbs +22 -0
  134. package/.morph/templates/infrastructure/github/actions/docker-build-push/action.yml.hbs +45 -0
  135. package/.morph/templates/infrastructure/github/actions/health-check/action.yml.hbs +27 -0
  136. package/.morph/templates/infrastructure/github/workflows/deploy-azure-app-service.yml.hbs +61 -0
  137. package/.morph/templates/infrastructure/github/workflows/deploy-easypanel.yml.hbs +31 -0
  138. package/.morph/templates/infrastructure/github/workflows/docker-build-push.yml.hbs +59 -0
  139. package/.morph/templates/infrastructure/github/workflows/dotnet-build.yml.hbs +39 -0
  140. package/.morph/templates/integrations/asaas-client.cs +387 -0
  141. package/.morph/templates/integrations/asaas-webhook.cs +351 -0
  142. package/.morph/templates/integrations/azure-identity-config.cs +288 -0
  143. package/.morph/templates/integrations/clerk-config.cs +258 -0
  144. package/.morph/templates/meta-prompts/fusion/fusion-agent.md +76 -0
  145. package/.morph/templates/meta-prompts/fusion/fusion-aggregator.md +100 -0
  146. package/.morph/templates/meta-prompts/hops/hop-retry.md +78 -0
  147. package/.morph/templates/meta-prompts/hops/hop-validation.md +97 -0
  148. package/.morph/templates/meta-prompts/hops/hop-wrapper.md +36 -0
  149. package/.morph/templates/meta-prompts/parallel-workers/parallel-coordinator.md +113 -0
  150. package/.morph/templates/meta-prompts/parallel-workers/parallel-worker.md +80 -0
  151. package/.morph/templates/meta-prompts/squad-leaders/backend-squad.md +90 -0
  152. package/.morph/templates/meta-prompts/squad-leaders/frontend-squad.md +126 -0
  153. package/.morph/templates/meta-prompts/squad-leaders/squad-leader.md +43 -0
  154. package/.morph/templates/meta-prompts/validators/checkpoint-validator.md +107 -0
  155. package/.morph/templates/meta-prompts/validators/pre-commit-validator.md +95 -0
  156. package/.morph/templates/saas/subscription.cs +347 -0
  157. package/.morph/templates/saas/tenant.cs +338 -0
  158. package/.morph/templates/state.template.json +17 -0
  159. package/.morph/templates/ui/FluentDesignTheme.cs +149 -0
  160. package/.morph/templates/ui/MudTheme.cs +281 -0
  161. package/.morph/templates/ui/design-system.css +226 -0
  162. package/bin/morph-spec.js +1 -1
  163. package/package.json +1 -1
  164. package/src/commands/project/update.js +100 -13
@@ -0,0 +1,276 @@
1
+ # {{FEATURE_NAME}} - Feature Context
2
+
3
+ > Auto-generated by MORPH-SPEC Framework
4
+ > Last updated: {{TIMESTAMP}}
5
+
6
+ ## Feature Overview
7
+
8
+ **Name:** {{FEATURE_NAME}}
9
+ **Phase:** {{PHASE}} ({{WORKFLOW_TYPE}})
10
+ **Status:** {{STATUS}}
11
+ **Complexity:** {{COMPLEXITY}}
12
+
13
+ {{#if DESCRIPTION}}
14
+ {{DESCRIPTION}}
15
+ {{/if}}
16
+
17
+ ---
18
+
19
+ ## Progress Tracking
20
+
21
+ ### Current Phase: {{PHASE}}
22
+
23
+ {{PHASE_DESCRIPTION}}
24
+
25
+ **Completed Phases:**
26
+ {{#each COMPLETED_PHASES}}
27
+ - ✅ {{name}} - {{completedAt}}
28
+ {{/each}}
29
+
30
+ **Next Phases:**
31
+ {{#each UPCOMING_PHASES}}
32
+ - ⏭️ {{name}}
33
+ {{/each}}
34
+
35
+ ### Task Progress
36
+
37
+ **Total Tasks:** {{TASKS_TOTAL}}
38
+ **Completed:** {{TASKS_COMPLETED}} ({{TASKS_PROGRESS}}%)
39
+ **In Progress:** {{TASKS_IN_PROGRESS}}
40
+ **Blocked:** {{TASKS_BLOCKED}}
41
+
42
+ {{#if CURRENT_TASK}}
43
+ **Current Task:** {{CURRENT_TASK.id}} - {{CURRENT_TASK.title}}
44
+ {{/if}}
45
+
46
+ ---
47
+
48
+ ## Active Agents ({{ACTIVE_AGENTS_COUNT}})
49
+
50
+ ### Team Structure
51
+
52
+ {{#if TEAM_LEAD}}
53
+ **Team Lead:** {{TEAM_LEAD.title}} (`{{TEAM_LEAD.id}}`)
54
+ {{/if}}
55
+
56
+ {{#each SQUADS}}
57
+ ### {{leader.title}} Squad
58
+ **Leader:** `{{leader.id}}`
59
+ **Members ({{members.length}}):**
60
+ {{#each members}}
61
+ - {{title}} (`{{id}}`) {{#if status}}[{{status}}]{{/if}}
62
+ {{/each}}
63
+ {{/each}}
64
+
65
+ ### Validators (Run in Hooks)
66
+ {{#each VALIDATORS}}
67
+ - {{title}} (`{{id}}`)
68
+ {{/each}}
69
+
70
+ ---
71
+
72
+ ## Agent Teams
73
+
74
+ {{#if AGENT_TEAMS_DECISION}}
75
+ {{#if AGENT_TEAMS_DECISION.useAgentTeams}}
76
+ ✅ **Agent Teams Recommended**
77
+
78
+ **Reason:** {{AGENT_TEAMS_DECISION.reason}}
79
+ **Display Mode:** {{AGENT_TEAMS_DECISION.displayMode}}
80
+ **Total Teammates:** {{AGENT_TEAMS_DECISION.totalTeammates}}
81
+
82
+ **Team Composition:**
83
+ - Team Lead: {{AGENT_TEAMS_DECISION.teamLead}}
84
+ - Domain Leaders: {{AGENT_TEAMS_DECISION.squads}}
85
+ - Validators (hooks): {{AGENT_TEAMS_DECISION.validators}}
86
+
87
+ {{else}}
88
+ ❌ **Single Session Recommended**
89
+
90
+ **Reason:** {{AGENT_TEAMS_DECISION.reason}}
91
+ **Recommendation:** {{AGENT_TEAMS_DECISION.recommendation}}
92
+ {{/if}}
93
+ {{/if}}
94
+
95
+ ---
96
+
97
+ ## Outputs Generated
98
+
99
+ {{#each OUTPUTS}}
100
+ ### {{type}}
101
+ **Status:** {{#if generated}}✅ Generated{{else}}⏳ Pending{{/if}}
102
+ {{#if path}}**Path:** `{{path}}`{{/if}}
103
+ {{#if generatedAt}}**Generated:** {{generatedAt}}{{/if}}
104
+ {{/each}}
105
+
106
+ ---
107
+
108
+ ## Decisions Log
109
+
110
+ {{#each DECISIONS}}
111
+ ### ADR-{{id}}: {{title}}
112
+
113
+ **Status:** {{status}}
114
+ **Date:** {{date}}
115
+ **Decided By:** {{decidedBy}}
116
+
117
+ **Context:** {{context}}
118
+
119
+ **Decision:** {{decision}}
120
+
121
+ {{#if constraints}}
122
+ **Constraints for Validators:**
123
+ ```json
124
+ {{constraints}}
125
+ ```
126
+ {{/if}}
127
+
128
+ {{#if alternatives}}
129
+ **Alternatives Considered:**
130
+ {{#each alternatives}}
131
+ - {{name}}: {{rationale}}
132
+ {{/each}}
133
+ {{/if}}
134
+
135
+ ---
136
+ {{/each}}
137
+
138
+ {{#unless DECISIONS}}
139
+ No decisions documented yet. Decisions will be logged in `decisions.md` during Design phase.
140
+ {{/unless}}
141
+
142
+ ---
143
+
144
+ ## Validation Status
145
+
146
+ {{#if VALIDATION_RESULTS}}
147
+ ### Latest Validation ({{VALIDATION_TIMESTAMP}})
148
+
149
+ **Overall:** {{#if VALIDATION_PASSED}}✅ PASSED{{else}}❌ FAILED{{/if}}
150
+
151
+ {{#each VALIDATION_RESULTS}}
152
+ #### {{validator}}
153
+ **Status:** {{#if passed}}✅ PASSED{{else}}❌ FAILED{{/if}}
154
+ {{#if issues}}
155
+ **Issues ({{issues.length}}):**
156
+ {{#each issues}}
157
+ - [{{severity}}] {{message}} ({{file}}:{{line}})
158
+ {{/each}}
159
+ {{/if}}
160
+ {{/each}}
161
+
162
+ {{else}}
163
+ No validation runs yet. Validators run automatically via checkpoints.
164
+ {{/if}}
165
+
166
+ ---
167
+
168
+ ## Tasks Breakdown
169
+
170
+ {{#each TASKS}}
171
+ ### {{id}}: {{title}}
172
+
173
+ **Status:** {{status}}
174
+ {{#if priority}}**Priority:** {{priority}}{{/if}}
175
+ {{#if estimatedFiles}}**Estimated Files:** {{estimatedFiles}}{{/if}}
176
+ {{#if dependencies}}**Dependencies:** {{dependencies}}{{/if}}
177
+
178
+ {{#if description}}
179
+ {{description}}
180
+ {{/if}}
181
+
182
+ {{#if agent}}**Assigned Agent:** `{{agent}}`{{/if}}
183
+
184
+ {{#if checkpointAfter}}🔖 **Checkpoint after this task**{{/if}}
185
+
186
+ {{#if completedAt}}✅ Completed: {{completedAt}}{{/if}}
187
+ {{#if blockedReason}}❌ Blocked: {{blockedReason}}{{/if}}
188
+
189
+ ---
190
+ {{/each}}
191
+
192
+ ---
193
+
194
+ ## Checkpoints
195
+
196
+ {{#each CHECKPOINTS}}
197
+ ### {{timestamp}}
198
+ **Phase:** {{phase}}
199
+ **Tasks Completed:** {{tasksCompleted}}/{{tasksTotal}}
200
+
201
+ {{#if note}}
202
+ **Note:** {{note}}
203
+ {{/if}}
204
+
205
+ {{#if validation}}
206
+ **Validation:** {{validation.passed}}/{{validation.total}} checks passed
207
+ {{#if validation.issues}}
208
+ - Issues: {{validation.issues}}
209
+ {{/if}}
210
+ {{/if}}
211
+
212
+ ---
213
+ {{/each}}
214
+
215
+ ---
216
+
217
+ ## Related Standards
218
+
219
+ {{#each RELATED_STANDARDS}}
220
+ ### {{name}}
221
+ **Path:** `{{path}}`
222
+ {{#if relevantSections}}
223
+ **Relevant Sections:** {{relevantSections}}
224
+ {{/if}}
225
+ {{/each}}
226
+
227
+ ---
228
+
229
+ ## Quick Actions
230
+
231
+ ### Continue Implementation
232
+ ```bash
233
+ # Start next task
234
+ morph-spec task next {{FEATURE_NAME}}
235
+
236
+ # Complete current task (runs validators)
237
+ morph-spec task done {{FEATURE_NAME}} {{CURRENT_TASK_ID}}
238
+
239
+ # Generate recap after task completion
240
+ morph-spec generate recap {{FEATURE_NAME}}
241
+ ```
242
+
243
+ ### Advance Phase
244
+ ```bash
245
+ # Check prerequisites and advance
246
+ morph-spec phase advance {{FEATURE_NAME}}
247
+
248
+ # Validate current phase before advancing
249
+ morph-spec validate-phase {{FEATURE_NAME}} {{PHASE}}
250
+ ```
251
+
252
+ ### Validation
253
+ ```bash
254
+ # Run all validators for active agents
255
+ morph-spec validate {{FEATURE_NAME}}
256
+
257
+ # Run specific validator
258
+ morph-spec validate-{{VALIDATOR}} {{FEATURE_NAME}}
259
+ ```
260
+
261
+ ---
262
+
263
+ ## File Paths
264
+
265
+ - **Outputs Directory:** `.morph/project/outputs/{{FEATURE_NAME}}/`
266
+ - **Proposal:** `{{PROPOSAL_PATH}}`
267
+ - **Spec:** `{{SPEC_PATH}}`
268
+ - **Contracts:** `{{CONTRACTS_PATH}}`
269
+ - **Tasks:** `{{TASKS_PATH}}`
270
+ - **Decisions:** `{{DECISIONS_PATH}}`
271
+ - **Recap:** `{{RECAP_PATH}}`
272
+
273
+ ---
274
+
275
+ *Generated by MORPH-SPEC Framework v{{MORPH_VERSION}}*
276
+ *Feature ID: {{FEATURE_ID}}*
@@ -0,0 +1,181 @@
1
+ # {{PROJECT_NAME}} - Project Context
2
+
3
+ > Auto-generated by MORPH-SPEC Framework
4
+ > Last updated: {{TIMESTAMP}}
5
+
6
+ ## Project Overview
7
+
8
+ **Name:** {{PROJECT_NAME}}
9
+ **Type:** {{PROJECT_TYPE}}
10
+ **Repository:** {{REPOSITORY_URL}}
11
+
12
+ {{PROJECT_DESCRIPTION}}
13
+
14
+ ---
15
+
16
+ ## Technology Stack
17
+
18
+ ### Frontend
19
+ {{#if BLAZOR_ENABLED}}- **Blazor Server** {{BLAZOR_VERSION}}{{/if}}
20
+ {{#if NEXTJS_ENABLED}}- **Next.js** {{NEXTJS_VERSION}}{{/if}}
21
+ {{#if UI_LIBRARY}}- **UI Library:** {{UI_LIBRARY}}{{/if}}
22
+
23
+ ### Backend
24
+ - **.NET** {{DOTNET_VERSION}}
25
+ {{#if EF_VERSION}}- **Entity Framework Core** {{EF_VERSION}}{{/if}}
26
+ {{#if DAPPER_ENABLED}}- **Dapper** (Micro-ORM){{/if}}
27
+ {{#if HANGFIRE_ENABLED}}- **Hangfire** (Background Jobs){{/if}}
28
+ {{#if AGENT_FRAMEWORK_ENABLED}}- **Microsoft Agent Framework** (AI Agents){{/if}}
29
+
30
+ ### Database
31
+ {{#if SQL_ENABLED}}- **Azure SQL** ({{SQL_SERVER}}/{{SQL_DATABASE}}){{/if}}
32
+ {{#if SUPABASE_ENABLED}}- **Supabase** (PostgreSQL + Auth + Storage + RLS)
33
+ - Project: {{SUPABASE_PROJECT_ID}}
34
+ - Region: {{SUPABASE_REGION}}
35
+ {{/if}}
36
+
37
+ ### Infrastructure
38
+ {{#if AZURE_ENABLED}}- **Azure** ({{AZURE_LOCATION}})
39
+ {{#if CONTAINER_APPS_ENABLED}}- **Container Apps** ({{CONTAINER_ENV}}){{/if}}
40
+ {{#if OPENAI_ENABLED}}- **Azure OpenAI** ({{OPENAI_MODEL}}){{/if}}
41
+ {{#if MONITORING_ENABLED}}- **Application Insights** ({{APP_INSIGHTS}}){{/if}}
42
+ {{/if}}
43
+
44
+ {{#if EASYPANEL_ENABLED}}- **EasyPanel** (Docker Deployment)
45
+ - API: {{EASYPANEL_API_URL}}
46
+ - Web: {{EASYPANEL_WEB_URL}}
47
+ {{/if}}
48
+
49
+ ---
50
+
51
+ ## Active Features
52
+
53
+ {{#each ACTIVE_FEATURES}}
54
+ ### {{name}} ({{phase}})
55
+ **Status:** {{status}}
56
+ **Complexity:** {{complexity}}
57
+ **Active Agents:** {{activeAgents}}
58
+
59
+ {{#if description}}{{description}}{{/if}}
60
+
61
+ **Progress:**
62
+ - Tasks: {{tasks.completed}}/{{tasks.total}}
63
+ - Outputs: {{outputs}}
64
+
65
+ {{/each}}
66
+
67
+ ---
68
+
69
+ ## Project Standards
70
+
71
+ ### Coding Standards
72
+ {{#each PROJECT_STANDARDS}}
73
+ - [{{name}}]({{path}}){{#if description}} - {{description}}{{/if}}
74
+ {{/each}}
75
+
76
+ ### Inferred Patterns
77
+ {{#if INFERRED_STANDARDS}}
78
+ {{INFERRED_STANDARDS}}
79
+ {{/if}}
80
+
81
+ ---
82
+
83
+ ## Active Agents ({{AGENT_COUNT}})
84
+
85
+ ### Tier 1: Orchestrators
86
+ {{#each TIER_1_AGENTS}}
87
+ - **{{title}}** (`{{id}}`) {{#if always_active}}[Always Active]{{/if}}
88
+ {{/each}}
89
+
90
+ ### Tier 2: Domain Leaders
91
+ {{#each TIER_2_AGENTS}}
92
+ - **{{title}}** (`{{id}}`) - {{domains}}
93
+ {{/each}}
94
+
95
+ ### Tier 3: Specialists
96
+ {{#each TIER_3_AGENTS}}
97
+ - **{{title}}** (`{{id}}`) - Reports to `{{reports_to}}`
98
+ {{/each}}
99
+
100
+ ---
101
+
102
+ ## Agent Teams Status
103
+
104
+ {{#if AGENT_TEAMS_ENABLED}}
105
+ ✅ **Enabled** (Display Mode: {{AGENT_TEAMS_DISPLAY_MODE}})
106
+
107
+ **Spawn Thresholds:**
108
+ - Complexity: {{AGENT_TEAMS_THRESHOLDS.complexity}}
109
+ - Estimated Files: ≥ {{AGENT_TEAMS_THRESHOLDS.estimatedFiles}}
110
+ - Active Agents: ≥ {{AGENT_TEAMS_THRESHOLDS.activeAgents}}
111
+ - Multi-Domain: {{AGENT_TEAMS_THRESHOLDS.multiDomain}}
112
+
113
+ {{else}}
114
+ ❌ **Disabled** - Use single session with subagents
115
+ {{/if}}
116
+
117
+ ---
118
+
119
+ ## Recent Checkpoints
120
+
121
+ {{#each RECENT_CHECKPOINTS}}
122
+ ### {{timestamp}}
123
+ **Feature:** {{feature}}
124
+ **Phase:** {{phase}}
125
+ **Note:** {{note}}
126
+
127
+ {{#if validation}}
128
+ **Validation:** {{validation.passed}}/{{validation.total}} checks passed
129
+ {{/if}}
130
+
131
+ {{/each}}
132
+
133
+ ---
134
+
135
+ {{#if DEVOPS_ENABLED}}
136
+ ## DevOps Integration
137
+
138
+ **Organization:** {{DEVOPS_ORG}}
139
+ **Project:** {{DEVOPS_PROJECT}}
140
+
141
+ - **Boards:** {{#if DEVOPS_BOARDS_ENABLED}}Enabled ({{DEVOPS_AREA_PATH}}){{else}}Disabled{{/if}}
142
+ - **Wiki:** {{#if DEVOPS_WIKI_ENABLED}}Enabled ({{DEVOPS_WIKI_NAME}}){{else}}Disabled{{/if}}
143
+ - **Pipelines:** CI: {{DEVOPS_BUILD_PIPELINE}}, CD: {{DEVOPS_RELEASE_PIPELINE}}
144
+
145
+ ---
146
+
147
+ {{/if}}
148
+
149
+ ## Quick Reference
150
+
151
+ ### Workflow Commands
152
+ ```bash
153
+ # Detect agents for feature
154
+ morph-spec detect-agents "{feature description}"
155
+
156
+ # Initialize new feature
157
+ morph-spec state init
158
+
159
+ # Generate design system
160
+ morph-spec generate design-system {feature}
161
+
162
+ # Advance to next phase
163
+ morph-spec phase advance {feature}
164
+
165
+ # Mark task complete (runs validators)
166
+ morph-spec task done {feature} {task-id}
167
+
168
+ # Generate recap
169
+ morph-spec generate recap {feature}
170
+ ```
171
+
172
+ ### Key Paths
173
+ - **Outputs:** `.morph/project/outputs/{feature}/`
174
+ - **Standards:** `.morph/project/standards/` (project overrides)
175
+ - **Config:** `.morph/config/config.json`
176
+ - **State:** `.morph/state.json`
177
+ - **Templates:** `.morph/templates/`
178
+
179
+ ---
180
+
181
+ *Generated by MORPH-SPEC Framework v{{MORPH_VERSION}}*
@@ -0,0 +1,182 @@
1
+ # Feature Proposal: {{titleCase FEATURE_NAME}}
2
+
3
+ > Proposal for a new feature. This document describes WHAT and WHY.
4
+ > For technical details, see `spec.md`.
5
+
6
+ ## Metadata
7
+
8
+ | Field | Value |
9
+ |-------|-------|
10
+ | **Proposed** | {{DATE}} |
11
+ | **Author** | {{AUTHOR}} |
12
+ | **Status** | Draft / Under Review / Approved / Rejected |
13
+ | **Priority** | High / Medium / Low |
14
+ {{#if STACK}}| **Stack** | {{STACK}} |{{/if}}
15
+
16
+ ---
17
+
18
+ ## Overview
19
+
20
+ {Brief 2-3 sentence summary of the feature}
21
+
22
+ ---
23
+
24
+ ## Problem Statement
25
+
26
+ ### What is the problem?
27
+
28
+ {Describe the problem this feature solves. Be specific.}
29
+
30
+ ### Who is affected?
31
+
32
+ {Who suffers from this problem? End users? Developers? Operations?}
33
+
34
+ ### What is the impact?
35
+
36
+ {What is the impact of NOT solving this problem?}
37
+ - User productivity loss: {X}
38
+ - Revenue/Cost impact: {X}
39
+ - User satisfaction: {X}
40
+
41
+ ---
42
+
43
+ ## Proposed Solution
44
+
45
+ ### Overview
46
+
47
+ {Describe the proposed solution in 2-3 paragraphs}
48
+
49
+ ### Key Features
50
+
51
+ 1. **{Feature 1}** - {brief description}
52
+ 2. **{Feature 2}** - {brief description}
53
+ 3. **{Feature 3}** - {brief description}
54
+
55
+ {{#if (eq STACK "nextjs-supabase")}}
56
+ ### Technical Approach
57
+
58
+ | Layer | Technology | Role |
59
+ |-------|-----------|------|
60
+ | **Database** | Supabase (PostgreSQL + RLS) | {tables, policies, storage} |
61
+ | **Backend API** | .NET 10 Minimal API | {endpoints, business logic} |
62
+ | **Frontend** | Next.js 15 (App Router) | {pages, components, auth} |
63
+ | **Infra** | EasyPanel + Docker | {deployment, SSL} |
64
+ {{/if}}
65
+
66
+ ### User Journey
67
+
68
+ ```
69
+ 1. User {initial action}
70
+ 2. System {response}
71
+ 3. User {next action}
72
+ 4. System {final result}
73
+ ```
74
+
75
+ ---
76
+
77
+ {{#if (eq STACK "nextjs-supabase")}}
78
+ ## Cost Estimate
79
+
80
+ | Resource | Provider | Monthly Cost | Notes |
81
+ |----------|----------|-------------|-------|
82
+ | Supabase | Free / Pro | $0 - $25 | {DB, Auth, Storage, Realtime} |
83
+ | VPS (EasyPanel) | {provider} | ${X} | {API + Web containers} |
84
+ | External APIs | {provider} | ${X} | {if applicable} |
85
+ | **Total** | | **${X}/month** | |
86
+
87
+ ---
88
+
89
+ {{/if}}
90
+ ## Success Metrics
91
+
92
+ How will we know this feature is successful?
93
+
94
+ | Metric | Current | Target |
95
+ |--------|---------|--------|
96
+ | {Metric 1} | {X} | {Y} |
97
+ | {Metric 2} | {X} | {Y} |
98
+
99
+ ---
100
+
101
+ ## Scope
102
+
103
+ ### In Scope
104
+
105
+ - {Item 1 that is included}
106
+ - {Item 2 that is included}
107
+ - {Item 3 that is included}
108
+
109
+ ### Out of Scope
110
+
111
+ - {Item 1 that is NOT included}
112
+ - {Item 2 that is NOT included}
113
+
114
+ ### Future Considerations
115
+
116
+ - {Item that could be added later}
117
+
118
+ ---
119
+
120
+ ## Risks & Concerns
121
+
122
+ | Risk | Likelihood | Impact | Mitigation |
123
+ |------|------------|--------|------------|
124
+ | {Risk 1} | High/Med/Low | High/Med/Low | {mitigation strategy} |
125
+ | {Risk 2} | High/Med/Low | High/Med/Low | {mitigation strategy} |
126
+
127
+ ---
128
+
129
+ ## Dependencies
130
+
131
+ - [ ] {Dependency 1} - {status}
132
+ - [ ] {Dependency 2} - {status}
133
+
134
+ ---
135
+
136
+ ## Estimated Effort
137
+
138
+ | Phase | Estimate |
139
+ |-------|----------|
140
+ | Design & Spec | {X}h |
141
+ {{#if (eq STACK "nextjs-supabase")}}| Database & Migrations | {X}h |
142
+ | Backend API | {X}h |
143
+ | Frontend | {X}h |
144
+ {{else}}| Implementation | {X}h |
145
+ {{/if}}| Testing | {X}h |
146
+ | **Total** | **{X}h** |
147
+
148
+ ---
149
+
150
+ ## Questions & Clarifications
151
+
152
+ 1. {Question 1 that needs answering}
153
+ 2. {Question 2 that needs answering}
154
+
155
+ ---
156
+
157
+ {{#if (eq STACK "blazor-azure")}}
158
+ ## Approval
159
+
160
+ | Role | Name | Decision | Date |
161
+ |------|------|----------|------|
162
+ | Product Owner | | Pending | |
163
+ | Tech Lead | | Pending | |
164
+
165
+ ---
166
+
167
+ {{/if}}
168
+ ## Next Steps
169
+
170
+ Once approved:
171
+ 1. Create detailed `spec.md` with technical design
172
+ {{#if (eq STACK "nextjs-supabase")}}2. Define contracts (`contracts.cs` + `contracts.ts`)
173
+ 3. Record decisions in `decisions.md`
174
+ 4. Break down into `tasks.md`
175
+ 5. Begin implementation
176
+ {{else}}2. Break down into `tasks.md`
177
+ 3. Begin implementation
178
+ {{/if}}
179
+
180
+ ---
181
+
182
+ *Created with MORPH Framework*