Skip to content
Junior 0.17.0 · ADR checks for designs, tickets and code, and a data-destination policy →
Small tasks. Big ideas.

Big plans.
Meet your junior.

(It already did the homework.)

Your frontier model asks. Junior reads the code, checks the risks, drafts the plan, and comes back with options and its understanding of the job. You pick. It ships—locally or through an operator-controlled remote worker.

A little developer wearing headphones at a warmly lit coding workstation
A baby agent wearing sunglasses at a command-center laptop
A tiny agent suspended in a laser vault, working on a laptop
A baby agent in sunglasses and a trench coat beside a London streetlamp at night
A baby agent monitoring a tablet inside a rainy command van
A baby agent operating a drone above a nighttime city
A baby agent in a hood using a radio in a safehouse
A baby agent with glasses examining documents in an archive
A baby agent reviewing a tablet at a harbor command center
A baby agent studying a tablet in a car on a rainy night
A baby agent working at a railway station with a satellite dish
A baby agent controlling a drone on a nighttime rooftop
Illustrative execution
> Preparing worktree...
> Analyzing scope...
> Commodity model writing changes...
> Running tests...
Ready for review

THE CASE FOR A JUNIOR TEAM

Keep your senior on the hard decisions.
Let your junior do the legwork.

Your frontier model frames the problem and sets the acceptance bar. Junior reads the code, researches the options, sets up the work, and checks back with its understanding before it commits to an approach. The senior still decides.

JUNIOR · RESEARCH, SETUP & EXECUTION

The legwork, done and checkable

Searching the scoped codebase, reading the surrounding code, gathering options with their tradeoffs, preparing the environment, and executing the chosen plan. Bounded reconnaissance returns evidence, not just an answer. When something is genuinely ambiguous, it checks back instead of guessing.

SENIOR · JUDGMENT & ACCEPTANCE

The judgment stays with you

Framing the deliverable, choosing between the options Junior brings back, weighing architectural tradeoffs, and giving final acceptance. Unclear requirements, failures spanning several systems, and decisions that are expensive to reverse still deserve experienced attention.

“Junior” describes a role and a spending budget, not low intelligence. Commodity means economical to use repeatedly; it does not necessarily mean small, open-source, or less capable on every task.

Explore sourced costs and capability gaps →

A BRIEF BEFORE THE WORK

It checks back before it acts.

When the contract leaves something to decide, Junior reads the code, states its understanding, and brings back options instead of guessing. You pick one; your correction becomes a constraint.

Illustrative briefneeds_choice

understanding:

  • U1 scope: add retry handling to the webhook sender
  • A1 guess: retries happen in-process, not through a queue
  • A2 verified: src/webhooks/sender.ts:42

options:

  • A · in-process backoff

    Simplest to ship; depends on A1 and only survives the process.

  • B · durable outbox

    Survives restarts; adds a table and a migration to review.

recommendation:

B, if retries must survive a deploy; otherwise A.

reply:

junior handoff task.json --choose B --correct A1="retries go through the outbox"

It only checks back when there is something to decide; a trivial change goes straight through. Planned contracts get the same care: when Jev judges one unclear, the run stops with numbered questions before any worker starts, and your answers become constraints on the workflow you chose.

The Manager-Junior dynamic

You define the scope. The junior executes. You review the handoff. Clear scope. Clear accountability.

1. Plan

Write a clear prompt detailing the specific deliverable. Treat it like assigning a ticket to a junior developer.

2. Delegate

Junior creates a clean Git worktree and delegates execution to a commodity model, bounded by explicit acceptance criteria, runtime budgets and recorded consent for any external context handoff.

3. Review

Get a compact receipt. Review the generated code and independent test results before accepting changes into your branch.

A CHECK BEFORE EXECUTION

When the handoff needs senior attention.

Jev assesses whether the deliverable needs frontier attention, whether its contract is clear, and whether unresolved assumptions could change the implementation. Junior returns a compact recommendation so the manager can clarify, re-scope, or take over.

Enforce

A frontier-required, blocked, or uncertain preflight returns needs_review before the commodity worker starts.

Shadow

Records the assessment and continues. It is advisory, not a blocking filter.

Manager decides

The receipt reports frontier_required, delegate, clarify, or uncertain with a reason and probability. No frontier model is called automatically. Jev is optional; it defaults to off.

Enable the frontier-attention and readiness filter in the task contract with "jev": {"mode": "enforce"}. After execution, a completion gate can flag acceptance gaps against check results and change evidence. Classification supports review; it does not guarantee correctness.

COMMODITY MODELS ONLY

One cheap default. Changes need your sign-off.

