# rama-l7/hackwithhyderabad-3 architecture

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

- Interactive diagram: https://gitdiagram.com/rama-l7/hackwithhyderabad-3
- Repository: https://github.com/rama-l7/hackwithhyderabad-3

## Overview

This is an implemented Engineering Debugging Agent, despite the README’s older pre-planning status statement. Its principal workflow takes an engineer’s issue, normalizes it, recalls and classifies past cases, gathers current evidence, proposes hypotheses, obtains engineer verification and a resolution, then retains an eligible case. The README also documents interactive and JSON/YAML inputs, Hindsight and offline memory, LLM-backed reasoning, seed loading, and session inspection. Source excerpts and the index support the main stage boundaries; unsampled integrations are shown only where documented or wired by indexed references.

Main entry points: [`src/debugagent/pipeline/investigate.py`](https://github.com/rama-l7/hackwithhyderabad-3/blob/main/src/debugagent/pipeline/investigate.py) (Investigation), [`src/debugagent/pipeline/memory_adapter.py`](https://github.com/rama-l7/hackwithhyderabad-3/blob/main/src/debugagent/pipeline/memory_adapter.py) (Memory Adapter), [`src/debugagent/cli.py`](https://github.com/rama-l7/hackwithhyderabad-3/blob/main/src/debugagent/cli.py) (CLI), [`src/debugagent/memory/hindsight_store.py`](https://github.com/rama-l7/hackwithhyderabad-3/blob/main/src/debugagent/memory/hindsight_store.py) (Hindsight Store)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_workflow["Investigation Workflow"]
  node_input["Issue Input<br/>[ingest.py]"]
  node_investigation["Investigation<br/>[investigate.py]"]
  node_normalize["Normalization<br/>[normalize.py]"]
  node_types["Pipeline Types<br/>[types.py]"]
  node_inspecttrace["Session Trace<br/>[cli.py]"]
end

subgraph group_memory["Memory System"]
  node_schemas["Memory Schemas<br/>[schemas.py]"]
  node_recall["Recall Matching<br/>[recall_match.py]"]
  node_memoryport["Memory Port<br/>[memory_port.py]"]
  node_adapter["Memory Adapter<br/>[memory_adapter.py]"]
  node_matching["Relevance Matching<br/>[matching.py]"]
  node_store["Memory Store Interface<br/>[store.py]"]
  node_hindsight["Hindsight Store<br/>[hindsight_store.py]"]
  node_offline[("Offline Memory<br/>[store.py]")]
  node_hindsight_service[("Hindsight Service")]
  node_seedloader["Seed Loader<br/>[loader.py]"]
  node_seedcases["Seed Cases<br/>[cases.json]"]
end

subgraph group_reasoning["Reasoning and Evidence"]
  node_evidence["Evidence Gathering<br/>[evidence.py]"]
  node_hypothesize["Hypothesis Generation<br/>[hypothesize.py]"]
  node_verify["Engineer Verification<br/>[verify.py]"]
  node_render["Result Rendering<br/>[render.py]"]
end

subgraph group_interfaces["User and Providers"]
  node_cli["CLI<br/>[cli.py]"]
  node_llmrouter["LLM Router<br/>[router.py]"]
  node_llmprovider{{"LLM Provider"}}
  node_config["Agent Configuration<br/>[config.py]"]
end

subgraph group_probes["M0 Probes"]
  node_m0config["Probe Configuration<br/>[config.py]"]
  node_m0hindsight["Hindsight Probe<br/>[hindsight_probe.py]"]
  node_m0llm["LLM Probe<br/>[llm_probe.py]"]
  node_m0recorder["Probe Results"]
end

node_engineer(("Engineer"))

node_engineer -->|"starts session"| node_cli
node_cli -->|"loads issue"| node_input
node_cli -->|"runs investigation"| node_investigation
node_cli -->|"reads trace"| node_inspecttrace
node_investigation -->|"normalizes"| node_normalize
node_investigation -->|"recalls cases"| node_recall
node_investigation -->|"builds evidence"| node_evidence
node_investigation -->|"generates proposals"| node_hypothesize
node_investigation -->|"collects decisions"| node_verify
node_investigation -->|"requests decisions"| node_engineer
node_investigation -->|"renders results"| node_render
node_investigation -->|"retains case"| node_memoryport
node_input -->|"creates input"| node_types
node_normalize -->|"produces case"| node_types
node_recall -->|"requests recall"| node_memoryport
node_memoryport -->|"implemented by"| node_adapter
node_adapter -->|"uses interface"| node_store
node_adapter -->|"classifies results"| node_matching
node_adapter -->|"selects backend"| node_hindsight
node_adapter -->|"selects backend"| node_offline
node_hindsight -->|"implements contract"| node_store
node_hindsight -->|"validates cases"| node_schemas
node_hindsight -.->|"calls service"| node_hindsight_service
node_matching -->|"classifies recalls"| node_schemas
node_seedloader -->|"loads cases"| node_seedcases
node_seedloader -->|"retains seeds"| node_store
node_verify -->|"uses types"| node_types
node_evidence -->|"builds evidence"| node_types
node_hypothesize -->|"uses recall"| node_recall
node_hypothesize -.->|"requests reasoning"| node_llmrouter
node_llmrouter -.->|"calls provider"| node_llmprovider
node_cli -->|"loads settings"| node_config
node_m0hindsight -->|"uses settings"| node_m0config
node_m0llm -->|"uses settings"| node_m0config
node_m0hindsight -->|"records results"| node_m0recorder
node_m0llm -->|"records results"| node_m0recorder

click node_cli "https://github.com/rama-l7/hackwithhyderabad-3/blob/main/src/debugagent/cli.py"
click node_input "https://github.com/rama-l7/hackwithhyderabad-3/blob/main/src/debugagent/pipeline/ingest.py"
click node_investigation "https://github.com/rama-l7/hackwithhyderabad-3/blob/main/src/debugagent/pipeline/investigate.py"
click node_normalize "https://github.com/rama-l7/hackwithhyderabad-3/blob/main/src/debugagent/pipeline/normalize.py"
click node_types "https://github.com/rama-l7/hackwithhyderabad-3/blob/main/src/debugagent/pipeline/types.py"
click node_schemas "https://github.com/rama-l7/hackwithhyderabad-3/blob/main/src/debugagent/schemas.py"
click node_recall "https://github.com/rama-l7/hackwithhyderabad-3/blob/main/src/debugagent/pipeline/recall_match.py"
click node_memoryport "https://github.com/rama-l7/hackwithhyderabad-3/blob/main/src/debugagent/pipeline/memory_port.py"
click node_adapter "https://github.com/rama-l7/hackwithhyderabad-3/blob/main/src/debugagent/pipeline/memory_adapter.py"
click node_matching "https://github.com/rama-l7/hackwithhyderabad-3/blob/main/src/debugagent/memory/matching.py"
click node_store "https://github.com/rama-l7/hackwithhyderabad-3/blob/main/src/debugagent/memory/store.py"
click node_hindsight "https://github.com/rama-l7/hackwithhyderabad-3/blob/main/src/debugagent/memory/hindsight_store.py"
click node_offline "https://github.com/rama-l7/hackwithhyderabad-3/blob/main/src/debugagent/memory/store.py"
click node_evidence "https://github.com/rama-l7/hackwithhyderabad-3/blob/main/src/debugagent/pipeline/evidence.py"
click node_hypothesize "https://github.com/rama-l7/hackwithhyderabad-3/blob/main/src/debugagent/pipeline/hypothesize.py"
click node_verify "https://github.com/rama-l7/hackwithhyderabad-3/blob/main/src/debugagent/pipeline/verify.py"
click node_render "https://github.com/rama-l7/hackwithhyderabad-3/blob/main/src/debugagent/pipeline/render.py"
click node_llmrouter "https://github.com/rama-l7/hackwithhyderabad-3/blob/main/src/debugagent/llm/router.py"
click node_config "https://github.com/rama-l7/hackwithhyderabad-3/blob/main/src/debugagent/config.py"
click node_seedloader "https://github.com/rama-l7/hackwithhyderabad-3/blob/main/src/debugagent/seeds/loader.py"
click node_seedcases "https://github.com/rama-l7/hackwithhyderabad-3/blob/main/src/debugagent/seeds/cases.json"
click node_m0config "https://github.com/rama-l7/hackwithhyderabad-3/blob/main/m0/config.py"
click node_m0hindsight "https://github.com/rama-l7/hackwithhyderabad-3/blob/main/m0/hindsight_probe.py"
click node_m0llm "https://github.com/rama-l7/hackwithhyderabad-3/blob/main/m0/llm_probe.py"
click node_m0recorder "https://github.com/rama-l7/hackwithhyderabad-3/blob/main/m0/results_recorder.py"
click node_inspecttrace "https://github.com/rama-l7/hackwithhyderabad-3/blob/main/src/debugagent/cli.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_input,node_investigation,node_normalize,node_types,node_inspecttrace toneBlue
class node_schemas,node_recall,node_memoryport,node_adapter,node_matching,node_store,node_hindsight,node_offline,node_hindsight_service,node_seedloader,node_seedcases toneAmber
class node_evidence,node_hypothesize,node_verify,node_render toneMint
class node_cli,node_llmrouter,node_llmprovider,node_config toneRose
class node_m0config,node_m0hindsight,node_m0llm,node_m0recorder,node_engineer toneIndigo
```

## Components

### Investigation Workflow

- [Issue Input](https://github.com/rama-l7/hackwithhyderabad-3/blob/main/src/debugagent/pipeline/ingest.py): `src/debugagent/pipeline/ingest.py`
- [Investigation](https://github.com/rama-l7/hackwithhyderabad-3/blob/main/src/debugagent/pipeline/investigate.py): `src/debugagent/pipeline/investigate.py`
- [Normalization](https://github.com/rama-l7/hackwithhyderabad-3/blob/main/src/debugagent/pipeline/normalize.py): `src/debugagent/pipeline/normalize.py`
- [Pipeline Types](https://github.com/rama-l7/hackwithhyderabad-3/blob/main/src/debugagent/pipeline/types.py): `src/debugagent/pipeline/types.py`
- [Session Trace](https://github.com/rama-l7/hackwithhyderabad-3/blob/main/src/debugagent/cli.py): `src/debugagent/cli.py`

### Memory System

- [Memory Schemas](https://github.com/rama-l7/hackwithhyderabad-3/blob/main/src/debugagent/schemas.py): `src/debugagent/schemas.py`
- [Recall Matching](https://github.com/rama-l7/hackwithhyderabad-3/blob/main/src/debugagent/pipeline/recall_match.py): `src/debugagent/pipeline/recall_match.py`
- [Memory Port](https://github.com/rama-l7/hackwithhyderabad-3/blob/main/src/debugagent/pipeline/memory_port.py): `src/debugagent/pipeline/memory_port.py`
- [Memory Adapter](https://github.com/rama-l7/hackwithhyderabad-3/blob/main/src/debugagent/pipeline/memory_adapter.py): `src/debugagent/pipeline/memory_adapter.py`
- [Relevance Matching](https://github.com/rama-l7/hackwithhyderabad-3/blob/main/src/debugagent/memory/matching.py): `src/debugagent/memory/matching.py`
- [Memory Store Interface](https://github.com/rama-l7/hackwithhyderabad-3/blob/main/src/debugagent/memory/store.py): `src/debugagent/memory/store.py`
- [Hindsight Store](https://github.com/rama-l7/hackwithhyderabad-3/blob/main/src/debugagent/memory/hindsight_store.py): `src/debugagent/memory/hindsight_store.py`
- [Offline Memory](https://github.com/rama-l7/hackwithhyderabad-3/blob/main/src/debugagent/memory/store.py): `src/debugagent/memory/store.py`
- **Hindsight Service**
- [Seed Loader](https://github.com/rama-l7/hackwithhyderabad-3/blob/main/src/debugagent/seeds/loader.py): `src/debugagent/seeds/loader.py`
- [Seed Cases](https://github.com/rama-l7/hackwithhyderabad-3/blob/main/src/debugagent/seeds/cases.json): `src/debugagent/seeds/cases.json`

### Reasoning and Evidence

- [Evidence Gathering](https://github.com/rama-l7/hackwithhyderabad-3/blob/main/src/debugagent/pipeline/evidence.py): `src/debugagent/pipeline/evidence.py`
- [Hypothesis Generation](https://github.com/rama-l7/hackwithhyderabad-3/blob/main/src/debugagent/pipeline/hypothesize.py): `src/debugagent/pipeline/hypothesize.py`
- [Engineer Verification](https://github.com/rama-l7/hackwithhyderabad-3/blob/main/src/debugagent/pipeline/verify.py): `src/debugagent/pipeline/verify.py`
- [Result Rendering](https://github.com/rama-l7/hackwithhyderabad-3/blob/main/src/debugagent/pipeline/render.py): `src/debugagent/pipeline/render.py`

### User and Providers

- [CLI](https://github.com/rama-l7/hackwithhyderabad-3/blob/main/src/debugagent/cli.py): `src/debugagent/cli.py`
- [LLM Router](https://github.com/rama-l7/hackwithhyderabad-3/blob/main/src/debugagent/llm/router.py): `src/debugagent/llm/router.py`
- **LLM Provider**
- [Agent Configuration](https://github.com/rama-l7/hackwithhyderabad-3/blob/main/src/debugagent/config.py): `src/debugagent/config.py`

### M0 Probes

- [Probe Configuration](https://github.com/rama-l7/hackwithhyderabad-3/blob/main/m0/config.py): `m0/config.py`
- [Hindsight Probe](https://github.com/rama-l7/hackwithhyderabad-3/blob/main/m0/hindsight_probe.py): `m0/hindsight_probe.py`
- [LLM Probe](https://github.com/rama-l7/hackwithhyderabad-3/blob/main/m0/llm_probe.py): `m0/llm_probe.py`
- [Probe Results](https://github.com/rama-l7/hackwithhyderabad-3/blob/main/m0/results_recorder.py): `m0/results_recorder.py`

### Other components

- **Engineer**

## Connections

- Engineer → CLI: starts session (evidence: `README.md`)
- CLI → Issue Input: loads issue (evidence: `README.md`)
- CLI → Investigation: runs investigation (evidence: `src/debugagent/cli.py`)
- CLI → Session Trace: reads trace (evidence: `src/debugagent/cli.py`)
- Investigation → Normalization: normalizes (evidence: `src/debugagent/pipeline/investigate.py`)
- Investigation → Recall Matching: recalls cases (evidence: `src/debugagent/pipeline/investigate.py`)
- Investigation → Evidence Gathering: builds evidence (evidence: `src/debugagent/pipeline/investigate.py`)
- Investigation → Hypothesis Generation: generates proposals (evidence: `src/debugagent/pipeline/investigate.py`)
- Investigation → Engineer Verification: collects decisions (evidence: `src/debugagent/pipeline/investigate.py`)
- Investigation → Engineer: requests decisions (evidence: `src/debugagent/pipeline/investigate.py`)
- Investigation → Result Rendering: renders results (evidence: `src/debugagent/pipeline/investigate.py`)
- Investigation → Memory Port: retains case (evidence: `src/debugagent/pipeline/investigate.py`)
- Issue Input → Pipeline Types: creates input (evidence: `src/debugagent/pipeline/ingest.py`)
- Normalization → Pipeline Types: produces case (evidence: `src/debugagent/pipeline/normalize.py`)
- Recall Matching → Memory Port: requests recall (evidence: `src/debugagent/pipeline/recall_match.py`)
- Memory Port → Memory Adapter: implemented by (evidence: `src/debugagent/pipeline/memory_adapter.py`)
- Memory Adapter → Memory Store Interface: uses interface (evidence: `src/debugagent/pipeline/memory_adapter.py`)
- Memory Adapter → Relevance Matching: classifies results (evidence: `src/debugagent/pipeline/memory_adapter.py`)
- Memory Adapter → Hindsight Store: selects backend (evidence: `src/debugagent/pipeline/memory_adapter.py`)
- Memory Adapter → Offline Memory: selects backend (evidence: `README.md`)
- Hindsight Store → Memory Store Interface: implements contract (evidence: `src/debugagent/memory/hindsight_store.py`)
- Hindsight Store → Memory Schemas: validates cases (evidence: `src/debugagent/memory/hindsight_store.py`)
- Hindsight Store → Hindsight Service: calls service
- Relevance Matching → Memory Schemas: classifies recalls (evidence: `src/debugagent/memory/matching.py`)
- Seed Loader → Seed Cases: loads cases (evidence: `src/debugagent/seeds/loader.py`)
- Seed Loader → Memory Store Interface: retains seeds (evidence: `src/debugagent/seeds/loader.py`)
- Engineer Verification → Pipeline Types: uses types (evidence: `src/debugagent/pipeline/verify.py`)
- Evidence Gathering → Pipeline Types: builds evidence (evidence: `src/debugagent/pipeline/evidence.py`)
- Hypothesis Generation → Recall Matching: uses recall (evidence: `src/debugagent/pipeline/hypothesize.py`)
- Hypothesis Generation → LLM Router: requests reasoning
- LLM Router → LLM Provider: calls provider
- CLI → Agent Configuration: loads settings (evidence: `README.md`)
- Hindsight Probe → Probe Configuration: uses settings (evidence: `m0/hindsight_probe.py`)
- LLM Probe → Probe Configuration: uses settings (evidence: `m0/llm_probe.py`)
- Hindsight Probe → Probe Results: records results (evidence: `m0/hindsight_probe.py`)
- LLM Probe → Probe Results: records results (evidence: `m0/llm_probe.py`)
