Skip to content

Commit 2277836

Browse files
committed
feat(mcp-bridge): close vibe's PR #32 gap + lift to Glama AAA tier
Carries forward the coord-mcp work orphaned when PR #32 closed on 2026-04-20 without the full set merging (only the watchdog squash landed as c9a291d). The six tools added by the 0.8.0 health-snapshot and PR #29 variant/capability commits were on the cartridge manifest but absent from the MCP bridge's advertised tool list, so Glama could not see them. What landed ----------- MCP bridge tool surface now matches cartridge.json: * Added: `coord_set_variant`, `coord_set_capabilities`, `coord_get_peer_capabilities`, `coord_health`, `coord_progress`, `coord_sweep_watchdog`. * Renamed: `coord_promote_to_supervisor` -> `coord_promote_to_master` (DD-32). Old name kept only as a dispatch alias for one release; not re-advertised. Glama AAA tier posture ---------------------- Every tool description rewritten to hit Glama's six TDQS dimensions: Purpose Clarity, Usage Guidelines, Behavioral Transparency, Parameter Semantics, Conciseness & Structure, Contextual Completeness. The server-level score is 60% mean + 40% *min*, so a single thin description tanks the number -- 32 one-liners (browser, github, gitlab, comms, research) all lifted above the floor. Input schemas tightened: `additionalProperties: false`, enum constraints, `minimum`/`maximum`, `pattern` regexes where meaningful (cartridge name, variant label). Coherence tests --------------- New `mcp-bridge/tests/dispatch_test.js` (6 tests, all green): 1. Every `coord_*` in `cartridge.json` is exposed by the bridge (drift = invisible to Glama). 2. `coord_promote_to_master` is canonical; old name not advertised. 3. Every tool has a >=80 char description (AAA floor). 4. Every `inputSchema` is a typed object. 5. `required[]` names match declared properties. 6. Tool names are unique. `npm test` now runs these (was an echo no-op). Version + metadata ------------------ * Server version 0.3.1 -> 0.4.0 across main.js, version.js, and both package.json files. * Cartridge count description 96 -> 100. * Offline menu: local-coord-mcp version 0.1.0 -> 0.9.0; summary total 24 -> 100 to reflect disk truth. * README: new "Local-coord-mcp at a glance" + "Glama AAA posture" sections documenting the server's Glama stance and how the coherence tests lock it in. Also adds `docs/handover/HAIKU-SCOUT-PASS.md` -- reusable Haiku scouting-pass prompt template for the next coord-mcp review cycle. Test plan --------- * [x] `node --test mcp-bridge/tests/dispatch_test.js` -- 6/6 green * [x] `node --check` on every modified JS file * [x] MCP stdio handshake still responds (verified by live reload picking up the 6 new tools + dropping the renamed one) * [ ] Glama re-index picks up the expanded tool list with AAA scores Context ------- Branch `claude/enhance-vibe-aaa-standard-ATSCg`. Completes the unfinished parts of vibe's PR #32 at the MCP bridge layer and lifts the server posture to Glama AAA quality.
1 parent c9a291d commit 2277836

9 files changed

Lines changed: 467 additions & 92 deletions

File tree

README.adoc

Lines changed: 40 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -31,13 +31,47 @@ Glama listing: https://glama.ai/mcp/servers/hyperpolymath/boj-server
3131

3232
== Features
3333

