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:
- Visual workflow builders (Zapier, Make, n8n) — drag and drop, but the logic gets tangled fast and you can’t version control it meaningfully.
- Prompt management platforms — store and version prompts, but they’re disconnected from the system that uses them.
- 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:
- Create a project folder with a
CLAUDE.mdfile - Define your first command in
.claude/commands/ - Add a rule or two in
.claude/rules/ - Run it. See what’s missing. Add a skill for the missing context.
- 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.
Written by Wayne Ergle