---
phase: 20.4
slug: implement-all-retro-agent-failure-patterns-mitigations-m-1-t
status: draft
nyquist_compliant: false
wave_0_complete: false
created: 2026-04-16
---

# Phase 20.4 — Validation Strategy

> Per-phase validation contract for feedback sampling during execution.

---

## Test Infrastructure

| Property | Value |
|----------|-------|
| **Framework** | Grep-based presence checks + hook dry-run tests (no new test harness) |
| **Config file** | `.planning/config.json` (verified) |
| **Quick run command** | `bash -c 'test -f .planning/templates/PARALLEL-SITES-CHECKLIST.md && echo OK'` |
| **Full suite command** | `bash -c 'for f in M1 M2 M3 M4 M5 M6 M7 M8 M9 M10; do echo "Checking $f..."; done'` (see Per-Task map) |
| **Estimated runtime** | ~5 seconds |

---

## Sampling Rate

- **After every task commit:** Run grep-based presence check for that mitigation's artifacts
- **After every plan wave:** Run all presence checks for completed mitigations
- **Before `/gsd-verify-work`:** All 10 M-NN presence checks must pass
- **Max feedback latency:** 5 seconds

---

## Per-Task Verification Map

| Task ID | Plan | Wave | Requirement | Threat Ref | Secure Behavior | Test Type | Automated Command | File Exists | Status |
|---------|------|------|-------------|------------|-----------------|-----------|-------------------|-------------|--------|
| 20.4-01-01 | 01 | 1 | M-1 | — | N/A | grep | `test -f .planning/templates/PARALLEL-SITES-CHECKLIST.md` | ❌ W0 | ⬜ pending |
| 20.4-01-02 | 01 | 1 | M-10 | — | N/A | grep | `grep -q "Requirements Preserved" CLAUDE.md` | ❌ W0 | ⬜ pending |
| 20.4-02-01 | 02 | 1 | M-2 | T-20.4-01 | Hook never evals untrusted input | grep+dry-run | `grep -q "Pre-fix sibling search" CLAUDE.md && test -f .claude/hooks/sibling-search-warn.sh` | ❌ W0 | ⬜ pending |
| 20.4-02-02 | 02 | 1 | M-6 | T-20.4-02 | Hook never evals untrusted input | grep+dry-run | `test -f .claude/hooks/commit-size-warn.sh` | ❌ W0 | ⬜ pending |
| 20.4-03-01 | 03 | 1 | M-5 | — | N/A | grep | `test -f .planning/SYNC-MERGE.md && grep -q "SYNC-MERGE" .planning/DATA-FLOW.md` | ❌ W0 | ⬜ pending |
| 20.4-03-02 | 03 | 1 | M-7 | — | N/A | grep | `test -f code_tips/CALLBACK_PIPELINE.md && grep -q "CALLBACK_PIPELINE" CLAUDE.md` | ❌ W0 | ⬜ pending |
| 20.4-03-03 | 03 | 1 | M-8 | — | N/A | grep | `test -f .planning/REOPENED.md && grep -q "REOPENED.md" CLAUDE.md` | ❌ W0 | ⬜ pending |
| 20.4-04-01 | 04 | 1 | M-4 | — | N/A | grep | `test -f .planning/MODAL-STATE.md && grep -q "20.5" .planning/ROADMAP.md` | ❌ W0 | ⬜ pending |
| 20.4-05-01 | 05 | 2 | M-3 | — | N/A | grep | `grep -q bugsweeper_smoke ~/.ccs/instances/bigscreen/get-shit-done/workflows/verify-phase.md` | ❌ W0 | ⬜ pending |
| 20.4-05-02 | 05 | 2 | M-9 | — | N/A | grep | `grep -q "UAT-CHECKLIST" ~/.ccs/instances/bigscreen/get-shit-done/workflows/verify-phase.md` | ❌ W0 | ⬜ pending |

*Status: ⬜ pending · ✅ green · ❌ red · ⚠️ flaky*

---

## Wave 0 Requirements

- Existing infrastructure covers all phase requirements. No new test framework or fixtures needed.
- Grep and `test -f` are native to bash and available in the project environment.

---

## Manual-Only Verifications

| Behavior | Requirement | Why Manual | Test Instructions |
|----------|-------------|------------|-------------------|
| M-2 hook fires on real Edit | M-2 | Requires live Claude Code session | Edit a `.rs` file containing `fn some_func` without prior grep; verify reminder appears |
| M-6 hook fires on large commit | M-6 | Requires live git staging | Stage >200 lines; run `git commit`; verify reminder appears |

---

## 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 < 5s
- [ ] `nyquist_compliant: true` set in frontmatter

**Approval:** pending
