Skip to content
Development
Skill

/context-check

Inspect context drift and refresh selected source-backed documents under existing authorization.

From plugin
codearbiter
15256 skills20 agents38 commands

Claude Code

$ npx -y skills add arbiterForge/codeArbiter --skill context-check --agent claude-code

SKILL.md

context-check.SKILL.md
name: context-check
description: "Inspect context drift and refresh selected source-backed documents under existing authorization."
argument-hint: "(none)"

context-check

Inspect context drift or refresh selected source-backed documents. This includes drift from a merge or external edit that commit-gate's Phase 5.5 auto-heal did not cover, and an explicitly requested full refresh of initialized context.

This skill is NOT in the daily loop. Commit-gate auto-heal (Phase 5.5, `heal_worklist` for v1 and `v2_heal_worklist` for managed pairs) owns routine maintenance. Reuse existing selection and authorization for requested refresh; an audit-only request remains read-only.

<!-- catalog-compatibility-notice:start --> > Compatibility route. Prefer `{{CMD:status}} drift` for new explicit usage. The retained entry > and natural-language intent use this owner under > {{PLUGIN_ROOT}}/includes/command-compatibility.md. <!-- catalog-compatibility-notice:end -->

Entry boundaries

Use this owner for a requested provenance drift audit, `{{CMD:status}} drift`, or the explicit `{{CMD:context-check}}` compatibility entry. Explanation-only questions and ordinary status snapshots remain read-only answers, not repair requests. Report first for an audit-only request. A direct request to refresh selected documents or the full project context supplies that selection; reuse the existing authorization instead of asking again per document. Never change an unselected derived document. This owner neither stages nor commits. Routine commit-gate auto-heal is unchanged.

An **initialized refresh** belongs to this existing owner after an explicit selection. It is separate from initial population: do not call the initialized `{{CMD:create-context}}`/`{{CMD:init}} --brownfield` path, rerun the scaffolder, clear `<!--INITIALIZED-->`, or repeat context finalization. An ordinary status snapshot and the initial `{{CMD:status}} drift` report are read-only. A declined refresh leaves every file unchanged.

HTML knowledge repositories

Run `knowledge.py format` first (`{{PLUGIN_ROOT}}/includes/knowledge.md`). When it reports `html`, use this section instead of the Markdown provenance flow below.

1. **Find what may be stale.** `knowledge.py stale` lists, per document, the records whose scoped paths or cited sources changed since that document's baseline commit. It is advisory: unlisted records are unaffected, and nothing is reset. A document with no baseline is reported as such, not as stale. 2. **Report** the listed records and their changed paths before offering actions. An audit-only request stops here. 3. **Refresh the selected records.** Reinspect only the changed paths those records rely on (the context-creation inspection and evidence rules apply), then `update` records whose claims changed, `add` newly observed ones and `retire` ones that no longer hold, each with its basis. An unchanged claim needs no write. A full refresh selected by the user covers all six categories. 4. **Rebaseline** each document whose listed records were checked: `knowledge.py rebaseline <doc>`. Leave a deferred document's baseline alone so its records are listed again next time.

For an explicitly selected initialized brownfield acquisition, inspect the relevant source categories using the same evidence rules, then update only affected observed knowledge. The existing `decompose` owner records the project's intended target, delta, future phases and candidate work in its separate document. Preserve prior answers, ADR references, work IDs and the initialized marker; record denied or uninspected scope as unknown. A candidate is not promoted by a context refresh. This extension does not make an ordinary drift report a request to perform full acquisition.

Every write is a journaled, retry-safe engine operation; there is no preview to approve and no provenance file to hand-write. `<!--INITIALIZED-->` and all history stay. Imported notes stay until a record replaces them.

Pre-flight

Read these before computing drift:

1. `.codearbiter/.provenance/` — the per-doc provenance records. Load all records via `load_provenance_dir` from `{{PLUGIN_ROOT}}/hooks/_provenancelib.py`. 2. `.codearbiter/code-map.md` — coarse concern map; read to orient on which modules the stale docs govern.

Flow

Step 1 — Compute drift

Use `_provenancelib` helpers in this order:

1. `load_provenance_dir(root + "/.codearbiter/.provenance/")` — returns the provenance map `{doc: record}`. 2. Collect all `drift_trigger: true` paths across all records. 3. `batch_hash(paths, runner)` — hash every existing path in one git call. 4. `compute_drift(provenance_map, current_hashes)` — returns a drift report `{doc: [{path, kind}]}` for docs that have stale sources.

Alternatively reuse the same logic as `startup_drift_line` by calling it for a human-readable summary, then inspecting `compute_drift` directly for detail.

The `entries`/Git-hash comparison above covers legacy v1 records only. For every enrolled v2 document, call `assess_context_provenance` with the bounded current source/target snapshot and an action-boundary snapshot probe. Inspect its per-document states as well as aggregate coverage. A missing, corrupt or unsupported record, incomplete acquisition, partial hash or unchecked identity is unknown coverage, even when a neighboring v1 or v2 record is usable. Report the usable records and the unknowns separately; never turn an empty legacy drift report into a fresh verdict for v2. `v2_current` acknowledges matching identities only. `semantic: unverified` and `verified_fresh: false` remain in force: only actual evidence can support a narrower semantic claim; changing hashes or choosing re-baseline does not perform that review.

Only if the relevant legacy drift report is empty and v2 coverage/identities have been checked without unknowns may this audit report no stale identities. That is not a claim that instruc

Read more
@arbiterforge
Ships withcodearbiter

Open-source governance and hard gates for AI coding agents across Claude Code, Codex CLI, and Pi.

15256 skills20 agents
Get the whole plugin

Stars on GitHub

Momentum

stars in total
152
Star history of arbiterForge/codeArbiter on GitHub, a chart by star-history.com

Other skills on codearbiter.

brainstorming

brainstorming

Refine feature and sprint intent into a useful specification. Capture scope, observable criteria and material choices without…

commit-gate

commit-gate

Create a verified local Git commit when committing changes is requested. Not for explaining commit history, drafting a message…

debug

debug

Investigate an unexplained defect or unexpected behavior without changing application code. Use for root-cause diagnosis and an…

More skills from other plugins.

brainstorming
Auto-invoked

brainstorming

You MUST use this before any creative work - creating features, building components, adding functionality, modifying behavior, or…

@obra@obraInstall Skill
ask-matt

ask-matt

Ask which skill or flow fits your situation. A router over the skills in this repo.

skills2w309k
@mattpocock@mattpocockInstall Skill
accessibility
Auto-invoked

accessibility

Design, implement, and audit accessible UI to WCAG 2.2 Level AA across Web, iOS, and Android — semantic ARIA roles and labels,…

ecc2w293k
@affaan-m@affaan-mInstall Skill
compiler-commit

compiler-commit

Use when you want to verify compiler changes and commit with the correct convention. Runs tests, lint, and format, then commits…

react5d252k
@facebook@facebookInstall Skill

Questions about context-check.

Which coding agents can use context-check?
context-check installs in Claude Code, Codex, Cursor, Gemini CLI, GitHub Copilot, OpenCode and Windsurf with the skills CLI, using each agent's flag shown on this page. Flowy's auto-invocation, which fires a skill when your prompt matches, runs in Claude Code only.