orchestration-patterns
Skill419 starsChanged 4 months agoMITView on GitHub
Agentic orchestration patterns for long-running tasks. Implements evidence-based delivery and Simon Willison's agent loop. Use when managing multi-step implementation work, coordinating subagents, orchestrating PR workflows, or running sessions that need checkpoints and escalation. Do NOT use for single-step or trivial tasks.
3 other projects use a version of this.
Adopted by
Most recently taken up by
- adyba/pi-safe-workflowword for word, first seen Jul 10, 2026
- zircote-plugins/claude-team-orchestrationtheir own version, first seen Jun 22, 2026
- MRCalderon3D/everything-game-dev-codetheir own version, first seen Mar 27, 2026
Other versions3 projects use a version of this.
Word for word · 1
- adyba/pi-safe-workflow★ 0100% same
Edited · 0
None found.
Wrote their own version · 2
- MRCalderon3D/everything-game-dev-code★ 90same name
- zircote-plugins/claude-team-orchestration★ 15same name
How matches are found. Word for word: the exact same text. Edited: shares passages with this file (“99% same” means 99% of its five-word phrases also appear here; 10% or more counts). Their own version: similar meaning, or, weakest, the same name. We can’t tell which project had it first. Projects are counted among the 200 most-starred candidates, and mentions are links to the repository we found, up to 50 per site, so both counts are a floor.
In this repository60 other files it gives its agents.
- AGENTS.mdAGENTS.md
- CLAUDE.mdCLAUDE.md
- .cursor/rules/00-core-principles.mdcCursor rule
- .cursor/rules/01-git-workflow.mdcCursor rule
- .cursor/rules/02-pattern-discovery.mdcCursor rule
- .cursor/rules/03-safe-ai-dlc.mdcCursor rule
- .cursor/rules/04-knowledge-vault.mdcCursor rule
- .cursor/rules/10-backend-python.mdcCursor rule
- .cursor/rules/11-frontend-react.mdcCursor rule
- .cursor/rules/12-database-sql.mdcCursor rule
- .cursor/rules/13-testing.mdcCursor rule
- .cursor/rules/14-spec-creation.mdcCursor rule
- .cursor/rules/15-deployment.mdcCursor rule
- .cursor/rules/16-stripe-payments.mdcCursor rule
- .cursor/rules/20-agent-architect.mdcCursor rule
- .cursor/rules/21-agent-backend.mdcCursor rule
- .cursor/rules/22-agent-qas.mdcCursor rule
- .cursor/rules/23-agent-security.mdcCursor rule
- .cursor/rules/30-background-agents.mdcCursor rule
- .cursor/rules/31-mcp-integration.mdcCursor rule
- .cursor/rules/README.mdCursor rule
- agent-coordinationSkill
- api-patternsSkill
- confluence-docsSkill
- deployment-sopSkill
- frontend-patternsSkill
- git-advancedSkill
- linear-sopSkill
- migration-patternsSkill
- pattern-discoverySkill
- release-patternsSkill
- rls-patternsSkill
- safe-ai-dlcSkill
- safe-workflowSkill
- security-auditSkill
- spec-creationSkill
- stripe-patternsSkill
- team-coordinationSkill
- testing-patternsSkill
- vault-syncSkill
- agent-coordinationSkill
- api-patternsSkill
- confluence-docsSkill
- deployment-sopSkill
- frontend-patternsSkill
- git-advancedSkill
- linear-sopSkill
- migration-patternsSkill
- orchestration-patternsSkill
- pattern-discoverySkill
- release-patternsSkill
- rls-patternsSkill
- safe-ai-dlcSkill
- safe-workflowSkill
- security-auditSkill
- spec-creationSkill
- stripe-patternsSkill
- team-coordinationSkill
- testing-patternsSkill
- vault-syncSkill
The file
We split this skill into the rules it gives an agent
2 rules. About 0 are common, 1 is distinctive, and 1 is very specific to this project.
≈0
Common · estimate
Many files like this have a rule of this kind.
≈1
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 81
MANDATORY: Before merging any PR, invoke QAS for independent review.
- Very specific: line 103
All QAS reports go to: docs/agent-outputs/qa-validations/{{TICKET_PREFIX}}-{number}-qa-validation.md
≈ “Common” is an estimate: at least 1 in 5 of the 213,897 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
Orchestration Patterns Skill
TEMPLATE: This skill uses
{{PLACEHOLDER}}tokens. Replace with your project values before use.
Purpose
Codify evidence-based delivery and iterative agent loop for orchestrating complex, long-running tasks. These patterns ensure verifiable progress and intelligent escalation.
When This Skill Applies
- Orchestrating multi-step implementation tasks
- Managing work across multiple subagents
- Running long-running sessions that need checkpoints
- Preparing PRs for merge (mandatory QAS gate)
- Coordinating team handoffs
Simon Willison's Agent Loop
Core Philosophy: "Iterate until success or blocked, then escalate."
1. GOAL DEFINITION
- Clear acceptance criteria (from BSA/ticket)
2. PATTERN DISCOVERY
- Search codebase, docs, previous sessions
- Use: pattern-discovery skill (auto-invoked)
3. ITERATIVE EXECUTION LOOP:
+---------------------------------------------+
| Implement approach |
| | |
| Run validation ({{CI_VALIDATE_COMMAND}}) |
| | |
| If PASS -> proceed to evidence |
| If FAIL -> analyze error, adjust, repeat |
| If BLOCKED -> escalate to TDM with context |
+---------------------------------------------+
4. EVIDENCE ATTACHMENT
- Attach proof to ticket system (see templates below)
5. QAS GATE (MANDATORY before merge)
- Invoke QAS subagent for independent reviewEvidence-Based Delivery
Core Principle: "All work requires verifiable evidence - no 'trust me, it works'"
Evidence Types
| Type | What It Proves | Example |
| Test Results | Code works as expected | {{CI_VALIDATE_COMMAND}} output |
| Screenshots | UI changes are correct | Before/after comparison |
| Command Output | Operations completed | Build logs, migration logs |
| QAS Report | Independent verification | QA validation markdown |
| Session ID | Full audit trail available | Agent session reference |
Phase Evidence Requirements
| Phase | Evidence Required | Template |
| Dev | Test results, command output | Dev Evidence Template |
| Staging | UAT validation or N/A + reason | Staging Template |
| Done | QAS report, merge confirmation | Done Evidence Template |
QAS Pre-Merge Gate
MANDATORY: Before merging any PR, invoke QAS for independent review.
Why QAS Gate Matters
- Separation of Concerns: QAS validates but does not write product code
- Independent Verification: Catches what implementer missed
- Bias Prevention: Fresh eyes on commit messages, patterns
- Evidence in Tickets: QAS posts final evidence and verdict to ticket system
QAS Invocation Pattern
Prompt: "Review PR #XXX for {{TICKET_PREFIX}}-YYY. Validate:
- Commit message format (ticket in subject line)
- Code patterns (RLS, naming, structure)
- CI status (all checks passing)
- Evidence attachments in ticket system
Generate validation report to docs/agent-outputs/qa-validations/"QAS Output Location
All QAS reports go to: docs/agent-outputs/qa-validations/{{TICKET_PREFIX}}-{number}-qa-validation.md
Escalation Patterns
When to Escalate
| Condition | Escalate To | Include |
| Blocked > 4 hours | TDM | Full context, attempts made |
| Architecture ambiguity | ARCHitect | Options, trade-offs |
| Cross-team dependency | TDM | Which teams, what's blocked |
| Security concern | SecEng | Specific risk, evidence |
Escalation Template
**Escalation Required**
**Blocked On**: [specific blocker]
**Attempts Made**:
1. [what you tried]
2. [what you tried]
**Context**:
- Ticket: {{TICKET_PREFIX}}-XXX
- Time blocked: X hours
**Request**: [specific ask - what do you need?]Long-Running Task Checkpoints
For tasks spanning multiple tool calls or sessions:
Checkpoint Pattern
Every 10-15 tool calls:
1. Update todo list with current progress
2. If nearing context limit, summarize state
3. If handoff needed, provide continuation context
At session boundaries:
1. Summarize completed work
2. List remaining items
3. Document any blockers
4. Attach evidence to ticketState Preservation
**Session Checkpoint**
**Completed**:
- [x] Task 1
- [x] Task 2
**In Progress**:
- [ ] Task 3 (at step X)
**Remaining**:
- [ ] Task 4
- [ ] Task 5
**Blockers**: [if any]
**Next Action**: [specific next step]Orchestration Workflow Example
1. Start work on {{TICKET_PREFIX}}-XXX
- Syncs to dev, creates branch, sets context
2. Pattern discovery (skill auto-invokes)
- Finds relevant patterns before implementation
3. Implementation with agent loop
- Implement
- Validate ({{CI_VALIDATE_COMMAND}})
- Adjust if needed
- Repeat until passing
4. Pre-PR validation
- Full validation checklist
5. Create PR with evidence
6. QAS GATE (MANDATORY)
- Invoke QAS subagent for review
- Fix any blocking issues
- Commit QAS report
7. Merge (only after QAS approval)
8. End work
- Updates ticket, cleans upAnti-Patterns to Avoid
| Anti-Pattern | Why It's Bad | Do This Instead |
| Skip QAS review | Miss commit message issues | Always invoke QAS pre-merge |
| No evidence in tickets | No audit trail | Attach evidence every phase |
| Ignore CI failures | Broken code reaches dev | Fix in agent loop, don't skip |
| Force-push without check | May lose teammate's changes | Use --force-with-lease |
| Continue when blocked | Waste time, no progress | Escalate with context |
Authoritative References
- AGENTS.md: Agent roles and orchestration model
- Agent Workflow SOP:
docs/sop/AGENT_WORKFLOW_SOP.md - CONTRIBUTING.md: Workflow requirements
- linear-sop skill: Evidence templates for ticket system
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.

