Skip to content

About

Agent skill and plugin that routes high-stakes work across Claude, Codex and Gemini: a decision engine (TypeSafe Jev, OpenJev or local rules) picks the model, and a different vendor reviews the result.

Topics

Resources

Contributing

Security policy

Stars

2 stars

Watchers

0 watching

Forks

Repository files navigation

Frontier Orchestration

Route high-stakes work across Claude, Codex and Gemini: a decision engine picks the model for each task, and a model from a different vendor reviews the result.

CI License: MIT Python 3.9+

Frontier Orchestration: one decision engine routes each task to Claude, Codex or Gemini

Measured Result Evidence
Labeled tasks routed below frontier tier 12 of 20, including all 9 low-stakes tasks docs/cost.md
High-stakes tasks kept on frontier or top models 8 of 9 docs/cost.md
Routing pick accuracy, TypeSafe Jev 1.00 (local-rules baseline: 0.60) docs/eval.md
Time per decision, hosted engine (p50) about 0.2 s docs/eval.md

Measured on 2026-11-16 with fo.py eval all --repeat 2. No dollar or percentage saving was measured.

Install

Requirements: Python 3.9 or later, on macOS or Linux. The skill uses only the Python standard library.

Status. The commands below (npx skills add and the plugin marketplace commands) are the normal way to install. The npm package is not published, so npx frontier-orchestration does not work from the npm registry.

Claude Code (in a session):

/plugin marketplace add bebecap/frontier-orchestration
/plugin install frontier-orchestration@frontier-orchestration

From a terminal, use claude plugin marketplace add ... and claude plugin install ... with the same arguments. Then run /frontier-orchestration:setup in a session.

Plugin options: in Claude Code, open /plugin, then Installed, then frontier-orchestration, then Configure options. You can set the review profile, the round cap and the fix floor. A value applies from the next session and wins over the config. The plugin needs Claude Code 2.1.271 or later (its manifest has pickers; an older Claude Code does not load the plugin), and claude plugin configure needs 2.1.285 or later. The options work only in Claude Code sessions with the plugin enabled. A plain terminal and other hosts use fo.py config and FO_PROFILE. See docs/install.md.

Any agent that reads SKILL.md (skills.sh):

npx skills add bebecap/frontier-orchestration --skill frontier-orchestration
OpenAI Codex
codex plugin marketplace add bebecap/frontier-orchestration
codex plugin add frontier-orchestration@frontier-orchestration
Antigravity (agy)
git clone https://github.com/bebecap/frontier-orchestration
agy plugin install ./frontier-orchestration
Manual, and the npx installer prototype

Clone the repository and run the command line from the clone. Or copy the folder skills/frontier-orchestration/ into the skills folder of your agent (for Claude Code: ~/.claude/skills/). The skill folder holds everything it needs.

npm/ holds a one-command installer prototype. It is not published, so npx frontier-orchestration does not work from the npm registry. To try it from a local tarball, see npm/README.md.

Full guide: docs/install.md.

First run

A person runs the interactive installer. It asks for the decision engine, the providers, the telemetry choice and the ledger folder. An agent uses fo.py setup with flags instead.

python3 -I skills/frontier-orchestration/scripts/fo.py install
python3 -I skills/frontier-orchestration/scripts/fo.py doctor --live

In this README and in docs/, fo.py is short for the full command python3 -I <skill folder>/scripts/fo.py. From a clone, the skill folder is skills/frontier-orchestration. The commands print hints with the full path on your machine.

See a route with no setup, no network and no key (engine off, local rules):

$ FO_JEV_BACKEND=off python3 -I skills/frontier-orchestration/scripts/fo.py route --demo
task              model               conf  stakes  decision
--------------------------------------------------------------
repo_sweep        sonnet               -      0.40  act
estimate_review   gpt-6-astra          -      0.85  ESCALATE
arithmetic_audit  haiku                -      0.10  act

In an agent session, ask for example: "Route this estimate review across vendors and tell me which model should review it." The agent runs fo.py route and returns one decision per task: act, ESCALATE or REJECT.

What's inside

