[{"data":1,"prerenderedAt":-1},["ShallowReactive",2],{"skill:01M6DBN8PD1110MHT97SDXTTB8":3,"skill-same:01M6DBN8PD1110MHT97SDXTTB8":85},{"skillNo":4,"name":5,"nameZh":6,"description":7,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":15,"licenseFileUrl":6,"sourceHtmlUrl":16,"categories":17,"keywords":23,"publishedAt":44,"linkOnly":45,"markdownContent":46,"markdownBody":47,"frontMatter":48,"refName":49,"commitSha":50,"skillDirectory":51,"forksCount":14,"repositoryHtmlUrl":52,"repositoryHomepageUrl":6,"ownerHtmlUrl":53,"ownerBlogUrl":6,"ownerDescription":6,"updatedAt":54,"install":55,"resources":68},"01M6DBN8PD1110MHT97SDXTTB8","orchestration-patterns",null,"Use when orchestrating a multi-agent or multi-step coding workflow and you need the proven cross-vendor patterns for THIS Windows workspace: the Architect-to-Editor split (an Opus architect emits a typed change-spec, Codex applies it via the mounted codex mcp-server rail); the sandbox ladder (route risky or untrusted exec to WSL2 native, the docker MCP, or a modal_sandbox, because Windows has no native OS-level process sandbox); a Serena-seeded PageRank repo-map (rank central symbols over Serena LSP reference edges, no tree-sitter pipeline and no vector store); Goose-style lead\u002Fworker failure-threshold escalation; and a per-edit lint ladder capped at max_reflections=3. Triggers include split architect and editor across models, route risky exec to a sandbox, build a repo map without embeddings, cap agent retries, escalate a stuck work-unit. NOT for wiring the Codex fan-out channel itself (use multi-ai-mingle) or picking among finished candidate patches (use execution-grounded-bon).","Prekzursil\u002Fagent-skills-toolchain","Prekzursil","https:\u002F\u002Favatars.githubusercontent.com\u002Fu\u002F54636077?v=4","01M6DACZ1PCQHD99SCR1YXG28B","Andrei Mihai Visalon","01M6DACZ670WZF535V3WYYSS4Z",0,"MIT","https:\u002F\u002Fgithub.com\u002FPrekzursil\u002Fagent-skills-toolchain\u002Fblob\u002Fmain\u002F.agents\u002Fskills\u002Forchestration-patterns\u002FSKILL.md",[18],{"categoryNo":19,"categoryName":20,"taxonomyType":21,"taxonomyTypeDesc":22},"01JBSEEDCAT000000000000023","Skill与智能体开发","SCENARIO","使用场景",[24,25,26,27,28,29,30,31,32,33,34,35,36,37,38,39,40,41,42,43],"orchestration","orchestration patterns","patterns","cap","MCP","os","worker","across","map","lsp","route","workflow","change","max","edit","work","pipeline","server","embeddings","vector","2026-11-10 10:12:30",false,"---\nname: orchestration-patterns\ndescription: \"Use when orchestrating a multi-agent or multi-step coding workflow and you need the proven cross-vendor patterns for THIS Windows workspace: the Architect-to-Editor split (an Opus architect emits a typed change-spec, Codex applies it via the mounted codex mcp-server rail); the sandbox ladder (route risky or untrusted exec to WSL2 native, the docker MCP, or a modal_sandbox, because Windows has no native OS-level process sandbox); a Serena-seeded PageRank repo-map (rank central symbols over Serena LSP reference edges, no tree-sitter pipeline and no vector store); Goose-style lead\u002Fworker failure-threshold escalation; and a per-edit lint ladder capped at max_reflections=3. Triggers include split architect and editor across models, route risky exec to a sandbox, build a repo map without embeddings, cap agent retries, escalate a stuck work-unit. NOT for wiring the Codex fan-out channel itself (use multi-ai-mingle) or picking among finished candidate patches (use execution-grounded-bon).\"\n---\n# orchestration-patterns\n\nFive orchestration patterns that ride the **already-mounted bus** on this Windows 11 machine\n(codex mcp-server, Serena LSP, the docker + cloud-hub\u002Fmodal MCPs, WSL2, the smallest-check\nladder). They are **advisory patterns Claude applies while orchestrating** — not a new runtime,\nnot a new gate, not a hook. Every one deliberately re-uses existing infrastructure rather than\nbuilding a parallel stack (the anti-overfit gate: no 2nd orchestration runtime, no vector\u002FKG\nmemory engine, no tree-sitter chunker, no local sandbox build, no trained router).\n\n## When to use\n- You are decomposing work into agents \u002F work-units and want the cross-vendor, Windows-correct\n  shape for the loop (who plans, who edits, where risky code runs, how the loop stops grinding).\n- You need a repo map \u002F context bundle **without** embeddings or a tree-sitter pipeline.\n- A work-unit is stuck and you must decide \"retry vs escalate vs re-decompose\".\n\n## When NOT to use\n- Wiring the Codex fan-out channel or the agent-mail back-channel itself → **`multi-ai-mingle`**.\n- Choosing among several *finished* candidate patches → **`execution-grounded-bon`** (execution\n  consensus), not this skill.\n- Running the smallest test for a diff in isolation → **`smallest-check-ladder`** (this skill\n  only wires its L0 into the per-edit loop).\n\n## The bus these ride (no new runtime)\n| Pattern | Existing rail it rides | New infra? |\n|---|---|---|\n| Architect→Editor split | `mcp__codex__codex` (mounted codex mcp-server) | none |\n| Sandbox ladder | WSL2 · `mcp__docker__*` · `mcp__cloud-hub__modal_sandbox_*` | none |\n| Serena PageRank repo-map | `mcp__plugin_serena_serena__*` (LSP edges) + `mcp__repomix__pack_codebase` | none |\n| Goose lead\u002Fworker escalation | Claude orchestrator (lead) + Task()\u002FCodex workers | none (pattern only) |\n| Per-edit lint ladder | `smallest-check-ladder` L0 (changed-file lint) | none |\n\n---\n\n## Pattern 1 — Architect→Editor split (cross-vendor per work-unit)\n\n**Shape.** The **architect** (this Opus session) reasons and emits a **typed change-spec** — a\nstructured object, not prose. The **editor** (Codex, via the mounted `mcp__codex__codex` thread)\napplies it. Planner and applier are **different model families**, so their failure modes are\nindependent (the same cross-vendor-diversity principle `execution-grounded-bon` exploits for\nconsensus, applied one level up at authoring time).\n\n**The typed change-spec is the handoff contract** (AGENTS.md §5 — hand off a *structured summary*,\nnever a raw-output prefix). One spec per work-unit:\n\n```yaml\nchange_spec:\n  wu_id: G7-example\n  file: src\u002Ffoo.py\n  anchor: { symbol: \"Foo.bar\" }          # symbol\u002Fline anchor, not a fuzzy \"the function that...\"\n  intent: \"clamp negative input to 0\"\n  before_invariant: \"bar(-1) raises\"\n  after_invariant:  \"bar(-1) == 0 and bar(2) unchanged\"\n  acceptance: \"pytest tests\u002Ftest_foo.py::test_bar_clamp  (must go red->green)\"\n  out_of_scope: [\"do not touch Foo.baz\"]  # scope fence (subagent discipline)\n```\n\nThen start a Codex editor thread with that spec as the task via `mcp__codex__codex`; continue by\n`threadId` (see `multi-ai-mingle` for the exact fan-out wiring). Fan out one Codex thread per WU\nfor parallel WUs.\n\n**Landmine (verified, MASTER G.7 \u002F #15451).** Codex `--output-schema` (asking Codex to return a\n*typed result*) is **silently ignored when MCP tools are active** in that Codex thread. So do not\nrely on a schema-typed Codex *return* when the editor thread also has MCP tools mounted — parse\nits result defensively, or run the typed-return exec lane with MCP tools off.\n\n**Why this over \"Opus does everything\".** Cross-vendor authoring catches the class of bug where a\nsingle model both writes and rationalizes the same wrong mental model. Keep the architect at\n`effort:xhigh` (planning\u002Farchitecture); the editor WU is mechanical application, eligible for\n`effort:medium` (council C2 Lever 1 — still Opus if you keep it in-family, or Codex for the\ndiversity).\n\n---\n\n## Pattern 2 — Sandbox ladder (the Windows constraint that kills the naive build)\n\n**The constraint.** Windows 11 has **no native OS-level process sandbox** (no Linux\nnamespaces\u002Fseccomp\u002Fcgroups). The naive plan — \"build a local sandbox to run risky exec\" — is\n**not buildable natively on Windows**. So do not build one. **Route** risky\u002Funtrusted exec up a\nladder of *already-built* isolation, choosing the **cheapest tier that contains the blast\nradius**:\n\n| Tier | Rail | Isolation | Use for |\n|---|---|---|---|\n| 0 · local | PowerShell \u002F Bash | none (owner's live machine) | known-safe, reversible ops only |\n| 1 · WSL2 | WSL2 shell \u002F native `\u002Fsandbox` | Linux namespaces, local FS | risky-but-local; the only place `\u002Fsandbox` is real on this box |\n| 2 · docker | `mcp__docker__create-container` → exec → `get-logs` → remove | container FS + net isolation, local | untrusted deps, network-shaping, throwaway builds |\n| 3 · modal | `mcp__cloud-hub__modal_sandbox_create` → `modal_sandbox_exec` → `modal_sandbox_terminate` | **remote ephemeral, zero local blast radius** | untrusted\u002Fhostile code, anything that must never touch the live machine; also the \"external by construction\" eval lane (C4\u002FF8) |\n\n**Rules.**\n- Never run untrusted or exploit-class code at Tier 0. On Windows the honest floor for \"risky\" is\n  **Tier 1** — hop into WSL2, because that is where a real sandbox exists.\n- Escalate a tier when the payload can reach the network hostilely, mutate outside its worktree,\n  or you cannot prove it reversible. Tier 3 (modal) is the containment ceiling — nothing it does\n  survives `modal_sandbox_terminate`.\n- Always tear the sandbox down (`remove` \u002F `modal_sandbox_terminate`) — leaked containers\u002Fsandboxes\n  are cost + drift.\n\n**Anti-overfit:** this is *routing to existing rails*, not a build. Do not stand up a bespoke\nsandbox service (SKIP-list: no new runtime).\n\n---\n\n## Pattern 3 — Serena-seeded PageRank repo-map (no tree-sitter, no vector)\n\n**Goal.** Seed a fixed context-token budget with the **most central code** for the current\nwork-unit (the Aider repo-map idea) so agents point at the right symbols instead of blind-grepping\na whole tree.\n\n**Build it off the LSP, not off a parser or embeddings.**\n1. **Nodes** = symbols\u002Ffiles. Enumerate with `mcp__plugin_serena_serena__get_symbols_overview` \u002F\n   `find_symbol`.\n2. **Edges** = real reference relations from `mcp__plugin_serena_serena__find_referencing_symbols`\n   (and `find_implementations` \u002F `find_declaration`). These are the **language server's actual\n   reference graph** — semantically accurate, no tree-sitter heuristic re-parse, no chunker.\n3. **Rank** = **personalized PageRank** over that directed graph, personalized toward the files the\n   current WU touches (bias centrality to the change surface). Top-K symbols → the context bundle.\n4. **Pack once, share** = `mcp__repomix__pack_codebase` on the top-K, then N agents grep the one\n   pack (C1\u002Fcost doctrine: pack-once, byte-stable shared prefix for cache hits).\n\n**Why not the alternatives.** The SKIP-list rejects vector-DB\u002Fembedding recall (mem0\u002FOpenMemory\u002F\ncodanna\u002FChunkHound\u002Fgrepai) and tree-sitter chunkers. This rides the **already-mounted Serena** →\nnet-zero new infra, and the LSP edges are *more* precise than a tree-sitter approximation.\n\n**Honest precondition.** Serena is currently **\"disabled-yet-mounted\"** on this workspace (the H.1\nSerena split-brain, pending an in\u002Fout decision). Before relying on this pattern:\n`mcp__plugin_serena_serena__activate_project` on the target repo and confirm the LSP responds\n(`get_current_config`). **Fallback if Serena is out:** rank by import\u002Freference degree from a\n`repomix` pack (coarser, no LSP) or skip the map — never fabricate a ranking.\n\n---\n\n## Pattern 4 — Goose-style lead\u002Fworker failure-threshold escalation\n\n**Shape (concrete trigger for the planned MaAS \u002F A5 layer).** Borrow Block's Goose lead\u002Fworker\nloop — the **pattern, not the runtime** (SKIP-list: copy the loop shape, do not install a 2nd\norchestrator). On this box the **lead = the Claude orchestrator**; **workers = Task() subagents +\nCodex threads**.\n\n- Track **per-WU consecutive failures** (a worker's `FAILED:\u003Cid>` terminal markers, §4).\n- On the **Nth failure (threshold, default N=3)**, the worker **does NOT relaunch identically**.\n  It **escalates to the lead**, which **re-decomposes** (split the WU smaller), **re-routes**\n  (hand the stuck WU cross-vendor — e.g. Codex if Claude is stuck, or vice-versa), or asks the\n  owner. This is the mechanism form of the two-strikes-pivot \u002F anti-tunnel-vision rule\n  (AGENTS.md §2\u002F§4b).\n- The escalation carries a **structured summary** (§5), not the failed worker's raw transcript.\n\n**Why a threshold.** Identical retries past the threshold are the sunk-cost grind\n(`fresh-context-verify` exists for exactly this). Escalation converts \"grind harder\" into\n\"re-plan \u002F diversify\" — the failure becomes a routing signal, not a loop.\n\n---\n\n## Pattern 5 — Per-edit lint ladder + reflection cap (max_reflections=3)\n\n**Shape.** After **each edit**, run the **smallest check on changed files only** —\n`smallest-check-ladder` **L0** (lint the edited file), never the whole suite on every keystroke.\nProportionate, cheap, fast feedback.\n\n- If L0 fails: **reflect + fix**, but **cap at `max_reflections=3`**.\n- On the **3rd** failed reflection: **escalate** (Pattern 4 — to the lead \u002F cross-vendor \u002F owner).\n  **Do not grind.** Three self-corrections on the same edit that still fails means the mental\n  model is wrong, not the syntax.\n- Ladder *up* the check (L1 impacted tests → L2 full suite → L3 e2e) only at WU boundaries, not\n  per edit — full-suite-per-edit is the latency anti-pattern.\n\n**Advisory only.** This is guidance for the agent's own edit loop; it is **not** an auto-blocking\nhook. Log the reflection count; never hard-block a commit and never nag on it.\n\n---\n\n## Shadow-mode \u002F advisory posture (council C5)\n\nThis skill is **advisory documentation** — Claude reads it and applies the patterns. There is **no\nauto-firing dispatcher hook here, so there is nothing to \"shadow\"** in the gate sense. Where a\npattern touches a would-be gate (the lint-ladder reflection cap, the failure-threshold), follow it\nin **observe\u002Fadvise mode**: record the signal to a bounded sink, never hard-block, never nag. If\nany of these are ever promoted into an actual dispatcher branch, they enter the standard\n**OFF → SHADOW → ADVISE → ENFORCE** ladder like every other gate (C5), under the C1 net-zero\nalways-on cap. Safety-class routing (e.g. \"untrusted code must not run at Tier 0\") is the one\npart that is a fail-closed invariant, not a shadowed heuristic (C5 tier-1 \u002F AGENTS.md §9).\n\n## Anti-overfit boundary (what this deliberately does NOT build)\n- **No 2nd orchestration runtime** — Goose is a copied loop shape, not an installed engine.\n- **No vector\u002FKG\u002Fembedding repo-map and no tree-sitter chunker** — the map rides Serena LSP edges.\n- **No local sandbox build** — the ladder routes to WSL2 \u002F docker \u002F modal, all already mounted.\n- **No trained router \u002F learned critic** — routing is deterministic (risk-class → tier, failure\n  count → escalate).\nAll five ride the existing bus; each adds a *pattern*, not a standing service.\n\n## Testing \u002F real proof (how this file was validated)\n- YAML frontmatter parses and carries `name` + `description`; description contains **no angle\n  brackets** (`quick_validate.py` constraint).\n- Every load-bearing tool name cited resolves in this environment: `mcp__codex__codex`,\n  `mcp__docker__create-container`, `mcp__cloud-hub__modal_sandbox_create` \u002F\n  `modal_sandbox_exec` \u002F `modal_sandbox_terminate`,\n  `mcp__plugin_serena_serena__find_referencing_symbols` \u002F `get_symbols_overview` \u002F\n  `activate_project`, `mcp__repomix__pack_codebase`.\n- Cross-referenced sibling skills exist: `multi-ai-mingle`, `execution-grounded-bon`,\n  `smallest-check-ladder`, `fresh-context-verify`.\n\n## Evidence\nMASTER-DECISION-QUEUE.md **§G.7** (Orchestration mechanics, teardown-agents [REC]):\nArchitect→Editor split · Goose lead\u002Fworker failure-threshold escalation · Serena-seeded PageRank\nrepo-map (build-path pivot for 6.4) · sandbox ladder (Windows constraint kills the naive 6.2\nbuild) · typed Codex `--output-schema` landmine (#15451) · per-edit lint ladder + `max_reflections=3`.\nCOUNCIL-VERDICT.md **C1** (net-zero cap \u002F pack-once) · **C2** (effort:medium for mechanical editor\nWUs) · **C5** (shadow\u002Fadvisory posture). Anti-overfit SKIP-list: MASTER §2 (no 2nd runtime, no\nvector\u002FKG memory, no tree-sitter, no trained router).\n","# orchestration-patterns\n\nFive orchestration patterns that ride the **already-mounted bus** on this Windows 11 machine\n(codex mcp-server, Serena LSP, the docker + cloud-hub\u002Fmodal MCPs, WSL2, the smallest-check\nladder). They are **advisory patterns Claude applies while orchestrating** — not a new runtime,\nnot a new gate, not a hook. Every one deliberately re-uses existing infrastructure rather than\nbuilding a parallel stack (the anti-overfit gate: no 2nd orchestration runtime, no vector\u002FKG\nmemory engine, no tree-sitter chunker, no local sandbox build, no trained router).\n\n## When to use\n- You are decomposing work into agents \u002F work-units and want the cross-vendor, Windows-correct\n  shape for the loop (who plans, who edits, where risky code runs, how the loop stops grinding).\n- You need a repo map \u002F context bundle **without** embeddings or a tree-sitter pipeline.\n- A work-unit is stuck and you must decide \"retry vs escalate vs re-decompose\".\n\n## When NOT to use\n- Wiring the Codex fan-out channel or the agent-mail back-channel itself → **`multi-ai-mingle`**.\n- Choosing among several *finished* candidate patches → **`execution-grounded-bon`** (execution\n  consensus), not this skill.\n- Running the smallest test for a diff in isolation → **`smallest-check-ladder`** (this skill\n  only wires its L0 into the per-edit loop).\n\n## The bus these ride (no new runtime)\n| Pattern | Existing rail it rides | New infra? |\n|---|---|---|\n| Architect→Editor split | `mcp__codex__codex` (mounted codex mcp-server) | none |\n| Sandbox ladder | WSL2 · `mcp__docker__*` · `mcp__cloud-hub__modal_sandbox_*` | none |\n| Serena PageRank repo-map | `mcp__plugin_serena_serena__*` (LSP edges) + `mcp__repomix__pack_codebase` | none |\n| Goose lead\u002Fworker escalation | Claude orchestrator (lead) + Task()\u002FCodex workers | none (pattern only) |\n| Per-edit lint ladder | `smallest-check-ladder` L0 (changed-file lint) | none |\n\n---\n\n## Pattern 1 — Architect→Editor split (cross-vendor per work-unit)\n\n**Shape.** The **architect** (this Opus session) reasons and emits a **typed change-spec** — a\nstructured object, not prose. The **editor** (Codex, via the mounted `mcp__codex__codex` thread)\napplies it. Planner and applier are **different model families**, so their failure modes are\nindependent (the same cross-vendor-diversity principle `execution-grounded-bon` exploits for\nconsensus, applied one level up at authoring time).\n\n**The typed change-spec is the handoff contract** (AGENTS.md §5 — hand off a *structured summary*,\nnever a raw-output prefix). One spec per work-unit:\n\n```yaml\nchange_spec:\n  wu_id: G7-example\n  file: src\u002Ffoo.py\n  anchor: { symbol: \"Foo.bar\" }          # symbol\u002Fline anchor, not a fuzzy \"the function that...\"\n  intent: \"clamp negative input to 0\"\n  before_invariant: \"bar(-1) raises\"\n  after_invariant:  \"bar(-1) == 0 and bar(2) unchanged\"\n  acceptance: \"pytest tests\u002Ftest_foo.py::test_bar_clamp  (must go red->green)\"\n  out_of_scope: [\"do not touch Foo.baz\"]  # scope fence (subagent discipline)\n```\n\nThen start a Codex editor thread with that spec as the task via `mcp__codex__codex`; continue by\n`threadId` (see `multi-ai-mingle` for the exact fan-out wiring). Fan out one Codex thread per WU\nfor parallel WUs.\n\n**Landmine (verified, MASTER G.7 \u002F #15451).** Codex `--output-schema` (asking Codex to return a\n*typed result*) is **silently ignored when MCP tools are active** in that Codex thread. So do not\nrely on a schema-typed Codex *return* when the editor thread also has MCP tools mounted — parse\nits result defensively, or run the typed-return exec lane with MCP tools off.\n\n**Why this over \"Opus does everything\".** Cross-vendor authoring catches the class of bug where a\nsingle model both writes and rationalizes the same wrong mental model. Keep the architect at\n`effort:xhigh` (planning\u002Farchitecture); the editor WU is mechanical application, eligible for\n`effort:medium` (council C2 Lever 1 — still Opus if you keep it in-family, or Codex for the\ndiversity).\n\n---\n\n## Pattern 2 — Sandbox ladder (the Windows constraint that kills the naive build)\n\n**The constraint.** Windows 11 has **no native OS-level process sandbox** (no Linux\nnamespaces\u002Fseccomp\u002Fcgroups). The naive plan — \"build a local sandbox to run risky exec\" — is\n**not buildable natively on Windows**. So do not build one. **Route** risky\u002Funtrusted exec up a\nladder of *already-built* isolation, choosing the **cheapest tier that contains the blast\nradius**:\n\n| Tier | Rail | Isolation | Use for |\n|---|---|---|---|\n| 0 · local | PowerShell \u002F Bash | none (owner's live machine) | known-safe, reversible ops only |\n| 1 · WSL2 | WSL2 shell \u002F native `\u002Fsandbox` | Linux namespaces, local FS | risky-but-local; the only place `\u002Fsandbox` is real on this box |\n| 2 · docker | `mcp__docker__create-container` → exec → `get-logs` → remove | container FS + net isolation, local | untrusted deps, network-shaping, throwaway builds |\n| 3 · modal | `mcp__cloud-hub__modal_sandbox_create` → `modal_sandbox_exec` → `modal_sandbox_terminate` | **remote ephemeral, zero local blast radius** | untrusted\u002Fhostile code, anything that must never touch the live machine; also the \"external by construction\" eval lane (C4\u002FF8) |\n\n**Rules.**\n- Never run untrusted or exploit-class code at Tier 0. On Windows the honest floor for \"risky\" is\n  **Tier 1** — hop into WSL2, because that is where a real sandbox exists.\n- Escalate a tier when the payload can reach the network hostilely, mutate outside its worktree,\n  or you cannot prove it reversible. Tier 3 (modal) is the containment ceiling — nothing it does\n  survives `modal_sandbox_terminate`.\n- Always tear the sandbox down (`remove` \u002F `modal_sandbox_terminate`) — leaked containers\u002Fsandboxes\n  are cost + drift.\n\n**Anti-overfit:** this is *routing to existing rails*, not a build. Do not stand up a bespoke\nsandbox service (SKIP-list: no new runtime).\n\n---\n\n## Pattern 3 — Serena-seeded PageRank repo-map (no tree-sitter, no vector)\n\n**Goal.** Seed a fixed context-token budget with the **most central code** for the current\nwork-unit (the Aider repo-map idea) so agents point at the right symbols instead of blind-grepping\na whole tree.\n\n**Build it off the LSP, not off a parser or embeddings.**\n1. **Nodes** = symbols\u002Ffiles. Enumerate with `mcp__plugin_serena_serena__get_symbols_overview` \u002F\n   `find_symbol`.\n2. **Edges** = real reference relations from `mcp__plugin_serena_serena__find_referencing_symbols`\n   (and `find_implementations` \u002F `find_declaration`). These are the **language server's actual\n   reference graph** — semantically accurate, no tree-sitter heuristic re-parse, no chunker.\n3. **Rank** = **personalized PageRank** over that directed graph, personalized toward the files the\n   current WU touches (bias centrality to the change surface). Top-K symbols → the context bundle.\n4. **Pack once, share** = `mcp__repomix__pack_codebase` on the top-K, then N agents grep the one\n   pack (C1\u002Fcost doctrine: pack-once, byte-stable shared prefix for cache hits).\n\n**Why not the alternatives.** The SKIP-list rejects vector-DB\u002Fembedding recall (mem0\u002FOpenMemory\u002F\ncodanna\u002FChunkHound\u002Fgrepai) and tree-sitter chunkers. This rides the **already-mounted Serena** →\nnet-zero new infra, and the LSP edges are *more* precise than a tree-sitter approximation.\n\n**Honest precondition.** Serena is currently **\"disabled-yet-mounted\"** on this workspace (the H.1\nSerena split-brain, pending an in\u002Fout decision). Before relying on this pattern:\n`mcp__plugin_serena_serena__activate_project` on the target repo and confirm the LSP responds\n(`get_current_config`). **Fallback if Serena is out:** rank by import\u002Freference degree from a\n`repomix` pack (coarser, no LSP) or skip the map — never fabricate a ranking.\n\n---\n\n## Pattern 4 — Goose-style lead\u002Fworker failure-threshold escalation\n\n**Shape (concrete trigger for the planned MaAS \u002F A5 layer).** Borrow Block's Goose lead\u002Fworker\nloop — the **pattern, not the runtime** (SKIP-list: copy the loop shape, do not install a 2nd\norchestrator). On this box the **lead = the Claude orchestrator**; **workers = Task() subagents +\nCodex threads**.\n\n- Track **per-WU consecutive failures** (a worker's `FAILED:\u003Cid>` terminal markers, §4).\n- On the **Nth failure (threshold, default N=3)**, the worker **does NOT relaunch identically**.\n  It **escalates to the lead**, which **re-decomposes** (split the WU smaller), **re-routes**\n  (hand the stuck WU cross-vendor — e.g. Codex if Claude is stuck, or vice-versa), or asks the\n  owner. This is the mechanism form of the two-strikes-pivot \u002F anti-tunnel-vision rule\n  (AGENTS.md §2\u002F§4b).\n- The escalation carries a **structured summary** (§5), not the failed worker's raw transcript.\n\n**Why a threshold.** Identical retries past the threshold are the sunk-cost grind\n(`fresh-context-verify` exists for exactly this). Escalation converts \"grind harder\" into\n\"re-plan \u002F diversify\" — the failure becomes a routing signal, not a loop.\n\n---\n\n## Pattern 5 — Per-edit lint ladder + reflection cap (max_reflections=3)\n\n**Shape.** After **each edit**, run the **smallest check on changed files only** —\n`smallest-check-ladder` **L0** (lint the edited file), never the whole suite on every keystroke.\nProportionate, cheap, fast feedback.\n\n- If L0 fails: **reflect + fix**, but **cap at `max_reflections=3`**.\n- On the **3rd** failed reflection: **escalate** (Pattern 4 — to the lead \u002F cross-vendor \u002F owner).\n  **Do not grind.** Three self-corrections on the same edit that still fails means the mental\n  model is wrong, not the syntax.\n- Ladder *up* the check (L1 impacted tests → L2 full suite → L3 e2e) only at WU boundaries, not\n  per edit — full-suite-per-edit is the latency anti-pattern.\n\n**Advisory only.** This is guidance for the agent's own edit loop; it is **not** an auto-blocking\nhook. Log the reflection count; never hard-block a commit and never nag on it.\n\n---\n\n## Shadow-mode \u002F advisory posture (council C5)\n\nThis skill is **advisory documentation** — Claude reads it and applies the patterns. There is **no\nauto-firing dispatcher hook here, so there is nothing to \"shadow\"** in the gate sense. Where a\npattern touches a would-be gate (the lint-ladder reflection cap, the failure-threshold), follow it\nin **observe\u002Fadvise mode**: record the signal to a bounded sink, never hard-block, never nag. If\nany of these are ever promoted into an actual dispatcher branch, they enter the standard\n**OFF → SHADOW → ADVISE → ENFORCE** ladder like every other gate (C5), under the C1 net-zero\nalways-on cap. Safety-class routing (e.g. \"untrusted code must not run at Tier 0\") is the one\npart that is a fail-closed invariant, not a shadowed heuristic (C5 tier-1 \u002F AGENTS.md §9).\n\n## Anti-overfit boundary (what this deliberately does NOT build)\n- **No 2nd orchestration runtime** — Goose is a copied loop shape, not an installed engine.\n- **No vector\u002FKG\u002Fembedding repo-map and no tree-sitter chunker** — the map rides Serena LSP edges.\n- **No local sandbox build** — the ladder routes to WSL2 \u002F docker \u002F modal, all already mounted.\n- **No trained router \u002F learned critic** — routing is deterministic (risk-class → tier, failure\n  count → escalate).\nAll five ride the existing bus; each adds a *pattern*, not a standing service.\n\n## Testing \u002F real proof (how this file was validated)\n- YAML frontmatter parses and carries `name` + `description`; description contains **no angle\n  brackets** (`quick_validate.py` constraint).\n- Every load-bearing tool name cited resolves in this environment: `mcp__codex__codex`,\n  `mcp__docker__create-container`, `mcp__cloud-hub__modal_sandbox_create` \u002F\n  `modal_sandbox_exec` \u002F `modal_sandbox_terminate`,\n  `mcp__plugin_serena_serena__find_referencing_symbols` \u002F `get_symbols_overview` \u002F\n  `activate_project`, `mcp__repomix__pack_codebase`.\n- Cross-referenced sibling skills exist: `multi-ai-mingle`, `execution-grounded-bon`,\n  `smallest-check-ladder`, `fresh-context-verify`.\n\n## Evidence\nMASTER-DECISION-QUEUE.md **§G.7** (Orchestration mechanics, teardown-agents [REC]):\nArchitect→Editor split · Goose lead\u002Fworker failure-threshold escalation · Serena-seeded PageRank\nrepo-map (build-path pivot for 6.4) · sandbox ladder (Windows constraint kills the naive 6.2\nbuild) · typed Codex `--output-schema` landmine (#15451) · per-edit lint ladder + `max_reflections=3`.\nCOUNCIL-VERDICT.md **C1** (net-zero cap \u002F pack-once) · **C2** (effort:medium for mechanical editor\nWUs) · **C5** (shadow\u002Fadvisory posture). Anti-overfit SKIP-list: MASTER §2 (no 2nd runtime, no\nvector\u002FKG memory, no tree-sitter, no trained router).\n",{"name":5,"description":7},"main","a298c929b6cbd662e1fce54302ce520d5ceea1a5",".agents\u002Fskills\u002Forchestration-patterns","https:\u002F\u002Fgithub.com\u002FPrekzursil\u002Fagent-skills-toolchain","https:\u002F\u002Fgithub.com\u002FPrekzursil","2026-11-02 14:30:57",{"source":8,"skillName":5,"commands":56,"prompt":66,"zipAvailable":67},[57,60,63],{"tool":58,"command":59},"npx","npx skills add Prekzursil\u002Fagent-skills-toolchain --skill orchestration-patterns",{"tool":61,"command":62},"bunx","bunx skills add Prekzursil\u002Fagent-skills-toolchain --skill orchestration-patterns",{"tool":64,"command":65},"pnpm","pnpm dlx skills add Prekzursil\u002Fagent-skills-toolchain --skill orchestration-patterns","安装技能，技能地址：https:\u002F\u002Fgithub.com\u002FPrekzursil\u002Fagent-skills-toolchain\u002Fblob\u002Fmain\u002F.agents\u002Fskills\u002Forchestration-patterns\u002FSKILL.md",true,[69,75,79],{"path":70,"resourceType":71,"resourceTypeDesc":72,"sizeBytes":73,"sourceHtmlUrl":74},"METHOD-NOTES.md","REFERENCE","参考文档",13870,"https:\u002F\u002Fgithub.com\u002Fnexuslinkproductions\u002Fyuri-os\u002Fblob\u002Fmain\u002F.claude\u002Fskills\u002Fcgs-mold\u002FMETHOD-NOTES.md",{"path":76,"resourceType":71,"resourceTypeDesc":72,"sizeBytes":77,"sourceHtmlUrl":78},"params\u002Fhk45.json",1785,"https:\u002F\u002Fgithub.com\u002Fnexuslinkproductions\u002Fyuri-os\u002Fblob\u002Fmain\u002F.claude\u002Fskills\u002Fcgs-mold\u002Fparams\u002Fhk45.json",{"path":80,"resourceType":81,"resourceTypeDesc":82,"sizeBytes":83,"sourceHtmlUrl":84},"scripts\u002Fcgs_mold.py","SCRIPT","脚本",15851,"https:\u002F\u002Fgithub.com\u002Fnexuslinkproductions\u002Fyuri-os\u002Fblob\u002Fmain\u002F.claude\u002Fskills\u002Fcgs-mold\u002Fscripts\u002Fcgs_mold.py",[86,108,133,160,174,189],{"skillNo":87,"name":88,"nameZh":6,"description":89,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":15,"licenseFileUrl":6,"sourceHtmlUrl":90,"categories":91,"keywords":92,"publishedAt":44},"01M6DF7D7478R55P46REYH4QAC","clarify-requirements","Resolve genuine pre-execution ambiguity by scanning repo context, generating 1-6 grounded options, and asking 1-3 focused questions via AskUserQuestion. NOT for mid-task use (injection risk); NOT when the goal is already unambiguous; use to disambiguate vague prompts before any file edits.","https:\u002F\u002Fgithub.com\u002FPrekzursil\u002Fagent-skills-toolchain\u002Fblob\u002Fmain\u002Ftools\u002Fworkspace-hooks\u002Fskills\u002Fclarify-requirements\u002FSKILL.md",[],[93,94,95,96,97,98,99,100,101,102,103,104,105,106,107],"clarify requirements","clarify","requirements","risk","options","task","prompts","goal","scanning","use","context","repo","injection","execution","file",{"skillNo":109,"name":110,"nameZh":6,"description":111,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":15,"licenseFileUrl":6,"sourceHtmlUrl":112,"categories":113,"keywords":115,"publishedAt":44},"01M6DF79CA4BHJS66J8EZDBPWJ","openmm-md","Run FREE, open-source, Windows-native GPU molecular dynamics via the openmm-md MCP (OpenMM + CUDA on the local NVIDIA GPU). Use for protein \u002F protein-ligand MD when you want a free stack or are on Windows without a Schrodinger license. Covers the full workflow (prepare, solvate, minimize, equilibrate, production, analyze, mmgbsa) AND an honest decision guide vs Schrodinger Desmond, including how to run Desmond legitimately on Linux or a cloud GPU with a real license. This is a deliberately LESSER free alternative and does NOT replace the schrodinger MCP tools. Do NOT use it to pick a free tool when a validated FEP+, WaterMap, IFD-MD, or Prime MM-GBSA result is actually required.","https:\u002F\u002Fgithub.com\u002FPrekzursil\u002Fagent-skills-toolchain\u002Fblob\u002Fmain\u002Ftools\u002Fmcp\u002Fopenmm-md-mcp\u002Fskill\u002Fopenmm-md\u002FSKILL.md",[114],{"categoryNo":19,"categoryName":20,"taxonomyType":21,"taxonomyTypeDesc":22},[116,117,118,119,120,121,122,123,124,125,126,127,35,128,102,129,130,131,132,28],"openmm md","how","decision","pick","linux","analyze","tool","stack","open","NVIDIA","gpu","license","windows","free","molecular dynamics","local","do",{"skillNo":134,"name":135,"nameZh":6,"description":136,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":15,"licenseFileUrl":6,"sourceHtmlUrl":137,"categories":138,"keywords":145,"publishedAt":44},"01M6DF76C1MG85VEWP8VZCBNMN","visual-review","Take screenshots of web pages and UI using Playwright for visual review and iteration","https:\u002F\u002Fgithub.com\u002FPrekzursil\u002Fagent-skills-toolchain\u002Fblob\u002Fmain\u002Ftools\u002Feditor\u002Fmetaswarm\u002Fskills\u002Fvisual-review\u002FSKILL.md",[139,142],{"categoryNo":140,"categoryName":141,"taxonomyType":21,"taxonomyTypeDesc":22},"01JBSEEDCAT000000000000003","演示文稿",{"categoryNo":143,"categoryName":144,"taxonomyType":21,"taxonomyTypeDesc":22},"01JBSEEDCAT000000000000008","测试与质量",[146,147,148,149,150,151,152,153,154,155,117,156,157,158,159],"review","visual","visual review","pages","web","false","iteration","take","check","slides","ui","screenshot","playwright","screenshots",{"skillNo":161,"name":162,"nameZh":6,"description":163,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":15,"licenseFileUrl":6,"sourceHtmlUrl":164,"categories":165,"keywords":166,"publishedAt":44},"01M6DF73AQVCBZKEN0YXEX9FXP","status","Diagnostic status report — shows metaswarm installation state, project setup, and potential issues","https:\u002F\u002Fgithub.com\u002FPrekzursil\u002Fagent-skills-toolchain\u002Fblob\u002Fmain\u002Ftools\u002Feditor\u002Fmetaswarm\u002Fskills\u002Fstatus\u002FSKILL.md",[],[162,167,168,169,170,171,172,173],"setup","report","project","installation","project setup","issues","state",{"skillNo":175,"name":176,"nameZh":6,"description":177,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":15,"licenseFileUrl":6,"sourceHtmlUrl":178,"categories":179,"keywords":181,"publishedAt":44},"01M6DF6X6C2XB0P6GX76P7TTYV","start","Use when starting work on any task, when the user mentions metaswarm, or when the user wants to begin tracked development work","https:\u002F\u002Fgithub.com\u002FPrekzursil\u002Fagent-skills-toolchain\u002Fblob\u002Fmain\u002Ftools\u002Feditor\u002Fmetaswarm\u002Fskills\u002Fstart\u002FSKILL.md",[180],{"categoryNo":19,"categoryName":20,"taxonomyType":21,"taxonomyTypeDesc":22},[176,182,98,183,184,185,102,186,39,187,188],"start issue","issue","ready","work on issue","user","work on","development",{"skillNo":190,"name":167,"nameZh":6,"description":191,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":15,"licenseFileUrl":6,"sourceHtmlUrl":192,"categories":193,"keywords":194,"publishedAt":44},"01M6DF6QMJ9AJKFKHHKRT005PQ","Interactive project setup — detects your project, configures metaswarm, writes project-local files","https:\u002F\u002Fgithub.com\u002FPrekzursil\u002Fagent-skills-toolchain\u002Fblob\u002Fmain\u002Ftools\u002Feditor\u002Fmetaswarm\u002Fskills\u002Fsetup\u002FSKILL.md",[],[167,169,131,195,171,196],"files","interactive"]