Skip to content

Commit f682834

Browse files
hyperpolymathclaude
andcommitted
docs(v1.0.1): refresh all stale counts and architecture claims post-migration
- TOPOLOGY.md: 97 → 112 cartridges, date updated to 2026-04-25 - ROADMAP.adoc: v1.0.1 items updated to 112 (was 106) - EXPLAINME.adoc: counts 96→112, mcp-bridge TS references replaced with Elixir/BEAM + Deno worker pool reality, file map updated to real paths, test section now lists actual ExUnit suites - QUICKSTART-USER.adoc: 99→112, V-lang build steps replaced with Elixir run, test command updated, project structure updated - llm-warmup-dev.md: major rewrite — V-lang layer replaced with Deno/JS adapter layer, build flow updated, JS conventions added, credential forwarding section added, invariant #10 V-lang ban, 70→112 - cartridges/academic-workflow-mcp, ephapax-mcp, fireflag-mcp, sanctify-mcp: added missing domain/tier/auth/ffi.so_path fields (required for CRG C catalog test coverage) Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
1 parent db9c189 commit f682834

9 files changed

Lines changed: 151 additions & 73 deletions

File tree

EXPLAINME.adoc

Lines changed: 22 additions & 23 deletions
Original file line numberDiff line numberDiff line change
@@ -7,20 +7,20 @@ The README makes claims. This file backs them up.
77

88
[quote, README]
99
____
10-
BoJ (Bundle of Joy) is a unified MCP server that consolidates all hyperpolymath tooling into a single endpoint — GitHub, GitLab, Cloudflare, Vercel, Verpex, Gmail, Calendar, browser automation, research, ML, and 50+ open-source cartridges.
10+
BoJ (Bundle of Joy) is a unified MCP server that consolidates all hyperpolymath tooling into a single endpoint — GitHub, GitLab, Cloudflare, Vercel, Verpex, Gmail, Calendar, browser automation, research, ML, and 110+ open-source cartridges.
1111
____
1212

13-
This is the Model-Controller-Processor pattern: cartridges are pluggable service wrappers (90+ total), the MCP bridge translates Claude tool calls to cartridge invocations, and a REST API provides non-MCP access.
13+
This is the Model-Controller-Processor pattern: cartridges are pluggable service wrappers (112 total), the Elixir/BEAM REST layer dispatches tool calls to cartridge invocations (Zig FFI path for `.so` cartridges, Deno worker pool for JS cartridges), and a REST API provides non-MCP access.
1414

1515
== Two Verifiable Claims from How-It-Works
1616

1717
=== Claim 1: Cartridge Orchestration Via Auto-Discovery
1818

19-
**Location**: `mcp-bridge/lib/cartridge-loader.ts` (TypeScript cartridge discovery and initialization)
19+
**Location**: `elixir/lib/boj_rest/catalog.ex` (Elixir GenServer cartridge discovery and initialization)
2020

21-
**How verified**: The cartridge loader scans `cartridges/*/cartridge.json`, reads tool schemas from each, and registers them dynamically with the MCP server. README (§Features) claims "50+ open-source cartridges." The loader validates each manifest, checks for required `name`, `version`, `tools` fields, and prevents duplicate tool names. This enables the "unified endpoint" claim: a single MCP server exposes the union of all cartridges' tools without hardcoding each one.
21+
**How verified**: `BojRest.Catalog` scans `cartridges/*/cartridge.json` at startup, reads tool schemas from each, and stores them in an ETS table. It validates `name`, `version`, `tools` required fields and prevents duplicate names. 112 cartridges are auto-discovered. This enables the "unified endpoint" claim: a single REST server exposes the union of all cartridges' tools without hardcoding each one.
2222

23-
**Caveat**: Auto-discovery is runtime dynamic; there is no compile-time verification that all cartridge schemas are valid JSON Schema. A malformed `cartridge.json` will error at MCP startup, not build time. The authoritative manifest format is Nickel (closed decision `boj-cartridge-manifest-format-dd.md`); migration from JSON is future work.
23+
**Caveat**: Auto-discovery is runtime dynamic; there is no compile-time verification that all cartridge schemas are valid JSON Schema. A malformed `cartridge.json` is silently skipped at startup. The authoritative manifest format is Nickel (closed decision `boj-cartridge-manifest-format-dd.md`); migration from JSON is future work.
2424

