@polymorphism-tech/morph-spec 1.0.4 β†’ 2.1.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (152) hide show
  1. package/CLAUDE.md +1381 -0
  2. package/LICENSE +72 -0
  3. package/README.md +89 -6
  4. package/bin/detect-agents.js +225 -0
  5. package/bin/morph-spec.js +120 -0
  6. package/bin/render-template.js +302 -0
  7. package/bin/semantic-detect-agents.js +246 -0
  8. package/bin/validate-agents-skills.js +239 -0
  9. package/bin/validate-agents.js +69 -0
  10. package/bin/validate-phase.js +263 -0
  11. package/content/.azure/README.md +293 -0
  12. package/content/.azure/docs/azure-devops-setup.md +454 -0
  13. package/content/.azure/docs/branch-strategy.md +398 -0
  14. package/content/.azure/docs/local-development.md +515 -0
  15. package/content/.azure/pipelines/pipeline-variables.yml +34 -0
  16. package/content/.azure/pipelines/prod-pipeline.yml +319 -0
  17. package/content/.azure/pipelines/staging-pipeline.yml +234 -0
  18. package/content/.azure/pipelines/templates/build-dotnet.yml +75 -0
  19. package/content/.azure/pipelines/templates/deploy-app-service.yml +94 -0
  20. package/content/.azure/pipelines/templates/deploy-container-app.yml +120 -0
  21. package/content/.azure/pipelines/templates/infra-deploy.yml +90 -0
  22. package/content/.claude/commands/morph-apply.md +118 -26
  23. package/content/.claude/commands/morph-archive.md +9 -9
  24. package/content/.claude/commands/morph-clarify.md +184 -0
  25. package/content/.claude/commands/morph-design.md +275 -0
  26. package/content/.claude/commands/morph-proposal.md +56 -15
  27. package/content/.claude/commands/morph-setup.md +100 -0
  28. package/content/.claude/commands/morph-status.md +47 -32
  29. package/content/.claude/commands/morph-tasks.md +319 -0
  30. package/content/.claude/commands/morph-uiux.md +211 -0
  31. package/content/.claude/skills/specialists/ai-system-architect.md +604 -0
  32. package/content/.claude/skills/specialists/ms-agent-expert.md +143 -89
  33. package/content/.claude/skills/specialists/ui-ux-designer.md +744 -9
  34. package/content/.claude/skills/stacks/dotnet-blazor.md +244 -8
  35. package/content/.claude/skills/stacks/dotnet-nextjs.md +2 -2
  36. package/content/.morph/.morphversion +5 -0
  37. package/content/.morph/config/agents.json +101 -8
  38. package/content/.morph/config/azure-pricing.json +70 -0
  39. package/content/.morph/config/azure-pricing.schema.json +50 -0
  40. package/content/.morph/config/config.template.json +15 -3
  41. package/content/.morph/docs/STORY-DRIVEN-DEVELOPMENT.md +392 -0
  42. package/content/.morph/hooks/README.md +239 -0
  43. package/content/.morph/hooks/pre-commit-agents.sh +24 -0
  44. package/content/.morph/hooks/pre-commit-all.sh +48 -0
  45. package/content/.morph/hooks/pre-commit-costs.sh +91 -0
  46. package/content/.morph/hooks/pre-commit-specs.sh +49 -0
  47. package/content/.morph/hooks/pre-commit-tests.sh +60 -0
  48. package/content/.morph/project.md +5 -4
  49. package/content/.morph/schemas/agent.schema.json +296 -0
  50. package/content/.morph/standards/agent-framework-setup.md +453 -0
  51. package/content/.morph/standards/architecture.md +142 -7
  52. package/content/.morph/standards/azure.md +218 -23
  53. package/content/.morph/standards/coding.md +47 -12
  54. package/content/.morph/standards/dotnet10-migration.md +494 -0
  55. package/content/.morph/standards/fluent-ui-setup.md +590 -0
  56. package/content/.morph/standards/migration-guide.md +514 -0
  57. package/content/.morph/standards/passkeys-auth.md +423 -0
  58. package/content/.morph/standards/vector-search-rag.md +536 -0
  59. package/content/.morph/state.json +18 -0
  60. package/content/.morph/templates/FluentDesignTheme.cs +149 -0
  61. package/content/.morph/templates/MudTheme.cs +281 -0
  62. package/content/.morph/templates/contracts.cs +55 -55
  63. package/content/.morph/templates/decisions.md +4 -4
  64. package/content/.morph/templates/design-system.css +226 -0
  65. package/content/.morph/templates/infra/.dockerignore.example +89 -0
  66. package/content/.morph/templates/infra/Dockerfile.example +82 -0
  67. package/content/.morph/templates/infra/README.md +286 -0
  68. package/content/.morph/templates/infra/app-service.bicep +164 -0
  69. package/content/.morph/templates/infra/deploy.ps1 +229 -0
  70. package/content/.morph/templates/infra/deploy.sh +208 -0
  71. package/content/.morph/templates/infra/main.bicep +41 -7
  72. package/content/.morph/templates/infra/parameters.dev.json +6 -0
  73. package/content/.morph/templates/infra/parameters.prod.json +6 -0
  74. package/content/.morph/templates/infra/parameters.staging.json +29 -0
  75. package/content/.morph/templates/proposal.md +3 -3
  76. package/content/.morph/templates/recap.md +3 -3
  77. package/content/.morph/templates/spec.md +9 -8
  78. package/content/.morph/templates/sprint-status.yaml +68 -0
  79. package/content/.morph/templates/state.template.json +222 -0
  80. package/content/.morph/templates/story.md +143 -0
  81. package/content/.morph/templates/tasks.md +1 -1
  82. package/content/.morph/templates/ui-components.md +276 -0
  83. package/content/.morph/templates/ui-design-system.md +286 -0
  84. package/content/.morph/templates/ui-flows.md +336 -0
  85. package/content/.morph/templates/ui-mockups.md +133 -0
  86. package/content/.morph/test-infra/example.bicep +59 -0
  87. package/content/CLAUDE.md +124 -0
  88. package/content/README.md +79 -0
  89. package/detectors/config-detector.js +223 -0
  90. package/detectors/conversation-analyzer.js +163 -0
  91. package/detectors/index.js +84 -0
  92. package/detectors/standards-generator.js +275 -0
  93. package/detectors/structure-detector.js +221 -0
  94. package/docs/README.md +149 -0
  95. package/docs/api/cost-calculator.js.html +513 -0
  96. package/docs/api/design-system-generator.js.html +382 -0
  97. package/docs/api/fonts/Montserrat/Montserrat-Bold.eot +0 -0
  98. package/docs/api/fonts/Montserrat/Montserrat-Bold.ttf +0 -0
  99. package/docs/api/fonts/Montserrat/Montserrat-Bold.woff +0 -0
  100. package/docs/api/fonts/Montserrat/Montserrat-Bold.woff2 +0 -0
  101. package/docs/api/fonts/Montserrat/Montserrat-Regular.eot +0 -0
  102. package/docs/api/fonts/Montserrat/Montserrat-Regular.ttf +0 -0
  103. package/docs/api/fonts/Montserrat/Montserrat-Regular.woff +0 -0
  104. package/docs/api/fonts/Montserrat/Montserrat-Regular.woff2 +0 -0
  105. package/docs/api/fonts/Source-Sans-Pro/sourcesanspro-light-webfont.eot +0 -0
  106. package/docs/api/fonts/Source-Sans-Pro/sourcesanspro-light-webfont.svg +978 -0
  107. package/docs/api/fonts/Source-Sans-Pro/sourcesanspro-light-webfont.ttf +0 -0
  108. package/docs/api/fonts/Source-Sans-Pro/sourcesanspro-light-webfont.woff +0 -0
  109. package/docs/api/fonts/Source-Sans-Pro/sourcesanspro-light-webfont.woff2 +0 -0
  110. package/docs/api/fonts/Source-Sans-Pro/sourcesanspro-regular-webfont.eot +0 -0
  111. package/docs/api/fonts/Source-Sans-Pro/sourcesanspro-regular-webfont.svg +1049 -0
  112. package/docs/api/fonts/Source-Sans-Pro/sourcesanspro-regular-webfont.ttf +0 -0
  113. package/docs/api/fonts/Source-Sans-Pro/sourcesanspro-regular-webfont.woff +0 -0
  114. package/docs/api/fonts/Source-Sans-Pro/sourcesanspro-regular-webfont.woff2 +0 -0
  115. package/docs/api/global.html +5263 -0
  116. package/docs/api/index.html +96 -0
  117. package/docs/api/scripts/collapse.js +39 -0
  118. package/docs/api/scripts/commonNav.js +28 -0
  119. package/docs/api/scripts/linenumber.js +25 -0
  120. package/docs/api/scripts/nav.js +12 -0
  121. package/docs/api/scripts/polyfill.js +4 -0
  122. package/docs/api/scripts/prettify/Apache-License-2.0.txt +202 -0
  123. package/docs/api/scripts/prettify/lang-css.js +2 -0
  124. package/docs/api/scripts/prettify/prettify.js +28 -0
  125. package/docs/api/scripts/search.js +99 -0
  126. package/docs/api/state-manager.js.html +423 -0
  127. package/docs/api/styles/jsdoc.css +776 -0
  128. package/docs/api/styles/prettify.css +80 -0
  129. package/docs/examples.md +328 -0
  130. package/docs/getting-started.md +302 -0
  131. package/docs/installation.md +361 -0
  132. package/docs/templates.md +418 -0
  133. package/docs/validation-checklist.md +266 -0
  134. package/package.json +39 -12
  135. package/src/commands/cost.js +181 -0
  136. package/src/commands/create-story.js +283 -0
  137. package/src/commands/detect.js +104 -0
  138. package/src/commands/doctor.js +67 -0
  139. package/src/commands/generate.js +149 -0
  140. package/src/commands/init.js +69 -45
  141. package/src/commands/shard-spec.js +224 -0
  142. package/src/commands/sprint-status.js +250 -0
  143. package/src/commands/state.js +333 -0
  144. package/src/commands/sync.js +167 -0
  145. package/src/commands/update-pricing.js +206 -0
  146. package/src/commands/update.js +88 -13
  147. package/src/lib/complexity-analyzer.js +292 -0
  148. package/src/lib/cost-calculator.js +429 -0
  149. package/src/lib/design-system-generator.js +298 -0
  150. package/src/lib/state-manager.js +340 -0
  151. package/src/utils/file-copier.js +59 -0
  152. package/src/utils/version-checker.js +175 -0
