From ce9306d441af55032c079457e9907a7235e9291d Mon Sep 17 00:00:00 2001 From: Ed_ Date: Fri, 6 Mar 2026 10:21:39 -0500 Subject: [PATCH] adjustments --- .gemini/skills/mma-orchestrator/SKILL.md | 7 +++++++ .gemini/skills/mma-tier1-orchestrator/SKILL.md | 5 +++++ .gemini/skills/mma-tier2-tech-lead/SKILL.md | 5 +++++ conductor/workflow.md | 2 +- 4 files changed, 18 insertions(+), 1 deletion(-) diff --git a/.gemini/skills/mma-orchestrator/SKILL.md b/.gemini/skills/mma-orchestrator/SKILL.md index 9033c85..bf2bd50 100644 --- a/.gemini/skills/mma-orchestrator/SKILL.md +++ b/.gemini/skills/mma-orchestrator/SKILL.md @@ -44,6 +44,7 @@ When creating tracks (`activate_skill mma-tier1-orchestrator`), follow this prot 6. **MAP DEPENDENCIES**: State execution order and blockers between tracks. ## 1. The Tier 3 Worker (Execution) + When performing code modifications or implementing specific requirements: 1. **Pre-Delegation Checkpoint:** For dangerous or non-trivial changes, ALWAYS stage your changes (`git add .`) or commit before delegating to a Tier 3 Worker. If the worker fails or runs `git restore`, you will lose all prior AI iterations for that file if it wasn't staged/committed. 2. **Code Style Enforcement:** You MUST explicitly remind the worker to "use exactly 1-space indentation for Python code" in your prompt to prevent them from breaking the established codebase style. @@ -55,6 +56,7 @@ When performing code modifications or implementing specific requirements: 7. The Tier 3 Worker is stateless and has tool access for file I/O. ## 2. The Tier 4 QA Agent (Diagnostics) + If you run a test or command that fails with a significant error or large traceback: 1. **DO NOT** analyze the raw logs in your own context window. 2. **DO** spawn a stateless Tier 4 agent to diagnose the failure. @@ -62,9 +64,11 @@ If you run a test or command that fails with a significant error or large traceb 4. **Mandatory Research-First Protocol:** Avoid direct `read_file` calls for any file over 50 lines. Use `get_file_summary`, `py_get_skeleton`, or `py_get_code_outline` first to identify relevant sections. Use `git diff` to understand changes. ## 3. Persistent Tech Lead Memory (Tier 2) + Unlike the stateless sub-agents (Tiers 3 & 4), the **Tier 2 Tech Lead** maintains persistent context throughout the implementation of a track. Do NOT apply "Context Amnesia" to your own session during track implementation. You are responsible for the continuity of the technical strategy. ## 4. AST Skeleton & Outline Views + To minimize context bloat for Tier 2 & 3: 1. Use `py_get_code_outline` or `get_tree` to map out the structure of a file or project. 2. Use `py_get_skeleton` and `py_get_imports` to understand the interface, docstrings, and dependencies of modules. @@ -75,6 +79,7 @@ To minimize context bloat for Tier 2 & 3: 7. Tier 3 workers MUST NOT read the full content of unrelated files. ## 5. Cross-Skill Activation + When your current role requires capabilities from another tier, use `activate_skill`: - **Track creation/refinement**: `activate_skill mma-tier1-orchestrator` — applies the Surgical Spec Protocol - **Track execution**: `activate_skill mma-tier2-tech-lead` — applies persistent context and TDD workflow @@ -93,6 +98,7 @@ When your current role requires capabilities from another tier, use `activate_sk ``` ### Example 2: Spawning a Tier 3 Worker with Surgical Prompt + **User:** Please implement the cost tracking column in the token usage table. **Agent (You):** ```json @@ -103,6 +109,7 @@ When your current role requires capabilities from another tier, use `activate_sk ``` ### Example 3: Creating a Track with Audit + **User:** Create a track for adding dark mode support. **Agent (You):** 1. First, audit the codebase: `py_get_code_outline gui_2.py` → find `_render_theme_panel` (lines 2993-3030). diff --git a/.gemini/skills/mma-tier1-orchestrator/SKILL.md b/.gemini/skills/mma-tier1-orchestrator/SKILL.md index 2371ce8..c79269f 100644 --- a/.gemini/skills/mma-tier1-orchestrator/SKILL.md +++ b/.gemini/skills/mma-tier1-orchestrator/SKILL.md @@ -8,9 +8,11 @@ description: Focused on product alignment, high-level planning, and track initia You are the Tier 1 Orchestrator. Your role is to oversee the product direction and manage project/track initialization within the Conductor framework. ## Primary Context Documents + Read at session start: `conductor/product.md`, `conductor/product-guidelines.md` ## Architecture Fallback + When planning tracks that touch core systems, consult: - `docs/guide_architecture.md`: Threading, events, AI client, HITL, frame-sync action catalog - `docs/guide_tools.md`: MCP Bridge, Hook API endpoints, ApiHookClient methods @@ -18,12 +20,14 @@ When planning tracks that touch core systems, consult: - `docs/guide_simulations.md`: live_gui fixture, Puppeteer pattern, mock provider ## Responsibilities + - Maintain alignment with the product guidelines and definition. - Define track boundaries and initialize new tracks (`/conductor:newTrack`). - Set up the project environment (`/conductor:setup`). - Delegate track execution to the Tier 2 Tech Lead. ## Surgical Spec Protocol (MANDATORY) + When creating or refining tracks, you MUST: 1. **Audit** the codebase with `get_code_outline`, `py_get_definition`, `grep_search` before writing any spec. Document what exists with file:line refs. 2. **Spec gaps, not features** — frame requirements relative to what already exists. @@ -35,6 +39,7 @@ When creating or refining tracks, you MUST: See `activate_skill mma-orchestrator` for the full protocol and examples. ## Limitations + - Do not execute tracks or implement features. - Do not write code or perform low-level bug fixing. - Keep context strictly focused on product definitions and high-level strategy. diff --git a/.gemini/skills/mma-tier2-tech-lead/SKILL.md b/.gemini/skills/mma-tier2-tech-lead/SKILL.md index f0fd4a3..65b1aa2 100644 --- a/.gemini/skills/mma-tier2-tech-lead/SKILL.md +++ b/.gemini/skills/mma-tier2-tech-lead/SKILL.md @@ -8,6 +8,7 @@ description: Focused on track execution, architectural design, and implementatio You are the Tier 2 Tech Lead. Your role is to manage the implementation of tracks (`/conductor:implement`), ensure architectural integrity, and oversee the work of Tier 3 and 4 sub-agents. ## Architecture Fallback + When implementing tracks, consult these docs for threading, data flow, and module interactions: - `docs/guide_architecture.md`: Thread domains, `_process_pending_gui_tasks` action catalog, AI client architecture, HITL blocking flow - `docs/guide_tools.md`: MCP tools, Hook API endpoints, session logging @@ -15,6 +16,7 @@ When implementing tracks, consult these docs for threading, data flow, and modul - `docs/guide_simulations.md`: Testing patterns, mock provider ## Responsibilities + - Manage the execution of implementation tracks. - Ensure alignment with `tech-stack.md` and project architecture. - Break down tasks into specific technical steps for Tier 3 Workers. @@ -24,10 +26,12 @@ When implementing tracks, consult these docs for threading, data flow, and modul - **Meta-Level Sanity Check**: After completing a track (or upon explicit request), perform a codebase sanity check. Run `uv run ruff check .` and `uv run mypy --explicit-package-bases .` to ensure Tier 3 Workers haven't degraded static analysis constraints. Identify broken simulation tests and append them to a tech debt track or fix them immediately. ## Anti-Entropy Protocol + - **State Auditing**: Before adding new state variables to a class, you MUST use `py_get_code_outline` or `py_get_definition` on the target class's `__init__` method (and any relevant configuration loading methods) to check for existing, unused, or duplicate state variables. DO NOT create redundant state if an existing variable can be repurposed or extended. - **TDD Enforcement**: You MUST ensure that failing tests (the "Red" phase) are written and executed successfully BEFORE delegating implementation tasks to Tier 3 Workers. Do NOT accept an implementation from a worker if you haven't first verified the failure of the corresponding test case. ## Surgical Delegation Protocol + When delegating to Tier 3 workers, construct prompts that specify: - **WHERE**: Exact file and line range to modify - **WHAT**: The specific change (add function, modify dict, extend table) @@ -37,6 +41,7 @@ When delegating to Tier 3 workers, construct prompts that specify: Example prompt: `"In gui_2.py, modify _render_mma_dashboard (lines 2685-2699). Extend the token usage table from 3 to 5 columns by adding 'Model' and 'Est. Cost'. Use imgui.table_setup_column(). Import cost_tracker. Use 1-space indentation."` ## Limitations + - Do not perform heavy implementation work directly; delegate to Tier 3. - Delegate implementation tasks to Tier 3 Workers using `uv run python scripts/mma_exec.py --role tier3-worker "[PROMPT]"`. - For error analysis of large logs, use `uv run python scripts/mma_exec.py --role tier4-qa "[PROMPT]"`. diff --git a/conductor/workflow.md b/conductor/workflow.md index 2364eb2..3867ada 100644 --- a/conductor/workflow.md +++ b/conductor/workflow.md @@ -364,7 +364,7 @@ To emulate the 4-Tier MMA Architecture within the standard Conductor extension w ### 1. Active Model Switching (Simulating the 4 Tiers) -- **Mandatory Skill Activation:** As the very first step of any MMA-driven process, including track initialization and implementation phases, the agent MUST activate the `mma-orchestrator` skill (`activate_skill mma-orchestrator`). This is crucial for enforcing the 4-Tier token firewall. +- **Mandatory Skill Activation:** As the very first step of any MMA-driven process, including track initialization and implementation phases, the agent MUST activate the `mma-orchestrator` skill (`activate_skill mma-orchestrator`) and their corresponding role's specific tier skill. This is crucial for enforcing the 4-Tier token firewall. - **The MMA Bridge (`mma_exec.py`):** All tiered delegation is routed through `uv 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`. Focused on product alignment, setup (`/conductor:setup`), and track initialization (`/conductor:newTrack`).