# selectess/acse architecture

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

- Interactive diagram: https://gitdiagram.com/selectess/acse
- Repository: https://github.com/selectess/acse

## Overview

ACSE is a single-binary cognitive agent: user text is interpreted by SPICG-Ignition, processed by a guarded cognitive graph, and answered from learned knowledge or a remote sensory call whose response is distilled into the graph. Missions add a planning-and-execution branch, with checks run in a sandbox. Persistent brain state and the CORTEX panel expose learned knowledge and activity. The README documents these relationships; no source excerpts were available, so implementation-level calls beyond those statements are not represented.

Main entry points: [`src/acse.zig`](https://github.com/selectess/acse/blob/main/src/acse.zig) (ACSE agent), [`panel/cortex.html`](https://github.com/selectess/acse/blob/main/panel/cortex.html) (CORTEX panel)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_cognition["Cognitive graph"]
  node_ignition["SPICG-Ignition<br/>[acse.zig]"]
  node_spicg["SPICG substrate<br/>[acse.zig]"]
  node_activation["Activation &#40;A&#41;<br/>[acse.zig]"]
  node_detection["Detection &#40;D&#41;<br/>[acse.zig]"]
  node_overcoming["Overcoming &#40;O&#41;<br/>[acse.zig]"]
  node_guidance["Guidance &#40;G&#41;<br/>[acse.zig]"]
  node_ceo["Sovereign selector<br/>[acse.zig]"]
end

subgraph group_learning["Learning and memory"]
  node_miroir["MIROIR recall<br/>[acse.zig]"]
  node_superconscious["Superconscious<br/>[acse.zig]"]
  node_distillation["Knowledge distillation<br/>[acse.zig]"]
  node_brain[("Persistent brain<br/>[acse.zig]")]
  node_metabolism["Graph metabolism<br/>[acse.zig]"]
end

subgraph group_missions["Mission execution"]
  node_perception["PERCEPTION planner<br/>[acse.zig]"]
  node_body["Mission body<br/>[acse.zig]"]
  node_forge["FORGE sandbox<br/>[acse.zig]"]
end

subgraph group_visibility["Inspection"]
  node_cortex["CORTEX panel<br/>[cortex.html]"]
end

node_user(("User"))
node_agent["ACSE agent<br/>[acse.zig]"]
node_ollama["Ollama Cloud"]

node_user -->|"submits text"| node_agent
node_agent -->|"parses intent"| node_ignition
node_ignition -->|"seeds graph"| node_spicg
node_spicg -->|"wires to"| node_activation
node_activation -->|"wires to"| node_detection
node_detection -->|"wires to"| node_overcoming
node_overcoming -->|"guards"| node_guidance
node_overcoming -->|"inhibits"| node_miroir
node_agent -->|"selects tools"| node_ceo
node_ceo -->|"obeys veto"| node_overcoming
node_agent -->|"recalls knowledge"| node_miroir
node_agent -->|"queries each step"| node_superconscious
node_superconscious -->|"calls sensory model"| node_ollama
node_superconscious -->|"returns answer"| node_distillation
node_distillation -->|"adds graph knowledge"| node_brain
node_brain -->|"serves recall"| node_miroir
node_brain -->|"ages knowledge"| node_metabolism
node_agent -->|"starts mission"| node_perception
node_perception -->|"models task tree"| node_body
node_body -->|"runs checks"| node_forge
node_brain -->|"visualizes graph"| node_cortex

click node_agent "https://github.com/selectess/acse/blob/main/src/acse.zig"
click node_ignition "https://github.com/selectess/acse/blob/main/src/acse.zig"
click node_spicg "https://github.com/selectess/acse/blob/main/src/acse.zig"
click node_activation "https://github.com/selectess/acse/blob/main/src/acse.zig"
click node_detection "https://github.com/selectess/acse/blob/main/src/acse.zig"
click node_overcoming "https://github.com/selectess/acse/blob/main/src/acse.zig"
click node_guidance "https://github.com/selectess/acse/blob/main/src/acse.zig"
click node_ceo "https://github.com/selectess/acse/blob/main/src/acse.zig"
click node_miroir "https://github.com/selectess/acse/blob/main/src/acse.zig"
click node_superconscious "https://github.com/selectess/acse/blob/main/src/acse.zig"
click node_distillation "https://github.com/selectess/acse/blob/main/src/acse.zig"
click node_brain "https://github.com/selectess/acse/blob/main/src/acse.zig"
click node_metabolism "https://github.com/selectess/acse/blob/main/src/acse.zig"
click node_perception "https://github.com/selectess/acse/blob/main/src/acse.zig"
click node_body "https://github.com/selectess/acse/blob/main/src/acse.zig"
click node_forge "https://github.com/selectess/acse/blob/main/src/acse.zig"
click node_cortex "https://github.com/selectess/acse/blob/main/panel/cortex.html"

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_ignition,node_spicg,node_activation,node_detection,node_overcoming,node_guidance,node_ceo,node_user toneBlue
class node_miroir,node_superconscious,node_distillation,node_brain,node_metabolism toneAmber
class node_perception,node_body,node_forge toneMint
class node_cortex toneRose
class node_agent toneTeal
class node_ollama toneIndigo
```

## Components

### Cognitive graph

- [SPICG-Ignition](https://github.com/selectess/acse/blob/main/src/acse.zig): `src/acse.zig`
- [SPICG substrate](https://github.com/selectess/acse/blob/main/src/acse.zig): `src/acse.zig`
- [Activation (A)](https://github.com/selectess/acse/blob/main/src/acse.zig): `src/acse.zig`
- [Detection (D)](https://github.com/selectess/acse/blob/main/src/acse.zig): `src/acse.zig`
- [Overcoming (O)](https://github.com/selectess/acse/blob/main/src/acse.zig): `src/acse.zig`
- [Guidance (G)](https://github.com/selectess/acse/blob/main/src/acse.zig): `src/acse.zig`
- [Sovereign selector](https://github.com/selectess/acse/blob/main/src/acse.zig): `src/acse.zig`

### Learning and memory

- [MIROIR recall](https://github.com/selectess/acse/blob/main/src/acse.zig): `src/acse.zig`
- [Superconscious](https://github.com/selectess/acse/blob/main/src/acse.zig): `src/acse.zig`
- [Knowledge distillation](https://github.com/selectess/acse/blob/main/src/acse.zig): `src/acse.zig`
- [Persistent brain](https://github.com/selectess/acse/blob/main/src/acse.zig): `src/acse.zig`
- [Graph metabolism](https://github.com/selectess/acse/blob/main/src/acse.zig): `src/acse.zig`

### Mission execution

- [PERCEPTION planner](https://github.com/selectess/acse/blob/main/src/acse.zig): `src/acse.zig`
- [Mission body](https://github.com/selectess/acse/blob/main/src/acse.zig): `src/acse.zig`
- [FORGE sandbox](https://github.com/selectess/acse/blob/main/src/acse.zig): `src/acse.zig`

### Inspection

- [CORTEX panel](https://github.com/selectess/acse/blob/main/panel/cortex.html): `panel/cortex.html`

### Other components

- **User**
- [ACSE agent](https://github.com/selectess/acse/blob/main/src/acse.zig): `src/acse.zig`
- **Ollama Cloud**

## Connections

- User → ACSE agent: submits text (evidence: `README.md`)
- ACSE agent → SPICG-Ignition: parses intent (evidence: `README.md`)
- SPICG-Ignition → SPICG substrate: seeds graph (evidence: `README.md`)
- SPICG substrate → Activation (A): wires to (evidence: `README.md`)
- Activation (A) → Detection (D): wires to (evidence: `README.md`)
- Detection (D) → Overcoming (O): wires to (evidence: `README.md`)
- Overcoming (O) → Guidance (G): guards (evidence: `README.md`)
- Overcoming (O) → MIROIR recall: inhibits (evidence: `README.md`)
- ACSE agent → Sovereign selector: selects tools (evidence: `README.md`)
- Sovereign selector → Overcoming (O): obeys veto (evidence: `README.md`)
- ACSE agent → MIROIR recall: recalls knowledge (evidence: `README.md`)
- ACSE agent → Superconscious: queries each step (evidence: `README.md`)
- Superconscious → Ollama Cloud: calls sensory model (evidence: `README.md`)
- Superconscious → Knowledge distillation: returns answer (evidence: `README.md`)
- Knowledge distillation → Persistent brain: adds graph knowledge (evidence: `README.md`)
- Persistent brain → MIROIR recall: serves recall (evidence: `README.md`)
- Persistent brain → Graph metabolism: ages knowledge (evidence: `README.md`)
- ACSE agent → PERCEPTION planner: starts mission (evidence: `README.md`)
- PERCEPTION planner → Mission body: models task tree (evidence: `README.md`)
- Mission body → FORGE sandbox: runs checks (evidence: `README.md`)
- Persistent brain → CORTEX panel: visualizes graph (evidence: `README.md`)
