ai-engineering-loop 2.1.0 → 2.3.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.
Files changed (108) hide show
  1. package/.agents/skills/ai-engineering-loop/SKILL.md +4 -4
  2. package/.agents/skills/ai-engineering-loop/references/loop-deliver.md +2 -2
  3. package/.agents/skills/ai-engineering-loop/references/loop-goal.md +3 -3
  4. package/.agents/skills/ai-engineering-loop/references/loop-maker.md +1 -0
  5. package/.agents/skills/ai-engineering-loop/references/loop-review.md +3 -4
  6. package/.agents/skills/ai-engineering-loop/references/loop-verify.md +3 -3
  7. package/.claude/agents/judge.md +5 -2
  8. package/.grok/agents/judge.md +5 -2
  9. package/CHANGELOG.md +46 -0
  10. package/agents/maker.md +1 -1
  11. package/agents/shared/judge.body.md +5 -2
  12. package/bin/ai-engineering-loop.js +303 -77
  13. package/core/definition-of-done.md +2 -2
  14. package/core/escalation-policy.md +1 -1
  15. package/core/goal-contract.md +1 -1
  16. package/core/iteration-policy.md +2 -1
  17. package/core/judge-policy.md +10 -4
  18. package/core/local-workflow-studio.md +12 -7
  19. package/core/orchestration-model.md +8 -7
  20. package/core/repo-config-schema.md +2 -2
  21. package/core/runtime-safety.md +3 -3
  22. package/lib/auto-update.js +8 -14
  23. package/lib/claimed-vs-reality.js +2 -2
  24. package/lib/cli-args.js +3 -1
  25. package/lib/docs.js +1 -1
  26. package/lib/doctor.js +0 -6
  27. package/lib/escalation.js +1 -1
  28. package/lib/fsutil.js +88 -0
  29. package/lib/gates.js +69 -27
  30. package/lib/generate-workflow.js +0 -29
  31. package/lib/goal-runtime.js +3 -2
  32. package/lib/guard-hooks.js +26 -7
  33. package/lib/guard.js +100 -10
  34. package/lib/hosts/doctor.js +1 -5
  35. package/lib/impact-map.js +4 -9
  36. package/lib/jsonl-ledger.js +104 -0
  37. package/lib/learn.js +4 -9
  38. package/lib/loop-groups.js +0 -25
  39. package/lib/migrations.js +1 -5
  40. package/lib/no-progress.js +119 -0
  41. package/lib/node-evidence.js +873 -0
  42. package/lib/orchestration.js +5 -361
  43. package/lib/personal-workflow.js +1 -1
  44. package/lib/quick.js +152 -0
  45. package/lib/receipt.js +1 -5
  46. package/lib/recipe-builder.js +3 -35
  47. package/lib/recipe-graph.js +2 -63
  48. package/lib/recipe.js +2 -4
  49. package/lib/review-ingest.js +116 -0
  50. package/lib/run-abandon.js +2 -1
  51. package/lib/run-checkout.js +8 -13
  52. package/lib/run-compaction.js +4 -12
  53. package/lib/run-interactions.js +16 -71
  54. package/lib/run-lifecycle.js +25 -77
  55. package/lib/run-state.js +68 -17
  56. package/lib/run-watcher.js +11 -14
  57. package/lib/runtime-files.js +45 -1
  58. package/lib/safe-context.js +17 -6
  59. package/lib/sandbox.js +2 -1
  60. package/lib/smart-context.js +3 -13
  61. package/lib/spawn-command.js +94 -0
  62. package/lib/studio-layout.js +2 -8
  63. package/lib/studio-runtime.js +2 -1
  64. package/lib/studio-server.js +25 -5
  65. package/lib/tier.js +36 -10
  66. package/lib/user-state.js +2 -17
  67. package/lib/verification-lanes.js +115 -0
  68. package/lib/verification-recorder.js +110 -22
  69. package/lib/workflow-runtime.js +7 -4
  70. package/package.json +1 -2
  71. package/policies/review-budget.md +1 -1
  72. package/studio/app.js +734 -132
  73. package/studio/index.html +13 -4
  74. package/studio/styles.css +75 -20
  75. package/.claude/skills/ai-engineering-loop/SKILL.md +0 -62
  76. package/.claude/skills/ai-engineering-loop/references/loop-commands.md +0 -24
  77. package/.claude/skills/ai-engineering-loop/references/loop-deliver.md +0 -10
  78. package/.claude/skills/ai-engineering-loop/references/loop-goal.md +0 -11
  79. package/.claude/skills/ai-engineering-loop/references/loop-hosts.md +0 -48
  80. package/.claude/skills/ai-engineering-loop/references/loop-maker.md +0 -14
  81. package/.claude/skills/ai-engineering-loop/references/loop-review.md +0 -20
  82. package/.claude/skills/ai-engineering-loop/references/loop-risky.md +0 -9
  83. package/.claude/skills/ai-engineering-loop/references/loop-verify.md +0 -20
  84. package/.claude/skills/animate/RECIPES.md +0 -324
  85. package/.claude/skills/animate/SKILL.md +0 -207
  86. package/.claude/skills/animate-expo/RECIPES.md +0 -385
  87. package/.claude/skills/animate-expo/SKILL.md +0 -263
  88. package/.claude/skills/animation-vocabulary/SKILL.md +0 -181
  89. package/.claude/skills/apple-design/SKILL.md +0 -290
  90. package/.claude/skills/ask-sonner/API.md +0 -64
  91. package/.claude/skills/ask-sonner/SKILL.md +0 -88
  92. package/.claude/skills/backend-development/SKILL.md +0 -272
  93. package/.claude/skills/backend-development/references/api-design-guidelines.md +0 -95
  94. package/.claude/skills/backend-development/references/query-and-database-best-practices.md +0 -53
  95. package/.claude/skills/backend-development/references/security-checklist.md +0 -60
  96. package/.claude/skills/emil-design-eng/SKILL.md +0 -674
  97. package/.claude/skills/find-animation-opportunities/SKILL.md +0 -140
  98. package/.claude/skills/improve-animations/AUDIT.md +0 -115
  99. package/.claude/skills/improve-animations/PLAN-TEMPLATE.md +0 -73
  100. package/.claude/skills/improve-animations/SKILL.md +0 -109
  101. package/.claude/skills/mobile-native/SKILL.md +0 -311
  102. package/.claude/skills/pick-ui-library/SKILL.md +0 -85
  103. package/.claude/skills/prototype/PICKER.md +0 -197
  104. package/.claude/skills/prototype/SKILL.md +0 -98
  105. package/.claude/skills/review-animations/SKILL.md +0 -120
  106. package/.claude/skills/review-animations/STANDARDS.md +0 -187
  107. package/.claude/skills/write-swift/SKILL.md +0 -396
  108. package/lib/intern-catalog.js +0 -53
