@event4u/agent-config 10.4.0 → 11.0.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 (83) hide show
  1. package/.claude-plugin/marketplace.json +1 -1
  2. package/CHANGELOG.md +69 -0
  3. package/dist/agent-src/commands/council/debate.md +13 -4
  4. package/dist/agent-src/commands/council/default.md +26 -11
  5. package/dist/agent-src/commands/council.md +1 -1
  6. package/dist/agent-src/commands/design-system/generate.md +23 -1
  7. package/dist/agent-src/commands/pr/create.md +51 -26
  8. package/dist/agent-src/commands/worktree/create.md +5 -3
  9. package/dist/agent-src/rules/settings-ask-protocol.md +14 -9
  10. package/dist/agent-src/skills/ai-council/SKILL.md +24 -6
  11. package/dist/agent-src/skills/corpus-grounding/SKILL.md +12 -1
  12. package/dist/agent-src/skills/corpus-grounding/scripts/decision_engine.ts +215 -7
  13. package/dist/agent-src/skills/corpus-grounding/scripts/ground.ts +39 -1
  14. package/dist/agent-src/skills/design-intelligence/ATTRIBUTION.md +19 -2
  15. package/dist/agent-src/skills/design-intelligence/data/manifest.json +36 -1
  16. package/dist/agent-src/skills/design-intelligence/data/motion.csv +17 -0
  17. package/dist/agent-src/skills/git-workflow/SKILL.md +9 -3
  18. package/dist/agent-src/skills/subagent-orchestration/SKILL.md +9 -6
  19. package/dist/agent-src/skills/using-git-worktrees/SKILL.md +25 -21
  20. package/dist/agent-src/templates/agent-settings.md +0 -1
  21. package/dist/agent-src/templates/agents/agent-project-settings.example.yml +1 -1
  22. package/dist/cli-delegate/{chunk-BV3WR67D.js → chunk-55WZN5VF.js} +3 -6
  23. package/dist/cli-delegate/{chunk-X3VOARZD.js → chunk-L565YFXH.js} +3 -3
  24. package/dist/cli-delegate/{chunk-JMQZ7MM5.js → chunk-MNWRDMR5.js} +1 -1
  25. package/dist/cli-delegate/{chunk-IR3IVRVC.js → chunk-NLP54U3J.js} +2 -1
  26. package/dist/cli-delegate/{chunk-FV34EGEX.js → chunk-NN4KW4HZ.js} +1 -1
  27. package/dist/cli-delegate/{chunk-6ENSXSBW.js → chunk-PPQO4NGR.js} +1 -1
  28. package/dist/cli-delegate/{chunk-6LOPHJLD.js → chunk-RYNADUFG.js} +1 -1
  29. package/dist/cli-delegate/cmd_analyze_session.js +1 -1
  30. package/dist/cli-delegate/cmd_brand_status.js +1 -1
  31. package/dist/cli-delegate/cmd_conformance.js +2 -2
  32. package/dist/cli-delegate/cmd_doctor.js +2 -2
  33. package/dist/cli-delegate/cmd_explain.js +2 -2
  34. package/dist/cli-delegate/cmd_export.js +4 -4
  35. package/dist/cli-delegate/cmd_handoff.js +2 -2
  36. package/dist/cli-delegate/cmd_mcp_available.js +1 -1
  37. package/dist/cli-delegate/cmd_migrate.js +2 -2
  38. package/dist/cli-delegate/cmd_packs_active.js +2 -2
  39. package/dist/cli-delegate/cmd_prune.js +4 -4
  40. package/dist/cli-delegate/cmd_route_audit.js +2 -2
  41. package/dist/cli-delegate/cmd_route_explain.js +1 -1
  42. package/dist/cli-delegate/cmd_session_recycle.js +1 -1
  43. package/dist/cli-delegate/cmd_settings_get.js +1 -1
  44. package/dist/cli-delegate/cmd_settings_migrate.js +4 -4
  45. package/dist/cli-delegate/cmd_settings_set.js +1 -1
  46. package/dist/cli-delegate/cmd_sync.js +4 -4
  47. package/dist/cli-delegate/cmd_uninstall.js +4 -4
  48. package/dist/cli-delegate/cmd_update.js +1 -1
  49. package/dist/cli-delegate/cmd_upgrade.js +1 -1
  50. package/dist/cli-delegate/cmd_validate.js +4 -4
  51. package/dist/cli-delegate/cmd_versions.js +1 -1
  52. package/dist/discovery/deprecation-report.md +1 -1
  53. package/dist/discovery/discovery-manifest.json +14 -14
  54. package/dist/discovery/discovery-manifest.json.sha256 +1 -1
  55. package/dist/discovery/discovery-manifest.summary.md +1 -1
  56. package/dist/discovery/dormancy-report.md +1 -1
  57. package/dist/discovery/orphan-report.md +1 -1
  58. package/dist/discovery/packs.json +2 -2
  59. package/dist/discovery/trust-report.md +1 -1
  60. package/dist/discovery/workspaces.json +2 -2
  61. package/dist/hooks/dispatch.js +54 -12
  62. package/dist/install/install.mjs +5 -7
  63. package/dist/mcp/registry-manifest.json +1 -1
  64. package/dist/mcp/server.json +2 -2
  65. package/dist/mcp/server.mjs +2 -1
  66. package/dist/scripts/_lib/agent_settings.js +8 -0
  67. package/dist/scripts/_lib/agent_settings.js.map +1 -1
  68. package/dist/server/schemas/settings.js +3 -4
  69. package/dist/server/schemas/settings.js.map +1 -1
  70. package/dist/ui/assets/{index-5fXOHoVh.js → index-B0aMJnuz.js} +2 -2
  71. package/dist/ui/assets/{index-5fXOHoVh.js.map → index-B0aMJnuz.js.map} +1 -1
  72. package/dist/ui/index.html +1 -1
  73. package/docs/contracts/settings-classes.md +12 -9
  74. package/package.json +1 -1
  75. package/src/config/agent-settings.template.yml +15 -18
  76. package/src/config/gate-coverage.yml +13 -3
  77. package/src/config/gate-violation-baselines.json +1 -1
  78. package/src/config/pack-size-budget.json +3 -2
  79. package/src/scripts/_lib/agent_settings.ts +8 -0
  80. package/src/scripts/check_branch_freshness.ts +238 -6
  81. package/src/scripts/external_sources_denylist.json +7 -2
  82. package/src/scripts/session_register_hook.ts +120 -10
  83. package/src/server/schemas/settings.ts +3 -6
