CATLX — SILEXIS Module System
This skill owns the module lifecycle: how any CATLX capability becomes a versioned, self-describing
Module — extracted, analyzed, built, packaged, and registered. SILEXIS is an OS-level design language
adopted as native CATLX subsystems (not bolted-on plugins).
Canonical detail: ../knowledge/references/silexis-and-routing.md (§3.1–3.2), plus the manifest
template ../examples (see ../templates/module-manifest.json). Load on demand.
Purpose
Every capability is encapsulated in a Module: a versioned, self-describing unit of logic with a
manifest, an API contract, and declared resource requirements. This skill covers the pipeline that takes a
candidate in /modules/staging and promotes it into /modules/registry and finally /modules/installed.
When to activate
- User asks how CATLX organizes modules, or how a new capability becomes a module.
- Configuring the module registry, manifests, versioning, or dependency graphs.
- Debugging module extraction/analysis/build/packaging.
- Understanding capability tokens (e.g.
catlx.core.memory.episodic).
What this skill handles
- Module Extraction — watch
/modules/staging; on a valid module.manifest.json, run dependency
analysis, interface-contract validation, API-surface extraction, and promotion to /modules/registry.
- Module Analysis — multi-pass static analysis: declared vs actual dependencies, resource benchmarks
under simulated T0/T1/T2, security-surface analysis (network, file, subprocess), capability-contract
completeness.
- Module Building — compile into a distributable artifact. On Windows: an Electron-compatible
CommonJS bundle (+ native Node addon if native bindings required). Build uses esbuild (speed) +
Rollup (final optimization).
- Module Packaging — package contains: compiled bundle, manifest, capability declaration file,
migration script, rollback script, API schema file (JSON Schema), optional Docker Compose fragment.
- Module Registry — file-backed SQLite at
/data/registries/modules.db; REST API on localhost:7700
consumed by the Electron shell, CLI, and Plugin Marketplace. Fields: module_id, version,
capabilities, dependencies, runtime_state, install_path, checksum, compatibility_tier.
Registry schema (exact)
| Field |
Description |
module_id |
catlx.core.memory.episodic |
version |
Semver 2.4.1 |
capabilities |
JSON array of capability tokens |
dependencies |
Directed dependency list with version constraints |
runtime_state |
active | suspended | errored | updating |
install_path |
Relative: /modules/installed/memory.episodic |
checksum |
SHA-256 of package bundle at install time |
compatibility_tier |
Min tier: 0 | 1 | 2 | 3 |
Requirements / constraints
- R4 (file-backed registries + WAL): the registry is never held exclusively in memory; writes are
transactional with a WAL.
- R9 (modularity): every subsystem is a replaceable, isolated module.
- Registry writes are crash-safe; on recovery the WAL replays before any read.
Canonical knowledge it reads
../knowledge/references/silexis-and-routing.md · ../knowledge/references/folder-structure.md ·
../knowledge/rules/architectural-rules.md · ../knowledge/references/data-registries.md.
Delegation
- Where/when a module runs + fallback → delegate to
catlx-capability-routing
(skill({ name: "catlx-capability-routing" })).
- Docker-hosted modules/containers → delegate to
catlx-docker
(skill({ name: "catlx-docker" })).
- Plugin packaging/registry (distinct from modules) → delegate to
catlx-plugin-ecosystem
(skill({ name: "catlx-plugin-ecosystem" })).
- Module registry REST client usage → note the registry is consumed by
catlx-electron-shell and
catlx-capability-routing.
Edge cases & warnings
- A module with an invalid/unsigned package must not be promoted. The analyzer also rejects modules whose
declared capabilities exceed their real implementation.
- Native Node addons must be built for the target Windows architecture; a mismatch breaks loading.
- Version constraints enforce the dependency graph; do not relax them silently.
runtime_state: errored modules must be excluded from scheduling until re-validated.
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.1–3.2 (SILEXIS concept, extraction, analysis, building, packaging, registry).
- Inferred/adapted: Windows CommonJS + native-addon artifact (Linux/Docker OCI-layer description not
applied to this Windows-only conversion). The registry schema is preserved exactly.
1---2name: catlx-silexis-modules3description: CATLX — SILEXIS Module System4---56# CATLX — SILEXIS Module System78This skill owns the **module lifecycle**: how any CATLX capability becomes a versioned, self-describing9Module — extracted, analyzed, built, packaged, and registered. SILEXIS is an OS-level design language10adopted as native CATLX subsystems (not bolted-on plugins).1112> Canonical detail: `../knowledge/references/silexis-and-routing.md` (§3.1–3.2), plus the manifest13> template `../examples` (see `../templates/module-manifest.json`). Load on demand.1415---1617## Purpose1819Every capability is encapsulated in a **Module**: a versioned, self-describing unit of logic with a20manifest, an API contract, and declared resource requirements. This skill covers the pipeline that takes a21candidate in `/modules/staging` and promotes it into `/modules/registry` and finally `/modules/installed`.2223## When to activate2425- User asks how CATLX organizes modules, or how a new capability becomes a module.26- Configuring the module registry, manifests, versioning, or dependency graphs.27- Debugging module extraction/analysis/build/packaging.28- Understanding capability tokens (e.g. `catlx.core.memory.episodic`).2930## What this skill handles31321. **Module Extraction** — watch `/modules/staging`; on a valid `module.manifest.json`, run dependency33 analysis, interface-contract validation, API-surface extraction, and promotion to `/modules/registry`.342. **Module Analysis** — multi-pass static analysis: declared vs actual dependencies, resource benchmarks35 under simulated T0/T1/T2, security-surface analysis (network, file, subprocess), capability-contract36 completeness.373. **Module Building** — compile into a distributable artifact. On **Windows**: an Electron-compatible38 CommonJS bundle (+ native Node addon if native bindings required). Build uses **esbuild** (speed) +39 **Rollup** (final optimization).404. **Module Packaging** — package contains: compiled bundle, manifest, capability declaration file,41 migration script, rollback script, API schema file (JSON Schema), optional Docker Compose fragment.425. **Module Registry** — file-backed SQLite at `/data/registries/modules.db`; REST API on `localhost:7700`43 consumed by the Electron shell, CLI, and Plugin Marketplace. Fields: `module_id`, `version`,44 `capabilities`, `dependencies`, `runtime_state`, `install_path`, `checksum`, `compatibility_tier`.4546## Registry schema (exact)4748| Field | Description |49|---|---|50| `module_id` | `catlx.core.memory.episodic` |51| `version` | Semver `2.4.1` |52| `capabilities` | JSON array of capability tokens |53| `dependencies` | Directed dependency list with version constraints |54| `runtime_state` | `active \| suspended \| errored \| updating` |55| `install_path` | Relative: `/modules/installed/memory.episodic` |56| `checksum` | SHA-256 of package bundle at install time |57| `compatibility_tier` | Min tier: 0 \| 1 \| 2 \| 3 |5859## Requirements / constraints6061- **R4 (file-backed registries + WAL):** the registry is never held exclusively in memory; writes are62 transactional with a WAL.63- **R9 (modularity):** every subsystem is a replaceable, isolated module.64- Registry writes are crash-safe; on recovery the WAL replays before any read.6566## Canonical knowledge it reads6768`../knowledge/references/silexis-and-routing.md` · `../knowledge/references/folder-structure.md` ·69`../knowledge/rules/architectural-rules.md` · `../knowledge/references/data-registries.md`.7071## Delegation7273- **Where/when a module runs + fallback** → delegate to `catlx-capability-routing`74 (`skill({ name: "catlx-capability-routing" })`).75- **Docker-hosted modules/containers** → delegate to `catlx-docker`76 (`skill({ name: "catlx-docker" })`).77- **Plugin packaging/registry (distinct from modules)** → delegate to `catlx-plugin-ecosystem`78 (`skill({ name: "catlx-plugin-ecosystem" })`).79- **Module registry REST client usage** → note the registry is consumed by `catlx-electron-shell` and80 `catlx-capability-routing`.8182## Edge cases & warnings8384- A module with an invalid/unsigned package must not be promoted. The analyzer also rejects modules whose85 declared capabilities exceed their real implementation.86- Native Node addons must be built for the target Windows architecture; a mismatch breaks loading.87- Version constraints enforce the dependency graph; do not relax them silently.88- `runtime_state: errored` modules must be excluded from scheduling until re-validated.8990## Component lifecycle policy (reuse → install → adapt → create)9192**NEVER create a new component as the default.** Before building/creating anything (a sub-skill, dependency,93reference, workflow, helper, adapter, or template), check, in order:941. **Reuse** an existing local component (resolve aliases/equivalent capabilities first) — reuse, don't rebuild.952. **Use** an already-registered component from the registry.963. **Install** a suitable existing, trusted, supported component → validate → register → connect to the graph → use.974. **Adapt** an existing compatible component via a small persistent adapter/wrapper instead of re-creating it.985. **Create only as last resort** — then make it permanent immediately: stable id, canonical location, register,99 add to the capability index + dependency graph, add provenance, use, and allow future reuse.1006. Never reorganise/recreate already-generated components (no `Skill X 2` / `new` / `temp` variants); extend the101 existing one. Never create a second competing knowledge source; connect back to the canonical `knowledge/` layer.102 Promote any reusable artifact out of `/tmp`/scratch into the permanent ecosystem.103104> Full policy: `../knowledge/rules/component-lifecycle.md`.105106## Source / provenance107108- **Source:** PART III §3.1–3.2 (SILEXIS concept, extraction, analysis, building, packaging, registry).109- **Inferred/adapted:** Windows CommonJS + native-addon artifact (Linux/Docker OCI-layer description not110 applied to this Windows-only conversion). The registry schema is preserved exactly.