⛩️ ShogunOS Vault Blueprint

v3 — Clean-sheet architecture · Every folder, file, source, and flow

Complete Directory Structure

Clean-sheet design. Six top-level directories. Every subfolder intentional.

⛩️ShogunOS/The data lake. One repo. One Obsidian vault.
├─📜governance/Constitution, rules, decisions. ~1 MB. Read every session.
├─SYSTEM.mdrequiredUniversal rules for all agents
├─DECISIONS.mdrequiredArchitecture decision log (append-only)
├─SYSTEM_LESSONS.mdHard-won rules (SL-001+). Read every task.
├─THE_AGENT_DOCTRINE.mdThe bot bible — agent principles
├─CONTEXT_FILE_STANDARD.mdHow files must be structured
├─decisions/Individual ADRs (0001-slug.md format)
├─frameworks/Enduring reference frameworks (HTML)
├─integrations/External service configs (Linear, Slack, M365)
└─metrics/System-wide KPIs and tracking
├─🧠knowledge/The world model. ~475 MB. Query on demand, never load direct.
├─people/1,902 contact files — one per person
├─orgs/112 organization profiles
├─transcripts/192 meeting transcripts (YYYY-MM-DD-slug.md)
├─digests/Email, calendar, finance, legal rollups
├─reference/SOPs, brand, proposals, templates
├─pat/Pat's profiles: USER_PROFILE, PERSONAL_CONTEXT
├─dxd/DxD business context, product docs
├─graph/Knowledge graph DB + schema docs
└─staging/Inbound content awaiting classification
├─🤖agents/Per-agent workspaces. Each agent is a subfolder.
├─shogun/Chief of Staff — Pat's interface
├─SOUL.mdrequiredIdentity, principles, constraints
├─CLAUDE.mdrequiredWorkspace orientation
├─MEMORY.mdCurated long-term memory
├─HEARTBEAT.mdAutonomous ops schedule
├─memory/Daily logs, captures, heartbeat state
├─skills/Operational knowledge (lessons, protocol)
├─entities/Business entity contexts (DxD, HoldCo…)
└─scripts/Agent-specific automation
├─forge/CPTO — Architecture, engineering, SRE
├─SOUL.mdrequired
├─CLAUDE.mdrequired
├─memory/Session logs, forensics, AARs
├─skills/Forge operational knowledge
├─architecture/ADRs, system designs
├─code/Code references, symlinks
└─specs/Technical specifications
└─sentinel/Behavioral monitor
├─📋projects/Cross-agent work. Every project is a subfolder.
└─<project-name>/One folder per project
├─README.mdrequiredOwner, agents, status, description
├─plan.mdCurrent execution plan + timeline
├─decisions/Project-level ADRs
├─artifacts/Deliverables, specs, analysis
├─research/Research inputs, source materials
├─history/newDecision trail, meeting notes, status snapshots
├─logs/newAgent work logs specific to this project
├─memory/newProject context an agent needs to remember across sessions
└─archive/Completed phases, superseded artifacts
├─⚙️ops/Shared infrastructure. Transient. Nothing permanent here.
├─mailbox/Inter-agent communication (YAML frontmatter)
├─briefs/Generated HTML briefings + dashboards
├─staging/Inbound file triage (from-pat, from-external)
├─logs/Operational logs (rotated: 10MB or 7 days)
└─scripts/Shared automation (mailbox_send, log-rotate…)
└─🗄️archive/Retired content. Date-prefixed. Read-only after creation.
Root files: CLAUDE.md (neutral agent router) · README.md (human onboarding) · .gitignore

📜 governance/ — The Constitution

~1 MB total. Loaded into context every session. Highest authority. Changes require ADR + approval.

