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

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:45:51 +02:00 committed by GitHub
parent bae0d478ea
commit e02c6ff9d9
No known key found for this signature in database
GPG key ID: B5690EEEBB952194

View file

@ -118,6 +118,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 ## Env vars
```bash ```bash