From 6e3f787befa90ea1bd314732290b1daa3f52eb6e Mon Sep 17 00:00:00 2001 From: Jean-Luc Makiola Date: Sun, 15 Mar 2026 11:25:17 +0100 Subject: [PATCH] docs(phase-2): add research and validation strategy --- .../02-planning-threads/02-VALIDATION.md | 84 +++++++++++++++++++ 1 file changed, 84 insertions(+) create mode 100644 .planning/phases/02-planning-threads/02-VALIDATION.md diff --git a/.planning/phases/02-planning-threads/02-VALIDATION.md b/.planning/phases/02-planning-threads/02-VALIDATION.md new file mode 100644 index 0000000..59637fc --- /dev/null +++ b/.planning/phases/02-planning-threads/02-VALIDATION.md @@ -0,0 +1,84 @@ +--- +phase: 2 +slug: planning-threads +status: draft +nyquist_compliant: false +wave_0_complete: false +created: 2026-03-15 +--- + +# Phase 2 — Validation Strategy + +> Per-phase validation contract for feedback sampling during execution. + +--- + +## Test Infrastructure + +| Property | Value | +|----------|-------| +| **Framework** | Bun test runner (built-in, Jest-compatible API) | +| **Config file** | None — Bun detects test files automatically | +| **Quick run command** | `bun test --bail` | +| **Full suite command** | `bun test` | +| **Estimated runtime** | ~5 seconds (Phase 1 + Phase 2 tests) | + +--- + +## Sampling Rate + +- **After every task commit:** Run `bun test --bail` +- **After every plan wave:** Run `bun test` +- **Before `/gsd:verify-work`:** Full suite must be green +- **Max feedback latency:** 5 seconds + +--- + +## Per-Task Verification Map + +| Task ID | Plan | Wave | Requirement | Test Type | Automated Command | File Exists | Status | +|---------|------|------|-------------|-----------|-------------------|-------------|--------| +| 02-01-01 | 01 | 1 | THRD-01 | unit | `bun test tests/services/thread.service.test.ts -t "create"` | ❌ W0 | ⬜ pending | +| 02-01-02 | 01 | 1 | THRD-01 | integration | `bun test tests/routes/threads.test.ts -t "create"` | ❌ W0 | ⬜ pending | +| 02-01-03 | 01 | 1 | THRD-02 | unit | `bun test tests/services/thread.service.test.ts -t "candidate"` | ❌ W0 | ⬜ pending | +| 02-01-04 | 01 | 1 | THRD-02 | integration | `bun test tests/routes/threads.test.ts -t "candidate"` | ❌ W0 | ⬜ pending | +| 02-01-05 | 01 | 1 | THRD-03 | unit | `bun test tests/services/thread.service.test.ts -t "update\|delete"` | ❌ W0 | ⬜ pending | +| 02-01-06 | 01 | 1 | THRD-04 | unit | `bun test tests/services/thread.service.test.ts -t "resolve"` | ❌ W0 | ⬜ pending | +| 02-01-07 | 01 | 1 | THRD-04 | integration | `bun test tests/routes/threads.test.ts -t "resolve"` | ❌ W0 | ⬜ pending | +| 02-01-08 | 01 | 1 | THRD-04 | unit | `bun test tests/services/thread.service.test.ts -t "list"` | ❌ W0 | ⬜ pending | + +*Status: ⬜ pending · ✅ green · ❌ red · ⚠️ flaky* + +--- + +## Wave 0 Requirements + +- [ ] `tests/services/thread.service.test.ts` — stubs for THRD-01, THRD-02, THRD-03, THRD-04 +- [ ] `tests/routes/threads.test.ts` — integration tests for thread API endpoints +- [ ] `tests/helpers/db.ts` — MODIFY: add threads + thread_candidates table creation to in-memory setup + +--- + +## Manual-Only Verifications + +| Behavior | Requirement | Why Manual | Test Instructions | +|----------|-------------|------------|-------------------| +| Tab switching between "My Gear" and "Planning" | THRD-01 | Navigation UX | Click tabs, verify correct content shown, URL updates | +| Thread card grid layout and tag chips | THRD-01 | Visual layout | View thread list, verify cards show name, candidate count, price range | +| Candidate card grid within thread | THRD-02 | Visual layout | Open thread, verify candidates display as cards | +| Slide-out panel for candidate add/edit | THRD-02/03 | UI interaction | Add/edit candidate, verify panel slides from right | +| Resolution confirmation dialog | THRD-04 | UI interaction | Click resolve, verify confirmation dialog appears | +| Resolved thread hidden from active list | THRD-04 | UI state | Resolve thread, verify it disappears, toggle shows archived | + +--- + +## 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 < 5s +- [ ] `nyquist_compliant: true` set in frontmatter + +**Approval:** pending