Layered playbook for validating the product end-to-end. The npm consumer path
(npx quartermaster-mcp) is the priority; source checkout is for development.
| Goal | Command |
|---|---|
| Unit + integration tests | pnpm -r build && pnpm -r test |
| Benchmark smoke | pnpm bench -- --ci |
| Full product smoke (CI) | pnpm smoke |
| Local bins (dev) | pnpm smoke:local |
| Published npm (consumer) | pnpm smoke:npx |
| Stress test (full) | pnpm stress |
| Stress test (quick) | pnpm stress:quick |
| Regression (2 rounds) | pnpm regression |
| Regression (local bins) | pnpm regression:local |
| Optional GitHub+Slack eval | node examples/smoke/run-gjs-eval.mjs |
Automated smoke federates the dev workbench (filesystem, memory, everything,
thinking, git) with starter synonymsFile (business-to-dev.json) plus org
synonyms. Regression runs smoke + stress twice, audit-loop replay, and checks
R@8 stability.
Floor for every change — same as CI.
pnpm install --frozen-lockfile
pnpm -r build
pnpm -r lint
pnpm -r test
pnpm bench -- --ciProves: ranker, config, policy, validation, federation with echo fixtures, MCP protocol over in-memory transport.
Does not prove: published tarball, real downstream servers, host agent behavior.
Validates the published package from a clean environment against the dev workbench.
pnpm smoke:npx # from repo root
# or:
node examples/smoke/run-smoke.mjs --npxFrom CI / pre-publish, use the pack path (installs npm pack tarball):
pnpm smokePass criteria:
--versionprints a semver--validate --configsucceeds on dev workbench configquartermaster doctorreports all downstreams connectedquartermaster eval --ci --min-r8 0.5passes on dev workbench cases- MCP protocol checklist + audit CLI loop
Config is generated with synonymsFile: ./business-to-dev.json (starter pack)
and small inline org synonyms. Template:
examples/smoke/quartermaster-dev-workbench.json.
Fixtures: examples/smoke/, eval cases in
examples/regression/eval-cases-dev-workbench.jsonl.
pnpm -r build
node examples/static-demo/demo.mjspnpm -r build
node examples/smoke/run-smoke.mjs --local
# or manually after build-real-config writes a temp config:
pnpm quartermaster eval \
--ci --min-r8 0.5 \
--config /path/to/quartermaster-dev.json \
--cases examples/regression/eval-cases-dev-workbench.jsonlStatic tools from bench/cases/real-mcp-blind.json, no synonyms — honest
baseline before per-team tuning:
pnpm quartermaster eval \
--ci --min-r8 0.45 \
--config <blind-config.json> \
--cases examples/regression/eval-cases-blind-manifest.jsonlRegression builds this config automatically each round.
pnpm benchHeritage 171-tool corpus (~91% R@8). Required before ranker/synonym changes — see CONTRIBUTING.md.
- Copy
examples/synonyms/business-to-dev.jsonbeside yourquartermaster.jsonand set"synonymsFile": "./business-to-dev.json". - Add org-specific inline
synonymsfor terms your team uses. - Run real work in Cursor with
QM_AUDIT=1. quartermaster eval --from-audit audit.jsonl --draft-cases cases.jsonl- Fix weak cases (synonyms, tool descriptions), re-run
eval --ci.
For GitHub + Slack (requires tokens):
export GITHUB_TOKEN=...
export SLACK_TOKEN=...
node examples/smoke/run-gjs-eval.mjsScripted five-step checklist via stdio over the dev workbench:
pnpm smoke:local
# or:
node examples/smoke/mcp-smoke.mjs # with QM_REAL_CONFIG set by run-smoke.mjsOr run the full orchestrator: pnpm smoke.
| Step | Call | Expected |
|---|---|---|
| 1 | listTools() |
retrieve_tools, call_tool, list_servers only |
| 2 | retrieve_tools({ query }) |
Right tool ranked; inputSchema hydrated |
| 3 | call_tool({ name, arguments }) |
Downstream result returned |
| 4 | list_servers |
Connected server; degraded: false |
| 5 | Bad tool name | isError: true, no crash |
Optional: connect an MCP inspector to the
stdio process for interactive retrieve_tools tuning.
npx -p quartermaster-mcp quartermaster policy test \
--config quartermaster.json --tool github.create_issue- Shadow mode: denials logged, calls still forward
- Enforce mode: denied tools return
isErrorwith policy message - Invalid args:
validation_errorin audit, no downstream crash - Bad downstream:
list_serversshowsdegraded: true
Integration tests: packages/proxy/test/policy.integration.test.ts,
packages/proxy/test/reliability.test.ts.
The user-facing proof. See examples/smoke/CURSOR-E2E.md
and docs/recipes/cursor.md.
- Copy
examples/smoke/cursor-mcp.json.exampleinto~/.cursor/mcp.jsonwith absolute paths. - Point config at
synonymsFile+ org synonyms (see dev workbench template). - Set
QM_AUDIT=1andQM_AUDIT_FILE. - Restart Cursor — confirm 3 meta-tools in the MCP panel.
- Run the five scenarios in CURSOR-E2E.md.
After a session with audit enabled:
npx -p quartermaster-mcp quartermaster report --audit audit.jsonl --out report.html
npx -p quartermaster-mcp quartermaster savings --audit audit.jsonl --json
npx -p quartermaster-mcp quartermaster inspect --config quartermaster.json --audit audit.jsonl
npx -p quartermaster-mcp quartermaster eval \
--from-audit audit.jsonl --draft-cases cases.jsonl --config quartermaster.json
npx -p quartermaster-mcp quartermaster dashboard --audit audit.jsonlAutomated: examples/smoke/audit-cli-smoke.mjs (via pnpm smoke) and
examples/regression/lib/audit-loop.mjs (via pnpm regression).
docker build -t quartermaster .
docker run -v /path/to/quartermaster.json:/config/quartermaster.json quartermasterHammer ranker scale, MCP federation, concurrency, and chaos. See
examples/stress/README.md.
pnpm stress # full (~7s)
pnpm stress:quick # dev subset
pnpm stress:ci # CI gatesWhat a dev team runs before release — full suite twice, compare metrics.
See examples/regression/README.md.
pnpm regression # audit loop + 2× pack smoke + 2× stress + eval (~50s)
pnpm regression:local # repo bins
pnpm regression:ci # GitHub ActionsEach round: dev workbench smoke, stress, dev-workbench eval (with synonymsFile),
blind-manifest eval (no synonyms). Round 1 vs 2 must agree on R@8 and pass/fail.
Report: examples/regression/results/latest.json
.github/workflows/ci.yml runs:
- build, lint, test, bench
pnpm regression:ci(audit loop + 2× smoke + 2× stress + eval stability)
-
pnpm -r build && pnpm -r test && pnpm bench -- --cigreen -
cd packages/proxy && pnpm publish --dry-run -
pnpm smokeandpnpm smoke:npxpass -
pnpm regressionpasses (2 rounds stable) -
pnpm stresspasses -
quartermaster doctorclean on dev workbench config -
quartermaster eval --ci --min-r8 0.5on dev workbench cases - Cursor E2E: 3 meta-tools visible, retrieve+call round-trip
-
quartermaster report+savingson sample audit traffic -
synonymsFile+ org synonyms documented for your team - Update Dockerfile pinned version if applicable
- Optional:
node examples/smoke/run-gjs-eval.mjswith live tokens