@polymorphism-tech/morph-spec 7.0.0 → 7.1.1

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 (89) hide show
  1. package/README.md +368 -368
  2. package/claude-plugin.json +14 -14
  3. package/docs/CHEATSHEET.md +199 -199
  4. package/docs/QUICKSTART.md +200 -200
  5. package/framework/CLAUDE.md +1 -1
  6. package/framework/MORPH.md +4 -1
  7. package/framework/agents.json +132 -127
  8. package/framework/rubrics/backend.json +41 -36
  9. package/framework/rules/ai-agents-standards.md +45 -15
  10. package/framework/rules/neon-standards.md +25 -26
  11. package/framework/skills/core/morph-brainstorming/SKILL.md +1 -1
  12. package/framework/skills/core/morph-plan/SKILL.md +3 -1
  13. package/framework/skills/core/morph-stack-scan/SKILL.md +3 -3
  14. package/framework/standards/STANDARDS.json +1729 -1133
  15. package/framework/standards/ai-agents/agent-session.md +160 -0
  16. package/framework/standards/ai-agents/batching.md +193 -0
  17. package/framework/standards/ai-agents/context-providers.md +188 -0
  18. package/framework/standards/ai-agents/mcp-server.md +250 -0
  19. package/framework/standards/ai-agents/mcp-tools.md +197 -0
  20. package/framework/standards/ai-agents/middleware-patterns.md +207 -0
  21. package/framework/standards/ai-agents/modalities-image-gen.md +173 -0
  22. package/framework/standards/ai-agents/modalities-speech-to-text.md +171 -0
  23. package/framework/standards/ai-agents/modalities-text-to-speech.md +181 -0
  24. package/framework/standards/ai-agents/modalities-vision.md +201 -0
  25. package/framework/standards/ai-agents/multi-agent-patterns.md +155 -0
  26. package/framework/standards/ai-agents/production.md +114 -258
  27. package/framework/standards/ai-agents/prompts-in-db.md +214 -0
  28. package/framework/standards/ai-agents/providers/model-registry.md +158 -0
  29. package/framework/standards/ai-agents/rag-custom-pgvector.md +243 -0
  30. package/framework/standards/ai-agents/service-tier-flex.md +135 -0
  31. package/framework/standards/ai-agents/setup.md +142 -316
  32. package/framework/standards/ai-agents/structured-output.md +249 -0
  33. package/framework/standards/ai-agents/sweet-spot.md +109 -0
  34. package/framework/standards/ai-agents/workflows.md +114 -284
  35. package/framework/standards/architecture/vertical-slice/vertical-slice.md +439 -429
  36. package/framework/standards/backend/api/validation.md +92 -88
  37. package/framework/standards/backend/database/postgresql/database.md +336 -332
  38. package/framework/standards/backend/database/vector-search-rag.md +599 -541
  39. package/framework/standards/backend/dotnet/fluent-validation-vsa.md +4 -0
  40. package/framework/standards/backend/dotnet/result-pattern.md +4 -0
  41. package/framework/standards/backend/dotnet/scalar-ui.md +176 -172
  42. package/framework/standards/backend/dotnet/scrutor.md +4 -0
  43. package/framework/standards/backend/dotnet/vsa-handler-patterns.md +310 -274
  44. package/framework/standards/backend/integrations/asaas/asaas-api.md +260 -216
  45. package/framework/standards/backend/integrations/hangfire/hangfire-jobs.md +354 -350
  46. package/framework/standards/backend/integrations/neon-auth/neon-auth.md +30 -19
  47. package/framework/standards/backend/integrations/resend/resend-email.md +400 -385
  48. package/framework/standards/data/nosql/cache/redis.md +106 -97
  49. package/framework/standards/data/nosql/cosmos-db.md +127 -118
  50. package/framework/standards/data/vector-search/rag-chunking.md +113 -104
  51. package/framework/standards/frontend/design-system/ai-image-generation.md +4 -0
  52. package/framework/standards/frontend/design-system/animations.md +164 -160
  53. package/framework/standards/frontend/design-system/naming.md +68 -64
  54. package/framework/standards/frontend/gsap/gsap-core.md +14 -8
  55. package/framework/standards/frontend/gsap/gsap-plugins.md +26 -21
  56. package/framework/standards/frontend/gsap/gsap-scrolltrigger.md +9 -7
  57. package/framework/standards/frontend/nextjs/app-router.md +127 -123
  58. package/framework/standards/frontend/nextjs/components.md +136 -132
  59. package/framework/standards/frontend/nextjs/data-fetching.md +130 -126
  60. package/framework/standards/frontend/nextjs/forms.md +134 -128
  61. package/framework/standards/frontend/nextjs/motion-patterns.md +328 -322
  62. package/framework/standards/frontend/nextjs/naming-conventions.md +71 -67
  63. package/framework/standards/frontend/nextjs/nextjs-patterns.md +229 -225
  64. package/framework/standards/frontend/nextjs/project-structure.md +106 -102
  65. package/framework/standards/frontend/nextjs/state-management.md +76 -72
  66. package/framework/standards/frontend/nextjs/testing.md +115 -111
  67. package/framework/standards/infrastructure/docker/easypanel-deploy.md +196 -192
  68. package/framework/standards/infrastructure/neon/neon-pgrag.md +6 -2
  69. package/framework/standards/infrastructure/neon/neon-pgvector.md +4 -0
  70. package/framework/standards/infrastructure/neon/neon-setup.md +5 -1
  71. package/framework/standards/integration/mcp/mcp-tools.md +471 -462
  72. package/framework/templates/CLAUDE.md.core.template +1 -1
  73. package/framework/templates/REGISTRY.json +1745 -1239
  74. package/framework/templates/code/dotnet/ai-agents/AgentBootstrap.cs.template +39 -0
  75. package/framework/templates/code/dotnet/ai-agents/EmbeddingService.cs.template +68 -0
  76. package/framework/templates/code/dotnet/ai-agents/ModelRegistry.cs.template +117 -0
  77. package/framework/templates/code/dotnet/ai-agents/PromptRepository.cs.template +95 -0
  78. package/framework/templates/code/dotnet/ai-agents/ResilientToolMiddleware.cs.template +61 -0
  79. package/framework/templates/code/dotnet/ai-agents/VectorSearchTool.cs.template +107 -0
  80. package/framework/templates/code/dotnet/ai-agents/model-registry.json.template +58 -0
  81. package/framework/templates/code/dotnet/backend/repository.cs +3 -10
  82. package/framework/templates/code/sql/ai-agents/agent-prompts-migration.sql.template +58 -0
  83. package/framework/templates/code/sql/ai-agents/pgvector-embeddings-migration.sql.template +91 -0
  84. package/package.json +89 -83
  85. package/src/core/templates/template-registry.js +289 -256
  86. package/src/lib/generators/context-generator.js +516 -518
  87. package/src/lib/generators/scaffold-generator.js +23 -26
  88. package/framework/standards/infrastructure/neon/neon-semantic-kernel.md +0 -310
  89. package/framework/templates/integrations/semantic-kernel-neon.cs +0 -125
