jig-harness/jig
Seven principles

The principles behind every module.

Seven principles govern everything in jig. Each has its own page with rationale and concrete consequences.

  1. 01

    Principles over tools

    State the invariant; map tools per ecosystem; derive, don't declare

    Every practice in Jig is stated as a tool-independent invariant first — e.g., “every committed generated file has a regenerate script, a drift check in CI, and an auto-refresh at commit time” — and only then mapped to concrete implementations per ecosystem.

    Why

    Tools churn; principles don’t. A team on GitLab + Jira + husky must be able to adopt the same practice as a team on GitHub + Linear + lefthook. Brownfield projects especially cannot swap their toolchain to adopt a practice — the practice must meet them where they are.

  2. 02

    Modular, profile-composed

    Independent modules × maturity levels, composed by project profiles

    Jig is not a framework you adopt whole. It is a set of modules (the module map) that adopt independently, each defined at three maturity levels — Lite, Standard, Strict — and composed by profiles (the profiles) matching project shapes:

    • Solo/Lite — short-lived or one-person projects: the minimum that keeps an AI-assisted repo coherent (instruction file, basic gates, a glossary).
    • Team/Standard — production software with multiple contributors: adds mechanical enforcement, docs governance, layered review, tracked processes.
    • Regulated/Strict — compliance-critical work: adds registries (HITL, suppression tokens), audit trails, stricter gates, and process observability.
    Why

    Projects differ in size, lifespan, team, and compliance posture; an all-or-nothing methodology gets adopted by nobody. The single assumption Jig does make: every project, whatever its size, benefits from scaffolding that lets AI agents work it well (principle 3).

  3. 03

    AI scaffolding as the spine

    Every practice is written to be operable by agents

    The unifying principle. Every module is written so its practice is operable by AI agents, not just readable by humans:

    • Rules are machine-checkable wherever possible; prose conventions name their check (or their absence — see principle 4).
    • Facts live in a single source of truth with generated projections, so an agent never has to guess which of two disagreeing copies is right — and parallel agents don’t fork the vocabulary (glossaries exist for exactly this).
    • Instructions are layered and scoped: a universal instruction file, tool- specific deltas, per-directory files, and conditional rules that load only when relevant — so agent context stays small and precise.
    • Procedures are packaged as named, invocable skills rather than tribal knowledge.
    Why

    Agents amplify whatever structure exists. In a well-scaffolded repo, ten parallel agents converge (same terms, same gates, same process); in an unscaffolded one they diverge and their output fights itself. Scaffolding is the highest-leverage investment because every other practice pays through it: gates catch agent mistakes, docs governance keeps agent knowledge current, review systems catch what gates can’t, and the learning loop improves all of it.

  4. 04

    Enforcement-ladder discipline

    Every rule names its rung and its promotion path

    Every rule lives on a rung of the enforcement ladder:

    text
    written convention → editor/local script → git hook → CI → mandatory review step

    Each rung is progressively harder to bypass. The discipline is not “everything must be CI-enforced” — it is that every rule names its current rung and its promotion path, so “convention-only” is a tracked state rather than an invisible default.

    Why

    Teams (and agents) systematically overestimate how enforced their rules are. The gap between “we always do X” and “something fails if we don’t” is where regressions live. Naming the rung makes the gap visible; the auditor scores it (absent → convention-only → mechanically enforced).

  5. 05

    Learning loop built in

    Misses become checks; consumer repositories' lessons backflow into the template

    A delivery system that doesn’t learn from its misses decays into ritual. Jig ships the learning machinery as a module (M8) and applies it to itself:

    • Miss → lens: when a reviewer, gate, or agent misses something an external oracle (another reviewer, a human, production) catches, the miss is classified against a taxonomy, filed with a durable number, reconstructed as an eval fixture (the exact pre-fix state, so the catch is replayable), and turned into an additive lens — a new checklist bullet, prompt module, or gate. The fixture joins a regression corpus only after a live run proves it works; measurement (recall, precision, cost) decides whether the lens stays.
    • Session reflection: agents accumulate feedback about the process itself, which is reviewed by a human and applied to the scaffolding — never auto-applied.
    • Memory promotion: durable insights move from agent-private memory into the shared, versioned knowledge base.
    Why

    This is the only mechanism in Jig that makes all the others self-improving; without it, every checklist is frozen at the day it was written.

  6. 06

    Audit-first brownfield entry

    "Where do I stand?" before "adopt module X"

    The natural entry point for an existing project is not “adopt module M0” — it is “tell me where I stand.” Jig therefore ships as a runnable assessor (the audit skill, /jig:audit), not just reference material:

    1. Fan out parallel read-only surveys over the audited repository, one per practice area (agent scaffolding, docs governance, automation and enforcement, review and learning loop; tasks, memory, environments and CI are covered inside the last two).
    2. Detect the stack from observable facts, so recommendations are phrased in the target’s own tools (principle 1).
    3. Score each module against its maturity criteria, where the score is the enforcement-ladder rung: absent → convention-only → mechanically enforced (principle 4).
    4. Report: per-module findings with file-path evidence, a prioritized recommendation list (leverage × effort), a suggested adoption sequence, and drift findings — contradictions between what the repo says it does and what it does are first-class results.
    Why

    Brownfield teams don’t lack ideas; they lack a trustworthy picture of their own gaps and an ordering. An audit produces both, and re-running it periodically turns the same machinery into a practices-drift regression check — including on repos that already adopted jig. Each run is recorded in the audited repository, so the next one reports what was fixed, what regressed and what Jig added since, and does not repeat what the team declined.

  7. 07

    Accessible to newcomers

    Plain language, glossary, no assumed familiarity

    Jig assumes no prior familiarity with any of the techniques it packages. A reader meeting “SSoT,” “drift gate,” or “HITL” for the first time must be able to use this repo without outside context.

    Why

    The audiences that benefit most from these practices — small teams, solo builders, brownfield maintainers — are exactly the audiences least likely to already share the vocabulary. Accessibility is also a forcing function for clarity: a practice that can’t be explained plainly usually isn’t understood by its authors either.