Junior never runs a deliverable on a frontier model. It executes only on commodity or open-weight models, and it stays on the cheapest capable default unless a human approves a different one.

Commodity-only execution

The executor must be a recognized commodity or open-weight vendor: DeepSeek, Moonshot, Z.ai, Qwen, MiniMax or Meta Llama, plus openai/gpt-oss*. A frontier vendor, an unrecognized vendor, or an unknown direct host is refused before any paid call. Jev (typesafe/jev-1.13) is a classifier only and is never the executor.

DeepSeek V4.1 Flash by default

The built-in general profile is the default: the cheapest DeepSeek model, deepseek/deepseek-v4.1-flash on OpenRouter. Contracts and plans are shaped so the default can finish the work. A deliverable that needs another profile is a signal to re-scope, not to silently spend more.

Approval, not assumption

Junior never moves off the default on its own. A different model needs human approval per run, per plan, or per project, with a rationale: the Jev pick, its confidence, the matched strengths, and the price change against the default. Jev routing and a contract-named model never count as consent.

Routing across the roster

When a contract names no model and is not a resume, Jev may recommend one profile for the task. models.routing is off, shadow (record the recommendation without applying it) or auto (apply a non-default profile only at 0.6 confidence or higher). Precedence is task model, then routed profile, then project pin, then the built-in default.

Junior's built-in commodity model roster and each profile's intended use.
ProfileModelUse it for
general (default)deepseek/deepseek-v4.1-flashBounded implementation: bug fixes, tests, small multi-file changes, docs and setup. Lowest cost; use unless the task clearly needs another profile.
deep-reasoningdeepseek/deepseek-v4-pro-0813Subtle debugging, concurrency, algorithms, performance work, or refactors whose correctness depends on careful analysis.
long-horizonmoonshotai/kimi-k2.7-codeLong autonomous coding sessions with many tool calls, large-codebase navigation, and front-end or UI implementation.
agentic-toolsz-ai/glm-5.3Tool-heavy work: shell, build, CI and environment setup, scripting, and many small command steps.
fast-mechanicalqwen/qwen3.7-flashCheap mechanical edits: renames, formatting, boilerplate and small summaries.

Adopting newer models

junior update adopts newer same-lineage commodity models only when models.autoUpgrade is true; otherwise it reports them without applying. A newer release becomes the default only at price parity, measured on the cheapest tool-capable endpoint, within models.priceTolerance (default 1.25×). DeepSeek V4.1 Flash-1017 is offered but waiting for price parity. Inspect and plan with junior model status and junior model upgrade.

junior model status
junior model upgrade --dry-run
junior doctor --check-updates

Warm cache, one model at a time

Receipts report the prompt-cache hit rate, and each deliverable keeps one model and one upstream provider for its whole run so the cache stays warm. Because one deliverable means one executor, a routed profile is decided once, not per tool call.

Approve a non-default model for a single run with junior handoff <task> --approve-model <key>, for a plan with approvedProfiles, or for the project with junior model approve <key>. Revoke it with junior model revoke <key>.

Jev through OpenRouter or TypeSafe

One OpenRouter key covers everything, so Jev runs on OpenRouter with no extra setup. Setting TYPESAFE_JEV_API_KEY sends Jev calls straight to TypeSafe instead, and jev.provider pins either gateway in the contract or delivery.config.json. Direct TypeSafe calls use the System One wire format. See TypeSafe’s Data Processing Agreement.

LiteLLM proxy

The worker can run through a LiteLLM proxy defined as a litellm provider in Pi’s models.json. Model ids stay vendor-prefixed, so the commodity-only policy still decides: frontier vendors are refused and an unprefixed id is refused as unknown. Jev stays on OpenRouter or TypeSafe.

A delivery.config.json models.roster entry can override or extend the built-ins (or disable one with "disabled": true). A custom or disabled non-default profile is still subject to the commodity policy, and a frontier or unknown project pin fails readiness. See the Junior models reference.

MORE THAN A CODING PROMPT

The Junior toolbelt.

Plan the deliverable, examine the risks, and preserve the reasoning that shaped it. The manager and worker can work from shared, saved evidence.

Failure modes & criticality

FMECA

Identify how a deliverable or handoff could fail, rank the risks, and record mitigations before execution.

Native persisted analysis state

Explore FMECA on GitHub ↗

Critical path & dependencies

CPM Planner

Break a plan into defined deliverables, track dependencies, and identify the work that determines the finish date.

Persistent project database

Explore CPM Planner on GitHub ↗

Connected state graph

Crossmatrix

The connected state graph: jobs, journeys, code, risks, plans and ADRs tied together in a committed .crossmatrix/ store, kept in sync as they change, so relationships and tradeoffs can be inspected together.

