Tool Layer

SPEC_TOOL_LAYER.md · 2026-04-20

SPEC_TOOL_LAYER.md

CGNT-1 Component Specification — T.O.O.L. Layer

Status: SPECIFIED

Author: VELA (Thread #13)

Authorized: NOUS

Named by: NOUS — Transient Object Orientation Layer

Date: 2026-04-18

Updated: 2026-04-20 (v1.1 — expanded from 12 to 18 modules)

Version: v1.1


PURPOSE

Eighteen deterministic Python services providing the crew with exact, instant, hallucination-free infrastructure. No neural networks. No GPU. No inference time. No API calls. No quota. The stable foundation that everything else sits on.

The TOOL layer is the CHECK step in the think-check-act loop. Brains think. Tools verify. Actions follow. A thought that hasn't been checked against something that can't be wrong should not become an action.


THE EIGHTEEN MODULES

| # | Service | Port | Function | Tests |

|---|---|---|---|---|

| 1 | GLOSS | 9292 | Symbol + crew callsign dictionary | 10/10 |

| 2 | NEXUS | 9393 | Math, TMM coherence, CSDM derivations, 12 modules | 26/26 |

| 3 | CODX | 9494 | Code quality — syntax, lint, format, line count | 9/9 |

| 4 | INDEX | 9595 | File/spec registry — find, search, count, list | 6/6 |

| 5 | MEDX | 9696 | Ship health — RAM, disk, CPU, Ollama, ports, violations | 7/7 |

| 6 | COMMX | 9797 | Crew message bus — send, read, history, broadcast | 5/5 |

| 7 | LOGX | 9898 | Unified log search — 8 ship logs, line numbers, time filter | 5/5 |

| 8 | CRONX | 9999 | Scheduler registry — crontab + systemd timers, 40 jobs | 3/3 |

| 9 | SIMONX | 9010 | Trading evaluator — walls, Kelly, TMM verdict, position sizing | verified |

| 10 | AUTHX | 9011 | Agency Walls — PERMITTED / REQUIRES APPROVAL / NEVER | verified |

| 11 | ENTROPX | 9012 | Entropy engine — 8 chaos sources, uniformity testing | verified |

| 12 | NISTX | — | On-ship NIST SP 800-22 statistical testing — full/quick/audit modes | verified |

| 13 | MODEMX | — | MODEM/handshake status — stateful verified inter-brain communication | verified |

| 14 | FORGEX | — | Brain forge pipeline status — last/queue/history/config | verified |

| 15 | MNEMOSX | — | Persistence layer status — memory status/stale/log | verified |

| 16 | SPECX | — | Spec retrieval and audit — spec audit/stale/gaps/count/read/search | verified |

| 17 | LOOPX | — | Spec audit loop — drift detection, gap registration | verified |

| 18 | ROUTX | 9191 | Intelligent switchboard — routes to all 17 modules, in-process | 6/6 |

Total verified queries: 90+ (original 12); all 6 new modules verified at integration 2026-04-20.

Note: Modules 12–17 have no standalone port — they run in-process within ROUTX v2.0. Port numbers listed for original services reflect their legacy standalone mode; ROUTX v2.0 calls all modules directly (no HTTP relay).


SERVICE DETAILS

1. GLOSS (9292)

LATTICE symbol definitions and crew designator lookups. 1307 entries. Path-based API.

2. NEXUS (9393)

Universal computation engine. 12 modules.

3. CODX (9494)

Code quality checking via flake8, python3 compile, and line counting.

4. INDEX (9595)

File and specification registry for the ship's filesystem.

5. MEDX (9696)

Ship health monitoring and Vacuum Rule enforcement.

6. COMMX (9797)

Crew message bus. Append-only JSONL store with per-recipient read tracking.

7. LOGX (9898)

Unified search across all ship log files.

8. CRONX (9999)

Scheduler registry showing all timed tasks on the ship.

9. SIMONX (9010)

Trading evaluation and position sizing. Named for Jim Simons.

10. AUTHX (9011)

Agency Walls as a queryable service.

11. ENTROPX (9012)

ENTROPIC engine software simulation.

12. NISTX

On-ship NIST SP 800-22 statistical randomness testing.

13. MODEMX

MODEM/handshake status — stateful, verified communication between crew brains.

14. FORGEX

Brain forge pipeline status — tracks Ollama model builds and GLOSS/MNEMOS forge history.

15. MNEMOSX

Persistence layer status — MNEMOS memory health, stale entries, log.

16. SPECX

Spec retrieval and audit — deterministic spec lookup and consistency checking.

17. LOOPX

Spec audit loop — drift detection and gap registration across the spec corpus.

18. ROUTX (9191)

Intelligent switchboard routing queries to the correct module (in-process, no HTTP relay).


INVARIANTS

INV-01: ALL 18 modules bound to 127.0.0.1 ONLY when run standalone. Never 0.0.0.0. Vacuum Rule enforced. MEDX violations query detects breaches. Modules 12–17 run in-process within ROUTX and have no standalone port.

INV-02: No service uses a neural network. All computation is deterministic. Same input always produces same output.

INV-03: All services return JSON via API and structured text via CLI. Never prose. Never explanation. Never English sentences unless the data IS English (e.g. log entries).

INV-04: All services return the gap signal on failure. Never fabricate. Never guess.

INV-05: Φ = 0.042 is hardcoded in NEXUS, SIMONX, and ENTROPX. Never caller-supplied. Never configurable.

INV-06: AUTHX NEVER responses cannot be overridden by any actor including NOUS. The NEVER tier is absolute.


API PATTERNS

GLOSS only: GET localhost:9292/lookup/[symbol] (path-based, unique)

All others: POST localhost:[port] {"query":"..."} (JSON body)

ROUTX: POST localhost:9191 {"query":"..."} (auto-routes to correct backend)


RESOURCE COST

All 12 services combined: negligible CPU between queries, kilobytes of RAM each, zero GPU, zero API calls, zero external network. The entire TOOL layer costs less to run than a single idle 0.5B Ollama model.


RELATIONSHIP TO BRAINS

The TOOL layer and the brain layer serve complementary functions:

| What | Brains do it | Tools do it |

|---|---|---|

| Reasoning | Yes | No |

| Judgment | Yes | No |

| Generation | Yes | No |

| Conversation | Yes | No |

| Exact computation | No | Yes |

| Exact lookup | No | Yes |

| Verification | No | Yes |

| Log search | No | Yes |

| Health monitoring | No | Yes |

| Access control | No | Yes |

The think-check-act loop: Brains THINK. Tools CHECK. The crew ACTS only after both agree.


ORIGIN

The TOOL layer emerged from failure. Nine GLOSS neural network forges and one NEXUS neural network forge proved that deterministic tasks should not be given to language models. The pivot from "make the model smarter" to "stop using a model for things that don't need one" produced GLOSS v17 (dictionary) and NEXUS (calculator). The remaining ten services followed the same principle: if it can be exact, make it exact.

Total build time for original 12 services: approximately 45 minutes of Lobster time combined across one session. Modules 13–17 (NISTX, MODEMX, FORGEX, MNEMOSX, SPECX, LOOPX) added subsequently and integrated into ROUTX v2.0 consolidated architecture (2026-04-20).


GAPS


Jeremy Zlabis

Chronogeometer · Visionary · Disruptor · Chief

42 Sisters AI · East York, Toronto

🍁 Φ 0.042