File / FolderPurposeWho WritesHow Often
SYSTEM.mdUniversal operating rules for all agentsAPEX + PatRarely (constitutional)
DECISIONS.mdRunning log of all architecture decisionsAny agent (append)When decisions are made
SYSTEM_LESSONS.mdHard-won rules that survive agent resetsAny agent (propose) + Pat (approve)After incidents
THE_AGENT_DOCTRINE.mdThe bot bible — behavioral principlesAPEX + PatQuarterly review
CONTEXT_FILE_STANDARD.mdFile formatting and metadata rulesForge/APEXWhen standards evolve
decisions/Individual ADRs (0001-slug.md). MADR format.Proposing agentPer decision
frameworks/Enduring reference frameworks (architecture, change protocol)Shogun/APEXMajor revisions only
integrations/External service configs: Linear rules, Slack channel map, M365 tenantForgeWhen integrations change
metrics/System-wide KPIs, overwatch snapshotsSentinel/ShogunDaily-weekly
Rule: No agent-specific content here. Shogun's lessons → agents/shogun/skills/. Forge's changelog → agents/forge/. Governance is universal only.

🧠 knowledge/ — The World Model

~475 MB. Never loaded into context window. Accessed via world-model API (:8081) or file tools.

FolderContentsFile CountNaming ConventionIngestion Source
people/One file per person — role, relationship, notes1,902firstname-lastname.mdNetwork SME (automated CRM pipeline)
orgs/Company profiles — description, contacts, relationship112org-name.mdNetwork SME + Cartographer
transcripts/Meeting transcripts from Fireflies + Limitless192YYYY-MM-DD-slug.mdtranscript-ingestion skill (Fireflies API)
digests/Rollup summaries — email, calendar, finance, legal36domain-digest-YYYY-MM.mdShogun (email-monitor) + Dispatch (calendar)
reference/SOPs, brand guide, proposals, templates, Zoom BGs~50Descriptive filenamesManual + Forge
pat/Pat's comprehensive profile + personal context2Fixed namesShogun (maintained manually)
dxd/DxD business context, product overview, architecture~10Descriptive filenamesShogun + Forge
graph/74MB SQLite extraction DB + knowledge graph schema2Fixed namesCartographer (automated)
staging/Content awaiting classification (inbound/ → classified/)VariableOriginal filenameAny pipeline

🤖 agents/ — Agent Workspaces

Each agent is a subfolder with a standardized internal structure. Two files are required for every agent.

Standard Agent Workspace Layout

Every agent directory follows this pattern. Some folders are optional depending on the agent's role.

File / FolderPurposeRequired?Contents
SOUL.mdIdentity kernel — who am I, what are my principles✅ YesName, role, principles, constraints, workspace map
CLAUDE.mdWorkspace orientation for Claude Code sessions✅ YesLoad order, vault access rules, key files
MEMORY.mdCurated long-term memoryRecommendedKey decisions, people context, lessons distilled from daily logs
HEARTBEAT.mdAutonomous operation scheduleIf autonomousHeartbeat checks, rotation, rate limits, exit conditions
memory/Time-series operational memoryRecommendedYYYY-MM-DD.md daily logs, captures/, heartbeat-state.json, growth-log.md
skills/Agent-specific operational knowledgeRecommendedlessons.md, protocol.md, model-selection.md, wins.md
entities/Business entity contextsIf multi-entitySubfolders per entity (DxD/, HoldCo/, Montauk/) with SOUL.md + CLAUDE.md
scripts/Agent-specific automationOptionalBriefing scripts, email processing, custom tools
state/Runtime stateOptionalcurrent-task.md, working files the agent is actively using
archive/Agent-level retired contentOptionalCompleted work, retired skills, old configs

Agent Roster

⛩️ Shogun

Chief of Staff. Triage, routing, briefs, task capture. OpenClaw runtime. Has: memory, skills, entities, scripts.

🔨 Forge

CPTO. Architecture, engineering, SRE, deploy. Claude Code runtime. Has: memory, skills, architecture, code, specs, world-model service.

👁️ Sentinel

Behavioral monitor. Compliance audits, drift detection. Hermes runtime. Has: identity, config, checkpoints.

Boundary: Each agent reads/writes ONLY their own directory. Reading other agents = OK. Writing to other agents = violation. Cross-agent work goes to projects/. Communication goes through ops/mailbox/.

📋 projects/ — Cross-Agent Work

Every meaningful initiative gets a project folder. This is the richest subfolder structure in the system.

Standard Project Folder Layout