@@ -16,6 +16,12 @@
16
16
  "secretName": "sql-admin-password"
17
17
  }
18
18
  },
19
+ "hostingType": {
20
+ "value": "containerapp"
21
+ },
22
+ "appServiceSku": {
23
+ "value": "P1v2"
24
+ },
19
25
  "containerImage": {
20
26
  "value": "{{ACR_NAME}}.azurecr.io/{{APP_NAME}}:{{VERSION}}"
21
27
  }
@@ -0,0 +1,29 @@
1
+ {
2
+ "$schema": "https://schema.management.azure.com/schemas/2019-04-01/deploymentParameters.json#",
3
+ "contentVersion": "1.0.0.0",
4
+ "parameters": {
5
+ "environment": {
6
+ "value": "staging"
7
+ },
8
+ "appName": {
9
+ "value": "{{APP_NAME}}"
10
+ },
11
+ "sqlAdminPassword": {
12
+ "reference": {
13
+ "keyVault": {
14
+ "id": "/subscriptions/{{SUBSCRIPTION_ID}}/resourceGroups/{{RESOURCE_GROUP}}/providers/Microsoft.KeyVault/vaults/{{KEY_VAULT_NAME}}"
15
+ },
16
+ "secretName": "sql-admin-password"
17
+ }
18
+ },
19
+ "hostingType": {
20
+ "value": "containerapp"
21
+ },
22
+ "appServiceSku": {
23
+ "value": "B1"
24
+ },
25
+ "containerImage": {
26
+ "value": "{{ACR_NAME}}.azurecr.io/{{APP_NAME}}:latest"
27
+ }
28
+ }
29
+ }
@@ -1,4 +1,4 @@
1
- # Feature Proposal: {FEATURE_NAME}
1
+ # Feature Proposal: {{FEATURE_NAME_TITLE}}
2
2
 
