---
phase: 7
slug: multilanguage
status: draft
nyquist_compliant: false
wave_0_complete: false
created: 2026-03-25
---

# Phase 7 — Validation Strategy

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

---

## Test Infrastructure

| Property | Value |
|----------|-------|
| **Framework** | pytest 8.x + pytest-asyncio (existing) |
| **Config file** | `pyproject.toml` (existing) |
| **Quick run command** | `pytest tests/unit -x -q` |
| **Full suite command** | `pytest tests/ -x` |
| **Estimated runtime** | ~30 seconds |

---

## Sampling Rate

- **After every task commit:** Run `pytest tests/unit -x -q`
- **After every plan wave:** Run `pytest tests/ -x`
- **Before `/gsd:verify-work`:** Full suite must be green
- **Max feedback latency:** 30 seconds

---

## Per-Task Verification Map

| Task ID | Plan | Wave | Requirement | Test Type | Automated Command | File Exists | Status |
|---------|------|------|-------------|-----------|-------------------|-------------|--------|
| 07-xx | 01 | 1 | I18N-03 | unit | `pytest tests/unit/test_system_prompt_builder.py -x` | ✅ extend | ⬜ pending |
| 07-xx | 01 | 1 | I18N-02 | integration | `pytest tests/integration/test_language_preference.py -x` | ❌ W0 | ⬜ pending |
| 07-xx | 01 | 1 | I18N-04 | integration | `pytest tests/integration/test_templates_i18n.py -x` | ❌ W0 | ⬜ pending |
| 07-xx | 02 | 2 | I18N-01 | build | `cd packages/portal && npx next build` | ✅ | ⬜ pending |
| 07-xx | 02 | 2 | I18N-02 | build | `cd packages/portal && npx next build` | ✅ | ⬜ pending |
| 07-xx | 02 | 2 | I18N-06 | build | `cd packages/portal && npx next build` | ✅ | ⬜ pending |

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

---

## Wave 0 Requirements

- [ ] `tests/unit/test_system_prompt_builder.py` — extend with TestLanguageInstruction class (I18N-03)
- [ ] `tests/integration/test_language_preference.py` — PATCH language endpoint (I18N-02)
- [ ] `tests/integration/test_templates_i18n.py` — locale-aware templates endpoint (I18N-04)

---

## Manual-Only Verifications

| Behavior | Requirement | Why Manual | Test Instructions |
|----------|-------------|------------|-------------------|
| Portal UI renders correctly in Spanish | I18N-01 | Browser rendering required | Switch to es, verify all labels/buttons translated |
| Portal UI renders correctly in Portuguese | I18N-01 | Browser rendering required | Switch to pt, verify all labels/buttons translated |
| Language switcher persists across sessions | I18N-02 | Requires login/logout cycle | Switch to es, log out, log back in, verify es persists |
| Login page language switcher works pre-auth | I18N-02 | UI interaction | On login page, switch to pt, verify form labels change |
| Agent responds in Spanish when messaged in Spanish | I18N-03 | Requires live LLM | Send Spanish message in chat, verify Spanish response |
| Error messages display in selected language | I18N-05 | UI rendering | Trigger validation error in es locale, verify localized |

---

## 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
