[{"data":1,"prerenderedAt":-1},["ShallowReactive",2],{"skill:01M7710HJ3864BVCY73PYA4XJM":3,"skill-same:01M7710HJ3864BVCY73PYA4XJM":46},{"skillNo":4,"name":5,"nameZh":6,"description":6,"descriptionZh":6,"repositoryFullName":7,"ownerLogin":8,"ownerAvatarUrl":9,"ownerAccountNo":10,"ownerDisplayName":11,"repositoryNo":12,"starsCount":13,"licenseSpdxId":14,"licenseFileUrl":6,"sourceHtmlUrl":15,"categories":16,"keywords":17,"publishedAt":18,"linkOnly":19,"markdownContent":20,"markdownBody":21,"frontMatter":22,"refName":23,"commitSha":24,"skillDirectory":25,"forksCount":26,"repositoryHtmlUrl":27,"repositoryHomepageUrl":28,"ownerHtmlUrl":29,"ownerBlogUrl":6,"ownerDescription":30,"updatedAt":31,"install":32,"resources":45},"01M7710HJ3864BVCY73PYA4XJM","caid-multi-agent",null,"Lord1Egypt\u002Fawesome-skill-forge","Lord1Egypt","https:\u002F\u002Favatars.githubusercontent.com\u002Fu\u002F99746359?v=4","01M7592YDNT0XK9WJ0T2MQVPDN","Mohamed Mounir Ali AL Keshita","01M75GRFNHC8VZNWEB8DKDE433",3,"MIT","https:\u002F\u002Fgithub.com\u002FLord1Egypt\u002Fawesome-skill-forge\u002Fblob\u002Fmaster\u002Fcommunity\u002Fclawhub\u002Fc\u002Fcaid-multi-agent\u002FSKILL.md",[],[],"2026-11-12 13:55:43",false,"---\nname: caid-multi-agent\ndescription: Coordinate multiple sub-agents to collaboratively complete long-horizon software engineering tasks using the CAID (Centralized Asynchronous Isolated Delegation) paradigm. Use when tasks require complex multi-file edits, interdependent subtasks, parallelizable work, or when a single agent would take too long. This skill implements branch-and-merge coordination with git worktree isolation, dependency-aware task delegation, and structured integration. CRITICAL: Never use CAID as a fallback after single-agent failure; use from the outset. Max 2-4 engineers (8 absolute max). Physical git worktree isolation is mandatory; soft isolation degrades performance.\n---\n\n# CAID Multi-Agent Coordination\n\nThis skill implements the **Centralized Asynchronous Isolated Delegation (CAID)** paradigm for coordinating multiple agents working on shared artifacts.\n\n> ⚠️ **CRITICAL WARNINGS FROM PAPER:**\n> - **Use CAID from the outset** — Don't run single-agent first as fallback. Sequential strategy costs nearly 2x with minimal gain.\n> - **Physical worktree isolation is mandatory** — Soft isolation (instruction-only) degrades performance on complex tasks.\n> - **Engineer limits are strict** — 2 for PaperBench-style, 4 for Commit0-style, never exceed 8.\n> - **Higher cost\u002Fruntime trade-off** — CAID improves accuracy, not speed. Integration is sequential\u002Ftest-gated.\n\n## Core Principles\n\n1. **Centralized Task Delegation** — A manager agent decomposes tasks into dependency-aware units\n2. **Asynchronous Execution** — Multiple engineer agents work concurrently\n3. **Isolated Workspaces** — Each agent works in its own isolated branch\u002Fworktree\n4. **Structured Integration** — Progress is merged via git commit\u002Fmerge with test verification\n\n## When to Use This Skill\n\n**Use CAID from the outset for:**\n- Long-horizon tasks with multiple interdependent files\n- Clear dependency structure (imports, test mappings)\n- Parallelizable work exists\n- Integration can be verified by executable tests\n\n**Don't use as fallback:** Running single-agent first then CAID is inefficient (cost\u002Fruntime nearly additive, minimal performance gain).\n\n**Use single-agent for:**\n- Isolated, single-file changes\n- No clear parallelization opportunities\n- Exploratory\u002Fresearch-oriented tasks\n\n## Coordination Workflow\n\n### 0. Manager Pre-Setup (CRITICAL)\n\n**Before ANY delegation, the manager must:**\n\n1. **Prepare runtime environment**\n   - Ensure dependencies installed\n   - Set up virtual environment\n\n2. **Organize entry points**\n   - Create main entry files\n   - Ensure import paths work\n\n3. **Add minimal function stubs**\n   - Empty function definitions so imports don't fail\n   - Type signatures if available\n\n4. **Commit to main branch**\n   - All engineer branches created from consistent base\n   - Without this, engineers start from divergent states\n\n```bash\n# Pre-setup commit\ngit add .\ngit commit -m \"setup: initial stubs and entry points\"\ngit push origin main\n```\n\n### 1. Task Analysis & Dependency Graph Creation\n\n**Manager's role:** Before delegating, analyze the task structure:\n\n- Identify atomic units of work (files, functions, modules)\n- Build a dependency graph: G=(V,E) where edges indicate dependencies\n- Define Ready(v) ⇔ all dependencies of v are completed\n- Only delegate tasks that are Ready (all dependencies satisfied)\n\n**Commit0-style tasks (clear file structure):**\n1. Check import statements to identify file-level dependencies\n2. Collect executable test cases from repository\n3. Examine which files tests exercise\n4. Identify components to implement earlier (upstream dependencies)\n5. **Delegate at file level first** — only split to function level if file has many unimplemented functions\n\n**PaperBench-style tasks (inferred structure):**\n1. Read paper to identify main contribution\n2. Infer implementation order from contribution\n3. **Use max 2 engineers** — manager task is harder, more agents destabilize\n\n**Dependency graph construction:**\n```\nReady_t(v_j) ⇔ ∀(v_i, v_j) ∈ E, v_i ∈ Completed_t\n\nOnly delegate tasks from {v ∈ V | Ready_t(v)}\n```\n\n### 2. Workspace Isolation Setup\n\n**Create PHYSICALLY isolated worktrees (not soft isolation):**\n\n```bash\n# Main branch is the single source of truth\ngit worktree add ..\u002Fworkspace-engineer-1 \u003Cbranch-name-1>\ngit worktree add ..\u002Fworkspace-engineer-2 \u003Cbranch-name-2>\n# etc.\n```\n\n> ⚠️ **WARNING:** Soft isolation (same workspace, instruction-level constraints) degrades performance to below single-agent on PaperBench. Physical `git worktree` isolation is **mandatory**.\n\n**Key isolation principles:**\n- Each engineer operates in its own git worktree (physical filesystem isolation)\n- All worktrees are derived from the main branch\n- Engineers modify files only within their assigned workspace\n- **Restricted files** (shared across engineers): `__init__.py`, config files, global constants — engineers must NOT commit changes to these\n\n### 3. Dependency-Aware Task Delegation\n\n**STRICT Engineer Limits:**\n| Task Type | Max Engineers | Why |\n|-----------|--------------|-----|\n| PaperBench-style | 2 | Inferred dependencies; more destabilizes |\n| Commit0-style | 4 | Clear file structure; test-guided |\n| General SWE | 2-4 | Balance parallelism vs integration overhead |\n| Absolute max | 8 | Beyond this, coordination tax exceeds gains |\n\n> ⚠️ **Critical:** Increasing engineers beyond optimal degrades performance due to integration overhead and conflict resolution costs.\n\n**Task prioritization heuristics:**\nManager should prioritize tasks that:\n1. **Enable earlier test execution** (expose evaluation signals sooner)\n2. **Lie closer to upstream** of dependency chain\n3. **Are simpler functions** before complex ones\n\n**Round definition:**\n> One round = complete cycle of **delegation → implementation → dependency update**\n\n**Recommended iteration limits (from paper experiments):**\n| Role | Max Iterations |\n|------|---------------|\n| Manager | 50 |\n| Each Engineer | 80 |\n| Total Rounds | ~22 (varies by task) |\n\n**Delegation algorithm:**\n\n```\nAt round t:\n1. Ready_Set = {v ∈ V | Ready_t(v)}  \u002F\u002F all dependencies satisfied\n2. Select up to N tasks from Ready_Set (N = max parallel engineers above)\n3. Apply prioritization heuristics\n4. Delegate to available engineers\n5. Wait for completion signals\n6. Update dependency state after each successful integration\n```\n\n**Task assignment JSON format (structured communication — NO free-form dialog):**\n\n```json\n{\n  \"task_id\": \"string\",\n  \"task_description\": \"string\",\n  \"target_files\": [\"path\u002Fto\u002Ffile.py\"],\n  \"target_functions\": [\"function_name\"],\n  \"dependencies\": [\"task_id_1\", \"task_id_2\"],\n  \"expected_outcome\": \"description of success criteria\",\n  \"verification_command\": \"pytest tests\u002Ftest_file.py -v\",\n  \"restricted_files\": [\"src\u002F__init__.py\", \"src\u002Fconfig.py\"],\n  \"priority\": \"high|medium|low\"\n}\n```\n\n> **Key:** All communication uses structured JSON, not free-form dialog. This prevents inter-agent misalignment (primary failure mode in multi-agent systems).\n\n### 4. Asynchronous Execution Loop\n\n**Event loop pattern:**\n\n1. **Delegate** → Manager assigns tasks to available engineers\n2. **Execute** → Engineers work concurrently in isolated worktrees\n3. **Self-Verify** → Engineer runs tests, fixes failures\n4. **Complete** → Engineer submits commit when ALL tests pass\n5. **Integrate** → Manager attempts merge to main\n6. **Conflict Resolution** (if needed) → Responsible engineer resolves\n7. **Update** → Manager updates dependency graph\n8. **Repeat** → Continue until all tasks complete or limits reached\n\n**Engineer self-verification (MANDATORY before submission):**\n- Run relevant tests that import\u002Freference modified files\n- If no explicit mapping, run repository's default test command\n- Any failed test or runtime exception MUST be resolved\n- Use concrete error logs and tracebacks for iterative refinement\n- **Only submit commit after ALL tests pass**\n\n### 5. Integration via Merge\n\n**Merge workflow:**\n\n```bash\n# Manager attempts merge\ngit checkout main\ngit merge \u003Cengineer-branch>\n\n# If conflict:\n# 1. Engineer who produced conflicting commit is RESPONSIBLE for resolution\n# 2. Engineer pulls latest main: git pull origin main\n# 3. Resolves conflicts locally\n# 4. Re-runs tests to ensure resolution didn't break anything\n# 5. Resubmits commit\n# 6. Manager retries merge\n```\n\n**Main branch is single source of truth** throughout execution.\n\n### 6. Context Management for Manager\n\nTo prevent context explosion, manager uses **LLMSummarizingCondenser** pattern:\n\n```\nPeriodically:\n1. Summarize prior interaction rounds\n2. Preserve structured artifacts:\n   - Dependency graph (current state)\n   - Completed tasks (with commit hashes)\n   - Unresolved errors (with traceback summaries)\n3. Discard detailed conversation history\n4. Maintain execution traceability without bloat\n```\n\n**Compressed execution history format:**\n```json\n{\n  \"round\": 5,\n  \"completed\": [\"task-1\", \"task-2\", \"task-3\"],\n  \"ready\": [\"task-4\", \"task-5\"],\n  \"blocked\": [\"task-6: waiting for task-5\"],\n  \"active_engineers\": 2,\n  \"main_branch_commits\": [\"abc123\", \"def456\"],\n  \"unresolved_errors\": []\n}\n```\n\n### 7. Worktree Synchronization & Cleanup\n\n**State synchronization when main advances:**\n\n```bash\n# Engineer syncs to latest integrated state\ncd ..\u002Fworkspace-engineer-1\ngit fetch origin\ngit reset --hard origin\u002Fmain  # Sync worktree to latest main\n```\n\n**Worktree cleanup (after completion or limit reached):**\n\n```bash\n# Remove worktree when engineer finishes or hits iteration limit\ngit worktree remove ..\u002Fworkspace-engineer-1\nrm -rf ..\u002Fworkspace-engineer-1  # Clean up directory\n```\n\n> Worktrees are deleted after all assigned tasks are completed or when the engineer reaches the predefined iteration limit.\n\n### 8. Termination Conditions\n\n- **Success:** All units completed and integrated into main\n- **Failure:** Maximum rounds\u002Fiterations reached with unresolved tasks\n- **Incomplete:** Task considered incomplete if any units remain unresolved\n\n**Manager iteration limits (from paper):**\n- Manager: `max_iterations=50`\n- Each engineer: `max_iterations=80`\n- Total rounds: ~22 (varies by task)\n\n### 9. Manager Final Review\n\n> **After the asynchronous loop completes, the manager does a final review before submitting the final product.**\n\n**Final review checklist:**\n1. Verify all tasks from dependency graph are completed\n2. Run full test suite: `pytest tests\u002F -v`\n3. Check integration completeness (all commits merged)\n4. Review any unresolved errors or warnings\n5. Validate final state matches expected outcome\n6. Submit final product only after verification\n\n```bash\n# Manager final verification\ngit checkout main\npytest tests\u002F -v                    # Full test suite\npython -m mypackage --version       # Smoke test\n# Review any integration gaps\n```\n\n## Implementation Guidelines\n\n### Using OpenClaw Sub-agents\n\nFor OpenClaw, the `sessions_spawn` tool enables parallel agent execution:\n\n**Spawn engineer agents:**\n\n```javascript\n\u002F\u002F For each task in Ready_Set, spawn an engineer\n{\n  \"runtime\": \"subagent\",\n  \"task\": \"\u003Ctask specification with context>\",\n  \"agentId\": \"\u003Cengineer-agent-id>\",\n  \"mode\": \"run\",\n  \"runTimeoutSeconds\": 300\n}\n```\n\n**Check progress:**\n\n```javascript\n\u002F\u002F Poll for completion\n{\n  \"action\": \"list\"\n}\n```\n\n### Worktree Synchronization\n\n**When main advances, update worktrees:**\n\n```bash\n# Engineer pulls latest main before continuing\ncd ..\u002Fworkspace-engineer-1\ngit fetch origin\ngit reset --hard origin\u002Fmain  # Or rebase\n```\n\nThis ensures engineers work from latest integrated state.\n\n### Verification Intensity vs Efficiency Trade-off\n\nFrom paper analysis (Section 4.4):\n\n| Strategy | Pass Rate | Runtime | When to Use |\n|----------|-----------|---------|-------------|\n| Round-Manager Review | 60.2% | 3689s | Maximum correctness required |\n| Engineer Self-Verification | 55.1% | 2244s | **Default - balanced** |\n| Efficiency-Prioritized | 54.0% | 1909s | Time-critical, acceptable risk |\n\n**Default:** Engineer self-verification without repeated manager review.\n\n## Common Pitfalls & Solutions\n\n| Pitfall | Solution |\n|---------|----------|\n| Using CAID as fallback after single-agent fails | Use from outset; sequential costs ~2x with minimal gain |\n| Soft isolation (instruction-only) | Mandatory `git worktree` physical isolation |\n| Too many engineers (>4-8) | Strict limits: 2 PaperBench, 4 Commit0, 8 absolute max |\n| Skipping manager pre-setup | Always prepare runtime\u002Fstubs\u002Fentry points first |\n| Skipping manager final review | Always do final verification before submission |\n| Merge conflicts from concurrent edits | Group dependent files; engineer resolves own conflicts |\n| Not cleaning up worktrees | Delete worktrees after completion\u002Flimit reached |\n| Agents develop inconsistent views | Structured JSON only; no free-form dialog |\n| Silent interference between agents | Explicit merge with test verification |\n| Tasks not clearly defined | Build dependency graph before ANY delegation |\n| Integration failures discovered late | Self-verification mandatory before commit |\n| Context explosion | Use LLMSummarizingCondenser pattern |\n| Missing restricted files | Mark `__init__.py`, configs as restricted |\n\n## Cost\u002FRuntime Expectations\n\n**CAID trade-offs (vs single-agent):**\n- **Higher API cost** — Multiple agents = more LLM calls\n- **Similar or longer wall-clock time** — Integration is sequential\u002Ftest-gated\n- **Substantially higher accuracy** — +26.7% PaperBench, +14.3% Commit0\n\n**When worth it:** Long-horizon shared-artifact tasks where correctness matters more than speed.\n\n## Example Workflows\n\nSee [references\u002Fexamples.md](references\u002Fexamples.md) for concrete implementation examples including:\n- Commit0-style library implementation\n- PaperBench-style paper reproduction\n- Bug fixing (single-file vs multi-file)\n- Feature addition with API and frontend\n\n## References\n\n- Paper: \"Effective Strategies for Asynchronous Software Engineering Agents\" (arXiv:2603.21489v1)\n- GitHub: https:\u002F\u002Fgithub.com\u002FJiayiGeng\u002Fasync-swe-agents\n- Built on OpenHands agent SDK principles","# CAID Multi-Agent Coordination\n\nThis skill implements the **Centralized Asynchronous Isolated Delegation (CAID)** paradigm for coordinating multiple agents working on shared artifacts.\n\n> ⚠️ **CRITICAL WARNINGS FROM PAPER:**\n> - **Use CAID from the outset** — Don't run single-agent first as fallback. Sequential strategy costs nearly 2x with minimal gain.\n> - **Physical worktree isolation is mandatory** — Soft isolation (instruction-only) degrades performance on complex tasks.\n> - **Engineer limits are strict** — 2 for PaperBench-style, 4 for Commit0-style, never exceed 8.\n> - **Higher cost\u002Fruntime trade-off** — CAID improves accuracy, not speed. Integration is sequential\u002Ftest-gated.\n\n## Core Principles\n\n1. **Centralized Task Delegation** — A manager agent decomposes tasks into dependency-aware units\n2. **Asynchronous Execution** — Multiple engineer agents work concurrently\n3. **Isolated Workspaces** — Each agent works in its own isolated branch\u002Fworktree\n4. **Structured Integration** — Progress is merged via git commit\u002Fmerge with test verification\n\n## When to Use This Skill\n\n**Use CAID from the outset for:**\n- Long-horizon tasks with multiple interdependent files\n- Clear dependency structure (imports, test mappings)\n- Parallelizable work exists\n- Integration can be verified by executable tests\n\n**Don't use as fallback:** Running single-agent first then CAID is inefficient (cost\u002Fruntime nearly additive, minimal performance gain).\n\n**Use single-agent for:**\n- Isolated, single-file changes\n- No clear parallelization opportunities\n- Exploratory\u002Fresearch-oriented tasks\n\n## Coordination Workflow\n\n### 0. Manager Pre-Setup (CRITICAL)\n\n**Before ANY delegation, the manager must:**\n\n1. **Prepare runtime environment**\n   - Ensure dependencies installed\n   - Set up virtual environment\n\n2. **Organize entry points**\n   - Create main entry files\n   - Ensure import paths work\n\n3. **Add minimal function stubs**\n   - Empty function definitions so imports don't fail\n   - Type signatures if available\n\n4. **Commit to main branch**\n   - All engineer branches created from consistent base\n   - Without this, engineers start from divergent states\n\n```bash\n# Pre-setup commit\ngit add .\ngit commit -m \"setup: initial stubs and entry points\"\ngit push origin main\n```\n\n### 1. Task Analysis & Dependency Graph Creation\n\n**Manager's role:** Before delegating, analyze the task structure:\n\n- Identify atomic units of work (files, functions, modules)\n- Build a dependency graph: G=(V,E) where edges indicate dependencies\n- Define Ready(v) ⇔ all dependencies of v are completed\n- Only delegate tasks that are Ready (all dependencies satisfied)\n\n**Commit0-style tasks (clear file structure):**\n1. Check import statements to identify file-level dependencies\n2. Collect executable test cases from repository\n3. Examine which files tests exercise\n4. Identify components to implement earlier (upstream dependencies)\n5. **Delegate at file level first** — only split to function level if file has many unimplemented functions\n\n**PaperBench-style tasks (inferred structure):**\n1. Read paper to identify main contribution\n2. Infer implementation order from contribution\n3. **Use max 2 engineers** — manager task is harder, more agents destabilize\n\n**Dependency graph construction:**\n```\nReady_t(v_j) ⇔ ∀(v_i, v_j) ∈ E, v_i ∈ Completed_t\n\nOnly delegate tasks from {v ∈ V | Ready_t(v)}\n```\n\n### 2. Workspace Isolation Setup\n\n**Create PHYSICALLY isolated worktrees (not soft isolation):**\n\n```bash\n# Main branch is the single source of truth\ngit worktree add ..\u002Fworkspace-engineer-1 \u003Cbranch-name-1>\ngit worktree add ..\u002Fworkspace-engineer-2 \u003Cbranch-name-2>\n# etc.\n```\n\n> ⚠️ **WARNING:** Soft isolation (same workspace, instruction-level constraints) degrades performance to below single-agent on PaperBench. Physical `git worktree` isolation is **mandatory**.\n\n**Key isolation principles:**\n- Each engineer operates in its own git worktree (physical filesystem isolation)\n- All worktrees are derived from the main branch\n- Engineers modify files only within their assigned workspace\n- **Restricted files** (shared across engineers): `__init__.py`, config files, global constants — engineers must NOT commit changes to these\n\n### 3. Dependency-Aware Task Delegation\n\n**STRICT Engineer Limits:**\n| Task Type | Max Engineers | Why |\n|-----------|--------------|-----|\n| PaperBench-style | 2 | Inferred dependencies; more destabilizes |\n| Commit0-style | 4 | Clear file structure; test-guided |\n| General SWE | 2-4 | Balance parallelism vs integration overhead |\n| Absolute max | 8 | Beyond this, coordination tax exceeds gains |\n\n> ⚠️ **Critical:** Increasing engineers beyond optimal degrades performance due to integration overhead and conflict resolution costs.\n\n**Task prioritization heuristics:**\nManager should prioritize tasks that:\n1. **Enable earlier test execution** (expose evaluation signals sooner)\n2. **Lie closer to upstream** of dependency chain\n3. **Are simpler functions** before complex ones\n\n**Round definition:**\n> One round = complete cycle of **delegation → implementation → dependency update**\n\n**Recommended iteration limits (from paper experiments):**\n| Role | Max Iterations |\n|------|---------------|\n| Manager | 50 |\n| Each Engineer | 80 |\n| Total Rounds | ~22 (varies by task) |\n\n**Delegation algorithm:**\n\n```\nAt round t:\n1. Ready_Set = {v ∈ V | Ready_t(v)}  \u002F\u002F all dependencies satisfied\n2. Select up to N tasks from Ready_Set (N = max parallel engineers above)\n3. Apply prioritization heuristics\n4. Delegate to available engineers\n5. Wait for completion signals\n6. Update dependency state after each successful integration\n```\n\n**Task assignment JSON format (structured communication — NO free-form dialog):**\n\n```json\n{\n  \"task_id\": \"string\",\n  \"task_description\": \"string\",\n  \"target_files\": [\"path\u002Fto\u002Ffile.py\"],\n  \"target_functions\": [\"function_name\"],\n  \"dependencies\": [\"task_id_1\", \"task_id_2\"],\n  \"expected_outcome\": \"description of success criteria\",\n  \"verification_command\": \"pytest tests\u002Ftest_file.py -v\",\n  \"restricted_files\": [\"src\u002F__init__.py\", \"src\u002Fconfig.py\"],\n  \"priority\": \"high|medium|low\"\n}\n```\n\n> **Key:** All communication uses structured JSON, not free-form dialog. This prevents inter-agent misalignment (primary failure mode in multi-agent systems).\n\n### 4. Asynchronous Execution Loop\n\n**Event loop pattern:**\n\n1. **Delegate** → Manager assigns tasks to available engineers\n2. **Execute** → Engineers work concurrently in isolated worktrees\n3. **Self-Verify** → Engineer runs tests, fixes failures\n4. **Complete** → Engineer submits commit when ALL tests pass\n5. **Integrate** → Manager attempts merge to main\n6. **Conflict Resolution** (if needed) → Responsible engineer resolves\n7. **Update** → Manager updates dependency graph\n8. **Repeat** → Continue until all tasks complete or limits reached\n\n**Engineer self-verification (MANDATORY before submission):**\n- Run relevant tests that import\u002Freference modified files\n- If no explicit mapping, run repository's default test command\n- Any failed test or runtime exception MUST be resolved\n- Use concrete error logs and tracebacks for iterative refinement\n- **Only submit commit after ALL tests pass**\n\n### 5. Integration via Merge\n\n**Merge workflow:**\n\n```bash\n# Manager attempts merge\ngit checkout main\ngit merge \u003Cengineer-branch>\n\n# If conflict:\n# 1. Engineer who produced conflicting commit is RESPONSIBLE for resolution\n# 2. Engineer pulls latest main: git pull origin main\n# 3. Resolves conflicts locally\n# 4. Re-runs tests to ensure resolution didn't break anything\n# 5. Resubmits commit\n# 6. Manager retries merge\n```\n\n**Main branch is single source of truth** throughout execution.\n\n### 6. Context Management for Manager\n\nTo prevent context explosion, manager uses **LLMSummarizingCondenser** pattern:\n\n```\nPeriodically:\n1. Summarize prior interaction rounds\n2. Preserve structured artifacts:\n   - Dependency graph (current state)\n   - Completed tasks (with commit hashes)\n   - Unresolved errors (with traceback summaries)\n3. Discard detailed conversation history\n4. Maintain execution traceability without bloat\n```\n\n**Compressed execution history format:**\n```json\n{\n  \"round\": 5,\n  \"completed\": [\"task-1\", \"task-2\", \"task-3\"],\n  \"ready\": [\"task-4\", \"task-5\"],\n  \"blocked\": [\"task-6: waiting for task-5\"],\n  \"active_engineers\": 2,\n  \"main_branch_commits\": [\"abc123\", \"def456\"],\n  \"unresolved_errors\": []\n}\n```\n\n### 7. Worktree Synchronization & Cleanup\n\n**State synchronization when main advances:**\n\n```bash\n# Engineer syncs to latest integrated state\ncd ..\u002Fworkspace-engineer-1\ngit fetch origin\ngit reset --hard origin\u002Fmain  # Sync worktree to latest main\n```\n\n**Worktree cleanup (after completion or limit reached):**\n\n```bash\n# Remove worktree when engineer finishes or hits iteration limit\ngit worktree remove ..\u002Fworkspace-engineer-1\nrm -rf ..\u002Fworkspace-engineer-1  # Clean up directory\n```\n\n> Worktrees are deleted after all assigned tasks are completed or when the engineer reaches the predefined iteration limit.\n\n### 8. Termination Conditions\n\n- **Success:** All units completed and integrated into main\n- **Failure:** Maximum rounds\u002Fiterations reached with unresolved tasks\n- **Incomplete:** Task considered incomplete if any units remain unresolved\n\n**Manager iteration limits (from paper):**\n- Manager: `max_iterations=50`\n- Each engineer: `max_iterations=80`\n- Total rounds: ~22 (varies by task)\n\n### 9. Manager Final Review\n\n> **After the asynchronous loop completes, the manager does a final review before submitting the final product.**\n\n**Final review checklist:**\n1. Verify all tasks from dependency graph are completed\n2. Run full test suite: `pytest tests\u002F -v`\n3. Check integration completeness (all commits merged)\n4. Review any unresolved errors or warnings\n5. Validate final state matches expected outcome\n6. Submit final product only after verification\n\n```bash\n# Manager final verification\ngit checkout main\npytest tests\u002F -v                    # Full test suite\npython -m mypackage --version       # Smoke test\n# Review any integration gaps\n```\n\n## Implementation Guidelines\n\n### Using OpenClaw Sub-agents\n\nFor OpenClaw, the `sessions_spawn` tool enables parallel agent execution:\n\n**Spawn engineer agents:**\n\n```javascript\n\u002F\u002F For each task in Ready_Set, spawn an engineer\n{\n  \"runtime\": \"subagent\",\n  \"task\": \"\u003Ctask specification with context>\",\n  \"agentId\": \"\u003Cengineer-agent-id>\",\n  \"mode\": \"run\",\n  \"runTimeoutSeconds\": 300\n}\n```\n\n**Check progress:**\n\n```javascript\n\u002F\u002F Poll for completion\n{\n  \"action\": \"list\"\n}\n```\n\n### Worktree Synchronization\n\n**When main advances, update worktrees:**\n\n```bash\n# Engineer pulls latest main before continuing\ncd ..\u002Fworkspace-engineer-1\ngit fetch origin\ngit reset --hard origin\u002Fmain  # Or rebase\n```\n\nThis ensures engineers work from latest integrated state.\n\n### Verification Intensity vs Efficiency Trade-off\n\nFrom paper analysis (Section 4.4):\n\n| Strategy | Pass Rate | Runtime | When to Use |\n|----------|-----------|---------|-------------|\n| Round-Manager Review | 60.2% | 3689s | Maximum correctness required |\n| Engineer Self-Verification | 55.1% | 2244s | **Default - balanced** |\n| Efficiency-Prioritized | 54.0% | 1909s | Time-critical, acceptable risk |\n\n**Default:** Engineer self-verification without repeated manager review.\n\n## Common Pitfalls & Solutions\n\n| Pitfall | Solution |\n|---------|----------|\n| Using CAID as fallback after single-agent fails | Use from outset; sequential costs ~2x with minimal gain |\n| Soft isolation (instruction-only) | Mandatory `git worktree` physical isolation |\n| Too many engineers (>4-8) | Strict limits: 2 PaperBench, 4 Commit0, 8 absolute max |\n| Skipping manager pre-setup | Always prepare runtime\u002Fstubs\u002Fentry points first |\n| Skipping manager final review | Always do final verification before submission |\n| Merge conflicts from concurrent edits | Group dependent files; engineer resolves own conflicts |\n| Not cleaning up worktrees | Delete worktrees after completion\u002Flimit reached |\n| Agents develop inconsistent views | Structured JSON only; no free-form dialog |\n| Silent interference between agents | Explicit merge with test verification |\n| Tasks not clearly defined | Build dependency graph before ANY delegation |\n| Integration failures discovered late | Self-verification mandatory before commit |\n| Context explosion | Use LLMSummarizingCondenser pattern |\n| Missing restricted files | Mark `__init__.py`, configs as restricted |\n\n## Cost\u002FRuntime Expectations\n\n**CAID trade-offs (vs single-agent):**\n- **Higher API cost** — Multiple agents = more LLM calls\n- **Similar or longer wall-clock time** — Integration is sequential\u002Ftest-gated\n- **Substantially higher accuracy** — +26.7% PaperBench, +14.3% Commit0\n\n**When worth it:** Long-horizon shared-artifact tasks where correctness matters more than speed.\n\n## Example Workflows\n\nSee [references\u002Fexamples.md](references\u002Fexamples.md) for concrete implementation examples including:\n- Commit0-style library implementation\n- PaperBench-style paper reproduction\n- Bug fixing (single-file vs multi-file)\n- Feature addition with API and frontend\n\n## References\n\n- Paper: \"Effective Strategies for Asynchronous Software Engineering Agents\" (arXiv:2603.21489v1)\n- GitHub: https:\u002F\u002Fgithub.com\u002FJiayiGeng\u002Fasync-swe-agents\n- Built on OpenHands agent SDK principles",{},"master","4aa004da461d820f4ea5499e58eb8d196cf99016","community\u002Fclawhub\u002Fc\u002Fcaid-multi-agent",0,"https:\u002F\u002Fgithub.com\u002FLord1Egypt\u002Fawesome-skill-forge","https:\u002F\u002Fskill-explorer-rho.vercel.app","https:\u002F\u002Fgithub.com\u002FLord1Egypt","Unbreakable. Unstoppable. Unmatched⚡.\r\n Speaker of machine tongues 🤖  | World-builder of decentralized dreams 🌐 | Defender of the digital realm🛡️.","2026-06-10 08:21:01",{"source":7,"skillName":5,"commands":33,"prompt":43,"zipAvailable":44},[34,37,40],{"tool":35,"command":36},"npx","npx skills add Lord1Egypt\u002Fawesome-skill-forge --skill caid-multi-agent",{"tool":38,"command":39},"bunx","bunx skills add Lord1Egypt\u002Fawesome-skill-forge --skill caid-multi-agent",{"tool":41,"command":42},"pnpm","pnpm dlx skills add Lord1Egypt\u002Fawesome-skill-forge --skill caid-multi-agent","安装技能，技能地址：https:\u002F\u002Fgithub.com\u002FLord1Egypt\u002Fawesome-skill-forge\u002Fblob\u002Fmaster\u002Fcommunity\u002Fclawhub\u002Fc\u002Fcaid-multi-agent\u002FSKILL.md",true,[],[47,55,62,69,76,83],{"skillNo":48,"name":49,"nameZh":6,"description":50,"descriptionZh":6,"repositoryFullName":7,"ownerLogin":8,"ownerAvatarUrl":9,"ownerAccountNo":10,"ownerDisplayName":11,"repositoryNo":12,"starsCount":13,"licenseSpdxId":14,"licenseFileUrl":6,"sourceHtmlUrl":51,"categories":52,"keywords":53,"publishedAt":54},"01M785WKJB99G3STR1NF9NRTJW","youtube-content","YouTube transcripts to summaries, threads, blogs.","https:\u002F\u002Fgithub.com\u002FLord1Egypt\u002Fawesome-skill-forge\u002Fblob\u002Fmaster\u002Fskills\u002Fyoutube-content\u002FSKILL.md",[],[],"2026-11-15 14:19:17",{"skillNo":56,"name":57,"nameZh":6,"description":58,"descriptionZh":6,"repositoryFullName":7,"ownerLogin":8,"ownerAvatarUrl":9,"ownerAccountNo":10,"ownerDisplayName":11,"repositoryNo":12,"starsCount":13,"licenseSpdxId":14,"licenseFileUrl":6,"sourceHtmlUrl":59,"categories":60,"keywords":61,"publishedAt":54},"01M785WEFHB0G2S9YA6EPR3H0E","xurl","X\u002FTwitter via xurl CLI: post, search, DM, media, v2 API.","https:\u002F\u002Fgithub.com\u002FLord1Egypt\u002Fawesome-skill-forge\u002Fblob\u002Fmaster\u002Fskills\u002Fxurl\u002FSKILL.md",[],[],{"skillNo":63,"name":64,"nameZh":6,"description":65,"descriptionZh":6,"repositoryFullName":7,"ownerLogin":8,"ownerAvatarUrl":9,"ownerAccountNo":10,"ownerDisplayName":11,"repositoryNo":12,"starsCount":13,"licenseSpdxId":14,"licenseFileUrl":6,"sourceHtmlUrl":66,"categories":67,"keywords":68,"publishedAt":54},"01M785W98EDN4EFJXJPMQEHCRC","touchdesigner-mcp","Control a running TouchDesigner instance via twozero MCP — create operators, set parameters, wire connections, execute Python, build real-time visuals. 36 native tools.","https:\u002F\u002Fgithub.com\u002FLord1Egypt\u002Fawesome-skill-forge\u002Fblob\u002Fmaster\u002Fskills\u002Ftouchdesigner-mcp\u002FSKILL.md",[],[],{"skillNo":70,"name":71,"nameZh":6,"description":72,"descriptionZh":6,"repositoryFullName":7,"ownerLogin":8,"ownerAvatarUrl":9,"ownerAccountNo":10,"ownerDisplayName":11,"repositoryNo":12,"starsCount":13,"licenseSpdxId":14,"licenseFileUrl":6,"sourceHtmlUrl":73,"categories":74,"keywords":75,"publishedAt":54},"01M785W5S9FP3QBH2V191E025P","test-driven-development","TDD: enforce RED-GREEN-REFACTOR, tests before code.","https:\u002F\u002Fgithub.com\u002FLord1Egypt\u002Fawesome-skill-forge\u002Fblob\u002Fmaster\u002Fskills\u002Ftest-driven-development\u002FSKILL.md",[],[],{"skillNo":77,"name":78,"nameZh":6,"description":79,"descriptionZh":6,"repositoryFullName":7,"ownerLogin":8,"ownerAvatarUrl":9,"ownerAccountNo":10,"ownerDisplayName":11,"repositoryNo":12,"starsCount":13,"licenseSpdxId":14,"licenseFileUrl":6,"sourceHtmlUrl":80,"categories":81,"keywords":82,"publishedAt":54},"01M785W2AS08NSSH9YATCV6FJB","teams-meeting-pipeline","Operate the Teams meeting summary pipeline via Hermes CLI — summarize meetings, inspect pipeline status, replay jobs, manage Microsoft Graph subscriptions.","https:\u002F\u002Fgithub.com\u002FLord1Egypt\u002Fawesome-skill-forge\u002Fblob\u002Fmaster\u002Fskills\u002Fteams-meeting-pipeline\u002FSKILL.md",[],[],{"skillNo":84,"name":85,"nameZh":6,"description":86,"descriptionZh":6,"repositoryFullName":7,"ownerLogin":8,"ownerAvatarUrl":9,"ownerAccountNo":10,"ownerDisplayName":11,"repositoryNo":12,"starsCount":13,"licenseSpdxId":14,"licenseFileUrl":6,"sourceHtmlUrl":87,"categories":88,"keywords":89,"publishedAt":54},"01M785VXKW4T34BTP1SCHW1R7F","systematic-debugging","4-phase root cause debugging: understand bugs before fixing.","https:\u002F\u002Fgithub.com\u002FLord1Egypt\u002Fawesome-skill-forge\u002Fblob\u002Fmaster\u002Fskills\u002Fsystematic-debugging\u002FSKILL.md",[],[]]