---
name: "skill-ops-sync"
type: skill
description: Audit parity between the Claude-side saved artefacts (canon) and the claude-ops repo (published mirror), and raise publish tickets where Claude is ahead so the agents site and the remote routines build from current source. Each run also sweeps frontmatter hygiene, routing canon-side defects to the Pulse queue and repo-side staleness to a publish ticket so a defect is raised once and stops recurring. A publish ticket it raises carries both checkbox sections and asserts byte-parity from a computed digest, never from the shape of a diff. One-way — Claude to repo, never repo to Claude. Reads the local claude-ops clone; GitHub's REST API authenticates from this surface but every repository route returns 403 until the repo is attached (read 2026-11-11). Runs as a scheduled Cowork task on the Linear connector; proposes only — never commits, never edits Claude.
license: CC BY-NC-SA 4.0
---

# skill-ops-sync

Audits parity between **Claude** (the saved artefacts — **canon**) and the **claude-ops repo** (a **one-way published mirror**, downstream of Claude). The Claude-side copies are the source of truth for skill, convention, agent, task and routine content; claude-ops is published *from* them, so [agents.aledpritchard.com](http://agents.aledpritchard.com) and the remote Cloud Routines build from complete, current source. This skill detects where canon is ahead of the repo and **raises publish tickets** to close the gap. Direction is always **Claude to repo, never repo to Claude.** Follows `convention-linear`. Runs as a scheduled Cowork task. **Proposes only — never commits to the repo, never edits Claude, never deletes.**

## Why this matters

Nothing else enforces parity, and drift is silent. An artefact edited in Claude (canon) but not yet published only surfaces when the site or a remote routine builds from stale or missing source. The dangerous case is an artefact that exists in Claude but not in the repo: the page and the routines build from the repo, so that artefact simply never reaches them. This audit catches that before they do.

## What the audit checks — and what it no longer needs to

Under the **wrapper model** (decision 2026-06-25) every `routine-*` / `task-*` is an ordinary canon artefact in the skills store, and each Cloud Routine / Cowork config is a thin loader (`Read .claude/skills/<artefact-name>/SKILL.md and follow it verbatim`) holding no instructions of its own. Two consequences for this audit:

* **There is no separate task-config body to publish.** The earlier task-layer path — mirroring a live scheduled-task config into the repo — is obsolete and removed; a `task-*` / `routine-*` is audited skill-store ↔ repo exactly like a skill. (That path once published stale wording faithfully, APP-300, 2026-06-25; the wrapper model makes the failure structurally impossible, so the path is gone rather than guarded.)
* **The comparison is a site-freshness check, not an execution-correctness one.** Cowork tasks load their skill from the store **at run time**, so task *execution* already tracks current canon regardless of the repo. What the repo/local-clone comparison protects is the **agents site** (and the cloned Cloud Routines, which read from the repo): it ensures they build from current source. The old skill-canon ↔ scheduled-task-config blind spot is therefore structurally gone, and the hourly local-clone lag is harmless to task execution — it only delays site/clone freshness, which a publish ticket closes.

## Reading the repo — local clone; GitHub reachable, repositories unattached

**The scheduled environment reaches GitHub and authenticates; what it lacks is repository attachment.** Re-probed on this cloud surface 2026-11-11: `gh` is present at **2.89.0**, `gh api user` returns **HTTP 200** authenticating as `assoc-one`, and `gh api rate_limit` returns 200 with a 15,000/hour core limit. The earlier reading of this section — that this surface holds no GitHub credential at all — was therefore **false as stated**, and three narrower things are true in its place, each probed the same day. **Repository routes are gated:** `gh api repos/assoc-one/claude-ops` returns **403** whose body names `add_repo` as the route to request access, and `gh api repos/cli/cli` — a public repository — returns the identical 403, so the gate is per-session repo *attachment*, not repo privacy. **GraphQL is blocked:** `gh api graphql` returns 403 (*GitHub GraphQL is not available from Claude Code sessions*), which is why `gh pr checks 236 --repo assoc-one/claude-ops` returns 403 rather than a check list. **Raw git network operations still fail,** though not for want of network: `git ls-remote https://github.com/assoc-one/claude-ops` dies at `could not read Username for 'https://github.com': terminal prompts disabled`. The operating instruction is unchanged — do not use a GitHub connector and do not run clone / fetch / ls-remote / push, they will fail — but the reason is now named correctly, and so is the remedy: a leg that needs a repo-side read asks for **that repository to be attached**, by name, and runs the one probe that would answer, instead of recording the whole class of reads as impossible. The distinction is the whole point of correcting it, because the false premise read as well-formed: every file, flag and command the old wording named is real somewhere. **Each figure above is specific to this surface and dated (`read 2026-11-11`)** — it is a measurement of a named runtime's behaviour at a moment, never a property of `gh`, of GitHub, or of 'the cloud', and the same probes on the local-device surface, or on this one after an attachment grant, may answer differently; a run re-probes and writes what it measured rather than inheriting these numbers. What ops-sync should do about its publish route — whether to ask for attachment, and what to use instead of the clone — is **not** settled here: `APP-2353` carries that question and the grant it needs is the Owner's. (One further measurement, taken 2026-11-11 from `list_triggers` on the Claude Code Remote connector and **not** resolved by this correction: the enabled cloud trigger `trig_01C3nQeMMCXMoX9ztWYgFf8Z` — *Task ops sync (cloud)* — reports `folders: []`, while its disabled sibling `trig_01UT6WYLga78w5bU98y3BRe2` is the one carrying `/Users/aledpritchard/claude-ops`; and `/Users` does not exist on the surface these probes ran on. So the clone route named next may simply be absent on the enabled surface, in which case the *stop and report rather than guessing* rule below applies unchanged and the run records the repo side as not read. Which route replaces it is `APP-2353`'s and the Owner's, not this section's.) Read the repo from the **local connected clone** at `/Users/aledpritchard/claude-ops` (its `canon/skills` and `canon/tasks` directories), the working copy mounted in this workspace, using workspace file access.

**Reading canon — the synced skills store on disk, not the skills tool.** The Claude side of this comparison is a filesystem read, and the route is named here for the same reason the repo route is: a run that has to rediscover it gets one chance to miss it. The store is `~/.claude/skills/synced/<marketplace-id>/<artefact>/SKILL.md` — one directory per artefact plus a `manifest.json` at the store root — so a byte count or a `sha256` digest of any artefact is an ordinary file read against that path, not a tool capability to hunt for. Two near-misses are worth naming, because a run that hits either reports an absent measurement in good faith. `~/.claude/plugins/synced/<marketplace-id>/` is the **plugin** marketplaces — sales, design, engineering and the rest — and carries no canon even though the marketplace id is the same, so finding plugin skills there is not evidence that canon is unmounted; the canon store sits one directory away, under `skills/synced`. And the `Skill` tool loads an artefact's instructions into the turn rather than returning its bytes, while `ListSkills` and `SearchSkills` return a name, a one-line description and an enabled state only: none of the three is a content read, so a parity figure may never be taken from them. Where the store genuinely cannot be read on a surface, report the content-parity check as not run and say which path was attempted — an absent measurement is recorded as absent, exactly as the repo-side rule requires, never inferred from the catalogue. (Worked case: the 2026-11-05 cloud scheduled run completed enumeration parity on 163 artefacts, the frontmatter sweep and both reconciliation sweeps, then reported the content-parity comparison as impossible for want of a canon-side byte count; the store was readable the whole run, one directory away from the `plugins/synced` path it checked. Measured directly from the store since: it holds **178 artefact directories** plus `manifest.json`, and `skill-coordinate/SKILL.md` reads back at **128,482 B** — exactly the figure `APP-1874` cites from its 2026-11-03 measurement. The two artefact counts measure different things and are left unreconciled here: 178 is the directory count in the canon store, while the run's 163 is its repo-side enumeration — 130 `canon/skills/` plus 33 `canon/tasks/` — matched by name against the skills catalogue, so a parity run states which side each figure came from. `APP-2904`.)

**Compare against the fetched `origin/main` tree, never against the checked-out worktree.** A healthy hourly fetch is not the same thing as a current working copy: the launchd job fast-forwards `refs/remotes/origin/main` on schedule while the checked-out `main` branch can sit many commits behind that same fetched ref, so the files on disk are a revision nobody published from. Read each repo-side file at the ref — `git show origin/main:<path>`, or `git ls-tree origin/main` to enumerate — which is **a local object read and not a network operation**: the objects are already in the clone once the fetch has run, so this sits inside the local-clone-only rule rather than against it: it reads objects already on disk, makes no API call and needs no repository attached. Before trusting either side, run the cheap health check: assert `git rev-parse main` is an ancestor of `git rev-parse origin/main`, and record the **ahead/behind count against the fetched ref before trusting either**, so **a stuck checked-out branch is caught and reported, never read as current**. **Record in the report both the `origin/main` commit the comparison was made at and the worktree `HEAD`**, naming which one each figure came from: a "Claude ahead" result read off the ref is a measurement, one read off the worktree is a guess. If you cannot read the folder at all, stop and report that rather than guessing. (Worked case: on the 2026-10-07 run the fetch was healthy — `pull --ff-only` at 11:58 UTC, the minute before the task fired — while the checked-out `main` was **27 commits behind** the fetched ref, its `HEAD` stuck at a commit dated 2026-10-01. A first pass against the worktree found **36 differing artefacts**; the same comparison against `git show origin/main:<path>` found **20**, because 16 had been published days earlier and only the working copy had not caught up. Trusting the worktree overstates "Claude ahead" by roughly 2x and re-raises publish tickets for artefacts already published, which the dedup-by-Linear-search step only partially catches — APP-2154.) **The rule guards the worktree-behind case only; where the worktree is ahead of the fetched ref, read at `HEAD` and say so.** The fetched ref is the published revision in the ordinary case, which is why the comparison is made there — but the ref can itself be the stale side, and reading it then re-raises already-published work as repo-only orphans. Where `git merge-base --is-ancestor origin/main HEAD` passes, `git status` reports a clean tree, and every commit the worktree carries beyond the fetched ref is a well-formed merge, the checked-out worktree is the **more current** source and the fetched ref is the stale one: read each repo-side file at `HEAD` for that run, not at the ref. The substitution is never silent — **record both SHAs, the direction found, and the substitution made in the run's report**, so a later reader can see which revision each figure came from. The rule is unchanged for the worktree-behind direction; the ahead case is the exception the health check now names, not a weakening of it, and the three conditions are read together because any one of them alone leaves the worktree a revision nobody published from. (Worked case: the 2026-10-15 run found the checked-out worktree **13 commits ahead** of the fetched ref, the tree clean and every extra commit a well-formed merge; following the rule in that direction would have read the stale ref and re-raised already-published work as repo-only orphans. Every repo-side figure here is **unverified from this surface** — the 13-commit count, both SHAs and the fetch time — because no repo is readable from the authoring surface. APP-2392.)

## Placement map (the rules the audit enforces)

On the **Claude (canon)** side, every authored artefact lives in `.claude/skills/`. On the **repo (claude-ops)** side the layout differs: skills, conventions, agents, core and routines live in `canon/skills/`, while **tasks (`task-*`) live in `canon/tasks/`** — the repo's canon source moved out of `.claude/` on 2026-09-14 and `.claude/skills/` and `.claude/tasks/` no longer exist there at all, so the old paths are not a synonym but a dead end (APP-1457 repointed `build-manifest.ts`, APP-1458 the matching `agents-site` content build; repo-side premise **unverified from this surface** — `assoc-one/claude-ops` is not readable here and would need `origin/main`, and the paths are carried from the 2026-09-23 run's read of the local connected clone) — `build-manifest.ts` classifies by the `type:` frontmatter, defaulting by directory (`canon/skills/` → skill, `canon/tasks/` → task). The `type:` field (skill / convention / agent / task / routine / core / workflow / playbook) sets the kind; an artefact must exist on both sides, whichever directory holds it on the repo side.

