# mhsnnclk/toki-brain architecture

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

- Interactive diagram: https://gitdiagram.com/mhsnnclk/toki-brain
- Repository: https://github.com/mhsnnclk/toki-brain

## Overview

Toki is a local-first, model-independent personal knowledge workspace: Markdown is the source of truth, and Git provides version history. Its key workflow routes new material through the inbox before it becomes part of the organized knowledge base; the documented directories distinguish journals, active projects, ongoing areas, and evergreen knowledge. The repository also provides operating guidance, command definitions, agent profiles, and a learning-record skill. The README documents these capabilities, but no source excerpts were supplied, so links between individual commands, agents, and implementation details are intentionally omitted.

Main entry points: [`00-inbox`](https://github.com/mhsnnclk/toki-brain/tree/master/00-inbox) (Inbox), [`README.md`](https://github.com/mhsnnclk/toki-brain/blob/master/README.md) (Workspace rules), [`vault`](https://github.com/mhsnnclk/toki-brain/tree/master/vault) (Encrypted vault), [`10-journal`](https://github.com/mhsnnclk/toki-brain/tree/master/10-journal) (Daily journal)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_capture["Capture and knowledge"]
  node_inbox["Inbox"]
  node_journal["Daily journal"]
  node_projects["Active projects"]
  node_areas["Ongoing areas"]
  node_brain["Evergreen knowledge"]
end

subgraph group_guidance["Workspace guidance"]
  node_readme["Workspace rules<br/>[README.md]"]
  node_agentsguide["Agent lifecycle<br/>[AGENTS.md]"]
  node_bootstrap["Identity setup<br/>[BOOTSTRAP.md]"]
  node_index["Knowledge map<br/>[index.md]"]
end

subgraph group_assistants["AI workflows"]
  node_commands["Workspace commands"]
  node_learning["Learning record skill<br/>[SKILL.md]"]
  node_agentprofiles["Model profiles"]
end

subgraph group_state["State and protection"]
  node_vault[("Encrypted vault")]
  node_memory["Memory<br/>[MEMORY.md]"]
  node_projectstate["Project state<br/>[STATE.md]"]
  node_projectbrief["Project brief<br/>[toki-mvp-brief.md]"]
end

node_person(("User"))
node_git[("Git history")]
node_sops["SOPS and age"]

node_person -->|"captures notes"| node_inbox
node_inbox -->|"routes through"| node_journal
node_inbox -->|"routes through"| node_projects
node_inbox -->|"routes through"| node_areas
node_inbox -->|"routes through"| node_brain
node_person -->|"uses commands"| node_commands
node_readme -->|"requires capture first"| node_inbox
node_readme -->|"documents versioning"| node_git
node_readme -->|"documents encryption"| node_vault
node_vault -->|"encrypted with"| node_sops

click node_inbox "https://github.com/mhsnnclk/toki-brain/tree/master/00-inbox"
click node_journal "https://github.com/mhsnnclk/toki-brain/tree/master/10-journal"
click node_projects "https://github.com/mhsnnclk/toki-brain/tree/master/20-projects"
click node_areas "https://github.com/mhsnnclk/toki-brain/tree/master/30-areas"
click node_brain "https://github.com/mhsnnclk/toki-brain/tree/master/40-brain"
click node_vault "https://github.com/mhsnnclk/toki-brain/tree/master/vault"
click node_readme "https://github.com/mhsnnclk/toki-brain/blob/master/README.md"
click node_agentsguide "https://github.com/mhsnnclk/toki-brain/blob/master/AGENTS.md"
click node_bootstrap "https://github.com/mhsnnclk/toki-brain/blob/master/BOOTSTRAP.md"
click node_index "https://github.com/mhsnnclk/toki-brain/blob/master/index.md"
click node_memory "https://github.com/mhsnnclk/toki-brain/blob/master/MEMORY.md"
click node_commands "https://github.com/mhsnnclk/toki-brain/tree/master/commands"
click node_learning "https://github.com/mhsnnclk/toki-brain/blob/master/skills/toki-ogrenme-kaydi/SKILL.md"
click node_agentprofiles "https://github.com/mhsnnclk/toki-brain/tree/master/agents"
click node_projectstate "https://github.com/mhsnnclk/toki-brain/blob/master/20-projects/11.21-toki-mvp/STATE.md"
click node_projectbrief "https://github.com/mhsnnclk/toki-brain/blob/master/20-projects/11.21-toki-mvp/toki-mvp-brief.md"

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_inbox,node_journal,node_projects,node_areas,node_brain,node_person toneBlue
class node_readme,node_agentsguide,node_bootstrap,node_index,node_git toneAmber
class node_commands,node_learning,node_agentprofiles toneMint
class node_vault,node_memory,node_projectstate,node_projectbrief toneRose
class node_sops toneIndigo
```

## Components

### Capture and knowledge

- [Inbox](https://github.com/mhsnnclk/toki-brain/tree/master/00-inbox): `00-inbox`
- [Daily journal](https://github.com/mhsnnclk/toki-brain/tree/master/10-journal): `10-journal`
- [Active projects](https://github.com/mhsnnclk/toki-brain/tree/master/20-projects): `20-projects`
- [Ongoing areas](https://github.com/mhsnnclk/toki-brain/tree/master/30-areas): `30-areas`
- [Evergreen knowledge](https://github.com/mhsnnclk/toki-brain/tree/master/40-brain): `40-brain`

### Workspace guidance

- [Workspace rules](https://github.com/mhsnnclk/toki-brain/blob/master/README.md): `README.md`
- [Agent lifecycle](https://github.com/mhsnnclk/toki-brain/blob/master/AGENTS.md): `AGENTS.md`
- [Identity setup](https://github.com/mhsnnclk/toki-brain/blob/master/BOOTSTRAP.md): `BOOTSTRAP.md`
- [Knowledge map](https://github.com/mhsnnclk/toki-brain/blob/master/index.md): `index.md`

### AI workflows

- [Workspace commands](https://github.com/mhsnnclk/toki-brain/tree/master/commands): `commands`
- [Learning record skill](https://github.com/mhsnnclk/toki-brain/blob/master/skills/toki-ogrenme-kaydi/SKILL.md): `skills/toki-ogrenme-kaydi/SKILL.md`
- [Model profiles](https://github.com/mhsnnclk/toki-brain/tree/master/agents): `agents`

### State and protection

- [Encrypted vault](https://github.com/mhsnnclk/toki-brain/tree/master/vault): `vault`
- [Memory](https://github.com/mhsnnclk/toki-brain/blob/master/MEMORY.md): `MEMORY.md`
- [Project state](https://github.com/mhsnnclk/toki-brain/blob/master/20-projects/11.21-toki-mvp/STATE.md): `20-projects/11.21-toki-mvp/STATE.md`
- [Project brief](https://github.com/mhsnnclk/toki-brain/blob/master/20-projects/11.21-toki-mvp/toki-mvp-brief.md): `20-projects/11.21-toki-mvp/toki-mvp-brief.md`

### Other components

- **User**
- **Git history**
- **SOPS and age**

## Connections

- User → Inbox: captures notes (evidence: `README.md`)
- Inbox → Daily journal: routes through (evidence: `README.md`)
- Inbox → Active projects: routes through (evidence: `README.md`)
- Inbox → Ongoing areas: routes through (evidence: `README.md`)
- Inbox → Evergreen knowledge: routes through (evidence: `README.md`)
- User → Workspace commands: uses commands (evidence: `README.md`)
- Workspace rules → Inbox: requires capture first (evidence: `README.md`)
- Workspace rules → Git history: documents versioning (evidence: `README.md`)
- Workspace rules → Encrypted vault: documents encryption (evidence: `README.md`)
- Encrypted vault → SOPS and age: encrypted with (evidence: `README.md`)
