# cobusgreyling/grok-bot-templates architecture

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

- Interactive diagram: https://gitdiagram.com/cobusgreyling/grok-bot-templates
- Repository: https://github.com/cobusgreyling/grok-bot-templates

## Overview

Grok Bot Templates is a catalog and authoring kit for paste-ready agent contracts, distributed through a no-Node Setup workflow, a CLI, and a browsable catalog. The main user path is choose a template or team, copy/install profiles, connect plugins, run a first task, then adopt skills and routines when ready. The repository also provides validation, readiness scoring, sharing safety, patterns, conversion guidance, and a machine-readable catalog. Source excerpts show CLI and library calls; links to unsampled content are included only where documented, with evidence limits noted.

Main entry points: [`bin/grokbot.mjs`](https://github.com/cobusgreyling/grok-bot-templates/blob/main/bin/grokbot.mjs) (grokbot CLI), [`lib/validate.mjs`](https://github.com/cobusgreyling/grok-bot-templates/blob/main/lib/validate.mjs) (Validation and safety), [`scripts/build-catalog.mjs`](https://github.com/cobusgreyling/grok-bot-templates/blob/main/scripts/build-catalog.mjs) (Catalog API), [`scripts/build-site.mjs`](https://github.com/cobusgreyling/grok-bot-templates/blob/main/scripts/build-site.mjs) (Browseable catalog)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_content["Bot contract catalog"]
  node_templates["Bot templates"]
  node_teams["Team rosters"]
  node_skills["Skills"]
  node_routines["Routines"]
  node_patterns["Design patterns"]
  node_schemas["Contract schemas"]
end

subgraph group_cli["CLI and quality"]
  node_cli["grokbot CLI<br/>[grokbot.mjs]"]
  node_paths["Root discovery<br/>[paths.mjs]"]
  node_loader["Catalog loader<br/>[load.mjs]"]
  node_validator["Validation and safety<br/>[validate.mjs]"]
  node_scorer["Bot Ready score<br/>[score.mjs]"]
  node_badge["Score badges<br/>[badge.mjs]"]
  node_profile["Profile rendering<br/>[render.mjs]"]
  node_skillrender["Skill rendering<br/>[render-skill.mjs]"]
  node_routinerender["Routine rendering<br/>[render-routine.mjs]"]
end

subgraph group_distribution["Install and discovery"]
  node_start["Setup instructions<br/>[START.md]"]
  node_urls["Catalog URL helpers<br/>[urls.mjs]"]
  node_catalog["Catalog API<br/>[build-catalog.mjs]"]
  node_site["Browseable catalog<br/>[build-site.mjs]"]
end

subgraph group_guidance["Adoption guidance"]
  node_convert["Format conversion"]
end

node_user(("Bot owner"))
node_pages(("Catalog readers"))

node_user -->|"starts setup"| node_start
node_user -->|"runs command"| node_cli
node_start -->|"fetches profiles"| node_templates
node_user -->|"browses templates"| node_site
node_user -->|"chooses roster"| node_teams
node_teams -->|"lists bots"| node_templates
node_templates -->|"adopts skill"| node_skills
node_skills -->|"schedules later"| node_routines
node_user -->|"converts contract"| node_convert
node_cli -->|"resolves root"| node_paths
node_cli -->|"loads catalog"| node_loader
node_loader -->|"gets directories"| node_paths
node_cli -->|"validates data"| node_validator
node_validator -->|"checks contracts"| node_schemas
node_validator -->|"checks templates"| node_templates
node_validator -->|"checks rosters"| node_teams
node_validator -->|"checks skills"| node_skills
node_validator -->|"checks routines"| node_routines
node_validator -->|"checks patterns"| node_patterns
node_cli -->|"scores templates"| node_scorer
node_cli -->|"renders badge"| node_badge
node_cli -->|"renders profile"| node_profile
node_cli -->|"renders skills"| node_skillrender
node_cli -->|"renders routines"| node_routinerender
node_catalog -->|"loads entries"| node_loader
node_catalog -->|"validates entries"| node_validator
node_catalog -->|"scores entries"| node_scorer
node_catalog -->|"writes badge"| node_badge
node_catalog -->|"builds links"| node_urls
node_site -->|"loads entries"| node_loader
node_site -->|"scores cards"| node_scorer
node_site -->|"builds links"| node_urls
node_catalog -->|"publishes API"| node_pages
node_site -->|"publishes catalog"| node_pages

click node_templates "https://github.com/cobusgreyling/grok-bot-templates/tree/main/templates"
click node_teams "https://github.com/cobusgreyling/grok-bot-templates/tree/main/teams"
click node_skills "https://github.com/cobusgreyling/grok-bot-templates/tree/main/skills"
click node_routines "https://github.com/cobusgreyling/grok-bot-templates/tree/main/routines"
click node_patterns "https://github.com/cobusgreyling/grok-bot-templates/tree/main/patterns"
click node_schemas "https://github.com/cobusgreyling/grok-bot-templates/tree/main/schema"
click node_convert "https://github.com/cobusgreyling/grok-bot-templates/tree/main/convert"
click node_start "https://github.com/cobusgreyling/grok-bot-templates/blob/main/START.md"
click node_cli "https://github.com/cobusgreyling/grok-bot-templates/blob/main/bin/grokbot.mjs"
click node_paths "https://github.com/cobusgreyling/grok-bot-templates/blob/main/lib/paths.mjs"
click node_loader "https://github.com/cobusgreyling/grok-bot-templates/blob/main/lib/load.mjs"
click node_validator "https://github.com/cobusgreyling/grok-bot-templates/blob/main/lib/validate.mjs"
click node_scorer "https://github.com/cobusgreyling/grok-bot-templates/blob/main/lib/score.mjs"
click node_badge "https://github.com/cobusgreyling/grok-bot-templates/blob/main/lib/badge.mjs"
click node_profile "https://github.com/cobusgreyling/grok-bot-templates/blob/main/lib/render.mjs"
click node_skillrender "https://github.com/cobusgreyling/grok-bot-templates/blob/main/lib/render-skill.mjs"
click node_routinerender "https://github.com/cobusgreyling/grok-bot-templates/blob/main/lib/render-routine.mjs"
click node_urls "https://github.com/cobusgreyling/grok-bot-templates/blob/main/lib/urls.mjs"
click node_catalog "https://github.com/cobusgreyling/grok-bot-templates/blob/main/scripts/build-catalog.mjs"
click node_site "https://github.com/cobusgreyling/grok-bot-templates/blob/main/scripts/build-site.mjs"

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_templates,node_teams,node_skills,node_routines,node_patterns,node_schemas toneBlue
class node_cli,node_paths,node_loader,node_validator,node_scorer,node_badge,node_profile,node_skillrender,node_routinerender toneAmber
class node_start,node_urls,node_catalog,node_site toneMint
class node_convert toneRose
class node_user,node_pages toneIndigo
```

## Components

### Bot contract catalog

- [Bot templates](https://github.com/cobusgreyling/grok-bot-templates/tree/main/templates): `templates`
- [Team rosters](https://github.com/cobusgreyling/grok-bot-templates/tree/main/teams): `teams`
- [Skills](https://github.com/cobusgreyling/grok-bot-templates/tree/main/skills): `skills`
- [Routines](https://github.com/cobusgreyling/grok-bot-templates/tree/main/routines): `routines`
- [Design patterns](https://github.com/cobusgreyling/grok-bot-templates/tree/main/patterns): `patterns`
- [Contract schemas](https://github.com/cobusgreyling/grok-bot-templates/tree/main/schema): `schema`

### CLI and quality

- [grokbot CLI](https://github.com/cobusgreyling/grok-bot-templates/blob/main/bin/grokbot.mjs): `bin/grokbot.mjs`
- [Root discovery](https://github.com/cobusgreyling/grok-bot-templates/blob/main/lib/paths.mjs): `lib/paths.mjs`
- [Catalog loader](https://github.com/cobusgreyling/grok-bot-templates/blob/main/lib/load.mjs): `lib/load.mjs`
- [Validation and safety](https://github.com/cobusgreyling/grok-bot-templates/blob/main/lib/validate.mjs): `lib/validate.mjs`
- [Bot Ready score](https://github.com/cobusgreyling/grok-bot-templates/blob/main/lib/score.mjs): `lib/score.mjs`
- [Score badges](https://github.com/cobusgreyling/grok-bot-templates/blob/main/lib/badge.mjs): `lib/badge.mjs`
- [Profile rendering](https://github.com/cobusgreyling/grok-bot-templates/blob/main/lib/render.mjs): `lib/render.mjs`
- [Skill rendering](https://github.com/cobusgreyling/grok-bot-templates/blob/main/lib/render-skill.mjs): `lib/render-skill.mjs`
- [Routine rendering](https://github.com/cobusgreyling/grok-bot-templates/blob/main/lib/render-routine.mjs): `lib/render-routine.mjs`

### Install and discovery

- [Setup instructions](https://github.com/cobusgreyling/grok-bot-templates/blob/main/START.md): `START.md`
- [Catalog URL helpers](https://github.com/cobusgreyling/grok-bot-templates/blob/main/lib/urls.mjs): `lib/urls.mjs`
- [Catalog API](https://github.com/cobusgreyling/grok-bot-templates/blob/main/scripts/build-catalog.mjs): `scripts/build-catalog.mjs`
- [Browseable catalog](https://github.com/cobusgreyling/grok-bot-templates/blob/main/scripts/build-site.mjs): `scripts/build-site.mjs`

### Adoption guidance

- [Format conversion](https://github.com/cobusgreyling/grok-bot-templates/tree/main/convert): `convert`

### Other components

- **Bot owner**
- **Catalog readers**

## Connections

- Bot owner → Setup instructions: starts setup (evidence: `README.md`)
- Bot owner → grokbot CLI: runs command (evidence: `README.md`)
- Setup instructions → Bot templates: fetches profiles (evidence: `README.md`)
- Bot owner → Browseable catalog: browses templates (evidence: `README.md`)
- Bot owner → Team rosters: chooses roster (evidence: `README.md`)
- Team rosters → Bot templates: lists bots (evidence: `README.md`)
- Bot templates → Skills: adopts skill (evidence: `README.md`)
- Skills → Routines: schedules later (evidence: `README.md`)
- Bot owner → Format conversion: converts contract (evidence: `README.md`)
- grokbot CLI → Root discovery: resolves root (evidence: `bin/grokbot.mjs`)
- grokbot CLI → Catalog loader: loads catalog (evidence: `bin/grokbot.mjs`)
- Catalog loader → Root discovery: gets directories (evidence: `lib/load.mjs`)
- grokbot CLI → Validation and safety: validates data (evidence: `bin/grokbot.mjs`)
- Validation and safety → Contract schemas: checks contracts (evidence: `lib/validate.mjs`)
- Validation and safety → Bot templates: checks templates (evidence: `lib/validate.mjs`)
- Validation and safety → Team rosters: checks rosters (evidence: `lib/validate.mjs`)
- Validation and safety → Skills: checks skills (evidence: `lib/validate.mjs`)
- Validation and safety → Routines: checks routines (evidence: `lib/validate.mjs`)
- Validation and safety → Design patterns: checks patterns (evidence: `lib/validate.mjs`)
- grokbot CLI → Bot Ready score: scores templates (evidence: `bin/grokbot.mjs`)
- grokbot CLI → Score badges: renders badge (evidence: `bin/grokbot.mjs`)
- grokbot CLI → Profile rendering: renders profile (evidence: `bin/grokbot.mjs`)
- grokbot CLI → Skill rendering: renders skills (evidence: `bin/grokbot.mjs`)
- grokbot CLI → Routine rendering: renders routines (evidence: `bin/grokbot.mjs`)
- Catalog API → Catalog loader: loads entries (evidence: `scripts/build-catalog.mjs`)
- Catalog API → Validation and safety: validates entries (evidence: `scripts/build-catalog.mjs`)
- Catalog API → Bot Ready score: scores entries (evidence: `scripts/build-catalog.mjs`)
- Catalog API → Score badges: writes badge (evidence: `scripts/build-catalog.mjs`)
- Catalog API → Catalog URL helpers: builds links (evidence: `scripts/build-catalog.mjs`)
- Browseable catalog → Catalog loader: loads entries (evidence: `scripts/build-site.mjs`)
- Browseable catalog → Bot Ready score: scores cards (evidence: `scripts/build-site.mjs`)
- Browseable catalog → Catalog URL helpers: builds links (evidence: `scripts/build-site.mjs`)
- Catalog API → Catalog readers: publishes API (evidence: `README.md`)
- Browseable catalog → Catalog readers: publishes catalog (evidence: `README.md`)
