# Implementation Plan: Architecture Boundary Hardening Architecture reference: [docs/guide_architecture.md](../../../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 the `UNFETTERED_MODULES` constant and its associated `if dep in UNFETTERED_MODULES:` check. Ensure all imported local dependencies strictly use `generate_skeleton()`. ## Phase 2: Complete MCP Tool Integration & Seal HITL Bypass (Application Core) Focus: Expose all native MCP tools in the config and GUI, and ensure mutating tools trigger user approval. - [ ] Task 2.1: Update `manual_slop.toml` and `project_manager.py`'s `default_project()` to include all new tools (e.g., `set_file_slice`, `py_update_definition`, `py_set_signature`) under `[agent.tools]`. - [ ] Task 2.2: Update `gui_2.py`'s settings/config panels to expose toggles for these new tools. - [ ] Task 2.3: In `mcp_client.py`, define a `MUTATING_TOOLS` constant set. - [ ] Task 2.4: In `ai_client.py`'s provider loops (`_send_gemini`, `_send_gemini_cli`, `_send_anthropic`, `_send_deepseek`), update the tool execution logic: if `name in mcp_client.MUTATING_TOOLS`, it MUST trigger a GUI approval mechanism (like `pre_tool_callback`) before dispatching the tool. ## 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 a `cascade_blocks()` method to `TrackDAG`. This method should iterate through all `todo` tickets and if any of their dependencies are `blocked`, mark the ticket itself as `blocked`. - [ ] Task 3.2: In `multi_agent_conductor.py`, update `ConductorEngine.run()`. Before calling `self.engine.tick()`, call `self.track_dag.cascade_blocks()` (or equivalent) so that blocked states propagate cleanly, allowing the `all_done` or block detection logic to exit the while loop correctly.