feat(ST-p6d1odh0): createUserQuestionAction — UserQuestion + PLAN_CHAT job queuing

- Nieuwe server action in actions/user-questions.ts
- Aanmaken UserQuestion + ClaudeJob PLAN_CHAT in transactie
- Blokkeert als idea.plan_md null is of product ontbreekt
- Idempotency-check: geen dubbele PLAN_CHAT per idee
- pg_notify claude_job_enqueued event voor SSE-realtime
- Rate-limit config uitgebreid met create-user-question

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
This commit is contained in:
Scrum4Me Agent 2026-05-05 17:30:00 +02:00
parent 8bccb56b21
commit 1067167611
2 changed files with 103 additions and 0 deletions

View file

@ -32,6 +32,7 @@ const CONFIGS: Record<string, RateLimitConfig> = {
'edit-idea-md': { windowMs: 60_000, max: 60 }, // grill_md / plan_md edits
'start-idea-job': { windowMs: 60_000, max: 10 }, // Grill / Make Plan triggers
'materialize-idea': { windowMs: 60_000, max: 5 },
'create-user-question': { windowMs: 60_000, max: 20 }, // PLAN_CHAT vragen
}
const DEFAULT_CONFIG: RateLimitConfig = { windowMs: 60_000, max: 10 }