@polymorphism-tech/morph-spec 11.2.0 → 11.3.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.
- package/README.md +3 -2
- package/bin/morph-spec.js +7 -7
- package/docs/CHEATSHEET.md +1 -1
- package/docs/QUICKSTART.md +1 -1
- package/framework/CLAUDE.md +1 -1
- package/framework/MORPH.md +2 -2
- package/framework/agents.json +4 -4
- package/framework/docs/CLI.md +19 -11
- package/framework/evals/review-checklist.md +26 -2
- package/framework/hooks/README.md +3 -2
- package/framework/hooks/claude-code/core/graph-refresh-kick.js +2 -2
- package/framework/mcp/registry.json +15 -15
- package/framework/rules/ai-agents-standards.md +9 -1
- package/framework/rules/gsap-standards.md +8 -0
- package/framework/rules/mcp-standards.md +10 -0
- package/framework/schemas/config.schema.json +7 -0
- package/framework/skills/core/create-umbraco-lp/SKILL.md +1 -1
- package/framework/skills/core/migrate-lp-to-umbraco/SKILL.md +1 -1
- package/framework/skills/core/morph-apply/SKILL.md +4 -3
- package/framework/skills/core/morph-plan/SKILL.md +1 -1
- package/framework/skills/core/morph-uiux/SKILL.md +1 -1
- package/framework/standards/STANDARDS.json +8 -4
- package/framework/standards/STANDARDS.meta.json +1 -1
- package/framework/standards/ai-agents/agent-archetypes.md +1 -1
- package/framework/standards/ai-agents/middleware-patterns.md +0 -2
- package/framework/standards/ai-agents/prompt-sources.md +2 -2
- package/framework/standards/ai-agents/providers/model-registry.md +9 -12
- package/framework/standards/ai-agents/rag-custom-pgvector.md +2 -9
- package/framework/standards/frontend/design-system/ai-image-generation.md +1 -1
- package/framework/standards/infrastructure/docker/local-compose-isolation.md +2 -2
- package/framework/standards/integration/mcp/mcp-tools.md +124 -266
- package/framework/templates/README.md +52 -82
- package/framework/templates/REGISTRY.json +0 -206
- package/framework/templates/code/sql/ai-agents/agent-prompts-migration.sql.template +3 -4
- package/framework/templates/context/design-system.md +1 -1
- package/framework/templates/docs/plan.md +1 -1
- package/framework/templates/dotnet/ai-kit/src/Morph.AiKit/Providers/model-registry.v2.json +1 -1
- package/framework/templates/dotnet/ai-kit/tests/Morph.AiKit.Tests/MediaDisclosureTests.cs +1 -1
- package/framework/templates/dotnet/ai-kit/tests/Morph.AiKit.Tests/Morph.AiKit.Tests.csproj +2 -4
- package/framework/templates/frontend/nextjs/gsap-scroll-section.tsx.hbs +13 -17
- package/framework/templates/infrastructure/github/README.md +10 -13
- package/package.json +9 -3
- package/src/commands/mcp/manual-setup.js +95 -0
- package/src/commands/mcp/mcp-setup.js +23 -191
- package/src/commands/project/doctor.js +6 -16
- package/src/commands/project/init-contract.js +2 -2
- package/src/commands/project/init.js +15 -133
- package/src/commands/project/stack-scan.js +6 -14
- package/src/commands/project/stack-set.js +1 -1
- package/src/commands/project/standards.js +1 -2
- package/src/commands/project/update.js +52 -66
- package/src/commands/scaffold/scaffold.js +28 -7
- package/src/lib/ai/ai-project-scan.js +1 -4
- package/src/lib/ai/code-audit.js +1 -6
- package/src/lib/ai/registry-audit.js +2 -1
- package/src/lib/config/project-config.js +3 -2
- package/src/lib/contract/apply.js +2 -1
- package/src/lib/contract/merge.js +1 -0
- package/src/lib/contract/scan.js +5 -5
- package/src/lib/detectors/claude-config-detector.js +45 -47
- package/src/lib/detectors/mcp-config.js +2 -1
- package/src/lib/diff/diff-lines.js +2 -7
- package/src/lib/graph/graph-loader.js +2 -1
- package/src/lib/graph/graphifyignore.js +2 -1
- package/src/lib/installers/install-manifest.js +56 -0
- package/src/lib/installers/mcp-installer.js +14 -5
- package/src/lib/installers/rules-installer.js +9 -15
- package/src/lib/installers/stack-assets.js +42 -21
- package/src/lib/installers/stack-sync.js +12 -12
- package/src/lib/installers/stack-tooling.js +4 -3
- package/src/lib/json-file.js +9 -0
- package/src/lib/plan/artifact-vocabulary.js +1 -1
- package/src/lib/plan/checks.js +3 -2
- package/src/lib/plan/media.js +3 -3
- package/src/lib/plan/plan-parser.js +5 -10
- package/src/lib/review-reports.js +5 -4
- package/src/lib/stack/stack-scan.js +1 -1
- package/src/lib/standards/verified-against.js +1 -1
- package/src/lib/tests-audit/audit.js +1 -1
- package/src/lib/text.js +5 -0
- package/src/scripts/setup-infra.js +22 -33
- package/src/utils/agents-installer.js +13 -30
- package/src/utils/claude-md-injector.js +16 -50
- package/src/utils/claude-settings-manager.js +2 -2
- package/src/utils/file-copier.js +3 -4
- package/src/utils/hooks-installer.js +55 -20
- package/src/utils/skills-installer.js +18 -78
- package/framework/templates/IDE-SNIPPETS.md +0 -262
- package/framework/templates/code/dotnet/ai-agents/AgentBootstrap.cs.template +0 -26
- package/framework/templates/code/dotnet/ai-agents/EmbeddingService.cs.template +0 -28
- package/framework/templates/code/dotnet/ai-agents/ModelRegistry.cs.template +0 -99
- package/framework/templates/code/dotnet/ai-agents/ResilientToolMiddleware.cs.template +0 -40
- package/framework/templates/code/dotnet/ai-agents/VectorSearchTool.cs.template +0 -54
- package/framework/templates/code/dotnet/ai-agents/model-registry.json.template +0 -53
- package/framework/templates/code/dotnet/contracts/README.md +0 -74
- package/framework/templates/code/dotnet/database/vector-entity.cs +0 -49
- package/framework/templates/code/sql/ai-agents/pgvector-embeddings-migration.sql.template +0 -91
- package/framework/templates/code/sql/postgresql-migration.template.sql +0 -108
- package/framework/templates/code/typescript/contracts.ts +0 -140
- package/framework/templates/examples/design-system-examples.md +0 -354
- package/framework/templates/infrastructure/docker/Dockerfile.template +0 -58
- package/framework/templates/infrastructure/github/actions/docker-build-push/action.yml.hbs +0 -45
- package/framework/templates/infrastructure/github/actions/health-check/action.yml.hbs +0 -27
- package/framework/templates/integrations/asaas-client.cs +0 -332
- package/framework/templates/integrations/asaas-webhook.cs +0 -290
- package/framework/templates/integrations/neon-auth-config.cs +0 -170
- package/framework/templates/ui/design-system.css +0 -226
- package/src/lib/detectors/index.js +0 -153
- package/src/lib/installers/templates-reconcile.js +0 -26
|
@@ -1,134 +1,104 @@
|
|
|
1
1
|
# MORPH-SPEC Template System
|
|
2
2
|
|
|
3
|
-
>
|
|
3
|
+
> Templates organized by **technology**, indexed by `REGISTRY.json`.
|
|
4
4
|
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
**89 templates**, grouped by the technology they target (dotnet, typescript, sql, docker,
|
|
8
|
-
nextjs) rather than by stack. A template for a .NET slice serves every stack with a .NET
|
|
9
|
-
backend, so a new stack reuses what exists instead of copying it.
|
|
5
|
+
Templates are grouped by the technology they target (dotnet, sql, docker, nextjs)
|
|
6
|
+
rather than by stack: a .NET slice template serves every stack with a .NET backend.
|
|
10
7
|
|
|
11
8
|
`REGISTRY.json` is the source of truth: it maps each template `id` to its `kind`, `path` and
|
|
12
|
-
`category` (the shape per kind is in its `kinds` block).
|
|
13
|
-
|
|
9
|
+
`category` (the shape per kind is in its `kinds` block). Code resolves a template by id through
|
|
10
|
+
the registry, never by a hardcoded path, and this README repeats no path the registry owns.
|
|
11
|
+
|
|
12
|
+
| Kind | What it is |
|
|
13
|
+
|------|------------|
|
|
14
|
+
| `template` | Rendered to an output file |
|
|
15
|
+
| `fragment` | A reference snippet read as an example, never rendered |
|
|
16
|
+
| `project` | A whole compilable project registered as one unit (`ai-kit`) |
|
|
14
17
|
|
|
15
18
|
---
|
|
16
19
|
|
|
17
|
-
##
|
|
20
|
+
## Directory structure
|
|
18
21
|
|
|
19
22
|
```
|
|
20
23
|
framework/templates/
|
|
21
|
-
├── docs/ # plan.md
|
|
22
|
-
├── context/ #
|
|
23
|
-
|
|
24
|
-
├── code/ # Code templates, by technology
|
|
24
|
+
├── docs/ # plan.md — the grammar `morph-spec plan-check` parses
|
|
25
|
+
├── context/ # design-system.md
|
|
26
|
+
├── code/
|
|
25
27
|
│ ├── dotnet/ # abstractions, ai-agents, constants, contracts, database,
|
|
26
28
|
│ │ # exceptions, extensions, feature, jobs, pipelines
|
|
27
|
-
│
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
├── frontend/
|
|
31
|
-
│ └── nextjs/ # page, client-component, feature-form, use-feature, env, tsconfig…
|
|
32
|
-
│
|
|
29
|
+
│ └── sql/ # postgresql migration, RLS policy, ai-agents
|
|
30
|
+
├── dotnet/ai-kit/ # Morph.AiKit — the compilable .NET solution behind the ai-agents standards
|
|
31
|
+
├── frontend/nextjs/ # page, client-component, feature-form, use-feature, env, tsconfig…
|
|
33
32
|
├── infrastructure/
|
|
34
33
|
│ ├── docker/ # Dockerfiles, compose, Coolify config
|
|
35
|
-
│ └── github/ # Actions workflows
|
|
36
|
-
|
|
37
|
-
├── integrations/ # asaas-client, asaas-webhook, neon-auth-config
|
|
38
|
-
├── ui/ # design-system.css
|
|
39
|
-
├── examples/ # design-system-examples.md
|
|
40
|
-
└── REGISTRY.json # template metadata — the index every consumer reads
|
|
34
|
+
│ └── github/ # Actions workflows (.hbs)
|
|
35
|
+
└── REGISTRY.json
|
|
41
36
|
```
|
|
42
37
|
|
|
43
38
|
---
|
|
44
39
|
|
|
45
|
-
##
|
|
46
|
-
|
|
47
|
-
All templates render through Handlebars with custom helpers registered in
|
|
48
|
-
`src/core/templates/template-renderer.js`.
|
|
49
|
-
|
|
50
|
-
```handlebars
|
|
51
|
-
# Feature: {{titleCase FEATURE_NAME}}
|
|
52
|
-
|
|
53
|
-
namespace {{pascalCase FEATURE_NAME}};
|
|
40
|
+
## Template engine: Handlebars
|
|
54
41
|
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
### Available helpers
|
|
42
|
+
Templates render through Handlebars with the helpers registered in
|
|
43
|
+
`src/core/templates/template-renderer.js`:
|
|
59
44
|
|
|
60
45
|
| Group | Helpers |
|
|
61
46
|
|-------|---------|
|
|
62
|
-
| **Case** | `pascalCase` `camelCase` `snakeCase` `upperSnakeCase` `kebabCase` `titleCase`
|
|
63
|
-
| **Words** | `pluralize`
|
|
64
|
-
| **
|
|
65
|
-
| **
|
|
66
|
-
| **String** | `trim` `replace` `concat` `substr` `startsWith` `endsWith` `contains` `length` |
|
|
67
|
-
| **Math** | `add` `subtract` `multiply` `divide` `mod` `round` |
|
|
68
|
-
| **Array** | `join` `first` `last` `slice` |
|
|
69
|
-
| **Misc** | `json` `now` `year` `formatDate` |
|
|
47
|
+
| **Case** | `pascalCase` `camelCase` `snakeCase` `upperSnakeCase` `kebabCase` `titleCase` |
|
|
48
|
+
| **Words** | `pluralize` |
|
|
49
|
+
| **Logic** | `eq` `and` `or` `default` |
|
|
50
|
+
| **Misc** | `now` `add` |
|
|
70
51
|
|
|
71
52
|
```handlebars
|
|
72
|
-
{{
|
|
73
|
-
|
|
74
|
-
{{
|
|
75
|
-
//
|
|
53
|
+
namespace {{pascalCase FEATURE_NAME}};
|
|
54
|
+
|
|
55
|
+
{{#if (eq STACK "nextjs")}}
|
|
56
|
+
// Next.js only
|
|
76
57
|
{{/if}}
|
|
77
58
|
```
|
|
78
59
|
|
|
79
|
-
|
|
60
|
+
A helper that is not in the table does not exist: Handlebars throws on it at render time.
|
|
80
61
|
|
|
81
|
-
|
|
62
|
+
---
|
|
82
63
|
|
|
83
|
-
|
|
84
|
-
`morph-spec setup-infra` deliberately skips copying `framework/templates/` — a target project
|
|
85
|
-
gets the package's templates for free and stays current on every upgrade.
|
|
64
|
+
## How templates are consumed
|
|
86
65
|
|
|
87
|
-
**
|
|
66
|
+
Templates are **resolved from the installed npm package**, never copied into a project: a
|
|
67
|
+
target project gets the package's templates and stays current on every upgrade.
|
|
88
68
|
|
|
89
69
|
```bash
|
|
90
70
|
morph-spec scaffold dotnet <feature> <slice-name> # VSA slice (endpoint, handler, request,
|
|
91
71
|
# response, validator, errors, entity)
|
|
92
72
|
morph-spec scaffold nextjs <feature> # page, client component, form, hook
|
|
73
|
+
morph-spec scaffold show <template-id> # print one template by its registry id
|
|
93
74
|
```
|
|
94
75
|
|
|
95
|
-
|
|
96
|
-
|
|
97
|
-
|
|
98
|
-
|
|
99
|
-
### Local override
|
|
100
|
-
|
|
101
|
-
A project may shadow any packaged template by placing a file at the same relative path under
|
|
102
|
-
`.morph/framework/templates/{path}`. The local copy wins, and **stops receiving framework
|
|
103
|
-
updates** — only override when the packaged template genuinely does not fit.
|
|
76
|
+
`scaffold show` is how a session reads a template or a fragment; the ids are listed in the stack
|
|
77
|
+
rules (`*-templates`, `infrastructure-standards`, `neon-standards`, `ai-agents-standards`,
|
|
78
|
+
`gsap-standards`). A `project` is not printed:
|
|
79
|
+
read its files in the package.
|
|
104
80
|
|
|
105
81
|
---
|
|
106
82
|
|
|
107
|
-
##
|
|
83
|
+
## Adding a template
|
|
108
84
|
|
|
109
|
-
1. Create the file under the right technology directory
|
|
110
|
-
|
|
111
|
-
would otherwise confuse tooling).
|
|
85
|
+
1. Create the file under the right technology directory (Handlebars syntax, `.hbs` when the
|
|
86
|
+
extension would otherwise confuse tooling).
|
|
112
87
|
2. Register it in `REGISTRY.json` with a unique `id`, its `kind`, `path` and `category`, plus
|
|
113
|
-
the fields its kind requires
|
|
114
|
-
|
|
88
|
+
the fields its kind requires. `npm run validate` checks the shape, the path, the
|
|
89
|
+
placeholders of an entry with `validatePlaceholders: true`, and that every tracked file
|
|
90
|
+
under `templates/` is registered.
|
|
91
|
+
3. Cite the `id` in the stack rule that should offer it; a template no rule names is never found.
|
|
92
|
+
4. If the scaffolder should emit it, add the `id` to the list in
|
|
115
93
|
`src/lib/generators/scaffold-generator.js`.
|
|
116
94
|
|
|
117
|
-
|
|
118
|
-
|
|
119
|
-
Add `"deprecated": true` plus `"deprecationReason"` to its `REGISTRY.json` entry. Keep the
|
|
120
|
-
file until a major version bump.
|
|
95
|
+
Removing a template is removing the file and its registry entry in the same change.
|
|
121
96
|
|
|
122
97
|
---
|
|
123
98
|
|
|
124
|
-
##
|
|
99
|
+
## References
|
|
125
100
|
|
|
126
|
-
- **Registry
|
|
101
|
+
- **Registry:** [`src/core/templates/template-registry.js`](../../src/core/templates/template-registry.js)
|
|
127
102
|
- **Renderer + helpers:** [`src/core/templates/template-renderer.js`](../../src/core/templates/template-renderer.js)
|
|
128
103
|
- **Scaffold generator:** [`src/lib/generators/scaffold-generator.js`](../../src/lib/generators/scaffold-generator.js)
|
|
129
|
-
- **Stack filtering:** [`src/lib/stack-filter.js`](../../src/lib/stack-filter.js)
|
|
130
104
|
- **Handlebars docs:** https://handlebarsjs.com/
|
|
131
|
-
|
|
132
|
-
---
|
|
133
|
-
|
|
134
|
-
**MORPH-SPEC Template System** — technology-based, registry-indexed, resolved from the package.
|
|
@@ -22,18 +22,6 @@
|
|
|
22
22
|
"deprecated": false,
|
|
23
23
|
"validatePlaceholders": true
|
|
24
24
|
},
|
|
25
|
-
{
|
|
26
|
-
"id": "design-system-examples",
|
|
27
|
-
"kind": "template",
|
|
28
|
-
"name": "Design System Examples",
|
|
29
|
-
"path": "examples/design-system-examples.md",
|
|
30
|
-
"category": "examples",
|
|
31
|
-
"description": "Example design system definitions",
|
|
32
|
-
"outputName": null,
|
|
33
|
-
"placeholders": [],
|
|
34
|
-
"deprecated": false,
|
|
35
|
-
"validatePlaceholders": true
|
|
36
|
-
},
|
|
37
25
|
{
|
|
38
26
|
"id": "dotnet-backend-test",
|
|
39
27
|
"kind": "template",
|
|
@@ -86,18 +74,6 @@
|
|
|
86
74
|
"deprecated": false,
|
|
87
75
|
"validatePlaceholders": true
|
|
88
76
|
},
|
|
89
|
-
{
|
|
90
|
-
"id": "dotnet-contracts-readme",
|
|
91
|
-
"kind": "template",
|
|
92
|
-
"name": "Contracts README",
|
|
93
|
-
"path": "code/dotnet/contracts/README.md",
|
|
94
|
-
"category": "documentation",
|
|
95
|
-
"description": "Documentation for contract patterns and usage",
|
|
96
|
-
"outputName": "README.md",
|
|
97
|
-
"placeholders": [],
|
|
98
|
-
"deprecated": false,
|
|
99
|
-
"validatePlaceholders": true
|
|
100
|
-
},
|
|
101
77
|
{
|
|
102
78
|
"id": "dotnet-contracts-vsa",
|
|
103
79
|
"kind": "template",
|
|
@@ -114,21 +90,6 @@
|
|
|
114
90
|
"deprecated": false,
|
|
115
91
|
"validatePlaceholders": true
|
|
116
92
|
},
|
|
117
|
-
{
|
|
118
|
-
"id": "typescript-contracts",
|
|
119
|
-
"kind": "template",
|
|
120
|
-
"name": "TypeScript Contracts",
|
|
121
|
-
"path": "code/typescript/contracts.ts",
|
|
122
|
-
"category": "code",
|
|
123
|
-
"description": "TypeScript type definitions and interfaces",
|
|
124
|
-
"outputName": "contracts.ts",
|
|
125
|
-
"placeholders": [
|
|
126
|
-
"DATE",
|
|
127
|
-
"FEATURE_NAME"
|
|
128
|
-
],
|
|
129
|
-
"deprecated": false,
|
|
130
|
-
"validatePlaceholders": true
|
|
131
|
-
},
|
|
132
93
|
{
|
|
133
94
|
"id": "sql-postgresql-migration",
|
|
134
95
|
"kind": "template",
|
|
@@ -144,23 +105,6 @@
|
|
|
144
105
|
"deprecated": false,
|
|
145
106
|
"validatePlaceholders": true
|
|
146
107
|
},
|
|
147
|
-
{
|
|
148
|
-
"id": "sql-postgresql-migration-enhanced",
|
|
149
|
-
"kind": "template",
|
|
150
|
-
"name": "PostgreSQL Migration (Enhanced)",
|
|
151
|
-
"path": "code/sql/postgresql-migration.template.sql",
|
|
152
|
-
"category": "code",
|
|
153
|
-
"description": "Enhanced PostgreSQL migration with RLS and indexes",
|
|
154
|
-
"outputName": "{timestamp}_{feature_name}_enhanced.sql",
|
|
155
|
-
"placeholders": [
|
|
156
|
-
"DATE",
|
|
157
|
-
"DESCRIPTION",
|
|
158
|
-
"FEATURE_NAME_HUMAN",
|
|
159
|
-
"TABLE_NAME"
|
|
160
|
-
],
|
|
161
|
-
"deprecated": false,
|
|
162
|
-
"validatePlaceholders": true
|
|
163
|
-
},
|
|
164
108
|
{
|
|
165
109
|
"id": "sql-rls-policy",
|
|
166
110
|
"kind": "template",
|
|
@@ -204,18 +148,6 @@
|
|
|
204
148
|
"deprecated": false,
|
|
205
149
|
"validatePlaceholders": true
|
|
206
150
|
},
|
|
207
|
-
{
|
|
208
|
-
"id": "docker-dockerfile-generic",
|
|
209
|
-
"kind": "template",
|
|
210
|
-
"name": "Dockerfile (Generic)",
|
|
211
|
-
"path": "infrastructure/docker/Dockerfile.template",
|
|
212
|
-
"category": "infrastructure",
|
|
213
|
-
"description": "Generic multi-stage Dockerfile template",
|
|
214
|
-
"outputName": "Dockerfile",
|
|
215
|
-
"placeholders": [],
|
|
216
|
-
"deprecated": false,
|
|
217
|
-
"validatePlaceholders": true
|
|
218
|
-
},
|
|
219
151
|
{
|
|
220
152
|
"id": "docker-compose",
|
|
221
153
|
"kind": "template",
|
|
@@ -243,56 +175,6 @@
|
|
|
243
175
|
"deprecated": false,
|
|
244
176
|
"validatePlaceholders": true
|
|
245
177
|
},
|
|
246
|
-
{
|
|
247
|
-
"id": "integration-asaas-client",
|
|
248
|
-
"kind": "template",
|
|
249
|
-
"name": "Asaas Financial Client",
|
|
250
|
-
"path": "integrations/asaas-client.cs",
|
|
251
|
-
"category": "integration",
|
|
252
|
-
"description": "Asaas financial API client implementation",
|
|
253
|
-
"outputName": "AsaasClient.cs",
|
|
254
|
-
"placeholders": [],
|
|
255
|
-
"deprecated": false,
|
|
256
|
-
"validatePlaceholders": true
|
|
257
|
-
},
|
|
258
|
-
{
|
|
259
|
-
"id": "integration-asaas-webhook",
|
|
260
|
-
"kind": "template",
|
|
261
|
-
"name": "Asaas Webhook Handler",
|
|
262
|
-
"path": "integrations/asaas-webhook.cs",
|
|
263
|
-
"category": "integration",
|
|
264
|
-
"description": "Asaas webhook handler for payment events",
|
|
265
|
-
"outputName": "AsaasWebhookHandler.cs",
|
|
266
|
-
"placeholders": [],
|
|
267
|
-
"deprecated": false,
|
|
268
|
-
"validatePlaceholders": true
|
|
269
|
-
},
|
|
270
|
-
{
|
|
271
|
-
"id": "integration-neon-auth",
|
|
272
|
-
"kind": "template",
|
|
273
|
-
"name": "Neon Auth Configuration",
|
|
274
|
-
"path": "integrations/neon-auth-config.cs",
|
|
275
|
-
"category": "integration",
|
|
276
|
-
"description": "Neon Auth (Better Auth) EdDSA/Ed25519 JWT validation for .NET via BouncyCastle — cached JWKS provider + manual SignatureValidator (no OIDC discovery available)",
|
|
277
|
-
"outputName": "NeonAuthConfig.cs",
|
|
278
|
-
"placeholders": [
|
|
279
|
-
"Namespace"
|
|
280
|
-
],
|
|
281
|
-
"deprecated": false,
|
|
282
|
-
"validatePlaceholders": true
|
|
283
|
-
},
|
|
284
|
-
{
|
|
285
|
-
"id": "ui-design-system-css",
|
|
286
|
-
"kind": "template",
|
|
287
|
-
"name": "Design System CSS",
|
|
288
|
-
"path": "ui/design-system.css",
|
|
289
|
-
"category": "ui",
|
|
290
|
-
"description": "CSS design tokens and variables (colors, spacing, typography)",
|
|
291
|
-
"outputName": "design-system.css",
|
|
292
|
-
"placeholders": [],
|
|
293
|
-
"deprecated": false,
|
|
294
|
-
"validatePlaceholders": true
|
|
295
|
-
},
|
|
296
178
|
{
|
|
297
179
|
"id": "github-workflow-dotnet-build",
|
|
298
180
|
"kind": "template",
|
|
@@ -331,30 +213,6 @@
|
|
|
331
213
|
"deprecated": false,
|
|
332
214
|
"validatePlaceholders": true
|
|
333
215
|
},
|
|
334
|
-
{
|
|
335
|
-
"id": "github-action-docker-build-push",
|
|
336
|
-
"kind": "template",
|
|
337
|
-
"name": "GitHub Composite Action - Docker Build & Push",
|
|
338
|
-
"path": "infrastructure/github/actions/docker-build-push/action.yml.hbs",
|
|
339
|
-
"category": "infrastructure",
|
|
340
|
-
"description": "Composite action for building and pushing Docker images",
|
|
341
|
-
"outputName": "action.yml",
|
|
342
|
-
"placeholders": [],
|
|
343
|
-
"deprecated": false,
|
|
344
|
-
"validatePlaceholders": true
|
|
345
|
-
},
|
|
346
|
-
{
|
|
347
|
-
"id": "github-action-health-check",
|
|
348
|
-
"kind": "template",
|
|
349
|
-
"name": "GitHub Composite Action - Health Check",
|
|
350
|
-
"path": "infrastructure/github/actions/health-check/action.yml.hbs",
|
|
351
|
-
"category": "infrastructure",
|
|
352
|
-
"description": "Composite action for polling health endpoint until ready",
|
|
353
|
-
"outputName": "action.yml",
|
|
354
|
-
"placeholders": [],
|
|
355
|
-
"deprecated": false,
|
|
356
|
-
"validatePlaceholders": true
|
|
357
|
-
},
|
|
358
216
|
{
|
|
359
217
|
"id": "dotnet-abstractions-handler",
|
|
360
218
|
"kind": "fragment",
|
|
@@ -528,30 +386,6 @@
|
|
|
528
386
|
"placeholders": [],
|
|
529
387
|
"validatePlaceholders": true
|
|
530
388
|
},
|
|
531
|
-
{
|
|
532
|
-
"id": "maf-agent-bootstrap",
|
|
533
|
-
"kind": "fragment",
|
|
534
|
-
"path": "code/dotnet/ai-agents/AgentBootstrap.cs.template",
|
|
535
|
-
"category": "ai-agents",
|
|
536
|
-
"stack": "dotnet",
|
|
537
|
-
"description": "DI extension method to register ModelRegistry + a default MAF agent"
|
|
538
|
-
},
|
|
539
|
-
{
|
|
540
|
-
"id": "maf-embedding-service",
|
|
541
|
-
"kind": "fragment",
|
|
542
|
-
"path": "code/dotnet/ai-agents/EmbeddingService.cs.template",
|
|
543
|
-
"category": "ai-agents",
|
|
544
|
-
"stack": "dotnet",
|
|
545
|
-
"description": "Generates embeddings for RAG indexing and query via IEmbeddingGenerator"
|
|
546
|
-
},
|
|
547
|
-
{
|
|
548
|
-
"id": "maf-model-registry",
|
|
549
|
-
"kind": "fragment",
|
|
550
|
-
"path": "code/dotnet/ai-agents/ModelRegistry.cs.template",
|
|
551
|
-
"category": "ai-agents",
|
|
552
|
-
"stack": "dotnet",
|
|
553
|
-
"description": "Reads config/model-registry.json at startup, exposes IChatClient by alias"
|
|
554
|
-
},
|
|
555
389
|
{
|
|
556
390
|
"id": "maf-prompt-repository",
|
|
557
391
|
"kind": "fragment",
|
|
@@ -560,22 +394,6 @@
|
|
|
560
394
|
"stack": "dotnet",
|
|
561
395
|
"description": "Loads agent system prompts from the agent_prompts table, with caching"
|
|
562
396
|
},
|
|
563
|
-
{
|
|
564
|
-
"id": "maf-resilient-tool-middleware",
|
|
565
|
-
"kind": "fragment",
|
|
566
|
-
"path": "code/dotnet/ai-agents/ResilientToolMiddleware.cs.template",
|
|
567
|
-
"category": "ai-agents",
|
|
568
|
-
"stack": "dotnet",
|
|
569
|
-
"description": "Function-calling middleware: retry/rate-limit resilience + arg validation"
|
|
570
|
-
},
|
|
571
|
-
{
|
|
572
|
-
"id": "maf-vector-search-tool",
|
|
573
|
-
"kind": "fragment",
|
|
574
|
-
"path": "code/dotnet/ai-agents/VectorSearchTool.cs.template",
|
|
575
|
-
"category": "ai-agents",
|
|
576
|
-
"stack": "dotnet",
|
|
577
|
-
"description": "Typed MAF tool retrieving relevant chunks from the pgvector knowledge base"
|
|
578
|
-
},
|
|
579
397
|
{
|
|
580
398
|
"id": "ai-kit",
|
|
581
399
|
"kind": "project",
|
|
@@ -584,14 +402,6 @@
|
|
|
584
402
|
"stack": "dotnet",
|
|
585
403
|
"description": "Morph.AiKit — solucao .NET compilavel que prova os standards ai-agents contra framework/ai-pin.json"
|
|
586
404
|
},
|
|
587
|
-
{
|
|
588
|
-
"id": "maf-model-registry-config",
|
|
589
|
-
"kind": "fragment",
|
|
590
|
-
"path": "code/dotnet/ai-agents/model-registry.json.template",
|
|
591
|
-
"category": "ai-agents",
|
|
592
|
-
"stack": "dotnet",
|
|
593
|
-
"description": "config/model-registry.json — single source of truth for model selection"
|
|
594
|
-
},
|
|
595
405
|
{
|
|
596
406
|
"id": "maf-agent-prompts-migration",
|
|
597
407
|
"kind": "fragment",
|
|
@@ -600,22 +410,6 @@
|
|
|
600
410
|
"stack": "dotnet",
|
|
601
411
|
"description": "SQL migration: agent_prompts table for versioned, runtime-editable prompts"
|
|
602
412
|
},
|
|
603
|
-
{
|
|
604
|
-
"id": "maf-pgvector-embeddings-migration",
|
|
605
|
-
"kind": "fragment",
|
|
606
|
-
"path": "code/sql/ai-agents/pgvector-embeddings-migration.sql.template",
|
|
607
|
-
"category": "code",
|
|
608
|
-
"stack": "dotnet",
|
|
609
|
-
"description": "SQL migration: kb_embeddings table for custom RAG chunk storage with pgvector"
|
|
610
|
-
},
|
|
611
|
-
{
|
|
612
|
-
"id": "dotnet-database-vector-entity",
|
|
613
|
-
"kind": "fragment",
|
|
614
|
-
"path": "code/dotnet/database/vector-entity.cs",
|
|
615
|
-
"category": "code",
|
|
616
|
-
"stack": "dotnet",
|
|
617
|
-
"description": "pgvector entity + EF Core configuration template"
|
|
618
|
-
},
|
|
619
413
|
{
|
|
620
414
|
"id": "nextjs-page",
|
|
621
415
|
"kind": "template",
|
|
@@ -3,14 +3,13 @@
|
|
|
3
3
|
-- READS STANDARD: ai-agents-prompt-sources
|
|
4
4
|
-- PLACEHOLDERS:
|
|
5
5
|
-- {{SCHEMA}} — target schema (default: public)
|
|
6
|
-
-- LAST-VERIFIED: 2026-05-19
|
|
7
6
|
|
|
8
7
|
-- ============================================================
|
|
9
8
|
-- 1. TABLE
|
|
10
9
|
-- ============================================================
|
|
11
10
|
|
|
12
11
|
CREATE TABLE {{SCHEMA}}.agent_prompts (
|
|
13
|
-
id uuid PRIMARY KEY
|
|
12
|
+
id uuid PRIMARY KEY, -- set by the app (Guid.CreateVersion7()), never a column default
|
|
14
13
|
agent_key text NOT NULL,
|
|
15
14
|
version int NOT NULL,
|
|
16
15
|
content text NOT NULL,
|
|
@@ -48,8 +47,8 @@ CREATE UNIQUE INDEX ix_agent_prompts_agent_key_version
|
|
|
48
47
|
-- 3. SEED (optional — remove if managed via backoffice)
|
|
49
48
|
-- ============================================================
|
|
50
49
|
|
|
51
|
-
-- INSERT INTO {{SCHEMA}}.agent_prompts (agent_key, version, content, is_active)
|
|
52
|
-
-- VALUES ('my-agent', 1, 'You are a helpful assistant.', true);
|
|
50
|
+
-- INSERT INTO {{SCHEMA}}.agent_prompts (id, agent_key, version, content, is_active)
|
|
51
|
+
-- VALUES (:'new_id', 'my-agent', 1, 'You are a helpful assistant.', true);
|
|
53
52
|
|
|
54
53
|
-- ============================================================
|
|
55
54
|
-- ROLLBACK
|
|
@@ -16,7 +16,7 @@ Living document. All agents read this before any UI work. All design decisions l
|
|
|
16
16
|
- **Motion Personality**: spring-based, purposeful /* CUSTOMIZE */
|
|
17
17
|
- **Visual Density**: balanced /* CUSTOMIZE */
|
|
18
18
|
- **Composition**: [TODO: Layout approach — see Domain Patterns below for guidance]
|
|
19
|
-
- **Selected Trends**: [TODO: Fill from
|
|
19
|
+
- **Selected Trends**: [TODO: Fill from the trend research — e.g., Bento Grid, Glassmorphism]
|
|
20
20
|
|
|
21
21
|
---
|
|
22
22
|
|
|
@@ -44,7 +44,7 @@ Resultado buscado: <o estado depois: o que muda, para quem, como se percebe.>
|
|
|
44
44
|
`prova: teste` exige `risco:` regra | dinheiro | contrato | concorrência | dado | regressão; sem risco, `leitura`.
|
|
45
45
|
`degrau:` migrar | irreversível quando um revert não desfaz (toda migration é migrar); sem a linha, refazer.
|
|
46
46
|
Cenário que fala de arquivo, grep ou texto exige a linha "> Por que artefato:" logo abaixo.
|
|
47
|
-
`título:` é o nome do cenário para o dono (
|
|
47
|
+
`título:` é o nome do cenário para o dono (conversa, report, PR): até dez palavras, linguagem de quem usa, sem identificador de código. -->
|
|
48
48
|
|
|
49
49
|
- **C1** — Dado <estado>, quando <ação>, então <resultado observável>.
|
|
50
50
|
título: <o que passa a funcionar>
|
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
// LIDO POR: Morph.AiKit.Providers.ModelRegistry.FromJson
|
|
3
3
|
// STANDARD: ai-agents-providers-model-registry
|
|
4
4
|
//
|
|
5
|
-
// O que a v2 acrescenta a v1
|
|
5
|
+
// O que a v2 acrescenta a v1:
|
|
6
6
|
//
|
|
7
7
|
// api: protocolo POR ALIAS. Omitido = "responses" (a decisao da casa).
|
|
8
8
|
// "chat" e opt-in explicito: alguem tem de escrever, e assumir.
|
|
@@ -49,7 +49,7 @@ public sealed class MediaDisclosureTests
|
|
|
49
49
|
Assert.False(
|
|
50
50
|
result.IsSuccess,
|
|
51
51
|
"publicar sem marcacao e o caminho que a obrigacao legal existe para fechar; " +
|
|
52
|
-
"se ele existe, a prova de midia
|
|
52
|
+
"se ele existe, a prova de midia da revisao esta presa so por prosa");
|
|
53
53
|
Assert.Equal(MediaErrorCode.InvalidTransition, result.Error!.Code);
|
|
54
54
|
Assert.Contains("marcacao", result.Error.Message, StringComparison.OrdinalIgnoreCase);
|
|
55
55
|
}
|
|
@@ -19,8 +19,7 @@
|
|
|
19
19
|
pelo menos um: uma execucao verde de menos de N casos sai 9. ZERO casos
|
|
20
20
|
continua saindo 8 (ZeroTests) — o piso NAO supera o veredito 8; a ordem
|
|
21
21
|
medida e ZeroTests antes da politica (duas vezes em 2026-09-14, com piso
|
|
22
|
-
275 e com piso 1
|
|
23
|
-
morph-spec). Medido em 2026‑09‑08 contra o SDK .NET 10:
|
|
22
|
+
275 e com piso 1). Medido em 2026‑09‑08 contra o SDK .NET 10:
|
|
24
23
|
piso 221 → 221 aprovados, exit 0
|
|
25
24
|
piso 9999 → 115 aprovados, exit 9
|
|
26
25
|
|
|
@@ -45,8 +44,7 @@
|
|
|
45
44
|
VSTest. Medido nos dois locales em 2026-09-08. Um parser escrito so para
|
|
46
45
|
VSTest (que procure uma linha COMECANDO em "Aprovado!"/"Passed!" e
|
|
47
46
|
contendo "Total de testes:"/"Total:") nao consegue contar os testes deste
|
|
48
|
-
projeto; o `
|
|
49
|
-
issue #115 (antes, a contagem deste projeto voltava desconhecida). O piso
|
|
47
|
+
projeto; o `morph-spec check` nao le o sumario, julga pelo exit code. O piso
|
|
50
48
|
acima garante por conta propria que uma descoberta parcial saia com
|
|
51
49
|
codigo 9 — o eixo que ESTE arquivo controla.
|
|
52
50
|
-->
|
|
@@ -13,23 +13,19 @@ export function {{pascalCase sectionName}}Section() {
|
|
|
13
13
|
const containerRef = useRef<HTMLDivElement>(null);
|
|
14
14
|
|
|
15
15
|
useGSAP(() => {
|
|
16
|
-
|
|
17
|
-
'
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
trigger: containerRef.current,
|
|
30
|
-
start: 'top 80%',
|
|
31
|
-
toggleActions: 'play none none none',
|
|
32
|
-
},
|
|
16
|
+
gsap.matchMedia().add('(prefers-reduced-motion: no-preference)', () => {
|
|
17
|
+
gsap.from('.{{kebabCase sectionName}}-item', {
|
|
18
|
+
y: 40,
|
|
19
|
+
autoAlpha: 0,
|
|
20
|
+
stagger: 0.1,
|
|
21
|
+
duration: durations.base,
|
|
22
|
+
ease: 'power2.out',
|
|
23
|
+
scrollTrigger: {
|
|
24
|
+
trigger: containerRef.current,
|
|
25
|
+
start: 'top 80%',
|
|
26
|
+
toggleActions: 'play none none none',
|
|
27
|
+
},
|
|
28
|
+
});
|
|
33
29
|
});
|
|
34
30
|
}, { scope: containerRef });
|
|
35
31
|
|
|
@@ -4,11 +4,10 @@
|
|
|
4
4
|
|
|
5
5
|
## Overview
|
|
6
6
|
|
|
7
|
-
Reusable GitHub Actions workflows
|
|
7
|
+
Reusable GitHub Actions workflows for a .NET API + Next.js web deployed on Coolify with Docker.
|
|
8
8
|
|
|
9
9
|
**Key Features:**
|
|
10
|
-
- Handlebars
|
|
11
|
-
- Composite actions for shared logic
|
|
10
|
+
- Handlebars templates (`.hbs`)
|
|
12
11
|
- Docker multi-stage builds (.NET API + Next.js Web)
|
|
13
12
|
- Coolify deployment via SSH (no MCP/CLI exists — the Coolify API is not publicly exposed, so the runner SSHes into the VPS to trigger it)
|
|
14
13
|
|
|
@@ -18,14 +17,10 @@ Reusable GitHub Actions workflows and composite actions for the **nextjs-neon**
|
|
|
18
17
|
|
|
19
18
|
```
|
|
20
19
|
infrastructure/github/
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
│
|
|
26
|
-
└── actions/
|
|
27
|
-
├── docker-build-push/action.yml.hbs # Build & push Docker image
|
|
28
|
-
└── health-check/action.yml.hbs # Poll health endpoint
|
|
20
|
+
└── workflows/
|
|
21
|
+
├── dotnet-build.yml.hbs # .NET restore, build, test, coverage
|
|
22
|
+
├── docker-build-push.yml.hbs # Docker build & push to registry
|
|
23
|
+
└── deploy-coolify.yml.hbs # Coolify deployment via SSH
|
|
29
24
|
```
|
|
30
25
|
|
|
31
26
|
## Workflows
|
|
@@ -46,10 +41,12 @@ infrastructure/github/
|
|
|
46
41
|
|
|
47
42
|
## Usage
|
|
48
43
|
|
|
49
|
-
|
|
44
|
+
Nothing installs these files: read one by its `REGISTRY.json` id and adapt it to the project.
|
|
50
45
|
|
|
51
46
|
```bash
|
|
52
|
-
morph-spec
|
|
47
|
+
morph-spec scaffold show github-workflow-dotnet-build
|
|
48
|
+
morph-spec scaffold show github-workflow-docker-build-push
|
|
49
|
+
morph-spec scaffold show github-workflow-deploy-coolify
|
|
53
50
|
```
|
|
54
51
|
|
|
55
52
|
---
|