@polymorphism-tech/morph-spec 6.0.0 → 7.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 (114) hide show
  1. package/README.md +367 -366
  2. package/docs/CHEATSHEET.md +3 -3
  3. package/docs/QUICKSTART.md +4 -4
  4. package/framework/CLAUDE.md +13 -0
  5. package/framework/MORPH.md +57 -36
  6. package/framework/agents.json +132 -127
  7. package/framework/commands/morph-apply.md +4 -21
  8. package/framework/commands/morph-archive.md +1 -1
  9. package/framework/commands/morph-proposal.md +2 -0
  10. package/framework/hooks/claude-code/core/enforce-phase-writes.js +1 -1
  11. package/framework/hooks/claude-code/core/protect-spec-files.js +1 -1
  12. package/framework/hooks/claude-code/core/state-sync.js +212 -0
  13. package/framework/hooks/shared/phase-utils.js +5 -4
  14. package/framework/hooks/shared/state-reader.js +1 -1
  15. package/framework/phases.json +1 -1
  16. package/framework/rubrics/backend.json +41 -36
  17. package/framework/rules/ai-agents-standards.md +45 -15
  18. package/framework/rules/morph-workflow.md +15 -34
  19. package/framework/rules/neon-standards.md +25 -26
  20. package/framework/schemas/tasks.schema.json +35 -0
  21. package/framework/skills/core/morph-apply/SKILL.md +154 -0
  22. package/framework/skills/core/morph-brainstorming/SKILL.md +53 -30
  23. package/framework/skills/core/morph-implement/SKILL.md +25 -14
  24. package/framework/skills/core/morph-plan/SKILL.md +91 -23
  25. package/framework/skills/core/morph-proposal/SKILL.md +137 -0
  26. package/framework/skills/core/morph-review/SKILL.md +43 -7
  27. package/framework/skills/core/morph-stack-scan/SKILL.md +40 -1
  28. package/framework/standards/STANDARDS.json +1729 -1134
  29. package/framework/standards/ai-agents/agent-session.md +160 -0
  30. package/framework/standards/ai-agents/batching.md +193 -0
  31. package/framework/standards/ai-agents/context-providers.md +188 -0
  32. package/framework/standards/ai-agents/mcp-server.md +250 -0
  33. package/framework/standards/ai-agents/mcp-tools.md +197 -0
  34. package/framework/standards/ai-agents/middleware-patterns.md +207 -0
  35. package/framework/standards/ai-agents/modalities-image-gen.md +173 -0
  36. package/framework/standards/ai-agents/modalities-speech-to-text.md +171 -0
  37. package/framework/standards/ai-agents/modalities-text-to-speech.md +181 -0
  38. package/framework/standards/ai-agents/modalities-vision.md +201 -0
  39. package/framework/standards/ai-agents/multi-agent-patterns.md +155 -0
  40. package/framework/standards/ai-agents/production.md +114 -258
  41. package/framework/standards/ai-agents/prompts-in-db.md +214 -0
  42. package/framework/standards/ai-agents/providers/model-registry.md +158 -0
  43. package/framework/standards/ai-agents/rag-custom-pgvector.md +243 -0
  44. package/framework/standards/ai-agents/service-tier-flex.md +135 -0
  45. package/framework/standards/ai-agents/setup.md +142 -316
  46. package/framework/standards/ai-agents/structured-output.md +249 -0
  47. package/framework/standards/ai-agents/sweet-spot.md +109 -0
  48. package/framework/standards/ai-agents/workflows.md +114 -284
  49. package/framework/standards/architecture/vertical-slice/vertical-slice.md +433 -429
  50. package/framework/standards/backend/api/validation.md +92 -88
  51. package/framework/standards/backend/database/postgresql/database.md +336 -332
  52. package/framework/standards/backend/database/vector-search-rag.md +599 -541
  53. package/framework/standards/backend/dotnet/fluent-validation-vsa.md +4 -0
  54. package/framework/standards/backend/dotnet/result-pattern.md +4 -0
  55. package/framework/standards/backend/dotnet/scalar-ui.md +176 -172
  56. package/framework/standards/backend/dotnet/scrutor.md +4 -0
  57. package/framework/standards/backend/dotnet/vsa-handler-patterns.md +278 -274
  58. package/framework/standards/backend/integrations/asaas/asaas-api.md +260 -216
  59. package/framework/standards/backend/integrations/hangfire/hangfire-jobs.md +354 -350
  60. package/framework/standards/backend/integrations/neon-auth/neon-auth.md +30 -19
  61. package/framework/standards/backend/integrations/resend/resend-email.md +400 -385
  62. package/framework/standards/data/nosql/cache/redis.md +106 -97
  63. package/framework/standards/data/nosql/cosmos-db.md +127 -118
  64. package/framework/standards/data/vector-search/rag-chunking.md +113 -104
  65. package/framework/standards/frontend/design-system/ai-image-generation.md +4 -0
  66. package/framework/standards/frontend/design-system/animations.md +164 -160
  67. package/framework/standards/frontend/design-system/naming.md +68 -64
  68. package/framework/standards/frontend/gsap/gsap-core.md +14 -8
  69. package/framework/standards/frontend/gsap/gsap-plugins.md +26 -21
  70. package/framework/standards/frontend/gsap/gsap-scrolltrigger.md +9 -7
  71. package/framework/standards/frontend/nextjs/app-router.md +127 -123
  72. package/framework/standards/frontend/nextjs/components.md +136 -132
  73. package/framework/standards/frontend/nextjs/data-fetching.md +130 -126
  74. package/framework/standards/frontend/nextjs/forms.md +134 -128
  75. package/framework/standards/frontend/nextjs/motion-patterns.md +328 -322
  76. package/framework/standards/frontend/nextjs/naming-conventions.md +71 -67
  77. package/framework/standards/frontend/nextjs/nextjs-patterns.md +229 -225
  78. package/framework/standards/frontend/nextjs/project-structure.md +106 -102
  79. package/framework/standards/frontend/nextjs/state-management.md +76 -72
  80. package/framework/standards/frontend/nextjs/testing.md +115 -111
  81. package/framework/standards/infrastructure/docker/easypanel-deploy.md +196 -192
  82. package/framework/standards/infrastructure/neon/neon-pgrag.md +6 -2
  83. package/framework/standards/infrastructure/neon/neon-pgvector.md +4 -0
  84. package/framework/standards/infrastructure/neon/neon-setup.md +5 -1
  85. package/framework/standards/integration/mcp/mcp-tools.md +471 -462
  86. package/framework/templates/REGISTRY.json +1745 -1239
  87. package/framework/templates/code/dotnet/ai-agents/AgentBootstrap.cs.template +39 -0
  88. package/framework/templates/code/dotnet/ai-agents/EmbeddingService.cs.template +68 -0
  89. package/framework/templates/code/dotnet/ai-agents/ModelRegistry.cs.template +117 -0
  90. package/framework/templates/code/dotnet/ai-agents/PromptRepository.cs.template +95 -0
  91. package/framework/templates/code/dotnet/ai-agents/ResilientToolMiddleware.cs.template +61 -0
  92. package/framework/templates/code/dotnet/ai-agents/VectorSearchTool.cs.template +107 -0
  93. package/framework/templates/code/dotnet/ai-agents/model-registry.json.template +58 -0
  94. package/framework/templates/code/sql/ai-agents/agent-prompts-migration.sql.template +58 -0
  95. package/framework/templates/code/sql/ai-agents/pgvector-embeddings-migration.sql.template +91 -0
  96. package/framework/templates/docs/onboarding.md +4 -4
  97. package/framework/templates/tasks.template.json +17 -0
  98. package/package.json +89 -83
  99. package/src/commands/project/init.js +16 -0
  100. package/src/commands/validation/validate-feature.js +1 -1
  101. package/src/core/paths/output-schema.js +6 -6
  102. package/src/core/state/state-manager.js +1 -1
  103. package/src/core/templates/template-registry.js +289 -256
  104. package/src/lib/detectors/design-system-detector.js +1 -1
  105. package/src/lib/generators/context-generator.js +516 -518
  106. package/src/lib/generators/scaffold-generator.js +23 -26
  107. package/src/lib/installers/memory-installer.js +138 -0
  108. package/src/lib/phase-chain/phase-validator.js +4 -4
  109. package/src/lib/risk-detector.js +80 -0
  110. package/src/lib/tasks/tasks-json-parser.js +185 -0
  111. package/src/scripts/setup-infra.js +25 -0
  112. package/src/utils/hooks-installer.js +59 -10
  113. package/framework/standards/infrastructure/neon/neon-semantic-kernel.md +0 -310
  114. package/framework/templates/integrations/semantic-kernel-neon.cs +0 -125
