跳至正文
OpenAgentSkill
浏览已开放 · 目录记录日期 2026-11-21 · 自动更新和账户服务暂时关闭。
其他技能

coverage-redo

Re-audit and reconcile a repo that was already onboarded with an OLDER version of this kit, and apply every kit update since. Use when a repo already has a coverage-manifest.yml, generated tests, and a report, and you want to redo/re-run/recheck/reconcile/upgrade/migrate it against the current rules, or to pull in new kit features (latent-bug backlog, vendored-path scoping, baseline scope_lines, dated reports, structured carve-outs): works out the version delta from MIGRATIONS.md and applies it, re-sweeps to spot misclassifications (false exclusions such as DbContext-injected services wrongly frozen, mixed folders collapsed to one glob), corrects the manifest in place, migrates it to the current schema, generates tests only for the newly-found gaps while keeping existing tests intact, and writes a fresh report. Triggers: 'the new dotnet-coverage-kit has new updates, review and apply it to this repo', 'apply the kit updates to this repo', 'the kit was updated', 'upgrade the kit here', '

livlign · 已有静态检查记录

安装与使用

运行命令前先阅读来源与依赖说明。复制命令不会自动安装或执行。

npx skills add livlign/claude-skills --skill coverage-redo

技能说明


name: coverage-redo description: "Re-audit and reconcile a repo that was already onboarded with an OLDER version of this kit, and apply every kit update since. Use when a repo already has a coverage-manifest.yml, generated tests, and a report, and you want to redo/re-run/recheck/reconcile/upgrade/migrate it against the current rules, or to pull in new kit features (latent-bug backlog, vendored-path scoping, baseline scope_lines, dated reports, structured carve-outs): works out the version delta from MIGRATIONS.md and applies it, re-sweeps to spot misclassifications (false exclusions such as DbContext-injected services wrongly frozen, mixed folders collapsed to one glob), corrects the manifest in place, migrates it to the current schema, generates tests only for the newly-found gaps while keeping existing tests intact, and writes a fresh report. Triggers: 'the new dotnet-coverage-kit has new updates, review and apply it to this repo', 'apply the kit updates to this repo', 'the kit was updated', 'upgrade the kit here', 'redo coverage', 're-run coverage-init', 'recheck the manifest', 'reconcile coverage', 'upgrade the manifest', 'fix an old manifest', 'the manifest is from v1'."

coverage-redo

Reconcile a repo that an EARLIER kit version already onboarded. It re-runs the classification against today's rules, corrects the existing manifest rather than replacing it, migrates it to the current schema, fills only the gaps in test coverage, and regenerates the report. It is the idempotent successor to coverage-init for repos that already have a manifest, tests, and a report.

It is also the kit-upgrade entry point. "The kit has new updates, review and apply them to this repo" is this skill, run as a version delta: step 1 works out which kit changes this repo has not picked up (from MIGRATIONS.md) and the rest of the steps apply them. There is no separate upgrade command and no per-feature request to make: every change since the repo's recorded kit_version: is in scope for one run.

Use coverage-init instead when there is NO manifest yet (greenfield). Use this skill when a manifest exists and may be stale, because the classification rules have improved since it was written (for example: a constructor-injected DbContext is now a testable seam, not an integration-scope exclusion; mixed files must be per-file structured carve-outs, not one folder glob).

Non-negotiables

These are what make a redo safe to run on a live repo:

  1. Existing tests are kept intact and reused. Never delete, rewrite, or "regenerate" a test that already exists and passes. The backfill only ADDS tests for spots that are newly in scope and not already covered. A reclassification that would orphan an existing test is reported for a human to resolve, never actioned by deleting the test.
  2. Correct the manifest, do not rewrite it. Preserve the human-curated content: the baseline, the gate thresholds, intentional gray-zone exclusions, and every carve-out that is still valid. Produce a reviewable DIFF of changes with a reason each, not a fresh file.
  3. Migrate the schema. Convert legacy CARVE-OUT: prose to structured carve_outs:, split any carve-out-bearing folder glob or multi-file pattern into per-file entries (the gate warns on these), and recategorize stale cannot_test entries to the canonical natures, adding the now-required mitigation.
  4. Never silently move the ratchet. Bringing newly-found testable code into scope grows the Adjusted denominator and can lower the recorded coverage. The re-baseline decision is explicit and human-gated (step 8). Lowering the floor is a reviewed change, never automatic.
  5. Stop for human confirmation of the corrected manifest BEFORE generating any test (step 6). Generating tests off an unreviewed reclassification is exactly the mistake this skill exists to fix.

Preconditions

Same as coverage-init: run on the production branch (master), fast-forwarded to the remote, with a clean working tree. Additionally:

  • A manifest must already exist at .claude/coverage/refs/coverage-manifest.yml. If not, stop and tell the user to run coverage-init instead.
  • The existing suite must be green. Run it first. A reconciliation built on a red suite is untrustworthy, and you cannot tell a real gap from a pre-existing failure. If red, stop and report the failures.
  • Refresh the installed kit files. Copy the current scripts/ (coverage-gate.py, run-coverage.sh, report.sh) and templates/coverage.runsettings into .claude/coverage/tools/ and refs/ if they differ from the kit, so the gate and report use the corrected logic. Do not touch the repo-owned coverage-manifest.yml or unit-testing.md here; those are reconciled in step 5.

Steps

  1. Detect the prior state and compute the kit-version delta. Record what exists: the manifest (and any schema_version), the test projects and roughly how many tests, the last report, and whether the manifest uses legacy prose CARVE-OUT: (a v1 signal) or an exclusion that is a folder glob carrying carve-outs (an ambiguity the current gate flags).

    Then build the delta, which is what makes "apply the new kit updates" a bounded run. Start with the deterministic check (coverage-gate.py --manifest <manifest> --print-kit-drift, which prints <current|behind|unstamped|ahead> <manifest stamp> <kit semver>), then:

    • Read the repo's kit_version: from the top of the manifest. Absent means the repo predates the stamp: walk every entry in MIGRATIONS.md.
    • Read the current kit version from ${CLAUDE_PLUGIN_ROOT}/../../.claude-plugin/marketplace.json (the dotnet-coverage-kit entry). If it equals the manifest's stamp, still run each entry's Detect check once: a stamp only records what was applied, and a hand-edited manifest can have drifted.
    • Walk `${CLAUDE_PLUGIN_ROOT}/MIGRAT
阅读完整来源 ↗