{"_id":"@arcsight-ai/anchr","_rev":"3-e2cef69524aeb1aaae694633b6818029","name":"@arcsight-ai/anchr","dist-tags":{"latest":"1.0.3"},"versions":{"1.0.0":{"name":"@arcsight-ai/anchr","version":"1.0.0","license":"MIT","_id":"@arcsight-ai/anchr@1.0.0","maintainers":[{"name":"freewebguys","email":"hello@arcsight.ai"}],"homepage":"https://github.com/arcsight-ai/anchr#readme","bugs":{"url":"https://github.com/arcsight-ai/anchr/issues"},"bin":{"anchr":"bin/anchr.cjs"},"dist":{"shasum":"d358a961c76d5bad2682d609c434c14c7771c1b2","tarball":"https://registry.npmjs.org/@arcsight-ai/anchr/-/anchr-1.0.0.tgz","fileCount":229,"integrity":"sha512-esOV9p4ti7ULQBLd0nnHv4DgQ1tdZ188mK+1CCgpryQbk3ANMHEE/442QgVAb8hUvSqPQvIUa4Fjdc3+jXTdWQ==","signatures":[{"sig":"MEMCIG5usywH7M0mj+An82zmBxpluRXpzcZR1f5c6JwzSVJdAh9wEojByRzS26PE3kJtEit3lROUfgPgk5wGabPbLGt2","keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U"}],"unpackedSize":976283},"type":"module","engines":{"node":">=20"},"gitHead":"08018e04ffdb5e2f8ddda107505d688ddbc27e99","scripts":{"demo":"bash scripts/demo.sh","test":"jest","anchr":"npx tsx scripts/cli.ts","build":"tsc","graph":"npm run build && node dist/scripts/anchr-graph.js --root . --out artifacts/anchr-graph.json","share":"npx tsx scripts/anchr-share.ts","start":"node dist/index.js","doctor":"npx tsx scripts/anchr-doctor.ts","repair":"npx tsx scripts/anchr-repair.ts","decision":"npx tsx scripts/anchr-decision.ts","demo:fix":"bash scripts/demo-fix.sh","pr-signal":"npx tsx scripts/anchr-pr-signal.ts","demo:break":"bash scripts/demo-break.sh","pr-comment":"npx tsx scripts/anchr-pr-comment.ts","structural":"npx tsx scripts/anchr-structural-audit.ts","convergence":"npx tsx scripts/anchr-convergence.ts","demo-report":"npx tsx scripts/demo-report.ts","graph:smoke":"npm run build && node dist/scripts/anchr-graph-smoke.js","install:hook":"npx tsx scripts/anchr-install.ts","report-render":"npx tsx scripts/report-renderer.ts","set-pr-status":"npx tsx scripts/set-pr-status.ts","repair-comment":"npx tsx scripts/anchr-repair-comment.ts","uninstall:hook":"npx tsx scripts/anchr-uninstall.ts","fix-suggestions":"npx tsx scripts/anchr-fix-suggestions.ts","simulation:stress":"npx tsx scripts/simulation/institutional-stress-simulation.ts","update-pr-comment":"npx tsx scripts/update-pr-comment.ts","post-inline-review":"npx tsx scripts/post-inline-review.ts","write-comment-body":"npx tsx scripts/write-production-comment-body.ts","simulation:survival":"npx tsx scripts/simulation/survival-simulation.ts","pr-comment-convergent":"npx tsx scripts/arcsight-pr-comment.ts","render-github-comment":"npx tsx scripts/render-github-comment.ts","simulation:conviction":"npx tsx scripts/simulation/conviction-simulation.ts","simulation:stress:run":"npx tsx scripts/simulation/execute-stress-protocol.ts"},"_npmUser":{"name":"freewebguys","email":"hello@arcsight.ai"},"repository":{"url":"git+https://github.com/arcsight-ai/anchr.git","type":"git"},"_npmVersion":"10.8.2","description":"Structural gate for TypeScript monorepos. One decision per PR: VERIFIED or BLOCKED.","directories":{},"_nodeVersion":"20.19.6","dependencies":{"yaml":"^2.6.0","minimatch":"^10.0.0","@octokit/rest":"^22.0.1"},"_hasShrinkwrap":false,"prepublishOnly":"npm run build","devDependencies":{"tsx":"^4.0.0","jest":"^30.2.0","ts-jest":"^29.4.6","typescript":"^5.0.0","@types/jest":"^30.0.0","@types/node":"^20.0.0"},"_npmOperationalInternal":{"tmp":"tmp/anchr_1.0.0_1772148185525_0.37090681637312306","host":"s3://npm-registry-packages-npm-production"}},"1.0.2":{"name":"@arcsight-ai/anchr","version":"1.0.2","license":"MIT","_id":"@arcsight-ai/anchr@1.0.2","maintainers":[{"name":"freewebguys","email":"hello@arcsight.ai"}],"homepage":"https://github.com/arcsight-ai/anchr#readme","bugs":{"url":"https://github.com/arcsight-ai/anchr/issues"},"bin":{"anchr":"bin/anchr.cjs"},"dist":{"shasum":"bbbdc1ffd2b6cd84abf81b45854141e7cba1a0cd","tarball":"https://registry.npmjs.org/@arcsight-ai/anchr/-/anchr-1.0.2.tgz","fileCount":229,"integrity":"sha512-adhnFJ55/I+opk6qa+X479DE92emqbMjr12yLVVAbVB008FiZbeqb9x7ndflOsfOBwlkOi1ybl7r+WFhzNMfWw==","signatures":[{"sig":"MEUCIQDiJHx7UR9z0hUadjLpFtw8ZaT0bTBwmafcXTb/aOB+lQIgOvXgqtOiczCvPzhTEYMK5y72pR1N9eBznIQyxuDMe50=","keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U"}],"unpackedSize":976311},"type":"module","engines":{"node":">=20"},"gitHead":"08018e04ffdb5e2f8ddda107505d688ddbc27e99","scripts":{"demo":"bash scripts/demo.sh","test":"jest","anchr":"npx tsx scripts/cli.ts","build":"tsc","graph":"npm run build && node dist/scripts/anchr-graph.js --root . --out artifacts/anchr-graph.json","share":"npx tsx scripts/anchr-share.ts","start":"node dist/index.js","doctor":"npx tsx scripts/anchr-doctor.ts","repair":"npx tsx scripts/anchr-repair.ts","decision":"npx tsx scripts/anchr-decision.ts","demo:fix":"bash scripts/demo-fix.sh","pr-signal":"npx tsx scripts/anchr-pr-signal.ts","demo:break":"bash scripts/demo-break.sh","pr-comment":"npx tsx scripts/anchr-pr-comment.ts","structural":"npx tsx scripts/anchr-structural-audit.ts","convergence":"npx tsx scripts/anchr-convergence.ts","demo-report":"npx tsx scripts/demo-report.ts","graph:smoke":"npm run build && node dist/scripts/anchr-graph-smoke.js","install:hook":"npx tsx scripts/anchr-install.ts","report-render":"npx tsx scripts/report-renderer.ts","set-pr-status":"npx tsx scripts/set-pr-status.ts","repair-comment":"npx tsx scripts/anchr-repair-comment.ts","uninstall:hook":"npx tsx scripts/anchr-uninstall.ts","fix-suggestions":"npx tsx scripts/anchr-fix-suggestions.ts","simulation:stress":"npx tsx scripts/simulation/institutional-stress-simulation.ts","update-pr-comment":"npx tsx scripts/update-pr-comment.ts","post-inline-review":"npx tsx scripts/post-inline-review.ts","write-comment-body":"npx tsx scripts/write-production-comment-body.ts","simulation:survival":"npx tsx scripts/simulation/survival-simulation.ts","pr-comment-convergent":"npx tsx scripts/arcsight-pr-comment.ts","render-github-comment":"npx tsx scripts/render-github-comment.ts","simulation:conviction":"npx tsx scripts/simulation/conviction-simulation.ts","simulation:stress:run":"npx tsx scripts/simulation/execute-stress-protocol.ts"},"_npmUser":{"name":"freewebguys","email":"hello@arcsight.ai"},"repository":{"url":"git+https://github.com/arcsight-ai/anchr.git","type":"git"},"_npmVersion":"10.8.2","description":"Structural gate for TypeScript monorepos. One decision per PR: VERIFIED or BLOCKED.","directories":{},"_nodeVersion":"20.19.6","dependencies":{"yaml":"^2.6.0","minimatch":"^10.0.0","@octokit/rest":"^22.0.1"},"_hasShrinkwrap":false,"prepublishOnly":"npm run build","devDependencies":{"tsx":"^4.0.0","jest":"^30.2.0","ts-jest":"^29.4.6","typescript":"^5.0.0","@types/jest":"^30.0.0","@types/node":"^20.0.0"},"_npmOperationalInternal":{"tmp":"tmp/anchr_1.0.2_1772148336592_0.29679334132348223","host":"s3://npm-registry-packages-npm-production"}},"1.0.3":{"name":"@arcsight-ai/anchr","version":"1.0.3","description":"Structural gate for TypeScript monorepos. One decision per PR: VERIFIED or BLOCKED.","license":"MIT","repository":{"type":"git","url":"git+https://github.com/arcsight-ai/anchr.git"},"type":"module","scripts":{"test":"jest","build":"tsc","start":"node dist/index.js","graph":"npm run build && node dist/scripts/anchr-graph.js --root . --out artifacts/anchr-graph.json","graph:smoke":"npm run build && node dist/scripts/anchr-graph-smoke.js","structural":"npx tsx scripts/anchr-structural-audit.ts","repair":"npx tsx scripts/anchr-repair.ts","repair-comment":"npx tsx scripts/anchr-repair-comment.ts","convergence":"npx tsx scripts/anchr-convergence.ts","decision":"npx tsx scripts/anchr-decision.ts","pr-comment":"npx tsx scripts/anchr-pr-comment.ts","pr-signal":"npx tsx scripts/anchr-pr-signal.ts","write-comment-body":"npx tsx scripts/write-production-comment-body.ts","fix-suggestions":"npx tsx scripts/anchr-fix-suggestions.ts","render-github-comment":"npx tsx scripts/render-github-comment.ts","pr-comment-convergent":"npx tsx scripts/arcsight-pr-comment.ts","update-pr-comment":"npx tsx scripts/update-pr-comment.ts","set-pr-status":"npx tsx scripts/set-pr-status.ts","post-inline-review":"npx tsx scripts/post-inline-review.ts","demo":"bash scripts/demo.sh","demo:break":"bash scripts/demo-break.sh","demo:fix":"bash scripts/demo-fix.sh","demo-report":"npx tsx scripts/demo-report.ts","report-render":"npx tsx scripts/report-renderer.ts","share":"npx tsx scripts/anchr-share.ts","install:hook":"npx tsx scripts/anchr-install.ts","uninstall:hook":"npx tsx scripts/anchr-uninstall.ts","doctor":"npx tsx scripts/anchr-doctor.ts","anchr":"npx tsx scripts/cli.ts","simulation:conviction":"npx tsx scripts/simulation/conviction-simulation.ts","simulation:survival":"npx tsx scripts/simulation/survival-simulation.ts","simulation:stress":"npx tsx scripts/simulation/institutional-stress-simulation.ts","simulation:stress:run":"npx tsx scripts/simulation/execute-stress-protocol.ts"},"devDependencies":{"@types/jest":"^30.0.0","@types/node":"^20.0.0","jest":"^30.2.0","ts-jest":"^29.4.6","tsx":"^4.0.0","typescript":"^5.0.0"},"engines":{"node":">=20"},"bin":{"anchr":"bin/anchr.cjs"},"prepublishOnly":"npm run build","dependencies":{"@octokit/rest":"^22.0.1","minimatch":"^10.0.0","yaml":"^2.6.0"},"_id":"@arcsight-ai/anchr@1.0.3","gitHead":"08018e04ffdb5e2f8ddda107505d688ddbc27e99","bugs":{"url":"https://github.com/arcsight-ai/anchr/issues"},"homepage":"https://github.com/arcsight-ai/anchr#readme","_nodeVersion":"20.19.6","_npmVersion":"10.8.2","dist":{"integrity":"sha512-6+xtrEL8uxmIWXS1jY6VbYgDnNuu4akYwoNDceFSB5INqSKOvnt+ZfGoP1L/d6NHmiOCB0fwGK+5vLomIKwSHQ==","shasum":"295269225594c062c64195661b5c5d9883809932","tarball":"https://registry.npmjs.org/@arcsight-ai/anchr/-/anchr-1.0.3.tgz","fileCount":229,"unpackedSize":976311,"signatures":[{"keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U","sig":"MEQCICNOQmutaLd7f9B3lqtEtaF9JYbr8ZEYMbIBWaO78RtJAiAqjpibA4Vk1EDb+SPfI/zjd8wBbQgrxUgF+hLNbqfPCA=="}]},"_npmUser":{"name":"freewebguys","email":"hello@arcsight.ai"},"directories":{},"maintainers":[{"name":"freewebguys","email":"hello@arcsight.ai"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages-npm-production","tmp":"tmp/anchr_1.0.3_1772148397046_0.5058958708920225"},"_hasShrinkwrap":false}},"time":{"created":"2026-02-26T23:23:05.450Z","modified":"2026-02-26T23:26:37.378Z","1.0.0":"2026-02-26T23:23:05.745Z","1.0.2":"2026-02-26T23:25:36.754Z","1.0.3":"2026-02-26T23:26:37.235Z"},"bugs":{"url":"https://github.com/arcsight-ai/anchr/issues"},"license":"MIT","homepage":"https://github.com/arcsight-ai/anchr#readme","repository":{"type":"git","url":"git+https://github.com/arcsight-ai/anchr.git"},"description":"Structural gate for TypeScript monorepos. One decision per PR: VERIFIED or BLOCKED.","maintainers":[{"name":"freewebguys","email":"hello@arcsight.ai"}],"readme":"# ANCHR\n\n**Move at AI speed. Keep architectural control.**\n\nANCHR enforces repository boundaries in CI.\n\nIf a pull request introduces architectural drift, ANCHR blocks the merge and shows the exact structural correction.\n\nDeterministic. One decision per PR.\n\n**Architecture is no longer a code review opinion. It's enforced.**\n\n---\n\n## One decision per PR\n\n**VERIFIED** — Safe. No boundary violations.  \n**BLOCKED** — Violation. Minimal cut + suggested structural fix (including copy-paste snippet) in the comment.\n\nDeterministic: same base + head → same result. Every time.\n\n![ANCHR BLOCK — boundary violation with minimal cut](docs/media/screenshot-block-pr-comment.png)\n\n---\n\n## Quick Start (3 steps)\n\n1. **Add the workflow** — Copy [.github/workflows/anchr-gate.yml](.github/workflows/anchr-gate.yml) into your repo as `.github/workflows/anchr-gate.yml` (or use the minimal `anchr.yml` below).\n\n2. **Add `.anchr.yml`** at repo root:\n   ```yaml\n   enforcement: STRICT\n   ```\n\n3. **Open a PR** — See the ANCHR comment and the **ANCHR — Architectural Firewall** check.\n\nFor stability pin to `npx @arcsight-ai/anchr@1.0.0 gate`; or use `@arcsight-ai/anchr@1` for latest 1.x.\n\n---\n\n## Install (60 seconds)\n\nCreate **`.github/workflows/anchr.yml`**:\n\n```yaml\nname: ANCHR\n\non:\n  pull_request:\n\njobs:\n  ANCHR:\n    runs-on: ubuntu-latest\n    permissions:\n      contents: read\n      pull-requests: write\n      checks: write\n\n    steps:\n      - uses: actions/checkout@v4\n      - uses: actions/setup-node@v4\n        with:\n          node-version: \"20\"\n      - run: npx @arcsight-ai/anchr@latest gate\n        env:\n          GITHUB_BASE_SHA: ${{ github.event.pull_request.base.sha }}\n          GITHUB_HEAD_SHA: ${{ github.event.pull_request.head.sha }}\n```\n\nCommit. Open a PR. You get a check named **ANCHR**.  \nTo enforce: **Settings → Branch protection → Require status checks → Add \"ANCHR\"**.\n\n**Strict mode (block on any violation):** `enforcement: STRICT` in `.anchr.yml` or `npx @arcsight-ai/anchr gate --strict`\n\n**Local run:** `npx @arcsight-ai/anchr gate` or `npx @arcsight-ai/anchr gate --base <base-sha> --head <head-sha>`\n\n[![CI](https://github.com/arcsight-ai/anchr/actions/workflows/anchr.yml/badge.svg)](https://github.com/arcsight-ai/anchr/actions/workflows/anchr.yml) [![Deterministic](https://img.shields.io/badge/deterministic-by__construction-2ea043)](.)\n\n---\n\n## Configuration\n\nOptional `.anchr.yml` at repo root:\n\n```yaml\nenforcement: STRICT   # or ADVISORY (warn only)\nignore:\n  - \"tests/**\"\n  - \"**/*.test.ts\"\nmaxFiles: 500         # optional; default 400 (large repos)\ntimeoutMs: 10000      # optional; default 8000\n```\n\n**Enforcement:** `--strict` overrides → STRICT. Else `.anchr.yml` `enforcement`. Default ADVISORY. With STRICT, any violation or indeterminate result fails the check.\n\n**Large repos:** If a PR exceeds `maxFiles` or analysis times out, the comment shows “Analysis scope exceeded” (e.g. “Changed files: 732 (max 500). Structural analysis skipped.”). No silent neutral.\n\n---\n\n## What ANCHR enforces\n\n| Verdict   | Meaning |\n|----------|--------|\n| **VERIFIED** | No boundary violations, no new cycles. |\n| **BLOCKED**  | Cross-package internal import, or circular dependency. Comment includes minimal cut and cause. |\n\nLayout: `packages/<name>/src` only. Other layouts are out-of-scope by design.\n\n---\n\n## How it works\n\n1. **Packages** — From `packages/<name>/src`.\n2. **Graph** — Dependencies from imports in the diff and codebase.\n3. **Public surface** — Per package (entry + re-exports; `internal/`, `private/`, `impl/` excluded).\n4. **Violations** — Cross-package non-public imports, deleted public API use, path escape, cycles.\n5. **Minimal cut** — Canonical set of edges that prove the violation.\n6. **Result** — One status, same inputs → same output. No timestamps, no randomness.\n\n---\n\n## Why determinism\n\nSame repo snapshot and refs → same verdict. No flaky checks. The pipeline can rely on it. Identical inputs → identical outputs across environments.\n\n---\n\n## Demo\n\n**See ANCHR block structural drift in real time.**\n\n[Screenshot: BLOCK with minimal cut and suggested fix](docs/media/screenshot-block-pr-comment.png).\n\nFlow: open a PR with a messy AI change → ANCHR blocks → show comment and suggestion → apply minimal rewrite (or copy-paste fix) → push → green check.\n\n**60-second live script** (meetups, DevRel, Product Hunt, Loom): [docs/60-SECOND-DEMO-SCRIPT.md](docs/60-SECOND-DEMO-SCRIPT.md).\n\n---\n\n## run.id — Repository state identity\n\nDeterministic architectural state ID from repo content. Same `run.id` across machines ⇒ same structure and content. Content-based; no timestamps or git metadata in the hash.\n\n---\n\n## License\n\nMIT.\n","readmeFilename":"README.md"}