We Didn't Write 224 Prompts — How We Built a Templated Role System for an AI Workforce
The Counterintuitive Truth When people hear "224 AI employees," they assume we wrote 224 separate prompts. We didn't. We wrote exactly 4 core templates. Everything else is structured config data. This is the full post
The Counterintuitive Truth
When people hear "224 AI employees," they assume we wrote 224 separate prompts. We didn't. We wrote exactly 4 core templates. Everything else is structured config data.
This is the full postmortem of our journey from prompt explosion (180,000 words, 2 hours per new role) to a templated system (2,400 words, 5 minutes per new role).
Why We Needed 224 Roles
Cross-border trade is complex. Content, marketing, sales, logistics, compliance, finance, legal — each requires different expertise. We tried a single "super-agent." It produced sloppy legal reviews, stiff marketing copy, and leaked financial data into public-facing content.
So we modeled a real trade company: 18 departments, 224 clearly defined roles.
The Prompt Explosion Nightmare
In v1, we wrote a unique prompt for every role. ~800 words each. ~180,000 words total. Three people, two full weeks.
Then the nightmare:
- Changing one rule meant editing 224 files
- Roles drifted and blended into each other
- New role onboarding took ~2 hours
- Different departments ran different rule versions
We even tried hiring interns to maintain prompts. Dead end.
The Solution: Three-Layer Templated Architecture
After four iterations, we landed on: Template → Role Card → Federated Coordination
Layer 1: Core Template (1 universal)
12 fixed fields: identity, outcomes, boundaries, output format, communication protocol, compliance guardrails. Every role inherits this skeleton.
Layer 2: Department Constraints (18 sets)
Department-specific rules injected once, applied to all roles in that team. Finance, Legal, Marketing — each has its own constraint layer.
Layer 3: Role Parameters (224 sets, auto-injected)
Only 5–8 parameters per role, stored as YAML/JSON config files. No free-text prompts.
Global Layer: Federated Coordination Rules
Task routing, handoff protocol, conflict resolution, audit requirements — one set for the entire organization.
Before vs. After
| Metric | v1 (224 prompts) | v2 (templates) | Improvement |
|---|---|---|---|
| Prompt volume | ~180,000 words | ~2,400 words | 98.7% |
| New role creation | ~2 hours | ~5 minutes | 24x faster |
| Global rule update | ~8 hours | ~10 minutes | 48x faster |
| Role compliance rate | 72% | 94% | +22 pp |
| Handoff failure rate | 31% | 8% | 74% ↓ |
How It Works in Practice
When a user says "launch a new skincare product in Germany":
- System decomposes into subtasks (regulatory, marketing, logistics, pricing)
- Routes each to the correct department and role
- Runs independently with role-specific constraints
- Orchestrates cross-department handoffs
- Aggregates into a single final deliverable
No single agent holds full context — just like a real company.
Join the Discussion
The full discussion is on GitHub: How 224 AI Employees "Apply" for Their Jobs
We'd love to hear how you handle role management and cross-agent coordination in your multi-agent systems.
Next in the series: How we run performance reviews for 224 AI employees — KPIs, automated evaluation loops, and dynamic role optimization.
Originally published by Dev.to AI. Aggregated on AIWithGhost for educational purposes — full credit and traffic to the original publisher.