---
phase: 20.5
slug: modal-state-architectural-audit-inserted
status: draft
nyquist_compliant: false
wave_0_complete: false
created: 2026-04-16
---

# Phase 20.5 — Validation Strategy

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

---

## Test Infrastructure

| Property | Value |
|----------|-------|
| **Framework** | cargo test (Rust) |
| **Config file** | Cargo.toml |
| **Quick run command** | `cargo build --features bugsweeper 2>&1` |
| **Full suite command** | `cargo build --features bugsweeper 2>&1` |
| **Estimated runtime** | ~30 seconds |

---

## Sampling Rate

- **After every task commit:** Run `cargo build --features bugsweeper 2>&1`
- **After every plan wave:** Run `cargo build --features bugsweeper 2>&1`
- **Before `/gsd-verify-work`:** Full suite must be green
- **Max feedback latency:** 30 seconds

---

## Per-Task Verification Map

| Task ID | Plan | Wave | Requirement | Threat Ref | Secure Behavior | Test Type | Automated Command | File Exists | Status |
|---------|------|------|-------------|------------|-----------------|-----------|-------------------|-------------|--------|
| 20.5-01-01 | 01 | 1 | N/A (infra) | — | N/A | manual | `grep -c "##" .planning/MODAL-STATE.md` | ❌ W0 | ⬜ pending |

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

---

## Wave 0 Requirements

*Existing infrastructure covers all phase requirements. This is a documentation-only audit phase — no new test files needed.*

---

## Manual-Only Verifications

| Behavior | Requirement | Why Manual | Test Instructions |
|----------|-------------|------------|-------------------|
| MODAL-STATE.md has per-modal inventory | N/A (infra) | Documentation output | Verify each modal has its own section with callbacks table |
| Mermaid state diagrams render | N/A (infra) | Visual verification | Open MODAL-STATE.md in GitHub/VS Code preview |
| Callback chains traced end-to-end | N/A (infra) | Requires code reading | Spot-check 3 callback chains against source files |

*Documentation-only phase — all verifications are manual inspection of output document.*

---

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

**Approval:** pending