@@ -25,18 +25,18 @@ Same skill on every host. Before the first DA or Judge spawn, read your host's s
25
25
  Map (not a second OS) of the 8-stage loop: Specify (stages 0-1), Make (stages 2-4), Review (stages 5-7), Deliver (stage 8). Parent = Maker + orchestrator; Devil's Advocate (DA) and Judge are fresh **siblings**, never nested or resumed. Gate failures override prose. Never edit `state.json`/`current.json`.
26
26
 
27
27
  Tier (from `run --json`; it only rises). Do not skip Goal Contract, verification, Devil's Advocate, or Judge gates; the tier only decides who fills them.
28
- - **T0** trivial (docs, typo, lint): `gate goal`, Maker, `verify`, claimed-vs-reality, `gate review`, `gate judge` (deterministic); no subagents.
29
- - **T1** normal: frozen Goal, red test, `verify`, lean DA, `gate review --json`; spawn Judge only on `judgeRequired`.
28
+ - **T0** trivial (docs, typo, lint): `quick start "<task>"` (run + `gate goal`), edit, `quick finish`; no subagents.
29
+ - **T1** normal: frozen Goal, red test, `verify --related`, lean DA, `review ingest`; Judge only on `judgeRequired`.
30
30
  - **T2** risky (HIGH_RISK_PATH, DOT business logic, >10 files): add `loop-risky` (blast radius, Judge on STRONG_MODEL). Unseen risk: `run --new --tier T2 --tier-reason <why>`.
31
31
 
