# alanvaa06/grokbot-second-brain-os architecture

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

- Interactive diagram: https://gitdiagram.com/alanvaa06/grokbot-second-brain-os
- Repository: https://github.com/alanvaa06/grokbot-second-brain-os

## Overview

This repository is a markdown-and-git operating system for a team of bots, not a conventional application. Its main workflow starts with a user asking a chief-of-staff bot to install and configure a private vault, then the team shares that vault for project work and knowledge management. The graph follows capabilities and relationships documented in the README; no source excerpts were provided, so implementation-level calls and adapter internals are not inferred.

Main entry points: [`agents/_blocks/chief.md`](https://github.com/alanvaa06/grokbot-second-brain-os/blob/main/agents/_blocks/chief.md) (Chief role), [`agents/_blocks/librarian.md`](https://github.com/alanvaa06/grokbot-second-brain-os/blob/main/agents/_blocks/librarian.md) (Librarian role), [`agents/_blocks/assistant.md`](https://github.com/alanvaa06/grokbot-second-brain-os/blob/main/agents/_blocks/assistant.md) (Assistant role), [`agents/_skills/second-brain-compile-plan/SKILL.md`](https://github.com/alanvaa06/grokbot-second-brain-os/blob/main/agents/_skills/second-brain-compile-plan/SKILL.md) (Source compilation)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_team["Bot team"]
  node_chief["Chief role<br/>[chief.md]"]
  node_assistant["Assistant role<br/>[assistant.md]"]
  node_librarian["Librarian role<br/>[librarian.md]"]
  node_skills["Shared skills"]
  node_manual["Agent manual<br/>[AGENTS.md]"]
  node_init["Vault setup<br/>[SKILL.md]"]
  node_newagent["Agent creation<br/>[SKILL.md]"]
end

subgraph group_brain["Shared brain"]
  node_userfacts["User facts"]
  node_projects["Project records"]
  node_newproject["Project creation<br/>[SKILL.md]"]
end

subgraph group_knowledge["Knowledge workflow"]
  node_raw["Raw sources"]
  node_wiki["Compiled wiki"]
  node_index["Wiki index<br/>[_master-index.md]"]
  node_log["Wiki log<br/>[_log.md]"]
  node_compile["Source compilation<br/>[SKILL.md]"]
  node_refresh["Index refresh<br/>[SKILL.md]"]
  node_audit["Vault audit<br/>[SKILL.md]"]
end

subgraph group_runtimes["Runtime adapters"]
  node_grok["Grok Bot adapter"]
  node_claude["Claude Code adapter"]
  node_generic["Generic adapter"]
  node_github["GitHub"]
  node_obsidian["Obsidian"]
end

node_user(("Vault owner"))

node_user -->|"requests setup"| node_chief
node_chief -->|"runs setup"| node_init
node_init -->|"creates private repo"| node_github
node_chief -->|"records answers"| node_userfacts
node_chief -->|"manages projects"| node_projects
node_chief -->|"adds agents"| node_newagent
node_chief -->|"adds projects"| node_newproject
node_chief -->|"delegates work"| node_assistant
node_chief -->|"delegates work"| node_librarian
node_assistant -->|"reads open tasks"| node_projects
node_assistant -->|"reports to"| node_chief
node_librarian -->|"performs audits"| node_audit
node_librarian -->|"maintains index"| node_index
node_librarian -->|"maintains log"| node_log
node_raw -->|"provides sources"| node_compile
node_compile -->|"compiles with approval"| node_wiki
node_refresh -->|"refreshes index"| node_index
node_user -->|"reads and edits"| node_obsidian
node_obsidian -->|"syncs vault"| node_github
node_grok -->|"supports orchestration"| node_chief
node_claude -->|"offers compile command"| node_compile
node_claude -->|"offers audit command"| node_audit
node_generic -->|"prints descriptions"| node_chief
node_manual -->|"guides behavior"| node_chief

click node_chief "https://github.com/alanvaa06/grokbot-second-brain-os/blob/main/agents/_blocks/chief.md"
click node_assistant "https://github.com/alanvaa06/grokbot-second-brain-os/blob/main/agents/_blocks/assistant.md"
click node_librarian "https://github.com/alanvaa06/grokbot-second-brain-os/blob/main/agents/_blocks/librarian.md"
click node_skills "https://github.com/alanvaa06/grokbot-second-brain-os/tree/main/agents/_skills"
click node_manual "https://github.com/alanvaa06/grokbot-second-brain-os/blob/main/AGENTS.md"
click node_userfacts "https://github.com/alanvaa06/grokbot-second-brain-os/tree/main/user"
click node_projects "https://github.com/alanvaa06/grokbot-second-brain-os/tree/main/projects"
click node_raw "https://github.com/alanvaa06/grokbot-second-brain-os/tree/main/raw"
click node_wiki "https://github.com/alanvaa06/grokbot-second-brain-os/tree/main/wiki"
click node_index "https://github.com/alanvaa06/grokbot-second-brain-os/blob/main/wiki/_master-index.md"
click node_log "https://github.com/alanvaa06/grokbot-second-brain-os/blob/main/wiki/_log.md"
click node_init "https://github.com/alanvaa06/grokbot-second-brain-os/blob/main/agents/_skills/second-brain-init/SKILL.md"
click node_compile "https://github.com/alanvaa06/grokbot-second-brain-os/blob/main/agents/_skills/second-brain-compile-plan/SKILL.md"
click node_refresh "https://github.com/alanvaa06/grokbot-second-brain-os/blob/main/agents/_skills/second-brain-refresh-index/SKILL.md"
click node_audit "https://github.com/alanvaa06/grokbot-second-brain-os/blob/main/agents/_skills/second-brain-audit/SKILL.md"
click node_newagent "https://github.com/alanvaa06/grokbot-second-brain-os/blob/main/agents/_skills/second-brain-new-agent/SKILL.md"
click node_newproject "https://github.com/alanvaa06/grokbot-second-brain-os/blob/main/agents/_skills/second-brain-new-project/SKILL.md"
click node_grok "https://github.com/alanvaa06/grokbot-second-brain-os/tree/main/adapters/grok-bot"
click node_claude "https://github.com/alanvaa06/grokbot-second-brain-os/tree/main/adapters/claude-code"
click node_generic "https://github.com/alanvaa06/grokbot-second-brain-os/tree/main/adapters/generic"

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_chief,node_assistant,node_librarian,node_skills,node_manual,node_init,node_newagent toneBlue
class node_userfacts,node_projects,node_newproject toneAmber
class node_raw,node_wiki,node_index,node_log,node_compile,node_refresh,node_audit toneMint
class node_grok,node_claude,node_generic,node_github,node_obsidian toneRose
class node_user toneIndigo
```

## Components

### Bot team

- [Chief role](https://github.com/alanvaa06/grokbot-second-brain-os/blob/main/agents/_blocks/chief.md): `agents/_blocks/chief.md`
- [Assistant role](https://github.com/alanvaa06/grokbot-second-brain-os/blob/main/agents/_blocks/assistant.md): `agents/_blocks/assistant.md`
- [Librarian role](https://github.com/alanvaa06/grokbot-second-brain-os/blob/main/agents/_blocks/librarian.md): `agents/_blocks/librarian.md`
- [Shared skills](https://github.com/alanvaa06/grokbot-second-brain-os/tree/main/agents/_skills): `agents/_skills`
- [Agent manual](https://github.com/alanvaa06/grokbot-second-brain-os/blob/main/AGENTS.md): `AGENTS.md`
- [Vault setup](https://github.com/alanvaa06/grokbot-second-brain-os/blob/main/agents/_skills/second-brain-init/SKILL.md): `agents/_skills/second-brain-init/SKILL.md`
- [Agent creation](https://github.com/alanvaa06/grokbot-second-brain-os/blob/main/agents/_skills/second-brain-new-agent/SKILL.md): `agents/_skills/second-brain-new-agent/SKILL.md`

### Shared brain

- [User facts](https://github.com/alanvaa06/grokbot-second-brain-os/tree/main/user): `user`
- [Project records](https://github.com/alanvaa06/grokbot-second-brain-os/tree/main/projects): `projects`
- [Project creation](https://github.com/alanvaa06/grokbot-second-brain-os/blob/main/agents/_skills/second-brain-new-project/SKILL.md): `agents/_skills/second-brain-new-project/SKILL.md`

### Knowledge workflow

- [Raw sources](https://github.com/alanvaa06/grokbot-second-brain-os/tree/main/raw): `raw`
- [Compiled wiki](https://github.com/alanvaa06/grokbot-second-brain-os/tree/main/wiki): `wiki`
- [Wiki index](https://github.com/alanvaa06/grokbot-second-brain-os/blob/main/wiki/_master-index.md): `wiki/_master-index.md`
- [Wiki log](https://github.com/alanvaa06/grokbot-second-brain-os/blob/main/wiki/_log.md): `wiki/_log.md`
- [Source compilation](https://github.com/alanvaa06/grokbot-second-brain-os/blob/main/agents/_skills/second-brain-compile-plan/SKILL.md): `agents/_skills/second-brain-compile-plan/SKILL.md`
- [Index refresh](https://github.com/alanvaa06/grokbot-second-brain-os/blob/main/agents/_skills/second-brain-refresh-index/SKILL.md): `agents/_skills/second-brain-refresh-index/SKILL.md`
- [Vault audit](https://github.com/alanvaa06/grokbot-second-brain-os/blob/main/agents/_skills/second-brain-audit/SKILL.md): `agents/_skills/second-brain-audit/SKILL.md`

### Runtime adapters

- [Grok Bot adapter](https://github.com/alanvaa06/grokbot-second-brain-os/tree/main/adapters/grok-bot): `adapters/grok-bot`
- [Claude Code adapter](https://github.com/alanvaa06/grokbot-second-brain-os/tree/main/adapters/claude-code): `adapters/claude-code`
- [Generic adapter](https://github.com/alanvaa06/grokbot-second-brain-os/tree/main/adapters/generic): `adapters/generic`
- **GitHub**
- **Obsidian**

### Other components

- **Vault owner**

## Connections

- Vault owner → Chief role: requests setup (evidence: `README.md`)
- Chief role → Vault setup: runs setup (evidence: `README.md`)
- Vault setup → GitHub: creates private repo (evidence: `README.md`)
- Chief role → User facts: records answers (evidence: `README.md`)
- Chief role → Project records: manages projects (evidence: `README.md`)
- Chief role → Agent creation: adds agents (evidence: `README.md`)
- Chief role → Project creation: adds projects (evidence: `README.md`)
- Chief role → Assistant role: delegates work (evidence: `README.md`)
- Chief role → Librarian role: delegates work (evidence: `README.md`)
- Assistant role → Project records: reads open tasks (evidence: `README.md`)
- Assistant role → Chief role: reports to (evidence: `README.md`)
- Librarian role → Vault audit: performs audits (evidence: `README.md`)
- Librarian role → Wiki index: maintains index (evidence: `README.md`)
- Librarian role → Wiki log: maintains log (evidence: `README.md`)
- Raw sources → Source compilation: provides sources (evidence: `README.md`)
- Source compilation → Compiled wiki: compiles with approval (evidence: `README.md`)
- Index refresh → Wiki index: refreshes index (evidence: `README.md`)
- Vault owner → Obsidian: reads and edits (evidence: `README.md`)
- Obsidian → GitHub: syncs vault (evidence: `README.md`)
- Grok Bot adapter → Chief role: supports orchestration (evidence: `README.md`)
- Claude Code adapter → Source compilation: offers compile command (evidence: `README.md`)
- Claude Code adapter → Vault audit: offers audit command (evidence: `README.md`)
- Generic adapter → Chief role: prints descriptions (evidence: `README.md`)
- Agent manual → Chief role: guides behavior (evidence: `README.md`)
