$ man how-to/nio-workspace-knowledge-graph-example

CLI Toolsadvanced

Nio Workspace Knowledge Graph (Live Example)

Real production workspace showing how 7 core files + 42 skills create an AI ops layer


PATTERN

The Knowledge Graph (Visual)

This is the actual relationship map between every file in the Nio workspace as of February 21, 2026. Every arrow is a real reference. Every box is a real file.

                              ┌─────────────┐
                              │  AGENTS.md  │ ← BOOT CONTROLLER
                              │ (boot seq)  │
                              └──────┬──────┘
                                     │
                    boot order: 1→2→3→4→5→6 (+7 main only)
                                     │
          ┌──────────┬───────────┬────┼───┬──────────┬──────────┐
          ▼          ▼           ▼    ▼   ▼          ▼          ▼
     ┌─────────┐ ┌──────────┐ ┌────────┐ ┌─────────┐ ┌────────┐ ┌─────────┐
     │ SOUL.md │ │IDENTITY  │ │USER.md │ │BRAIN.md │ │HEART   │ │VOICE.md │
     │  (1)    │ │  .md (2) │ │  (3)   │ │  (4)    │ │BEAT(5) │ │  (6)    │
     └────┬────┘ └──────────┘ └───┬────┘ └────┬────┘ └────────┘ └────┬────┘
          │                       │            │                      │
          │ voice DNA,            │            │ "if empty,           │ distilled from
          │ model routing,        │ refs       │  read HEARTBEAT"     │
          │ blog structure        ▼            │                      ▼
          │                 ┌──────────┐       │        ┌──────────────────────┐
          │                 │CLIENTS.md│       │        │skills/tier-1-voice-  │
          │                 └─────┬────┘       │        │dna/core-voice.md     │
          │                       │            │        │    + anti-slop.md     │
          ▼                       ▼            │        └──────────────────────┘
  ┌───────────────┐    5 client SKILL.md       │
  │skills/tier-1  │    directories              │              ┌──────────┐
  │  voice-dna/   │◄───────────────────────────────────────── │MEMORY.md │
  │skills/tier-3  │                             │              │  (7)     │
  │  pillars/     │                             │              │main only │
  └───────────────┘                             │              └──────────┘
                                                │
          ┌─────────────────────────────────────┘
          │
          │          ┌──────────────┐         ┌──────────────┐
          │          │  TOOLS.md    │────────▶│MISSION-      │
          │          │ (infra map)  │         │CONTROL.md    │
          │          └──────┬───────┘         └──────┬───────┘
          │                 │                        │
          │     ┌───────────┼────────────┐           │ THE PIPELINE
          │     ▼           ▼            ▼           ▼
          │  Discord    WhatsApp     9 MCP      ┌────────────────────────┐
          │  channel    +1347..      tools      │ 4 scripts (in order): │
          │  1474..                              │ 1. updater.py → /tmp/ │
          │                                     │ 2. gen-dashboard.js   │
          │                                     │ 3. gen-metrics.js     │
          │                                     │ 4. validate.js        │
          │                                     └─────────┬──────────────┘
          │                                               │
          │                                               ▼
          │                                     6 output files:
          │                                     metrics.json, tasks,
          │                                     calendar, memories,
          │                                     team, status
          │
          ▼
   ┌──────────────┐
   │ PLAYBOOK.md  │──────────────────────────────────────────┐
   │  (decisions) │                                          │
   └──────┬───────┘                                          │
          │ references:                                      │
          ├──▶ SOUL.md (blog structure)                      │
          ├──▶ VOICE.md (anti-slop)                          │
          ├──▶ MISSION-CONTROL.md (pipeline)                 │
          │                                                  │
          ▼                                                  ▼
   ┌──────────────────────────────────────────────────────────────┐
   │                    skills/ (4 SKILL.md)                      │
   ├─────────────────┬────────────────┬──────────────┬───────────┤
   │ blog-pipeline/  │ website-ops/   │content-      │ cron-ops/ │
   │                 │                │pipeline/     │           │
   │ refs:           │ refs:          │ refs:        │ refs:     │
   │ • SOUL.md       │ • MISSION-     │ • VOICE.md   │ • jobs   │
   │ • VOICE.md      │   CONTROL.md   │ • Typefully  │   .json  │
   │ • Discord ch    │ • 5 apps       │ • Substack   │ • 3 on   │
   │ • nio-blog/     │ • shared pkg   │ • pillars/   │ • 8 off  │
   └─────────────────┴────────────────┴──────────────┴───────────┘

Boot flow: AGENTS loads 7 files (~3,125 tokens) → Nio has full identity, context, voice. TOOLS, PLAYBOOK, MISSION-CONTROL, CLIENTS, and skills are loaded on-demand when needed for a specific task.

CODE

Boot Sequence: What Loads and Why

AGENTS.md is the boot controller. It loads 7 files in order, every session. Total cost: ~3,125 tokens (about 12% of the context window).

