# archithar07/concord architecture

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

- Interactive diagram: https://gitdiagram.com/archithar07/concord
- Repository: https://github.com/archithar07/concord

## Overview

CONCORD ingests policy files, extracts obligations, compares and reconciles them, resolves precedence and staleness, analyzes the resulting policy graph, maps coverage gaps, and compiles a master policy. The dashboard uploads policies and presents ingestion, analysis, audit, and compilation results through a Node API reading pipeline artifacts. The main orchestrator and API behavior are sampled; later-stage capabilities and dashboard panels are also documented in the README, but their internal implementations were not inspected.

Main entry points: [`a1build/run_pipeline.py`](https://github.com/archithar07/concord/blob/main/a1build/run_pipeline.py) (Pipeline orchestrator), [`concord-frontend/server/index.ts`](https://github.com/archithar07/concord/blob/main/concord-frontend/server/index.ts) (Express API), [`concord-frontend/client/src/pages/Home.tsx`](https://github.com/archithar07/concord/blob/main/concord-frontend/client/src/pages/Home.tsx) (Dashboard home), [`concord-frontend/client/src/components/IngestTab.tsx`](https://github.com/archithar07/concord/blob/main/concord-frontend/client/src/components/IngestTab.tsx) (Ingest view)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_dashboard["Dashboard"]
  node_home["Dashboard home<br/>[Home.tsx]"]
  node_ingestui["Ingest view<br/>[IngestTab.tsx]"]
  node_bicameral["Bicameral analytics<br/>[BicameralTab.tsx]"]
  node_meshui["Precedence and mesh<br/>[MeshTab.tsx]"]
  node_auditui["Audit view<br/>[AuditTab.tsx]"]
  node_threatui["Threat coverage"]
  node_compiledview["Compiled policy"]
end

subgraph group_ingestion["Ingestion and resolution"]
  node_orchestrator["Pipeline orchestrator<br/>[run_pipeline.py]"]
  node_ingest["Policy ingestion<br/>[l0_ingest.py]"]
  node_extract["Obligation extraction<br/>[l1_extract.py]"]
  node_lens["Semantic embeddings<br/>[l2_lens.py]"]
  node_filter["Candidate filtering<br/>[filter_l3.py]"]
  node_bench["Rule and LLM bench<br/>[rule_bench_l4.py]"]
  node_llm["LLM adjudication<br/>[l4_llm_bench.py]"]
  node_trust["Trust reconciliation"]
  node_resolve["Precedence resolution<br/>[arbitrate_l6.py]"]
  node_decay["Staleness analysis<br/>[decay_l7.py]"]
end

subgraph group_analysis["Graph analysis"]
  node_mesh["Policy graph<br/>[mesh_l8.py]"]
  node_centrality["Centrality scoring<br/>[centrality_l9.py]"]
  node_scores["Policy debt scores<br/>[score_l10.py]"]
  node_compass["Compass mapping<br/>[compass_l11.py]"]
  node_voice["Voice explanations<br/>[voice_l12.py]"]
end

subgraph group_publication["Threat mapping and publication"]
  node_crucible["CRUCIBLE mapping<br/>[crucible_l15.py]"]
  node_synod["SYNOD compilation<br/>[synod_l16.py]"]
end

subgraph group_api["API and artifacts"]
  node_server["Express API<br/>[index.ts]"]
  node_artifacts["Pipeline artifacts<br/>[config.py]"]
end

node_user(("Policy analyst"))
node_policyfiles["Policy files"]
node_llmproviders{{"LLM providers"}}
node_attack["MITRE ATT&amp;CK"]

node_user -->|"uses"| node_home
node_home -->|"offers ingestion"| node_ingestui
node_home -->|"shows analytics"| node_bicameral
node_home -->|"shows resolutions"| node_meshui
node_home -->|"shows audit"| node_auditui
node_home -->|"shows coverage"| node_threatui
node_home -->|"shows compilation"| node_compiledview
node_ingestui -->|"uploads files"| node_server
node_server -->|"stores uploads"| node_policyfiles
node_server -->|"runs pipeline"| node_orchestrator
node_orchestrator -->|"calls"| node_ingest
node_ingest -->|"reads"| node_policyfiles
node_orchestrator -->|"calls"| node_extract
node_orchestrator -->|"calls"| node_lens
node_orchestrator -->|"calls"| node_filter
node_orchestrator -->|"calls"| node_bench
node_orchestrator -->|"calls escalations"| node_llm
node_llm -.->|"queries cascade"| node_llmproviders
node_orchestrator -->|"calls"| node_trust
node_orchestrator -->|"calls"| node_resolve
node_orchestrator -->|"calls"| node_decay
node_orchestrator -->|"builds graph"| node_mesh
node_orchestrator -->|"computes centrality"| node_centrality
node_orchestrator -->|"computes scores"| node_scores
node_orchestrator -->|"applies mapping"| node_compass
node_orchestrator -->|"adds explanations"| node_voice
node_orchestrator -->|"runs"| node_crucible
node_crucible -->|"maps coverage"| node_attack
node_orchestrator -->|"runs"| node_synod
node_orchestrator -->|"writes outputs"| node_artifacts
node_server -->|"reads outputs"| node_artifacts
node_server -->|"serves coverage"| node_threatui
node_server -->|"serves document"| node_compiledview
node_server -->|"serves findings"| node_auditui
node_server -->|"serves scores"| node_bicameral
node_server -->|"serves graph data"| node_meshui

click node_home "https://github.com/archithar07/concord/blob/main/concord-frontend/client/src/pages/Home.tsx"
click node_ingestui "https://github.com/archithar07/concord/blob/main/concord-frontend/client/src/components/IngestTab.tsx"
click node_bicameral "https://github.com/archithar07/concord/blob/main/concord-frontend/client/src/components/BicameralTab.tsx"
click node_meshui "https://github.com/archithar07/concord/blob/main/concord-frontend/client/src/components/MeshTab.tsx"
click node_auditui "https://github.com/archithar07/concord/blob/main/concord-frontend/client/src/components/AuditTab.tsx"
click node_threatui "https://github.com/archithar07/concord/blob/main/concord-frontend/client/src/components/ThreatCoverageMap.tsx"
click node_compiledview "https://github.com/archithar07/concord/blob/main/concord-frontend/client/src/components/CompiledDocumentView.tsx"
click node_server "https://github.com/archithar07/concord/blob/main/concord-frontend/server/index.ts"
click node_artifacts "https://github.com/archithar07/concord/blob/main/a1build/backend/engine/models/config.py"
click node_orchestrator "https://github.com/archithar07/concord/blob/main/a1build/run_pipeline.py"
click node_ingest "https://github.com/archithar07/concord/blob/main/a1build/backend/engine/models/l0_ingest.py"
click node_extract "https://github.com/archithar07/concord/blob/main/a1build/backend/engine/models/l1_extract.py"
click node_lens "https://github.com/archithar07/concord/blob/main/a1build/backend/engine/models/l2_lens.py"
click node_filter "https://github.com/archithar07/concord/blob/main/a1build/backend/engine/rules/filter_l3.py"
click node_bench "https://github.com/archithar07/concord/blob/main/a1build/backend/engine/rules/rule_bench_l4.py"
click node_llm "https://github.com/archithar07/concord/blob/main/a1build/backend/engine/models/l4_llm_bench.py"
click node_trust "https://github.com/archithar07/concord/blob/main/a1build/backend/engine/models/l5_trust_reconcile.py"
click node_resolve "https://github.com/archithar07/concord/blob/main/a1build/backend/engine/rules/arbitrate_l6.py"
click node_decay "https://github.com/archithar07/concord/blob/main/a1build/backend/engine/rules/decay_l7.py"
click node_mesh "https://github.com/archithar07/concord/blob/main/a1build/backend/engine/rules/mesh_l8.py"
click node_centrality "https://github.com/archithar07/concord/blob/main/a1build/backend/engine/rules/centrality_l9.py"
click node_scores "https://github.com/archithar07/concord/blob/main/a1build/backend/engine/rules/score_l10.py"
click node_compass "https://github.com/archithar07/concord/blob/main/a1build/backend/engine/rules/compass_l11.py"
click node_voice "https://github.com/archithar07/concord/blob/main/a1build/backend/engine/rules/voice_l12.py"
click node_crucible "https://github.com/archithar07/concord/blob/main/a1build/backend/engine/models/crucible_l15.py"
click node_synod "https://github.com/archithar07/concord/blob/main/a1build/backend/engine/models/synod_l16.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_home,node_ingestui,node_bicameral,node_meshui,node_auditui,node_threatui,node_compiledview toneBlue
class node_orchestrator,node_ingest,node_extract,node_lens,node_filter,node_bench,node_llm,node_trust,node_resolve,node_decay toneAmber
class node_mesh,node_centrality,node_scores,node_compass,node_voice toneMint
class node_crucible,node_synod toneRose
class node_server,node_artifacts,node_user,node_policyfiles,node_llmproviders,node_attack toneIndigo
```

## Components

### Dashboard

- [Dashboard home](https://github.com/archithar07/concord/blob/main/concord-frontend/client/src/pages/Home.tsx): `concord-frontend/client/src/pages/Home.tsx`
- [Ingest view](https://github.com/archithar07/concord/blob/main/concord-frontend/client/src/components/IngestTab.tsx): `concord-frontend/client/src/components/IngestTab.tsx`
- [Bicameral analytics](https://github.com/archithar07/concord/blob/main/concord-frontend/client/src/components/BicameralTab.tsx): `concord-frontend/client/src/components/BicameralTab.tsx`
- [Precedence and mesh](https://github.com/archithar07/concord/blob/main/concord-frontend/client/src/components/MeshTab.tsx): `concord-frontend/client/src/components/MeshTab.tsx`
- [Audit view](https://github.com/archithar07/concord/blob/main/concord-frontend/client/src/components/AuditTab.tsx): `concord-frontend/client/src/components/AuditTab.tsx`
- [Threat coverage](https://github.com/archithar07/concord/blob/main/concord-frontend/client/src/components/ThreatCoverageMap.tsx): `concord-frontend/client/src/components/ThreatCoverageMap.tsx`
- [Compiled policy](https://github.com/archithar07/concord/blob/main/concord-frontend/client/src/components/CompiledDocumentView.tsx): `concord-frontend/client/src/components/CompiledDocumentView.tsx`

### Ingestion and resolution

- [Pipeline orchestrator](https://github.com/archithar07/concord/blob/main/a1build/run_pipeline.py): `a1build/run_pipeline.py`
- [Policy ingestion](https://github.com/archithar07/concord/blob/main/a1build/backend/engine/models/l0_ingest.py): `a1build/backend/engine/models/l0_ingest.py`
- [Obligation extraction](https://github.com/archithar07/concord/blob/main/a1build/backend/engine/models/l1_extract.py): `a1build/backend/engine/models/l1_extract.py`
- [Semantic embeddings](https://github.com/archithar07/concord/blob/main/a1build/backend/engine/models/l2_lens.py): `a1build/backend/engine/models/l2_lens.py`
- [Candidate filtering](https://github.com/archithar07/concord/blob/main/a1build/backend/engine/rules/filter_l3.py): `a1build/backend/engine/rules/filter_l3.py`
- [Rule and LLM bench](https://github.com/archithar07/concord/blob/main/a1build/backend/engine/rules/rule_bench_l4.py): `a1build/backend/engine/rules/rule_bench_l4.py`
- [LLM adjudication](https://github.com/archithar07/concord/blob/main/a1build/backend/engine/models/l4_llm_bench.py): `a1build/backend/engine/models/l4_llm_bench.py`
- [Trust reconciliation](https://github.com/archithar07/concord/blob/main/a1build/backend/engine/models/l5_trust_reconcile.py): `a1build/backend/engine/models/l5_trust_reconcile.py`
- [Precedence resolution](https://github.com/archithar07/concord/blob/main/a1build/backend/engine/rules/arbitrate_l6.py): `a1build/backend/engine/rules/arbitrate_l6.py`
- [Staleness analysis](https://github.com/archithar07/concord/blob/main/a1build/backend/engine/rules/decay_l7.py): `a1build/backend/engine/rules/decay_l7.py`

### Graph analysis

- [Policy graph](https://github.com/archithar07/concord/blob/main/a1build/backend/engine/rules/mesh_l8.py): `a1build/backend/engine/rules/mesh_l8.py`
- [Centrality scoring](https://github.com/archithar07/concord/blob/main/a1build/backend/engine/rules/centrality_l9.py): `a1build/backend/engine/rules/centrality_l9.py`
- [Policy debt scores](https://github.com/archithar07/concord/blob/main/a1build/backend/engine/rules/score_l10.py): `a1build/backend/engine/rules/score_l10.py`
- [Compass mapping](https://github.com/archithar07/concord/blob/main/a1build/backend/engine/rules/compass_l11.py): `a1build/backend/engine/rules/compass_l11.py`
- [Voice explanations](https://github.com/archithar07/concord/blob/main/a1build/backend/engine/rules/voice_l12.py): `a1build/backend/engine/rules/voice_l12.py`

### Threat mapping and publication

- [CRUCIBLE mapping](https://github.com/archithar07/concord/blob/main/a1build/backend/engine/models/crucible_l15.py): `a1build/backend/engine/models/crucible_l15.py`
- [SYNOD compilation](https://github.com/archithar07/concord/blob/main/a1build/backend/engine/models/synod_l16.py): `a1build/backend/engine/models/synod_l16.py`

### API and artifacts

- [Express API](https://github.com/archithar07/concord/blob/main/concord-frontend/server/index.ts): `concord-frontend/server/index.ts`
- [Pipeline artifacts](https://github.com/archithar07/concord/blob/main/a1build/backend/engine/models/config.py): `a1build/backend/engine/models/config.py`

### Other components

- **Policy analyst**
- **Policy files**
- **LLM providers**
- **MITRE ATT&CK**

## Connections

- Policy analyst → Dashboard home: uses
- Dashboard home → Ingest view: offers ingestion
- Dashboard home → Bicameral analytics: shows analytics
- Dashboard home → Precedence and mesh: shows resolutions
- Dashboard home → Audit view: shows audit
- Dashboard home → Threat coverage: shows coverage
- Dashboard home → Compiled policy: shows compilation
- Ingest view → Express API: uploads files
- Express API → Policy files: stores uploads
- Express API → Pipeline orchestrator: runs pipeline
- Pipeline orchestrator → Policy ingestion: calls
- Policy ingestion → Policy files: reads
- Pipeline orchestrator → Obligation extraction: calls
- Pipeline orchestrator → Semantic embeddings: calls
- Pipeline orchestrator → Candidate filtering: calls
- Pipeline orchestrator → Rule and LLM bench: calls
- Pipeline orchestrator → LLM adjudication: calls escalations
- LLM adjudication → LLM providers: queries cascade
- Pipeline orchestrator → Trust reconciliation: calls
- Pipeline orchestrator → Precedence resolution: calls
- Pipeline orchestrator → Staleness analysis: calls
- Pipeline orchestrator → Policy graph: builds graph
- Pipeline orchestrator → Centrality scoring: computes centrality
- Pipeline orchestrator → Policy debt scores: computes scores
- Pipeline orchestrator → Compass mapping: applies mapping
- Pipeline orchestrator → Voice explanations: adds explanations
- Pipeline orchestrator → CRUCIBLE mapping: runs
- CRUCIBLE mapping → MITRE ATT&CK: maps coverage
- Pipeline orchestrator → SYNOD compilation: runs
- Pipeline orchestrator → Pipeline artifacts: writes outputs
- Express API → Pipeline artifacts: reads outputs
- Express API → Threat coverage: serves coverage
- Express API → Compiled policy: serves document
- Express API → Audit view: serves findings
- Express API → Bicameral analytics: serves scores
- Express API → Precedence and mesh: serves graph data