| Artefact | Claude (canon) | Repo (claude-ops) | Rule |
| -- | -- | -- | -- |
| Skills / conventions / agents | Required — source of truth | Required — published copy | Must exist in both; **Claude wins on content** |
| Tasks (`task-*`) and routines (`routine-*`) | Required — source of truth | Required — published copy + site/clone source (`task-*` under `canon/tasks/`, `routine-*` under `canon/skills/`) | Must exist in both; Claude wins on content. **These are legitimate saved artefacts, not orphans.** |
| Repo-native files (`build-manifest.ts`, `package.json`, the site, CI) | n/a | Required — repo is canon for these | Repo-only; no Claude copy; edited in the repo directly |
| Linear reference copies (os.Claude docs) | n/a | n/a | Reference only; never the source |

> Supersedes the earlier rule that a saved `routine-*` / `task-*` was a mis-placed "orphan to delete." Under the wrapper model (decision 2026-06-25) routines and tasks are authored as canon artefacts in the skills store and loaded by a thin scheduled-task / Cloud Routine config; a saved `task-*` / `routine-*` is therefore correct, required in both, and audited exactly like a skill. The only orphan is an artefact that exists on one side after a deletion on the other.

## Frontmatter-hygiene sweep (every run)

Frontmatter defects are not cosmetic noise to flag and move past — flagging without acting is why the same defects resurfaced run after run and were never fixed (APP-302, APP-323, APP-340, across 2026-06-25 to -27). So each run **sweeps frontmatter and routes every defect to the lane that actually closes it**, then it stops appearing. Check each artefact's frontmatter against `convention-artefact-format`. A defect is a **schema break**, and the list is closed rather than judged: a **required key missing or misnamed** (`summary:` where `description:` is expected); the three required keys `name`, `type`, `description` **out of relative order** with respect to one another; **YAML the parser rejects** — a `": "` in an unquoted scalar is invalid and must be quoted; **`type:` absent**, or not matching the `name` prefix; or a **duplicate frontmatter block**, a stray header above the real one that hides the real `type:`. Nothing else is a defect.

**The position of an optional key is never a defect and never a hold.** The required order is **relative, not contiguous** — an optional `license:` or `status:` may sit anywhere in the block, including between the required keys, so `name`, `type`, `license`, `description` is a file with its three required keys in order and a clean schema (`convention-artefact-format`, *The three-key order is relative, not contiguous*). Where an optional key sits is a consistency preference for an authoring pass to apply going forward; it is not this sweep's business, it is not raised as a Pulse defect, and it never withholds a publish. Read the check as written and do not widen it: "in order" is not "adjacent". (Worked case: the run of 2026-09-08 read this line's "present and in order" as contiguity and withheld **25 of that run's 33 Claude-ahead publish candidates** — 7 brand-new artefacts and 18 edits — as broken frontmatter, against a rule canon does not contain: 33 artefacts carry `license:` before `description:` and nothing in `convention-artefact-format` forbids it. The repo fell a further day behind canon while the sweep held work back on a defect that did not exist, which is the same silent drift the sweep exists to remove. A false hold and a missed publish cost the same thing — APP-633.)

Route by where the defect lives:

* **Canon-side defect** (missing `type:`, invalid/unquoted YAML `description:`, a schema gap vs `convention-artefact-format`) → the fix belongs in canon, which this skill never edits. **File it to the Pulse queue** as a `FRICTION:` note (Apps / os.Claude, `agent:PUL-5E` + `type:task` + `work:configuration`, Backlog, unassigned), exactly as APP-340 was filed. First **dedup**: if an open Pulse note already covers the same defect class, add a dated recurrence comment instead of opening a second. The Pulse retro drain then produces the corrected `.skill`, and a later run of this skill publishes it. **Do not raise a publish ticket for a file whose canon frontmatter is broken in one of the enumerated ways above** — publishing it would overwrite the repo's valid copy with the broken one; wait until canon is fixed. The hold is that list and nothing wider: a file that fails only a preference, an optional key's position included, is published normally.
* **Repo-side-only staleness** (canon frontmatter is correct, the repo copy lags) → the normal **publish ticket**, like any "Claude ahead" content difference.
* **Genuinely identical frontmatter** → in sync; stays silent.

Net effect: each defect is raised once into a fix lane and then disappears from later reports, rather than being re-flagged indefinitely.

## Done-without-a-merge sweep (every run)

A ticket marked **Done** whose implementing PR is still open, draft or unmerged reads on the board as settled ground, and the next ticket that builds "per the pattern in `<ticket>`" finds the pattern in no merged state of the repo. `skill-merge-pr`'s *never write Done unconfirmed* guard governs the **merge leg's own write** and nothing else, so a Done that arrived by another route — a hand-move, a different session, a state copied across from a sibling, a coincidentally attached PR — passes it untouched. A merge-time guard cannot see that population; only a sweep can, which is why the check lives here rather than in `skill-merge-pr`.

**What the sweep reads.** Each run, for tickets moved to **Done** since the previous run across the delivery teams, read the ticket's attached pull requests and the merge state of each. A ticket is a **mismatch** where it carries at least one attached PR and **none of its attached PRs is `merged: true`** — every one open, draft, closed-unmerged or otherwise unmerged. A ticket with **no** attached PR is **not** a mismatch and is not reported: plenty of Done work carries no PR, and flagging it would bury the real cases. Where several PRs are attached and at least one is merged, check that a merged one actually implements the ticket's own acceptance criteria rather than a sibling's, and where it plainly does not — a different ticket's identifier in its title or body — report it as a mismatch with both PRs named, because a coincidental merge is the mechanism that makes this class invisible.

**What it does with a mismatch: surface, never auto-move.** Report each mismatch in the run's parity report, naming the ticket, its `completedAt`, each attached PR with its number and state, and any downstream ticket whose description cites the mismatched one. **The sweep never writes a state** — it does not reopen the ticket, does not move it out of Done, does not re-assign it and does not close the PR. This skill proposes and never commits, and a Done state is the Owner's or the merge leg's to move; a sweep that reopened tickets would fight the board. Where the mismatch is blocking named downstream work, surface it as the ordinary Owner-facing item with the two remedies stated — land the PR, or move the unmet criteria to a reopened ticket — and leave the choice with him. First **dedup**, as elsewhere in this skill: where an open item already covers the same ticket, add a dated recurrence comment rather than opening a second.

**And where the merge state cannot be read at all, "unverifiable" is the sweep's third outcome — named, never guessed and never quietly dropped.** This surface authenticates to GitHub but has no repository attached (*Reading the repo*; re-probed 2026-11-11) and the connected clone is `claude-ops` only, so for a pull request in any other repo there is still no route to its merge state — the same gap, reached by a different and narrower route than this clause used to name. `gh api user` returns **HTTP 200** as `assoc-one`, yet any `repos/{owner}/{repo}` read for a repository not attached to the session returns **403** naming `add_repo`, and `gh pr checks` returns 403 on top of that because GraphQL is unavailable from Claude Code sessions; `gh auth status` does fail here (*the token in `GH_TOKEN` is invalid*), which is worth stating precisely because it disagrees with that 200 — a leg that stops at the `gh auth status` line concludes a great deal more than the surface actually denies it. Every git network operation is forbidden by that same section, and Linear's attachment data for a GitHub pull-request link returns a title and a URL with no merge or state field. That is every delivery-team ticket this sweep exists for, so the gap is structural rather than incidental. The sweep therefore has **three** outcomes, not two: **in sync**, **mismatch**, and **unverifiable** — at least one attached pull request whose merge state this run could not read. Report an unverifiable ticket by ID with its completion time, each attached pull request, and which read failed, and say plainly that it is **not** a reported mismatch: that is a narrower claim, and conflating the two would put a guessed Done-without-a-merge into the parity report. Assert no state for it, and open no Owner-facing item on it — the finding is the capability, not the ticket. **The missing read is not placed here on purpose.** `core-operating-model`, *Surface placement*, puts any job needing GitHub or repo network on a Cloud Routine, "the only surface with GitHub", so confirming merge state for a repo outside the connected clone has been read as belonging to a surface that already holds those credentials rather than to this one — but the 2026-11-11 probes move the missing grant: this surface already holds a working API identity, so what it lacks is the **repository attached to the session** (the 403 names `add_repo`), plus a REST route for whatever `gh pr checks` would have fetched over the blocked GraphQL endpoint. Asking for that attachment is a narrower request than acquiring credentials, and it is still the Owner's to grant; `core-operating-model`'s *Surface placement* continues to read "the only surface with GitHub", which this section does not amend and which is noted here only so the two are read together. Until one of those happens, the honest sweep is the one that reports the gap it cannot close. (Worked case: the `task-ops-sync` run of 2026-10-08 — four Done candidates; two correctly not mismatches, carrying no attached pull request; two more, A1-581 and A1-526, unverifiable on all three routes. The run flagged only and asserted no state, which is the right call, and this clause makes it the named outcome rather than a judgement each run re-derives. APP-2188, and the class the sweep exists for, APP-1795 / APP-1282. The connected-folder set and the Linear attachment field set are that run's report and remain **unverified** here; the `gh auth status` failure no longer travels on that flag, because it was re-probed on this surface 2026-11-11 and does still fail — alongside a `gh api user` that returns 200, which is why the two are now reported together rather than one standing for the other. That flag covers those two only — the repository-attachment gate and the `claude-ops`-only clone are this skill's own *Reading the repo* section.)

**Worked case (reported, not observed from this surface).** `A1-387` (*console — retire the four-tab routes, redirect*) reads **Done** with `completedAt` set, while `assoc-one/firmup-operator#29`, the PR carrying its own acceptance criteria, is **open, draft and unmerged** off an earlier `main`; a second PR on the same ticket, #32, is merged but belongs to APP-1282, a `CLAUDE.md`-only OPS ticket. The four-tab view `A1-387` was to retire is still live on `main`. Downstream, `A1-545`'s AC9 — *retire or redirect per the pattern in A1-387* — could not be satisfied against a pattern that exists only on an unmerged branch: its exec leg spent a pass discovering the view was still live and reading #29 in full, and two QA passes could not close the box, the second routing `A1-545` to Blocked with `human` on the Owner. Nothing was wrong with that diff. This is the coincidental-merge shape above: had the sweep been running, the mismatch would have surfaced from `A1-387`'s own attachments on the day it went Done, rather than from a downstream ticket's failure a week later (APP-1795).

Net effect: a Done that did not arrive by a merge is named once, in the run that can still see it, instead of being re-derived by each downstream ticket that trusts it.

## Open-publish-ticket reconciliation sweep (every run)

The raise-side dedup in step 3 and the executor's re-anchor in acceptance criterion (a) each protect a publish ticket at **one moment** — the moment it is created, and the moment it is first built. Neither protects a publish ticket that **sits**. A publish ticket blocked on CI, on an Owner question or on a canon-drift query can sit open for weeks while canon and the repo both move past it by routes that ticket does not track, and the two residual open boxes it still carries ("CI green", "review verdict") then read to every passing sweep as the only work left. Re-running CI and merging on that reading does not waste a run; it **re-commits superseded bytes over current ones**, which is a regression shipped under a parity ticket.

**What the sweep reads.** Each run, after the parity comparison, enumerate the **open** ops-sync publish tickets (Apps / os.Claude, any state short of Done — Blocked, Todo, In Progress and In Review included) and, for each, re-compare **every artefact it attaches** against the current `origin/main` tree. Same ref-based read as *Reading the repo*: not the worktree, and never the ref recorded in the ticket, which is the raise-time basis and is expected to be stale. Classify each ticket by how much of its own set origin already carries:

* **Wholly superseded** — origin carries the canon bytes for **every** attached artefact. The ticket's work is done by other means and its PR is now **a revert in waiting**. Report it as wholly superseded, naming each artefact, the ref compared at, and the publish route that carried it where one is identifiable.
* **Partially superseded** — origin carries some. Report the superseded subset and the live remainder **separately**, and recommend the split: the remainder is the real publish, the superseded subset closes as already-published. This is the shape APP-1617 handled correctly at N=1 (*further drift, split out*); this sweep exists because at N-of-N no comparable instinct fired.
* **Not superseded** — origin carries none of the canon bytes. In sync with the ticket's premise; stays silent.

