outer-loop-dag-orchestrator
Skill2 starsChanged 18 days agoMITView on GitHub
Coordinate multi-agent subagents and parallel Jira/feature worktrees in Claude Code using categorical DAG composition, monoidal disjoint-scope parallelization, ISP context projection, and localized self-healing rollback. Use when spawning multiple Claude subagents, decomposing multi-layer epics, or running /orchestrate-tickets.
In this repository12 other files it gives its agents.
- CLAUDE.mdCLAUDE.md
- .github/copilot-instructions.mdCopilot instructions
- code-gen-dagSkill
- outer-loop-dag-orchestratorSkill
- plan-gen-dagSkill
- solid-code-synthesizerSkill
- csharp-conventionsSkill
- jira-conventionsSkill
- observability-conventionsSkill
- solid-code-synthesizerSkill
- ui-ux-pro-maxSkill
- solid-code-synthesizerSkill
The file
We split this skill into the rules it gives an agent
5 rules. About 0 are common, 0 are distinctive, and 5 are very specific to this project.
≈0
Common · estimate
Many files like this have a rule of this kind.
≈0
Distinctive · estimate
This author's own choices. Worth a look.
5
Very specific
Tied to their project's names, files or tools. Probably skip.
- Common
- Distinctive
- Very specific
- Very specific: line 17
Branch Baseline: Every worktree or branch must originate from origin/develop.
- Very specific: line 28
If task $g$ depends on contracts, entities, or migrations created by task $f$, never launch $f$ and $g$ concurrently in separate worktrees.
- Very specific: line 51
When verify-solid-contracts.py or verify-agent-worktree.sh exits non-zero (10, 20, or 30):
- Very specific: line 58
Rewind ($f^{op}$) on Non-Convergence: If a retry increases diagnostic count or breaks passing tests, restore $SNAP (git checkout -- .
- Very specific: line 59
Post-Rebase Re-Verification: After git fetch origin develop && git rebase origin/develop, always re-run ./scripts/verify-agent-worktree.sh …
≈ “Common” is an estimate: at least 1 in 5 of the 364,980 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
Claude Code Outer-Loop DAG Orchestrator
Applies categorical composition ($g \circ f$), monoidal parallelization ($A \otimes B$), and SOLID agent-coordination invariants whenever Claude Code decomposes work across parallel subagents (.claude/agents/* or Agent tool with isolation: "worktree").
Tooling & Policy Guardrails
- Branch Baseline: Every worktree or branch must originate from
origin/develop. Never branch from, rebase onto, or touchmainormaster(CLAUDE.md§ Branching & Release Policy). - Worktree Sandbox:
scripts/agent-sandbox.shor Claudeisolation: "worktree"(.claude/worktrees/<id>). - SOLID & Scope Pre-Flight:
scripts/verify-solid-contracts.py - 3-Stage Build/Analyzer/Arch Oracle:
scripts/verify-agent-worktree.sh
1. Categorical Decomposition Rules
- Sequential Composition ($g \circ f$):
- Inspect both formal Jira
Blockslinks and prose"Depends on <TICKET-KEY>"notes. - If task $g$ depends on contracts, entities, or migrations created by task $f$, never launch $f$ and $g$ concurrently in separate worktrees. Synthesize and verify $f$ first (
core/ports beforeproviders//workflow/adapters).
- Inspect both formal Jira
- Monoidal Parallelization ($A \otimes B$):
- Spawn parallel workers (
<= 5concurrent workers by default) only when tasks have zero causal dependency and strictly disjoint mutation scopes (scope(A) ∩ scope(B) = ∅), e.g., independent Bounded Context verticals (GeoAssets.Servervs.GeoAssets.IpBilling) or production domain logic vs. disjoint test/DTO scaffolding against a frozen C# 14 interface contract.
- Spawn parallel workers (
2. SOLID Agent-Coordination Invariants
- SRP (Bounded Mutation Scope): Assign each subagent an explicit list of allowed path prefixes/files (
--allowed-scope). Verify post-execution via:python3 scripts/verify-solid-contracts.py --target <worktree> --allowed-scope "<csv-globs>" - ISP (Minimal Context Projection $\pi_k$): Strip unrelated codebase context from subagent prompts. Provide only:
- Target C# 14 interface/record contracts (
TimeProvider,CancellationTokensignatures). - Assigned
[NEW]/[MODIFY]paths. - Relevant domain skill references (
csharp-conventions,observability-conventions,jira-conventions).
- Target C# 14 interface/record contracts (
- LSP (Behavioral Subagent Equivalence): Any persona subagent (
ticket-worker,arch-designer,test-agent) must satisfy the same postcondition gate: zero#pragma warning disable/[SuppressMessage]/<NoWarn>,Exit 0fromverify-solid-contracts.py, andExit 0fromverify-agent-worktree.sh. - DIP (Contract Mediation): Subagents coordinate solely via upfront C# interface contracts and verified Git commits/diffs — never via implicit assumptions about sibling agent internals.
3. Localized Self-Healing & Dual Rollback ($f^{op}$)
When verify-solid-contracts.py or verify-agent-worktree.sh exits non-zero (10, 20, or 30):
- Checkpoint Before Retry: Record
SNAP=$(git -C <worktree> stash create)before each self-healing pass (max3retries). - Targeted Error-Monad Routing:
Exit 10(Formatting /.razor.cssplit / scope drift) $\rightarrow$ Rundotnet format style GeoAssets.slnor split inline@codeinto.razor.cs.Exit 20(Roslyn /AsyncFixer/Meziantou/RS0030) $\rightarrow$ InjectSystem.TimeProvider, propagateCancellationToken, remove blocking calls without suppressing warnings.Exit 30(Onion layer leak /NotImplementedException/ failed xUnit orArchitectureTests) $\rightarrow$ Move infrastructure dependencies behindcore/ports and repair domain invariants.
- Rewind ($f^{op}$) on Non-Convergence: If a retry increases diagnostic count or breaks passing tests, restore
$SNAP(git checkout -- .+git stash apply $SNAP) rather than stacking broken edits, and escalate after 3 attempts. - Post-Rebase Re-Verification: After
git fetch origin develop && git rebase origin/develop, always re-run./scripts/verify-agent-worktree.shanddotnet testin the worktree — never trust pre-rebase green results.
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.

