2.8 KiB
2.8 KiB
Track Specification: Architecture Boundary Hardening
Overview
The manual_slop project serves dual roles: it is an end-user GUI application built around Human-In-The-Loop (HITL) AI orchestration, and it is the sandbox for the AI meta-tooling (mma_exec.py, tool_call.py) being used to develop it.
Because mcp_client.py is shared between both environments to provide robust code investigation tools, a critical HITL bypass has emerged. Additionally, the meta-tooling scripts are bleeding tokens.
Current State Audit
-
HITL Bypass in
manual_slopApplication:- Location:
ai_client.pyinside_send_gemini,_send_gemini_cli,_send_anthropic, and_send_deepseek. - Issue: The
pre_tool_callbackis explicitly only checked ifname == TOOL_NAME(which isrun_powershell). - If an AI agent running inside the GUI calls
set_file_sliceorpy_update_definition, the code falls through toelif name in mcp_client.TOOL_NAMES:and dispatches it immediately, silently mutating the user's codebase without approval. - Requirement: The application strictly requires step-by-step deterministic user approval for any filesystem modification, whether by script or direct AST manipulation.
- Location:
-
Token Firewall Leak in Meta-Tooling (
mma_exec.py):- Location:
scripts/mma_exec.py:101. - Issue:
UNFETTERED_MODULEShardcodes['mcp_client', 'project_manager', 'events', 'aggregate']. If a worker targets a file that importsmcp_client, the script injects the fullmcp_client.py(~450 lines) into the context instead of its skeleton, blowing out the token budget and destroying Context Amnesia.
- Location:
-
DAG Engine Blocking Stalls (
dag_engine.py):- Location:
dag_engine.py->get_ready_tasks() - Issue:
get_ready_tasksrequires all dependencies to be explicitlycompleted. If a task is markedblocked(e.g. after max retries in the ConductorEngine), its dependents staytodoforever. TheConductorEngine.run()loop has no logic to handle this cleanly, causing an infinite stall.
- Location:
Desired State
- Any mutating tool from
mcp_client.py(set_file_slice,py_update_definition,py_set_signature,py_set_var_declaration,write_file) must trigger a user approval dialogue, just likerun_powershell. - The
UNFETTERED_MODULESlist must be completely removed frommma_exec.pyso all dependencies are reliably skeletonized. - The
dag_engine.pymust cascadeblockedstatus to downstream tasks so the track halts cleanly instead of deadlocking.
Technical Constraints
- The UI modal must be updated or a new
pre_mutation_callbackmust be introduced to handle showing the proposed AST edit vs the proposed script. - Keep the boundary clear: changes in
ai_client.pyaffect the user'smanual_slopapplication experience. Changes inmma_exec.pyaffect our meta-tooling environment.