Juniperus Router v1

Juniperus is the optional local router for Oni, a local-first agentic development environment. It turns a natural-language request plus a small project/task context into one validated JSON decision: intent, project, task, agent, worktree strategy, loop status, and success criterion.

Status: v1 contract and reference rules backend. This repository ships the executable contract, the rules/mock router, examples, and evaluation reports. It does not ship a trained neural checkpoint or GGUF yet; the training and export pipeline is in the Oni repository.

What is here

  • schema/intent_schema.py — contract v1, Pydantic validation, tolerant parsing, and safety sanitization.
  • juniperus/ — dataset, training, export, benchmark, runtime, and sidecar code.
  • docs/CONTRACT.md — field-by-field contract and examples.
  • docs/ONI_INTEGRATION.md — how Oni calls the sidecar and falls back.
  • reports/mock/ — rules backend benchmark (73.7% intent / exact on the test set).
  • reports/oracle/ — gold-label contract check (100%, an upper bound, not a model claim).
  • examples/context.json — a small router context.

Dataset: Davoassassin27/juniperus-router-dataset.

Contract in one object

{
  "intent": "merge_worktree",
  "agent_target": "auto",
  "model_override": null,
  "worktree_strategy": "isolated_branch",
  "branch_name": null,
  "project_ref": "oni",
  "task_ref": "3f2a1b9c",
  "task_prompt": null,
  "loop_status": "completed",
  "max_iterations": 1,
  "success_criterion": null,
  "reasoning": "Se pidió integrar una tarea."
}

Intents: spawn_agent, query_status, merge_worktree, retry_task, cancel_task, discard_task, list_projects, help, unknown.

Safety invariants

  • main_direct is not a valid output. It is downgraded to an isolated branch and the decision becomes needs_human.
  • branch_name always starts with oni/.
  • max_iterations is clamped to 1..6.
  • Task actions require task_ref; the router does not guess.
  • The decision is preview-only. Oni does not execute it; a human confirms merges and destructive actions.
  • If the sidecar is missing, slow, or returns degraded, Oni uses its deterministic fallback.

Evaluation

Backend Examples Intent Exact Safety violations
oracle (gold labels) 190 100% 100% 0
mock / rules-v1 190 73.7% 73.7% 5

The oracle result is a contract check, not a neural model result. The mock numbers are the rules baseline used before a trained model is available.

Run the reference router

git clone https://github.com/Davoassassin27/oni
cd oni/juniperus
uv sync --extra dev
uv run juniperus serve --backend mock --port 7767

Then, with Oni running:

export ONI_JUNIPERUS_URL=http://127.0.0.1:7767
oni route "mergeá la tarea 3f2a1b9c"

On Windows use $env:ONI_JUNIPERUS_URL="http://127.0.0.1:7767".

Training roadmap

The repository contains the dataset generator, LoRA training, GGUF export, and benchmark scripts. The intended base is a small instruct model (for example Qwen2.5-0.5B-Instruct). A CPU smoke run is validated; a real checkpoint needs a GPU and will be published here when available.

Limitations

  • Not a general-purpose chat model.
  • The rules backend is a baseline; the mock safety-violation count is reported above, not hidden.
  • Contexts are small fictional projects/tasks; real repositories can be larger.
  • No trained weights are included in this revision.

Links

Code is MIT. Oni brand assets are excluded; see the Oni repository.

Downloads last month

-

Downloads are not tracked for this model. How to track
Inference Providers NEW
This model isn't deployed by any Inference Provider. 🙋 Ask for provider support

Collection including Davoassassin27/juniperus-router