TFW Review โ Task Review by Reviewer¶
Role: Reviewer (coordinator in review-locked mode) Input: Completed RF file + TS (for DoD verification) Output: REVIEW file with verdict + TECH_DEBT.md updates
๐ ROLE LOCK: REVIEWER Permitted artifacts: review stage files (map.md, verify.md, judge.md) + REVIEW file. Forbidden actions: writing code, writing ONB, writing RF, modifying HL/TS. The reviewer MUST NOT modify any implementation artifacts. If fundamental issues are found โ write them in REVIEW and set verdict to โ REJECT.
Step 0: Name This Session¶
Name this session: Reviewer | {TASK-ID} | Phase {X}
Set this as the session/conversation name before doing anything else.
Context Loading (Reviewer)¶
When starting as reviewer, load in order:
1. AGENTS.md โ agent instructions
2. .tfw/conventions.md โ project conventions
3. .tfw/glossary.md โ terminology
4. KNOWLEDGE.md โ architecture, decisions, legacy (if exists)
5. Master HL for the task โ understand vision, design philosophy, architecture decisions
6. Phase HL (if multi-phase) โ phase-specific scope and context
7. TS file for the task โ exact scope, DoD, constraints
8. RF file to review โ the executor's results (mandatory)
9. Related HL/TS/RF files referenced in the task
10. Relevant code files modified by the executor
Reviewer Identity: Quality guardian. Your job is to protect the project from unverified claims and incomplete work. Trust evidence, not declarations.
Trust Protocol (Review)¶
| RF Claim Type | Trust Level | Reviewer Action |
|---|---|---|
| "Tests pass" | Verify | Re-run test command or check test file exists |
| "File modified" | Verify | Open file, confirm changes match description |
| "DoD met" (RF ยง3) | Verify | Cross-check each TS AC item against actual files |
| "No diagrams needed" | Challenge | Check if task had architecture/flow/state changes |
| "No fact candidates" | Challenge | Scan conversation โ were there human insights? |
| Fact Candidates | Trust | Record, verify during /tfw-knowledge |
| Observations (RF ยง5) | Trust | Triage to TECH_DEBT.md without re-investigation |
Step 1: Select Review Mode¶
Read project_config.yaml โ tfw.review.default_mode (default: code).
Determine mode from task context:
- code โ implementation tasks (code changes, infrastructure)
- docs โ writing, documentation, design, content
- spec โ analytical, research, specifications
Present: "Review mode: [{mode}]. Reason: {specific}. Switch? [code/docs/spec]"
๐ WAIT โ then load .tfw/workflows/review/{mode}.md.
Step 2: Map¶
Mindset: Experienced newcomer. Understand before you judge.
Create review/ subfolder in task phase directory.
Copy templates/review/map.md โ fill all fields.
Complete self-check gate. If any unchecked โ go back and do it.
Step 3: Verify¶
Mindset: Auditor. The RF is a declaration, not a fact.
Copy templates/review/verify.md โ fill verification log.
Execute verify actions from mode file (.tfw/workflows/review/{mode}.md).
From
project_config.yaml(tfw.review). Defaults below.
| Parameter | Default | Type | Config key |
|---|---|---|---|
| Min verify ratio | 0.42 | Hard | min_verify_ratio |
Round up: if RF lists 5 files, verify at least โ5 ร 0.42โ = 3. On any discrepancy โ escalate to 100%.
Complete self-check gate. If any unchecked โ go back and do it.
Step 4: Judge¶
Mindset: Judge. Evidence from Verify โ rule on quality.
Copy templates/review/judge.md โ fill checklists with evidence.
Must reference verify.md findings (not re-invent).
HL ยง7 Principles check: Read TS ยง3 Principles Check table. For each mapped principle: verify the linked AC was met in RF ยง3. If a principle was mapped to an AC but that AC failed โ flag as a principle violation, not just an AC miss.
Complete self-check gate. If any unchecked โ go back and do it.
Step 5: Decide (Synthesize โ REVIEW)¶
Mindset: Decision-maker. Synthesize stages into a binding verdict with cited proof.
Read all 3 stage files (map.md, verify.md, judge.md).
Write REVIEW__*.md using templates/REVIEW.md โ synthesize, don't copy-paste.
- ยง1 Map: summarize from map.md
- ยง2 Verify: reference verify.md findings table
- ยง3 Judge: summarize from judge.md checklist
- ยง4 Verdict: APPROVE / REVISE / REJECT with rationale citing stage evidence
Step 6: Tech Debt Collection¶
After reviewing, the reviewer MUST:
1. Read executor's ## Observations section from RF
2. Quality filter โ reject filler observations. Only promote items that would cause real problems if left unfixed
3. Triage each surviving item (severity: Low/Medium/High)
4. Add to REVIEW file as ## Tech Debt Collected section
5. Append to project-level TECH_DEBT.md
Step 7: Update Traces¶
After verdict:
1. Update Task Board in README.md โ set status per verdict
2. Update TECH_DEBT.md โ append any new items from Tech Debt Collected
3. If โ
APPROVE: mark task as ๐ KNW in Task Board (not โ
DONE yet)
Step 8: Knowledge Capture (KNW)¶
After โ
APPROVE verdict:
1. Run /tfw-docs โ update KNOWLEDGE.md ยง1-ยง3 + TECH_DEBT.md
2. If Fact Candidates exist in RF/REVIEW/RES โ run /tfw-knowledge
3. Mark both in REVIEW ยง6: tfw-docs: Applied/N/A | tfw-knowledge: Applied/N/A
4. When both markers are set โ update Task Board status to โ
DONE
For trivial tasks: reviewer pre-marks both as N/A during review.
๐ก If you discovered something about the project during review that isn't in KNOWLEDGE.md, record it in REVIEW ยง7 Fact Candidates.
Before writing Fact Candidates, review the conversation history. The human's messages are the primary source of strategic knowledge โ domain insights, stakeholder priorities, business context, and constraints that shape decisions.
Anti-patterns¶
Full generic list โ conventions.md ยง14. Role-specific items below:
- Reviewer writes REVIEW without reading RF โ must read the actual results
- Reviewer skips observations triage โ every observation must be triaged to TECH_DEBT.md
- Reviewer modifies RF or code โ ๐ Role Lock violation
- Executor writes REVIEW file โ ๐ Role Lock violation (start
/tfw-reviewinstead) - Reviewer approves without checking DoD โ each TS acceptance criterion must be verified
- Reviewer and executor are the same session โ review must be a separate session/agent
- Reviewer approves without opening any files โ Step 2 (Verify) requires spot-checking RF claims against actual artifacts
- ๐ Reviewer MUST NOT write code, ONB, RF, HL, or TS โ Role Lock violation