# duck091256/honda-power-reconstruction architecture

> Architecture diagram of the GitHub repository duck091256/honda-power-reconstruction, generated by GitDiagram from its file tree, README and a sample of source files (last updated 2026-11-18). It is an AI-made overview: check details against the source.

- Interactive diagram: https://gitdiagram.com/duck091256/honda-power-reconstruction
- Repository: https://github.com/duck091256/honda-power-reconstruction

## Overview

Honda is a local Spark-based workflow for recovering and evaluating active power across gaps in meter readings, with a second bounded-scaling workflow and a Streamlit results demo. Users supply source data, create validated panels, select masked evaluation cases, score imputations, and inspect or compare exported results. The README documents the T02–T15 run sequence; sampled code confirms key panel, evaluation, scoring, scaling, and artifact-verification responsibilities. Some task internals were not sampled, so those subsystems and their links are represented only at documented granularity.

Main entry points: [`src/honda/run.py`](https://github.com/duck091256/honda-power-reconstruction/blob/main/src/honda/run.py) (Run artifacts), [`src/honda/scale.py`](https://github.com/duck091256/honda-power-reconstruction/blob/main/src/honda/scale.py) (Per-meter processing), [`src/honda/panel.py`](https://github.com/duck091256/honda-power-reconstruction/blob/main/src/honda/panel.py) (Spark panel), [`src/honda/__main__.py`](https://github.com/duck091256/honda-power-reconstruction/blob/main/src/honda/__main__.py) (Task CLI)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_ingest["Source and panel"]
  node_source_processing["Source processing<br/>[source.py]"]
  node_fixture["Fixture input<br/>[fixture.py]"]
  node_panel["Spark panel<br/>[panel.py]"]
  node_inventory["Source inventory<br/>[inventory.py]"]
end

subgraph group_evaluate["Evaluation and scoring"]
  node_case_selection["Case selection<br/>[cases.py]"]
  node_imputation["Imputation evaluation<br/>[evaluate.py]"]
  node_scoring["Scoring<br/>[scoring.py]"]
  node_development["Development runs<br/>[development.py]"]
end

subgraph group_scale["Scaling workflow"]
  node_scale_tasks["Per-meter processing<br/>[scale.py]"]
  node_scale_evaluation["Scaled evaluation<br/>[scale_eval.py]"]
  node_scale_benchmark["Engine benchmark<br/>[scale_benchmark.py]"]
  node_scale_report["Scale report export<br/>[scale_report.py]"]
end

subgraph group_delivery["Results and handoff"]
  node_bundle["Demo bundle<br/>[bundle.py]"]
  node_demo_app["Streamlit demo<br/>[main.py]"]
  node_reproduction["Run comparison<br/>[reproduce.py]"]
end

subgraph group_runtime["Run coordination"]
  node_cli["Task CLI<br/>[__main__.py]"]
  node_run_artifacts[("Run artifacts<br/>[run.py]")]
end

node_operator(("Operator"))
node_source_data["Honda source data"]

node_operator -->|"runs tasks"| node_cli
node_cli -->|"dispatches tasks"| node_source_processing
node_source_data -->|"supplies readings"| node_source_processing
node_source_processing -->|"stages source"| node_panel
node_cli -->|"dispatches fixture"| node_fixture
node_fixture -->|"provides fixture data"| node_panel
node_panel -->|"writes panel"| node_run_artifacts
node_operator -->|"starts inventory"| node_inventory
node_source_data -->|"enumerates files"| node_inventory
node_operator -->|"starts evaluation"| node_case_selection
node_panel -->|"provides panel values"| node_case_selection
node_case_selection -->|"supplies masked cases"| node_imputation
node_imputation -->|"provides predictions"| node_scoring
node_case_selection -->|"writes evaluation inputs"| node_run_artifacts
node_scoring -->|"writes scores"| node_run_artifacts
node_operator -->|"runs pilot tasks"| node_development
node_development -->|"records run"| node_run_artifacts
node_operator -->|"runs scale tasks"| node_scale_tasks
node_inventory -->|"provides source manifest"| node_scale_tasks
node_scale_tasks -->|"reuses panel logic"| node_panel
node_scale_tasks -->|"dispatches evaluation"| node_scale_evaluation
node_scale_tasks -->|"dispatches benchmark"| node_scale_benchmark
node_scale_tasks -->|"dispatches report"| node_scale_report
node_scale_evaluation -->|"writes metrics"| node_run_artifacts
node_scale_benchmark -->|"writes measurements"| node_run_artifacts
node_scale_report -->|"exports bundle"| node_bundle
node_operator -->|"opens demo"| node_demo_app
node_bundle -->|"provides demo data"| node_demo_app
node_operator -->|"compares runs"| node_reproduction
node_reproduction -->|"verifies artifacts"| node_run_artifacts
node_cli -->|"dispatches export"| node_bundle

click node_cli "https://github.com/duck091256/honda-power-reconstruction/blob/main/src/honda/__main__.py"
click node_source_processing "https://github.com/duck091256/honda-power-reconstruction/blob/main/src/honda/source.py"
click node_fixture "https://github.com/duck091256/honda-power-reconstruction/blob/main/src/honda/fixture.py"
click node_panel "https://github.com/duck091256/honda-power-reconstruction/blob/main/src/honda/panel.py"
click node_inventory "https://github.com/duck091256/honda-power-reconstruction/blob/main/src/honda/inventory.py"
click node_case_selection "https://github.com/duck091256/honda-power-reconstruction/blob/main/src/honda/cases.py"
click node_imputation "https://github.com/duck091256/honda-power-reconstruction/blob/main/src/honda/evaluate.py"
click node_scoring "https://github.com/duck091256/honda-power-reconstruction/blob/main/src/honda/scoring.py"
click node_development "https://github.com/duck091256/honda-power-reconstruction/blob/main/src/honda/development.py"
click node_scale_tasks "https://github.com/duck091256/honda-power-reconstruction/blob/main/src/honda/scale.py"
click node_scale_evaluation "https://github.com/duck091256/honda-power-reconstruction/blob/main/src/honda/scale_eval.py"
click node_scale_benchmark "https://github.com/duck091256/honda-power-reconstruction/blob/main/src/honda/scale_benchmark.py"
click node_scale_report "https://github.com/duck091256/honda-power-reconstruction/blob/main/src/honda/scale_report.py"
click node_run_artifacts "https://github.com/duck091256/honda-power-reconstruction/blob/main/src/honda/run.py"
click node_bundle "https://github.com/duck091256/honda-power-reconstruction/blob/main/src/honda/bundle.py"
click node_demo_app "https://github.com/duck091256/honda-power-reconstruction/blob/main/app/main.py"
click node_reproduction "https://github.com/duck091256/honda-power-reconstruction/blob/main/src/honda/reproduce.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_source_processing,node_fixture,node_panel,node_inventory toneBlue
class node_case_selection,node_imputation,node_scoring,node_development toneAmber
class node_scale_tasks,node_scale_evaluation,node_scale_benchmark,node_scale_report toneMint
class node_bundle,node_demo_app,node_reproduction toneRose
class node_cli,node_run_artifacts,node_operator,node_source_data toneIndigo
```

## Components

### Source and panel

- [Source processing](https://github.com/duck091256/honda-power-reconstruction/blob/main/src/honda/source.py): `src/honda/source.py`
- [Fixture input](https://github.com/duck091256/honda-power-reconstruction/blob/main/src/honda/fixture.py): `src/honda/fixture.py`
- [Spark panel](https://github.com/duck091256/honda-power-reconstruction/blob/main/src/honda/panel.py): `src/honda/panel.py`
- [Source inventory](https://github.com/duck091256/honda-power-reconstruction/blob/main/src/honda/inventory.py): `src/honda/inventory.py`

### Evaluation and scoring

- [Case selection](https://github.com/duck091256/honda-power-reconstruction/blob/main/src/honda/cases.py): `src/honda/cases.py`
- [Imputation evaluation](https://github.com/duck091256/honda-power-reconstruction/blob/main/src/honda/evaluate.py): `src/honda/evaluate.py`
- [Scoring](https://github.com/duck091256/honda-power-reconstruction/blob/main/src/honda/scoring.py): `src/honda/scoring.py`
- [Development runs](https://github.com/duck091256/honda-power-reconstruction/blob/main/src/honda/development.py): `src/honda/development.py`

### Scaling workflow

- [Per-meter processing](https://github.com/duck091256/honda-power-reconstruction/blob/main/src/honda/scale.py): `src/honda/scale.py`
- [Scaled evaluation](https://github.com/duck091256/honda-power-reconstruction/blob/main/src/honda/scale_eval.py): `src/honda/scale_eval.py`
- [Engine benchmark](https://github.com/duck091256/honda-power-reconstruction/blob/main/src/honda/scale_benchmark.py): `src/honda/scale_benchmark.py`
- [Scale report export](https://github.com/duck091256/honda-power-reconstruction/blob/main/src/honda/scale_report.py): `src/honda/scale_report.py`

### Results and handoff

- [Demo bundle](https://github.com/duck091256/honda-power-reconstruction/blob/main/src/honda/bundle.py): `src/honda/bundle.py`
- [Streamlit demo](https://github.com/duck091256/honda-power-reconstruction/blob/main/app/main.py): `app/main.py`
- [Run comparison](https://github.com/duck091256/honda-power-reconstruction/blob/main/src/honda/reproduce.py): `src/honda/reproduce.py`

### Run coordination

- [Task CLI](https://github.com/duck091256/honda-power-reconstruction/blob/main/src/honda/__main__.py): `src/honda/__main__.py`
- [Run artifacts](https://github.com/duck091256/honda-power-reconstruction/blob/main/src/honda/run.py): `src/honda/run.py`

### Other components

- **Operator**
- **Honda source data**

## Connections

- Operator → Task CLI: runs tasks (evidence: `README.md`)
- Task CLI → Source processing: dispatches tasks (evidence: `src/honda/__main__.py`)
- Honda source data → Source processing: supplies readings (evidence: `README.md`)
- Source processing → Spark panel: stages source (evidence: `src/honda/panel.py`)
- Task CLI → Fixture input: dispatches fixture (evidence: `src/honda/__main__.py`)
- Fixture input → Spark panel: provides fixture data (evidence: `src/honda/fixture.py`)
- Spark panel → Run artifacts: writes panel (evidence: `src/honda/panel.py`)
- Operator → Source inventory: starts inventory (evidence: `README.md`)
- Honda source data → Source inventory: enumerates files (evidence: `README.md`)
- Operator → Case selection: starts evaluation (evidence: `README.md`)
- Spark panel → Case selection: provides panel values (evidence: `src/honda/cases.py`)
- Case selection → Imputation evaluation: supplies masked cases (evidence: `src/honda/evaluate.py`)
- Imputation evaluation → Scoring: provides predictions (evidence: `src/honda/scoring.py`)
- Case selection → Run artifacts: writes evaluation inputs (evidence: `src/honda/cases.py`)
- Scoring → Run artifacts: writes scores (evidence: `src/honda/scoring.py`)
- Operator → Development runs: runs pilot tasks (evidence: `README.md`)
- Development runs → Run artifacts: records run (evidence: `src/honda/development.py`)
- Operator → Per-meter processing: runs scale tasks (evidence: `README.md`)
- Source inventory → Per-meter processing: provides source manifest (evidence: `src/honda/scale.py`)
- Per-meter processing → Spark panel: reuses panel logic (evidence: `src/honda/scale.py`)
- Per-meter processing → Scaled evaluation: dispatches evaluation (evidence: `src/honda/scale.py`)
- Per-meter processing → Engine benchmark: dispatches benchmark (evidence: `src/honda/scale.py`)
- Per-meter processing → Scale report export: dispatches report (evidence: `src/honda/scale.py`)
- Scaled evaluation → Run artifacts: writes metrics (evidence: `src/honda/scale_eval.py`)
- Engine benchmark → Run artifacts: writes measurements (evidence: `src/honda/scale_benchmark.py`)
- Scale report export → Demo bundle: exports bundle (evidence: `src/honda/scale_report.py`)
- Operator → Streamlit demo: opens demo (evidence: `README.md`)
- Demo bundle → Streamlit demo: provides demo data (evidence: `README.md`)
- Operator → Run comparison: compares runs (evidence: `README.md`)
- Run comparison → Run artifacts: verifies artifacts (evidence: `src/honda/reproduce.py`)
- Task CLI → Demo bundle: dispatches export (evidence: `src/honda/__main__.py`)