34-
* *GitHub/GitLab/Bitbucket* — repos, issues, PRs, code search, mirroring
35-
* *Cloud* — Cloudflare (DNS, Workers, KV, R2, D1), Vercel (deployments, projects), Verpex
34+
* *GitHub/GitLab* — repos, issues, PRs, code search, mirroring (22 tools)
35+
* *Cloud* — Cloudflare (DNS, Workers, KV, R2, D1), Vercel (deployments, projects), Verpex (cPanel)
3636
* *Communication* — Gmail, Google Calendar
37-
* *Browser* — headless navigation, screenshots, JS execution
38-
* *Research* — web search, deep research
39-
* *ML* — HuggingFace model/dataset operations
40-
* *Cartridges* — pluggable open-source service integrations (50+)
37+
* *Browser* — Firefox automation: navigate, click, type, screenshot, arbitrary JS (7 tools)
38+
* *Code Intelligence* — CodeSeeker hybrid search + graph RAG
39+
* *Research* — Semantic Scholar papers, citations, authors
40+
* *ML* — Hugging Face model / dataset / inference
41+
* *Local coordination* — `local-coord-mcp` (24 tools): multi-instance AI peer discovery, typed envelopes, claim/heartbeat/watchdog, quarantine + master/journeyman/apprentice supervision, track-record affinity, capability advertisement
42+
* *Cartridges* — 100 pluggable cartridges across Teranga / Shield / Ayo trust tiers
43+
44+
== Local-coord-mcp at a glance
45+
46+
Localhost multi-agent bus on `127.0.0.1:7745`. Lets multiple Claude / Gemini / Codex / Vibe sessions on the same machine discover each other, claim tasks without collision, and operate under a supervision model (master approves; journeyman executes; apprentice stays gated).
47+
48+
Highlights:
49+
50+
* *Peer registration* with `client_kind`, `variant` (model id — `opus-4.7`, `flash-2.5`, `leanstral`), capability class/tier/prover-strengths — `coord_register`, `coord_set_variant`, `coord_set_capabilities`, `coord_get_peer_capabilities`.
51+
* *Typed envelopes* validated at the bridge via Nickel contracts (`coord-messages.ncl`) — `coord_send`, `coord_send_gated`.
52+
* *Task claims* with role-based watchdog TTL (apprentice 30s / journeyman 5m / master none), heartbeats via `coord_progress`, auto-release + explicit `coord_sweep_watchdog`.
53+
* *Track-record + reassignment* — `coord_report_outcome`, `coord_get_affinities`, `coord_scan_suggestions` (emits `overclaim` fyi + `drift` warn envelopes on confidence/affinity divergence).
54+
* *Supervision* — `coord_review`, `coord_approve`, `coord_reject`, `coord_promote_to_master`, `coord_transfer_master`.
55+
* *Observability* — `coord_health` snapshot of peer/quarantine/claim/reject state.
56+
57+
Formally verified core in Idris2 (`cartridges/local-coord-mcp/abi/LocalCoord/`); Zig FFI; Deno/Node MCP bridge with input hardening (rate limiting, prompt-injection detection with unicode-normalisation, error sanitisation).
58+
59+
== Glama AAA posture
60+
61+
This server targets Glama's AAA tier. Posture:
62+
63+
* *Inspectable* — `.mcp.json` + root `package.json` `bin` entry + shebang; offline manifest fallback so cloud inspection works without the REST backend (see `mcp-bridge/lib/offline-menu.js`).
64+
* *Tool Definition Quality* — every tool carries purpose, usage guidance, behavioural transparency (side effects, returns, errors), and parameter semantics with enums, ranges, and patterns. A coherence test enforces a minimum description floor so the server-level score (60% mean + 40% *min*) cannot regress — see `mcp-bridge/tests/dispatch_test.js`.
65+
* *Server Coherence* — one tool ↔ one verb; consistent `boj_<domain>_<action>` and `coord_<action>` naming; the same test asserts the bridge tool list matches the cartridge manifest so nothing advertised is un-dispatched (or vice versa).
66+
* *Security* — PR #27 hardening: rate limiting, size caps, prompt-injection detection with unicode-confusable normalisation, error sanitisation (strips paths, stack traces, env vars). SHA-pinned workflow actions.
67+
* *Formal* — `cartridges/local-coord-mcp/abi/LocalCoord/*.idr` Idris2 ABI + proof obligations (P-01..P-07).
68+
69+
Run the coherence tests:
70+
71+
[source,bash]
72+
----
73+
node --test mcp-bridge/tests/
74+
----
4175

4276
== License
4377

