Team Builder
Deploy a 7-agent SaaS growth team on OpenClaw in one shot.
System Impact & Prerequisites
Read before running. This skill creates files and modifies system config.
What it creates
- A new workspace directory with ~40 files (agent configs, shared knowledge, inboxes, kanban)
apply-config.js -- script that modifies ~/.openclaw/openclaw.json (adds agents, bindings, agentToAgent config). Auto-backs up before writing.
create-crons.ps1 / create-crons.sh -- scripts that create cron jobs via openclaw cron add
- After running these scripts you must restart the gateway (
openclaw gateway restart)
What it does NOT do automatically
- Does not modify openclaw.json directly -- you run
apply-config.js yourself
- Does not create cron jobs directly -- you run the cron script yourself
- Does not restart the gateway -- you do that manually
Optional: Telegram
- If you provide bot tokens during setup,
apply-config.js will also add Telegram account configs and bindings
- Requires: Telegram bot tokens from @BotFather, your Telegram user ID
- Requires: network access to Telegram API (proxy configurable)
Optional: ACP / Claude Code
- The fullstack-dev agent is configured to spawn Claude Code via ACP for complex coding tasks
- Requires: ACP-compatible coding agent configured in your OpenClaw environment
- No extra setup needed if you don't use this feature
Credentials involved
- Telegram bot tokens (optional) -- stored in openclaw.json, used for agent-to-Telegram binding
- Model API keys -- must already be configured in your OpenClaw model providers (not handled by this skill)
Recommended
- Review generated
apply-config.js before running
- Check the backup of openclaw.json after running
- Test with 2-3 agents before enabling all cron jobs
Team Architecture
Default 7-agent SaaS growth team (customizable to 2-10 agents):
CEO
|-- Chief of Staff (dispatch + strategy + efficiency)
|-- Data Analyst (data + user research)
|-- Growth Lead (GEO + SEO + community + social media)
|-- Content Chief (strategy + writing + copywriting + i18n)
|-- Intel Analyst (competitor monitoring + market trends)
|-- Product Lead (product management + tech architecture)
|-- Fullstack Dev (full-stack dev + ops, spawns Claude Code with role-based prompts)
Multi-Team Support
One OpenClaw instance can run multiple teams:
node <skill-dir>/scripts/deploy.js # default team
node <skill-dir>/scripts/deploy.js --team alpha # named team "alpha"
node <skill-dir>/scripts/deploy.js --team beta # named team "beta"
Named teams use prefixed agent IDs (alpha-chief-of-staff, beta-growth-lead) to avoid conflicts. Each team gets its own workspace subdirectory.
Flexible Team Size
The wizard lets you select 2-10 agents from the available roles. Skip roles you don't need. The 7-agent default covers most SaaS scenarios, but you can run leaner (3-4 agents) or expand with custom roles.
Model Auto-Detection
The wizard scans your openclaw.json for registered model providers and auto-suggests models by role type:
| Role Type |
Best For |
Auto-detect Pattern |
| Thinking |
Strategic roles (chief, growth, content, product) |
/glm-5|opus|o1|deepthink/i |
| Execution |
Operational roles (data, intel, fullstack) |
/glm-4|sonnet|gpt-4/i |
| Fast |
Lightweight tasks |
/flash|haiku|mini/i |
You can always override with manual model IDs.
Deployment Flow
Step 1: Collect Configuration
Ask the user for these inputs (use defaults if not provided):
| Parameter |
Default |
Description |
| Team name |
Alpha Team |
Used in all docs and configs |
| Workspace dir |
~/.openclaw/workspace-team |
Shared workspace root |
| Timezone |
Asia/Shanghai |
For cron schedules |
| Morning brief hour |
8 |
Chief's morning report |
| Evening brief hour |
18 |
Chief's evening report |
| Thinking model |
zai/glm-5 |
For strategic roles |
| Execution model |
zai/glm-4.7 |
For execution roles |
| CEO title |
Boss |
How agents address the CEO |
Optional: Telegram user ID, proxy, and 7 bot tokens.
Step 2: Run Deploy Script
node <skill-dir>/scripts/deploy.js
Interactive -- asks all questions from Step 1, generates the full workspace.
Step 3: Apply Config
node <workspace-dir>/apply-config.js
Adds agents to openclaw.json, preserving existing config.
Step 4: Create Cron Jobs
# Windows
powershell <workspace-dir>/create-crons.ps1
# Linux/Mac
bash <workspace-dir>/create-crons.sh
Step 5: Restart Gateway
openclaw gateway restart
Step 6: Fill Business Info
User must edit:
shared/decisions/active.md -- strategy, priorities
shared/products/_index.md -- products, keywords, competitors (include code directory paths!)
shared/knowledge/competitor-map.md -- competitor analysis
shared/knowledge/tech-standards.md -- coding standards
Step 7: Trigger Deep Dive Scans
After filling in products with code directories, tell product-lead to trigger Deep Dive scans:
- Product-lead sends scan requests to fullstack-dev via inbox
- Fullstack-dev enters each project directory and generates knowledge files
- Product-lead reviews the generated files for completeness
- All agents now have deep project understanding for informed decisions
Cron Schedule
| Offset |
Agent |
Task |
Frequency |
| H-1 |
Data Analyst |
Data + user feedback |
Daily |
| H-1 |
Intel Analyst |
Competitor scan |
Mon/Wed/Fri |
| H |
Chief of Staff |
Morning brief (announced) |
Daily |
| H+1 |
Growth Lead |
GEO + SEO + community |
Daily |
| H+1 |
Content Chief |
Weekly content plan |
Monday |
| H+10 |
Chief of Staff |
Evening brief (announced) |
Daily |
(H = morning brief hour)
Generated File Structure
<workspace>/
├── AGENTS.md, SOUL.md, USER.md (auto-injected)
├── apply-config.js, create-crons.ps1/.sh, README.md
├── agents/<7 agent dirs>/ (SOUL.md + MEMORY.md + memory/)
└── shared/
├── briefings/, decisions/, inbox/ (v2: with status tracking)
├── status/team-dashboard.md (chief-of-staff maintains, all agents read first)
├── data/ (public data pool, data-analyst writes, all read)
├── kanban/, knowledge/
└── products/
├── _index.md (product matrix overview)
├── _template/ (knowledge directory template)
└── {product}/ (per-product knowledge, up to 20 files)
├── overview.md, architecture.md, database.md, api.md, routes.md
├── models.md, services.md, frontend.md, auth.md, integrations.md
├── jobs-events.md, config-env.md, dependencies.md, devops.md
├── test-coverage.md, tech-debt.md, domain-flows.md, data-flow.md
├── i18n.md, changelog.md, notes.md
Knowledge Governance
Each shared knowledge file has a designated owner. Only the owner agent updates it; others read only.
| File |
Owner |
Update Trigger |
| geo-playbook.md |
growth-lead |
After GEO experiments/discoveries |
| seo-playbook.md |
growth-lead |
After SEO experiments |
| competitor-map.md |
intel-analyst |
After each competitor scan |
| content-guidelines.md |
content-chief |
After proven writing patterns |
| user-personas.md |
data-analyst |
After new user insights |
| tech-standards.md |
product-lead |
After architecture decisions |
Update Protocol
When updating a knowledge file, the owner must:
- Add a dated entry at the top:
## [YYYY-MM-DD] <what changed>
- Include the reason and data evidence
- Never delete existing entries without CEO approval (append, don't replace)
Chief of Staff Governance
The chief-of-staff monitors knowledge file health during weekly reviews:
- Are files being updated regularly?
- Any conflicting information between files?
- Any stale entries that should be archived?
Self-Evolution Pattern
Agents improve their own strategies over time through a feedback loop:
1. Execute task (cron or inbox triggered)
2. Collect results (data, metrics, outcomes)
3. Analyze: what worked vs what didn't
4. Update knowledge files with proven strategies (with evidence)
5. Next execution reads updated knowledge → better performance
This is NOT the agent randomly changing rules. Updates must be:
- Data-driven: backed by metrics or concrete outcomes
- Incremental: append new findings, don't rewrite everything
- Traceable: dated with evidence so others can verify
What Agents Can Self-Update
- Their own knowledge files (per ownership table above)
- Their own MEMORY.md (lessons learned, decisions)
- shared/data/ outputs (data-analyst only)
What Requires CEO Approval
- shared/decisions/active.md (strategy changes)
- Adding/removing agents or changing team architecture
- External publishing or spending decisions
Public Data Layer
The shared/data/ directory serves as a read-only data pool for all agents:
- data-analyst writes: daily metrics, user feedback summaries, anomaly alerts
- All agents read: to inform their own decisions
- Format: structured markdown or JSON, dated filenames (e.g.,
metrics-2026-03-01.md)
- Retention: keep 30 days, archive older files
Project Deep Dive — Code Scanning
Agents can deeply understand each SaaS product through automated code scanning. This is critical — without deep project knowledge, all team decisions are surface-level.
How It Works
- CEO adds a product to
shared/products/_index.md (name, URL, code directory, tech stack)
- Product Lead triggers a Deep Dive scan by messaging Fullstack Dev via inbox
- Fullstack Dev enters the project directory (read-only) and scans the codebase
- Knowledge files are generated in
shared/products/{product}/
- All agents read these files before making product-related decisions
Product Knowledge Directory
Each product gets a knowledge directory with up to 20 files:
shared/products/{product}/
├── overview.md ← Product positioning (from _index.md)
├── architecture.md ← System architecture, tech stack, design patterns, layering
├── database.md ← Full table schema, relationships, indexes, migrations
├── api.md ← API endpoints, params, auth, versioning
├── routes.md ← Complete route table (Web + API + Console)
├── models.md ← ORM relationships, scopes, accessors, observers
├── services.md ← Business logic, state machines, workflows, validation
├── frontend.md ← Component tree, page routing, state management
├── auth.md ← Auth scheme, roles/permissions matrix, OAuth
├── integrations.md ← Third-party: payment/email/SMS/storage/CDN/analytics
├── jobs-events.md ← Queue jobs, event listeners, scheduled tasks, notifications
├── config-env.md ← Environment variables, feature flags, cache strategy
├── dependencies.md ← Key dependencies, custom packages, vulnerabilities
├── devops.md ← Deployment, CI/CD, Docker, monitoring, logging
├── test-coverage.md ← Test strategy, coverage, weak spots
├── tech-debt.md ← TODO/FIXME/HACK inventory, dead code, complexity hotspots
├── domain-flows.md ← Core user journeys, domain boundaries, module coupling
├── data-flow.md ← Data lifecycle: external → import → process → store → output
├── i18n.md ← Internationalization, language coverage
├── changelog.md ← Scan diff log (what changed between scans)
└── notes.md ← Agent discoveries, gotchas, implicit rules
Scan Levels
| Level |
Scope |
When |
Output |
| L0 Snapshot |
Surface: directory tree, packages, env |
First onboard |
architecture, dependencies, config-env |
| L1 Skeleton |
Structure: DB, routes, models, components |
First onboard |
database, routes, api, models, frontend |
| L2 Deep Dive |
Logic: services, auth, jobs, integrations |
On-demand per module |
services, auth, jobs-events, integrations, domain-flows, data-flow |
| L3 Health Check |
Quality: tech debt, tests, security |
Periodic / pre-release |
tech-debt, test-coverage, devops |
| L4 Incremental |
Delta: git diff → update affected files |
After code changes |
changelog + targeted updates |
Content Standards
Knowledge files capture not just WHAT exists but WHY:
- Design decisions: Why this approach was chosen
- Implicit business rules: Logic buried in code (e.g., "orders auto-cancel after 72h")
- Gotchas: What breaks if you touch this module carelessly
- Cross-module coupling: Where changing A silently breaks B
- Performance hotspots: N+1 queries, missing indexes, bottleneck endpoints
Role Responsibilities
| Role |
Responsibility |
| Product Lead |
Governance: trigger scans, review quality, track freshness, ensure completeness |
| Fullstack Dev |
Execution: enter code directory, scan, generate/update knowledge files |
| All Agents |
Consumption: read product knowledge before any product-related decision |
Per-Stack Auto-Detection
Fullstack Dev auto-detects tech stack and applies stack-specific scan strategies:
- Laravel/PHP: migrations, route:list, Models, Services, Middleware, Policies, Jobs, Console/Kernel
- React/Vue: components, router, stores, API client, i18n
- Python/Django/FastAPI: models.py, urls.py, views.py, middleware, celery
- General: tree, git log, grep TODO/FIXME, .env.example, Docker, CI, tests
Team Coordination v2
Inbox Protocol v2 (status tracking)
Every inbox message now has a status field:
pending → received → in-progress → done (or blocked)
- Chief-of-staff monitors timeouts: high>4h, normal>24h pending = intervention
- Blocked >8h = escalation to CEO
- Recipients MUST update status immediately upon reading
Team Dashboard (shared/status/team-dashboard.md)
Chief-of-staff maintains a "live scoreboard" updated every session:
- 🔴 Urgent/Blocked items
- 📊 Per-agent status table (last active, current task, status icon)
- 📬 Unprocessed inbox summary (pending/blocked messages across all inboxes)
- 🔗 Cross-agent task chain tracking (A→B→C with per-step status)
- 📅 Today/Tomorrow focus
All agents read this file first when waking up. 5-second situational awareness.
Chief-of-Staff as Router
The chief is upgraded from "briefing writer" to "active team router":
- Blocker detection: scans all inboxes for overdue messages
- Active dispatch: writes reminders directly to lagging agents' inboxes
- Task chain tracking: identifies multi-agent workflows and tracks each step
- Escalation: persistent blockers get flagged to CEO
- Runs 4x/day (morning brief, midday patrol, afternoon patrol, evening brief)
Cron Schedule (10 jobs, up from 7)
| Time |
Agent |
Type |
Purpose |
| 07:00 |
data-analyst |
daily |
Data pull + feedback scan |
| 08:00 |
chief-of-staff |
announce |
Morning: router scan + brief + quality |
| 09:00 |
growth-lead |
daily |
GEO/SEO/community |
| 09:00 |
product-lead |
daily (NEW) |
Inbox + knowledge governance + task delegation |
| 10:00 |
content-chief |
daily M-F (was weekly) |
Content creation + collaboration |
| 10:00 |
fullstack-dev |
daily (enhanced) |
Inbox + Deep Dive + dev tasks + patrol |
| 12:00 |
chief-of-staff |
patrol (NEW) |
Router scan only, no brief |
| 15:00 |
chief-of-staff |
patrol (NEW) |
Router scan only, no brief |
| 18:00 |
chief-of-staff |
announce |
Evening: router scan + summary + next day plan |
| 07:00 M/W/F |
intel-analyst |
3x/week |
Competitor scan |
Why These Changes Matter
| Before |
After |
Impact |
| Inbox = blind drop |
Inbox with status tracking |
Messages are acknowledged and trackable |
| Chief 2x/day |
Chief 4x/day with router role |
Blockers caught within hours, not days |
| Content-chief 1x/week |
Daily M-F |
Actually produces content |
| Product-lead no cron |
Daily |
Knowledge governance happens |
| No team dashboard |
Dashboard every session |
All agents know the full picture |
| No timeout detection |
Automatic timeout rules |
Nothing falls through cracks |
Key Design Decisions
- Shared workspace so qmd indexes everything for all agents
- Inbox Protocol v2 with status tracking and timeout rules for reliable async communication
- Chief as Router — not just a briefing writer but active coordinator who detects and resolves blockers
- Team Dashboard — single source of truth for team-wide status, maintained by chief every session
- GEO as #1 priority (AI search = blue ocean)
- Fullstack Dev spawns Claude Code via ACP for complex tasks
- Project Deep Dive gives all agents deep codebase understanding, not just surface-level product overviews
Customization
Edit ROLES array in scripts/deploy.js to add/remove agents.
Edit references/soul-templates.md for SOUL.md templates.
Edit references/shared-templates.md for shared file templates.
1---2name: team-builder3description: Deploy a multi-agent SaaS growth team on OpenClaw with shared workspace, async inbox communication, cron-scheduled tasks, deep project code scanning (Deep Dive), and optional Telegram integration. Use when user wants to create an AI agent team, build a multi-agent system, set up a growth/marketing/product team, or deploy agents for a SaaS product matrix. Includes Project Deep Dive capability where fullstack-dev scans codebases to generate comprehensive product knowledge files (DB schema, routes, models, services, auth, integrations, tech debt, etc.) that all agents consume for informed decision-making. Supports customizable team name, agent roles, models, timezone, and Telegram bots.4---56# Team Builder78Deploy a 7-agent SaaS growth team on OpenClaw in one shot.910## System Impact & Prerequisites1112> **Read before running.** This skill creates files and modifies system config.1314### What it creates15- A new workspace directory with ~40 files (agent configs, shared knowledge, inboxes, kanban)16- `apply-config.js` -- script that **modifies `~/.openclaw/openclaw.json`** (adds agents, bindings, agentToAgent config). Auto-backs up before writing.17- `create-crons.ps1` / `create-crons.sh` -- scripts that **create cron jobs** via `openclaw cron add`18- After running these scripts you must **restart the gateway** (`openclaw gateway restart`)1920### What it does NOT do automatically21- Does not modify openclaw.json directly -- you run `apply-config.js` yourself22- Does not create cron jobs directly -- you run the cron script yourself23- Does not restart the gateway -- you do that manually2425### Optional: Telegram26- If you provide bot tokens during setup, `apply-config.js` will also add Telegram account configs and bindings27- Requires: Telegram bot tokens from @BotFather, your Telegram user ID28- Requires: network access to Telegram API (proxy configurable)2930### Optional: ACP / Claude Code31- The fullstack-dev agent is configured to spawn Claude Code via ACP for complex coding tasks32- Requires: ACP-compatible coding agent configured in your OpenClaw environment33- No extra setup needed if you don't use this feature3435### Credentials involved36- **Telegram bot tokens** (optional) -- stored in openclaw.json, used for agent-to-Telegram binding37- **Model API keys** -- must already be configured in your OpenClaw model providers (not handled by this skill)3839### Recommended40- Review generated `apply-config.js` before running41- Check the backup of openclaw.json after running42- Test with 2-3 agents before enabling all cron jobs4344## Team Architecture4546Default 7-agent SaaS growth team (customizable to 2-10 agents):4748```49CEO50 |-- Chief of Staff (dispatch + strategy + efficiency)51 |-- Data Analyst (data + user research)52 |-- Growth Lead (GEO + SEO + community + social media)53 |-- Content Chief (strategy + writing + copywriting + i18n)54 |-- Intel Analyst (competitor monitoring + market trends)55 |-- Product Lead (product management + tech architecture)56 |-- Fullstack Dev (full-stack dev + ops, spawns Claude Code with role-based prompts)57```5859### Multi-Team Support6061One OpenClaw instance can run multiple teams:6263```bash64node <skill-dir>/scripts/deploy.js # default team65node <skill-dir>/scripts/deploy.js --team alpha # named team "alpha"66node <skill-dir>/scripts/deploy.js --team beta # named team "beta"67```6869Named teams use prefixed agent IDs (`alpha-chief-of-staff`, `beta-growth-lead`) to avoid conflicts. Each team gets its own workspace subdirectory.7071### Flexible Team Size7273The wizard lets you select 2-10 agents from the available roles. Skip roles you don't need. The 7-agent default covers most SaaS scenarios, but you can run leaner (3-4 agents) or expand with custom roles.7475### Model Auto-Detection7677The wizard scans your `openclaw.json` for registered model providers and auto-suggests models by role type:7879| Role Type | Best For | Auto-detect Pattern |80|-----------|----------|-------------------|81| Thinking | Strategic roles (chief, growth, content, product) | /glm-5\|opus\|o1\|deepthink/i |82| Execution | Operational roles (data, intel, fullstack) | /glm-4\|sonnet\|gpt-4/i |83| Fast | Lightweight tasks | /flash\|haiku\|mini/i |8485You can always override with manual model IDs.8687## Deployment Flow8889### Step 1: Collect Configuration9091Ask the user for these inputs (use defaults if not provided):9293| Parameter | Default | Description |94|-----------|---------|-------------|95| Team name | Alpha Team | Used in all docs and configs |96| Workspace dir | `~/.openclaw/workspace-team` | Shared workspace root |97| Timezone | Asia/Shanghai | For cron schedules |98| Morning brief hour | 8 | Chief's morning report |99| Evening brief hour | 18 | Chief's evening report |100| Thinking model | zai/glm-5 | For strategic roles |101| Execution model | zai/glm-4.7 | For execution roles |102| CEO title | Boss | How agents address the CEO |103104Optional: Telegram user ID, proxy, and 7 bot tokens.105106### Step 2: Run Deploy Script107108```bash109node <skill-dir>/scripts/deploy.js110```111112Interactive -- asks all questions from Step 1, generates the full workspace.113114### Step 3: Apply Config115116```bash117node <workspace-dir>/apply-config.js118```119120Adds agents to openclaw.json, preserving existing config.121122### Step 4: Create Cron Jobs123124```bash125# Windows126powershell <workspace-dir>/create-crons.ps1127128# Linux/Mac129bash <workspace-dir>/create-crons.sh130```131132### Step 5: Restart Gateway133134```bash135openclaw gateway restart136```137138### Step 6: Fill Business Info139140User must edit:141- `shared/decisions/active.md` -- strategy, priorities142- `shared/products/_index.md` -- products, keywords, competitors (include code directory paths!)143- `shared/knowledge/competitor-map.md` -- competitor analysis144- `shared/knowledge/tech-standards.md` -- coding standards145146### Step 7: Trigger Deep Dive Scans147148After filling in products with code directories, tell product-lead to trigger Deep Dive scans:1491. Product-lead sends scan requests to fullstack-dev via inbox1502. Fullstack-dev enters each project directory and generates knowledge files1513. Product-lead reviews the generated files for completeness1524. All agents now have deep project understanding for informed decisions153154## Cron Schedule155156| Offset | Agent | Task | Frequency |157|--------|-------|------|-----------|158| H-1 | Data Analyst | Data + user feedback | Daily |159| H-1 | Intel Analyst | Competitor scan | Mon/Wed/Fri |160| H | Chief of Staff | Morning brief (announced) | Daily |161| H+1 | Growth Lead | GEO + SEO + community | Daily |162| H+1 | Content Chief | Weekly content plan | Monday |163| H+10 | Chief of Staff | Evening brief (announced) | Daily |164165(H = morning brief hour)166167## Generated File Structure168169```170<workspace>/171├── AGENTS.md, SOUL.md, USER.md (auto-injected)172├── apply-config.js, create-crons.ps1/.sh, README.md173├── agents/<7 agent dirs>/ (SOUL.md + MEMORY.md + memory/)174└── shared/175 ├── briefings/, decisions/, inbox/ (v2: with status tracking)176 ├── status/team-dashboard.md (chief-of-staff maintains, all agents read first)177 ├── data/ (public data pool, data-analyst writes, all read)178 ├── kanban/, knowledge/179 └── products/180 ├── _index.md (product matrix overview)181 ├── _template/ (knowledge directory template)182 └── {product}/ (per-product knowledge, up to 20 files)183 ├── overview.md, architecture.md, database.md, api.md, routes.md184 ├── models.md, services.md, frontend.md, auth.md, integrations.md185 ├── jobs-events.md, config-env.md, dependencies.md, devops.md186 ├── test-coverage.md, tech-debt.md, domain-flows.md, data-flow.md187 ├── i18n.md, changelog.md, notes.md188```189190191192## Knowledge Governance193194Each shared knowledge file has a designated owner. Only the owner agent updates it; others read only.195196| File | Owner | Update Trigger |197|------|-------|---------------|198| geo-playbook.md | growth-lead | After GEO experiments/discoveries |199| seo-playbook.md | growth-lead | After SEO experiments |200| competitor-map.md | intel-analyst | After each competitor scan |201| content-guidelines.md | content-chief | After proven writing patterns |202| user-personas.md | data-analyst | After new user insights |203| tech-standards.md | product-lead | After architecture decisions |204205### Update Protocol206When updating a knowledge file, the owner must:2071. Add a dated entry at the top: `## [YYYY-MM-DD] <what changed>`2082. Include the reason and data evidence2093. Never delete existing entries without CEO approval (append, don't replace)210211### Chief of Staff Governance212The chief-of-staff monitors knowledge file health during weekly reviews:213- Are files being updated regularly?214- Any conflicting information between files?215- Any stale entries that should be archived?216217## Self-Evolution Pattern218219Agents improve their own strategies over time through a feedback loop:220221```2221. Execute task (cron or inbox triggered)2232. Collect results (data, metrics, outcomes)2243. Analyze: what worked vs what didn't2254. Update knowledge files with proven strategies (with evidence)2265. Next execution reads updated knowledge → better performance227```228229This is NOT the agent randomly changing rules. Updates must be:230- **Data-driven**: backed by metrics or concrete outcomes231- **Incremental**: append new findings, don't rewrite everything232- **Traceable**: dated with evidence so others can verify233234### What Agents Can Self-Update235- Their own knowledge files (per ownership table above)236- Their own MEMORY.md (lessons learned, decisions)237- shared/data/ outputs (data-analyst only)238239### What Requires CEO Approval240- shared/decisions/active.md (strategy changes)241- Adding/removing agents or changing team architecture242- External publishing or spending decisions243244## Public Data Layer245246The `shared/data/` directory serves as a read-only data pool for all agents:247248- **data-analyst** writes: daily metrics, user feedback summaries, anomaly alerts249- **All agents** read: to inform their own decisions250- Format: structured markdown or JSON, dated filenames (e.g., `metrics-2026-03-01.md`)251- Retention: keep 30 days, archive older files252253## Project Deep Dive — Code Scanning254255Agents can deeply understand each SaaS product through automated code scanning. This is critical — without deep project knowledge, all team decisions are surface-level.256257### How It Works2582591. CEO adds a product to `shared/products/_index.md` (name, URL, code directory, tech stack)2602. Product Lead triggers a Deep Dive scan by messaging Fullstack Dev via inbox2613. Fullstack Dev enters the project directory (read-only) and scans the codebase2624. Knowledge files are generated in `shared/products/{product}/`2635. All agents read these files before making product-related decisions264265### Product Knowledge Directory266267Each product gets a knowledge directory with up to 20 files:268269```270shared/products/{product}/271├── overview.md ← Product positioning (from _index.md)272├── architecture.md ← System architecture, tech stack, design patterns, layering273├── database.md ← Full table schema, relationships, indexes, migrations274├── api.md ← API endpoints, params, auth, versioning275├── routes.md ← Complete route table (Web + API + Console)276├── models.md ← ORM relationships, scopes, accessors, observers277├── services.md ← Business logic, state machines, workflows, validation278├── frontend.md ← Component tree, page routing, state management279├── auth.md ← Auth scheme, roles/permissions matrix, OAuth280├── integrations.md ← Third-party: payment/email/SMS/storage/CDN/analytics281├── jobs-events.md ← Queue jobs, event listeners, scheduled tasks, notifications282├── config-env.md ← Environment variables, feature flags, cache strategy283├── dependencies.md ← Key dependencies, custom packages, vulnerabilities284├── devops.md ← Deployment, CI/CD, Docker, monitoring, logging285├── test-coverage.md ← Test strategy, coverage, weak spots286├── tech-debt.md ← TODO/FIXME/HACK inventory, dead code, complexity hotspots287├── domain-flows.md ← Core user journeys, domain boundaries, module coupling288├── data-flow.md ← Data lifecycle: external → import → process → store → output289├── i18n.md ← Internationalization, language coverage290├── changelog.md ← Scan diff log (what changed between scans)291└── notes.md ← Agent discoveries, gotchas, implicit rules292```293294### Scan Levels295296| Level | Scope | When | Output |297|-------|-------|------|--------|298| L0 Snapshot | Surface: directory tree, packages, env | First onboard | architecture, dependencies, config-env |299| L1 Skeleton | Structure: DB, routes, models, components | First onboard | database, routes, api, models, frontend |300| L2 Deep Dive | Logic: services, auth, jobs, integrations | On-demand per module | services, auth, jobs-events, integrations, domain-flows, data-flow |301| L3 Health Check | Quality: tech debt, tests, security | Periodic / pre-release | tech-debt, test-coverage, devops |302| L4 Incremental | Delta: git diff → update affected files | After code changes | changelog + targeted updates |303304### Content Standards305306Knowledge files capture not just WHAT exists but WHY:307- **Design decisions**: Why this approach was chosen308- **Implicit business rules**: Logic buried in code (e.g., "orders auto-cancel after 72h")309- **Gotchas**: What breaks if you touch this module carelessly310- **Cross-module coupling**: Where changing A silently breaks B311- **Performance hotspots**: N+1 queries, missing indexes, bottleneck endpoints312313### Role Responsibilities314315| Role | Responsibility |316|------|---------------|317| Product Lead | **Governance**: trigger scans, review quality, track freshness, ensure completeness |318| Fullstack Dev | **Execution**: enter code directory, scan, generate/update knowledge files |319| All Agents | **Consumption**: read product knowledge before any product-related decision |320321### Per-Stack Auto-Detection322323Fullstack Dev auto-detects tech stack and applies stack-specific scan strategies:324- **Laravel/PHP**: migrations, route:list, Models, Services, Middleware, Policies, Jobs, Console/Kernel325- **React/Vue**: components, router, stores, API client, i18n326- **Python/Django/FastAPI**: models.py, urls.py, views.py, middleware, celery327- **General**: tree, git log, grep TODO/FIXME, .env.example, Docker, CI, tests328329## Team Coordination v2330331### Inbox Protocol v2 (status tracking)332333Every inbox message now has a `status` field:334- `pending` → `received` → `in-progress` → `done` (or `blocked`)335- Chief-of-staff monitors timeouts: high>4h, normal>24h pending = intervention336- Blocked >8h = escalation to CEO337- Recipients MUST update status immediately upon reading338339### Team Dashboard (`shared/status/team-dashboard.md`)340341Chief-of-staff maintains a "live scoreboard" updated every session:342- 🔴 Urgent/Blocked items343- 📊 Per-agent status table (last active, current task, status icon)344- 📬 Unprocessed inbox summary (pending/blocked messages across all inboxes)345- 🔗 Cross-agent task chain tracking (A→B→C with per-step status)346- 📅 Today/Tomorrow focus347348**All agents read this file first when waking up.** 5-second situational awareness.349350### Chief-of-Staff as Router351352The chief is upgraded from "briefing writer" to "active team router":353- **Blocker detection**: scans all inboxes for overdue messages354- **Active dispatch**: writes reminders directly to lagging agents' inboxes355- **Task chain tracking**: identifies multi-agent workflows and tracks each step356- **Escalation**: persistent blockers get flagged to CEO357- **Runs 4x/day** (morning brief, midday patrol, afternoon patrol, evening brief)358359### Cron Schedule (10 jobs, up from 7)360361| Time | Agent | Type | Purpose |362|------|-------|------|---------|363| 07:00 | data-analyst | daily | Data pull + feedback scan |364| 08:00 | chief-of-staff | **announce** | Morning: router scan + brief + quality |365| 09:00 | growth-lead | daily | GEO/SEO/community |366| 09:00 | product-lead | **daily (NEW)** | Inbox + knowledge governance + task delegation |367| 10:00 | content-chief | **daily M-F (was weekly)** | Content creation + collaboration |368| 10:00 | fullstack-dev | **daily (enhanced)** | Inbox + Deep Dive + dev tasks + patrol |369| 12:00 | chief-of-staff | **patrol (NEW)** | Router scan only, no brief |370| 15:00 | chief-of-staff | **patrol (NEW)** | Router scan only, no brief |371| 18:00 | chief-of-staff | **announce** | Evening: router scan + summary + next day plan |372| 07:00 M/W/F | intel-analyst | 3x/week | Competitor scan |373374### Why These Changes Matter375376| Before | After | Impact |377|--------|-------|--------|378| Inbox = blind drop | Inbox with status tracking | Messages are acknowledged and trackable |379| Chief 2x/day | Chief 4x/day with router role | Blockers caught within hours, not days |380| Content-chief 1x/week | Daily M-F | Actually produces content |381| Product-lead no cron | Daily | Knowledge governance happens |382| No team dashboard | Dashboard every session | All agents know the full picture |383| No timeout detection | Automatic timeout rules | Nothing falls through cracks |384385## Key Design Decisions386387- **Shared workspace** so qmd indexes everything for all agents388- **Inbox Protocol v2** with status tracking and timeout rules for reliable async communication389- **Chief as Router** — not just a briefing writer but active coordinator who detects and resolves blockers390- **Team Dashboard** — single source of truth for team-wide status, maintained by chief every session391- **GEO as #1 priority** (AI search = blue ocean)392- **Fullstack Dev spawns Claude Code** via ACP for complex tasks393- **Project Deep Dive** gives all agents deep codebase understanding, not just surface-level product overviews394395## Customization396397Edit ROLES array in `scripts/deploy.js` to add/remove agents.398Edit `references/soul-templates.md` for SOUL.md templates.399Edit `references/shared-templates.md` for shared file templates.