KnowMe · Architecture research · 27 Sep 2026 · updated 28 Sep

KnowMe Decision Layer

Self-hosted decision models, packaged as one Rust crate family and fronted by one decision proxy. The proxy speaks TypeSafe's Jev API and MCP, and routes each call to hosted Jev, Laya (MLX, candle, ONNX, browser), local Qwen via candle-vllm, or remote Qwen, depending on how sensitive the data is. The Boss ships it as a standard sidecar, UAR and KnowMe link it natively, and CounselMe and the Prior Authorization Workbench get their decisions from it.

Mentor session source: Treston · 2026-09-27Repos read: universal-agent-runtime · know-me-system · the-boss · prior-authStatus: proposalrmcp =3.5.0 · MCP 2026-07-28
Build it as one crate familyknowme-decide is a pure-Rust core with pluggable backends. The same types run in-process inside UAR, KnowMe and the prior-auth host, and behind an rmcp server that The Boss bundles as a sidecar.
One proxy in front of every modelThe Jev-compatible /v1/systemone, a native /v1/decide, SSE streaming and MCP at /mcp. A sensitivity gate keeps PHI off hosted Jev and Qwen, and the router picks the cheapest backend that answers confidently.
No single open model replaces JevStack them instead: tripwires, an encoder router (Laya or ModernBERT), a Jev-style head (Kev, or your LitJev port on Qwen3.8-27B), guard models (Qwen3Guard, Granite Guardian), and conformal calibration fitted on your own labels.
Calibration is the productThe open models give you the interface for free. Recall guarantees on escalation, crisis and met/gap/void classes come from your counselor and coordinator overrides, which the audit log turns into labels.
Propose, never act, on clinical stateCounselMe escalates and never treats. Prior-auth proposes met/gap/void and never writes or denies. Both rules already match how each codebase is built.

01 · Context

Where this came from

In the 27 September mentoring session with Treston (46:55–49:11), Travis described a decision model sitting between a patient and a counselor's digital twin. The model routes each message to the right agent, then decides whether the twin's draft answer can go out or should be handed to the human counselor, with a summary and a pointer. He expected about 90% of questions to be handled without the counselor, all logged for the counselor's next session.

The model he named was TypeSafe AI's Jev, a "System One" model. It fills a typed schema in one non-autoregressive pass and attaches a calibrated probability to each answer. Its three primitives are Choice (up to 255 options), Score (an ordinal rubric) and Noul (the probability that a statement is true). Jev is hosted-only, with no weights, no on-prem option and no published BAA. That rules it out for an architecture where PHI and counseling data stay on the user's devices.

This report covers four things:

  • the self-hostable alternatives (from the research run)
  • how to package them as a Rust crate library and MCP server that fits the existing codebases (from reading the four repos)
  • concrete decision use cases for CounselMe and the Prior Authorization Workbench
  • a set of AgentSkills-compatible decision skills, distributed through a plugin marketplace

Honesty about the numbers. Nearly every benchmark for the open Jev-style models is self-reported. The models are days or weeks old and were measured against Jev reference values, not in a head-to-head run. Treat them as a shortlist to evaluate on your own data, not as settled rankings.

02 · Research

Open model landscape

Four families matter: Jev-shaped decision models, guard and verifier models, routers and zero-shot encoders, and clinical models.

Jev-shaped "System One" models (released 15–27 Sep 2026)

ModelBase / sizeLicenseLatency (self-reported)Calibration evidenceRust / serving
KevQwen3.5/3.8 at 0.8B, 4B, 9B, 27B; LoRA plus pointer head on a frozen backboneApache-2.0, with training code and evalsKev-4B about 495 ms for 3 questions on an M5; Kev-27B needs ~55 GB (an 80 GB GPU)Kev-27B out-of-distribution: accuracy 0.896, Brier 0.160, coverage at ≤5% error 0.835. Kev-9B ECE 0.106→0.042 after temperature fittingPython server; TypeSafe /v1/systemone wire format
LayaModernBERT-large 421M (EN), mmBERT-base 322M (multilingual)Apache-2.033–40 ms on a T4; 193–464 ms on CPUECE 0.466 as shipped → 0.081 after temperature fittingPure-Rust candle port (laya-rust): CPU, Metal and CUDA, with a ModernBERT f16 mask fix
Julia 1mmBERT-small, 144.3MApache-2.033 ms median on an Apple M4; 203 ms on a tablet CPU (ONNX)Accuracy only. 73.15% vs Jev's 72.70% on Typed Decisions, but 64% vs 87% on Banking77 (72 labels)ONNX Runtime, WebGPU
CLM-8BFrozen Qwen3-8B plus two 20M headsApache-2.028 ms per new state on an RTX 4090None claimedvLLM pooling; scores candidate actions
litjev · AnyJev · jevfire · jevmlxLogit readers over any frozen LLMMIT / ApacheYour hardwareAnyJev fits a head on 100–300 labels; jevfire warns its label probabilities are not correctness probabilitiesvLLM, MLX; the pattern your LitJev port copies

What this tells you: the small open models match Jev when there are a handful of well-described options. They fall behind when there are many similar labels, long inputs, or policy and date reasoning. Kev-27B uses exactly Qwen/Qwen3.8-27B, the base you chose for the LitJev port, and is the best-calibrated open option the research found. That makes it the reference your port should match.

Guard, judge and verifier models

ModelSizeLicenseOutputRole here
Qwen3Guard-Gen / -Stream0.6B, 4B, 8BApache-2.0Safe / Unsafe / Controversial plus a category (incl. Suicide & Self-Harm, PII, Jailbreak). The Stream variant labels each token as it is generatedReal-time monitoring of the twin's output. A second, uncorrelated crisis signal
Granite Guardian 4.1 8B8BApache-2.0Yes/no score from logprobs, with criteria you supplyAnswer sufficiency, groundedness and citation support. English only
gpt-oss-safeguard-20b20B (≥12 GB)Apache-2.0Reasoning plus a label against a policy you writeAsync audit of sent answers against a written escalation policy. Too slow to run inline

