@event4u/agent-config 14.5.0 → 14.6.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 (45) hide show
  1. package/.claude-plugin/marketplace.json +1 -1
  2. package/CHANGELOG.md +128 -0
  3. package/dist/agent-src/commands/analyze/decision.md +7 -0
  4. package/dist/agent-src/commands/optimize/project.md +10 -0
  5. package/dist/agent-src/commands/roadmap/process-full.md +45 -3
  6. package/dist/agent-src/contexts/execution/roadmap-process-loop.md +130 -1
  7. package/dist/agent-src/rules/decision-revisit-gate.md +108 -7
  8. package/dist/agent-src/skills/adr-create/SKILL.md +25 -3
  9. package/dist/agent-src/skills/decision-review/SKILL.md +18 -0
  10. package/dist/agent-src/templates/agents/agent-project-settings.example.yml +1 -1
  11. package/dist/cli-delegate/{chunk-ZPSXJTLI.js → chunk-P6LQDIWK.js} +15 -1
  12. package/dist/cli-delegate/cmd_conformance.js +1 -1
  13. package/dist/cli-delegate/cmd_handoff.js +1 -1
  14. package/dist/cli-delegate/cmd_session_recycle.js +1 -1
  15. package/dist/discovery/deprecation-report.md +1 -1
  16. package/dist/discovery/discovery-manifest.json +8 -8
  17. package/dist/discovery/discovery-manifest.json.sha256 +1 -1
  18. package/dist/discovery/discovery-manifest.summary.md +1 -1
  19. package/dist/discovery/dormancy-report.md +1 -1
  20. package/dist/discovery/orphan-report.md +1 -1
  21. package/dist/discovery/packs.json +2 -2
  22. package/dist/discovery/trust-report.md +1 -1
  23. package/dist/discovery/workspaces.json +2 -2
  24. package/dist/hooks/dispatch.js +334 -77
  25. package/dist/mcp/registry-manifest.json +2 -2
  26. package/dist/mcp/server.json +2 -2
  27. package/dist/router.json +1 -1
  28. package/docs/guidelines/agent-infra/engineering-memory-data-format.md +49 -0
  29. package/package.json +1 -1
  30. package/src/config/estate-count-budget.json +29 -1
  31. package/src/config/pack-size-budget.json +3 -2
  32. package/src/scripts/_lib/layer_overlap_notice.ts +85 -0
  33. package/src/scripts/_lib/scope_guard.sh +62 -3
  34. package/src/scripts/_lib/subagent_capsule.ts +81 -1
  35. package/src/scripts/adr/regenerate_index.ts +13 -2
  36. package/src/scripts/adr_cite_check.ts +424 -0
  37. package/src/scripts/check_adr_frontmatter.ts +187 -1
  38. package/src/scripts/check_single_delivery.ts +473 -0
  39. package/src/scripts/hooks/run_continuation_hook.ts +884 -68
  40. package/src/scripts/install.sh +12 -2
  41. package/src/scripts/memory_consolidation.ts +189 -0
  42. package/src/scripts/memory_eviction.ts +384 -0
  43. package/src/scripts/report_layer_overlap.ts +72 -0
  44. package/src/scripts/report_memory_pointers.ts +622 -0
  45. package/src/scripts/session_register_hook.ts +104 -15
@@ -11,6 +11,8 @@ execution:
11
11
  command:
12
12
  - ./scripts-run
13
13
  - src/scripts/adr/regenerate_index
14
+ - --dir
15
+ - docs/decisions
14
16
  runtime_requires:
15
17
  bins:
16
18
  - bash
@@ -59,7 +61,10 @@ Do NOT use when:
59
61
  governance ADRs, 3-digit numbering (`ADR-NNN-<slug>.md`).
60
62
  - **Per-area** — `docs/adrs/<area>/`: sub-area ADRs, 4-digit
61
63
  numbering (`NNNN-<slug>.md`); `<area>` must match the canonical
62
- inventory in [`scripts/audit_adr_coverage.ts`](../../../scripts/audit_adr_coverage.ts).
64
+ inventory in `src/scripts/audit_adr_coverage.ts` (`AREAS`). Deliberately not
65
+ a link: this skill is projected into `dist/agent-src/skills/`, whose sibling
66
+ `scripts/` directory carries six curated files and not this one, so any
67
+ relative href that resolves in `src/` is broken in the projection.
63
68
  - The decision is **already made** — ADRs record outcomes, they do