Part What it does When to use it
SKILL.md the rules an agent follows: discovery, routing, the gate, review, the learning loop loaded by the host when a task is high-stakes or spans many files
fo.py route picks a model for each task and gates the pick; gives each decision a review tier and an effort level before you give tasks in a pipeline to models
fo.py plan checks a task graph with no network and prints the waves of tasks that can run at the same time before you run several writer tasks in parallel
fo.py ask one read-only ask through another vendor's own CLI (providers) a second opinion or an adversarial review
fo.py review 1 to 4 blind read-only reviewers on the same prompt, all at the same time a ship gate that needs two or more reviewers
fo.py policy, triage print the review profile, the round cap and the fix floor; sort labelled reviewer findings into fix now, owner decision and deferred once before a review loop; after each review round
fo.py eval measures a decision engine on fixed datasets before you trust a new engine, model id or OpenJev build
fo.py lessons a learning ledger of lessons, runs and the time per stage recall before a run; record after it
fo.py doctor, refresh checks config, keys and sign-in; lists the models each CLI offers today first use, and after a CLI update
/frontier-orchestration:setup asks the setup questions in Claude Code first use in Claude Code

Command list: fo.py --help. Every subcommand accepts --help and then does no work.

How it works

flowchart LR
    T["Task: attributes + candidates"] --> F["Filter: enabled vendors; on review tasks, drop the producer's vendor and the judge"]
    F --> J["Decision engine: pick + confidence, stakes"]
    J --> G{"Gate"}
    G -- "confidence >= 0.80, or stakes < 0.50" --> A["act"]
    G -- "near-tie on a costly task" --> E["ESCALATE"]
    J -- "pick is not an allowed candidate" --> R["REJECT"]
Loading

The engine is a System One model ("Jev"): it returns typed answers and probabilities, not text. Choose TypeSafe Jev (hosted), OpenJev (self-hosted, open weights), OpenJev on Codiv, any compatible server, or off (local rules). Self-hosted OpenJev on a Mac needs Apple silicon and a download of about 14 GB; plan for 24 GB of memory or more. Self-hosted OpenJev on Linux needs an NVIDIA GPU and Docker with the NVIDIA runtime. The hosted engines (TypeSafe Jev, OpenJev on Codiv) and off work on any macOS or Linux machine. Details: docs/how-it-works.md and docs/install.md.

Results

Engine Sanity Routing pick Stakes Brier Time per request (p50)
TypeSafe Jev (hosted) 1.000 1.00 0.889 0.081 about 0.2 s
OpenJev, compact (mxfp4) 1.000 0.85 0.833 0.107 about 2.3 to 2.6 s sanity, 2.2 s routing
OpenJev, standard (4-bit) 0.958 0.90 0.778 0.155 about 0.9 s sanity, 2.3 s routing
off (local heuristic) skipped 0.60 0.778 0.132 no network call

Limits:

  • The datasets are small: 24 sanity questions and 20 routing tasks. A difference of one or two cases is noise.
  • OpenJev times change from run to run on the same machine. The standard build's times are from the first build comparison, where the compact build measured about 1.0 s sanity. See the run log in docs/eval.md.
  • The evidence counts which tier each pick went to. It does not measure a bill or the quality of the work done by the cheaper model. Measure both on your own workload.
  • Not every engine wins: the standard OpenJev build scored 0.958 on sanity, and both OpenJev builds picked less accurately than TypeSafe Jev (0.85 and 0.90 against 1.00).

Method, metrics and datasets: docs/eval.md. Cost evidence: docs/cost.md.

For agents

