{
  "markdown": "<h1 align=\"center\">backtick</h1>\n\n<p align=\"center\">\n  <em>A local task compiler that gives coding agents less repository context —\n  and measures whether that actually reduces cloud tokens per verified task.</em>\n</p>\n\n<p align=\"center\">\n  <img src=\"https://img.shields.io/badge/license-MIT-111111?style=flat-square\" alt=\"MIT license\">\n  <img src=\"https://img.shields.io/badge/language-TypeScript-111111?style=flat-square\" alt=\"TypeScript\">\n  <img src=\"https://img.shields.io/badge/local%20model-Ollama-111111?style=flat-square\" alt=\"Ollama\">\n</p>\n\n**[What this is](#what-this-is) · [How it works](#how-it-works) ·\n[Try it](#try-it) · [The benchmark is the claim](#the-benchmark-is-the-claim) ·\n[Development](#development)**\n\n## What this is\n\nCoding agents burn most of their spend rediscovering your repository:\nreading files that don't matter, grepping in circles, re-sending the same\ncontext every turn. backtick moves that work to your machine.\n\nIt compiles a user request plus repository evidence into a minimal,\ntoken-budgeted **task packet** for the expensive frontier model, then\nverifies the resulting patch locally. The frontier model gets exact source\nspans, structure, tests, and diagnostics — not the repository.\n\n```text\nUser request\n    ↓\nLocal intent planner            (Ollama; deterministic fallback)\n    ↓\nRepository evidence engine      (TypeScript compiler, text search, git)\n    ↓\nToken-budgeted task packet      (500–4000 tokens, omissions named)\n    ↓\nFrontier coding agent           (Claude Code — your normal agent)\n    ↓\nPatch\n    ↓\nLocal typecheck + tests         (verify_patch)\n    ↓\nSuccess, or a compact failure packet — never the raw log\n```\n\nThe single number that decides whether any of this survives:\n\n```text\ncloud tokens / verified successful task\n```\n\n## How it works\n\nFour MCP tools (`backtick-mcp/`), one thin skill, no shell tool:\n\n| Tool | Does |\n|------|------|\n| `prepare_task` | request + token budget → evidence packet |\n| `expand_context` | pointed question → only new evidence |\n| `inspect_symbol` | definition, callers, callees, types, tests |\n| `verify_patch` | configured checks → success or compact failure packet |\n\nEvery fact carries provenance (source tool, file, line, git revision) and a\ntrust class: **FACT** (mechanically extracted), **HYPOTHESIS** (proposed by\nthe local planner — it may suggest search concepts, never repository\nfacts), **CONSTRAINT** (stated by user or project config). The original\nrequest is never rewritten.\n\nThe skill (`skills/backtick/SKILL.md`) teaches the agent the loop: prepare\nbefore exploring, work from the packet, expand what's missing, verify\nbefore claiming done. Levels set the packet budget: lite 1000 / full 2000 /\nultra 4000.\n\n## Try it\n\n```bash\nnpm install && npm install --prefix backtick-mcp\nnpm run build --prefix backtick-mcp\n\n# in a TypeScript repo with a backtick.json (see benchmarks/fixtures/ for shape):\nclaude --plugin-dir /path/to/backtick\n```\n\nOptional local planner: run [Ollama](https://ollama.com) and pull a small\ncoder model (`ollama pull qwen2.5-coder:7b`). Without it, the deterministic\nplanner takes over automatically — nothing blocks.\n\n## The benchmark is the claim\n\n`benchmarks/` runs the same headless `claude` on the same broken workspace\nacross three arms — `baseline` (normal repo tools), `control` (one frugality\nsentence), `backtick-det` (tools, no local model) — and\nthe harness, never the agent, verifies each patch. Fixtures are\nself-authored TS repos with 10 break-injected tasks, each proven to fail\nbefore any run is allowed to cost money.\n\n```bash\nnode benchmarks/validate-fixtures.js   # instrument check, no spend\nnode benchmarks/run.js --dry-run       # the matrix, no spend\nnode benchmarks/run.js --n 3           # the real thing\n```\n\nGo/no-go gate: ≥30% fewer cloud tokens per verified task than baseline, no\nsuccess-rate drop, and beats the control sentence. Results are published in\n`benchmarks/results/` — including the losses.\n\n## Development\n\n```bash\nnpm test                                   # root: adapters, hooks, sync, plus subpackages\nnpm test --prefix backtick-mcp             # engine unit tests (vitest)\nnpm run typecheck --prefix backtick-mcp\nnode scripts/build.js                      # regenerate host adapters from hand sources\nnode scripts/check-sync.js                 # staleness + canary guard\n```\n\nHand sources: `skills/backtick/SKILL.md`, `AGENTS.md`, `sources/prompts/`.\nEverything under `.cursor/`, `.windsurf/`, `.openclaw/`, etc. is generated —\nedit the sources, run the build.\n\nMIT.\n",
  "bytes": 4554,
  "sha": "72afbc50c103308f905ae26a90eed5985714b9b6f126cb7e4289e64d8d130adc",
  "repo_slug": "amalshehu/backtick",
  "fonte": "repo",
  "truncated": false,
  "api": "https://agentalog.com/api/listings/plg_amalshehu_backtick_34d9bd2b/readme"
}