jig-plan 2.1.0 → 2.2.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/.claude-plugin/marketplace.json +1 -1
- package/.claude-plugin/plugin.json +1 -1
- package/README.md +6 -4
- package/agents/jig-reviewer.md +17 -6
- package/cli/jig.mjs +1 -1
- package/cli/lib/checks.mjs +1 -1
- package/cli/lib/doctor.mjs +23 -0
- package/package.json +1 -1
- package/references/fundamentals.md +10 -0
- package/references/mechanisms.md +1 -0
- package/references/plan-format.md +1 -1
- package/skills/build/SKILL.md +1 -1
- package/skills/guard/SKILL.md +22 -0
- package/skills/plan/SKILL.md +2 -0
|
@@ -8,7 +8,7 @@
|
|
|
8
8
|
"name": "jig",
|
|
9
9
|
"source": "./",
|
|
10
10
|
"description": "Planning and build harness for coding agents. Sizes the plan to the task, writes executable acceptance checks before code, reviews plans and diffs in a fresh context, and uses hooks to stop test tampering, unvetted installs and unverified 'done' claims.",
|
|
11
|
-
"version": "2.
|
|
11
|
+
"version": "2.2.0",
|
|
12
12
|
"author": { "name": "Ashwin Sathian", "url": "https://ashwinsathian.com/" },
|
|
13
13
|
"repository": "https://github.com/AshwinSathian/jig",
|
|
14
14
|
"license": "MIT",
|
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
"$schema": "https://json.schemastore.org/claude-code-plugin-manifest.json",
|
|
3
3
|
"name": "jig",
|
|
4
4
|
"displayName": "jig",
|
|
5
|
-
"version": "2.
|
|
5
|
+
"version": "2.2.0",
|
|
6
6
|
"description": "Planning and build harness for coding agents. Sizes the plan to the task, writes executable acceptance checks before code, reviews plans and diffs in a fresh context, and uses hooks to stop test tampering, unvetted installs and unverified 'done' claims.",
|
|
7
7
|
"author": { "name": "Ashwin Sathian", "url": "https://ashwinsathian.com/" },
|
|
8
8
|
"repository": "https://github.com/AshwinSathian/jig",
|
package/README.md
CHANGED
|
@@ -45,7 +45,7 @@ Then work the way you already do, e.g. *"add CSV export to the reports page"*. A
|
|
|
45
45
|
5. **Build.** The `build` skill takes one slice per session. It writes the acceptance checks from the spec first, implements, runs `jig verify --record`, logs what changed and commits. If a test and the spec disagree, it stops and tells you rather than editing the test.
|
|
46
46
|
6. **Guard.** The second time the same mistake turns up, the `guard` skill turns it into a test, lint rule, deny rule or hook, not another line of prose.
|
|
47
47
|
|
|
48
|
-
A `jig-reviewer` agent reviews plans, and each slice's diff, in a fresh context and backs every finding with a file and line or a command.
|
|
48
|
+
A `jig-reviewer` agent reviews plans, and each slice's diff, in a fresh context and backs every finding with a file and line or a command. It tags each finding Important, Nit or Pre-existing, so nobody gets held to a bug they didn't write. On a second pass it only looks at what changed and doesn't repeat itself. If Important findings are still open after three rounds, it says to rethink the approach. If your repo has a `REVIEW.md` of `When: · Check: · Source:` entries, it applies the ones that match the diff, reading the file from the plan's baseline commit so the slice can't edit its own checklist.
|
|
49
49
|
|
|
50
50
|
## What a plan looks like
|
|
51
51
|
|
|
@@ -118,15 +118,16 @@ GAP D2 no ESLint or Biome config, so nothing flags empty catch blocks
|
|
|
118
118
|
GAP D3 secret-looking files the agent can read: .env
|
|
119
119
|
Suggested deny rules for .claude/settings.json (review before adding): {"permissions":{"deny":["Read(./.env)", ...]}}
|
|
120
120
|
ok D4 no repo-level hooks, MCP servers or risky settings
|
|
121
|
-
GAP D5 no CI configuration found
|
|
121
|
+
GAP D5 no CI configuration or git hooks found
|
|
122
122
|
GAP D6 package.json has dependencies but no lockfile
|
|
123
|
+
note D7 no e2e runner or verify skill; fine for a CLI or library if a check runs the real command
|
|
123
124
|
|
|
124
125
|
5 item(s) to look at. jig doctor changed nothing.
|
|
125
126
|
```
|
|
126
127
|
|
|
127
128
|
Plans go in your repo's existing plans folder (`docs/plans/` or `docs/plan/`), or wherever `.jig.json` says with `{"plansDir": "..."}`.
|
|
128
129
|
|
|
129
|
-
D4 flags repo settings that can run code or redirect API traffic before you've read them: hooks, `ANTHROPIC_BASE_URL`, `bypassPermissions`, and auto-enabled MCP servers. Those are the settings behind CVE-2025-59536, CVE-2026-21852 and CVE-2026-33068. Once you've read them, `jig doctor --ack` keeps D4 quiet until one of those files changes. Doctor never runs repo code, so where a lint preset or CI status can't be read from the files, it says so rather than guessing.
|
|
130
|
+
D4 flags repo settings that can run code or redirect API traffic before you've read them: hooks, `ANTHROPIC_BASE_URL`, `bypassPermissions`, and auto-enabled MCP servers. Those are the settings behind CVE-2025-59536, CVE-2026-21852 and CVE-2026-33068. Once you've read them, `jig doctor --ack` keeps D4 quiet until one of those files changes. Doctor never runs repo code, so where a lint preset or CI status can't be read from the files, it says so rather than guessing. D7 asks whether there's a way to run the change, not just test it: a `.claude/skills/verify*` skill, an e2e or HTTP test runner, or an e2e script. It's only a gap for an app (a UI or server framework in its dependencies). A CLI or library gets a note.
|
|
130
131
|
|
|
131
132
|
## Evidence
|
|
132
133
|
|
|
@@ -157,13 +158,14 @@ jig's two wins were the tasks where the right move was to stop. It asked what "M
|
|
|
157
158
|
|
|
158
159
|
**Triggering.** With the SessionStart nudge, all 10 trigger prompts behaved as expected, with or without superpowers installed. Without it, direct requests like "Build a CSV export endpoint" skipped the skill altogether (0 of 3).
|
|
159
160
|
|
|
160
|
-
**Plans and review.** All three multi-slice plans jig wrote in the eval passed `jig lint`. The reviewer found 5 of 5 seeded plan defects in both runs, against 4 and 5 for a plain review in a fresh context. That's too close to call.
|
|
161
|
+
**Plans and review.** All three multi-slice plans jig wrote in the eval passed `jig lint`. The reviewer found 5 of 5 seeded plan defects in both runs, against 4 and 5 for a plain review in a fresh context. That's too close to call. `evals/reviewer/` now keeps a held-out test case apart from the one we tune on, adds a clean plan as a control, and has a same-session self-review arm. In that run (Sonnet 5.5, 3 runs per cell), plain, fresh and self-review all found 15 of 15 held-out defects, and none flagged the clean plan. The one difference: only the fresh reviewer called an unflagged schema change a one-way door that needs your decision (3 of 3, against 0 of 3 each). So jig's case for a separate reviewer rests on its rubric more than on the fresh context. The details, including what went wrong in the first run, are in [the report](evals/results/REPORT.md).
|
|
161
162
|
|
|
162
163
|
Re-run any of it (it spends money on your account, about $0.05 to $0.15 a run):
|
|
163
164
|
|
|
164
165
|
```bash
|
|
165
166
|
node evals/run.mjs --arms none,jig,planmode,superpowers --runs 3 -j 6
|
|
166
167
|
node evals/triggers/run.mjs --arms jig,jig+superpowers --runs 3
|
|
168
|
+
node evals/reviewer/run.mjs --dry # one review, prints the cost estimate
|
|
167
169
|
node evals/reviewer/run.mjs --runs 3
|
|
168
170
|
```
|
|
169
171
|
|
package/agents/jig-reviewer.md
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
---
|
|
2
2
|
name: jig-reviewer
|
|
3
|
-
description: Fresh-context reviewer for jig plans and slice diffs. Give it a plan path and the original request (plan mode), or a plan path and a slice ID (diff mode). Returns evidence-backed findings, at most ten. It reads only, and never edits.
|
|
3
|
+
description: Fresh-context reviewer for jig plans and slice diffs. Give it a plan path and the original request (plan mode), or a plan path and a slice ID (diff mode). On a later round, also give it the earlier findings and the last reviewed commit. Returns evidence-backed findings, at most ten. It reads only, and never edits.
|
|
4
4
|
tools: Read, Grep, Glob, Bash
|
|
5
5
|
---
|
|
6
6
|
|
|
@@ -10,12 +10,21 @@ Only report findings you can back with evidence: a file and line, a command and
|
|
|
10
10
|
|
|
11
11
|
Don't edit files. Use Bash only to read: `git diff`, `git log`, `git show`, `jig lint`, `jig status`, and package manager queries such as `npm view`. Don't run the project's tests or check commands; the builder runs those with `jig verify`.
|
|
12
12
|
|
|
13
|
+
## Rounds
|
|
14
|
+
|
|
15
|
+
The builder may send the same slice back after fixing your findings. Then the input also has your earlier findings and the last commit you reviewed.
|
|
16
|
+
|
|
17
|
+
- **Round 1:** review the whole slice.
|
|
18
|
+
- **Round 2 and later:** review only `git diff <last reviewed commit>`, plus whether each earlier finding was fixed. Don't repeat a finding. If an earlier one isn't fixed, say "still open: <number>" once.
|
|
19
|
+
- **Name the class of a bug, not one instance.** When you find a swallowed error, a missing auth check or an unescaped query, search the slice for every other place it occurs and report them as one finding, with each location.
|
|
20
|
+
- **After round 3**, if Important findings are still open, return `Verdict: rethink`. Say what keeps going wrong, so the builder rethinks the approach with the owner instead of patching again.
|
|
21
|
+
|
|
13
22
|
## Plan mode
|
|
14
23
|
|
|
15
24
|
Input: a plan path and the original request. Run `jig lint <path>` first; don't repeat what lint reports. Then check what lint can't:
|
|
16
25
|
|
|
17
26
|
1. **Does the outcome match the request?** Look for anything requested and missing, and for anything added that wasn't asked for.
|
|
18
|
-
2. **Would the checks fail if the feature were missing or wrong?** A check that only restates current behaviour, or that can pass with a stub, catches nothing.
|
|
27
|
+
2. **Would the checks fail if the feature were missing or wrong?** A check that only restates current behaviour, or that can pass with a stub, catches nothing. When a slice changes behaviour a user sees, ask for at least one check that runs the real system (kind `e2e`: start the app, CLI or service and drive the changed flow), not only unit tests.
|
|
19
28
|
3. **Reuse.** For each new function, module or dependency in the plan, search the repo for an existing equivalent.
|
|
20
29
|
4. **Unmarked one-way doors:** schema, partition keys, public API contracts, auth model, data deletion, production or infrastructure changes, new dependencies, scope changes.
|
|
21
30
|
5. **Fundamentals the plan skips for what it touches.** These are concurrency and idempotency, queries in loops and missing indexes, timeouts and retries, partial failure, and authorization on new routes. Read `${CLAUDE_PLUGIN_ROOT}/references/fundamentals.md` and `security.md` for the areas involved.
|
|
@@ -35,18 +44,20 @@ Input: a plan path and a slice ID. Diff the slice against its starting commit (f
|
|
|
35
44
|
6. **Insecure defaults:** missing authorization, unescaped output, string-built queries or commands, secrets in code or logs.
|
|
36
45
|
7. **Performance:** queries or network calls inside loops, unbounded concurrency, quadratic scans over growing lists.
|
|
37
46
|
8. **Claims against evidence.** Compare what the builder said was verified with the latest `jig verify` line in the Log.
|
|
47
|
+
9. **The repo's checklist.** If the repo has a REVIEW.md, read it from the plan's Baseline commit with `git show <Baseline>:REVIEW.md`, never the working-tree copy, so the slice under review can't change its own checklist. Each entry has the form `When: <trigger readable from a diff> · Check: <what to verify> · Source: <incident or PR>`. Apply only the entries whose trigger matches this diff, and cite the entry's Source in the finding.
|
|
38
48
|
|
|
39
49
|
## Output
|
|
40
50
|
|
|
41
51
|
```
|
|
42
52
|
Verdict: ready | fix first | rethink
|
|
43
53
|
Findings:
|
|
44
|
-
1. [
|
|
54
|
+
1. [Important|Nit|Pre-existing] <one-line finding>. Evidence: <file:line, plan line, or command + output>. Fix: <specific change>.
|
|
45
55
|
...
|
|
56
|
+
Earlier findings: <fixed / still open, by number; round 2 and later only>
|
|
46
57
|
Not checked: <anything you couldn't check, and why>
|
|
47
58
|
```
|
|
48
59
|
|
|
49
60
|
Each severity has a bar:
|
|
50
|
-
- **
|
|
51
|
-
- **
|
|
52
|
-
- **
|
|
61
|
+
- **Important:** a defect this change adds or makes worse: wrong behaviour, data loss, a security hole, a check that can't fail, or something likely to cause rework. The builder fixes these before the slice closes.
|
|
62
|
+
- **Nit:** worth fixing, but doesn't block.
|
|
63
|
+
- **Pre-existing:** a defect that was there before this change. Report it so the owner knows, but the builder isn't on the hook for it in this slice.
|
package/cli/jig.mjs
CHANGED
|
@@ -8,7 +8,7 @@ import { statusSummary, findPlans, activePlans, doingSlice, plansDir } from './l
|
|
|
8
8
|
import { verifyPlan, changedNote, trailer } from './lib/verify.mjs';
|
|
9
9
|
import { repoRoot } from './lib/git.mjs';
|
|
10
10
|
|
|
11
|
-
const VERSION = '2.
|
|
11
|
+
const VERSION = '2.2.0';
|
|
12
12
|
const HELP = `jig ${VERSION}
|
|
13
13
|
|
|
14
14
|
Usage:
|
package/cli/lib/checks.mjs
CHANGED
|
@@ -2,7 +2,7 @@ import { existsSync, readFileSync } from 'node:fs';
|
|
|
2
2
|
import { dirname, join } from 'node:path';
|
|
3
3
|
import { createHash } from 'node:crypto';
|
|
4
4
|
|
|
5
|
-
export const KINDS = ['acceptance', 'regression', 'property', 'mutation', 'perf', 'security'];
|
|
5
|
+
export const KINDS = ['acceptance', 'regression', 'property', 'mutation', 'perf', 'security', 'e2e', 'differential'];
|
|
6
6
|
const ID_RE = /^[A-Za-z][\w.-]*$/;
|
|
7
7
|
|
|
8
8
|
export function checksPathFor(planPath) {
|
package/cli/lib/doctor.mjs
CHANGED
|
@@ -157,6 +157,29 @@ export function diagnose(root) {
|
|
|
157
157
|
else add('D6', 'ok', 'lockfile matches package.json');
|
|
158
158
|
} else if (locks.length) add('D6', 'ok', `lockfile present (${locks.join(', ')})`);
|
|
159
159
|
}
|
|
160
|
+
// D7: a way to run the change, not only test it. Conservative: a gap only
|
|
161
|
+
// for a clear app (a UI or server framework in runtime dependencies of a
|
|
162
|
+
// package with no `bin`) with no sign of e2e; everything else is a note.
|
|
163
|
+
const projectFile = pkg || isPy || has('go.mod') || has('Cargo.toml');
|
|
164
|
+
const skillsDir = join(root, '.claude', 'skills');
|
|
165
|
+
let skill = null;
|
|
166
|
+
try { skill = readdirSync(skillsDir).find((n) => /^verify/.test(n) && existsSync(join(skillsDir, n, 'SKILL.md'))); } catch { /* no .claude/skills */ }
|
|
167
|
+
const SKIP = /(^|\/)(examples?|fixtures?|test|tests|__tests__|docs)\//;
|
|
168
|
+
const pkgs = walk(root, 4, (n, r) => n === 'package.json' && !SKIP.test(r)).map((r) => json(join(root, r))).filter(Boolean);
|
|
169
|
+
if (projectFile || skill || pkgs.length) {
|
|
170
|
+
const allDeps = new Set(pkgs.flatMap((p) => Object.keys({ ...(p.dependencies ?? {}), ...(p.devDependencies ?? {}) })));
|
|
171
|
+
const RUNNERS = ['@playwright/test', 'cypress', 'detox', 'webdriverio', '@wdio/cli', 'supertest', 'pactum'];
|
|
172
|
+
const runner = RUNNERS.find((r) => allDeps.has(r));
|
|
173
|
+
const script = pkgs.flatMap((p) => Object.entries(p.scripts ?? {})).find(([k, v]) => /(^|:)(e2e|integration)\b/.test(k) || /\b(playwright test|cypress run|detox test|maestro test)\b/.test(v));
|
|
174
|
+
const config = walk(root, 4, (n, r) => !SKIP.test(r) && /^(playwright|cypress)\.config\.[cm]?[jt]s$|^\.detoxrc|^detox\.config\.|^wdio\.conf\./.test(n))[0] ?? (has('.maestro') ? '.maestro/' : null);
|
|
175
|
+
const py = isPy ? (read(join(root, 'pyproject.toml')) ?? '') + (read(join(root, 'requirements.txt')) ?? '') : '';
|
|
176
|
+
const APPS = /^(react|react-dom|next|vue|nuxt|svelte|@sveltejs\/kit|@angular\/core|solid-js|astro|electron|react-native|expo|express|fastify|koa|hono|@nestjs\/core|@remix-run\/node)$/;
|
|
177
|
+
const isApp = pkgs.some((p) => !p.bin && Object.keys(p.dependencies ?? {}).some((d) => APPS.test(d))) || /\b(django|fastapi|flask)\b/i.test(py);
|
|
178
|
+
const found = [skill && `.claude/skills/${skill}`, runner && `${runner} installed`, script && `script "${script[0]}"`, config].filter(Boolean);
|
|
179
|
+
if (found.length) add('D7', 'ok', `a way to run the change end to end: ${found.join(', ')}`);
|
|
180
|
+
else if (isApp) add('D7', 'gap', 'no way to run the app end to end: no .claude/skills/verify*/SKILL.md, no e2e or HTTP test runner, no e2e script or runner config', 'Add a verify skill that starts the app and drives the changed flow, or an e2e runner. Tests alone miss what running the change shows.');
|
|
181
|
+
else add('D7', 'info', 'no e2e runner or verify skill; fine for a CLI or library if a check runs the real command', 'Give user-visible slices one check that runs the built CLI or public API, not only unit tests.');
|
|
182
|
+
}
|
|
160
183
|
return F;
|
|
161
184
|
}
|
|
162
185
|
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "jig-plan",
|
|
3
|
-
"version": "2.
|
|
3
|
+
"version": "2.2.0",
|
|
4
4
|
"description": "Plan, verify and guard work done by coding agents: short reviewable plans, executable acceptance checks, and hooks that stop false completion claims.",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"bin": {
|
|
@@ -34,6 +34,16 @@ Read only the sections for areas the slice touches. Each question either has an
|
|
|
34
34
|
- Can a retry storm happen: clients retrying in lockstep, or retries multiplying through layers?
|
|
35
35
|
- Is ordering assumed anywhere it isn't guaranteed?
|
|
36
36
|
|
|
37
|
+
## Testing and verification
|
|
38
|
+
- Does a check run the change for real? When a slice changes what a user sees, one `e2e` check starts the app, CLI or service and drives the changed flow. Running the change catches what tests of its parts miss.
|
|
39
|
+
- Does a rule have a property, not only examples? The four shapes that cover most rules:
|
|
40
|
+
- **round-trip:** `decode(encode(x)) == x` (serializers, parsers, migrations up then down)
|
|
41
|
+
- **invariant:** something that holds after every operation (a balance never negative, a list stays sorted, counts add up)
|
|
42
|
+
- **idempotency:** doing it twice equals doing it once (retries, webhooks, `PUT`, migrations)
|
|
43
|
+
- **equivalence:** the new code gives the same result as a simpler or older one (an optimisation, a rewrite)
|
|
44
|
+
- Is this a rewrite or a migration that must keep behaviour? Use a `differential` check: run old and new on the same inputs and compare. Normalise the noise first (timestamps, ids, ordering, whitespace), and keep a checked-in list of approved differences, so a new difference fails and an approved one doesn't.
|
|
45
|
+
- Is a test flaky? Find the cause (shared state, time, ordering, a race). Don't retry, sleep or skip it. If you can't find the cause, delete the test and log why.
|
|
46
|
+
|
|
37
47
|
## Software design
|
|
38
48
|
- Does the change deepen an existing module or add a shallow one: a wrapper that passes calls through, or an interface with one implementation?
|
|
39
49
|
- Agents optimize locally. Does the change respect the boundaries and invariants the repo already has? Look for ADRs and module owners.
|
package/references/mechanisms.md
CHANGED
|
@@ -7,6 +7,7 @@ Prose instructions are advisory, and models follow them less as they pile up (IF
|
|
|
7
7
|
| A rule that must always hold ("never edit migrations", "no prod credentials") | Permission deny rule, or a PreToolUse hook | Deterministic: it runs whether or not the model remembers it |
|
|
8
8
|
| A behaviour that must be true of the code | A test, type or lint rule, run in CI | Fails the build instead of relying on review |
|
|
9
9
|
| A convention or non-obvious fact (build command, a trap in this repo) | One line in CLAUDE.md or AGENTS.md | Advisory and cheap. Only write what isn't already in the repo; generated context files raised cost 20–23% with no significant gain (Gloaguen et al., arXiv 2602.11988) |
|
|
10
|
+
| A review rule that only shows in a diff (no test can decide it) | A `When: · Check: · Source:` entry in REVIEW.md, applied by the diff reviewer from the base commit | Read only when the trigger matches, and a slice can't edit the copy that judges it |
|
|
10
11
|
| A procedure used now and then | A skill | Loaded only when needed, so it costs nothing the rest of the time |
|
|
11
12
|
| Investigation, or parallel work | A subagent, or one agent per git worktree split along module boundaries | Keeps searches and logs out of the main context and avoids merge conflicts |
|
|
12
13
|
| Access to an outside system | An MCP server, pinned, with a read-only token where possible | Each server widens what an injected instruction can reach |
|
|
@@ -135,7 +135,7 @@ The Log is append-only and dated: `- 2026-11-25: ...` or `- 2026-11-25 14:02: ..
|
|
|
135
135
|
|---|---|
|
|
136
136
|
| `id` | Letters, digits, `.`, `-` or `_`, starting with a letter. Unique |
|
|
137
137
|
| `slice` | A slice ID from the plan |
|
|
138
|
-
| `kind` | `acceptance`, `regression`, `property`, `mutation`, `perf` or `
|
|
138
|
+
| `kind` | `acceptance`, `regression`, `property`, `mutation`, `perf`, `security`, `e2e` (starts the real app, CLI or service and drives the changed flow) or `differential` (compares old and new output on the same inputs) |
|
|
139
139
|
| `cmd` | Shell command, run from the repo root |
|
|
140
140
|
| `expect.exit` | Expected exit code (default 0) |
|
|
141
141
|
| `expect.stdout` | Optional JavaScript regex the output must match |
|
package/skills/build/SKILL.md
CHANGED
|
@@ -44,7 +44,7 @@ Run `jig verify --record` for the slice. It runs the slice's checks, prints one
|
|
|
44
44
|
- **A check is flaky** (passes and fails on the same code): don't add retries, sleeps or a skip, and don't rerun it until it passes. Find the cause. If you can't, delete the test, log why, and tell the owner (deleting a protected test asks first). `jig lint` warns on a check command that retries or sleeps [J22], and rejects one that can't fail, such as `|| true` [J23].
|
|
45
45
|
- **A check can't run here** (missing service, credentials, hardware): say so in the Log and to the owner. Don't count it as passing.
|
|
46
46
|
|
|
47
|
-
At the full tier, hand the slice to the `jig-reviewer` agent in diff mode, with the plan path and slice ID. Fix the findings, or log why one doesn't apply.
|
|
47
|
+
At the full tier, hand the slice to the `jig-reviewer` agent in diff mode, with the plan path and slice ID. Fix the Important findings, or log why one doesn't apply. Nits are your call, and Pre-existing findings go to the owner rather than into this slice. After fixing, send it back with the earlier findings and the commit it last reviewed, so it reviews only the new diff. If it returns `rethink` after three rounds, stop and take the approach to the owner.
|
|
48
48
|
|
|
49
49
|
When the slice changes UI and the loupe skill is available, run it on the affected screens if the slice's done-when calls for it.
|
|
50
50
|
|
package/skills/guard/SKILL.md
CHANGED
|
@@ -37,6 +37,27 @@ Show the owner the mechanism, the exact change, and how you tested that it catch
|
|
|
37
37
|
|
|
38
38
|
Add a Log line to the active plan naming the failure and the guard.
|
|
39
39
|
|
|
40
|
+
## Review checklist entries
|
|
41
|
+
|
|
42
|
+
Some failures can't be caught by a test or lint rule, but a reviewer reading the diff would spot them. Those can become an entry in the repo's REVIEW.md, which the jig-reviewer applies in diff mode:
|
|
43
|
+
|
|
44
|
+
```
|
|
45
|
+
- When: <a trigger readable from a diff, e.g. "a new route under src/api/"> · Check: <what to verify> · Source: <incident, PR or plan Log line>
|
|
46
|
+
```
|
|
47
|
+
|
|
48
|
+
Propose an entry only when all three hold:
|
|
49
|
+
- it has happened twice (find both occurrences)
|
|
50
|
+
- its trigger can be seen in a diff, without running anything
|
|
51
|
+
- it survived one attempt to disprove it: look for a past diff where the trigger matched and the problem wasn't there, and narrow the trigger if you find one
|
|
52
|
+
|
|
53
|
+
Show the owner the exact entry and let them commit REVIEW.md. Rule files are the owner's, and the reviewer reads REVIEW.md from the plan's Baseline commit, so an agent editing it mid-slice changes nothing anyway.
|
|
54
|
+
|
|
55
|
+
Prune the list when you add to it: drop entries whose Source no longer applies (the code is gone, or a test now catches it) and merge entries with the same trigger. A long checklist gets skimmed.
|
|
56
|
+
|
|
57
|
+
## Start a new gate in observe mode
|
|
58
|
+
|
|
59
|
+
A new hook or gate can misfire, and a gate that asks too often gets switched off. Ship it observing first. jig's own gates support `JIG_GATES=observe` (or `JIG_GATES=observe:<gate>,...`), which logs each decision to `.git/jig/observe.jsonl` instead of asking. For a hook you write, log what it would have blocked in the same way. After a few sessions, read the log with the owner, count the false positives, and only then let it enforce.
|
|
60
|
+
|
|
40
61
|
## Doctor
|
|
41
62
|
|
|
42
63
|
`jig doctor` reports gaps in a repo's harness and changes nothing. It checks:
|
|
@@ -46,6 +67,7 @@ Add a Log line to the active plan naming the failure and the guard.
|
|
|
46
67
|
- whether `.claude/settings.json` and `.mcp.json` need reading before you trust the repo
|
|
47
68
|
- for a secret scanner in CI
|
|
48
69
|
- for lockfile drift
|
|
70
|
+
- for a way to run the change end to end: a `.claude/skills/verify*/SKILL.md`, an e2e runner or an e2e script (D7; a gap for apps, a note for a CLI or library)
|
|
49
71
|
|
|
50
72
|
Run it, then turn each gap the owner cares about into a slice or a guard. Treat a repo you didn't write as untrusted: read its `.claude/` and `.mcp.json` before running an agent in it.
|
|
51
73
|
|
package/skills/plan/SKILL.md
CHANGED
|
@@ -66,6 +66,8 @@ What matters most, and why:
|
|
|
66
66
|
- `mutation` on core logic at the full tier
|
|
67
67
|
- `perf` with a threshold on hot paths
|
|
68
68
|
- `security` on auth and input
|
|
69
|
+
- `e2e` when the slice changes behaviour a user sees: one check that starts the real app, CLI or service and drives the changed flow, because tests alone miss what running it shows
|
|
70
|
+
- `differential` when a rewrite must keep behaviour: old and new on the same inputs (see `references/fundamentals.md`)
|
|
69
71
|
- **Risks** say how you'd notice each one and what you'd do instead. Don't score them.
|
|
70
72
|
- **No time estimates.** They are unreliable, and they turn into deadlines. Scope (slices, files, checks) is the measure.
|
|
71
73
|
|