canary-lab-export
Use when exporting a Canary Lab run as an evaluation — "export the evaluation", "produce the report for run 7cvh", "give me the evaluation archive", "review what the run proved" — through the export MCP tools (start/submit_external_evaluation_export, get/list/download_evaluation_export). The archive carries the report and a behavior certificate with an offline checker. The run must be terminal (passed, failed, or aborted).
- License 许可
- MIT
- 最近更新
- 2026-11-05
- Stars
- ★ 4
- Forks
- 0
01 前言 Front Matter
- name
- canary-lab-export
- type
- skill
- description
- Use when exporting a Canary Lab run as an evaluation — "export the evaluation", "produce the report for run 7cvh", "give me the evaluation archive", "review what the run proved" — through the export MCP tools (start/submit_external_evaluation_export, get/list/download_evaluation_export). The archive carries the report and a behavior certificate with an offline checker. The run must be terminal (passed, failed, or aborted).
02 资源文件 1
- 参考文档agents/openai.yaml191 B
03 SKILL.md 正文
Canary Lab — Evaluation Export
MCP Invocation
Setup and the plugin expose one public Canary Lab MCP tool: exec (usually
rendered as mcp__Canary_Lab__exec). Every
Canary Lab tool name below is the exact command value, not a separate public
tool. For a feature-scoped command, replace both placeholders in this shape:
{"command":"<exact_tool_name>","arguments":{"feature":"<feature_name>"}}
This is the envelope shape, not every command's complete schema. Add the
fields that command declares inside arguments; call describe_tool when a
field is uncertain.
Never invent a wrapper verb such as learn or call, embed JSON in a command
string, or turn arguments into flags. Keep fields such as confirm: true inside
arguments. Use list_tools, search_tools, or describe_tool as the
command when discovery is needed. A deliberately selected focused or full
profile still exposes atomic tools for debugging; the setup-installed path is
compact + exec.
This client writes the reasoning; Canary Lab renders the final
evaluation.html + archive. These tools arrive via the Canary Lab MCP
server. If this client is already connected (the plugin connects with
compact), skip this step. To configure the same connection manually: npx canary-lab mcp --profile compact. The evaluation export is the deliverable of a run: a
self-contained archive (per-test reasoning, verdicts, Playwright artifacts —
video playback where the tests drive a browser) the user reviews from
evaluation.html without any Canary Lab UI running.
Workspace Bootstrap
- Find the LIVE server first: read
~/.canary-lab/active-servers.json, which recordsprojectRoot,portandpidfor every UI that registered. A stopped server's entry LINGERS — the file is only rewritten when the next server registers — so an entry is a candidate, not proof: the health check below is what confirms it. One entry → that is your server and itsport. Several → take the one whoseprojectRootis the workspace the user means. None → fall back to~/.canary-lab/workspaces.json(Windows:%USERPROFILE%\.canary-lab\workspaces.json): one workspace → use it, several → ask which, none → ask the user to runnpx canary-lab setup. Do NOT start from a guessed port. - Then CONFIRM it is the right server:
curl -s http://127.0.0.1:<port>/mcp/healthand check thatprojectRootis the workspace you intended. A healthy response does not settle the question on its own — a stale UI left behind by a demo or a tarball smoke test answers a port just as convincingly as the right one, and that is how a flight ends up running in someone's throwaway workspace.projectRootmatches what you intended → continue and tell the user which workspace. It names a DIFFERENT workspace → this is the wrong server; go back to step 1 rather than adopting it. It is under a temp directory (/tmp,/private/var/folders,%TEMP%) → never auto-select it; those are throwaway demo workspaces, so use one only when the user names it explicitly. Only when no live server serves the workspace you want does one need starting. - If the health check fails, start
npx canary-lab uifrom the workspace in a visible long-running terminal; if this client cannot run long-lived commands, ask the user to runnpx canary-lab uifrom the workspace and confirm when it's up. - A healthy
/mcp/healthmeans the server is live. On the setup-installedcompactprofile, atomic names such asget_feature_coverageare deliberately absent fromtools/list; onlyexecis public. Callexecwith{"command":"list_tools","arguments":{}}before concluding the connection is missing. Only an unknown-tool error forexecmeans this session is not connected — ask the user to runnpx canary-lab setup --forceand reconnect/restart the client, then retry. Never drive/mcpwith a hand-written HTTP/JSON-RPC client (curl included; the health check above is the only direct HTTP use): a custom client bypasses client detection and reconnect handling.
Arguments
An invocation argument (/canary-lab-export <suite-or-run-id>) is either a suite
(feature) name or an exact run ID. The Getting Started guide supplies a suite;
canary-lab-run hands off the terminal run's ID. Try get_run(argument) first:
if it finds a run, export that exact run. Only a run not found result means the
argument should be treated as a suite and resolved with list_runs(feature).
Export Loop
- After resolving a terminal run (passed, failed, or aborted), call
start_external_evaluation_exportwith its exact run ID and the requested language. If the user asks to export a failed or aborted run as-is, preserve that status in the report instead of trying to heal first. When the argument is a feature instead of a run,list_runs(feature)finds the candidates: pick the newest terminal run that actually ran tests —executionTyperun(orverify), neverbootorbenchmark(a fresh workspace ships one aborted boot session, which has no test results; the server rejects exporting it). If the feature has no such run yet, do NOT export anything — tell the user the suite has to run first (canary-lab-run/start_run), or offer to run it. start_external_evaluation_exportdoes not embed the run snapshot — callget_run(runId)for the summary/failures while authoring. Use the returnedreportSchemato write the evaluation report/archive wording in this client. If it returnstype: "getting_started_busy", a Getting Started demo already owns the workspace — follow the active target it returns; do not start another workflow. While you author, the user can watch the export live in the Canary Lab UI on the suite's Flight page (Evaluation report stage) — that view is read-only while this client drives.- Call
submit_external_evaluation_exportwith thetaskIdreturned bystart_external_evaluation_export(task.taskId), plus eithertextSlots[]orrewrite. If you submit arewrite,rewrite.casesmust keep the exact count and order of the template'scases[]— one case per run entry; never merge, dedupe, or drop skipped or duplicate run entries (prefer editingtextSlots[], which keeps the count correct automatically). The result includes anevaluationdigest (featureTitle, summary, per-case title + confidence) — relay it to the user in chat; don't just say it's available in the UI. - A completed
submit_external_evaluation_exportreturnsarchivePath, the exact absolute path of the zip Canary Lab already wrote. Relay that path directly. Useget_evaluation_exportorlist_evaluation_exportsto recover status and the same path. Do not end withnpx canary-lab export downloador ask the user to fetch the file whenarchivePathis present. Calldownload_evaluation_exportonly when the client cannot access the server filesystem and the user explicitly needs the archive bytes. Canary Lab stores the artifact, but it does not rewrite, translate, or generate the report with an internal agent for external exports. - A completed task also carries
certificate(a digest) andcertificatePath. This internal behavior certificate is stored separately from the downloadable archive. Relaycertificate.statementand every line ofcertificate.notProvenas written: the recorded test copy, assertion strength, and run verdict have limits, including that absence of weakening is not proven.get_evaluation_exportreturns the digest and path;download_evaluation_exportcan return the full sidecar through MCP. - End with the exact
archivePathand say that the ZIP containsevaluation.htmland captured videos where available. Opening the report is the review step the export exists for.
Guardrails
- Keep the same
session_idfor the whole conversation. - Never heal or re-run just to make an export look better — export the run the user named, status preserved.
04 同仓库更多 Skills
off-by-one
暂无简介
multi-failure-cascade
暂无简介
broken-delete-contract
暂无简介
canary-lab
Use when the user wants Canary Lab to take a product repo end to end — "test this app", "onboard this repo", "run a flight", "evaluate what I just built" — through the flight pipeline (start_flight / get_flight / respond_flight_checkpoint over MCP). One conducted pipeline continues a configured suite or takes bare repo(s) to a green, covered, healed run and publishes a downloadable Report; Parallel setup continues as Canary-owned background work. Use a focused skill only when the user asks for that single capability without asking for a Flight or /canary-lab.
canary-lab-verify
Use when verifying a Canary Lab feature against a RUNNING target — a deployed environment ("verify checkout on staging", "run the saved verify config", "check the deployed app") or a locally booted app ("verify a running app") — through the verify MCP tools (list/get/create/update_verification_config, boot_services, execute_verification, get_verification_result). No heal loop. For run + heal use canary-lab-run; for end-to-end onboarding use canary-lab (flight).
canary-lab-run
Use when running or healing an EXISTING Canary Lab feature locally — "run <feature>", "fix the failing run", "rerun 7cvh", "drive the heal loop" — through the repair MCP tools (start_run, wait_for_heal_task, signal_run, get_heal_context, pause_run, cancel_heal, abort_run). Fix failing runs by editing app/service code, not tests. For end-to-end onboarding of a new repo use canary-lab (flight); for deployed-environment checks use canary-lab-verify.