chore(conductor): Archive strategic overview and split into granular tracks

This commit is contained in:
2026-05-07 22:06:13 -04:00
parent 822d803ad8
commit d8022d841e
17 changed files with 147 additions and 4 deletions
@@ -0,0 +1,5 @@
# Track ai_interaction_call_graph_20260507 Context
- [Specification](./spec.md)
- [Implementation Plan](./plan.md)
- [Metadata](./metadata.json)
@@ -0,0 +1,8 @@
{
"track_id": "ai_interaction_call_graph_20260507",
"type": "chore",
"status": "new",
"created_at": "2026-05-07T16:00:00Z",
"updated_at": "2026-05-07T16:00:00Z",
"description": "Exhaustive function-to-function call graph tracing the AI loop from request to terminal execution."
}
@@ -0,0 +1,11 @@
# Implementation Plan: AI Interaction Call Graph (ai_interaction_call_graph_20260507)
## Phase 1: Trace Mapping
- [ ] Task: Use `py_find_usages` to trace `ai_client.send` callers and callees.
- [ ] Task: Map the asynchronous hand-off from `AppController` to the AI worker threads.
- [ ] Task: Trace the recursion depth of the tool-call loop (`MAX_TOOL_ROUNDS`).
## Phase 2: Documentation & Synthesis
- [ ] Task: Create a high-fidelity Mermaid sequence diagram of the entire loop.
- [ ] Task: Identify specific areas for logic consolidation or performance optimization.
- [ ] Task: Conductor - User Manual Verification 'Final Review' (Protocol in workflow.md)
@@ -0,0 +1,22 @@
# Specification: AI Interaction Call Graph (ai_interaction_call_graph_20260507)
## Overview
A low-level technical trace of the AI interaction loop. The goal is to map every single function call and data hand-off from the moment a user message is sent to the final terminal execution of a PowerShell script or tool result.
## Scope
- **Entry Point:** `src/gui_2.py:App._render_discussion_panel` (Send button action).
- **Subsystems:** `ai_client.py`, `mcp_client.py`, `shell_runner.py`, `app_controller.py`.
## Functional Requirements
1. **Call Graph Generation:**
- Document the sequence of synchronous and asynchronous calls.
- Identify thread boundaries (GUI thread vs. Background worker thread).
2. **Data Transformation Trace:**
- Track the transformation of a message: raw text -> GenerateRequest -> AI History -> Provider Prompt -> AI Response -> Tool Call -> PS Script.
3. **Error & Retry Paths:**
- Map how exceptions are caught, classified, and bubbled back to the UI.
## Acceptance Criteria
- [ ] Detailed call graph in Mermaid format.
- [ ] List of all internal private methods involved in the loop.
- [ ] Identification of any blocking calls in the async pipeline.