2.0 KiB
2.0 KiB
Implementation Plan: Architecture Boundary Hardening
Architecture reference: docs/guide_architecture.md
Phase 1: Patch Context Amnesia Leak (Meta-Tooling)
Focus: Stop mma_exec.py from injecting massive full-text dependencies.
- Task 1.1: In
scripts/mma_exec.py, completely remove theUNFETTERED_MODULESconstant and its associatedif dep in UNFETTERED_MODULES:check. Ensure all imported local dependencies strictly usegenerate_skeleton().
Phase 2: Seal the HITL Bypass (Application Core)
Focus: Ensure native MCP mutating tools cannot execute without user approval in the manual_slop application.
- Task 2.1: In
mcp_client.py, define a new constant setMUTATING_TOOLS = {"set_file_slice", "py_update_definition", "py_set_signature", "py_set_var_declaration"}. (Note:write_fileis not currently in the tool list, but add it if it is). - Task 2.2: In
ai_client.py's provider loops (_send_gemini,_send_gemini_cli,_send_anthropic,_send_deepseek), update the tool execution logic. Ifname in mcp_client.MUTATING_TOOLS, it MUST trigger thepre_tool_callback(or a variation of it) to ask for user approval before callingmcp_client.dispatch. - Task 2.3: In
gui_2.py, ensure the UI rendering for the pending tool approval handles the AST mutations gracefully (e.g. showing thenew_contentpayload instead of a PowerShell script).
Phase 3: DAG Engine Cascading Blocks (Application Core)
Focus: Prevent infinite deadlocks when Tier 3 workers fail repeatedly.
- Task 3.1: In
dag_engine.py, add acascade_blocks()method toTrackDAG. This method should iterate through alltodotickets and if any of their dependencies areblocked, mark the ticket itself asblocked. - Task 3.2: In
multi_agent_conductor.py, updateConductorEngine.run(). Before callingself.engine.tick(), callself.track_dag.cascade_blocks()(or equivalent) so that blocked states propagate cleanly, allowing theall_doneor block detection logic to exit the while loop correctly.