Back to skills
SKILL.md
Orchestrator
ASecurityAdaptive multi-agent build & review router (Tier S/M/L, Wave DAGs). Use for `orchestrator`, `/orchestrator`, "điều phối tối ưu", "tự chọn luồng và model tối ưu", or automatic task routing; not when a specific pipeline is named.
- 2 stars
- 0 votes
- 0 copies
- 0 views
- Added December 5, 2026
Works with
Security analysis
100/100npx -y skills add hothiennhan021/ai-review-skills --skill orchestrator --agent claude-codeAre you the author of Orchestrator?
Add the live security badge to your README. It updates with every re-scan.
[](https://www.skillsdirectory.com/skills/hothiennhan021-orchestrator)---
name: orchestrator
description: >-
Adaptive multi-agent build & review router (Tier S/M/L, Wave DAGs). Use for
`orchestrator`, `/orchestrator`, "điều phối tối ưu", "tự chọn luồng và model
tối ưu", or automatic task routing; not when a specific pipeline is named.
---
# Adaptive Master Orchestrator v3 (`orchestrator`)
Engine: `$af = "$env:USERPROFILE\.gemini\config\ai-flow.ps1"` (fallback `"D:\ai-review-skills\scripts\ai-flow.ps1"`).
## 1. Profiles
| Profile | Brain | Scout | Worker(s) | Review Gate |
|---|---|---|---|---|
| **`native`** | Antigravity (`inherit`) | Subagent `flash_lite`/`flash` | `inherit` / `run_workflow` `branch` | Sharded `run_workflow` (`inherit`) |
| **`eco`** | Antigravity (`inherit`) | `ai-flow map` / `codex low` | `inherit` / `ask-codex -Mode write` | `ask-codex -Mode readonly` |
| **`balanced`** *(Default)* | `ask-claude -Profile brain` | `ai-flow map` / `flash` | `inherit` / `ask-codex -Mode write` | `parallel-review` (`claude`+`codex`) |
| **`council`** | `ask-claude -Profile brain` (`high`) | `map` + `codex low` | `wave-init` / `branch` workers | `parallel-review` + `run_workflow` |
*Standalone PS 5.1 fallbacks*:
- Claude Brain (`C:\Users\Public\ai-flow-clean-cwd`): `cmd --% /d /s /c ""claude.exe" -p --tools="" --disable-slash-commands --strict-mcp-config --no-chrome --exclude-dynamic-system-prompt-sections --no-session-persistence --effort medium < in.md > out.md 2> err.log"`
- Codex (`readonly`/`write`): `cmd --% /d /s /c ""codex.exe" exec -s read-only --ephemeral -c "mcp_servers={}" -c "plugins={}" -c "notify=[]" --disable plugins --disable apps --disable browser_use --disable computer_use --disable image_generation -c "model_reasoning_effort='medium'" -o out.md - < in.md > log.txt 2> err.log"` *(use `-s workspace-write -c "approval_policy='never'"` for write)*
## 2. Token Invariants
- **Firewall (`< 35k` tok)**: Compress checks via `& $af -Action verify -CommandLine "<cmd>"`; delegate broad scans to `flash` subagents.
- **Static-Prefix (`75%–90%` KV Cache)**: `& $af -Action pack` orders `[Static Role & JSONL Contract] -> [Scoped Spec (Global + Active Wave)] -> [EOF-Append ISSUES_LEDGER.md] -> [Round Delta + 1-Hop Callers]`.
- **Findings**: Emit `APPROVED_NO_ISSUES`, or 1-line JSONL `{"id":"F-01","s":"P0","f":"path:line","w":"trace","x":"fix"}`.
## 3. Workflow
1. **Phase 0 (`init` & Triage)**:
- **Tier S (`<= 2` files)**: Edit → `verify` → 1-pass `slice-diff` + `ask-codex -Mode readonly`.
- **Tier M (`3–15` files)**: `map -Targets` → 1-call `WAVE_SPEC.md` → build → `parallel-review` → batch fix.
- **Tier L (`> 15` files)**: Full Wave DAG + Sharded Council below.
2. **Phase 1 (Grounded 1-Call Spec)**: Run `& $af -Action map -Targets <files>` (`flash`/`codex low` scout if `> 3` files have hidden dataflow). Pack `[Verbatim Prompt] + [REPO_MAP.md + TARGET_SLICE.md]` → Brain (`-Profile brain` if `truncated=False`, else `-Profile review`) locks `.ai-workflow/WAVE_SPEC.md` (`## Global Invariants & Shared Contracts` with exact interfaces/ports/FSM/schemas, edge cases & explicit `DO-NOTs`, `Wave 1..k` with disjoint `owned_files`, `## Acceptance Checklist` & verification commands).
3. **Phase 2 (Wave Execution)**: Single task runs in workspace (`pack -Milestone` + `TARGET_SLICE.md`). Concurrent tasks use `run_workflow` `workspace="branch"` (`native`) or `& $af -Action wave-init -WaveTask <id>` → worker → `& $af -Action wave-merge -WaveTask <id> -OwnedFiles <list>`. Run `-Action verify` at each wave barrier.
4. **Phase 3 (Convergence, `MAX_ROUNDS = 5`)**: `slice-diff -Round $r` (`-FullCumulative` on final gate) → `pack` → `parallel-review` → `ledger-append` → batch fix → `verify` until `APPROVED_NO_ISSUES` (fail-fast to `STATE.md` on quota/auth error or 2 zero-diff rounds).
**Report**: (1) Profile/Tier, (2) Waves/shards, (3) Ledger fixes/rejections, (4) Verification metrics.
Attribution
Related skills
View all in ai-agents →Comments
Loading comments…
Newsletter
Get the weekly list of safe new skills, and the ones we pulled.