@@ -1,192 +1,196 @@
1
- # EasyPanel Deployment Standard
2
-
3
- > **Scope:** nextjs-neon
4
- > **Layer:** 2 (on keyword)
5
- > **Keywords:** easypanel, docker, deploy, deployment, container
6
- > **Load When:** easypanel or docker deployment keywords detected
7
-
8
- Stack: Next.js 15 + Neon PostgreSQL + .NET Backend
9
-
10
- ## Core Rules
11
-
12
- - ALWAYS use multi-stage Docker builds for minimal image size
13
- - ALWAYS configure health checks for zero-downtime deploys
14
- - NEVER hardcode secrets in Dockerfiles -- use EasyPanel environment variables
15
- - ALWAYS use `.dockerignore` to exclude node_modules, .git, .env files
16
- - SSL is automatic via Let's Encrypt -- no manual certificate management
17
-
18
- ## .NET 10 Dockerfile
19
-
20
- ```dockerfile
21
- FROM mcr.microsoft.com/dotnet/sdk:10.0 AS build
22
- WORKDIR /src
23
- COPY *.csproj .
24
- RUN dotnet restore
25
- COPY . .
26
- RUN dotnet publish -c Release -o /app/publish --no-restore
27
-
28
- FROM mcr.microsoft.com/dotnet/aspnet:10.0 AS runtime
29
- WORKDIR /app
30
- RUN adduser --disabled-password --gecos "" appuser
31
- USER appuser
32
- COPY --from=build /app/publish .
33
- ENV ASPNETCORE_URLS=http://+:8080
34
- EXPOSE 8080
35
- HEALTHCHECK --interval=30s --timeout=5s --start-period=10s --retries=3 \
36
- CMD curl -f http://localhost:8080/health || exit 1
37
- ENTRYPOINT ["dotnet", "MyApp.Api.dll"]
38
- ```
39
-
40
- ## Next.js Standalone Dockerfile
41
-
42
- ```dockerfile
43
- FROM node:22-alpine AS base
44
-
45
- FROM base AS builder
46
- WORKDIR /app
47
- COPY package.json package-lock.json ./
48
- RUN npm ci
49
- COPY . .
50
- ENV NEXT_TELEMETRY_DISABLED=1
51
- RUN npm run build
52
-
53
- FROM base AS runner
54
- WORKDIR /app
55
- ENV NODE_ENV=production NEXT_TELEMETRY_DISABLED=1
56
- RUN addgroup --system --gid 1001 nodejs && adduser --system --uid 1001 nextjs
57
- COPY --from=builder /app/public ./public
58
- COPY --from=builder --chown=nextjs:nodejs /app/.next/standalone ./
59
- COPY --from=builder --chown=nextjs:nodejs /app/.next/static ./.next/static
60
- USER nextjs
61
- EXPOSE 3000
62
- ENV PORT=3000 HOSTNAME="0.0.0.0"
63
- HEALTHCHECK --interval=30s --timeout=5s --start-period=10s --retries=3 \
64
- CMD wget --no-verbose --tries=1 --spider http://localhost:3000/api/health || exit 1
65
- CMD ["node", "server.js"]
66
- ```
67
-
68
- Required: `output: "standalone"` in `next.config.ts`.
69
-
70
- ## .dockerignore
71
-
72
- ```
73
- node_modules
74
- .next
75
- .git
76
- .env*
77
- *.md
78
- .vscode
79
- coverage
80
- test
81
- __tests__
82
- ```
83
-
84
- ## EasyPanel Service Config
85
-
86
- | Setting | .NET Backend | Next.js Frontend |
87
- |---------|-------------|-----------------|
88
- | Source | GitHub | GitHub |
89
- | Build method | Dockerfile | Dockerfile |
90
- | Dockerfile path | `./backend/Dockerfile` | `./frontend/Dockerfile` |
91
- | Port | 8080 | 3000 |
92
- | Domain | api.example.com | app.example.com |
93
-
94
- ### GitHub Integration
95
-
96
- 1. Generate GitHub PAT with `repo` scope
97
- 2. EasyPanel: Settings > GitHub > Add token
98
- 3. Select repository and branch
99
- 4. Enable "Auto Deploy" for webhook-triggered deploys
100
-
101
- ### Domain and SSL
102
-
103
- DNS setup (CNAME to EasyPanel server):
104
- ```
105
- app.example.com CNAME your-server.easypanel.host
106
- api.example.com CNAME your-server.easypanel.host
107
- ```
108
-
109
- SSL via Let's Encrypt is automatic. Force HTTPS enabled by default.
110
-
111
- ## Environment Variables
112
-
113
- ### .NET Backend
114
-
115
- ```env
116
- ASPNETCORE_ENVIRONMENT=Production
117
- ASPNETCORE_URLS=http://+:8080
118
- ConnectionStrings__DefaultConnection=Host=ep-xxx.us-east-2.aws.neon.tech;Database=neondb;Username=...;Password=...;SslMode=Require
119
- ```
120
-
121
- ### Next.js Frontend
122
-
123
- ```env
124
- DATABASE_URL=postgresql://user:pass@ep-xxx.us-east-2.aws.neon.tech/neondb?sslmode=require
125
- NEXT_PUBLIC_API_URL=https://api.example.com
126
- ```
127
-
128
- ## Health Check Endpoints
129
-
130
- ```csharp
131
- // .NET: Program.cs
132
- builder.Services.AddHealthChecks()
133
- .AddNpgSql(connectionString, name: "database");
134
- app.MapHealthChecks("/health");
135
- ```
136
-
137
- ```ts
138
- // Next.js: app/api/health/route.ts
139
- export async function GET() {
140
- return Response.json({ status: "healthy", timestamp: new Date().toISOString() });
141
- }
142
- ```
143
-
144
- ## Zero-Downtime Deploys
145
-
146
- EasyPanel uses Docker HEALTHCHECK to determine container readiness:
147
-
148
- 1. New container starts alongside old container
149
- 2. Health check passes after start-period + retries
150
- 3. Traffic shifts to new container
151
- 4. Old container stopped
152
-
153
- | HEALTHCHECK Param | Value | Purpose |
154
- |-------------------|-------|---------|
155
- | `--interval` | 30s | Time between checks |
156
- | `--timeout` | 5s | Max response wait |
157
- | `--start-period` | 10s | Startup grace period |
158
- | `--retries` | 3 | Failures before unhealthy |
159
-
160
- ## Monitoring
161
-
162
- - **Logs**: Real-time in EasyPanel UI
163
- - **Metrics**: CPU, memory, network via dashboard
164
- - **Restart**: Auto-restart on crash (default)
165
-
166
- Structured logging:
167
-
168
- ```csharp
169
- // .NET: Serilog with JSON output
170
- builder.Host.UseSerilog((ctx, cfg) => cfg
171
- .ReadFrom.Configuration(ctx.Configuration)
172
- .WriteTo.Console(new JsonFormatter()));
173
- ```
174
-
175
- ```ts
176
- // Next.js: pino
177
- import pino from "pino";
178
- const logger = pino({ level: process.env.LOG_LEVEL ?? "info" });
179
- ```
180
-
181
- ## Deployment Checklist
182
-
183
- | Step | Action |
184
- |------|--------|
185
- | 1 | Verify `output: "standalone"` in next.config.ts |
186
- | 2 | Test Docker build locally |
187
- | 3 | Test health endpoint |
188
- | 4 | Configure env vars in EasyPanel |
189
- | 5 | Set up custom domain + DNS |
190
- | 6 | Verify SSL certificate |
191
- | 7 | Enable auto-deploy from GitHub |
192
- | 8 | Push to main, verify deployment |
1
+ # EasyPanel Deployment Standard
2
+
3
+ > **Scope:** nextjs-neon
4
+ > **Layer:** 2 (on keyword)
5
+ > **Keywords:** easypanel, docker, deploy, deployment, container
6
+ > **Load When:** easypanel or docker deployment keywords detected
7
+
8
+ **Verified against:** .NET 10 + Next.js 15 + Node 22 (Docker base images). Last-verified: 2026-05-20.
9
+
10
+ ---
11
+
12
+ Stack: Next.js 15 + Neon PostgreSQL + .NET Backend
13
+
14
+ ## Core Rules
15
+
16
+ - ALWAYS use multi-stage Docker builds for minimal image size
17
+ - ALWAYS configure health checks for zero-downtime deploys
18
+ - NEVER hardcode secrets in Dockerfiles -- use EasyPanel environment variables
19
+ - ALWAYS use `.dockerignore` to exclude node_modules, .git, .env files
20
+ - SSL is automatic via Let's Encrypt -- no manual certificate management
21
+
22
+ ## .NET 10 Dockerfile
23
+
24
+ ```dockerfile
25
+ FROM mcr.microsoft.com/dotnet/sdk:10.0 AS build
26
+ WORKDIR /src
27
+ COPY *.csproj .
28
+ RUN dotnet restore
29
+ COPY . .
30
+ RUN dotnet publish -c Release -o /app/publish --no-restore
31
+
32
+ FROM mcr.microsoft.com/dotnet/aspnet:10.0 AS runtime
33
+ WORKDIR /app
34
+ RUN adduser --disabled-password --gecos "" appuser
35
+ USER appuser
36
+ COPY --from=build /app/publish .
37
+ ENV ASPNETCORE_URLS=http://+:8080
38
+ EXPOSE 8080
39
+ HEALTHCHECK --interval=30s --timeout=5s --start-period=10s --retries=3 \
40
+ CMD curl -f http://localhost:8080/health || exit 1
41
+ ENTRYPOINT ["dotnet", "MyApp.Api.dll"]
42
+ ```
43
+
44
+ ## Next.js Standalone Dockerfile
45
+
46
+ ```dockerfile
47
+ FROM node:22-alpine AS base
48
+
49
+ FROM base AS builder
50
+ WORKDIR /app
51
+ COPY package.json package-lock.json ./
52
+ RUN npm ci
53
+ COPY . .
54
+ ENV NEXT_TELEMETRY_DISABLED=1
55
+ RUN npm run build
56
+
57
+ FROM base AS runner
58
+ WORKDIR /app
59
+ ENV NODE_ENV=production NEXT_TELEMETRY_DISABLED=1
60
+ RUN addgroup --system --gid 1001 nodejs && adduser --system --uid 1001 nextjs
61
+ COPY --from=builder /app/public ./public
62
+ COPY --from=builder --chown=nextjs:nodejs /app/.next/standalone ./
63
+ COPY --from=builder --chown=nextjs:nodejs /app/.next/static ./.next/static
64
+ USER nextjs
65
+ EXPOSE 3000
66
+ ENV PORT=3000 HOSTNAME="0.0.0.0"
67
+ HEALTHCHECK --interval=30s --timeout=5s --start-period=10s --retries=3 \
68
+ CMD wget --no-verbose --tries=1 --spider http://localhost:3000/api/health || exit 1
69
+ CMD ["node", "server.js"]
70
+ ```
71
+
72
+ Required: `output: "standalone"` in `next.config.ts`.
73
+
74
+ ## .dockerignore
75
+
76
+ ```
77
+ node_modules
78
+ .next
79
+ .git
80
+ .env*
81
+ *.md
82
+ .vscode
83
+ coverage
84
+ test
85
+ __tests__
86
+ ```
87
+
88
+ ## EasyPanel Service Config
89
+
90
+ | Setting | .NET Backend | Next.js Frontend |
91
+ |---------|-------------|-----------------|
92
+ | Source | GitHub | GitHub |
93
+ | Build method | Dockerfile | Dockerfile |
94
+ | Dockerfile path | `./backend/Dockerfile` | `./frontend/Dockerfile` |
95
+ | Port | 8080 | 3000 |
96
+ | Domain | api.example.com | app.example.com |
97
+
98
+ ### GitHub Integration
99
+
100
+ 1. Generate GitHub PAT with `repo` scope
101
+ 2. EasyPanel: Settings > GitHub > Add token
102
+ 3. Select repository and branch
103
+ 4. Enable "Auto Deploy" for webhook-triggered deploys
104
+
105
+ ### Domain and SSL
106
+
107
+ DNS setup (CNAME to EasyPanel server):
108
+ ```
109
+ app.example.com CNAME your-server.easypanel.host
110
+ api.example.com CNAME your-server.easypanel.host
111
+ ```
112
+
113
+ SSL via Let's Encrypt is automatic. Force HTTPS enabled by default.
114
+
115
+ ## Environment Variables
116
+
117
+ ### .NET Backend
118
+
119
+ ```env
120
+ ASPNETCORE_ENVIRONMENT=Production
121
+ ASPNETCORE_URLS=http://+:8080
122
+ ConnectionStrings__DefaultConnection=Host=ep-xxx.us-east-2.aws.neon.tech;Database=neondb;Username=...;Password=...;SslMode=Require
123
+ ```
124
+
125
+ ### Next.js Frontend
126
+
127
+ ```env
128
+ DATABASE_URL=postgresql://user:pass@ep-xxx.us-east-2.aws.neon.tech/neondb?sslmode=require
129
+ NEXT_PUBLIC_API_URL=https://api.example.com
130
+ ```
131
+
132
+ ## Health Check Endpoints
133
+
134
+ ```csharp
135
+ // .NET: Program.cs
136
+ builder.Services.AddHealthChecks()
137
+ .AddNpgSql(connectionString, name: "database");
138
+ app.MapHealthChecks("/health");
139
+ ```
140
+
141
+ ```ts
142
+ // Next.js: app/api/health/route.ts
143
+ export async function GET() {
144
+ return Response.json({ status: "healthy", timestamp: new Date().toISOString() });
145
+ }
146
+ ```
147
+
148
+ ## Zero-Downtime Deploys
149
+
150
+ EasyPanel uses Docker HEALTHCHECK to determine container readiness:
151
+
152
+ 1. New container starts alongside old container
153
+ 2. Health check passes after start-period + retries
154
+ 3. Traffic shifts to new container
155
+ 4. Old container stopped
156
+
157
+ | HEALTHCHECK Param | Value | Purpose |
158
+ |-------------------|-------|---------|
159
+ | `--interval` | 30s | Time between checks |
160
+ | `--timeout` | 5s | Max response wait |
161
+ | `--start-period` | 10s | Startup grace period |
162
+ | `--retries` | 3 | Failures before unhealthy |
163
+
164
+ ## Monitoring
165
+
166
+ - **Logs**: Real-time in EasyPanel UI
167
+ - **Metrics**: CPU, memory, network via dashboard
168
+ - **Restart**: Auto-restart on crash (default)
169
+
170
+ Structured logging:
171
+
172
+ ```csharp
173
+ // .NET: Serilog with JSON output
174
+ builder.Host.UseSerilog((ctx, cfg) => cfg
175
+ .ReadFrom.Configuration(ctx.Configuration)
176
+ .WriteTo.Console(new JsonFormatter()));
177
+ ```
178
+
179
+ ```ts
180
+ // Next.js: pino
181
+ import pino from "pino";
182
+ const logger = pino({ level: process.env.LOG_LEVEL ?? "info" });
183
+ ```
184
+
185
+ ## Deployment Checklist
186
+
187
+ | Step | Action |
188
+ |------|--------|
189
+ | 1 | Verify `output: "standalone"` in next.config.ts |
190
+ | 2 | Test Docker build locally |
191
+ | 3 | Test health endpoint |
192
+ | 4 | Configure env vars in EasyPanel |
193
+ | 5 | Set up custom domain + DNS |
194
+ | 6 | Verify SSL certificate |
195
+ | 7 | Enable auto-deploy from GitHub |
196
+ | 8 | Push to main, verify deployment |
@@ -5,6 +5,10 @@
5
5
  > **Keywords:** pgrag, rag, chunking, embedding, reranking, retrieval
