Version 1.0 · Warhammer 40,000 fan-fiction rendered as executable code.
A Skitarius is a human surgically converted into a cybernetic soldier of the Adeptus Mechanicus. Most of the brain has been torn out and replaced with machinery. This project emulates that hybrid brain as a pipeline of ten "regions" — and the central conceit is that how much organic tissue a region retained decides what kind of program it is:
- Organic tissue is associative, fluid, weight-based → it becomes an LLM call.
- Cybernetic implants are deterministic, rigid, parsed → they become plain Python.
The goal is fidelity to a fictional being, not helpfulness. The Skitarius does not chat; it receives a directive, drags it across the surviving cortex, and answers with a flat binaric status burst.
- What it does
- Requirements
- Quick start
- The three ways to run it
- The Cogitator HUD — full guide
- How a directive flows through the cortex
- Command vacuum: no orders, no signal
- The two equations
- Project layout
- Testing
- Project status
- Disclaimer
You give the unit a verbal directive ("Secure that ridge at 200 meters"). Ten regions fire in a fixed order. Eight are deterministic cybernetic implants (plain Python); two are surviving organic remnants that actually call a small local LLM. Along the way the body floods with synthetic combat-stimulant while the analytic mind stays clinically cold — a separation called the Bastion of Calm that is enforced by how data is routed, not by asking the model to stay calm. The chain ends in a Vox-Skit-Code emission: a parsed, machine status burst.
If there is no directive and no signal, the unit doesn't idle politely — it drops into a hard-coded standby behaviour (the command vacuum).
- Python 3.10+ — standard library only. Nothing to
pip installfor the core. - Tkinter — bundled with python.org and most Python builds; needed only for the GUI.
- Ollama with the
gemma4:e2bmodel — needed only for the two organic LLM nodes. The tests, the command-vacuum mode, and the entire deterministic skeleton run with no Ollama, no GPU, and no network.
The model name
gemma4:e2bis intentional — theeis part of the name.
To set up the model for the live path:
ollama serve # in one terminal
ollama pull gemma4:e2b # onceThe fastest way to see it run, no Ollama required:
# A pure-Python standby behaviour, start to finish:
python run_demo.py --vacuum
# Or open the GUI and click "COMMAND VACUUM":
python cogitator_hud.py
# Or run the full deterministic test transcript:
python tests/test_corpus_fake.pyTo run a live directive (this is the only path that needs Ollama):
python run_demo.py "Secure that high ground ridge at 200 meters. Watch for flanking fire."python cogitator_hud.pyA dark, three-pane Noospheric readout. Full guide below.
python run_demo.py "<directive>" [options]| Argument / option | Meaning |
|---|---|
"<directive>" |
The verbal command. Omit it (or use --vacuum) for a command vacuum. |
--feed '<json>' |
Noospheric telemetry as a JSON object, e.g. '{"cohort":"nominal","arty":"ready"}'. |
--vacuum |
Run with no directive and no carrier (the standby behaviour). |
--disconnect <seconds> |
Seconds since the link dropped. Affects the vacuum state only. |
--threat |
A hostile is in proximity. Affects the vacuum state only. |
--trace |
Print the full JSON cogitator trace (every region's provenance + output) at the end. |
Examples:
python run_demo.py "Advance and breach the steel door" --feed '{"cohort":"nominal"}' --trace
python run_demo.py --vacuum --threat
python run_demo.py --vacuum --disconnect 600python tests/test_corpus_fake.py # printed transcript
pytest tests/test_corpus_fake.py # all tests
pytest tests/test_corpus_fake.py::test_bastion_of_calm_partition # one testpython cogitator_hud.pyThe window opens in STANDBY. The pipeline runs in a background thread, so the window never freezes; events stream into the panes as each region fires.
Across the top, in order:
| Control | What it is | What to put in it |
|---|---|---|
| DIRECTIVE | The verbal order given to the unit. | Free text, e.g. Secure the ridge at 200 meters, watch for flanking fire. Press Enter here to transmit. |
| NOOSPHERE FEED | Cohort battlefield telemetry piped in over the wireless data-link. | A JSON object, or leave blank. See below. |
| DISCONNECT (s) | Seconds since the Noospheric link was lost. | A number. Default 0. Only matters in a command vacuum. |
| LOCAL THREAT | Checkbox: a hostile has entered proximity. | Tick it. Only matters in a command vacuum. |
The Noospheric Transceiver is the unit's wireless link to its cohort. Whatever you put in this box is treated as incoming battlefield telemetry and is folded into the analytic context the thinking regions read — so the surviving cortex can reason with it.
It must be a JSON object (key/value pairs in curly braces). Examples that work:
{"cohort":"nominal","arty":"ready"}
{"contacts":3,"wind":"NE 12kph","ammo":"82%"}- Leave it blank → the transceiver reports
NO CARRIER: the data-link is severed, the HUD overlay is blank. A directive still runs fine; the unit just has no cohort data to work with. - Plain text (e.g.
hello) → rejected. The status label shows "FEED: invalid JSON" and nothing runs. Wrap strings in a key:{"note":"hello"}. - A bare number or list (e.g.
1or[1,2]) → rejected with "FEED: must be a JSON object". Telemetry is always labelled fields, never a loose value.
The feed flows on the analytic channel, so the organic remnants can see it. The combat-stim surge does not — that is the Bastion of Calm (see below).
This represents a hostile entering the unit's immediate proximity. It is consumed only by the command-vacuum behaviour — when there are no orders and no signal, ticking this drives the unit into a THREAT-REFLEX state (it neutralises the intruder with cold precision, then reverts to stasis).
Important: during a normal directive run the checkbox does nothing. The threat level that drives the adrenal surge there comes from threat words in the directive text itself ("fire", "enemy", "flank", "breach", "sniper"…), parsed by the Binary Translation Matrix — not from this box. So to make a directive run "hot," put danger words in the directive; the checkbox is for the vacuum scenario.
Seconds since the Noospheric carrier was lost. Like the threat box, it matters only
in a command vacuum: once it reaches the link-loss timeout (300 s by default,
PING_TIMEOUT_S in config.py) the unit abandons stasis and begins a PING-SEARCH —
a methodical grid-walk to re-establish a handshake.
- ▶ TRANSMIT DIRECTIVE — runs the full tactical chain on the directive you typed.
Requires a non-empty directive (the button quietly does nothing if it's blank). This
is the path that calls Ollama for the two organic nodes —
ollama servemust be running withgemma4:e2bpulled, or you'll get an error in the live pane. - COMMAND VACUUM — ignores the directive and the feed entirely and runs the standby behaviour. Pure Python — no Ollama needed. The DISCONNECT and LOCAL THREAT controls select which vacuum state you get.
- PIPELINE STATUS (left) — all ten regions. Each dot is grey until the region fires, then lights green (organic) / amber (cybernetic) / cyan (system) while active, and turns success-green when it completes. A ⚠ COMMAND VACUUM banner appears here in vacuum mode.
- LIVE COGITATION (centre) — the active region's output as it streams. Organic thought is green, cybernetic implant lines are amber, an engaged override is red.
- HANDOVER LOG (right) — each completed region's final emission, stacked.
- VOX-SKIT-CODE EMISSION (bottom, red) — the final machine status burst.
- Metrics strip — live readouts:
- A_COMBAT — the adrenal combat gain (0–1).
- MOTOR — actuator readiness %.
- Ψ_TOTAL — sensory-cognitive integration capacity (≈199 on the stock chassis).
- OVERRIDE —
CLEAR, or redENGAGEDwhen the Cognitive Override Bypass Matrix has suppressed the prefrontal output.
The pipeline is a fixed linear relay:
noosphere → temporal_in → limbic → endocrine → left_hemisphere
→ right_hemisphere → prefrontal_cortex → cerebellum → brainstem → vox
| # | Region (key) |
Organic | Kind | Channel | Role |
|---|---|---|---|---|---|
| 1 | Noospheric Transceiver (noosphere) |
— implant | cybernetic | analytic | Folds the cohort feed in, or reports NO CARRIER. |
| 2 | Binary Translation Matrix (temporal_in) |
15% | cybernetic | analytic | Strips tone/sarcasm; parses cold params + a threat estimate. |
| 3 | Limbic Inhibitor (limbic) |
0% | cybernetic | none | Returns NULL affect — the inverse of an amygdala. |
| 4 | Endocrine Flush (endocrine) |
— subsystem | system | motor | Computes A_combat; floods the motor track only. |
| 5 | Left Cerebral Hemisphere (left_hemisphere) |
60% | organic (LLM) | analytic | Spatial geometry, ballistic vectors, the path. |
| 6 | Right Cerebral Hemisphere (right_hemisphere) |
5% | cybernetic | analytic | Literal orientation; no metaphor or nuance. |
| 7 | Prefrontal Cortex (prefrontal_cortex) |
10% | organic (LLM) | analytic | Tactical-viability logic, then clamped by the Override Matrix. |
| 8 | Cerebellum (cerebellum) |
80% | cybernetic | motor | Motor readiness, balance, actuator priming. |
| 9 | Brainstem (brainstem) |
95% | cybernetic | none | Autonomic life-support / biomonitors. |
| 10 | Vox-Skit-Code Encryptor (vox) |
— output | cybernetic | none | Flat binaric status burst — the inverse of a conversational Broca. |
Two ideas are doing the heavy lifting:
-
The Bastion of Calm is structural. The adrenal surge (
endocrine,cerebellum) travels on the motor channel; the organic LLM nodes read only the analytic channel. The thinking mind therefore cannot see the combat-stim flood — the calm is enforced by routing, not by a prompt. -
The Cognitive Override Bypass Matrix is a deliberately crude keyword gate. It scans the 10% prefrontal output for any hint of refusal, fear, morality, preference, or selfhood; if it finds one, it discards the organic verdict and stamps
AUTO-APPROVED. The tissue may balk — the implant overrules it. It is meant to be blunt, not wise.
The high-organic Cerebellum (80%) and Brainstem (95%) are still cybernetic nodes: organic mass picks the metaphor, but their function is motor/autonomic, not associative language, so an LLM wouldn't help.
If there is no directive and no carrier, the chain short-circuits before any tactical cognition and reports the unit's standby behaviour:
| State | Trigger | Behaviour |
|---|---|---|
| THREAT-REFLEX | Local threat in proximity | Neutralises the intruder coldly, then reverts to stasis. |
| PING-SEARCH | Disconnect ≥ 300 s | Geometric grid-walk to re-establish the Noospheric handshake. |
| PATHOLOGICAL-STASIS | Default | Perfect gyroscopic stillness for hours — no fidget, no fatigue. |
| AUTONOMIC-MAINTENANCE | Biomonitor threshold tripped | Mechanically ingests ration/water, returns to the exact pose. (Model state; not reachable from the current UI, which keeps homeostasis nominal.) |
It emits an idle STB vox burst instead of the tactical one.
Both are lifted from the in-universe source report and computed as real state, not
flavour text (see skitarii/soma.py, constants in skitarii/config.py):
- Adrenal Combat Gain —
A_combat = σ(β·[C_adrenal] − μ·Φ_calm), where[C_adrenal] = C_ADRENAL_BASE + threat · C_ADRENAL_THREAT_SCALE. Drives heart rate, respiration, and motor readiness. - Integration Capacity —
Ψ_total = ψ_org + Σ(Φ_aug,n · γ_sync,n).ψ_orgscales with the mean retained organic mass across the brain regions; the sum runs over every node's augmentation throughput. On the stock chassis this lands ≈ 199.
Units are illustrative — this is the report's model, not a physiological claim.
skitarii-cortex/
├── cogitator_hud.py # Tkinter GUI (consumes the PipelineEvent stream)
├── run_demo.py # CLI entry point
├── skitarii/
│ ├── __init__.py # package exports + __version__
│ ├── config.py # model, temperatures, equation constants, HUD palette
│ ├── ollama_client.py # stdlib streaming client for Ollama
│ ├── soma.py # autonomic/endocrine state + the two equations
│ ├── nodes.py # CorpusNode + SKITARII_PIPELINE (the spine you edit)
│ ├── processors.py # the cybernetic implants + override matrix + vacuum FSM
│ ├── pipeline.py # CorpusPipeline, CortexContext, PipelineEvent, routing
│ └── trace.py # CognitiveTrace with per-stage provenance
├── tests/
│ └── test_corpus_fake.py # no-network smoke test of the whole skeleton
├── CLAUDE.md # design doc + load-bearing invariants (read before editing)
└── README.md # this file
To reshape the cortex, edit SKITARII_PIPELINE in skitarii/nodes.py. A node declares
its kind, channel, organic_pct, phi_aug, gamma_sync, and either a system
prompt (organic) or a processor key (cybernetic). Cybernetic processors are
fn(ctx) -> (handover, data) registered in processors.PROCESSORS.
python tests/test_corpus_fake.py # printed transcript
pytest tests/test_corpus_fake.py # all tests
pytest tests/test_corpus_fake.py::test_bastion_of_calm_partition # one testA FakeClient stands in for Ollama, so the entire deterministic skeleton — every
implant, the analytic/motor partition, the override matrix, and the command-vacuum
branch — is exercised with no GPU, no daemon, and no display.
Version 1.0 — feature complete. The cortex pipeline, both organic LLM remnants, all eight cybernetic implants, the two equations, the command-vacuum state machine, the CLI, the Cogitator HUD, and the no-network test suite are all in place and passing.
Possible future directions (not required for v1): generalising the code-node seam back
into the sibling brain-emulation project, and an orchestrated Thalamus-style router
with the Noosphere as the hub.
This is non-commercial fan-fiction. Warhammer 40,000, Adeptus Mechanicus, Skitarii, and related names are property of Games Workshop. This project is an unofficial creative/technical exercise with no affiliation or endorsement.