docs(phase-8): add validation strategy
This commit is contained in:
@@ -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 `<automated>` 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
|
||||||
Reference in New Issue
Block a user