2525
=== Claim 2: PanLL Grid Layout Auto-Wiring for Panel Cartridges
2626

@@ -41,19 +41,19 @@ This is the Model-Controller-Processor pattern: cartridges are pluggable service
4141
| gossamer, burble, ephapax, hypatia, verisimdb, typed-wasm — universal ABI/FFI pattern across the estate
4242

4343
| *Pluggable cartridge architecture*
44-
| 96 cartridge directories (`cartridges/*/`), each with `abi/`, `ffi/`, `adapter/` structure; auto-discovered at startup via manifest scan
44+
| 112 cartridge directories (`cartridges/*/`), each with `abi/`, `ffi/`, `mod.js` structure; auto-discovered at startup via manifest scan
4545
| echidna (prover orchestration as cartridges), hypatia (rule composition), gitbot-fleet (bot cartridges per service)
4646

4747
| *PanLL ReScript workspace layer*
4848
| `panll/` — ReScript/TEA panel framework, autowiring constraint solver, 108 panels for UI
4949
| idaptik (game UI panels), gossamer-powered SPAs, PanLL monorepo panels estate-wide
5050

5151
| *panic-attack security gate*
52-
| Pre-commit `panic-attack assail` enforces PA001-PA025 across all 96 cartridges; security module (`lib/security.js`) tests cover injection, unicode bypass, SSRF
52+
| Pre-commit `panic-attack assail` enforces PA001-PA025 across all 112 cartridges; security module tests cover injection, unicode bypass, SSRF
5353
| Every RSR repo in the estate; panicbot wraps it in CI
5454

55-
| *Deno runtime*
56-
| MCP bridge (`mcp-bridge/`) uses Deno-compatible patterns; cartridge test harness (`tests/*.ts`) runs under Deno
55+
| *Elixir/BEAM + Deno runtime*
56+
| `elixir/` REST layer dispatches invocations: Zig FFI path (`.so` cartridges) or persistent `BojRest.JsWorkerPool` (112 JS cartridges via Deno); X25519/ChaCha20-Poly1305 credential forwarding
5757
| nextgen-languages (Deno test runner), standards (Deno axel-protocol tests), 0-ai-gatekeeper-protocol (Deno 36 tests)
5858
|===
5959

@@ -63,26 +63,25 @@ This is the Model-Controller-Processor pattern: cartridges are pluggable service
6363
|===
6464
| Path | What's There
6565

