jig-harness/jig
Adopt Jig · getting started

From nothing installed to your first audit.

To adopt Jig, install the jig plugin once on your machine, run its audit on your repository, then follow the guide for an existing repository or a new project, one module at a time. The audit writes one file, its record.config/jig-audit.yaml; nothing else in your repository changes until you choose what to adopt.

The quick way

Hand it to your agent

An agent can do the setup with you: check what is installed, tell you the one step it cannot take, and run the first audit. Installing is the step it leaves to you: the plugin changes every repository on the machine, and a session loads a plugin only when it starts, so the session that installs it could not use it anyway. Paste this into a session of Claude Code or Codex started in the repository you want to adopt Jig in:

text
Set up Jig (https://github.com/jig-harness/jig) in this repository, then audit it.

1. If this agent tool has no plugin support, say so, give me these steps
   and stop: clone https://github.com/jig-harness/jig.git; copy or link every
   folder of its plugin/skills/ into this tool's user skill directory (for
   example ~/.claude/skills/ or ~/.agents/skills/), side by side, and its
   plugin/shared/ into a shared/ folder beside that directory; then start a
   new session and run the audit skill, under its bare name.
2. If the jig:audit skill is available in this session, run it and follow
   it; stop here.
3. Otherwise look for jig@jig in `claude plugin list` or
   `codex plugin list`. Act on what it shows:
   - Installed and enabled: this session started before the install. Tell
     me to run /reload-plugins (Claude Code) or start a new session
     (Codex), and stop.
   - Installed but disabled: tell me to enable it, with
     `claude plugin enable jig@jig` (Claude Code) or by setting
     `enabled = true` under `[plugins."jig@jig"]` in
     ~/.codex/config.toml (Codex), then to run /reload-plugins or start a
     new session, and stop.
   - Not listed: go on to step 4.
4. Check the requirements: Bun, git 2.36 or later,
   and the GitHub CLI 2.48 or later, signed in (`gh auth login`) to the
   repositories you work on. Tell me what is missing and how to install it.
5. Then give me the install command for this tool and stop. I run it in a
   terminal and start a new session in this repository, since a plugin
   loads only when a session starts.
   - Claude Code 2.1.292 or later:
     claude plugin install jig --marketplace https://github.com/jig-harness/jig.git#stable
     Older Claude Code: claude plugin marketplace add
     https://github.com/jig-harness/jig.git#stable, then claude plugin install jig@jig
   - Codex:
     codex plugin marketplace add https://github.com/jig-harness/jig.git --ref stable
     codex plugin add jig@jig

The prompt carries everything the agent needs, so it fetches nothing. In the new session, run the audit: /jig:audit in Claude Code, or ask for the jig:audit skill in Codex (use a skill).

Or do it yourself

1 What you need

ToolVersionNeeded for
Claude Code and/or a Codex CLI with plugin supportClaude Code 2.1.292 or later for the one-step install below (older: the two-step install), and 2.1.285 or later for a drive’s long background commands. Codex: tested with 0.159Every skill. Either tool is enough; install for each one you use
Bun on PATHThe version in mise.toml, which Jig tests; an older Bun may lack an API a script usesEvery skill’s scripts, which are TypeScript run by Bun. The repository being worked on needs no Bun of its own
git2.36 or later (--path-format for absolute paths and git worktree list -z; resolve-conflicts needs 2.41, to reconstruct automatic merge results and read attributes from the index with --attr-source, and its history report 2.43, or 2.45 in a partial clone)Every skill that reads the repository
GitHub CLI (gh), signed in with access to the repositories you work on2.48 or later (gh api --slurp)Every skill that works on pull requests. Jig supports GitHub as its only forge (extending)
The gh-stack extensionAnyOnly pull_requests.stacking: native
Issue-tracker access—do-item, and drive-pr’s tracker reads. With the default GitHub adapter, the signed-in gh above and nothing more. With the Linear adapter: LINEAR_API_KEY or LINEAR_API_TOKEN in the environment, or the Linear MCP server or linear command line tool signed in. With the Jira adapter: JIRA_EMAIL and JIRA_API_TOKEN in the environment, an Atlassian account’s email address and an API token made for it, or an OAuth access token or an API token with scopes in JIRA_BEARER_TOKEN, or a command that prints one in JIRA_TOKEN_COMMAND (environment variables)