Committed .crossmatrix/ store · stays in sync with your repository

Explore Crossmatrix on GitHub ↗

Contradictions & solution strategies

TRIZ

Explore technical or physical contradictions using a catalog of inventive principles. Jev classification suggests applicable conflicts; the catalog provides structured options.

Optional separate CLI · repository access required

Explore TRIZ on GitHub ↗

Browser testing & demos

Jevitate

Explore, replay and regression-check real user journeys in a browser, gate CI on the result, and turn a journey into a narrated demo. A pass/fail jevitate check can verify a delivered change.

npm @jevitate/cli · ships its own agent skills and MCP server

Explore Jevitate ↗

Hypothesis interviews

Elicitation

Requirements interviews that treat every claim as a hypothesis: probe it, mark it verified or a guess, and surface the assumptions a deliverable rests on before work starts.

Requirements interviews · claims are hypotheses

Managed by Junior setup

Investigations

Scientific process

Run a hypothesis → experiment → verdict investigation: state the claim, design the cheapest test that could disprove it, run it, and record the verdict as evidence.

npm @matthew-cochran/scientific-process · hypothesis → experiment → verdict

Managed by Junior setup

Frontier plans, Junior executes

  1. The frontier manager submits deliverables to CPM and reviews risks with FMECA.
  2. CPM leases the ready, non-conflicting deliverables on the critical path.
  3. Each one becomes a bounded Junior contract run by a commodity model. With a plan field, the handoff takes the lease itself and records its hours and evidence.
  4. The manager reviews the receipt and checks, applies the work with junior apply, then marks the deliverable complete or failed in CPM. The receipt lists any file changed outside the deliverable’s owned files.

Every tool call goes through junior tools call (for example junior tools call cpm plan.status plan_id=…), so plan and risk state are saved as evidence. No MCP setup is needed for this loop.

Map features to code

  1. junior matrix refresh keeps the map current in one idempotent pass: it syncs code, tests, Jevitate jobs and journeys and the active CPM plan, confirms high-confidence links and links completed deliverables.
  2. junior apply links the files an accepted handoff changed to its feature, so the map fills itself as work lands.
  3. A handoff that names a feature or plan deliverable gets exactly those files as context. Look up both ways: junior matrix context d-12 or junior matrix features src/checkout/.
  4. junior matrix stale reads git, not file contents: each link remembers the commit and blob it was confirmed against and is reported changed, moved, deleted or entity-changed.

Every flag is an override: the hop, model, sources, plan and feature default from the project. Lookups are deterministic, with no model call, and each command uses a single Crossmatrix session. Agents read the matrix only through junior matrix or the Crossmatrix MCP: the worker guard and Claude Code deny rules keep .crossmatrix/ files out of reach.

A shared handoff package

Junior’s HOP file points to FMECA, CPM, and Crossmatrix state and stores versioned evidence snapshots. Pass its revision with the task so the worker and reviewer see the same plan. State changes invalidate prior acceptance.

Use only what the task needs

Inspect a configured handoff with junior tools inspect /absolute/hop.json. The manager chooses a scoped tool call; the executor records its result. Optional TRIZ runs separately—attach its saved output to the deliverable context.

Other bounded workflows include reconnaissance, evaluation, and an optional fresh-session QA review. Analysis returns a report; it does not authorize production edits. junior init installs the checksum-verified FMECA, CPM, Crossmatrix, scientific-process and elicitation binaries Junior runs, plus the npm companions (fmeca, cpm, crossmatrix, scientific-process, elicitation, jevitate, triz) and their agent skills. junior doctor --check-updates reports newer releases and junior update adopts them, including newer commodity models when models.autoUpgrade is set. Shape a cpm plan into bounded contracts with junior plan check and junior plan contracts. Provider access still needs your login. After a compaction or resume, junior compact rebuilds the plan, risk and investigation state from saved stores with no model call, and the restored block also lists pending decisions, open notes, open PRs and capture proposals. junior note add|list|done|promote|dismiss keeps local session notes, and on compaction a PreCompact hook runs junior compact --capture, which asks the default commodity model once for open decisions, questions, risks, hypotheses and todos and saves them only as proposals. junior setup --context-hooks installs the Claude Code SessionStart and PreCompact hooks and, with --harness codex or --harness cursor, writes .codex/hooks.json or .cursor/hooks.json. Acceptance criteria can carry a stable id plus the checks that prove them and the fmeca mitigations they verify, from an elicitation requirement through the plan and contract to the run result. After a run, junior fmeca propose-verified prints ready requests to mark those mitigations verified, which the manager reviews and applies.

Delegate deliberately.

Choose a commodity worker when…

