From bbe4ac2b293d5cd2f8ae75b9bfbc21e5ec7abbfa Mon Sep 17 00:00:00 2001 From: Jean-Luc Makiola Date: Sat, 14 Mar 2026 22:19:09 +0100 Subject: [PATCH] docs(phase-1): add validation strategy --- .../01-VALIDATION.md | 86 +++++++++++++++++++ 1 file changed, 86 insertions(+) create mode 100644 .planning/phases/01-foundation-and-collection/01-VALIDATION.md diff --git a/.planning/phases/01-foundation-and-collection/01-VALIDATION.md b/.planning/phases/01-foundation-and-collection/01-VALIDATION.md new file mode 100644 index 0000000..e881611 --- /dev/null +++ b/.planning/phases/01-foundation-and-collection/01-VALIDATION.md @@ -0,0 +1,86 @@ +--- +phase: 1 +slug: foundation-and-collection +status: draft +nyquist_compliant: false +wave_0_complete: false +created: 2026-03-14 +--- + +# Phase 1 — 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** | ~3 seconds | + +--- + +## 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 | +|---------|------|------|-------------|-----------|-------------------|-------------|--------| +| 01-01-01 | 01 | 1 | COLL-01 | unit | `bun test tests/services/item.service.test.ts -t "create"` | ❌ W0 | ⬜ pending | +| 01-01-02 | 01 | 1 | COLL-01 | integration | `bun test tests/routes/items.test.ts -t "create"` | ❌ W0 | ⬜ pending | +| 01-01-03 | 01 | 1 | COLL-02 | unit | `bun test tests/services/item.service.test.ts -t "update"` | ❌ W0 | ⬜ pending | +| 01-01-04 | 01 | 1 | COLL-02 | unit | `bun test tests/services/item.service.test.ts -t "delete"` | ❌ W0 | ⬜ pending | +| 01-01-05 | 01 | 1 | COLL-03 | unit | `bun test tests/services/category.service.test.ts` | ❌ W0 | ⬜ pending | +| 01-01-06 | 01 | 1 | COLL-03 | unit | `bun test tests/services/category.service.test.ts -t "reassign"` | ❌ W0 | ⬜ pending | +| 01-01-07 | 01 | 1 | COLL-04 | unit | `bun test tests/services/totals.test.ts -t "category"` | ❌ W0 | ⬜ pending | +| 01-01-08 | 01 | 1 | COLL-04 | unit | `bun test tests/services/totals.test.ts -t "global"` | ❌ W0 | ⬜ pending | + +*Status: ⬜ pending · ✅ green · ❌ red · ⚠️ flaky* + +--- + +## Wave 0 Requirements + +- [ ] `tests/services/item.service.test.ts` — stubs for COLL-01, COLL-02 +- [ ] `tests/services/category.service.test.ts` — stubs for COLL-03 +- [ ] `tests/services/totals.test.ts` — stubs for COLL-04 +- [ ] `tests/routes/items.test.ts` — integration tests for item API endpoints +- [ ] `tests/routes/categories.test.ts` — integration tests for category API endpoints +- [ ] `tests/helpers/db.ts` — shared test helper: in-memory SQLite instance with migrations applied + +--- + +## Manual-Only Verifications + +| Behavior | Requirement | Why Manual | Test Instructions | +|----------|-------------|------------|-------------------| +| Card grid layout renders correctly | COLL-01 | Visual layout verification | Open collection page, verify cards display in grid with name, weight, price chips, and image | +| Slide-out panel opens/closes | COLL-02 | UI interaction | Click add/edit, verify panel slides from right, collection visible behind | +| Onboarding wizard flow | N/A | First-run UX | Clear DB, reload app, verify wizard guides through category + item creation | +| Sticky totals bar visibility | COLL-04 | Visual layout | Add 20+ items, scroll, verify totals bar remains visible at top | +| Category emoji display | COLL-03 | Visual rendering | Create category with emoji, verify it displays on category headers and item cards | + +--- + +## 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