@@ -1,14 +1,14 @@
1
- {
2
- "name": "morph-spec",
3
- "version": "4.22.1",
4
- "displayName": "MORPH-SPEC Framework",
5
- "description": "Spec-driven development with 38 agents and 8-phase workflow for .NET/Blazor/Next.js/Azure",
6
- "publisher": "polymorphism-tech",
7
- "skills": {
8
- "directory": "framework/skills",
9
- "namespace": "morph-spec"
10
- },
11
- "hooks": {
12
- "directory": "framework/hooks/claude-code"
13
- }
14
- }
1
+ {
2
+ "name": "morph-spec",
3
+ "version": "7.1.1",
4
+ "displayName": "MORPH-SPEC Framework",
5
+ "description": "Spec-driven development with 38 agents and 8-phase workflow for .NET/Blazor/Next.js/Azure",
6
+ "publisher": "polymorphism-tech",
7
+ "skills": {
8
+ "directory": "framework/skills",
9
+ "namespace": "morph-spec"
10
+ },
11
+ "hooks": {
12
+ "directory": "framework/hooks/claude-code"
13
+ }
14
+ }
@@ -1,199 +1,199 @@
1
- # morph-spec Cheat Sheet
2
-
3
- ## Setup
4
-
5
- ```bash
6
- npm install -g @polymorphism-tech/morph-spec # install globally
7
- morph-spec init # initialize project
8
- morph-spec init --wizard # interactive wizard
9
- morph-spec init --force # overwrite existing
10
- morph-spec update # sync framework files
11
- morph-spec doctor # health check
12
- morph-spec --version
13
- ```
14
-
15
- ---
16
-
17
- ## Phase workflow
18
-
19
- ```
20
- proposal → [uiux] → design → plan → tasks → implement → [sync]
21
- ```
22
-
23
- Phases in brackets are optional.
24
-
25
- | Phase | Directory | Output files | Gate |
26
- |-------|-----------|--------------|------|
27
- | proposal | `0-proposal/` | `proposal.md` | ✅ Approval |
28
- | uiux *(optional)* | `1-design/` | `design-system.md`, `mockups.md`, `components.md`, `flows.md` | ✅ Approval |
29
- | design | `2-design/` | `spec.md`, `contracts.cs`, `decisions.md` | ✅ Approval |
30
- | plan | `3-plan/` | `plan.md` | ✅ Approval |
31
- | tasks | `4-tasks/` | `tasks.md` | ✅ Approval |
32
- | implement | `3-implement/` | code + `recap.md` | — |
33
- | sync *(optional)* | — | standards updated | — |
34
-
35
- ---
36
-
37
- ## Slash commands (Claude Code)
38
-
39
- | Command | Description |
40
- |---------|-------------|
41
- | `/morph-proposal {feature}` | Full spec pipeline — phases 0–4 with approval gates |
42
- | `/morph-apply {feature}` | Implement approved feature — phase 5 |
43
- | `/morph-status` | Project-wide feature status dashboard |
44
- | `/morph-preflight` | Pre-implementation validation (7 checks) |
45
-
46
- ---
47
-
48
- ## CLI — project management
49
-
50
- ```bash
51
- morph-spec init [--force] [--skip-mcp]
52
- morph-spec update [--templates] [--standards]
53
- morph-spec doctor
54
- ```
55
-
56
- ---
57
-
58
- ## CLI — feature workflow
59
-
60
- ```bash
61
- morph-spec state list # all features
62
- morph-spec state get {feature} [--json] # feature detail
63
- morph-spec state set {feature} {key} {value} # update property
64
- morph-spec phase advance {feature} # advance to next phase
65
- morph-spec status {feature} [--json] [--verbose]
66
- morph-spec task done {feature} {task-id} # mark task complete
67
- morph-spec task start {feature} {task-id} # start a task (dispatch gate)
68
- ```
69
-
70
- ---
71
-
72
- ## CLI — validation
73
-
74
- ```bash
75
- morph-spec validate # all validators
76
- morph-spec validate architecture
77
- morph-spec validate packages
78
- morph-spec validate contrast [--wcag-aaa]
79
- morph-spec validate-feature {feature} [--phase {phase}] [--json]
80
- ```
81
-
82
- ---
83
-
84
- ## CLI — utilities
85
-
86
- ```bash
87
- morph-spec generate recap {feature} # auto-generate recap.md
88
- morph-spec template render {id} {output} {vars-json}
89
- morph-spec trust status [feature]
90
- morph-spec trust set {feature} {level} [reason] # level: manual|high|auto
91
- morph-spec mcp setup [name] [--list] [--auto]
92
- ```
93
-
94
- ---
95
-
96
- ## State — mark-output
97
-
98
- ```bash
99
- morph-spec state mark-output {feature} proposal
100
- morph-spec state mark-output {feature} spec
101
- morph-spec state mark-output {feature} contracts
102
- morph-spec state mark-output {feature} decisions
103
- morph-spec state mark-output {feature} tasks
104
- morph-spec state mark-output {feature} recap
105
-
106
- # UI outputs (camelCase or kebab-case both work)
107
- morph-spec state mark-output {feature} uiDesignSystem
108
- morph-spec state mark-output {feature} uiMockups
109
- morph-spec state mark-output {feature} uiComponents
110
- morph-spec state mark-output {feature} uiFlows
111
- ```
112
-
113
- ---
114
-
115
- ## State — agents
116
-
117
- ```bash
118
- morph-spec state add-agent {feature} {agent-id}
119
- morph-spec state remove-agent {feature} {agent-id}
120
- ```
121
-
122
- ---
123
-
124
- ## Checkpoints
125
-
126
- ```bash
127
- morph-spec checkpoint-save {feature}
128
- ```
129
-
130
- ---
131
-
132
- ## Approvals
133
-
134
- ```bash
135
- morph-spec approve {feature} {gate} # approve a gate
136
- morph-spec approval-status {feature} # show gate status
137
- ```
138
-
139
- ---
140
-
141
- ## Directory structure
142
-
143
- ```
144
- .morph/
145
- ├── config/
146
- │ └── config.json # project config (editable)
147
- ├── framework/ # READ-ONLY
148
- │ ├── agents.json # 22 agents, 4 tiers
149
- │ ├── standards/ # 82 standards across 11 categories
150
- │ └── templates/ # code and IaC templates
151
- ├── context/ # project context (editable)
152
- │ ├── README.md
153
- │ └── standards.md
154
- ├── features/
155
- │ └── {feature}/
156
- │ ├── 0-proposal/proposal.md
157
- │ ├── 1-design/design-system.md, mockups.md, components.md, flows.md
158
- │ ├── 2-design/spec.md, contracts.cs, decisions.md
159
- │ ├── 3-tasks/tasks.md
160
- │ └── 4-implement/recap.md
161
- ├── checkpoints/
162
- ├── logs/
163
- └── state.json # READ-ONLY — CLI managed
164
-
165
- .claude/
166
- ├── commands/ # slash commands
167
- ├── skills/ # framework skills (SKILL.md per dir)
168
- ├── agents/ # native subagents (22)
169
- │ ├── morph-{id}.md # tier 1-2 agents
170
- │ └── morph-domain-{name}.md # tier 3 domain agents
171
- ├── rules/ # path-scoped rules (6 files)
172
- └── settings.local.json # hooks (10)
173
- ```
174
-
175
- ---
176
-
177
- ## Protected files
178
-
179
- These files are never edited directly. Use CLI commands or `morph-spec update` instead:
180
-
181
- | Path | Protected by |
182
- |------|-------------|
183
- | `.morph/state.json` | `permissions.deny` |
184
- | `.morph/framework/**` | `permissions.deny` |
185
- | Approved spec/contracts | `protect-spec-files.js` hook |
186
-
187
- ---
188
-
189
- ## Links
190
-
191
- - [QUICKSTART.md](QUICKSTART.md) — step-by-step guide
192
- - [ARCHITECTURE.md](ARCHITECTURE.md) — system design
193
- - [CHANGELOG.md](../CHANGELOG.md) — release history
194
- - [npm](https://www.npmjs.com/package/@polymorphism-tech/morph-spec)
195
- - support@polymorphism.com.br
196
-
197
- ---
198
-
199
- *morph-spec v4.22.1 by Polymorphism Tech*
1
+ # morph-spec Cheat Sheet
2
+
3
+ ## Setup
4
+
5
+ ```bash
6
+ npm install -g @polymorphism-tech/morph-spec # install globally
7
+ morph-spec init # initialize project
8
+ morph-spec init --wizard # interactive wizard
9
+ morph-spec init --force # overwrite existing
10
+ morph-spec update # sync framework files
11
+ morph-spec doctor # health check
12
+ morph-spec --version
13
+ ```
14
+
15
+ ---
16
+
17
+ ## Phase workflow
18
+
19
+ ```
20
+ proposal → [uiux] → design → plan → tasks → implement → [sync]
21
+ ```
22
+
23
+ Phases in brackets are optional.
24
+
25
+ | Phase | Directory | Output files | Gate |
26
+ |-------|-----------|--------------|------|
27
+ | proposal | `0-proposal/` | `proposal.md` | ✅ Approval |
28
+ | uiux *(optional)* | `1-design/` | `design-system.md`, `mockups.md`, `components.md`, `flows.md` | ✅ Approval |
29
+ | design | `2-design/` | `spec.md`, `contracts.cs`, `decisions.md` | ✅ Approval |
30
+ | plan | `3-plan/` | `plan.md` | ✅ Approval |
31
+ | tasks | `4-tasks/` | `tasks.md` | ✅ Approval |
32
+ | implement | `3-implement/` | code + `recap.md` | — |
33
+ | sync *(optional)* | — | standards updated | — |
34
+
35
+ ---
36
+
37
+ ## Slash commands (Claude Code)
38
+
39
+ | Command | Description |
40
+ |---------|-------------|
41
+ | `/morph-proposal {feature}` | Full spec pipeline — phases 0–4 with approval gates |
42
+ | `/morph-apply {feature}` | Implement approved feature — phase 5 |
43
+ | `/morph-status` | Project-wide feature status dashboard |
44
+ | `/morph-preflight` | Pre-implementation validation (7 checks) |
45
+
46
+ ---
47
+
48
+ ## CLI — project management
49
+
50
+ ```bash
51
+ morph-spec init [--force] [--skip-mcp]
52
+ morph-spec update [--templates] [--standards]
53
+ morph-spec doctor
54
+ ```
55
+
56
+ ---
57
+
58
+ ## CLI — feature workflow
59
+
60
+ ```bash
61
+ morph-spec state list # all features
62
+ morph-spec state get {feature} [--json] # feature detail
63
+ morph-spec state set {feature} {key} {value} # update property
64
+ morph-spec phase advance {feature} # advance to next phase
65
+ morph-spec status {feature} [--json] [--verbose]
66
+ morph-spec task done {feature} {task-id} # mark task complete
67
+ morph-spec task start {feature} {task-id} # start a task (dispatch gate)
68
+ ```
69
+
70
+ ---
71
+
72
+ ## CLI — validation
73
+
74
+ ```bash
75
+ morph-spec validate # all validators
76
+ morph-spec validate architecture
77
+ morph-spec validate packages
78
+ morph-spec validate contrast [--wcag-aaa]
79
+ morph-spec validate-feature {feature} [--phase {phase}] [--json]
80
+ ```
81
+
82
+ ---
83
+
84
+ ## CLI — utilities
85
+
86
+ ```bash
87
+ morph-spec generate recap {feature} # auto-generate recap.md
88
+ morph-spec template render {id} {output} {vars-json}
89
+ morph-spec trust status [feature]
90
+ morph-spec trust set {feature} {level} [reason] # level: manual|high|auto
91
+ morph-spec mcp setup [name] [--list] [--auto]
92
+ ```
93
+
94
+ ---
95
+
96
+ ## State — mark-output
97
+
98
+ ```bash
99
+ morph-spec state mark-output {feature} proposal
100
+ morph-spec state mark-output {feature} spec
101
+ morph-spec state mark-output {feature} contracts
102
+ morph-spec state mark-output {feature} decisions
103
+ morph-spec state mark-output {feature} tasks
104
+ morph-spec state mark-output {feature} recap
105
+
106
+ # UI outputs (camelCase or kebab-case both work)
107
+ morph-spec state mark-output {feature} uiDesignSystem
108
+ morph-spec state mark-output {feature} uiMockups
109
+ morph-spec state mark-output {feature} uiComponents
110
+ morph-spec state mark-output {feature} uiFlows
111
+ ```
112
+
113
+ ---
114
+
115
+ ## State — agents
116
+
117
+ ```bash
118
+ morph-spec state add-agent {feature} {agent-id}
119
+ morph-spec state remove-agent {feature} {agent-id}
120
+ ```
121
+
122
+ ---
123
+
124
+ ## Checkpoints
125
+
126
+ ```bash
127
+ morph-spec checkpoint-save {feature}
128
+ ```
129
+
130
+ ---
131
+
132
+ ## Approvals
133
+
134
+ ```bash
135
+ morph-spec approve {feature} {gate} # approve a gate
136
+ morph-spec approval-status {feature} # show gate status
137
+ ```
138
+
139
+ ---
140
+
141
+ ## Directory structure
142
+
143
+ ```
144
+ .morph/
145
+ ├── config/
146
+ │ └── config.json # project config (editable)
147
+ ├── framework/ # READ-ONLY
148
+ │ ├── agents.json # 22 agents, 4 tiers
149
+ │ ├── standards/ # 82 standards across 11 categories
150
+ │ └── templates/ # code and IaC templates
151
+ ├── context/ # project context (editable)
152
+ │ ├── README.md
153
+ │ └── standards.md
154
+ ├── features/
155
+ │ └── {feature}/
156
+ │ ├── 0-proposal/proposal.md
157
+ │ ├── 1-design/design-system.md, mockups.md, components.md, flows.md
158
+ │ ├── 2-design/spec.md, contracts.cs, decisions.md
159
+ │ ├── 3-tasks/tasks.md
160
+ │ └── 4-implement/recap.md
161
+ ├── checkpoints/
162
+ ├── logs/
163
+ └── state.json # READ-ONLY — CLI managed
164
+
165
+ .claude/
166
+ ├── commands/ # slash commands
167
+ ├── skills/ # framework skills (SKILL.md per dir)
168
+ ├── agents/ # native subagents (22)
169
+ │ ├── morph-{id}.md # tier 1-2 agents
170
+ │ └── morph-domain-{name}.md # tier 3 domain agents
171
+ ├── rules/ # path-scoped rules (6 files)
172
+ └── settings.local.json # hooks (10)
173
+ ```
174
+
175
+ ---
176
+
177
+ ## Protected files
178
+
179
+ These files are never edited directly. Use CLI commands or `morph-spec update` instead:
180
+
181
+ | Path | Protected by |
182
+ |------|-------------|
183
+ | `.morph/state.json` | `permissions.deny` |
184
+ | `.morph/framework/**` | `permissions.deny` |
185
+ | Approved spec/contracts | `protect-spec-files.js` hook |
186
+
187
+ ---
188
+
189
+ ## Links
190
+
191
+ - [QUICKSTART.md](QUICKSTART.md) — step-by-step guide
192
+ - [ARCHITECTURE.md](ARCHITECTURE.md) — system design
193
+ - [CHANGELOG.md](../CHANGELOG.md) — release history
194
+ - [npm](https://www.npmjs.com/package/@polymorphism-tech/morph-spec)
195
+ - support@polymorphism.com.br
196
+
197
+ ---
198
+
199
+ *morph-spec v7.1.1 by Polymorphism Tech*