{"_id":"@andypai/harness-doctor","_rev":"5-d005a25b73c3e3d4869b5a7f5550766f","name":"@andypai/harness-doctor","dist-tags":{"latest":"2.0.0"},"versions":{"0.1.0":{"name":"@andypai/harness-doctor","version":"0.1.0","keywords":["agents","agents-md","ai-agents","diagnostics","docs-contract","documentation","harness","readiness","scanner","supply-chain","typescript"],"author":{"name":"Aiden Bai"},"license":"MIT","_id":"@andypai/harness-doctor@0.1.0","maintainers":[{"name":"andypai.me","email":"andy@r2pi.co"}],"homepage":"https://github.com/abpai/harness-doctor#readme","bugs":{"url":"https://github.com/abpai/harness-doctor/issues"},"bin":{"harness-doctor":"bin/harness-doctor.js"},"dist":{"shasum":"a64eba91a15a62dc4c559e6f1a314ad0c1af135c","tarball":"https://registry.npmjs.org/@andypai/harness-doctor/-/harness-doctor-0.1.0.tgz","fileCount":10,"integrity":"sha512-ke/4OhZEjw8ZKEsa33/MTd5G+xtzJ1fE16IEEtHb9w2ivyJwxjMb7xY47mIxFUol1z9qB1db2btqCmRFxvWk6Q==","signatures":[{"sig":"MEYCIQDGlKyjaASlik2sAhM0f8KtxYbcwbzASU4xVTGwOIOwHQIhANUnFQwqwqPTWZqSc4uVLrpXMZWH1yAZtGJxVjnV1hh8","keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U"}],"unpackedSize":921830},"type":"module","_from":"file:andypai-harness-doctor-0.1.0.tgz","engines":{"node":"^20.19.0 || >=22.12.0"},"exports":{".":{"types":"./dist/cli.d.ts","default":"./dist/cli.js"},"./api":{"types":"./dist/index.d.ts","default":"./dist/index.js"}},"scripts":{"dev":"vp pack --watch","test":"vp test run","build":"node -e \"require('node:fs').rmSync('dist', { recursive: true, force: true })\" && cross-env NODE_ENV=production vp pack","typecheck":"tsc --noEmit"},"_npmUser":{"name":"andypai.me","email":"andy@r2pi.co"},"_resolved":"/private/var/folders/zj/c10d515j4lz3hq26nmc156c00000gn/T/2206e64d730777367b3dd997220dff5a/andypai-harness-doctor-0.1.0.tgz","_integrity":"sha512-ke/4OhZEjw8ZKEsa33/MTd5G+xtzJ1fE16IEEtHb9w2ivyJwxjMb7xY47mIxFUol1z9qB1db2btqCmRFxvWk6Q==","repository":{"url":"git+https://github.com/abpai/harness-doctor.git","type":"git","directory":"packages/harness-doctor"},"_npmVersion":"11.9.0","description":"Scan a repo's agent-harness readiness: the docs contract (AGENTS.md, docs/ system of record, spec contract), supply-chain hardening, and dead code — with readiness scoring, diff mode, and a GitHub action","directories":{},"sideEffects":false,"_nodeVersion":"24.14.0","dependencies":{"conf":"^15.1.0","jiti":"^2.7.0","effect":"4.0.0-beta.70","confbox":"^0.2.4","prompts":"^2.4.2","magicast":"^0.5.3","deslop-js":"^0.0.15","typescript":">=5.0.4 <7","@sentry/node":"^10.54.0","agent-install":"0.0.5","@babel/code-frame":"^7.29.0","@effect/platform-node-shared":"4.0.0-beta.70"},"publishConfig":{"access":"public"},"_hasShrinkwrap":false,"devDependencies":{"ora":"^9.4.0","commander":"^14.0.3","@types/prompts":"^2.4.9","@xterm/headless":"^6.0.0","@harness-doctor/api":"0.1.0","@harness-doctor/core":"0.1.0","@types/babel__code-frame":"^7.27.0"},"_npmOperationalInternal":{"tmp":"tmp/harness-doctor_0.1.0_1781112092295_0.6931827569285707","host":"s3://npm-registry-packages-npm-production"}},"0.2.0":{"name":"@andypai/harness-doctor","version":"0.2.0","keywords":["agents","agents-md","ai-agents","diagnostics","docs-contract","documentation","harness","readiness","scanner","supply-chain","typescript"],"author":{"name":"Andy Pai"},"license":"MIT","_id":"@andypai/harness-doctor@0.2.0","maintainers":[{"name":"andypai.me","email":"andy@r2pi.co"}],"homepage":"https://github.com/abpai/harness-doctor#readme","bugs":{"url":"https://github.com/abpai/harness-doctor/issues"},"bin":{"harness-doctor":"bin/harness-doctor.js"},"dist":{"shasum":"da473a077c4cd308a088a1dce2f1fc494d180e9a","tarball":"https://registry.npmjs.org/@andypai/harness-doctor/-/harness-doctor-0.2.0.tgz","fileCount":10,"integrity":"sha512-0raX/zIMPYeUMsvoB5L96cx+Mu3aacD6gzvUz0DSY8ohyuHPIJMjtsUegKWKXCJs4FFCWTGCEo92rF8oA2APyg==","signatures":[{"sig":"MEYCIQCAxAgLbhnM7Hy6OYBdB/YIljYqxdUm+uDjo6trWdJhAQIhANMzymOkNl+USGmVJYG4HUZFBPn+0pwiCTDmjy1yIDJE","keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U"}],"attestations":{"url":"https://registry.npmjs.org/-/npm/v1/attestations/@andypai%2fharness-doctor@0.2.0","provenance":{"predicateType":"https://slsa.dev/provenance/v1"}},"unpackedSize":885868},"type":"module","_from":"file:andypai-harness-doctor-0.2.0.tgz","engines":{"node":"^20.19.0 || >=22.12.0"},"exports":{".":{"types":"./dist/cli.d.ts","default":"./dist/cli.js"},"./api":{"types":"./dist/index.d.ts","default":"./dist/index.js"}},"scripts":{"dev":"vp pack --watch","test":"vp test run","build":"node -e \"require('node:fs').rmSync('dist', { recursive: true, force: true })\" && cross-env NODE_ENV=production vp pack","typecheck":"tsc --noEmit"},"_npmUser":{"name":"GitHub Actions","email":"npm-oidc-no-reply@github.com","trustedPublisher":{"id":"github","oidcConfigId":"oidc:7e5dec34-c7e2-4b1a-b47c-cecd756a45c5"}},"_resolved":"/tmp/51ad12867d227a01f152c65792d370dd/andypai-harness-doctor-0.2.0.tgz","_integrity":"sha512-0raX/zIMPYeUMsvoB5L96cx+Mu3aacD6gzvUz0DSY8ohyuHPIJMjtsUegKWKXCJs4FFCWTGCEo92rF8oA2APyg==","repository":{"url":"git+https://github.com/abpai/harness-doctor.git","type":"git","directory":"packages/harness-doctor"},"_npmVersion":"11.16.0","description":"Scan a repo's agent-harness readiness: the docs contract (AGENTS.md, docs/ system of record, spec contract), supply-chain hardening, and dead code — with readiness scoring, diff mode, and a GitHub action","directories":{},"sideEffects":false,"_nodeVersion":"24.16.0","dependencies":{"conf":"^15.1.0","jiti":"^2.7.0","effect":"4.0.0-beta.70","confbox":"^0.2.4","prompts":"^2.4.2","magicast":"^0.5.3","deslop-js":"^0.0.15","typescript":">=5.0.4 <7","agent-install":"0.0.5","@babel/code-frame":"^7.29.0","@effect/platform-node-shared":"4.0.0-beta.70"},"publishConfig":{"access":"public"},"_hasShrinkwrap":false,"devDependencies":{"ora":"^9.4.0","commander":"^14.0.3","@types/prompts":"^2.4.9","@xterm/headless":"^6.0.0","@harness-doctor/api":"0.2.0","@harness-doctor/core":"0.2.0","@types/babel__code-frame":"^7.27.0"},"_npmOperationalInternal":{"tmp":"tmp/harness-doctor_0.2.0_1781121127205_0.6537603345252794","host":"s3://npm-registry-packages-npm-production"}},"0.3.0":{"name":"@andypai/harness-doctor","version":"0.3.0","keywords":["agents","agents-md","ai-agents","diagnostics","docs-contract","documentation","harness","readiness","scanner","supply-chain","typescript"],"author":{"name":"Andy Pai"},"license":"MIT","_id":"@andypai/harness-doctor@0.3.0","maintainers":[{"name":"andypai.me","email":"andy@r2pi.co"}],"homepage":"https://github.com/abpai/harness-doctor#readme","bugs":{"url":"https://github.com/abpai/harness-doctor/issues"},"bin":{"harness-doctor":"bin/harness-doctor.js"},"dist":{"shasum":"34063ff63cce87c2a7555bba35120bafe6ad0635","tarball":"https://registry.npmjs.org/@andypai/harness-doctor/-/harness-doctor-0.3.0.tgz","fileCount":10,"integrity":"sha512-DaYNDjqm60Bs3gJo2i2fmWcEB0zdmkDXsZA1rqeoV1Q5I1n1ddPx2MYw9bTsRVKnIFLq5aLuvGsnM5P5AL99zA==","signatures":[{"sig":"MEUCIH8Mag9USUKx9zkl5WeUwfO+sajTfYoRu467SBlf7g2PAiEA2H3sTuKk+iajCA6IgIsQ90FXquQb7+8bhwz28XhRxws=","keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U"}],"attestations":{"url":"https://registry.npmjs.org/-/npm/v1/attestations/@andypai%2fharness-doctor@0.3.0","provenance":{"predicateType":"https://slsa.dev/provenance/v1"}},"unpackedSize":951814},"type":"module","_from":"file:andypai-harness-doctor-0.3.0.tgz","engines":{"node":"^20.19.0 || >=22.12.0"},"exports":{".":{"types":"./dist/cli.d.ts","default":"./dist/cli.js"},"./api":{"types":"./dist/index.d.ts","default":"./dist/index.js"}},"scripts":{"dev":"vp pack --watch","test":"vp test run","build":"node -e \"require('node:fs').rmSync('dist', { recursive: true, force: true })\" && cross-env NODE_ENV=production vp pack","typecheck":"tsc --noEmit"},"_npmUser":{"name":"GitHub Actions","email":"npm-oidc-no-reply@github.com","trustedPublisher":{"id":"github","oidcConfigId":"oidc:7e5dec34-c7e2-4b1a-b47c-cecd756a45c5"}},"_resolved":"/tmp/8abb68d9ac8a56ebf9292d6c43954b1e/andypai-harness-doctor-0.3.0.tgz","_integrity":"sha512-DaYNDjqm60Bs3gJo2i2fmWcEB0zdmkDXsZA1rqeoV1Q5I1n1ddPx2MYw9bTsRVKnIFLq5aLuvGsnM5P5AL99zA==","repository":{"url":"git+https://github.com/abpai/harness-doctor.git","type":"git","directory":"packages/harness-doctor"},"_npmVersion":"11.18.0","description":"Scan a repo's agent-harness readiness: the docs contract (AGENTS.md, docs/ system of record, spec contract), supply-chain hardening, and dead code — with readiness scoring, diff mode, and a GitHub action","directories":{},"sideEffects":false,"_nodeVersion":"24.18.0","dependencies":{"conf":"^15.1.0","jiti":"^2.7.0","effect":"4.0.0-beta.70","confbox":"^0.2.4","prompts":"^2.4.2","magicast":"^0.5.3","deslop-js":"^0.0.15","typescript":">=5.0.4 <7","agent-install":"0.0.5","@babel/code-frame":"^7.29.0","@effect/platform-node-shared":"4.0.0-beta.70"},"publishConfig":{"access":"public"},"_hasShrinkwrap":false,"devDependencies":{"ora":"^9.4.0","commander":"^14.0.3","@types/prompts":"^2.4.9","@xterm/headless":"^6.0.0","@harness-doctor/api":"0.2.0","@harness-doctor/core":"0.2.0","@types/babel__code-frame":"^7.27.0"},"_npmOperationalInternal":{"tmp":"tmp/harness-doctor_0.3.0_1783389345328_0.9311377789894073","host":"s3://npm-registry-packages-npm-production"}},"1.0.0":{"name":"@andypai/harness-doctor","version":"1.0.0","keywords":["agents","agents-md","ai-agents","diagnostics","docs-contract","documentation","harness","readiness","scanner","supply-chain","typescript"],"author":{"name":"Andy Pai"},"license":"MIT","_id":"@andypai/harness-doctor@1.0.0","maintainers":[{"name":"andypai.me","email":"andy@r2pi.co"}],"homepage":"https://github.com/abpai/harness-doctor#readme","bugs":{"url":"https://github.com/abpai/harness-doctor/issues"},"bin":{"harness-doctor":"bin/harness-doctor.js"},"dist":{"shasum":"7212473b5255c0174c8a9cb38213f67090027154","tarball":"https://registry.npmjs.org/@andypai/harness-doctor/-/harness-doctor-1.0.0.tgz","fileCount":9,"integrity":"sha512-dMD1dHJzCh5xh44YPSK2coY65wjl205QJBoLG0kqkKO3fpLPgmUqk44ku2HhnA7NaAbtORhejOmoJbbBEeGvSA==","signatures":[{"sig":"MEQCIBrHw+jHt3CqMwIyygNwnDF7OKnSPU/2IZ2F4mFPw19vAiBxww5c7qcVZOydpi8Czzso1WyqAOFom/TGKPHmaU7ZKg==","keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U"}],"attestations":{"url":"https://registry.npmjs.org/-/npm/v1/attestations/@andypai%2fharness-doctor@1.0.0","provenance":{"predicateType":"https://slsa.dev/provenance/v1"}},"unpackedSize":1005075},"type":"module","engines":{"bun":">=1.3.14"},"exports":{".":{"types":"./dist/cli.d.ts","default":"./dist/cli.js"},"./api":{"types":"./dist/index.d.ts","default":"./dist/index.js"}},"gitHead":"a65d6e77ee804cda83d6d39c48e804657b51d28e","scripts":{"dev":"vp pack --watch","test":"vp test run","build":"bun -e \"require('node:fs').rmSync('dist', { recursive: true, force: true })\" && cross-env NODE_ENV=production vp pack","typecheck":"tsc --noEmit"},"_npmUser":{"name":"GitHub Actions","email":"npm-oidc-no-reply@github.com","trustedPublisher":{"id":"github","oidcConfigId":"oidc:7e5dec34-c7e2-4b1a-b47c-cecd756a45c5"}},"repository":{"url":"git+https://github.com/abpai/harness-doctor.git","type":"git","directory":"packages/harness-doctor"},"_npmVersion":"12.0.1","description":"Scan a repo's agent-harness readiness: the docs contract (AGENTS.md, docs/ system of record, spec contract), supply-chain hardening, and dead code — with readiness scoring, diff mode, and a GitHub action","directories":{},"sideEffects":false,"_nodeVersion":"24.3.0","dependencies":{"conf":"^15.1.0","jiti":"^2.7.0","effect":"4.0.0-beta.70","confbox":"^0.2.4","prompts":"^2.4.2","magicast":"^0.5.3","deslop-js":"^0.0.15","typescript":">=5.0.4 <7","agent-install":"0.0.5","@babel/code-frame":"^7.29.0","@effect/platform-bun":"4.0.0-beta.70","is-unicode-supported":"^2.1.0"},"publishConfig":{"access":"public"},"_hasShrinkwrap":false,"devDependencies":{"ora":"^9.4.0","commander":"^14.0.3","@types/prompts":"^2.4.9","@xterm/headless":"^6.0.0","@harness-doctor/api":"workspace:*","@harness-doctor/core":"workspace:*","@types/babel__code-frame":"^7.27.0"},"_npmOperationalInternal":{"tmp":"tmp/harness-doctor_1.0.0_1783902871576_0.36621265539820747","host":"s3://npm-registry-packages-npm-production"}},"2.0.0":{"name":"@andypai/harness-doctor","version":"2.0.0","description":"Scan a repo's agent-harness readiness: the docs contract (AGENTS.md, docs/ system of record, spec contract), supply-chain hardening, and dead code — with readiness scoring, diff mode, and a GitHub action","keywords":["agents","agents-md","ai-agents","diagnostics","docs-contract","documentation","harness","readiness","scanner","supply-chain","typescript"],"homepage":"https://github.com/abpai/harness-doctor#readme","bugs":{"url":"https://github.com/abpai/harness-doctor/issues"},"license":"MIT","author":{"name":"Andy Pai"},"repository":{"type":"git","url":"git+https://github.com/abpai/harness-doctor.git","directory":"packages/harness-doctor"},"bin":{"harness-doctor":"bin/harness-doctor.js"},"type":"module","sideEffects":false,"exports":{".":{"types":"./dist/cli.d.ts","default":"./dist/cli.js"},"./api":{"types":"./dist/index.d.ts","default":"./dist/index.js"}},"publishConfig":{"access":"public"},"scripts":{"dev":"vp pack --watch","build":"bun -e \"require('node:fs').rmSync('dist', { recursive: true, force: true })\" && cross-env NODE_ENV=production vp pack","typecheck":"tsc --noEmit","test":"vp test run"},"dependencies":{"@babel/code-frame":"^7.29.0","@effect/platform-bun":"4.0.0-beta.70","agent-install":"0.0.5","conf":"^15.1.0","confbox":"^0.2.4","effect":"4.0.0-beta.70","is-unicode-supported":"^2.1.0","jiti":"^2.7.0","knip":"6.26.0","magicast":"^0.5.3","prompts":"^2.4.2","typescript":">=5.0.4 <7"},"devDependencies":{"@harness-doctor/api":"workspace:*","@harness-doctor/core":"workspace:*","@types/babel__code-frame":"^7.27.0","@types/prompts":"^2.4.9","@xterm/headless":"^6.0.0","commander":"^14.0.3","ora":"^9.4.0"},"engines":{"bun":">=1.3.14"},"gitHead":"683f4e96740e043358b3246dad9fa50333c0b41b","_id":"@andypai/harness-doctor@2.0.0","_nodeVersion":"24.3.0","_npmVersion":"12.0.1","dist":{"integrity":"sha512-ATQMa4ELM72YHVPzdjLe08NPaLCNbc12B/reXXdjQ+FFjMS8sL0TrUBp9bnm2S08Bcb1DNM68uOjllaysH1jdA==","shasum":"04fb75796cb9ba8fe2f916d9af64c61ab2872b8b","tarball":"https://registry.npmjs.org/@andypai/harness-doctor/-/harness-doctor-2.0.0.tgz","fileCount":9,"unpackedSize":991906,"attestations":{"url":"https://registry.npmjs.org/-/npm/v1/attestations/@andypai%2fharness-doctor@2.0.0","provenance":{"predicateType":"https://slsa.dev/provenance/v1"}},"signatures":[{"keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U","sig":"MEYCIQDS8ygx1mbKSBKFcKzn3DKzPXCXxPYLu5kg5GBLDNjWUgIhAO0slKadgjrFi1TORkk6LGt/LIzrkrYn5FsyiRKgbS9+"}]},"_npmUser":{"name":"GitHub Actions","email":"npm-oidc-no-reply@github.com","trustedPublisher":{"id":"github","oidcConfigId":"oidc:7e5dec34-c7e2-4b1a-b47c-cecd756a45c5"}},"directories":{},"maintainers":[{"name":"andypai.me","email":"andy@r2pi.co"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages-npm-production","tmp":"tmp/harness-doctor_2.0.0_1784349842006_0.5136571742365199"},"_hasShrinkwrap":false}},"time":{"created":"2026-06-10T17:21:32.028Z","modified":"2026-07-18T04:44:02.467Z","0.1.0":"2026-06-10T17:21:32.530Z","0.2.0":"2026-06-10T19:52:07.451Z","0.3.0":"2026-07-07T01:55:45.486Z","1.0.0":"2026-07-13T00:34:31.760Z","2.0.0":"2026-07-18T04:44:02.155Z"},"bugs":{"url":"https://github.com/abpai/harness-doctor/issues"},"author":{"name":"Andy Pai"},"license":"MIT","homepage":"https://github.com/abpai/harness-doctor#readme","keywords":["agents","agents-md","ai-agents","diagnostics","docs-contract","documentation","harness","readiness","scanner","supply-chain","typescript"],"repository":{"type":"git","url":"git+https://github.com/abpai/harness-doctor.git","directory":"packages/harness-doctor"},"description":"Scan a repo's agent-harness readiness: the docs contract (AGENTS.md, docs/ system of record, spec contract), supply-chain hardening, and dead code — with readiness scoring, diff mode, and a GitHub action","maintainers":[{"name":"andypai.me","email":"andy@r2pi.co"}],"readme":"# Harness Doctor\n\nDeterministic checks that keep your agent harness healthy.\n\n**[Website](https://abpai.github.io/harness-doctor/)** ·\n[npm](https://www.npmjs.com/package/@andypai/harness-doctor) ·\n[Docs](../../docs/README.md)\n\nA coding agent is only as good as the repository it works in. If conventions\nlive in one developer's head, if there's no entry-point file, if the one that\nexists is a 600-line wall of text — every agent starts from zero and guesses.\nHarness Doctor scans for the structure that prevents that, reports what's\nmissing, and scores the repo 0–100 so you can watch it improve.\n\nIt's framework-agnostic and runs entirely offline. The same repository always\nproduces the same diagnostics and the same score: no model calls, no network,\nnothing to flake.\n\n## What it checks\n\n- **Structural checks** read your repository off disk — its files, layout, and\n  docs. Does an agent entry-point exist? Is it a short map or a sprawling\n  manual? Is there a `docs/` directory, and does the entry-point actually point\n  into it? Is your pnpm setup hardened against supply-chain attacks? These\n  checks are how Harness Doctor reasons about the harness itself, not the code\n  inside it.\n- **Dead-code analysis** finds unused files, unused exports, unused\n  dependencies, and circular imports — the cruft that misleads an agent reading\n  your codebase.\n\nEvery finding comes with a one-line explanation of what's wrong and a concrete\nfix — written to be read by a human or handed straight to a coding agent.\n\n## Quick start\n\nRequires Bun 1.3.14 or newer.\n\nFrom the root of any project:\n\n```bash\nbunx --bun @andypai/harness-doctor@latest\n```\n\nYou'll get an audit and a score. Add `--verbose` to see every finding with file\nand line numbers.\n\nTo inspect the deterministic command surface without running any checks:\n\n```bash\nbunx --bun @andypai/harness-doctor@latest signals\n```\n\nThis prints the signals menu as JSON: package scripts from the root and\nworkspace packages, `.github/workflows/*.yml|*.yaml` `run:` commands grouped by\nworkflow/job, Makefile targets, and just recipes. Discovery only reads files; it\ndoes not execute validation commands.\n\n## Install for agents\n\nWire Harness Doctor into your agent's workflow so it reads the findings, fixes\nthem, and keeps the score from sliding on the next change:\n\n```bash\nbunx --bun @andypai/harness-doctor@latest install\n```\n\nWorks with Claude Code, Cursor, Codex, OpenCode, and others.\n\n## Run in CI\n\nScan every pull request and leave findings inline:\n\n```yaml\nname: Harness Doctor\n\non:\n  pull_request:\n    types: [opened, synchronize, reopened, ready_for_review]\n\npermissions:\n  contents: read\n  pull-requests: write\n  issues: write\n\njobs:\n  harness-doctor:\n    runs-on: ubuntu-latest\n    steps:\n      - uses: actions/checkout@v5\n      - uses: abpai/harness-doctor@v1\n```\n\nFor hardened CI, pin `@v1` to a full commit SHA and let Dependabot or Renovate\nbump it.\n\n## Configure\n\nDrop a `harness.config.ts` at your project root. Harness Doctor loads the first\nmatching config in this order: `harness.config.ts`, `.mts`, `.cts`, `.js`,\n`.mjs`, `.cjs`, `.json`, `.jsonc`; or a `harnessDoctor` object in\n`package.json`.\n\n```ts\n// harness.config.ts\nimport type { HarnessDoctorConfig } from \"@andypai/harness-doctor/api\";\n\nexport default {\n  deadCode: false,\n  docsContract: true,\n  baselineCheck: true,\n  rules: {\n    \"harness-doctor/docs-structure/spec-contract-exists\": \"error\",\n    \"knip/unused-file\": \"off\",\n  },\n} satisfies HarnessDoctorConfig;\n```\n\nSet `docsContract: true` when a repo has opted into the Harness docs structure\nand should keep a durable `docs/todos/INDEX.md` queue even before open todo\nspecs exist. Set `deadCode: false` to skip the heuristic dead-code family on\nfirst run; dead-code diagnostics are useful, but dynamically loaded fixtures can\nbe false positives. Set `baselineCheck: true` after adopting the behavior\nbaseline workflow so local runs and CI require the inventory and ledger. The\nexternal [`harness` skills plugin](https://github.com/abpai/skills) creates\nthese artifacts through `/harness baseline`. The\n`--baseline-check` flag remains available for one-off enforcement.\n\nDead-code analysis runs the bundled Knip CLI as an isolated subprocess. Knip\nautomatically reads repository-owned `knip.json`, `knip.jsonc`, `.knip.json`,\n`.knip.jsonc`, `knip.js`, `knip.ts`, `knip.config.js`, `knip.config.ts`, or\n`package.json#knip`; use that\nconfiguration for dynamic entry points, generated code, framework plugins, and\nworkspace layout. Knip configuration hints are forwarded to stderr. Harness\nDoctor reports Knip findings as `knip/<rule>` keys for severity and\nsuppression configuration. This is a breaking rename from the former\n`deslop/<rule>` namespace.\n\nConfig shape:\n\n```ts\ninterface HarnessDoctorConfig {\n  $schema?: string;\n  deadCode?: boolean;\n  docsContract?: boolean;\n  baselineCheck?: boolean;\n  verbose?: boolean;\n  warnings?: boolean;\n  diff?: boolean | string;\n  failOn?: \"error\" | \"warning\" | \"none\";\n  share?: boolean;\n  noScore?: boolean;\n  rootDir?: string;\n  respectInlineDisables?: boolean;\n  ignore?: {\n    rules?: string[];\n    files?: string[];\n    tags?: string[];\n    overrides?: Array<{ files: string[]; rules?: string[] }>;\n  };\n  surfaces?: Partial<\n    Record<\n      \"cli\" | \"prComment\" | \"score\" | \"ciFailure\",\n      {\n        includeTags?: string[];\n        excludeTags?: string[];\n        includeCategories?: string[];\n        excludeCategories?: string[];\n        includeRules?: string[];\n        excludeRules?: string[];\n      }\n    >\n  >;\n  rules?: Record<string, \"off\" | \"warn\" | \"error\">;\n  categories?: Record<\n    \"Security\" | \"Bugs\" | \"Performance\" | \"Accessibility\" | \"Maintainability\",\n    \"off\" | \"warn\" | \"error\"\n  >;\n}\n```\n\nRule keys in `rules`, `ignore.rules`, `surfaces.*.includeRules`, and\n`surfaces.*.excludeRules` must be plugin-prefixed. Use\n`harness-doctor/docs-structure/<rule>` for docs-structure checks,\n`harness-doctor/require-pnpm-hardening` for pnpm hardening, and\n`knip/<rule>` for dead-code checks. For example,\n`\"docs-structure/spec-contract-exists\": \"off\"` is not a valid override key;\nuse `\"harness-doctor/docs-structure/spec-contract-exists\": \"off\"`.\n\n## JSON contract\n\n`--json` emits a versioned report with `schemaVersion: 1`. Each finding is a\ndiagnostic with `filePath`, `plugin`, `rule`, `severity`, `message`, `help`,\n`line`, `column`, and `category`. Consumers should key behavior off\n`plugin/rule` and `schemaVersion`, not prose. Reports also include top-level\n`signals`, the same deterministic command menu printed by `harness-doctor\nsignals`.\n\nThe docs-structure rule\n`harness-doctor/docs-structure/proof-menu-command-exists` verifies the\n`docs/SPEC_CONTRACT.md` proof-menu table statically. Its `Validation command`\ncells must contain only backtick-wrapped commands, and each command must resolve\nto an existing package script, Makefile target, or just recipe discovered in the\nsignals menu.\n\n## Docs\n\nThe guides in [`docs/`](../../docs/) are the system of record:\n\n- [**docs/README.md**](../../docs/README.md) — start here.\n- [**How to write a check**](../../docs/HOW_TO_WRITE_A_CHECK.md) — author a structural\n  check.\n- [**Check fix recipes**](../../docs/CHECK_FIX_RECIPES.md) — how an agent remediates\n  each structural finding.\n- [**Documentation index**](../../docs/INDEX.md) — full docs map.\n\n## Contributing\n\nBugs and ideas are welcome — open an\n[issue](https://github.com/abpai/harness-doctor/issues).\n\nMIT-licensed.\n\n## Acknowledgments\n\nInspired by react-doctor by Aiden Bai — I loved it and wanted a similar system\nfor repo prep in harness engineering. Harness Doctor is an independent project\nand is not affiliated with or endorsed by react-doctor or its authors.\n","readmeFilename":"README.md"}