64
69
  not run the decision process. For unresolved trade-offs, run the
65
70
  council or consult `adversarial-review` first.
@@ -80,7 +85,7 @@ Ask one question only if both are plausible:
80
85
  `NNNN-<slug>.md` (4-digit, no `ADR-` prefix).
81
86
  3. **Unknown area** — `<area>` not in the inventory: refuse with a
82
87
  hint to add the area to `AREAS` in
83
- `scripts/audit_adr_coverage.ts` in the same PR. Do not invent.
88
+ `src/scripts/audit_adr_coverage.ts` in the same PR. Do not invent.
84
89
  4. **In doubt** → per-area (cheaper to surface, easier to relocate).
85
90
 
86
91
  ### 2. Pick the next ADR number
@@ -134,8 +139,12 @@ date: YYYY-MM-DD
134
139
  decision: <slug>
135
140
  supersedes: — | ADR-MMM
136
141
  superseded_by: — | ADR-MMM
142
+ amends: — | ADR-MMM # optional — this ADR amends that one (reciprocal required)
143
+ amended_by: — | ADR-MMM # optional — reciprocal of `amends`
137
144
  phase: <roadmap> · <phase-id>
138
145
  review_trigger: <the CONDITION that would reopen this decision>
146
+ protected_dimensions: [...] # optional — purpose | security_floor | privacy_floor | external_commitment | governance | none
147
+ reopen_policy: directional | owner | unclassified # optional; absent → unclassified
139
148
  ---
140
149
 
141
150
  # ADR-NNN — <Decision Title>
@@ -204,7 +213,7 @@ completeness check — not on every ADR by default.
204
213
  - **Per-area numbering is 4-digit** (`NNNN-<slug>.md`); the flat
205
214
  surface stays 3-digit (`ADR-NNN-<slug>.md`). Do not mix.
206
215
  - **Area inventory is closed** — `<area>` must already exist in
207
- `AREAS` in `scripts/audit_adr_coverage.ts`. Adding a new area is
216
+ `AREAS` in `src/scripts/audit_adr_coverage.ts`. Adding a new area is
208
217
  a separate PR with explicit reviewer sign-off.
209
218
  - Frontmatter `adr:` (flat) is the canonical number; the filename
210
219
  prefix must match. The flat regenerator fails on mismatch.
@@ -214,6 +223,19 @@ completeness check — not on every ADR by default.
214
223
  to `superseded`.
215
224
  - Never delete an ADR file — supersede it. Deletion breaks
216
225
  historical links and round-trips through git history checks.
226
+ - **Amending is the common case; wire it in both directions.** Most reopens
227
+ correct one decision inside an otherwise sound ADR rather than replacing the
228
+ whole record. Use `## Amendment N (YYYY-MM-DD) — <topic>` plus the reciprocal
229
+ `amends:` / `amended_by:` pair — the validator rejects a one-sided link,
230
+ because a one-sided link is invisible from the stale side, and the stale side
231
+ is the one a reader lands on first. Where the amendment reverses text that is
232
+ still asserted above it, add a one-line banner there too; the frontmatter
233
+ alone does not stop someone quoting the reversed sentence.
234
+ - **Who may reopen it is recorded, not assumed** — `reopen_policy` /
235
+ `protected_dimensions`, both optional, absent meaning `unclassified`
236
+ ([`adr-layout § Reopen authority`](../../../docs/contracts/adr-layout.md)).
237
+ Reach for `owner` only when EVERY future transition is genuinely reserved;
238
+ `directional` is the normal answer, and no answer is a fine answer.
217
239
 
218
240
  ## Frugality Standards
219
241
 
@@ -280,6 +280,24 @@ in the rule; the lock catalog, fire steps, and failure modes live here.
280
280
  contract — every re-evaluated lock gets a fresh, correctly-scoped
281
281
  disposition, not a re-statement of the old one.
282
282
 
