# marchbeta2087/minbms architecture

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

- Interactive diagram: https://gitdiagram.com/marchbeta2087/minbms
- Repository: https://github.com/marchbeta2087/minbms

## Overview

MinBMS is a Haskell implementation of the Bashicu Matrix System: users expand matrices, enumerate standard matrices, and analyze representable ordinals. Its optional Python tools compare results with the independent basmat program, calibrate convention differences, and inspect standardness. The README documents the Haskell capabilities; sampled Python excerpts show tool calls. Haskell source was not sampled, so those internal relationships are based on README descriptions.

Main entry points: [`tools/basmat_client.py`](https://github.com/marchbeta2087/minbms/blob/main/tools/basmat_client.py) (Container client), [`tools/search.py`](https://github.com/marchbeta2087/minbms/blob/main/tools/search.py) (Ordinal search), [`Explore.hs`](https://github.com/marchbeta2087/minbms/blob/main/Explore.hs) (Explore CLI), [`BashicuMatrix.hs`](https://github.com/marchbeta2087/minbms/blob/main/BashicuMatrix.hs) (Matrix operations)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_matrix["Matrix rules"]
  node_matrix_core["Matrix operations<br/>[BashicuMatrix.hs]"]
  node_versions["Expansion versions<br/>[Version.hs]"]
end

subgraph group_ordinal["Ordinal engine"]
  node_ordinal_core["Ordinal representation<br/>[Ordinal.hs]"]
end

subgraph group_explore["Enumeration and analysis"]
  node_explore_cli["Explore CLI<br/>[Explore.hs]"]
  node_demo["Demo<br/>[Demo.hs]"]
end

subgraph group_reference["Reference tools"]
  node_reference_impl["Expansion and standardness<br/>[bms_reference.py]"]
  node_notation["Ordinal notation comparison"]
end

subgraph group_integration["Basmat integration"]
  node_search["Ordinal search<br/>[search.py]"]
  node_standardness["Standardness probe<br/>[standardness.py]"]
  node_calibrate["Convention calibration<br/>[calibrate.py]"]
  node_basmat_client["Container client<br/>[basmat_client.py]"]
end

node_user(("User"))
node_basmat{{"basmat service"}}

node_user -->|"enumerates matrices"| node_explore_cli
node_explore_cli -->|"filters and expands"| node_matrix_core
node_explore_cli -->|"analyzes ordinals"| node_ordinal_core
node_matrix_core -->|"selects expansion rule"| node_versions
node_user -->|"runs demonstration"| node_demo
node_reference_impl -.-> node_basmat_client
node_user -->|"requests ordinal search"| node_search
node_search -->|"reads enumeration"| node_explore_cli
node_search -->|"submits batches"| node_basmat_client
node_search -->|"compares notation"| node_notation
node_user -->|"probes standardness"| node_standardness
node_standardness -->|"runs probes"| node_basmat_client
node_user -->|"calibrates conventions"| node_calibrate
node_calibrate -->|"captures outputs"| node_basmat_client
node_basmat_client -->|"invokes container"| node_basmat

click node_matrix_core "https://github.com/marchbeta2087/minbms/blob/main/BashicuMatrix.hs"
click node_versions "https://github.com/marchbeta2087/minbms/blob/main/Version.hs"
click node_ordinal_core "https://github.com/marchbeta2087/minbms/blob/main/Ordinal.hs"
click node_explore_cli "https://github.com/marchbeta2087/minbms/blob/main/Explore.hs"
click node_demo "https://github.com/marchbeta2087/minbms/blob/main/Demo.hs"
click node_reference_impl "https://github.com/marchbeta2087/minbms/blob/main/tools/bms_reference.py"
click node_notation "https://github.com/marchbeta2087/minbms/blob/main/tools/ordinal_notation.py"
click node_search "https://github.com/marchbeta2087/minbms/blob/main/tools/search.py"
click node_standardness "https://github.com/marchbeta2087/minbms/blob/main/tools/standardness.py"
click node_calibrate "https://github.com/marchbeta2087/minbms/blob/main/tools/calibrate.py"
click node_basmat_client "https://github.com/marchbeta2087/minbms/blob/main/tools/basmat_client.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_matrix_core,node_versions,node_user toneBlue
class node_ordinal_core toneAmber
class node_explore_cli,node_demo toneMint
class node_reference_impl,node_notation toneRose
class node_search,node_standardness,node_calibrate,node_basmat_client,node_basmat toneIndigo
```

## Components

### Matrix rules

- [Matrix operations](https://github.com/marchbeta2087/minbms/blob/main/BashicuMatrix.hs): `BashicuMatrix.hs`
- [Expansion versions](https://github.com/marchbeta2087/minbms/blob/main/Version.hs): `Version.hs`

### Ordinal engine

- [Ordinal representation](https://github.com/marchbeta2087/minbms/blob/main/Ordinal.hs): `Ordinal.hs`

### Enumeration and analysis

- [Explore CLI](https://github.com/marchbeta2087/minbms/blob/main/Explore.hs): `Explore.hs`
- [Demo](https://github.com/marchbeta2087/minbms/blob/main/Demo.hs): `Demo.hs`

### Reference tools

- [Expansion and standardness](https://github.com/marchbeta2087/minbms/blob/main/tools/bms_reference.py): `tools/bms_reference.py`
- [Ordinal notation comparison](https://github.com/marchbeta2087/minbms/blob/main/tools/ordinal_notation.py): `tools/ordinal_notation.py`

### Basmat integration

- [Ordinal search](https://github.com/marchbeta2087/minbms/blob/main/tools/search.py): `tools/search.py`
- [Standardness probe](https://github.com/marchbeta2087/minbms/blob/main/tools/standardness.py): `tools/standardness.py`
- [Convention calibration](https://github.com/marchbeta2087/minbms/blob/main/tools/calibrate.py): `tools/calibrate.py`
- [Container client](https://github.com/marchbeta2087/minbms/blob/main/tools/basmat_client.py): `tools/basmat_client.py`

### Other components

- **User**
- **basmat service**

## Connections

- User → Explore CLI: enumerates matrices (evidence: `README.md`)
- Explore CLI → Matrix operations: filters and expands (evidence: `README.md`)
- Explore CLI → Ordinal representation: analyzes ordinals (evidence: `README.md`)
- Matrix operations → Expansion versions: selects expansion rule (evidence: `README.md`)
- User → Demo: runs demonstration (evidence: `README.md`)
- Expansion and standardness → Container client
- User → Ordinal search: requests ordinal search (evidence: `tools/search.py`)
- Ordinal search → Explore CLI: reads enumeration (evidence: `tools/search.py`)
- Ordinal search → Container client: submits batches (evidence: `tools/search.py`)
- Ordinal search → Ordinal notation comparison: compares notation (evidence: `tools/search.py`)
- User → Standardness probe: probes standardness (evidence: `tools/standardness.py`)
- Standardness probe → Container client: runs probes (evidence: `tools/standardness.py`)
- User → Convention calibration: calibrates conventions (evidence: `tools/calibrate.py`)
- Convention calibration → Container client: captures outputs (evidence: `tools/calibrate.py`)
- Container client → basmat service: invokes container (evidence: `tools/basmat_client.py`)