66-
| `mcp-bridge/main.js` | MCP server entry point; JSON-RPC stdio transport for Claude Code
67-
| `mcp-bridge/lib/security.js` | Prompt injection detection, rate limiting, input validation, error sanitization
68-
| `mcp-bridge/lib/api-clients.js` | GitHub, GitLab API passthroughs and BoJ REST API wrappers
69-
| `mcp-bridge/lib/tools.js` | MCP tool schema definitions for all cartridge tools
70-
| `mcp-bridge/lib/logger.js` | Structured JSON logging to stderr
71-
| `mcp-bridge/lib/version.js` | Single source of truth for server name and version
72-
| `mcp-bridge/lib/offline-menu.js` | Static cartridge catalogue for offline/inspection mode
73-
| `cartridges/*/` | 96 cartridge directories, each with abi/, ffi/, adapter/ structure
66+
| `elixir/lib/boj_rest/router.ex` | Plug router — health, pubkey, menu, invoke dispatch
67+
| `elixir/lib/boj_rest/catalog.ex` | ETS-backed cartridge registry; scans cartridges/*/cartridge.json at startup
68+
| `elixir/lib/boj_rest/js_worker_pool.ex` | Persistent Deno worker pool; consistent hash on mod path for cache locality
69+
| `elixir/lib/boj_rest/js_worker.ex` | GenServer wrapping a single Deno port; newline-delimited JSON protocol
70+
| `elixir/lib/boj_rest/node_key.ex` | X25519 keypair persistence; ChaCha20-Poly1305 credential decryption
71+
| `elixir/priv/js_pool_worker.js` | Deno-side pool worker; module cache, env isolation per request
72+
| `cartridges/*/` | 112 cartridge directories, each with abi/, ffi/, mod.js structure
7473
| `src/abi/Boj/` | Idris2 ABI definitions (Protocol, Domain, Catalogue, Safety, etc.)
7574
| `panll/` | ReScript/TEA panel framework for UI workspace layer
7675
|===
7776

7877
== Testing Critical Paths
7978

80-
* **Security module**: `tests/security_test.js` — injection detection, unicode bypass prevention, rate limiting, input validation
81-
* **Smoke tests**: `tests/smoke_test.ts` — CLI, MCP protocol, health check, cartridge schemas
82-
* **E2E tests**: `tests/e2e_mcp_test.ts` — MCP server lifecycle, tool invocation, error handling
83-
* **Property tests**: `tests/p2p_cartridge_properties_test.ts` — cartridge invariants, schema compliance
84-
* **Aspect security**: `tests/aspect_security_test.ts` — injection, sandboxing, credential handling, SSRF prevention
85-
* **Integration**: `tests/integration.sh` — end-to-end MCP server ↔ cartridge invocation
79+
* **Catalog**: `elixir/test/catalog_test.exs` — 11 tests; required fields, tool registry, auth method, tier validation
80+
* **Router**: `elixir/test/router_test.exs` — 12 tests; health, pubkey, menu, dispatch, 400/404 error paths
81+
* **Credential decryption**: `elixir/test/credential_decryptor_test.exs` — 12 tests; X25519 ECDH round-trip, ChaCha20-Poly1305
82+
* **Node keypair**: `elixir/test/node_key_test.exs` — 7 tests; ECDH consistency, persistence
83+
* **JS invoker**: `elixir/test/js_invoker_test.exs` — 8 tests; deno_path detection, mod missing, E2E invoke
84+
* **Property tests**: StreamData installed (`stream_data ~> 1.1`); harnesses pending (see `TEST-NEEDS.md`)
8685

8786
== Questions?
8887

QUICKSTART-USER.adoc

Lines changed: 7 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@ toc::[]
1010

1111
== What is BoJ Server?
1212

13-
Bundle of Joy (BoJ) Server is a cartridge-based MCP protocol gateway. Each cartridge (database-mcp, fleet-mcp, nesy-mcp, etc.) is a formally verified Idris2 ABI + Zig FFI + unified adapter triple. The server exposes REST (port 7700), gRPC (7701), GraphQL (7702), and SSE (7703) endpoints. 99 cartridges cover databases, clouds, messaging, CI/CD, git forges, secrets, queues, proofs, and more.
13+
Bundle of Joy (BoJ) Server is a cartridge-based MCP protocol gateway. Each cartridge (database-mcp, fleet-mcp, nesy-mcp, etc.) is a formally verified Idris2 ABI + Zig FFI + Deno/JS adapter triple. The server exposes REST (port 7700) via Elixir/BEAM with Zig FFI for `.so` cartridges and a persistent Deno worker pool for JS cartridges. 112 cartridges cover databases, clouds, messaging, CI/CD, git forges, secrets, queues, proofs, and more.
1414

1515
Three-class architecture: Class 1 (simple CLI), Class 2 (orchestrator with webhooks/MQTT), Class 3 (BEAM multiplier for global scale).
1616

@@ -69,18 +69,16 @@ just build
6969

7070
== First Run
7171

72-
Build the V-lang adapter and start the server:
72+
Start the Elixir/BEAM server:
7373

7474
[source,bash]
7575
----
7676
just run
7777
----
7878

79-
This builds the Zig FFI, then compiles the V-lang adapter, then starts:
79+
This starts the BEAM application, auto-discovers all 112 cartridges, and launches the Deno worker pool for JS dispatch:
8080

8181
- REST API on http://localhost:7700
82-
- gRPC on port 7701
83-
- GraphQL on port 7702
8482

8583
Check health:
8684

@@ -98,7 +96,7 @@ Type-check the core ABI and run one FFI test:
9896
just test-smoke
9997
----
10098

101-
Full test suite (catalogue + 17 cartridge FFIs):
99+
Full test suite (Elixir ExUnit — catalog, router, crypto, JS dispatch):
102100

103101
[source,bash]
104102
----
@@ -175,9 +173,9 @@ just heal # Attempt automatic repair
175173
----
176174
src/abi/ Idris2 ABI (Catalogue.idr, Protocol.idr, etc.)
177175
ffi/zig/ Zig FFI (catalogue.zig, loader.zig)
178-
adapter/v/ V-lang triple adapter (REST+gRPC+GraphQL)
179-
cartridges/ One dir per cartridge (70+ total)
180-
database-mcp/ Example: Idris2 ABI + Zig FFI + V adapter
176+
elixir/ Elixir/BEAM REST server (Catalog, Router, JsWorkerPool)
177+
cartridges/ One dir per cartridge (112 total)
178+
database-mcp/ Example: Idris2 ABI + Zig FFI + mod.js adapter
181179
container/ Stapeln container ecosystem
182180
tools/cartridge-minter Rust CLI for minting new cartridges
183181
.machine_readable/ State, policies, contractiles

ROADMAP.adoc

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -8,12 +8,12 @@ A distributed, formally verified catalogue of developer server capabilities. AI
88

99
== Current Status: v1.0.1 Recovery (Grade D Alpha)
1010

11-
Core architecture through v1.0.0 is in place (18 cartridges with shared-library
12-
loading, 307 tests passing, Umoja federation, PanLL panel), but a migration
13-
inventory gap remains. As of 2026-04-12 there are 56 V-lang adapter files still
14-
present under `cartridges/` (excluding sidelined notes), with metadata coverage at
15-
65 `cartridge.json` files and 64 `mod.js` files. Priority is adapter retirement +
16-
metadata parity before Grade C dogfooding.
11+
Core Elixir/BEAM REST layer is live: 112 cartridges auto-discovered at startup,
12+
JS dispatch via persistent Deno worker pool, Zig FFI path for `.so` cartridges,
13+
X25519/ChaCha20-Poly1305 Option A credential forwarding, 50 ExUnit tests passing.
14+
V-lang adapter migration complete (0 `.v` files). All 112 cartridges have
15+
`cartridge.json` metadata + `mod.js` tool handlers. Grade C dogfooding requires
16+
expanding to 165+ tests (see `TEST-NEEDS.md`).
1717

1818
== Milestones
1919

@@ -73,8 +73,8 @@ metadata parity before Grade C dogfooding.
7373
=== v1.0.1 — Adapter Migration Recovery (P0, In Progress)
7474

7575
* [x] Remove remaining V-lang adapters across `cartridges/` (confirmed 0 `.v` files 2026-04-25 — cleanup completed 2026-04-12)
76-
* [x] Ensure every cartridge has `cartridge.json` metadata (all 106 cartridges covered 2026-04-25)
77-
* [x] Ensure every cartridge has `mod.js` tool handlers (all 106 cartridges covered 2026-04-25)
76+
* [x] Ensure every cartridge has `cartridge.json` metadata (all 112 cartridges covered 2026-04-25)
77+
* [x] Ensure every cartridge has `mod.js` tool handlers (all 112 cartridges covered 2026-04-25)
7878
* [ ] Re-run cartridge matrix build/tests and update `TEST-NEEDS.md` with current evidence
7979
* [ ] Refresh repo documentation claims after migration closure (counts, completion text, handover docs)
8080

TOPOLOGY.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
# SPDX-License-Identifier: PMPL-1.0-or-later
22
# TOPOLOGY.md — BoJ Server Component Matrix
33
#
4-
# Auto-generated 2026-04-09. 97 cartridges across 6 tiers.
4+
# Updated 2026-04-25. 112 cartridges across 6 tiers.
55

66
## Ports
77

@@ -13,7 +13,7 @@
1313
| 7703 | SSE (Server-Sent Events) | Running |
1414
| 7745 | local-coord-mcp (loopback only) | Running |
1515

16-
## Cartridge Matrix (97 total)
16+
## Cartridge Matrix (112 total)
1717

1818
### Tier 1 — High-Value APIs (11)
1919
| Cartridge | Domain |

cartridges/academic-workflow-mcp/cartridge.json

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,9 @@
22
"name": "academic-workflow-mcp",
33
"version": "1.0.0",
44
"description": "Academic workflow — Zotero integration, citations, paper review",
5+
"domain": "Research",
6+
"tier": "Ayo",
7+
"auth": { "method": "none" },
58
"author": "Jonathan D.A. Jewell <j.d.a.jewell@open.ac.uk>",
69
"license": "PMPL-1.0-or-later",
710
"tools": [
@@ -42,7 +45,8 @@
4245
},
4346
"ffi": {
4447
"language": "zig",
45-
"entry": "ffi/academic_ffi.zig"
48+
"entry": "ffi/academic_ffi.zig",
49+
"so_path": "libacademic_workflow_mcp.so"
4650
},
4751
"adapter": {
4852
"language": "typescript",

cartridges/ephapax-mcp/cartridge.json

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,9 @@
55
"name": "ephapax-mcp",
66
"version": "1.0.0",
77
"description": "Ephapax Cartridge — Proof-compiler query tools for formal verification workflows",
8+
"domain": "Formal Verification",
9+
"tier": "Ayo",
10+
"auth": { "method": "none" },
811
"author": "Jonathan D.A. Jewell <j.d.a.jewell@open.ac.uk>",
912
"license": "PMPL-1.0-or-later",
1013
"tools": [
@@ -40,7 +43,8 @@
4043
},
4144
"ffi": {
4245
"language": "zig",
43-
"entry": "ffi/ephapax_ffi.zig"
46+
"entry": "ffi/ephapax_ffi.zig",
47+
"so_path": "libephapax_mcp.so"
4448
},
4549
"adapter": {
4650
"language": "typescript",

cartridges/fireflag-mcp/cartridge.json

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,9 @@
55
"name": "fireflag-mcp",
66
"version": "1.0.0",
77
"description": "Fireflag Cartridge — Extension-to-MCP mapping and discovery tools",
8+
"domain": "Developer Tools",
9+
"tier": "Ayo",
10+
"auth": { "method": "none" },
811
"author": "Jonathan D.A. Jewell <j.d.a.jewell@open.ac.uk>",
912
"license": "PMPL-1.0-or-later",
1013
"tools": [
@@ -40,7 +43,8 @@
4043
},
4144
"ffi": {
4245
"language": "zig",
43-
"entry": "ffi/fireflag_ffi.zig"
46+
"entry": "ffi/fireflag_ffi.zig",
47+
"so_path": "libfireflag_mcp.so"
4448
},
4549
"adapter": {
4650
"language": "typescript",

cartridges/sanctify-mcp/cartridge.json

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,9 @@
55
"name": "sanctify-mcp",
66
"version": "1.0.0",
77
"description": "Sanctify Cartridge — PHP lint and deviation detection tools",
8+
"domain": "Code Quality",
9+
"tier": "Ayo",
10+
"auth": { "method": "none" },
811
"author": "Jonathan D.A. Jewell <j.d.a.jewell@open.ac.uk>",
912
"license": "PMPL-1.0-or-later",
1013
"tools": [
@@ -40,7 +43,8 @@
4043
},
4144
"ffi": {
4245
"language": "zig",
43-
"entry": "ffi/sanctify_ffi.zig"
46+
"entry": "ffi/sanctify_ffi.zig",
47+
"so_path": "libsanctify_mcp.so"
4448
},
4549
"adapter": {
4650
"language": "typescript",

0 commit comments

Comments
 (0)