283
+ When the lock is an **ADR**, the disposition carries the five-field reopen
284
+ record from [`adr-layout § Reopen record`](../../../docs/contracts/adr-layout.md):
285
+ the original rationale **addressed** (not cited), what changed with tree
286
+ evidence, dependants and external commitments touched, the rollback path,
287
+ and a blast radius — `narrow | wide | irreversible` — with the evidence for
288
+ that call. Two clauses bind the same record: **precedent creates no
289
+ authority** (that a similar ADR was reopened is never grounds for this one),
290
+ and **one seat must argue the strongest case for keeping the decision**.
291
+ Both answer precedent laundering through correlated self-review, which is
292
+ the failure two independent council seats named for this mechanism on
293
+ 2026-08-19: the proposer frames the evidence, correlated seats ratify, and
294
+ the amendment becomes authoritative input for the next review.
295
+
296
+ Proportionally: a narrow, reversible, bounded transition takes the light
297
+ path (record + council); `wide` or `irreversible` adds owner notification.
298
+ Identical ceremony for a typo-level amendment would cost more than asking
299
+ the owner and the mechanism would die of its own weight.
300
+
283
301
  ### When NOT to fire
284
302
 
285
303
  - The blocked change has no real benefit — the gate is not a lever to
@@ -39,7 +39,7 @@ schema_version: 1
39
39
  # CI guard: a release bump of `package.json` must update this value
40
40
  # in lockstep — see scripts/check_template_pin_drift.ts (road-to-
41
41
  # portable-runtime-and-update-check P3.3).
42
- agent_config_version: "14.5.0"
42
+ agent_config_version: "14.6.0"
43
43
 
44
44
  # --- Project identity ---
45
45
  project:
@@ -213,6 +213,20 @@ var CAPSULE_SCHEMA_VERSION = 3;
213
213
  function isShortLine(value, max) {
214
214
  return typeof value === "string" && value.length > 0 && value.length <= max && !value.includes("\n");
215
215
  }