Most skills do not check these versions when they run: an older tool fails on the command it lacks. The resolve-conflicts history report is the exception: it checks git’s version first, and refuses an older git, or a partial clone on a git that cannot be kept from fetching.

  • macOS, Linux and Windows, including PowerShell. Skill commands use Bun with plain arguments. Shell composition and generated input are handled inside scripts; commands that read generated text take a file argument. Git Bash is optional for the skills’ own commands. A consumer’s configured setup or check command still needs its own runtime and tools. Native Windows tests run in CI, but the complete authenticated pickup → draft pull request → drive round → stop smoke test, under Claude Code and under Codex with PowerShell, is still pending. See drive-pr and do-item for the current validation limits.

2 Install once per machine

Setup entry points. The shell and PowerShell bootstrap is available from a reviewed source checkout; authenticated cross-platform validation remains open. An own Homebrew tap requires a later maintainer decision after validation. The distribution design records the order and update ownership. The marketplace commands below remain the direct installation path.

Run these once per machine, in a terminal (not inside an agent session). They follow the stable release channel, which receives a version once it has proven itself; put latest in place of stable to receive every version as soon as it is released.

Claude Code (one step: it registers the marketplace and installs; on Claude Code older than 2.1.292, run claude plugin marketplace add <address> and then claude plugin install jig@jig instead):

sh
claude plugin install jig --marketplace https://github.com/jig-harness/jig.git#stable

Codex:

sh
codex plugin marketplace add https://github.com/jig-harness/jig.git --ref stable
codex plugin add jig@jig

Both at once, from a checkout of this repository (it installs for each tool it finds on PATH, following stable unless --channel latest says otherwise, and updates when already installed). Once the jig command is on PATH, jig upgrade does the same and more:

sh
bun tools/plugin/setup.ts
bun tools/plugin/setup.ts --channel latest

Check what is installed: jig doctor reports the plugin in each tool and the channel it follows, beside its other checks, and exits 1 when one fails. Without the jig command, the tools list their plugins:

sh
claude plugin list        # shows jig@jig, enabled
codex plugin list         # same for Codex

Claude Code can also hold the plugin per directory, at project or local scope (claude plugin install --scope project), alongside the user-scope install above. Where both exist, Claude Code (2.1.311) loads the user-scope copy, but claude plugin update jig@jig without --scope updates the most specific one, so a forgotten project-scope copy falls behind unseen. jig doctor lists each and fails one older than the user-scope install or left behind by a deleted directory; jig upgrade refreshes or removes them. claude plugin update --scope project updates the first install of the repository its directory belongs to, not that worktree’s own, so where several worktrees of one repository hold an install, jig upgrade runs it once for the repository and refreshes the others in Claude Code’s install record. Configuration directories that share one plugins directory share that record: after the first upgrade, the others find every install current.

Start a new session afterwards. Sessions that were already open load the plugin after /reload-plugins (Claude Code) or a restart (Codex).

For an organization, an administrator can install it on every machine instead. Claude Code reads extraKnownMarketplaces and enabledPlugins from managed settings; name the channel as the source’s ref:

json
{
  "extraKnownMarketplaces": {
    "jig": {
      "source": {
        "source": "git",
        "url": "https://github.com/jig-harness/jig.git",
        "ref": "stable"
      }
    }
  },
  "enabledPlugins": { "jig@jig": true }
}

A Codex workspace administrator can sync a GitHub marketplace for the team; point it at the stable branch where the sync lets you choose one.

3 Use a skill

Plugin skills carry the plugin’s name as a prefix.

  • Claude Code: type /jig: and pick the skill, for example /jig:resolve-review-comments 123. Claude also uses a skill on its own when the request matches its description.
  • Codex: ask for it by name (“use the jig:resolve-review-comments skill on PR 123”), or type @ and choose it.

For example:

text
/jig:do-item ENG-123           # pick up an issue; opens a PR and starts a drive
/jig:drive-pr 456              # start an unattended drive of PR 456 in the background
/jig:drive-pr --interactive 456   # one round in this session, then stop
/jig:resolve-review-comments 456  # one review-resolution pass, no drive

