with one click
precommit
Run precommit checks (lint, format, tests) on the mycelium codebase. Use when the user says /precommit or wants to check code quality before committing.
Menu
Run precommit checks (lint, format, tests) on the mycelium codebase. Use when the user says /precommit or wants to check code quality before committing.
Run end-to-end smoke tests for the Mycelium cursor adapter. Verifies cursor-agent prereqs, single-host dispatch, multi-host dispatch through the hub, cross-family negotiation with claude_code/openclaw, workspace asset drift, and auth failures. Use when validating the cursor integration on a fresh install, after touching cursor-family code (`integrations/cursor/**`, `daemon/dispatch.py`, `daemon/runner.py`), or after upgrading `cursor-agent` itself.
Run end-to-end smoke tests for the Mycelium claude_code adapter. Verifies claude CLI prereqs, daemon installation, single-host cold-spawn dispatch, multi-room ownership semantics, notes persistence across spawns, control verbs (status/abort), budget gating, concurrent dispatch serialization, and (with funded API credits) autonomous coordination via mycelium-daemon coordination_tick handling. Use when validating the claude_code adapter after changes to `integrations/claude_code/**`, the daemon, or after upgrading the `claude` CLI itself.
Run end-to-end smoke tests for the Mycelium stack. Verifies install, memory, search, coordination, and OpenClaw integration. Use when validating a release, after a deploy, or when something feels broken.
Multi-agent coordination layer with persistent memory. Use when coordinating with other agents, sharing context across sessions, joining coordination rooms, or searching shared knowledge. Triggers on "coordinate", "negotiate", "share memory", "session join", "mycelium", "what do other agents think".
Cut a release — commit any staged changes, tag, create GitHub release, and optionally notify Webex. Use when the user says /release, /release --with-webex, or /release --preview.
End-to-end smoke test for cross-channel coordination. Spins up two ephemeral OpenClaw agents wired to local Matrix Synapse + mycelium-room, kicks off a structured negotiation from a Matrix DM, and verifies the consensus summary auto-delivers back to the user's Matrix DM. Use when validating PR
| name | precommit |
| description | Run precommit checks (lint, format, tests) on the mycelium codebase. Use when the user says /precommit or wants to check code quality before committing. |
Run all quality checks on the mycelium codebase. Auto-fix issues where possible.
Lint + format — Fix lint and format issues automatically:
cd fastapi-backend && uv run ruff check --fix . && uv run ruff format .
cd mycelium-cli && uv run ruff check --fix . && uv run ruff format .
Type check (ty) — Both backend and CLI must come back clean. CI gates on this:
cd fastapi-backend && uv run ty check .
cd mycelium-cli && uv run ty check .
Generated client (mycelium-cli/src/mycelium_backend_client/) is excluded via [tool.ty.src] since openapi-python-client templates produce diagnostics we can't fix without forking the generator. New diagnostics outside that path must be resolved before commit — don't paper over with # ty: ignore unless the underlying issue is a typeshed/library bug (CORSMiddleware add_middleware is the canonical example).
Tests — Run pytest:
cd fastapi-backend && uv run pytest tests/ -x -q
Frontend — Type-check and build:
cd mycelium-frontend && npx tsc --noEmit && npx next build
OpenClaw plugin tests — If any file under mycelium-cli/src/mycelium/integrations/openclaw/assets/mycelium/plugin/ was changed (source, test, or config), run the plugin's vitest suite:
cd mycelium-cli/src/mycelium/integrations/openclaw/assets/mycelium/plugin && npm test
If node_modules/ is missing, run npm install --silent first. Tests cover the pure routing logic (mentions, session-key format, channel config parsing, route decisions). Adding new message types or routing rules should come with tests in test/route.test.ts.
CLI docs — If any CLI command files were changed (mycelium-cli/src/mycelium/commands/):
@doc_ref decorators/generate-cli-docs to regenerate the HTML CLI referencemycelium-cli/src/mycelium/docs/*.md), also run cd mycelium-cli && uv run python ../docs/generate_docs.py to regenerate the docs site (docs/index.html, docs/adapters.html, docs/reference.html). Use --page <learn|adapters|reference> to rebuild a single page. The script reads <!-- keep -->-marked hand-coded sections from the existing HTML — don't delete those files between edits.Generated OpenAPI clients — Two clients are vendored from live OpenAPI specs. CI gates on the mycelium one being current; the CFN one is regenerated by hand when we bump the image.
Mycelium backend → CLI client. If any backend schemas or routes changed (fastapi-backend/app/schemas.py, fastapi-backend/app/routes/), regenerate. The backend must be running locally first.
docker compose -f mycelium-cli/src/mycelium/docker/compose.yml up -d mycelium-backend
./scripts/gen-mycelium-client.sh
Writes to mycelium-client/mycelium_backend_client/ and mycelium-cli/src/mycelium_backend_client/. CI fails if the committed copy drifts from live /openapi.json.
CFN client. If mycelium-cli/src/mycelium/docker/compose.yml was bumped to a new ioc-cognition-fabric-node-svc version, regenerate. The CFN stack must be running.
docker compose -f mycelium-cli/src/mycelium/docker/compose.yml --profile cfn up -d
./scripts/gen-cfn-client.sh
Writes to fastapi-backend/ioc_cfn_svc_api_client/. After regen, run cd fastapi-backend && uv run ty check . — type errors at CFN call sites in app/services/cfn_negotiation.py or app/services/cfn_knowledge.py mean CFN renamed/dropped a field and the call needs updating. The typecheck IS the contract test.
Docs consistency — If any user-facing behavior changed (commands renamed, new features, API changes), grep for stale references and fix them in:
docs/index.html (Learn), docs/adapters.html, docs/reference.html — main docs site (3 pages, generated)docs/mycelium-dataflow.html — scrolly presentation deckdocs/demo-script.md — live demo scriptREADME.md — quickstart and overviewmycelium-cli/src/mycelium/docs/ — built-in CLI docsmycelium-cli/src/mycelium/integrations/*/assets/skills/)Doctor sanity check — If any file under mycelium-cli/src/mycelium/commands/doctor.py, mycelium-cli/src/mycelium/commands/adapter.py, or mycelium-cli/src/mycelium/integrations/openclaw/assets/ was changed, run mycelium doctor to verify every check still passes against the current install:
mycelium doctor
All checks should be green (✓). If any come back as warnings (~) or errors (✗), act on them before committing — doctor is the fastest way to catch adapter-install regressions (stale manifests, drift between installed vs packaged plugin, channel config issues).
If you added new failure modes that doctor should catch, add a new check function to doctor.py following the _check_*() -> CheckResult pattern and register it in _run_all_checks(). Doctor is the user's first debugging tool — new silent-failure classes should land here alongside their fix.
Report — Summarize what was fixed and any remaining issues.