[{"data":1,"prerenderedAt":-1},["ShallowReactive",2],{"skill:01M6XCV3M4H9WM7A6KCNV2KXFM":3,"skill-same:01M6XCV3M4H9WM7A6KCNV2KXFM":69},{"skillNo":4,"name":5,"nameZh":6,"description":7,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":15,"licenseFileUrl":6,"sourceHtmlUrl":16,"categories":17,"keywords":18,"publishedAt":39,"linkOnly":40,"markdownContent":41,"markdownBody":42,"frontMatter":43,"refName":45,"commitSha":46,"skillDirectory":47,"forksCount":48,"repositoryHtmlUrl":49,"repositoryHomepageUrl":50,"ownerHtmlUrl":51,"ownerBlogUrl":52,"ownerDescription":53,"updatedAt":54,"install":55,"resources":68},"01M6XCV3M4H9WM7A6KCNV2KXFM","canary-lab-coverage",null,"Use when working the Canary Lab semantic coverage ledger — \"what's actually tested?\", \"map coverage for \u003Cfeature>\", \"refresh the PRD summary\", \"close the coverage gaps\", \"add this plan\u002Fspec to the feature docs\" — through the coverage MCP tools (write\u002Flist\u002Fdelete_feature_doc, start\u002Fsubmit_external_summary, start\u002Fsubmit_external_coverage, get_feature_coverage, clear_prd_summary). For writing new tests use canary-lab-author.","ferterahadi\u002Fcanary-lab","ferterahadi","https:\u002F\u002Favatars.githubusercontent.com\u002Fu\u002F148174839?v=4","01M6XCHCY39C7QEF3JZJ3VZGNZ","Fer Terahadi","01M6XCHD1ZE9926NBC97ZMZZRY",4,"MIT","https:\u002F\u002Fgithub.com\u002Fferterahadi\u002Fcanary-lab\u002Fblob\u002Fmain\u002Fagent-integrations\u002Fplugin\u002Fcanary-lab\u002Fskills\u002Fcanary-lab-coverage\u002FSKILL.md",[],[19,20,21,22,23,24,25,26,27,28,29,30,31,32,33,34,35,36,37,38],"coverage","canary lab","canary lab coverage","lab","canary","doc","Tools","plan","write","list","MCP","map","get","submit","add","close","start","when","delete","writing","2026-11-10 10:12:30",false,"---\nname: canary-lab-coverage\ndescription: Use when working the Canary Lab semantic coverage ledger — \"what's actually tested?\", \"map coverage for \u003Cfeature>\", \"refresh the PRD summary\", \"close the coverage gaps\", \"add this plan\u002Fspec to the feature docs\" — through the coverage MCP tools (write\u002Flist\u002Fdelete_feature_doc, start\u002Fsubmit_external_summary, start\u002Fsubmit_external_coverage, get_feature_coverage, clear_prd_summary). For writing new tests use canary-lab-author.\ntype: skill\n---\n\n# Canary Lab — Semantic Coverage Ledger\n\n## User input through MCP 2.0\n\nUse the native Canary connector in the requesting chat so SDK 2.0 elicitation\n(`input_required`) reaches the human there. Do not substitute a shell MCP client,\nanswer a form yourself, or recreate the question in chat. Existing explicit\ninstructions and autopilot choices still apply without another ask.\n\nForm decisions have one shared record. The native form links to the same approval\nin Canary Notifications, also surfaced above the Flight page. On `needs-input`\nwith `approvalId` and `reviewUrl`, show that link and call `wait_for_approval` with\nthe ID; repeat on `still_waiting`. The human answers once in either surface.\nA browser answer resolves the server decision; some clients keep their native\nform visible until the human dismisses it. Dismissal then returns the stored\nresult. Client decline\u002Fcancel alone does not represent a human decision.\n\nWithout an `approvalId`, leave `needs-input` pending after decline\u002Fcancel, stale\ninput, or an unfinished UI action; do not automatically retry or repeat the\nquestion. Setup\u002Freconnection can use chat while MCP is unavailable. Never collect\npasswords, API keys, or access tokens in chat or form elicitation; use the returned\nCanary UI URL for secret entry.\n\n## MCP Invocation\n\nSetup and the plugin expose one public Canary Lab MCP tool: `exec` (usually\nrendered as `mcp__Canary_Lab__exec`). Every\nCanary Lab tool name below is the exact `command` value, not a separate public\ntool. For a feature-scoped command, replace both placeholders in this shape:\n\n```json\n{\"command\":\"\u003Cexact_tool_name>\",\"arguments\":{\"feature\":\"\u003Cfeature_name>\"}}\n```\n\nThis is the envelope shape, not every command's complete schema. Add the\nfields that command declares inside `arguments`; call `describe_tool` when a\nfield is uncertain.\n\nNever invent a wrapper verb such as `learn` or `call`, embed JSON in a command\nstring, or turn arguments into flags. Keep fields such as `confirm: true` inside\n`arguments`. Use `list_tools`, `search_tools`, or `describe_tool` as the\n`command` when discovery is needed. A deliberately selected focused or `full`\nprofile still exposes atomic tools for debugging; the setup-installed path is\n`compact` + `exec`.\n\nThis client reads the docs\u002Ftests and submits requirements + mappings; Canary\nLab writes the tags and computes the ledger. These tools arrive via the\nCanary Lab MCP server. If this client is already connected (the plugin\nconnects with `compact`), skip this step. To configure the same connection\nmanually: `npx canary-lab mcp --profile compact`. Use this to answer \"what's actually\ntested?\" — coverage is claim-based: a tag claims a test maps to each\nrequirement and its declared paths, regardless of run results. When the\nfeature has a recorded run the ledger also carries an additive **proven**\naxis (`provenPct`, `totals.proven`, per-requirement\u002Fpath `proven`,\n`provenRunId`): covered = a tag claims it; proven = the covering test\nactually passed in the latest run (omitted when no run is recorded).\nA path or variant cell also carries `failed` — no claiming test passed and\nat least one FAILED in that run. That is a broken promise, distinct from an\nunkept one (nothing has run it yet); fix the app, never the test. A pass\nwins, so `failed` is never true alongside `proven`.\nThe ledger also carries the **time axis**: per requirement an `enforcement`\nblock — `state`, `provenAt` (the newest run in which every mapped test\npassed), `testsChangedAt` (the last classified spec edit on a mapped test, with\nits verdict), `wordingChangedAt` — where `state` is one of:\n\n| `state` | Meaning |\n| --- | --- |\n| `proven-unchanged` | A green run over every mapped test is newer than both the tests' and the wording's last change |\n| `tests-weakened` | A mapped test was classified weaker AFTER the proof — the run that proved it never saw the weaker test |\n| `proof-stale` | A mapped test changed after the proof (or no run ever proved it) and no green run has followed |\n| `wording-ahead` | The wording moved after the tests and the proof — the tests may no longer test what it says |\n\nThe ledger-level `enforcement` rolls it up (`provenUnchanged`\u002F`total` for\n`runId`). Report these states as Canary derived them, never a claim of your\nown. A `tests-weakened` requirement is fixed by restoring the assertion — the\nweaker edit is exactly what the proof never saw — never by re-running.\n\n## Workspace Bootstrap\n\n1. Find the LIVE server first: read `~\u002F.canary-lab\u002Factive-servers.json`, which records `projectRoot`, `port` and `pid` for 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 its `port`. Several → take the one whose `projectRoot` is the workspace the user means. None → fall back to `~\u002F.canary-lab\u002Fworkspaces.json` (Windows: `%USERPROFILE%\\.canary-lab\\workspaces.json`): one workspace → use it, several → ask which, none → ask the user to run `npx canary-lab setup`. Do NOT start from a guessed port.\n2. Then CONFIRM it is the right server: `curl -s http:\u002F\u002F127.0.0.1:\u003Cport>\u002Fmcp\u002Fhealth` and check that `projectRoot` is 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. `projectRoot` matches 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 (`\u002Ftmp`, `\u002Fprivate\u002Fvar\u002Ffolders`, `%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.\n3. If the health check fails, start `npx canary-lab ui` from the workspace in a visible long-running terminal; if this client cannot run long-lived commands, ask the user to run `npx canary-lab ui` from the workspace and confirm when it's up.\n4. A healthy `\u002Fmcp\u002Fhealth` means the server is live. On the setup-installed `compact` profile, atomic names such as `get_feature_coverage` are deliberately absent from `tools\u002Flist`; only `exec` is public. Call `exec` with `{\"command\":\"list_tools\",\"arguments\":{}}` before concluding the connection is missing. Only an unknown-tool error for `exec` means this session is not connected — ask the user to run `npx canary-lab setup --force` and reconnect\u002Frestart the client, then retry. Never drive `\u002Fmcp` with a hand-written HTTP\u002FJSON-RPC client (curl included; the health check above is the only direct HTTP use): a custom client bypasses client detection and reconnect handling.\n\n## Arguments\n\nAn invocation argument (`\u002Fcanary-lab-coverage \u003Csuite>` — the Getting Started\nguide's \"Measure Coverage\" card emits exactly this shape) is a suite\n(feature) name in the connected workspace — go straight to its ledger.\n\nAn explicit `\u002Fcanary-lab-coverage \u003Csuite>` invocation is **execution mode**,\nnot a read-only coverage question. After reading the ledger, the turn MUST call\na start tool: when the summary is fresh, call `start_external_coverage` even\nwhen `state.coverage` is `\"fresh\"`; when the summary is stale or absent, start\nand submit the summary first, then start coverage mapping. Do not stop at the\ncached ledger. Starting that job is what makes the external agent's ownership\nand progress visible in Canary Lab. A natural-language question such as \"what\nis covered?\" remains read-only and may report a fresh ledger without starting\na job.\n\n## Coverage Loop\n\n### Freshness and connected-session updates\n\nCanary must show current state without refreshing the browser. Read `freshness`\nand the `coverageUpdate` added to related tool replies before reporting numbers\nor choosing the next action. Stale, updating, unavailable or missing freshness\nmeans the displayed measurements are historical; do not call them current.\nWhile actively monitoring this suite, use `wait_for_feature_change(feature,\nafterRevision, timeout_ms:30000)` and retain its revision. Omit the revision to\ncatch up after reconnecting. This reaches the agent through a tool response; it\ndoes not promise to wake an idle Claude\u002FCodex host.\n\nFollow `nextAction` only within the user's task and existing launch permissions.\nDocuments invalidate requirements then mapping; semantic test changes, including\nreferenced helpers and hooks, invalidate mapping. Suite configuration does not,\nand remapping does not require a later verification run. Reuse valid earlier\nFlight stages. Respect `activeJobId`, its owner and any active Flight: continue\nowned work, never create a competing recovery. A rejected stale-input submission\nreleases its job; obtain new context instead of resubmitting an obsolete answer.\nAfter recovery, re-read the ledger. Mapping completeness, latest-run outcomes and\nhistorical enforcement proof are separate; an old pass cannot conceal a newer\nfailure. Do not clear summaries, weaken tests or launch paid work just to remove\na freshness warning.\n\n**Start by reading the ledger, not by regenerating it**: call\n`get_feature_coverage(feature)` first and branch on `state`:\n\n- `state.summary: \"fresh\"` → **skip Step 1 entirely.** The shipped\u002Fstored\n  summary is current; re-running it is not just wasted work — a re-run that\n  fails to echo the previous requirement ids mints fresh ones and orphans\n  every existing `@req-*` tag, flipping covered requirements to untested.\n  Go to Step 2. Only a read-only natural-language question may report a fresh\n  mapping directly; an explicit invocation still starts Step 2.\n- `state.summary` `stale`\u002F`absent` → run Step 1 (echo the previous ids!).\n- `state.coverage: \"blocked\"` → read the ledger's `next:` field and follow\n  it — don't present a menu. When `next` reports no source doc (\"Setup\n  needed\", `sourceDocCount: 0`), call `start_external_summary` with the\n  feature and your stable `session_id`. `needs-document-discovery` means search\n  the task's repositories, existing docs, and user-provided references first.\n  Read contents, honor source precedence, and use clearly relevant, authorized\n  documents automatically. Return `document_resolution` with `status: \"resolved\"`,\n  `searched`, and `sources: [{path, sha256, reason}]`; hashes identify the bytes read.\n  For missing material return `status: \"missing\"`, `searched`, `reason`; for\n  ambiguous\u002Fconflicting material return that status, `searched`, `question`, and\n  `candidates: [{label, sources}]` (1–5 for ambiguity, 2–5 for conflicts). Only these unresolved cases elicit input.\n  Use the selected documents from the result; rejected originals remain on disk.\n  When the user chooses to supply material, follow `document_source: \"form\"` or\n  `\"upload\"`. Only an unsupported client asks the focused question in chat.\n  Preserve previous user choices. Never invent requirements or infer them from\n  code\u002Ftests without authorization. A confidence percentage is not source evidence.\n\n**Step 1 — PRD summary** (only when stale\u002Fabsent; author it YOURSELF; no local agent):\n\nChoose one stable `session_id` before the first start call and reuse it for\nboth externally driven jobs in this conversation.\n\n1. `start_external_summary(feature, session_id)` → first follow any\n   `needs-document-discovery` result, including for linked or changed documents.\n   Once sources are resolved, it returns a `jobId`, selected source-doc paths,\n   the previous requirement ids to PRESERVE, and a `prompt`.\n2. Read each doc in the returned paths; extract the testable requirements.\n3. `submit_external_summary(jobId, requirements[, variantDimension])`.\n\n- Follow the returned `prompt`'s schema exactly: every requirement needs\n  `title`, `text`, and `pathTypes` (`kind`, `happyPath`, `unhappyPath`,\n  `variants`, `variantsNA`, `strictnessLadder` are optional; echo a prior\n  requirement `id` to PRESERVE it, omit for a new one).\n- If the feature has ONE cross-cutting dimension a requirement must hold\n  across (channel\u002Ftenant\u002Fregion\u002F…), also pass `variantDimension {name,\n  values}` and set each spanning requirement's `variants` — a requirement\n  that claims \"all 4 channels\" but is tested on one is `variant-incomplete`,\n  not covered.\n- Canary reconciles ids against the prior summary (surviving ids preserved;\n  new ones get fresh ids; dropped ones marked deprecated) and writes\n  `docs\u002F_prd-summary.{json,md}` — it never re-derives the requirements.\n- The job is async + single-flight per feature and shows live in the GUI:\n  the suite's Flight page carries it on the matching stage (the summary on\n  Requirements, the mapping on Test authoring & coverage) — that view is\n  read-only while this client drives; the user monitors there, you act here.\n- If `start_external_summary` or `start_external_coverage` returns\n  `type: \"getting_started_busy\"`, a Getting Started demo already owns the\n  workspace — follow the active target it returns; do not start another\n  workflow.\n- Re-run whenever the ledger's `state` reports the summary `stale`\n  (`state.drift.changedDocs` names which docs moved) — ids are preserved, so\n  existing tags keep resolving.\n- `list_feature_docs(feature)` shows what feeds the PRD; `write_feature_doc`\n  adds a source doc and `delete_feature_doc(feature, relPath)` removes one.\n  Source docs are `.txt`\u002F`.pdf`\u002F`.docx` extracted to markdown on import.\n- `clear_prd_summary(feature)` resets coverage to a blank slate — removes the\n  generated summary **and** strips the `@req-*`\u002F`@path-*`\u002F`@variant-*` tags\n  from the specs (other tags kept; an emptied tag list reverts the test to\n  its pre-coverage shape), so a re-map starts clean instead of inheriting\n  stale tags (the UI \"Redo from the start\" does the same).\n- If your client supports subagents, give each a subset of docs to read and\n  merge their extracted requirements; otherwise read serially. Either way\n  call `submit_external_summary` exactly once.\n\n**Step 2 — coverage mapping** (map it YOURSELF; no local agent), after the\nPRD summary exists:\n\n1. `start_external_coverage(feature, session_id)` → returns the active requirements, the\n   feature's tests (each with the spec `file` to read), and a `prompt`.\n2. **Fan out the reading.** Group the tests by their `file` — never split one\n   spec file across two readers, since a file's tests share fixtures that\n   only make sense read together. If that leaves more than one group and more\n   than a handful of tests, dispatch **one read-only subagent per group in a\n   single parallel round** (up to 5 at once), each reading only its own\n   files; below that, read them yourself. Give every subagent the FULL\n   requirement list unchanged — the tests divide, the requirements do not,\n   because a mapping judged against a subset of them is wrong rather than\n   partial. Merge their answers.\n3. `submit_external_coverage(jobId, mappings, unmappable)`.\n\n- One mapping entry per test: `{testName, requirements: [ids], pathTypes:\n  ['happy'|'sad'|'edge'], variants: […]}` (`file`, `rationale`, and\n  `confidence` are optional).\n- **Every test must come back — in `mappings` or in `unmappable`\n  (`{testName, reason}`), never neither.** A submit that leaves tests\n  unaccounted for is REJECTED with their names. A dropped test is\n  indistinguishable from one you read and found no requirement for, so the\n  ledger would score it uncovered on your silence instead of on evidence. If\n  a subagent fails to return, say so in `unmappable` rather than omitting\n  its tests.\n- Link each `test()` to its requirement with **Playwright tags on the\n  test**: `test('…', { tag: ['@req-R3', '@path-happy', '@variant-email'] },\n  …)` — `@req-\u003Cid>` (repeatable), `@path-happy|sad|edge`, and\n  `@variant-\u003Cvalue>` (which of the feature's variant-dimension values the\n  test actually exercises). Tags are greppable and survive renames. (Legacy\n  `\u002F\u002F @requirement` \u002F `\u002F\u002F @path` comments above the test still parse as a\n  migration fallback.)\n- Canary writes the `@req-*`\u002F`@variant-*` tags through its canonical\n  tag-writer and recomputes the ledger (unknown ids\u002Ftest names\u002Fvariants\n  dropped). It writes the *tag* (mapping) — never the test body — and there\n  is **no** accept\u002Freject review gate.\n- No PRD summary yet → `status: \"needs-summary\"` (run `start_external_summary`\n  first); single-flight per feature.\n- Split by spec file, never by test count, and call\n  `submit_external_coverage` exactly once with the merged answer.\n\n**Step 3 — read the ledger.** After `submit_external_coverage`, you MUST call\n`get_feature_coverage(feature)` before reporting; the submit response is not\nthe final ledger. The ledger reports per\nrequirement → covering tests → `gapType` (`untested` \u002F `path-incomplete` \u002F\n`variant-incomplete` \u002F `covered`) + coarse `coverageStatus`\n(covered\u002Fpartial\u002Funcovered), a `Mapped N%` headline from `coveragePct` (fully\nmapped requirements ÷ total — every declared path and variant claimed) and a\nlinked breadth in `mappedPct` (requirements with ≥1 test), per-test `strength`\n(`strong` \u002F `solid` \u002F `basic` \u002F `shallow`, graded\nfrom each test's assertion tiers — independent of runs), `orphanTestNames`\n(tests with no requirement), and the derived `state` (summary × coverage\naxes + headline).\n\n**Step 4 — act on gaps.** `untested` means no test maps to the requirement\n(write one, or run the coverage engine to map an existing test);\n`path-incomplete` means a declared sad\u002Fedge path has no mapped test;\n`variant-incomplete` means the requirement spans variant values no mapped\ntest exercises (test the missing variant, or add the `@variant-*` tag to a\ntest that already does); a `shallow` test only reaches a weak assertion tier\n(write a stronger check — e.g. a browser confirming the real external effect\nrather than an app log); an orphan test needs a `@req-*` tag. The UI's\nfull-screen Coverage dialog shows the same data — both surfaces read the\nsame computation.\n\n## Guardrails\n\n- Generate one `session_id` before the first external start call and pass that\n  same value to `start_external_summary` and `start_external_coverage` for the\n  whole conversation. The submit calls take their `jobId`, not `session_id`.\n- New tests belong to the `canary-lab-author` skill\u002Fprofile; this profile maps and measures.\n- Proving coverage takes a run — `canary-lab-run` (or a flight) records the run the `proven` axis reads.\n- The time axis reads run records, never a stored opinion: a `proof-stale` requirement is cleared by a green run, a `wording-ahead` one by matching tests passing after the wording change, a `tests-weakened` one by restoring the assertion.\n\nBroken document links are repaired before source discovery: the owning command elicits the moved file's new path on the Canary server. On `document-relinked`, retry that command with the same arguments. Keep the symlink and existing baseline; never omit the missing source or create recovery copies. Cancel\u002Fdecline leaves work pending. Unsupported clients use Relink in the returned Canary UI.\n","# Canary Lab — Semantic Coverage Ledger\n\n## User input through MCP 2.0\n\nUse the native Canary connector in the requesting chat so SDK 2.0 elicitation\n(`input_required`) reaches the human there. Do not substitute a shell MCP client,\nanswer a form yourself, or recreate the question in chat. Existing explicit\ninstructions and autopilot choices still apply without another ask.\n\nForm decisions have one shared record. The native form links to the same approval\nin Canary Notifications, also surfaced above the Flight page. On `needs-input`\nwith `approvalId` and `reviewUrl`, show that link and call `wait_for_approval` with\nthe ID; repeat on `still_waiting`. The human answers once in either surface.\nA browser answer resolves the server decision; some clients keep their native\nform visible until the human dismisses it. Dismissal then returns the stored\nresult. Client decline\u002Fcancel alone does not represent a human decision.\n\nWithout an `approvalId`, leave `needs-input` pending after decline\u002Fcancel, stale\ninput, or an unfinished UI action; do not automatically retry or repeat the\nquestion. Setup\u002Freconnection can use chat while MCP is unavailable. Never collect\npasswords, API keys, or access tokens in chat or form elicitation; use the returned\nCanary UI URL for secret entry.\n\n## MCP Invocation\n\nSetup and the plugin expose one public Canary Lab MCP tool: `exec` (usually\nrendered as `mcp__Canary_Lab__exec`). Every\nCanary Lab tool name below is the exact `command` value, not a separate public\ntool. For a feature-scoped command, replace both placeholders in this shape:\n\n```json\n{\"command\":\"\u003Cexact_tool_name>\",\"arguments\":{\"feature\":\"\u003Cfeature_name>\"}}\n```\n\nThis is the envelope shape, not every command's complete schema. Add the\nfields that command declares inside `arguments`; call `describe_tool` when a\nfield is uncertain.\n\nNever invent a wrapper verb such as `learn` or `call`, embed JSON in a command\nstring, or turn arguments into flags. Keep fields such as `confirm: true` inside\n`arguments`. Use `list_tools`, `search_tools`, or `describe_tool` as the\n`command` when discovery is needed. A deliberately selected focused or `full`\nprofile still exposes atomic tools for debugging; the setup-installed path is\n`compact` + `exec`.\n\nThis client reads the docs\u002Ftests and submits requirements + mappings; Canary\nLab writes the tags and computes the ledger. These tools arrive via the\nCanary Lab MCP server. If this client is already connected (the plugin\nconnects with `compact`), skip this step. To configure the same connection\nmanually: `npx canary-lab mcp --profile compact`. Use this to answer \"what's actually\ntested?\" — coverage is claim-based: a tag claims a test maps to each\nrequirement and its declared paths, regardless of run results. When the\nfeature has a recorded run the ledger also carries an additive **proven**\naxis (`provenPct`, `totals.proven`, per-requirement\u002Fpath `proven`,\n`provenRunId`): covered = a tag claims it; proven = the covering test\nactually passed in the latest run (omitted when no run is recorded).\nA path or variant cell also carries `failed` — no claiming test passed and\nat least one FAILED in that run. That is a broken promise, distinct from an\nunkept one (nothing has run it yet); fix the app, never the test. A pass\nwins, so `failed` is never true alongside `proven`.\nThe ledger also carries the **time axis**: per requirement an `enforcement`\nblock — `state`, `provenAt` (the newest run in which every mapped test\npassed), `testsChangedAt` (the last classified spec edit on a mapped test, with\nits verdict), `wordingChangedAt` — where `state` is one of:\n\n| `state` | Meaning |\n| --- | --- |\n| `proven-unchanged` | A green run over every mapped test is newer than both the tests' and the wording's last change |\n| `tests-weakened` | A mapped test was classified weaker AFTER the proof — the run that proved it never saw the weaker test |\n| `proof-stale` | A mapped test changed after the proof (or no run ever proved it) and no green run has followed |\n| `wording-ahead` | The wording moved after the tests and the proof — the tests may no longer test what it says |\n\nThe ledger-level `enforcement` rolls it up (`provenUnchanged`\u002F`total` for\n`runId`). Report these states as Canary derived them, never a claim of your\nown. A `tests-weakened` requirement is fixed by restoring the assertion — the\nweaker edit is exactly what the proof never saw — never by re-running.\n\n## Workspace Bootstrap\n\n1. Find the LIVE server first: read `~\u002F.canary-lab\u002Factive-servers.json`, which records `projectRoot`, `port` and `pid` for 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 its `port`. Several → take the one whose `projectRoot` is the workspace the user means. None → fall back to `~\u002F.canary-lab\u002Fworkspaces.json` (Windows: `%USERPROFILE%\\.canary-lab\\workspaces.json`): one workspace → use it, several → ask which, none → ask the user to run `npx canary-lab setup`. Do NOT start from a guessed port.\n2. Then CONFIRM it is the right server: `curl -s http:\u002F\u002F127.0.0.1:\u003Cport>\u002Fmcp\u002Fhealth` and check that `projectRoot` is 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. `projectRoot` matches 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 (`\u002Ftmp`, `\u002Fprivate\u002Fvar\u002Ffolders`, `%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.\n3. If the health check fails, start `npx canary-lab ui` from the workspace in a visible long-running terminal; if this client cannot run long-lived commands, ask the user to run `npx canary-lab ui` from the workspace and confirm when it's up.\n4. A healthy `\u002Fmcp\u002Fhealth` means the server is live. On the setup-installed `compact` profile, atomic names such as `get_feature_coverage` are deliberately absent from `tools\u002Flist`; only `exec` is public. Call `exec` with `{\"command\":\"list_tools\",\"arguments\":{}}` before concluding the connection is missing. Only an unknown-tool error for `exec` means this session is not connected — ask the user to run `npx canary-lab setup --force` and reconnect\u002Frestart the client, then retry. Never drive `\u002Fmcp` with a hand-written HTTP\u002FJSON-RPC client (curl included; the health check above is the only direct HTTP use): a custom client bypasses client detection and reconnect handling.\n\n## Arguments\n\nAn invocation argument (`\u002Fcanary-lab-coverage \u003Csuite>` — the Getting Started\nguide's \"Measure Coverage\" card emits exactly this shape) is a suite\n(feature) name in the connected workspace — go straight to its ledger.\n\nAn explicit `\u002Fcanary-lab-coverage \u003Csuite>` invocation is **execution mode**,\nnot a read-only coverage question. After reading the ledger, the turn MUST call\na start tool: when the summary is fresh, call `start_external_coverage` even\nwhen `state.coverage` is `\"fresh\"`; when the summary is stale or absent, start\nand submit the summary first, then start coverage mapping. Do not stop at the\ncached ledger. Starting that job is what makes the external agent's ownership\nand progress visible in Canary Lab. A natural-language question such as \"what\nis covered?\" remains read-only and may report a fresh ledger without starting\na job.\n\n## Coverage Loop\n\n### Freshness and connected-session updates\n\nCanary must show current state without refreshing the browser. Read `freshness`\nand the `coverageUpdate` added to related tool replies before reporting numbers\nor choosing the next action. Stale, updating, unavailable or missing freshness\nmeans the displayed measurements are historical; do not call them current.\nWhile actively monitoring this suite, use `wait_for_feature_change(feature,\nafterRevision, timeout_ms:30000)` and retain its revision. Omit the revision to\ncatch up after reconnecting. This reaches the agent through a tool response; it\ndoes not promise to wake an idle Claude\u002FCodex host.\n\nFollow `nextAction` only within the user's task and existing launch permissions.\nDocuments invalidate requirements then mapping; semantic test changes, including\nreferenced helpers and hooks, invalidate mapping. Suite configuration does not,\nand remapping does not require a later verification run. Reuse valid earlier\nFlight stages. Respect `activeJobId`, its owner and any active Flight: continue\nowned work, never create a competing recovery. A rejected stale-input submission\nreleases its job; obtain new context instead of resubmitting an obsolete answer.\nAfter recovery, re-read the ledger. Mapping completeness, latest-run outcomes and\nhistorical enforcement proof are separate; an old pass cannot conceal a newer\nfailure. Do not clear summaries, weaken tests or launch paid work just to remove\na freshness warning.\n\n**Start by reading the ledger, not by regenerating it**: call\n`get_feature_coverage(feature)` first and branch on `state`:\n\n- `state.summary: \"fresh\"` → **skip Step 1 entirely.** The shipped\u002Fstored\n  summary is current; re-running it is not just wasted work — a re-run that\n  fails to echo the previous requirement ids mints fresh ones and orphans\n  every existing `@req-*` tag, flipping covered requirements to untested.\n  Go to Step 2. Only a read-only natural-language question may report a fresh\n  mapping directly; an explicit invocation still starts Step 2.\n- `state.summary` `stale`\u002F`absent` → run Step 1 (echo the previous ids!).\n- `state.coverage: \"blocked\"` → read the ledger's `next:` field and follow\n  it — don't present a menu. When `next` reports no source doc (\"Setup\n  needed\", `sourceDocCount: 0`), call `start_external_summary` with the\n  feature and your stable `session_id`. `needs-document-discovery` means search\n  the task's repositories, existing docs, and user-provided references first.\n  Read contents, honor source precedence, and use clearly relevant, authorized\n  documents automatically. Return `document_resolution` with `status: \"resolved\"`,\n  `searched`, and `sources: [{path, sha256, reason}]`; hashes identify the bytes read.\n  For missing material return `status: \"missing\"`, `searched`, `reason`; for\n  ambiguous\u002Fconflicting material return that status, `searched`, `question`, and\n  `candidates: [{label, sources}]` (1–5 for ambiguity, 2–5 for conflicts). Only these unresolved cases elicit input.\n  Use the selected documents from the result; rejected originals remain on disk.\n  When the user chooses to supply material, follow `document_source: \"form\"` or\n  `\"upload\"`. Only an unsupported client asks the focused question in chat.\n  Preserve previous user choices. Never invent requirements or infer them from\n  code\u002Ftests without authorization. A confidence percentage is not source evidence.\n\n**Step 1 — PRD summary** (only when stale\u002Fabsent; author it YOURSELF; no local agent):\n\nChoose one stable `session_id` before the first start call and reuse it for\nboth externally driven jobs in this conversation.\n\n1. `start_external_summary(feature, session_id)` → first follow any\n   `needs-document-discovery` result, including for linked or changed documents.\n   Once sources are resolved, it returns a `jobId`, selected source-doc paths,\n   the previous requirement ids to PRESERVE, and a `prompt`.\n2. Read each doc in the returned paths; extract the testable requirements.\n3. `submit_external_summary(jobId, requirements[, variantDimension])`.\n\n- Follow the returned `prompt`'s schema exactly: every requirement needs\n  `title`, `text`, and `pathTypes` (`kind`, `happyPath`, `unhappyPath`,\n  `variants`, `variantsNA`, `strictnessLadder` are optional; echo a prior\n  requirement `id` to PRESERVE it, omit for a new one).\n- If the feature has ONE cross-cutting dimension a requirement must hold\n  across (channel\u002Ftenant\u002Fregion\u002F…), also pass `variantDimension {name,\n  values}` and set each spanning requirement's `variants` — a requirement\n  that claims \"all 4 channels\" but is tested on one is `variant-incomplete`,\n  not covered.\n- Canary reconciles ids against the prior summary (surviving ids preserved;\n  new ones get fresh ids; dropped ones marked deprecated) and writes\n  `docs\u002F_prd-summary.{json,md}` — it never re-derives the requirements.\n- The job is async + single-flight per feature and shows live in the GUI:\n  the suite's Flight page carries it on the matching stage (the summary on\n  Requirements, the mapping on Test authoring & coverage) — that view is\n  read-only while this client drives; the user monitors there, you act here.\n- If `start_external_summary` or `start_external_coverage` returns\n  `type: \"getting_started_busy\"`, a Getting Started demo already owns the\n  workspace — follow the active target it returns; do not start another\n  workflow.\n- Re-run whenever the ledger's `state` reports the summary `stale`\n  (`state.drift.changedDocs` names which docs moved) — ids are preserved, so\n  existing tags keep resolving.\n- `list_feature_docs(feature)` shows what feeds the PRD; `write_feature_doc`\n  adds a source doc and `delete_feature_doc(feature, relPath)` removes one.\n  Source docs are `.txt`\u002F`.pdf`\u002F`.docx` extracted to markdown on import.\n- `clear_prd_summary(feature)` resets coverage to a blank slate — removes the\n  generated summary **and** strips the `@req-*`\u002F`@path-*`\u002F`@variant-*` tags\n  from the specs (other tags kept; an emptied tag list reverts the test to\n  its pre-coverage shape), so a re-map starts clean instead of inheriting\n  stale tags (the UI \"Redo from the start\" does the same).\n- If your client supports subagents, give each a subset of docs to read and\n  merge their extracted requirements; otherwise read serially. Either way\n  call `submit_external_summary` exactly once.\n\n**Step 2 — coverage mapping** (map it YOURSELF; no local agent), after the\nPRD summary exists:\n\n1. `start_external_coverage(feature, session_id)` → returns the active requirements, the\n   feature's tests (each with the spec `file` to read), and a `prompt`.\n2. **Fan out the reading.** Group the tests by their `file` — never split one\n   spec file across two readers, since a file's tests share fixtures that\n   only make sense read together. If that leaves more than one group and more\n   than a handful of tests, dispatch **one read-only subagent per group in a\n   single parallel round** (up to 5 at once), each reading only its own\n   files; below that, read them yourself. Give every subagent the FULL\n   requirement list unchanged — the tests divide, the requirements do not,\n   because a mapping judged against a subset of them is wrong rather than\n   partial. Merge their answers.\n3. `submit_external_coverage(jobId, mappings, unmappable)`.\n\n- One mapping entry per test: `{testName, requirements: [ids], pathTypes:\n  ['happy'|'sad'|'edge'], variants: […]}` (`file`, `rationale`, and\n  `confidence` are optional).\n- **Every test must come back — in `mappings` or in `unmappable`\n  (`{testName, reason}`), never neither.** A submit that leaves tests\n  unaccounted for is REJECTED with their names. A dropped test is\n  indistinguishable from one you read and found no requirement for, so the\n  ledger would score it uncovered on your silence instead of on evidence. If\n  a subagent fails to return, say so in `unmappable` rather than omitting\n  its tests.\n- Link each `test()` to its requirement with **Playwright tags on the\n  test**: `test('…', { tag: ['@req-R3', '@path-happy', '@variant-email'] },\n  …)` — `@req-\u003Cid>` (repeatable), `@path-happy|sad|edge`, and\n  `@variant-\u003Cvalue>` (which of the feature's variant-dimension values the\n  test actually exercises). Tags are greppable and survive renames. (Legacy\n  `\u002F\u002F @requirement` \u002F `\u002F\u002F @path` comments above the test still parse as a\n  migration fallback.)\n- Canary writes the `@req-*`\u002F`@variant-*` tags through its canonical\n  tag-writer and recomputes the ledger (unknown ids\u002Ftest names\u002Fvariants\n  dropped). It writes the *tag* (mapping) — never the test body — and there\n  is **no** accept\u002Freject review gate.\n- No PRD summary yet → `status: \"needs-summary\"` (run `start_external_summary`\n  first); single-flight per feature.\n- Split by spec file, never by test count, and call\n  `submit_external_coverage` exactly once with the merged answer.\n\n**Step 3 — read the ledger.** After `submit_external_coverage`, you MUST call\n`get_feature_coverage(feature)` before reporting; the submit response is not\nthe final ledger. The ledger reports per\nrequirement → covering tests → `gapType` (`untested` \u002F `path-incomplete` \u002F\n`variant-incomplete` \u002F `covered`) + coarse `coverageStatus`\n(covered\u002Fpartial\u002Funcovered), a `Mapped N%` headline from `coveragePct` (fully\nmapped requirements ÷ total — every declared path and variant claimed) and a\nlinked breadth in `mappedPct` (requirements with ≥1 test), per-test `strength`\n(`strong` \u002F `solid` \u002F `basic` \u002F `shallow`, graded\nfrom each test's assertion tiers — independent of runs), `orphanTestNames`\n(tests with no requirement), and the derived `state` (summary × coverage\naxes + headline).\n\n**Step 4 — act on gaps.** `untested` means no test maps to the requirement\n(write one, or run the coverage engine to map an existing test);\n`path-incomplete` means a declared sad\u002Fedge path has no mapped test;\n`variant-incomplete` means the requirement spans variant values no mapped\ntest exercises (test the missing variant, or add the `@variant-*` tag to a\ntest that already does); a `shallow` test only reaches a weak assertion tier\n(write a stronger check — e.g. a browser confirming the real external effect\nrather than an app log); an orphan test needs a `@req-*` tag. The UI's\nfull-screen Coverage dialog shows the same data — both surfaces read the\nsame computation.\n\n## Guardrails\n\n- Generate one `session_id` before the first external start call and pass that\n  same value to `start_external_summary` and `start_external_coverage` for the\n  whole conversation. The submit calls take their `jobId`, not `session_id`.\n- New tests belong to the `canary-lab-author` skill\u002Fprofile; this profile maps and measures.\n- Proving coverage takes a run — `canary-lab-run` (or a flight) records the run the `proven` axis reads.\n- The time axis reads run records, never a stored opinion: a `proof-stale` requirement is cleared by a green run, a `wording-ahead` one by matching tests passing after the wording change, a `tests-weakened` one by restoring the assertion.\n\nBroken document links are repaired before source discovery: the owning command elicits the moved file's new path on the Canary server. On `document-relinked`, retry that command with the same arguments. Keep the symlink and existing baseline; never omit the missing source or create recovery copies. Cancel\u002Fdecline leaves work pending. Unsupported clients use Relink in the returned Canary UI.\n",{"name":5,"type":44,"description":7},"skill","main","2c85305cab69e5f773d59ea79a64a0b049a98345","agent-integrations\u002Fplugin\u002Fcanary-lab\u002Fskills\u002Fcanary-lab-coverage",0,"https:\u002F\u002Fgithub.com\u002Fferterahadi\u002Fcanary-lab","https:\u002F\u002Fwww.npmjs.com\u002Fpackage\u002Fcanary-lab","https:\u002F\u002Fgithub.com\u002Fferterahadi","https:\u002F\u002Fgithub.com\u002Fferterahadi-oddle","Shipping well-tested, production-ready, vibe-coded code using today’s latest form of engineering - harness, agentic, loop, graph, or whatever drops next","2026-11-14 17:08:42",{"source":8,"skillName":5,"commands":56,"prompt":66,"zipAvailable":67},[57,60,63],{"tool":58,"command":59},"npx","npx skills add ferterahadi\u002Fcanary-lab --skill canary-lab-coverage",{"tool":61,"command":62},"bunx","bunx skills add ferterahadi\u002Fcanary-lab --skill canary-lab-coverage",{"tool":64,"command":65},"pnpm","pnpm dlx skills add ferterahadi\u002Fcanary-lab --skill canary-lab-coverage","安装技能，技能地址：https:\u002F\u002Fgithub.com\u002Fferterahadi\u002Fcanary-lab\u002Fblob\u002Fmain\u002Fagent-integrations\u002Fplugin\u002Fcanary-lab\u002Fskills\u002Fcanary-lab-coverage\u002FSKILL.md",true,[],[70,77,85,94,114,130],{"skillNo":71,"name":72,"nameZh":6,"description":6,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":15,"licenseFileUrl":6,"sourceHtmlUrl":73,"categories":74,"keywords":75,"publishedAt":39},"01M6XCWFJ75NNVF0N8C0XGNC17","off-by-one","https:\u002F\u002Fgithub.com\u002Fferterahadi\u002Fcanary-lab\u002Fblob\u002Fmain\u002Fapps\u002Fweb-server\u002Fprompts\u002Fsabotage-skills\u002Foff-by-one\u002Fskill.md",[],[76],"off by one",{"skillNo":78,"name":79,"nameZh":6,"description":6,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":15,"licenseFileUrl":6,"sourceHtmlUrl":80,"categories":81,"keywords":82,"publishedAt":39},"01M6XCWBYW1QHVFKSDQCCRRRDT","multi-failure-cascade","https:\u002F\u002Fgithub.com\u002Fferterahadi\u002Fcanary-lab\u002Fblob\u002Fmain\u002Fapps\u002Fweb-server\u002Fprompts\u002Fsabotage-skills\u002Fmulti-failure-cascade\u002Fskill.md",[],[83,84],"multi","multi failure cascade",{"skillNo":86,"name":87,"nameZh":6,"description":6,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":15,"licenseFileUrl":6,"sourceHtmlUrl":88,"categories":89,"keywords":90,"publishedAt":39},"01M6XCW8XA7QY74Q18D9PGFFMD","broken-delete-contract","https:\u002F\u002Fgithub.com\u002Fferterahadi\u002Fcanary-lab\u002Fblob\u002Fmain\u002Fapps\u002Fweb-server\u002Fprompts\u002Fsabotage-skills\u002Fbroken-delete-contract\u002Fskill.md",[],[37,91,92,93],"broken","contract","broken delete contract",{"skillNo":95,"name":96,"nameZh":6,"description":97,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":15,"licenseFileUrl":6,"sourceHtmlUrl":98,"categories":99,"keywords":100,"publishedAt":39},"01M6XCW439KA486AN2QZACNYTC","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 \u002F get_flight \u002F 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 \u002Fcanary-lab.","https:\u002F\u002Fgithub.com\u002Fferterahadi\u002Fcanary-lab\u002Fblob\u002Fmain\u002Fagent-integrations\u002Fplugin\u002Fcanary-lab\u002Fskills\u002Fcanary-lab\u002FSKILL.md",[],[22,23,20,101,102,103,104,105,106,31,107,108,109,110,111,112,36,35,29,113],"capability","pipeline","work","only","take","green","end","app","respond","suite","product","bare","run",{"skillNo":115,"name":116,"nameZh":6,"description":117,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":15,"licenseFileUrl":6,"sourceHtmlUrl":118,"categories":119,"keywords":120,"publishedAt":39},"01M6XCVYQ31KC4ZXCD5QMRKXEE","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\u002Fget\u002Fcreate\u002Fupdate_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).","https:\u002F\u002Fgithub.com\u002Fferterahadi\u002Fcanary-lab\u002Fblob\u002Fmain\u002Fagent-integrations\u002Fplugin\u002Fcanary-lab\u002Fskills\u002Fcanary-lab-verify\u002FSKILL.md",[],[23,121,22,122,20,31,29,123,124,113,125,126,25,127,28,107,108,128,129,36],"verify","canary lab verify","config","create","update","verification","loop","checkout","result",{"skillNo":131,"name":132,"nameZh":6,"description":133,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":15,"licenseFileUrl":6,"sourceHtmlUrl":134,"categories":135,"keywords":136,"publishedAt":39},"01M6XCVSWW705CN3C69FQMPZXN","canary-lab-run","Use when running or healing an EXISTING Canary Lab feature locally — \"run \u003Cfeature>\", \"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\u002Fservice code, not tests. For end-to-end onboarding of a new repo use canary-lab (flight); for deployed-environment checks use canary-lab-verify.","https:\u002F\u002Fgithub.com\u002Fferterahadi\u002Fcanary-lab\u002Fblob\u002Fmain\u002Fagent-integrations\u002Fplugin\u002Fcanary-lab\u002Fskills\u002Fcanary-lab-run\u002FSKILL.md",[],[137,20,113,23,22,107,31,138,139,127,25,35,140,29,36,141,142,108,143,144],"canary lab run","fix","context","code","rerun","wait","new repo","failing"]