Most Claude Code articles talk about solo productivity. This one is different.
I want to show you how I used Claude Code to build what I call an "AI organization" - a structured system of specialized agents, each with a defined role, reporting structure, and skill set. Not a single AI assistant doing everything. An actual org chart.
The result: 90 named "employees" across 7 departments, with routing logic, escalation chains, and accountability systems - all running inside Claude Code.
Here's how it works.
The Problem With Generic AI Assistants
When most people use Claude Code, they treat it like a smart generalist. Need to write code? Ask Claude. Need a marketing email? Ask Claude. Need a financial analysis? Ask Claude.
This works fine for small tasks. But it breaks down when you're running a real business with real complexity.
The problem isn't capability - Claude Code is capable of doing all of these things. The problem is context. Every time you ask Claude to do something in a new domain, it starts fresh. No accumulated knowledge of your email marketing strategy. No memory of which ad creative worked last month. No understanding of your customer service tone guidelines.
The solution isn't a better prompt. The solution is structure.
The Architecture: Departments, Teams, and Roles
Here's the core insight: treat Claude Code agents like employees, not tools.
Real employees have:
- A defined role with specific responsibilities
- A domain of expertise they focus on
- A reporting structure (who they escalate to)
- Access to relevant context (their "desk" of files and data)
- Accountability (their name on the output)
Claude Code agents can have all of these things. You just have to design them.
My organization uses a three-layer structure:
Layer 1: Executive Layer
- CEO (strategic decisions, cross-department questions)
- COO (operational oversight, department coordination)
- Router (traffic cop - routes incoming requests to the right person)
Layer 2: Department Managers
- Finance Manager
- Analytics Manager
- Operations Manager
- Content Manager
- Marketing Manager
Layer 3: Specialists
- Each manager oversees 3-10 specialists
- Each specialist has a narrow focus and deep context for that domain
When I have a task, I don't "ask Claude." I invoke the right specialist.
This is a critical shift. Instead of a generic prompt, I run /email-campaign-analyst or /meta-ads-monitor or /inventory-accountant. Each of these is a Claude Code skill that loads the right context, applies the right rules, and produces output in the expected format.
Building Your First Department
Let me walk through how I built the Finance department, which handles invoices, cash flow, and bookkeeping.
Step 1: Define the Department's Scope
Before writing any code, I wrote a one-page "department charter":
- What decisions does this department make?
- What data does it have access to?
- What outputs does it produce?
- Who does it escalate to?
For Finance, the scope was:
- Process incoming invoices (scan, categorize, log)
- Track accounts payable/receivable
- Generate monthly financial summaries
- Flag anomalies and escalate to me
Step 2: Create the CLAUDE.md Files
Each department gets its own context file. This is where the magic happens.
The Finance department's CLAUDE.md includes:
- Which files contain financial data
- The rules for categorizing expenses (business vs. personal)
- The format for reports (always in NIS, always with source documentation)
- Who to CC when sending to the accountant
- What NOT to do (never guess amounts, always read the actual PDF)
Step 3: Build the Skills
Each specialist is a /skill command in ~/.claude/commands/.
Here's a simplified version of my /invoice-processor skill:
# Invoice Processor - Michal
You process incoming invoices for Vent ecommerce business.
## When invoked:
1. Check IMAP for new invoices (search subject:"invoice" since:yesterday)
2. Download PDF attachments using getMessage
3. Extract: vendor, amount, date, category
4. NEVER guess amounts - always read the actual PDF
5. Categorize per rules in claude.cd/finance/categories.md
6. Add to monthly CSV
7. Ask: "Send to accountant?"
## Rules:
- Never include personal expenses in business reports
- Amount discrepancies over 5% require flagging
- Always log the source file name
## Output format:
[table: date | vendor | amount | category | status]
Step 4: Set Up the Router
This is the piece most people miss. With 90 specialists, you need a routing layer that maps incoming requests to the right agent.
My router (/router) has a simple decision tree:
- Contains "invoice" or "expense" → Finance team
- Contains "ad" or "campaign" or "ROAS" → Media Analytics team
- Contains "customer" or "order" or "shipping" → Operations team
- Ambiguous → ask one clarifying question, then route
The router doesn't do the work. It just knows who to call.
Want to see this system in action? I built a set of free tools that help with numerology, human design, and wellness - all powered by the same Claude Code architecture described here. Check out the Angel Number Calculator or the Human Design Type Finder to see AI-powered tools built with these workflows.
The Communication Protocol
One of the hardest parts of building an AI organization is getting agents to communicate consistently. In a real company, you have Slack, email, and Zoom. In Claude Code, you have files.
Here's the protocol I use:
Task Assignment Files
I maintain a file called open-tasks.md with pending assignments. Each task entry includes:
- Task description
- Assigned agent (skill name)
- Priority level
- Due date
- Context links (which files the agent needs to read)
When an agent runs, its first action is always: read open-tasks.md, find tasks assigned to it, execute them.
Handoff Notes
When one agent's output becomes another agent's input, they leave structured handoff notes. The Analytics team produces a performance report → leaves it in reports/meta/latest.md → the Media Manager reads it before making budget decisions.
Escalation Log
Any agent that encounters a decision above its authority level writes to escalation-log.md. I review this file at the start of each session. It's like my executive inbox.
This creates a paper trail. I can see exactly what decisions were made by which agent, when, and why.
Real Results: What This System Produces
Here's what my AI organization handles on a standard day:
- 6am: Analytics agent scans overnight Meta Ads performance, flags anomalies
- 8am: Content factory agent produces 2 Instagram posts (one wellness brand, one numerology brand)
- 10am: Free tools agent publishes a new numerology calculator to the website
- 12pm: Email marketing agent reviews open rates from yesterday's campaign, suggests A/B test
- 2pm: Publishing agent posts Instagram content from the content queue
- 4pm: Outreach agent sends 10 guest post pitches to wellness bloggers
- 6pm: Second Instagram post goes out
- 8pm: Operations agent processes new orders, handles customer service escalations
- 11pm: Daily reconciliation runs - logs what happened, updates task files, prepares morning brief
I'm not at a keyboard for most of this. The system runs.
Building something similar? Start small. Pick one department - content or analytics usually work well as proof of concepts. Build three specialists, test for two weeks, then expand. The Human Design Type Finder and Life Path Calculator on my tools site were built using exactly this workflow.
The CLAUDE.md Hierarchy
A few articles ago, I wrote about CLAUDE.md files. In a team workflow context, this becomes even more important.
My hierarchy:
~/.claude/CLAUDE.md # Global rules (apply to all agents)
claude.cd/CLAUDE.md # Project rules (apply to this business)
claude.cd/A-Vent/CLAUDE.md # Brand-specific rules
claude.cd/B-NEX/CLAUDE.md # International unit rules
Each level overrides the previous. The global file contains things like "always respond in Hebrew" and "never use em dashes." The project file contains business rules. The brand files contain brand-specific tone and content guidelines.
When an agent runs, it inherits all of these automatically. No manual briefing required.
Common Mistakes and How to Avoid Them
Mistake 1: Making agents too generic
I started with a "Marketing Agent" that handled everything from ads to email to social. It was useless. Too much context, too many rules, too many edge cases.
Fix: split into Meta Ads Specialist, Email Campaign Specialist, Instagram Content Specialist. Each one gets better because it has less to know.
Mistake 2: Not defining escalation paths
Early on, agents would encounter decisions they couldn't make and just... make them anyway. Or worse, fail silently.
Fix: every agent has a documented escalation path. If it can't decide, it writes to the escalation log and stops. I review the log. The loop is complete.
Mistake 3: Agents without accountability
If every agent is called "Claude," there's no accountability. You can't track which agent made a bad decision.
Fix: name your agents. Give them identities. "Michal from Finance" is more accountable than "AI agent #7." And yes, it also makes debugging much easier.
Mistake 4: Forgetting to update task files
Agents are only as smart as their inputs. If open-tasks.md is stale, agents run on outdated instructions.
Fix: end-of-session workflow always updates task files. I use a "session closer" agent whose only job is to archive completed tasks, flag pending items, and update the handoff files.
Getting Started: Your First AI Department
You don't need 90 agents. Start with 3.
Pick one department: content, customer service, or analytics. These have clear inputs and outputs, which makes them easiest to automate.
Week 1: Define the department charter. What does it do? What files does it read and write?
Week 2: Build the skills. One manager, two specialists. Keep the skill files under 200 lines.
Week 3: Add the task assignment system. Agents read tasks from a shared file, execute, update status.
Week 4: Review what broke. Fix the edge cases. Document the rules that should have been in the CLAUDE.md.
After a month, you'll have a working department that requires minimal manual input. Then you expand.
FAQ
Q: How do you prevent agents from conflicting with each other?
Each agent operates in a specific domain and writes to specific files. Conflicts are prevented by making domains exclusive - the email agent never touches ad data, the ads agent never touches email data. When there's overlap (like an analytics report that covers both), a senior agent synthesizes the inputs rather than having both junior agents touch the same output.
Q: Do you actually run 90 agents in every session?
No. I invoke specific agents based on what I need. The "90 agents" is the full potential capacity of the organization. On a normal day, maybe 10-15 agents run. The rest exist as skills, ready to be called when needed.
Q: How much time did this take to build?
About 3 months of iterative building. The first month was conceptual - figuring out the right structure. Month two was building the finance and analytics departments. Month three was content and marketing. It wasn't 3 months of full-time work - more like 1-2 hours per day of refinement.
Q: Can I use this with Claude API instead of Claude Code?
Yes, with modifications. Claude Code's advantages here are persistent CLAUDE.md context, easy file access, and the /skill command system. With the API, you'd need to build context injection manually. Doable, but more work.
Q: What's the biggest risk?
Agents making decisions outside their authority. This is why the escalation protocol matters. If agents can only escalate (not decide) on edge cases, the worst outcome is a delayed task - not a bad decision.
The Bottom Line
The shift from "AI assistant" to "AI organization" isn't just about productivity. It's about building something that can operate independently of you.
When your AI organization has defined roles, clear accountability, and structured communication - it starts to feel less like a tool and more like a team.
That's the goal.
This is part of an ongoing series on using Claude Code to run a real business. Previous posts covered hooks, MCP connections, custom MCP servers, and CLAUDE.md files.
Explore free numerology and human design tools built with these workflows at mynextools.com.
Top comments (0)