From 82f73e7267cda87ebd7c93d505038f7a0d9325af Mon Sep 17 00:00:00 2001 From: Ed_ Date: Fri, 27 Feb 2026 23:04:01 -0500 Subject: [PATCH] fix(conductor): Apply review suggestions for track 'tiered_context_scoping_hitl_approval' --- conductor/tech-stack.md | 2 +- multi_agent_conductor.py | 10 ++++------ 2 files changed, 5 insertions(+), 7 deletions(-) diff --git a/conductor/tech-stack.md b/conductor/tech-stack.md index af5685d..ec21208 100644 --- a/conductor/tech-stack.md +++ b/conductor/tech-stack.md @@ -27,7 +27,7 @@ ## Configuration & Tooling -- **tree-sitter & tree-sitter-python:** For deterministic AST parsing and automated generation of curated "Skeleton Views" (signatures and docstrings) to minimize context bloat for sub-agents. +- **ast (Standard Library):** For deterministic AST parsing and automated generation of curated "Skeleton Views" (signatures and docstrings) to minimize context bloat for sub-agents. - **pydantic / dataclasses:** For defining strict state schemas (Tracks, Tickets) used in linear orchestration. - **tomli-w:** For writing TOML configuration files. - **tomllib:** For native TOML parsing (Python 3.11+). diff --git a/multi_agent_conductor.py b/multi_agent_conductor.py index 5cb186a..ce5e2a8 100644 --- a/multi_agent_conductor.py +++ b/multi_agent_conductor.py @@ -1,6 +1,8 @@ import ai_client import json import asyncio +import threading +import time from typing import List, Optional, Tuple from dataclasses import asdict import events @@ -146,9 +148,6 @@ def confirm_execution(payload: str, event_queue: events.AsyncEventQueue, ticket_ """ Pushes an approval request to the GUI and waits for response. """ - import threading - import time - import asyncio # We use a list container so the GUI can inject the actual Dialog object back to us # since the dialog is created in the GUI thread. dialog_container = [None] @@ -187,9 +186,6 @@ def confirm_spawn(role: str, prompt: str, context_md: str, event_queue: events.A Pushes a spawn approval request to the GUI and waits for response. Returns (approved, modified_prompt, modified_context) """ - import threading - import time - import asyncio dialog_container = [None] @@ -238,6 +234,8 @@ def confirm_spawn(role: str, prompt: str, context_md: str, event_queue: events.A return approved, modified_prompt, modified_context return False, prompt, context_md + + def run_worker_lifecycle(ticket: Ticket, context: WorkerContext, context_files: List[str] = None, event_queue: events.AsyncEventQueue = None, engine: Optional['ConductorEngine'] = None, md_content: str = ""): """ Simulates the lifecycle of a single agent working on a ticket.