feat(mma): Refine tier roles, tool access, and observability
This commit is contained in:
@@ -11,11 +11,11 @@ To serve as an expert-level utility for personal developer use on small projects
|
||||
## Key Features
|
||||
- **Multi-Provider Integration:** Supports Gemini, Anthropic, and DeepSeek with seamless switching.
|
||||
- **4-Tier Hierarchical Multi-Model Architecture:** Orchestrates an intelligent cascade of specialized models to isolate cognitive loads and minimize token burn.
|
||||
- **Tier 1 (Orchestrator):** Product alignment and high-level strategy using `gemini-3.1-pro-preview`.
|
||||
- **Tier 2 (Tech Lead):** Architectural design and technical planning using `gemini-3-flash-preview`.
|
||||
- **Tier 3 (Worker):** Focused implementation and surgical code changes using `gemini-2.5-flash-lite` or `deepseek-v3`.
|
||||
- **Tier 4 (QA):** Bug reproduction, test analysis, and error translation using `gemini-2.5-flash-lite` or `deepseek-v3`.
|
||||
- **MMA Delegation Engine:** Utilizes the `mma-exec` CLI and `mma.ps1` helper to route tasks, ensuring each tier receives role-scoped context (e.g., Orchestrators get Product docs; Workers get Workflow specs).
|
||||
- **Tier 1 (Orchestrator):** Strategic product alignment, setup (`/conductor:setup`), and track initialization (`/conductor:newTrack`) using `gemini-3.1-pro-preview`.
|
||||
- **Tier 2 (Tech Lead):** Technical oversight and track execution (`/conductor:implement`) using `gemini-3-flash-preview`. Maintains persistent context throughout implementation.
|
||||
- **Tier 3 (Worker):** Surgical code implementation and TDD using `gemini-2.5-flash-lite` or `deepseek-v3`. Operates statelessly with tool access and dependency skeletons.
|
||||
- **Tier 4 (QA):** Error analysis and diagnostics using `gemini-2.5-flash-lite` or `deepseek-v3`. Operates statelessly with tool access.
|
||||
- **MMA Delegation Engine:** Utilizes the `mma-exec` CLI and `mma.ps1` helper to route tasks, ensuring role-scoped context and detailed observability via timestamped sub-agent logs.
|
||||
- **Role-Scoped Documentation:** Automated mapping of foundational documents to specific tiers to prevent token bloat and maintain high-signal context.
|
||||
- **Strict Memory Siloing:** Employs AST-based interface extraction and "Context Amnesia" to provide workers only with the absolute minimum context required, preventing hallucination loops.
|
||||
- **Explicit Execution Control:** All AI-generated PowerShell scripts require explicit human confirmation via interactive UI dialogs before execution, supported by a global "Linear Execution Clutch" for deterministic debugging.
|
||||
|
||||
@@ -28,7 +28,7 @@
|
||||
|
||||
## Configuration & Tooling
|
||||
|
||||
- **tree-sitter & tree-sitter-python:** For deterministic AST parsing and generation of curated "Skeleton Views" and interface-level memory structures.
|
||||
- **tree-sitter & tree-sitter-python:** For deterministic AST parsing and automated generation of curated "Skeleton Views" (signatures and docstrings) to minimize context bloat for sub-agents.
|
||||
- **pydantic / dataclasses:** For defining strict state schemas (Tracks, Tickets) used in linear orchestration.
|
||||
- **tomli-w:** For writing TOML configuration files.
|
||||
- **psutil:** For system and process monitoring (CPU/Memory telemetry).
|
||||
|
||||
@@ -1,23 +1,23 @@
|
||||
# Implementation Plan: MMA Utilization Refinement
|
||||
|
||||
## Phase 1: Skill Segregation and Tier Re-Alignment
|
||||
- [ ] Task: Refine `mma-tier1-orchestrator` skill to focus exclusively on project/track initialization.
|
||||
- [ ] Task: Refine `mma-tier2-tech-lead` skill for track execution, ensuring persistent memory across tasks (Disable Context Amnesia).
|
||||
- [ ] Task: Refine `mma-tier3-worker` and `mma-tier4-qa` skills to be stateless (Enable Context Amnesia) but equipped with full file read/write tools.
|
||||
- [x] Task: Refine `mma-tier1-orchestrator` skill to focus exclusively on project/track initialization. e950601
|
||||
- [x] Task: Refine `mma-tier2-tech-lead` skill for track execution, ensuring persistent memory across tasks (Disable Context Amnesia). e950601
|
||||
- [x] Task: Refine `mma-tier3-worker` and `mma-tier4-qa` skills to be stateless but equipped with full file read/write tools and should be provided only the context the need of the project beyond that with ast skeleton extraction or what tier 2 provies them. e950601
|
||||
- [ ] Task: Conductor - User Manual Verification 'Phase 1' (Protocol in workflow.md)
|
||||
|
||||
## Phase 2: AST Skeleton Extraction (Skeleton Views)
|
||||
- [ ] Task: Enhance `mcp_client.py` with `get_python_skeleton` functionality using `tree-sitter` to extract signatures and docstrings.
|
||||
- [ ] Task: Update `mma_exec.py` to utilize these skeletons for non-target dependencies when preparing context for Tier 3.
|
||||
- [ ] Task: Integrate "Interface-level" scrubbed versions into the sub-agent injection logic.
|
||||
- [x] Task: Enhance `mcp_client.py` with `get_python_skeleton` functionality using `tree-sitter` to extract signatures and docstrings. e950601
|
||||
- [x] Task: Update `mma_exec.py` to utilize these skeletons for non-target dependencies when preparing context for Tier 3. e950601
|
||||
- [x] Task: Integrate "Interface-level" scrubbed versions into the sub-agent injection logic. e950601
|
||||
- [ ] Task: Conductor - User Manual Verification 'Phase 2' (Protocol in workflow.md)
|
||||
|
||||
## Phase 3: Sub-Agent Observability
|
||||
- [ ] Task: Implement a dedicated logging mechanism for sub-agents (e.g., `logs/mma_subagents.log`) that captures reasoning and tool output.
|
||||
- [ ] Task: Ensure sub-agent executions do not pollute the primary Gemini CLI history while remaining visible to the user via the log.
|
||||
- [x] Task: Implement a dedicated logging mechanism for sub-agents (e.g., `logs/agents/mma_tier<#>_task_<timestamp>.log`) that captures reasoning and tool output. e950601
|
||||
- [x] Task: Ensure sub-agent executions do not pollute the primary Gemini CLI history while remaining visible to the user via the log. e950601
|
||||
- [ ] Task: Conductor - User Manual Verification 'Phase 3' (Protocol in workflow.md)
|
||||
|
||||
## Phase 4: Workflow Optimization and Validation
|
||||
- [ ] Task: Update `conductor/workflow.md` to formally document the refined tier roles and tool permissions.
|
||||
- [ ] Task: Conduct a full end-to-end "Dry Run" (Create a dummy track and implement a small feature) to verify the new architecture.
|
||||
- [x] Task: Update `conductor/workflow.md` to formally document the refined tier roles and tool permissions. e950601
|
||||
- [x] Task: Conduct a full end-to-end "Dry Run" (Create a dummy track and implement a small feature) to verify the new architecture. e950601
|
||||
- [ ] Task: Conductor - User Manual Verification 'Phase 4' (Protocol in workflow.md)
|
||||
|
||||
@@ -372,17 +372,18 @@ To emulate the 4-Tier MMA Architecture within the standard Conductor extension w
|
||||
- **Activate MMA Orchestrator Skill:** To enforce the 4-Tier token firewall, the agent MUST invoke `activate_skill mma-orchestrator` at the start of any implementation phase.
|
||||
- **The MMA Bridge (`mma_exec.py`):** All tiered delegation is routed through `python scripts/mma_exec.py`. This script acts as the primary bridge, managing model selection, context injection, and logging.
|
||||
- **Model Tiers:**
|
||||
- **Tier 1 (Strategic/Orchestration):** `gemini-3.1-pro-preview`. Used for planning and high-level logic.
|
||||
- **Tier 2 (Architectural/Tech Lead):** `gemini-3-flash-preview`. Used for code review and structural design.
|
||||
- **Tier 3 (Execution/Worker):** `gemini-2.5-flash-lite`. Used for surgical code implementation and test generation.
|
||||
- **Tier 4 (Utility/QA):** `gemini-2.5-flash-lite`. Used for log summarization and error analysis.
|
||||
- **Tier 1 (Strategic/Orchestration):** `gemini-3.1-pro-preview`. Focused on product alignment, setup (`/conductor:setup`), and track initialization (`/conductor:newTrack`).
|
||||
- **Tier 2 (Architectural/Tech Lead):** `gemini-3-flash-preview`. Focused on architectural design and track execution (`/conductor:implement`). **Note:** Tier 2 maintains persistent memory throughout a track's implementation.
|
||||
- **Tier 3 (Execution/Worker):** `gemini-2.5-flash-lite`. Used for surgical code implementation and test generation. Operates statelessly (Context Amnesia) but has access to file I/O tools.
|
||||
- **Tier 4 (Utility/QA):** `gemini-2.5-flash-lite`. Used for log summarization and error analysis. Operates statelessly (Context Amnesia) but has access to diagnostic tools.
|
||||
- **Tiered Delegation Protocol:**
|
||||
- **Tier 3 Worker:** `python scripts/mma_exec.py --role tier3-worker "[PROMPT]"`
|
||||
- **Tier 4 QA Agent:** `python scripts/mma_exec.py --role tier4-qa "[PROMPT]"`
|
||||
- **Logging:** All hierarchical interactions are automatically recorded in `logs/mma_delegation.log` for auditable verification.
|
||||
- **Observability:** All hierarchical interactions are recorded in `logs/mma_delegation.log` and detailed sub-agent logs are saved to `logs/agents/`.
|
||||
|
||||
### 2. Context Management and Token Firewalling
|
||||
- **Context Amnesia:** `mma_exec.py` enforces "Context Amnesia" by executing sub-agents in a stateless manner. Each call starts with a clean slate, receiving only the strictly necessary documents and prompts. This prevents conversational "hallucination bleed" and keeps token costs low.
|
||||
- **Context Amnesia (Tiers 3 & 4):** `mma_exec.py` enforces "Context Amnesia" by executing sub-agents in a stateless manner. Each call starts with a clean slate, receiving only the strictly necessary documents and prompts.
|
||||
- **Persistent Memory (Tier 2):** The Tier 2 Tech Lead does NOT use Context Amnesia during track implementation to ensure continuity of technical strategy.
|
||||
- **AST Skeleton Views:** For Tier 3 implementation, `mma_exec.py` automatically generates "AST Skeleton Views" of project dependencies. This provides the worker model with the interface-level structure (function signatures, docstrings) of imported modules without the full source code, maximizing the signal-to-noise ratio in the context window.
|
||||
|
||||
### 3. Phase Checkpoints (The Final Defense)
|
||||
|
||||
Reference in New Issue
Block a user