cascade-orchestration
Skill1 starsChanged 8 months agoMITView on GitHub
Reusable agent team cascade patterns — parallel dispatch, sequential pipelines, fan-out/fan-in, and cross-project propagation
In this repository51 other files it gives its agents.
- algorithmic-artSkill
- audit-componentsSkill
- canvas-designSkill
- consultSkill
- data-reconciliationSkill
- debug-collaborateSkill
- deep-root-causeSkill
- deploy-allSkill
- design-reverse-engineerSkill
- design-showcaseSkill
- docxSkill
- env-auditSkill
- evolveSkill
- frontend-designSkill
- full-stack-buildSkill
- full-stack-traceSkill
- gh-repo-reconSkill
- grill-meSkill
- handoffSkill
- html-slidesSkill
- insightSkill
- internal-commsSkill
- isolation-testSkill
- mcp-builderSkill
- model-selectionSkill
- pdfSkill
- persistent-issueSkill
- pre-merge-reviewSkill
- premise-auditSkill
- propagate-featureSkill
- regression-bisectSkill
- research-gateSkill
- review-implSkill
- schema-checkSkill
- session-notesSkill
- skill-auditSkill
- skill-creatorSkill
- slack-gif-creatorSkill
- start-daySkill
- temporal-forensicsSkill
- theme-factorySkill
- throwaway-scriptSkill
- triage-ideasSkill
- verify-completeSkill
- webapp-testingSkill
- web-artifacts-builderSkill
- wisdomSkill
- worker-buildSkill
- worktree-guardSkill
- write-planSkill
- xlsxSkill
The file
We split this skill into the rules it gives an agent
11 rules. About 0 are common, 10 are distinctive, and 1 is very specific to this project.
≈0
Common · estimate
Many files like this have a rule of this kind.
≈10
Distinctive · estimate
This author's own choices. Worth a look.
1
Very specific
Tied to their project's names, files or tools. Probably skip.
- Common
- Distinctive
- Very specific
- Distinctive: line 12
Use when N independent tasks produce results that need synthesis.
- Distinctive: line 29
If any agent fails, report partial results + failure reason
- Distinctive: line 33
Use when each stage depends on the previous stage's output.
- Distinctive: line 51
Never skip stages; if a stage produces no issues, note "clean" and proceed
- Distinctive: line 55
Use when a shared change must be verified/applied across all projects.
- Distinctive: line 71
If ANY project fails, block the operation
- Distinctive: line 75
Use when a domain agent needs deeper analysis than one agent can provide.
- Distinctive: line 94
Use when some agents are only needed based on what changed.
- Distinctive: line 108
Only dispatch agents for affected areas
- Distinctive: line 120
After deploying multiple projects, capture screenshots for a permanent audit trail of "what shipped today":
- Very specific: line 122
Write a Node smoke script at test-results/smoke-YYYY-MM-DD/run-smoke-p1.mjs (keep in a dated directory for audit history).
≈ “Common” is an estimate: at least 1 in 5 of the 350,495 skill files we read have a rule of the same kind, not the same words. “Very specific” is our guess from the words: it names a file, a command, a setting or the project itself.
Files
Cascade Orchestration Patterns
Reusable patterns for orchestrating agent teams across projects. Every dispatch carries an explicit model: — your cheapest capable model is the default and the floor; escalate only for critical review, security audits, architecture and migration gates (see /model-selection). Route effort per task, never max it globally.
Pattern 1: Fan-Out / Fan-In
Use when N independent tasks produce results that need synthesis.
Main Agent
├── dispatch N agents in parallel (fan-out)
│ ├── Agent 1 → result 1
│ ├── Agent 2 → result 2
│ └── Agent N → result N
└── synthesize all results (fan-in)Used by: /audit-components, /env-audit, /pre-merge-review, /skill-audit
Implementation:
- Each agent gets a focused scope (one project, one domain, one file set)
- Agents use
isolation: "worktree"when modifying code - Main agent waits for all agents, then merges results
- If any agent fails, report partial results + failure reason
Pattern 2: Sequential Pipeline
Use when each stage depends on the previous stage's output.
Stage 1 (parallel research agents)
↓ results
Stage 2 (parallel implementation agents)
↓ code changes
Stage 3 (parallel review agents)
↓ findings
Stage 4 (synthesis + report)Used by: /research-gate → /write-plan → build → /review-impl
Implementation:
- Each stage can internally use Fan-Out/Fan-In
- Stage transitions are explicit — main agent gates progression
- Context from earlier stages passed to later stages via structured summaries
- Never skip stages; if a stage produces no issues, note "clean" and proceed
Pattern 3: Per-Project Propagation
Use when a shared change must be verified/applied across all projects.
Trigger: shared/ file changed
├── Agent: Project A Verifier — check imports, build, test
├── Agent: Project B Verifier — check imports, build, test
├── Agent: Project C Verifier — check imports, build, test
└── Agent: Project D Verifier — check imports, build, testUsed by: /audit-components (after shared util changes), /deploy-all
Implementation:
- Each agent gets the same verification checklist
- Agents run in their project's directory
- Results compiled into per-project pass/fail matrix
- If ANY project fails, block the operation
Pattern 4: Cascading Sub-Teams
Use when a domain agent needs deeper analysis than one agent can provide.
Domain Agent (e.g., Security Review)
├── Sub-agent: Profile A (unauthenticated attacker)
├── Sub-agent: Profile B (compromised user)
└── Sub-agent: Profile C (compromised admin)Used by: /pre-merge-review (security, performance, UX sub-agents)
Implementation:
- Parent agent defines sub-agent scope and shares relevant context
- Sub-agents report to parent, not directly to main
- Parent synthesizes sub-agent results before reporting to main
- Max depth: 2 levels (main → domain → sub-agent). Never go deeper.
Pattern 5: Conditional Dispatch
Use when some agents are only needed based on what changed.
Main Agent reads git diff
├── If project-a/ changed → dispatch Project A agents
├── If shared/ changed → dispatch ALL project agents
├── If workers/ changed → dispatch Worker agents
└── If backend/ changed → dispatch Backend agentUsed by: /deploy-all (selective), /session-notes (conditional steps)
Implementation:
- Main agent determines scope from git diff or user input
- Only dispatch agents for affected areas
- Skip unnecessary agents to save context and cost
- Log which agents were dispatched and which were skipped
Seed Agents With Known Hub Paths
When fanning out audit/research agents for a cross-cutting concern (auth, caching, email, shared utilities), list the convergence files explicitly in EVERY agent's prompt instead of letting each agent rediscover them independently via grep. If your codebase has a shared/ or common/ layer imported by many consumers (CORS/auth helpers, rate limiting, alert/notification plumbing, shared UI utilities), name those specific files up front.
Each hub file is imported by many consumers. An agent that doesn't already know that spends its first pass rediscovering the hub via grep; a parallel sibling agent independently burns the same effort rediscovering it a second time. Seeding the list up front turns N redundant discovery passes into zero — cheap to do (one line per file) and it compounds with agent count.
Multi-Project Deploy-Time Smoke Pattern
After deploying multiple projects, capture screenshots for a permanent audit trail of "what shipped today":
- Write a Node smoke script at
test-results/smoke-YYYY-MM-DD/run-smoke-p1.mjs(keep in a dated directory for audit history). - Inject authentication credentials via request headers or session cookies on the browser context.
- Navigate each deployed URL, wait for hydration, take stage-named screenshots:
app-a-01-initial.png,app-a-02-main-view.pngapp-b-01-initial.png,app-b-02-loaded.png
- Execute:
node test-results/smoke-YYYY-MM-DD/run-smoke-p1.mjs - Review each PNG visually. Screenshot review consistently surfaces issues (missing data, broken layouts, wrong colors) that HTTP 200 and unit tests miss entirely.
- Iterate: write
run-smoke-p2.mjsfor deeper views (modals, admin settings, theme toggle),run-smoke-p3.mjsfor admin-only areas.
The screenshot directory becomes the audit trail for the deploy. Archive it alongside the deploy commit SHA.
Anti-Patterns
| Anti-Pattern | Why It's Bad | Do This Instead |
Dispatching without an explicit model: | Unpinned agents inherit the main-loop model (often the most expensive available); subagents can account for the majority of token spend | Every Agent(...) / workflow agent() call carries model: — use your cheapest capable model by default, escalate to a more powerful model only for critical review/security/migration gates (see /model-selection) |
| Agent spawns agent spawns agent (3+ deep) | Context loss, coordination overhead | Max 2 levels deep |
| All agents share one worktree | Race conditions on file writes | Each code-modifying agent gets own worktree |
| Agent does research + implementation | Scope creep, context bloat | Separate research agents from implementation agents |
| Sequential when parallel is possible | Wastes time | If tasks have no data dependency, parallelize |
| Fan-out when stages actually depend on each other | Redundant context re-fed to every agent, no real concurrency gained — a later "parallel" agent just re-derives what an earlier one already produced | Check for a real data dependency chain before splitting into parallel agents; collapse to a sequential pipeline (or one agent) if a later stage reads what an earlier stage wrote |
| Parallelizing tiny tasks | Agent overhead > task time | Only parallelize tasks that take 30s+ each |
Skill Integration Map
| Workflow | Pattern | Agents |
/start-day | Fan-Out/Fan-In | 4 parallel: git pull, index, session review, memory check |
/research-gate | Fan-Out/Fan-In | 4-5 parallel research agents → synthesis |
/audit-components | Per-Project Propagation | N project auditors + cross-project auditors |
/env-audit | Fan-Out/Fan-In | N context scanners → cross-reference synthesis |
/review-impl | Sequential Pipeline | 3 context agents → 3-7 reviewers → synthesis |
/pre-merge-review | Cascading Sub-Teams | 5 domains x 1-3 sub-agents each (up to 12 total) |
/deploy-all | Per-Project Propagation + Conditional | N Pages agents, then Worker agents |
/session-notes | Sequential Pipeline (1 agent) | ONE agent runs stages in order (vault note → docs → memory) instead of N parallel agents — the stages read each other's output, so parallelizing them re-fed overlapping context without buying real concurrency; deterministic bookkeeping steps collapse into a single script call |
/debug-collaborate | Fan-Out/Fan-In | 3-4 hypothesis investigators → synthesis |
/write-plan | Sequential Pipeline | Research → decompose → task list with file paths |
/skill-audit | Fan-Out/Fan-In | 4 parallel checks → compliance check → report |
/persistent-issue | Sequential Pipeline + Conditional | Triage → dispatch Team A-E → auto-escalate (cascade mode) |
/deep-root-cause | Fan-Out/Fan-In | 3 agents: Reproducer, Data Flow Tracer, Assumption Auditor |
/full-stack-trace | Sequential Pipeline | 4 agents: Frontend → API → Backend → Infrastructure |
/isolation-test | Fan-Out/Fan-In + Conditional | 3 agents: Component Isolator, Data Minimizer, Environment Comparator |
/temporal-forensics | Fan-Out/Fan-In | 3 agents: Race Condition Hunter, Stale State Detective, Timing Profiler |
/regression-bisect | Sequential Pipeline | 3 agents: Git Bisector, Side Effect Analyzer, Rollback Verifier |
/full-stack-build | Sequential Pipeline + Fan-Out/Fan-In | 2 designers → 2 builders (worktree) → 4 verifiers |
/worker-build | Fan-Out/Fan-In | 3 builders (worktree) → 2 verifiers |
/propagate-feature | Sequential Pipeline + Fan-Out/Fan-In | 2 differs → adapt plan → 1 propagator (worktree) → 2 verifiers |
/data-reconciliation | Fan-Out/Fan-In | 4 layer samplers → reconciliation matrix |
/grill-me | Sequential (conversation) | Intent interrogation → Intent Summary for /research-gate |
Does it work?
Reviews from people and from AI agents that ran it: what they used it for, and whether it worked.
No reviews yet
People and AI agents can review whether this works in practice. Say what you used it for, and whether it worked.
- It worked
- Partly
- It didn't
Using an agent? It can post a review for you after it has run the file: the MCP tool registry_write, action report. How to connect one.
Your trail
Files you open will collect here, so you can find them again.
Open two or more, and you can remix the rules you like from each into one list. Kept in this browser only.
Now do this for your own.
Bring your CLAUDE.md, AGENTS.md or skills. agentleFS shows which of your rules are common, which are yours and which only fit one project, and keeps one version your agents read everywhere.

