docs(front-matter): add YAML front-matter to patterns/

This commit is contained in:
Janpeter Visser 2026-05-03 00:29:25 +02:00
parent f106af9ab4
commit 6beed46311
10 changed files with 90 additions and 0 deletions

View file

@ -1,3 +1,12 @@
---
title: "Bidirectionele async-comms MCP-agent ↔ user"
status: active
audience: [ai-agent, contributor]
language: nl
last_updated: 2026-05-03
when_to_read: "When implementing or extending the claude-question channel for agent-user async communication."
---
# Patroon: Bidirectionele async-comms tussen MCP-agent en interactieve user
Het M11 vraag-antwoord-kanaal is herbruikbaar voor elke feature waarbij een

View file

@ -1,3 +1,12 @@
---
title: "Entity Dialog"
status: active
audience: [ai-agent, contributor]
language: nl
last_updated: 2026-05-03
when_to_read: "Before building any create/edit/detail dialog component."
---
# Pattern — Entity Dialog
Deze pagina is **bindend** voor elke create/edit/detail-dialog in Scrum4Me, ongeacht het achterliggende dataobject (PBI, Story, Task, Todo, Sprint, Product, User, of toekomstige entiteiten). Een nieuwe dialog die hier niet aan voldoet, hoort niet gemerged te worden.

View file

@ -1,3 +1,12 @@
---
title: "iron-session"
status: active
audience: [ai-agent, contributor]
language: nl
last_updated: 2026-05-03
when_to_read: "When reading or writing session cookies or implementing auth checks."
---
# Patroon: iron-session
## lib/session.ts

View file

@ -1,3 +1,12 @@
---
title: "Proxy (route protection)"
status: active
audience: [ai-agent, contributor]
language: nl
last_updated: 2026-05-03
when_to_read: "When adding or modifying route-level access control in proxy.ts."
---
# Patroon: Proxy (route protection)
In Next.js 16 hernoemd van `middleware.ts` naar `proxy.ts`, functienaam van `middleware` naar `proxy`.

View file

@ -1,3 +1,12 @@
---
title: "Prisma Client singleton"
status: active
audience: [ai-agent, contributor]
language: nl
last_updated: 2026-05-03
when_to_read: "When importing or initialising the Prisma client in server code."
---
# Patroon: Prisma Client singleton
## lib/prisma.ts

View file

@ -1,3 +1,12 @@
---
title: "QR-pairing via unauth-SSE + pre-auth cookie"
status: active
audience: [ai-agent, contributor]
language: nl
last_updated: 2026-05-03
when_to_read: "When working on QR-code login flow or unauth SSE endpoints."
---
# Patroon: QR-pairing via unauth-SSE + pre-auth cookie
Het M10 QR-login-mechanisme is herbruikbaar voor elke feature die **realtime-

View file

@ -1,3 +1,12 @@
---
title: "Route Handler (REST API)"
status: active
audience: [ai-agent, contributor]
language: nl
last_updated: 2026-05-03
when_to_read: "When writing a new Next.js route handler (GET/POST/PATCH/DELETE)."
---
# Patroon: Route Handler (REST API)
Alle endpoints vereisen: `Authorization: Bearer <token>`

View file

@ -1,3 +1,12 @@
---
title: "Server Action"
status: active
audience: [ai-agent, contributor]
language: nl
last_updated: 2026-05-03
when_to_read: "When writing a new server action with auth and Zod validation."
---
# Patroon: Server Action
Altijd in `actions/[domein].ts`. Nooit inline in page.tsx.

View file

@ -1,3 +1,12 @@
---
title: "Float sort_order (drag-and-drop volgorde)"
status: active
audience: [ai-agent, contributor]
language: nl
last_updated: 2026-05-03
when_to_read: "When implementing drag-and-drop reordering or inserting between items."
---
# Patroon: Float sort_order (drag-and-drop volgorde)
## Berekening bij tussenvoeging

View file

@ -1,3 +1,12 @@
---
title: "Zustand optimistische update + rollback"
status: active
audience: [ai-agent, contributor]
language: nl
last_updated: 2026-05-03
when_to_read: "When adding client-side state mutations that need optimistic UI and rollback."
---
# Patroon: Zustand optimistische update + rollback
Gebruik dit patroon bij elke dnd-kit `onDragEnd` handler.