@xmarts/genius-setup
v1.9.0
Published
One-command, self-updating onboarding for Xmarts Genius (Brain MCP + per-turn injection + automatic session/time capture + plan/committee→Brain enforcement + CLAUDE.md protocol + MCP fan-out: provisions the consultant's granted MCP servers into Claude Cod
Readme
Xmarts Genius — Frictionless Setup
Three ways to get a consultant onto the Genius Brain with automatic learning
capture. Pick one; they all converge on the same ~/.genius/config.json +
Claude Code hooks, and all are idempotent.
The capture guarantee is defense-in-depth and does NOT depend on any single piece:
- L0/L2 — server-side (always on): every MCP tool call is recorded, and the
Brain miner (
gemini-2.5-flashLLM-as-judge, every 2h) extracts the learnings the agent forgot — even if the consultant never installs anything beyond the MCP connection. - L3 — deterministic hook (richer): the
SessionEnd/PreCompact/Stophook POSTs the transcript to/xma/genius/v1/capture/transcript. Hooks guarantee command execution where directives don't. - L4 — durable spool: the hook writes to
~/.genius/outbox/first, then delivers; a central outage never loses a capture. The server side mirrors this withxma.capture.inbox(persist-then-process + bounded retry).
Everything collapses to one learning row via the content-hash idempotency sink, so all layers can fire at-least-once with exactly-once effect.
Option A — npx (any OS)
npx -y @xmarts/genius-setup --token <YOUR_BEARER> --base-url https://beesmart.digital
# optional: --client "Acme Corp" (default scope for this machine)Restart Claude Code. Done.
Option B — Claude Code plugin
Install the xmarts-genius plugin from the Genius marketplace. It bundles the
hooks + slash commands (/genius-status, /genius-capture) and auto-updates.
You still set the MCP Bearer once (the plugin reads ~/.genius/config.json for
the capture endpoint + token — run Option A once, or /genius-status guides you).
Option C — VS Code panel
Install the Xmarts Genius extension. Click Genius: Set up, paste your Bearer token once (stored in SecretStorage), and it runs the same bootstrap. The panel shows Brain connection, capture endpoint, default client, and outbox backlog. It is UI only — never the capture mechanism.
Where the token comes from
Each consultant's Bearer is their MCP API key, generated from their
xma.consultant ficha in Genius ("Generate Claude Code Setup"). No new secret.
Files this writes
| Path | Purpose |
|---|---|
| ~/.genius/config.json | endpoint + token (+ optional default client) |
| ~/.genius/hooks/genius_capture.py | the deterministic capture hook |
| ~/.genius/outbox/ | durable local spool (auto-flushed) |
| ~/.claude.json → mcpServers.beesmart_genius | the Brain MCP |
| ~/.claude/settings.json → hooks | SessionEnd / PreCompact / Stop |
All edits are merged (never clobbered) with a timestamped backup.
