Files
manual_slop/conductor/tracks/architecture_boundary_hardening_20260302/spec.md

2.1 KiB

Track Specification: Architecture Boundary Hardening

Overview

The manual_slop project sandbox provides AI meta-tooling (mma_exec.py, tool_call.py) to orchestrate its own development. When AI agents added advanced AST tools (like set_file_slice) to mcp_client.py for meta-tooling, they failed to fully integrate them into the application's GUI, config, or HITL (Human-In-The-Loop) safety models. Additionally, meta-tooling scripts are bleeding tokens, and the internal application's state machine can deadlock.

Current State Audit

  1. Incomplete MCP Tool Integration & HITL Bypass (ai_client.py, gui_2.py):

    • Issue: New tools in mcp_client.py (e.g., set_file_slice, py_update_definition) are not exposed in the GUI or manual_slop.toml config [agent.tools]. If they were enabled, ai_client.py would execute them instantly without checking pre_tool_callback, bypassing GUI approval.
    • Requirement: Expose all mcp_client.py tools as toggles in the GUI/Config. Ensure any mutating tool triggers a GUI approval modal before execution.
  2. Token Firewall Leak in Meta-Tooling (mma_exec.py):

    • Location: scripts/mma_exec.py:101.
    • Issue: UNFETTERED_MODULES hardcodes ['mcp_client', 'project_manager', 'events', 'aggregate']. If a worker targets a file that imports mcp_client, the script injects the full mcp_client.py (~450 lines) into the context instead of its skeleton, blowing out the token budget.
  3. DAG Engine Blocking Stalls (dag_engine.py):

    • Location: dag_engine.py -> get_ready_tasks()
    • Issue: get_ready_tasks requires all dependencies to be explicitly completed. If a task is marked blocked, its dependents stay todo forever, causing an infinite stall.

Desired State

  • All tools in mcp_client.py are configurable in manual_slop.toml and gui_2.py. Mutating tools must route through the GUI approval callback.
  • The UNFETTERED_MODULES list must be completely removed from mma_exec.py.
  • The dag_engine.py must cascade blocked status to downstream tasks so the track halts cleanly.