diff --git a/conductor/product.md b/conductor/product.md index 46351d0..0d00ef5 100644 --- a/conductor/product.md +++ b/conductor/product.md @@ -15,7 +15,7 @@ To serve as an expert-level utility for personal developer use on small projects - **Tier 2 (Tech Lead):** Technical oversight and track execution (`/conductor:implement`) using `gemini-2.5-flash`. Maintains persistent context throughout implementation. - **Tier 3 (Worker):** Surgical code implementation and TDD using `gemini-2.5-flash` or `deepseek-v3`. Operates statelessly with tool access and dependency skeletons. - **Tier 4 (QA):** Error analysis and diagnostics using `gemini-2.5-flash` 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. Supports dynamic ticket creation and dependency resolution via an automated Dispatcher Loop. + - **MMA Delegation Engine:** Route tasks, ensuring role-scoped context and detailed observability via timestamped sub-agent logs. Supports dynamic ticket creation and dependency resolution via an automated Dispatcher Loop. - **Track-Scoped State Management:** Segregates discussion history and task progress into per-track state files (e.g., `conductor/tracks//state.toml`). This prevents global context pollution and ensures the Tech Lead session is isolated to the specific track's objective. - **Native DAG Execution Engine:** Employs a Python-based Directed Acyclic Graph (DAG) engine to manage complex task dependencies, supporting automated topological sorting and robust cycle detection. - **Programmable Execution State Machine:** Governing the transition between "Auto-Queue" (autonomous worker spawning) and "Step Mode" (explicit manual approval for each task transition). diff --git a/conductor/tracks/mma_data_architecture_dag_engine/index.md b/conductor/tracks/mma_data_architecture_dag_engine/index.md deleted file mode 100644 index 8132285..0000000 --- a/conductor/tracks/mma_data_architecture_dag_engine/index.md +++ /dev/null @@ -1,7 +0,0 @@ -# MMA Data Architecture & DAG Engine - -Restructures manual_slop state and execution into a per-track DAG model. - -### Navigation -- [Specification](./spec.md) -- [Implementation Plan](./plan.md) diff --git a/conductor/tracks/mma_data_architecture_dag_engine/metadata.json b/conductor/tracks/mma_data_architecture_dag_engine/metadata.json deleted file mode 100644 index 8c4a026..0000000 --- a/conductor/tracks/mma_data_architecture_dag_engine/metadata.json +++ /dev/null @@ -1,6 +0,0 @@ -{ - "id": "mma_data_architecture_dag_engine", - "title": "MMA Data Architecture & DAG Engine", - "status": "planned", - "created_at": "2026-02-27T19:20:00.000000" -} diff --git a/conductor/tracks/mma_data_architecture_dag_engine/plan.md b/conductor/tracks/mma_data_architecture_dag_engine/plan.md deleted file mode 100644 index d0842c3..0000000 --- a/conductor/tracks/mma_data_architecture_dag_engine/plan.md +++ /dev/null @@ -1,19 +0,0 @@ -# Implementation Plan: MMA Data Architecture & DAG Engine - -## Phase 1: Track-Scoped State Management -- [x] Task: Define the data schema for a Track (Metadata, Discussion History, Task List). [2efe80e] -- [x] Task: Update `project_manager.py` to create and read from `tracks//state.toml`. [e1a3712] -- [x] Task: Ensure Tier 2 (Tech Lead) history is securely scoped to the active track's state file. [b845b89] - -## Phase 2: Python DAG Engine -- [x] Task: Create a `Task` class with `status` (Blocked, Ready, In Progress, Review, Done) and `depends_on` fields. [a3cfeff] -- [x] Task: Implement a topological sorting algorithm to resolve execution order. [f85ec9d] -- [x] Task: Write robust unit tests verifying cycle detection and dependency resolution. [f85ec9d] - -## Phase 3: Execution State Machine -- [x] Task: Implement the core loop that evaluates the DAG and identifies "Ready" tasks. [154957f] -- [x] Task: Create configuration settings for "Auto-Queue" vs "Manual Step" execution modes. [154957f] -- [x] Task: Connect the state machine to the backend dispatcher, preparing it for GUI integration. [2429b7c] - -## Phase: Review Fixes -- [x] Task: Apply review suggestions [6548ce6] \ No newline at end of file diff --git a/conductor/tracks/mma_data_architecture_dag_engine/spec.md b/conductor/tracks/mma_data_architecture_dag_engine/spec.md deleted file mode 100644 index 15cf3d7..0000000 --- a/conductor/tracks/mma_data_architecture_dag_engine/spec.md +++ /dev/null @@ -1,34 +0,0 @@ -# Track Specification: MMA Data Architecture & DAG Engine - -## Overview -Restructure how `manual_slop` stores and executes work. The current implementation relies on global state and linear execution, which does not support the complexity of multi-agent, task-based workflows. This track establishes a robust, data-oriented foundation using track-scoped state and a native Python Directed Acyclic Graph (DAG) engine. - -## Goals -1. **Track-Scoped State:** Transition away from a single global `manual_slop_history.toml` to a per-track state structure (e.g., `tracks//state.toml`) to manage specific discussion history and context. -2. **Task DAG Engine:** Implement a topological sorter and DAG execution engine in Python to manage dependencies between tasks. -3. **Execution State Machine:** Build an internal state machine that governs whether the DAG auto-advances or waits for manual user intervention to spawn the next worker. - -## Constraints -- Must integrate seamlessly with the existing project TOML structure. -- Avoid external complex dependencies (like Steve Yegge's Beads) for now; rely on standard Python libraries or lightweight custom implementations to ensure tight coupling with the DearPyGui stack. - -## Context & Origins -This track was born from the "Human Verification" phase of the initial MMA Orchestrator prototype (`mma_orchestrator_integration_20260226`). We realized that while the backend API plumbing for the hierarchical MMA tiers (Tiers 1-4) was technically functional, the product lacked the necessary state management, UX visualization, and human-in-the-loop security gates to be usable. - -**Key Takeaways from the Prototype Phase:** -- The Tier 2 (Tech Lead) needs its own track-scoped discussion history, rather than polluting the global project history. -- Tasks within a track require a DAG (Directed Acyclic Graph) engine to manage complex dependencies and blocking states. -- The GUI must visualize this DAG and stream the output of individual workers directly to their associated tasks. -- We must enforce tiered context subsetting so that Tier 3/4 workers don't receive the massive global context blob, and we need a pre-spawn approval modal so the user can intercept, review, and modify worker prompts/contexts before they execute. - -**Instructions for the Implementing Agent:** -As you execute this track, ensure you maintain alignment with the other Phase 2 tracks. If you learn something that impacts the dependent tracks, please append a similar "Context Summary" to their `spec.md` files before concluding your run. - -## Execution Order & Dependencies -This is a multi-track phase. To ensure architectural integrity, these tracks **MUST** be executed in the following strict order: -1. **[CURRENT] MMA Data Architecture & DAG Engine:** (Builds the state and execution foundation) -2. **Tiered Context Scoping & HITL Approval:** (Builds the security and context subsetting on top of the state) -3. **MMA Dashboard Visualization Overhaul:** (Builds the UI to visualize the state and subsets) -4. **Robust Live Simulation Verification:** (Builds the tests to verify the UI and state) - -**Prerequisites for this track:** None. This must be executed FIRST. \ No newline at end of file diff --git a/manualslop_layout.ini b/manualslop_layout.ini index 919e0f7..7904be5 100644 --- a/manualslop_layout.ini +++ b/manualslop_layout.ini @@ -78,8 +78,8 @@ Collapsed=0 DockId=0x0000000F,2 [Window][Theme] -Pos=0,21 -Size=639,824 +Pos=0,17 +Size=393,824 Collapsed=0 DockId=0x00000005,1 @@ -89,14 +89,14 @@ Size=900,700 Collapsed=0 [Window][Diagnostics] -Pos=641,21 -Size=1092,908 +Pos=395,17 +Size=734,545 Collapsed=0 DockId=0x00000010,0 [Window][Context Hub] -Pos=0,21 -Size=639,824 +Pos=0,17 +Size=393,824 Collapsed=0 DockId=0x00000005,0 @@ -107,26 +107,26 @@ Collapsed=0 DockId=0x0000000D,0 [Window][Discussion Hub] -Pos=1735,21 -Size=783,1586 +Pos=1131,17 +Size=549,1183 Collapsed=0 DockId=0x00000004,0 [Window][Operations Hub] -Pos=641,21 -Size=1092,908 +Pos=395,17 +Size=734,545 Collapsed=0 DockId=0x00000010,1 [Window][Files & Media] -Pos=0,847 -Size=639,760 +Pos=0,843 +Size=393,357 Collapsed=0 DockId=0x00000006,1 [Window][AI Settings] -Pos=0,847 -Size=639,760 +Pos=0,843 +Size=393,357 Collapsed=0 DockId=0x00000006,0 @@ -136,14 +136,14 @@ Size=416,325 Collapsed=0 [Window][MMA Dashboard] -Pos=641,931 -Size=1092,676 +Pos=395,564 +Size=734,636 Collapsed=0 DockId=0x00000011,0 [Window][Log Management] -Pos=1735,21 -Size=783,1586 +Pos=1131,17 +Size=549,1183 Collapsed=0 DockId=0x00000004,1 @@ -167,20 +167,20 @@ Column 6 Weight=1.0079 DockNode ID=0x00000008 Pos=3125,170 Size=593,1157 Split=Y DockNode ID=0x00000009 Parent=0x00000008 SizeRef=1029,147 Selected=0x0469CA7A DockNode ID=0x0000000A Parent=0x00000008 SizeRef=1029,145 Selected=0xDF822E02 -DockSpace ID=0xAFC85805 Window=0x079D3A04 Pos=0,21 Size=2518,1586 Split=Y +DockSpace ID=0xAFC85805 Window=0x079D3A04 Pos=0,17 Size=1680,1183 Split=Y DockNode ID=0x0000000C Parent=0xAFC85805 SizeRef=1362,1041 Split=X Selected=0x5D11106F - DockNode ID=0x00000003 Parent=0x0000000C SizeRef=1733,1183 Split=X + DockNode ID=0x00000003 Parent=0x0000000C SizeRef=1129,1183 Split=X DockNode ID=0x0000000B Parent=0x00000003 SizeRef=404,1186 Split=Y Selected=0xF4139CA2 DockNode ID=0x00000002 Parent=0x0000000B SizeRef=1029,1119 Split=X Selected=0xF4139CA2 - DockNode ID=0x00000007 Parent=0x00000002 SizeRef=639,858 Split=Y Selected=0x8CA2375C + DockNode ID=0x00000007 Parent=0x00000002 SizeRef=393,858 Split=Y Selected=0x8CA2375C DockNode ID=0x00000005 Parent=0x00000007 SizeRef=295,824 Selected=0xF4139CA2 DockNode ID=0x00000006 Parent=0x00000007 SizeRef=295,724 CentralNode=1 Selected=0x7BD57D6A - DockNode ID=0x0000000E Parent=0x00000002 SizeRef=1092,858 Split=Y Selected=0x418C7449 - DockNode ID=0x00000010 Parent=0x0000000E SizeRef=868,887 Selected=0x418C7449 - DockNode ID=0x00000011 Parent=0x0000000E SizeRef=868,661 Selected=0x3AEC3498 + DockNode ID=0x0000000E Parent=0x00000002 SizeRef=734,858 Split=Y Selected=0x418C7449 + DockNode ID=0x00000010 Parent=0x0000000E SizeRef=868,545 Selected=0xB4CBF21A + DockNode ID=0x00000011 Parent=0x0000000E SizeRef=868,636 Selected=0x3AEC3498 DockNode ID=0x00000001 Parent=0x0000000B SizeRef=1029,775 Selected=0x8B4EBFA6 DockNode ID=0x0000000D Parent=0x00000003 SizeRef=435,1186 Selected=0x363E93D6 - DockNode ID=0x00000004 Parent=0x0000000C SizeRef=783,1183 Selected=0x6F2B5B04 + DockNode ID=0x00000004 Parent=0x0000000C SizeRef=549,1183 Selected=0x6F2B5B04 DockNode ID=0x0000000F Parent=0xAFC85805 SizeRef=1362,451 Selected=0xDD6419BC ;;;<<>>;;; diff --git a/reproduce_issue.py b/reproduce_issue.py new file mode 100644 index 0000000..98ae53f --- /dev/null +++ b/reproduce_issue.py @@ -0,0 +1,36 @@ +import pytest +from models import Ticket +from dag_engine import TrackDAG, ExecutionEngine + +def test_auto_queue_and_step_mode(): + t1 = Ticket(id="T1", description="Task 1", status="todo", assigned_to="worker") + t2 = Ticket(id="T2", description="Task 2", status="todo", assigned_to="worker", step_mode=True) + + dag = TrackDAG([t1, t2]) + # Expectation: ExecutionEngine takes auto_queue parameter + try: + engine = ExecutionEngine(dag, auto_queue=True) + except TypeError: + pytest.fail("ExecutionEngine does not accept auto_queue parameter") + + # Tick 1: T1 should be 'in-progress' because auto_queue=True + # T2 should remain 'todo' because step_mode=True + engine.tick() + + assert t1.status == "in_progress" + assert t2.status == "todo" + + # Approve T2 + try: + engine.approve_task("T2") + except AttributeError: + pytest.fail("ExecutionEngine does not have approve_task method") + + assert t2.status == "in_progress" + +if __name__ == "__main__": + try: + test_auto_queue_and_step_mode() + print("Test passed (unexpectedly)") + except Exception as e: + print(f"Test failed as expected: {e}") diff --git a/tests/temp_project_history.toml b/tests/temp_project_history.toml index 8bf570b..207ca78 100644 --- a/tests/temp_project_history.toml +++ b/tests/temp_project_history.toml @@ -18,7 +18,7 @@ history = [ [discussions.AutoDisc] git_commit = "" -last_updated = "2026-02-27T19:23:11" +last_updated = "2026-02-27T19:27:19" history = [ "@2026-02-27T19:08:37\nSystem:\n[PERFORMANCE ALERT] Frame time high: 62.2ms. Please consider optimizing recent changes or reducing load.", ] diff --git a/verify_pm_changes.py b/verify_pm_changes.py new file mode 100644 index 0000000..e69de29