agent-team-orchestration-v3-public
Build and run multi-agent content production teams on OpenClaw with single-repo architecture, symlink-based file sharing, role-specialized AGENTS.md, and automated review-fix-score loops. Use when: (1) Setting up a team of 3+ agents with writer/reviewer/scorer/fixer roles for content creation, (2) Creating a quality-controlled publishing pipeline, (3) Bootstrapping agent workspaces with symlinks and tool configs from scratch, (4) Running multi-round review→fix→score cycles until a quality threshold is met, (5) Debugging agent spawn permissions, tool-call loops, or symlink issues. Based on real production experience building a 6-agent content team (2026-03-30).
What this skill does
# Agent Team Orchestration V3 (Public)
Production-proven playbook for building multi-agent content production teams on OpenClaw. Covers architecture, setup, role design, orchestration workflow, and hard-won debugging lessons.
## Architecture in 30 Seconds
**Single-repo + multi-role**. One writer owns the real `OUTPUT/` directory. All other roles (reviewers, scorer, fixer) are lightweight shell workspaces with symlinks pointing to the writer's OUTPUT. The orchestrator (main agent) dispatches work and controls flow — sub-agents never talk to each other.
```
Main Agent (Orchestrator)
├── spawn → Writer → writes to OUTPUT/
├── spawn → Fact-Reviewer ──┐
├── spawn → Style-Reviewer ─┤ read OUTPUT/ via symlinks
├── spawn → Data-Reviewer ──┤
├── spawn → Scorer ─────────┤
└── spawn → Fixer ──────────┘ writes versioned files to OUTPUT/
```
Five axioms:
1. File system = state center (no API, no DB)
2. AGENTS.md = role definition (auto-loaded at spawn)
3. Orchestrator = sole dispatcher (agentToAgent OFF)
4. Score threshold = quality gate (e.g., 8.5/10)
5. TOOLS.md = mandatory guardrails (prevents model tool-call loops)
## Quick Start
### 1. Run the setup script
```bash
# Creates workspaces, symlinks, and TOOLS.md for all roles
scripts/setup-team.sh {writer-id} {fact-reviewer-id} {style-reviewer-id} {data-reviewer-id} {scorer-id} {fixer-id}
```
### 2. Register agents in openclaw.json
Add each agent to `agents.list` and grant spawn permissions to the main agent. The script prints the exact JSON to add.
### 3. Write AGENTS.md for each role
Use the templates in `references/role-templates.md`. The writer gets a comprehensive domain manual (400-600 lines). Reviewers, scorer, and fixer get focused role definitions (100-200 lines each).
### 4. Run the pipeline
```
Spawn writer → wait → parallel spawn reviewers → wait → spawn scorer → read score
→ pass? done. fail? spawn fixer → loop back to reviewers.
```
## Reference Files
| File | Read when... |
|------|-------------|
| [references/architecture.md](references/architecture.md) | Understanding the single-repo design, directory layout, symlink mechanism, and OpenClaw configuration |
| [references/build-guide.md](references/build-guide.md) | Setting up a team from scratch — step-by-step phases from planning to smoke test |
| [references/workflow.md](references/workflow.md) | Running the pipeline — spawn patterns, score parsing, decision gates, batch production, monitoring |
| [references/role-templates.md](references/role-templates.md) | Writing AGENTS.md and TOOLS.md for each role — templates and principles |
| [references/lessons-learned.md](references/lessons-learned.md) | Debugging — k2p5 tool-call loops, spawn permissions, symlink issues, performance benchmarks |
## The Review-Fix Loop
```
[1] Spawn Writer → announce → verify OUTPUT/{project}/
[2] Parallel: Reviewers (fact, style, data) → all announce
[3] Spawn Scorer → announce → parse JSON from score-report.md
[4] total_score >= 8.5 → ✅ notify human
total_score < 8.5 AND round < 3 → Spawn Fixer → back to [2]
total_score < 8.5 AND round >= 3 → ❌ escalate to human
```
See `references/workflow.md` for spawn command patterns and edge case handling.
## Critical Lessons (Save Hours)
**1. TOOLS.md prevents infinite loops**: Some models (k2p5 confirmed) will try to `read` their own AGENTS.md even though it's auto-injected, causing infinite tool-call retries. Adding three lines to TOOLS.md eliminates this completely.
**2. `allowAgents` is required**: The main agent cannot spawn sub-agents without explicit `subagents.allowAgents` in openclaw.json. This is the #1 setup mistake.
**3. Use absolute paths in symlinks**: Relative symlinks break when the working directory changes during agent context switches.
**4. Version filenames explicitly in tasks**: When running round 2, tell the reviewer to read `article-v2.md`, not "the article". Ambiguous paths cause agents to review the old version.
See `references/lessons-learned.md` for full details and performance benchmarks.
## Scripts
| Script | Usage |
|--------|-------|
| `scripts/setup-team.sh` | `./setup-team.sh <writer-id> <role-1> <role-2> ...` — Creates all workspaces, symlinks, and TOOLS.md files |Related in AI Agents
skill-development
IncludedComprehensive meta-skill for creating, managing, validating, auditing, and distributing Claude Code skills and slash commands (unified in v2.1.3+). Provides skill templates, creation workflows, validation patterns, audit checklists, naming conventions, YAML frontmatter guidance, progressive disclosure examples, and best practices lookup. Use when creating new skills, validating existing skills, auditing skill quality, understanding skill architecture, needing skill templates, learning about YAML frontmatter requirements, progressive disclosure patterns, tool restrictions (allowed-tools), skill composition, skill naming conventions, troubleshooting skill activation issues, creating custom slash commands, configuring command frontmatter, using command arguments ($ARGUMENTS, $1, $2), bash execution in commands, file references in commands, command namespacing, plugin commands, MCP slash commands, Skill tool configuration, or deciding between skills vs slash commands. Delegates to docs-management skill for official documentation.
reprompter
IncludedTransform messy prompts into well-structured, effective prompts — single or multi-agent. Use when: "reprompt", "reprompt this", "clean up this prompt", "structure my prompt", rough text needing XML tags and best practices, "reprompter teams", "repromptception", "run with quality", "smart run", "smart agents", multi-agent tasks, audits, parallel work, anything going to agent teams. Don't use when: simple Q&A, pure chat, immediate execution-only tasks. See "Don't Use When" section for details. Outputs: Structured XML/Markdown prompt, quality score (before/after), optional team brief + per-agent sub-prompts, agent team output files. Success criteria: Single mode quality score ≥ 7/10; Repromptception per-agent prompt quality score 8+/10; all required sections present, actionable and specific.
adaptive-compaction
IncludedAdaptive add-on policy and recovery layer that decides WHEN to compact, prune, snapshot, or fork -- replacing fixed-percent auto-compaction across Claude Code, Codex, and MCP-capable hosts. Trigger on auto-compact timing or damage: "when should I compact", "is it safe to compact now or start a fresh session", "auto-compact fires too early/mid-task", "switching to an unrelated task but the window still has space", "context rot", "answers get worse the longer the session runs", "the agent forgot the plan or my decisions after it summarized", "add a layer on top that manages context without changing the agent", raising autoCompactWindow to give the policy room, or installing/tuning a cross-tool compaction policy or PreCompact hook -- even when "compaction" is never said but the problem is context-window pressure or post-summarization memory loss. Do NOT use to summarize a conversation, build RAG, write a summarization prompt (decides WHEN not HOW), or answer max-context-length trivia.
agent-skill-creator
IncludedCreate cross-platform agent skills from workflow descriptions. Activates when users ask to create an agent, automate a repetitive workflow, create a custom skill, or need advanced agent creation. Triggers on phrases like create agent for, automate workflow, create skill for, every day I have to, daily I need to, turn process into agent, need to automate, create a cross-platform skill, validate this skill, export this skill, migrate this skill. Supports single skills, multi-agent suites, transcript processing, template-based creation, interactive configuration, cross-platform export, and spec validation.
llm-wiki
IncludedUse when building or maintaining a persistent personal knowledge base (second brain) in Obsidian where an LLM incrementally ingests sources, updates entity/concept pages, maintains cross-references, and keeps a synthesis current. Triggers include "second brain", "Obsidian wiki", "personal knowledge management", "ingest this paper/article/book", "build a research wiki", "compound knowledge", "Memex", or whenever the user wants knowledge to accumulate across sessions instead of being re-derived by RAG on every query.
skill-master
IncludedAgent Skills authoring, evaluation, and optimization. Create, edit, validate, benchmark, and improve skills following the agentskills.io specification. Use when designing SKILL.md files, structuring skill folders (references, scripts, assets), ingesting external documentation into skills, running trigger evals, benchmarking skill quality, optimizing descriptions, or performing blind A/B comparisons. Keywords: agentskills.io, SKILL.md, skill authoring, eval, benchmark, trigger optimization.