Files
TheLastGarden/.planning/phases/02-season-1-vertical-slice-soil/02-VALIDATION.md
T
josh 01e02dcdb8 docs(phase-02): add validation strategy
Nyquist VALIDATION.md scaffold for Phase 2. Defines test infrastructure
(Vitest + Playwright already wired by Phase 1), sampling rates (npm test
after each commit, npm run ci after each wave), Wave-0 dependency surface
(BigQty + scheduler + Zustand store + V1Payload extension), and three
manual-only verifications (AudioContext cross-browser, letter voice review,
cozy-pace playtest). The per-task verification map is intentionally empty —
the planner fills it during plan generation; nyquist_compliant flips to
true once it's complete.

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
2026-05-09 02:03:17 -04:00

4.1 KiB
Raw Blame History

phase, slug, status, nyquist_compliant, wave_0_complete, created
phase slug status nyquist_compliant wave_0_complete created
2 season-1-vertical-slice-soil draft false false 2026-05-09

Phase 2 — Validation Strategy

Per-phase validation contract for feedback sampling during execution. Populated by the planner during plan generation. Each plan's tasks must declare automated verification commands or a Wave 0 dependency.


Test Infrastructure

Property Value
Framework Vitest 4.x (sim + unit + integration) + Playwright 1.x (e2e smoke, PIPE-07)
Config files vitest.config.ts, playwright.config.ts (Phase 1 already shipped both)
Quick run command npm test (Vitest only — happy-dom env; ~12s on warm cache)
Full suite command npm run ci (lint + Vitest + validate:assets + build)
Playwright command npx playwright test (Phase 2 ships the first real e2e)
Estimated runtime Vitest ≤5s · Playwright ≤30s · npm run ci ≤60s

Sampling Rate

  • After every task commit: Run npm test (Vitest)
  • After every plan wave: Run npm run ci (full)
  • Before /gsd-verify-work: npm run ci AND npx playwright test must be green
  • Max feedback latency: ≤5 seconds for Vitest; ≤30s for Playwright

Per-Task Verification Map

Populated by the planner during plan generation. One row per <task> block in every PLAN.md.

Task ID Plan Wave Requirement Threat Ref Secure Behavior Test Type Automated Command File Exists Status
(planner fills this section after PLAN.md generation) pending

Status: pending · green · red · ⚠️ flaky


Wave 0 Requirements

Wave 0 (the foundations plan, expected as Plan 02-01) lands BigQty, the Zustand 5 store, the tick scheduler, and the Phase-2 V1Payload schema extension before any vertical slice can run. Until Wave 0 lands, every Wave-1 task carries a Wave-0 dependency.

  • src/sim/numbers/big-qty.ts + big-qty.test.ts — BigQty wrapper unit tests
  • src/sim/scheduler/scheduler.ts + scheduler.test.ts — tick scheduler with negative-delta refusal + 24h clamp
  • src/store/index.ts + slice tests — Zustand 5 vanilla createStore + slim sim adapter
  • src/save/migrations.ts — extended V1Payload (Phase-2 schema extension, NOT v1→v2)
  • eslint.config.js — additional sim-purity rule banning Date.now/setInterval in src/sim/**

Filled in by Plan 02-01. All other plans declare a Wave-0 dependency in frontmatter (depends_on: [02-01]).


Manual-Only Verifications

Behavior Requirement Why Manual Test Instructions
AudioContext.resume() actually unlocks audio across Chrome / Firefox / Safari / Edge AEST-07 Browser autoplay policies vary; Vitest happy-dom does not exercise real audio context. After Wave 1, manually load the dev build in Chrome / Firefox / Safari (last 2 stable). Click Begin. Confirm a console-logged AudioContext.state === 'running'.
Letter prose reads in voice (not as a stat dump) UX-02 Tonal verification is a human review; CONTEXT D-17 explicitly calls this out. Author reviews /content/dialogue/season1/letter.ink against the bible voice; reviewer signs off in plan SUMMARY.md.
Cozy 25min growth feels right at playtest CONTEXT D-08 / D-09 Subjective pacing — only verifiable by playing. Solo playtest after Wave 2 lands. Adjust per-plant durations if either pace is off; record final values in SUMMARY.md.

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 (vitest run, not vitest)
  • Feedback latency < 5s for Vitest, < 30s for Playwright
  • nyquist_compliant: true set in frontmatter (set by the planner after the per-task map is filled)

Approval: pending