3
3
  > Proposta para nova feature. Este documento descreve O QUE e POR QUÊ.
4
4
  > Para detalhes tΓ©cnicos, veja `spec.md`.
@@ -7,8 +7,8 @@
7
7
 
8
8
  | Field | Value |
9
9
  |-------|-------|
10
- | **Proposed** | {date} |
11
- | **Author** | {name} |
10
+ | **Proposed** | {{DATE}} |
11
+ | **Author** | {{AUTHOR}} |
12
12
  | **Status** | Draft / Under Review / Approved / Rejected |
13
13
  | **Priority** | High / Medium / Low |
14
14
 
@@ -1,11 +1,11 @@
1
- # Feature Recap: {Feature Name}
1
+ # Feature Recap: {{FEATURE_NAME_TITLE}}
2
2
 
3
3
  ## πŸ“‹ Summary
4
4
 
5
5
  | Field | Value |
6
6
  |-------|-------|
7
7
  | **Feature ID** | {feature-id} |
8
- | **Completed** | {date} |
8
+ | **Completed** | {{DATE}} |
9
9
  | **Total Tasks** | {X} |
10
10
  | **Time Spent** | {X}h |
11
11
  | **Agents Used** | {list} |
@@ -102,4 +102,4 @@ See full ADRs in `decisions.md`
102
102
 