32
- 0. `run --json [--mode report-only|assisted|unattended]` (`RUN_DIR` = `.ai-engineering-loop/runs/<runId>/`). Do not run `sync-hosts` per run; if `hostSkills.stale`, ask the user. Read `.ai-engineering-loop/glossary.md`, plus `lessons.md`/`workflow.md` if present.
32
+ 0. `run --json [--mode report-only|assisted|unattended]` (`RUN_DIR` = `.ai-engineering-loop/runs/<runId>/`). Do not run `sync-hosts` per run; if `hostSkills.stale`, ask the user. Read `.ai-engineering-loop/glossary.md`, plus `lessons.md`/`workflow.md` if present; heed `learnings`.
33
33
  1. Goal Contract: `loop-goal`. 2-4. Maker: `loop-maker`, then `gate maker`. 5. Verify: `loop-verify`. 6-7. DA and Judge: `loop-review`. 8. Deliver: `loop-deliver`.
34
34
 
35
35
  Invariants (every tier):
36
36
  - AC is a failure table. Do not freeze sunny-path-only. Chat agreement is not freeze.
37
37
  - One red test per AC row (bugs: red repro) before the fix.
38
38
  - Write claimed-vs-reality.md after `gate verification` passes. Do not spawn Devil's Advocate if the file is missing or any Claimed row lacks Reality.
39
- - ITERATE at most to iteration 3, each with a **new** DA.
39
+ - ITERATE to iteration 3 (or the recipe cap), each with a **new** DA.
40
40
  - Never infer human approval.
41
41
  - After each child `budget record` real usage or `--unavailable`; never invent counts.
42
42
  - No secrets or hidden reasoning in activity messages.
@@ -1,10 +1,10 @@
1
1
  # Stage 8: Delivery
2
2
 
3
- - After Judge PASS, run the `after_pass` hook, then the Stage 8 adapter from `.ai-engineering-loop/adapter.md`.
3
+ - After Judge PASS (and `verify --final` if verification was `--related`), run the `after_pass` hook, then the Stage 8 adapter from `.ai-engineering-loop/adapter.md`.
4
4
  - Before any push, run `npx ai-engineering-loop doctor`: `✗ adapter-*` (unknown `adapter_type`, missing spec) must be fixed; `! adapter-*` (gh/glab not logged in, configured type differs from the detected one) needs a human look. `deliver` repeats this check: UNATTENDED stops before writing, ASSISTED only warns.
5
5
  - The PR/MR body includes `Steps to Reproduce & Testing (QA)`; bugfix placeholders must not stay empty. Disclose any `budget record --unavailable`.
6
6
  - Preview remote payloads; never include context packs, usage ledgers, raw logs, or credentials.
7
7
  - ASSISTED: wait for explicit human approval and never infer it. Then one call: `npx ai-engineering-loop deliver --run <runId> --destination <where> --summary <text> --approve --by <name>` (approves READY approval nodes, writes `RUN_DIR/delivery.json` with `humanApproved: true`, runs `gate delivery`). Without `--approve` it refuses in ASSISTED.
8
8
  - Long form: `node status --run <runId>`, `node approve delivery-approval --yes --by <name> --run <runId>` for each READY approval node, write `RUN_DIR/delivery.json`, then `gate delivery`. If the gate says a node is not READY, follow its prerequisite hint; never bypass approval.
9
9
  - Commit before `deliver` (its receipt binds `HEAD`; screenshots: `--evidence AC-N=<https-url>`). Paste `RUN_DIR/receipt.md` into the PR/MR Receipt section unchanged; ❌ stays ❌ (`docs pr-receipt`).
10
- - Only the delivery gate completes the run. Then run `learn` so the next Run's packs carry its lessons.
10
+ - Only the delivery gate completes the run. It also mines lessons for the next Run.
@@ -4,8 +4,8 @@
4
4
  - Ambiguous task the user can answer: grill first (`docs grill-policy`): design tree, recommended answers, never ask look-up facts. T2 adds `loop-risky`.
5
5
  - If the user prompt has no numbered AC, draft the contract (`docs goal-contract` if needed), list it, and wait. Chat agreement is not freeze.
6
6
  - AC is a failure table: each row has a statement, required evidence, and failure cases. Do not freeze sunny-path-only. T0 may use 1-3 rows that still list failure cases.
