[{"data":1,"prerenderedAt":-1},["ShallowReactive",2],{"skill:01M7896RGGTW16P9BY9SVRG2Z6":3,"skill-same:01M7896RGGTW16P9BY9SVRG2Z6":67},{"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":19,"linkOnly":20,"markdownContent":21,"markdownBody":22,"frontMatter":23,"refName":33,"commitSha":34,"skillDirectory":35,"forksCount":36,"repositoryHtmlUrl":37,"repositoryHomepageUrl":38,"ownerHtmlUrl":39,"ownerBlogUrl":40,"ownerDescription":41,"updatedAt":42,"install":43,"resources":56},"01M7896RGGTW16P9BY9SVRG2Z6","noyalib-coverage-campaign",null,"Raise noyalib line, branch, and function coverage toward the 98% target. Use for 'raise coverage', llvm-cov gaps, coverage-gap triage, ratcheting fail-under thresholds, or picking the next coverage target. Fences off the known wrong turns (chasing 100%, weakening thresholds).","sebastienrousseau\u002Fagtmls","sebastienrousseau","https:\u002F\u002Favatars.githubusercontent.com\u002Fu\u002F1394998?v=4","01M78952QGX0RG3V4QVGESS3N7","Sebastien Rousseau","01M78952R7PPYXEW5VZKQRB0VW",1,"MIT","https:\u002F\u002Fgithub.com\u002Fsebastienrousseau\u002Fagtmls\u002Fblob\u002Fmain\u002Fpacks\u002Fnoyalib\u002Fskills\u002Fnoyalib-coverage-campaign\u002FSKILL.md",[],[],"2026-11-15 14:19:17",false,"---\nname: noyalib-coverage-campaign\ndescription: \"Raise noyalib line, branch, and function coverage toward the 98% target. Use for 'raise coverage', llvm-cov gaps, coverage-gap triage, ratcheting fail-under thresholds, or picking the next coverage target. Fences off the known wrong turns (chasing 100%, weakening thresholds).\"\nlicense: MIT\ncompatibility: \"Requires cargo, git. Tested with Claude Code, Codex, and Aider skill layouts\"\nallowed-tools: \"Read Glob Grep Write Edit Bash WebFetch WebSearch\"\nmetadata:\n  agtmls-owner: \"Sebastien Rousseau\"\n  agtmls-maturity: \"project\"\n  agtmls-bundle: \"noyalib\"\n  agtmls-risk-level: \"medium\"\n  agtmls-network-access: \"optional\"\n  agtmls-writes-files: \"true\"\n  agtmls-executes-commands: \"true\"\n  agtmls-handles-secrets: \"false\"\n  agtmls-requires-human-review: \"true\"\n---\n\n# noyalib-coverage-campaign\n\n**Purpose.** Run the coverage-hardening campaign to specification, unsupervised,\non a Sonnet-class session. This skill is the *decision procedure*, not a\ntutorial: at each phase there is a command, an expected observation, and a\ngate that says whether to proceed, retry, or escalate.\n\n**Scope guard.** This skill covers only the coverage campaign. For the wider\n\"how do we test noyalib at all\" question (test layers, proptest, fuzz,\nMiri, spec suite) use **noyalib-validation-and-qa**. For interpreting a\nspecific tool's output (llvm-cov flags, cargo-vet, deny) use\n**noyalib-diagnostics-and-tooling**. Do not duplicate those skills here.\n\n**Progressive disclosure.** This SKILL.md is the campaign spine. Extended\nmaterial — bucket-classification walkthroughs, verbatim house-pattern\nsnippets, \"why not\" rationale for each fenced wrong-path, expanded\nsolution-menu prefer-when notes, and the `invariant_violated`\nfile:line inventory — is in\n[`reference.md`](.\u002Freference.md). Load `reference.md` when the compact\nguidance below is insufficient; each section flags its\ncross-reference.\n\n---\n\n## 0. Baseline numbers (VOLATILE — re-verify at campaign start)\n\nCaptured 2026-07-08 from `.github\u002Fworkflows\u002Fci.yml:160-162`,\n`.github\u002Fworkflows\u002Fshared-coverage.yml` reusable defaults,\n`doc\u002FTESTING.md` §\"Coverage gate\", and PLAN.md §1 \"Coverage baseline\":\n\n| axis      | live workspace gate (`ci.yml`) | shared-coverage.yml default | `doc\u002FTESTING.md` (stale) | target |\n|-----------|-------------------------------:|----------------------------:|-------------------------:|-------:|\n| functions | 96 %                           | 96 %                        | 95 %                     | 98 %   |\n| lines     | 94 %                           | 94 %                        | 93 %                     | 98 %   |\n| regions   | 93 %                           | 93 %                        | 92 %                     | 98 %   |\n\nTwo threshold layers exist and both must be understood:\n\n1. **Live workspace gate (`.github\u002Fworkflows\u002Fci.yml:160-162`, 96\u002F94\u002F93)** —\n   the values a PR is actually measured against today. This matches the\n   `shared-coverage.yml` reusable-workflow defaults; the workspace caller\n   does not override them.\n2. **`doc\u002FTESTING.md` documented axis (95\u002F93\u002F92)** — documentation drift.\n   The doc lags the workflow files by one ratchet step. Trust the workflows;\n   fix the doc in the same PR that next moves the gate.\n\n**These numbers drift.** Before touching anything, run Phase 0 and treat\nthe axis printed there as ground truth. If Phase 0 disagrees with this\ntable by more than 1 pp on any axis, update this section in the same PR\nthat closes the gap that caused the drift.\n\n---\n\n## Phase 0 — Baseline: what do we actually cover today?\n\n**Command (canonical):**\n\n```bash\nmake coverage-gap\n# equivalent to:\n#   .\u002Fscripts\u002Fcoverage-gap-report.sh          # 98 % threshold (default)\n#   .\u002Fscripts\u002Fcoverage-gap-report.sh 95       # ratchet to a custom floor\n```\n\nUnder the hood this runs (verbatim from `scripts\u002Fcoverage-gap-report.sh`):\n\n```bash\nNOYALIB_COVERAGE=1 cargo +nightly llvm-cov \\\n    --workspace --all-features --no-fail-fast \\\n    --ignore-filename-regex '' \\\n    --summary-only\n```\n\n**Expected observation.** A TSV block, header `file  regions  lines  functions`,\none row per file below the threshold, and on stderr a one-liner\n`\u003CN> files below \u003CT> %.` The full raw summary is teed to\n`\u002Ftmp\u002Fnoyalib-coverage.log`.\n\n**Gate.**\n\n- Zero files below threshold → campaign done for this ratchet step;\n  advance to Phase 5 to ratchet the gate numbers.\n- N > 0 → continue to Phase 1 with the punchlist.\n\n**If the tool errors:** toolchain mismatch → `cargo +nightly`;\nmissing nightly → `rustup toolchain install nightly --component\nllvm-tools-preview`. Numbers wildly off → confirm `--all-features`.\nCI cache poisoning symptom (`cargo check` under 2 s + drifting\nnumbers) → coverage jobs use `CARGO_TARGET_DIR=target-coverage`\n(memory `feedback_ci_cache_poisoning`); locally `cargo clean` and\nrerun. Extended error triage in\n[`reference.md`](.\u002Freference.md) §6.\n\n---\n\n## Phase 1 — Target selection: pick the ≤ 3 files that matter most\n\n**Rule of thumb.** Rank Phase 0 rows by\n`(uncovered_lines × load_bearingness)` where load-bearingness is:\n\n| tier | modules                                                             | weight |\n|------|---------------------------------------------------------------------|--------|\n| S    | `parser\u002F`, `scanner\u002F`, `loader.rs`, `de\u002F`, `ser\u002F`, `error.rs`       | 3      |\n| A    | `value.rs`, `borrowed.rs`, `cst\u002F`, `document.rs`                    | 2      |\n| B    | `fmt.rs`, `path.rs`, public re-exports                              | 1      |\n| C    | convenience wrappers, `Display` shims, example-only helpers         | 0.5    |\n\nParser \u002F loader \u002F scanner \u002F error paths outrank convenience code, always.\nA file at 90 % in `parser\u002Fevents.rs` beats a file at 85 % in a `Display`\nshim (memory `feedback_security_first_posture`: correctness on\nadversarial input IS a security control).\n\n**PR discipline gate.** Pick **≤ 3 files per PR**. One logical change\nper PR (memories `project_main_branch_protection` +\n`feedback_no_premature_phasing`). Bundling five files into one \"coverage\nsweep\" makes the ratchet PR hard to revert per-file if one addition\nregresses.\n\n**Entangled files** — e.g. `parser\u002Fevents.rs` gaps only close when\n`scanner.rs` gaps close — may live in the same PR as a single logical\nchange. Say so in the description.\n\n---\n\n## Phase 2 — Gap analysis: what kind of gap is each uncovered region?\n\n**Command.** For a specific file:\n\n```bash\nNOYALIB_COVERAGE=1 cargo +nightly llvm-cov show \\\n    --workspace --all-features \\\n    --show-line-counts-or-regions \\\n    --ignore-filename-regex '' \\\n    -- crates\u002Fnoyalib\u002Fsrc\u002Fparser\u002Fevents.rs   # example\n```\n\nOr the whole workspace with per-file annotated HTML:\n\n```bash\nNOYALIB_COVERAGE=1 cargo +nightly llvm-cov --html --workspace --all-features\nopen target\u002Fllvm-cov\u002Fhtml\u002Findex.html\n```\n\n**Classification.** Every uncovered region falls into one of four\nbuckets. This decision drives the rest of the campaign:\n\n| bucket | signal                                                                 | action                                                                                 |\n|--------|------------------------------------------------------------------------|----------------------------------------------------------------------------------------|\n| (a)    | Reachable error path (an `Err(Error::…)` return, a bail on bad input)  | **Write a test** that triggers exactly that input; assert the `ErrorKind` variant.     |\n| (b)    | Feature-gated code (`#[cfg(feature = \"…\")]`, `#[cfg(target_arch = …)]`) | **Feature-matrix test leg** — the workspace's `--all-features` still misses cfg-arch. |\n| (c)    | Defensive-unreachable — a `_ =>` arm that calls `invariant_violated`   | **NOT a test target.** Confirm the annotation, document exclusion in PR.               |\n| (d)    | Dead code — genuinely unreachable, not defensive                       | **Do not test.** Open a change-control PR to remove it. Coverage rises by subtraction. |\n\n**How to spot (c) vs (d).** (c) is guarded by\n`#[cfg_attr(noyalib_coverage, coverage(off))]` and calls\n`crate::error::invariant_violated(...)`. If an arm is NOT annotated,\nthat's the bug — annotate it. (d) is code you can prove no input can\nreach; if unsure, write the test first — failure to trigger is\nempirical evidence for (d).\n\nExtended walkthroughs (signal \u002F action \u002F common trap per bucket) and\nthe current `invariant_violated` file:line inventory are in\n[`reference.md`](.\u002Freference.md) §1 and §3.\n\n---\n\n## Phase 3 — Test authoring: the house pattern\n\n**Location.** `crates\u002Fnoyalib\u002Ftests\u002Fcoverage_\u003Cslug>.rs`. The existing\nfamily is ~20 files including `coverage_scanner.rs`,\n`coverage_error.rs`, `coverage_loader{,_full}.rs`,\n`coverage_borrowed.rs`, `coverage_ser.rs`, `coverage_de.rs`,\n`coverage_fmt.rs`, `coverage_value.rs`,\n`coverage_spanned_anchors.rs`, plus historical sweep files\n(`coverage_final*.rs`, `coverage_100.rs`, `coverage_remaining.rs`).\n\n**Naming.** Prefer topic-scoped names (`coverage_scanner`) over sweep\nnames (`coverage_final_sweep4`). Sweep names are historical; don't\nadd more.\n\n**Every file must:**\n\n1. Start with the SPDX header and a module doc naming the source file\n   whose gaps it closes.\n2. Assert semantics — every test asserts a specific behaviour, not\n   \"some output happened\". Wrong-but-green is the declared enemy.\n3. On error-path tests, `matches!` on the `ErrorKind` variant — not\n   `err.to_string()`.\n\nCanonical style references (mirror these three verbatim):\n`coverage_scanner.rs`, `coverage_error.rs`, `coverage_loader_full.rs`.\nVerbatim snippets (SPDX header, error-path shape, anti-pattern,\n\"any outcome is fine\" exception) are in\n[`reference.md`](.\u002Freference.md) §2.\n\n**Doctest option.** If the file being covered has a public API without\na `# Examples` section, a doctest closes the coverage gap AND satisfies\nthe rustdoc-coverage goal in PLAN.md §1 (`missing_docs = warn` → `deny`,\n≥ 98 % items). Double win; prefer this on the public surface.\n\n---\n\n## Phase 4 — Verification gate\n\n**Command.** Re-run Phase 0:\n\n```bash\nmake coverage-gap\n```\n\n**Expected.** Targeted files no longer appear in the punchlist, or\nappear with all three axes ≥ 98 %. Workspace totals rise by the\nuncovered-region contribution of the files closed.\n\n**Gate.**\n\n- Targeted files ≥ 98 on all three axes → proceed to Phase 5.\n- Improved but still below 98 → back to Phase 2 for the residual\n  regions. Common cause: an error path with three variants, test hit\n  two.\n- Unchanged → the test isn't actually executing the intended path.\n  `dbg!` on entry, run `cargo test --test coverage_\u003Cslug> -- \u003Cname>\n  --nocapture` under `NOYALIB_COVERAGE=1`, confirm the region enters.\n\n**If a file refuses to close the last percent:** check for\n`#[cfg(target_arch = …)]` (cross-target is out of scope per PLAN.md\n§7.8), macro-expanded lines (`llvm-cov show` quirk on `macro_rules!`;\ndocument as at-ceiling), or `#[cfg]`-conditional match arms needing\na different feature subset (`--no-default-features --features alloc`\nfor the `no_std` leg — only worth it for tier-S). Extended notes in\n[`reference.md`](.\u002Freference.md) §6.\n\n**Principled exclusion.** If a region is genuinely (c) or (d) but\ncannot be excluded via `#[cfg_attr(noyalib_coverage, coverage(off))]`,\ndocument location + reason in the PR — change-control question, see\n**noyalib-change-control**.\n\n---\n\n## Phase 5 — Promotion: normal change control\n\nStandard flow, per memory `project_main_branch_protection`:\n\n1. Branch from `main`, feature branch.\n2. Local run of the full pre-push gate (see **noyalib-build-and-env**\n   or **noyalib-ci-and-release** for the exact command list).\n3. PR into `main` — `main` rejects direct pushes.\n4. Wait for CI green on all shared workflows including the coverage\n   gate (memory `feedback_ci_must_be_green`).\n5. `gh pr merge --squash --admin` once green.\n6. If the campaign has fully closed a threshold step (e.g. all files\n   ≥ 98 % lines), a *separate* PR ratchets the numbers in **both**:\n   - `doc\u002FTESTING.md` §\"Coverage gate\"\n   - the workspace's caller of `shared-coverage.yml` (its\n     `fail-under-*` inputs)\n   - and, if this is the reference for satellites, the defaults in\n     `.github\u002Fworkflows\u002Fshared-coverage.yml`\n   Never bundle a threshold ratchet with a test-authoring PR — two\n   separate logical changes, different risk profiles.\n\n**Success is measured, not eyeballed.** The number of record is the\n`coverage-gate` job (currently 96 fn \u002F 94 lines \u002F 93 regions per\n`ci.yml:160-162` + `shared-coverage.yml` defaults), not a local\nterminal readout. If CI says \"failed under 94 lines\" and local says\n\"94.02\", CI wins — check `CARGO_TARGET_DIR` isolation and re-run.\n\n---\n\n## Known wrong paths (fenced — terse list)\n\nPer-item \"why not\" rationale is in [`reference.md`](.\u002Freference.md) §4.\n\n- **Chasing 100 %.** Unreachable by construction; ceiling is ≥ 98 %.\n- **Weakening thresholds to pass.** Never lower a `fail-under-*` in\n  `shared-coverage.yml` or `doc\u002FTESTING.md` to green a red PR.\n- **Assert-free coverage tests.** Wrong-but-green is the declared enemy.\n- **Duplicating existing coverage under a new name.** Grep the\n  `coverage_*.rs` family first; extend if it exists.\n- **Testing `invariant_violated` arms directly.** Annotate them; do\n  not reach them via `unsafe` or hand-forged inputs.\n- **Touching `${1:-98}` in `scripts\u002Fcoverage-gap-report.sh` silently.**\n  It's contract with the maintainer.\n- **Bundling with unrelated refactors.** Two logical changes = two\n  PRs. Coverage PRs must be trivially revertible per-file.\n\n---\n\n## The solution menu (ranked — brief)\n\nGiven a specific gap, prefer higher-ranked techniques first. Extended\nwhen-to-prefer rationale in [`reference.md`](.\u002Freference.md) §5.\n\n1. **Targeted unit \u002F integration test** — default. Use for (a)\n   reachable-error-path gaps and single-function invariants.\n2. **Proptest generator** — for combinatorial \u002F shape-family gaps\n   (scalar shapes × chomping × indent; escape sequences; type tags).\n3. **Doctest** on the public API — closes coverage AND moves rustdoc\n   coverage toward PLAN.md §1 in one commit.\n4. **Fixture-driven spec test** — YAML file under `tests\u002Ffixtures\u002F`\n   plus expected event stream \u002F value. For YAML-*semantic* gaps\n   (anchor\u002Falias corners, merge-key ordering, spec-clause edges).\n\nNone replaces the others — a well-covered file uses all four.\n\n---\n\n## Provenance\n\n- **`scripts\u002Fcoverage-gap-report.sh`** — exact `cargo +nightly llvm-cov`\n  invocation, TSV output, default threshold 98 %.\n- **`.github\u002Fworkflows\u002Fci.yml:160-162`** — live `coverage-gate` inputs:\n  96 fn \u002F 94 lines \u002F 93 regions.\n- **`.github\u002Fworkflows\u002Fshared-coverage.yml`** — reusable workflow.\n  Defaults 96\u002F94\u002F93 (caller doesn't override).\n  `CARGO_TARGET_DIR: target-coverage` isolation is load-bearing\n  (memory `feedback_ci_cache_poisoning`).\n- **`doc\u002FTESTING.md` §\"Coverage gate\"** — stale (95\u002F93\u002F92); trust the\n  workflows. Also lists legitimate exclusions\n  (`noyalib-wasm\u002Fsrc\u002Flib.rs`, MCP\u002FLSP `protocol.rs`).\n- **`PLAN.md` §1 + §7.8** — 98 % target, ratchet plan, cross-target\n  matrix as future work.\n- **`crates\u002Fnoyalib\u002Ftests\u002Fcoverage_*.rs`** — ~20-file house pattern.\n  Style refs: `coverage_scanner.rs`, `coverage_error.rs`,\n  `coverage_loader_full.rs`.\n- **`crates\u002Fnoyalib\u002Fsrc\u002Ferror.rs::invariant_violated`** (line 1697) —\n  the `#[cfg_attr(noyalib_coverage, coverage(off))]` mechanism. Full\n  call-site inventory in [`reference.md`](.\u002Freference.md) §3.\n- **Makefile `coverage-gap` target** — canonical entry point.\n\nSibling skills (out of scope; delegate):\n\n- **noyalib-validation-and-qa** — proptest \u002F fuzz \u002F Miri \u002F spec-suite.\n- **noyalib-diagnostics-and-tooling** — llvm-cov flags, cargo-vet \u002F deny.\n- **noyalib-change-control** — ratchet-PR mechanics.\n- **noyalib-ci-and-release** — pre-push gate; shared-workflow\n  caller-permission unioning (memory `feedback_shared_workflow_caller_perms`).\n","# noyalib-coverage-campaign\n\n**Purpose.** Run the coverage-hardening campaign to specification, unsupervised,\non a Sonnet-class session. This skill is the *decision procedure*, not a\ntutorial: at each phase there is a command, an expected observation, and a\ngate that says whether to proceed, retry, or escalate.\n\n**Scope guard.** This skill covers only the coverage campaign. For the wider\n\"how do we test noyalib at all\" question (test layers, proptest, fuzz,\nMiri, spec suite) use **noyalib-validation-and-qa**. For interpreting a\nspecific tool's output (llvm-cov flags, cargo-vet, deny) use\n**noyalib-diagnostics-and-tooling**. Do not duplicate those skills here.\n\n**Progressive disclosure.** This SKILL.md is the campaign spine. Extended\nmaterial — bucket-classification walkthroughs, verbatim house-pattern\nsnippets, \"why not\" rationale for each fenced wrong-path, expanded\nsolution-menu prefer-when notes, and the `invariant_violated`\nfile:line inventory — is in\n[`reference.md`](.\u002Freference.md). Load `reference.md` when the compact\nguidance below is insufficient; each section flags its\ncross-reference.\n\n---\n\n## 0. Baseline numbers (VOLATILE — re-verify at campaign start)\n\nCaptured 2026-07-08 from `.github\u002Fworkflows\u002Fci.yml:160-162`,\n`.github\u002Fworkflows\u002Fshared-coverage.yml` reusable defaults,\n`doc\u002FTESTING.md` §\"Coverage gate\", and PLAN.md §1 \"Coverage baseline\":\n\n| axis      | live workspace gate (`ci.yml`) | shared-coverage.yml default | `doc\u002FTESTING.md` (stale) | target |\n|-----------|-------------------------------:|----------------------------:|-------------------------:|-------:|\n| functions | 96 %                           | 96 %                        | 95 %                     | 98 %   |\n| lines     | 94 %                           | 94 %                        | 93 %                     | 98 %   |\n| regions   | 93 %                           | 93 %                        | 92 %                     | 98 %   |\n\nTwo threshold layers exist and both must be understood:\n\n1. **Live workspace gate (`.github\u002Fworkflows\u002Fci.yml:160-162`, 96\u002F94\u002F93)** —\n   the values a PR is actually measured against today. This matches the\n   `shared-coverage.yml` reusable-workflow defaults; the workspace caller\n   does not override them.\n2. **`doc\u002FTESTING.md` documented axis (95\u002F93\u002F92)** — documentation drift.\n   The doc lags the workflow files by one ratchet step. Trust the workflows;\n   fix the doc in the same PR that next moves the gate.\n\n**These numbers drift.** Before touching anything, run Phase 0 and treat\nthe axis printed there as ground truth. If Phase 0 disagrees with this\ntable by more than 1 pp on any axis, update this section in the same PR\nthat closes the gap that caused the drift.\n\n---\n\n## Phase 0 — Baseline: what do we actually cover today?\n\n**Command (canonical):**\n\n```bash\nmake coverage-gap\n# equivalent to:\n#   .\u002Fscripts\u002Fcoverage-gap-report.sh          # 98 % threshold (default)\n#   .\u002Fscripts\u002Fcoverage-gap-report.sh 95       # ratchet to a custom floor\n```\n\nUnder the hood this runs (verbatim from `scripts\u002Fcoverage-gap-report.sh`):\n\n```bash\nNOYALIB_COVERAGE=1 cargo +nightly llvm-cov \\\n    --workspace --all-features --no-fail-fast \\\n    --ignore-filename-regex '' \\\n    --summary-only\n```\n\n**Expected observation.** A TSV block, header `file  regions  lines  functions`,\none row per file below the threshold, and on stderr a one-liner\n`\u003CN> files below \u003CT> %.` The full raw summary is teed to\n`\u002Ftmp\u002Fnoyalib-coverage.log`.\n\n**Gate.**\n\n- Zero files below threshold → campaign done for this ratchet step;\n  advance to Phase 5 to ratchet the gate numbers.\n- N > 0 → continue to Phase 1 with the punchlist.\n\n**If the tool errors:** toolchain mismatch → `cargo +nightly`;\nmissing nightly → `rustup toolchain install nightly --component\nllvm-tools-preview`. Numbers wildly off → confirm `--all-features`.\nCI cache poisoning symptom (`cargo check` under 2 s + drifting\nnumbers) → coverage jobs use `CARGO_TARGET_DIR=target-coverage`\n(memory `feedback_ci_cache_poisoning`); locally `cargo clean` and\nrerun. Extended error triage in\n[`reference.md`](.\u002Freference.md) §6.\n\n---\n\n## Phase 1 — Target selection: pick the ≤ 3 files that matter most\n\n**Rule of thumb.** Rank Phase 0 rows by\n`(uncovered_lines × load_bearingness)` where load-bearingness is:\n\n| tier | modules                                                             | weight |\n|------|---------------------------------------------------------------------|--------|\n| S    | `parser\u002F`, `scanner\u002F`, `loader.rs`, `de\u002F`, `ser\u002F`, `error.rs`       | 3      |\n| A    | `value.rs`, `borrowed.rs`, `cst\u002F`, `document.rs`                    | 2      |\n| B    | `fmt.rs`, `path.rs`, public re-exports                              | 1      |\n| C    | convenience wrappers, `Display` shims, example-only helpers         | 0.5    |\n\nParser \u002F loader \u002F scanner \u002F error paths outrank convenience code, always.\nA file at 90 % in `parser\u002Fevents.rs` beats a file at 85 % in a `Display`\nshim (memory `feedback_security_first_posture`: correctness on\nadversarial input IS a security control).\n\n**PR discipline gate.** Pick **≤ 3 files per PR**. One logical change\nper PR (memories `project_main_branch_protection` +\n`feedback_no_premature_phasing`). Bundling five files into one \"coverage\nsweep\" makes the ratchet PR hard to revert per-file if one addition\nregresses.\n\n**Entangled files** — e.g. `parser\u002Fevents.rs` gaps only close when\n`scanner.rs` gaps close — may live in the same PR as a single logical\nchange. Say so in the description.\n\n---\n\n## Phase 2 — Gap analysis: what kind of gap is each uncovered region?\n\n**Command.** For a specific file:\n\n```bash\nNOYALIB_COVERAGE=1 cargo +nightly llvm-cov show \\\n    --workspace --all-features \\\n    --show-line-counts-or-regions \\\n    --ignore-filename-regex '' \\\n    -- crates\u002Fnoyalib\u002Fsrc\u002Fparser\u002Fevents.rs   # example\n```\n\nOr the whole workspace with per-file annotated HTML:\n\n```bash\nNOYALIB_COVERAGE=1 cargo +nightly llvm-cov --html --workspace --all-features\nopen target\u002Fllvm-cov\u002Fhtml\u002Findex.html\n```\n\n**Classification.** Every uncovered region falls into one of four\nbuckets. This decision drives the rest of the campaign:\n\n| bucket | signal                                                                 | action                                                                                 |\n|--------|------------------------------------------------------------------------|----------------------------------------------------------------------------------------|\n| (a)    | Reachable error path (an `Err(Error::…)` return, a bail on bad input)  | **Write a test** that triggers exactly that input; assert the `ErrorKind` variant.     |\n| (b)    | Feature-gated code (`#[cfg(feature = \"…\")]`, `#[cfg(target_arch = …)]`) | **Feature-matrix test leg** — the workspace's `--all-features` still misses cfg-arch. |\n| (c)    | Defensive-unreachable — a `_ =>` arm that calls `invariant_violated`   | **NOT a test target.** Confirm the annotation, document exclusion in PR.               |\n| (d)    | Dead code — genuinely unreachable, not defensive                       | **Do not test.** Open a change-control PR to remove it. Coverage rises by subtraction. |\n\n**How to spot (c) vs (d).** (c) is guarded by\n`#[cfg_attr(noyalib_coverage, coverage(off))]` and calls\n`crate::error::invariant_violated(...)`. If an arm is NOT annotated,\nthat's the bug — annotate it. (d) is code you can prove no input can\nreach; if unsure, write the test first — failure to trigger is\nempirical evidence for (d).\n\nExtended walkthroughs (signal \u002F action \u002F common trap per bucket) and\nthe current `invariant_violated` file:line inventory are in\n[`reference.md`](.\u002Freference.md) §1 and §3.\n\n---\n\n## Phase 3 — Test authoring: the house pattern\n\n**Location.** `crates\u002Fnoyalib\u002Ftests\u002Fcoverage_\u003Cslug>.rs`. The existing\nfamily is ~20 files including `coverage_scanner.rs`,\n`coverage_error.rs`, `coverage_loader{,_full}.rs`,\n`coverage_borrowed.rs`, `coverage_ser.rs`, `coverage_de.rs`,\n`coverage_fmt.rs`, `coverage_value.rs`,\n`coverage_spanned_anchors.rs`, plus historical sweep files\n(`coverage_final*.rs`, `coverage_100.rs`, `coverage_remaining.rs`).\n\n**Naming.** Prefer topic-scoped names (`coverage_scanner`) over sweep\nnames (`coverage_final_sweep4`). Sweep names are historical; don't\nadd more.\n\n**Every file must:**\n\n1. Start with the SPDX header and a module doc naming the source file\n   whose gaps it closes.\n2. Assert semantics — every test asserts a specific behaviour, not\n   \"some output happened\". Wrong-but-green is the declared enemy.\n3. On error-path tests, `matches!` on the `ErrorKind` variant — not\n   `err.to_string()`.\n\nCanonical style references (mirror these three verbatim):\n`coverage_scanner.rs`, `coverage_error.rs`, `coverage_loader_full.rs`.\nVerbatim snippets (SPDX header, error-path shape, anti-pattern,\n\"any outcome is fine\" exception) are in\n[`reference.md`](.\u002Freference.md) §2.\n\n**Doctest option.** If the file being covered has a public API without\na `# Examples` section, a doctest closes the coverage gap AND satisfies\nthe rustdoc-coverage goal in PLAN.md §1 (`missing_docs = warn` → `deny`,\n≥ 98 % items). Double win; prefer this on the public surface.\n\n---\n\n## Phase 4 — Verification gate\n\n**Command.** Re-run Phase 0:\n\n```bash\nmake coverage-gap\n```\n\n**Expected.** Targeted files no longer appear in the punchlist, or\nappear with all three axes ≥ 98 %. Workspace totals rise by the\nuncovered-region contribution of the files closed.\n\n**Gate.**\n\n- Targeted files ≥ 98 on all three axes → proceed to Phase 5.\n- Improved but still below 98 → back to Phase 2 for the residual\n  regions. Common cause: an error path with three variants, test hit\n  two.\n- Unchanged → the test isn't actually executing the intended path.\n  `dbg!` on entry, run `cargo test --test coverage_\u003Cslug> -- \u003Cname>\n  --nocapture` under `NOYALIB_COVERAGE=1`, confirm the region enters.\n\n**If a file refuses to close the last percent:** check for\n`#[cfg(target_arch = …)]` (cross-target is out of scope per PLAN.md\n§7.8), macro-expanded lines (`llvm-cov show` quirk on `macro_rules!`;\ndocument as at-ceiling), or `#[cfg]`-conditional match arms needing\na different feature subset (`--no-default-features --features alloc`\nfor the `no_std` leg — only worth it for tier-S). Extended notes in\n[`reference.md`](.\u002Freference.md) §6.\n\n**Principled exclusion.** If a region is genuinely (c) or (d) but\ncannot be excluded via `#[cfg_attr(noyalib_coverage, coverage(off))]`,\ndocument location + reason in the PR — change-control question, see\n**noyalib-change-control**.\n\n---\n\n## Phase 5 — Promotion: normal change control\n\nStandard flow, per memory `project_main_branch_protection`:\n\n1. Branch from `main`, feature branch.\n2. Local run of the full pre-push gate (see **noyalib-build-and-env**\n   or **noyalib-ci-and-release** for the exact command list).\n3. PR into `main` — `main` rejects direct pushes.\n4. Wait for CI green on all shared workflows including the coverage\n   gate (memory `feedback_ci_must_be_green`).\n5. `gh pr merge --squash --admin` once green.\n6. If the campaign has fully closed a threshold step (e.g. all files\n   ≥ 98 % lines), a *separate* PR ratchets the numbers in **both**:\n   - `doc\u002FTESTING.md` §\"Coverage gate\"\n   - the workspace's caller of `shared-coverage.yml` (its\n     `fail-under-*` inputs)\n   - and, if this is the reference for satellites, the defaults in\n     `.github\u002Fworkflows\u002Fshared-coverage.yml`\n   Never bundle a threshold ratchet with a test-authoring PR — two\n   separate logical changes, different risk profiles.\n\n**Success is measured, not eyeballed.** The number of record is the\n`coverage-gate` job (currently 96 fn \u002F 94 lines \u002F 93 regions per\n`ci.yml:160-162` + `shared-coverage.yml` defaults), not a local\nterminal readout. If CI says \"failed under 94 lines\" and local says\n\"94.02\", CI wins — check `CARGO_TARGET_DIR` isolation and re-run.\n\n---\n\n## Known wrong paths (fenced — terse list)\n\nPer-item \"why not\" rationale is in [`reference.md`](.\u002Freference.md) §4.\n\n- **Chasing 100 %.** Unreachable by construction; ceiling is ≥ 98 %.\n- **Weakening thresholds to pass.** Never lower a `fail-under-*` in\n  `shared-coverage.yml` or `doc\u002FTESTING.md` to green a red PR.\n- **Assert-free coverage tests.** Wrong-but-green is the declared enemy.\n- **Duplicating existing coverage under a new name.** Grep the\n  `coverage_*.rs` family first; extend if it exists.\n- **Testing `invariant_violated` arms directly.** Annotate them; do\n  not reach them via `unsafe` or hand-forged inputs.\n- **Touching `${1:-98}` in `scripts\u002Fcoverage-gap-report.sh` silently.**\n  It's contract with the maintainer.\n- **Bundling with unrelated refactors.** Two logical changes = two\n  PRs. Coverage PRs must be trivially revertible per-file.\n\n---\n\n## The solution menu (ranked — brief)\n\nGiven a specific gap, prefer higher-ranked techniques first. Extended\nwhen-to-prefer rationale in [`reference.md`](.\u002Freference.md) §5.\n\n1. **Targeted unit \u002F integration test** — default. Use for (a)\n   reachable-error-path gaps and single-function invariants.\n2. **Proptest generator** — for combinatorial \u002F shape-family gaps\n   (scalar shapes × chomping × indent; escape sequences; type tags).\n3. **Doctest** on the public API — closes coverage AND moves rustdoc\n   coverage toward PLAN.md §1 in one commit.\n4. **Fixture-driven spec test** — YAML file under `tests\u002Ffixtures\u002F`\n   plus expected event stream \u002F value. For YAML-*semantic* gaps\n   (anchor\u002Falias corners, merge-key ordering, spec-clause edges).\n\nNone replaces the others — a well-covered file uses all four.\n\n---\n\n## Provenance\n\n- **`scripts\u002Fcoverage-gap-report.sh`** — exact `cargo +nightly llvm-cov`\n  invocation, TSV output, default threshold 98 %.\n- **`.github\u002Fworkflows\u002Fci.yml:160-162`** — live `coverage-gate` inputs:\n  96 fn \u002F 94 lines \u002F 93 regions.\n- **`.github\u002Fworkflows\u002Fshared-coverage.yml`** — reusable workflow.\n  Defaults 96\u002F94\u002F93 (caller doesn't override).\n  `CARGO_TARGET_DIR: target-coverage` isolation is load-bearing\n  (memory `feedback_ci_cache_poisoning`).\n- **`doc\u002FTESTING.md` §\"Coverage gate\"** — stale (95\u002F93\u002F92); trust the\n  workflows. Also lists legitimate exclusions\n  (`noyalib-wasm\u002Fsrc\u002Flib.rs`, MCP\u002FLSP `protocol.rs`).\n- **`PLAN.md` §1 + §7.8** — 98 % target, ratchet plan, cross-target\n  matrix as future work.\n- **`crates\u002Fnoyalib\u002Ftests\u002Fcoverage_*.rs`** — ~20-file house pattern.\n  Style refs: `coverage_scanner.rs`, `coverage_error.rs`,\n  `coverage_loader_full.rs`.\n- **`crates\u002Fnoyalib\u002Fsrc\u002Ferror.rs::invariant_violated`** (line 1697) —\n  the `#[cfg_attr(noyalib_coverage, coverage(off))]` mechanism. Full\n  call-site inventory in [`reference.md`](.\u002Freference.md) §3.\n- **Makefile `coverage-gap` target** — canonical entry point.\n\nSibling skills (out of scope; delegate):\n\n- **noyalib-validation-and-qa** — proptest \u002F fuzz \u002F Miri \u002F spec-suite.\n- **noyalib-diagnostics-and-tooling** — llvm-cov flags, cargo-vet \u002F deny.\n- **noyalib-change-control** — ratchet-PR mechanics.\n- **noyalib-ci-and-release** — pre-push gate; shared-workflow\n  caller-permission unioning (memory `feedback_shared_workflow_caller_perms`).\n",{"name":5,"license":15,"metadata":24,"description":7,"allowed-tools":31,"compatibility":32},{"agtmls-owner":12,"agtmls-bundle":25,"agtmls-maturity":26,"agtmls-risk-level":27,"agtmls-writes-files":28,"agtmls-network-access":29,"agtmls-handles-secrets":30,"agtmls-executes-commands":28,"agtmls-requires-human-review":28},"noyalib","project","medium","true","optional","false","Read Glob Grep Write Edit Bash WebFetch WebSearch","Requires cargo, git. Tested with Claude Code, Codex, and Aider skill layouts","main","ecf7dfb9e0505c9584e5838603d8cd9cb0e64efc","packs\u002Fnoyalib\u002Fskills\u002Fnoyalib-coverage-campaign",0,"https:\u002F\u002Fgithub.com\u002Fsebastienrousseau\u002Fagtmls","https:\u002F\u002Fpypi.org\u002Fproject\u002Fagtmls\u002F","https:\u002F\u002Fgithub.com\u002Fsebastienrousseau","https:\u002F\u002Fsebastienrousseau.com","Payments leader, 19 years in banking. I build open-source ISO 20022, post-quantum cryptography and applied AI for finance.","2026-11-09 15:12:45",{"source":8,"skillName":5,"commands":44,"prompt":54,"zipAvailable":55},[45,48,51],{"tool":46,"command":47},"npx","npx skills add sebastienrousseau\u002Fagtmls --skill noyalib-coverage-campaign",{"tool":49,"command":50},"bunx","bunx skills add sebastienrousseau\u002Fagtmls --skill noyalib-coverage-campaign",{"tool":52,"command":53},"pnpm","pnpm dlx skills add sebastienrousseau\u002Fagtmls --skill noyalib-coverage-campaign","安装技能，技能地址：https:\u002F\u002Fgithub.com\u002Fsebastienrousseau\u002Fagtmls\u002Fblob\u002Fmain\u002Fpacks\u002Fnoyalib\u002Fskills\u002Fnoyalib-coverage-campaign\u002FSKILL.md",true,[57,63],{"path":58,"resourceType":59,"resourceTypeDesc":60,"sizeBytes":61,"sourceHtmlUrl":62},"metadata.json","REFERENCE","参考文档",411,"https:\u002F\u002Fgithub.com\u002Fsebastienrousseau\u002Fagtmls\u002Fblob\u002Fmain\u002Fpacks\u002Fnoyalib\u002Fskills\u002Fnoyalib-coverage-campaign\u002Fmetadata.json",{"path":64,"resourceType":59,"resourceTypeDesc":60,"sizeBytes":65,"sourceHtmlUrl":66},"reference.md",17868,"https:\u002F\u002Fgithub.com\u002Fsebastienrousseau\u002Fagtmls\u002Fblob\u002Fmain\u002Fpacks\u002Fnoyalib\u002Fskills\u002Fnoyalib-coverage-campaign\u002Freference.md",[68,75,82,89,96,103],{"skillNo":69,"name":70,"nameZh":6,"description":71,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":15,"licenseFileUrl":6,"sourceHtmlUrl":72,"categories":73,"keywords":74,"publishedAt":19},"01M789BV3SY53CRXRKQXT13DSB","example-skill","Use when the user needs this reusable workflow. Replace this with trigger-rich wording that says when to load the skill, what task it handles, and when not to use it.","https:\u002F\u002Fgithub.com\u002Fsebastienrousseau\u002Fagtmls\u002Fblob\u002Fmain\u002Ftemplates\u002Fskill\u002FSKILL.md",[],[],{"skillNo":76,"name":77,"nameZh":6,"description":78,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":15,"licenseFileUrl":6,"sourceHtmlUrl":79,"categories":80,"keywords":81,"publishedAt":19},"01M789BPMXXTXQPSMDQ06DSV1P","writing-plans","Turn a vague or multi-step request into an ordered list of small steps, each with its own done-condition and verification. Load before starting work that touches several files, has unclear scope, or spans more than one session, and when a request needs decomposing before any code is written. Produces a plan a reviewer can check against, not a to-do list.","https:\u002F\u002Fgithub.com\u002Fsebastienrousseau\u002Fagtmls\u002Fblob\u002Fmain\u002Fskills\u002Fwriting-plans\u002FSKILL.md",[],[],{"skillNo":83,"name":84,"nameZh":6,"description":85,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":15,"licenseFileUrl":6,"sourceHtmlUrl":86,"categories":87,"keywords":88,"publishedAt":19},"01M789BK5BBSDBQENG56CPAEDF","web-research-and-source-triage","Use when gathering current web evidence, comparing sources, triaging credibility, reading GitHub repositories, checking docs, or deciding whether a claim needs live verification.","https:\u002F\u002Fgithub.com\u002Fsebastienrousseau\u002Fagtmls\u002Fblob\u002Fmain\u002Fskills\u002Fweb-research-and-source-triage\u002FSKILL.md",[],[],{"skillNo":90,"name":91,"nameZh":6,"description":92,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":15,"licenseFileUrl":6,"sourceHtmlUrl":93,"categories":94,"keywords":95,"publishedAt":19},"01M789BF76AAKX8MGWA48YFHMX","vetting-a-skill-before-install","Use before installing, importing or enabling a third-party skill, plugin, marketplace or skills repository in Claude Code, Codex, Antigravity, Cursor or any agent. Pins the source to a commit, audits every skill and the agent configuration it ships, reads what the audit could not cover, and ends in install, mirror or refuse. Not for auditing this registry's own skills.","https:\u002F\u002Fgithub.com\u002Fsebastienrousseau\u002Fagtmls\u002Fblob\u002Fmain\u002Fskills\u002Fvetting-a-skill-before-install\u002FSKILL.md",[],[],{"skillNo":97,"name":98,"nameZh":6,"description":99,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":15,"licenseFileUrl":6,"sourceHtmlUrl":100,"categories":101,"keywords":102,"publishedAt":19},"01M789B5SQ8G7RCAJBYZ0CR0R4","verification-before-completion","The gate between doing work and claiming it is done. Load before saying finished, fixed, working, or ready, before marking a task complete, and before reporting an outcome to a human. Converts each claim into the observation that would justify it, and names the rationalizations that let unverified work ship. Not the project's own evidence bar or test taxonomy.","https:\u002F\u002Fgithub.com\u002Fsebastienrousseau\u002Fagtmls\u002Fblob\u002Fmain\u002Fskills\u002Fverification-before-completion\u002FSKILL.md",[],[],{"skillNo":104,"name":105,"nameZh":6,"description":106,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":15,"licenseFileUrl":6,"sourceHtmlUrl":107,"categories":108,"keywords":109,"publishedAt":19},"01M789B1JXCYBRY5P3MWYQBKJ0","using-agtmls","Meta-router for the AgtMLS skill catalog. Read first when unsure which AgtMLS skill applies, when several look relevant, when asking 'is there a skill for porting or noyalib work', or when onboarding to how the hub's skills and shared references fit together.","https:\u002F\u002Fgithub.com\u002Fsebastienrousseau\u002Fagtmls\u002Fblob\u002Fmain\u002Fskills\u002Fusing-agtmls\u002FSKILL.md",[],[]]