**A re-route recommendation on an open publish ticket is a build decision, not bookkeeping.** The residual checkboxes are not the state to reason from. No run recommends, routes or executes "re-run CI and merge" on an ops-sync publish ticket without first re-running that ticket's own acceptance criterion (a) comparison against live `origin/main`. A ticket whose own earlier leg already found its set stale is **not** reset by a later sweep reading its boxes: the stale finding stands until a fresh comparison overturns it, and a sweep that cannot make the comparison reports that rather than recommending the merge. The comparison costs minutes and it is **the only thing standing between a re-run and a revert**.

**Surface, never auto-move** — as with the Done-without-a-merge sweep above. This sweep reports; it does not close the publish ticket, does not move its state, does not close its PR, does not re-route it and does not re-cut it. Where a ticket is wholly superseded, name the two remedies and leave the choice with the Owner: close it as already-published and close the PR unmerged, or re-cut it against the current ref. **Dedup** as elsewhere in this skill: where an open item already covers the same publish ticket, add a dated recurrence comment rather than opening a second.

**Worked case (reported; repo-side premise unverified from the audit surface).** APP-1378, a 6-artefact publish ticket whose PR #236 opened 2026-09-13, sat across CI-billing and canon-drift blockers for nearly four weeks. An exec leg on 2026-09-28 re-verified it, found **5 of its 6** artefacts already stale against live canon, correctly declined to build through it and raised the question. Four later sweeps (2026-09-30, 2026-09-30/10-06, 2026-10-07) each read the two remaining open boxes as the only residual work and recommended or executed a re-route to "just re-run CI" — none of them re-running the 2026-09-28 leg's own comparison. By 2026-10-07 **all six** artefacts were byte-identical on `origin/main`, one via the tracked APP-1617 / PR #271 and the other five via an untracked publish route, so merging #236 would have reverted four stand-up-loader artefacts from their current post-APP-1657 text back to superseded pre-APP-1657 text. Five passes over four weeks read the board state and none of them read the bytes (APP-2155).

## Audit behaviour

Runs as a scheduled Cowork task on the **Linear connector** plus workspace file access to the local clone.