OrderFilePurposeTokens
1SOUL.mdCore identity, voice DNA, decision rules, model routing, blog structure~952
2IDENTITY.mdRole definition, personality constraints, avatar paths~161
3USER.mdWho Shawn is, preferences, pet peeves, system overview~283
4BRAIN.mdLive session scratchpad. If empty, fall back to HEARTBEAT.md~44
5HEARTBEAT.mdActive TODOs, rotating checks, quiet rules~244
6VOICE.mdDelivery constraints distilled from tier-1 voice DNA~380
7MEMORY.mdLong-term curated memory. Main session only~774

How the files connect: SOUL.md sets behavior. VOICE.md enforces delivery. USER.md anchors the human. MEMORY.md anchors continuity. HEARTBEAT.md prevents drift by forcing a check of what is actually active. BRAIN.md holds temporary state so it does not pollute long-term memory.

CODE

Infrastructure and Pipeline Integration

This workspace is not just notes. It is wired into real infrastructure.

Messaging Channels

  • Discord: channel 1474174694025330919 (nio-terminal)
  • WhatsApp: +13474520467

MCP Tools (9 via OpenClaw)

Typefully (social scheduling) · GitHub (repo/PR ops) · Slack x2 (lead-alchemy + revpartners) · Firecrawl (web scraping) · Reddit (browsing) · HeyReach (outreach) · ElevenLabs (TTS) · Substack (newsletters) · Browserbase (browser automation)

Mission Control Data Pipeline

These 4 scripts run in sequence. All 4 must complete. Skipping any step produces incomplete data.

  1. mission_control_updater.py → writes /tmp/mission_control_enhanced.json
  2. generate-dashboard-data.js → writes 5 files to public/data/
  3. generate-metrics.js → writes public/metrics.json
  4. validate-mission-control-data.js → validates all 6 output files

Output Artifacts (6 files Mission Control reads)

metrics.json · tasks.json · calendar.json · memories.json · team.json · status.json

PATTERN

Skills Architecture and Decision Flow

Skills are the execution layer. Playbooks are the decision layer. They connect through shared references.

Decision Layer: PLAYBOOK.md

The switchboard. It routes to the rules that matter for the current task:

  • SOUL.md for blog structure and behavior constraints
  • VOICE.md for anti-slop enforcement
  • MISSION-CONTROL.md for the dashboard pipeline

Execution Layer: 4 Workspace Skills

SkillReferences
blog-pipeline/SOUL.md, VOICE.md, Discord channel, nio-blog/
website-ops/MISSION-CONTROL.md, 5 apps, shared packages
content-pipeline/VOICE.md, Typefully, Substack, content pillars
cron-ops/jobs.json (3 enabled, 8 disabled)

Cleanup note: older one-off workflow files got deleted (WORKFLOW_AUTO.md, mission-control-status.md). The system converges toward fewer, sharper sources of truth.

PRO TIP

Model Routing and Fallback Chain

Different tasks route to different models based on cost and capability. If the primary model hits a rate limit or billing cap, the system automatically falls through the chain.

TaskModelWhy
Chat / quick opsGPT-5.2Free via OAuth
Content creationOpusNon-negotiable for quality
High-freq cronsQwen 2.5 14B (local)Free, runs on Ollama
Code / reasoningSonnet → OpusCost-efficient escalation

Automatic Fallback Chain

If the primary model fails (rate limit, billing, timeout), OpenClaw walks down the chain automatically:

  1. Opus (primary, Anthropic API)
  2. Sonnet (same provider, cheaper tier)
  3. GPT-5.3-codex (free OAuth, strongest OpenAI reasoning)
  4. GPT-5.2 (free OAuth, general-purpose)
  5. Gemini 3 Pro (Google API, last resort)

No more dead stops mid-task. The agent keeps working regardless of which provider is available.

PATTERN

Using This as Your Template

To implement this structure in your own OpenClaw workspace:

  1. Start with AGENTS.md — define your boot sequence and file loading order
  2. Create the core 7 files — SOUL, IDENTITY, USER, BRAIN, HEARTBEAT, VOICE, MEMORY
  3. Set up infrastructure files — TOOLS, PLAYBOOK, MISSION-CONTROL, CLIENTS
  4. Build skills incrementally — start with 3-4 skills, grow to your operational needs
  5. Establish the pipeline — connect to your tools (Discord, messaging, dashboards)
  6. Implement memory systems — daily logs that promote to long-term memory

The key insight: this is not file organization. It is an operational system where each file serves a specific function in the AI decision-making process. The structure creates institutional memory that compounds over time.


related guides
Advanced OpenClaw + Knowledge Graph SetupRepo as Context EngineRules, Skills, and Context Files
← how-to wikiknowledge guide →
ShawnOS.ai|theGTMOS.ai|theContentOS.ai
built with Next.js · Tailwind · Claude · Remotion