-
Design for FR-2/FR-3/FR-4: extending self-planning to Coder/Validator, per-node subagent/skill/tools binding, and node-level precise loop_back replacing org_level_loop.py's coarse fast_lane/full_replan routing. Three findings during design research that revise the requirements doc's original FR-2 assumption ("just swap the call site"): - _GENERIC_PROMPT_TEMPLATE never solicits judgment/on_fail today -- Coder/ Validator switching to plan_work_graph() as-is would produce graphs with no judgment/loop-back capability at all. - run_graph()'s subagent_type/skill_ref are run-level constants passed to every node identically, not node-level despite work_node_execution already having columns for it -- needs a real (bounded) engine extension. - Today's on_fail.action="loop_back" target is statically declared at planning time via a single on_failure edge; it cannot express "a terminal validator dynamically diagnoses which of several ancestor nodes is the true root cause." New on_fail.action="dynamic_loop_back" designed for this, reusing root_cause_trace.py's jury/majority-vote structure with the vote target changed from a category to a node_id. Also incorporates three requirements-doc §7 decisions that were made (apparently concurrently) while this was being designed and overrule two of this doc's initial drafts: work_graph_run.org_node is removed entirely (not kept/sunk to node level) with concrete work_graph_run_query.py/ work_graph_fork.py rework; Coder/Validator get a suggested node-type catalog (not fully free-form); the append interface is a parameter on the existing plan_work_graph() (not a new function). Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>