216
+ function isPathRef(value) {
217
+ return typeof value === "string" && value.length > 0 && !/\s/.test(value);
218
+ }
219
+ function checkPathRefList(errors, field, value, max, required) {
220
+ checkList(errors, field, value, max, required);
221
+ if (!Array.isArray(value)) return;
222
+ if (value.some((x) => !isShortLine(x, max))) return;
223
+ const bad = value.filter((x) => !isPathRef(x));
224
+ if (bad.length === 0) return;
225
+ const shown = bad.slice(0, 3).map((x) => JSON.stringify(String(x))).join(", ");
226
+ errors.push(
227
+ `${field} carries ${bad.length} entr${bad.length === 1 ? "y" : "ies"} that are prose, not path refs: ${shown}${bad.length > 3 ? ", \u2026" : ""} \u2014 write the path (src/generated/api.ts, ../other-worktree/) or drop the entry; a sentence naming a file cannot be compared against a write target, and being comparable is the whole reason this is a field rather than a line of prose`
228
+ );
229
+ }
216
230
  function checkList(errors, field, value, max, required) {
217
231
  if (value === void 0) {
218
232
  if (required) errors.push(`${field} is required`);
@@ -402,7 +416,7 @@ function validateRecycleEnvelope(input) {
402
416
  checkList(errors, "decisions", e["decisions"], MAX_LINE_CHARS, false);
403
417
  errors.push(...decisionTagErrors(e["decisions"]));
404
418
  checkList(errors, "constraints", e["constraints"], MAX_LINE_CHARS, false);
405
- checkList(errors, "do_not_touch", e["do_not_touch"], MAX_REF_CHARS, false);
419
+ checkPathRefList(errors, "do_not_touch", e["do_not_touch"], MAX_REF_CHARS, false);
406
420
  checkList(errors, "open_worker_envelopes", e["open_worker_envelopes"], MAX_REF_CHARS, false);
407
421
  checkList(errors, "artifact_paths", e["artifact_paths"], MAX_REF_CHARS, false);
408
422
  checkList(errors, "suggested_skills", e["suggested_skills"], MAX_REF_CHARS, false);
@@ -4,7 +4,7 @@ import {
4
4
  } from "./chunk-F7DQWYR5.js";
5
5
  import {
6
6
  validateAssumption
7
- } from "./chunk-ZPSXJTLI.js";
7
+ } from "./chunk-P6LQDIWK.js";
8
8
  import {
9
9
  ArgparseExit,
10
10
  STATUS_SYMBOLS,
@@ -21,7 +21,7 @@ import {
21
21
  scanEnvelopeDirectives,
22
22
  validateRecycleEnvelope,
23
23
  wrapAsPriorSessionData
24
- } from "./chunk-ZPSXJTLI.js";
24
+ } from "./chunk-P6LQDIWK.js";
25
25
  import {
26
26
  _RAW_KEY_PREFIXES,
27
27
  hardenedSpawnEnv,
@@ -7,7 +7,7 @@ import {
7
7
  import {
8
8
  CAPSULE_SCHEMA_VERSION,
9
9
  validateRecycleEnvelope
10
- } from "./chunk-ZPSXJTLI.js";
10
+ } from "./chunk-P6LQDIWK.js";
11
11
  import {
12
12
  atomic_write_json
13
13
  } from "./chunk-EJITJBJX.js";
@@ -1,6 +1,6 @@
1
1
  # Discovery — Deprecation Report
2
2
 
3
- - Generated: `2026-08-19T16:05:13Z`
3
+ - Generated: `2026-08-20T10:01:02Z`
4
4
  - Deprecated artefacts: **0**
5
5
 
6
6
  _None. Tree is clean._
@@ -335,7 +335,7 @@
335
335
  },
336
336
  {
337
337
  "category": "command",
338
- "checksum": "sha256:41a78aafb9c64bbde078d810e27e439e824ef32d42304385c01da5349ed6d6db",
338
+ "checksum": "sha256:155621554341e110f17d47afd05dfaec8f9296c75775f87368d6858d246c0efc",
339
339
  "install": {
340
340
  "default": true,
341
341
  "removable": false
@@ -3932,7 +3932,7 @@
3932
3932
  },
3933
3933
  {
3934
3934
  "category": "command",
3935
- "checksum": "sha256:a00c792d3993feead1ea9cb2421e5f5050129297be3686dc03f916b91d414365",
3935
+ "checksum": "sha256:37afea968880e81d495ce5acdd65ba3672e437321113cdd2e797f587582a3f96",
3936
3936
  "install": {
3937
3937
  "default": true,
3938
3938
  "removable": false
@@ -5016,7 +5016,7 @@
5016
5016
  },
5017
5017
  {
5018
5018
  "category": "command",
5019
- "checksum": "sha256:1bdeb039465dc4495f4731e4aea95743c2a83cb17bb95fe406fff02050e66ed5",
5019
+ "checksum": "sha256:d52238b926d239cf3a2158fafa46b0b8b7188bd0a8b2d23743c08d0d64054af2",
5020
5020
  "install": {
5021
5021
  "default": true,
5022
5022
  "removable": false
@@ -5875,7 +5875,7 @@
5875
5875
  },
5876
5876
  {
5877
5877
  "category": "rule",
5878
- "checksum": "sha256:5caf2e99f1c5ba9038f942eb0cacac60ebe4a14d394fb170ac4b14aa10ce96c2",
5878
+ "checksum": "sha256:9e2c7fc0ca0e486501f9d97523b3020593a0d9cb03c867cb487f9966b06d1999",
5879
5879
  "install": {
5880
5880
  "default": true,
5881
5881
  "removable": false
@@ -8075,7 +8075,7 @@
8075
8075
  },
8076
8076
  {
8077
8077
  "category": "skill",
8078
- "checksum": "sha256:672f1c484a99d7ce790bc3ab2a2ccb321885bd7179de2da5c206da0406dacc52",
8078
+ "checksum": "sha256:c214a303dabbbdc25a775fb1840618589a442384264fffd0a735a54e5d2b4f03",
8079
8079
  "install": {
8080
8080
  "default": true,
8081
8081
  "removable": false
@@ -9395,7 +9395,7 @@
9395
9395
  },
9396
9396
  {
9397
9397
  "category": "skill",
9398
- "checksum": "sha256:e472a98d0fca4325a390a3825aa93c62718ee3b498ebbb12ae97086d35a50c81",
9398
+ "checksum": "sha256:e0344f1b7433b3b9c2069e51a121f284737aa6d1fec4decbf0ab3c52e73e8796",
9399
9399
  "install": {
9400
9400
  "default": false,
9401
9401
  "removable": true
@@ -14434,7 +14434,7 @@
14434
14434
  "workspaces": []
14435
14435
  }
14436
14436
  ],
14437
- "checksum": "sha256:ebb8ea9f229d02a7600a7b9d4da6b9bc6d4025af3e92fb900ef1d369e978ffba",
14437
+ "checksum": "sha256:b1e2057c34ec3436902fff901299ad74fb4d36434254dbb89f1a5998c45817be",
14438
14438
  "deprecations": [
14439
14439
  {
14440
14440
  "key": "tier",
@@ -14578,7 +14578,7 @@
14578
14578
  "reason": "scaffold template for ticket-bundle tickets (ADR-101); carries no runtime frontmatter — emit-tickets fills it in per ticket"
14579
14579
  }
14580
14580
  ],
14581
- "generated_at": "2026-08-19T16:05:13Z",
14581
+ "generated_at": "2026-08-20T10:01:02Z",
14582
14582
  "packs": [
14583
14583
  {
14584
14584
  "artefact_count": 118,
@@ -1 +1 @@
1
- 1ac599eacfebabd2c39b8f7ca9ae599d91e8be948f71c3cf96f74e1b0c4031db discovery-manifest.json
1
+ de82f5eaaf43261e3be41f593ad3220a2137274d149505507783869c2b54501d discovery-manifest.json
@@ -1,6 +1,6 @@
1
1
  # Discovery Manifest — Summary
2
2
 
3
- - Generated: `2026-08-19T16:05:13Z`
3
+ - Generated: `2026-08-20T10:01:02Z`
4
4
  - Scanner: `de0a22b4ac4c`
5
5
  - Artefacts: **609**
6
6
  - Unassigned: **0**
@@ -1,6 +1,6 @@
1
1
  # Discovery — Dormancy Report
2
2
 
3
- - Generated: `2026-08-19T16:05:13Z`
3
+ - Generated: `2026-08-20T10:01:02Z`
4
4
  - Window: **6 months** without a commit
5
5
 
6
6
  > Dormancy triggers **review, never auto-deprecation**
@@ -1,6 +1,6 @@
1
1
  # Discovery — Orphan Report
2
2
 
3
- - Generated: `2026-08-19T16:05:13Z`
3
+ - Generated: `2026-08-20T10:01:02Z`
4
4
  - Orphan artefacts: **0**
5
5
 
6
6
  > An orphan is an artefact whose declared pack has no other members.
@@ -1,6 +1,6 @@
1
1
  {
2
- "checksum": "sha256:ebb8ea9f229d02a7600a7b9d4da6b9bc6d4025af3e92fb900ef1d369e978ffba",
3
- "generated_at": "2026-08-19T16:05:13Z",
2
+ "checksum": "sha256:b1e2057c34ec3436902fff901299ad74fb4d36434254dbb89f1a5998c45817be",
3
+ "generated_at": "2026-08-20T10:01:02Z",
4
4
  "packs": [
5
5
  {
6
6
  "always_on": false,
@@ -1,6 +1,6 @@
1
1
  # Discovery — Trust Report
2
2
 
3
- - Generated: `2026-08-19T16:05:13Z`
3
+ - Generated: `2026-08-20T10:01:02Z`
4
4
  - Workspaces tracked: **10**
5
5
  - Human-review-required artefacts: **3**
6
6
 
@@ -1,6 +1,6 @@
1
1
  {
2
- "checksum": "sha256:ebb8ea9f229d02a7600a7b9d4da6b9bc6d4025af3e92fb900ef1d369e978ffba",
3
- "generated_at": "2026-08-19T16:05:13Z",
2
+ "checksum": "sha256:b1e2057c34ec3436902fff901299ad74fb4d36434254dbb89f1a5998c45817be",
3
+ "generated_at": "2026-08-20T10:01:02Z",
4
4
  "scanner_version": "de0a22b4ac4c",
5
5
  "workspaces": [
6
6
  {