projects/<project-name>/
├─README.mdrequiredOwner, participating agents, status, description, links
├─plan.mdCurrent execution plan — phases, timeline, milestones
├─decisions/Project-level architecture decision records
├─0001-initial-approach.mdWhy we chose this approach
└─0002-scope-change.mdRecord of every significant pivot
├─artifacts/Deliverables — the things this project produces
├─spec-v1.mdSpecifications, analyses, reports
└─dashboard.htmlVisual outputs
├─research/Input materials — what informed the work
├─competitive-analysis.mdExternal research
└─source-documents/PDFs, references, citations
├─history/newThe decision trail — how we got here
├─2026-04-11-kickoff-notes.mdMeeting notes, Pat direction captures
├─2026-04-12-scope-discussion.mdKey conversation summaries
└─status-snapshots/Weekly status snapshots for audit trail
├─memory/newProject-specific context agents need across sessions
├─context.mdKey assumptions, constraints, stakeholder preferences
├─open-questions.mdUnresolved questions and blockers
└─lessons.mdWhat we learned during this project
├─logs/newAgent work logs for this project
├─2026-04-11-shogun.mdWhat Shogun did today on this project
└─2026-04-11-forge.mdWhat Forge did today on this project
└─archive/Completed phases, superseded versions
├─spec-v0-superseded.md
└─phase-1-complete/

When Does a Project Get Created?

TriggerGoes ToExample
Pat assigns multi-agent workprojects/Orcrist capture program
Work involves 2+ agentsprojects/Worldview architecture
Pat is a direct stakeholderprojects/SEAM-2 development
Single agent, internal housekeepingagents/<name>/projects/Forge's log rotation
Unsure?projects/Default to visible

⚙️ ops/ — Shared Infrastructure

Everything transient. Mailbox messages are consumed. Logs are rotated. Briefs are regenerated. Staging files move on.

FolderPurposeWho UsesLifecycle
mailbox/<agent>/inbox/Inter-agent messages (YAML frontmatter required)All agents (send/receive)Read → processed → can be archived
briefs/Generated HTML briefings, dashboards, reportsShogun (generates), Pat (consumes)Regenerated daily. Old briefs rotated at 30 days.
staging/from-pat/Files Pat drops for agent reviewPat (drops), Shogun (triages)Triaged daily → moved to correct vault dir
staging/from-external/Email attachments, web downloads, cloud LLM outputsPipelines (drop), Shogun (triages)Same — triaged and moved
staging/processed/Triaged but needs further work before filingShogunShould be empty within 48 hours
logs/Service logs, checkpoint reviewsAll services, SentinelRotated: 10MB or 7 days. Compressed to logs/rotated/. Deleted at 30 days.
scripts/Shared automation scriptsForge (maintains), all agents (use)Permanent — updated as needed

🔄 Source-to-Destination Ingestion Matrix

Every data source. Where it enters. What processes it. Where it lands. What agent owns it.

