# highsierralabs/autonomous_build_harness_test architecture

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

- Interactive diagram: https://gitdiagram.com/highsierralabs/autonomous_build_harness_test
- Repository: https://github.com/highsierralabs/autonomous_build_harness_test
- Video tour (about a minute): https://gitdiagram.com/highsierralabs/autonomous_build_harness_test/video

## Overview

The product is RHACO Corpus Explorer: a local, read-only browser for research records. Users browse/filter the catalog, search by identifier, lexical, hybrid or graph modes, open a document with its metadata card, and inspect relationships or instrument health. FastAPI routes obtain a shared lazy corpus adapter; feature services assemble view models from that adapter, and routes return HTML or JSON. The adapter boundary separates the Explorer from RHACO’s existing index and document files. The graph reflects the README’s major capabilities; some adapter details are documented rather than sampled here.

Main entry points: [`explorer/app.py`](https://github.com/highsierralabs/autonomous_build_harness_test/blob/main/explorer/app.py) (FastAPI app), [`explorer/corpus_adapter/adapter.py`](https://github.com/highsierralabs/autonomous_build_harness_test/blob/main/explorer/corpus_adapter/adapter.py) (Corpus adapter), [`explorer/web/templates`](https://github.com/highsierralabs/autonomous_build_harness_test/tree/main/explorer/web/templates) (HTML templates), [`explorer/catalog/routes.py`](https://github.com/highsierralabs/autonomous_build_harness_test/blob/main/explorer/catalog/routes.py) (Catalog view)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_runtime["Application runtime"]
  node_app["FastAPI app<br/>[app.py]"]
  node_settings["Settings<br/>[config.py]"]
  node_models["Shared models<br/>[models.py]"]
end

subgraph group_views["Research views"]
  node_catalog["Catalog view<br/>[routes.py]"]
  node_catalogsvc["Catalog assembly<br/>[service.py]"]
  node_search["Search view<br/>[routes.py]"]
  node_searchsvc["Search dispatch<br/>[service.py]"]
  node_reader["Document reader<br/>[routes.py]"]
  node_readersvc["Reader assembly<br/>[service.py]"]
  node_lineage["Lineage view<br/>[routes.py]"]
  node_lineagesvc["Lineage assembly<br/>[service.py]"]
  node_diagnostics["Diagnostics view<br/>[routes.py]"]
  node_diagnosticssvc["Diagnostics assembly<br/>[service.py]"]
end

subgraph group_access["Corpus access"]
  node_adapter["Corpus adapter<br/>[adapter.py]"]
  node_adapterpaths["Safe path mapping<br/>[paths.py]"]
  node_adaptersql["Index queries<br/>[sql.py]"]
  node_availability["Index availability<br/>[availability.py]"]
end

subgraph group_interface["Browser interface"]
  node_templates["HTML templates"]
  node_keyboard["Keyboard navigation<br/>[app.js]"]
end

node_user(("Researcher"))
node_index[("RHACO index")]
node_documents["Research documents"]

node_user -->|"HTTP requests"| node_app
node_app -->|"loads configuration"| node_settings
node_app -->|"registers routes"| node_catalog
node_app -->|"registers routes"| node_search
node_app -->|"registers routes"| node_reader
node_app -->|"registers routes"| node_lineage
node_app -->|"registers routes"| node_diagnostics
node_catalog -->|"gets adapter"| node_app
node_search -->|"gets adapter"| node_app
node_reader -->|"gets adapter"| node_app
node_lineage -->|"gets adapter"| node_app
node_diagnostics -->|"gets adapter"| node_app
node_catalog -->|"builds view"| node_catalogsvc
node_search -->|"runs search"| node_searchsvc
node_reader -->|"builds view"| node_readersvc
node_lineage -->|"builds view"| node_lineagesvc
node_diagnostics -->|"builds view"| node_diagnosticssvc
node_app -->|"creates lazily"| node_adapter
node_app -->|"checks health"| node_adapter
node_catalogsvc -->|"reads catalog and facets"| node_adapter
node_searchsvc -->|"dispatches search"| node_adapter
node_readersvc -->|"reads cards and documents"| node_adapter
node_lineagesvc -->|"reads relationship data"| node_adapter
node_diagnosticssvc -->|"reads status and freshness"| node_adapter
node_adapter -->|"queries index"| node_adaptersql
node_adapter -->|"resolves corpus paths"| node_adapterpaths
node_adapter -->|"checks vector support"| node_availability
node_adaptersql -->|"reads"| node_index
node_adapterpaths -->|"locates files"| node_documents
node_availability -->|"checks capabilities"| node_index
node_catalog -->|"renders HTML"| node_templates
node_search -->|"renders HTML"| node_templates
node_reader -->|"renders HTML"| node_templates
node_lineage -->|"renders HTML"| node_templates
node_diagnostics -->|"renders HTML"| node_templates
node_templates -->|"presents views"| node_user
node_user -->|"uses shortcuts"| node_keyboard

click node_app "https://github.com/highsierralabs/autonomous_build_harness_test/blob/main/explorer/app.py"
click node_settings "https://github.com/highsierralabs/autonomous_build_harness_test/blob/main/explorer/config.py"
click node_models "https://github.com/highsierralabs/autonomous_build_harness_test/blob/main/explorer/models.py"
click node_catalog "https://github.com/highsierralabs/autonomous_build_harness_test/blob/main/explorer/catalog/routes.py"
click node_catalogsvc "https://github.com/highsierralabs/autonomous_build_harness_test/blob/main/explorer/catalog/service.py"
click node_search "https://github.com/highsierralabs/autonomous_build_harness_test/blob/main/explorer/search/routes.py"
click node_searchsvc "https://github.com/highsierralabs/autonomous_build_harness_test/blob/main/explorer/search/service.py"
click node_reader "https://github.com/highsierralabs/autonomous_build_harness_test/blob/main/explorer/reader/routes.py"
click node_readersvc "https://github.com/highsierralabs/autonomous_build_harness_test/blob/main/explorer/reader/service.py"
click node_lineage "https://github.com/highsierralabs/autonomous_build_harness_test/blob/main/explorer/lineage/routes.py"
click node_lineagesvc "https://github.com/highsierralabs/autonomous_build_harness_test/blob/main/explorer/lineage/service.py"
click node_diagnostics "https://github.com/highsierralabs/autonomous_build_harness_test/blob/main/explorer/diagnostics/routes.py"
click node_diagnosticssvc "https://github.com/highsierralabs/autonomous_build_harness_test/blob/main/explorer/diagnostics/service.py"
click node_adapter "https://github.com/highsierralabs/autonomous_build_harness_test/blob/main/explorer/corpus_adapter/adapter.py"
click node_adapterpaths "https://github.com/highsierralabs/autonomous_build_harness_test/blob/main/explorer/corpus_adapter/paths.py"
click node_adaptersql "https://github.com/highsierralabs/autonomous_build_harness_test/blob/main/explorer/corpus_adapter/sql.py"
click node_availability "https://github.com/highsierralabs/autonomous_build_harness_test/blob/main/explorer/corpus_adapter/availability.py"
click node_templates "https://github.com/highsierralabs/autonomous_build_harness_test/tree/main/explorer/web/templates"
click node_keyboard "https://github.com/highsierralabs/autonomous_build_harness_test/blob/main/explorer/web/static/app.js"

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_app,node_settings,node_models toneBlue
class node_catalog,node_catalogsvc,node_search,node_searchsvc,node_reader,node_readersvc,node_lineage,node_lineagesvc,node_diagnostics,node_diagnosticssvc,node_index toneAmber
class node_adapter,node_adapterpaths,node_adaptersql,node_availability toneMint
class node_templates,node_keyboard toneRose
class node_user,node_documents toneIndigo
```

## Components

### Application runtime

- [FastAPI app](https://github.com/highsierralabs/autonomous_build_harness_test/blob/main/explorer/app.py): `explorer/app.py`
- [Settings](https://github.com/highsierralabs/autonomous_build_harness_test/blob/main/explorer/config.py): `explorer/config.py`
- [Shared models](https://github.com/highsierralabs/autonomous_build_harness_test/blob/main/explorer/models.py): `explorer/models.py`

### Research views

- [Catalog view](https://github.com/highsierralabs/autonomous_build_harness_test/blob/main/explorer/catalog/routes.py): `explorer/catalog/routes.py`
- [Catalog assembly](https://github.com/highsierralabs/autonomous_build_harness_test/blob/main/explorer/catalog/service.py): `explorer/catalog/service.py`
- [Search view](https://github.com/highsierralabs/autonomous_build_harness_test/blob/main/explorer/search/routes.py): `explorer/search/routes.py`
- [Search dispatch](https://github.com/highsierralabs/autonomous_build_harness_test/blob/main/explorer/search/service.py): `explorer/search/service.py`
- [Document reader](https://github.com/highsierralabs/autonomous_build_harness_test/blob/main/explorer/reader/routes.py): `explorer/reader/routes.py`
- [Reader assembly](https://github.com/highsierralabs/autonomous_build_harness_test/blob/main/explorer/reader/service.py): `explorer/reader/service.py`
- [Lineage view](https://github.com/highsierralabs/autonomous_build_harness_test/blob/main/explorer/lineage/routes.py): `explorer/lineage/routes.py`
- [Lineage assembly](https://github.com/highsierralabs/autonomous_build_harness_test/blob/main/explorer/lineage/service.py): `explorer/lineage/service.py`
- [Diagnostics view](https://github.com/highsierralabs/autonomous_build_harness_test/blob/main/explorer/diagnostics/routes.py): `explorer/diagnostics/routes.py`
- [Diagnostics assembly](https://github.com/highsierralabs/autonomous_build_harness_test/blob/main/explorer/diagnostics/service.py): `explorer/diagnostics/service.py`

### Corpus access

- [Corpus adapter](https://github.com/highsierralabs/autonomous_build_harness_test/blob/main/explorer/corpus_adapter/adapter.py): `explorer/corpus_adapter/adapter.py`
- [Safe path mapping](https://github.com/highsierralabs/autonomous_build_harness_test/blob/main/explorer/corpus_adapter/paths.py): `explorer/corpus_adapter/paths.py`
- [Index queries](https://github.com/highsierralabs/autonomous_build_harness_test/blob/main/explorer/corpus_adapter/sql.py): `explorer/corpus_adapter/sql.py`
- [Index availability](https://github.com/highsierralabs/autonomous_build_harness_test/blob/main/explorer/corpus_adapter/availability.py): `explorer/corpus_adapter/availability.py`

### Browser interface

- [HTML templates](https://github.com/highsierralabs/autonomous_build_harness_test/tree/main/explorer/web/templates): `explorer/web/templates`
- [Keyboard navigation](https://github.com/highsierralabs/autonomous_build_harness_test/blob/main/explorer/web/static/app.js): `explorer/web/static/app.js`

### Other components

- **Researcher**
- **RHACO index**
- **Research documents**

## Connections

- Researcher → FastAPI app: HTTP requests
- FastAPI app → Settings: loads configuration
- FastAPI app → Catalog view: registers routes
- FastAPI app → Search view: registers routes
- FastAPI app → Document reader: registers routes
- FastAPI app → Lineage view: registers routes
- FastAPI app → Diagnostics view: registers routes
- Catalog view → FastAPI app: gets adapter
- Search view → FastAPI app: gets adapter
- Document reader → FastAPI app: gets adapter
- Lineage view → FastAPI app: gets adapter
- Diagnostics view → FastAPI app: gets adapter
- Catalog view → Catalog assembly: builds view
- Search view → Search dispatch: runs search
- Document reader → Reader assembly: builds view
- Lineage view → Lineage assembly: builds view
- Diagnostics view → Diagnostics assembly: builds view
- FastAPI app → Corpus adapter: creates lazily
- FastAPI app → Corpus adapter: checks health
- Catalog assembly → Corpus adapter: reads catalog and facets
- Search dispatch → Corpus adapter: dispatches search
- Reader assembly → Corpus adapter: reads cards and documents
- Lineage assembly → Corpus adapter: reads relationship data
- Diagnostics assembly → Corpus adapter: reads status and freshness
- Corpus adapter → Index queries: queries index
- Corpus adapter → Safe path mapping: resolves corpus paths
- Corpus adapter → Index availability: checks vector support
- Index queries → RHACO index: reads
- Safe path mapping → Research documents: locates files
- Index availability → RHACO index: checks capabilities
- Catalog view → HTML templates: renders HTML
- Search view → HTML templates: renders HTML
- Document reader → HTML templates: renders HTML
- Lineage view → HTML templates: renders HTML
- Diagnostics view → HTML templates: renders HTML
- HTML templates → Researcher: presents views
- Researcher → Keyboard navigation: uses shortcuts
