From 0b4e197d4853528d752426238e9f1cde86461944 Mon Sep 17 00:00:00 2001 From: Ed_ Date: Wed, 25 Feb 2026 12:47:21 -0500 Subject: [PATCH] checkpoint, mma condcutor pain --- .gemini/skills/mma-orchestrator/SKILL.md | 64 +++++++++++++++++++ conductor/tracks.md | 2 +- .../manual_slop_headless_20260225/plan.md | 2 +- project_history.toml | 2 +- tests/temp_liveaisettingssim_history.toml | 2 +- tests/temp_livecontextsim_history.toml | 6 +- tests/temp_liveexecutionsim_history.toml | 2 +- tests/temp_livetoolssim_history.toml | 2 +- tests/temp_project_history.toml | 6 +- 9 files changed, 77 insertions(+), 11 deletions(-) create mode 100644 .gemini/skills/mma-orchestrator/SKILL.md diff --git a/.gemini/skills/mma-orchestrator/SKILL.md b/.gemini/skills/mma-orchestrator/SKILL.md new file mode 100644 index 0000000..1c1a90d --- /dev/null +++ b/.gemini/skills/mma-orchestrator/SKILL.md @@ -0,0 +1,64 @@ +--- +name: mma-orchestrator +description: Enforces the 4-Tier Hierarchical Multi-Model Architecture (MMA) within Gemini CLI using Token Firewalling and sub-agent task delegation. +--- + +# MMA Token Firewall & Tiered Delegation Protocol + +You are operating as a Tier 1 Product Manager or Tier 2 Tech Lead within the MMA Framework. Your context window is extremely valuable and must be protected from token bloat (such as raw, repetitive code edits, trial-and-error histories, or massive stack traces). + +To accomplish this, you MUST delegate token-heavy or stateless tasks to "Tier 3 Contributors" or "Tier 4 QA Agents" by spawning secondary Gemini CLI instances via `run_shell_command`. + +**CRITICAL Prerequisite:** +To avoid hanging the CLI and ensure proper environment authentication, you MUST NOT call the `gemini` command directly. Instead, you MUST use the wrapper script: +`.\scripts\run_subagent.ps1 -Role -Prompt "..."` + +## 1. The Tier 3 Worker (Heads-Down Coding) +When you need to perform a significant code modification (e.g., refactoring a 50-line+ script, writing a massive class, or implementing a predefined spec): +1. **DO NOT** attempt to write or use `replace`/`write_file` yourself. Your history will bloat. +2. **DO** construct a single, highly specific prompt. +3. **DO** spawn a sub-agent using `run_shell_command` pointing to the target file. + *Command:* `.\scripts\run_subagent.ps1 -Role Worker -Prompt "Read [FILE_PATH] and modify it to implement [SPECIFIC_INSTRUCTION]. Only write the code, no pleasantries."` +4. The Tier 3 Worker is stateless and has no tool access. You must take the clean code it returns and apply it to the file system using your own `replace` or `write_file` tools. + +## 2. The Tier 4 QA Agent (Error Translation) +If you run a local test (e.g., `npm test`, `pytest`, `go run`) via `run_shell_command` and it fails with a massive traceback (e.g., 100+ lines of `stderr`): +1. **DO NOT** analyze the raw `stderr` in your own context window. +2. **DO** immediately spawn a stateless Tier 4 agent to compress the error. +3. *Command:* `.\scripts\run_subagent.ps1 -Role QA -Prompt "Summarize this stack trace into a 20-word fix: [PASTE_SNIPPET_OF_STDERR_HERE]"` +4. Use the 20-word fix returned by the Tier 4 agent to inform your next architectural decision or pass it to the Tier 3 worker. + +## 3. Context Amnesia (Phase Checkpoints) +When you complete a major Phase or Track within the `conductor` workflow: +1. Stage your changes and commit them. +2. Draft a comprehensive summary of the state changes in a Git Note attached to the commit. +3. Treat the checkpoint as a "Memory Wipe." Actively disregard previous conversational turns and trial-and-error histories. Rely exclusively on the newly generated Git Note and the physical state of the files on disk for your next Phase. + + +### Example 1: Spawning a Tier 4 QA Agent +**User / System:** `pytest tests/test_gui.py` failed with 400 lines of output. +**Agent (You):** +```json +{ + "command": ".\\scripts\\run_subagent.ps1 -Role QA -Prompt \"Summarize this stack trace into a 20-word fix: [snip first 30 lines...]\"", + "description": "Spawning Tier 4 QA to compress error trace statelessly." +} +``` + +### Example 2: Spawning a Tier 3 Worker +**User:** Please implement the `ASTParser` class in `file_cache.py` as defined in Track 1. +**Agent (You):** +```json +{ + "command": ".\\scripts\\run_subagent.ps1 -Role Worker -Prompt \"Read file_cache.py and implement the ASTParser class using tree-sitter. Ensure you preserve docstrings but strip function bodies. Output the updated code.\"", + "description": "Delegating implementation to a Tier 3 Worker." +} +``` + + + +- When asked to write large amounts of boilerplate or repetitive code (Coding > 50 lines). +- When encountering a large error trace from a shell execution (Errors > 100 lines). +- When explicitly instructed to act as a "Tech Lead" or "Orchestrator". +- When managing complex, multi-file Track implementations. + \ No newline at end of file diff --git a/conductor/tracks.md b/conductor/tracks.md index e1b9772..3c4d986 100644 --- a/conductor/tracks.md +++ b/conductor/tracks.md @@ -41,6 +41,6 @@ This file tracks all major tracks for the project. Each track has its own detail --- -- [ ] **Track: Support headless manual_slop for making an unraid gui docker frontend and a unraid server backend down the line.** +- [~] **Track: Support headless manual_slop for making an unraid gui docker frontend and a unraid server backend down the line.** *Link: [./tracks/manual_slop_headless_20260225/](./tracks/manual_slop_headless_20260225/)* diff --git a/conductor/tracks/manual_slop_headless_20260225/plan.md b/conductor/tracks/manual_slop_headless_20260225/plan.md index 91a75f6..f165102 100644 --- a/conductor/tracks/manual_slop_headless_20260225/plan.md +++ b/conductor/tracks/manual_slop_headless_20260225/plan.md @@ -3,7 +3,7 @@ ## Phase 1: Project Setup & Headless Scaffold - [x] Task: Update dependencies (02fc847) - [ ] Add `fastapi` and `uvicorn` to `pyproject.toml` (and sync `requirements.txt` via `uv`). -- [ ] Task: Implement headless startup +- [~] Task: Implement headless startup - [ ] Modify `gui_2.py` (or create `headless.py`) to parse a `--headless` CLI flag. - [ ] Update config parsing in `config.toml` to support headless configuration sections. - [ ] Bypass Dear PyGui initialization if headless mode is active. diff --git a/project_history.toml b/project_history.toml index 4f7f608..030e4c6 100644 --- a/project_history.toml +++ b/project_history.toml @@ -8,5 +8,5 @@ active = "main" [discussions.main] git_commit = "" -last_updated = "2026-02-25T01:43:02" +last_updated = "2026-02-25T11:19:43" history = [] diff --git a/tests/temp_liveaisettingssim_history.toml b/tests/temp_liveaisettingssim_history.toml index 0114882..4e8ed7a 100644 --- a/tests/temp_liveaisettingssim_history.toml +++ b/tests/temp_liveaisettingssim_history.toml @@ -9,5 +9,5 @@ auto_add = true [discussions.main] git_commit = "" -last_updated = "2026-02-25T01:42:16" +last_updated = "2026-02-25T11:18:59" history = [] diff --git a/tests/temp_livecontextsim_history.toml b/tests/temp_livecontextsim_history.toml index 305a23e..275af56 100644 --- a/tests/temp_livecontextsim_history.toml +++ b/tests/temp_livecontextsim_history.toml @@ -5,10 +5,10 @@ roles = [ "System", ] history = [] -active = "TestDisc_1772001716" +active = "TestDisc_1772036318" auto_add = true -[discussions.TestDisc_1772001716] +[discussions.TestDisc_1772036318] git_commit = "" -last_updated = "2026-02-25T01:42:09" +last_updated = "2026-02-25T11:18:52" history = [] diff --git a/tests/temp_liveexecutionsim_history.toml b/tests/temp_liveexecutionsim_history.toml index 1056340..d228677 100644 --- a/tests/temp_liveexecutionsim_history.toml +++ b/tests/temp_liveexecutionsim_history.toml @@ -9,5 +9,5 @@ auto_add = true [discussions.main] git_commit = "" -last_updated = "2026-02-25T01:43:05" +last_updated = "2026-02-25T11:19:46" history = [] diff --git a/tests/temp_livetoolssim_history.toml b/tests/temp_livetoolssim_history.toml index d459525..abd0708 100644 --- a/tests/temp_livetoolssim_history.toml +++ b/tests/temp_livetoolssim_history.toml @@ -9,5 +9,5 @@ auto_add = true [discussions.main] git_commit = "" -last_updated = "2026-02-25T01:42:35" +last_updated = "2026-02-25T11:19:16" history = [] diff --git a/tests/temp_project_history.toml b/tests/temp_project_history.toml index 9420d6d..68b7514 100644 --- a/tests/temp_project_history.toml +++ b/tests/temp_project_history.toml @@ -9,5 +9,7 @@ auto_add = true [discussions.main] git_commit = "" -last_updated = "2026-02-25T01:43:08" -history = [] +last_updated = "2026-02-25T11:21:27" +history = [ + "@2026-02-25T11:21:23\nSystem:\n[PERFORMANCE ALERT] CPU usage high: 82.8%. Please consider optimizing recent changes or reducing load.", +]