jig-harness/jig
Adoption guide · existing repository

Decide how far to go, then climb one rung at a time.

Improving an existing project. The entry point is an audit, not a module.

Starting a new project instead? The greenfield guide runs the kickoff phases, each handing over to the module that governs it.

A · How far to goChoose the strictest profile whose question applies to you.

The minimum that keeps an AI-assisted repo coherent. M0 Lite (one instruction file + glossary), M1 Lite (documented gate set + CI running it), M2 Lite (derived-file inventory). Everything else: skip until it hurts. Rationale: even a weekend project benefits from agents that know the rules and a CI that runs the gates; nothing else pays for itself yet.

A profile is the whole repository's aim; a level is one module's rung. They share words, and the profile is your dial, never a grade.

B · The ladderthe steps, from the brownfield guide
  1. 1

    Audit — run /jig:audit in the repo. Output: module scores, drift findings, and a prioritized adoption sequence phrased in your own toolchain, plus a committed record the next audit compares against.

    /jig:audit

    Typed in Claude Code. In Codex, ask for the jig:audit skill by name.

    Needs the jig plugin, installed once per machine for Claude Code or Codex: getting started sets it up, or hands the setup to your agent; any other agent tool can copy the skills. On a first audit it asks which profile you aim for. See a real audit sheet.
  2. 2

    Fix drift first — stale instruction files and docs that contradict reality actively mislead every agent session; fixing them is cheap and pays immediately. Drift fixes are usually an audit’s highest-value quick wins.

  3. 3

    Adopt modules in the report’s order, one maturity level at a time — “adopted” means “reached Lite,” then climb. The default leverage ordering when the report doesn’t say otherwise: M1 (gates — makes everything else checkable) → M2 (freshness — stops the rot) → M0 (instructions — makes agents effective) → M4 (docs governance). Defer M3/M8/M11 until the basics hold.

    Your order for the profile you chose is in Your plan, beside this guide. Each level links to its requirements.

  4. 4

    Codify before you mechanize — for practices your team already follows tacitly, write the canonical doc first (cheap), then promote it up the enforcement ladder (hook → CI) as evidence accumulates. Don’t build gates for rules nobody has agreed to.

  5. 5

    Re-audit — periodically, and after each adoption push: the re-audit diffs against the prior report (fixed / still-open / regressed) and doubles as a practices-drift regression check.

C · What makes an existing repository different
  • Meet the stack where it is (principle 1): recommendations must land in the existing toolchain; a practice that requires a tool migration is a last resort, and flexibility across trackers/hook-managers/CI providers is the point.
  • Baselines before blocking: new gates start advisory on a brownfield codebase (existing violations grandfathered or burned down first), with a promotion condition attached — advisory-forever is drift (principle 4).
  • One concern per change: adopt via small PRs scoped to one module’s next maturity level, not a big-bang “process PR” nobody can review.
D · Grandfathering a coverage gate

A pass/fail coverage check (“every file/workspace must map to something”) is right for greenfield and unreachable for brownfield on day one. The honest pattern has these properties:

  1. A named, in-code exception set that new entries may never be added to — it exists to grandfather what predates the gate, not to accumulate new debt. Stating this as policy is not enough: the set is an ordinary in-code list, so a PR adding a newly-uncovered item can add it to the same list and keep the gate green. Enforce it mechanically — diff the set against its value on the base branch and fail the check if the diff contains any addition; removals always pass. The comparison side must come from the trusted base (the base branch’s copy of the set or of a frozen baseline file, never the PR’s own copy, which the PR can edit in step), and the comparison script stays under required review ownership.
  2. Suppression applies only to the “uncovered” finding class. A path moving from fully-uncovered to partially-covered is a fresh fact, not noise — it still reports, so the backlog reflects the gate’s real progress instead of a single frozen count.
  3. A companion set pinning any partial coverage by exact glob and a real on-disk path, so neither deleting the pinning declaration nor deleting the files it names passes silently: the glob must still resolve to its path, and the pin set is diffed against the base branch so a removed pin fails unless its path is now fully covered or gone from the tree.

Its failure mode is worth stating plainly: an exception set that only routes findings to a closed tracking issue has no owner, and a closed issue looks resolved on every dashboard that matters — the set becomes permanent by default. An exception set needs a live, currently-open owner, or it stops being a grandfather clause and becomes a permanent carve-out nobody chose.

See M3 for the concrete two-set mechanism applied to change-area workspace coverage.