[{"data":1,"prerenderedAt":-1},["ShallowReactive",2],{"skill:01M7C9VJXQ2FYRN3HC4X0R0JJ7":3,"skill-same:01M7C9VJXQ2FYRN3HC4X0R0JJ7":54},{"skillNo":4,"name":5,"nameZh":6,"description":7,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":15,"licenseFileUrl":6,"sourceHtmlUrl":16,"categories":17,"keywords":18,"publishedAt":19,"linkOnly":20,"markdownContent":21,"markdownBody":22,"frontMatter":23,"refName":31,"commitSha":32,"skillDirectory":33,"forksCount":14,"repositoryHtmlUrl":34,"repositoryHomepageUrl":35,"ownerHtmlUrl":36,"ownerBlogUrl":37,"ownerDescription":38,"updatedAt":39,"install":40,"resources":53},"01M7C9VJXQ2FYRN3HC4X0R0JJ7","check-drift",null,"Check enrolled regenerated outputs for drift without regenerating them. Report findings and name the relevant repair commands.","bionic-coding\u002Fcrux","bionic-coding","https:\u002F\u002Favatars.githubusercontent.com\u002Fu\u002F301040008?v=4","01M7C9T2NA1V1V0EF1M552HRB3","Bionic Coding","01M7C9T2P72H1AQV5T5PTBFNHN",0,"MIT","https:\u002F\u002Fgithub.com\u002Fbionic-coding\u002Fcrux\u002Fblob\u002Fmain\u002Fcrux\u002Fskills\u002Fcheck-drift\u002FSKILL.md",[],[],"2026-11-15 14:19:17",false,"---\nname: check-drift\ndescription: \"Check enrolled regenerated outputs for drift without regenerating them. Report findings and name the relevant repair commands.\"\nmetadata:\n  tags: \"drift-detection, regeneration, verification, release-gate\"\n  bundles: \"crux-docs\"\n  risk_level: \"low\"\n  requires_access: \"write-tree\"\n  triggers: \"check drift | is the tree in sync | run the drift gates | any drift? | verify all regenerated outputs | pre-release drift check\"\n  routing_note: \"Read-only. Runs every enrolled regenerator's `--dry-run` gate in one pass and reports one table — gate, verdict, drifted paths, and the regenerator that fixes it; never regenerates. The whole-tree counterpart to `verify-code-docs`. Emits a `lint` log op.\"\n---\n\n# Check Drift\n\n\u003C!-- BEGIN GENERATED: runtime-compat -->\n## Runtime compatibility\n\nThis skill is portable across Claude Code, Codex, OpenCode, and OMP (Oh My Pi). This section overrides platform-specific labels below.\n\n- Before running a command that uses `CRUX_PLUGIN_ROOT`, set it to the installed plugin root. In Claude Code, use the value of `CLAUDE_PLUGIN_ROOT`. In Codex, OpenCode, and OMP, derive it from the absolute path of this selected `SKILL.md`: the plugin root is the parent of its `skills\u002F` directory (in OMP `bash`, `skill:\u002F\u002F\u003Cname>` resolves to the skill directory). In a source checkout, use the checkout `crux\u002F` directory.\n- For project-local skills, use `.claude\u002Fskills` in Claude Code, `.agents\u002Fskills` in Codex, `.opencode\u002Fskills` in OpenCode (which also reads the singular `.opencode\u002Fskill`), and `.omp\u002Fskills` in OMP. Set `CRUX_LOCAL_SKILLS_DIR` to that path before following any command below that uses it.\n- Translate Claude Code tool labels such as `Agent`, `Read`, `Write`, `Bash`, `WebSearch`, and `WebFetch` to the matching capability in the current session. Codex names its own capabilities; OpenCode uses the lowercase forms `subagent`, `read`, `edit`, `shell`, `websearch`, and `webfetch`, where `edit` covers both `Edit` and `Write`; OMP uses `task`, `read`, `edit`, `write`, `bash`, `grep`, `glob`, `find`, `todo`, and `web_search` (where `read` also handles URLs and `skill:\u002F\u002F` URIs). Do not attempt to invoke the Claude Code labels as literal commands on another host.\n- Install the generated role agents before delegating: `install-codex-agents` in Codex, `install-opencode-agents` in OpenCode, `install-omp-agents` in OMP. Codex names them `crux_architect`, `crux_brainstormer`, `crux_commander`, `crux_dev_lead`, `crux_developer`, `crux_historian`, `crux_librarian`, `crux_night_gardener`, `crux_reviewer`, and `crux_wayfinder`; OpenCode and OMP use the bare role names `architect`, `brainstormer`, `commander`, `dev-lead`, `developer`, `historian`, `librarian`, `night-gardener`, `reviewer`, and `wayfinder` (in OMP, `scout` may also be used for reconnaissance alongside `wayfinder`). If a required role or capability is unavailable, report that truthfully instead of claiming it ran.\n- Argument placeholders such as `$adr` and `$book` bind only in Claude Code. On a host without argument binding they are unset — take the value from the user's phrase. The \"Fields OpenCode ignores\" section of `OPENCODE_GUIDE.md` names the invocation-control fields OpenCode ignores.\n\u003C!-- END GENERATED: runtime-compat -->\n\n\n## Overview\n\nEvery derived artifact in this repo has a vendored regenerator and a `--dry-run` drift gate — the enrollment roster is the \"regenerative outputs\" table in the repo-root `AGENTS.md`. This skill runs **all** of those gates in one read-only pass and reports a single table, so a developer or a release gate learns in one step whether any regenerated output has drifted from its source.\n\nIt is the whole-tree counterpart to `verify-code-docs`, which runs the one `code\u002F` gate. Same contract, wider surface: **it never regenerates anything.** For every drifted or broken gate it names the regenerator the user runs to fix it.\n\n**Read-only invariant.** This skill invokes each enrolled regenerator with `--dry-run` only. It writes nothing under the tree, `crux\u002Fcatalog\u002F`, `opencode\u002Fagents\u002F`, or any source file. When it finds drift, it recommends the regenerator by name; the user (or a CI hook) decides whether to run it.\n\n**The one side effect, named rather than glossed.** Running a gate imports the plugin's own\nPython modules, so the interpreter writes `__pycache__\u002F*.pyc` beside them inside the installed\nplugin. That is bytecode, not content: no source file, no catalog, no file under the tree and\nnothing in the project under inspection is touched. Set `PYTHONDONTWRITEBYTECODE=1` to suppress it.\nReport it if a reader asks what the run wrote; do not report the run as having written nothing at all.\n\n## When to use\n\n- User says: \"check drift\", \"is the tree in sync\", \"run the drift gates\", \"any drift?\", \"verify all regenerated outputs\", \"pre-release drift check\".\n- Before a release, before opening a PR, or after a change that touches any source of a regenerated output (ADR frontmatter, a skill's SKILL.md, an agent definition, the writing-rules block, `plugin.json`'s version).\n- When `audit-docs` reports drift and you want the full regenerated-output picture in one table.\n\nDo **not** use this skill for:\n- Regenerating anything — this skill is read-only. Run the recommended regenerator yourself.\n- The document-graph integrity walk (index ↔ files ↔ cross-references) — that is `audit-docs`. This skill checks only the regenerated-output drift gates.\n- Fixing a single code-doc drift — `verify-code-docs` is the focused version for that one gate.\n\n## The pipeline\n\nExecute in order. Never reorder, never skip a gate.\n\n### 0. Resolve per-repo configuration (.bionic.yml)\n\nRun `python3 \"${CRUX_PLUGIN_ROOT}\u002Fscripts\u002Fbionic-config.py\"` from the repo root. On exit 1, STOP and surface the `{\"error\": ...}` payload. Use the returned `docs_dir` wherever a gate below needs `\u003Cdocs_dir>` (default `bionic`).\n\n### 1. Run every enrolled drift gate\n\nRun each command below from the repo root — **both tables**: the roster gates here, and the guards in *Guards that carry no roster row* further down. The second table's verdicts are reported exactly like the first's, and its rows count toward the step-4 accounting the same way, so `enrolled` there means every row of both tables. **Parse each command's stdout as JSON regardless of its exit code** — the exit code alone does not tell clean from drift. Collect a verdict per gate; do not stop on the first drift.\n\n| Gate (output) | Scope | Dry-run command | Regenerator that fixes it |\n|---|---|---|---|\n| `crux\u002Fcatalog\u002Fskills.json` + `agents.json` | plugin-authoring | `validate-catalog.py --dry-run` | `validate-catalog.py` |\n| `crux\u002Fbox\u002Fmicro-crux.md` and root preview when present | plugin-authoring | `generate-micro-crux.py --dry-run` | `generate-micro-crux.py` |\n| `docs\u002Fcode\u002F` | project | `uv run --no-config extract-code-docs.py --dry-run --config \u003Cdocs_dir>\u002Fmanifest.yml` | `uv run --no-config extract-code-docs.py --config \u003Cdocs_dir>\u002Fmanifest.yml` (skill `extract-code-docs`) |\n| `\u003Cdocs_dir>\u002Farch\u002F` spine | project | `derive-arch.py --dry-run --docs-dir \u003Cdocs_dir>` | `derive-arch.py --docs-dir \u003Cdocs_dir>` (skill `derive-arch`) |\n| `\u003Cdocs_dir>\u002Fadrs\u002Fsummaries\u002F` | project | `summarize-adrs.py --dry-run` | `summarize-adrs.py` |\n| `\u003Cdocs_dir>\u002Fadrs\u002Fdoctrine\u002F` | project | `compile-doctrine.py --dry-run` | `compile-doctrine.py` (skill `compile-doctrine`) |\n| `opencode\u002Fagents\u002F` | plugin-authoring | `generate-opencode-agents.py --dry-run` | `generate-opencode-agents.py` |\n| `\u003Cdocs_dir>\u002Fadrs\u002Flineage.md` | project | `generate-lineage.py --dry-run` | `generate-lineage.py` (skill `link-adr-graph`) |\n| `\u003Cdocs_dir>\u002Fadrs\u002Findex.md` | project | `generate-adr-index.py --dry-run` | `generate-adr-index.py` |\n| `\u003Cdocs_dir>\u002Findex.md` `## ADRs` rollup | project | `generate-index-rollup.py --dry-run` | `generate-index-rollup.py` |\n| `README.md` version footer | plugin-authoring | `generate-readme-footer.py --dry-run` | `generate-readme-footer.py` |\n| writing-rules block (3 surfaces) | plugin-authoring | `generate-writing-rules.py --dry-run` | `generate-writing-rules.py` |\n| runtime-compatibility block | plugin-authoring | `generate-runtime-compat.py --dry-run` | `generate-runtime-compat.py` |\n| `\u003Ctree>\u002FAGENTS.md` §10 routing-table region | plugin-authoring | `generate-routing-table.py --dry-run` | `generate-routing-table.py` |\n| `\u003Cdocs_dir>\u002Fadrs\u002Freviews\u002Findex.md` | project | `generate-reviews-index.py --dry-run` | `generate-reviews-index.py` |\n| `\u003Cdocs_dir>\u002Fjournal\u002Findex.md` | project | `generate-journal-index.py --dry-run` | `generate-journal-index.py` |\n| `\u003Cdocs_dir>\u002Flog\u002Fsummary.md` | project | `generate-log-summary.py --dry-run` | `generate-log-summary.py` (skill `cleanup-campsite`) |\n| `crux\u002Fcatalog\u002Frules.json` (the rules the plugin ships) | plugin-authoring | `generate-rules-catalog.py --dry-run` | `generate-rules-catalog.py` |\n| `USER_GUIDE.md` crux-mods reach-table region | plugin-authoring | `generate-mods-reach-tables.py --dry-run` | `generate-mods-reach-tables.py` |\n\n> **This row's gate answers two questions, and only one of them is drift.** Beside the byte comparison it checks PUBLICATION ELIGIBILITY: every slug cited on a shipped surface must resolve to a source record whose decision has been accepted.[^pubelig] A refusal exits 1 with a `validation_errors` list rather than a `drift` key, and each row names the citing path, the citation, the source record, its raw status and the reason. **File such a row BROKEN, never DRIFT, and do not name the regenerator as its remedy** — re-running it refuses again. The remedy depends on the row's reason: accept a Proposed decision; for a Deprecated or Superseded one, migrate the citation to the rule that displaced it or remove it; an observation-backed rule needs an owner decision before it can ship. A status change moves no byte of the catalog, so a row reported clean by byte comparison alone would be a false green here.\n\n> **The operations-log summary gate passes with pending work.** `generate-log-summary.py --dry-run` lists each settled month that has a detail file and no section under `pending_months`, and exits 0 when they are its only finding, because a month settles by date alone. Report the pending months beside the clean verdict and name `cleanup-campsite` as the remedy, which runs the catch-up. Each failure in its JSON carries a `kind`: a `region` failure is fixed by running `generate-log-summary.py`; a `structure` failure (a section for a month that is not settled, a second section, a section without a detail file, a marker error, or an incomplete split) is not, and its remedy is a hand edit of `summary.md` or `operation-log.py repair`.\n\nInvoke each via `uv run \"${CRUX_PLUGIN_ROOT}\u002Fscripts\u002F\u003Cname>\" ...` from the repo root. This roster is the source of truth for what a derived artifact owes; if the repo-root `AGENTS.md` roster grows a row, add its gate here.\n\nThe micro-crux gate verifies the shipped guide in staged plugin trees. It also\nverifies the root preview in an authoring checkout when present. A consuming\nproject reports N\u002FA. This gate remains selected at release; it is not a\ncycle-time documentation-tree skip.\n\n### Guards that carry no roster row\n\nThese answer real questions and run like the roster gates, but they regenerate nothing, so they are deliberately absent from the regenerative-outputs roster — that roster's subject is derived artifacts. They are declared here instead, which is the one place a reader looks for what gets executed. Each emits the same envelope the roster gates do, including the self-declared not-applicable lane.\n\n| Guard | Scope | Command | What it answers |\n|---|---|---|---|\n| `\u003Cdocs_dir>\u002Fobservations\u002F` records | project | `check_observations.py` | the CHK-OBS-* rules; reports `concern_enabled: false` when the concern is off |\n| `\u003Cdocs_dir>\u002Fpromptbooks\u002Findex.md` | project | `check-promptbook-index.py` | CHK-PB-11 completeness: a missing row, a duplicate row, a row naming an absent book, and the three count surfaces |\n\n**The `Scope` column says whose tree the row's gate inspects.** That is the difference between a\nverdict about this project and a verdict about the plugin. A `project` row's output lives in the\ndocumentation tree, so its gate measures the project wherever the plugin is installed. A\n`plugin-authoring` row's output lives in the plugin's own source checkout — the catalogs, the\n`opencode\u002F` projection, the plugin `README.md` footer, and the writing-rules, routing-table,\nruntime-compatibility and crux-mods reach-table regions. **Every one of those roster rows is\ninapplicable in a consuming project, and its gate reports so itself:** exit 0 with\n`\"surface_absent\": true` and a `reason`, having\nwritten nothing. Report those rows N\u002FA with the reason, never as clean and never as broken.\n\nRun the whole roster every time. Do not decide in advance which rows apply — the gate is what\ndecides, and reading its `surface_absent` payload is how you learn. A `plugin-authoring` gate that\nreturns a drift verdict in a consuming project has resolved a path inside the installed plugin, and\nthat is a defect to report, not drift to fix.[^scope]\n\n### 1.A. Run the validation checks\n\nA validation check is not a drift gate. It regenerates nothing, so it owns no row in the repo-root `AGENTS.md` \"regenerative outputs\" roster, and enrolling it there would break the derived-artifact rule rather than keep it — a roster row promises a regenerator, and a validation check has none to promise. The roster count is unchanged by this section.\n\nRun each check below from the repo root, after the drift gates and before the report.\n\n| Check | Command | What a finding means | The fix |\n|---|---|---|---|\n| rule citations resolve | `lint-governs-references.py` | a `rule:\u003Cslug>` citation names a rule that does not exist or has been retired, or a ledger handle does not resolve | edit the citation, or restore the rule |\n\nInvoke it as `uv run \"${CRUX_PLUGIN_ROOT}\u002Fscripts\u002Flint-governs-references.py\"` with no flags. `--path` is its one flag: it narrows the scan to the files and directories you name, and passing none is what selects the default scope — the plugin source and the documentation tree. There is no `--dry-run`, because the linter never writes, so every run is already the read-only form.\n\n**A citation failure is BROKEN, never DRIFT.** Regenerating fixes nothing here, because nothing is derived: a citation is authored text making a claim about a rule, and a stale claim is repaired by editing the claim. Report each finding in the same table as the gates, with BROKEN as its verdict and the path, line and token as the problem. A retired-slug finding names the rule that displaced it — carry that name into the report, because it is the fix.[^retired]\n\n**An empty resolved scope is BROKEN, not a clean pass.** A check that scanned nothing has verified nothing. The linter exits nonzero and names the condition; report it as BROKEN and fix the scope. The same holds for its other refusals — a containment breach, a non-regular file, a file past the byte ceiling, a scope past the file ceiling, or a file that does not decode. Each is a refusal the check reports rather than a file it silently skips.\n\n**Zero `rule:` citations inside a non-empty scope is clean.** The citation form is greenfield by the decision's own premise, so a pass over a scope that carries no citation yet is a real pass. Do not read it as a broken check, and never plant a citation to give the check something to find.\n\n### 2. Classify each gate's verdict\n\nShared exit-code semantics (the same contract `verify-code-docs`, CHK-CODE-4, CHK-CAT-3, and CHK-ARCH-1 use): `0` clean, `1` drift or a validation error with valid JSON on stdout, any other non-zero with empty or unparseable stdout = crash (surface stderr, never a document finding). Map each gate to one verdict:\n\n- **clean** — exit 0, JSON says no drift (`{\"drift\": false}` \u002F `{\"clean\": true}` \u002F `added=changed=removed=0` \u002F empty diff), no `validation_errors`, **and no `surface_absent` key**. That last clause is part of the definition, not a later correction: a `surface_absent` payload carries `{\"drift\": false}` at exit 0 and matches every other clause here, so a reader matching these bullets top-down would call it clean four bullets before reaching N\u002FA. It is N\u002FA.\n- **DRIFT** — exit 1 with a JSON drift payload (`{\"drift\": true, \"paths\": [...]}`, non-empty `added\u002Fchanged\u002Fremoved`, or a section diff). Capture the drifted paths. The fix is the regenerator in the table's third column.\n- **BROKEN** — the JSON carries a non-empty `validation_errors` key (a malformed `governs` entry, a malformed reconciliation ledger, a schema error). Regenerating does NOT fix a validation error; the named input must be repaired first. Report the problems.\n- **CRASH** — non-zero exit with empty or unparseable stdout (a missing dependency, an unhandled exception). Surface stderr; this is an environment problem, never a document finding.\n- **N\u002FA** — exit 0 with `\"surface_absent\": true` on the JSON. The verdict keys on that payload key, not on which gate printed it. **Every `plugin-authoring` gate emits it outside the plugin's own source checkout**, carrying a `reason` that names why the row does not apply; report the reason, and recommend no regenerator, because there is no output in this project for one to write. Four project gates emit it too: `generate-reviews-index.py` when the tree carries no `\u003Cdocs_dir>\u002Fadrs\u002Freviews\u002F`, which is every project that has not yet run a decision review; `generate-journal-index.py` when the tree carries no `\u003Cdocs_dir>\u002Fjournal\u002F` at all; `generate-log-summary.py` when the tree carries no `\u003Cdocs_dir>\u002Flog\u002F`, which is every tree whose operations log is not yet split; and `extract-code-docs.py` when `code.extractors` is empty, which is every project that has configured no extractor. That last one used to exit 0 with EMPTY stdout and one line on stderr, so a reader aggregating exit codes counted it as a clean gate and a tree that had scanned nothing reported its code docs verified. There is no derived artifact, so nothing can have drifted, and nothing was measured either. **Report it as N\u002FA, never as clean** — a gate that scanned an absent surface has verified nothing, and recording it green is the vacuous-green shape this skill exists to prevent. **The fix is never the regenerator, and it differs by surface:** consider `migrate-adrs` when historical decisions need assessment, `init-docs` when the journal surface was never created, `cleanup-campsite` when the operations log is not yet split, and configure `code.extractors` in `\u003Cdocs_dir>\u002Fmanifest.yml` when no extractor is declared.\n\n**Warnings ride alongside, never change the verdict.** Read any top-level `warnings` key (`validate-catalog.py` emits one — the `models.yml` `verified:` staleness clock; `check-doctrine-reconciliation.py`'s S1 warn lane is similar). Surface it as WARNING beside the gate's verdict. A gate at exit 0 with a non-empty `warnings` list is a **clean pass worth reporting with its warning**, not a failure.\n\n**Shallow clones.** A tree that has published a clause migration needs full Git history. In a shallow clone (the default `actions\u002Fcheckout` depth of 1 in CI, for example) the governing readers (summaries, doctrine, rules catalog, arch and reviews index) refuse with `history-unavailable`. Set `fetch-depth: 0` in CI, or run `git fetch --unshallow` locally. Report such a refusal as REFUSAL, never as drift.\n\n### 3. The one roster exception — `derive-arch.py --dry-run` exit 2\n\n`derive-arch.py --dry-run` has a third lane the others do not: **exit 2, and stderr says which of two lanes it is** (copy the CHK-ARCH-1 distinction exactly).\n\n- **Crash lane** — a missing dependency or unhandled exception. Verdict **CRASH**; surface stderr; fix the environment.\n- **Deliberate refusal** — stderr names `StaleProjectionInput`. A spine file that projects a gated artifact declined because that artifact is not what its own regenerator produces. Nothing was written. This is **not a crash and not arch drift.** Verdict **REFUSAL**: report the capability failure, name the stale input from stderr, and recommend *that input's* own regenerator (`validate-catalog.py` for the skill catalog, `generate-adr-index.py` for the ADR index) followed by a re-derive. **Do NOT recommend re-deriving arch as the fix** — a re-derive reads the same stale input and refuses again.\n\n### 4. Report one table\n\nPrint a single table with one row per gate and one row per validation check: **name · verdict (clean \u002F DRIFT \u002F BROKEN \u002F CRASH \u002F REFUSAL \u002F N\u002FA) · drifted paths (or the problem \u002F stderr summary) · the command that fixes it**. Then the **roster accounting**, which keeps membership separate from execution result. Report all five counts, every time, even when some are zero:\n\n```\nenrolled            \u003CN>   ROSTER ROWS -- membership, not a result\nexecuted passing    \u003CC>   rows whose gate ran and inspected >=1 configured input, no drift\nfailed              \u003CD>   rows whose gate reported DRIFT \u002F BROKEN \u002F CRASH \u002F REFUSAL\nskipped\u002Finapplicable \u003CX>  rows whose gate reported N\u002FA: nothing configured, or no surface\nno evidence         \u003CE>   rows whose gate exited 0 having inspected ZERO configured inputs\n```\n\n**Count ROWS, not commands.** The unit is the repo-root roster row, because that is what\nmembership means; one command may cover several rows (`validate-catalog.py` covers both\n`skills.json` and `agents.json`). Attribute a command's verdict to every row it covers, or the identity below fails\nfor a reason that has nothing to do with drift.\n\n`enrolled == executed passing + failed + skipped\u002Finapplicable`. The `no evidence` count is not a fourth disjoint bucket — it re-counts the rows that measured nothing, and every N\u002FA row is one of them. It is reported separately because it is the number a reader needs and the other four hide: **a clean process exit that inspected no configured inputs never establishes that those inputs were checked.**\n\nNever write \"all gates clean\" while `skipped\u002Finapplicable` or `no evidence` is above zero. Say how many measured nothing, and name them.\n\n**A measured zero is not no evidence.** A gate with extractors configured that finds zero drift inspected its inputs and found them in sync; that is a real pass and belongs in `executed passing`. Only a gate that inspected nothing belongs in `no evidence`. **A gate that inspected the plugin's own copy of itself measured nothing about this project either**, and is never recorded as `executed passing` for a project row — that reading is what let a downstream run report the plugin's 56 shipped skills as a clean project gate. Do not collapse the two, and never drop a row from the roster to improve the pass count -- membership is fixed by the repo-root `AGENTS.md` roster, not by how a run turned out.\n\nFor DRIFT rows, the recommended fix is the third-column regenerator. For BROKEN rows, the fix is repairing the named input, then re-running its regenerator — except a validation-check row, whose fix is editing the authored text the finding names, with no regenerator involved. For CRASH rows, the fix is the environment. For a REFUSAL row, the fix is the named upstream input's regenerator, then a re-derive.\n\n### 5. Record the `lint` operation\n\nOne `lint` op entry (the same op `verify-code-docs` uses — a targeted check, distinct from `audit`'s full walk). Write the entry through the log writer (`\u003Cdocs_dir>\u002FAGENTS.md` §6).[^log-writer] Write the body below to a file outside the tree, then run:\n\n```\nuv run \"${CRUX_PLUGIN_ROOT}\u002Fscripts\u002Foperation-log.py\" append --repo-root \u003Crepo-root> \\\n  --op lint --subject 'check-drift (C clean \u002F D drift \u002F B broken \u002F X crash)' --date YYYY-MM-DD --body-file \u003Cpath>\n```\n\nThe entry it writes at the top of the current month's detail file `\u003Cdocs_dir>\u002Flog\u002FYYYY-MM.md`:\n\n```\n## [YYYY-MM-DD] lint | check-drift (C clean \u002F D drift \u002F B broken \u002F X crash)\n```\n\nBody, 1–3 lines: the summary line, and for any non-clean gate its name plus the regenerator that fixes it. On an all-clean pass, log it anyway — a verification is an event:\n\n```\n## [YYYY-MM-DD] lint | check-drift (all N gates clean)\n```\n\nA refused append adds no entry: fix the cause it names, then rerun the append alone (§6). Then run the commit step of §6 over the result's `commit_paths` and `restore_paths`.\n\n### 6. Hand-off\n\n- If every gate is clean, report the all-clean table and stop.\n- If any gate drifted, list the exact regenerator command per drifted gate and let the user run them. This skill never runs them.\n- If a gate is BROKEN or CRASH or REFUSAL, surface the problem and the specific next action; a release must not proceed on a broken gate.\n\n[^scope]: rule:regenerator-declares-its-scope, rule:out-of-scope-is-surface-absent, rule:drift-report-carries-scope-and-reconciles\n\n## See also\n\n- `verify-code-docs` — the single-gate version: the read-only drift check for just the `code\u002F` concern. This skill is that pattern applied to every enrolled regenerator.\n- `audit-docs` — the document-graph integrity walk; its CHK-CAT-3 \u002F CHK-CODE-4 \u002F CHK-ARCH-1 run three of these gates individually, and CHK-DRIFT-1 folds in the rest.\n- `compile-doctrine`, `derive-arch`, `link-adr-graph`, `extract-code-docs` — the skills that actually regenerate the outputs this skill only checks.\n- The repo-root `AGENTS.md` \"regenerative outputs\" table — the enrollment roster this skill's gate list mirrors. The validation checks of §1.A are deliberately absent from it.\n\n[^retired]: `rule:retired-cite-fails-lint` — a retired slug fails the lint, and the failure names the rule that displaced it.\n\n[^pubelig]: rule:shipped-citation-requires-an-accepted-decision, rule:an-ineligible-citation-refuses-the-projection\n\n[^log-writer]: rule:log-entries-go-through-the-log-writer, rule:no-writer-writes-the-legacy-log-file\n","# Check Drift\n\n\u003C!-- BEGIN GENERATED: runtime-compat -->\n## Runtime compatibility\n\nThis skill is portable across Claude Code, Codex, OpenCode, and OMP (Oh My Pi). This section overrides platform-specific labels below.\n\n- Before running a command that uses `CRUX_PLUGIN_ROOT`, set it to the installed plugin root. In Claude Code, use the value of `CLAUDE_PLUGIN_ROOT`. In Codex, OpenCode, and OMP, derive it from the absolute path of this selected `SKILL.md`: the plugin root is the parent of its `skills\u002F` directory (in OMP `bash`, `skill:\u002F\u002F\u003Cname>` resolves to the skill directory). In a source checkout, use the checkout `crux\u002F` directory.\n- For project-local skills, use `.claude\u002Fskills` in Claude Code, `.agents\u002Fskills` in Codex, `.opencode\u002Fskills` in OpenCode (which also reads the singular `.opencode\u002Fskill`), and `.omp\u002Fskills` in OMP. Set `CRUX_LOCAL_SKILLS_DIR` to that path before following any command below that uses it.\n- Translate Claude Code tool labels such as `Agent`, `Read`, `Write`, `Bash`, `WebSearch`, and `WebFetch` to the matching capability in the current session. Codex names its own capabilities; OpenCode uses the lowercase forms `subagent`, `read`, `edit`, `shell`, `websearch`, and `webfetch`, where `edit` covers both `Edit` and `Write`; OMP uses `task`, `read`, `edit`, `write`, `bash`, `grep`, `glob`, `find`, `todo`, and `web_search` (where `read` also handles URLs and `skill:\u002F\u002F` URIs). Do not attempt to invoke the Claude Code labels as literal commands on another host.\n- Install the generated role agents before delegating: `install-codex-agents` in Codex, `install-opencode-agents` in OpenCode, `install-omp-agents` in OMP. Codex names them `crux_architect`, `crux_brainstormer`, `crux_commander`, `crux_dev_lead`, `crux_developer`, `crux_historian`, `crux_librarian`, `crux_night_gardener`, `crux_reviewer`, and `crux_wayfinder`; OpenCode and OMP use the bare role names `architect`, `brainstormer`, `commander`, `dev-lead`, `developer`, `historian`, `librarian`, `night-gardener`, `reviewer`, and `wayfinder` (in OMP, `scout` may also be used for reconnaissance alongside `wayfinder`). If a required role or capability is unavailable, report that truthfully instead of claiming it ran.\n- Argument placeholders such as `$adr` and `$book` bind only in Claude Code. On a host without argument binding they are unset — take the value from the user's phrase. The \"Fields OpenCode ignores\" section of `OPENCODE_GUIDE.md` names the invocation-control fields OpenCode ignores.\n\u003C!-- END GENERATED: runtime-compat -->\n\n\n## Overview\n\nEvery derived artifact in this repo has a vendored regenerator and a `--dry-run` drift gate — the enrollment roster is the \"regenerative outputs\" table in the repo-root `AGENTS.md`. This skill runs **all** of those gates in one read-only pass and reports a single table, so a developer or a release gate learns in one step whether any regenerated output has drifted from its source.\n\nIt is the whole-tree counterpart to `verify-code-docs`, which runs the one `code\u002F` gate. Same contract, wider surface: **it never regenerates anything.** For every drifted or broken gate it names the regenerator the user runs to fix it.\n\n**Read-only invariant.** This skill invokes each enrolled regenerator with `--dry-run` only. It writes nothing under the tree, `crux\u002Fcatalog\u002F`, `opencode\u002Fagents\u002F`, or any source file. When it finds drift, it recommends the regenerator by name; the user (or a CI hook) decides whether to run it.\n\n**The one side effect, named rather than glossed.** Running a gate imports the plugin's own\nPython modules, so the interpreter writes `__pycache__\u002F*.pyc` beside them inside the installed\nplugin. That is bytecode, not content: no source file, no catalog, no file under the tree and\nnothing in the project under inspection is touched. Set `PYTHONDONTWRITEBYTECODE=1` to suppress it.\nReport it if a reader asks what the run wrote; do not report the run as having written nothing at all.\n\n## When to use\n\n- User says: \"check drift\", \"is the tree in sync\", \"run the drift gates\", \"any drift?\", \"verify all regenerated outputs\", \"pre-release drift check\".\n- Before a release, before opening a PR, or after a change that touches any source of a regenerated output (ADR frontmatter, a skill's SKILL.md, an agent definition, the writing-rules block, `plugin.json`'s version).\n- When `audit-docs` reports drift and you want the full regenerated-output picture in one table.\n\nDo **not** use this skill for:\n- Regenerating anything — this skill is read-only. Run the recommended regenerator yourself.\n- The document-graph integrity walk (index ↔ files ↔ cross-references) — that is `audit-docs`. This skill checks only the regenerated-output drift gates.\n- Fixing a single code-doc drift — `verify-code-docs` is the focused version for that one gate.\n\n## The pipeline\n\nExecute in order. Never reorder, never skip a gate.\n\n### 0. Resolve per-repo configuration (.bionic.yml)\n\nRun `python3 \"${CRUX_PLUGIN_ROOT}\u002Fscripts\u002Fbionic-config.py\"` from the repo root. On exit 1, STOP and surface the `{\"error\": ...}` payload. Use the returned `docs_dir` wherever a gate below needs `\u003Cdocs_dir>` (default `bionic`).\n\n### 1. Run every enrolled drift gate\n\nRun each command below from the repo root — **both tables**: the roster gates here, and the guards in *Guards that carry no roster row* further down. The second table's verdicts are reported exactly like the first's, and its rows count toward the step-4 accounting the same way, so `enrolled` there means every row of both tables. **Parse each command's stdout as JSON regardless of its exit code** — the exit code alone does not tell clean from drift. Collect a verdict per gate; do not stop on the first drift.\n\n| Gate (output) | Scope | Dry-run command | Regenerator that fixes it |\n|---|---|---|---|\n| `crux\u002Fcatalog\u002Fskills.json` + `agents.json` | plugin-authoring | `validate-catalog.py --dry-run` | `validate-catalog.py` |\n| `crux\u002Fbox\u002Fmicro-crux.md` and root preview when present | plugin-authoring | `generate-micro-crux.py --dry-run` | `generate-micro-crux.py` |\n| `docs\u002Fcode\u002F` | project | `uv run --no-config extract-code-docs.py --dry-run --config \u003Cdocs_dir>\u002Fmanifest.yml` | `uv run --no-config extract-code-docs.py --config \u003Cdocs_dir>\u002Fmanifest.yml` (skill `extract-code-docs`) |\n| `\u003Cdocs_dir>\u002Farch\u002F` spine | project | `derive-arch.py --dry-run --docs-dir \u003Cdocs_dir>` | `derive-arch.py --docs-dir \u003Cdocs_dir>` (skill `derive-arch`) |\n| `\u003Cdocs_dir>\u002Fadrs\u002Fsummaries\u002F` | project | `summarize-adrs.py --dry-run` | `summarize-adrs.py` |\n| `\u003Cdocs_dir>\u002Fadrs\u002Fdoctrine\u002F` | project | `compile-doctrine.py --dry-run` | `compile-doctrine.py` (skill `compile-doctrine`) |\n| `opencode\u002Fagents\u002F` | plugin-authoring | `generate-opencode-agents.py --dry-run` | `generate-opencode-agents.py` |\n| `\u003Cdocs_dir>\u002Fadrs\u002Flineage.md` | project | `generate-lineage.py --dry-run` | `generate-lineage.py` (skill `link-adr-graph`) |\n| `\u003Cdocs_dir>\u002Fadrs\u002Findex.md` | project | `generate-adr-index.py --dry-run` | `generate-adr-index.py` |\n| `\u003Cdocs_dir>\u002Findex.md` `## ADRs` rollup | project | `generate-index-rollup.py --dry-run` | `generate-index-rollup.py` |\n| `README.md` version footer | plugin-authoring | `generate-readme-footer.py --dry-run` | `generate-readme-footer.py` |\n| writing-rules block (3 surfaces) | plugin-authoring | `generate-writing-rules.py --dry-run` | `generate-writing-rules.py` |\n| runtime-compatibility block | plugin-authoring | `generate-runtime-compat.py --dry-run` | `generate-runtime-compat.py` |\n| `\u003Ctree>\u002FAGENTS.md` §10 routing-table region | plugin-authoring | `generate-routing-table.py --dry-run` | `generate-routing-table.py` |\n| `\u003Cdocs_dir>\u002Fadrs\u002Freviews\u002Findex.md` | project | `generate-reviews-index.py --dry-run` | `generate-reviews-index.py` |\n| `\u003Cdocs_dir>\u002Fjournal\u002Findex.md` | project | `generate-journal-index.py --dry-run` | `generate-journal-index.py` |\n| `\u003Cdocs_dir>\u002Flog\u002Fsummary.md` | project | `generate-log-summary.py --dry-run` | `generate-log-summary.py` (skill `cleanup-campsite`) |\n| `crux\u002Fcatalog\u002Frules.json` (the rules the plugin ships) | plugin-authoring | `generate-rules-catalog.py --dry-run` | `generate-rules-catalog.py` |\n| `USER_GUIDE.md` crux-mods reach-table region | plugin-authoring | `generate-mods-reach-tables.py --dry-run` | `generate-mods-reach-tables.py` |\n\n> **This row's gate answers two questions, and only one of them is drift.** Beside the byte comparison it checks PUBLICATION ELIGIBILITY: every slug cited on a shipped surface must resolve to a source record whose decision has been accepted.[^pubelig] A refusal exits 1 with a `validation_errors` list rather than a `drift` key, and each row names the citing path, the citation, the source record, its raw status and the reason. **File such a row BROKEN, never DRIFT, and do not name the regenerator as its remedy** — re-running it refuses again. The remedy depends on the row's reason: accept a Proposed decision; for a Deprecated or Superseded one, migrate the citation to the rule that displaced it or remove it; an observation-backed rule needs an owner decision before it can ship. A status change moves no byte of the catalog, so a row reported clean by byte comparison alone would be a false green here.\n\n> **The operations-log summary gate passes with pending work.** `generate-log-summary.py --dry-run` lists each settled month that has a detail file and no section under `pending_months`, and exits 0 when they are its only finding, because a month settles by date alone. Report the pending months beside the clean verdict and name `cleanup-campsite` as the remedy, which runs the catch-up. Each failure in its JSON carries a `kind`: a `region` failure is fixed by running `generate-log-summary.py`; a `structure` failure (a section for a month that is not settled, a second section, a section without a detail file, a marker error, or an incomplete split) is not, and its remedy is a hand edit of `summary.md` or `operation-log.py repair`.\n\nInvoke each via `uv run \"${CRUX_PLUGIN_ROOT}\u002Fscripts\u002F\u003Cname>\" ...` from the repo root. This roster is the source of truth for what a derived artifact owes; if the repo-root `AGENTS.md` roster grows a row, add its gate here.\n\nThe micro-crux gate verifies the shipped guide in staged plugin trees. It also\nverifies the root preview in an authoring checkout when present. A consuming\nproject reports N\u002FA. This gate remains selected at release; it is not a\ncycle-time documentation-tree skip.\n\n### Guards that carry no roster row\n\nThese answer real questions and run like the roster gates, but they regenerate nothing, so they are deliberately absent from the regenerative-outputs roster — that roster's subject is derived artifacts. They are declared here instead, which is the one place a reader looks for what gets executed. Each emits the same envelope the roster gates do, including the self-declared not-applicable lane.\n\n| Guard | Scope | Command | What it answers |\n|---|---|---|---|\n| `\u003Cdocs_dir>\u002Fobservations\u002F` records | project | `check_observations.py` | the CHK-OBS-* rules; reports `concern_enabled: false` when the concern is off |\n| `\u003Cdocs_dir>\u002Fpromptbooks\u002Findex.md` | project | `check-promptbook-index.py` | CHK-PB-11 completeness: a missing row, a duplicate row, a row naming an absent book, and the three count surfaces |\n\n**The `Scope` column says whose tree the row's gate inspects.** That is the difference between a\nverdict about this project and a verdict about the plugin. A `project` row's output lives in the\ndocumentation tree, so its gate measures the project wherever the plugin is installed. A\n`plugin-authoring` row's output lives in the plugin's own source checkout — the catalogs, the\n`opencode\u002F` projection, the plugin `README.md` footer, and the writing-rules, routing-table,\nruntime-compatibility and crux-mods reach-table regions. **Every one of those roster rows is\ninapplicable in a consuming project, and its gate reports so itself:** exit 0 with\n`\"surface_absent\": true` and a `reason`, having\nwritten nothing. Report those rows N\u002FA with the reason, never as clean and never as broken.\n\nRun the whole roster every time. Do not decide in advance which rows apply — the gate is what\ndecides, and reading its `surface_absent` payload is how you learn. A `plugin-authoring` gate that\nreturns a drift verdict in a consuming project has resolved a path inside the installed plugin, and\nthat is a defect to report, not drift to fix.[^scope]\n\n### 1.A. Run the validation checks\n\nA validation check is not a drift gate. It regenerates nothing, so it owns no row in the repo-root `AGENTS.md` \"regenerative outputs\" roster, and enrolling it there would break the derived-artifact rule rather than keep it — a roster row promises a regenerator, and a validation check has none to promise. The roster count is unchanged by this section.\n\nRun each check below from the repo root, after the drift gates and before the report.\n\n| Check | Command | What a finding means | The fix |\n|---|---|---|---|\n| rule citations resolve | `lint-governs-references.py` | a `rule:\u003Cslug>` citation names a rule that does not exist or has been retired, or a ledger handle does not resolve | edit the citation, or restore the rule |\n\nInvoke it as `uv run \"${CRUX_PLUGIN_ROOT}\u002Fscripts\u002Flint-governs-references.py\"` with no flags. `--path` is its one flag: it narrows the scan to the files and directories you name, and passing none is what selects the default scope — the plugin source and the documentation tree. There is no `--dry-run`, because the linter never writes, so every run is already the read-only form.\n\n**A citation failure is BROKEN, never DRIFT.** Regenerating fixes nothing here, because nothing is derived: a citation is authored text making a claim about a rule, and a stale claim is repaired by editing the claim. Report each finding in the same table as the gates, with BROKEN as its verdict and the path, line and token as the problem. A retired-slug finding names the rule that displaced it — carry that name into the report, because it is the fix.[^retired]\n\n**An empty resolved scope is BROKEN, not a clean pass.** A check that scanned nothing has verified nothing. The linter exits nonzero and names the condition; report it as BROKEN and fix the scope. The same holds for its other refusals — a containment breach, a non-regular file, a file past the byte ceiling, a scope past the file ceiling, or a file that does not decode. Each is a refusal the check reports rather than a file it silently skips.\n\n**Zero `rule:` citations inside a non-empty scope is clean.** The citation form is greenfield by the decision's own premise, so a pass over a scope that carries no citation yet is a real pass. Do not read it as a broken check, and never plant a citation to give the check something to find.\n\n### 2. Classify each gate's verdict\n\nShared exit-code semantics (the same contract `verify-code-docs`, CHK-CODE-4, CHK-CAT-3, and CHK-ARCH-1 use): `0` clean, `1` drift or a validation error with valid JSON on stdout, any other non-zero with empty or unparseable stdout = crash (surface stderr, never a document finding). Map each gate to one verdict:\n\n- **clean** — exit 0, JSON says no drift (`{\"drift\": false}` \u002F `{\"clean\": true}` \u002F `added=changed=removed=0` \u002F empty diff), no `validation_errors`, **and no `surface_absent` key**. That last clause is part of the definition, not a later correction: a `surface_absent` payload carries `{\"drift\": false}` at exit 0 and matches every other clause here, so a reader matching these bullets top-down would call it clean four bullets before reaching N\u002FA. It is N\u002FA.\n- **DRIFT** — exit 1 with a JSON drift payload (`{\"drift\": true, \"paths\": [...]}`, non-empty `added\u002Fchanged\u002Fremoved`, or a section diff). Capture the drifted paths. The fix is the regenerator in the table's third column.\n- **BROKEN** — the JSON carries a non-empty `validation_errors` key (a malformed `governs` entry, a malformed reconciliation ledger, a schema error). Regenerating does NOT fix a validation error; the named input must be repaired first. Report the problems.\n- **CRASH** — non-zero exit with empty or unparseable stdout (a missing dependency, an unhandled exception). Surface stderr; this is an environment problem, never a document finding.\n- **N\u002FA** — exit 0 with `\"surface_absent\": true` on the JSON. The verdict keys on that payload key, not on which gate printed it. **Every `plugin-authoring` gate emits it outside the plugin's own source checkout**, carrying a `reason` that names why the row does not apply; report the reason, and recommend no regenerator, because there is no output in this project for one to write. Four project gates emit it too: `generate-reviews-index.py` when the tree carries no `\u003Cdocs_dir>\u002Fadrs\u002Freviews\u002F`, which is every project that has not yet run a decision review; `generate-journal-index.py` when the tree carries no `\u003Cdocs_dir>\u002Fjournal\u002F` at all; `generate-log-summary.py` when the tree carries no `\u003Cdocs_dir>\u002Flog\u002F`, which is every tree whose operations log is not yet split; and `extract-code-docs.py` when `code.extractors` is empty, which is every project that has configured no extractor. That last one used to exit 0 with EMPTY stdout and one line on stderr, so a reader aggregating exit codes counted it as a clean gate and a tree that had scanned nothing reported its code docs verified. There is no derived artifact, so nothing can have drifted, and nothing was measured either. **Report it as N\u002FA, never as clean** — a gate that scanned an absent surface has verified nothing, and recording it green is the vacuous-green shape this skill exists to prevent. **The fix is never the regenerator, and it differs by surface:** consider `migrate-adrs` when historical decisions need assessment, `init-docs` when the journal surface was never created, `cleanup-campsite` when the operations log is not yet split, and configure `code.extractors` in `\u003Cdocs_dir>\u002Fmanifest.yml` when no extractor is declared.\n\n**Warnings ride alongside, never change the verdict.** Read any top-level `warnings` key (`validate-catalog.py` emits one — the `models.yml` `verified:` staleness clock; `check-doctrine-reconciliation.py`'s S1 warn lane is similar). Surface it as WARNING beside the gate's verdict. A gate at exit 0 with a non-empty `warnings` list is a **clean pass worth reporting with its warning**, not a failure.\n\n**Shallow clones.** A tree that has published a clause migration needs full Git history. In a shallow clone (the default `actions\u002Fcheckout` depth of 1 in CI, for example) the governing readers (summaries, doctrine, rules catalog, arch and reviews index) refuse with `history-unavailable`. Set `fetch-depth: 0` in CI, or run `git fetch --unshallow` locally. Report such a refusal as REFUSAL, never as drift.\n\n### 3. The one roster exception — `derive-arch.py --dry-run` exit 2\n\n`derive-arch.py --dry-run` has a third lane the others do not: **exit 2, and stderr says which of two lanes it is** (copy the CHK-ARCH-1 distinction exactly).\n\n- **Crash lane** — a missing dependency or unhandled exception. Verdict **CRASH**; surface stderr; fix the environment.\n- **Deliberate refusal** — stderr names `StaleProjectionInput`. A spine file that projects a gated artifact declined because that artifact is not what its own regenerator produces. Nothing was written. This is **not a crash and not arch drift.** Verdict **REFUSAL**: report the capability failure, name the stale input from stderr, and recommend *that input's* own regenerator (`validate-catalog.py` for the skill catalog, `generate-adr-index.py` for the ADR index) followed by a re-derive. **Do NOT recommend re-deriving arch as the fix** — a re-derive reads the same stale input and refuses again.\n\n### 4. Report one table\n\nPrint a single table with one row per gate and one row per validation check: **name · verdict (clean \u002F DRIFT \u002F BROKEN \u002F CRASH \u002F REFUSAL \u002F N\u002FA) · drifted paths (or the problem \u002F stderr summary) · the command that fixes it**. Then the **roster accounting**, which keeps membership separate from execution result. Report all five counts, every time, even when some are zero:\n\n```\nenrolled            \u003CN>   ROSTER ROWS -- membership, not a result\nexecuted passing    \u003CC>   rows whose gate ran and inspected >=1 configured input, no drift\nfailed              \u003CD>   rows whose gate reported DRIFT \u002F BROKEN \u002F CRASH \u002F REFUSAL\nskipped\u002Finapplicable \u003CX>  rows whose gate reported N\u002FA: nothing configured, or no surface\nno evidence         \u003CE>   rows whose gate exited 0 having inspected ZERO configured inputs\n```\n\n**Count ROWS, not commands.** The unit is the repo-root roster row, because that is what\nmembership means; one command may cover several rows (`validate-catalog.py` covers both\n`skills.json` and `agents.json`). Attribute a command's verdict to every row it covers, or the identity below fails\nfor a reason that has nothing to do with drift.\n\n`enrolled == executed passing + failed + skipped\u002Finapplicable`. The `no evidence` count is not a fourth disjoint bucket — it re-counts the rows that measured nothing, and every N\u002FA row is one of them. It is reported separately because it is the number a reader needs and the other four hide: **a clean process exit that inspected no configured inputs never establishes that those inputs were checked.**\n\nNever write \"all gates clean\" while `skipped\u002Finapplicable` or `no evidence` is above zero. Say how many measured nothing, and name them.\n\n**A measured zero is not no evidence.** A gate with extractors configured that finds zero drift inspected its inputs and found them in sync; that is a real pass and belongs in `executed passing`. Only a gate that inspected nothing belongs in `no evidence`. **A gate that inspected the plugin's own copy of itself measured nothing about this project either**, and is never recorded as `executed passing` for a project row — that reading is what let a downstream run report the plugin's 56 shipped skills as a clean project gate. Do not collapse the two, and never drop a row from the roster to improve the pass count -- membership is fixed by the repo-root `AGENTS.md` roster, not by how a run turned out.\n\nFor DRIFT rows, the recommended fix is the third-column regenerator. For BROKEN rows, the fix is repairing the named input, then re-running its regenerator — except a validation-check row, whose fix is editing the authored text the finding names, with no regenerator involved. For CRASH rows, the fix is the environment. For a REFUSAL row, the fix is the named upstream input's regenerator, then a re-derive.\n\n### 5. Record the `lint` operation\n\nOne `lint` op entry (the same op `verify-code-docs` uses — a targeted check, distinct from `audit`'s full walk). Write the entry through the log writer (`\u003Cdocs_dir>\u002FAGENTS.md` §6).[^log-writer] Write the body below to a file outside the tree, then run:\n\n```\nuv run \"${CRUX_PLUGIN_ROOT}\u002Fscripts\u002Foperation-log.py\" append --repo-root \u003Crepo-root> \\\n  --op lint --subject 'check-drift (C clean \u002F D drift \u002F B broken \u002F X crash)' --date YYYY-MM-DD --body-file \u003Cpath>\n```\n\nThe entry it writes at the top of the current month's detail file `\u003Cdocs_dir>\u002Flog\u002FYYYY-MM.md`:\n\n```\n## [YYYY-MM-DD] lint | check-drift (C clean \u002F D drift \u002F B broken \u002F X crash)\n```\n\nBody, 1–3 lines: the summary line, and for any non-clean gate its name plus the regenerator that fixes it. On an all-clean pass, log it anyway — a verification is an event:\n\n```\n## [YYYY-MM-DD] lint | check-drift (all N gates clean)\n```\n\nA refused append adds no entry: fix the cause it names, then rerun the append alone (§6). Then run the commit step of §6 over the result's `commit_paths` and `restore_paths`.\n\n### 6. Hand-off\n\n- If every gate is clean, report the all-clean table and stop.\n- If any gate drifted, list the exact regenerator command per drifted gate and let the user run them. This skill never runs them.\n- If a gate is BROKEN or CRASH or REFUSAL, surface the problem and the specific next action; a release must not proceed on a broken gate.\n\n[^scope]: rule:regenerator-declares-its-scope, rule:out-of-scope-is-surface-absent, rule:drift-report-carries-scope-and-reconciles\n\n## See also\n\n- `verify-code-docs` — the single-gate version: the read-only drift check for just the `code\u002F` concern. This skill is that pattern applied to every enrolled regenerator.\n- `audit-docs` — the document-graph integrity walk; its CHK-CAT-3 \u002F CHK-CODE-4 \u002F CHK-ARCH-1 run three of these gates individually, and CHK-DRIFT-1 folds in the rest.\n- `compile-doctrine`, `derive-arch`, `link-adr-graph`, `extract-code-docs` — the skills that actually regenerate the outputs this skill only checks.\n- The repo-root `AGENTS.md` \"regenerative outputs\" table — the enrollment roster this skill's gate list mirrors. The validation checks of §1.A are deliberately absent from it.\n\n[^retired]: `rule:retired-cite-fails-lint` — a retired slug fails the lint, and the failure names the rule that displaced it.\n\n[^pubelig]: rule:shipped-citation-requires-an-accepted-decision, rule:an-ineligible-citation-refuses-the-projection\n\n[^log-writer]: rule:log-entries-go-through-the-log-writer, rule:no-writer-writes-the-legacy-log-file\n",{"name":5,"metadata":24,"description":7},{"tags":25,"bundles":26,"triggers":27,"risk_level":28,"routing_note":29,"requires_access":30},"drift-detection, regeneration, verification, release-gate","crux-docs","check drift | is the tree in sync | run the drift gates | any drift? | verify all regenerated outputs | pre-release drift check","low","Read-only. Runs every enrolled regenerator's `--dry-run` gate in one pass and reports one table — gate, verdict, drifted paths, and the regenerator that fixes it; never regenerates. The whole-tree counterpart to `verify-code-docs`. Emits a `lint` log op.","write-tree","main","dd4f16e7ac12ff940790660ec897677284ae4b6d","crux\u002Fskills\u002Fcheck-drift","https:\u002F\u002Fgithub.com\u002Fbionic-coding\u002Fcrux","https:\u002F\u002Fbionic-coding.com\u002Fcrux\u002F","https:\u002F\u002Fgithub.com\u002Fbionic-coding","https:\u002F\u002Fbionic-coding.com","Durable intent, disposable code.","2026-11-12 09:36:33",{"source":8,"skillName":5,"commands":41,"prompt":51,"zipAvailable":52},[42,45,48],{"tool":43,"command":44},"npx","npx skills add bionic-coding\u002Fcrux --skill check-drift",{"tool":46,"command":47},"bunx","bunx skills add bionic-coding\u002Fcrux --skill check-drift",{"tool":49,"command":50},"pnpm","pnpm dlx skills add bionic-coding\u002Fcrux --skill check-drift","安装技能，技能地址：https:\u002F\u002Fgithub.com\u002Fbionic-coding\u002Fcrux\u002Fblob\u002Fmain\u002Fcrux\u002Fskills\u002Fcheck-drift\u002FSKILL.md",true,[],[55,62,69,76,83,90],{"skillNo":56,"name":57,"nameZh":6,"description":58,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":15,"licenseFileUrl":6,"sourceHtmlUrl":59,"categories":60,"keywords":61,"publishedAt":19},"01M7CA5PH4JT2V5WBTA5ZPJNS8","whiteboarding","Explore an idea through docs-informed dialogue before committing to a design. Capture the exploration for later filing as a brief.","https:\u002F\u002Fgithub.com\u002Fbionic-coding\u002Fcrux\u002Fblob\u002Fmain\u002Fcrux\u002Fskills\u002Fwhiteboarding\u002FSKILL.md",[],[],{"skillNo":63,"name":64,"nameZh":6,"description":65,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":15,"licenseFileUrl":6,"sourceHtmlUrl":66,"categories":67,"keywords":68,"publishedAt":19},"01M7CA5GZPSVNJJZYQMF0JT3EH","verify-code-docs","Check generated code documentation against source and report drift without regenerating it.","https:\u002F\u002Fgithub.com\u002Fbionic-coding\u002Fcrux\u002Fblob\u002Fmain\u002Fcrux\u002Fskills\u002Fverify-code-docs\u002FSKILL.md",[],[],{"skillNo":70,"name":71,"nameZh":6,"description":72,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":15,"licenseFileUrl":6,"sourceHtmlUrl":73,"categories":74,"keywords":75,"publishedAt":19},"01M7CA5A4HA73VF91N8VY6SDBN","transition-observation","Apply a human disposition to an observation's lifecycle state without changing its claim or body.","https:\u002F\u002Fgithub.com\u002Fbionic-coding\u002Fcrux\u002Fblob\u002Fmain\u002Fcrux\u002Fskills\u002Ftransition-observation\u002FSKILL.md",[],[],{"skillNo":77,"name":78,"nameZh":6,"description":79,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":15,"licenseFileUrl":6,"sourceHtmlUrl":80,"categories":81,"keywords":82,"publishedAt":19},"01M7CA53X1ESGWKTPCEQ55JWEZ","transition-invariant","Ratify, reject, or retire an invariant on human direction. Update lifecycle metadata without changing the invariant's body.","https:\u002F\u002Fgithub.com\u002Fbionic-coding\u002Fcrux\u002Fblob\u002Fmain\u002Fcrux\u002Fskills\u002Ftransition-invariant\u002FSKILL.md",[],[],{"skillNo":84,"name":85,"nameZh":6,"description":86,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":15,"licenseFileUrl":6,"sourceHtmlUrl":87,"categories":88,"keywords":89,"publishedAt":19},"01M7CA4Y2VC25NFZE0XJZ47VSX","transition-decision","Apply a human ratify, reject, or defer verdict to a recovered decision candidate; ratification creates a Proposed ADR or observation.","https:\u002F\u002Fgithub.com\u002Fbionic-coding\u002Fcrux\u002Fblob\u002Fmain\u002Fcrux\u002Fskills\u002Ftransition-decision\u002FSKILL.md",[],[],{"skillNo":91,"name":92,"nameZh":6,"description":93,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":15,"licenseFileUrl":6,"sourceHtmlUrl":94,"categories":95,"keywords":96,"publishedAt":19},"01M7CA4QD9RFDC379VD9DNK90D","transition-brief","Publish or abandon a draft brief, updating lifecycle metadata and indexes without changing its body.","https:\u002F\u002Fgithub.com\u002Fbionic-coding\u002Fcrux\u002Fblob\u002Fmain\u002Fcrux\u002Fskills\u002Ftransition-brief\u002FSKILL.md",[],[]]