6
6
  > **Load When:** pgrag or in-database RAG keywords detected
7
7
 
8
+ **Verified against:** Neon pgrag (`rag` extension family — experimental, see Core Rules). Last-verified: 2026-05-20.
9
+
10
+ ---
11
+
8
12
  Stack: Neon Serverless Postgres
9
13
 
10
14
  ## Core Rules
@@ -12,7 +16,7 @@ Stack: Neon Serverless Postgres
12
16
  - pgrag is EXPERIMENTAL -- API may change between Neon releases
13
17
  - ALWAYS enable unstable extensions before installing: `SET neon.allow_unstable_extensions='true'`
14
18
  - Use pgrag for simple, self-contained RAG pipelines (PDF ingestion, chunking, search)
15
- - Use application-level RAG (Semantic Kernel + pgvector) for complex workflows requiring custom logic, multi-model orchestration, or .NET integration
19
+ - Use application-level custom RAG (a typed MAF tool over pgvector — see standard ai-agents-rag-custom-pgvector) for complex workflows requiring custom logic, multi-model orchestration, or .NET integration
16
20
  - NEVER use pgrag local embeddings (384 dims) when your application uses a different embedding model -- dimension mismatch breaks search
17
21
 
18
22
  ## Install pgrag
@@ -226,7 +230,7 @@ SELECT rag.openai_chat_completion(
226
230
  | Cost | Zero for local models | API costs for remote models |
227
231
  | Best for | Prototyping, simple RAG, SQL-only environments | Production .NET applications, complex pipelines |
228
232
 
229
- **Recommendation:** Start with pgrag for prototyping and validation. Migrate to Semantic Kernel + pgvector for production .NET applications that need custom retrieval logic, multi-model orchestration, or integration with MAF agents.
233
+ **Recommendation:** Start with pgrag for prototyping and validation. Migrate to custom RAG (a typed MAF vector-search tool over pgvector — see ai-agents-rag-custom-pgvector) for production .NET applications that need custom retrieval logic, multi-model orchestration, or MAF agent integration.
230
234
 
231
235
  ## Common Mistakes
232
236
 
@@ -5,6 +5,10 @@
5
5
  > **Keywords:** pgvector, vector, embeddings, similarity search, HNSW, cosine
6
6
  > **Load When:** pgvector or embedding keywords detected
7
7
 
8
+ **Verified against:** .NET 10 + Pgvector.EntityFrameworkCore + pgvector (HNSW). Last-verified: 2026-05-20.
9
+
10
+ ---
11
+
8
12
  Stack: .NET VSA + Neon Serverless Postgres
9
13
 
10
14
  ## Core Rules
@@ -5,6 +5,10 @@
5
5
  > **Keywords:** neon, serverless postgres, branching, scale-to-zero, connection string, neonctl
6
6
  > **Load When:** neon stack detected
7
7
 
8
+ **Verified against:** .NET 10 + Npgsql/EF Core 10 + neonctl. Last-verified: 2026-05-20.
9
+
10
+ ---
11
+
8
12
  Stack: .NET + Neon Serverless Postgres
9
13
 
10
14
  ## Core Rules
@@ -120,7 +124,7 @@ neonctl branches create --project-id <project-id> \
120
124
  neonctl branches create --project-id <project-id> \
121
125
  --name ci-test-run-42 \
122
126
  --parent main \
123
- --expires-at "2026-04-01T00:00:00Z"
127
+ --expires-at "2027-01-01T00:00:00Z"
124
128
 
125
129
  # Reset branch to parent state
126
130
  neonctl branches reset feature/my-feature --parent --project-id <project-id>