{"id":51556927,"url":"https://github.com/anathemaofficial/claude-calibrated-audit","last_synced_at":"2026-07-10T06:01:14.241Z","repository":{"id":368092766,"uuid":"1267410378","full_name":"AnathemaOfficial/claude-calibrated-audit","owner":"AnathemaOfficial","description":"Cost-calibrated multi-agent code audit for Claude Code — severity-gated verification, scoped finders, ~3-5x cheaper than an exhaustive run for ~90% of the value.","archived":false,"fork":false,"pushed_at":"2026-06-29T01:39:09.000Z","size":11,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":0,"default_branch":"master","last_synced_at":"2026-06-29T03:13:57.994Z","etag":null,"topics":["ai-agents","claude-code","code-audit","llm","multi-agent","security-audit","static-analysis"],"latest_commit_sha":null,"homepage":null,"language":"JavaScript","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/AnathemaOfficial.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null,"zenodo":null,"notice":null,"maintainers":null,"copyright":null,"agents":null,"dco":null,"cla":null}},"created_at":"2026-06-12T14:11:23.000Z","updated_at":"2026-06-29T01:39:13.000Z","dependencies_parsed_at":null,"dependency_job_id":null,"html_url":"https://github.com/AnathemaOfficial/claude-calibrated-audit","commit_stats":null,"previous_names":["anathemaofficial/claude-calibrated-audit"],"tags_count":null,"template":false,"template_full_name":null,"purl":"pkg:github/AnathemaOfficial/claude-calibrated-audit","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/AnathemaOfficial%2Fclaude-calibrated-audit","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/AnathemaOfficial%2Fclaude-calibrated-audit/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/AnathemaOfficial%2Fclaude-calibrated-audit/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/AnathemaOfficial%2Fclaude-calibrated-audit/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/AnathemaOfficial","download_url":"https://codeload.github.com/AnathemaOfficial/claude-calibrated-audit/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/AnathemaOfficial%2Fclaude-calibrated-audit/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":35322489,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-05-26T15:22:16.424Z","status":"online","status_checked_at":"2026-07-10T02:00:06.465Z","response_time":60,"last_error":null,"robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":true,"can_crawl_api":true,"host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["ai-agents","claude-code","code-audit","llm","multi-agent","security-audit","static-analysis"],"created_at":"2026-07-10T06:01:11.414Z","updated_at":"2026-07-10T06:01:14.236Z","avatar_url":"https://github.com/AnathemaOfficial.png","language":"JavaScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"# calibrated-audit\n\nA **cost-calibrated, multi-agent code audit** for [Claude Code](https://claude.com/claude-code) — a workflow + slash command that sweeps a repo for security and correctness issues without burning a fortune in tokens.\n\nIt fans out one agent per dimension to *find* issues, then **gates the expensive verification by severity**, and keeps the optional \"what did we miss?\" pass off by default.\n\n---\n\n## Why this exists (the cost lesson)\n\nA naive *\"be exhaustive, cost is no constraint\"* multi-agent audit of a mid-size web app cost **~15M tokens**. Reading back the agent transcripts showed where the money actually went:\n\n| | |\n|---|---|\n| Actual generation (output tokens) | **~1.2M** — small |\n| Agents that were **verification** | **76%** (140 verifiers vs 39 finders) |\n| The rest | reading + cache (cheap) |\n\nThe takeaway is counter-intuitive: **the cost is not the repo's complexity — it's the exhaustiveness knob.** Discovery is cheap. **Verification is the dial.** Cranking it to \"triple-verify everything + a second completeness wave\" is what runs up the bill — usually for the last 10% of confidence.\n\nSo this workflow bakes the discipline in instead of leaving it to a model's judgment in the moment.\n\n## The cost levers (all encoded in the workflow)\n\n1. **Scoped finders** — audit only the dimensions you ask for (default: 7 security ones, not all of them).\n2. **Severity-gated verification** — the single biggest saver:\n   - `CRITICAL` / `HIGH` → **2** adversarial lenses (refute + exploit)\n   - `MEDIUM` → **1** lens\n   - `LOW` → **0** agents (self-reported, flagged unverified)\n3. **Completeness wave OFF by default** — the \"what's missing?\" critic + follow-up finders is opt-in (`deep: true`) and capped.\n4. **Lean prompts** — findings only, no echoing source code back.\n5. **Cost summary returned every run** — an agent count so you see the spend.\n\nEstimated **~3–5× cheaper** than an ungated exhaustive run, for ~90% of the value. Run it on a **cost-efficient model** — the sub-agents inherit your session model, and that's where the savings come from.\n\n## What you get back\n\nThe workflow returns structured results:\n\n- **confirmed** — findings that survived verification (severity + `file:line` + evidence + impact + suggested fix).\n- **contested** — one lens refuted, one held → a genuine borderline worth a human call.\n- **refuted** — findings the verification *killed* (false positives), with the reasoning. This is the part that earns the verification cost: external/agentic reviewers do produce false positives, and you want them caught before they reach you.\n- **coverage** — what each finder actually read.\n\n---\n\n## Install\n\nRequires **Claude Code** with workflow support.\n\nDrop the two files into your Claude config:\n\n```\n~/.claude/workflows/calibrated-audit.js     # the orchestration (the calibration lives here)\n~/.claude/commands/audit.md                 # the /audit slash command (a thin wrapper)\n```\n\n\u003e The `/audit` command references the workflow by path — open `commands/audit.md` and set the `scriptPath` to wherever you put `calibrated-audit.js`.\n\n## Usage\n\n### Via the `/audit` command\n\n```\n/audit                          # audit the current repo, 7 security dimensions, lean\n/audit . auth,billing           # only the auth + billing dimensions\n/audit ./packages/api auth,api,storage deep   # + the completeness wave (pricier)\n/audit . auth l1                # 1 lens = ultra-cheap\n/audit . billing l3             # 3 lenses on HIGH+ = paranoid\n```\n\nAdd your own target shorthands by editing `commands/audit.md` (e.g. map `MYAPP` → an absolute path).\n\n### Or invoke the workflow directly\n\n```js\nWorkflow({\n  scriptPath: \"~/.claude/workflows/calibrated-audit.js\",\n  args: { target: \".\", scope: [\"auth\", \"billing\"], deep: false, lenses: 2 }\n})\n```\n\n### Args\n\n| arg | type | default | meaning |\n|---|---|---|---|\n| `target` | string | `\".\"` | repo / sub-path to audit |\n| `scope` | string[] | 7 security dims | `auth billing tier api connectors agent storage boundary quality drift` |\n| `deep` | bool | `false` | enable the completeness critic + follow-up wave |\n| `lenses` | number | `2` | verification lenses on HIGH+ (1 cheap → 3 paranoid) |\n\n## Dimensions\n\n`auth` · `billing` · `tier` (quotas/entitlements) · `api` (route surface) · `connectors` (third-party/OAuth) · `agent` (LLM/tool layer) · `storage` (data races/transactions) · `boundary` (HMAC/trust boundaries) · `quality` (type-safety/async) · `drift` (dead code/doc drift).\n\nEach is a focused brief; edit `DIMENSION_LIBRARY` in the workflow to add your own.\n\n## Audit ≠ review\n\nThis audits the **whole repo** (a standing sweep, no diff needed). To review **changes** (a diff / branch / PR), use Claude Code's built-in `/code-review` (which has its own effort tiers). Different tool, different job.\n\n## License\n\nMIT — see [LICENSE](LICENSE).\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fanathemaofficial%2Fclaude-calibrated-audit","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fanathemaofficial%2Fclaude-calibrated-audit","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fanathemaofficial%2Fclaude-calibrated-audit/lists"}