# mrxsin/cum architecture

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

- Interactive diagram: https://gitdiagram.com/mrxsin/cum
- Repository: https://github.com/mrxsin/cum

## Overview

CUM is an experimental module whose `src/` contains BF workflow and domain programs, with `host/` supplying execution and supporting services. The evident host workflow is a user invoking the host entry point, which runs the bytecode-driven VM; the VM dispatches to services such as process execution, storage, cryptography, and worker/machine handling. The source tree also identifies graph, recovery, identity, policy, and presentation capabilities. Relationship evidence is limited to the README and sampled/source-index references; unsampled BF links are therefore not inferred.

Main entry points: [`host/bytehost/vm.py`](https://github.com/mrxsin/cum/blob/main/host/bytehost/vm.py) (Workflow VM), [`host/bytehost/process.py`](https://github.com/mrxsin/cum/blob/main/host/bytehost/process.py) (Process runner), [`host/bytehost/__main__.py`](https://github.com/mrxsin/cum/blob/main/host/bytehost/__main__.py) (Host CLI), [`host/bytehost/worker.py`](https://github.com/mrxsin/cum/blob/main/host/bytehost/worker.py) (Byte worker)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_entry["Host entry"]
  node_cli["Host CLI<br/>[__main__.py]"]
  node_vm["Workflow VM<br/>[vm.py]"]
end

subgraph group_execution["Execution services"]
  node_process["Process runner<br/>[process.py]"]
  node_qemu["QEMU isolation<br/>[qemu_isolation.py]"]
  node_worker["Byte worker<br/>[worker.py]"]
  node_machine["Byte machine<br/>[machine.py]"]
  node_transport["Record transport<br/>[transport.py]"]
  node_xax["XAX query<br/>[xax_query.py]"]
end

subgraph group_integrity["Integrity and state"]
  node_storage[("Tree storage<br/>[storage.py]")]
  node_archive["Archive handling<br/>[archive.py]"]
  node_crypto["Cryptography<br/>[crypto.py]"]
  node_trusted["Trusted tools<br/>[trusted.py]"]
end

subgraph group_workflows["BF workflows"]
  node_bf_core["BF core programs<br/>[command.bf]"]
  node_bf_graph["Graph workflows<br/>[flow.bf]"]
  node_bf_transform["Transform workflow<br/>[transform.bf]"]
end

subgraph group_domain["Domain capabilities"]
  node_bf_recovery["Recovery workflows"]
  node_bf_identity["Identity flows<br/>[identity_flow.bf]"]
  node_bf_policy["Policy programs"]
  node_bf_presentation["Presentation flows"]
end

node_user(("User"))

node_user -.->|"invokes"| node_cli
node_cli -->|"runs"| node_vm
node_vm -->|"uses"| node_storage
node_vm -->|"uses"| node_process
node_vm -->|"uses"| node_archive
node_vm -->|"uses"| node_crypto
node_vm -->|"uses"| node_worker
node_vm -->|"uses"| node_machine
node_vm -->|"uses"| node_transport
node_vm -->|"uses"| node_trusted
node_process -->|"dispatches"| node_qemu
node_worker -->|"uses"| node_transport
node_machine -->|"runs worker"| node_process
node_crypto -->|"invokes"| node_trusted

click node_cli "https://github.com/mrxsin/cum/blob/main/host/bytehost/__main__.py"
click node_vm "https://github.com/mrxsin/cum/blob/main/host/bytehost/vm.py"
click node_process "https://github.com/mrxsin/cum/blob/main/host/bytehost/process.py"
click node_qemu "https://github.com/mrxsin/cum/blob/main/host/bytehost/qemu_isolation.py"
click node_worker "https://github.com/mrxsin/cum/blob/main/host/bytehost/worker.py"
click node_machine "https://github.com/mrxsin/cum/blob/main/host/bytehost/machine.py"
click node_storage "https://github.com/mrxsin/cum/blob/main/host/bytehost/storage.py"
click node_archive "https://github.com/mrxsin/cum/blob/main/host/bytehost/archive.py"
click node_crypto "https://github.com/mrxsin/cum/blob/main/host/bytehost/crypto.py"
click node_trusted "https://github.com/mrxsin/cum/blob/main/host/bytehost/trusted.py"
click node_transport "https://github.com/mrxsin/cum/blob/main/host/bytehost/transport.py"
click node_xax "https://github.com/mrxsin/cum/blob/main/host/providers/xax_query.py"
click node_bf_core "https://github.com/mrxsin/cum/blob/main/src/command.bf"
click node_bf_graph "https://github.com/mrxsin/cum/blob/main/src/graphs/flow.bf"
click node_bf_transform "https://github.com/mrxsin/cum/blob/main/src/transform.bf"
click node_bf_recovery "https://github.com/mrxsin/cum/blob/main/src/project_recovery.bf"
click node_bf_identity "https://github.com/mrxsin/cum/blob/main/src/identity_flow.bf"
click node_bf_policy "https://github.com/mrxsin/cum/blob/main/src/resistance_policy.bf"
click node_bf_presentation "https://github.com/mrxsin/cum/blob/main/src/presentation_flow.bf"

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_cli,node_vm,node_user toneBlue
class node_process,node_qemu,node_worker,node_machine,node_transport,node_xax toneAmber
class node_storage,node_archive,node_crypto,node_trusted toneMint
class node_bf_core,node_bf_graph,node_bf_transform toneRose
class node_bf_recovery,node_bf_identity,node_bf_policy,node_bf_presentation toneIndigo
```

## Components

### Host entry

- [Host CLI](https://github.com/mrxsin/cum/blob/main/host/bytehost/__main__.py): `host/bytehost/__main__.py`
- [Workflow VM](https://github.com/mrxsin/cum/blob/main/host/bytehost/vm.py): `host/bytehost/vm.py`

### Execution services

- [Process runner](https://github.com/mrxsin/cum/blob/main/host/bytehost/process.py): `host/bytehost/process.py`
- [QEMU isolation](https://github.com/mrxsin/cum/blob/main/host/bytehost/qemu_isolation.py): `host/bytehost/qemu_isolation.py`
- [Byte worker](https://github.com/mrxsin/cum/blob/main/host/bytehost/worker.py): `host/bytehost/worker.py`
- [Byte machine](https://github.com/mrxsin/cum/blob/main/host/bytehost/machine.py): `host/bytehost/machine.py`
- [Record transport](https://github.com/mrxsin/cum/blob/main/host/bytehost/transport.py): `host/bytehost/transport.py`
- [XAX query](https://github.com/mrxsin/cum/blob/main/host/providers/xax_query.py): `host/providers/xax_query.py`

### Integrity and state

- [Tree storage](https://github.com/mrxsin/cum/blob/main/host/bytehost/storage.py): `host/bytehost/storage.py`
- [Archive handling](https://github.com/mrxsin/cum/blob/main/host/bytehost/archive.py): `host/bytehost/archive.py`
- [Cryptography](https://github.com/mrxsin/cum/blob/main/host/bytehost/crypto.py): `host/bytehost/crypto.py`
- [Trusted tools](https://github.com/mrxsin/cum/blob/main/host/bytehost/trusted.py): `host/bytehost/trusted.py`

### BF workflows

- [BF core programs](https://github.com/mrxsin/cum/blob/main/src/command.bf): `src/command.bf`
- [Graph workflows](https://github.com/mrxsin/cum/blob/main/src/graphs/flow.bf): `src/graphs/flow.bf`
- [Transform workflow](https://github.com/mrxsin/cum/blob/main/src/transform.bf): `src/transform.bf`

### Domain capabilities

- [Recovery workflows](https://github.com/mrxsin/cum/blob/main/src/project_recovery.bf): `src/project_recovery.bf`
- [Identity flows](https://github.com/mrxsin/cum/blob/main/src/identity_flow.bf): `src/identity_flow.bf`
- [Policy programs](https://github.com/mrxsin/cum/blob/main/src/resistance_policy.bf): `src/resistance_policy.bf`
- [Presentation flows](https://github.com/mrxsin/cum/blob/main/src/presentation_flow.bf): `src/presentation_flow.bf`

### Other components

- **User**

## Connections

- User → Host CLI: invokes
- Host CLI → Workflow VM: runs (evidence: `host/bytehost/__main__.py`)
- Workflow VM → Tree storage: uses (evidence: `host/bytehost/vm.py`)
- Workflow VM → Process runner: uses (evidence: `host/bytehost/vm.py`)
- Workflow VM → Archive handling: uses (evidence: `host/bytehost/vm.py`)
- Workflow VM → Cryptography: uses (evidence: `host/bytehost/vm.py`)
- Workflow VM → Byte worker: uses (evidence: `host/bytehost/vm.py`)
- Workflow VM → Byte machine: uses (evidence: `host/bytehost/vm.py`)
- Workflow VM → Record transport: uses (evidence: `host/bytehost/vm.py`)
- Workflow VM → Trusted tools: uses (evidence: `host/bytehost/vm.py`)
- Process runner → QEMU isolation: dispatches (evidence: `host/bytehost/process.py`)
- Byte worker → Record transport: uses (evidence: `host/bytehost/worker.py`)
- Byte machine → Process runner: runs worker (evidence: `host/bytehost/machine.py`)
- Cryptography → Trusted tools: invokes (evidence: `host/bytehost/crypto.py`)