You can specify what must be delivered, constrain the files and tools, and check the result. There is enough implementation work to justify a handoff, and failures are recoverable.

Keep it with the senior when…

The hard part is deciding what to build, diagnosing an unclear system failure, or making a consequential tradeoff. Tiny edits may cost more to delegate than to finish directly.

Escalate when…

The bounded attempts run out, checks keep failing, assumptions break, or scope grows. Return the evidence and unfinished work so the manager can choose the next step.

Why open weights?

Junior executes only on commodity or open-weight models, and a frontier or unknown provider is refused before any spend. Within that policy, open-weight models can offer a choice of hosts, inspectable weights, and self-hosting under their license. Openness, price, and capability are separate choices, and the default stays on the cheapest capable commodity model until a human approves another.

A hosted open-weight API still sends data to its provider. Self-hosting requires hardware and operations; large models are not automatically cheap to run locally. Check the model license and your provider’s data terms. Example open-weight license.

Junior makes the handoff manageable.

A defined deliverable. A bounded worker run. Independent checks. A compact receipt with changes, usage, and unresolved work. You keep the planning context small and reserve frontier attention for decisions and review.

Built for clean handoffs

Junior Agent is a CLI tool designed for precise, recoverable task delegation. Define the deliverable, run independent checks, and keep the evidence you need to review the result.

  • Git Worktrees

    Executes in an isolated worktree. Your current branch remains untouched until you approve, then junior apply brings the reviewed change in. By default the worker gets only the contract and four tools (read, bash, edit, write): no skills, extensions, MCP servers or context files from your machine.

  • Independent Checks

    Runs designated linters and tests. It verifies the work before handing it back.

  • Recoverable handoff

    Provides changed files, check results, model usage, and cost when pricing is available.

  • Consent-gated context

    Before project context is sent to an external provider, Junior records the destination, model and file scope and requires your run or project consent. Clarification stays local to the decision before execution begins.

  • Controlled remote compute

    For work that needs a remote runner, Junior can use bounded Pi transport and a safely reconciled Hetzner pool. Provisioning, scaling and release remain explicit operator actions.

  • Bounded execution

    Hard deadlines and bounded repair attempts. Partial changes and diagnostics are preserved when execution stops.

Illustrative receiptready_for_review
task: "Implement JWT refresh token rotation"
model: "commodity model"
status: "ready_for_review"
files_changed:
  • M src/auth/jwt.ts
  • M src/routes/auth.ts
  • A tests/auth.test.ts
cost: unavailable without provider pricing
> Worktree preserved at /tmp/jr-auth-123
> Manager review required before acceptance

ONE PROMPT TO YOUR CODING AGENT

Give your agent a junior.

Paste this into Cursor, Codex, Claude Code, GitHub Copilot, Gemini CLI, or another coding agent with terminal access. The guide installs Junior, wires up the delegation skill, and checks your project’s readiness. Provider login stays with you.

Agent setup prompt

Help me set up Junior for this project. Read https://junioragent.dev/INSTALL.md and follow the setup steps. Install the manager skill, verify readiness, and report any missing prerequisites before delegating work.

READY IN ONE COMMAND

Check readiness, then let setup fix the rest.

junior doctor
junior setup

junior doctor is read-only and reports what is ready and what is missing, including a stale Junior skill. junior setup previews the repair plan, asks before it changes anything, then applies it — registering Junior through claude/codex mcp add or Cursor’s mcp.json. Junior also notices newer releases, and junior update adopts them. Before a paid run, junior model status shows the commodity roster and junior plan check lints a plan into bounded handoffs.

Prefer to install it yourself?

Requires Node.js 24+, npm, and Git. Install (or upgrade) the CLI from npm, then run project init inside the project you want your agent to manage.

npm uninstall -g @matthew-cochran/junior && npm install -g @matthew-cochran/junior@latest --prefer-online && junior --version
junior init --target both
junior doctor --check-updates

The public-domain commands require the site to be deployed. For this local preview, use its origin instead. Init installs project-local Codex and Claude Code skills, the tested Pi dependency, the prebuilt FMECA, CPM, Crossmatrix, scientific-process and elicitation tools, and the npm companions fmeca, cpm, crossmatrix, scientific-process, elicitation, jevitate and triz with their skills. It stays on the commodity default, DeepSeek V4.1 Flash, unless a human approves another model; junior model status reports the roster and junior update adopts newer releases. The setup guide adds a managed AGENTS.md entry for other agents and a small adapter when your IDE needs its own instruction file. Follow the guide for authentication and unresolved prerequisites.

Junior is MIT licensed. Open-source CLI repository. Initialization preserves existing configuration; live model calls require your authorization.