CATLX — Capability & Environment Routing
This skill owns where CATLX executes work and how it guarantees the best available capability for the
current hardware, falling back transparently when the best module is unavailable. It also covers the
file-backed registries that make state crash-safe and the WebSocket bus that keeps the GUI live.
Canonical detail: ../knowledge/references/silexis-and-routing.md (§3.3–3.7),
../knowledge/references/data-registries.md, ../knowledge/references/hardware-adaptation.md.
Purpose
Environment Routing determines where a module's work is executed, and Capability Routing guarantees every
request is served by the best available capability for the current hardware state — falling back to the
next-best option transparently rather than failing.
When to activate
- User asks which execution environment is used for a module or why a heavy task ran in a container.
- Configuring capabilities.yaml routing rules or a fallback chain.
- Debugging a capability that used a fallback engine (e.g. STT).
- Understanding file-backed registries or live GUI sync.
What this skill handles
- Environment routing — choose among four execution environments by hardware tier and
module-declared preference:
LOCAL_PROCESS — Node.js worker thread (T0; all tiers for fast light modules; e.g. Intent Parser, Memory Broker)
LOCAL_SUBPROCESS — isolated OS subprocess + IPC pipe (T1+; native bindings/CPU load; e.g. OCR, STT)
LOCAL_CONTAINER — Docker container under Compose (T2+; heavy ML/GPU; e.g. Whisper STT, Coqui TTS, LLM server)
REMOTE_API — HTTP call to external provider (all tiers; when local unavailable; e.g. Google AI Studio, Groq, HF)
- Capability routing & fallback — on a capability request (e.g.
transcribe audio), query the
CapabilityMap for the strategy, route to the matching module, and fall back to the next-best option when
the best is unavailable. Preserve the exact STT fallback chain (see ../examples/stt-fallback-chain.md).
- File-backed registries — all persistent state is a SQLite DB in
/data/registries/ with WAL (see
../knowledge/references/data-registries.md): modules.db, workflows.db, memory.db,
credentials.db, plugins.db (+ telemetry.duckdb).
- Adaptive runtime evolution — nightly (or on-demand) analysis produces config recommendations:
hot-swap modules, adjust memory-depth parameters, revise workflow-parallelism limits.
- Live GUI synchronization — broadcast every runtime-state change over the WebSocket bus on
:7701;
the Electron shell updates within < 16 ms; no polling, no full-page refresh.
Requirements / constraints
- R2 (adaptive): routing decisions come from the CapabilityMap (see
catlx-hardware-adaptation), never
hardcoded.
- R4 (WAL): registry writes are transactional with a WAL; replayed before reads on recovery.
- Fallback must be transparent — the user must not be required to choose an engine.
- Windows-only network/container enforcement via Windows Filtering Platform and Docker Desktop/WSL2.
Canonical knowledge it reads
../knowledge/references/silexis-and-routing.md · ../knowledge/references/data-registries.md ·
../knowledge/references/hardware-adaptation.md · ../knowledge/rules/windows-rules.md.
Delegation
- Determine tier/capability values → delegate to
catlx-hardware-adaptation
(skill({ name: "catlx-hardware-adaptation" })).
- A module's build/packaging/registry → delegate to
catlx-silexis-modules
(skill({ name: "catlx-silexis-modules" })).
- Container-based environment → delegate to
catlx-docker (skill({ name: "catlx-docker" })).
- GUI rendering of live state → delegate to
catlx-electron-shell
(skill({ name: "catlx-electron-shell" })); the bus is the source of events.
- Registering a module's capabilities with the router (plugin lifecycle) → delegate to
catlx-plugin-ecosystem (skill({ name: "catlx-plugin-ecosystem" })).
Edge cases & warnings
- Degraded availability: if a top-tier module is degraded (e.g. GPU busy), fall back to the next
priority engine — never fail hard if a lower-priority option exists.
- Offline:
REMOTE_API is disabled in offline mode; route to local model servers instead
(see catlx-docker / catlx-ai-provider).
- Air-gap / proxy: environment routing respects the detected network conditions.
- Registry integrity: on recovery the WAL replays before any subsystem reads a registry.
Component lifecycle policy (reuse → install → adapt → create)
NEVER create a new component as the default. Before building/creating anything (a sub-skill, dependency,
reference, workflow, helper, adapter, or template), check, in order:
- Reuse an existing local component (resolve aliases/equivalent capabilities first) — reuse, don't rebuild.
- Use an already-registered component from the registry.
- Install a suitable existing, trusted, supported component → validate → register → connect to the graph → use.
- Adapt an existing compatible component via a small persistent adapter/wrapper instead of re-creating it.
- Create only as last resort — then make it permanent immediately: stable id, canonical location, register,
add to the capability index + dependency graph, add provenance, use, and allow future reuse.
- Never reorganise/recreate already-generated components (no
Skill X 2 / new / temp variants); extend the
existing one. Never create a second competing knowledge source; connect back to the canonical knowledge/ layer.
Promote any reusable artifact out of /tmp/scratch into the permanent ecosystem.
Full policy: ../knowledge/rules/component-lifecycle.md.
Source / provenance
- Source: PART III §3.3–3.7 (environment routing, runtime adaptation & capability routing, fallback
chain, file-backed registries, adaptive runtime evolution, live GUI synchronization).
- Inferred/adapted: Windows Filtering Platform/Docker Desktop references; no domain content invented.
1---2name: catlx-capability-routing3description: CATLX — Capability & Environment Routing4---56# CATLX — Capability & Environment Routing78This skill owns **where CATLX executes work** and **how it guarantees the best available capability for the9current hardware**, falling back transparently when the best module is unavailable. It also covers the10file-backed registries that make state crash-safe and the WebSocket bus that keeps the GUI live.1112> Canonical detail: `../knowledge/references/silexis-and-routing.md` (§3.3–3.7),13> `../knowledge/references/data-registries.md`, `../knowledge/references/hardware-adaptation.md`.1415---1617## Purpose1819Environment Routing determines where a module's work is executed, and Capability Routing guarantees every20request is served by the best available capability for the current hardware state — falling back to the21next-best option transparently rather than failing.2223## When to activate2425- User asks which execution environment is used for a module or why a heavy task ran in a container.26- Configuring capabilities.yaml routing rules or a fallback chain.27- Debugging a capability that used a fallback engine (e.g. STT).28- Understanding file-backed registries or live GUI sync.2930## What this skill handles31321. **Environment routing** — choose among four execution environments by hardware tier and33 module-declared preference:34 - `LOCAL_PROCESS` — Node.js worker thread (T0; all tiers for fast light modules; e.g. Intent Parser, Memory Broker)35 - `LOCAL_SUBPROCESS` — isolated OS subprocess + IPC pipe (T1+; native bindings/CPU load; e.g. OCR, STT)36 - `LOCAL_CONTAINER` — Docker container under Compose (T2+; heavy ML/GPU; e.g. Whisper STT, Coqui TTS, LLM server)37 - `REMOTE_API` — HTTP call to external provider (all tiers; when local unavailable; e.g. Google AI Studio, Groq, HF)382. **Capability routing & fallback** — on a capability request (e.g. `transcribe audio`), query the39 CapabilityMap for the strategy, route to the matching module, and fall back to the next-best option when40 the best is unavailable. Preserve the exact STT fallback chain (see `../examples/stt-fallback-chain.md`).413. **File-backed registries** — all persistent state is a SQLite DB in `/data/registries/` with WAL (see42 `../knowledge/references/data-registries.md`): `modules.db`, `workflows.db`, `memory.db`,43 `credentials.db`, `plugins.db` (+ `telemetry.duckdb`).444. **Adaptive runtime evolution** — nightly (or on-demand) analysis produces config recommendations:45 hot-swap modules, adjust memory-depth parameters, revise workflow-parallelism limits.465. **Live GUI synchronization** — broadcast every runtime-state change over the WebSocket bus on `:7701`;47 the Electron shell updates within < 16 ms; no polling, no full-page refresh.4849## Requirements / constraints5051- **R2 (adaptive):** routing decisions come from the CapabilityMap (see `catlx-hardware-adaptation`), never52 hardcoded.53- **R4 (WAL):** registry writes are transactional with a WAL; replayed before reads on recovery.54- Fallback must be **transparent** — the user must not be required to choose an engine.55- Windows-only network/container enforcement via Windows Filtering Platform and Docker Desktop/WSL2.5657## Canonical knowledge it reads5859`../knowledge/references/silexis-and-routing.md` · `../knowledge/references/data-registries.md` ·60`../knowledge/references/hardware-adaptation.md` · `../knowledge/rules/windows-rules.md`.6162## Delegation6364- **Determine tier/capability values** → delegate to `catlx-hardware-adaptation`65 (`skill({ name: "catlx-hardware-adaptation" })`).66- **A module's build/packaging/registry** → delegate to `catlx-silexis-modules`67 (`skill({ name: "catlx-silexis-modules" })`).68- **Container-based environment** → delegate to `catlx-docker` (`skill({ name: "catlx-docker" })`).69- **GUI rendering of live state** → delegate to `catlx-electron-shell`70 (`skill({ name: "catlx-electron-shell" })`); the bus is the source of events.71- **Registering a module's capabilities with the router** (plugin lifecycle) → delegate to72 `catlx-plugin-ecosystem` (`skill({ name: "catlx-plugin-ecosystem" })`).7374## Edge cases & warnings7576- **Degraded availability:** if a top-tier module is degraded (e.g. GPU busy), fall back to the next77 priority engine — never fail hard if a lower-priority option exists.78- **Offline:** `REMOTE_API` is disabled in offline mode; route to local model servers instead79 (see `catlx-docker` / `catlx-ai-provider`).80- **Air-gap / proxy:** environment routing respects the detected network conditions.81- **Registry integrity:** on recovery the WAL replays before any subsystem reads a registry.8283## Component lifecycle policy (reuse → install → adapt → create)8485**NEVER create a new component as the default.** Before building/creating anything (a sub-skill, dependency,86reference, workflow, helper, adapter, or template), check, in order:871. **Reuse** an existing local component (resolve aliases/equivalent capabilities first) — reuse, don't rebuild.882. **Use** an already-registered component from the registry.893. **Install** a suitable existing, trusted, supported component → validate → register → connect to the graph → use.904. **Adapt** an existing compatible component via a small persistent adapter/wrapper instead of re-creating it.915. **Create only as last resort** — then make it permanent immediately: stable id, canonical location, register,92 add to the capability index + dependency graph, add provenance, use, and allow future reuse.936. Never reorganise/recreate already-generated components (no `Skill X 2` / `new` / `temp` variants); extend the94 existing one. Never create a second competing knowledge source; connect back to the canonical `knowledge/` layer.95 Promote any reusable artifact out of `/tmp`/scratch into the permanent ecosystem.9697> Full policy: `../knowledge/rules/component-lifecycle.md`.9899## Source / provenance100101- **Source:** PART III §3.3–3.7 (environment routing, runtime adaptation & capability routing, fallback102 chain, file-backed registries, adaptive runtime evolution, live GUI synchronization).103- **Inferred/adapted:** Windows Filtering Platform/Docker Desktop references; no domain content invented.