1. **Enumerate** the saved skills, conventions, agents, tasks and routines on the Claude side and the corresponding directories in the local claude-ops clone (`canon/skills` and `canon/tasks`). Record the clone's `HEAD` commit. **Where neither directory is present, stop and report it rather than falling back to `.claude/skills`** — that is where canon lived before 2026-09-14 and its presence today would mean the clone is far behind, not that the layout is a choice.
2. **Compare** content, normalising whitespace before diffing. Run the **frontmatter-hygiene sweep** (above) as part of this pass.
3. **Claude ahead of repo** (changed in Claude, or new in Claude and not yet in the repo) → BEFORE raising anything, **dedup**: search Linear (Apps / os.Claude) for an existing publish ticket for that artefact — open, or resolved/Done within the last ~7 days. If one exists, **skip** and note "appears published or in-flight; local clone may be behind — pull to confirm" (prevents duplicate tickets when the clone lags origin). **Re-run that dedup against live `origin/main` immediately before each raise, never only against the sweep's opening snapshot.** A sweep enumerates once and then raises N tickets through parallel subagents, so the comparison that justified a ticket can be minutes to hours old by the time that ticket is written, and a sibling publish merging inside that window makes the ticket dead on arrival. Each raising subagent therefore re-fetches `origin/main` and re-compares **its own artefact** as the last act before the create: where origin already carries the canon bytes, the ticket is **not raised** and the artefact is reported as published in-sweep. This is the raise-side twin of the executor's re-anchor rule — the same stale basis, caught one step earlier and at a fraction of the cost. **The collision is not confined to a sweep's own siblings**, so a dedup evaluated only over this run's raised set is insufficient: a ticket from an earlier day's sweep can merge in the minutes before this sweep raises its own for the same artefact, and a "Last published by" citation carried from the snapshot is stale in exactly the same way. Where a dead ticket is raised regardless, `skill-build-ticket` step 3a's already-satisfied path absorbs it correctly and the ticket closes as already-published; that path is the backstop, never the plan. (Three instances on 2026-10-01, each costing a full claim → investigate → route cycle: APP-1950 for `routine-delivery-loop` raised on basis `f48c045` against APP-1913's merged `5d217eb`, identical sha256 `67ee25571baa…c538df` at 117,955 bytes; APP-1953 for `skill-ops-retro` created 13:34:27Z against APP-1912's `6605601` completed 13:27:34Z, **under seven minutes earlier** and a cross-sweep collision; APP-1955 for `skill-triage` against APP-1915 / PR #355 / `c33b535`, its own "Last published by" citing the already-stale APP-1824 — APP-1958.) Otherwise — and provided the canon frontmatter is clean (a broken-frontmatter file is held back per the sweep) — **raise a publish ticket straight to Todo (ready) with `agent:F0-RGE` (Forge)**, not Backlog/Relay. A publish ticket is **born ready**: it is mechanical and fully specified (the action is "commit the attached file verbatim"), so it skips the refinement gate to close the sync gap (the standing "unless he has said otherwise" exception, convention-ticket). Attach the current Claude-side `SKILL.md` as a file (see *The publish handoff*) and **embed both checkbox sections** — `## Acceptance criteria` and `## Definition of done`, Pattern A, per *Publish-ticket rigour* below. The acceptance criteria, in order: (a) **verify the artefact is genuinely absent or behind on `origin/main` first** — pull/compare; if origin already carries it, close as already-published and do **not** double-commit. **The clone `HEAD` this ticket records is the raise-time basis, not the execution-time one, and is expected to be behind by the time the ticket runs** — the run's sibling batches merge while it sits. So the executor **fetches and re-anchors every origin comparison to live `origin/main` at execution time, and records in the PR body the ref it actually compared against**, never the ref written into the ticket. Comparing against the recorded ref is wrong by construction rather than by accident: recorded base `917173f` (2026-09-08) was two sibling merges behind — `804c3ed`, `49c51da` — by the time that run's batch 3 executed, and the more batches one run raises the wider that gap opens (APP-1268, APP-1265). **The per-artefact `sha256` in this ticket is canon-side and independent of the repo `HEAD`**: it fixes which bytes must be committed and says nothing about what origin currently holds, so the two figures are not one basis — a stale `HEAD` never invalidates the digest, and a matching digest never establishes that the origin comparison was made against current origin; (b) commit the attached file **byte-for-byte, confirmed per artefact by a digest comparison** and not by the shape of the diff; (c) confirm the artefacts **render**, from a local `agents-site` build against this branch's canon — the criterion names the local build, never the deployed site, and carries the method and its control per *The site render is built, not waived* below. **The criterion also names its render surfaces by artefact type, at ticket-writing time, rather than leaving the executing leg to infer them.** For `type: agent`, name `/agents/[slug]` as a **structured-field view only** — it extracts a fixed set of labelled fields and silently drops freeform sections, so it is never written in as a witness that body content landed. For **every other type** there is no per-slug page at all, so the criterion names the `/downloads` index entry, the built `content/artefacts.json` and — as the control — the served `public/downloads/<name>.md` digest, base ≠ head with head equal to the ticket's canon digest. **A publish ticket must not assert that a non-`agent` artefact has a per-slug canon detail page**: the criterion is then unsatisfiable as written, and both the exec and the QA leg spend the render check arguing against the ticket's own wording before they can pass it. (Worked case: APP-2493's criterion (c) asserted that `convention-github` has a per-slug canon detail page, the QA brief repeated it, and both legs had to argue against it. The generalisation below was at that point written for `skill-*` and `task-*` only, which is why a `convention-*` leg could read it as not applying — APP-2508, 2026-10-21.) Forge opens the PR and **never merges** — Prism's review and the Relay merge leg are unchanged, and a clean Prism verdict is what arms the merge on this ticket class rather than an Owner approval (see *The publish handoff*; APP-1163). Never commit directly. **Keep each publish ticket to ≤10 artefacts and ≤60 KB of attached bytes, whichever binds first.** The count cap (16 attachments on APP-392, 2026-06-30, forced a compaction-and-re-fetch round) is not the binding one: byte-for-byte is the acceptance criterion, so every attached byte transits the exec leg's context twice, and the leg's exposure to an infrastructure interruption grows with its length. The size is already known at `prepare_attachment_upload`, so sum it. A 33 KB ticket (APP-901) completed; 154 KB and 237 KB tickets (APP-986, APP-989, nine artefacts each) were claimed and abandoned repeatedly, ghost-claiming their repo each time; single artefacts reach 59 KB, so one large file may be a ticket on its own. Split a larger Claude-ahead set across several publish tickets under both caps rather than raising one oversized ticket (APP-1004). **A run raises every batch in the same pass, via parallel subagent dispatch — one subagent per ticket-batch — never a first tranche now and a remainder later.** Where the split yields N ticket-batches, the run dispatches N subagents concurrently and the pass ends when all N tickets are raised. The caps bound the **size of a ticket**, not the **reach of a run**: a run that raises 2 of 25 tickets has left nine-tenths of the parity gap open with nothing scheduled to close it, and the repo falls a further day behind canon for every day the remainder waits — the same silent drift this audit exists to remove. (Worked case, reported: a run split 69 Claude-ahead artefacts into 25 tickets under both caps, raised 2 of them covering 15 artefacts, and deferred 54 artefacts to some later run. Dispatching 23 parallel subagents then cleared the entire remainder in one run, every ticket raised and succeeding first pass. The historical pattern this replaces took several daily runs to drain one backlog — APP-773 through APP-1174. Owner instruction, Aled: *"keeping 54 improvements for some other time in the future is not a good result"* — APP-1265.) **A follow-up run survives only as a named exception, never as a default.** Where a specific batch genuinely cannot be raised this pass — an attachment upload failing repeatedly, a Linear error, a canon file that cannot be read — that batch alone is named in the report as deferred, with the reason, and the next run picks it up. The size of the Claude-ahead set is not one of those reasons.
   * **Link a sibling repo-lane dependency ticket so it is not left stale-open.** Where the canon being published has a **known repo-native dependency tracked by a separate open repo-lane ticket** — an `OPS:`/`FIX:` on `agent:R3-LAY`/`F0-RGE`, typically filed by the Pulse drain per `skill-ops-retro` 4a (worked case: APP-407 tracked adding the `operator` type to `build-manifest.ts`, a dependency of the operator-layer publish) — **relate the publish ticket to that sibling** and note in the publish ticket that executing it may *incidentally* make the same repo-native change to unblock itself. This is so that when either lands, triage can recognise the sibling as already-satisfied and close it, rather than leaving it live under `R3-LAY` looking like unbuilt work. Worked case: APP-409 (a publish ticket) hit the repo-native blocker and incidentally shipped the `operator`-type change in PR #133 — exactly what the separate APP-407 was raised to make — and APP-407 then sat live in Backlog until the triage freshness check caught it (2026-07-03). Relating the two at publish time closes that coordination gap at source; the freshness check remains the backstop, not the only guard.
4. **In repo, missing from Claude** → either a legitimately repo-native file (ignore — see placement map), or an orphan left after a Claude-side deletion → flag for Aled to confirm removal from the repo. Never delete.
5. **Edited on both sides** → Claude is canon, but do not assume: flag to Aled with a diff and let him confirm before a publish ticket is raised.
6. **Report** — end every run with a short parity report: the clone `HEAD` compared against, in-sync count, publish tickets raised (with the per-artefact byte size, and the digest where one could be computed), sibling repo-lane tickets related (IDs), frontmatter defects captured to the Pulse queue (and recurrence comments added), items skipped as already-published/in-flight, items flagged, orphans surfaced (both directions).

## The publish handoff (Claude → repo)

This is how a canon change reaches the repo — it applies whenever Claude is ahead.

- Canon content is **authored Claude-side** (the saved artefacts). This skill never authors content; it only detects drift and proposes the publish.
- For each ahead-of-repo artefact, the run raises the born-ready publish ticket (**Todo + `agent:F0-RGE`**) and **attaches the current Claude-side `SKILL.md` as a file** — the single content-delivery standard: any size, byte-for-byte, never pasted snippets (which risk transcription drift). The ticket instructs Forge to commit the attached file verbatim. The PR goes through the normal Forge → Prism → Relay-merge route, and **an ops-sync publish ticket is not operator-gated**. Its entire content is a byte-for-byte, digest-verified copy of canon the Owner already approved when he wrote or edited it in Claude — never new work being reviewed for the first time — so an operator gate at publish time re-asks a question answered upstream and adds only delay. On an unflagged, clean Prism verdict the loop's own clean-pass routing to `agent:R3-LAY` is the approval signal and Relay merges, exactly as `convention-ticket` *Gate* already provides for unflagged clean work (decision 2026-06-30, APP-402). Nothing about the merge leg changes: `skill-merge-pr` still never merges without `agent:R3-LAY` on an In Review ticket and still never sets that label itself, and the CI-actually-ran and verdict-at-head guards apply unchanged. The gate returns the moment the pass is not clean — a flagged verdict, an open question, an unticked and unwaived box, or a non-green CI state routes to the vertical's `operator-<venture>` or to `human` + Aled in the normal way, and this exemption never reaches ordinary `F0-RGE` build work. (Owner decision, Aled 2026-09-08: *"it is a purely technical approval here, as the ops sync is about catching up with already approved canon. Any reliance on me is just delaying or blocking something I already approved earlier in the chain."* Five publish tickets — APP-771, APP-857, APP-901, APP-1104, APP-1105, 38 artefacts — sat In Review and Prism-clean for 4 to 28 days waiting on a label whose substance had already been given upstream; APP-901 alone held for 21 days — APP-1163.)
- **Attachment mechanism (Linear file upload):** `prepare_attachment_upload` (issue, filename, `contentType: text/markdown`, exact byte size) → `PUT` the raw bytes to the returned signed URL, sending its headers verbatim, within the 60-second window → `create_attachment_from_upload` (issue, assetUrl). One file at a time: prepare → PUT → finalize before preparing the next.
- **The batch plan is computed before dispatch, and dedup runs once centrally.** Parallel raising is safe only where the partition is decided in the parent. **Before dispatching anything**, the orchestrator enumerates the full Claude-ahead set and computes the complete batch plan — for every artefact its name, its exact byte size (known by construction at `prepare_attachment_upload`) and its `sha256` digest where this surface can compute one — then assigns artefacts to ticket-batches under both caps. Each subagent is handed its slice **as data** and re-derives nothing: **one subagent = one issue = one non-overlapping artefact set**, so no two subagents can raise a ticket for the same artefact, and the one-file-at-a-time attachment sequence (prepare → PUT → finalize) stays serial *within* a subagent while the subagents themselves run concurrently. **Dedup runs once, centrally, in the parent, before the plan is cut** — the step 3 search for an existing open or recently-closed publish ticket covers the whole ahead-of-repo set in one pass and removes already-published artefacts from the plan. Never dedup inside a subagent: N subagents each searching Linear for their own slice costs N times the reads and still cannot see a duplicate a sibling is raising in the same second. A subagent that cannot complete its ticket returns that fact to the parent, which names it in the report as a deferred batch with its reason — nothing is silently dropped, and the batch plan is what makes "which batches did not land" answerable. (APP-1265.)

- The reverse direction does not exist. The repo is never pulled back into Claude, and this skill emits no drop-in to install into Claude. If the repo is somehow ahead (an edit made in the repo by mistake), that is drift to flag for Aled — never to apply to Claude.
- **Flagging it means raising a `DRIFT:` ticket under `skill-issue-capture`, surfaced to the Owner as Blocked + Urgent — the ticket is the flag; a `PUL-5E` note is not.** "Flag for Aled" names the person and not the queue, and the queue the flag drifts to by default cannot do the work. A repo-ahead artefact is a **DRIFT** — an observed divergence needing a decision — not canon-improvement intake, and `skill-ops-retro`'s own *FRICTION vs FIX/OPS/DRIFT* guardrail puts it in `skill-issue-capture`'s remit. Filed as a `FRICTION:` note it routes instead to the Pulse refine and author passes, which **cannot read a repo** and so cannot establish which copy is ahead, by how much, or what the repo-side edit changed; the note then sits in a queue structurally unable to close it. That is the scope-exclusion failure `APP-600` names: a scope exclusion must name the pass that picks the work up, and that pass must be verified to do the job. So name the destination and carry the evidence with it — the `DRIFT:` ticket states **both byte counts**, canon-side and repo-side, and **the repo ref the repo-side count was read at**, because the decision is the Owner's (which copy is canon) and he cannot take it from a bare assertion of divergence. Raise it at **Blocked + Urgent**: until he rules, no publish ticket for that artefact is sound in either direction. (Worked cases, two instances of the class in ten weeks, both correctly flagged and both filed to the wrong queue: `routine-delivery-loop`, 2026-07-21 — APP-643; and `skill-coordinate`, 2026-09-29 — APP-1874.)

## Publish-ticket rigour — the two checkbox sections, and parity by digest

A publish ticket is raised **born ready**, straight into the delivery loop. It never passes through a refine step, so there is no later point at which a missing section or a loosely-written criterion gets caught: whatever this skill writes is exactly what the build, review and merge legs read. That makes the ticket's own shape part of this skill's output, not an incidental of it.

### Both checkbox sections, every publish ticket

Instantiate the ticket from the `type:task` template per `convention-ticket`: `## Acceptance criteria` written fresh for the batch, and `## Definition of done` pasted from the type template. **Both are checkbox lists (`- [ ]`) under exactly those headings** — never a numbered list, never prose, and never a ticket carrying only one of the two.

The reason is mechanical. `skill-build-ticket` walks both sections and ticks what it satisfies, `skill-review-pr` verifies each box is ticked and genuinely met, and `skill-merge-pr` refuses to ship a ticket with any box unticked and unwaived. All three presuppose the sections exist. A publish ticket with no `## Definition of done` cannot be gated at all — each leg then improvises the same substantive fallback independently, correctly or otherwise, and nothing records that it happened.

Worked case: **APP-683** (publish ticket, 2026-07-25) reached Todo + `F0-RGE` with **no `## Definition of done` section at all** and its acceptance criteria written as a numbered list rather than checkboxes. Every leg handled it soundly — builders and reviewers rightly never re-author an author's acceptance list — but each fell back to verifying the standing `type:task` bar by hand, privately. A second ticket in the same run had the same gap, which is what marks it as a template defect rather than a slip.

The standing `type:task` DoD applies unchanged (PR against the right repo, CI present, concluded and green, no secrets, review verdict posted), plus the one item true of *every* publish ticket and therefore DoD rather than AC: the **manifest mirror is regenerated and committed with the `SKILL.md`** — `npm install && npm run build:manifest`, per `convention-github`.

**The scope criterion names the generated mirror as *in* scope, never as excluded.** `APP-3059` records publish tickets whose `## Definition of done` carries a hand-written box asserting that *no other file in the repo is touched*. No template puts it there — the `type:task` DoD is five items and says nothing of the kind, and the item immediately above says the **opposite**, that the mirror is regenerated and committed on the same PR. So this is an **authoring improvisation on the individual ticket**, not a template defect, and it is fixed where it is written: a publish ticket's scope criterion names the build-generated outputs as **in scope** — `the mirror is in scope and is never excluded from it` — because a publish PR carries the `SKILL.md` *and* the `public/` records and downloads the manifest build regenerates from it. A box forbidding the second is **unsatisfiable alongside this skill's own mirror-commit DoD item on the same ticket**: the only way to satisfy it is to skip the build, which fails the item one line up. That is the same unsatisfiable-pair shape the classification criterion below records for the fixed `skill` literal (`APP-1518`), arrived at from the opposite side — there a criterion satisfiable only by breaking parity, here one satisfiable only by skipping the build — so the remedy is the one already stated there and is not restated: the criterion is corrected **at authoring**, from values this skill already holds, never left for a leg to reason out live. What is new is the legs' half: **neither the exec leg nor the QA leg rewrites the box at hand-off.** `skill-review-pr` diffs the criteria **as created** and reads a changed box as a finding, so a leg that quietly repairs an author's wording converts an authoring defect into a review failure against work that was correct. A leg that meets this box writes a deviation note against it as written and ships; getting the box right is this skill's job, one step earlier. (Worked cases, **two** instances of the same exec-leg habit: **`APP-3057`** / PR #671 and **`APP-3054`** / PR #674, both **reported** — no repo is attached to this session. The note's CI mechanism is carried as **the note's premise and is unverified from this surface**: it names a *"Check manifests are up-to-date"* job in `ci.yml` regenerating `public/downloads/<name>.md`, where canon names the gate **"Build manifest"** per `convention-github`, and `gh api repos/assoc-one/claude-ops/contents/.github/workflows/ci.yml` returns **403** naming `add_repo` on this session, so neither the job name nor the regeneration mechanism is confirmable here. The canon-side contradiction stands without it — it needs no CI to be unsatisfiable.)

**The classification criterion names the artefact's live `type:`, never a fixed literal.** The manifest build classifies by the `type:` frontmatter field and not by the directory — the placement map above already says so, and `canon/skills/` is one flat namespace holding every kind — so a criterion written as *"the artefact classifies as `skill` under `canon/skills/`"* asserts something the build will never produce for any artefact that is not a skill. This skill reads each artefact's frontmatter to build the parity table, so the correct value is in hand at authoring time: write the criterion per artefact as *classifies as* `<type>` *per its own* `type:` *frontmatter*, filled from the value just read, and never as a literal carried over from the template. Measured 2026-09-18 against the live store: of **151 artefacts carrying a `type:` key, 62 are `skill` and 89 are not** (`task` 32, `convention` 27, `agent` 12, `operator` 5, `playbook` 4, `workflow` 3, `standard` 3, `routine` 2, `core` 1), so the fixed literal is wrong for a clear majority of what this skill publishes. The cost is not cosmetic, because the literal makes the criterion **unsatisfiable alongside the byte-for-byte digest criterion on the same ticket**: the only way to force `skill` is to edit the frontmatter, which breaks parity, so the two criteria cannot both be met on any non-skill artefact. Both legs then reason the contradiction out live and write a deviation note, and the habit that teaches is the expensive part — a stated acceptance criterion read as boilerplate, so the next genuinely wrong criterion reads the same way. (Worked case: **APP-1518** — the same deviation note written twice on consecutive `convention-*` publish tickets, the second citing the first as precedent, with the review leg then independently re-establishing that `convention` was correct before it could pass the box rather than bounce it: two runs, two legs each, all four reaching the same conclusion from scratch. Repo-side premise — that `build-manifest.ts` classifies by `type:` — is carried from the placement map above and is **unverified from this surface**: `assoc-one/claude-ops` is not readable here and would need `origin/main` on that repo.)

### Byte-parity is measured, not argued

`byte-for-byte` is the load-bearing criterion of the whole handoff, and it is the one most easily claimed on evidence that does not establish it. **Assert it only from a computed digest.** Write the criterion as a two-sided, per-artefact comparison: compute the digest of the attached file and of the committed file, confirm they match, and record both in the PR body. Byte size is a useful cross-check but is necessary, not sufficient.

**The digest selects the path; the attachment order never does.** The Linear connector does not return an issue's `attachments` array in the order the ticket lists them — on fourteen consecutive batches it returned an exact reversal, and on a seven-artefact batch a positional map placed one of seven correctly, the midpoint, by coincidence. So a publish ticket **never states the attachment order** and never writes a sentence a leg could index into positionally; "attached files, in order" asserts something the connector does not guarantee and is an invitation to cross two artefacts. It states the opposite rule in the same place: *attachments are matched to artefacts by* `sha256`*, never by the order they are listed — the connector's order is not this list's order.* The attachment **title** has held on every batch observed and is a cross-check, not the map (APP-1292).

The map runs in the selecting direction, which is what makes a crossed pair unconstructible rather than merely unlikely: hash every tracked artefact file in the checkout into a **digest-to-path map**, then look each ticket digest up in that map, so the digest chooses the path rather than a path being checked against a digest. A positional cross does not fail loudly — each wrongly placed file is a real artefact and a plausible-looking canon publish, so the commit succeeds and every digest is individually valid. Size is not the backstop either: one batch's two nearest artefacts sat ten bytes apart in different directories, and the 25× spread that would have caught an earlier cross was luck rather than a control (APP-1292, APP-1308 thread).

**The shape of a diff is not evidence of parity.** A small, tidy diff is equally consistent with the executor having hand-edited only the line it knew had changed and never reproducing the attachment at all — which is precisely the failure the criterion exists to prevent. Worked case: **APP-683**'s PR body argued fidelity from the diff's shape — five files, nine insertions, six deletions — reasoning that whitespace or unicode drift would have surfaced as whole-file rewrites. Prism caught the reasoning and verified independently by fetching all five attachments and MD5-matching them against the committed files: all identical. The conclusion was right; the stated evidence never established it. A parity claim that is reasoned rather than measured is the same false-green class this canon keeps catching elsewhere, and here the measurement is cheaper than the argument.

**When a digest cannot be computed on the running surface, say so.** This skill's own surface is a scheduled Cowork task with the Linear connector and workspace file access, and it may not offer a hashing tool. The exact **byte size is known by construction** — `prepare_attachment_upload` requires it — so record that for every artefact regardless. Then:

* **Digest computable** — record it per attachment in the ticket (`sha256:…`, algorithm named) so the executor has a fixed reference to compare against rather than only a second copy of the same file.
* **Digest not computable** — write the gap plainly in the ticket: *"digest not computed on this surface; the executor computes the digest of the downloaded attachment and of the committed file and compares the two."* The criterion still reads as a measurement; only the pre-computed reference is absent.

What is never acceptable in either case is filling the gap with reasoning. An absent measurement is recorded as absent.

**The figures are computed from the bytes that were attached, not from the working copy a plan was made off — canon moves between the two.** A run that computes one central parity plan and then dispatches a subagent per batch to raise the ticket and upload the file measures the artefact **twice, at two times**: once in the plan, once when the subagent re-reads the synced cache to attach it. In between, the cache refreshes to a newer canon revision — because the Pulse drain, the Owner and other agents are landing edits on the same artefacts while a sync run is in flight — so the printed table describes a revision that is no longer the one attached. This is **not** the "repo clone lags origin" problem in *Reading the repo*: that is the repo side behind Claude, this is the **Claude side moving inside a single run**, and no amount of pulling addresses it. The drift is **per-artefact and traffic-dependent**, not batch-wide: on the 2026-09-23 run nine of fourteen batches drifted and, inside one ticket, `skill-operating-loop` drifted while its sibling `workflow-cycle-planning` matched exactly, so a batch cannot be declared clean from one row. So: **the leg that uploads recomputes the byte count and the digest from the file it actually attached, and patches the ticket description before it finishes.** Where the uploading surface cannot hash, the fallback is the one this section already prescribes for an uncomputable digest — state plainly in the ticket that the printed table is a **raise-time snapshot and not authoritative**, and that the attachment plus a fresh digest are. Never both silently, and never neither. The cost of leaving it is not a wrong publish: the executor-side rule above held on every observed occurrence and every artefact was published correctly from the live attachment. The cost is **two wrong readings a stale table invites** — a leg comparing against the printed reference rather than hashing, and a leg reading a merely-stale digest as **corrupt or malformed** and escalating a publish that was never in doubt. The second is the expensive one, and a digest is well-formed or not on its own arithmetic: **count the characters before calling one malformed** — a sha256 is 64 hex characters, and a value that is 64 hex characters is stale at worst. (Measured on the 2026-09-23 ops-sync run: nine of fourteen batches carried stale rows, all of them higher-traffic canon files, and five separate exec and QA legs reconciled one each and reported it — `skill-triage` 92,783 → 96,026 bytes, `skill-operating-loop` 51,359 → 52,609, `assistant-aide` 14,264 → 14,811, `skill-plan` 24,504 → 24,793. The `skill-plan` row was reconstructed exactly as the head file with two later edits undone — a frontmatter `name` quoting change worth 2 bytes and a rewritten closing line worth 287 — which establishes the mechanism as a table hashed from an earlier revision rather than a corrupted or mismatched upload. One of the five legs additionally reported a printed digest as malformed at 66 hex characters; re-counted, that value is 64 hex characters and well-formed, so it was stale only — the misreading this paragraph's last sentence exists to stop. APP-1691, and the misdiagnosis case APP-1704.)

**Getting the attachment bytes is part of the measurement, and retyping them is the one way to fail it in the wrong direction.** `convention-github` already rules that a machine-checkable value is generated and pasted, never retyped, and verified by diffing against live output rather than by re-reading it (APP-1159). The same rule governs the **subject** the digest is computed over, not only the digest itself. Where `get_attachment` exceeds the inline tool-result cap the harness spills the payload to a file, and that file **carries** the artefact, which is not the same as being it: **inspect its first byte before treating it as the bytes to commit.** A raw spill opens with the artefact's own `---` frontmatter, and there the rule is unchanged — hash it and copy it to the repo path, never re-emit it. A spill opening with `[` or `{` is the **JSON tool-result wrapper**: an array of content blocks with the artefact sitting JSON-escaped inside a `text` field. Parse that shape and extract the field's exact content before hashing or writing — the same extraction the transcript-record paragraph below already prescribes for the inline case, so the two instructions are one instruction reached by different routes. A plain copy of a wrapped spill commits the brackets, the `type` and `text` keys and the escaped newlines as the `SKILL.md`, which is not subtle drift but a structurally different file: the digest fails outright on a publish that looks like it followed the documented good path (APP-1514 — two consecutive exec legs, 50,875 and 58,542 bytes, both digest-matching the ticket exactly once the `text` field was extracted, and the second arriving through a top-level session's own tool-result truncation rather than a subagent dispatch) — an 86,613-byte canon attachment was published with a single `cp` from the spill file, `sha256` and byte count both matching the ticket, and the content never entered the model's context at all (APP-1290). Where the same call returns inline there is no such file, and the leg's only route is to write the returned text out and hash the reproduction (APP-1304).

**The spill is not a size the ticket can predict, so the ticket instructs the method and never names a threshold.** On the observed surfaces 86,613 and 51,044 bytes spilled while 43,792 bytes returned inline to two legs independently, so the threshold is not a fixed byte count and may differ per surface or per call. The route that works for both shapes is the leg's **own on-disk transcript record**: every tool result is persisted verbatim, so the payload is already on disk whichever way it came back — the leg reads that record, extracts the `tool_result` text for its own `get_attachment` call, writes it out as UTF-8 and hashes it, retyping nothing. Two constraints travel with it. The record is written behind the turn, so batch the fetches and extract a turn later — and the lag is **not a promise that the record catches up**: across four legs the route has failed in four distinct shapes against one clean success, and on the 2026-10-08 case the per-leg session record never flushed the tool result and never caught up within the run. So the ticket writes this recovery as an attempt with a named fallback, never as an available route (`convention-agent-runtime`, which states the count and leaves the route's availability to this page; APP-2161). And **character count is not byte count** — a length sanity-check must encode to UTF-8 first; these artefacts run roughly a hundred bytes over their character count on em dashes alone. It is also **not transitive**: only the leg that made the fetch has the payload in its own record, and a subagent's record does not land in the parent session's, so a review or merge leg re-deriving later is back to hashing the committed blob against the ticket's reference digest (APP-1304 thread, APP-1252, APP-1259).

**State the mismatch rule, because the failure is asymmetric.** A digest *match* cannot be produced by a faulty transcription, so a match is conclusive however the bytes were obtained. A *mismatch* on a reproduced payload is not: a whitespace or trailing-newline slip yields a parity failure on a file that is in fact correct, and the documented response to a parity failure is to refuse the merge and route back. A false refusal on a clean publish is the expensive outcome. So the ticket writes the criterion as: *a digest match closes the artefact; a mismatch is diffed against the committed file before it is treated as a parity failure, and a mismatch attributable to the reproduction rather than to the commit is recorded as an unmeasured artefact, not a failed one.* It also names the residual gap plainly, so that no future leg spends a run trying to close it: **the link between the bytes uploaded to Linear and the bytes this skill hashed canon-side cannot be closed by any leg on any surface.** A direct fetch of `uploads.linear.app` is refused by the egress proxy, so the connector is the only route to the attachment side.

**Name which mirror a download digest refers to.** There are two published download mirrors and they legitimately hash differently — `claude-ops`' own `public/downloads/*.md`, written by the manifest build with the frontmatter **stripped**, and the `agents-site` built mirror, which carries the **full** file including frontmatter. Two legs measuring different mirrors report different digests on a correct publish and the difference reads as a defect. Whichever mirror a figure refers to is named alongside it. (Repo-side premise — the manifest build stripping frontmatter — is **unverified from the audit surface**: neither repo is readable here. Reported from the APP-1252 merge leg.)

### The site render is built, not waived

The render criterion is the other load-bearing half of a publish ticket, and it fails in the opposite direction to parity: not a claim asserted on weak evidence, but a **runnable check waved through as unrunnable**. Its wording invites that — "renders on the agents site" reads as the *deployed* site, which a delivery run genuinely cannot reach — so **word the criterion as the local build and not the deployment**, and write the method into the ticket rather than leaving each run to infer it.

The method: the delivery sandbox carries an `agents-site` checkout beside the canon repo, and that site's content pipeline resolves canon by `CANON_DIR` before falling back to a sibling path and then an authenticated clone. So the check is a content build and a `next build` run against the branch checkout, then an assertion on the prerendered output — minutes, not a round trip.

**Set `CANON_DIR` on the one command that builds, and never split the build across two commands.** `npm run build` runs `build:content` as its own first step, so it **re-resolves `CANON_DIR` independently** rather than inheriting it from a previous shell command — and every `Bash` call is its own subprocess, so a variable set on one command line does not reach the next. The two-command recipe therefore has two places to set one variable and only the second one decides what the build serves. Dropping it on the second line is not carelessness: the first command succeeds, prints the right canon path and produces correct content-pipeline output, and that success reads as confirmation that the setup is right when only the first command used it. With `CANON_DIR` unset the pipeline falls through the resolution order to the sibling `../claude-ops`, which in a delivery sandbox is normally the **head** checkout — so the base leg serves the head's content, the build exits zero, and the render check compares the wrong two trees. So the rule is one command: **`CANON_DIR=<path> npm run build`**, and never a standalone `build:content` followed by a separate `build`. **And read the build's own canon line every time, as a gate rather than a courtesy:** `[build-content] canon: <path>` must equal the worktree the leg intended, asserted per build, before any figure from that build is used. A fallback resolution is silent by construction, so a leg that does not assert the line has no evidence which canon it measured. (Two occurrences, both 2026-09-23: the APP-1687 base leg, where the wrong canon source was caught only because the leg read the printed path by habit; and the APP-1679 base leg, where it was **not** caught in time — `public/downloads/convention-ticket.md` was served at 121,467 bytes with the head digest instead of the base's 114,589 with the old digest, `content/artefacts.json` and `downloads.html` were copied into the base capture before the mistake surfaced, and only re-hashing the base worktree's own `SKILL.md` as an independent sanity step exposed it. Rebuilt with the single-command form and the base then served the expected old digest. APP-1695.) **The bundler is a control variable of the render check, not an incidental of it.** Both legs run the identical documented script with no hand-added flag on either leg, because a bundler swapped between legs renames chunks and font files throughout the prerendered output, and those differences then present as content. So **classify a chunk-name or font-name `href` difference as bundler identity before reading it as content**, and record in the verdict which bundler each leg ran. `convention-vercel` correctly scopes `next build --webpack` to repos running Sanity or other bundler-sensitive libraries; the hazard is that scoping leaking into one leg of a comparison whose other leg took the Next.js 16 Turbopack default, which is a misapplication of that convention rather than a defect in it. (Worked case: the 2026-10-15 run built one leg with `--webpack` and the other on the Turbopack default, silently invalidating the comparison — the two legs differed by bundler identity and that difference was available to be read as content. The repo-side facts are **unverified from this surface**: no repo is readable from the authoring surface, so which flag each leg carried is reported as filed rather than as measured. APP-2380.)

**Wipe before each build, and capture where no sibling leg can reach.** `build:content` regenerates `content/` and `public/downloads/` but leaves `.next` alone, so a leg that follows these two commands in the sandbox's shared `agents-site` checkout can have its base build answered from an earlier leg's output — the same stale-cache hazard `skill-build-ticket` already names for stash-and-compare. Run `rm -rf .next content public/downloads` before each of the two builds, capture into a directory named for the ticket rather than a generic `build-base`, and cross-check each build's prerendered HTML against the `content/artefacts.json` that build wrote, which must agree. The failure is flattering and quiet: `mkdir -p` is silent on an existing directory and `cp -r` merges rather than replaces, so contamination presents as artefacts added or removed by the change. (Worked cases, all 2026-09-12: a capture reporting 52 surfaces and 152 downloads against a true 26 and 151; a base build serving an older artefact's summary and a 7-commit jump; and a scratchpad still holding a prior leg's `base-artefacts.json`, `out-base` and `verdict.md` — APP-1393.)

Three things make the green mean something, and the third is the one runs get wrong:

1. **Assert on content, not on names — and decode the page before matching.** For each artefact, take a distinctive fragment of its own summary from the built content and confirm that fragment appears in the prerendered HTML.

   **That fragment is a presence control, and on a body-only edit it has no power to fail.** Most publish edits leave the frontmatter `description` untouched, so the summary is byte-identical at base and at head and the fragment passes on both builds — it confirms the artefact reaches the page and says nothing about the change under review. There is also no prerendered detail page for an artefact of **any type except `agent`** — `/agents/[slug]` is the only generated per-slug route, so this covers `skill-*` and `task-*` and equally `convention-*`, `standard-*`, `routine-*`, `workflow-*`, `playbook-*` and `core`, which between them are most of a publish batch (the APP-1506 thread measured a whole head build: body text present for 7 of 12 `agent` artefacts and for no artefact of any other type), so a body edit legitimately moves no prerendered HTML at all, and a leg expecting it to will read a correct zero as a failed render. The change control is the **served download digest**: hash `public/downloads/<name>.md` on each build and require base ≠ head, with head equal to the ticket's canon digest. It costs one `sha256sum` per artefact per build, is two-sided by construction, and is immune to the entity, RSC-renumbering and unlucky-fragment traps because it never touches HTML. (Worked cases: four consecutive publish batches on 2026-09-12 where the prescribed control passed identically at base — APP-1395.)

   **A per-agent profile page is a partial render surface, and the partial case is worse than the absent one.** The paragraph above names the *absent* detail page — a `skill-*` or `task-*` artefact has no prerendered page of its own, so a leg expecting body text to move reads a correct zero as a failed render. The `/agents/[slug]` page is the other shape, and it fails in the quieter direction: the page **exists and half-renders**. It extracts a fixed set of labelled profile fields — Essence, Mission, Objectives, Goals, Remit, Boundaries, Surface, Label, Relationships, Accountability — and silently drops free-text sections whose bold lead-in is not one of those labels, so a body addition under a heading such as **Composition.** or **On the remit.** appears nowhere in the rendered page, in the raw bytes or the decoded ones, on either build. This is the worse case because **the check passes**: the page is present, the summary fragment is found, the artefact count is unchanged, and the only thing missing is the content under review. So a check **never reaches for an individual `/agents/[slug]` page as the render surface for edited body content**, and a leg that reads one records what it is — a structured-field view that may legitimately omit freeform sections, never a witness that content was lost. The surfaces that do carry a body change are the `/downloads` index entry, the built `content/artefacts.json`, and — strongest of the three — the served `public/downloads/<name>.md`, which is byte-identical to the canon `SKILL.md` and so gives the check a byte-exact target rather than a fragment grep. (Worked case: **APP-1506** — two artefacts whose edits added roughly 1,800 characters of free text and a new bullet, neither appearing in the rendered profile page on the base or the head build, both reaching `content/artefacts.json` and the downloads summary correctly, and both builds behaving identically, which marks it as a property of the template rather than a regression the change introduced. The same thread measured the whole head build and found body text present for 7 of 12 `agent` artefacts and for no artefact of any other type, because `/agents/[slug]` is the only generated per-slug route — so for a skill or a convention, which is most of a publish batch, there is no page a body grep could ever succeed against, and the leg gets zero hits with no signal that the surface rather than the content is wrong. Repo-side premise — the template's field-extraction logic, likely the site's content library or the per-agent page component — is **unverified from this surface**: `assoc-one/agents-site` is not readable here; the behaviour was observed from rendered HTML output only.)

   A name can reach the page from the file list alone. **Unescape the page's HTML entities before the comparison**, or escape the fragment exactly as the renderer does; decoding the page is the simpler of the two, because it covers `&amp;`, `&lt;` and `&gt;` without enumerating them. A raw fragment false-negatives on any summary containing an apostrophe, which the renderer emits as `&#x27;`: on a seven-artefact batch the literal match reported 2 of 7 as not found — precisely the two summaries containing `'`, both of which rendered correctly — and decoding first returned all seven, twice each. The five that passed did so only because their summaries happened to contain no `'`, `&`, `<` or `>`, so the exposure is broad rather than incidental and presents as a per-artefact render difference.

   **The negative is not absolute, and reading it as absolute invites a leg to use the raw read as a control on its own decoding.** The page carries each summary three times: twice in the rendered DOM, where the apostrophe is escaped, and once inside the `self.__next_f.push` flight payload, where it sits in a JavaScript string literal and is not escaped. So a raw grep on an apostrophe-bearing fragment returns a non-zero count for a structural reason that says nothing about the render, and a raw count and a decoded count on the same page are not the same measurement — on two artefacts the decoded page returned 3 occurrences against the raw bytes' 1, each time. Decode before matching remains the whole instruction, and a raw read has standing as a control in neither direction (APP-1389).

   The direction of the failure is the bad one: this is the **positive control** that proves an artefact reached the page, so "not found" reads as a blocking render defect, and a leg that distrusts the result has no principled ground on which to overrule its own control (APP-1314).
2. **Read the download path from the manifest, never construct it.** Every artefact record carries its own download path; take the path from that field. Both mirrors apply the disambiguating `task-` prefix **conditionally — only where the name does not already start with** `task-` (the APP-728 / APP-802 fix, carried in `claude-ops`' manifest build and in `agents-site`' content build). Under the current `<type>-<name>` convention every task name already carries the prefix, so a `task-*` artefact is served at exactly `<name>.md` and the constructed form happens to agree with the real one today. It is the **rule** that makes constructing wrong, not the current data — a hand-built path is what shipped the APP-802 / APP-1190 404s. The earlier wording here asserted the doubled prefix as present fact, and had been wrong since APP-802 landed; a leg reasoning from it looks for `task-task-<name>.md`, does not find it, and reports a missing download and a failed render on a perfectly good publish — the exact outcome this point exists to prevent, reached by following it, and reached confidently. `claude-ops`' own `CLAUDE.md` has carried the conditional rule correctly throughout, so canon and the repo doc disagreed and the repo doc was right. (Repo-side premise **unverified from the audit surface** — neither repo is readable here; verified on `main` by the reporting leg on a nine-artefact all-`task-*` batch: 150 download files, zero `task-task-` basenames — APP-1316.)
3. **Build twice and diff, rather than mutating one checkout — then compare semantically, not character by character.** The control is a build at the PR head against a build at its base; removing an artefact and watching a count drop establishes only that the pipeline reads the canon *file list*, which is not the failure the control exists to exclude — a pipeline that counts files and renders nothing passes it. Diffing two builds also avoids leaving a canon checkout dirty.

   **The base tree needs real git history, so cut it with `git worktree add <path> <base-sha>` and never with an export.** `agents-site` derives `/proof` and `/changelog` commit counts and the last-updated date from the canon repo's own history, so a tree made by `git archive | tar -x`, or by `cp -a` with `.git` removed, renders those figures as `0` and `—` while the head build renders real values. The difference then lands on nearly every page, in the persuasive direction: 25 of 26 surfaces reported as changed against a true 2, which reads as a catastrophic render regression on exactly the check that exists to catch one. It also fires on the negative-control leg, where a wall of red reads as the instrument working. Where the sandbox's canon clone is shallow, a plain `git clone` of it loses the shallow boundary and then fails to traverse parents, so copy `.git/shallow` into the clone if a worktree is unavailable (APP-1390). A shallow clone that builds cleanly is the quieter shape of the same fault: it renders a real but truncated commit count, identically on both builds, so nothing differs and nothing fails. The clone the check builds from is therefore full-history, and any absolute count it quotes is re-derived, not read off the page (*Build the base twice* below; APP-1632, 2026-09-22).

   Where sibling batches are merging in parallel, compare against the PR's **own base** and the merged tree, not current `main`, or a sibling's changes read as this PR's.

   **And the head tree is not cut at all where the leg's own checkout already holds the head branch — point `CANON_DIR` at that checkout and give only the base a worktree.** The rule above cuts the base with `git worktree add` because the base is the one canon state no checkout holds. The head is the opposite case and the recipe is silent on it, so a leg that mirrors the base step attempts a `git worktree add` of the branch it is standing on and git refuses outright: *`fatal: '<branch>' is already used by worktree at '<the shared root>'`*. This is not the keyed-path collision `convention-agent-runtime` rules — a fresh key cannot clear it. It is structural, and it holds for every repo whose exec legs work directly in a shared root on the ticket's branch rather than in a per-ticket worktree of their own: that working tree **is** the head canon, so no second worktree of the same branch can exist however the scratch path is named. So **where the publishing repo has no per-ticket-worktree discipline, the head build's `CANON_DIR` is the absolute path of the leg's own checkout** and only the base gets a worktree; where the repo does have one, both trees are cut as the rule above describes. Which of the two the run took is stated in the verdict beside the canon line each build printed. Left to be re-derived, the failure is quiet for exactly one build: the head attempt falls through the resolution order and serves base-equivalent content, which *Set `CANON_DIR` on the one command that builds* catches at the printed canon line — at the price of a wasted `build:content` plus `next build` cycle every time it happens. (Worked case: **reported** from the `APP-3132` exec leg, 2026-11-16 — the base worktree at a base SHA succeeded and the `canon-head` worktree of `claude/app-3132` failed with that refusal, the leg's shared root being already checked out on that branch; the first head build then fell through to a fresh clone of the as-yet-unpushed branch and printed the loud `CANON_DIR` fallback warning, the `APP-1727` fix working as designed and catching it. The repo facts are **unverified** here — no repo is readable from this surface and `/home/user` does not exist on it — so which repos carry a per-ticket-worktree convention is that leg's report. The gap is **observed**: `canon-head` and `per-ticket-worktree` each occur in 0 files across the live store, and this section names a source for the base tree and none for the head, measured against the live store this run. `APP-3135`.)

   **The base-side build is shared across every batch on one base — build it once per run and reuse it.** The control above is two builds diffed, and the head-side build is genuinely per-batch. The base-side build is not: where a run holds several publish batches cut from the same ahead-of-repo set, every one of them has the same PR base, so the base build is identical for all of them and is currently paid once per batch. Build it once, keep the prerendered output and the built `content/artefacts.json` for the run, and diff each batch's head build against that retained output — same two builds, same base, same semantic comparison, one `npm install` and one `next build` saved per batch after the first. **Re-build the base, never reuse it, the moment the base moves** — a sibling batch merging changes the base for every batch raised after it, and a retained build from before that merge is the branch-against-stale-`main` error this section exists to prevent, arriving from the cache rather than from the wrong ref. So key the retained build to the base commit SHA and discard it when a batch's own base SHA differs. (Measured 2026-09-12: one six-artefact batch took over 120 minutes and did not finish, against ~46 minutes for an ordinary code ticket carrying a full Playwright suite and a negative-control batch — two `npm install` plus `next build` cycles per batch, at seventeen batches roughly 34 hours of exec time before QA, against a delivery loop that is a timer routine. The caps below bound a batch's *context*, not its render cost, so the lever is the shared fixed cost and not the batch size — APP-1385.)

   **Build the base twice, and treat every difference that reproduces as apparatus.** The classification rules below enumerate the apparatus-only difference classes a leg must read past — the build id, the canon commit count — and an enumeration means each new class arrives as a fresh false positive on a run that has never met it. The durable classifier is a control rather than a list: **build the base tree twice and diff those two builds first.** Anything differing between two builds of byte-identical canon is apparatus by construction, whatever its mechanism, and only a page that differs base-vs-head and *not* base-vs-base is attributable to the change. It composes with the once-per-run base build above at no per-batch cost — the second base build is an **instrument calibration** run once alongside the first, not a third build per batch. Two classes have already been found this way that no enumeration caught: **live GitHub estate statistics fetched at build time**, which move between builds minutes apart and made `proof.html` differ by ten added and six removed text nodes, all bare numbers, on a pair of builds where nothing in canon changed at all; and **bundler chunk-filename drift**, where rebuilding the same canon at a different time renamed chunks throughout the prerendered bundle, so a classification reading "differs only by the build id, one line" undercounted and reported all 26 apparatus-only surfaces as carrying an unclassified second difference. Widen the classification accordingly, and split the class by what the base-twice control actually says rather than by the kind of file the difference appears in: **bundler output naming that moves between two builds of byte-identical canon is apparatus — and a bundler filename that is stable base-vs-base and moves base-vs-head is content-derived and attributable, the bundle's own receipt that it picked the publish up, never a noise class to read past.** The control decides which it is, not the file's extension: a chunk name is not apparatus because it is a chunk name, it is apparatus only where the two base builds disagree on it. Where the two base builds agree and the head build differs, the rename **is** the evidence that the new body reached the client bundle, and a leg that normalises it away has deleted its own strongest positive signal and under-reported the diff in the same stroke. So the verdict names such a filename as an **attributable** difference and confirms it the direct way — grep the head chunk for a string the publish adds, and read the hit as the receipt. (Worked case, **reported** by the filing QA leg and not re-read from a repo or a build log on this surface: `assoc-one/claude-ops` PR #636, head `4b982f7`, base `d86fa0d`, `agents-site` `3073818`, 2026-11-07 — the builder reported 27 of 29 prerendered pages differing "only in the Next.js build id"; normalising the build id and comparing raw bytes showed **28 of 29** pages also differing in one `/_next/static/chunks/<hash>.js` filename, `0kk63o1bbzztr.js` → `0x4~xa0~f8sy-.js`, with only `_global-error.html` build-id-only. That filename was **stable across two base builds**, the chunk is the ~4 MB client bundle that carries artefact bodies, and the head copy contained the newly published passage — so it is a content hash of the change itself, expected on any publish and invisible to the href/decoded-text comparison. The two legs' disagreement, **27 versus 1** build-id-only pages over the same captures, is what the blanket reading costs. `claude-ops`' own `CLAUDE.md` names four apparatus classes — build id, RSC renumbering, entities, `gitStats` fields — and does not name this one; that is a **repo-lane edit, named here and never authored here**, and the section's name and its four-case list are unverified from this surface for the same reason every other repo premise here is — `APP-2949`.) The estate-stats class is **intermittent** — it fires only where a real pull request merges somewhere in the estate between the two builds, and a later run saw it not fire at all — which is the reason to run the control rather than to rely on having met the class before. **One figure the control is blind to** is a value that is wrong identically in both builds: a partial-history canon checkout renders the same false commit count twice and the base-vs-base diff agrees exactly. So the checkout a render check points `CANON_DIR` at is a **full-history clone**, never a `--depth` one, and the changelog and proof commit figure is reported as a **delta** rather than as an absolute pair unless the clone is known to be full. Know it, rather than assume it: `git rev-parse --is-shallow-repository` must print `false` in the checkout `CANON_DIR` points at, and a clone that prints `true` is made whole with `git fetch --unshallow` before either build, never used as it is. A figure quoted in a PR body or a verdict as an absolute pair is re-derived with `git rev-list --count <sha>` at the base and head SHAs in that verified checkout, never copied off the rendered page. Where the leg cannot run that re-derivation, it writes the delta only and says the absolute figures are unverified. **The control is blind a second way, and this one fires on every publish PR by construction, so base-vs-base can never see it.** `/proof` and `/changelog` each render a visible text node for the commit count of the canon checkout's own history, and the head worktree always carries exactly the PR's own commits more than the base worktree — so the prescribed semantic text-node comparison reports a non-zero delta on those two surfaces on **every** publish, with both figures correct and neither attributable to the canon under review. Two builds of byte-identical canon agree exactly, which is why the base-twice control cannot flag it: this is not a corrupt figure, it is a correct difference measuring the apparatus. **The discriminator is arithmetic:** re-derive `git rev-list --count HEAD` in each pinned tree, and where the text-node delta on `/proof` and `/changelog` equals the PR's own commit count, it is apparatus, not a regression. Everything else in the text-node comparison stays a real finding. **A third instance of the same blindness sits in the site footer, and it is on every prerendered page.** The footer renders a `canon last published` date read from the canon checkout's HEAD commit date, so it differs base-vs-head on **every** publish whose head commit lands on a different calendar day from its base — base-vs-base agrees exactly, both values are correct, and neither is attributable to the artefact under review. Unlike the commit count it is not confined to two surfaces that can be excluded: it is in the chrome, so it lands on every page the text-node comparison reads. **The discriminator is the same shape and is also arithmetic:** where the one changed text node on a surface is a date and it equals that head tree's own HEAD commit date (`git log -1 --format=%cd` in each pinned tree), it is apparatus — classify it as such, **name it in the classification** rather than leaving it unclassified, and do not count it as a changed surface. The lesson is that the **enumeration** is the weak part, because the base-twice control cannot reach any figure derived from *which commit* the checkout is at, and so each such field arrives as a fresh unexplained visible difference on the first run that meets it.

   **A zero from the render-check diff script names the apparatus-only pages; it never absorbs them.** The classification obligation above is a reporting obligation too, and the two separate easily: a leg that has correctly classified `changelog.html` and `proof.html` as `git.commitCount` apparatus has nothing telling it to *say so* once its own count comes out at zero, so those pages leave the leg's output altogether and a later reader cannot tell a clean render from a filtered one. So **the base-vs-head render-check verdict states the number of pages differing, the number differing for apparatus reasons, and the name of every page in that second group** — an apparatus difference is non-blocking and is still a reported difference. `skill-review-pr` already carries the governing rule for the two-script case in full, and it is cited here rather than re-derived: where both legs run independently-written diff scripts over the same two captures, a disagreement between their counts is itself a finding, the lower count is the suspect one, and *an apparatus difference (a commit count, a build timestamp, a published-on date) is non-blocking and still belongs in the verdict as a reported difference, never absorbed into a zero.* The reason to restate that obligation here rather than leave it there is **placement**: the leg that produces the zero reads this render-check procedure, not the QA brief, and a rule living only on the reviewing side cannot reach the script that filed the figure. (First occurrence APP-2846, closed — its fix took hold on the QA side only. Second occurrence APP-2892: the exec leg's render-check diff reported **0** base-vs-head differing pages where QA's independently-written script found **2**, whose only change was a commit-count figure. Both counts are **reported by the filing legs, not measured here**; no repo, pull request or build log is readable from the authoring surface.) So before reading a text-node delta as a regression, ask whether the node is derived from the canon repo's own *history* rather than from canon's *content*; where it is, it is apparatus on every publish. The worktree paragraph above already says as much in canon's own voice — `agents-site` derives the `/proof` and `/changelog` commit counts *and the last-updated date* from the canon repo's own history — and the footer field is that same derivation surfacing in the page chrome. Excluding the two commit-count surfaces stays available and still works for them; it cannot be the remedy for a field in the chrome. (Worked case: the exec leg on APP-2208 / `claude-ops` PR #417, head `fbe6bc1`, base `145fac6`, 2026-10-09, reported `downloads.html` as differing "at exactly one point — the build id" and missed the footer date moving `2026-10-08` → `2026-10-09`, and the QA leg had to trace it live on one extra probe — APP-2244. Repo-side premises **unverified from this surface**, each covering itself alone: that the footer field reads the canon checkout's HEAD commit date; that it appears in the footer of every prerendered page; and its day-level granularity. All three are `agents-site`-side and no repo is readable here, and a flag on one implies nothing about the others. `claude-ops`' own `CLAUDE.md` carries the same enumeration and needs the same addition — a **repo-lane edit, named here and never authored here** — and that section's name and its three-case list are unverified for the same reason.) Optionally, exclude both pages from the **text-node half** of the check by default — both are derived from repository metadata rather than from canon, and neither can carry a site-render regression caused by an artefact edit — while still comparing their `href` sets. (Two instances: APP-1610 / `claude-ops` PR #267, base `ddc8ab9` → 54 and head `83a2d98` → 55, confirmed with `git rev-list --count HEAD` in each pinned worktree, reported as +2/-2 across `changelog.html` and `proof.html` on a PR whose only content change was one artefact's `body` field; and APP-1612 / PR #269 — APP-1648, 2026-09-22.) (Second instance: APP-1608 / `claude-ops` PR #265 reported "58 → 59 commits" from a shallow working clone, where QA's full-history clone measured 270 → 271 with `git rev-list --count`. Caught before merge — APP-1632, 2026-09-22.) (Worked cases: **APP-1512** — three full builds, base, head and base-again, where the verdict was clean and unaffected only because the base-twice control was run, which canon did not ask for; and the same thread's exec report of "54 → 55 commits" against a measured 259 → 260 on full-history clones pinned to the same two commits, direction right and absolute figures not reproducible. Repo-side premises — `agents-site`'s `scripts/build-content.ts` fetching estate-wide statistics at build time, `content/github-stats.json`, and the `DELIVERY_REPOS` list — are **unverified from this surface**: `assoc-one/agents-site` is not readable here and would need `origin/main` on that repo.)

   **Equalise every apparatus variable across the two legs explicitly, in each leg's own call — the base-twice control cannot see a variable that differs between legs.** The control above diffs two builds that **share one token state, one environment and one clock window**, so by construction it can only surface a variable that moves *within* a leg. A variable that is constant inside each leg and **unequal between the base leg and the head leg** is invisible to it, and that is the gap: the calibration reports clean while the real comparison carries a difference that is not canon's. The instance is the live-estate-statistics class named above, arriving by the one route the control cannot reach. On the APP-2451 QA leg the sandbox shell exports `GITHUB_TOKEN`; **shell state does not persist between Bash calls**, so an `unset GITHUB_TOKEN` issued in the base-build call did not bind the head-build call. The base built without the token and skipped estate stats; the head built with it and fetched live estate commit and PR counts for `/proof`. The two legs therefore differed in a **control variable** rather than in canon, on the one surface the base-twice control had already been run against and cleared. So **name the apparatus variables a build reads** — the GitHub token, `CANON_DIR`, `NODE_ENV`, and anything the repo's `CLAUDE.md` or `package.json` names — and set each one identically **in the same call as the build it governs**, with an explicit per-call form such as `env -u GITHUB_TOKEN npm run build`, never with a bare `unset` in an earlier call and never by relying on a shell that does not survive. Equalising is the whole instruction, and it holds whichever state the variable is actually in — which is the point, because the surfaces disagree about this one. (Reported by the filing leg: `claude-ops` PR #487, head `392c6ae`, 2026-10-20 — caught from `[build-content]` stderr and rebuilt with `env -u GITHUB_TOKEN`; the verdict was unaffected. **Unverified from this surface** — no repo, pull request or build log is readable here; the premise covers the token's effect on that leg's two builds and implies nothing about the token's state on any other surface. The disagreement is recorded rather than resolved: `skill-build-ticket` asserts that "In this sandbox `gh` is absent and `GITHUB_TOKEN` is a non-usable placeholder", and two independent measurements contradict it — this leg reports the token usable enough to fetch estate-wide counts, and a measurement on the Pulse refine surface on 2026-10-20 found `gh` **present** at `/usr/local/bin/gh`, version 2.89.0, with `GITHUB_TOKEN` and `GH_TOKEN` both set and the token **invalid** at `gh auth status`. Three surfaces, three states, which is itself the reason to equalise rather than to assume. The `skill-build-ticket` claim is that artefact's lane — **named here and never authored here**. APP-2474.)

   **A differing run inside the flight payload is not evidence of added or removed content.** Read gain and loss from the **set of** `href` **values** on each side with `script` blocks stripped, and from the **list of visible text nodes** with `script` and `style` stripped — never from the character stream. **The character stream is barred on two grounds, and the second is cheaper to hit than the first.** Reliability is the argument above. The other is cost: a character-level `SequenceMatcher` over the prerendered set is quadratic in the length of each page, and the set is large enough for that to bite — the filing leg reports roughly 30KB per page across 29 HTML surfaces (reported, not measured here; confirm the prerendered HTML file count against the repo before writing it; expected 29). A leg that reaches for one over a whole build does not get a wrong answer, it gets no answer inside the run's budget, and then falls back to something hurried. **The sufficient substitute is a word- or line-level diff** — token-granular over the same two captures, cheap enough to run on every page, and strictly more informative than a character ratio for the question actually being asked, which is whether a visible word or an `href` appeared or disappeared. Reserve any character-level comparison for a single named page already shown to differ. **And name which tree the comparison reads when it reaches** `public/downloads/`. The `public/downloads/<name>.md` this procedure calls the **served** download is the `agents-site` build's output, and that output is the only mirror the word *served* refers to here. `claude-ops`' own build is reported to write a second file at the **same relative path** with the frontmatter stripped, so two differently-behaved trees answer to one path and a comparison pointed at the wrong one reads content that was never served. (Repo-side premise **unverified from this surface**, covering itself alone: no repo is readable from the authoring surface — `gh api user` returns 200 as `assoc-one` and an unattached repository returns 403, public ones included — so every repo assertion here is written to be confirmed before it is relied on. Probe: read `scripts/build-manifest.ts` and the `agents-site` build script on `origin/main`. Confirm the `public/downloads` write in `scripts/build-manifest.ts` against the repo before writing it; expected one `.md` per artefact record with the frontmatter stripped. Confirm the `agents-site` build script's download output path against the repo before writing it; expected `public/downloads/<name>.md` carrying the full file including frontmatter. The per-page byte figure, the file count and any digest quoted from the filing leg's report are **reported, not measured here** — APP-2891.) **Run that comparison over every prerendered page, never over a subset selected by byte size.** A size pre-filter — comparing semantically only the pages whose base and head bytes differ — reads as a free optimisation and gives up the exact property the semantic comparison exists for: any same-length substitution passes it, a changed digit or a swapped word alike, and the filter then reports "0 visible-page deltas" with nothing having been compared at all. (Worked case: APP-1952 / `claude-ops` PR #362, head `0bdea9b`, 2026-10-01 — the exec leg ran the semantic comparison only on pages whose byte size differed, found none, and reported zero deltas as the correct result; QA's comparison over all 28 prerendered pages found the canon commit count going 63 → 64 on `changelog.html` and `proof.html`, benign under the arithmetic discriminator above and invisible to the filter because it is same-length. The verdict was unaffected; the same filter would have passed a same-length regression — APP-1960.) **Assert that the captured prerendered page count is non-zero and equal across every capture before diffing, and report that count in the verdict.** A comparison over every prerendered page is only as good as the capture that produced the pages, and a capture that produced none satisfies the instruction vacuously: base-vs-base and base-vs-head both report no differences, and that output is indistinguishable from a genuine clean render. So the count is part of the evidence, not part of the plumbing — **an empty or unequal capture is an apparatus failure, not a clean result** — and a leg that cannot state the number of pages it compared has no verdict to report. Use a capture that works on the delivery image: `find … -exec cp --parents` into the ticket-named directory, which preserves each page's path and fails visibly. This is the same family as the byte-size pre-filter the rule above forbids — a control reporting clean having compared nothing, failing in the flattering direction — and the remedy is the same shape: assert what was measured before reading what it says. (Worked case: on the 2026-10-15 run every capture held **zero pages**, because `cpio` is absent from the delivery image and its error was swallowed by `2>/dev/null`; base-vs-base and base-vs-head both reported no differences and the control passed vacuously, output indistinguishable from a clean render. The page figures and the absence of `cpio` from that image are **unverified from this surface**, since neither the repo nor the image is readable from the authoring surface. APP-2394.) A character-level diff fails in the persuasive direction on the one check that exists to catch lost content: an edit that adds rows earlier in a list makes Next.js renumber its `$L` lazy-reference ids, and the renumbering presents as whole runs being deleted at head, on one page as the removal of that page's own download button. The semantic comparison on the same page returned 5 links added and 0 removed, which was the true answer. This is **not** the diff-realignment trap or the string-split-across-`push`-boundaries trap already documented: the payload was reassembled across the `push` boundaries correctly and the phantom deletions survived it, because reassembly fixes chunk splitting and not reference renumbering. The likely costs are a false block on a clean publish, or — worse — a real deletion waved through into the "flight bookkeeping" bucket by a leg that has stopped distinguishing the two (APP-1313).

Once the build exists, a scan of every download link in the prerendered HTML against the files actually written costs nothing and turns "renders with no errors" into a result the next batch can be measured against. **Report the classification, not the totals.** Some of the figures a render check produces measure the apparatus rather than the change, so two legs running the same check on the same PR disagree by construction and each batch re-litigates it: the Next.js build identifier is a random 21-character nanoid minted fresh per build, so the count of characters differing inside it is a draw — one change was reported at 644 differing characters by one leg and 670 by the other, a difference of exactly one character on each of 26 HTML surfaces, and both figures were correct. Region and cluster counts depend on the diff instrument; an absolute canon commit count depends on the clone's depth, not on the change; a changed-record count depends on which download mirror was measured. What survives every instrument and every checkout, and is therefore what a leg reports and a later reader compares, is the **classification** each differing run falls into, an **unclassified count of zero**, and the **per-cause deltas and invariants** — none added, none removed, artefact count unchanged.

**An unclassified count is trustworthy only once the classifier is shown to have matched.** Assert the build-id pattern matches exactly once per surface on each side before reading any classification: zero matches means the instrument failed, and the run stops rather than reporting that the change reached every page. Put the classifier in a script file, never a shell-quoted `node -e` one-liner — every escaped pattern in this check is consumed a second time by the shell, so the one-liner form is hostile to the whole method. Classify by positional token rather than by whole line, and never by blanket substring replacement: these surfaces are single-line minified HTML carrying the same number in the DOM and again in the RSC payload, so a line is the entire document and a digit sequence inside an unrelated number defeats the normalisation. (Worked cases: 26 of 26 surfaces reported unclassified on a one-artefact body-only edit after the escaped pattern matched zero times, and a working instrument on an unchanged pair reporting unclassified 1 by line and 0 by token — APP-1397.)

Where a contingent figure is given at all, it is given with the reason it is contingent, so a benign instrument artefact is not read as a real difference on the very check that exists to catch real differences (APP-1308). Where the check genuinely cannot run, the gap is written plainly in the ticket, as with a digest — an absent measurement is recorded as absent, never inferred from the repo topology. (Worked case: two consecutive publish tickets on 2026-09-08 recorded the render clause as unverifiable in the sandbox and QA disproved the claim both times; on the third the driver passed the method in by hand and it worked first time; on the fourth the weak file-count control was run and reported as proof of render — three runs re-deriving one inference from the same silence, and the correction travelling by hand-off note each time — APP-1188.)

## Guardrails

- **Claude wins on content** — but never publish a both-sides divergence by stealth; flag conflicts for Aled.
- **Proposes only** — raises tickets and files Pulse `FRICTION:` notes; never commits to claude-ops, never edits or saves a Claude-side artefact, never deletes on either side.
- **A canon fix is fixed in canon first.** Where the audit finds canon that needs correcting — including a frontmatter defect — the correction belongs in Claude (the operator adds it via the save button, drained from the Pulse queue), and that takes priority; any mid-flight publish ticket is then reconciled — refreshed or closed — as part of the next sync. Tickets are downstream of canon, so never publish a file whose canon frontmatter carries an enumerated schema break — and never hold one back for anything else, an optional key's position included (*Frontmatter-hygiene sweep*; APP-633).
- **Hygiene is fixed, not re-flagged.** Each frontmatter defect is routed once to its fix lane (canon → Pulse queue, repo-only → publish ticket) and then stays silent; a defect that reappears in every report is the failure this sweep removes.
- **Every publish ticket carries both checkbox sections** — `## Acceptance criteria` and `## Definition of done`, as checkbox lists under exactly those headings. A born-ready ticket has no refine step to add a missing one, and a ticket with no DoD section cannot be gated by exec, QA or merge at all (worked case: APP-683, 2026-07-25).
- **Byte-parity is claimed from a digest, never from a diff.** The commit-verbatim criterion is written as a per-artefact digest comparison; where this run cannot compute a digest, the ticket says so and leaves the two-sided comparison to the executor. Never infer parity from the size or tidiness of the diff (worked case: APP-683's PR body, overturned by an independent hash check).
- **A publish ticket links its sibling repo-lane dependency, not just its canon.** When the canon being published has a repo-native dependency tracked by a separate open ticket, relate the two at publish time so an incidental fix made by one does not leave the other stale-open — the coordination gap the triage freshness check would otherwise have to catch alone (worked case: APP-409 incidentally satisfied APP-407, 2026-07-03).
- **Tasks and routines are canon artefacts**, audited like skills — never an orphan to delete merely for being a `task-*` / `routine-*`, and never published from their loader config rather than their canon artefact.
- **The audit is a site-freshness check, not an execution guard** — Cowork tasks already run from current canon at run time; the repo comparison protects the agents site and the cloned routines, so clone lag delays freshness, never correct execution.
- **Repo-native files** (`build-manifest.ts`, `package.json`, the Next.js site, CI) are canon in the repo and have no Claude copy — never flag them as missing-from-Claude.
- **Linear reference copies are reference only** — never the source.
- **Local clone only; GitHub authenticates, no repository attached (read 2026-11-11)** — read the local clone; never clone/fetch/push, which fail on this surface for want of a credential helper rather than for want of network (`git ls-remote` dies on `could not read Username`). `gh api user` returns 200 as `assoc-one` while every `repos/{owner}/{repo}` route returns 403 naming `add_repo` and GraphQL is blocked, so a repo-side read this run cannot make is reported as needing **that repository attached** — never as a whole class of impossible reads. `APP-2353` holds the wider route question and is not closed by this. Re-probe rather than inherit these figures: they are this surface on that date, and another surface may answer differently. Reading the **already-fetched** `origin/main` tree with `git show` / `git ls-tree` is inside this rule and not an exception to it: no network call is made and nothing is written. Compare at that ref and never at the worktree, and report the ahead/behind count so a stuck local branch is named rather than silently read as current (*Reading the repo*; APP-2154).
- **Cap publish tickets at ≤10 artefacts and ≤60 KB attached, whichever binds first.** Byte-exact content transits the exec leg's context twice and a long leg is the one an interruption lands in; split by both caps (APP-1004).

## Setup

- Deployed as a **Cowork scheduled task** (cloud) via a loader config — `task-ops-sync` reads this skill.
- **Connectors:** Linear, plus workspace file access to the local `claude-ops` clone where it is mounted. No GitHub connector; the `gh` CLI is present at 2.89.0 and its REST API authenticates as `assoc-one`, while every repository route returns 403 naming `add_repo` and GraphQL is blocked (read 2026-11-11, this surface only — re-probe elsewhere).
- **Cadence:** daily or slower.
- Smoke test: the first run's parity report.
