# atharva3131/sprint_execution_copilot architecture

> Architecture diagram of the GitHub repository atharva3131/sprint_execution_copilot, generated by GitDiagram from its file tree, README and a sample of source files (last updated 2026-07-20). It is an AI-made overview: check details against the source.

- Interactive diagram: https://gitdiagram.com/atharva3131/sprint_execution_copilot
- Repository: https://github.com/atharva3131/sprint_execution_copilot

## Overview

#### Purpose and Entry Points
Sprint Intelligence converts sprint/task JSON into structured execution intelligence: blockers, risks, prioritized recommendations, progress metrics, standup summaries, and a critical-path execution plan. Primary runtime entry points are `main.py` for local orchestration, `modal_app.py` for GPU-backed inference deployment, and `app/streamlit_app.py` / `ui/app.py` for interactive UI surfaces.

#### Pipeline Orchestration
`core/pipeline.py` is the central workflow boundary: it coordinates model inference, agent analysis, deterministic reasoning, merging, and final output assembly. `core/runner.py` likely provides the executable wrapper around this pipeline, while `core/merge.py` consolidates independently produced agent results into one response. The pipeline separates raw model generation from validated execution-oriented conclusions.

#### Agent Graph and Specialized Analysis
The multi-agent layer is defined by `agents/graph.py`, which composes specialized stages:
- Task interpretation and complexity classification: `agents/task_analyzer.py`
- Dependency/blocker and critical-path analysis: `agents/dependency_agent.py`
- Risk detection and scoring: `agents/risk_agent.py`
- Progress and sprint metrics: `agents/progress_agent.py`
- Recommendation validation/ranking: `agents/critic_agent.py`
- Operational summary generation: `agents/standup_agent.py`

This division makes planning logic explicit rather than relying on one unconstrained LLM response.

#### Deterministic Execution Intelligence
Core planning artifacts and rule-driven augmentation live in `core/execution_plan.py`, `core/impact.py`, and `core/reasoning.py`. These components transform agent findings into ordered actions, evaluate likely execution impact, and retain a transparent reasoning trace. They form the key boundary between probabilistic LLM output and execution-ready recommendations.

#### Model and Schema Boundary
`models/schemas.py` defines the structured contract used between inference, agents, and final consumers. Model adapters isolate provider-specific calls: `models/modal_client.py` targets the deployed fine-tuned model, `models/gemini_client.py` supports Gemini evaluation/comparison, and `models/gpt_oss_client.py` supports an additional open-model backend. `models/your_system.py` appears to expose the repository’s unified model-facing interface.

#### Inference Infrastructure and Evaluation
`modal_app.py` hosts the Modal deployment boundary, described as a FastAPI GPU inference service using a QLoRA-fine-tuned Mistral-7B model on T4 hardware. `core/evaluator.py` compares system outputs across model providers. Training/evaluation examples and mock sprint inputs are stored under `data/sprint_finetune_dataset.jsonl`, `data/mock_data.json`, and `data/dataset_preview.json`.

#### Primary Flow
A caller submits sprint data or a prompt through a local runner, UI, or Modal API. The selected model adapter produces structured candidate analysis; the LangGraph-style agent graph analyzes tasks, dependencies, risks, and progress; the critic validates and prioritizes recommendations. Core reasoning computes impact and execution sequencing, merge logic assembles the result, and consumers receive structured JSON plus an execution plan and reasoning trace.

