Category: AI Systems

AIOS architecture, Claude Code, MCP, building AI systems

  • AIOS: What an AI Operating System Is and How to Build One

    AIOS: What an AI Operating System Is and How to Build One

    An AIOS (AI Operating System) is a structured system where an AI model orchestrates tools, services, and context to run complex workflows — not through a single prompt, but through layered architecture. This guide covers what an AIOS is, how its layers work, and how to build one using Claude Code and MCP servers.

    This isn’t theoretical. StackEngine’s Content Engine AIOS runs this architecture in production — handling content strategy, creation, and distribution across multiple platforms through a single orchestration layer.

    What Is an AIOS (AI Operating System)

    An AIOS is a layered system where an AI model acts as the operating system — reading context, making decisions, and calling tools to execute multi-step workflows.

    An AIOS (AI Operating System) is a structured architecture where an AI model serves as the central orchestration layer for a complex workflow. It reads project context from files, loads specialized knowledge on demand, connects to external services through standardized protocols, and executes multi-step tasks — all coordinated through a persistent project structure rather than one-off prompts.

    Think of it like an actual operating system. A traditional OS manages hardware, memory, file systems, and applications. An AIOS manages context, reasoning, tool access, and task execution. The AI model is the kernel. Files on disk are the memory. MCP servers are the device drivers. Commands are the applications.

    The key distinction: an AIOS doesn’t just automate a sequence of steps. It reasons about what to do next based on the current state of the project, the task at hand, and the context it loads. It can adapt its approach, ask for input, and make judgment calls that a static automation can’t.

    This is different from a chatbot. It’s different from a prompt chain. It’s a system with persistent state, modular capabilities, and real tool access — structured so the AI can operate across sessions with continuity.

    AIOS vs Traditional Automation: What Actually Changes

    Traditional automation runs fixed sequences. An AIOS reasons about what to do, adapts to context, and handles tasks that require judgment — not just execution.

    Zapier, Make, and n8n are good at what they do. If your workflow is “when X happens, do Y, then Z,” a trigger-based automation tool handles it cleanly. The steps are defined. The logic is fixed. It runs the same way every time.

    An AIOS operates in a different space. Here’s where the line sits:

    Traditional Automation AIOS
    Logic Fixed sequences, branching rules Reasoning about context
    Decisions Pre-defined by the builder Made by the AI at runtime
    Content Templates, variable insertion Original writing shaped by brand, platform, strategy
    Adaptation Requires manual workflow edits Reads updated context, adjusts behavior
    State Stored in the platform Stored in project files the AI reads
    Integration Platform-specific connectors Standardized protocol (MCP)
    Complexity ceiling High step count = fragile Complexity lives in context, not connections

    The practical difference shows up when the task requires judgment. “Take this 3,000-word article about AI search trends, write a Twitter post that captures the most interesting angle for AI makers, match StackEngine’s voice, and make it feel native to Twitter” — that’s not a sequence. That’s a reasoning task with style, strategy, and platform awareness baked in.

    Traditional automation is still the right choice for deterministic workflows. If every step is predictable and the output doesn’t require creative judgment, use Zapier. An AIOS adds value where the work requires understanding, adaptation, and decision-making.

    For a deeper comparison, see AIOS vs Traditional Automation: What Actually Changes.

    The Architecture: Five Layers of an AIOS

    An AIOS is built in five layers — Brain, Skills, Learnings, Context, and Services — each handling a distinct responsibility in the system.

    The AIOS Layers Model organizes the system into five distinct layers. Each layer has a clear job. Together, they give the AI model everything it needs to operate as a persistent, capable system rather than a stateless chatbot.

    Layer 1: Brain

    The Brain layer defines system-wide behavior. It’s the foundational instruction set — what the system does, how it operates, what conventions it follows.

    In practice, this is a single file (CLAUDE.md) at the project root plus a set of rules files. The AI reads these at the start of every session. They contain the system architecture, available commands, content types, status flows, Airtable schema references, and any conventions that apply across the entire system.

    Rules enforce specific behaviors: how to write to Airtable (create linked records in dependency order), how to create content (load brand profile first, then platform guide, then playbook), date formats, timezone conventions. These apply to every command and agent.

    The Brain layer is the one file you’d hand someone to explain the entire system.

    Layer 2: Skills

    Skills are context containers loaded on demand. They hold specialized knowledge — Airtable schema details, brand context, content type specifications, service connection details.

    The key design pattern is progressive disclosure. Each skill has a small frontmatter section (around 100 tokens) that loads initially. The full skill body — which might be thousands of tokens of schema definitions or content specs — only loads when the AI determines it’s relevant to the current task.

    This matters because context is expensive. Loading every piece of knowledge into every session wastes the context window and degrades performance. Skills keep the system lean by loading only what’s needed, when it’s needed.

    Layer 3: Learnings

    The Learnings layer is how the system improves over time. Each command has its own learnings file. Before executing, the command reads its learnings — a log of what went wrong in past runs, what the user corrected, what patterns to follow or avoid.

    This creates a feedback loop. User gives feedback. Feedback gets logged. Next run reads the log. System adjusts. It’s not fine-tuning the model — it’s updating the instructions the model reads before acting.

    Layer 4: Context

    Context provides session continuity. Two files handle this: one tracks active work (what’s in progress, where we left off), another logs what happened in each session.

    When you start a new session, the system reads the context layer and knows the current state. Which content pieces are in review. What was published last session. What’s queued for next. Without this layer, every session starts from zero.

    Layer 5: Services

    The Services layer connects the AIOS to external platforms — databases, CMS, publishing tools, research APIs, video generation. These connections happen through MCP (Model Context Protocol) servers that expose tools the AI can call directly.

    Each service adds a capability. Airtable adds structured data storage. WordPress adds web publishing. A social publishing tool adds distribution. The AI doesn’t need custom API integration code — MCP handles the connection layer, and the AI calls tools by name.

    For a deep dive into each layer, see AIOS Architecture: Layers, Skills, and Memory in an AI Operating System.

    The Orchestrator: Why Claude Code Works as the OS Layer

    Claude Code functions as the AIOS kernel because it combines tool access, file system persistence, reasoning capability, and extensibility in a single interface.

    An AIOS needs an orchestrator — something that reads context, reasons about tasks, calls tools, and produces output. Claude Code works as this orchestrator because it has four capabilities that align with what an OS kernel needs:

    Tool access. Claude Code can read and write files, run terminal commands, and call MCP server tools. It’s not sandboxed to text generation. It can interact with the file system, execute scripts, and reach external services.

    Persistent context. The project folder is the system’s memory. Claude Code reads CLAUDE.md, rules, skills, and context files at session start. The AI doesn’t need to be told the system architecture every time — it reads it from disk.

    Reasoning capability. Content strategy, editorial decisions, brand voice adaptation, deciding what to write next based on pipeline state — these aren’t mechanical tasks. They require judgment. The AI model provides that judgment, informed by the context it loaded.

    Extensibility. Adding a new capability means adding a file. A new command is a markdown file in .claude/commands/. A new skill is a markdown file in .claude/skills/. A new rule is a markdown file in .claude/rules/. No code compilation. No deployment. Drop a file, and the system can do something new.

    The CLI interface matters too. A GUI adds a layer of abstraction between the user and the system. A CLI keeps you close to the metal — you see what the AI is doing, what files it’s reading, what tools it’s calling. For building and debugging an AIOS, that transparency is essential.

    This isn’t the only possible orchestrator. But Claude Code’s combination of file access, tool use, and reasoning quality makes it a strong fit for this pattern right now.

    For more on why a CLI-based orchestrator outperforms GUI alternatives for this use case, see Claude Code as an AIOS Orchestrator: Why a CLI Beats a GUI.

    Connectors: MCP Servers and External Services

    MCP (Model Context Protocol) is the standardized protocol that lets an AIOS connect to external services — each server exposes tools the AI can call by name.

    Model Context Protocol (MCP) is to an AIOS what device drivers are to a traditional operating system. Each MCP server wraps an external service and exposes its capabilities as tools the AI can call. The AI doesn’t write HTTP requests or parse API responses — it calls a named tool with parameters, and the MCP server handles the rest.

    Here’s what that looks like in practice:

    AI Orchestrator (Claude Code)
        |
        +-- MCP Server: Airtable
        |   +-- create_record
        |   +-- list_records
        |   +-- update_records
        |   +-- search_records
        |
        +-- MCP Server: WordPress
        |   +-- create_post
        |   +-- update_post
        |   +-- upload_media
        |
        +-- MCP Server: Social Publishing
        |   +-- create_post
        |   +-- list_accounts
        |   +-- get_post_status
        |
        +-- MCP Server: SEO Research
            +-- keyword_search_volume
            +-- serp_analysis
            +-- backlink_data

    Each MCP server is configured in the project once. After that, the AI can call any exposed tool as part of its workflow. Need to save a content brief to Airtable, then publish an article to WordPress, then schedule a social post? The AI calls three tools across three MCP servers in sequence. No custom integration code. No webhook chains.

    MCP servers are interchangeable. If you switch from one CMS to another, you swap the MCP server. The AI’s commands and workflows reference tool names — as long as the new server exposes compatible tools, the system adapts.

    The protocol is open and growing. Anthropic published the MCP specification, and servers exist for dozens of services. You can also build custom MCP servers for internal tools or proprietary APIs.

    For a full breakdown of how MCP works within an AIOS, see MCP Servers: How AIOS Connects to External Services.

    The App-in-a-Folder Pattern

    An AIOS lives in a single project folder. The folder structure is the architecture — files define behavior, commands, skills, and rules.

    The App-in-a-Folder pattern is the simplest way to build an AI system that persists across sessions. The entire AIOS lives in one project directory. No database server. No deployment pipeline. No infrastructure. A folder with structured files.

    project-folder/
    +-- CLAUDE.md           # Brain - system instructions
    +-- .claude/
    |   +-- commands/       # User entry points (/plan, /write, /status)
    |   +-- agents/         # Specialized workers
    |   +-- skills/         # Context containers
    |   +-- rules/          # Shared conventions
    +-- brand/              # Brand identity files
    +-- learnings/          # Per-command feedback
    +-- context/            # Session continuity
    +-- config/             # Service configuration

    Each folder has a clear purpose. Each file has a clear role. The AI reads the structure and knows what’s available. You read the structure and understand the system.

    Why this works:

    • Version controllable. The entire system is files. Put it in Git. Track changes. Roll back if something breaks. Diff two versions to see what changed.
    • Portable. Copy the folder to a new machine and the system works. No environment variables to configure (beyond MCP server connections). No cloud dependencies for the core system.
    • Inspectable. Every instruction, every rule, every piece of context is a readable file. No black box. You can open any file and see exactly what the AI is being told.
    • Extensible. New command? Add a markdown file. New skill? Add a markdown file. New rule? Add a markdown file. The system grows by adding files, not by modifying a codebase.

    The pattern works because Claude Code treats the project folder as its operating environment. It reads files for context, writes files as output, and uses the file system as persistent state. The folder isn’t just where the code lives — it is the system.

    For a step-by-step guide to setting up this pattern, see App-in-a-Folder: The Simplest Way to Build an AI System.

    Building Your Own AIOS: Step by Step

    You can build a working AIOS in seven steps — from defining the Brain to connecting external services.

    This is the practical section. Here’s how to build an AIOS from scratch using Claude Code.

    Step 1: Define the Brain

    Create a CLAUDE.md file at your project root. This is the system’s foundational instruction set. Start with:

    • What the system does (one paragraph)
    • Core principles (3-5 rules that govern all behavior)
    • Available commands and what they do
    • Key conventions (date formats, naming patterns, status flows)
    # My AIOS
    
    An AI system for [your domain]. Claude Code orchestrates
    [what it does] through [which services].
    
    ## Core Principles
    - Interactive, not autonomous. Nothing happens without approval.
    - Platform-aware. Content matches the platform it's written for.
    - Source-traceable. Every output links to its source.

    Keep it concise. The AI reads this every session. Bloated instructions waste context and dilute the important stuff.

    Step 2: Create the Folder Structure

    Set up the .claude/ directory with its four subdirectories:

    mkdir -p .claude/commands .claude/agents .claude/skills .claude/rules
    mkdir -p brand learnings context config

    This gives you the skeleton. Each directory will hold markdown files that define the system’s capabilities.

    Step 3: Write Your First Command

    Commands are user entry points. Start with one that does something useful. A /status command that reads the current state and reports it. Or a /plan command that takes input and produces structured output.

    # /plan
    
    Takes a source (URL, document, idea) and creates a content strategy.
    
    ## Process
    1. Load brand profile from brand/profile.md
    2. Ingest and analyze the source
    3. Identify content angles
    4. Propose a content plan with specific pieces
    5. Wait for user approval before saving

    Commands orchestrate. They describe the workflow. The AI follows the workflow using its reasoning and available tools.

    Step 4: Add Skills for Specialized Context

    Create skills for knowledge the system needs sometimes but not always. Database schemas, platform-specific guidelines, service documentation.

    Each skill file starts with a short frontmatter section that describes what it contains. The AI reads the frontmatter and decides whether to load the full skill.

    ---
    skill: airtable-schema
    description: Full Airtable schema - tables, fields, types, relationships
    load_when: Working with Airtable records, creating content, checking pipeline
    ---
    
    # Airtable Schema
    [Full schema details here - only loaded when needed]

    Step 5: Establish Rules

    Rules enforce conventions across all commands and agents. They prevent the AI from making common mistakes and ensure consistency.

    Good rules are specific and actionable:

    # Content Creation Rules
    
    Before creating any content, always load in this order:
    1. Brand profile from brand/profile.md
    2. Platform voice guide from brand/platforms/<platform>.md
    3. Platform playbook from playbooks/<platform>.md
    
    Every content piece must have a distinct angle.
    No two pieces should say the same thing in a different format.

    Step 6: Set Up Learnings and Context

    Create a learnings file for each command (learnings/plan.md, learnings/write.md). These start empty and fill up as you use the system and provide feedback.

    Create the context files:

    touch context/active-work.md context/session-log.md

    These track state between sessions. The system reads them at startup and updates them when work happens.

    Step 7: Connect External Services

    Configure MCP servers for the external services your AIOS needs. Each service gets an MCP server that exposes tools the AI can call.

    The specific configuration depends on which services you’re connecting. Common pattern:

    1. Install or configure the MCP server for the service
    2. Add the server to your Claude Code MCP configuration
    3. Reference the available tools in your commands and skills
    4. Test each connection with a simple read operation before building workflows around it

    Start with one service. Get it working. Then add the next. A partially connected AIOS is still useful — each service adds capability without breaking what’s already working.

    Real Example: Content Engine AIOS Architecture

    Content Engine AIOS manages content strategy, creation, and distribution for StackEngine across multiple platforms — here’s exactly how it’s structured.

    This isn’t a hypothetical. Content Engine AIOS is the system StackEngine uses to plan, write, review, and publish content across the website, Twitter, LinkedIn, YouTube, and TikTok. Here’s how the five layers map to a real production system.

    The Brain

    CLAUDE.md is 300+ lines. It defines the system’s purpose, eight active commands (/setup, /plan, /write, /status, /wrap, /signals, /video, /publish), the content status flow, all Airtable table references, content types and their platforms, conventions for dates and timezones, model selection for different agents, and the full project folder structure.

    Rules enforce two critical patterns: Airtable write order (sources first, then plans, then content — respecting linked record dependencies) and content creation loading order (brand profile, then platform voice guide, then platform playbook — every time, no exceptions).

    Skills in Practice

    The Airtable schema skill contains full field definitions for six tables — Brand Profile, Sources, Content Plans, Pillar Pages, Articles, and Content Pieces. That’s thousands of tokens of schema detail. It loads only when a command needs to read or write Airtable records.

    The brand context skill references brand/profile.md for voice and tone, plus platform-specific guides for Twitter, LinkedIn, YouTube, TikTok, and website. A command writing a Twitter post loads the Twitter voice guide. A command writing a pillar page loads the website guide. Both load the core brand profile. Neither loads the guides it doesn’t need.

    The Learnings Loop

    Each command has a learnings file. The /write command’s learnings file captures things like: “First article written and approved on first draft,” “Brand voice guide + website platform guide loaded before writing — tone landed without corrections,” “Airtable Rich Text field preserves markdown including tables.”

    Before writing any content, the /write command reads learnings/write.md. The feedback from previous sessions shapes the next output. Over time, the system’s content gets closer to what the user actually wants — without changing the model.

    Context Across Sessions

    context/active-work.md tracks what’s in the pipeline:

    ## In Progress
    - Pillar page: AIOS Guide (aios-guide) - outline approved, writing
    
    ## In Review
    - Twitter thread: MCP servers explained - waiting for feedback
    
    ## Queued
    - Cluster article: AIOS Architecture Layers
    - LinkedIn post: App-in-a-Folder pattern

    When a new session starts, /status reads this file and reports the current state. No re-explaining. No lost context. The system picks up where it left off.

    Connected Services

    Five MCP servers power the Services layer:

    Service Role What the AI Can Do
    Airtable Structured data Read/write content records, track pipeline status, manage metadata
    WordPress Web publishing Create posts, update content, upload media
    Blotato Social publishing Schedule and publish to Twitter, LinkedIn, TikTok, YouTube
    DataForSEO Research Keyword data, SERP analysis, backlink data, AI visibility tracking
    HeyGen Video Generate avatar videos from scripts, check render status, download

    The content status flow runs through these services: a piece starts as a Draft in Airtable, moves through Write, In Progress, In Review, Approved, gets published to WordPress or scheduled through Blotato, and its status updates to Published — all orchestrated by the AI through MCP tool calls.

    When You Need an AIOS (and When You Don’t)

    An AIOS makes sense when your workflow requires judgment, adaptation, and multi-service coordination. It’s overkill for simple, predictable automations.

    Build an AIOS when:

    • Your workflow requires creative judgment (content strategy, editorial decisions, voice adaptation)
    • You coordinate across multiple services that need to stay in sync (database + CMS + social platforms)
    • The same inputs should produce different outputs depending on context (a LinkedIn post about the same topic reads differently than a Twitter post)
    • You need session continuity — the system should remember what happened last time and pick up where it left off
    • The workflow evolves frequently and you don’t want to rebuild automation chains every time something changes

    Stick with traditional automation when:

    • Every step is predictable and deterministic
    • The output is templated (fill in variables, send email, done)
    • The workflow rarely changes
    • You don’t need creative judgment — just execution
    • Cost matters more than capability (AI API calls cost more than webhook triggers)

    Skip both when:

    • The task is a one-time thing. Just do it manually.
    • You’re automating for the sake of automating. If the manual process takes 5 minutes and happens weekly, the setup cost of either approach might not be worth it.

    The honest answer: most people don’t need an AIOS yet. But if you’re managing content across multiple platforms, coordinating strategy with execution, and the quality of the output matters — the architecture pays for itself quickly.

    These cluster articles go deeper on specific aspects of the AIOS architecture:

    FAQs

    What does AIOS stand for?

    AIOS stands for AI Operating System. It describes a system architecture where an AI model serves as the central orchestration layer — managing context, making decisions, and calling tools to execute workflows. The term distinguishes this pattern from simple AI chatbots or prompt chains.

    Do I need to know how to code to build an AIOS?

    Not in the traditional sense. An AIOS built on the App-in-a-Folder pattern uses markdown files for instructions, rules, and context. You write in plain English, not Python. You do need to be comfortable with a CLI, file system navigation, and basic terminal commands. If you can use Claude Code, you can build an AIOS.

    How is an AIOS different from an AI agent?

    An AI agent is a single entity that can take actions. An AIOS is the system that coordinates multiple agents, manages shared context, enforces rules, and provides continuity across sessions. An agent might write a blog post. An AIOS manages the entire content pipeline — planning, writing, reviewing, publishing — using specialized agents for each task.

    What does an AIOS cost to run?

    The cost is primarily AI API usage. Claude Code charges based on token consumption. A typical session that plans content, writes a few pieces, and updates the database might use a few dollars in API calls. MCP server connections to services like Airtable or WordPress have their own subscription costs, but those are the same costs you’d pay using those services manually.

    Can I build an AIOS with a model other than Claude?

    The architecture is model-agnostic in principle. The five-layer pattern — Brain, Skills, Learnings, Context, Services — works regardless of the orchestrator. In practice, you need a model with tool use capability, file system access, and MCP support. Claude Code provides all three out of the box, which is why it’s the reference implementation here.

    How long does it take to build a working AIOS?

    A basic AIOS with a Brain layer, one command, and one MCP server connection can be working in an afternoon. A production system like Content Engine AIOS — with eight commands, multiple agents, platform-specific content creation, and five connected services — took months of iteration. Start small. Add capabilities as you need them.

    Does an AIOS replace my existing tools?

    No. An AIOS orchestrates your existing tools. Airtable still stores your data. WordPress still hosts your site. Your social platforms still distribute content. The AIOS sits on top and coordinates them — reading from one, writing to another, making decisions about what to do and when. Your tools become services that the AI can call.

    What happens when the AI makes a mistake?

    The system is designed as interactive, not autonomous. Nothing publishes without human approval. Content moves through a status flow — Draft to In Review to Approved to Published — with human checkpoints. The Learnings layer captures mistakes so the system avoids repeating them. And because the entire system is readable files, you can inspect exactly what instructions the AI was following when it made the error.

  • AIOS vs Traditional Automation: What Actually Changes

    AIOS vs Traditional Automation: What Actually Changes

    Automation tools like Zapier, Make, and n8n connect apps and move data between them. An AI Operating System does something different — it reasons about what to do, holds context across tasks, and adapts without you rebuilding workflows. This article breaks down where each approach wins and where traditional automation hits a wall.

    TL;DR: Automation runs fixed sequences. An AIOS reasons through tasks using context. Both have a place, but only one can handle work that requires judgment.

    This article is part of the AIOS: What an AI Operating System Is and How to Build One guide.

    The Reasoning Gap

    TL;DR: Automation follows rules you wrote in advance. An AIOS decides what to do at runtime based on context it can read.

    Take a simple task: “Write a Twitter post from this article.”

    In Zapier, you’d build a zap. New article triggers the workflow. It pulls the title and maybe the first paragraph. Feeds them into a template or an AI step with a fixed prompt. Posts the result. Every article gets the same treatment — same prompt, same structure, same voice instructions baked into one text field.

    In an AIOS like Content Engine, the same task plays out differently. The system reads the article. It also reads the brand voice profile, the Twitter-specific voice guide, and a playbook of what’s been performing well on the platform. It looks at the article’s angle and decides which hook pattern fits. It checks whether you’ve already posted something similar this week.

    The output isn’t templated. It’s reasoned.

    The difference isn’t that one uses AI and the other doesn’t — Zapier has AI steps too. The difference is how much context the AI can work with. A Zapier AI step gets whatever you paste into the prompt field. An AIOS loads its own context from project files, brand docs, and platform history.

    The Context Gap

    TL;DR: Automation passes data between steps. An AIOS carries persistent context — brand identity, strategy, past decisions — across every task.

    Workflow tools are stateless by design. Each run starts fresh. You can store variables, but the tool doesn’t accumulate knowledge over time.

    An AIOS maintains layered context:

    Layer What It Holds Example
    Brand Voice, audience, visual identity brand/profile.md — tone, topics, never-say list
    Platform Per-channel voice and formatting brand/platforms/twitter.md — hook patterns, length
    Strategy What content exists, what’s planned Airtable pipeline — status, angles, gaps
    Learning What worked, what didn’t learnings/write.md — feedback from past sessions
    Session What’s in progress right now context/active-work.md — current task state

    When Claude Code acts as the AIOS orchestrator, it reads these files before doing anything. A Twitter post written on Monday carries context from the content plan created on Friday. A cluster article knows what its parent pillar already covers.

    In automation, you’d need to pipe every piece of context through every workflow step as variables. In practice, nobody does this. The workflows get brittle, the variable lists get unwieldy, and the context gets stale.

    The Adaptation Gap

    TL;DR: Changing an automation workflow means editing the workflow. Changing AIOS behavior means updating a file it reads.

    Say your brand voice shifts. You stop using exclamation marks. You start leading with questions instead of statements.

    In Make or n8n, you open every workflow that generates content. You find the prompt fields. You edit each one. If you have 15 workflows that touch content, that’s 15 edits across 15 different screens.

    In an AIOS, you update brand/profile.md. Every command that creates content reads that file before running. One edit propagates everywhere.

    This scales to bigger changes too. New platform? Add a voice guide file and a playbook. The AIOS architecture — layers, skills, memory — is designed so new capabilities slot in without rewiring existing ones. The system reads updated context; it doesn’t need new connections.

    Where Automation Still Wins

    TL;DR: For deterministic tasks with predictable inputs and outputs, traditional automation is simpler and more reliable.

    Not everything needs reasoning. Some tasks are mechanical:

    • Move a file from Dropbox to Google Drive when it’s added. No judgment required. Zapier handles this perfectly.
    • Send a Slack notification when a form is submitted. Fixed trigger, fixed action. Automation is the right tool.
    • Sync records between two databases on a schedule. Predictable data, predictable mapping. n8n does this reliably.

    Automation tools are also more transparent for simple workflows. You can see every step, test each one, and debug by inspecting individual nodes. An AIOS making decisions through reasoning is harder to audit step-by-step.

    If the task has no ambiguity — the input is always structured the same way, the output is always the same format, and no judgment is needed — automation is faster to set up and easier to maintain.

    Where AIOS Pulls Away

    TL;DR: When a task involves judgment, multi-source context, or content that needs to feel crafted — not templated — an AIOS outperforms automation.

    Three scenarios where the gap is obvious:

    Publishing content to WordPress. A Zapier workflow maps fields to the WordPress API. Title goes here, body goes there, category gets set. An AIOS does more — it converts Markdown to WordPress blocks, generates FAQ schema markup, creates a title card image, assigns categories based on the content’s topic cluster, sets internal links to related articles, and writes a meta description tuned for the target keyword. The MCP server handles the API call. The intelligence lives in the decisions before the call.

    Reacting to a news story. Automation can’t do this at all — there’s no trigger for “a relevant news story happened.” An AIOS reads a daily signal feed, scores each story against the brand’s topics, decides which ones fit, drafts content with the right angle for each platform, and queues it for review. The whole pipeline from signal to draft involves judgment at every step.

    Maintaining a content pipeline. Automation can move cards between columns. It can’t look at your pipeline and say “you have three articles about MCP servers but nothing about prompt architecture — that’s a gap.” An AIOS reads the full pipeline, compares it to the content strategy, and recommends what to produce next.

    How They Work Together

    TL;DR: The best setup uses both. AIOS handles reasoning-heavy work. Automation handles deterministic triggers and data movement.

    This isn’t an either/or choice. In the app-in-a-folder model, the AIOS handles content strategy, writing, and decision-making. But you might still use automation for the mechanical parts:

    • A Zapier zap that pings Slack when a piece moves to “Approved” status in Airtable
    • An n8n workflow that backs up published content to a Google Drive folder nightly
    • A Make scenario that logs social post performance data back to a spreadsheet

    The AIOS does the thinking. Automation does the plumbing. They’re complementary, not competing.

    What Actually Changes

    TL;DR: The shift from automation to AIOS isn’t about replacing tools. It’s about moving decision-making from the builder (you, at design time) to the system (the AI, at runtime).

    With traditional automation, you make every decision when you build the workflow. The tool executes your decisions the same way, every time.

    With an AIOS, you define the context — brand voice, strategy, content types, platform rules — and the system makes decisions within that context at runtime. You review and approve. The system proposes; you direct.

    That’s the actual change. Not smarter automation. A different division of labor between you and the system.

    The AIOS guide covers the full architecture. If you’re building one, start there.

  • App-in-a-Folder: The Simplest Way to Build an AI System

    App-in-a-Folder: The Simplest Way to Build an AI System

    An AI system doesn’t need a database, a deployment pipeline, or cloud infrastructure. It needs a folder. A CLAUDE.md file, some commands, a few skills, and a rules directory — all plain text, all in one place. This is the app-in-a-folder pattern, and it’s how Content Engine AIOS runs in production.

    TL;DR: The app-in-a-folder pattern stores your entire AI system as markdown files in a project directory. No servers, no deploys, no infrastructure. Git-versioned, portable, inspectable, and extensible by adding files.

    This article is part of the AIOS: What an AI Operating System Is and How to Build One guide.

    What the Folder Actually Looks Like

    TL;DR: A single project folder with a brain file, a commands directory, agents, skills, and rules — plus working directories for brand, config, and learnings.

    Here’s the actual folder structure from Content Engine AIOS:

    project-folder/
    ├── CLAUDE.md           # Brain — system instructions
    ├── .claude/
    │   ├── commands/       # User entry points (/plan, /write, /status)
    │   ├── agents/         # Specialized workers
    │   ├── skills/         # Context containers
    │   └── rules/          # Shared conventions
    ├── brand/              # Brand identity files
    ├── learnings/          # Per-command feedback
    ├── context/            # Session continuity
    └── config/             # Service configuration

    CLAUDE.md is the brain. It defines what the system is, how it behaves, and where everything lives. When Claude Code opens the folder, it reads this file first. Every other file in the system gets referenced from here.

    The .claude/ directory holds the operational components. Commands are entry points — the things a user actually runs. Agents do the specialized work. Skills provide context on demand. Rules enforce conventions across everything.

    The remaining directories — brand/, learnings/, context/, config/ — are working state. Brand identity, accumulated feedback, session history, service credentials. All plain text. All readable.

    Why Markdown Files Work as System Definitions

    TL;DR: Markdown is readable by both humans and AI models, requires no parsing layer, and turns system architecture into editable text files.

    There’s no schema to maintain. No ORM. No migration files. You open a markdown file, you read the system definition, you edit it. The AI reads the same file the same way.

    This matters more than it sounds. Traditional software needs a translation layer between “what the system does” and “how the system is configured.” You write code, compile it, deploy it, and the running system looks nothing like the source. With app-in-a-folder, the source is the system.

    A command file like /plan contains the full workflow definition in plain English. An agent file describes the agent’s role, what context it loads, and how it behaves. A skill file holds domain knowledge — schema definitions, brand context, platform guides — that gets loaded when needed.

    Claude Code doesn’t need a special format. It reads markdown. Your system instructions are just… instructions.

    The Version Control Advantage

    TL;DR: Because every system component is a text file, your entire AI system lives in git — with full history, branching, and diffing.

    This is where app-in-a-folder pulls ahead of every cloud-based AI builder.

    When you change a command’s behavior, that’s a commit. When you refine a skill, that’s a diff. When you break something, you git revert. Your system has a full audit trail — who changed what, when, and why.

    Try doing that with a visual workflow builder or a prompt stored in a SaaS database.

    git log --oneline .claude/commands/plan.md
    a3f2c1d  Add source validation step to /plan
    8b1e4a7  Split plan into strategy + brief phases
    2d9f3c5  Initial /plan command

    Every evolution of your system is traceable. You can branch to experiment with a new agent structure, merge when it works, discard when it doesn’t. Standard development workflow applied to AI system design.

    Portability and Inspectability

    TL;DR: Copy the folder and the system works somewhere else. Open any file and you can see exactly what the system does.

    Portability is trivial. The system is the folder. Copy it, zip it, push it to a new machine. As long as Claude Code is installed and external services are connected, the system runs.

    There’s no environment to rebuild. No containers. No “works on my machine” problems with the system logic itself. Service connections (Airtable, WordPress, API keys) are external — but the system architecture, its commands, agents, and skills travel with the folder.

    Inspectability is the deeper win. Every instruction the AI follows is a text file you can read. There are no hidden prompts, no compiled behaviors, no black boxes. If the system does something wrong, you open the relevant file and see why.

    This is the opposite of most AI platforms, where the logic lives behind an API and you debug by trial and error. With app-in-a-folder, debugging is reading.

    Extensibility by Addition

    TL;DR: Adding a capability means adding a file. No refactoring, no redeployment, no breaking existing features.

    Want a new command? Create a file in .claude/commands/. Want a new agent? Add it to .claude/agents/. Need the system to understand a new domain? Write a skill.

    Content Engine AIOS started with three commands. It now has eight. Each addition was a new file — no changes to existing commands required. The AIOS layer architecture handles isolation. Commands don’t depend on each other. Agents are self-contained. Skills load on demand.

    This is different from traditional automation tools where adding a step means editing a workflow, reconnecting nodes, and testing the whole chain. Here, the new file exists alongside everything else. Claude Code, as the orchestrator, reads the relevant files when a command runs and ignores the rest.

    Action What You Do
    Add a command Create a markdown file in .claude/commands/
    Add an agent Create a markdown file in .claude/agents/
    Add domain knowledge Create a skill in .claude/skills/
    Add a convention Create a rule in .claude/rules/
    Connect a service Add an MCP server config

    No build step. No deploy. The next time you run the command, the new file is live.

    When App-in-a-Folder Breaks Down

    TL;DR: This pattern doesn’t suit large teams, real-time systems, or workloads that need persistent processes.

    The pattern has limits. Being honest about them matters more than selling the approach.

    Multi-user access. One folder, one operator. If three people need to run the system simultaneously with different contexts, you need something more — separate instances, a shared service layer, or a proper application. Git helps with collaboration on the definition, but runtime is single-user.

    Very large systems. As the number of files grows into the hundreds, context management gets harder. Claude Code handles progressive disclosure well — loading only what’s needed — but there’s a ceiling. If your system needs 50 agents that interact in complex chains, you’ll eventually want a proper orchestration framework.

    Real-time and persistent processes. App-in-a-folder runs on demand. You invoke a command, it executes, it finishes. There’s no daemon watching for events, no webhook receiver, no always-on process. If you need real-time triggers, you’ll need external infrastructure (cron jobs, queue workers, webhook endpoints) alongside the folder.

    State at scale. The folder pattern works for configuration, instructions, and light working state (learnings, session context). It doesn’t replace a database for transactional data. Content Engine AIOS uses Airtable for data and the folder for system logic — that split is intentional.

    What App-in-a-Folder Replaces

    TL;DR: It replaces visual workflow builders, prompt management tools, and custom-coded AI orchestration — for the right use case.

    Before this pattern, building an AI system meant one of three things:

    1. Visual workflow builders (Zapier, Make, n8n) — drag and drop, but the logic gets tangled fast and you can’t version control it meaningfully.
    2. Prompt management platforms — store and version prompts, but they’re disconnected from the system that uses them.
    3. Custom code — full control, but you’re building infrastructure instead of building the system.

    App-in-a-folder collapses all three. The prompts are the system. The version control is git. The infrastructure is a folder. You don’t build an app and then connect an AI to it. The AI reads the folder and becomes the app.

    For solo builders and small teams working on content systems, marketing automation, or research pipelines — this is enough. More than enough. It’s the simplest architecture that actually works for production AI systems.

    What to Build Next

    If you’re starting from scratch, the path is:

    1. Create a project folder with a CLAUDE.md file
    2. Define your first command in .claude/commands/
    3. Add a rule or two in .claude/rules/
    4. Run it. See what’s missing. Add a skill for the missing context.
    5. Iterate.

    The full architecture — layers, skills, memory, external services — is covered in the AIOS guide. The specifics of how Claude Code acts as the orchestration layer are in Claude Code as an AIOS Orchestrator.

    Start with the folder. The system grows from there.

  • MCP Servers: How AIOS Connects to External Services

    MCP Servers: How AIOS Connects to External Services

    An AI Operating System needs to talk to other software. Airtable for data. WordPress for publishing. Blotato for social distribution. DataForSEO for research. The Model Context Protocol (MCP) is what makes these connections work inside an AIOS built on Claude Code — and it replaces a surprising amount of custom integration code.

    TL;DR: MCP servers give your AIOS standardized connectors to external services. Each service exposes tools that Claude Code can call directly. No SDK wrappers, no middleware, no glue code. You configure the server, and the tools appear.

    What MCP Actually Does

    TL;DR: MCP turns external APIs into callable tools inside Claude Code’s environment.

    MCP — the Model Context Protocol — is a standard for connecting AI models to external data and services. In practice, it works like this: you run an MCP server for a service (say, Airtable), and that server exposes a set of tools that Claude Code can call natively.

    The tool calls look like namespaced functions:

    mcp__airtable__list_records
    mcp__airtable__create_record
    mcp__airtable__update_records
    mcp__airtable__search_records

    Claude Code doesn’t need to know how to authenticate with Airtable’s REST API, handle pagination, or manage rate limits. The MCP server handles all of that. Claude Code just calls the tool with the right parameters.

    This is fundamentally different from the old approach of writing API wrapper functions, managing tokens in environment variables, and building error handling for each service. MCP collapses that entire layer into a protocol.

    The Services in Content Engine AIOS

    TL;DR: Five external services power the system. Four connect via MCP. One uses a REST API directly.

    Here’s what each service does and how it connects:

    Service Role Connection Tool Prefix
    Airtable Data layer, pipeline tracking MCP server mcp__airtable__
    DataForSEO Keyword research, SERP analysis, AI visibility MCP server mcp__dfs-mcp__
    Blotato Social publishing (Twitter, LinkedIn, YouTube, TikTok) MCP server mcp__blotato__
    WordPress Website publishing (headless CMS) REST API (curl) n/a
    HeyGen AI avatar video generation REST API (curl) n/a

    Airtable is the core. Every content piece, every plan, every source record lives there. It’s the single source of truth the entire system reads from and writes to.

    DataForSEO powers the research layer — keyword data, SERP results, AI platform mentions, content analysis. Its MCP server exposes dozens of tools organized by category:

    mcp__dfs-mcp__serp_organic_live_advanced
    mcp__dfs-mcp__dataforseo_labs_google_keyword_overview
    mcp__dfs-mcp__ai_opt_llm_ment_search
    mcp__dfs-mcp__backlinks_summary

    Blotato handles the last mile — getting approved content published to social platforms. One MCP call creates a post, another checks its status, another schedules it.

    WordPress and HeyGen connect via REST API (curl) rather than MCP. WordPress uses its native JSON API for headless publishing. HeyGen’s video generation API is called directly with curl. Both work fine — MCP isn’t required for every integration. It just makes the ones it supports cleaner.

    Why MCP Beats Custom Integrations

    TL;DR: MCP eliminates glue code, makes services interchangeable, and lets the AI handle tool selection.

    Before MCP, connecting an AI system to an external service meant writing a custom integration layer. You’d build functions to authenticate, format requests, parse responses, handle errors, and expose the results in a format the AI could use. Every service was a bespoke project.

    MCP changes three things:

    No glue code. The MCP server is the integration. You configure it once — point it at the service, provide credentials — and it exposes the full tool surface. No wrapper functions to maintain. No response parsers to debug.

    Service awareness. Claude Code can see all available MCP tools and their descriptions. It picks the right tool for the job. You don’t need to map user intent to API calls — the orchestration layer handles that.

    Standardized interface. Every MCP tool follows the same pattern: namespaced name, typed parameters, structured response. Whether you’re querying Airtable or DataForSEO, the calling convention is identical. This matters when your AIOS architecture has multiple layers that all need to interact with services.

    The practical result: adding a new service to the AIOS means configuring one MCP server, not writing an integration library.

    How MCP Servers Get Configured

    TL;DR: MCP servers are declared in a settings file. Each entry specifies the server command, environment variables, and transport.

    In Claude Code, MCP servers are configured in the project’s settings. Each server declaration looks roughly like this:

    {
      "mcpServers": {
        "airtable": {
          "command": "npx",
          "args": ["-y", "@airtable/mcp-server"],
          "env": {
            "AIRTABLE_API_KEY": "pat_xxxxx"
          }
        }
      }
    }

    When Claude Code starts, it launches each configured MCP server as a subprocess. The server connects, registers its tools, and Claude Code can call them immediately.

    You can add or remove services without touching any application code. The app-in-a-folder pattern means the entire system — including its service connections — lives in a directory structure. No deployment pipeline. No infrastructure. Just configuration.

    Progressive Readiness: Services Are Optional

    TL;DR: The system works with whatever services are configured. Missing a service reduces capability but doesn’t break anything.

    This is a design principle in Content Engine AIOS, and MCP makes it easy to enforce. Every service except Airtable is optional.

    No Blotato configured? Content still gets written and saved to Airtable — you just publish manually. No DataForSEO? You skip automated keyword research but can still plan content from other sources. No HeyGen? Scripts get written but videos don’t render.

    The system degrades gracefully because each service is a discrete connector, not a dependency baked into application logic. This matters for AIOS vs traditional automation — brittle integrations are the main reason automation pipelines break. MCP’s loose coupling avoids that.

    What MCP Doesn’t Solve

    TL;DR: MCP handles tool calls, not workflows. Sequencing, validation, and error recovery still need an orchestration layer.

    MCP gives you the tools. It doesn’t tell you when to use them, in what order, or what to do when a call fails.

    In Content Engine AIOS, that’s the job of commands and agents — the orchestration layer that sequences tool calls into workflows. MCP handles “create this Airtable record.” The agent handles “create the source record first, then the content plan, then link them together” — the write order rules that keep linked records consistent.

    MCP also doesn’t handle authentication rotation, usage tracking, or cost management. You still need to manage API keys, monitor rate limits, and watch costs — especially with services like DataForSEO and HeyGen where every call has a price.

    What to Build Next

    MCP is the service layer of an AIOS. It turns external APIs into native tools. But the tools are only useful inside a system that knows when and how to use them.

    Start with the full AIOS guide for the complete architecture. If you’re building the orchestration layer, read Claude Code as an AIOS Orchestrator. For the broader system design — layers, skills, memory — see AIOS Architecture: Layers, Skills, and Memory.

  • Claude Code as an AIOS Orchestrator: Why a CLI Beats a GUI

    Claude Code as an AIOS Orchestrator: Why a CLI Beats a GUI

    Claude Code as an AIOS Orchestrator: Why a CLI Beats a GUI

    TL;DR: Claude Code works as an AIOS orchestrator because it combines file system access, tool use via MCP, reasoning capability, and extensibility through plain files. A CLI gives you transparency that GUIs hide — and when you’re building a system that makes decisions, transparency isn’t optional.

    This is part of the AIOS guide, which covers the full architecture. This article focuses on the orchestration layer — why Claude Code specifically, and why a CLI interface matters more than it seems.

    What an Orchestrator Actually Does

    TL;DR: The orchestrator is the component that reads context, decides what to do, calls tools, and produces output. In an AIOS, the AI model fills this role.

    A traditional application has a runtime that executes code. An AIOS has an orchestrator that executes judgment. It reads the project state, loads relevant context, reasons about the task, and calls external services to get things done.

    The orchestrator needs four capabilities:

    1. File system access — read instructions, write output, maintain state
    2. Tool use — call external services (databases, APIs, publishing platforms)
    3. Reasoning — make decisions based on context, not just follow a script
    4. Extensibility — gain new capabilities without rewriting the system

    Most AI interfaces give you one or two of these. A chatbot gives you reasoning but no file access. A no-code builder gives you tool use but limited reasoning. Claude Code gives you all four.

    Why Claude Code Fits

    TL;DR: Claude Code provides native file I/O, MCP tool calling, strong reasoning, and a project-folder model that aligns perfectly with the AIOS architecture.

    File system as memory. Claude Code reads and writes files as a core capability. In an AIOS, the project folder is the system’s persistent memory — CLAUDE.md for instructions, learnings/ for feedback, context/ for session state. The AI reads these files at session start and writes updates when things change. No external database needed for system state. This is the app-in-a-folder pattern — the entire system lives in one directory.

    MCP as the service layer. Model Context Protocol gives Claude Code access to external tools through a standardized interface. Each MCP server wraps a service — Airtable, WordPress, DataForSEO — and exposes named functions the AI can call. The AI doesn’t write HTTP requests. It calls mcp__airtable__create_record and gets structured results back.

    Reasoning at the core. Content strategy, editorial decisions, brand voice adaptation, deciding whether a keyword cluster is worth pursuing — these aren’t mechanical tasks. They require judgment informed by context. The AI model provides that judgment. The AIOS architecture provides the context.

    Extensibility through files. Adding a new command to an AIOS means adding a markdown file to .claude/commands/. Adding a new skill means adding a markdown file to .claude/skills/. No compilation. No deployment. No code changes. The system’s capabilities grow by adding files to a folder.

    The CLI Advantage

    TL;DR: A CLI keeps you close to the system’s actual behavior — you see what files get read, what tools get called, what decisions get made. GUIs abstract that away, which is fine until something breaks.

    The argument for GUIs is convenience. The argument for CLIs is transparency. When you’re building a system that makes decisions on your behalf, transparency wins.

    You see the work happening. In a CLI, every file read, every tool call, every decision is visible. You watch the AI load brand/profile.md, call the Airtable MCP to fetch a content plan, reason about which angle to take, and produce the draft. In a GUI, you click a button and get output. The steps in between are hidden.

    Debugging is direct. When something goes wrong in a GUI-based AI tool, you’re guessing. Was it the prompt? The context? A service timeout? In a CLI, you see exactly what the AI read, what it called, and where the process broke. The fix is usually obvious.

    The file system is the interface. An AIOS stores its state in files. A CLI works natively with files. There’s no translation layer between the system’s state and how you interact with it. Open learnings/write.md in your editor and you see exactly what the AI will read before its next write session. Try that with a GUI tool’s internal state.

    Composability. CLI tools chain together. You can pipe output, script sequences, integrate with git hooks, run commands in CI/CD pipelines. A GUI is a closed loop — you interact with it through the interface it gives you, nothing else.

    What You Give Up

    TL;DR: CLIs have a steeper learning curve and no visual dashboards. These are real tradeoffs, not dealbreakers.

    Honesty about tradeoffs matters. A CLI-first approach has real costs:

    No visual dashboard. You don’t get a drag-and-drop content calendar or a visual pipeline board. The AIOS compensates by using Airtable as the visual layer — pipeline status, content review, and approval all happen in Airtable’s interface. The CLI handles production; Airtable handles visibility.

    Learning curve. Terminal comfort is a prerequisite. If you’ve never used a CLI, the initial friction is real. But the audience for building an AIOS — AI makers — generally lives in terminals already.

    No persistent UI state. Each CLI session starts fresh in terms of interface. The AIOS compensates with the Context layer — active-work.md ensures the system knows where it left off, even if the terminal doesn’t.

    These tradeoffs are manageable because the AIOS architecture already has answers for them. The CLI handles what CLIs do best (execution, transparency, composability), and external services handle what they do best (visual interfaces, persistent state, collaboration).

    Compared to the Alternatives

    TL;DR: No-code AI builders, custom agent frameworks, and chat interfaces each solve part of the problem. None combine file access, tool use, reasoning, and extensibility the way Claude Code does.

    No-code AI builders (Zapier, Make, n8n with AI nodes) give you tool connections and visual workflow design. But the AI reasoning is limited to individual nodes — the system can’t reason across the entire workflow. And the state lives in the platform, not in files you control. For a deeper comparison, see AIOS vs Traditional Automation.

    Custom agent frameworks (LangChain, CrewAI, AutoGen) give you programmatic control and reasoning chains. But you’re writing code — Python classes, configuration objects, deployment pipelines. Every new capability requires code changes. The AIOS approach of “add a markdown file” is faster for iteration.

    Chat interfaces (ChatGPT, Claude.ai) give you reasoning but no persistent state and limited tool access. Every session starts from zero. You can’t build a system on top of a chat interface because there’s no file layer, no commands, no project structure.

    Claude Code isn’t the only possible AIOS orchestrator. But right now, the combination of native file access, MCP tool calling, strong reasoning, and the project-folder model makes it the most practical one for this architecture.

    What Makes It Work Long-Term

    TL;DR: The orchestrator choice matters less than the architecture. If the five-layer pattern is sound, the orchestrator can be swapped.

    The AIOS architecture is designed to be orchestrator-portable. The five layers — Brain, Skills, Learnings, Context, Services — are all files on disk. Any AI model with file access and tool calling capability could read them.

    Claude Code is the right choice today because it provides the best combination of the four requirements. If a better orchestrator emerges — one with larger context, faster execution, or more capable reasoning — the migration path is straightforward: point the new orchestrator at the same folder.

    That’s the real argument for the CLI approach. It’s not about Claude Code specifically. It’s about building on files and standards rather than proprietary interfaces. Files are portable. MCP is a protocol. The system survives its orchestrator.

    For the full AIOS guide — all five layers, step-by-step build instructions, and real examples — see AIOS: What an AI Operating System Is and How to Build One.

  • AIOS Architecture: Layers, Skills, and Memory in an AI Operating System

    AIOS Architecture: Layers, Skills, and Memory in an AI Operating System

    AIOS Architecture: Layers, Skills, and Memory in an AI Operating System

    TL;DR: An AIOS separates concerns into five layers — Brain, Skills, Learnings, Context, and Services — so the AI loads only what it needs, remembers what worked, and picks up where it left off. This article covers how each layer works, what goes in it, and why the separation matters.

    This is part of the AIOS guide, which covers what an AIOS is and how to build one. This article goes deeper on the architecture — the specific design decisions that make a folder of markdown files behave like an operating system.

    Why Layers Matter

    TL;DR: Without layers, every session dumps the entire system into the AI’s context window. That’s expensive, slow, and degrades output quality.

    An AI model has a finite context window. Everything it reads — instructions, schema definitions, brand guidelines, conversation history — competes for space in that window. A system that loads everything on every session wastes context on irrelevant information and crowds out the actual work.

    Layers solve this by separating concerns. The Brain layer loads every session because it defines how the system works. Skills load on demand because you only need the Airtable schema when you’re writing to Airtable. Learnings load per-command because /write doesn’t need to know what /signals learned last week.

    The result: a system that stays lean in context but deep in capability. The AI always knows what it can do. It only loads the details when it needs them.

    Layer 1: Brain — The Instruction Set

    TL;DR: The Brain layer is a single file (CLAUDE.md) plus shared rules that the AI reads at the start of every session. It defines what the system does and how it behaves.

    CLAUDE.md is the kernel. It contains:

    • System purpose — one paragraph on what this AIOS does
    • Architecture overview — folder structure, available commands, how layers connect
    • Command reference — what each command does, in a table
    • Content types — what content the system produces and where it publishes
    • Status flow — how content moves from Draft to Published
    • Table references — Airtable base and table IDs for quick access
    • Conventions — date formats, timezone, model selection, naming patterns

    Rules live in .claude/rules/ as separate files. They enforce specific behaviors across all commands:

    .claude/rules/
    ├── airtable-writes.md    # Record creation order, batch limits
    └── content-creation.md   # Brand loading sequence, quality requirements
    

    Rules are the guardrails. “Always create Sources before Content Plans” is a rule. “Load brand profile before writing any content” is a rule. Without them, the AI makes reasonable but inconsistent decisions. With them, the system behaves predictably.

    The Brain layer should be concise. Every token in CLAUDE.md loads on every session. If a piece of information is only relevant to one command, it belongs in a skill, not the Brain. The entire system — Brain, skills, rules, and all — lives in a single project directory. For more on why that works, see App-in-a-Folder: The Simplest Way to Build an AI System.

    Layer 2: Skills — Context on Demand

    TL;DR: Skills are context containers that load only when relevant. They use progressive disclosure — small frontmatter loads first, full content loads only when matched.

    Skills hold specialized knowledge the system needs sometimes but not always. The Airtable schema. Content type specifications. Service connection details. Brand context loading instructions.

    The key pattern is progressive disclosure. Each skill has two parts:

    1. Frontmatter (~100 tokens) — name, description, when to load
    2. Body (hundreds to thousands of tokens) — the actual knowledge

    The AI reads all frontmatter at session start. When a task matches a skill’s description, the full body loads. A /write command triggers the content-types skill. A /plan command triggers the airtable-schema skill. A /status command triggers neither.

    .claude/skills/
    ├── airtable-schema/      # Table IDs, field definitions, relationships
    │   ├── SKILL.md          # Frontmatter + full schema
    │   └── references/       # Deep reference files
    ├── brand-context/        # Brand loading instructions
    ├── content-types/        # Specs for each content format
    └── services-context/     # MCP server details, API parameters
    

    Skills can also reference external files. The brand-context skill doesn’t contain the brand profile — it tells the AI to read brand/profile.md and the relevant platform voice guide. This keeps the skill itself small while pointing to rich context that lives elsewhere in the project.

    The discipline is simple: if the information is needed every session, it goes in the Brain. If it’s needed for specific tasks, it goes in a skill. This distinction keeps context budgets manageable as the system grows.

    Layer 3: Learnings — The Feedback Loop

    TL;DR: Each command has its own learnings file. The command reads its learnings before running, so past feedback shapes future behavior without changing the model.

    Learnings are the simplest layer and arguably the most important. Each command gets a file at learnings/.md. The file has three sections: What Works, What Doesn’t Work, and Do Differently.

    learnings/
    ├── plan.md       # Content strategy learnings
    ├── write.md      # Content production learnings
    ├── status.md     # Pipeline status learnings
    ├── publish.md    # Publishing learnings
    └── signals.md    # DailySignals learnings
    

    Here’s a real entry from learnings/write.md:

    > First pillar page written — “AIOS: What an AI Operating System Is and How to Build One” (~3,800 words). Approved as-is on first review. Full brand stack loaded: profile + website voice guide + website playbook.

    And another:

    > Never include --- (horizontal rules) in content. Frontend CSS handles section spacing. Horizontal rules create visual noise.

    The first entry reinforces a pattern that worked. The second prevents a mistake from repeating. Both load before the next /write session runs.

    This isn’t fine-tuning. The model doesn’t change. What changes are the instructions the model reads before acting. It’s the difference between training someone and giving them better notes.

    The feedback loop closes through /wrap — a session wrap-up command that combines system self-diagnosis with user feedback to update the relevant learnings files. Over time, the learnings accumulate into a practical operations manual written by the system about itself.

    Layer 4: Context — Session Continuity

    TL;DR: Two files track what’s happening across sessions — active-work.md for current state and session-log.md for history. This lets the system pick up where it left off.

    Without context, every session starts from zero. The AI doesn’t know what was published yesterday, what’s in review, or what the user decided to skip. Context fixes this with two files:

    context/active-work.md — the current state. Pipeline snapshot, published content, platform status, next priorities. Updated at the end of each session by /status or /wrap.

    context/session-log.md — the history. A brief record of each session: date, what happened, what changed. Not a transcript — a summary.

    When /status runs at the start of a session, it reads active-work.md and reports the current state. The user sees immediately: 73 pieces across 3 plans, 6 in review, 2 approved, ready to publish. No re-explaining. No “where were we?”

    Context files should be factual and compact. They’re loaded frequently, so bloated context files waste the same budget that the layer system is designed to protect.

    Layer 5: Services — External Connections

    TL;DR: MCP servers connect the AIOS to external platforms. Each server exposes tools the AI calls by name — no custom API code required.

    The Services layer is where the AIOS touches the outside world. Each external platform gets an MCP server that wraps its API and exposes named tools. For the full deep dive on how this works, see MCP Servers: How AIOS Connects to External Services.

    Service What the AI Can Do
    Airtable Read/write records, query pipeline status, manage content metadata
    WordPress Create posts and pages, upload media, update published content
    Blotato Schedule and publish to Twitter, LinkedIn, TikTok, YouTube
    DataForSEO Pull keyword data, SERP analysis, backlink profiles, AI visibility checks
    HeyGen Generate avatar videos from scripts, check render status, download files

    The AI doesn’t manage HTTP requests or parse JSON responses. It calls mcp__airtable__list_records with a filter formula and gets structured data back. It calls mcp__blotato__blotato_create_post with content and a platform account ID and the post gets scheduled.

    MCP servers are interchangeable. Swap WordPress for Ghost — as long as the new MCP server exposes similar tools, the commands adapt. The AI references tool names, not implementation details.

    This matters for resilience too. If a service is down or not configured, the rest of the system still works. The /status command checks service health and reports what’s available. Missing a service reduces capability but doesn’t break the system. This is a key difference from traditional automation, where a broken integration breaks the whole pipeline.

    How the Layers Interact

    TL;DR: Layers flow downward — Brain governs everything, Skills add depth, Learnings refine behavior, Context provides continuity, Services execute.

    A concrete example: the user runs /write to produce a cluster article.

    1. Brain — the AI reads CLAUDE.md, knows the command exists, loads the content creation rule
    2. Skillscontent-types and brand-context skills load, providing article specs and brand voice
    3. Learningslearnings/write.md loads, telling the AI to load the full brand stack and avoid horizontal rules
    4. Contextactive-work.md confirms the article’s status and its parent pillar
    5. Services — Airtable MCP fetches the article shell, then saves the finished draft

    Each layer adds information without duplicating what the others provide. The Brain says “load brand before writing.” The Skills say how. The Learnings say what worked last time. The Context says what’s in the pipeline. The Services execute the read and write.

    Claude Code is the orchestrator that ties this together — reading each layer, reasoning about the task, and calling the right tools in the right order.

    That’s the architecture. Five layers, clear boundaries, minimal overlap. The system scales by adding files, not by adding complexity.

    For the complete guide to AIOS — what it is, when you need one, and how to build yours — see AIOS: What an AI Operating System Is and How to Build One.