# isumer/cereblnk architecture

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

- Interactive diagram: https://gitdiagram.com/isumer/cereblnk
- Repository: https://github.com/isumer/cereblnk

## Overview

Cereblnk is a Claude Code engineering-discipline plugin: a user invokes a command or the model may select a skill, then specialists work under selected constraints while hooks and gates enforce checks. Run plans, digests, and archival preserve resumability. The README documents these product relationships; sampled source also confirms document indexing/extraction, XML tooling, and systems-note layout helpers. Several runtime subsystems are represented at directory level because their internal wiring was not sampled.

Main entry points: [`plugins/cereblnk/skills`](https://github.com/isumer/cereblnk/tree/main/plugins/cereblnk/skills) (Command Skills), [`plugins/cereblnk/agents`](https://github.com/isumer/cereblnk/tree/main/plugins/cereblnk/agents) (Specialist Agents), [`plugins/cereblnk/scripts/xmltools/xmlcore.py`](https://github.com/isumer/cereblnk/blob/main/plugins/cereblnk/scripts/xmltools/xmlcore.py) (XML Core), [`plugins/cereblnk/scripts/select-agents`](https://github.com/isumer/cereblnk/blob/main/plugins/cereblnk/scripts/select-agents) (Agent Selection)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_workflow["Command Workflow"]
  node_entryskills["Command Skills"]
  node_selection["Agent Selection"]
  node_agents["Specialist Agents"]
end

subgraph group_control["Agent Controls"]
  node_rules["Task Constraints"]
  node_hooks["Enforcement Hooks"]
  node_gatechecks["Completion Gates"]
end

subgraph group_runtime["Run Runtime"]
  node_runstate[("Run State")]
  node_runcommands["Run Lifecycle"]
end

subgraph group_tools["Engineering Tools"]
  node_docindex["Document Indexing<br/>[docindex.py]"]
  node_docparse["Document Extraction"]
  node_xmlparse["XML Parsing<br/>[xml_parse.py]"]
  node_xmlcore["XML Core<br/>[xmlcore.py]"]
  node_xsdvalidate["XSD Validation<br/>[xsd_validate.py]"]
  node_xsdgenerate["XSD Generation<br/>[xsd_generate.py]"]
  node_sheetlayout["Sheet Layout<br/>[sheetlayout.py]"]
  node_sheetfont["Font Metrics<br/>[sheetfont.py]"]
end

node_engineer(("Engineer"))
node_claude["Claude Code"]

node_engineer -->|"requests work"| node_claude
node_claude -->|"invokes command"| node_entryskills
node_claude -.->|"may select"| node_entryskills
node_entryskills -->|"selects specialists"| node_selection
node_selection -->|"selects constraints"| node_rules
node_entryskills -->|"assigns tasks"| node_agents
node_agents -->|"works under"| node_rules
node_hooks -->|"runs checks"| node_gatechecks
node_gatechecks -->|"blocks completion"| node_agents
node_entryskills -->|"records plan"| node_runstate
node_runcommands -->|"archives runs"| node_runstate
node_docindex -->|"extracts through"| node_docparse
node_xmlparse -->|"parses with"| node_xmlcore
node_xsdvalidate -->|"parses with"| node_xmlcore
node_xsdgenerate -->|"parses with"| node_xmlcore
node_sheetlayout -->|"measures text"| node_sheetfont

click node_entryskills "https://github.com/isumer/cereblnk/tree/main/plugins/cereblnk/skills"
click node_selection "https://github.com/isumer/cereblnk/blob/main/plugins/cereblnk/scripts/select-agents"
click node_agents "https://github.com/isumer/cereblnk/tree/main/plugins/cereblnk/agents"
click node_rules "https://github.com/isumer/cereblnk/tree/main/plugins/cereblnk/rules"
click node_hooks "https://github.com/isumer/cereblnk/tree/main/plugins/cereblnk/hooks"
click node_gatechecks "https://github.com/isumer/cereblnk/tree/main/plugins/cereblnk/hooks/scripts"
click node_runcommands "https://github.com/isumer/cereblnk/blob/main/plugins/cereblnk/scripts/run-flag"
click node_docindex "https://github.com/isumer/cereblnk/blob/main/plugins/cereblnk/scripts/lib/docindex.py"
click node_docparse "https://github.com/isumer/cereblnk/tree/main/plugins/cereblnk/scripts/docparse"
click node_xmlparse "https://github.com/isumer/cereblnk/blob/main/plugins/cereblnk/scripts/xmltools/xml_parse.py"
click node_xmlcore "https://github.com/isumer/cereblnk/blob/main/plugins/cereblnk/scripts/xmltools/xmlcore.py"
click node_xsdvalidate "https://github.com/isumer/cereblnk/blob/main/plugins/cereblnk/scripts/xmltools/xsd_validate.py"
click node_xsdgenerate "https://github.com/isumer/cereblnk/blob/main/plugins/cereblnk/scripts/xmltools/xsd_generate.py"
click node_sheetlayout "https://github.com/isumer/cereblnk/blob/main/scripts/lib/sheetlayout.py"
click node_sheetfont "https://github.com/isumer/cereblnk/blob/main/scripts/lib/sheetfont.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_entryskills,node_selection,node_agents toneBlue
class node_rules,node_hooks,node_gatechecks toneAmber
class node_runstate,node_runcommands toneMint
class node_docindex,node_docparse,node_xmlparse,node_xmlcore,node_xsdvalidate,node_xsdgenerate,node_sheetlayout,node_sheetfont toneRose
class node_engineer,node_claude toneIndigo
```

## Components

### Command Workflow

- [Command Skills](https://github.com/isumer/cereblnk/tree/main/plugins/cereblnk/skills): `plugins/cereblnk/skills`
- [Agent Selection](https://github.com/isumer/cereblnk/blob/main/plugins/cereblnk/scripts/select-agents): `plugins/cereblnk/scripts/select-agents`
- [Specialist Agents](https://github.com/isumer/cereblnk/tree/main/plugins/cereblnk/agents): `plugins/cereblnk/agents`

### Agent Controls

- [Task Constraints](https://github.com/isumer/cereblnk/tree/main/plugins/cereblnk/rules): `plugins/cereblnk/rules`
- [Enforcement Hooks](https://github.com/isumer/cereblnk/tree/main/plugins/cereblnk/hooks): `plugins/cereblnk/hooks`
- [Completion Gates](https://github.com/isumer/cereblnk/tree/main/plugins/cereblnk/hooks/scripts): `plugins/cereblnk/hooks/scripts`

### Run Runtime

- **Run State**
- [Run Lifecycle](https://github.com/isumer/cereblnk/blob/main/plugins/cereblnk/scripts/run-flag): `plugins/cereblnk/scripts/run-flag`

### Engineering Tools

- [Document Indexing](https://github.com/isumer/cereblnk/blob/main/plugins/cereblnk/scripts/lib/docindex.py): `plugins/cereblnk/scripts/lib/docindex.py`
- [Document Extraction](https://github.com/isumer/cereblnk/tree/main/plugins/cereblnk/scripts/docparse): `plugins/cereblnk/scripts/docparse`
- [XML Parsing](https://github.com/isumer/cereblnk/blob/main/plugins/cereblnk/scripts/xmltools/xml_parse.py): `plugins/cereblnk/scripts/xmltools/xml_parse.py`
- [XML Core](https://github.com/isumer/cereblnk/blob/main/plugins/cereblnk/scripts/xmltools/xmlcore.py): `plugins/cereblnk/scripts/xmltools/xmlcore.py`
- [XSD Validation](https://github.com/isumer/cereblnk/blob/main/plugins/cereblnk/scripts/xmltools/xsd_validate.py): `plugins/cereblnk/scripts/xmltools/xsd_validate.py`
- [XSD Generation](https://github.com/isumer/cereblnk/blob/main/plugins/cereblnk/scripts/xmltools/xsd_generate.py): `plugins/cereblnk/scripts/xmltools/xsd_generate.py`
- [Sheet Layout](https://github.com/isumer/cereblnk/blob/main/scripts/lib/sheetlayout.py): `scripts/lib/sheetlayout.py`
- [Font Metrics](https://github.com/isumer/cereblnk/blob/main/scripts/lib/sheetfont.py): `scripts/lib/sheetfont.py`

### Other components

- **Engineer**
- **Claude Code**

## Connections

- Engineer → Claude Code: requests work (evidence: `README.md`)
- Claude Code → Command Skills: invokes command (evidence: `README.md`)
- Claude Code → Command Skills: may select (evidence: `README.md`)
- Command Skills → Agent Selection: selects specialists (evidence: `README.md`)
- Agent Selection → Task Constraints: selects constraints (evidence: `README.md`)
- Command Skills → Specialist Agents: assigns tasks (evidence: `README.md`)
- Specialist Agents → Task Constraints: works under (evidence: `README.md`)
- Enforcement Hooks → Completion Gates: runs checks (evidence: `README.md`)
- Completion Gates → Specialist Agents: blocks completion (evidence: `README.md`)
- Command Skills → Run State: records plan (evidence: `README.md`)
- Run Lifecycle → Run State: archives runs (evidence: `README.md`)
- Document Indexing → Document Extraction: extracts through (evidence: `plugins/cereblnk/scripts/lib/docindex.py`)
- XML Parsing → XML Core: parses with (evidence: `plugins/cereblnk/scripts/xmltools/xml_parse.py`)
- XSD Validation → XML Core: parses with (evidence: `plugins/cereblnk/scripts/xmltools/xsd_validate.py`)
- XSD Generation → XML Core: parses with (evidence: `plugins/cereblnk/scripts/xmltools/xsd_generate.py`)
- Sheet Layout → Font Metrics: measures text (evidence: `scripts/lib/sheetlayout.py`)