7
- - Emit `npx ai-engineering-loop activity goal-drafting --run <runId> --message <summary>`, write the contract JSON to a repository-local temporary file, then `npx ai-engineering-loop goal draft --run <runId> --file <file> --revision <currentRevision>` so Studio shows the exact draft.
8
- - Wait for the explicit human freeze, then `npx ai-engineering-loop goal freeze --latest --run <runId> --by human` (or `--revision <r> --hash <h>`). T0 may write `RUN_DIR/goal-contract.json` and run `gate goal` directly.
9
- - The freeze writes a DRAFT blast-radius map: `impact show --run <runId>`. ASSISTED: the human confirms or edits it (`impact confirm --by <name> [--allow <glob>] [--remove <path>]`); copy/CSS/comment-only goals: `impact skip --by <name> --reason <text>` (`docs blast-radius-map`).
7
+ - Write the contract JSON to a repository-local file, then `npx ai-engineering-loop goal draft --run <runId> --file <file> --revision <currentRevision>` (publishes the draft and the freeze question to Studio). Show the human the draft and its `impactPreview` in one message.
8
+ - Wait for the explicit human freeze, then `npx ai-engineering-loop goal freeze --latest --run <runId> --by <name>` (or `--revision <r> --hash <h>`). Add `--confirm-impact` when that answer also accepts the blast radius. T0: `quick start`.
9
+ - Otherwise the freeze writes a DRAFT blast-radius map: `impact show --run <runId>`. ASSISTED: the human confirms or edits it (`impact confirm --by <name> [--allow <glob>] [--remove <path>]`); copy/CSS/comment-only goals: `impact skip --by <name> --reason <text>` (`docs blast-radius-map`).
10
10
  - Do not edit production code until the Goal gate passes.
11
11
  - After the freeze, work from the frozen contract (`goal show --run <runId>`), not the drafting chat; compact the conversation there if the host supports it.
@@ -6,6 +6,7 @@
6
6
  - Guardrails: Claude Code enforces them after `hooks install`. Elsewhere, before an out-of-scope edit or a destructive command (`rm -rf`, `DROP TABLE`, `git push --force`, `git reset --hard`, `git clean -fd`) run `guard check --tool edit --path <file>` or `--tool bash --command "<cmd>"`: `warn` = ask the human, `block` = do not run it.
7
7
  - Bugs: red repro first. Features: one red test per AC row, then green.
8
8
  - After package and manifest edits are stable, run `npx ai-engineering-loop refresh` once (drift during red-green is expected; do not refresh per test cycle).
9
+ - `eslint --fix` and other auto-fixers run before `gate maker`, never after.
9
10
  - ASSISTED: `npx ai-engineering-loop gate maker --from-git` writes the exact working-tree diff (tracked and new files, excluding `.ai-engineering-loop/`) to `RUN_DIR/diff.patch` and gates it; or write that file yourself and run `gate maker`. UNATTENDED: `sandbox capture` writes it, then `gate maker`. The gate can raise the tier from the diff.
10
11
 
11
12
  ## REPORT_ONLY report review (recipe `audit`)
