# Specification: Code Path & Data Pipeline Analysis (code_path_analysis_20260507) ## Overview A deep architectural audit focused on mapping the "processing routes" and "data pipelines" of the Manual Slop codebase. This analysis will treat the program as a series of data-driven pipelines (similar to Ryan Fleury's model), identifying exactly how data flows through `./src` and `./simulation`. ## Scope - **Core Codebase:** `./src` - **Simulation Infrastructure:** `./simulation` - **Granularity:** Both high-level module interactions and detailed function-to-function execution flows. ## Functional Requirements 1. **Pipeline Mapping:** - Identify major execution "routes" (e.g., UI Event Loop, AI Tool-Call Loop, Context Aggregation Pipeline). - Map these routes from entry point to terminal state. 2. **Data Responsibility Audit:** - For every major path, define which data structures it owns, modifies, or depends upon. - Identify state boundaries and potential "data leaks" or redundant processing. 3. **Simulation Pipeline Audit:** - Fully map the lifecycle of a simulation: State Setup -> Agent Injection -> Execution Loop -> Verification -> Cleanup. 4. **Automated Extraction:** - Utilize MCP tools and potentially custom `tree-sitter` scripts to verify call graphs and data dependencies. ## Acceptance Criteria - [ ] Comprehensive `PIPELINE_ANALYSIS.md` report created in the root. - [ ] Mermaid flowcharts documenting every major processing route. - [ ] Data responsibility table for all mapped paths. - [ ] Full mapping of the `./simulation` pipeline.