Skills call the review-arbiter agent themselves when a finding is contested; you do not invoke it by hand.

Run the agent from inside the repository you want it to work on. The skills read that repository’s configuration. resolve-review-comments (and with it every drive-pr round) and do-item’s tracker scripts refuse to run in a repository that has none; the other skills fall back to their defaults.

4 Configure the repository

A repository adopts a skill by committing its values. Nothing else is committed: no copy of the skill, no install script, no generated files.

  1. Create .config/jig.yaml with the values the skill needs. This file is the consumer overlay (see the glossary): the repository’s own values, laid over the shared procedure. JSON is valid YAML, so a JSON-formatted file works too. The minimum for resolve-review-comments:

    yaml
    gates:
      command: make check             # the full local checks before a push
    review:                           # optional
      bots: ["example-review[bot]"]   # your AI reviewer's login
      deferral_team: ENG              # issue-tracker team for deferred findings

    Only gates.command is required: the review skill works every reviewer’s threads without a review section, and asks for the deferral team only when it defers a finding.

    Every field of every skill, its type, its default and what the skills derive instead of asking for, is in the configuration reference; the skill’s own configuration table explains its fields. What a repository can adapt beyond values (its own commands, other trackers and stores, other platforms) is in the extending page. Fields a skill does not read are ignored, so other tooling can share the file. Check it by running the skill’s first step from the repository: bun <plugin>/skills/resolve-review-comments/scripts/consumer-config.ts prints the values or says what is missing, and bun <plugin>/skills/audit/scripts/config-fit.ts checks every field against the plugin’s schema and the repository (misspelt or deprecated fields, commands and paths that do not exist, required checks that never run).

    Values that are yours rather than the repository’s go in ~/.jig/jig.yaml, which every repository on the machine reads below its own file; an environment variable overrides both for one run. How far this host trusts a drive’s passes is only yours to say: a repository’s file refuses those fields. The configuration layers section explains the order, and bun <plugin>/skills/resolve-review-comments/scripts/jig-config.ts shows which layer set each value.

  2. Tell agents and people where the skill comes from. Add a short section to the repository’s AGENTS.md (or equivalent), for example:

    markdown
    ## Shared skills (Jig)
    
    `/jig:resolve-review-comments` comes from the `jig` plugin,
    installed once per machine (see
    https://github.com/jig-harness/jig/blob/main/plugin/README.md#install-the-plugin).
    This repository's values are in `.config/jig.yaml`.
    If the skill is not listed, install the plugin and start a new session.
  3. Optional: let Claude Code offer the plugin to everyone who opens the repository. Commit this in .claude/settings.json (merge it with any existing content):

    json
    {
      "extraKnownMarketplaces": {
        "jig": {
          "source": {
            "source": "git",
            "url": "https://github.com/jig-harness/jig.git",
            "ref": "stable"
          }
        }
      },
      "enabledPlugins": { "jig@jig": true }
    }

    Claude Code applies the marketplace entry only in a folder the person has trusted, so this is a convenience, not a replacement for the one-time install. It also names the plugin in the repository, which helps people discover it.

  4. Optional: pre-approve the gate command. The skill pre-approves git, gh and bun. If the repository’s gate command uses another tool (for example pnpm), add it to the repository’s Claude Code permissions ("permissions": { "allow": ["Bash(pnpm *)"] } in .claude/settings.json) or approve it when asked.

The skills find each other beside themselves in the plugin: drive-pr runs resolve-review-comments for each round, and do-item starts drive-pr. One exception: when the repository keeps its own copy of drive-pr in .claude/skills/drive-pr, the review skill uses that copy instead of the plugin’s. Delete such a copy when you adopt the plugin’s version.

5 Run your first audit

In the repository, start a session and run:

/jig:audit

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

On a first audit it asks which profile you aim for. What you will see is one self-contained HTML sheet: where you stand against each module, and what to do first.

Then follow your guide

The sheet ranks what to adopt first. The guide for your kind of repository says how far to take it.

Source: plugin/README.md · The rest of the plugin guide · Every configuration field