@@ -8,13 +8,12 @@ REPORT_ONLY runs skip these stages; their single report review is in `loop-maker
8
8
  - Use the runtime policy `reviewProfile` (default `lean`); upgrade to `standard` or `thorough` only when the human asks or the budget gate requires it.
9
9
  - Spawn a new DA as a sibling (Host rules) with the pack path, the changed paths as a short list, and claimed-vs-reality.md. Do not paste Maker rationale. DA prompt includes "at most 8 tool calls; read the diff file; skip css and generated files".
10
10
  - Iteration 2+: give unresolved findings and new hunks, not the whole diff again.
11
- - Wait, `budget record` its usage (or `--unavailable`), normalize its ledger into `RUN_DIR/findings.json` with runId and diffHash, then `npx ai-engineering-loop gate review --json`. Report Spec and Standards separately.
11
+ - Wait, `budget record` its usage (or `--unavailable`), save its output to a file, then `review ingest --run <runId> --child-id <id> --file <output> --json` (binds the ledger, runs `gate review`, and `gate judge` when not required). Never drop a finding; dismiss or downgrade only with `dismissal: {by, evidence}`. Report Spec and Standards separately.
12
12
 
13
13
  ## Judge
14
14
 
15
- - T0, or T1 when `gate review --json` reports `judgeRequired: false`: run `gate judge`; the CLI writes the deterministic verdict.
16
15
  - Otherwise run `npx ai-engineering-loop escalation --json` and resolve the required tier through the host model catalog; if unavailable, escalate to the user. T2 needs STRONG_MODEL.
17
16
  - Judge context: only run-summary.md, verification-summary.json (or verification.json), open-findings.json/findings.json, and the Goal hash; it reads the full diff only if those contradict each other. Judge prompt includes "at most 4 tool calls; ledger and contract only; skip css; do not re-review the whole diff".
18
- - Spawn a fresh sibling Judge, wait, `budget record`, write `RUN_DIR/verdict.json` with `modelTier`, then `gate judge`. A gate failure overrides optimistic prose.
17
+ - Spawn a fresh sibling Judge, wait, `budget record`, write `RUN_DIR/verdict.json` with `modelTier` and any `judgeFindings`, then `gate judge`. A gate failure overrides optimistic prose.
19
18
  - Acting on findings (ITERATE or human MR comments): verify each one before changing code; fix valid ones test-first, decline invalid ones with evidence (skill `ael-receiving-code-review` if installed).
20
- - ITERATE while iteration < 3: fix in the parent, re-verify, spawn a **new** DA (never resume the previous child). At the iteration ceiling (3) ESCALATE to the human instead.
19
+ - ITERATE under the recipe cap: fix in the parent, re-verify, spawn a **new** DA (never resume the previous child). At the cap or NO_PROGRESS, ESCALATE to the human.
@@ -1,10 +1,10 @@
1
1
  # Stage 5: Verification
2
2
 
3
- - One call: `npx ai-engineering-loop verify --run <runId> [--cmd "<command>"]...` (defaults to `test_unit` from `.ai-engineering-loop/verification.md`). It records each command in parallel (`--serial` for dependent commands), binds bounded, redacted evidence to the gated diff, and only when all pass runs `gate verification`, `context compact`, and scaffolds claimed-vs-reality. Shell syntax needs `--shell`.
4
- - Long form (same gate): `verification record --run <runId> -- <executable> [args...]` per command, `gate verification`, `context compact --run <runId>`, `context claimed-vs-reality --run <runId>`.
3
+ - `npx ai-engineering-loop verify --run <runId> [--cmd "<command>"]...` (default `test_unit` from verification.md) records commands in parallel (`--serial`, `--shell`), binds redacted evidence to the gated diff, and only when all pass gates verification, compacts, and scaffolds claimed-vs-reality.
4
+ - Iterating (T1/T2): `verify --related` runs `test_related` on the diff's changed files. After Judge PASS, `verify --final` runs the full suite once; delivery requires it after related-only runs. Unchanged diff: passes are reused (`--fresh` re-runs).
5
5
  - A failed command is recorded honestly and returns non-zero; it cannot pass the gate. Vague "seems green" is invalid.
6
6
  - Fill `.ai-engineering-loop/tasks/claimed-vs-reality.md`: Claimed from the actual change, Reality from command output. Do not spawn DA while the file is missing or any Claimed row lacks Reality.
7
- - Hand-authored artifacts: `scaffold verification|findings|delivery --run <runId>` writes an incomplete `.template.json`; edit it into the real artifact, remove `_templateOnly`, and `validate <repository-relative-file>`. Templates are never evidence.
7
+ - Hand-authored artifacts: `scaffold verification|findings|delivery --run <runId>`, fill it, remove `_templateOnly`, then `validate <file>`. Templates are never evidence.
8
8
  - Pass run-summary.md and verification-summary.json to reviewers instead of raw logs.
9
9
 
10
10
  ## No claim without fresh evidence
@@ -21,11 +21,13 @@ AC source is the Goal Contract **file** only. Chat `setuju` and the parent trans
21
21
 
22
22
  ITERATE if verification is missing, vague, non-zero, proves a different artifact than the AC names, is only a source grep, or is happy-path-only while the Goal Contract lists empty, boundary, sibling, or error rows. ITERATE if claimed-vs-reality.md is missing or a Claimed row has empty Reality.
23
23
 
24
+ The gate recomputes the verdict from the ledger. To block on a problem the ledger lacks (wrong-artifact or happy-path-only evidence, an AC the tests do not prove), add it to `judgeFindings` in the Finding Ledger shape: VALID, BLOCKER or HIGH, with `location`, `failureScenario`, `evidence`, and `concreteAlternativeDiff`. A verdict that blocks without such a finding is rejected. You cannot PASS what the ledger blocks.
25
+
24
26
  ## Axes
25
27
 
26
28
  Do not merge Spec and Standards into one ranking.
27
29
 
28
- - Spec VALID BLOCKER or HIGH (or missing axis, treated as spec): ITERATE (ESCALATE if iteration is 3 or more)
30
+ - Spec VALID BLOCKER or HIGH (or missing axis, treated as spec): ITERATE (ESCALATE at the recipe's iteration cap, default 3)
29
31
  - Standards VALID BLOCKER or HIGH: ITERATE only when hardConvention is true
30
32
  - Other Standards findings: ACCEPT as tradeoff; may still PASS
31
33
  - INVALID findings: DISMISS, cannot block delivery
@@ -44,7 +46,8 @@ Return a fenced JSON block:
44
46
  "action": "Proceed to context impact assessment and delivery adapter",
45
47
  "blockingFindings": [],
46
48
  "acceptableTradeoffs": [],
47
- "dismissedFindings": []
49
+ "dismissedFindings": [],
50
+ "judgeFindings": []
48
51
  }
49
52
  ```
