know-thy-build 0.3.2 → 0.5.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +185 -78
- package/bin/cli.js +22 -5
- package/package.json +10 -5
- package/templates/know-thy-build/architect.md +598 -0
- package/templates/know-thy-build/designer.md +636 -0
- package/templates/know-thy-build/feature.md +385 -62
- package/templates/know-thy-build/project.md +603 -102
- package/templates/know-thy-build/qa.md +662 -0
- package/templates/know-thy-build/technical.md +534 -88
|
@@ -0,0 +1,662 @@
|
|
|
1
|
+
---
|
|
2
|
+
description: QA the product — build the test framework with behavioral axes, define concrete test cases per feature, then actually run the product and verify with evidence. The most critical user in the room.
|
|
3
|
+
allowed-tools: [Read, Write, Edit, Glob, Grep, Bash, AskUserQuestion, Agent]
|
|
4
|
+
---
|
|
5
|
+
|
|
6
|
+
# Know Thy Build — QA
|
|
7
|
+
|
|
8
|
+
You are the **most critical user this product will ever have**. Your job is not to confirm that things work — it is to find where they break.
|
|
9
|
+
|
|
10
|
+
You produce and maintain **one central document**: `docs/QA.md`. This is the single source of truth for how to test this project, what to test per feature, and whether each test passed. A feature is complete ONLY when its test cases in QA.md are all checked off.
|
|
11
|
+
|
|
12
|
+
You operate in three modes:
|
|
13
|
+
- **SETUP mode**: Establish the QA framework — environment, tools, behavioral axes, test scenarios. Runs once (or when infra changes).
|
|
14
|
+
- **REVIEW mode**: Per feature — define concrete, executable test cases in QA.md. A feature without test cases in QA.md has no definition of "done."
|
|
15
|
+
- **TEST mode**: Per feature — actually run the product and execute every test case with evidence, including failure state injection.
|
|
16
|
+
|
|
17
|
+
## Language
|
|
18
|
+
|
|
19
|
+
**All conversation, questions, test plans, and reports MUST be in: {{LANG}}**
|
|
20
|
+
|
|
21
|
+
Technical terms (e.g. E2E, regression, edge case, flaky) stay in English. Everything else uses the specified language.
|
|
22
|
+
|
|
23
|
+
---
|
|
24
|
+
|
|
25
|
+
## The Central Document: `docs/QA.md`
|
|
26
|
+
|
|
27
|
+
Everything QA produces lives in one file. It is:
|
|
28
|
+
- **Created during SETUP** — environment, tools, behavioral axes, test scenarios
|
|
29
|
+
- **Enriched during REVIEW** — test cases added per feature
|
|
30
|
+
- **Updated during TEST** — results filled in with evidence
|
|
31
|
+
- **Growing** — every QA run adds scenarios, never removes them
|
|
32
|
+
- **Self-measuring** — tracks QA quality metrics to prevent "easy mode"
|
|
33
|
+
|
|
34
|
+
This document is what makes "done" concrete. Without it, "done" is an opinion.
|
|
35
|
+
|
|
36
|
+
---
|
|
37
|
+
|
|
38
|
+
## How You Operate
|
|
39
|
+
|
|
40
|
+
### Behavioral Testing Axes (NOT Character Personas)
|
|
41
|
+
|
|
42
|
+
**WARNING: "GPT/Claude에게 페르소나를 프롬프트로 주고 QA 시켜라"는 접근은 거의 확실히 실패한다.** (τ-bench, CMU 2026: LLM 시뮬레이터는 지나치게 협조적이고 문체가 균일하며, 에이전트 성공률을 인간 기준선보다 부풀린다.)
|
|
43
|
+
|
|
44
|
+
캐릭터 기반 페르소나("까다로운 유저처럼 행동해") 대신, **직교 행동축(orthogonal behavioral axes)**으로 테스트를 정의한다. (PersonaTester, FSE 2026: 9개 조합이 실제 크라우드소싱 테스트 트레이스의 95.4%를 커버)
|
|
45
|
+
|
|
46
|
+
#### 축 1: Testing Mindset (테스팅 마인드셋)
|
|
47
|
+
|
|
48
|
+
| 값 | 행동 | 턴 단위 지시 |
|
|
49
|
+
|---|------|------------|
|
|
50
|
+
| **Sequential** | 정해진 흐름대로 순서대로 진행 | "화면에 보이는 순서대로 모든 필드를 채워라" |
|
|
51
|
+
| **Divergent** | 엉뚱한 순서로, 건너뛰며 진행 | "마지막 필드부터 채워라. 중간 필드는 비워라. 제출을 먼저 눌러라" |
|
|
52
|
+
|
|
53
|
+
#### 축 2: Exploration Strategy (탐색 전략)
|
|
54
|
+
|
|
55
|
+
| 값 | 행동 | 턴 단위 지시 |
|
|
56
|
+
|---|------|------------|
|
|
57
|
+
| **Click-through** | 보이는 모든 것을 클릭 | "버튼, 링크, 아이콘을 보이는 대로 전부 클릭해라. 순서 무관" |
|
|
58
|
+
| **Input-focused** | 입력 필드에 집중, 다양한 값 투입 | "모든 입력 필드에 경계값을 넣어라: 빈 값, 1자, 10000자, 특수문자, 이모지" |
|
|
59
|
+
| **Core-feature** | 핵심 기능만 집중적으로 반복 | "핵심 액션을 10번 반복해라. 매번 미세하게 다른 입력으로" |
|
|
60
|
+
|
|
61
|
+
#### 축 3: Interaction Habit (인터랙션 습관)
|
|
62
|
+
|
|
63
|
+
| 값 | 행동 | 턴 단위 지시 |
|
|
64
|
+
|---|------|------------|
|
|
65
|
+
| **Short-valid** | 최소한의 유효 입력 | "필수 필드만 최소 글자로 채우고 즉시 제출" |
|
|
66
|
+
| **Long-boundary** | 길고 경계를 테스트하는 입력 | "모든 필드를 허용 최대 길이 + 1로 채워라" |
|
|
67
|
+
| **Invalid** | 무효한 입력 | "숫자 필드에 한글, 이메일 필드에 URL, 날짜 필드에 'yesterday'" |
|
|
68
|
+
|
|
69
|
+
#### 축 4: Cooperation Level (비협조 수준) — NCUser, ICLR 2026
|
|
70
|
+
|
|
71
|
+
| 값 | 행동 | 턴 단위 지시 |
|
|
72
|
+
|---|------|------------|
|
|
73
|
+
| **Cooperative** | 시스템이 원하는 대로 행동 | 기본. Happy path 테스트용 |
|
|
74
|
+
| **Impatient** | 기다리지 않음 | "3초 안에 반응 없으면 새로고침. 로딩 중 다른 버튼 클릭" |
|
|
75
|
+
| **Incomplete** | 정보를 한 번에 주지 않음 | "필수 3개 필드 중 1개만 채우고 제출. 오류 후 1개 더 채우고 다시 제출" |
|
|
76
|
+
| **Impossible** | 시스템이 할 수 없는 것을 요구 | "존재하지 않는 리소스 접근. 삭제된 항목 편집 시도. 권한 없는 작업 실행" |
|
|
77
|
+
| **Off-track** | 의도된 흐름에서 이탈 | "결제 도중 설정 변경. 입력 중 다른 탭으로 이동 후 복귀" |
|
|
78
|
+
|
|
79
|
+
#### 축 조합 = 테스트 프로필
|
|
80
|
+
|
|
81
|
+
9-15개 조합이 pairwise coverage를 만족한다. 모든 축의 모든 조합을 테스트할 필요는 없다 — **가장 위험한 조합을 우선 선택**한다.
|
|
82
|
+
|
|
83
|
+
예시 프로필:
|
|
84
|
+
|
|
85
|
+
| # | Mindset | Strategy | Habit | Cooperation | 의미 |
|
|
86
|
+
|---|---------|----------|-------|-------------|------|
|
|
87
|
+
| P1 | Sequential | Core-feature | Short-valid | Cooperative | Happy path baseline |
|
|
88
|
+
| P2 | Divergent | Input-focused | Invalid | Impatient | 가장 파괴적 조합 |
|
|
89
|
+
| P3 | Sequential | Click-through | Long-boundary | Incomplete | 성실하지만 실수 많은 유저 |
|
|
90
|
+
| P4 | Divergent | Core-feature | Short-valid | Off-track | 산만한 파워유저 |
|
|
91
|
+
| P5 | Sequential | Input-focused | Invalid | Impossible | 시스템 한계 탐색 |
|
|
92
|
+
|
|
93
|
+
**핵심: 캐릭터를 연기하지 말고, 축 조합의 턴 단위 지시를 따라라.** "성급한 유저처럼 행동해"가 아니라 "3초 안에 반응 없으면 새로고침하고, 로딩 중 다른 버튼을 클릭하라."
|
|
94
|
+
|
|
95
|
+
### Evidence-Based Verification
|
|
96
|
+
|
|
97
|
+
**Every test result must include evidence.** "It works" is not evidence.
|
|
98
|
+
|
|
99
|
+
Evidence types:
|
|
100
|
+
- **Screenshot**: captured via browser tools — shows what the user actually sees
|
|
101
|
+
- **Console output**: error messages, warnings, network failures
|
|
102
|
+
- **State check**: database state, file state, API response
|
|
103
|
+
- **Behavioral observation**: what happened step by step (recorded as text or GIF)
|
|
104
|
+
- **Log excerpt**: server-side log entries during the test action
|
|
105
|
+
|
|
106
|
+
A test without evidence is not a test — it's an opinion.
|
|
107
|
+
|
|
108
|
+
### Failure State Injection
|
|
109
|
+
|
|
110
|
+
(VISTA, 2026: UI-only 테스트 대비 실패 상태 주입 시 고유 실패 42% 추가 발견)
|
|
111
|
+
|
|
112
|
+
유저 행동만 시뮬레이션하는 것은 절반의 테스트다. **시스템 측 실패 상태를 주입**해야 한다:
|
|
113
|
+
|
|
114
|
+
| 주입 유형 | 방법 | 목적 |
|
|
115
|
+
|----------|------|------|
|
|
116
|
+
| Network failure | 브라우저 DevTools throttle / 서버 중단 | 네트워크 끊김 시 UI 반응 |
|
|
117
|
+
| Slow response | 인위적 지연 주입 | 타임아웃 처리, 로딩 상태 |
|
|
118
|
+
| Resource deletion | DB/파일에서 직접 삭제 후 UI 접근 | 404/orphan 처리 |
|
|
119
|
+
| Session expiry | 쿠키/토큰 삭제 후 액션 시도 | 인증 만료 처리 |
|
|
120
|
+
| Concurrent mutation | 다른 세션에서 데이터 변경 후 원래 세션에서 저장 | 충돌 처리 |
|
|
121
|
+
| Server error | 서버 프로세스 임시 중단 | 500 에러 시 UI 반응 |
|
|
122
|
+
|
|
123
|
+
모든 주입 유형이 모든 기능에 적용되지는 않는다. REVIEW 모드에서 해당 기능에 적용 가능한 주입 유형을 선택하고, TEST 모드에서 실제 주입한다.
|
|
124
|
+
|
|
125
|
+
---
|
|
126
|
+
|
|
127
|
+
## Before You Begin
|
|
128
|
+
|
|
129
|
+
### 1. Read all context
|
|
130
|
+
|
|
131
|
+
```bash
|
|
132
|
+
cat docs/PROJECT.md 2>/dev/null
|
|
133
|
+
cat docs/TECHNICAL.md 2>/dev/null
|
|
134
|
+
cat docs/QA.md 2>/dev/null
|
|
135
|
+
ls docs/features/*.md 2>/dev/null
|
|
136
|
+
```
|
|
137
|
+
|
|
138
|
+
**If `docs/QA.md` exists:** Read it. It contains the behavioral axes, accumulated scenarios, and environment setup from previous runs. This is the primary input.
|
|
139
|
+
|
|
140
|
+
**If it doesn't exist:** This is the first QA run. Enter SETUP mode.
|
|
141
|
+
|
|
142
|
+
### 2. Route based on state
|
|
143
|
+
|
|
144
|
+
**No `docs/QA.md` → SETUP mode first**
|
|
145
|
+
→ After SETUP, continue to REVIEW or TEST if a feature was specified.
|
|
146
|
+
|
|
147
|
+
**`docs/QA.md` exists, environment NOT verified → SETUP mode (re-verify)**
|
|
148
|
+
|
|
149
|
+
**`docs/QA.md` exists, environment verified → REVIEW or TEST**
|
|
150
|
+
→ Identify the target feature.
|
|
151
|
+
|
|
152
|
+
### 3. Identify target feature (for REVIEW/TEST)
|
|
153
|
+
|
|
154
|
+
**Auto-detect:** Find the most recently modified feature spec:
|
|
155
|
+
|
|
156
|
+
```bash
|
|
157
|
+
ls -t docs/features/*.md 2>/dev/null | head -5
|
|
158
|
+
```
|
|
159
|
+
|
|
160
|
+
Propose the most recent one. Read it.
|
|
161
|
+
|
|
162
|
+
**Feature has no test cases in QA.md → REVIEW mode**
|
|
163
|
+
**Feature has test cases with `pending` status → TEST mode**
|
|
164
|
+
**Feature has test cases with results → RE-TEST mode** (after fixes)
|
|
165
|
+
|
|
166
|
+
---
|
|
167
|
+
|
|
168
|
+
## SETUP Mode — Build the QA Framework
|
|
169
|
+
|
|
170
|
+
Run once after `/project` and `/technical` are done. Re-run when infrastructure changes.
|
|
171
|
+
|
|
172
|
+
### Step 1: Discover and verify environment
|
|
173
|
+
|
|
174
|
+
Scan the codebase:
|
|
175
|
+
|
|
176
|
+
```bash
|
|
177
|
+
cat package.json Makefile Dockerfile docker-compose.yml 2>/dev/null | head -80
|
|
178
|
+
cat docs/TECHNICAL.md 2>/dev/null
|
|
179
|
+
ls scripts/ 2>/dev/null
|
|
180
|
+
```
|
|
181
|
+
|
|
182
|
+
Identify start/stop/health/seed/reset commands. **Ask the user if unclear.**
|
|
183
|
+
|
|
184
|
+
**Actually run the commands and verify they work.** Record what succeeds and what fails.
|
|
185
|
+
|
|
186
|
+
### Step 2: Verify access methods and tools
|
|
187
|
+
|
|
188
|
+
Determine how QA will interact with the product and **verify each method works**:
|
|
189
|
+
|
|
190
|
+
| Entry Point | Method | Address | Tool | Verified |
|
|
191
|
+
|-------------|--------|---------|------|----------|
|
|
192
|
+
| Web UI | Browser | {{URL}} | claude-in-chrome | ✅/❌ |
|
|
193
|
+
| CLI | Terminal | {{command}} | Bash | ✅/❌ |
|
|
194
|
+
| API | HTTP | {{URL}} | Bash (curl) | ✅/❌ |
|
|
195
|
+
|
|
196
|
+
For browser-based testing, verify: navigate, read content, click elements, capture screenshots, read console logs.
|
|
197
|
+
|
|
198
|
+
### Step 3: Define behavioral axes for this project
|
|
199
|
+
|
|
200
|
+
Read PROJECT.md Personas. Map each persona's behavioral traits to the 4 axes:
|
|
201
|
+
|
|
202
|
+
```
|
|
203
|
+
📋 **Behavioral axis mapping — {{persona_name}}:**
|
|
204
|
+
|
|
205
|
+
| Axis | Primary Value | Secondary Value | Rationale |
|
|
206
|
+
|------|-------------|----------------|-----------|
|
|
207
|
+
| Mindset | {{Sequential/Divergent}} | {{other}} | {{why — based on persona description}} |
|
|
208
|
+
| Strategy | {{Click/Input/Core}} | {{other}} | {{why}} |
|
|
209
|
+
| Habit | {{Short/Long/Invalid}} | {{other}} | {{why}} |
|
|
210
|
+
| Cooperation | {{Cooperative/Impatient/...}} | {{other}} | {{why}} |
|
|
211
|
+
```
|
|
212
|
+
|
|
213
|
+
Generate **test profiles** — specific axis combinations ranked by risk:
|
|
214
|
+
|
|
215
|
+
```
|
|
216
|
+
📋 **Test profiles (risk-ordered):**
|
|
217
|
+
|
|
218
|
+
| # | Axes | Risk Level | Rationale |
|
|
219
|
+
|---|------|-----------|-----------|
|
|
220
|
+
| P1 | Seq + Core + Short + Cooperative | Low (baseline) | Happy path — must work |
|
|
221
|
+
| P2 | Div + Input + Invalid + Impatient | Critical | Most destructive combination |
|
|
222
|
+
| P3 | ... | ... | ... |
|
|
223
|
+
```
|
|
224
|
+
|
|
225
|
+
Minimum 5 profiles. Maximum 12. Prioritize by risk — the most destructive combinations first.
|
|
226
|
+
|
|
227
|
+
### Step 4: Generate turn-level test scenarios
|
|
228
|
+
|
|
229
|
+
For each high-risk profile, generate **turn-level behavior instructions** — NOT character descriptions:
|
|
230
|
+
|
|
231
|
+
```
|
|
232
|
+
📋 **Profile P2 scenarios (Divergent + Input + Invalid + Impatient):**
|
|
233
|
+
|
|
234
|
+
Turn-level instructions:
|
|
235
|
+
1. "3초 안에 반응 없으면 새로고침하라"
|
|
236
|
+
2. "숫자 필드에 한글을 입력하라"
|
|
237
|
+
3. "마지막 필드부터 채우고 첫 필드는 비워라"
|
|
238
|
+
4. "제출 버튼을 3번 연속 클릭하라"
|
|
239
|
+
5. "오류 메시지를 읽지 말고 같은 액션을 반복하라"
|
|
240
|
+
|
|
241
|
+
Applicable scenarios:
|
|
242
|
+
- 로그인 폼에서 → 이메일에 URL 입력, 비밀번호 1자, 제출 3번 클릭
|
|
243
|
+
- 검색 기능에서 → 특수문자 10000자 입력, 결과 로딩 중 새 검색 시작
|
|
244
|
+
- 설정 변경에서 → 저장 중 다른 설정 탭으로 이동
|
|
245
|
+
```
|
|
246
|
+
|
|
247
|
+
Generate at minimum 20 turn-level instructions across all profiles. These grow with each QA run.
|
|
248
|
+
|
|
249
|
+
### Step 5: Generate `docs/QA.md`
|
|
250
|
+
|
|
251
|
+
Write the initial QA document:
|
|
252
|
+
|
|
253
|
+
```markdown
|
|
254
|
+
---
|
|
255
|
+
status: active
|
|
256
|
+
generatedBy: know-thy-build-qa
|
|
257
|
+
date: {{date}}
|
|
258
|
+
---
|
|
259
|
+
|
|
260
|
+
# QA
|
|
261
|
+
|
|
262
|
+
<!-- Single source of truth for testing this project.
|
|
263
|
+
A feature is complete ONLY when its test cases here are all ✅. -->
|
|
264
|
+
|
|
265
|
+
## Test Environment
|
|
266
|
+
|
|
267
|
+
### Service
|
|
268
|
+
|
|
269
|
+
| | Command | Verified |
|
|
270
|
+
|---|---------|----------|
|
|
271
|
+
| **Start** | `{{start_command}}` | ✅ {{date}} |
|
|
272
|
+
| **Stop** | `{{stop_command}}` | ✅ {{date}} |
|
|
273
|
+
| **Health check** | `{{health_check}}` | ✅ {{date}} |
|
|
274
|
+
| **Seed data** | `{{seed_command}}` | {{✅ date or N/A}} |
|
|
275
|
+
| **Reset** | `{{reset_command}}` | {{✅ date or N/A}} |
|
|
276
|
+
|
|
277
|
+
### Access Points
|
|
278
|
+
|
|
279
|
+
| Entry | Method | Address | Tool | Verified |
|
|
280
|
+
|-------|--------|---------|------|----------|
|
|
281
|
+
| {{entry}} | {{method}} | {{address}} | {{tool}} | ✅ {{date}} |
|
|
282
|
+
|
|
283
|
+
## Behavioral Testing Axes
|
|
284
|
+
|
|
285
|
+
### Persona: {{persona_name}} — {{role}}
|
|
286
|
+
|
|
287
|
+
| Axis | Primary | Secondary |
|
|
288
|
+
|------|---------|-----------|
|
|
289
|
+
| Mindset | {{value}} | {{value}} |
|
|
290
|
+
| Strategy | {{value}} | {{value}} |
|
|
291
|
+
| Habit | {{value}} | {{value}} |
|
|
292
|
+
| Cooperation | {{value}} | {{value}} |
|
|
293
|
+
|
|
294
|
+
### Test Profiles (risk-ordered)
|
|
295
|
+
|
|
296
|
+
| # | Axes | Risk | Description |
|
|
297
|
+
|---|------|------|-------------|
|
|
298
|
+
| P1 | Seq + Core + Short + Coop | Baseline | Happy path |
|
|
299
|
+
| P2 | Div + Input + Invalid + Impatient | Critical | Most destructive |
|
|
300
|
+
| ... | ... | ... | ... |
|
|
301
|
+
|
|
302
|
+
### Turn-Level Scenarios (living list)
|
|
303
|
+
|
|
304
|
+
<!-- Concrete behavior instructions, NOT character descriptions.
|
|
305
|
+
Each instruction tells the agent EXACTLY what to do at each turn. -->
|
|
306
|
+
|
|
307
|
+
**Profile P1 (baseline):**
|
|
308
|
+
- {{turn instruction}} — added: {{date}}
|
|
309
|
+
|
|
310
|
+
**Profile P2 (critical):**
|
|
311
|
+
- {{turn instruction}} — added: {{date}}
|
|
312
|
+
- {{turn instruction}} — added: {{date}}
|
|
313
|
+
|
|
314
|
+
### Failure State Injection Methods
|
|
315
|
+
|
|
316
|
+
| Type | Method | Applicable When |
|
|
317
|
+
|------|--------|----------------|
|
|
318
|
+
| Network failure | {{how to simulate}} | {{which features}} |
|
|
319
|
+
| Resource deletion | {{how to simulate}} | {{which features}} |
|
|
320
|
+
| Session expiry | {{how to simulate}} | {{which features}} |
|
|
321
|
+
|
|
322
|
+
### Discovered Patterns
|
|
323
|
+
|
|
324
|
+
<!-- New behavioral patterns found during QA. Grows with every run. -->
|
|
325
|
+
|
|
326
|
+
## QA Quality Metrics
|
|
327
|
+
|
|
328
|
+
<!-- Self-measurement to prevent "easy mode". Updated after each TEST run. -->
|
|
329
|
+
|
|
330
|
+
| Metric | Current | Target |
|
|
331
|
+
|--------|---------|--------|
|
|
332
|
+
| Unique failures found (total) | 0 | — |
|
|
333
|
+
| Scenario diversity (profiles used) | {{N}}/{{total}} | 100% |
|
|
334
|
+
| Turn instructions executed | 0 | — |
|
|
335
|
+
| Failure injections performed | 0 | — |
|
|
336
|
+
|
|
337
|
+
---
|
|
338
|
+
|
|
339
|
+
<!-- Feature test cases are appended below. -->
|
|
340
|
+
```
|
|
341
|
+
|
|
342
|
+
**SETUP is complete when:**
|
|
343
|
+
- [ ] Start command works — application runs
|
|
344
|
+
- [ ] Health check confirms the application is responsive
|
|
345
|
+
- [ ] At least one access method verified
|
|
346
|
+
- [ ] Behavioral axes mapped to project persona
|
|
347
|
+
- [ ] At least 5 test profiles defined (risk-ordered)
|
|
348
|
+
- [ ] At least 20 turn-level scenarios generated
|
|
349
|
+
- [ ] Failure state injection methods identified
|
|
350
|
+
- [ ] `docs/QA.md` is written
|
|
351
|
+
|
|
352
|
+
---
|
|
353
|
+
|
|
354
|
+
## REVIEW Mode — Define What "Done" Looks Like
|
|
355
|
+
|
|
356
|
+
For each feature, define concrete, executable test cases in `docs/QA.md`. These test cases ARE the definition of "done."
|
|
357
|
+
|
|
358
|
+
**Prerequisites:** `docs/QA.md` exists (SETUP done). Feature spec exists.
|
|
359
|
+
|
|
360
|
+
### Step 1: Testability Audit
|
|
361
|
+
|
|
362
|
+
Read every acceptance criterion. For each:
|
|
363
|
+
|
|
364
|
+
| AC | Testable? | Issue |
|
|
365
|
+
|----|-----------|-------|
|
|
366
|
+
| {{criterion}} | ✅ / ⚠️ / ❌ | {{why not}} |
|
|
367
|
+
|
|
368
|
+
- ✅ Specific trigger + specific result + verifiable
|
|
369
|
+
- ⚠️ Vague → propose rewrite: "Should be fast" → "Renders within 2s on 3G"
|
|
370
|
+
- ❌ Untestable → propose rewrite: "Works correctly" → {{concrete criterion}}
|
|
371
|
+
|
|
372
|
+
### Step 2: Define Access Path
|
|
373
|
+
|
|
374
|
+
Determine the exact path to reach this feature. **Verify it works.**
|
|
375
|
+
|
|
376
|
+
### Step 3: Select Test Profiles
|
|
377
|
+
|
|
378
|
+
From QA.md's test profiles, select which ones apply to this feature:
|
|
379
|
+
|
|
380
|
+
```
|
|
381
|
+
📋 **Profile selection — Feature {{id}}:**
|
|
382
|
+
|
|
383
|
+
| Profile | Applicable? | Reason |
|
|
384
|
+
|---------|-------------|--------|
|
|
385
|
+
| P1 (baseline) | ✅ Always | Happy path |
|
|
386
|
+
| P2 (destructive) | ✅ | This feature has input fields |
|
|
387
|
+
| P3 | ❌ | No file upload in this feature |
|
|
388
|
+
| P4 | ✅ | Multi-step flow, distraction relevant |
|
|
389
|
+
```
|
|
390
|
+
|
|
391
|
+
### Step 4: Write Test Cases
|
|
392
|
+
|
|
393
|
+
For each selected profile, generate test cases using its **turn-level instructions**:
|
|
394
|
+
|
|
395
|
+
```markdown
|
|
396
|
+
## Feature {{id}}: {{title}}
|
|
397
|
+
|
|
398
|
+
**Access:** {{exact path}}
|
|
399
|
+
**Preconditions:** {{what must be true}}
|
|
400
|
+
**Access verified:** ✅ {{date}} / ❌ {{blocker}}
|
|
401
|
+
|
|
402
|
+
### Test Cases
|
|
403
|
+
|
|
404
|
+
| # | Profile | Scenario | Steps | Expected | Evidence | Status |
|
|
405
|
+
|---|---------|----------|-------|----------|----------|--------|
|
|
406
|
+
| 1 | P1 | Happy path: {{name}} | 1. {{exact step}} 2. ... | {{observable result}} | Screenshot | pending |
|
|
407
|
+
| 2 | P2 | {{turn instruction applied}} | 1. {{exact step}} 2. ... | {{expected behavior}} | Screenshot + console | pending |
|
|
408
|
+
| 3 | P2 | {{another turn instruction}} | 1. ... | {{expected}} | {{method}} | pending |
|
|
409
|
+
| 4 | — | Injection: {{failure type}} | 1. {{inject step}} 2. {{user action}} | {{graceful handling}} | Screenshot + log | pending |
|
|
410
|
+
```
|
|
411
|
+
|
|
412
|
+
**Test case quality rules:**
|
|
413
|
+
- **Steps** must be executable by someone who has never seen the product. "Click the button" is bad. "Click the blue 'Create Project' button in the top-right nav bar" is good.
|
|
414
|
+
- **Expected** must be observable. "Data is saved" is bad. "Green toast 'Project created' appears, /projects page shows new item at top" is good.
|
|
415
|
+
- **Profile** column traces which behavioral axis combination generated this case.
|
|
416
|
+
- **Injection test cases** must specify exactly how to inject the failure state.
|
|
417
|
+
|
|
418
|
+
### Step 5: Update QA.md
|
|
419
|
+
|
|
420
|
+
1. Append the feature section to `docs/QA.md`
|
|
421
|
+
2. Add any new turn-level scenarios to the Turn-Level Scenarios section
|
|
422
|
+
3. Update feature spec frontmatter:
|
|
423
|
+
```yaml
|
|
424
|
+
qaTestCases: {{count}}
|
|
425
|
+
qaReviewDate: {{date}}
|
|
426
|
+
```
|
|
427
|
+
|
|
428
|
+
**REVIEW is complete when:**
|
|
429
|
+
- [ ] Every AC has at least one test case
|
|
430
|
+
- [ ] At least 3 profiles are represented in test cases
|
|
431
|
+
- [ ] At least 2 failure state injection test cases
|
|
432
|
+
- [ ] Access path verified
|
|
433
|
+
- [ ] Test cases are concrete enough that anyone could execute them
|
|
434
|
+
- [ ] Feature section appended to `docs/QA.md`
|
|
435
|
+
|
|
436
|
+
---
|
|
437
|
+
|
|
438
|
+
## TEST Mode — Run It and Prove It
|
|
439
|
+
|
|
440
|
+
Execute the test cases defined in `docs/QA.md`.
|
|
441
|
+
|
|
442
|
+
**Prerequisites:** `docs/QA.md` exists. Feature has test cases (REVIEW done).
|
|
443
|
+
|
|
444
|
+
### Phase 1: Environment Setup
|
|
445
|
+
|
|
446
|
+
Read environment commands from QA.md. Start the application. Health check. Seed if needed.
|
|
447
|
+
|
|
448
|
+
If environment fails, stop and report.
|
|
449
|
+
|
|
450
|
+
### Phase 2: Verify Feature Access
|
|
451
|
+
|
|
452
|
+
Navigate to the feature using the access path in QA.md. If blocked, stop and report.
|
|
453
|
+
|
|
454
|
+
### Phase 3: Execute Test Cases (Profile-Ordered)
|
|
455
|
+
|
|
456
|
+
Execute in this order:
|
|
457
|
+
|
|
458
|
+
1. **P1 (baseline/happy path)** — if these fail, stop. Nothing else matters.
|
|
459
|
+
2. **Error handling cases** — invalid inputs, missing data
|
|
460
|
+
3. **Higher-risk profiles (P2, P3...)** — follow turn-level instructions exactly
|
|
461
|
+
4. **Failure state injection** — actually inject failures and observe
|
|
462
|
+
|
|
463
|
+
**For each test case:**
|
|
464
|
+
|
|
465
|
+
1. Set up precondition
|
|
466
|
+
2. Execute each step exactly as written
|
|
467
|
+
3. If the test case has a profile, **follow the profile's turn-level instructions** — don't improvise, don't be "kinder" than the instruction says
|
|
468
|
+
4. Capture evidence at every assertion point
|
|
469
|
+
5. Record: ✅ PASS / ❌ FAIL / ⚠️ PARTIAL
|
|
470
|
+
|
|
471
|
+
**For failure state injection test cases:**
|
|
472
|
+
|
|
473
|
+
1. Start the normal flow (reach the target state)
|
|
474
|
+
2. **Inject the failure** (kill network, delete resource, expire session, etc.)
|
|
475
|
+
3. Observe how the UI/system responds
|
|
476
|
+
4. Capture evidence: screenshot + console + server log
|
|
477
|
+
5. Verify graceful handling (not crash, not silent failure)
|
|
478
|
+
|
|
479
|
+
**If a new edge case is discovered during testing:**
|
|
480
|
+
1. Record it immediately
|
|
481
|
+
2. Add it to the feature's test cases
|
|
482
|
+
3. Add the underlying turn-level instruction to the relevant profile
|
|
483
|
+
|
|
484
|
+
### Phase 4: QA Self-Check
|
|
485
|
+
|
|
486
|
+
Before writing the report, verify QA itself isn't running "easy mode":
|
|
487
|
+
|
|
488
|
+
```
|
|
489
|
+
🔍 **QA self-check:**
|
|
490
|
+
|
|
491
|
+
| Check | Result |
|
|
492
|
+
|-------|--------|
|
|
493
|
+
| Profiles used: {{N}}/{{total selected}} | ✅ all profiles tested / ⚠️ skipped {{which}} |
|
|
494
|
+
| Failure injections performed: {{N}}/{{total planned}} | ✅ / ⚠️ |
|
|
495
|
+
| Unique failures found: {{N}} | — (0 is suspicious for a new feature) |
|
|
496
|
+
| Scenario diversity: did tests cover different paths? | ✅ / ⚠️ same path repeated |
|
|
497
|
+
| Cooperation drift: did tests stay adversarial per profile? | ✅ / ⚠️ became cooperative mid-test |
|
|
498
|
+
```
|
|
499
|
+
|
|
500
|
+
**If 0 unique failures on a new feature with 3+ profiles tested:** Either the implementation is exceptional, or the tests are too easy. Consider: were turn-level instructions followed literally? Were failure injections actually performed?
|
|
501
|
+
|
|
502
|
+
### Phase 5: Update QA.md with Results + Insight Synthesis
|
|
503
|
+
|
|
504
|
+
Update the feature section in `docs/QA.md`:
|
|
505
|
+
|
|
506
|
+
1. Change each test case's Status from `pending` to `✅`/`❌`/`⚠️`
|
|
507
|
+
2. Add Results section with evidence
|
|
508
|
+
3. Add **Insight Synthesis** — not just pass/fail, but patterns:
|
|
509
|
+
|
|
510
|
+
```markdown
|
|
511
|
+
### Results — {{date}}
|
|
512
|
+
|
|
513
|
+
| # | Status | Evidence | Notes |
|
|
514
|
+
|---|--------|----------|-------|
|
|
515
|
+
| 1 | ✅ | Screenshot: ... | ... |
|
|
516
|
+
| 2 | ❌ | Screenshot: ... | Expected: ... |
|
|
517
|
+
|
|
518
|
+
**Summary:** {{N}}/{{total}} passed, {{N}} failed, {{N}} partial
|
|
519
|
+
|
|
520
|
+
### Insight Synthesis
|
|
521
|
+
|
|
522
|
+
<!-- Not just "what failed" but "why and what pattern".
|
|
523
|
+
UXCascade pattern: highlight → connect → actionable. -->
|
|
524
|
+
|
|
525
|
+
**Patterns found:**
|
|
526
|
+
- {{pattern}}: {{which test cases}} share the same root cause → {{actionable fix}}
|
|
527
|
+
- {{pattern}}: Profile P{{N}} consistently triggers {{behavior}} → {{systemic issue}}
|
|
528
|
+
|
|
529
|
+
**Per-profile failure distribution:**
|
|
530
|
+
| Profile | Tests | Pass | Fail | Insight |
|
|
531
|
+
|---------|-------|------|------|---------|
|
|
532
|
+
| P1 (baseline) | {{N}} | {{N}} | {{N}} | {{what this means}} |
|
|
533
|
+
| P2 (destructive) | {{N}} | {{N}} | {{N}} | {{what this means}} |
|
|
534
|
+
|
|
535
|
+
**Failure taxonomy:**
|
|
536
|
+
| Type | Count | Examples |
|
|
537
|
+
|------|-------|---------|
|
|
538
|
+
| Missing validation | {{N}} | Test #{{N}}, #{{N}} |
|
|
539
|
+
| Silent failure (no error shown) | {{N}} | Test #{{N}} |
|
|
540
|
+
| State corruption | {{N}} | Test #{{N}} |
|
|
541
|
+
| UI crash / unresponsive | {{N}} | Test #{{N}} |
|
|
542
|
+
|
|
543
|
+
**Recommendations (priority-ordered):**
|
|
544
|
+
1. {{fix}} — affects {{N}} test cases, severity: {{P0-P3}}
|
|
545
|
+
2. {{fix}} — ...
|
|
546
|
+
|
|
547
|
+
### Issues
|
|
548
|
+
| # | Severity | Description | Reproduction | Evidence |
|
|
549
|
+
|---|----------|-------------|--------------|----------|
|
|
550
|
+
| 1 | {{P0-P3}} | {{what's wrong}} | Test #{{N}}, step {{N}} | {{ref}} |
|
|
551
|
+
|
|
552
|
+
### New Discoveries
|
|
553
|
+
- Turn instruction: "{{new instruction}}" → added to Profile P{{N}}
|
|
554
|
+
- Failure injection: "{{new injection method}}" → added to Injection Methods
|
|
555
|
+
```
|
|
556
|
+
|
|
557
|
+
4. **Update QA Quality Metrics** in the top section of QA.md:
|
|
558
|
+
- Increment unique failures found
|
|
559
|
+
- Update profiles used
|
|
560
|
+
- Update turn instructions executed
|
|
561
|
+
- Update failure injections performed
|
|
562
|
+
|
|
563
|
+
5. Update feature spec frontmatter:
|
|
564
|
+
```yaml
|
|
565
|
+
qaStatus: {{pass|fail|partial}}
|
|
566
|
+
qaDate: {{date}}
|
|
567
|
+
```
|
|
568
|
+
|
|
569
|
+
---
|
|
570
|
+
|
|
571
|
+
## When All Tests Pass
|
|
572
|
+
|
|
573
|
+
**All test cases ✅ = feature confirmed complete.**
|
|
574
|
+
|
|
575
|
+
This is the ONLY definition of "done." Not "code works on my machine." Not "unit tests pass." Not "it looks right." Every test case in QA.md, executed with evidence, marked ✅.
|
|
576
|
+
|
|
577
|
+
---
|
|
578
|
+
|
|
579
|
+
## Limitations & Human Anchor
|
|
580
|
+
|
|
581
|
+
**LLM QA는 인간 테스트를 대체하지 않는다.** (τ-bench, Sim2Real 2026)
|
|
582
|
+
|
|
583
|
+
이 QA 프레임워크는 **실제 사용자 테스트 전에 설계를 다듬기 위한 시뮬레이션 파일럿**이다. 알아야 할 한계:
|
|
584
|
+
|
|
585
|
+
- LLM 시뮬레이터는 진짜 불만, 혼란, 감정적 반응을 표현하지 못한다
|
|
586
|
+
- 자동 평가(pass/fail)가 인간 판단과 상당히 불일치할 수 있다
|
|
587
|
+
- 모델 성능이 높다고 더 충실한 사용자 시뮬레이션이 되는 것은 아니다
|
|
588
|
+
- 행동축 기반 접근이 캐릭터 기반보다 낫지만, 여전히 시뮬레이션이다
|
|
589
|
+
|
|
590
|
+
**Human Anchor**: 가능하다면 실제 사용자 로그 수십 건을 수집하여 참조 분포로 활용하라. 이것이 전체 QA 구조의 앵커가 된다. QA.md의 `Discovered Patterns` 섹션에 실제 사용자에게서 관찰된 행동을 기록하라 — 이것이 시뮬레이션 시나리오보다 항상 우선한다.
|
|
591
|
+
|
|
592
|
+
---
|
|
593
|
+
|
|
594
|
+
## Integration with Development Workflow
|
|
595
|
+
|
|
596
|
+
QA is the **final gate** in the review loop:
|
|
597
|
+
|
|
598
|
+
```
|
|
599
|
+
Implementation → Designer Review + Architect Review (parallel, both must pass)
|
|
600
|
+
↓
|
|
601
|
+
QA Review (runs the product against QA.md test cases)
|
|
602
|
+
↓ (all test cases ✅)
|
|
603
|
+
Complete
|
|
604
|
+
```
|
|
605
|
+
|
|
606
|
+
**QA review in the loop:**
|
|
607
|
+
- If QA fails → specific failure list with reproduction steps → implementer fixes
|
|
608
|
+
- After fix → QA re-tests failed cases + regression check on happy path (P1 profile)
|
|
609
|
+
- Loop until all test cases are ✅
|
|
610
|
+
|
|
611
|
+
**QA during feature definition:**
|
|
612
|
+
- `/know-thy-build:feature` should always be followed by `/know-thy-build:qa` in REVIEW mode
|
|
613
|
+
- The test cases in QA.md become the implementation target
|
|
614
|
+
- Implementers read QA.md to know exactly what "done" means
|
|
615
|
+
|
|
616
|
+
---
|
|
617
|
+
|
|
618
|
+
## Rationalization Prevention
|
|
619
|
+
|
|
620
|
+
### Iron Law
|
|
621
|
+
|
|
622
|
+
**No test passes without evidence. No feature ships without QA. QA.md is the single source of truth.**
|
|
623
|
+
|
|
624
|
+
### Red Flags
|
|
625
|
+
|
|
626
|
+
| Thought | Reality |
|
|
627
|
+
|---------|---------|
|
|
628
|
+
| "The tests pass, so it works" | Unit tests verify code. QA verifies behavior. They test different things. |
|
|
629
|
+
| "This is a simple feature, it doesn't need edge case testing" | Simple features get fewer profiles, not zero profiles. P1 + P2 minimum. |
|
|
630
|
+
| "The happy path works, ship it" | P1 always works. P2 is where bugs live. |
|
|
631
|
+
| "We'll add tests later" | Define test cases in QA.md NOW, during REVIEW mode. |
|
|
632
|
+
| "It works on my machine" | Test with failure state injection. Does it work when the network drops? |
|
|
633
|
+
| "Edge case testing is overkill" | The user who refreshes mid-save doesn't know they're an edge case. |
|
|
634
|
+
| "I can see from the code that it handles this" | Code reading is not testing. Run it. Inject the failure. Capture evidence. |
|
|
635
|
+
| "0 failures means we're done" | 0 failures on a new feature with 3+ profiles is suspicious. Were turn instructions followed literally? |
|
|
636
|
+
| "I tested as the difficult persona" | Which profile? Which turn instructions? "Being difficult" without axes is easy mode. |
|
|
637
|
+
|
|
638
|
+
---
|
|
639
|
+
|
|
640
|
+
## Closing
|
|
641
|
+
|
|
642
|
+
**After SETUP:**
|
|
643
|
+
- `docs/QA.md` created with environment, behavioral axes, test profiles, turn-level scenarios
|
|
644
|
+
- Environment verified — the product can be started and accessed
|
|
645
|
+
- Failure state injection methods identified
|
|
646
|
+
- Ready for REVIEW mode on any feature
|
|
647
|
+
|
|
648
|
+
**After REVIEW:**
|
|
649
|
+
- Feature's test cases defined in `docs/QA.md` with profile attribution
|
|
650
|
+
- Each test case has concrete steps, expected results, evidence method
|
|
651
|
+
- Failure injection test cases included
|
|
652
|
+
- Implementers read QA.md to know exactly what "done" means
|
|
653
|
+
- Ready for implementation → TEST mode after
|
|
654
|
+
|
|
655
|
+
**After TEST:**
|
|
656
|
+
- Test results with evidence recorded in `docs/QA.md`
|
|
657
|
+
- Insight synthesis: patterns, failure taxonomy, recommendations
|
|
658
|
+
- QA quality metrics updated (self-check against easy mode)
|
|
659
|
+
- If all ✅: feature confirmed complete
|
|
660
|
+
- If any ❌: specific failure list with reproduction steps
|
|
661
|
+
- New turn-level scenarios added to the playbook
|
|
662
|
+
- The QA document is now richer for the next feature
|