docs(04): add validation strategy

This commit is contained in:
2026-03-11 18:28:39 +08:00
parent e001f5b04a
commit caf205819f
@@ -0,0 +1,79 @@
---
phase: 04
slug: gsd-integration
status: draft
nyquist_compliant: false
wave_0_complete: false
created: 2026-03-11
---
# Phase 4 — Validation Strategy
> Per-phase validation contract for feedback sampling during execution.
---
## Test Infrastructure
| Property | Value |
|----------|-------|
| **Framework** | pytest 8.0+ |
| **Config file** | pyproject.toml (existing) |
| **Quick run command** | `pytest tests/test_user_context.py tests/test_orchestrator.py -x -v` |
| **Full suite command** | `pytest -x` |
| **Estimated runtime** | ~15 seconds |
---
## Sampling Rate
- **After every task commit:** Run `pytest tests/test_user_context.py tests/test_orchestrator.py -x -v`
- **After every plan wave:** Run `pytest -x`
- **Before `/gsd:verify-work`:** Full suite must be green
- **Max feedback latency:** 15 seconds
---
## Per-Task Verification Map
| Task ID | Plan | Wave | Requirement | Test Type | Automated Command | File Exists | Status |
|---------|------|------|-------------|-----------|-------------------|-------------|--------|
| 04-01-01 | 01 | 1 | BRDG-06 | unit | `pytest tests/test_user_context.py::TestUserContextManager -v` | ❌ W0 | ⬜ pending |
| 04-01-02 | 01 | 1 | BRDG-06 | unit | `pytest tests/test_user_context.py::TestAtomicWrites -v` | ❌ W0 | ⬜ pending |
| 04-01-03 | 01 | 1 | BRDG-06 | unit | `pytest tests/test_user_context.py::TestMultiUser -v` | ❌ W0 | ⬜ pending |
| 04-02-01 | 02 | 1 | BRDG-06 | unit | `pytest tests/test_orchestrator.py::TestSpecialCommands::test_new_project -v` | ❌ W0 | ⬜ pending |
| 04-02-02 | 02 | 1 | BRDG-06 | unit | `pytest tests/test_orchestrator.py::TestSpecialCommands::test_use_project -v` | ❌ W0 | ⬜ pending |
| 04-02-03 | 02 | 1 | BRDG-06 | unit | `pytest tests/test_orchestrator.py::TestSpecialCommands::test_use_nonexistent -v` | ❌ W0 | ⬜ pending |
| 04-03-01 | 03 | 2 | BRDG-06 | unit | `pytest tests/test_command_executor.py::TestLongCommands -v` | ✅ extend | ⬜ pending |
*Status: ⬜ pending · ✅ green · ❌ red · ⚠️ flaky*
---
## Wave 0 Requirements
- [ ] `tests/test_user_context.py` — new file for UserContextManager tests (TestUserContextManager, TestAtomicWrites, TestMultiUser)
- [ ] `tests/test_orchestrator.py` — extend with TestSpecialCommands class (test_new_project, test_use_project, test_use_nonexistent)
- [ ] `tests/conftest.py` — add user_context fixture and temp_user_context fixture
- [ ] `tests/test_command_executor.py` — extend with TestLongCommands class
---
## Manual-Only Verifications
| Behavior | Requirement | Why Manual | Test Instructions |
|----------|-------------|------------|-------------------|
| Full GSD workflow E2E | BRDG-06 | Requires live tmux + GSD installation | Run `/gsd:new-project test-project` through Feishu, verify session created and project initialized |
---
## 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 < 15s
- [ ] `nyquist_compliant: true` set in frontmatter
**Approval:** pending