This repository has been archived on 2026-08-04. You can view files and clone it, but cannot push or open issues or pull requests.
orchestrator/agent-team/agent_team/nodes
Adam Moussa 694161a52c fix(agent-team): builder returns a real unified diff, not tool narration (#60 output contract)
The #60 max_turns/tools fix stopped the build-node crash but exposed the next
gap: with tools enabled the agentic builder reads files and its final text is
NARRATION (observed live: candidate_diff = 'Let me read the key source files to
get exact signatures bef…'), not a unified diff. That non-diff dispatched to CI,
could not be applied, and the task parked at verify.

- builders.py: default_diff_builder now extracts the unified diff from the
  response via _extract_unified_diff — prefers a fenced ```diff block, else
  slices from the first 'diff --git' header, dropping surrounding prose. A reply
  with NO diff header raises BuildError so narration fails closed (the node fails
  the task with a clear reason) instead of dispatching a bogus diff.
- builders.py: _render_build_prompt now instructs the model that its FINAL
  message must be ONLY the unified diff in a single ```diff fenced block, no
  narration before/after.
- tests: extract from fenced/bare diff with narration; reject narration-only
  (BuildError); default_diff_builder returns the clean diff from a narrated
  response and raises on a prose-only reply.

Full suite 1503 passed; ruff clean.
2026-06-24 14:39:50 -04:00
..
__init__.py Add Plane-2 leaf scaffold (pipeline graph, nodes, HITL, transports, CI) 2026-06-17 15:16:12 -04:00
build_verify_subgraph.py feat(agent-team): P3 Phase-0 box-side build->dispatch->verify (WIP) 2026-06-23 19:52:04 -04:00
builders.py fix(agent-team): builder returns a real unified diff, not tool narration (#60 output contract) 2026-06-24 14:39:50 -04:00
builders_llm.py fix(ws1/ws5): bootstrap orchestrator root in in-process invokers (G1); thread handbook into clarifier (G4) 2026-06-23 15:49:40 -04:00
clarifier.py Add Plane-2 leaf scaffold (pipeline graph, nodes, HITL, transports, CI) 2026-06-17 15:16:12 -04:00
clarifier_llm.py feat(ws5): add memory/handbook injection seams for context-provider pattern 2026-06-23 01:08:34 +00:00
dispatch_invoker.py feat(agent-team): capture dispatched run_id for P3 box-side verify 2026-06-23 19:52:04 -04:00
fixer.py feat(agent-team): Plane-1 fixer — finding→patch→CI draft-PR (dep-bumps, opt-in/inert) (#21) 2026-06-18 16:17:33 -04:00
handbook.py style(ws5): ruff format handbook.py (CI ruff format --check) 2026-06-23 11:37:52 -04:00
planner.py fix(agent-team): make planner convergence cap count correctly (LOGIC-03) 2026-06-24 11:53:12 -04:00
review_loop.py fix(agent-team): review-round cap counts only reviewer verdicts (LOGIC-04) 2026-06-24 11:57:03 -04:00
review_loop_llm.py fix(ws1/ws5): bootstrap orchestrator root in in-process invokers (G1); thread handbook into clarifier (G4) 2026-06-23 15:49:40 -04:00
verifier.py fix(agent-team): remediate C1 security-review BLOCK (2 HIGH + MED/LOW) 2026-06-23 19:52:04 -04:00
verifier_llm.py feat(agent-team): bind planner/review/builder/verifier nodes to their models 2026-06-18 12:56:42 -04:00