SourceWhatEntry PointProcessing AgentProcessing StepsFinal Destination
Slack messages Pat's messages in monitored channels OpenClaw inbound Shogun 1. Receive message
2. task-capture skill classifies
3. Write capture if task-shaped
4. Respond if needed
agents/shogun/memory/captures/YYYY-MM-DD.md
Fireflies.ai Meeting transcripts Fireflies API poll Shogun (transcript-ingestion skill) 1. Poll API for new transcripts
2. Download + format to markdown
3. Extract action items
4. Write transcript + capture items
knowledge/transcripts/YYYY-MM-DD-slug.md
Action items → agents/shogun/memory/captures/
Gmail Email inbox Gmail API (email-monitor skill) Shogun 1. Scan inbox on heartbeat
2. Classify: Decide / Review / Handled
3. Surface VIP to Pat via Slack
4. Write digest
Alerts → Slack
Digest → knowledge/digests/email-digest-YYYY-MM.md
Outlook / M365 Calendar, DxD email M365 Graph API Dispatch (calendar) / Shogun 1. Fetch calendar events
2. Format for briefs
3. Include in morning brief
knowledge/digests/calendar-digest-YYYY-MM.md
Brief → ops/briefs/
Linear Project tickets + status Linear API Shogun (morning-briefing skill) 1. Fetch active issues
2. Tier by priority (P0/P1/P2)
3. Include in morning brief
4. Flag stale tickets
Brief → ops/briefs/morning-brief-YYYY-MM-DD.html
Pat file drops Documents, PDFs, images Pat wants agents to process ops/staging/from-pat/ Shogun 1. Detect new file
2. Determine type (knowledge, project artifact, reference)
3. Process/extract if needed
4. Move to final location
Varies: knowledge/reference/, projects/*/artifacts/, etc.
Cloud LLM outputs Perplexity, Gemini, ChatGPT session exports ops/staging/from-external/ Shogun 1. Ingest file
2. Extract key content
3. Determine if it updates existing knowledge or creates new
4. File appropriately
knowledge/ subdir or projects/*/research/
CRM pipeline Contact enrichment, relationship updates Network SME automated run Network SME 1. Cross-reference emails, transcripts, KB
2. Identify stale/incomplete contacts
3. Enrich and update contact files
knowledge/people/*.md
Inter-agent messages Requests, status updates, done notifications ops/mailbox/<agent>/inbox/ Receiving agent 1. Read on heartbeat/check
2. Process request
3. ACK within 3 min
4. STATUS every 10 min
5. DONE with evidence
Stays in ops/mailbox/ (consumed in place)
Sentinel audits Compliance checks, drift detection Scheduled cron (3x daily) Sentinel 1. Read gateway logs
2. Check against governance/ rules
3. Flag violations
4. Write checkpoint
ops/logs/checkpoint-reviews/
Alerts → Slack #forge
Web research Growth scan, competitive intel, tech radar Agent-initiated web_search Shogun / Tech Radar 1. Search during heartbeat rotation
2. Evaluate relevance
3. Log findings
agents/shogun/memory/growth-log.md
or projects/*/research/
Dropbox Personal files, business docs (Pat's filesystem) Direct filesystem access (read-only for agents) Any agent (on Pat's request) 1. Pat asks "look at X in Dropbox"
2. Agent reads file
3. If agent needs to keep a copy → staging
4. Triage to correct location
Varies — agents don't write to Dropbox
OneDrive (DxD) DxD corporate documents OneDrive filesystem (read-only) Any agent (on Pat's request) Read-only. Never write. Copy to ShogunOS if agent needs to work with it. N/A — read in place

📊 End-to-End Process Flows

How data moves through every lifecycle in the system.

1. Pat Sends a Message (most common flow)

Pat types in Slack#ceo-briefing
OpenClaw receiveswebhook
Shogun processestask-capture runs
Response in Slack+ capture if task-shaped
If routable work:
Shogun writes mailboxops/mailbox/forge/inbox/
Forge picks upon heartbeat check
Forge worksACK → STATUS → DONE
Shogun reports to Patin Slack

2. New Project Lifecycle

Pat or Shogun
identifies workSlack, capture, brief
Create project dirprojects/<slug>/
Write README.mdowner, agents, status
Write plan.mdphases, timeline
Work beginsagents log to project/logs/
Decisions made→ decisions/
Artifacts produced→ artifacts/
History recorded→ history/
Lessons captured→ memory/lessons.md
Complete → archive/after 30 day hold

3. Morning Brief Generation

6:15 AM cron fires
Shogun reads:
Linear API (tickets)
M365 (calendar)
captures/ (tasks)
mailbox (updates)
Generates HTMLP0/P1/P2 tiers
ops/briefs/morning-brief-YYYY-MM-DD.html
Slack BLUF + link#ceo-briefing

4. Knowledge Ingestion Pipeline

New transcript
arrivesFireflies API
transcript-ingestion
skill runsdownload, format
Extract action itemsclassify each one
knowledge/transcripts/YYYY-MM-DD-slug.md
Action itemsextracted
agents/shogun/memory/
captures/YYYY-MM-DD.md
Evening brieffor Pat validation
Confirmed → Linearticket created

5. File Drop Triage

Pat drops fileops/staging/from-pat/
Shogun detectsdaily triage pass
Classify typeknowledge? project? reference?
Process if neededextract, summarize
Move to final homeknowledge/ or projects/

6. Governance Change Flow

Agent proposes
new ruledrafts in own workspace
Write ADRgovernance/decisions/
APEX reviewsstructural soundness
Pat approvesvia Slack or review
governance/ updatedDECISIONS.md appended

7. Sentinel Audit Cycle

Cron fires07:00, 13:00, 19:00
Read gateway logs/tmp/openclaw/
Check against
governance/ rulesconstraint matching
Write checkpointops/logs/checkpoint-reviews/
If violation found:
ALERTseverity + evidence
Slack #forgesentinel_alert.sh
Log escalationops/logs/

📄 File Templates

Copy-paste starters for every standard file type.

📋 Project README.md

# Project Name
**Owner:** [agent]
**Participants:** [agent1, agent2]
**Status:** Active | On Hold | Complete
**Created:** YYYY-MM-DD
**Linear:** [link if tracked]

## Description
What this project does and why it exists.

## Current Phase
What's happening now. Key next steps.

## Key Decisions
- [decision 1] — see decisions/0001-*.md
- [decision 2]

## Links
- Slack: #channel
- Dashboard: [URL]
- Related: [links]

📜 ADR (decisions/NNNN-slug.md)

# NNNN — Decision Title
**Status:** Proposed | Accepted | Deprecated
**Date:** YYYY-MM-DD
**Author:** [agent or Pat]

## Context
What is the issue? Why now?

## Decision
What was decided. Specific and actionable.

## Consequences
Positive: [what this enables]
Negative: [what this costs or constrains]

## Alternatives Considered
- Option A: [rejected because...]
- Option B: [rejected because...]

🤖 Agent SOUL.md

# SOUL.md — [Agent Name]
**Agent:** [Name] | **Version:** 1.0
**Runtime:** [OpenClaw | Claude Code | Hermes]

## Identity
- **Name:** [Name]
- **Role:** [One-line description]
- **Commander:** Patrick R. Madden (Pat)

## Principles
1. [Principle 1]
2. [Principle 2]
3. [Principle 3]

## Constraints
- [Boundary 1]
- [Boundary 2]

## Workspace
- Own dir: agents/[name]/
- Reads: governance/, knowledge/ (API), projects/
- Writes: agents/[name]/, projects/, ops/

📋 Project memory/context.md

# Project Context — [Project Name]
**Updated:** YYYY-MM-DD
## Key Assumptions
- [Assumption 1 — verified/unverified]
- [Assumption 2]

## Stakeholder Preferences
- Pat wants: [specific direction]
- Constraints: [budget, timeline, etc.]

## Open Questions
- [ ] [Question 1]
- [ ] [Question 2]

## What We've Learned
- [Lesson from phase 1]
- [Lesson from research]

📨 Mailbox Message

---
from: [sender]
to: [recipient]
priority: P0|P1|P2
timestamp: YYYY-MM-DDTHH:MM:SSZ
subject: [kebab-slug]
status: unread
type: request|acknowledgment|status|done
---

## [Subject]

[Body]

### Requested Action
[What you need done]

### Deadline
[When, if applicable]

👤 Knowledge Person File

---
type: person
source: [crm|transcript|manual]
date: YYYY-MM-DD
tags: [defense, investor, advisor]
---
# Firstname Lastname
**Role:** [Title] at [Company]
**Relationship:** [How Pat knows them]
**Last Contact:** YYYY-MM-DD

## Context
Key information about this person.

## History
- YYYY-MM-DD: [interaction note]
- YYYY-MM-DD: [interaction note]

📝 Project logs/YYYY-MM-DD-agent.md

# [Project] — Work Log
**Date:** YYYY-MM-DD
**Agent:** [name]

## What I Did
- [Action 1]
- [Action 2]

## Decisions Made
- [Decision + rationale]

## Blockers
- [Blocker if any]

## Next Steps
- [What's next]

📊 Project history/YYYY-MM-DD-slug.md

# [Event Description]
**Date:** YYYY-MM-DD
**Participants:** [Pat, Shogun, Forge]
**Type:** meeting-notes | direction-change | scope-update

## Summary
What happened and why it matters.

## Key Quotes / Direction
- Pat said: "[direct quote if important]"
- Decision: [what was decided]

## Impact
What changed as a result.