docs(CLAUDE.md): add Integration-task smoke-test section

Documents the bash curl-check recipe agents must run before marking an
Integration-task done: start dev server, curl the route, grep for expected
sections, fail if any are missing.

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
This commit is contained in:
Janpeter Visser 2026-05-02 17:28:11 +02:00
parent d93c91c386
commit d699a94bc6

View file

@ -117,6 +117,37 @@ Lees het relevante patroon vóór je begint. Nooit uit het hoofd schrijven.
---
## Integration-task verificatie (smoke-test)
Voor stories met `*-component.tsx`: de Integration-task moet vóór
`update_job_status(done)` een smoke-test draaien op de daadwerkelijke
HTML-render:
```bash
# In de worktree — pas ROUTE en SECTIONS aan per story
ROUTE="/insights"
SECTIONS=("Sprint Health" "Plan-quality" "Agent throughput" "Velocity" "Backlog health")
npm run dev > /tmp/dev.log 2>&1 &
DEV_PID=$!
sleep 8 # wacht tot Next.js compiled
curl -s http://localhost:3000${ROUTE} > /tmp/page.html
SMOKE_FAIL=
for section in "${SECTIONS[@]}"; do
grep -q "$section" /tmp/page.html || { echo "MISSING: $section"; SMOKE_FAIL=1; }
done
kill $DEV_PID
[ -z "$SMOKE_FAIL" ] # exit-code 1 als iets miste
```
Als de smoke-test faalt: pas `page.tsx` aan zodat alle secties renderen, herhaal.
Markeer Integration-task DONE pas wanneer alle verwachte sections in de HTML zitten.
---
## Env vars
```bash