FO means python3 -I "<skill folder>/scripts/fo.py". In Claude Code the skill folder is ${CLAUDE_SKILL_DIR}.

  1. FO doctor. If there is no config: FO setup --non-interactive. Exit 3 prints questions. Ask the user each one. Never answer for the user, above all the telemetry question.
  2. FO doctor --live, then FO refresh, then FO lessons recall --tags <kind>,<project>.
  3. For several tasks with depends_on and writes: FO plan tasks.json. Run one wave at a time, one worktree per writer task.
  4. Set the profile once, before the route: FO config set policy.profile P, or export FO_PROFILE=P for the session. In a Claude Code session, a profile set in the /plugin menu wins over the config (not over FO_PROFILE); FO policy shows the profile in effect and its source. Keep that one profile for route, review, triage and run-round, and do not pass --profile to a command inside the loop. To change the profile, route again. Then FO route --check tasks.json, then FO route tasks.json --json. Act, escalate or stop. Follow the review and effort fields of each decision.
  5. Open the run note first: FO lessons run-new --id RUN --project <slug> --artefact code --title <title>. Run every review of the loop with FO review, also with one reviewer, so that each reviewer gets the label block. List as many reviewers as the reviewers field of the decision says (or FO policy). For two reviewers and a Claude producer, use FO review --reviewers codex:gpt-6.1-sol,codex:gpt-6-astra --prompt-file packet.md --cwd <repo> --round N; for one, list one reviewer. FO ask is for a second opinion outside the loop: FO triage needs an answer written under the label block. Only status ok is a verdict. Then FO triage <answer files> --round N: fix only the fix now list, give the owner decision list to the owner, and write the deferred list into the run note. Right after triage, record each reviewer's row with FO lessons run-round RUN --round N --reviewer <id> --verdict <verdict> --cause <cause> --held <count>, before the next review. Pass --held on every approve row: --held on a row is the number of that reviewer's findings that held (0 for a reviewer that found nothing), never the round total. Stop at the round cap (FO policy): it counts review rounds. The design pass on the spec is optional, and only for a change that touches a safety rule or a route with reviewers; it does not apply to a route that gives review=tests. When you do one, do it before the build and triage it. Round 1 has the full scope. After each fix, at most one round can be a fix round with --scope fix and one different-vendor reviewer. The fix-scoped round is optional: skip it and go to the full-scope round when the fix adds a mechanism (a new parse, fallback, lock, cache or flag) or touches a safety rule that the packet names. After the fix round, or instead of it, the next review is a full-scope round. When a full-scope round after a fix still gives fix now items: one more fix and one more full-scope round at most, then the STOP choices (the loop budget: SKILL.md section 8). Start a --scope fix round only while N is below the cap: round N equal to the cap is a full-scope round, with the reviewer count of the route. Known residue that the owner accepted goes in --residue FILE. The gate closes when every reviewer of that round approves the same commit, in a full-scope round. A fix round never closes the gate: before ship, one final full-scope round on the final commit closes it (SKILL.md section 8).
  6. Record the stages: FO lessons run-time RUN --stage <stage> --seconds N per stage, then run-close and lint. Over a week: FO lessons rounds --since <date>.

Exit codes: 0 ok; 1 failure (also a plan refusal); 2 route REJECT (or an eval error); 3 setup needs answers (or ask cannot use its --out path; no CLI starts). review exits 0 only when every reviewer has status ok. Full rules: SKILL.md. Repository map: llms.txt.

Update and uninstall

Host Update Uninstall
Claude Code claude plugin marketplace update frontier-orchestration, then claude plugin update frontier-orchestration@frontier-orchestration claude plugin uninstall frontier-orchestration@frontier-orchestration
Codex codex plugin marketplace upgrade frontier-orchestration codex plugin remove frontier-orchestration@frontier-orchestration
Antigravity git pull in the clone, then install again agy plugin uninstall frontier-orchestration
skills.sh npx skills update frontier-orchestration npx skills remove frontier-orchestration

The skill keeps its files in ~/.config/frontier-orchestration/ (config), ~/.local/state/frontier-orchestration/ (state, telemetry log) and ~/.local/share/frontier-orchestration/ (ledger, OpenJev). Delete them to remove everything.

Troubleshooting. Run fo.py doctor --live first. It names each failed check. Common failures and fixes: docs/troubleshooting.md.

Privacy and telemetry

Telemetry is off unless you opt in. When on, the commands that do work (install, setup, doctor, providers, refresh, route, plan, review, jev ping, lessons, ask) send at most one anonymous event per run, and every value in it comes from a closed list. A command that stops on bad input sends nothing. The collector keeps only daily and weekly counters. It never sends prompts, paths or output, and it sends a count above 2 only as a range. DO_NOT_TRACK=1 turns it off. See docs/telemetry.md and PRIVACY.md. Keys are never written to the config. Report a security problem privately: SECURITY.md.

Contributing

Read CONTRIBUTING.md and AGENTS.md. Run the checks:

python3 -m unittest discover -s tests
python3 -I skills/frontier-orchestration/scripts/fo.py route --check
(cd npm && npm test)

License

MIT.

Claude and Anthropic are trademarks of Anthropic. Codex, GPT and OpenAI are trademarks of OpenAI. Gemini, Gemma and Antigravity are trademarks of Google. This project is not affiliated with or endorsed by Anthropic, OpenAI or Google, nor by the makers of TypeSafe, OpenJev or Codiv.

The installer can download DiffusionGemma weights. They are not part of this project and have their own license. The model cards of the two pinned builds (mxfp4, 4-bit) state the license as Apache 2.0 and link the Gemma 4 license page. Read the model card before you use the weights.

About

Agent skill and plugin that routes high-stakes work across Claude, Codex and Gemini: a decision engine (TypeSafe Jev, OpenJev or local rules) picks the model, and a different vendor reviews the result.

Topics

Resources

Contributing

Security policy

Stars

2 stars

Watchers

0 watching

Forks

Releases

Packages

Contributors

Languages