"""v2-director-drives: Director is the brain, Thinker is the executor. Director (smart model) receives Input, decides what to do, produces a plan. Thinker (fast model) executes the plan's tool_sequence without autonomous reasoning. Interpreter (fast model) summarizes tool results factually. No S3* audits needed — Director controls everything. Flow: Input -> Director -> Thinker -> [Output, UI] -> Memorizer -> Director.update() (Interpreter is called by Thinker when tool results need summarization) """ NAME = "v2-director-drives" DESCRIPTION = "Director is the brain, Thinker executes, Interpreter reads results" NODES = { "input": "input_v1", # Same structured classifier "director": "director_v2", # NEW: always-on brain, produces DirectorPlan "thinker": "thinker_v2", # NEW: pure executor, follows DirectorPlan "interpreter": "interpreter_v1", # NEW: factual result summarizer "output": "output_v1", # Same text renderer "ui": "ui", # Same dashboard renderer "memorizer": "memorizer_v1", # Same long-term memory "sensor": "sensor", # Same state monitor } EDGES = [ # Data edges — Director drives the pipeline {"from": "input", "to": "director", "type": "data", "carries": "Command"}, {"from": "input", "to": "output", "type": "data", "carries": "Command", "condition": "reflex"}, {"from": "director", "to": "thinker", "type": "data", "carries": "DirectorPlan"}, {"from": "thinker", "to": ["output", "ui"], "type": "data", "carries": "ThoughtResult", "parallel": True}, {"from": "thinker", "to": "interpreter", "type": "data", "carries": "tool_output", "condition": "has_tool_output"}, {"from": "interpreter", "to": "output", "type": "data", "carries": "InterpretedResult", "condition": "has_tool_output"}, {"from": "output", "to": "memorizer", "type": "data", "carries": "history"}, # Context edges {"from": "memorizer", "to": "director", "type": "context", "method": "get_context_block"}, {"from": "memorizer", "to": "input", "type": "context", "method": "get_context_block"}, {"from": "memorizer", "to": "output", "type": "context", "method": "get_context_block"}, {"from": "director", "to": "output", "type": "context", "method": "get_context_line"}, {"from": "sensor", "to": "director", "type": "context", "method": "get_context_lines"}, {"from": "ui", "to": "director", "type": "context", "method": "get_machine_summary"}, # State edges {"from": "sensor", "to": "runtime", "type": "state", "reads": "flags"}, {"from": "ui", "to": "runtime", "type": "state", "reads": "current_controls"}, ] CONDITIONS = { "reflex": "intent==social AND complexity==trivial", "has_tool_output": "thinker.tool_used is not empty", } # No audits — Director controls tool usage, no need for S3* corrections AUDIT = {}