@event4u/agent-config 9.32.0 → 9.34.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 (109) hide show
  1. package/.claude-plugin/marketplace.json +1 -1
  2. package/CHANGELOG.md +85 -72
  3. package/dist/agent-src/commands/agent-handoff.md +15 -3
  4. package/dist/agent-src/commands/review/routing.md +3 -4
  5. package/dist/agent-src/contexts/communication/rules-auto/reply-close-mechanics.md +65 -0
  6. package/dist/agent-src/contexts/execution/orchestration-telemetry.md +3 -0
  7. package/dist/agent-src/rules/delegation-policy.md +6 -0
  8. package/dist/agent-src/scripts/archive_completed_roadmaps.ts +35 -1
  9. package/dist/agent-src/scripts/roadmap_gates.ts +107 -3
  10. package/dist/agent-src/skills/corpus-grounding/SKILL.md +21 -12
  11. package/dist/agent-src/skills/design-tokens/SKILL.md +15 -0
  12. package/dist/agent-src/skills/docker/SKILL.md +11 -0
  13. package/dist/agent-src/skills/laravel/SKILL.md +11 -0
  14. package/dist/agent-src/skills/react-shadcn-ui/SKILL.md +24 -0
  15. package/dist/agent-src/skills/review-routing/SKILL.md +23 -6
  16. package/dist/agent-src/skills/rule-writing/SKILL.md +23 -0
  17. package/dist/agent-src/skills/skill-writing/SKILL.md +80 -2
  18. package/dist/agent-src/skills/systematic-debugging/SKILL.md +5 -3
  19. package/dist/agent-src/skills/tailwind-engineer/SKILL.md +24 -0
  20. package/dist/agent-src/templates/agents/agent-project-settings.example.yml +1 -1
  21. package/dist/agent-src/templates/scripts/ownership-map.example.yml +1 -1
  22. package/dist/cli/registry.js +4 -4
  23. package/dist/cli/registry.js.map +1 -1
  24. package/dist/cli-delegate/chunk-HTIU3W56.js +66 -0
  25. package/dist/cli-delegate/{chunk-2WELHO3P.js → chunk-I5EAFRII.js} +35 -0
  26. package/dist/cli-delegate/{chunk-ITIQSGOQ.js → chunk-MA4GFWDY.js} +7 -4
  27. package/dist/cli-delegate/{chunk-PFBV6XRT.js → chunk-Q26HT4QT.js} +1 -63
  28. package/dist/cli-delegate/{chunk-542DZR4P.js → chunk-REMEZSVP.js} +1660 -146
  29. package/dist/cli-delegate/{chunk-3EWYC3YK.js → chunk-UEZ7D35A.js} +4 -3
  30. package/dist/cli-delegate/{chunk-LVRYBKTI.js → chunk-YPAWXXXR.js} +158 -0
  31. package/dist/cli-delegate/cmd_conformance.js +256 -226
  32. package/dist/cli-delegate/cmd_doctor.js +3 -2
  33. package/dist/cli-delegate/cmd_export.js +1 -1
  34. package/dist/cli-delegate/cmd_handoff.js +21 -28
  35. package/dist/cli-delegate/cmd_memory_get.js +1 -1
  36. package/dist/cli-delegate/cmd_prune.js +1 -1
  37. package/dist/cli-delegate/cmd_route_audit.js +1 -1
  38. package/dist/cli-delegate/cmd_session_recycle.js +20 -5
  39. package/dist/cli-delegate/cmd_settings_get.js +4 -2
  40. package/dist/cli-delegate/cmd_settings_migrate.js +1 -1
  41. package/dist/cli-delegate/cmd_settings_set.js +5 -3
  42. package/dist/cli-delegate/cmd_sync.js +1 -1
  43. package/dist/cli-delegate/cmd_uninstall.js +1 -1
  44. package/dist/cli-delegate/cmd_validate.js +1 -1
  45. package/dist/discovery/deprecation-report.md +1 -1
  46. package/dist/discovery/discovery-manifest.json +17 -17
  47. package/dist/discovery/discovery-manifest.json.sha256 +1 -1
  48. package/dist/discovery/discovery-manifest.summary.md +2 -2
  49. package/dist/discovery/dormancy-report.md +17 -0
  50. package/dist/discovery/orphan-report.md +1 -1
  51. package/dist/discovery/packs.json +3 -3
  52. package/dist/discovery/trust-report.md +1 -1
  53. package/dist/discovery/workspaces.json +3 -3
  54. package/dist/hooks/dispatch.js +114 -7
  55. package/dist/install/install.mjs +7 -4
  56. package/dist/mcp/registry-manifest.json +3 -3
  57. package/dist/mcp/server.json +2 -2
  58. package/dist/mcp/server.mjs +3755 -1168
  59. package/docs/guidelines/agent-infra/failure-signatures.md +47 -12
  60. package/package.json +2 -2
  61. package/src/agent-src/scripts/archive_completed_roadmaps.ts +35 -1
  62. package/src/agent-src/scripts/roadmap_gates.ts +107 -3
  63. package/src/agent-src/templates/scripts/ownership-map.example.yml +1 -1
  64. package/src/config/cost-parity-budget.json +167 -0
  65. package/src/config/gate-coverage.yml +44 -5
  66. package/src/config/quorum-attendance-budget.json +39 -0
  67. package/src/scripts/_cli/cmd_doctor.ts +69 -1
  68. package/src/scripts/_cli/cmd_session_recycle.ts +25 -4
  69. package/src/scripts/_dispatch.bash +5 -3
  70. package/src/scripts/_lib/env_kill_switch.ts +37 -0
  71. package/src/scripts/_lib/orchestration_record.ts +45 -0
  72. package/src/scripts/_lib/security_lint.ts +18 -4
  73. package/src/scripts/_lib/self_repair.ts +60 -0
  74. package/src/scripts/_lib/self_repair_store.ts +65 -5
  75. package/src/scripts/_lib/subagent_capsule.ts +78 -1
  76. package/src/scripts/ai_council/clients.ts +31 -0
  77. package/src/scripts/ai_council/events_log.ts +130 -8
  78. package/src/scripts/ai_council/orchestrator.ts +50 -3
  79. package/src/scripts/ai_council/pricing.ts +48 -1
  80. package/src/scripts/ai_council/prompts.ts +165 -3
  81. package/src/scripts/ai_council/quorum.ts +30 -0
  82. package/src/scripts/ai_council/session.ts +11 -0
  83. package/src/scripts/ai_team/review_gate.ts +2 -2
  84. package/src/scripts/ask_transport.ts +20 -1
  85. package/src/scripts/build_discovery_manifest.ts +165 -0
  86. package/src/scripts/cache_realization_report.ts +38 -0
  87. package/src/scripts/check_claims.ts +51 -2
  88. package/src/scripts/check_release_highlights.ts +7 -1
  89. package/src/scripts/ci_time_ratio.ts +3 -1
  90. package/src/scripts/conformance_scan.ts +105 -0
  91. package/src/scripts/cost/track.mjs +39 -0
  92. package/src/scripts/cost_summary.ts +104 -1
  93. package/src/scripts/council_cli.ts +131 -13
  94. package/src/scripts/discovery_graph.ts +201 -27
  95. package/src/scripts/dispatch_economy_report.ts +5 -2
  96. package/src/scripts/dispatch_r2_reviewer.ts +102 -1
  97. package/src/scripts/install.ts +20 -6
  98. package/src/scripts/lint_budget_ownership.ts +81 -0
  99. package/src/scripts/lint_handoffs.ts +92 -2
  100. package/src/scripts/lint_hedge_words.ts +317 -0
  101. package/src/scripts/lint_mcp_config_security.ts +1 -1
  102. package/src/scripts/lint_skill_frontmatter_safety.ts +56 -2
  103. package/src/scripts/lint_workflow_paths.ts +384 -0
  104. package/src/scripts/preamble_byte_census.ts +9 -1
  105. package/src/scripts/report_carrier_divergence.ts +10 -0
  106. package/src/scripts/report_conformance_funnel.ts +40 -0
  107. package/src/scripts/schemas/subagent.schema.json +3 -2
  108. package/src/scripts/self_repair_cli.ts +26 -1
  109. package/src/scripts/skill_linter.ts +58 -2