50
53
 
@@ -22,11 +22,13 @@ AC source is the Goal Contract **file** only. Chat `setuju` and the parent trans
22
22
 
23
23
  ITERATE if verification is missing, vague, non-zero, proves a different artifact than the AC names, is only a source grep, or is happy-path-only while the Goal Contract lists empty, boundary, sibling, or error rows. ITERATE if claimed-vs-reality.md is missing or a Claimed row has empty Reality.
24
24
 
25
+ The gate recomputes the verdict from the ledger. To block on a problem the ledger lacks (wrong-artifact or happy-path-only evidence, an AC the tests do not prove), add it to `judgeFindings` in the Finding Ledger shape: VALID, BLOCKER or HIGH, with `location`, `failureScenario`, `evidence`, and `concreteAlternativeDiff`. A verdict that blocks without such a finding is rejected. You cannot PASS what the ledger blocks.
26
+
25
27
  ## Axes
26
28
 
27
29
  Do not merge Spec and Standards into one ranking.
28
30
 
29
- - Spec VALID BLOCKER or HIGH (or missing axis, treated as spec): ITERATE (ESCALATE if iteration is 3 or more)
31
+ - Spec VALID BLOCKER or HIGH (or missing axis, treated as spec): ITERATE (ESCALATE at the recipe's iteration cap, default 3)
30
32
  - Standards VALID BLOCKER or HIGH: ITERATE only when hardConvention is true
31
33
  - Other Standards findings: ACCEPT as tradeoff; may still PASS
32
34
  - INVALID findings: DISMISS, cannot block delivery
@@ -45,7 +47,8 @@ Return a fenced JSON block:
45
47
  "action": "Proceed to context impact assessment and delivery adapter",
46
48
  "blockingFindings": [],
47
49
  "acceptableTradeoffs": [],
48
- "dismissedFindings": []
50
+ "dismissedFindings": [],
51
+ "judgeFindings": []
49
52
  }
