From 2f60c16d8d37e3b0fffe4d608a7495d3b0d297c1 Mon Sep 17 00:00:00 2001 From: Mikkel Georgsen Date: Wed, 1 Apr 2026 14:24:25 +0200 Subject: [PATCH] [nexus] docs(22): add validation strategy --- .../22-agent-streaming/22-VALIDATION.md | 83 +++++++++++++++++++ 1 file changed, 83 insertions(+) create mode 100644 .planning/phases/22-agent-streaming/22-VALIDATION.md diff --git a/.planning/phases/22-agent-streaming/22-VALIDATION.md b/.planning/phases/22-agent-streaming/22-VALIDATION.md new file mode 100644 index 00000000..0dd28fe7 --- /dev/null +++ b/.planning/phases/22-agent-streaming/22-VALIDATION.md @@ -0,0 +1,83 @@ +--- +phase: 22 +slug: agent-streaming +status: draft +nyquist_compliant: false +wave_0_complete: false +created: 2026-04-01 +--- + +# Phase 22 — Validation Strategy + +> Per-phase validation contract for feedback sampling during execution. + +--- + +## Test Infrastructure + +| Property | Value | +|----------|-------| +| **Framework** | Vitest 3.0.x | +| **Config file** | `server/vitest.config.ts`, `ui/vitest.config.ts` | +| **Quick run command** | `pnpm --filter @paperclipai/server test run && pnpm --filter @paperclipai/ui test run` | +| **Full suite command** | `pnpm test run` | +| **Estimated runtime** | ~20 seconds | + +--- + +## Sampling Rate + +- **After every task commit:** Run `pnpm --filter @paperclipai/server test run && pnpm --filter @paperclipai/ui test run` +- **After every plan wave:** Run `pnpm test run` +- **Before `/gsd:verify-work`:** Full suite must be green +- **Max feedback latency:** 20 seconds + +--- + +## Per-Task Verification Map + +| Task ID | Plan | Wave | Requirement | Test Type | Automated Command | File Exists | Status | +|---------|------|------|-------------|-----------|-------------------|-------------|--------| +| 22-01-01 | 01 | 1 | CHAT-01 | unit (server) | `pnpm --filter @paperclipai/server test run -- chat-stream` | ❌ W0 | ⬜ pending | +| 22-01-02 | 01 | 1 | CHAT-08 | unit (server) | `pnpm --filter @paperclipai/server test run -- chat-routes` | ✅ extend | ⬜ pending | +| 22-01-03 | 01 | 1 | CHAT-10 | unit (server) | `pnpm --filter @paperclipai/server test run -- chat-routes` | ✅ extend | ⬜ pending | +| 22-02-01 | 02 | 1 | CHAT-12 | unit (UI) | `pnpm --filter @paperclipai/ui test run` | ❌ W0 | ⬜ pending | +| 22-02-02 | 02 | 1 | INPUT-05 | unit (UI) | `pnpm --filter @paperclipai/ui test run` | ❌ W0 | ⬜ pending | +| 22-02-03 | 02 | 1 | INPUT-06 | unit (UI) | `pnpm --filter @paperclipai/ui test run` | ❌ W0 | ⬜ pending | +| 22-02-04 | 02 | 1 | AGENT-04 | unit (UI) | `pnpm --filter @paperclipai/ui test run` | ❌ W0 | ⬜ pending | +| 22-03-01 | 03 | 2 | PERF-03 | unit (UI) | `pnpm --filter @paperclipai/ui test run` | ✅ extend | ⬜ pending | + +*Status: ⬜ pending · ✅ green · ❌ red · ⚠️ flaky* + +--- + +## Wave 0 Requirements + +- [ ] `server/src/__tests__/chat-stream-routes.test.ts` — stubs for CHAT-01, CHAT-12 SSE behavior +- [ ] `ui/src/components/ChatInput.slash-mention.test.tsx` — stubs for INPUT-05, INPUT-06 parsing +- [ ] `ui/src/components/ChatAgentBadge.test.tsx` — stubs for AGENT-04 rendering + +*Existing `chat-routes.test.ts` covers CHAT-08 and CHAT-10 with extensions.* + +--- + +## Manual-Only Verifications + +| Behavior | Requirement | Why Manual | Test Instructions | +|----------|-------------|------------|-------------------| +| First token appears in under 500ms | PERF-02 | Requires real API latency measurement | Send message, observe time-to-first-token with network tab | +| Agent colors distinguishable across themes | THEME-03 | Visual perception test | Switch themes, verify agent badges are visually distinct | +| 1000+ messages scroll without jank | PERF-03 | Requires real browser scroll performance | Load conversation with 1000+ messages, scroll rapidly, check for frame drops | + +--- + +## Validation Sign-Off + +- [ ] All tasks have `` verify or Wave 0 dependencies +- [ ] Sampling continuity: no 3 consecutive tasks without automated verify +- [ ] Wave 0 covers all MISSING references +- [ ] No watch-mode flags +- [ ] Feedback latency < 20s +- [ ] `nyquist_compliant: true` set in frontmatter + +**Approval:** pending