@@ -7993,7 +7993,7 @@ function* iter_corpus(roots = DEFAULT_SCAN_ROOTS, exts = [".md"]) {
7993
7993
  function report(findings, opts) {
7994
7994
  const check_label = opts.check_label;
7995
7995
  if (findings.length === 0) {
7996
- process.stdout.write(`\u2705 ${check_label}: clean (${_corpus_note()}).
7996
+ process.stdout.write(`\u2705 ${check_label}: clean (${_corpus_note(opts.scanned_roots)}).
7997
7997
  `);
7998
7998
  return 0;
7999
7999
  }
@@ -8033,8 +8033,9 @@ function _pyG(n) {
8033
8033
  }
8034
8034
  return s;
8035
8035
  }
8036
- function _corpus_note() {
8037
- return "scanned " + DEFAULT_SCAN_ROOTS.join(", ");
8036
+ function _corpus_note(scanned_roots) {
8037
+ const roots = scanned_roots && scanned_roots.length > 0 ? scanned_roots : DEFAULT_SCAN_ROOTS;
8038
+ return "scanned " + roots.join(", ");
8038
8039
  }
8039
8040
  var PyFloat = class {
8040
8041
  constructor(value) {
@@ -16205,6 +16206,38 @@ function hasBoundaryMarker(block) {
16205
16206
  // outside the datamarking while still riding in the same block.
16206
16207
  block.trimEnd().endsWith(ENVELOPE_BOUNDARY_CLOSE);
16207
16208
  }
16209
+ var DECISION_REVERSIBILITY_TAGS = ["reversible", "irreversible"];
16210
+ function decisionTagErrors(decisions) {
16211
+ if (!Array.isArray(decisions)) {
16212
+ return [];
16213
+ }
16214
+ const errors = [];
16215
+ for (const line of decisions) {
16216
+ if (typeof line !== "string") {
16217
+ continue;
16218
+ }
16219
+ const m = /\[([^\]]*)\]\s*$/.exec(line.trimEnd());
16220
+ if (m === null) {
16221
+ continue;
16222
+ }
16223
+ const inner = (m[1] ?? "").trim();
16224
+ const lowered = inner.toLowerCase();
16225
+ if (DECISION_REVERSIBILITY_TAGS.includes(lowered)) {
16226
+ if (inner !== lowered) {
16227
+ errors.push(
16228
+ `decisions: reversibility tag must be lower-case \u2014 got \`[${inner}]\`, expected \`[${lowered}]\``
16229
+ );
16230
+ }
16231
+ continue;
16232
+ }
16233
+ if (/^i?rr?ever[a-z]*[^a-z]*$/i.test(lowered)) {
16234
+ errors.push(
16235
+ `decisions: \`[${inner}]\` is not a reversibility tag \u2014 use exactly ` + DECISION_REVERSIBILITY_TAGS.map((t) => `\`[${t}]\``).join(" or ") + ", or drop the bracket"
16236
+ );
16237
+ }
16238
+ }
16239
+ return errors;
16240
+ }
16208
16241
  var RECYCLE_ENVELOPE_KEYS = /* @__PURE__ */ new Set([
16209
16242
  "capsule_version",
16210
16243
  "variant",
@@ -16217,6 +16250,7 @@ var RECYCLE_ENVELOPE_KEYS = /* @__PURE__ */ new Set([
16217
16250
  "not_carried_forward",
16218
16251
  "decisions",
16219
16252
  "constraints",
16253
+ "do_not_touch",
16220
16254
  "open_worker_envelopes",
16221
16255
  "artifact_paths",
16222
16256
  "assumptions",
@@ -16269,7 +16303,9 @@ function validateRecycleEnvelope(input) {
16269
16303
  checkList(errors, "remaining", e["remaining"], MAX_LINE_CHARS, true);
16270
16304
  checkList(errors, "not_carried_forward", e["not_carried_forward"], MAX_LINE_CHARS, true);
16271
16305
  checkList(errors, "decisions", e["decisions"], MAX_LINE_CHARS, false);
16306
+ errors.push(...decisionTagErrors(e["decisions"]));
16272
16307
  checkList(errors, "constraints", e["constraints"], MAX_LINE_CHARS, false);
16308
+ checkList(errors, "do_not_touch", e["do_not_touch"], MAX_REF_CHARS, false);
16273
16309
  checkList(errors, "open_worker_envelopes", e["open_worker_envelopes"], MAX_REF_CHARS, false);
16274
16310
  checkList(errors, "artifact_paths", e["artifact_paths"], MAX_REF_CHARS, false);
16275
16311
  checkList(errors, "suggested_skills", e["suggested_skills"], MAX_REF_CHARS, false);
@@ -18839,6 +18875,12 @@ function claude_config_dir() {
18839
18875
  return env !== "" ? env : path32.join(os4.homedir(), ".claude");
18840
18876
  }
18841
18877
 
18878
+ // src/scripts/_lib/env_kill_switch.ts
18879
+ var _OFF_VALUES = /* @__PURE__ */ new Set(["", "0", "false", "False"]);
18880
+ function isEnvKillSwitchActive(name) {
18881
+ return !_OFF_VALUES.has(process.env[name] ?? "");
18882
+ }
18883
+
18842
18884
  // src/scripts/ai_team/config.ts
18843
18885
  var TeamConfigError = class extends Error {
18844
18886
  constructor(message) {
@@ -19048,8 +19090,7 @@ function circuit_breaker_notice(bound) {
19048
19090
  return `\u26A0\uFE0F team review-gate circuit breaker: ${bound} consecutive BLOCK verdict(s) this session (bound: \`ai_team.review_gate.max_consecutive_blocks\`). The managed gate stops re-blocking now \u2014 you decide: review the last BLOCK reason via \`/team:status\`, fix what is real, ignore what is not. An ALLOW verdict resets the counter.`;
19049
19091
  }
19050
19092
  function _kill_switch_active() {
19051
- const value = process.env[_KILL_SWITCH_ENV] ?? "";
19052
- return !(value === "" || value === "0" || value === "false" || value === "False");
19093
+ return isEnvKillSwitchActive(_KILL_SWITCH_ENV);
19053
19094
  }
19054
19095
  function _iso_seconds_z(d) {
19055
19096
  const pad = (n, w = 2) => String(n).padStart(w, "0");
@@ -19930,6 +19971,28 @@ function fingerprint2(defect_class, evidence) {
19930
19971
  const shape = evidence.toLowerCase().replace(/\d+/g, "#").replace(/[`"'‚'„"»«]/g, "").replace(/[^a-zà-ÿ#\s]/g, " ").replace(/\s+/g, " ").trim();
19931
19972
  return createHash4("sha256").update(`${defect_class}|${shape}`).digest("hex").slice(0, 16);
19932
19973
  }
19974
+ var NEW_RECORDS_PER_SOURCE_PER_WINDOW = 20;
19975
+ var CREATION_WINDOW_MS = 24 * 60 * 60 * 1e3;
19976
+ function recentCreations(existing, source, now) {
19977
+ const end = Date.parse(now);
19978
+ if (Number.isNaN(end)) {
19979
+ return 0;
19980
+ }
19981
+ return existing.filter((r) => {
19982
+ if (r.source !== source) {
19983
+ return false;
19984
+ }
19985
+ const t = Date.parse(r.first_seen);
19986
+ return Number.isNaN(t) || end - t < CREATION_WINDOW_MS && end - t >= 0;
19987
+ }).length;
19988
+ }
19989
+ function creationCapReached(existing, finding, now) {
19990
+ const fp = fingerprint2(finding.defect_class, finding.evidence);
19991
+ if (existing.some((r) => r.fingerprint === fp)) {
19992
+ return false;
19993
+ }
19994
+ return recentCreations(existing, finding.source, now) >= NEW_RECORDS_PER_SOURCE_PER_WINDOW;
19995
+ }
19933
19996
  function mergeRecord(existing, finding, now) {
19934
19997
  const fp = fingerprint2(finding.defect_class, finding.evidence);
19935
19998
  if (existing !== null && existing.fingerprint === fp) {
@@ -19995,7 +20058,7 @@ function listRecords(root) {
19995
20058
  }
19996
20059
  const out = [];
19997
20060
  for (const n of names.sort()) {
19998
- if (!n.endsWith(".json")) {
20061
+ if (!n.endsWith(".json") || n === OVERFLOW_FILE) {
19999
20062
  continue;
20000
20063
  }
20001
20064
  const rec = readRecord(root, n.slice(0, -".json".length));
@@ -20009,9 +20072,35 @@ function listRecords(root) {
20009
20072
  function openRecords(root) {
20010
20073
  return listRecords(root).filter((r) => r.status === "open");
20011
20074
  }
20075
+ var OVERFLOW_FILE = "_overflow.json";
20076
+ function overflowPath(root) {
20077
+ return path38.join(storeDir(root), OVERFLOW_FILE);
20078
+ }
20079
+ function readOverflow(root) {
20080
+ try {
20081
+ const parsed = JSON.parse(fs37.readFileSync(overflowPath(root), "utf-8"));
20082
+ return typeof parsed === "object" && parsed !== null ? parsed : {};
20083
+ } catch {
20084
+ return {};
20085
+ }
20086
+ }
20087
+ function bumpOverflow(root, source, now) {
20088
+ const counts = readOverflow(root);
20089
+ const prev = counts[source]?.dropped ?? 0;
20090
+ counts[source] = { dropped: prev + 1, last_seen: now };
20091
+ const dir = storeDir(root);
20092
+ fs37.mkdirSync(dir, { recursive: true });
20093
+ fs37.writeFileSync(overflowPath(root), `${JSON.stringify(counts, null, 2)}
20094
+ `, "utf-8");
20095
+ }
20012
20096
  function upsertFinding(root, finding, now) {
20013
20097
  const fp = fingerprint2(finding.defect_class, finding.evidence);
20014
- const merged = mergeRecord(readRecord(root, fp), finding, now);
20098
+ const existing = readRecord(root, fp);
20099
+ if (existing === null && creationCapReached(listRecords(root), finding, now)) {
20100
+ bumpOverflow(root, finding.source, now);
20101
+ return null;
20102
+ }
20103
+ const merged = mergeRecord(existing, finding, now);
20015
20104
  writeRecord(root, merged);
20016
20105
  return merged;
20017
20106
  }
@@ -23815,6 +23904,11 @@ function envelopeOutcome(d) {
23815
23904
  function isInt(n) {
23816
23905
  return typeof n === "number" && Number.isFinite(n) && Number.isInteger(n);
23817
23906
  }
23907
+ function modelDivergent(requested, served) {
23908
+ if (typeof requested !== "string" || typeof served !== "string") return null;
23909
+ if (!requested || !served) return null;
23910
+ return requested !== served;
23911
+ }
23818
23912
  function buildOrchestrationLine(input) {
23819
23913
  const errors = [];
23820
23914
  const zeroSpawnRoute = (input.route_taken === "primitive" || input.route_taken === "ask") && input.spawn_count === 0;
@@ -23904,6 +23998,12 @@ function buildOrchestrationLine(input) {
23904
23998
  if (input.trigger_arm_earlier != null && !TRIGGER_ARMS.includes(input.trigger_arm_earlier)) {
23905
23999
  errors.push(`trigger_arm_earlier must be one of ${TRIGGER_ARMS.join(" | ")} (or omitted / null when neither arm fired)`);
23906
24000
  }
24001
+ for (const [key, v] of [
24002
+ ["model_requested", input.model_requested],
24003
+ ["model_served", input.model_served]
24004
+ ]) {
24005
+ if (v != null && typeof v !== "string") errors.push(`${key} must be a string or omitted`);
24006
+ }
23907
24007
  if (!input.ts) errors.push("ts (ISO-8601 UTC) is required");
23908
24008
  if (!input.id) errors.push("id (ULID or content hash) is required");
23909
24009
  if (errors.length) return { line: null, errors };
@@ -23922,6 +24022,13 @@ function buildOrchestrationLine(input) {
23922
24022
  tier_source: input.tier_source ?? null,
23923
24023
  dispatch_tokens: input.dispatch_tokens ?? null,
23924
24024
  session_tier: input.session_tier ?? null,
24025
+ // Served-model attribution. `model_divergent` is DERIVED, never
24026
+ // supplied: `null` when either id is absent — a transport that reports
24027
+ // no served id cannot disagree with anything, and calling that `false`
24028
+ // would read as "checked, and they matched".
24029
+ model_requested: input.model_requested ?? null,
24030
+ model_served: input.model_served ?? null,
24031
+ model_divergent: modelDivergent(input.model_requested, input.model_served),
23925
24032
  first_pass_success: input.first_pass_success ?? null,
23926
24033
  escalated: input.escalated ?? null,
23927
24034
  agent_combo: input.agent_combo ?? [],
@@ -17965,7 +17965,7 @@ function ensure_vscode_bridge(project_root, package_type, force) {
17965
17965
  };
17966
17966
  const plugin_path = plugin_paths[package_type] ?? "./plugin/agent-config";
17967
17967
  const bridge = { "chat.pluginLocations": { [plugin_path]: true } };
17968
- merge_json_file(
17968
+ return merge_json_file(
17969
17969
  path16.join(project_root, ".vscode", "settings.json"),
17970
17970
  bridge,
17971
17971
  force,
@@ -18023,7 +18023,8 @@ function _remove_legacy_augment_trampolines() {
18023
18023
  fs18.unlinkSync(legacy);
18024
18024
  skip(`removed legacy ~/.augment/hooks/${name}`);
18025
18025
  }
18026
- } catch {
18026
+ } catch (err) {
18027
+ warn(`could not remove legacy ${legacy}: ${err instanceof Error ? err.message : String(err)}`);
18027
18028
  }
18028
18029
  }
18029
18030
  }
@@ -21072,8 +21073,10 @@ function _main_project_install(opts, project_root, parsed_tools, is_first_run) {
21072
21073
  const tools = parsed_tools;
21073
21074
  const merged_keys_by_tool = {};
21074
21075
  if (!opts.skip_bridges) {
21075
- ensure_vscode_bridge(project_root, package_type, opts.force);
21076
- merged_keys_by_tool["augment"] = ensure_augment_bridge(project_root, opts.force);
21076
+ merged_keys_by_tool["augment"] = [
21077
+ ...ensure_vscode_bridge(project_root, package_type, opts.force),
21078
+ ...ensure_augment_bridge(project_root, opts.force)
21079
+ ];
21077
21080
  if (_is_tool_enabled(tools, "claude-code")) {
21078
21081
  merged_keys_by_tool["claude-code"] = ensure_claude_bridge(project_root, opts.force);
21079
21082
  }
@@ -1,15 +1,15 @@
1
1
  {
2
2
  "discovery": {
3
3
  "artefact_count": 603,
4
- "scanner_version": "c24312e116f8"
4
+ "scanner_version": "1eaf68b6e9c9"
5
5
  },
6
- "generated_at": "2026-08-10",
6
+ "generated_at": "2026-08-11",
7
7
  "package": {
8
8
  "description": "Governed skills, rules and commands for AI coding tools (Claude Code, Cursor, Windsurf, Copilot) \u2014 every claim machine-checked, including \"zero runtime daemon\".",
9
9
  "homepage": "https://event4u-app.github.io/agent-config",
10
10
  "name": "@event4u/agent-config",
11
11
  "repository": "https://github.com/event4u-app/agent-config",
12
- "version": "9.32.0"
12
+ "version": "9.34.0"
13
13
  },
14
14
  "registries": [
15
15
  {
@@ -9,12 +9,12 @@
9
9
  "transport": {
10
10
  "type": "stdio"
11
11
  },
12
- "version": "9.32.0"
12
+ "version": "9.34.0"
13
13
  }
14
14
  ],
15
15
  "repository": {
16
16
  "source": "github",
17
17
  "url": "https://github.com/event4u-app/agent-config"
18
18
  },
19
- "version": "9.32.0"
19
+ "version": "9.34.0"
20
20
  }