← System handbook

Primitive Reflex

Experimentalruntime

A fast System-1 routing layer that selects relevant experts, skills, tools and context without granting execution authority.

TL;DR

Reflex is a provider-neutral routing contract under active development on the feature/primitive-reflex-v1 branch. It can choose an anchor expert, up to three constructive and three critical neighbours, relevant skills/tools/context and a recommended model route. It always returns executionPermitted=false; governed execution remains elsewhere.

ELI5

Reflex is the receptionist who quickly decides who should look at a problem and which folders/tools are probably useful. The receptionist can route the work, but cannot sign the cheque, merge the code or press the deploy button.

Synthesis

Reflex operationalises the bounded expert-neighbour idea: one anchor plus up to ±3 related experts, with a hard maximum of seven. It compiles only authorised context, records why candidates were or were not selected, and escalates to a stronger reasoner when confidence, risk, novelty or authority conditions demand it. The neural adapter work is a separate experiment and cannot become authority by learning a classifier.

Current status

Implemented on a feature branch; not canonical main yet

The current Reflex implementation, tests, CLI and neural experiment exist on primitive-workspace branch feature/primitive-reflex-v1. Docs therefore marks it experimental until it is reviewed/merged into the canonical Workspace line.

Accuracy rule: Do not describe Reflex as a production authority or shipped execution engine until the canonical branch says so.
Routing

Anchor + bounded neighbourhood

Expert selectionMaximum seven experts: anchor 0, up to +1/+2/+3 and -1/-2/-3.
-3 -2 -1Critical / reduction neighbours
0 anchorHighest relevant expert above threshold
+1 +2 +3Constructive / expansion neighbours
Policy

Default bounded selection

SettingDefault
Confidence threshold0.78
Minimum candidate score0.22
Neighbour threshold0.30
Positive neighboursmax 3
Negative neighboursmax 3
Skillsmax 4
Toolsmax 6
Context itemsmax 8
Context characters16,000
Provider timeout1,500 ms
Escalation

Fast routing abstains/escalates when it should

  • Provider failure or no relevant anchor.
  • Confidence below policy threshold.
  • Medium/high risk or sensitive request.
  • Authority decision is not allowed.
  • Write/execute intent without governed execution admission.
  • Novel request.
  • No downstream model route available.
Traceability

Every decision is explainable

The service stores routing evidence for experts, skills, tools and context, including scores, provider/version, selected status, risk, authority state, context reduction metrics and escalation reasons. It writes a private routing-trace artifact rather than treating the recommendation as an effect.

Neural experiment

Learning may improve routing, not authority

The neural-reflex experiment tests compact specialist adapters and calibrated fallback. Its README explicitly claims no trained adapter, benchmark result or optimal topology. Training data requires consent/privacy review and human labels; predictions cannot become gold labels or authorise external tools.

Keep reading

Related pages

Reference / evidence

Canonical sources

These pages are explanatory read models. Where wording conflicts with implementation or a Control decision, the linked implementation/decision is authoritative and this page should be corrected.