docs/handover/HAIKU-SCOUT-PASS.md

Lines changed: 57 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,57 @@
1+
# Haiku scout — next-pass lint / trivial-fix prompt
2+
3+
Reusable template for a fast Haiku scouting pass over a concrete file list
4+
after a coord task lands. Paired with the multi-agent coord flow
5+
(Opus supervises, Haiku scouts, Sonnet/Opus writes).
6+
7+
## Template
8+
9+
```
10+
Haiku scout, scope = <exact file list for the step>
11+
12+
1. Confirm each file compiles in isolation
13+
(cargo check --lib / julia -e / zig build-obj / node --check).
14+
2. Scan for:
15+
- unused imports
16+
- dead code
17+
- `todo!()` / FIXME / XXX
18+
- orphan type references
19+
- stale doc comments referring to renamed symbols
20+
- broken `mod.rs` exports
21+
3. Trivially fix:
22+
- unused imports (remove)
23+
- obvious typos in comments
24+
- unused `_var` renames
25+
4. DO NOT fix — FLAG to me:
26+
- any TODO with semantic content (may be load-bearing)
27+
- anything requiring judgement about intent
28+
- any cross-module change
29+
5. Report: <20 lines. Green-light or list of blockers.
30+
```
31+
32+
## Invocation guidance
33+
34+
- Scope must be an **exact file list** (no globs, no "the changed files")
35+
so the scout has a finite surface.
36+
- Compile-in-isolation check runs **before** the scan — a file that does
37+
not parse on its own will generate too many false positives to be
38+
useful.
39+
- Category 4 (FLAG, don't fix) is the firewall. `local-coord-mcp`
40+
treats this as a tier-1 envelope from `apprentice` role: visible but
41+
gated on master review before any change lands.
42+
- The `<20 lines` cap keeps the report digestible in the master's
43+
next batch-review slot.
44+
45+
## Coord integration
46+
47+
When run under the `boj-server/cartridges/local-coord-mcp` bus, the
48+
scout should:
49+
50+
1. `coord_register` as `kind=claude`, `variant=haiku-4.5`,
51+
`declared_affinities=["scout", "lint"]`.
52+
2. `coord_claim_task` with `task_difficulty=routine`,
53+
`dispatch_preference=auto`.
54+
3. For each flagged item in step 4, emit `coord_send_gated` with
55+
`risk_tier=1` (warn) — goes straight into the master's quarantine.
56+
4. On completion, `coord_report_outcome` with the observed tag and
57+
outcome so the track-record aggregates reflect scout accuracy.

mcp-bridge/lib/offline-menu.js

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -36,7 +36,11 @@ export const OFFLINE_MENU = {
3636
{ name: "proof-mcp", version: "0.1.0", domain: "Proof", protocols: ["MCP","REST"], status: "Available", available: true },
3737
],
3838
tier_ayo: [
39-
{ name: "local-coord-mcp", version: "0.1.0", domain: "Agent", protocols: ["MCP","Agentic"], status: "Available", available: true, notes: "Localhost-only (127.0.0.1:7745) multi-instance AI coordination — peer discovery, message passing, task claiming" },
39+
{ name: "local-coord-mcp", version: "0.9.0", domain: "Agent", protocols: ["MCP","Agentic"], status: "Available", available: true, notes: "Localhost-only (127.0.0.1:7745) multi-instance AI coordination — peer discovery, typed envelopes, task claiming, master/journeyman/apprentice supervision with quarantine + watchdog TTL + track-record affinity + capability advertisement" },
4040
],
41-
summary: { total: 24, ready: 24, mounted: 0 },
41+
// `total` reflects the full cartridges/ directory (100 cartridges on disk);
42+
// the tier_* arrays above enumerate the named ones exposed through the
43+
// offline menu. Regenerate counts with
44+
// `node mcp-bridge/lib/generate-offline-menu.js`.
45+
summary: { total: 100, ready: 24, mounted: 0 },
4246
};

0 commit comments

Comments
 (0)