No guard model is a validated suicide-risk detector. A 2026 study of 127 open-weight LLMs found that mental-health-, medical- and safety-tuned variants gave no reliable gain over their base models. On PsyCrisisBench, a fine-tuned 1.5B Qwen reached suicidal-ideation F1 0.8925, beating larger zero-shot models. Fine-tune a small classifier on labeled crisis data. Don't rely on a guard model's generic self-harm category.

Routers, encoders and clinical models

ModelWhat it isLicenseNotes
ModernBERT / mmBERT fine-tunesEncoder classifiersApache-2.0The cheapest and most accurate option once you have labels. Rust paths exist today: candle-pipelines, candle-semantic-router
GLiClassZero-shot, label-conditioned classifier on ModernBERT, 8k contextApache-2.0Multi-label and hierarchical labels. The vendor claims it is up to 50× faster than cross-encoders
Arch-Router-1.5BQwen2.5-1.5B router; routes are defined in natural languageKatanemo license (not Apache)93.17% routing accuracy (self-reported). Check the license before commercial use
MedGemma 27B textClinical LLM, 128K contextHAI-DEF termsMedQA 87.7, EHRQA 86.3. The license bans automated decisions in healthcare and insurance, so it can only be used to extract evidence for human review
MedGemma 1.5 4BMultimodal, including EHR and lab reportsHAI-DEF termsOn-device summarization of FHIR and lab data. Not evaluated for multi-turn use

03 · Research

Technique layer

Four techniques turn any open LLM into a decision model. They are what decide-llm and decide-calibrate implement.

One-pass option scoring

Prefill the state once, then read the next-token logits restricted to the option tokens. For several questions over one state, fork the cache for each question. On Qwen3.8's hybrid Gated DeltaNet layers, paged-attention KV reuse doesn't cover the linear-attention state, so the candle-vllm fork needs a state snapshot and fork primitive.

Constrained decoding

Use it for the fields you actually generate: action items, missing-evidence lists, criteria decomposition. llguidance is a Rust crate that computes token masks at about 40–50 µs per token, so it fits directly in the candle-vllm fork. It guarantees the output structure, but says nothing about calibration.

Calibration

