Skip to content
Merged
11 changes: 10 additions & 1 deletion orchestrator/routes/pipelines.py
Original file line number Diff line number Diff line change
Expand Up @@ -8662,7 +8662,16 @@ def _build_producer_orientation(
"read the contract (`egg-contract show`) to understand what is "
"being implemented. Check the existing test infrastructure — "
"test frameworks, fixtures, conftest files, and naming conventions. "
"Identify edge cases from the requirements before writing tests."
"Identify edge cases from the requirements before writing tests. "
"**Scaffold-first while the coder is producing**: draft test "
"scaffolding from the plan alone — test file paths from "
"`tasks[].files`, function signatures from each task's acceptance "
"criteria, fixture imports, and mock-input scenarios from the YAML. "
"Leave assertion bodies as TODOs. Do NOT call `wait-loop` for the "
"coder's CONSENSUS_PROPOSE before drafting these scaffolds — the "
"scaffold work does not depend on coder output and recovers "
"downstream-producer time. Your propose-ready iteration should "
"start at the coder's first commit, not their first propose."
+ sync_note
+ reviewer_awareness
)
Expand Down
19 changes: 19 additions & 0 deletions orchestrator/tests/test_pipeline_prompts.py
Original file line number Diff line number Diff line change
Expand Up @@ -3001,6 +3001,25 @@ def test_tester_checks_test_infrastructure(self):
assert "test" in orient.lower()
assert "edge case" in orient.lower()

def test_tester_orientation_directs_scaffold_first(self):
"""Tester producer orientation tells tester to draft scaffolds before
wait-loop on coder.

Issue #2249: the scaffold-first instruction previously lived only in
the reviewer-preparation block; the producer-orientation block (which
is what tester reads while deciding whether to call wait-loop) had no
such directive. Mirror it on the producer side so the comfort path
(`wait-loop`) does not pull tester away from work it could do without
coder output.
"""
orient = _build_producer_orientation("tester", "implement", [])
assert "scaffold" in orient.lower()
assert "wait-loop" in orient.lower()
# The directive must point at plan-derived scaffolding inputs so the
# agent has a concrete starting point, not just a mandate.
assert "tasks[].files" in orient
assert "acceptance criteria" in orient.lower()

def test_documenter_checks_doc_structure(self):
"""Documenter orientation includes checking documentation structure."""
orient = _build_producer_orientation("documenter", "implement", [])
Expand Down
Loading
Loading