From 0ef71cdcab46ce1c07626f42923c957a662d3262 Mon Sep 17 00:00:00 2001 From: Kawa Date: Tue, 31 Mar 2026 18:01:58 +0200 Subject: [PATCH] docs(phase-8): add validation strategy --- .../08-theme-foundation/08-VALIDATION.md | 76 +++++++++++++++++++ 1 file changed, 76 insertions(+) create mode 100644 .planning/phases/08-theme-foundation/08-VALIDATION.md diff --git a/.planning/phases/08-theme-foundation/08-VALIDATION.md b/.planning/phases/08-theme-foundation/08-VALIDATION.md new file mode 100644 index 0000000..ac97b1f --- /dev/null +++ b/.planning/phases/08-theme-foundation/08-VALIDATION.md @@ -0,0 +1,76 @@ +--- +phase: 8 +slug: theme-foundation +status: draft +nyquist_compliant: false +wave_0_complete: false +created: 2026-03-31 +--- + +# Phase 8 — Validation Strategy + +> Per-phase validation contract for feedback sampling during execution. + +--- + +## Test Infrastructure + +| Property | Value | +|----------|-------| +| **Framework** | Vitest ^4.1.1 | +| **Config file** | `vite.config.ts` (test block: `environment: 'jsdom'`) | +| **Quick run command** | `npm test` | +| **Full suite command** | `npm test` | +| **Estimated runtime** | ~5 seconds | + +--- + +## Sampling Rate + +- **After every task commit:** Run `npm test` +- **After every plan wave:** Run `npm test` +- **Before `/gsd:verify-work`:** Full suite must be green +- **Max feedback latency:** 10 seconds + +--- + +## Per-Task Verification Map + +| Task ID | Plan | Wave | Requirement | Test Type | Automated Command | File Exists | Status | +|---------|------|------|-------------|-----------|-------------------|-------------|--------| +| 08-01-01 | 01 | 0 | THEME-02 | unit | `npm test` | ❌ W0 | ⬜ pending | +| 08-02-01 | 02 | 1 | THEME-01 | unit | `npm test` | ✅ existing | ⬜ pending | +| 08-02-02 | 02 | 1 | THEME-01 | grep | `grep -r "text-gray-\|bg-gray-\|border-gray-\|bg-blue-\|text-blue-" src/` | manual | ⬜ pending | +| 08-03-01 | 03 | 1 | THEME-02 | unit | `npm test` | ❌ W0 | ⬜ pending | +| 08-03-02 | 03 | 1 | THEME-02 | manual | Browser: dark OS → hard reload → no flash | manual-only | ⬜ pending | + +*Status: ⬜ pending · ✅ green · ❌ red · ⚠️ flaky* + +--- + +## Wave 0 Requirements + +- [ ] `src/components/ui/ThemeToggle.test.tsx` — stubs for THEME-02 (toggle render, dark class toggle, localStorage persistence) + +*Existing 5 test files use semantic queries (getByText, getByRole) — unaffected by class-name migration.* + +--- + +## Manual-Only Verifications + +| Behavior | Requirement | Why Manual | Test Instructions | +|----------|-------------|------------|-------------------| +| No flash of wrong theme on reload | THEME-02 | Requires browser paint timing — jsdom cannot verify visual flash | 1. Set theme to Dark, reload page 2. Set theme to Light, reload in dark OS mode 3. Clear localStorage, reload — should follow OS preference | + +--- + +## 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 < 10s +- [ ] `nyquist_compliant: true` set in frontmatter + +**Approval:** pending