@@ -6,7 +6,7 @@
6
6
  },
7
7
  "metadata": {
8
8
  "description": "Bootstrap shim for the event4u agent-config suite. This plugin ships ONLY the dispatcher hooks plus one install-pointer skill — ALL content (skills, rules, commands) is installed via `npx -y @event4u/agent-config init`, which writes the file projection AND registers the same hooks in ~/.claude/settings.json. DEPRECATED as a content channel; kept so the marketplace listing stays discoverable and existing installs keep working hooks.",
9
- "version": "10.4.0",
9
+ "version": "11.0.0",
10
10
  "keywords": [
11
11
  "agent-config",
12
12
  "skills",
package/CHANGELOG.md CHANGED
@@ -348,6 +348,75 @@ Entry-shape contract: [`docs/contracts/CHANGELOG-conventions.md`](docs/contracts
348
348
  > that forces a new era split (`# Era: 10.4.x`, etc.) — see
349
349
  > [`docs/contracts/CHANGELOG-conventions.md § Era splits`](docs/contracts/CHANGELOG-conventions.md).
350
350
 
351
+ ## [11.0.0](https://github.com/event4u-app/agent-config/compare/10.4.0...11.0.0) (2026-08-13)
352
+
353
+ ### Release highlights
354
+
355
+ <!-- Curated head: fill before merge, keep it under 10 lines, and leave `_none_` where it is genuinely the answer. The generated log below is unchanged. -->
356
+ - **Behaviour changes:** _auto-derived, rewrite before merge:_ rule/schema diffs, breaking commits or removed public surface in 7d4af2c, 9e4cc35.
357
+ - **Default changes + migration:** _none_
358
+ - **Security and correctness:** _none_
359
+ - **Honest nulls:** _none_
360
+ - **Known limitations:** _none_
361
+
362
+ ### BREAKING CHANGES
363
+
364
+ * **settings:** delete worktrees.mode — worktree creation is instruction-only ([9e4cc35](https://github.com/event4u-app/agent-config/commit/9e4cc35513a69b9e107b639ff9dc78622d42b09e))
365
+
366
+ ### Features
367
+
368
+ * **council:** replace the per-run spend confirmation with a ceiling ([945d6c0](https://github.com/event4u-app/agent-config/commit/945d6c08b6e9a5519858fa6f4bb6ddece461621b))
369
+ * **gates:** resolve the PR base before judging branch freshness ([f77da9a](https://github.com/event4u-app/agent-config/commit/f77da9a6618d0ef982cd4b9bb83201179e26e818))
370
+ * **grounding:** the three 1-10 design dials, re-derived not ported ([1516fa8](https://github.com/event4u-app/agent-config/commit/1516fa8adda1c772a71062fb1950598f336b1c5e))
371
+ * **corpus:** vendor motion.csv and a gsap search domain; decline the rest ([0a82fa2](https://github.com/event4u-app/agent-config/commit/0a82fa2128ffdbc3273b85efd83152ead8e1da28))
372
+
373
+ ### Bug Fixes
374
+
375
+ * **settings:** correct the class-count summaries after the deletion ([b1cf141](https://github.com/event4u-app/agent-config/commit/b1cf1419366bd1a8bc338ce4a11e310724143627))
376
+ * **session-register:** gate the context block on a real collision ([c1dcf0e](https://github.com/event4u-app/agent-config/commit/c1dcf0e599e709f465903805a3f8147cc079fecd))
377
+ * **council:** align the command surfaces with the ceiling bound ([2e3ad3f](https://github.com/event4u-app/agent-config/commit/2e3ad3f74947fba2ff73c2017515e5954b19cefb))
378
+ * **session-register:** anchor the record on the session checkout, not the chdir target ([7b64d4e](https://github.com/event4u-app/agent-config/commit/7b64d4e3d0db42e6f177692cdf2c47eba3634d72))
379
+ * **review:** put the skip declaration on one line ([d6d3736](https://github.com/event4u-app/agent-config/commit/d6d3736fef1509eda589dbb8f36a3b806f30bcf3))
380
+ * **docs:** drop maintainer-only invocations from the shipped surfaces ([4e89881](https://github.com/event4u-app/agent-config/commit/4e8988172a773be43b8a9b3d93d3676f76fc5adf))
381
+ * **roadmap:** relocate distillation's two maintainer-gated items and archive it ([c19fcf6](https://github.com/event4u-app/agent-config/commit/c19fcf6072f499a5e0b5149985e238ee8eb5511e))
382
+ * **corpus:** advance last_checked in the manifest too, not only in ATTRIBUTION ([ca40b92](https://github.com/event4u-app/agent-config/commit/ca40b92b83db4a1951b4dc1328b21ecfdf7919f4))
383
+ * **provenance:** correct a falsified compliance record, and shrink two diffs ([88e095d](https://github.com/event4u-app/agent-config/commit/88e095d8342106111bd36d69f410f39646deb558))
384
+ * **grounding:** make the dials reach a reader, and make the variance claim true ([af919d3](https://github.com/event4u-app/agent-config/commit/af919d30d91a2c379819135fa7e34446a7da33a3))
385
+ * **gates:** carve out the two license-attribution surfaces for code borrows ([2a969a0](https://github.com/event4u-app/agent-config/commit/2a969a0c4835e9a4db031d01e70ebcb5e0bb051d))
386
+ * **records:** close all seven R2 findings, including a false claim of mine ([5ca4290](https://github.com/event4u-app/agent-config/commit/5ca4290795560d4fca8a054db6439e39e5bb6b42))
387
+
388
+ ### Documentation
389
+
390
+ * **skills:** hardcode the instruction-only worktree rule across every surface ([7d4af2c](https://github.com/event4u-app/agent-config/commit/7d4af2c9b51714fe3a6ae636b379f835f7dc0cbc))
391
+ * **adr:** record ADR-229 — worktree creation is instruction-only ([b20e3a5](https://github.com/event4u-app/agent-config/commit/b20e3a56a05402d95f88a66ade4075b3d211e53d))
392
+ * **adr:** record ADR-230 — the council spend bound is a ceiling ([1f35330](https://github.com/event4u-app/agent-config/commit/1f35330a6203c336a9ddced6593cf7f8e09fdbdc))
393
+ * **review:** declare the completion-review skip for a docs-only branch ([3ad11bf](https://github.com/event4u-app/agent-config/commit/3ad11bf5109088bca10a80954dffbd280e2586c1))
394
+ * **roadmap:** close Phase 0 Step 3 and re-scope Phases 1 and 2 on the measurement ([d9a888e](https://github.com/event4u-app/agent-config/commit/d9a888e793977be05af7c2c2b345655956e3eb8e))
395
+ * **evidence:** reproduce #58109 and record what the ledger cannot see ([21b8d2d](https://github.com/event4u-app/agent-config/commit/21b8d2dfbcd0dff415bfda7306788a86f3b3809b))
396
+ * **review:** re-bind the skip declaration after merging main ([3e03c75](https://github.com/event4u-app/agent-config/commit/3e03c75c4465ceac9d02bdfb76e8ad0091387965))
397
+ * **git:** route the pre-PR freshness check through the gate ([c0edb1f](https://github.com/event4u-app/agent-config/commit/c0edb1f36c001087d1118ef1fac3e7cb5e10f333))
398
+ * **review:** re-scope the skip declaration after the main merge ([7184ae8](https://github.com/event4u-app/agent-config/commit/7184ae89ec9e9385aca59ecba9bdd2eacc336c08))
399
+ * **review:** re-bind the findings artefact after the corpus-staleness fix ([47131d4](https://github.com/event4u-app/agent-config/commit/47131d403539cdaebf67e7b514267562835ae5c1))
400
+ * **review:** re-bind the findings artefact to the post-fix scope ([6a48f11](https://github.com/event4u-app/agent-config/commit/6a48f11ba78b1086209dfa06928bfe1f7addc743))
401
+ * **roadmap:** correct three overclaims, re-depth the archive links, stale watchlist ([c4e95d3](https://github.com/event4u-app/agent-config/commit/c4e95d36a6efcaf44f1aa693816806111e823165))
402
+ * **review:** bind the R2 findings for feat-design-system-onramp-blockers ([2092734](https://github.com/event4u-app/agent-config/commit/2092734d3438ac2647bdcdde5faf05be49b7b0dc))
403
+ * **review:** re-bind the artefact after the third main merge ([3b4bdb6](https://github.com/event4u-app/agent-config/commit/3b4bdb6a08f46181d869a2d4bd4dfb16af3e4349))
404
+ * **review:** re-bind the R2 artefact after the fix pass ([5bfc84c](https://github.com/event4u-app/agent-config/commit/5bfc84c8bfea61a9522f21f8cbb7f72acdcc7450))
405
+ * **council:** record the two unblocking decisions, and their honest standing ([8cd7182](https://github.com/event4u-app/agent-config/commit/8cd71823c1b1ce3c6002d16cb444d1b96b70f3fa))
406
+ * **review:** the real R2 review, replacing the skip — 7 findings ([834e7f1](https://github.com/event4u-app/agent-config/commit/834e7f10f26e0d93911f0c92d0720f72c8ee0fc2))
407
+
408
+ ### Tests
409
+
410
+ * **settings:** re-point two vacuous assertions and assert the deletion ([933f320](https://github.com/event4u-app/agent-config/commit/933f3208efd38a22854e147e7d3c7ddee2bacde1))
411
+
412
+ ### Chores
413
+
414
+ * **roadmap:** regenerate the dashboard after the main merge ([2653222](https://github.com/event4u-app/agent-config/commit/26532222c07d0784f1f608a0fc4185ed9b02274b))
415
+ * **roadmap:** regenerate the dashboard after the third main merge ([b271d07](https://github.com/event4u-app/agent-config/commit/b271d078b70d3c177571fc152cc00315b5780aba))
416
+ * **roadmap:** close design-system-onramp at 12/12 and archive it ([14bce9c](https://github.com/event4u-app/agent-config/commit/14bce9c59b193631737f7b2a19157fd53d4e6de4))
417
+
418
+ Tests: 13818 (+50 since 10.4.0)
419
+
351
420
  ## [10.4.0](https://github.com/event4u-app/agent-config/compare/10.3.0...10.4.0) (2026-08-13)
352
421
 
353
422
  ### Release highlights
@@ -68,11 +68,20 @@ this automatically when invoked via `debate`). The estimate covers
68
68
  projection. Surface the projection to the user with a clear note that
69
69
  progressive disclosure may stop the debate early.
70
70
 
71
- ### 4. Cost confirmation (ALWAYS ASK)
71
+ ### 4. Spend bound (ask when a billable member has no ceiling)
72
72
 
73
- Per [`ai-council` skill § cost gate](../../skills/ai-council/SKILL.md),
74
- always surface the projected total spend and ask for explicit consent
75
- before invoking. Numbered options:
73
+ Per [`ai-council` skill § Procedure 3](../../skills/ai-council/SKILL.md)
74
+ and ADR-230, surface the projected total spend in every case, and ask
75
+ only when a billable member is in the fan-out AND both
76
+ `cost_budget.max_total_usd` and `daily_limit_usd` are `0`.
77
+
78
+ A debate multiplies the per-round cost by `N`, so quote the worst case,
79
+ not one round — that is what a ceiling has to cover. The between-rounds
80
+ confirmation gate is unaffected: it is a separate, per-round control and
81
+ it still fires, which is where a debate that turns out expensive gets
82
+ stopped.
83
+
84
+ Numbered options, when the ask applies:
76
85
 
77
86
  > The debate is projected to cost **$X.XXXX** ($Y.YYYY × N rounds, worst case).
78
87
  >
@@ -152,11 +152,22 @@ Construct each member from the resolved mode:
152
152
  - `manual` → `ManualClient` from `scripts.ai_council.clients`
153
153
  (`billable=False`, no API key, no SDK call).
154
154
 
155
- ### 3. Cost confirmation — ALWAYS ASK for billable members
155
+ ### 3. Spend bound — ASK when a billable member has no ceiling
156
156
 
157
- Council calls to billable members spend money. Even under
158
- `personal.autonomy: on`, the agent **must** ask before invoking any
159
- billable member.
157
+ Council calls to billable members spend money, so a bound is mandatory.
158
+ Per ADR-230 the bound is a **ceiling**, not a per-invocation approval —
159
+ the same three cases the `ai-council` skill resolves in its Procedure § 3:
160
+
161
+ | Situation | Behaviour |
162
+ |---|---|
163
+ | No billable member (all `mode: cli`, subscription auth) | No gate. Estimate is information; go to Step 4. Spend is $0. |
164
+ | Billable member **with** `cost_budget.max_total_usd` or `daily_limit_usd` non-zero | No per-run ask. The ceiling is the authorization the user already gave; `on_overrun` still pauses per member on breach. |
165
+ | Billable member with **both** caps `0` | **Ask.** Nothing bounds the spend, so the user must. |
166
+
167
+ `personal.autonomy` neither creates nor lifts that bound — autonomy is
168
+ not a ceiling. Consumers who want a per-invocation gate set a small
169
+ `cost_budget.max_total_usd`; every call then breaches and `on_overrun`
170
+ asks per member.
160
171
 
161
172
  Run the CLI in **estimate** mode first — it bundles the artefact, runs
162
173
  redaction, and prints the per-member preview without spending:
@@ -182,17 +193,21 @@ roadmap file with `--input-mode roadmap`. `diff` and `files` modes
182
193
  remain Phase 4 — for now ask the user to convert into a `prompt`.
183
194
 
184
195
  The CLI prints a `council:estimate · members=N (billable=M)` line
185
- followed by per-member projected USD and a TOTAL. Render that to the
186
- user inside the cost-confirmation numbered-options block per the
187
- `ai-council` skill (§ Pre-call estimate format) — then `1. Run /
188
- 2. Cancel`. If the billable count is `0`, skip the gate entirely
189
- (spend = $0) and proceed directly to Step 4.
196
+ followed by per-member projected USD and a TOTAL. Render that table per
197
+ the `ai-council` skill (§ Pre-call estimate format) in every case — it is
198
+ what makes the spend legible whether or not it is being asked about.
199
+
200
+ Then read `billable=M` together with the two caps:
190
201
 
191
- Wait for the user's pick. `1` proceeds; anything else aborts.
202
+ - `M == 0` → no gate. Proceed to Step 4.
203
+ - `M > 0` and a cap is set → no gate. Proceed to Step 4; `on_overrun`
204
+ handles a breach per member.
205
+ - `M > 0` and both caps are `0` → render the table inside a numbered-options
206
+ block (`1. Run / 2. Cancel`) and wait. `1` proceeds; anything else aborts.
192
207
 
193
208
  ### 4. Run the CLI
194
209
 
195
- Once the user picks `1`, invoke the same arguments with `run` plus
210
+ Invoke the same arguments with `run` plus
196
211
  `--confirm` and an output path under `agents/runtime/council/sessions/`:
197
212
 
198
213
  ```bash
@@ -35,7 +35,7 @@ sub-command swaps the mode-specific addendum.
35
35
 
36
36
  1. Resolve the target + capture the original ask.
37
37
  2. Check the council is configured + price table fresh.
38
- 3. Cost confirmation (ALWAYS ASK for billable members).
38
+ 3. Spend bound (ask only when a billable member has no ceiling — ADR-230).
39
39
  4. Run the CLI.
40
40
  5. Render the report (5 / 5a / 5b — render → critical lens → user options).
41
41
  6. Hard floor — text only.
@@ -26,13 +26,35 @@ recommendation. Args: `"<product / industry / keywords>"`.
26
26
  ```bash
27
27
  npx tsx node_modules/@event4u/agent-config/src/skills/corpus-grounding/scripts/ground.ts \
28
28
  ground "<query>" \
29
- --manifest node_modules/@event4u/agent-config/src/skills/design-intelligence/data/manifest.json
29
+ --manifest node_modules/@event4u/agent-config/src/skills/design-intelligence/data/manifest.json \
30
+ [--variance 1-10] [--motion 1-10] [--density 1-10]
30
31
  ```
31
32
 
32
33
  Add `--persist <dir> --project-name <name>` to write
33
34
  `design-system/<slug>/MASTER.md`, and `--page <name>` for a page-override stub
34
35
  alongside it. The engine is read-only without `--persist`.
35
36
 
37
+ ## The three dials — optional, and unset means unset
38
+
39
+ Each takes an integer 1-10. A dial you do not pass changes nothing at all, so
40
+ the no-flag result is exactly what it was before dials existed.
41
+
42
+ | Dial | 1-3 | 4-7 | 8-10 | What it touches |
43
+ |---|---|---|---|---|
44
+ | `--variance` | Centered / Minimal | Balanced / Modern | Bold / Asymmetric | Biases which style is **selected** from the rows the corpus returned |
45
+ | `--motion` | Subtle | Standard | Complex | Pulls a motion recipe at that intensity tier |
46
+ | `--density` | Spacious | Standard | Dense / Dashboard | Overrides the spacing scale |
47
+
48
+ **`--variance` biases selection, never retrieval.** The rows that come back from
49
+ the corpus are the same with or without it; the dial only changes which of those
50
+ rows is picked. And when it changes the pick away from what the grounding rule's
51
+ own keywords would have chosen, the run **says so in its evidence gaps** — a
52
+ preference is allowed to win, but never quietly.
53
+
54
+ `--motion` needs the `gsap` domain (`motion.csv`) in the manifest. Without it,
55
+ or when no row matches the requested tier, the run reports that rather than
56
+ returning an empty block.
57
+
36
58
  ## After the recommendation
37
59
 
38
60
  Offer both destinations, and let the human pick — they are different artifacts,
@@ -68,52 +68,77 @@ gate.
68
68
 
69
69
  Run, in order:
70
70
 
71
- 1. `git fetch origin {target-base} --quiet` (default: `main`).
72
- 2. `git rev-list --count HEAD..origin/{target-base}` — number of
73
- commits HEAD is **behind** the base.
74
- 3. `gh pr list --state open --base {target-base} --limit 20 --json number,headRefName,files`
75
- — open PRs targeting the same base.
71
+ 1. **Ask the gate, never hand-roll the comparison:**
72
+
73
+ ```bash
74
+ ./scripts-run src/scripts/check_branch_freshness
75
+ ```
76
+
77
+ It resolves the base itself — explicit `--base`, else the base of the **open
78
+ PR for this branch** as the forge reports it, else the repo default from
79
+ `origin/HEAD`. Do **not** substitute `git rev-list --count HEAD..origin/main`:
80
+ that hardcodes a base this branch may not target, and it reads the local
81
+ tracking ref, which is a fetch from earlier in the session — a memory, not a
82
+ check (`direct-answers` Iron Law 2). Exit `0` = current, `1` = behind, and the
83
+ refusal names the base **and where that base came from**.
84
+
85
+ 2. `gh pr list --state open --base {resolved-base} --limit 20 --json number,headRefName,files`
86
+ — open PRs targeting the same base, for the overlap question below.
76
87
 
77
88
  **Decision matrix:**
78
89
 
79
- | Behind | Overlapping open PR touches same files? | Action |
90
+ | Gate | Overlapping open PR touches same files? | Action |
80
91
  |---|---|---|
81
- | `0` | — | Proceed to Step 2 |
82
- | `1–N` | No | **Merge `origin/main` in** — `git merge origin/{target-base} --no-edit` — then proceed. No need to ask; state that you did it. Abort + surface only on conflict. |
83
- | `1–N` | **Yes** | STOP — surface the overlapping PR number, ask: stack on top of it / wait for it to land / proceed-anyway-and-accept-conflicts / cancel |
92
+ | exit `0` | — | Proceed to Step 2 |
93
+ | exit `1` | No | **Merge the base in** — `git fetch origin && git merge origin/{resolved-base} --no-edit` — then run the regeneration set below, then proceed. No need to ask; state that you did it. |
94
+ | exit `1` | **Yes** | STOP — surface the overlapping PR number, ask: stack on top of it / wait for it to land / proceed-anyway-and-accept-conflicts / cancel |
95
+ | warns `could not ask the forge` | — | The **default** base was checked and an open PR against a different base was **not** ruled out. Say so; do not report it as a clean freshness pass. |
84
96
 
85
- A branch behind its base is **not** current — bring `main` in **before** the PR
97
+ A branch behind its base is **not** current — bring the base in **before** the PR
86
98
  exists, never after. Auto-merge when there is no file overlap (the common case);
87
99
  only ask when an overlapping open PR makes the base genuinely ambiguous. Never
88
100
  improvise the base or silently proceed when behind **and** overlapping. The
89
101
  10-second fetch beats hours of rebase reconciliation after the parent PR lands.
90
102
 
91
- **On merge conflict: regenerate, don't abort.** Most conflicts on this class of
92
- branch are in **generated files** — the roadmap dashboard
93
- (`agents/roadmaps-progress.md`), `docs/proof.md`, the `dist/agent-src/`
94
- projection, tool projections. Those are resolved **by regenerating from the merged sources**,
95
- never by hand-picking hunks:
96
-
97
- 1. `./agent-config roadmap:progress` → resolves the dashboard.
98
- 2. `./scripts-run src/scripts/build_proof` → resolves `docs/proof.md`.
99
- 3. `bash src/scripts/condense.sh --sync`, then `--check` → resolves any
100
- conflict inside `dist/agent-src/` by re-projecting from the merged source.
103
+ **After EVERY merge — not only on conflict — regenerate the derived files.**
104
+ This is the half that gets skipped, because a merge that lands cleanly *looks*
105
+ finished. It is not: these files are **generated**, so a clean auto-merge of
106
+ them produces a file that describes neither side's sources. The dashboard is the
107
+ usual casualty — it merges without a conflict marker and then reports a roadmap
108
+ set that no longer exists.
109
+
110
+ 1. `./agent-config roadmap:progress` → the roadmap dashboard.
111
+ 2. `./scripts-run src/scripts/build_proof` → `docs/proof.md`.
112
+ 3. `bash src/scripts/condense.sh --sync`, then `--check` → re-projects
113
+ `dist/agent-src/` from the merged source.
101
114
  4. Stage the regenerated files, complete the merge, and re-run the touched
102
115
  verification before pushing.
103
116
 
104
- Only a conflict in **hand-authored** content (source code, prose you or the
105
- other PR wrote) is surfaced to the user; a generated-file conflict never is.
117
+ On a **conflict**, the same four steps are the resolution — regenerate from the
118
+ merged sources, never hand-pick hunks. Only a conflict in **hand-authored**
119
+ content (source code, prose you or the other PR wrote) is surfaced to the user;
120
+ a generated-file conflict never is.
106
121
 
107
122
  ### 1b-ii. Update freshness — MANDATORY on EVERY later push to an open PR
108
123
 
109
124
  The gate above is not creation-only. **Every subsequent push** to a branch with
110
125
  an open PR (a CI fix, a review response, a follow-up commit) re-runs the same
111
- sequence first: `git fetch origin {target-base}` → behind-check → merge
112
- `origin/{target-base}` in (regenerating on conflict as above) → verify → push.
126
+ sequence first: `check_branch_freshness` → on exit `1`, merge
127
+ `origin/{resolved-base}` in → regenerate the derived files → verify → push.
113
128
  A PR that sits open while its base advances goes stale silently; keeping the
114
129
  base merged **at every touch** means it stays `mergeStateStatus: CLEAN` instead
115
- of accumulating conflicts for the moment the user wants to merge. If the
116
- behind-check shows `0`, the step costs one fetch and nothing else.
130
+ of accumulating conflicts for the moment the user wants to merge. If the gate
131
+ exits `0`, the step costs one `ls-remote` and nothing else.
132
+
133
+ Once the PR exists, this is also when the resolution gets *more* precise rather
134
+ than less: the gate can now read the PR's real `baseRefName` from the forge, so
135
+ a stacked or release-line PR is measured against the branch it will actually
136
+ merge into instead of against the repo default.
137
+
138
+ Where the project wires this gate into its pre-push chain, a push that goes out
139
+ through the hook is covered without a separate step. Run it by hand when you push
140
+ with the hook bypassed, or when you are about to open the PR some time after the
141
+ last push — that gap is exactly where a base moves unseen.
117
142
 
118
143
  ### 1c. PR-gate — archive completed roadmaps (MANDATORY)
119
144
 
@@ -26,7 +26,7 @@ Thin orchestration — mechanics live in the skills; do not restate them.
26
26
  ### 1. Gate + create
27
27
 
28
28
  Run [`using-git-worktrees`](../../../skills/using-git-worktrees/SKILL.md)
29
- in full: `worktrees.mode` pre-flight, existing-worktree inspection,
29
+ in full: instruction-only pre-flight, existing-worktree inspection,
30
30
  directory convention, ignore-safety check, worktree creation, the
31
31
  [§ 4b seeding allow/deny list](../../../skills/using-git-worktrees/SKILL.md#4b-seed-the-worktree--allow--deny-list),
32
32
  dependency install + clean baseline. Its Iron Law (no worktree without
@@ -61,5 +61,7 @@ name it as the suggested next action — suggest, never auto-run.
61
61
  ### Rules
62
62
 
63
63
  - **Do NOT commit or push.**
64
- - Worktree creation stays permission-gated per `scope-control` unless
65
- `worktrees.mode: on` grants standing permission (skill § 0).
64
+ - Worktree creation is instruction-only (ADR-229). Invoking this command
65
+ **is** the explicit request, so the skill's § 0 pre-flight passes and no
66
+ further permission question is raised. Nothing here creates a worktree
67
+ the user did not ask for.
@@ -77,12 +77,16 @@ conservative default (`""`, `false`, `false`), so absent is indistinguishable
77
77
  from *no* and never from *yes*.
78
78
 
79
79
  **Class C carrying an `ask` value in its own enum** — a runtime question whose
80
- answer dies with the run: `worktrees.mode` (**ships** as `ask`), plus
81
- `tokens.rich_skills`, `subagents.adversarial_council`, `decision_engine.on_block`
82
- (which can be set to `ask` by a human but do not ship that way). Always-on
83
- orchestration (road-to-always-on-orchestration Phase 1) deleted
84
- `subagents.auto` and `subagents.budget_routing` — the layer no longer carries a
85
- setting for this protocol to route.
80
+ answer dies with the run: `tokens.rich_skills`,
81
+ `subagents.adversarial_council`, `decision_engine.on_block`. **None of them
82
+ ships as `ask`** — a human sets it, so the whole class is opt-in and no shipped
83
+ default routes a question through this protocol at all.
84
+
85
+ Two deletions got the list here. Always-on orchestration
86
+ (road-to-always-on-orchestration Phase 1) removed `subagents.auto` and
87
+ `subagents.budget_routing`. ADR-229 removed `worktrees.mode`, which was the last
88
+ key that *shipped* as `ask` — worktree creation is instruction-only now, so
89
+ there is no setting and nothing to ask about.
86
90
 
87
91
  ## The budget
88
92
 
@@ -153,9 +157,10 @@ by `settings:set` and only *displayed* by the GUI.
153
157
  - Class A — resolves to its default, never asked.
154
158
  - Class C **not** set to `ask` — no question; a change is a human edit.
155
159
  - Already decided on any resolution layer, or the run completes without it.
156
- - **The `ask` routes to a permission gate.** `worktrees.mode: ask` means
157
- `scope-control`'s per-creation gate applies — a permission ask about an
158
- *action*, which that rule owns; a storage line there would store nothing.
160
+ - **The `ask` routes to a permission gate** — a permission ask about an
161
+ *action*, which `scope-control` owns; a storage line there would store
162
+ nothing. `worktrees.mode: ask` was the worked example until ADR-229 deleted
163
+ the key; the carve-out is kept because the shape recurs, not the key.
159
164
  - **The `ask` is code, not agent-carried.** `decision_engine.on_block: ask` is a
160
165
  TTY prompt in `work_engine/hooks/builtin/decision_gate.ts`.
161
166
 
@@ -328,9 +328,25 @@ not a default.
328
328
  2. **Bundle + redact.** Call `scripts/ai_council/bundler.ts` to produce
329
329
  a redacted artefact bundle. If `BundleTooLarge` fires, surface the
330
330
  size and ask the user to narrow scope — do NOT truncate silently.
331
- 3. **Confirm spend.** Before any network call, surface members + cost
332
- ceiling and require an explicit user `1` to proceed. Autonomy
333
- settings do not override this gate.
331
+ 3. **Clear the spend bound.** The council is standing-authorized — there is
332
+ no per-invocation approval. What still binds is a *bound*, resolved in
333
+ this order:
334
+ - **No billable member** (every member is `mode: cli` under
335
+ subscription auth — `billable=False`) → nothing is spent. Render the
336
+ estimate table as information and fan out. No gate.
337
+ - **Billable members with a configured ceiling** (`cost_budget.max_total_usd`
338
+ non-zero, or `daily_limit_usd` non-zero) → the ceiling **is** the
339
+ authorization the user already gave. Render the estimate and fan out.
340
+ `on_overrun` still fires per member on breach (below) — that is where
341
+ the user regains the decision.
342
+ - **Billable members with no ceiling at all** (`max_total_usd: 0` AND
343
+ `daily_limit_usd: 0`) → unbounded paid spend, so surface the estimate
344
+ and require an explicit `1`. Nothing bounds the call, so the user must.
345
+
346
+ Autonomy settings do not *create* a bound and do not lift the last case.
347
+ Consumers who want the old per-run gate back set a small
348
+ `cost_budget.max_total_usd`: every call then breaches and `on_overrun`
349
+ asks, per member.
334
350
  4. **Fan out.** Dispatch the bundle to each enabled council member via
335
351
  `scripts/ai_council/orchestrator.ts`. Each member receives the
336
352
  neutrality preamble from `prompts.ts` plus the artefact — nothing
@@ -594,8 +610,9 @@ overrides the table regardless of how the lens resolved.
594
610
  identity — that primes the reviewer and collapses diversity.
595
611
  - Do NOT silently truncate a too-large bundle — surface the size and
596
612
  ask for narrower scope.
597
- - Do NOT auto-spend tokens under `personal.autonomy: on` — the cost
598
- gate fires every time, no exceptions.
613
+ - Do NOT spend against an unbounded budget without asking — a billable
614
+ member with neither `max_total_usd` nor `daily_limit_usd` set has no
615
+ ceiling, and autonomy is not a ceiling.
599
616
  - Do NOT reuse SDK clients across invocations — re-load keys via
600
617
  `load_*_key()` each call.
601
618
 
@@ -620,7 +637,8 @@ Real failure modes seen in the wild:
620
637
  | Paste the host-agent identity ("I am Augment / Claude Code…") | Identity primes the reviewer's model. | Neutrality preamble in `prompts.ts` already handles this. |
621
638
  | Silently truncate a too-large bundle. | Misleads the reviewer into thinking they saw the whole thing. | Bundler raises `BundleTooLarge`; surface and ask for narrower scope. |
622
639
  | Reuse the same SDK client across calls without re-loading the key. | Leaks the key in long-lived process state. | Each invocation builds fresh clients from `load_*_key()`. |
623
- | Auto-spend tokens under `personal.autonomy: on`. | Autonomy ≠ permission to spend money. | Always ask before consultation, even under autonomy. |
640
+ | Spend against a billable member with no configured ceiling because "the council is standing-authorized". | Standing authorization is a *bound* the user set once, not a blank cheque. No ceiling = nothing was authorized. | Surface the estimate and ask, exactly in that one case (Procedure § 3). |
641
+ | Re-ask per invocation once a ceiling exists. | The ceiling already carried the decision; re-asking is the approval burden this default removed. | Fan out; let `on_overrun` ask on breach. |
624
642
  | Forward council convergence to the user as numbered options without a host verdict. | Convergence ≠ correctness; the council never saw the codebase. | Apply the *Critical evaluation* lens; tag every finding `accept` / `accept-with-modification` / `reject` / `needs-input` with one-line reason. |
625
643
  | Reject a finding on preference, not evidence. | "I don't like this" is not a verdict. | Cite the file, line, ADR, or contract that justifies the rejection — or surface as `needs-input`. |
626
644
  | Paraphrase council output into the host's own analysis to defend a verdict. | Strips attribution, breaches `direct-answers` no-invented-facts. | Verdict cites host evidence (file:line); council output stays attributed in the per-member sections. |
@@ -71,7 +71,8 @@ Scripts resolve all paths **skill-relative** (per
71
71
 
72
72
  ./scripts-run <skills-root>/corpus-grounding/scripts/ground ground \
73
73
  --manifest <skills-root>/<domain-skill>/data/manifest.json \
74
- "luxury e-commerce" [--context '{"data_heavy": true}'] [--persist DIR]
74
+ "luxury e-commerce" [--context '{"data_heavy": true}'] [--persist DIR] \
75
+ [--variance 1-10] [--motion 1-10] [--density 1-10]
75
76
 
76
77
  ./scripts-run <skills-root>/corpus-grounding/scripts/ground validate --manifest …
77
78
  ```
@@ -79,6 +80,16 @@ Scripts resolve all paths **skill-relative** (per
79
80
  `<skills-root>` is wherever skills are deployed (`~/.claude/skills/` for
80
81
  Claude Code installs; `src/skills/` inside this repo).
81
82
 
83
+ **The three `ground` dials are optional 1-10 preferences, and unset means
84
+ unset** — a dial you do not pass changes nothing, so the no-flag result is
85
+ byte-identical to what it was before they existed. `--variance` biases which
86
+ style is **selected** from the rows the corpus returned (never which rows come
87
+ back), and when it changes the pick away from the grounding rule's own choice
88
+ the run says so in its evidence gaps. `--motion` needs a `gsap` domain in the
89
+ manifest and reports when a tier matches nothing. `--density` overrides the
90
+ spacing scale. All three render in the text output and in a persisted
91
+ `MASTER.md`, not only under `--json`.
92
+
82
93
  ## Output format
83
94
 
84
95
  **Interface contract v1 — stability promise.** Per ADR-061 §2 ("Opus