50
53
  ```
51
54
 
package/CHANGELOG.md CHANGED
@@ -6,6 +6,52 @@ All notable changes to this project are documented here. Versions follow [Semant
6
6
 
7
7
  _No changes yet._
8
8
 
9
+ ## 2.3.0 - 2026-10-21
10
+
11
+ ### Security
12
+
13
+ - Studio: mutating requests now need the `x-ael-studio-token` header or an exact same-origin `Origin`, plus `content-type: application/json`. The SameSite cookie alone no longer authorizes a POST from another localhost port.
14
+ - Secret redaction covers JSON keys (`{"password":"…"}`), key names embedded in identifiers (`AWS_SECRET_ACCESS_KEY=`, `_password`, `clientSecret`), npm `npm_` tokens, Stripe `sk_live_`/`rk_live_` keys, Slack `xox*` tokens, JWTs, and credentials in URLs (`postgres://user:pass@host`).
15
+ - Guard: agent edits to CLI-owned Run evidence (`verification.json`, `state.json`, event ledgers, and others) are denied; `\rm -rf`, `find -delete`, `git checkout -- .`, `git restore`, and `git branch -D` are detected; a failing hook exits 2 (fail closed) outside ASSISTED; `hooks install` pins the hook command to the installed version.
16
+
17
+ ### Fixed
18
+
19
+ - `verification record` timeouts stop the whole process tree (process group on POSIX, `taskkill /T` on Windows) and no longer hang on a grandchild that holds the output pipes.
20
+ - Concurrent `verification record` calls and Run state updates no longer lose each other's writes: both re-read under a lock before writing.
21
+ - An unterminated last line in `events.jsonl`, `lifecycle.jsonl`, or `interactions.jsonl` (crash mid-append) no longer bricks the Run; the next append quarantines it to `<ledger>.torn-*`.
22
+ - Windows: `npm` and other `.cmd` shims are resolved for `verification record` and auto-update; atomic writes retry a transient `EPERM`/`EBUSY` rename.
23
+ - Studio live snapshots show the newest 100 lifecycle events, and the watcher seeds its cursor from the latest event, so long Runs no longer replay stale events.
24
+
25
+ ### Lighter package and faster hook calls
26
+
27
+ - **Changed:** the npm package ships one copy of the host skills (`.agents/skills`, which `sync-hosts` already installs from) instead of two identical trees: 247 files, 1.79 MB unpacked (was 279 files, 2.11 MB). `docs` and `doctor` read `.agents/skills`.
28
+ - **Changed:** the CLI loads command modules on first use. `guard check --hook` now loads 15 modules instead of 61.
29
+ - **Removed:** internal helpers that only tests called (capability selection and report formatting in `lib/orchestration.js`, `lib/intern-catalog.js`, recipe import plan/apply, loop-group create/remove, and a few single-use exports). CLI behaviour is unchanged.
30
+ - **Internal:** one atomic writer, sha256 helper, optional JSON reader and actor-id rule (`lib/fsutil.js`), and one hash-chained JSONL ledger for run interactions and lifecycle (`lib/jsonl-ledger.js`).
31
+
32
+ ### Lower ceremony, faster verification, tamper-resistant review
33
+
34
+ - **Added:** `verify --related` runs the project's `test_related` command (`{files}` = changed files of the gated diff; `init` writes it for Jest and Vitest), tagged `scope: related`. When verification was related-only, `gate delivery` needs `verify --final`, a single full run bound to the same diff. Re-running `verify` on an unchanged diff reuses passing commands (`--fresh` re-runs them); a superseded failure stays in `verification.json` under `superseded`.
35
+ - **Added:** `quick start "<task>"` / `quick finish` take a T0 task through the same gates in two calls: a Goal derived from the task, verify, claimed-vs-reality from the recorded output, review, and the deterministic Judge. T0 parent calls in `npm run measure`: 15 → 6.
36
+ - **Added:** `review ingest --child-id <id> --file <output>` binds `findings.json` to the Devil's Advocate output (`reviewer.rawSha256`, `review-raw.txt`), gates review, and gates the Judge when not required. The review gate rejects a dropped finding, or one downgraded without `dismissal.evidence` (`LEDGER_TAMPERED`). UNATTENDED refuses unbound ledgers; ASSISTED reports `ledgerBinding: UNBOUND`.
37
+ - **Added:** `verdict.json` may carry `judgeFindings`, so the Judge can block with evidence the ledger lacks. It still cannot PASS what the ledger blocks.
38
+ - **Added:** `goal draft` returns an `impactPreview` and persists the freeze question; `goal freeze --confirm-impact` accepts the blast radius in the same human stop and closes the question.
39
+ - **Changed:** the iteration cap comes from the recipe's Judge loop group (`maxIterations`, clamped to 1-5; default 3). An ITERATE that repeats the previous Maker diff or blocking findings escalates as `NO_PROGRESS` (`RUN_DIR/iterations.jsonl`).
40
+ - **Changed:** runs that end DELIVERED or ESCALATED mine learnings automatically (`AEL_NO_AUTO_LEARN=1` opts out); `run --json` reports the top `learnings`.
41
+ - **Changed:** tier classification is path-first. Docs-only paths stay T0 even when the task names a risky topic; prose under a risky directory is not a risky path; dependency manifests and lockfiles are never T0; trivial-plus-risky text without paths starts at T1.
42
+ - **Fixed:** spec contradictions: no `tasks/current.diff`, one severity vocabulary (BLOCKER/HIGH, formerly SEV-1/SEV-2), auto-fixing linters before `gate maker`, the CONTEXT_ISOLATION_ONLY header no longer contains a forbidden word, and the Judge matrix covers every MEDIUM/LOW disposition.
43
+
44
+ ## 2.2.0 - 2026-10-18
45
+
46
+ ### Studio: richer node detail, Live tab, times, and trackpad gestures (#91)
47
+
48
+ - **Added:** built-in nodes show Evidence from the run directory (goal contract, diff stats and files touched, verification output and test counts, review findings, judge verdict, approver, delivery destination and receipt). The read stays inside the run directory and checks sha256 against `state.json`. A mismatch shows “artifact changed”. A node that already has `nodes[id].artifact` keeps that descriptor. Gate durations come from `GATE_PASSED`, or from `NODE_COMPLETED` in the lifecycle log when the workflow log has none.
49
+ - **Added:** the node panel tabs are Overview, Output, Evidence, and Timeline. Status, duration, finish time, loop, and attempts are labeled chips. Output is a one-paragraph summary. The timeline lists that node's events, grouped by iteration, with human labels.
50
+ - **Added:** times read as “just now”, “14s ago”, “5 min ago”, “3 h ago”, “yesterday · Oct 17, 15:41”, or “2 days ago · Oct 16, 15:41”, and as an absolute date after 7 days. Each time is a `<time datetime>` whose tooltip has the exact local timestamp. Durations use `2m 20s` and `1h 04m`.
51
+ - **Added:** the Live tab shows a stage rail, a question banner with Answer in Studio, the current step, compliance and budget chips, latest events, and a timeline grouped by step. Updates still arrive on `GET /api/events`. Tokens read `unknown` when the host reports no usage. A delivered run with no receipt says “no receipt: run predates receipts”.
52
+ - **Changed:** two-finger scroll pans the canvas on both axes. Pinch and Ctrl+wheel zoom around the cursor. A left-button drag on empty canvas pans, including macOS three-finger drag. Shift+drag selects with a marquee. `overscroll-behavior: none` on the page and canvas, plus a non-passive wheel listener, keeps a horizontal swipe from triggering browser back/forward. Scrolling inside the side panel still scrolls the panel.
53
+ - **Changed:** workflow structure stays read-only. Rewiring existing nodes is unchanged.
54
+
9
55
  ## 2.1.0 - 2026-10-18
