CliRouter is the project name. The internal routing skill lives under skills/src/CliRouter and delegates agent-level tasks to installed CLIs from CodeX or AntiGravity.
- Routes requests such as
gac,kimi,codex,claude,gemini, andkimicc-backed profile names to the right local backend - Treats
gac,kimi,codex,claude, andgeminias standalone launchers when they are present in PATH - Treats
kimiccas the profile host, withglm,minimax,mimo,qwen, anddeepseekmapped throughkimiccprofiles - Treats
glm,minimax,mimo,qwen, anddeepseekaskimiccprofile names, not standalone CLIs - Treats
glmas the preferredkimicc --glmentry, with--profile glmas fallback - Records each backend's model-routing surface and selection constraints so routing can choose for speed, quality, or parallel fanout without requiring the user to hand-write CLI flags
- Applies lightweight budget-aware routing so cheap/standard/premium task packets can cap high-cost backends and lane count before execution
- Normalizes compound phrases like
kimi cli,codex cli, andclaude codeto their backend tokens - In interactive handoff, launches the backend first and submits the task prompt through the PTY instead of appending it to the command line
- The submitted prompt should explicitly allow the backend to use its own Agents / sub-agent capability when that helps complete the task
- Preserves a single canonical skill source under
skills/src/CliRouter - Supports both interactive handoff and deterministic
--printvalidation runs - Includes an interactive fanout MVP that launches independent interactive lanes, captures per-lane summary/status, and keeps lane-level run artifacts without shared live terminal control
- Includes a rule-based natural-language front-end that can infer a task packet from a user request before dispatch
- Freezes the stable-release surface around the registry-backed router, the validation gate, and the remaining five-item release checklist
- Records each delegated run as a structured artifact under
artifacts/runs/<run_id>/
CliRouter exists to turn external CLIs into observable capabilities inside CodeX or AntiGravity.
The success criteria are not just "the command started". A delegated run should make at least one of these visible:
- a final result or artifact path
- a visible progress signal such as launch, profile selection, or busy state
- a structured failure reason such as timeout, missing profile, or non-zero exit
If the integration only proves that a process was launched, but nothing about result, progress, or failure can be observed, that is not a complete delegation path yet.
The trigger surface is registry-backed. When a new launcher is added later, it should be added to the trigger vocabulary, backend registry, and model-routing reference together instead of being hardcoded in multiple places.
skills/src/CliRouter/: canonical skill sourceskills/registry.toml: registry for the skill packageskills/src/CliRouter/references/backend-registry.json: machine-readable backend registry for router policy, router defaults, family grouping, capability flags, and default model selectionskills/src/CliRouter/references/router-logic.md: logic diagram for routing, health, fanout, and synthesisskills/src/CliRouter/references/v2-execution-plan.md: execution plan and end-to-end acceptance matrix for the current V2 rolloutskills/src/CliRouter/references/stable-release-plan.md: frozen stable-release plan and external surface definitionskills/src/CliRouter/references/stable-release-checklist.md: the remaining five-item checklist for reaching a stable releaseskills/src/CliRouter/scripts/infer_task_packet.py: rule-based front-end that normalizes natural language into a dispatcher-ready task packet.codex/skillsand.agents/skills: local projections for tool discoveryscripts/validation/check_project_skill_links.sh: validates the repository projectionsscripts/install-global-symlinks.sh: installs global home-directory symlinks for this machinedocs/codex-plugin-cc-learning-notes.md: concise learning reference for the Codex-plugin-cc bridge architectureartifacts/: runtime output, intentionally not versioned
bash scripts/install-global-symlinks.sh
bash scripts/validation/check_project_skill_links.shCliRouter now supports a split workflow:
- Keep this checkout as the private source of truth.
- Mirror it into the sibling public worktree with
bash scripts/public-release/bootstrap.sh. - Commit locally as usual; the hooks will mirror the change into the public worktree.
- Use the local git aliases for day-to-day release work:
git public-sync,git public-validate,git public-push, or justgit public-releasefor sync + push in one shot. - Push only from the public worktree, never from the private checkout.
git public-releaseruns the router contract gate before it mirrors and pushes.
For the exact branch/worktree contract, read skills/src/CliRouter/references/public-release.md.
For manual backend checks, run skills/src/CliRouter/scripts/dispatch.sh directly with one backend at a time. --launch-only is available for interactive startup capture when you want a quick validation without waiting for a long session to complete. The current interactive fanout is an MVP with lane-level launch capture and artifact aggregation, not a shared live control plane.
To bootstrap a task packet from free-form text, use python3 skills/src/CliRouter/scripts/infer_task_packet.py "<request>" "<cwd>".
bash scripts/validation/check_project_skill_links.shis the repeatable local and CI gate for planner, health, budget, and fanout contracts.- The same gate also validates the natural-language task-packet front-end.
- The gate exercises selector behavior with a clean health file, a pinned model request, a cheap-budget collapse, a diversified fanout, and a provider-family cooldown.
- For a full local end-to-end smoke run on this machine, use
skills/src/CliRouter/scripts/dispatch.sh --backend codex --task-profile developer --task-file <packet.json> --cwd <path> --execution-mode printwhen thecodexCLI is installed. - For interactive fanout MVP acceptance, use
skills/src/CliRouter/scripts/dispatch.sh --backend auto --task-profile developer --task-file <packet.json> --cwd <path> --execution-mode interactive --launch-only. - For stable-release review, read
skills/src/CliRouter/references/stable-release-plan.mdfirst; it defines the frozen external surface and the five remaining closure items.
Trigger the skill naturally in CodeX or AntiGravity:
用 gac 支持审计 Agent 完成 X调用 kimi / kimi cli 支持开发 Agent 完成 Y调用 codex / codex cli 支持 review 完成 Z调用 claude / claude code 支持 audit 完成 Z调用 glm 支持开发 Agent 完成 Y调用 minimax / mimo / qwen / deepseek 支持开发 Agent 完成 Z用 kimicc 支持开发 Agent 完成 Z
For the authoritative procedure and backend mapping, read skills/src/CliRouter/SKILL.md.
For machine-readable backend metadata, read skills/src/CliRouter/references/backend-registry.json.
For the control-flow diagram, read skills/src/CliRouter/references/router-logic.md.
For per-CLI model dispatch semantics and the current selection matrix, read skills/src/CliRouter/references/model-routing.md.
For the current rollout plan and end-to-end acceptance matrix, read skills/src/CliRouter/references/v2-execution-plan.md.
For the stable-release freeze surface and doc contract, read skills/src/CliRouter/references/stable-release-plan.md.
For the remaining stable-release gap, read skills/src/CliRouter/references/stable-release-checklist.md.
Current health routing now aggregates both backend-level and provider-family signals before automatic selection.