103
103
  ---
104
104
 
105
- *Generated by MORPH Framework on {date}*
105
+ *Generated by MORPH Framework on {{DATE}}*
@@ -1,12 +1,13 @@
1
- # Feature Specification: {FEATURE_NAME}
1
+ # Feature Specification: {{FEATURE_NAME_TITLE}}
2
2
 
3
3
  ## πŸ“‹ Metadata
4
4
 
5
5
  | Field | Value |
6
6
  |-------|-------|
7
- | **ID** | {feature-id} |
7
+ | **ID** | {{FEATURE_NAME}} |
8
8
  | **Status** | Draft / In Review / Approved / In Progress / Done |
9
- | **Created** | {date} |
9
+ | **Created** | {{DATE}} |
10
+ | **Stack** | {{STACK}} |
10
11
  | **Agents** | Core: All / Specialists: {list} |
11
12
  | **Estimated Cost** | ${X}/month |
12
13
 
@@ -50,9 +51,9 @@
50
51
  | Component | Technology |
51
52
  |-----------|------------|
52
53
  | Frontend | Blazor Server |
53
- | Backend | .NET 9 |
54
+ | Backend | .NET 10 / C# 14 |
54
55
  | Database | Azure SQL |
55
- | AI | MS Agent Framework |
56
+ | AI | Microsoft Agent Framework (obrigatΓ³rio) |
56
57
 
57
58
  ### Architecture
58
59
  ```
@@ -72,10 +73,10 @@ User β†’ Blazor UI β†’ Service β†’ Repository β†’ Database
72
73
 
73
74
  ### Contracts
74
75
  ```csharp
75
- public interface I{Feature}Service
76
+ public interface I{{FEATURE_NAME_PASCAL}}Service
76
77
  {
77
- Task<{Feature}Dto> GetByIdAsync(int id);
78
- Task<{Feature}Dto> CreateAsync(Create{Feature}Request request);
78
+ Task<{{FEATURE_NAME_PASCAL}}Dto> GetByIdAsync(int id);
79
+ Task<{{FEATURE_NAME_PASCAL}}Dto> CreateAsync(Create{{FEATURE_NAME_PASCAL}}Request request);
79
80
  }
