From 0ad47afb21f1481f97034d0f7343a21aa38beeed Mon Sep 17 00:00:00 2001 From: Ed_ Date: Mon, 2 Mar 2026 11:42:01 -0500 Subject: [PATCH] =?UTF-8?q?chore:=20add=20TASKS.md=20and=20JOURNAL.md=20en?= =?UTF-8?q?try=20=E2=80=94=20capture=20mma=5Fagent=5Ffocus=5Fux=20next=20t?= =?UTF-8?q?rack?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- JOURNAL.md | 19 +++++++++++++++++++ TASKS.md | 34 ++++++++++++++++++++++++++++++++++ 2 files changed, 53 insertions(+) create mode 100644 TASKS.md diff --git a/JOURNAL.md b/JOURNAL.md index a563aff..6f075e1 100644 --- a/JOURNAL.md +++ b/JOURNAL.md @@ -11,3 +11,22 @@ --- +--- + +## 2026-03-02 + +### Track: context_token_viz_20260301 — Completed |TASK:context_token_viz_20260301| +- **What**: Token budget visualization panel (all 3 phases) +- **Why**: Zero visibility into context window usage; `get_history_bleed_stats` existed but had no UI +- **How**: Extended `get_history_bleed_stats` with `_add_bleed_derived` helper (adds 8 derived fields); added `_render_token_budget_panel` with color-coded progress bar, breakdown table, trim warning, Gemini/Anthropic cache status; 3 auto-refresh triggers (`_token_stats_dirty` flag); `/api/gui/token_stats` endpoint; `--timeout` flag on `claude_mma_exec.py` +- **Issues**: `set_file_slice` dropped `def _render_message_panel` line — caught by outline check, fixed with 1-line insert. Tier 3 delegation via `run_powershell` hard-capped at 60s — implemented changes directly per user approval; added `--timeout` flag for future use. +- **Result**: 17 passing tests, all phases verified by user. Token panel visible in AI Settings under "Token Budget". Commits: 5bfb20f → d577457. + +### Next: mma_agent_focus_ux (planned, not yet tracked) +- **What**: Per-agent filtering for MMA observability panels (comms, tool calls, discussion, token budget) +- **Why**: All panels are global/session-scoped; in MMA mode with 4 tiers, data from all agents mixes. No way to isolate what a specific tier is doing. +- **Gap**: `_comms_log` and `_tool_log` have no tier/agent tag. `mma_streams` stream_id is the only per-agent key that exists. +- **See**: TASKS.md for full audit and implementation intent. + +--- + diff --git a/TASKS.md b/TASKS.md new file mode 100644 index 0000000..d0d83f0 --- /dev/null +++ b/TASKS.md @@ -0,0 +1,34 @@ +# TASKS.md + + + +## Active Tracks +_None currently active._ + +## Completed This Session +- `context_token_viz_20260301` — Token budget panel (color bar, breakdown table, trim warning, cache status, auto-refresh). All phases verified. Commit: d577457. + +## Planned: Next Track + +### `mma_agent_focus_ux` (not yet created) +**Priority:** High +**Depends on:** nothing +**Origin:** User feedback 2026-03-02 — token viz is agent-agnostic; MMA observability panels (comms, tool calls, discussion history, token budget) show global/session-scoped data with no way to isolate a specific tier or agent. + +**The Gap (audit-confirmed):** +- `_comms_log` entries (gui_2.py:861–895) have no tier/agent tag — only `direction`, `type`, `payload` +- `_tool_log` entries (gui_2.py:897–900) are `(script, result, ts)` — no tier tag +- `mma_streams` dict uses `stream_id` (`"Tier 1"` etc.) — the **only** existing per-agent key +- `_on_comms_entry` never attaches caller tier/agent context +- Token stats are global (single `ai_client` provider, no per-tier history separation) + +**Intent:** +1. Add a `source_tier` / `agent_id` field to comms log entries and tool log tuples at the point of emission +2. Add a "Focus Agent" selector widget to the MMA Dashboard (None = global; Tier 1–4 = filtered) +3. Filter `_render_comms_history_panel`, `_render_tool_calls_panel`, and `_render_discussion_panel` by the selected agent when focus is active +4. Token budget panel: when a tier is focused, show token stats for that tier's model/history (requires per-tier history tracking in ai_client or conductor engine) +5. Discussion history entries emitted by MMA workers (via `history_add` comms kind) already carry a `role` — use that to group by tier + +**Scope note:** Item 4 (per-tier token stats) is the most architectural — may warrant a sub-track or phased deferral. + +**To initialize:** Run `/conductor-new-track mma_agent_focus_ux` at start of next session after reading this file.