{"_id":"@raintree-technology/hig-doctor-core","_rev":"5-b2e5f2d849e0718143c6670527ba29cf","name":"@raintree-technology/hig-doctor-core","dist-tags":{"latest":"0.2.0"},"versions":{"0.1.0":{"name":"@raintree-technology/hig-doctor-core","version":"0.1.0","keywords":["apple","hig","human-interface-guidelines","audit","accessibility","lint-engine"],"license":"MIT","_id":"@raintree-technology/hig-doctor-core@0.1.0","maintainers":[{"name":"raintree-technology","email":"admin@raintree.technology"}],"homepage":"https://github.com/raintree-technology/hig-doctor/tree/main/packages/core#readme","bugs":{"url":"https://github.com/raintree-technology/hig-doctor/issues"},"dist":{"shasum":"3f82e132306518c28dcd9ebc9c5dc5cddd29a37c","tarball":"https://registry.npmjs.org/@raintree-technology/hig-doctor-core/-/hig-doctor-core-0.1.0.tgz","fileCount":38,"integrity":"sha512-4mdP2zLhtenFqa98ZQ+7jG42bCFhlMPbRXcR6TIx99ehLvxF9ZGD8zQj3G+sAry6jx5jqi3eZuPpryAQo5e9EQ==","signatures":[{"sig":"MEUCIFFCY3Bh4nGKEFadQTmvdW7tY+l27fuoCpzESqEPGSUWAiEAieNC6EgU0q/vWH96nLl3uWxPNuk9qUudfyPq4r6nuy4=","keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U"}],"unpackedSize":436264},"main":"./dist/index.js","type":"module","types":"./dist/index.d.ts","engines":{"node":"24.x"},"exports":{".":{"bun":"./src/index.ts","types":"./dist/index.d.ts","default":"./dist/index.js"}},"scripts":{"test":"bun test","build":"esbuild src/index.ts --bundle --platform=node --target=node20 --format=esm --external:typescript --outfile=dist/index.js && tsc -p tsconfig.build.json","typecheck":"tsc --noEmit","prepublishOnly":"bun run build"},"_npmUser":{"name":"raintree-technology","email":"admin@raintree.technology"},"repository":{"url":"git+https://github.com/raintree-technology/hig-doctor.git","type":"git","directory":"packages/core"},"_npmVersion":"10.9.8","description":"Rule engine powering HIG Doctor: framework detection, Apple HIG pattern rules, and the audit pipeline.","directories":{},"_nodeVersion":"22.22.3","_hasShrinkwrap":false,"packageManager":"bun@1.3.11","devDependencies":{"esbuild":"^0.25.0","@types/bun":"^1.3.3","typescript":"^5.9.3","@types/node":"^20"},"optionalDependencies":{"typescript":"^5.9.3"},"_npmOperationalInternal":{"tmp":"tmp/hig-doctor-core_0.1.0_1784765713569_0.8729734385593144","host":"s3://npm-registry-packages-npm-production"}},"0.1.1":{"name":"@raintree-technology/hig-doctor-core","version":"0.1.1","keywords":["apple","hig","human-interface-guidelines","audit","accessibility","lint-engine"],"license":"MIT","_id":"@raintree-technology/hig-doctor-core@0.1.1","maintainers":[{"name":"raintree-technology","email":"admin@raintree.technology"}],"homepage":"https://github.com/raintree-technology/hig-doctor/tree/main/packages/core#readme","bugs":{"url":"https://github.com/raintree-technology/hig-doctor/issues"},"dist":{"shasum":"3e3493301b3e514921851d5f4c1cd580e58b3346","tarball":"https://registry.npmjs.org/@raintree-technology/hig-doctor-core/-/hig-doctor-core-0.1.1.tgz","fileCount":47,"integrity":"sha512-Y7JNnQ2CRk2ZwG79NMu45IMRu7yhEd6S+vZ1UQydVrCT9hGlh3Ao0ou/duK3VID5u2Ck7S4pzaZwwxVUQCqM3A==","signatures":[{"sig":"MEYCIQDZH4UWWDts+k97o65R+HBpC71oZPV+hsQ4TTvlso2o/AIhALJBm3TKatFk9NAl9+j0r+GAgCbK2sou4wRk3EWzwvE9","keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U"}],"attestations":{"url":"https://registry.npmjs.org/-/npm/v1/attestations/@raintree-technology%2fhig-doctor-core@0.1.1","provenance":{"predicateType":"https://slsa.dev/provenance/v1"}},"unpackedSize":466695},"main":"./dist/index.js","type":"module","types":"./dist/index.d.ts","engines":{"node":"24.x"},"exports":{".":{"bun":"./src/index.ts","types":"./dist/index.d.ts","default":"./dist/index.js"}},"gitHead":"92cedeba00619d8534fe32b2adc77ad5d24c488b","scripts":{"test":"bun test","build":"esbuild src/index.ts --bundle --platform=node --target=node20 --format=esm --external:typescript --outfile=dist/index.js && tsc -p tsconfig.build.json","typecheck":"tsc --noEmit","prepublishOnly":"bun run build"},"_npmUser":{"name":"GitHub Actions","email":"npm-oidc-no-reply@github.com","trustedPublisher":{"id":"github","oidcConfigId":"oidc:e7b1879b-1977-40bf-8701-49f31929ae24"}},"repository":{"url":"git+https://github.com/raintree-technology/hig-doctor.git","type":"git","directory":"packages/core"},"_npmVersion":"11.16.0","description":"Rule engine powering HIG Doctor: framework detection, Apple HIG pattern rules, and the audit pipeline.","directories":{},"_nodeVersion":"24.18.0","_hasShrinkwrap":false,"packageManager":"bun@1.3.11","devDependencies":{"esbuild":"^0.25.0","@types/bun":"^1.3.3","typescript":"^5.9.3","@types/node":"^20"},"optionalDependencies":{"typescript":"^5.9.3"},"_npmOperationalInternal":{"tmp":"tmp/hig-doctor-core_0.1.1_1785110473661_0.9619811247618151","host":"s3://npm-registry-packages-npm-production"}},"0.1.2":{"name":"@raintree-technology/hig-doctor-core","version":"0.1.2","keywords":["apple","hig","human-interface-guidelines","audit","accessibility","lint-engine"],"license":"MIT","_id":"@raintree-technology/hig-doctor-core@0.1.2","maintainers":[{"name":"raintree-technology","email":"admin@raintree.technology"}],"homepage":"https://github.com/raintree-technology/hig-doctor/tree/main/packages/core#readme","bugs":{"url":"https://github.com/raintree-technology/hig-doctor/issues"},"dist":{"shasum":"de5a7d7a0b91b929cfbc9ace91c76f9b210a3d7d","tarball":"https://registry.npmjs.org/@raintree-technology/hig-doctor-core/-/hig-doctor-core-0.1.2.tgz","fileCount":47,"integrity":"sha512-zqRGpqAZSxbV0Q2c6VDDF43Uq6mM53b2OVf6oOz+8qeDnsQxQd/PTt0szyYau9VdB3aZOXe2HcMfXdnE22XdRQ==","signatures":[{"sig":"MEYCIQCjSatoBwqlgAvgGq7mHWzToBIEjnfTA42hFNNt2pSV8AIhAKqbvbasd0Wk+KG6d3UCgQTRTNp6LRkL3lAozFT/rGYe","keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U"}],"attestations":{"url":"https://registry.npmjs.org/-/npm/v1/attestations/@raintree-technology%2fhig-doctor-core@0.1.2","provenance":{"predicateType":"https://slsa.dev/provenance/v1"}},"unpackedSize":469304},"main":"./dist/index.js","type":"module","types":"./dist/index.d.ts","engines":{"node":"24.x"},"exports":{".":{"bun":"./src/index.ts","types":"./dist/index.d.ts","default":"./dist/index.js"}},"gitHead":"307eafc70736f27664bcdca3d55ed9ed6c1210ab","scripts":{"test":"bun test","build":"esbuild src/index.ts --bundle --platform=node --target=node20 --format=esm --external:typescript --outfile=dist/index.js && tsc -p tsconfig.build.json","typecheck":"tsc --noEmit","prepublishOnly":"bun run build"},"_npmUser":{"name":"GitHub Actions","email":"npm-oidc-no-reply@github.com","trustedPublisher":{"id":"github","oidcConfigId":"oidc:e7b1879b-1977-40bf-8701-49f31929ae24"}},"repository":{"url":"git+https://github.com/raintree-technology/hig-doctor.git","type":"git","directory":"packages/core"},"_npmVersion":"11.16.0","description":"Rule engine powering HIG Doctor: framework detection, Apple HIG pattern rules, and the audit pipeline.","directories":{},"_nodeVersion":"24.18.0","_hasShrinkwrap":false,"packageManager":"bun@1.3.11","devDependencies":{"esbuild":"^0.25.0","@types/bun":"^1.3.3","typescript":"^5.9.3","@types/node":"^20"},"optionalDependencies":{"typescript":"^5.9.3"},"_npmOperationalInternal":{"tmp":"tmp/hig-doctor-core_0.1.2_1788334323223_0.7024390784798848","host":"s3://npm-registry-packages-npm-production"}},"0.1.3":{"name":"@raintree-technology/hig-doctor-core","version":"0.1.3","keywords":["apple","hig","human-interface-guidelines","audit","accessibility","lint-engine"],"license":"MIT","_id":"@raintree-technology/hig-doctor-core@0.1.3","maintainers":[{"name":"raintree-technology","email":"admin@raintree.technology"}],"homepage":"https://github.com/raintree-technology/hig-doctor/tree/main/packages/core#readme","bugs":{"url":"https://github.com/raintree-technology/hig-doctor/issues"},"dist":{"shasum":"274120e4bf697f1e46620c5590a4d762779adeab","tarball":"https://registry.npmjs.org/@raintree-technology/hig-doctor-core/-/hig-doctor-core-0.1.3.tgz","fileCount":47,"integrity":"sha512-knWtWv7zI5Z4vO1N6d352cZ7ah1nQxeyiKd6uzYcb+z3F/TO/hYnKVXr0DkA74qxbvnXno5AxC2AMonfOt/JWA==","signatures":[{"sig":"MEUCIBMM3RGGzf2kS2/qOQraeZvzXgZNUZl7WgmamtI+HbwMAiEA1u1xSKQLRtroy7adrXjU2L/7M63tezUykIHTkFur1lI=","keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U"}],"attestations":{"url":"https://registry.npmjs.org/-/npm/v1/attestations/@raintree-technology%2fhig-doctor-core@0.1.3","provenance":{"predicateType":"https://slsa.dev/provenance/v1"}},"unpackedSize":469487},"main":"./dist/index.js","type":"module","types":"./dist/index.d.ts","engines":{"node":"24.x"},"exports":{".":{"bun":"./src/index.ts","types":"./dist/index.d.ts","default":"./dist/index.js"}},"gitHead":"3ec08f5a6f9d2fa22a64950274ba6baee2a38838","scripts":{"test":"bun test","build":"esbuild src/index.ts --bundle --platform=node --target=node20 --format=esm --external:typescript --outfile=dist/index.js && tsc -p tsconfig.build.json","typecheck":"tsc --noEmit","prepublishOnly":"bun run build"},"_npmUser":{"name":"GitHub Actions","email":"npm-oidc-no-reply@github.com","trustedPublisher":{"id":"github","oidcConfigId":"oidc:e7b1879b-1977-40bf-8701-49f31929ae24"}},"repository":{"url":"git+https://github.com/raintree-technology/hig-doctor.git","type":"git","directory":"packages/core"},"_npmVersion":"11.16.0","description":"Rule engine powering HIG Doctor: framework detection, Apple HIG pattern rules, and the audit pipeline.","directories":{},"_nodeVersion":"24.18.0","_hasShrinkwrap":false,"packageManager":"bun@1.3.11","devDependencies":{"esbuild":"^0.25.0","@types/bun":"^1.3.3","typescript":"^5.9.3","@types/node":"^20"},"optionalDependencies":{"typescript":"^5.9.3"},"_npmOperationalInternal":{"tmp":"tmp/hig-doctor-core_0.1.3_1788554217212_0.773382366392722","host":"s3://npm-registry-packages-npm-production"}},"0.2.0":{"_id":"@raintree-technology/hig-doctor-core@0.2.0","bugs":{"url":"https://github.com/raintree-technology/hig-doctor/issues"},"dist":{"shasum":"d7faab893984e5e59fda80866f770b50d0fbd1b0","tarball":"https://registry.npmjs.org/@raintree-technology/hig-doctor-core/-/hig-doctor-core-0.2.0.tgz","fileCount":33,"integrity":"sha512-iCEtpllFd9qvHjgv5eiojHGIck0mCR1aJj889LEEUmfLDg1zQ1O7o4JK/VkPe2Ocz9/ISoDLU2taYGeFQ08mSg==","signatures":[{"sig":"MEUCIQC1fG/U1ZJQCPxZxRAOuOP4etKITyDRTNwkeWXCg9H99gIgN8YkIxZVBDWdxVAjHnWl00BU4H1SUky4jEap/KRo9eA=","keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U"},{"keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U","sig":"MEQCIAMHYlCEK4Yz2Q7kw9DOqpKt2yCmgIoJpGOIbDJmzNbeAiB8U2ktpcJqLC3KPxOp/MplATMQZ+YEhfXvB+GQzrAC/g=="}],"attestations":{"url":"https://registry.npmjs.org/-/npm/v1/attestations/@raintree-technology%2fhig-doctor-core@0.2.0","provenance":{"predicateType":"https://slsa.dev/provenance/v1"}},"unpackedSize":345248},"main":"./dist/index.js","name":"@raintree-technology/hig-doctor-core","type":"module","types":"./dist/index.d.ts","engines":{"node":">=22"},"exports":{".":{"bun":"./src/index.ts","types":"./dist/index.d.ts","default":"./dist/index.js"}},"gitHead":"e2f1100291a4774b883f878320b8d702fcc4f64f","license":"MIT","scripts":{"test":"bun test","build":"esbuild src/index.ts --bundle --platform=node --target=node22 --format=esm --external:typescript --outfile=dist/index.js && tsc -p tsconfig.build.json","typecheck":"tsc --noEmit","prepublishOnly":"bun run build"},"version":"0.2.0","_npmUser":{"name":"GitHub Actions","email":"npm-oidc-no-reply@github.com","trustedPublisher":{"id":"github","oidcConfigId":"e7b1879b-1977-40bf-8701-49f31929ae24"}},"homepage":"https://github.com/raintree-technology/hig-doctor/tree/main/packages/core#readme","keywords":["apple","hig","human-interface-guidelines","audit","accessibility","lint-engine"],"repository":{"url":"git+https://github.com/raintree-technology/hig-doctor.git","type":"git","directory":"packages/core"},"_npmVersion":"11.19.1","description":"HIG Doctor rule engine: framework detection, Apple HIG and accessibility rules, and the audit pipeline.","directories":{},"maintainers":[{"name":"raintree-technology","email":"admin@raintree.technology"}],"_nodeVersion":"24.22.1","_hasShrinkwrap":false,"devDependencies":{"esbuild":"^0.25.0","@types/bun":"^1.3.3","typescript":"^5.9.3","@types/node":"^20"},"optionalDependencies":{"typescript":"^5.9.3"},"_npmOperationalInternal":{"host":"s3://npm-registry-packages-npm-production","tmp":"tmp/hig-doctor-core_0.2.0_1795892622252_0.4893331885938882"}}},"time":{"created":"2026-07-23T00:15:13.427Z","modified":"2026-11-28T19:03:42.641Z","0.1.0":"2026-07-23T00:15:13.786Z","0.1.1":"2026-07-27T00:01:13.818Z","0.1.2":"2026-09-02T07:32:03.397Z","0.1.3":"2026-09-04T20:36:57.354Z","0.2.0":"2026-11-28T19:03:42.353Z"},"bugs":{"url":"https://github.com/raintree-technology/hig-doctor/issues"},"license":"MIT","homepage":"https://github.com/raintree-technology/hig-doctor/tree/main/packages/core#readme","keywords":["apple","hig","human-interface-guidelines","audit","accessibility","lint-engine"],"repository":{"url":"git+https://github.com/raintree-technology/hig-doctor.git","type":"git","directory":"packages/core"},"description":"HIG Doctor rule engine: framework detection, Apple HIG and accessibility rules, and the audit pipeline.","maintainers":[{"name":"raintree-technology","email":"admin@raintree.technology"}],"readme":"<p align=\"center\">\n  <img src=\"https://apple.raintree.technology/logo.svg\" alt=\"HIG Doctor\" width=\"72\" height=\"72\" />\n</p>\n\n# @raintree-technology/hig-doctor-core\n\nThe rule engine behind [HIG Doctor](https://github.com/raintree-technology/hig-doctor): framework detection, the Apple HIG rule catalog, tiered analysis (regex → Swift structural → TypeScript-compiler JSX), and the audit pipeline. The [`hig-doctor`](https://github.com/raintree-technology/hig-doctor/tree/main/packages/cli) CLI and [`hig-mcp`](https://github.com/raintree-technology/hig-doctor/tree/main/packages/mcp) server are thin wrappers over this package; embed it directly to run audits from your own tooling.\n\n## Install\n\n```bash\nnpm install @raintree-technology/hig-doctor-core\n```\n\n## Run an audit\n\n```ts\nimport { audit, analyzeFile, ruleCatalog, toSarif } from \"@raintree-technology/hig-doctor-core\";\n\n// Whole-directory audit (honors hig-doctor.config.json, baselines, suppressions)\nconst result = await audit(\"./my-app\");\nconsole.log(result.categories, result.configPath, result.baselined);\n\n// Single-file analysis (regex + AST/structural refinement), engine-tagged\nconst findings = analyzeFile(source, \"Header.tsx\");\n\n// Rule metadata for docs, dashboards, or an editor integration\nfor (const rule of ruleCatalog()) {\n  console.log(rule.id, rule.severity, rule.engine, rule.hig, rule.fix);\n}\n```\n\n## Exports\n\n- `audit(dir, skillsDir?, options?)`: full scan → detect → categorize → report, with config, baseline, and cache support.\n- `analyzeFile(content, file)`: tiered per-file analysis; every match is tagged `regex` / `swift-structural` / `ast-tsx`.\n- `detectPatterns(content, file)`: the regex base tier alone (zero dependencies).\n- `ruleCatalog()` / `getRuleById(id)`: stable rule IDs, severities, engines, HIG citations, and fix guidance.\n- `toSarif(matches, options)`: SARIF 2.1.0 with optional suggested fixes.\n- `createBaseline` / `applyBaseline`, `loadConfig` / `applyConfig`, `suggestFix` / `applyFixes`, `ScanCache`.\n\nThe `ast-tsx` tier uses the TypeScript compiler when the optional `typescript` dependency is present, and falls back to the regex tier otherwise.\n\n## Compatibility and limits\n\nThe package runs on Node 22+ and Bun. It is a static review aid, not proof of\nHIG conformance, accessibility, or design quality. Apple-platform checks cite\nthe HIG directly; other surfaces use aligned interface-quality rules. See the\n[project guide](https://github.com/raintree-technology/hig-doctor/blob/main/README.md),\n[rule catalog](https://github.com/raintree-technology/hig-doctor#framework-coverage), and\n[security policy](https://github.com/raintree-technology/hig-doctor/blob/main/SECURITY.md).\n\n## Changelog and license\n\nRelease notes: [CHANGELOG.md](https://github.com/raintree-technology/hig-doctor/blob/main/CHANGELOG.md). MIT licensed. Apple HIG content is\n© Apple Inc.; see [THIRD_PARTY_NOTICES.md](https://github.com/raintree-technology/hig-doctor/blob/main/THIRD_PARTY_NOTICES.md).\n","readmeFilename":"README.md"}