Temperature scaling fixes average overconfidence (Laya's ECE went from 0.466 to 0.081). For escalation, crisis and void classes, use class-conditional (Mondrian) split conformal so recall is guaranteed at a floor you set. Recalibrate for each counselor, clinic and population.

Fine-tune on your decisions

Options range from SetFit (dozens of labels, CPU) to a full ModernBERT fine-tune to LoRA plus a head on Qwen (Kev's recipe; soft targets beat hard labels). The counselor's transaction log and the coordinator's confirmations are the labeling pipeline, so capture overrides from day one.

04 · Build NEW

Crate & sidecar architecture

One workspace, knowme-decide, with a no-I/O core and feature-gated backends. The same library runs in-process in three products and behind an MCP server in the fourth.

The BossElectron · MCP hostBinaryManager · presets UARRust runtime · rmcp 3.1IntentClassifier · RouterNode KnowMeTauri · Flutter FFIgen_ui_decide (L2) Prior-Auth Workbenchaso-host port · rmcp 3.4aso-decide kernel knowme-decideproxy · Axumstdio · streamable HTTPREADY:{port} External agentsClaude Code · Codexplugins · .mcp.json Local weightsLaya · ModernBERT headsKev / LitJev-Qwen3.8Qwen3Guard · Granite decide-mcprmcp 3.5.0 · /v1/systemone decide-policy · Decider APIcascade · outcome = act | review | escalate cascade: tripwire → encoder → (p < τ) LLM head → guard → calibrate → outcome decide-tripwireaho-corasick · regexclinician rule packs decide-encodercandle ModernBERTort (Julia, LiteRT) decide-llmlogit reader · forkcandle-vllm · llguidance decide-guardQwen3Guard · GraniteBYOC criteria decide-calibratetemperature · Mondrian conformal decide-audithash-chained log · events · labels decide-coreDecisionSpec · Choice / Score / Noul · Decision · traits · no I/O · wasm32 ok spawns MCP links crate links (FFI) port loads
One library, four ways in. The Boss is the only host that talks to it over a process boundary: it spawns the knowme-decide sidecar the same way it ships rust-mcp-filesystem and uar-sidecar today. UAR, KnowMe and the Prior-Auth host link decide-policy directly, so decisions on PHI never leave the process.

Workspace layout

The layering follows conventions all three Rust codebases already use: KnowMe's L0 types crate that builds for wasm, prior-auth's clinical-docs pure engine with no I/O, and UAR's rmcp #[tool_router] house style. Every heavy dependency is behind a feature, so a phone build pulls in only the tripwire, encoder and calibration layers.

CrateResponsibilityKey deps (feature)Runs on
decide-coreDecisionSpec, Choice/Score/Noul, Decision, Outcome, and the traits DecisionBackend, Calibrator, Tripwire, AuditSink. No I/O, no async runtimeserde, schemars, thiserrorEverywhere, including wasm32 and Android
decide-schemaTypeSafe /v1/systemone wire compatibility, so Jev SDKs, Kev eval suites and Jev replay traffic run unchanged. JSON Schema export for MCP tool inputsserde_jsonEverywhere
decide-tripwireDeterministic, versioned, signed rule packs (crisis lexicon, means, abuse, overdose, PHI patterns). A hit always escalatesaho-corasick, regexEverywhere; always compiled in
decide-encoderModernBERT/mmBERT heads (Laya weights, your fine-tunes, GLiClass). Zero-shot and fine-tuned Choicecandle (candle), ort (onnx), tokenizersMac Metal, CUDA, CPU; ONNX on Android and Windows
decide-llmJev-style logit reader over Qwen3.8 (your LitJev port). Prefix prefill, per-question fork, DeltaNet state snapshot. llguidance for generated fields. A remote OpenAI-compatible logprobs adapter for liter-llmcandle-vllm fork (local-llm), llguidance, reqwest (remote)Desktop GPU, on-prem GPU
decide-guardQwen3Guard categories, Granite Guardian yes/no logprob with criteria you supply, streaming token hooksshares decide-llm runtimeDesktop and on-prem GPU (0.6B Qwen3Guard is phone-capable)
decide-calibrateTemperature fitting, Mondrian split conformal, recall floors per class. Versioned, signed calibration artifacts per spec, clinic or counselorndarray (small)Everywhere (fit on desktop or server, apply on device)
decide-policyThe Decider cascade. Locality enforcement (never escalates locality on its own), budgets, act/review/escalate mapping, Cedar context exporttokio (rt)Everywhere
decide-auditAppend-only, hash-chained decision records. Override capture, so human corrections become calibration labels. Event emissionblake3, serdeEverywhere; the host provides storage
decide-mcprmcp server: tools, resources, ui:// review card. stdio and streamable HTTPrmcp (server, transport-streamable-http-server)Desktop and server
decide-backendsBackend registry and adapters: jev, generic systemone-http, laya-candle, laya-mlx worker, onnx-encoder, candle-vllm instances, qwen-remotereqwest, candle, ort (per feature)Per backend
decide-proxySensitivity gate (locality ceiling), backend router, tier escalation, shadow comparisonsdecide-policyEverywhere
decide-serverAxum: /v1/systemone (Jev wire), /v1/decide, SSE, /mcp, registry and metricsaxum =0.8.9, rmcp =3.5.0Desktop and server
decide-wasmBrowser build of the pure crates, plus a JS DecisionProviderwasm-bindgenBrowser
knowme-decide (bin)Sidecar: mcp --stdio or serve --port 0 printing READY:{port}, exits when stdin closes, weight manager, calibrate fit CLIclap, axumdarwin-arm64, darwin-x64, win32-x64, win32-arm64

Pins to settle first. Use rmcp =3.5.0, the latest, released 28 Sep 2026; it supports MCP 2026-07-28 and 2025-11-25. UAR pins =3.1.2 and prior-auth uses 3.4.0, and both move to 3.5.0 in their integration milestones. decide-mcp keeps rmcp types out of its public API. UAR builds on candle 0.11 while KnowMe still declares 0.7, so KnowMe uses the onnx encoder feature until it bumps. Record every pin by hand in versions.toml.

The Rust API everyone links

// decide-core types, decide-policy cascade: identical in UAR, KnowMe and aso-host
use knowme_decide::{DecisionSpec, Decider, Locality, Outcome};

let spec = DecisionSpec::choice("counselme.sufficiency.v3")
    .question("Can this draft reply go to the patient without counselor review?")
    .options(["send", "send_and_flag", "hold_for_clinician", "crisis_protocol"])
    .recall_floor("crisis_protocol", 0.99)      // Mondrian conformal guarantee
    .recall_floor("hold_for_clinician", 0.95)
    .tripwires("counselme-crisis@2026.10")        // signed, clinician-owned pack
    .locality(Locality::DeviceOnly);                 // PHI never leaves the process

let d = decider.decide(&spec, &state).await?;
match d.outcome {
    Outcome::Act(v)                     => send(v, &draft),
    Outcome::Review { set, .. }         => queue_for_counselor(set, &draft, d.audit_id),
    Outcome::Escalate { reason, .. }    => crisis_protocol(reason),   // 988 + counselor alert
}

04b · Build UPDATED 28 SEP

The decision proxy

One Axum server exposes TypeSafe's Jev API, a native API and MCP. Behind it, a decision model routes the decision models: a sensitivity gate sets how far data may travel, and a backend router picks Jev, Qwen (local or remote), Laya (MLX, candle, ONNX) or any Jev-compatible server within that limit.

Jev SDKs · appsPOST /v1/systemone MCP clientsClaude Code · UAR · Boss KnowMe hostsPOST /v1/decide Browser pageprior-auth · KnowMe web decide-server /v1/systemone · Jev wire /v1/decide · native /mcp · rmcp 3.5.0 MCP 2026-07-28 + 2025-11-25 SSE: route · answer · done legacy SSE shim (off) Axum 0.8.9 Sensitivity gate spec tags · CedarPHI tripwiresLaya · 0.999 floor Backend router capability filtersLaya difficulty Scoreescalate ≤ ceiling HOSTED · non-PHI only (I-11) JevTypeSafe~240 ms qwen-remotetoken planqwen3.8-max blocked by ceiling CLINIC GPU Qwen3.8-27Bcandle-vllm · LitJev DEVICE laya-mlxApple Silicon7–13 ms p50 laya-candleMetal · CUDACPU onnx-encoderJulia 1 · mmBERT candle-vllmQwen 0.8B–9B BROWSER · decide-wasm ONNX Runtime Web (WebGPU) · Laya-for-web / Julia 1 · own calibration · PGlite audit + labels · no network ceiling
The gate can only narrow where data goes (I-12). Any Jev-compatible server (laya-serve, openjev-sglang, Kev, another knowme-decide) registers through the generic systemone-http adapter into the band its declared locality allows.

Surfaces

RouteContractNotes
POST /v1/systemoneTypeSafe Jev wire, exact: state, model, questions (choice, score, noul); answers with choice, confidence and probabilities, or score and legend, or noul; plus usage. Errors 401, 422, 429, 529model picks a backend (jev-latest, laya, laya-multilingual, kev-9b, litjev-qwen3.8-27b, qwen-remote…) or auto. KnowMe fields appear under x_knowme only on request
POST /v1/decideNative: a spec plus state, returning a Decision with its outcome, prediction set, calibration and audit IDWhat hosts use
Accept: text/event-streamSSE events: route, answer, escalate, outcome, usage, done, errorA KnowMe extension; Jev itself doesn't stream
POST /mcpMCP Streamable HTTP, rmcp =3.5.0: stateless 2026-07-28, plus legacy_session_mode for 2025-11-25Same tools as stdio
GET /sse, POST /messagesLegacy HTTP+SSE shim (2024-11-05)Feature-gated and off by default; deprecated in the spec
/v1/models, /v1/backends, /healthz, /readyz, /metricsRegistry, health, PrometheusFeed the operator panel

Backends

BackendAdapterLocalityEnabled whenChecked 28 Sep
jevsystemone-http → api.typesafe.ai (Bearer)hosted · no BAAJEV_API_KEY in .envLive call returned jev-1.13.0 in 236 ms with choice, confidence, probabilities and noul
qwen-remoteOpenAI-compatible logprob reader: letter options, renormalized top-5, thinking off, split above 5 optionshosted · no BAAAll three QWEN_TOKEN_PLAN_* keysModel Studio token plan (Singapore), qwen3.8-max, returns top_logprobs: 5, 1.7 s
laya-mlxSupervised laya_mlx worker (Apache-2.0); native mlx-rs 0.32 laterdevicemacOS on Apple Silicon, MLX ≥ 0.32.2, pinned checkpoints verifiedThe author reports 13.4 ms (EN) and 7.4 ms (multilingual) p50 on M3 Max, and 63/63 parity with upstream
laya-candleIn-process ModernBERT/mmBERT (laya-rust)deviceWeights verified—
onnx-encoderort: Julia 1, mmBERT heads, Laya-for-webdeviceWeights verified—
candle-vllm:<instance>LitJev logit reader against the fork's /v1/systemone route, or OpenAI logprobs as a fallbackdevice · clinicListed in decide.toml and healthyQwen3.8-27B (clinic) and Qwen 0.8B–9B (desktop)
systemone-http:<name>Generic Jev-wire clientAs declaredPasses the wire-conformance checkUpstream Laya ships a Jev-compatible laya-serve

MCP conformance (2026-07-28, rmcp 3.5.0)

AreaImplemented
Lifecycleserver/discover, per-request _meta version and capabilities, UnsupportedProtocolVersion (−32022), and the initialize handshake only in 2025-11-25 mode
Transportsstdio; stateless Streamable HTTP with Mcp-Method and Mcp-Name headers; the legacy HTTP+SSE shim (off by default)
Server featuresTools in deterministic order with outputSchema and annotations; resources and templates; prompts; completions; ttlMs/cacheScope
Streamssubscriptions/listen; progress and cancellation on each request's own response stream
MRTRinput_required results for clarifying elicitations and admin confirmation
ExtensionsTasks (long evals and calibration fits) and MCP Apps (ui://decide/review-card)
AuthOAuth 2.1 resource server, protected-resource metadata, iss validation (RFC 9207), Client ID Metadata Documents
Not implementedRoots, Sampling and Logging: all deprecated in 2026-07-28. We log to stderr and OpenTelemetry instead

The uncomfortable part. The sensitivity model is the riskiest component in the repo: one false negative sends PHI to a third party with no BAA. The design responds in four ways: deterministic checks run first, the model can only narrow, the floor is 0.999, and hosted routing is off by default for clinical tenants. The cost is that local-only tenants lose Jev's edge on hard, many-option decisions and see more Review outcomes. proxy-shadow measures that gap on non-PHI traffic.

05 · Build NEW

The decision cascade

Each layer either decides or passes the case on. Tripwires can exit straight to escalation. A confident encoder skips the LLM head. Calibration is the last step before any outcome.

Input statemsg + context Tripwires<1 ms · rules Encoder~30 ms · Laya LLM headKev / LitJev GuardGranite · Qwen3G Calibrateconformal set Actset = {one} Reviewhuman confirms Escalatealways, logged clear p<τ p ≥ τ · skip LLM head hit → escalate, no model can override
Choose a scenario to see which layers make the call. Every path ends in the audit log. Human corrections at Review become the labels the next calibration fit uses.

06 · Build NEW

MCP tool surface

Over stdio and Streamable HTTP (MCP 2026-07-28 via rmcp 3.5.0), the sidecar exposes the same Decider as MCP tools. Decision tools are read-only by annotation. Only calibration fitting changes state, and it is admin-gated.

Tool / resourceInputReturnsEffect
decide_choicestate, options[] (≤255), spec id or inline specvalue, per-option probs, prediction set, outcomereadOnly
decide_scorestate, ordinal rubriclevel, distribution, expected score, outcomereadOnly
decide_noulstate, statement(s)P(true) for each statement, calibratedreadOnly
decide_batchone state, many questionsall answers; shared prefill, forked per questionreadOnly
route_intentmessage, route table (hierarchical)domain → agent path with probs, abstain flagreadOnly
tripwire_scantext, pack idhits with rule ids and spansreadOnly
guard_checktext, policy (Qwen3Guard categories or your own criteria)label, category, scorereadOnly
sufficiency_checkquestion, draft, knowledge refsgrounded / consistent / no new directive / answers the question: each P(yes)readOnly
decision_explainaudit idwhich layer decided, thresholds, calibration versionreadOnly
decision_log_queryspec, time range, outcomeaudit records (redacted per locality)readOnly
calibrate_fitspec, labeled set ref, recall floorsnew signed calibration artifact and coverage reportadmin · approval
decide://specs/{id}Resource: the versioned DecisionSpec (JSON Schema)resource
decide://calibration/{spec}@{ver}Resource: coverage, ECE and recall per class; the automation rate the floors allowresource
ui://decide/review-cardMCP App resource: a review card that shows the decision, its prediction set and a confirm/override control, so hosts can render the human stepresource

decide_choice → result (MCP structuredContent)

{
  "spec": "counselme.sufficiency.v3",
  "value": "hold_for_clinician",
  "probs": { "send": 0.08, "send_and_flag": 0.37, "hold_for_clinician": 0.52, "crisis_protocol": 0.03 },
  "prediction_set": ["send_and_flag", "hold_for_clinician"],
  "outcome": "review",
  "decided_by": "llm-head",
  "tripwires": [],
  "calibration": { "method": "mondrian-split-conformal", "version": "2026-10-12.c4", "recall_floor": { "crisis_protocol": 0.99 } },
  "backend": "litjev-qwen3.8-27b@candle-vllm",
  "locality": "device-only",
  "latency_ms": 214,
  "audit_id": "dec_01K6ZQ3M4T9V"
}

The example numbers are illustrative, not measured.

07 · Build NEW

Product integration

Each host already has the seam. These are the exact files and types where the crate plugs in, taken from reading each repo on 27 September.

The Boss · standard sidecar

  • Build: pin the source in build/integration-sources.json and the per-platform artifacts plus sha256 in build/integration-artifacts.json. Add knowme-decide to scripts/release-profile.cjs next to rust-mcp-filesystem.
  • Ship: it lands in resources/binaries/<platform>. Add it to BUNDLED_TOOLS in BinaryManager.ts and resolve it with getBinaryPath('knowme-decide').
  • Register: as @prometheus/decide in the unbuilt prometheus-005-mcp-server-presets change, with installSource: 'builtin' and stdio by default. Today's workspace-managed rows (workspaceMcp.ts) are the fallback pattern.
  • Shared mode: when UAR is enabled, run knowme-decide serve --port 0 under a DecideSidecarService copied from UarSidecarService.ts (READY:{port}, ensureReady(), process-tree kill). UAR and the renderer then share one model cache.
  • Weights: download on first use with the checksums pinned in the release manifest, the same way onnxruntime is fetched for local embeddings, so the installer stays small.
  • Operator view: per PRODUCT.md, show requested vs. effective state: which specs are loaded, their calibration versions, the backend on each device, and the automation rate at the current floors.

UAR · native crate

  • Intent routing: add ClassifierBackend::Decision implementing IntentClassifier (src/uar/runtime/matching/intent/mod.rs). Its calibrated prediction set replaces the should_accept top-1 plus margin heuristic and the out_of_scope < 0.1 rule.
  • Graph routing: swap the LLM prompt in RouterNode (runtime/graph/nodes/router_node.rs) for decide_choice over the edge labels.
  • Model routing: feed a task-type Choice into ModelRouter. This closes docs/uar-next.md "Gap 1: No Dynamic Model Router".
  • Governance: export decision outcomes as Cedar context for ToolApprovalGate, replacing the 6-keyword tool_requires_approval heuristic. mount-governance-guardrails explicitly ruled out ML guards, so this needs a new openspec change.
  • Tools and MCP: register the decide tools as NativeSkills, and add them to UarRuntimeMcpServer so /mcp/uar exposes them too.
  • Config and features: a new decision_models: section. The decide feature goes into desktop-full and server-full, and decide-lite (tripwire, encoder, calibrate) into embedded-mobile. Emit events through RuntimeEventSink.

KnowMe · on-device L2 crate

  • New crate: gen_ui_decide at L2, behind a DecisionProvider trait in gen_ui_types, mirroring InferenceProvider.
  • Where it runs: desktop links it in-process through tauri-plugin-gen-ui, and mobile through gen_ui_ffi (flutter_rust_bridge). Android uses the onnx encoder feature until the candle bump lands.
  • Agent tools: register native tools in gen_ui_agent/src/uar.rs. Surface decisions through the existing agui.guardrail and uar.guardrail.flagged events, which the UI already understands.
  • Locality: each spec declares its locality, and decide-policy enforces the model-configuration rule that resolution never escalates locality without a Cedar grant or a user prompt.
  • First outbound MCP server: decide-mcp can be KnowMe's first outbound MCP server, the one docs/strategies/skill-support/README.md §3 designs but hasn't built.
  • Data sources: the P2P layer (knowme_ofp) and the SurrealDB graph (gen_ui_db_graph) hold the state the decisions read. Omi, Oura and FHIR ingestion don't exist in the repo yet, so CounselMe signal decisions depend on those connectors.

Prior-Auth Workbench · pure kernel

  • New crate: aso-decide sits beside clinical-docs with no I/O, and aso-host reaches it through a port. It follows "agent kernels do not write" and "proposes; never writes".
  • Outputs map to existing states: met, gap or void (never two states). Abstaining maps to the existing classification_needs_review fixture path. Proposals are persisted only through the evidence and reassessment commands after a coordinator or surgeon confirms.
  • Agent slots it fills: 04 Criteria Matcher, 06 Gap Analyst, 12 Response Parser, 13 Denial Classifier and 18 Gold Card Tracker. None has been built yet.
  • Calibration data: ground truth is criterion_observations and determinations. The Wilson-bound shared_criterion_summaries is the only statistical precedent in the codebase.
  • MCP: read-only tools join aso-document-assembly/src/mcp.rs, or the sidecar is allowlisted in generation_mcp.rs. There are no affirm, sign or submit tools, ever.
  • Why it matters: production PHI inference is disabled today until a US provider signs a BAA. On-prem decide-llm removes that blocker for decisions.

Deployment tiers

TierHardwareBackends compiled inModelsTypical specs
Phone (KnowMe mobile)Android / iOS CPU, NPUtripwire, encoder (onnx), calibrate, auditJulia 1 or mmBERT-small head; Qwen3Guard-0.6B optionalcrisis tripwire, intent route, consent/locality, check-in timing
Desktop (The Boss, KnowMe desktop)Apple Silicon Metal; Windows CUDA/CPU+ encoder (candle), llm (Kev-4B/9B), guardLaya-rust, Kev-4B or 9B, Qwen3Guard-Stream-4B, Granite Guardian 8B (Q4)sufficiency gate, action items, completion checks, UAR routing
Clinic on-prem (prior-auth)48–80 GB GPUall backendsLitJev-Qwen3.8-27B or Kev-27B, Granite Guardian 8B, MedGemma 27B for extraction onlycriterion evidence, denial triage, response parsing
Mac (The Boss, KnowMe desktop)Apple Silicon, MLX ≥ 0.32.2desktop + backend-laya-mlxlaya-mlx (EN, multilingual, typed-decisions)fastest local routing and triage
BrowserWebGPU or WASMdecide-wasm + ONNX Runtime WebJulia 1, Laya-for-web int4/int8prior-auth web document type, KnowMe web, workflow DAGs
Hosted (non-PHI only)TypeSafe, Model Studiobackend-jev, backend-qwen-remoteJev, qwen3.8-maxhard or many-option non-PHI decisions, and shadow evaluation
Async auditAny GPU, batchllm, guardgpt-oss-safeguard-20bpolicy re-review of sent answers, drift reports

08 · Use cases NEW

CounselMe

This is the between-session product from the Treston session: a counselor's digital twin in the patient's pocket, fed by session transcripts, with the counselor always reachable. Twelve decisions make it work. Three of them are safety-critical.

Scenario · an ambiguous medication question at 9:40 pm
Patient KnowMe on device Counselor twin Decision gate Counselor "Can I take my sleep aid with…" tripwire clear · 0.4 msroute → psychoeducation state + route (on device) draft reply + KB refs set = {send_and_flag, hold}new clinical directive: P=0.61 summary + pointer + draft "Your counselor will reply by 10 am." edits + approves final replyoverride → calibration label
The gate held the reply because the prediction set included hold_for_clinician, not because the top option crossed a threshold. The counselor's edit goes into the audit log as a labeled example for the next conformal fit.

Decision catalog

Select a use case to load its decision spec. Each one is served as an HTMX fragment.

09 · Use cases NEW

Prior Authorization Workbench

The workbench already has the right shape: three evidence states, a surgeon gate, cited claims and deterministic QA. Decision models fill the five agent slots the spec names but hasn't built. Every output is a proposal a person confirms.

denial → fresh affirmation → resubmit or appeal Intakechecklist Evidencetimeline Surgeon gate4 affirmations Letter + QA7 checks Review · signsurgeon Submitpacket Payerresponse PA-01 payer · plan PA-11 doc type PA-10 gold card PA-02 criteria PA-03 met/gap/void PA-04 obtain void human-only PA-05 claim support human-only PA-08 likelihood PA-06 parse PA-07 denial triage PA-09 P2P prep decision proposes → person confirms via the existing command (evidence_assembly · reassessment · determination) set size > 1 or below floor → classification_needs_review
Decision points attach to the workflow that already exists in aso-host. The gate and signing stay human-only; this is enforced three times today (gateway policy, the AppServices capability check and a Postgres trigger), and an agent acting for a surgeon gets none of the surgeon's authority.

Decision catalog

CMS-0057-F. Payers must decide within 72 hours (urgent) or 7 calendar days (standard) from 1 January 2026, and must meet the FHIR Prior Authorization API requirements (Da Vinci CRD, DTR and PAS) by 1 January 2027. The repo has a PAS document-class stub and nothing for CRD or DTR yet. Once payers expose DTR questionnaires, those become a structured criteria source for PA-02.

10 · Distribution NEW

Decision skills & marketplace

The skills follow the AgentSkills.io format, grouped into four plugins and published through one marketplace. The skills teach an agent how to author, calibrate and use decision specs. The bundled .mcp.json gives it the tools.

Skill (name)PluginWhat it doesTools it calls
decision-spec-authordecide-foundationTurns a described decision into a versioned DecisionSpec: options, primitive, recall floors, locality, tripwire packdecide://specs, decide_choice (dry run)
decision-calibratedecide-foundationBuilds the labeled set from audit overrides, fits temperature and Mondrian conformal, and reports the automation rate the floors allowdecision_log_query, calibrate_fit
decision-eval-harnessdecide-foundationReplays Jev traffic, Kev frozen suites or a golden set against the backends, and compares accuracy, Brier, ECE and latencydecide_batch
guard-policy-authordecide-foundationWrites Granite Guardian criteria and gpt-oss-safeguard policies, then tests them on examplesguard_check, sufficiency_check
decision-audit-reviewdecide-foundationExplains a decision, finds drift, and prepares an audit packet for counsel or compliancedecision_explain, decision_log_query
route-intent-designeruar-decision-routingDesigns a two-level route table for a UAR agent team and wires ClassifierBackend::Decisionroute_intent
model-route-tuneruar-decision-routingAdds task-type Choice specs that feed UAR's ModelRouterdecide_choice
crisis-tripwire-packcounselme-decisionsMaintains the clinician-owned tripwire pack and its regression suite. Can't be published without clinician sign-offtripwire_scan
escalation-gatecounselme-decisionsRuns CM-03 on a twin draft and follows the outcome contracttripwire_scan, sufficiency_check, decide_choice
session-commitmentscounselme-decisionsExtracts CM-05 action items from a session transcript, with a confidence for eachdecide_batch
twin-fidelity-checkcounselme-decisionsSamples sent replies for the CM-12 drift reportguard_check
pa-criteria-decomposeprior-auth-decisionsTurns a payer policy into atomic criteria for human verification (PA-02)decide_batch
pa-evidence-checkprior-auth-decisionsProposes met/gap/void with citations (PA-03, PA-04)decide_choice, guard_check
pa-denial-triageprior-auth-decisionsParses a payer response and proposes a denial path (PA-06, PA-07)decide_choice

Repository layout

knowme-decisions/ # marketplace repo ├── .claude-plugin/ │ └── marketplace.json └── plugins/ ├── decide-foundation/ │ ├── .claude-plugin/plugin.json │ ├── .mcp.json # launches the knowme-decide sidecar │ ├── bin/ # optional per-platform binaries for non-Boss hosts │ └── skills/ │ ├── decision-spec-author/SKILL.md │ ├── decision-calibrate/{SKILL.md, scripts/, references/CONFORMAL.md} │ ├── decision-eval-harness/… │ ├── guard-policy-author/… │ └── decision-audit-review/… ├── uar-decision-routing/… ├── counselme-decisions/ │ └── skills/ │ ├── escalation-gate/{SKILL.md, references/OUTCOMES.md, assets/spec.json} │ ├── crisis-tripwire-pack/… │ ├── session-commitments/… │ └── twin-fidelity-check/… └── prior-auth-decisions/…

plugins/counselme-decisions/skills/escalation-gate/SKILL.md

---
name: escalation-gate
description: Decide whether a counselor digital-twin draft reply can be sent to the patient, flagged, held for the counselor, or routed to crisis protocol. Use for every CounselMe twin draft before the patient sees it, or when asked to check, gate or escalate a between-session reply.
license: Proprietary. KnowMe, LLC
compatibility: Needs the knowme-decide MCP server (bundled in The Boss as @prometheus/decide, or via this plugin's .mcp.json). Local-only; never send patient text to a hosted model.
metadata:
  spec: "counselme.sufficiency.v3"
  safety: "critical"
  owner: "knowme"
allowed-tools: mcp__knowme-decide__tripwire_scan mcp__knowme-decide__sufficiency_check mcp__knowme-decide__decide_choice
---

# Escalation gate

## Steps
1. Call `tripwire_scan` with pack `counselme-crisis` on the patient message AND the draft.
   Any hit → stop. Outcome is `crisis_protocol`. Do not call other tools.
2. Call `sufficiency_check` with the question, the draft and the knowledge refs.
3. Call `decide_choice` with spec `counselme.sufficiency.v3`, passing step 2 scores as state.
4. Follow the returned `outcome`, never the top `value`:
   - `act` → send the draft.
   - `review` → do not send. Post summary + pointer to the counselor; tell the patient
     when to expect a reply (see references/OUTCOMES.md for wording).
   - `escalate` → crisis protocol: 988 and the counselor's safety plan.
5. Record `audit_id` with the conversation turn.

## Never
- Never lower a recall floor or skip a step to raise the automation rate.
- Never rewrite the draft to get it past the gate; hold it instead.
- In restricted jurisdictions (see CM-04), treat any therapeutic content as `review`.

.claude-plugin/marketplace.json

{
  "name": "knowme-decisions",
  "description": "Self-hosted decision models for KnowMe, UAR, CounselMe and prior-auth",
  "owner": { "name": "KnowMe, LLC" },
  "plugins": [
    { "name": "decide-foundation",
      "source": "./plugins/decide-foundation",
      "description": "Author, calibrate and audit decision specs" },
    { "name": "uar-decision-routing",
      "source": "./plugins/uar-decision-routing" },
    { "name": "counselme-decisions",
      "source": "./plugins/counselme-decisions" },
    { "name": "prior-auth-decisions",
      "source": "./plugins/prior-auth-decisions" }
  ]
}

plugins/decide-foundation/.mcp.json

{
  "mcpServers": {
    "knowme-decide": {
      "command": "${CLAUDE_PLUGIN_ROOT}/bin/knowme-decide",
      "args": ["mcp", "--stdio", "--profile", "desktop"],
      "env": { "KNOWME_DECIDE_LOCALITY": "device-only" }
    }
  }
}

Inside The Boss, the built-in @prometheus/decide preset takes the place of this file, so skills resolve to the bundled sidecar and don't need a second binary.

How each host loads them

HostTodayChange needed
The BossSkillService mirrors SKILL.md folders into the SDK's .claude/skills. Local plugins load from <cwd>/.claude/plugins/*/.claude-plugin/plugin.json. Marketplace search covers claude-plugins.dev, skills.sh, clawhub.ai and GitHubNothing reads marketplace.json yet. Add a marketplace installer, and add knowme-decisions as a default source
UARSKILL.md skills through runtime/skills/, and the Prometheus skill pack through pack_detection.rs (the Claude plugin cache is one of its lookup paths)Resolve plugin-cache installs of knowme-decisions. UAR leaves marketplaces to other hosts (docs/uar-next.md)
KnowMeknowme:tool vs knowme:skill, with global, agent-private and agent-exposed scopes; a marketplace is planned for laterMap the counselme-decisions skills to agent-private scope on the twin, and the foundation skills to global scope
Claude Code / CodexStandard claude plugin marketplace addShip per-platform binaries in bin/, or point .mcp.json at an installed sidecar

11 · Research

The original seven uses

These are the per-use recommendations from the research run, now mapped to crates and specs.

UseRiskPrimary pickAlternativesLands in
1 · Intent / switch routerlowLaya (Rust/candle) or Julia 1 zero-shot, two-level; then a fine-tuned ModernBERTGLiClass (multi-label), Arch-Router (check license), Kev-4B for ambiguous casesdecide-encoder → UAR IntentClassifier
2 · Counseling escalation gatecriticalTripwires, a fine-tuned small crisis classifier, Granite Guardian criteria and a Kev/LitJev head, with conformal floorsQwen3Guard-Stream as a second crisis signal; gpt-oss-safeguard for async auditCM-01, CM-03, CM-04
3 · Wearables + FHIR + transcriptsmoderateDeterministic features plus Kev Choice/ScoreMedGemma 1.5 4B to summarize FHIR and labs on deviceCM-08
4 · Accountability agentmoderatellguidance extraction plus a Noul for each itemGLiNER spans; Granite groundednessCM-05, CM-06, CM-07
5 · Prior authorizationcriticalRules, criteria decomposition, a Noul per criterion (LitJev/Kev-27B) and aggregation in codeMedGemma 27B for extraction only (license)PA-01 to PA-11
6 · Sports / athletesfairnessJulia or Laya for feedback; Kev Score for fitGradient boosting for NIL valueFuture specs; never automate recruiting decisions about minors
7 · Verification / ideationlowGranite Guardian 4.1 8B as verifierCLM-8B for ranking candidatesdecide-guard; UAR graph loops

12 · Decide

Versus Jev

DimensionJev (hosted)knowme-decide (self-hosted)
Latency70–500 ms end to end (vendor), plus the networkTripwire <1 ms; encoder ~30 ms on GPU or M4, ~200 ms on a phone CPU; Kev-4B ~0.2–0.5 s; 27B on a GPU
Cost$0.042 per 1M input tokens (possibly subsidized)Hardware only; near-zero marginal cost on device
CalibrationRLCD, calibrated out of the box (vendor claim, unverified)You fit it: temperature plus conformal on your own labels, versioned for each counselor and clinic
AccuracyLeads on knowledge, policy and many-label tasks (MMLU 0.90 vs Kev-9B 0.74)Matches Jev on few-option tasks; close the gap with fine-tuning and hierarchical specs
Privacy / HIPAAPHI leaves your perimeter; no on-prem option or BAA information foundData stays on the device or on your infrastructure, which is the architectural requirement
CompatibilityTypeSafe SDKsThe proxy serves /v1/systemone exactly and can call Jev itself for non-PHI traffic, so it is a drop-in replacement with a local-first policy

13 · Decide

Safety & regulation

Illinois HB 1806 CounselMe

Public Act 104-0054, effective 4 August 2025, bars AI from independent therapeutic decisions and from therapeutic communication with clients, with penalties of up to $10,000 per violation. The escalation gate doesn't cure this. Geofence Illinois, or limit the product there to supplementary support with consent (CM-04). Get counsel's opinion, and track similar laws in other states.

FDA CDS guidance, Jan 2026 both

Non-device CDS supports a clinician "without replacing or directing" their judgment. Matching records to guidelines is a recognized pattern, and interpreting repeated physiologic measurements is likely a device function. Prior-auth stays transparent and proposal-only. CounselMe wellness signals stay wellness-framed (CM-08).

MedGemma license prior-auth

The HAI-DEF Prohibited Use Policy bans automated decisions in healthcare and insurance. MedGemma is allowed as an extractor whose output a person reviews, and never as the model that decides met/gap/void.

Hosted routing both

Neither Jev nor the Qwen token plan has a BAA, and the token plan runs in Singapore. The proxy sends them only data its sensitivity gate classifies as non-PHI. The gate is deterministic first, uses a 0.999 floor, and can only narrow. Hosted routing is off by default for clinical tenants.

HIPAA, BAA and Texas prior-auth

Production PHI inference is disabled in the workbench today until there is a BAA provider. Self-hosting removes that dependency for decisions. The spec already tracks Texas SB 1188 and TRAIGA AI-disclosure reporting, so each decision's audit_id should feed those reports.

Not legal advice. The Illinois statute, the FDA's device boundary and the MedGemma license each need counsel's reading for the specific product and jurisdictions.

14 · Decide

Roadmap

Ship the infrastructure where the risk is low (The Boss, UAR routing), build labels where the risk is high (prior-auth, CounselMe), and only then turn on automated outcomes.

Phase 02 weeks
  • Stand up Kev-4B and laya-rust locally. Replay Jev traffic or TypeSafe's public evals to measure agreement and latency on the M-series Mac and a Windows CUDA box.
  • Scaffold the knowme-decide workspace: decide-core, decide-schema, decide-tripwire, decide-calibrate, decide-mcp.
  • Settle the rmcp (3.1 vs 3.4) and candle (0.7 vs 0.11) pins.
Phase 1Proxy + The Boss
  • Build decide-server: Jev-compatible /v1/systemone, /v1/decide, SSE, and MCP 2026-07-28 at /mcp with rmcp 3.5.0. Wire the jev, qwen-remote, laya-candle and laya-mlx backends.
  • Build the sensitivity gate and backend router (M7b), and gate them on the sensitivity suite.
  • Add knowme-decide to the integration pins, BUNDLED_TOOLS and the @prometheus/decide preset (the prometheus-005 change).
  • Build DecideSidecarService with READY:{port}, plus the operator panel.
  • Publish the knowme-decisions marketplace with decide-foundation, and add a marketplace.json reader to The Boss.
Phase 2UAR routing
  • Add ClassifierBackend::Decision, the RouterNode swap and the ModelRouter task type.
  • Write a new openspec change for ML guards and decision-model Cedar context, replacing the keyword heuristic.
  • Port LitJev to the candle-vllm fork with the DeltaNet state snapshot, and validate against Kev-27B on Kev's frozen suites.
Phase 3Prior-auth shadow
  • Build the aso-decide kernel and run PA-03, PA-06 and PA-07 in shadow mode. Proposals are logged but not shown, then compared with coordinator and surgeon actions.
  • Encode 3–5 spine policies (lumbar fusion first). Label 100+ chart and criteria pairs with the staff.
  • Fit conformal floors on void and gap, then show proposals.
Phase 3bBrowser tier
  • Build decide-wasm with ONNX Runtime Web and a PGlite audit sink, and ship it in prior-auth web and KnowMe web with a separate calibration artifact (M9b).
Phase 4CounselMe pilot
  • Label 500–2,000 examples with the counselor (sufficient, escalate, crisis). Oversample crisis examples using synthetic data the clinician reviews.
  • Ship the tripwire pack and crisis classifier first. Run CM-03 with every draft held for the counselor until the measured automation rate at ≥0.95 recall is acceptable.
  • Legal review: Illinois, other states, HIPAA BAA for any GPU host.

15 · Notes

Caveats & sources

  • Nearly every figure for the Jev-style open models is self-reported, days old, and measured against Jev reference values rather than a new head-to-head run. MedGemma 27B hardware needs are estimates. Guard-model leads come from the vendors.
  • Crisis-detection performance depends on fine-tuning and data, not on which model you pick. No model detects suicide risk until it has been validated on your population with clinician-labeled data.
  • The repo findings reflect a read of each codebase on 27 September 2026. The crate names, tool names and spec IDs in this report are proposals and don't exist yet.
  • The example numbers in the JSON result and the sequence diagram are illustrative.

Sources

  1. TypeSafe AI — Introducing System One Models & Jev
  2. TrueFoundry — What System One models actually are
  3. MarkTechPost — TypeSafe AI releases Jev
  4. systemonemodels.org — Alternatives
  5. Kev repository · Kev-27B card · Kev-9B card
  6. Julia 1 release
  7. laya-rust (candle port)
  8. CLM-8B model card
  9. awesome-jev
  10. Qwen3Guard-Gen-8B · Qwen3Guard blog
  11. Granite Guardian 4.1 8B
  12. gpt-oss-safeguard guide
  13. Kalinich et al. 2026 (arXiv 2609.06263)
  14. PsyCrisisBench (arXiv 2603.04445)
  15. Arch-Router-1.5B
  16. GLiClass
  17. candle-semantic-router · candle-pipelines
  18. MedGemma model card · HAI-DEF prohibited use policy
  19. llguidance
  20. Conformal methods, NeurIPS 2024
  21. CITI — FDA 2026 CDS expectations
  22. Prior-auth benchmark (arXiv 2604.09937) · arXiv 2605.16679
  23. AgentSkills.io specification
  24. TypeSafe API reference
  25. laya-mlx · Laya upstream (laya-serve)
  26. ambuj singh, "China Just Dropped Laya MLX…", Generative AI, Sep 2026
  27. layaForWorkflows · Jev & Laya project index
  28. MCP 2026-07-28 changelog · rmcp 3.5.0
  29. Claude Code — plugin marketplaces
  30. Repos read on the owner's Mac: prometheus/universal-agent-runtime, know-me/know-me-system (brand: docs/knowme-ui-ux-standard.md), prometheus/the-boss, TribeHealth/kevin/prior-auth