80
81
  ```
81
82
 
@@ -0,0 +1,68 @@
1
+ # MORPH-SPEC Sprint Status
2
+ # Auto-updated by create-story.js and update-sprint-status.js
3
+ # Tracks story-level progress within a feature/epic
4
+
5
+ feature: {{FEATURE_NAME}}
6
+ epic: {{EPIC_NAME}}
7
+ sprint: {{SPRINT_NUMBER}}
8
+ created: {{DATE}}
9
+ updated: {{DATE}}
10
+
11
+ # Story progression
12
+ stories:
13
+ - id: {{STORY_ID_1}}
14
+ title: {{STORY_TITLE_1}}
15
+ file: .morph/project/outputs/{{FEATURE_NAME}}/stories/{{STORY_ID_1}}.md
16
+ status: ready # ready | in_progress | ready_for_qa | done
17
+ assigned: {{AGENT}} # sm | dev | qa
18
+ created: {{DATE}}
19
+ started: null
20
+ completed: null
21
+
22
+ - id: {{STORY_ID_2}}
23
+ title: {{STORY_TITLE_2}}
24
+ file: .morph/project/outputs/{{FEATURE_NAME}}/stories/{{STORY_ID_2}}.md
25
+ status: pending
26
+ assigned: sm
27
+ created: {{DATE}}
28
+ started: null
29
+ completed: null
30
+
31
+ # Progress metrics
32
+ metrics:
33
+ total_stories: {{TOTAL_STORIES}}
34
+ ready: {{READY_COUNT}}
35
+ in_progress: {{IN_PROGRESS_COUNT}}
36
+ ready_for_qa: {{QA_COUNT}}
37
+ done: {{DONE_COUNT}}
38
+ completion_percent: {{COMPLETION_PERCENT}}
39
+
40
+ # Current focus
41
+ current:
42
+ story_id: {{CURRENT_STORY_ID}}
43
+ agent: {{CURRENT_AGENT}}
44
+ phase: implementation # planning | implementation | review
45
+
46
+ # Next story to work on
47
+ next:
48
+ story_id: {{NEXT_STORY_ID}}
49
+ recommendation: "Story {{NEXT_STORY_ID}} is ready for development"
50
+
51
+ ---
52
+ # Usage Notes:
53
+ #
54
+ # Status Transitions:
55
+ # pending β†’ ready (SM creates story with full context)
56
+ # ready β†’ in_progress (Dev starts implementation)
57
+ # in_progress β†’ ready_for_qa (Dev completes, adds Dev Notes)
58
+ # ready_for_qa β†’ done (QA approves, adds QA Notes)
59
+ #
60
+ # Fresh Chat Pattern (BMAD-inspired):
61
+ # Each story should run in a FRESH Claude session to avoid context pollution
62
+ #
63
+ # Example workflow:
64
+ # 1. SM: node bin/create-story.js scheduled-reports SR-001
65
+ # 2. Dev: Open NEW chat β†’ /dev β†’ Implement SR-001
66
+ # 3. QA: Open NEW chat β†’ /qa β†’ Review SR-001
67
+ #
68
+ # This prevents token bloat and reduces hallucinations
@@ -0,0 +1,222 @@
1
+ {
2
+ "$schema": "http://json-schema.org/draft-07/schema#",
3
+ "title": "MORPH-SPEC State Schema",
4
+ "description": "Schema for tracking project state, features, and progress in MORPH-SPEC framework",
5
+ "type": "object",
6
+ "properties": {
7
+ "version": {
8
+ "type": "string",
9
+ "description": "MORPH-SPEC framework version",
10
+ "pattern": "^\\d+\\.\\d+\\.\\d+$"
11
+ },
12
+ "project": {
13
+ "type": "object",
14
+ "description": "Project information",
15
+ "properties": {
16
+ "name": {
17
+ "type": "string",
18
+ "description": "Project name"
19
+ },
20
+ "type": {
21
+ "type": "string",
22
+ "enum": ["blazor-server", "nextjs", "shopify"],
23
+ "description": "Primary stack type"
24
+ },
25
+ "createdAt": {
26
+ "type": ["string", "null"],
27
+ "format": "date-time",
28
+ "description": "Project creation timestamp"
29
+ },
30
+ "updatedAt": {
31
+ "type": ["string", "null"],
32
+ "format": "date-time",
33
+ "description": "Last update timestamp"
34
+ }
35
+ },
36
+ "required": ["name", "type"]
37
+ },
38
+ "features": {
39
+ "type": "object",
40
+ "description": "Dictionary of features by name",
41
+ "patternProperties": {
42
+ "^[a-z0-9-]+$": {
43
+ "type": "object",
44
+ "properties": {
45
+ "status": {
46
+ "type": "string",
47
+ "enum": ["draft", "in_review", "approved", "in_progress", "done", "archived"],
48
+ "description": "Current feature status"
49
+ },
50
+ "phase": {
51
+ "type": "string",
52
+ "enum": ["proposal", "setup", "ui-ux-design", "design", "clarify", "tasks", "implement"],
53
+ "description": "Current workflow phase"
54
+ },
55
+ "createdAt": {
56
+ "type": "string",
57
+ "format": "date-time"
58
+ },
59
+ "updatedAt": {
60
+ "type": "string",
61
+ "format": "date-time"
62
+ },
63
+ "activeAgents": {
64
+ "type": "array",
65
+ "description": "List of currently active agent IDs",
66
+ "items": {
67
+ "type": "string"
68
+ }
69
+ },
70
+ "outputs": {
71
+ "type": "object",
72
+ "description": "Generated outputs for this feature",
73
+ "properties": {
74
+ "proposal": {
75
+ "type": "object",
76
+ "properties": {
77
+ "created": { "type": "boolean" },
78
+ "path": { "type": "string" }
79
+ }
80
+ },
81
+ "spec": {
82
+ "type": "object",
83
+ "properties": {
84
+ "created": { "type": "boolean" },
85
+ "path": { "type": "string" }
86
+ }
87
+ },
88
+ "contracts": {
89
+ "type": "object",
90
+ "properties": {
91
+ "created": { "type": "boolean" },
92
+ "path": { "type": "string" }
93
+ }
94
+ },
95
+ "tasks": {
96
+ "type": "object",
97
+ "properties": {
98
+ "created": { "type": "boolean" },
99
+ "path": { "type": "string" }
100
+ }
101
+ },
102
+ "uiDesignSystem": {
103
+ "type": "object",
104
+ "properties": {
105
+ "created": { "type": "boolean" },
106
+ "path": { "type": "string" }
107
+ }
108
+ },
109
+ "uiMockups": {
110
+ "type": "object",
111
+ "properties": {
112
+ "created": { "type": "boolean" },
113
+ "path": { "type": "string" }
114
+ }
115
+ },
116
+ "uiComponents": {
117
+ "type": "object",
118
+ "properties": {
119
+ "created": { "type": "boolean" },
120
+ "path": { "type": "string" }
121
+ }
122
+ },
123
+ "uiFlows": {
124
+ "type": "object",
125
+ "properties": {
126
+ "created": { "type": "boolean" },
127
+ "path": { "type": "string" }
128
+ }
129
+ },
130
+ "decisions": {
131
+ "type": "object",
132
+ "properties": {
133
+ "created": { "type": "boolean" },
134
+ "path": { "type": "string" }
135
+ }
136
+ },
137
+ "recap": {
138
+ "type": "object",
139
+ "properties": {
140
+ "created": { "type": "boolean" },
141
+ "path": { "type": "string" }
142
+ }
143
+ }
144
+ }
145
+ },
146
+ "tasks": {
147
+ "type": "object",
148
+ "description": "Task progress counters",
149
+ "properties": {
150
+ "total": { "type": "integer", "minimum": 0 },
151
+ "completed": { "type": "integer", "minimum": 0 },
152
+ "inProgress": { "type": "integer", "minimum": 0 },
153
+ "pending": { "type": "integer", "minimum": 0 }
154
+ }
155
+ },
156
+ "checkpoints": {
157
+ "type": "array",
158
+ "description": "List of checkpoints recorded",
159
+ "items": {
160
+ "type": "object",
161
+ "properties": {
162
+ "timestamp": {
163
+ "type": "string",
164
+ "format": "date-time"
165
+ },
166
+ "phase": { "type": "string" },
167
+ "completedTasks": { "type": "integer" },
168
+ "note": { "type": "string" }
169
+ },
170
+ "required": ["timestamp", "phase", "completedTasks"]
171
+ }
172
+ },
173
+ "costs": {
174
+ "type": "object",
175
+ "description": "Cost tracking information",
176
+ "properties": {
177
+ "estimated": {
178
+ "type": "number",
179
+ "description": "Estimated monthly cost in USD"
180
+ },
181
+ "approved": { "type": "boolean" },
182
+ "approvedBy": { "type": "string" },
183
+ "approvedAt": {
184
+ "type": ["string", "null"],
185
+ "format": "date-time"
186
+ }
187
+ }
188
+ }
189
+ },
190
+ "required": ["status", "phase", "createdAt", "updatedAt", "activeAgents", "outputs", "tasks"]
191
+ }
192
+ }
193
+ },
194
+ "metadata": {
195
+ "type": "object",
196
+ "description": "Global project metadata",
197
+ "properties": {
198
+ "totalFeatures": {
199
+ "type": "integer",
200
+ "description": "Total number of features ever created"
201
+ },
202
+ "completedFeatures": {
203
+ "type": "integer",
204
+ "description": "Number of completed features"
205
+ },
206
+ "totalCostEstimated": {
207
+ "type": "number",
208
+ "description": "Sum of all estimated costs"
209
+ },
210
+ "totalTimeSpent": {
211
+ "type": "number",
212
+ "description": "Total hours spent on all features"
213
+ },
214
+ "lastUpdated": {
215
+ "type": ["string", "null"],
216
+ "format": "date-time"
217
+ }
218
+ }
219
+ }
220
+ },
221
+ "required": ["version", "project", "features", "metadata"]
222
+ }
@@ -0,0 +1,143 @@
1
+ # Story {{STORY_ID}}: {{STORY_TITLE}}
2
+
3
+ > **Feature:** {{FEATURE_NAME_TITLE}}
4
+ > **Epic:** {{EPIC_NAME}}
5
+ > **Created:** {{DATE}}
6
+
7
+ ---
8
+
9
+ ## πŸ“‹ Context
10
+
11
+ {{STORY_CONTEXT}}
12
+
13
+ **Related Spec Section:** `.morph/outputs/{{FEATURE_NAME}}/spec/{{SPEC_SHARD}}.md`
14
+
15
+ ---
16
+
17
+ ## πŸ”— Dependencies
18
+
19
+ ### Architecture References
20
+ {{#ARCHITECTURE_REFS}}
21
+ - {{.}}
22
+ {{/ARCHITECTURE_REFS}}
23
+
24
+ ### Contract References
25
+ {{#CONTRACT_REFS}}
26
+ - {{.}}
27
+ {{/CONTRACT_REFS}}
28
+
29
+ ### Related Stories
30
+ {{#RELATED_STORIES}}
31
+ - [ ] {{.}}
32
+ {{/RELATED_STORIES}}
33
+
34
+ ---
35
+
36
+ ## βœ… Tasks
37
+
38
+ {{#TASKS}}
39
+ - [ ] {{.}}
40
+ {{/TASKS}}
41
+
42
+ **Estimated Effort:** {{EFFORT}} (max 1 developer-day)
43
+
44
+ ---
45
+
46
+ ## πŸ’‘ Dev Notes (Auto-Injected by SM)
47
+
48
+ {{#DEV_NOTES}}
49
+ - {{.}}
50
+ {{/DEV_NOTES}}
51
+
52
+ ### Standards to Follow
53
+ - **Coding:** `.morph/standards/coding.md#{{CODING_PATTERN}}`
54
+ - **Architecture:** `.morph/standards/architecture.md#{{ARCH_PATTERN}}`
55
+ {{#AZURE_PATTERN}}
56
+ - **Azure/IaC:** `.morph/standards/azure.md#{{AZURE_PATTERN}}`
57
+ {{/AZURE_PATTERN}}
58
+
59
+ ---
60
+
61
+ ## 🎯 Acceptance Criteria (Gherkin Format)
62
+
63
+ {{#ACCEPTANCE_CRITERIA}}
64
+ - [ ] **GIVEN** {{given}} **WHEN** {{when}} **THEN** {{then}}
65
+ {{/ACCEPTANCE_CRITERIA}}
66
+
67
+ ---
68
+
69
+ ## πŸ› οΈ Implementation Notes
70
+
71
+ ### Dev Notes (Added by Dev Agent)
72
+ ```
73
+ [Dev agent adds notes here after implementation]
74
+
75
+ Example:
76
+ βœ… Implemented ScheduledReport.cs with Primary Constructor
77
+ βœ… EF mapping configured in ReportDbContext.cs (line 45)
78
+ βœ… Migration: 20251209_AddScheduledReports.cs
79
+ ⚠️ ATTENTION QA: RecurrencePattern uses complex regex (validate edge cases line 67)
80
+ βœ… Tests: 12 unit tests, 95% coverage in ScheduledReportTests.cs
81
+ ```
82
+
83
+ ### QA Notes (Added by QA Agent)
84
+ ```
85
+ [QA agent adds notes here after review]
86
+
87
+ Example:
88
+ βœ… Review complete - code follows standards
89
+ βœ… Refactored: extracted ValidateRecurrence() method (line 89)
90
+ βœ… Added 3 edge case tests (invalid cron expressions)
91
+ βœ… Documented regex pattern in decisions.md (ADR-007)
92
+ ⚠️ TODO: Add integration test for full CRUD cycle
93
+ ```
94
+
95
+ ---
96
+
97
+ ## πŸ“Š Status Tracking
98
+
99
+ **Current Status:** {{STATUS}}
100
+
101
+ | Status | Date | Agent | Notes |
102
+ |--------|------|-------|-------|
103
+ | Created | {{CREATED_DATE}} | SM | Story created from epic |
104
+ | Ready | {{READY_DATE}} | SM | Prerequisites met, ready for dev |
105
+ | In Progress | {{IN_PROGRESS_DATE}} | Dev | Implementation started |
106
+ | Ready for QA | {{QA_DATE}} | Dev | Implementation complete, awaiting review |
107
+ | Done | {{DONE_DATE}} | QA | Approved, ready for merge |
108
+
109
+ ---
110
+
111
+ ## πŸ”„ Handoff Protocol
112
+
113
+ ### SM β†’ Dev Handoff
114
+ - βœ… Story file created with complete context
115
+ - βœ… Dev Notes injected with architectural guidance
116
+ - βœ… Acceptance criteria defined and verifiable
117
+ - βœ… Dependencies documented
118
+ - βœ… Status: **Ready for Dev**
119
+
120
+ ### Dev β†’ QA Handoff
121
+ - [ ] All tasks checked off
122
+ - [ ] Dev Notes added with implementation details
123
+ - [ ] Tests written (unit + integration as needed)
124
+ - [ ] Code follows standards (validated via pre-commit hooks)
125
+ - [ ] Status updated to: **Ready for QA**
126
+
127
+ ### QA β†’ Done
128
+ - [ ] QA Notes added with review findings
129
+ - [ ] Code reviewed and refactored if needed
130
+ - [ ] All acceptance criteria validated
131
+ - [ ] Documentation updated (if applicable)
132
+ - [ ] Status updated to: **Done**
133
+
134
+ ---
135
+
136
+ ## πŸ“ Additional Notes
137
+
138
+ {{ADDITIONAL_NOTES}}
139
+
140
+ ---
141
+
142
+ *Generated by MORPH-SPEC Framework - Story-Driven Development*
143
+ *Inspired by BMAD Method: Self-contained stories for AI agents*
@@ -1,4 +1,4 @@
1
- # Tasks - {FEATURE_NAME}
1
+ # Tasks - {{FEATURE_NAME_TITLE}}
2
2
 
3
3
  > Checklist de implementaΓ§Γ£o para a feature.
4
4
  > Atualize o status conforme progresso.