[{"data":1,"prerenderedAt":-1},["ShallowReactive",2],{"skill:01M7DE4JTJ2K5TZ2YW1WF5FQCF":3,"skill-same:01M7DE4JTJ2K5TZ2YW1WF5FQCF":50},{"skillNo":4,"name":5,"nameZh":6,"description":6,"descriptionZh":6,"repositoryFullName":7,"ownerLogin":8,"ownerAvatarUrl":9,"ownerAccountNo":10,"ownerDisplayName":8,"repositoryNo":11,"starsCount":12,"licenseSpdxId":13,"licenseFileUrl":6,"sourceHtmlUrl":14,"categories":15,"keywords":16,"publishedAt":17,"linkOnly":18,"markdownContent":19,"markdownBody":20,"frontMatter":21,"refName":22,"commitSha":23,"skillDirectory":24,"forksCount":12,"repositoryHtmlUrl":25,"repositoryHomepageUrl":26,"ownerHtmlUrl":27,"ownerBlogUrl":25,"ownerDescription":28,"updatedAt":29,"install":30,"resources":43},"01M7DE4JTJ2K5TZ2YW1WF5FQCF","coverage-ratchet",null,"choliba\u002Fcholiba","choliba","https:\u002F\u002Favatars.githubusercontent.com\u002Fu\u002F338821208?v=4","01M7DE3KHNAJBVRZJ3HVHWYRY0","01M7DE3KJQKW94AMEY9HE4N03T",0,"MIT","https:\u002F\u002Fgithub.com\u002Fcholiba\u002Fcholiba\u002Fblob\u002Fmaster\u002F.agents\u002Fskills\u002Fcoverage-ratchet\u002FSKILL.md",[],[],"2026-11-15 14:19:17",false,"---\nname: coverage-ratchet\ndescription: Explains and safely operates choliba's coverage ratchet (thresholds that only go up): jest\u002Fjest.coverage.config.json, COVERAGE.md, the shields badge, coverage exclusions and the Jest globalTeardown. Use when coverage fails or drops, when asked to change a threshold or exclude a file from coverage, when COVERAGE.md or the badge looks wrong, when setting up coverage in CI, or when someone asks why the numbers can't go down.\nargument-hint: 'The coverage failure, or the threshold\u002Fexclusion change being considered.'\nuser-invocable: true\ndisable-model-invocation: false\n---\n\n# Coverage ratchet\n\nCoverage in choliba cannot regress silently. Thresholds live in `jest\u002Fjest.coverage.config.json` (tracked in git) and\nrise automatically to whatever a passing run reaches; Jest fails any run that falls below them.\n\n## The loop, in five lines\n\n1. `bun run test:cov` runs Jest with `--coverage`; plain `bun run test` skips all of this.\n2. Jest compares the run with `coverageThreshold.global` and fails on any metric below it.\n3. On a run that met every threshold, `jest\u002Fjest.teardown.config.ts` raises each threshold to\n   `max(current, actual)`, metric by metric. It never lowers one.\n4. The same teardown updates `COVERAGE.md` (per-file table) and `.github\u002Fbadges\u002Fcoverage.json` (badge), but only when\n   coverage actually changed (the generation time does not count), so running the tests leaves the tree clean.\n5. A run that failed a threshold leaves those files alone, so they always show the last good state.\n\nCommit `jest\u002Fjest.coverage.config.json`, `COVERAGE.md` and `.github\u002Fbadges\u002F`. Do not edit `COVERAGE.md` by hand.\n\n## When coverage fails\n\nThe fix is a test, not a number. Read the failing file in `coverage\u002Fcoverage.txt` or `COVERAGE.md`, find the\nuncovered branch or failure path, and write a spec that exercises it through real behavior. Do not write tests\nthat only execute declarations to inflate a percentage; they raise the threshold without protecting anything, and\nthe ratchet then locks that hollow number in.\n\n## Things that need the user's explicit say-so\n\n- **Lowering a threshold** in `jest\u002Fjest.coverage.config.json`. The whole point is that this is deliberate and visible.\n  Suggest it only when a real, understood reason exists, and edit only the metric they name.\n- **Adding to `collectCoverageFrom` exclusions** in `jest\u002Fjest.coverage.config.json`. Today it excludes specs and the\n  whole `__tests__\u002F` folder (test code and helpers), `.d.ts`, `main.ts` (wiring-only entrypoints),\n  `*.interface.ts` and `*.types.ts` (no executable code), and `index.ts` (a folder's public face: re-exports only,\n  the logic lives in the files it names). Excluding a file that holds logic hides exactly what the ratchet\n  protects. If a file is hard to cover, that is usually a design signal: move the logic into a testable module\n  and keep the excluded file thin.\n\n## Design decisions\n\nThe thresholds started at 0 and the ratchet raised them to whatever the code reached; no number was carried over\nfrom anywhere else. A few deliberate choices (failed runs do not overwrite the report, the report is rewritten only\nwhen coverage really changed, typed parsing instead of `any`, the `esbuild-register` config loader instead of\nts-node) are explained in `references\u002Fdetails.md`, along with the optional CI step that commits a raised threshold\nback to a PR branch. Read it before editing the teardown script or setting up CI.\n\n## Related\n\n`quality-gates` for the full `check` pipeline, `add-workspace-package` when a new package needs coverage from\nits first commit (it does automatically: `packages\u002F*\u002Fsrc` and `apps\u002F*\u002Fsrc` are collected).\n","# Coverage ratchet\n\nCoverage in choliba cannot regress silently. Thresholds live in `jest\u002Fjest.coverage.config.json` (tracked in git) and\nrise automatically to whatever a passing run reaches; Jest fails any run that falls below them.\n\n## The loop, in five lines\n\n1. `bun run test:cov` runs Jest with `--coverage`; plain `bun run test` skips all of this.\n2. Jest compares the run with `coverageThreshold.global` and fails on any metric below it.\n3. On a run that met every threshold, `jest\u002Fjest.teardown.config.ts` raises each threshold to\n   `max(current, actual)`, metric by metric. It never lowers one.\n4. The same teardown updates `COVERAGE.md` (per-file table) and `.github\u002Fbadges\u002Fcoverage.json` (badge), but only when\n   coverage actually changed (the generation time does not count), so running the tests leaves the tree clean.\n5. A run that failed a threshold leaves those files alone, so they always show the last good state.\n\nCommit `jest\u002Fjest.coverage.config.json`, `COVERAGE.md` and `.github\u002Fbadges\u002F`. Do not edit `COVERAGE.md` by hand.\n\n## When coverage fails\n\nThe fix is a test, not a number. Read the failing file in `coverage\u002Fcoverage.txt` or `COVERAGE.md`, find the\nuncovered branch or failure path, and write a spec that exercises it through real behavior. Do not write tests\nthat only execute declarations to inflate a percentage; they raise the threshold without protecting anything, and\nthe ratchet then locks that hollow number in.\n\n## Things that need the user's explicit say-so\n\n- **Lowering a threshold** in `jest\u002Fjest.coverage.config.json`. The whole point is that this is deliberate and visible.\n  Suggest it only when a real, understood reason exists, and edit only the metric they name.\n- **Adding to `collectCoverageFrom` exclusions** in `jest\u002Fjest.coverage.config.json`. Today it excludes specs and the\n  whole `__tests__\u002F` folder (test code and helpers), `.d.ts`, `main.ts` (wiring-only entrypoints),\n  `*.interface.ts` and `*.types.ts` (no executable code), and `index.ts` (a folder's public face: re-exports only,\n  the logic lives in the files it names). Excluding a file that holds logic hides exactly what the ratchet\n  protects. If a file is hard to cover, that is usually a design signal: move the logic into a testable module\n  and keep the excluded file thin.\n\n## Design decisions\n\nThe thresholds started at 0 and the ratchet raised them to whatever the code reached; no number was carried over\nfrom anywhere else. A few deliberate choices (failed runs do not overwrite the report, the report is rewritten only\nwhen coverage really changed, typed parsing instead of `any`, the `esbuild-register` config loader instead of\nts-node) are explained in `references\u002Fdetails.md`, along with the optional CI step that commits a raised threshold\nback to a PR branch. Read it before editing the teardown script or setting up CI.\n\n## Related\n\n`quality-gates` for the full `check` pipeline, `add-workspace-package` when a new package needs coverage from\nits first commit (it does automatically: `packages\u002F*\u002Fsrc` and `apps\u002F*\u002Fsrc` are collected).\n",{},"master","f87255e7db440871b20678ad28b99f8f8f97713b",".agents\u002Fskills\u002Fcoverage-ratchet","https:\u002F\u002Fgithub.com\u002Fcholiba\u002Fcholiba","https:\u002F\u002Fcholiba.github.io\u002F","https:\u002F\u002Fgithub.com\u002Fcholiba","Observe com atenção. Aja com precisão. Deixe evidências. · Testes E2E multiprojeto com Playwright, operados por agentes. ","2026-10-25 06:45:16",{"source":7,"skillName":5,"commands":31,"prompt":41,"zipAvailable":42},[32,35,38],{"tool":33,"command":34},"npx","npx skills add choliba\u002Fcholiba --skill coverage-ratchet",{"tool":36,"command":37},"bunx","bunx skills add choliba\u002Fcholiba --skill coverage-ratchet",{"tool":39,"command":40},"pnpm","pnpm dlx skills add choliba\u002Fcholiba --skill coverage-ratchet","安装技能，技能地址：https:\u002F\u002Fgithub.com\u002Fcholiba\u002Fcholiba\u002Fblob\u002Fmaster\u002F.agents\u002Fskills\u002Fcoverage-ratchet\u002FSKILL.md",true,[44],{"path":45,"resourceType":46,"resourceTypeDesc":47,"sizeBytes":48,"sourceHtmlUrl":49},"references\u002Fdetails.md","REFERENCE","参考文档",6615,"https:\u002F\u002Fgithub.com\u002Fcholiba\u002Fcholiba\u002Fblob\u002Fmaster\u002F.agents\u002Fskills\u002Fcoverage-ratchet\u002Freferences\u002Fdetails.md",[51,58,63,70,77,84],{"skillNo":52,"name":53,"nameZh":6,"description":54,"descriptionZh":6,"repositoryFullName":7,"ownerLogin":8,"ownerAvatarUrl":9,"ownerAccountNo":10,"ownerDisplayName":8,"repositoryNo":11,"starsCount":12,"licenseSpdxId":13,"licenseFileUrl":6,"sourceHtmlUrl":55,"categories":56,"keywords":57,"publishedAt":17},"01M7DE5ZNQN6XDSJ7R5321P71X","dummy-skill","Skill de teste, usada pelo agente echo das fixtures.","https:\u002F\u002Fgithub.com\u002Fcholiba\u002Fcholiba\u002Fblob\u002Fmaster\u002Fpackages\u002Fengine\u002Fsrc\u002F__tests__\u002Ffixtures\u002Fskills\u002Fdummy-skill\u002FSKILL.md",[],[],{"skillNo":59,"name":53,"nameZh":6,"description":54,"descriptionZh":6,"repositoryFullName":7,"ownerLogin":8,"ownerAvatarUrl":9,"ownerAccountNo":10,"ownerDisplayName":8,"repositoryNo":11,"starsCount":12,"licenseSpdxId":13,"licenseFileUrl":6,"sourceHtmlUrl":60,"categories":61,"keywords":62,"publishedAt":17},"01M7DE5Y9NV84DZ74RY0GS707V","https:\u002F\u002Fgithub.com\u002Fcholiba\u002Fcholiba\u002Fblob\u002Fmaster\u002Fpackages\u002Fcholiba\u002Fsrc\u002F__tests__\u002Ffixtures\u002Fskills\u002Fdummy-skill\u002FSKILL.md",[],[],{"skillNo":64,"name":65,"nameZh":6,"description":66,"descriptionZh":6,"repositoryFullName":7,"ownerLogin":8,"ownerAvatarUrl":9,"ownerAccountNo":10,"ownerDisplayName":8,"repositoryNo":11,"starsCount":12,"licenseSpdxId":13,"licenseFileUrl":6,"sourceHtmlUrl":67,"categories":68,"keywords":69,"publishedAt":17},"01M7DE5TNY8A3A32S7NDAPT355","playwright-trace","Inspect Playwright trace files from the command line — list actions, view requests, console, errors, snapshots and screenshots.","https:\u002F\u002Fgithub.com\u002Fcholiba\u002Fcholiba\u002Fblob\u002Fmaster\u002F.choliba\u002Fskills\u002Fplaywright-trace\u002FSKILL.md",[],[],{"skillNo":71,"name":72,"nameZh":6,"description":73,"descriptionZh":6,"repositoryFullName":7,"ownerLogin":8,"ownerAvatarUrl":9,"ownerAccountNo":10,"ownerDisplayName":8,"repositoryNo":11,"starsCount":12,"licenseSpdxId":13,"licenseFileUrl":6,"sourceHtmlUrl":74,"categories":75,"keywords":76,"publishedAt":17},"01M7DE5NVA52PVZCK0N85VGAZH","playwright-component-testing","Set up component testing with Playwright using a story gallery — scaffold stories and a gallery dev page driven by the built-in mount fixture, no dedicated component-testing runtime. Use when asked to test React or Vue components in isolation with Playwright, or to migrate off @playwright\u002Fexperimental-ct-react \u002F -vue.","https:\u002F\u002Fgithub.com\u002Fcholiba\u002Fcholiba\u002Fblob\u002Fmaster\u002F.choliba\u002Fskills\u002Fplaywright-component-testing\u002FSKILL.md",[],[],{"skillNo":78,"name":79,"nameZh":6,"description":80,"descriptionZh":6,"repositoryFullName":7,"ownerLogin":8,"ownerAvatarUrl":9,"ownerAccountNo":10,"ownerDisplayName":8,"repositoryNo":11,"starsCount":12,"licenseSpdxId":13,"licenseFileUrl":6,"sourceHtmlUrl":81,"categories":82,"keywords":83,"publishedAt":17},"01M7DE5J3XRSREJV0YENFWSM3T","playwright-cli","Automate browser interactions, test web pages and work with Playwright tests.","https:\u002F\u002Fgithub.com\u002Fcholiba\u002Fcholiba\u002Fblob\u002Fmaster\u002F.choliba\u002Fskills\u002Fplaywright-cli\u002FSKILL.md",[],[],{"skillNo":85,"name":86,"nameZh":6,"description":6,"descriptionZh":6,"repositoryFullName":7,"ownerLogin":8,"ownerAvatarUrl":9,"ownerAccountNo":10,"ownerDisplayName":8,"repositoryNo":11,"starsCount":12,"licenseSpdxId":13,"licenseFileUrl":6,"sourceHtmlUrl":87,"categories":88,"keywords":89,"publishedAt":17},"01M7DE5G496VD7W01VRYWXSJ12","quality-gates","https:\u002F\u002Fgithub.com\u002Fcholiba\u002Fcholiba\u002Fblob\u002Fmaster\u002F.agents\u002Fskills\u002Fquality-gates\u002FSKILL.md",[],[]]