@@ -291,11 +291,14 @@ INPUT FILES:
291291YOUR TASK:
292292Review all code changes. If this is a re-review, verify previous issues were fixed.
293293
294- OUTPUT FILES:
294+ OUTPUT FILES (write full details here) :
295295- $REVIEW_ITER/internal-review.md - Detailed review with categorized issues (CRITICAL, IMPORTANT, MINOR)
296- - $REVIEW_ITER/internal-summary.txt - Format: "STATUS: APPROVED" or "STATUS: CHANGES_NEEDED\nCRITICAL_COUNT: N\nIMPORTANT_COUNT: N"
297296
298- Return ONLY a one-line status.
297+ RETURN MESSAGE (keep this brief - max 3 lines):
298+ Return ONLY this format:
299+ STATUS: [APPROVED or CHANGES_NEEDED]
300+ CRITICAL: N | IMPORTANT: N | MINOR: N
301+ Full review: $REVIEW_ITER/internal-review.md
299302```
300303
301304** For external models** (run in parallel):
@@ -326,18 +329,16 @@ YOUR TASK (PROXY MODE):
3263294. Receive the response from the external model
3273305. Format and write the review to the output file
328331
329- OUTPUT FILES (you MUST write ):
332+ OUTPUT FILES (write full details here ):
330333- $REVIEW_ITER/{MODEL_ID}-review.md - Complete review with:
331334 * Categorized issues (CRITICAL, IMPORTANT, MINOR)
332335 * Specific file locations and line numbers
333- * At the END, include this summary section:
334- ---
335- STATUS: APPROVED or CHANGES_NEEDED
336- CRITICAL_COUNT: N
337- IMPORTANT_COUNT: N
338- MINOR_COUNT: N
339-
340- Return ONLY: "Review by {MODEL_NAME} complete: {STATUS}"
336+
337+ RETURN MESSAGE (keep this brief - max 3 lines):
338+ Return ONLY this format:
339+ {MODEL_NAME} STATUS: [APPROVED or CHANGES_NEEDED]
340+ CRITICAL: N | IMPORTANT: N | MINOR: N
341+ Full review: $REVIEW_ITER/{MODEL_ID}-review.md
341342```
342343
343344** CRITICAL - Agent Selection and Execution** :
@@ -348,12 +349,26 @@ Return ONLY: "Review by {MODEL_NAME} complete: {STATUS}"
348349- External reviewers receive "PROXY MODE" instruction with model ID/name
349350- All agents (internal and external) return file paths and brief status only
350351
351- ### Step 3.4: Collect Review Status
352- Read ONLY the summary/status from each review file (last few lines):
353- - Extract STATUS and issue counts
352+ ### Step 3.4: Collect Review Status (NO FILE READS)
353+
354+ ** CRITICAL** : Do NOT read any review files. All agents returned brief summaries in their final messages.
355+
356+ Parse the agent return messages you already received:
357+ - Extract STATUS and issue counts from each agent's return message
354358- Count approvals vs changes needed
355359
356- Display to user: "Reviews complete: {N} approved, {M} need changes"
360+ Display to user:
361+ ```
362+ Code Review Complete
363+ --------------------
364+ {N} reviewers: {M} approved, {K} need changes
365+
366+ [List each reviewer with their status from return messages]
367+
368+ Full reviews: $REVIEW_ITER/
369+ ```
370+
371+ ** DO NOT USE Read TOOL FOR REVIEW FILES** - you already have all status info from agent return messages.
357372
358373### Step 3.5: Consolidate Feedback (if changes needed)
359374If ANY review needs changes, invoke code-reviewer:
@@ -371,15 +386,18 @@ YOUR TASK:
3713863. Identify conflicts between reviewers
3723874. Prioritize issues by severity and frequency
373388
374- OUTPUT FILES:
389+ OUTPUT FILES (write full details here) :
375390- $REVIEW_ITER/consolidated.md - Organized consolidated feedback with priority sections
376391- $REVIEW_ITER/action-items.md - Numbered list of specific fixes needed (just the critical/important ones)
377- - $REVIEW_ITER/consolidated-summary.txt - Format: "TOTAL_ISSUES: N\nCRITICAL: N\nIMPORTANT: N"
378392
379- Return ONLY a one-sentence confirmation.
393+ RETURN MESSAGE (keep this brief - max 3 lines):
394+ Return ONLY this format:
395+ Consolidated {N} reviews: CRITICAL: N | IMPORTANT: N | MINOR: N
396+ Action items: $REVIEW_ITER/action-items.md
397+ Full consolidation: $REVIEW_ITER/consolidated.md
380398```
381399
382- Read and display ONLY ` $REVIEW_ITER/ consolidated- summary.txt ` .
400+ ** DO NOT READ consolidated files ** - the agent already returned the summary in its message .
383401
384402## Phase 4: Fix Loop
385403
@@ -401,14 +419,16 @@ INPUT FILES:
401419YOUR TASK:
402420Fix all CRITICAL and IMPORTANT issues. Do NOT break existing functionality.
403421
404- OUTPUT FILES:
422+ OUTPUT FILES (write full details here) :
405423- $REVIEW_ITER/fixes-applied.md - List what you fixed
406- - $REVIEW_ITER/fix-status.txt - Single line: "ALL_FIXED" or "PARTIAL: {reason}"
407424
408- Return ONLY a brief one-line status.
425+ RETURN MESSAGE (keep this brief - max 2 lines):
426+ Return ONLY this format:
427+ Fixed {N} issues: [ALL_FIXED or PARTIAL: reason]
428+ Details: $REVIEW_ITER/fixes-applied.md
409429```
410430
411- Read ONLY ` $REVIEW_ITER/fix-status.txt ` .
431+ ** DO NOT READ fixes-applied.md ** - the agent already returned the status in its message .
412432
413433### Step 4.3: Increment and Re-review
414434Increment review iteration counter in session state.
@@ -442,15 +462,18 @@ YOUR TASK:
4424622. Implement tests
4434633. Run tests and capture results
444464
445- OUTPUT FILES:
465+ OUTPUT FILES (write full details here) :
446466- $SESSION_DIR/04-testing/test-plan.md - What you're testing and why
447467- $SESSION_DIR/04-testing/test-results.md - Detailed test output
448- - $SESSION_DIR/04-testing/test-summary.txt - Format: "STATUS: PASS" or "STATUS: FAIL\nFAILED_TESTS: N\nTOTAL_TESTS: N"
449468
450- Return ONLY a brief status message.
469+ RETURN MESSAGE (keep this brief - max 3 lines):
470+ Return ONLY this format:
471+ Tests: [PASS or FAIL]
472+ Results: Passed N/M tests
473+ Full details: $SESSION_DIR/04-testing/test-results.md
451474```
452475
453- Read ONLY ` $SESSION_DIR/04-testing/ test- summary.txt ` .
476+ ** DO NOT READ test files ** - the agent already returned the summary in its message .
454477
455478### Step 5.2: Handle Test Failures
456479If tests fail:
@@ -463,13 +486,16 @@ INPUT FILES:
463486- Test results: $SESSION_DIR/04-testing/test-results.md
464487- Test plan: $SESSION_DIR/04-testing/test-plan.md
465488
466- OUTPUT FILES:
489+ OUTPUT FILES (write full details here) :
467490- $SESSION_DIR/04-testing/fixes-iteration-{N}.md
468491
469- Return brief status.
492+ RETURN MESSAGE (keep this brief - max 2 lines):
493+ Return ONLY this format:
494+ Fixed {N} test failures
495+ Details: $SESSION_DIR/04-testing/fixes-iteration-{N}.md
470496```
471497
472- 2 . Re-run golang-tester (update test-results and test-summary )
498+ 2 . Re-run golang-tester (will return updated status in message )
473499
4745003 . If still failing after 3 iterations, also run code-reviewer to check for issues introduced by fixes
475501
@@ -508,16 +534,20 @@ Ask user:
508534
509535## Critical Rules for Orchestrator
510536
511- 1 . ** Never read full content** : Only read summary/status files (* .txt, * -summary.* , * .json)
537+ 1 . ** NEVER read agent output files** : Agents return brief summaries in their final messages. Full details stay in files.
538+ - ❌ DO NOT use Read tool on: review files, test results, implementation notes
539+ - ✅ DO use Read tool for: session state, user input, plan summaries (written by orchestrator)
540+ - ** Exception** : Only read files written by YOU (the orchestrator), never by agents
5125412 . ** Always pass file paths** : Agents read their own inputs from files
513- 3 . ** Brief confirmations only ** : Agents return max 3 sentence confirmations
542+ 3 . ** Brief agent returns ** : All agents MUST return max 3-line summaries in their final message
5145434 . ** Update session state** : After each phase, update session-state.json
5155445 . ** Use TodoWrite** : Create todos for phases, not individual agent steps
5165456 . ** Parallel execution** : Run all reviews in parallel with multiple Task tool calls in a SINGLE message
517546 - Internal review: Task tool → code-reviewer agent (direct mode)
518547 - External reviews: Task tool → code-reviewer agent (PROXY MODE with model ID)
519548 - ** NEVER use Bash tool for reviews** - agents handle their own tools
5205497 . ** Preserve session dir** : Never delete session directory, it's the audit trail
550+ 8 . ** Context efficiency** : Your context window is for coordination, not content. Keep agent outputs in files.
521551
522552## TodoWrite Structure
523553
0 commit comments