# jasirdeen007/multi-agent-software-defect-prediction architecture

> Architecture diagram of the GitHub repository jasirdeen007/multi-agent-software-defect-prediction, generated by GitDiagram from its file tree, README and a sample of source files (last updated 2026-10-04). It is an AI-made overview: check details against the source.

- Interactive diagram: https://gitdiagram.com/jasirdeen007/multi-agent-software-defect-prediction
- Repository: https://github.com/jasirdeen007/multi-agent-software-defect-prediction

## Overview

AgentTriage is a BugHub issue-label research pipeline: prepare and explore issue data, then train/evaluate defect-prediction baselines and audit labels with specialized agents and a judge. The README identifies data preparation and EDA as the current phase; the tree and source index also show baseline and auditing capabilities. Some relationships are explicit in excerpts or the README; unsampled subsystem internals are represented without inferred call chains.

Main entry points: [`src/agents/orchestrator.py`](https://github.com/jasirdeen007/multi-agent-software-defect-prediction/blob/main/src/agents/orchestrator.py) (Audit runner), [`src/baseline/run_baseline.py`](https://github.com/jasirdeen007/multi-agent-software-defect-prediction/blob/main/src/baseline/run_baseline.py) (Baseline runner), [`src/agents/base_agent.py`](https://github.com/jasirdeen007/multi-agent-software-defect-prediction/blob/main/src/agents/base_agent.py) (LLM agent client), [`src/agents/data_agent.py`](https://github.com/jasirdeen007/multi-agent-software-defect-prediction/blob/main/src/agents/data_agent.py) (Metadata agent)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_data["Data preparation"]
  node_prep["Dataset preprocessing"]
  node_eda["EDA pipeline"]
  node_canonical[("Canonical dataset")]
end

subgraph group_baseline["Prediction baseline"]
  node_baseline_runner["Baseline runner<br/>[run_baseline.py]"]
  node_splitting["Dataset loading and splits<br/>[data_splitter.py]"]
  node_embeddings["DeBERTa embeddings"]
  node_classifier["XGBoost classifier"]
  node_evaluation["Model evaluation<br/>[evaluator.py]"]
  node_explanation["SHAP explanations<br/>[shap_explainer.py]"]
  node_finetune["DeBERTa fine-tuning"]
  node_tuning["XGBoost tuning<br/>[tune_xgboost.py]"]
end

subgraph group_audit["Label auditing"]
  node_auditor["Audit runner<br/>[orchestrator.py]"]
  node_policy["Policy agent<br/>[policy_agent.py]"]
  node_data_agent["Metadata agent<br/>[data_agent.py]"]
  node_pattern["Pattern agent<br/>[pattern_agent.py]"]
  node_judge["Arbitration judge<br/>[judge_agent.py]"]
  node_audit_eval["Audit evaluation<br/>[evaluate_audit.py]"]
  node_audit_records[("Audited records<br/>[storage.py]")]
end

subgraph group_shared["Shared audit components"]
  node_base_agent["LLM agent client<br/>[base_agent.py]"]
  node_schemas["Audit data schemas<br/>[schemas.py]"]
end

node_bughub[("BugHub PostgreSQL")]
node_researcher(("Researcher"))
node_llm_service["Groq LLM API"]

node_bughub -->|"provides source data"| node_prep
node_prep -->|"prepares canonical data"| node_canonical
node_canonical -->|"analyzed as Parquet"| node_eda
node_researcher -.->|"runs experiment"| node_baseline_runner
node_baseline_runner -->|"loads and splits"| node_splitting
node_baseline_runner -->|"extracts embeddings"| node_embeddings
node_baseline_runner -->|"trains classifier"| node_classifier
node_baseline_runner -->|"evaluates predictions"| node_evaluation
node_baseline_runner -->|"explains predictions"| node_explanation
node_finetune -->|"uses dataset splits"| node_splitting
node_tuning -->|"uses dataset splits"| node_splitting
node_tuning -->|"uses evaluation"| node_evaluation
node_researcher -.->|"runs audit"| node_auditor
node_auditor -->|"dispatches verdict request"| node_policy
node_auditor -->|"dispatches verdict request"| node_data_agent
node_auditor -->|"dispatches verdict request"| node_pattern
node_auditor -.->|"arbitrates agent verdicts"| node_judge
node_policy -->|"inherits API client"| node_base_agent
node_data_agent -->|"calls JSON generation"| node_base_agent
node_judge -->|"calls JSON generation"| node_base_agent
node_base_agent -->|"requests completions"| node_llm_service
node_auditor -->|"saves audit records"| node_audit_records
node_audit_eval -.->|"evaluates audit output"| node_audit_records
node_auditor -->|"constructs audit record"| node_schemas
node_data_agent -->|"returns verdict"| node_schemas
node_judge -->|"returns judge verdict"| node_schemas

click node_prep "https://github.com/jasirdeen007/multi-agent-software-defect-prediction/tree/main/src/preprocessing"
click node_eda "https://github.com/jasirdeen007/multi-agent-software-defect-prediction/blob/main/src/eda/run_eda_pipeline.py"
click node_canonical "https://github.com/jasirdeen007/multi-agent-software-defect-prediction/tree/main/data/processed"
click node_baseline_runner "https://github.com/jasirdeen007/multi-agent-software-defect-prediction/blob/main/src/baseline/run_baseline.py"
click node_splitting "https://github.com/jasirdeen007/multi-agent-software-defect-prediction/blob/main/src/baseline/data_splitter.py"
click node_embeddings "https://github.com/jasirdeen007/multi-agent-software-defect-prediction/blob/main/src/baseline/embedding_extractor.py"
click node_classifier "https://github.com/jasirdeen007/multi-agent-software-defect-prediction/blob/main/src/baseline/xgboost_classifier.py"
click node_evaluation "https://github.com/jasirdeen007/multi-agent-software-defect-prediction/blob/main/src/baseline/evaluator.py"
click node_explanation "https://github.com/jasirdeen007/multi-agent-software-defect-prediction/blob/main/src/baseline/shap_explainer.py"
click node_finetune "https://github.com/jasirdeen007/multi-agent-software-defect-prediction/blob/main/src/baseline/finetune_deberta.py"
click node_tuning "https://github.com/jasirdeen007/multi-agent-software-defect-prediction/blob/main/src/baseline/tune_xgboost.py"
click node_auditor "https://github.com/jasirdeen007/multi-agent-software-defect-prediction/blob/main/src/agents/orchestrator.py"
click node_policy "https://github.com/jasirdeen007/multi-agent-software-defect-prediction/blob/main/src/agents/policy_agent.py"
click node_data_agent "https://github.com/jasirdeen007/multi-agent-software-defect-prediction/blob/main/src/agents/data_agent.py"
click node_pattern "https://github.com/jasirdeen007/multi-agent-software-defect-prediction/blob/main/src/agents/pattern_agent.py"
click node_judge "https://github.com/jasirdeen007/multi-agent-software-defect-prediction/blob/main/src/agents/judge_agent.py"
click node_audit_eval "https://github.com/jasirdeen007/multi-agent-software-defect-prediction/blob/main/src/agents/evaluate_audit.py"
click node_audit_records "https://github.com/jasirdeen007/multi-agent-software-defect-prediction/blob/main/src/agents/storage.py"
click node_base_agent "https://github.com/jasirdeen007/multi-agent-software-defect-prediction/blob/main/src/agents/base_agent.py"
click node_schemas "https://github.com/jasirdeen007/multi-agent-software-defect-prediction/blob/main/src/agents/schemas.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_prep,node_eda,node_canonical toneBlue
class node_baseline_runner,node_splitting,node_embeddings,node_classifier,node_evaluation,node_explanation,node_finetune,node_tuning,node_bughub toneAmber
class node_auditor,node_policy,node_data_agent,node_pattern,node_judge,node_audit_eval,node_audit_records,node_llm_service toneMint
class node_base_agent,node_schemas toneRose
class node_researcher toneIndigo
```

## Components

### Data preparation

- [Dataset preprocessing](https://github.com/jasirdeen007/multi-agent-software-defect-prediction/tree/main/src/preprocessing): `src/preprocessing`
- [EDA pipeline](https://github.com/jasirdeen007/multi-agent-software-defect-prediction/blob/main/src/eda/run_eda_pipeline.py): `src/eda/run_eda_pipeline.py`
- [Canonical dataset](https://github.com/jasirdeen007/multi-agent-software-defect-prediction/tree/main/data/processed): `data/processed`

### Prediction baseline

- [Baseline runner](https://github.com/jasirdeen007/multi-agent-software-defect-prediction/blob/main/src/baseline/run_baseline.py): `src/baseline/run_baseline.py`
- [Dataset loading and splits](https://github.com/jasirdeen007/multi-agent-software-defect-prediction/blob/main/src/baseline/data_splitter.py): `src/baseline/data_splitter.py`
- [DeBERTa embeddings](https://github.com/jasirdeen007/multi-agent-software-defect-prediction/blob/main/src/baseline/embedding_extractor.py): `src/baseline/embedding_extractor.py`
- [XGBoost classifier](https://github.com/jasirdeen007/multi-agent-software-defect-prediction/blob/main/src/baseline/xgboost_classifier.py): `src/baseline/xgboost_classifier.py`
- [Model evaluation](https://github.com/jasirdeen007/multi-agent-software-defect-prediction/blob/main/src/baseline/evaluator.py): `src/baseline/evaluator.py`
- [SHAP explanations](https://github.com/jasirdeen007/multi-agent-software-defect-prediction/blob/main/src/baseline/shap_explainer.py): `src/baseline/shap_explainer.py`
- [DeBERTa fine-tuning](https://github.com/jasirdeen007/multi-agent-software-defect-prediction/blob/main/src/baseline/finetune_deberta.py): `src/baseline/finetune_deberta.py`
- [XGBoost tuning](https://github.com/jasirdeen007/multi-agent-software-defect-prediction/blob/main/src/baseline/tune_xgboost.py): `src/baseline/tune_xgboost.py`

### Label auditing

- [Audit runner](https://github.com/jasirdeen007/multi-agent-software-defect-prediction/blob/main/src/agents/orchestrator.py): `src/agents/orchestrator.py`
- [Policy agent](https://github.com/jasirdeen007/multi-agent-software-defect-prediction/blob/main/src/agents/policy_agent.py): `src/agents/policy_agent.py`
- [Metadata agent](https://github.com/jasirdeen007/multi-agent-software-defect-prediction/blob/main/src/agents/data_agent.py): `src/agents/data_agent.py`
- [Pattern agent](https://github.com/jasirdeen007/multi-agent-software-defect-prediction/blob/main/src/agents/pattern_agent.py): `src/agents/pattern_agent.py`
- [Arbitration judge](https://github.com/jasirdeen007/multi-agent-software-defect-prediction/blob/main/src/agents/judge_agent.py): `src/agents/judge_agent.py`
- [Audit evaluation](https://github.com/jasirdeen007/multi-agent-software-defect-prediction/blob/main/src/agents/evaluate_audit.py): `src/agents/evaluate_audit.py`
- [Audited records](https://github.com/jasirdeen007/multi-agent-software-defect-prediction/blob/main/src/agents/storage.py): `src/agents/storage.py`

### Shared audit components

- [LLM agent client](https://github.com/jasirdeen007/multi-agent-software-defect-prediction/blob/main/src/agents/base_agent.py): `src/agents/base_agent.py`
- [Audit data schemas](https://github.com/jasirdeen007/multi-agent-software-defect-prediction/blob/main/src/agents/schemas.py): `src/agents/schemas.py`

### Other components

- **BugHub PostgreSQL**
- **Researcher**
- **Groq LLM API**

## Connections

- BugHub PostgreSQL → Dataset preprocessing: provides source data (evidence: `README.md`)
- Dataset preprocessing → Canonical dataset: prepares canonical data (evidence: `README.md`)
- Canonical dataset → EDA pipeline: analyzed as Parquet (evidence: `README.md`)
- Researcher → Baseline runner: runs experiment
- Baseline runner → Dataset loading and splits: loads and splits (evidence: `src/baseline/run_baseline.py`)
- Baseline runner → DeBERTa embeddings: extracts embeddings (evidence: `src/baseline/run_baseline.py`)
- Baseline runner → XGBoost classifier: trains classifier (evidence: `src/baseline/run_baseline.py`)
- Baseline runner → Model evaluation: evaluates predictions (evidence: `src/baseline/run_baseline.py`)
- Baseline runner → SHAP explanations: explains predictions (evidence: `src/baseline/run_baseline.py`)
- DeBERTa fine-tuning → Dataset loading and splits: uses dataset splits (evidence: `src/baseline/finetune_deberta.py`)
- XGBoost tuning → Dataset loading and splits: uses dataset splits (evidence: `src/baseline/tune_xgboost.py`)
- XGBoost tuning → Model evaluation: uses evaluation (evidence: `src/baseline/tune_xgboost.py`)
- Researcher → Audit runner: runs audit
- Audit runner → Policy agent: dispatches verdict request (evidence: `src/agents/orchestrator.py`)
- Audit runner → Metadata agent: dispatches verdict request (evidence: `src/agents/orchestrator.py`)
- Audit runner → Pattern agent: dispatches verdict request (evidence: `src/agents/orchestrator.py`)
- Audit runner → Arbitration judge: arbitrates agent verdicts (evidence: `src/agents/orchestrator.py`)
- Policy agent → LLM agent client: inherits API client (evidence: `src/agents/policy_agent.py`)
- Metadata agent → LLM agent client: calls JSON generation (evidence: `src/agents/data_agent.py`)
- Arbitration judge → LLM agent client: calls JSON generation (evidence: `src/agents/judge_agent.py`)
- LLM agent client → Groq LLM API: requests completions (evidence: `src/agents/base_agent.py`)
- Audit runner → Audited records: saves audit records (evidence: `src/agents/orchestrator.py`)
- Audit evaluation → Audited records: evaluates audit output
- Audit runner → Audit data schemas: constructs audit record (evidence: `src/agents/orchestrator.py`)
- Metadata agent → Audit data schemas: returns verdict (evidence: `src/agents/data_agent.py`)
- Arbitration judge → Audit data schemas: returns judge verdict (evidence: `src/agents/judge_agent.py`)