Main entry points: [`agents/graph.py`](https://github.com/atharva3131/sprint_execution_copilot/blob/main/agents/graph.py) (Agent graph), [`core/pipeline.py`](https://github.com/atharva3131/sprint_execution_copilot/blob/main/core/pipeline.py) (Intelligence pipeline), [`models/your_system.py`](https://github.com/atharva3131/sprint_execution_copilot/blob/main/models/your_system.py) (Unified model interface), [`core/merge.py`](https://github.com/atharva3131/sprint_execution_copilot/blob/main/core/merge.py) (Result merger)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_entry["Entry Surfaces"]
  node_local_main["Local orchestration<br/>Python entry point<br/>[main.py]"]
  node_streamlit_ui["Streamlit UI<br/>interactive UI<br/>[streamlit_app.py]"]
  node_ui_app["UI surface<br/>interactive UI<br/>[app.py]"]
end

subgraph group_workflow["Analysis Workflow"]
  node_runner["Pipeline runner<br/>execution wrapper<br/>[runner.py]"]
  node_pipeline["Intelligence pipeline<br/>workflow orchestrator<br/>[pipeline.py]"]
  node_reasoning["Deterministic reasoning<br/>rule engine<br/>[reasoning.py]"]
  node_impact["Impact evaluation<br/>planning logic<br/>[impact.py]"]
  node_execution_plan["Execution plan<br/>planning artifact<br/>[execution_plan.py]"]
  node_merge["Result merger<br/>output consolidation<br/>[merge.py]"]
  node_evaluator["Provider evaluator<br/>evaluation workflow<br/>[evaluator.py]"]
end

subgraph group_agents["Specialist Agents"]
  node_agent_graph["Agent graph<br/>multi-agent orchestrator<br/>[graph.py]"]
  node_task_agent["Task analysis<br/>specialist agent<br/>[task_analyzer.py]"]
  node_dependency_agent["Dependency analysis<br/>specialist agent"]
  node_risk_agent["Risk analysis<br/>specialist agent<br/>[risk_agent.py]"]
  node_progress_agent["Progress metrics<br/>specialist agent<br/>[progress_agent.py]"]
  node_critic_agent["Recommendation critic<br/>specialist agent<br/>[critic_agent.py]"]
  node_standup_agent["Standup summary<br/>specialist agent<br/>[standup_agent.py]"]
end

subgraph group_model["Model Boundary"]
  node_schemas["Structured contracts<br/>schemas<br/>[schemas.py]"]
  node_model_interface["Unified model interface<br/>model facade<br/>[your_system.py]"]
  node_modal_client["Modal model adapter<br/>provider adapter<br/>[modal_client.py]"]
  node_gemini_client["Gemini adapter<br/>provider adapter<br/>[gemini_client.py]"]
  node_gpt_oss_client["Open-model adapter<br/>provider adapter<br/>[gpt_oss_client.py]"]
end

subgraph group_deploy["Inference Deployment"]
  node_modal_app{{"GPU inference API<br/>Modal FastAPI service<br/>[modal_app.py]"}}
end

node_local_main -->|"starts"| node_runner
node_runner -->|"executes"| node_pipeline
node_streamlit_ui -->|"submits sprint input"| node_pipeline
node_ui_app -->|"submits sprint input"| node_pipeline
node_pipeline -->|"requests candidate analysis"| node_model_interface
node_model_interface -->|"selects backend"| node_modal_client
node_model_interface -->|"selects backend"| node_gemini_client
node_model_interface -->|"selects backend"| node_gpt_oss_client
node_modal_client -->|"calls inference API"| node_modal_app
node_pipeline -->|"dispatches structured analysis"| node_agent_graph
node_agent_graph -->|"analyzes tasks"| node_task_agent
node_agent_graph -->|"analyzes dependencies"| node_dependency_agent
node_agent_graph -->|"scores risks"| node_risk_agent
node_agent_graph -->|"computes progress"| node_progress_agent
node_agent_graph -->|"validates recommendations"| node_critic_agent
node_agent_graph -->|"creates summary"| node_standup_agent
node_agent_graph -->|"provides findings"| node_reasoning
node_reasoning -->|"evaluates execution impact"| node_impact
node_impact -->|"sequences actions"| node_execution_plan
node_pipeline -->|"assembles final response"| node_merge
node_agent_graph -->|"contributes analysis"| node_merge
node_execution_plan -->|"contributes plan and trace"| node_merge
node_schemas -.->|"defines input/output contract"| node_pipeline
node_schemas -.->|"defines agent contract"| node_agent_graph
node_evaluator -->|"compares providers"| node_model_interface

click node_local_main "https://github.com/atharva3131/sprint_execution_copilot/blob/main/main.py"
click node_runner "https://github.com/atharva3131/sprint_execution_copilot/blob/main/core/runner.py"
click node_streamlit_ui "https://github.com/atharva3131/sprint_execution_copilot/blob/main/app/streamlit_app.py"
click node_ui_app "https://github.com/atharva3131/sprint_execution_copilot/blob/main/ui/app.py"
click node_pipeline "https://github.com/atharva3131/sprint_execution_copilot/blob/main/core/pipeline.py"
click node_schemas "https://github.com/atharva3131/sprint_execution_copilot/blob/main/models/schemas.py"
click node_model_interface "https://github.com/atharva3131/sprint_execution_copilot/blob/main/models/your_system.py"
click node_modal_client "https://github.com/atharva3131/sprint_execution_copilot/blob/main/models/modal_client.py"
click node_gemini_client "https://github.com/atharva3131/sprint_execution_copilot/blob/main/models/gemini_client.py"
click node_gpt_oss_client "https://github.com/atharva3131/sprint_execution_copilot/blob/main/models/gpt_oss_client.py"
click node_agent_graph "https://github.com/atharva3131/sprint_execution_copilot/blob/main/agents/graph.py"
click node_task_agent "https://github.com/atharva3131/sprint_execution_copilot/blob/main/agents/task_analyzer.py"
click node_dependency_agent "https://github.com/atharva3131/sprint_execution_copilot/blob/main/agents/dependency_agent.py"
click node_risk_agent "https://github.com/atharva3131/sprint_execution_copilot/blob/main/agents/risk_agent.py"
click node_progress_agent "https://github.com/atharva3131/sprint_execution_copilot/blob/main/agents/progress_agent.py"
click node_critic_agent "https://github.com/atharva3131/sprint_execution_copilot/blob/main/agents/critic_agent.py"
click node_standup_agent "https://github.com/atharva3131/sprint_execution_copilot/blob/main/agents/standup_agent.py"
click node_reasoning "https://github.com/atharva3131/sprint_execution_copilot/blob/main/core/reasoning.py"
click node_impact "https://github.com/atharva3131/sprint_execution_copilot/blob/main/core/impact.py"
click node_execution_plan "https://github.com/atharva3131/sprint_execution_copilot/blob/main/core/execution_plan.py"
click node_merge "https://github.com/atharva3131/sprint_execution_copilot/blob/main/core/merge.py"
click node_modal_app "https://github.com/atharva3131/sprint_execution_copilot/blob/main/modal_app.py"
click node_evaluator "https://github.com/atharva3131/sprint_execution_copilot/blob/main/core/evaluator.py"

classDef toneNeutral fill:#f8fafc,stroke:#334155,stroke-width:1.5px,color:#0f172a
classDef toneBlue fill:#dbeafe,stroke:#2563eb,stroke-width:1.5px,color:#172554
classDef toneAmber fill:#fef3c7,stroke:#d97706,stroke-width:1.5px,color:#78350f
classDef toneMint fill:#dcfce7,stroke:#16a34a,stroke-width:1.5px,color:#14532d
classDef toneRose fill:#ffe4e6,stroke:#e11d48,stroke-width:1.5px,color:#881337
classDef toneIndigo fill:#e0e7ff,stroke:#4f46e5,stroke-width:1.5px,color:#312e81
classDef toneTeal fill:#ccfbf1,stroke:#0f766e,stroke-width:1.5px,color:#134e4a
class node_local_main,node_streamlit_ui,node_ui_app toneBlue
class node_runner,node_pipeline,node_reasoning,node_impact,node_execution_plan,node_merge,node_evaluator toneAmber
class node_agent_graph,node_task_agent,node_dependency_agent,node_risk_agent,node_progress_agent,node_critic_agent,node_standup_agent toneMint
class node_schemas,node_model_interface,node_modal_client,node_gemini_client,node_gpt_oss_client toneRose
class node_modal_app toneIndigo
```

## Components

### Entry Surfaces

- [Local orchestration](https://github.com/atharva3131/sprint_execution_copilot/blob/main/main.py): Python entry point · `main.py`
- [Streamlit UI](https://github.com/atharva3131/sprint_execution_copilot/blob/main/app/streamlit_app.py): interactive UI · `app/streamlit_app.py`
- [UI surface](https://github.com/atharva3131/sprint_execution_copilot/blob/main/ui/app.py): interactive UI · `ui/app.py`

### Analysis Workflow

- [Pipeline runner](https://github.com/atharva3131/sprint_execution_copilot/blob/main/core/runner.py): execution wrapper · `core/runner.py`
- [Intelligence pipeline](https://github.com/atharva3131/sprint_execution_copilot/blob/main/core/pipeline.py): workflow orchestrator · Coordinates inference, agents, reasoning, merging, and output assembly. · `core/pipeline.py`
- [Deterministic reasoning](https://github.com/atharva3131/sprint_execution_copilot/blob/main/core/reasoning.py): rule engine · Produces transparent execution-oriented conclusions. · `core/reasoning.py`
- [Impact evaluation](https://github.com/atharva3131/sprint_execution_copilot/blob/main/core/impact.py): planning logic · `core/impact.py`
- [Execution plan](https://github.com/atharva3131/sprint_execution_copilot/blob/main/core/execution_plan.py): planning artifact · Orders prioritized actions into a critical-path plan. · `core/execution_plan.py`
- [Result merger](https://github.com/atharva3131/sprint_execution_copilot/blob/main/core/merge.py): output consolidation · `core/merge.py`
- [Provider evaluator](https://github.com/atharva3131/sprint_execution_copilot/blob/main/core/evaluator.py): evaluation workflow · Compares outputs across model providers. · `core/evaluator.py`

### Specialist Agents

- [Agent graph](https://github.com/atharva3131/sprint_execution_copilot/blob/main/agents/graph.py): multi-agent orchestrator · `agents/graph.py`
- [Task analysis](https://github.com/atharva3131/sprint_execution_copilot/blob/main/agents/task_analyzer.py): specialist agent · Interprets tasks and classifies complexity. · `agents/task_analyzer.py`
- [Dependency analysis](https://github.com/atharva3131/sprint_execution_copilot/blob/main/agents/dependency_agent.py): specialist agent · Finds blockers and critical-path dependencies. · `agents/dependency_agent.py`
- [Risk analysis](https://github.com/atharva3131/sprint_execution_copilot/blob/main/agents/risk_agent.py): specialist agent · `agents/risk_agent.py`
- [Progress metrics](https://github.com/atharva3131/sprint_execution_copilot/blob/main/agents/progress_agent.py): specialist agent · `agents/progress_agent.py`
- [Recommendation critic](https://github.com/atharva3131/sprint_execution_copilot/blob/main/agents/critic_agent.py): specialist agent · Validates and ranks recommendations. · `agents/critic_agent.py`
- [Standup summary](https://github.com/atharva3131/sprint_execution_copilot/blob/main/agents/standup_agent.py): specialist agent · `agents/standup_agent.py`

### Model Boundary

- [Structured contracts](https://github.com/atharva3131/sprint_execution_copilot/blob/main/models/schemas.py): schemas · Contract shared by inference, analysis, and consumers. · `models/schemas.py`
- [Unified model interface](https://github.com/atharva3131/sprint_execution_copilot/blob/main/models/your_system.py): model facade · `models/your_system.py`
- [Modal model adapter](https://github.com/atharva3131/sprint_execution_copilot/blob/main/models/modal_client.py): provider adapter · `models/modal_client.py`
- [Gemini adapter](https://github.com/atharva3131/sprint_execution_copilot/blob/main/models/gemini_client.py): provider adapter · `models/gemini_client.py`
- [Open-model adapter](https://github.com/atharva3131/sprint_execution_copilot/blob/main/models/gpt_oss_client.py): provider adapter · `models/gpt_oss_client.py`

### Inference Deployment

- [GPU inference API](https://github.com/atharva3131/sprint_execution_copilot/blob/main/modal_app.py): Modal FastAPI service · Hosts QLoRA-fine-tuned Mistral-7B inference on T4 GPUs. · `modal_app.py`

## Connections

- Local orchestration → Pipeline runner: starts
- Pipeline runner → Intelligence pipeline: executes
- Streamlit UI → Intelligence pipeline: submits sprint input
- UI surface → Intelligence pipeline: submits sprint input
- Intelligence pipeline → Unified model interface: requests candidate analysis
- Unified model interface → Modal model adapter: selects backend
- Unified model interface → Gemini adapter: selects backend
- Unified model interface → Open-model adapter: selects backend
- Modal model adapter → GPU inference API: calls inference API
- Intelligence pipeline → Agent graph: dispatches structured analysis
- Agent graph → Task analysis: analyzes tasks
- Agent graph → Dependency analysis: analyzes dependencies
- Agent graph → Risk analysis: scores risks
- Agent graph → Progress metrics: computes progress
- Agent graph → Recommendation critic: validates recommendations
- Agent graph → Standup summary: creates summary
- Agent graph → Deterministic reasoning: provides findings
- Deterministic reasoning → Impact evaluation: evaluates execution impact
- Impact evaluation → Execution plan: sequences actions
- Intelligence pipeline → Result merger: assembles final response
- Agent graph → Result merger: contributes analysis
- Execution plan → Result merger: contributes plan and trace
- Structured contracts → Intelligence pipeline: defines input/output contract
- Structured contracts → Agent graph: defines agent contract
- Provider evaluator → Unified model interface: compares providers
