# M3 Technical Plan — docs a machine can read, and the skill Implementation plan for milestone M3 of [Harlequin for agents](./harlequin-for-agents.md), following [M1](./m1-hsql-technical-plan.md) and [M2](./m2-hsql-technical-plan.md). M1 built the command, M2 taught it to describe itself. This one is about everything an agent reads *before* it runs `hsql`: the documentation, and the skill that tells it which flag to reach for. **M3's scope, from the roadmap:** `llms.txt`, `llms-full.txt`, raw `.md` routes, Docs API v1, copy-as-markdown, homepage positioning, and `AGENTS.md` — Workstream D. **The Harlequin skill (E1) is pulled forward from M4** (Ted's call). The rest of M4 — `hsql open`, JSONL history, "Copy CLI command", the external-command hook — stays in M4. **Where M2 actually got to.** PRs 1–12, 15 and 16 shipped: the per-file/per-profile config work, the five self-description modes, secrets and `${VAR}`, `--catalog`, `type_name` and `--catalog-search`. PRs 13 (`--read-only` and the capability declarations), 14 (`--timeout`) and 17 (the safety docs) are in flight and unshipped, which is a real dependency here and not a footnote: two of the nine things the product plan says the skill should teach are flags that do not exist yet (§1.9). **Two repos, and most of the work is in the other one.** `tconbeer/harlequin-web` is where `llms.txt`, the raw routes, the API and the docs topic live. That repo has no tests, no CI beyond a Vercel preview build, and a `pnpm lint` pre-commit hook. M3 is the first milestone that has to treat it as a build target rather than a place to paste prose. **Bottom line up front.** Three claims, each measured below: 1. **Docs written for machines have to be true, and today they are not.** `hsql --parquet` and `hsql --results` are documented on the site, in the packaged README, *and* in the homepage's terminal mock-up; both exit 2 with "No such option" (§1.4). The one page written for agents prints `&lbrace"status":"ok"…` where `{"status":"ok"…}` belongs (§1.3). `https://harlequin.sh/schemas/config/v1.json`, which every schema `hsql --config schema` generates names as its `$id`, is a 404 (§1.5). Nothing in either repo checks any of this. **The first thing M3 builds is the check, not the corpus** — publishing more machine-read text over an unchecked pipeline multiplies the blast radius of exactly this bug. 2. **A page's markdown source is not its markdown output, and four features want the same transform.** 24 of 55 pages open a `