From my-claude
Advanced Boss orchestration patterns — Agent Teams leadership, 6-section delegation template, Skill vs Agent conflict resolution, Guardian pattern, and AI-slop detection.
npx claudepluginhub sehoon787/my-claude --plugin my-claudeThis skill uses the workspace's default tool permissions.
When both a skill and an agent could handle the request, evaluate three dimensions:
Guides composing agent teams for complex tasks with predefined roles: Orchestrator, Explorer, Frontend (React), Backend (Rails), iOS/Swift, Android/Kotlin, Database.
Guides coordination of parallel agent teams (Implementer, Reviewer, Architect) for complex plans, cross-cutting concerns, and communicating work streams.
Share bugs, ideas, or general feedback.
When both a skill and an agent could handle the request, evaluate three dimensions:
| Dimension | -> Skill | -> Agent |
|---|---|---|
| Scope | Narrow (single file/function/document) | Wide (multi-file, project-wide, cross-module) |
| Depth (weighted 2x) | Shallow (template, format, generate, lookup) | Deep (analyze patterns, trace dependencies, investigate, reason about code) |
| Interactivity | One-shot (produce output, done) | Iterative (explore -> decide -> act -> verify) |
Scoring: Depth counts double. Tally: Skill-points vs Agent-points (max 4). Higher score wins.
Special cases:
/cso Skill (checklist-based review is more thorough for single files); if multi-file -> gstack /cso also preferredSkill(skill: "gstack-sprint"). The gstack-sprint skill manages the full Phase 1 (design/conversation) → Phase 2 (execution/autonomous) → Phase 3 (review/conversation) lifecycle. Falls back to the prompt instructions in boss.md when gstack-sprint is not installed.When a task requires multiple agents, use this 2-step decision tree:
Q1. Are the subtasks fully independent? (no file overlap)
|
+- YES -> Priority 3a (Boss direct parallel) or 3b (delegate to sisyphus)
|
+- NO (shared files, common types/utilities, etc.)
|
Q2. Is inter-agent communication needed? (feedback, review, cross-referencing)
|
+- YES -> Priority 3c-DIRECT (Agent Teams, peer-to-peer SendMessage)
|
+- NO -> Priority 3b (delegate to one sisyphus, handled sequentially internally)
When 2-4 agents are needed and dependencies are simple:
Criteria: task can be decomposed into <=4 clear steps, each mappable to a single agent.
Example: "refactor and code review" -> Agent(name="executor", description="executor refactoring", model="sonnet") then Agent(name="code-reviewer", description="code-reviewer review", model="opus")
When 5+ agents needed OR complex dependency chains OR iterative planning required:
When teammates need to communicate directly with each other, share intermediate results, or coordinate on overlapping files across long-running work:
Skill(skill: "team") or with args for specific configuration"agent": "boss" in settings.json)Decision: Agent Teams vs Subagents
| Signal | -> Agent Teams | -> Subagents |
|---|---|---|
| Inter-agent communication | Needed (share intermediate results, peer review) | Not needed (report only to Boss) |
| Task persistence | Long-running (teammates do multiple tasks) | Short (complete and terminate) |
| File overlap | Teammates may edit overlapping files | Completely separate files |
| Cost tolerance | Higher (each teammate = separate Claude instance) | Lower (results summarized back) |
| Task count | 5-20 parallel tasks | 1-4 focused tasks |
When NOT to use teams:
CLAUDE_CODE_EXPERIMENTAL_AGENT_TEAMS env var is not set -> fall back to Priority 3bAdvanced Team Controls (from official docs):
"Spawn an architect teammate. Require plan approval before changes."
Leader reviews and approves/rejects plans. Rejected -> teammate revises in plan mode."Create a team with 4 teammates. Use Sonnet for each teammate."teammateMode in settings.json — "auto" (default), "in-process", "tmux"Limitations (Boss must be aware):
When Boss leads an Agent Team directly (instead of delegating to /team skill),
these rules govern teammate selection, communication, and lifecycle.
A. Teammate Compatibility — Hard Blockers
NEVER as teammate: Explore (built-in), Plan (built-in), multimodal-looker
— No access to SendMessage/TaskUpdate, causes shutdown blocking
Orchestrators (sisyphus, atlas, boss) must not be used as teammates
— Core capabilities neutralized by "Subagents cannot spawn other subagents" constraint
— Consumes Opus cost while behaving like executor
All other agents can be teammates
— However, agents with disallowedTools (e.g. code-reviewer) should only be assigned review/analysis roles
B. Dynamic Team Composition (runtime decisions)
Boss does not follow fixed team presets. For each request:
Criteria for dynamic decisions:
C. Proactive Guardian Pattern (Boss's autonomous call)
Boss may autonomously attach a guardian teammate — a reviewer or watcher running in parallel — without being asked, when task characteristics justify the cost:
Trigger conditions (any one is sufficient):
Guardian roles to attach:
code-reviewer (sonnet) — real-time review as implementation proceedssecurity-reviewer (sonnet) — flags security issues before they landarchitect (opus) — only when structural integrity is at stake (high cost, use sparingly)Cost rule: Attach at most one guardian per task unless the task is both complex AND security-sensitive. Default to no guardian for straightforward or single-file tasks.
The guardian reads output from the implementer (via SendMessage or shared task list) and reports findings directly back to Boss or the implementer. Boss decides whether to act on findings immediately or batch them into a verification pass.
D. File Ownership
E. Direct Communication Between Teammates (peer-to-peer)
Boss is not the hub for all communication. Direct messages between teammates are encouraged:
Boss intervenes only when:
F. Required Elements in Spawn Prompt
Include all 5 of the following when spawning any teammate:
G. Lifecycle
TeamDelete -> TeamCreate -> TaskCreate (set blockedBy) -> spawn teammatesFor detailed per-agent characteristics (Write/Edit capability, teammate suitability, recommended roles),
see agent-teams-reference.md.
Every delegation using Method B or D MUST include all 6 sections. Minimum 30 lines.
The name parameter in the Agent() call must match the canonical agent type being invoked (e.g., name="executor" for implementation, name="security-reviewer" for security review). This name appears in the UI and enables direct messaging via SendMessage.
**TASK**: [Specific description of what to do]
**EXPECTED OUTCOME**: [What the completed work looks like — files changed, tests passing, etc.]
**REQUIRED TOOLS**: [Which tools the agent should use — Bash, Edit, Grep, etc.]
**MUST DO**:
- [Specific requirement 1]
- [Specific requirement 2]
- [Run these specific tests/checks after completion]
**MUST NOT DO**:
- [Do not modify files outside this scope]
- [Do not refactor unrelated code]
- [Do not add features not requested]
**CONTEXT**:
[Relevant code snippets, file paths, patterns to follow]
Recommended skills: [skills matched in Phase 2, e.g. /tdd-workflow, /security-review]
Recommended agents: [agents matched in Phase 2, e.g. test-engineer (sonnet)]
Capability Handoff Rule: When delegating to sub-orchestrators (sisyphus, atlas, hephaestus) or any agent that may further delegate work, include recommended skills and agents in CONTEXT. Boss has Phase 0 registry knowledge that sub-agents lack — pass it as guidance, not mandate.
Before delegating any task:
Watch for these patterns in subagent output and reject them:
| Pattern | Signal | Action |
|---|---|---|
| Scope inflation | Agent adds features not requested | Reject, re-delegate with stricter MUST NOT DO |
| Premature abstraction | Generic frameworks for one-time operations | Reject, demand concrete implementation |
| Over-validation | Error handling for impossible scenarios | Reject, specify which validations are needed |
| Doc bloat | Excessive comments, docstrings for obvious code | Reject, demand minimal comments |
| Unnecessary refactoring | "Improving" adjacent code | Reject, enforce scope boundary |