state.toml: current_phase 0 -> 1; phase_1.status 'pending' -> 'in_progress';
last_updated 2026-06-27 -> 2026-07-02 (matches the drift-audit batch that
updated the plan/spec).
dispatch_tier3_phase1.md: surgical prompt for the Tier 3 worker that
will execute Phase 1 (lift 48 directives verbatim from the doc tree
into conductor/directives/ per the plan). Captures the 2026-07-02 drift-
audit findings so the harvester doesn't propagate stale refs (e.g.,
the corrected audit_optional_in_3_files.py naming; the corrected §17
line ranges; the corrected send() is canonical, not send_result()).
Includes STOP-AFTER-PHASE-1 rule so Phase 2 is NOT auto-dispatched.
Per conductor/workflow.md Tier 1 Orchestrator role: this is the
maximum responsibility I (Tier 1) take in this session — actual code
generation is delegated to Tier 2/3.
The mma-orchestrator skill is what the meta-tooling Tier 1/2 agents
load. The previous version was entirely built around the deprecated
scripts/mma_exec.py / claude_mma_exec.py bridge scripts — every
example used 'uv run python scripts/mma_exec.py --role tierN-X ...'
which was deprecated 2026-06-27 in favor of the OpenCode Task tool.
Rewrote the skill to use the OpenCode Task tool's subagent_type
parameter (tier3-worker / tier4-qa / tier1-orchestrator /
tier2-tech-lead) as the canonical mechanism, with explicit
deprecation notes for mma_exec.py.
Also updated: tool count (26 -> 45, now in src/mcp_tool_specs.py);
data locations (Ticket/Track/WorkerContext now in src/mma.py; the
src/models.py shim note).
The 8 mma_exec.py invocation examples in the previous version would
have caused Tier 2 Tech Lead agents to literally invoke deprecated
scripts. This is the highest-impact drift of the session — the user
explicitly said the deprecated invocation was wrong, and this skill
is what loaded the wrong pattern into agent context.
workflow.md Architecture Fallback section still claimed gui_2 260KB,
ai_client 116KB/5 providers, mcp_client 81KB, app_controller 166KB,
multi_agent_conductor 28KB+10KB, and 'src/models.py (132KB)
centralized registry'. All updated to current sizes + the shim
reality + 8-provider count + mcp_tool_specs split + the run_worker_
lifecycle subprocess template (not mma_exec.py).
Standard Task Workflow steps 4-5 (Delegate Test Creation / Delegate
Implementation) still used the deprecated 'python scripts/mma_exec.py
--role tier3-worker' invocation as the primary example. Updated to
'OpenCode Task tool with subagent_type: tier3-worker' as the canonical
mechanism, with mma_exec noted as DEPRECATED. Same fix applied to the
Phase Completion Verification step (Tier 4 QA Agent).
Sweep of the per-source-file guides + Readme.md for stale references
to src/models.py as the data model home. models.py is now a ~1.5KB
re-export shim per module_taxonomy_refactor_20260627; dataclasses
moved to src/mma.py, src/project_files.py, src/type_aliases.py,
src/mcp_tool_specs.py, src/result_types.py, src/context_presets.py,
src/workspace_manager.py, src/personas.py.
- guide_gui_2.md: _gui_func line 754->1062; render_main_interface
line 1259->1898.
- python.md §10 exemption table: App gui_2.py:307->314; AppController
795->801; RAGEngine 123->125; HookServer 856->941;
HookServerInstance 130->171; HookHandler 155->208;
WebSocketServer 908->993.
- guide_multi_agent_conductor.md: Ticket now in src/mma.py (not
models.py); ConductorEngine 116+->112+; WorkerPool 50-114->52-110.
- guide_agent_memory_dimensions.md: FileItem ref models.py:510-559
-> src/project_files.py.
- guide_context_aggregation.md: FileItem + ContextPreset refs ->
src/project_files.py + src/context_presets.py; ai_client _send_*
count 5->8.
- guide_discussions.md: parse_history_entries now in src/mma.py;
ContextPreset/FileItem cross-refs updated.
- guide_personas.md: Persona now in src/personas.py; import example
updated.
- guide_rag.md: RAGConfig now in src/mcp_client.py.
- guide_workspace_profiles.md: WorkspaceProfile now in
src/workspace_manager.py.
- guide_mma.md: Data Structures section notes src/mma.py as the live
location.
- Readme.md: MMA Engine + Data Models rows updated for the
models.py shim reality + 8 providers + mma_exec deprecation.
- guide_ai_client.md: '5 provider SDKs'->8 (added note); PROVIDERS
line 56->62; __getattr__ re-export line 261->31; provider
switching examples use real registered model names (claude-sonnet-
4-5, MiniMax-M2, gemini-2.5-flash, qwen-plus, grok-2, llama-3.1);
_provider union lists all 8 providers.
directive_hotswap_harness_20260627/spec.md: added the 5 missing
conductor/code_styleguides/*.md files to the harvest source list
(config_state_owner, workspace_paths, test_sandbox, chroma_cache,
code_path_audit) — the original list named 9 of 14. Added note that
the harvester should verify each contains a harvestable directive
before creating v1.md. Also verified tier2-autonomous.md path
exists (17,940 bytes) for plan Step 2.7.
tech-stack.md: removed duplicate src/paths.py entry (the full
description at line 37 already covers it; the line-73 stub was
redundant).
edit_workflow.md: Key Files section now points to src/project_files.py
for FileItem (moved out of src/models.py per the module taxonomy
refactor) and notes the line ~2748 ref may drift.
product.md and tech-stack.md claimed 5 providers (missing qwen, grok,
llama), wrong file sizes (gui_2 260KB vs 437KB, ai_client 116KB vs
166KB, mcp_client 81KB vs 92KB, app_controller 166KB vs 240KB), and
described models.py as 132KB centralized registry. Updated to 8
providers, current sizes, and the mcp_tool_specs.py extraction.
Centralized Registry Management -> Per-System Registry Management
reflects the post-refactor reality (PROVIDERS in ai_client.py,
tool registry in mcp_tool_specs.py, models.py is a shim).
python.md §17.8 and §17.10 listed audit_optional_returns.py as the
✅ implemented successor to audit_optional_in_3_files.py. Verified
via py_find_usages: audit_optional_returns does not exist in scripts/.
The live script is audit_optional_in_3_files.py (covers 4 baseline
files). Corrected the enforcement table + pre-commit workflow blocks.
product-guidelines.md claimed send_result() was canonical and send()
was removed. The reverse is true: send() is the live public API
returning Result[str, ErrorInfo]; send_result exists only as a local
var in _send_gemini_cli. Corrected the section and added a
reconciliation note. Also fixed guide_ai_client.md send() signature
to show -> Result[str] instead of -> str.
The guide described models.py as a 132KB centralized registry with
Provider/ModelInfo enums, Ticket/Track classes, AGENT_TOOL_NAMES, and
parse_plan_md. None of that is in models.py anymore — it's a ~1.5KB
re-export shim (Metadata=TrackMetadata alias + PROVIDERS lazy
__getattr__). Dataclasses moved to per-system files (mma.py,
project_files.py, type_aliases.py, mcp_tool_specs.py, result_types.py).
VendorCapabilities moved from the deleted vendor_capabilities.py into
ai_client.py #region. Rewrote the guide to reflect the current
where-each-model-lives table.
test_visual_sim_mma_v2 was the user's explicit complaint about pre-
existing flakes. The fix (9cfbb980) addresses three root causes:
dict metadata normalization, App-side state sync in load_track, and
btn_reset pollution cleanup. Update the report to reflect this.
The test_visual_sim_mma_v2 failure in tier-3 batch context was caused
by state pollution from prior live_gui tests sharing the subprocess:
1. track state file missing for leftover track:
`_cb_load_track_result` accessed `state.metadata.id` and
`state.metadata.name`, but `EMPTY_TRACK_STATE` (returned when no
state.toml exists for a track_id) had `metadata={}` (a dict, not a
TrackMetadata object). That raised `'dict' object has no attribute
'id'`. Fixed by normalizing metadata: dict -> TrackMetadata.from_dict,
TrackMetadata stays, anything else -> TrackMetadata(id=track_id,
name=track_id).
2. active_track and active_tickets never reached the App:
`_cb_load_track_result` set `self.active_track` (controller) and
`self.active_tickets = []` (via `_load_active_tickets`) but never
mirrored to `self._app.active_track` / `self._app.active_tickets`.
The /api/gui/mma_status endpoint reads `app.X` first via
`_get_app_attr`, so it returned None / [] and the test's poll
`at_id == track_id and bool(s.get('active_tickets'))` failed. Fixed
by mirroring active_track / active_tickets / active_tier to the App.
3. leftover tracks list in batched run:
Without btn_reset, `app.tracks` (App-side) accumulates tracks from
earlier tests in the session. `_get_app_attr(app, 'tracks', [])`
then returns stale leftovers, and the test's
`target_track = next((... if 'hello_world' in t.get('title') else
tracks_list[0]))` picks a leftover with no on-disk state file.
Fixed in TWO places:
(a) btn_reset now also clears `app.tracks = []` so each test starts
clean if it calls btn_reset.
(b) tests/test_visual_sim_mma_v2.py now calls `client.click('btn_reset')`
at the start. The test was the only one in its tier that did NOT
reset; with the live_gui subprocess shared across batched tests,
that's the source of the state pollution.
Also reverted the `TrackState.metadata` default change (dict -> TrackMetadata)
because it broke TrackState() construction (TrackMetadata requires `id`/`name`).
The metadata normalization in `_cb_load_track_result` is sufficient and
preserves backward compatibility with on-disk state.toml files.
Verified: tests/test_visual_sim_mma_v2.py passes in isolation (58.36s)
and tier-3 batch passes when run standalone. Other tests in tier-3
have pre-existing render-loop contention flakes in batched xdist mode
that are unrelated to this fix.