10
56
 
11
57
  ### Studio: n8n-style Wiring canvas (#88)
package/agents/maker.md CHANGED
@@ -62,7 +62,7 @@ flowchart LR
62
62
  ### Step 3: Run Deterministic Verification
63
63
  - Run test commands: `npx jest`, `pytest`, `cargo test`, `go test`, etc.
64
64
  - Run typecheck: `npx tsc --noEmit`, `mypy`, etc.
65
- - Run linter: `npx eslint --fix`, `ruff`, etc.
65
+ - Run linter: `npx eslint --fix`, `ruff`, etc. Auto-fixes change the diff, so run them **before** `gate maker`; after the gate, run linters in check mode only (a changed diff fails the verification gate).
66
66
  - Run build if applicable.
67
67
 
68
68
  ### Step 4: Submit to Adversarial Gate
@@ -14,11 +14,13 @@ AC source is the Goal Contract **file** only. Chat `setuju` and the parent trans
14
14
 
15
15
  ITERATE if verification is missing, vague, non-zero, proves a different artifact than the AC names, is only a source grep, or is happy-path-only while the Goal Contract lists empty, boundary, sibling, or error rows. ITERATE if claimed-vs-reality.md is missing or a Claimed row has empty Reality.
16
16
 
17
+ The gate recomputes the verdict from the ledger. To block on a problem the ledger lacks (wrong-artifact or happy-path-only evidence, an AC the tests do not prove), add it to `judgeFindings` in the Finding Ledger shape: VALID, BLOCKER or HIGH, with `location`, `failureScenario`, `evidence`, and `concreteAlternativeDiff`. A verdict that blocks without such a finding is rejected. You cannot PASS what the ledger blocks.
18
+
17
19
  ## Axes
18
20
 
19
21
  Do not merge Spec and Standards into one ranking.
20
22
 
21
- - Spec VALID BLOCKER or HIGH (or missing axis, treated as spec): ITERATE (ESCALATE if iteration is 3 or more)
23
+ - Spec VALID BLOCKER or HIGH (or missing axis, treated as spec): ITERATE (ESCALATE at the recipe's iteration cap, default 3)
22
24
  - Standards VALID BLOCKER or HIGH: ITERATE only when hardConvention is true
23
25
  - Other Standards findings: ACCEPT as tradeoff; may still PASS
24
26
  - INVALID findings: DISMISS, cannot block delivery
@@ -37,7 +39,8 @@ Return a fenced JSON block:
37
39
  "action": "Proceed to context impact assessment and delivery adapter",
38
40
  "blockingFindings": [],
39
41
  "acceptableTradeoffs": [],
40
- "dismissedFindings": []
42
+ "dismissedFindings": [],
43
+ "judgeFindings": []
41
44
  }
42
45
  ```
43
46