@event4u/agent-config 9.27.0 → 9.28.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 (138) hide show
  1. package/.claude-plugin/marketplace.json +1 -1
  2. package/AGENTS.md +12 -11
  3. package/CHANGELOG.md +99 -0
  4. package/README.md +1 -1
  5. package/dist/agent-src/commands/analyze/conformance.md +24 -0
  6. package/dist/agent-src/contexts/execution/orchestration-telemetry.md +10 -3
  7. package/dist/agent-src/rules/artifact-engagement-recording.md +4 -1
  8. package/dist/agent-src/rules/autonomous-execution.md +1 -1
  9. package/dist/agent-src/rules/brand-source-of-truth.md +33 -6
  10. package/dist/agent-src/rules/context-hygiene.md +3 -1
  11. package/dist/agent-src/rules/council-availability.md +93 -0
  12. package/dist/agent-src/rules/cross-source-consistency.md +3 -0
  13. package/dist/agent-src/rules/delegation-policy.md +29 -5
  14. package/dist/agent-src/rules/design-fidelity.md +3 -0
  15. package/dist/agent-src/rules/evaluator-independence.md +2 -1
  16. package/dist/agent-src/rules/external-code-graph-interop.md +2 -1
  17. package/dist/agent-src/rules/finance-safety-floor.md +1 -1
  18. package/dist/agent-src/rules/git-history-discipline.md +1 -1
  19. package/dist/agent-src/rules/history-discipline.md +3 -1
  20. package/dist/agent-src/rules/legal-safety-floor.md +1 -1
  21. package/dist/agent-src/rules/no-pr-progress-comments.md +3 -1
  22. package/dist/agent-src/rules/onboarding-gate.md +3 -1
  23. package/dist/agent-src/rules/roadmap-ci-steps-policy.md +4 -1
  24. package/dist/agent-src/rules/role-mode-adherence.md +1 -1
  25. package/dist/agent-src/rules/scale-discipline.md +3 -1
  26. package/dist/agent-src/rules/self-repair-loop.md +103 -0
  27. package/dist/agent-src/rules/session-canary.md +2 -1
  28. package/dist/agent-src/rules/strategy-safety-floor.md +1 -1
  29. package/dist/agent-src/rules/token-budget-discipline.md +3 -1
  30. package/dist/agent-src/rules/tool-safety.md +5 -1
  31. package/dist/agent-src/skills/adversarial-review/SKILL.md +1 -1
  32. package/dist/agent-src/skills/analysis-autonomous-mode/SKILL.md +1 -1
  33. package/dist/agent-src/skills/performance-analysis/SKILL.md +1 -1
  34. package/dist/agent-src/skills/persona-improvement/SKILL.md +1 -1
  35. package/dist/agent-src/skills/project-analyzer/SKILL.md +1 -1
  36. package/dist/agent-src/skills/security-audit/SKILL.md +1 -1
  37. package/dist/agent-src/skills/sequential-thinking/SKILL.md +1 -1
  38. package/dist/agent-src/skills/skill-improvement-pipeline/SKILL.md +1 -1
  39. package/dist/agent-src/skills/universal-project-analysis/SKILL.md +1 -1
  40. package/dist/agent-src/templates/AGENTS.md +6 -10
  41. package/dist/agent-src/templates/agents/agent-project-settings.example.yml +1 -1
  42. package/dist/cli/registry.js +7 -0
  43. package/dist/cli/registry.js.map +1 -1
  44. package/dist/cli-delegate/chunk-22GCIJ2O.js +270 -0
  45. package/dist/cli-delegate/{chunk-BCPIOAGV.js → chunk-2BE5I2MN.js} +8 -8
  46. package/dist/cli-delegate/{chunk-AIIUU73N.js → chunk-7OMQCH4V.js} +1 -1
  47. package/dist/cli-delegate/{chunk-HJ6DAJHR.js → chunk-GB2FSUEE.js} +57 -7
  48. package/dist/cli-delegate/{chunk-WR6GTRHJ.js → chunk-JXARCGVN.js} +3 -3
  49. package/dist/cli-delegate/{chunk-3KJIMFTB.js → chunk-PQSAQKHW.js} +466 -304
  50. package/dist/cli-delegate/chunk-REKCMYOU.js +2991 -0
  51. package/dist/cli-delegate/cmd_analyze_session.js +1 -1
  52. package/dist/cli-delegate/cmd_brand_status.js +134 -0
  53. package/dist/cli-delegate/cmd_conformance.js +7 -7
  54. package/dist/cli-delegate/cmd_converge.js +3 -3
  55. package/dist/cli-delegate/cmd_doctor.js +4 -4
  56. package/dist/cli-delegate/cmd_explain.js +80 -330
  57. package/dist/cli-delegate/cmd_export.js +5 -5
  58. package/dist/cli-delegate/cmd_fleet.js +3 -3
  59. package/dist/cli-delegate/cmd_handoff.js +2 -2
  60. package/dist/cli-delegate/cmd_mcp_available.js +433 -0
  61. package/dist/cli-delegate/cmd_migrate.js +3 -3
  62. package/dist/cli-delegate/cmd_packs_active.js +153 -0
  63. package/dist/cli-delegate/cmd_preflight.js +1 -1
  64. package/dist/cli-delegate/cmd_prune.js +5 -5
  65. package/dist/cli-delegate/cmd_route_audit.js +8 -8
  66. package/dist/cli-delegate/cmd_route_explain.js +4 -4
  67. package/dist/cli-delegate/cmd_settings_get.js +272 -0
  68. package/dist/cli-delegate/cmd_settings_migrate.js +5 -5
  69. package/dist/cli-delegate/cmd_settings_set.js +7 -2967
  70. package/dist/cli-delegate/cmd_sync.js +5 -5
  71. package/dist/cli-delegate/cmd_uninstall.js +5 -5
  72. package/dist/cli-delegate/cmd_update.js +4 -4
  73. package/dist/cli-delegate/cmd_upgrade.js +4 -4
  74. package/dist/cli-delegate/cmd_validate.js +5 -5
  75. package/dist/cli-delegate/cmd_versions.js +4 -4
  76. package/dist/discovery/deprecation-report.md +1 -1
  77. package/dist/discovery/discovery-manifest.json +100 -40
  78. package/dist/discovery/discovery-manifest.json.sha256 +1 -1
  79. package/dist/discovery/discovery-manifest.summary.md +3 -3
  80. package/dist/discovery/orphan-report.md +1 -1
  81. package/dist/discovery/packs.json +7 -5
  82. package/dist/discovery/trust-report.md +11 -11
  83. package/dist/discovery/workspaces.json +6 -4
  84. package/dist/hooks/dispatch.js +9004 -6132
  85. package/dist/install/install.mjs +697 -507
  86. package/dist/mcp/registry-manifest.json +3 -3
  87. package/dist/mcp/server.json +2 -2
  88. package/dist/mcp/server.mjs +127 -20
  89. package/dist/router.json +1 -1
  90. package/dist/scripts/_lib/agent_settings.js +80 -15
  91. package/dist/scripts/_lib/agent_settings.js.map +1 -1
  92. package/docs/contracts/settings-classes.md +29 -8
  93. package/docs/guidelines/agent-infra/memory-access.md +14 -3
  94. package/package.json +1 -1
  95. package/src/agent-src/templates/AGENTS.md +6 -10
  96. package/src/config/budgets.yml +29 -0
  97. package/src/config/evaluator-budgets.json +4 -4
  98. package/src/config/gate-coverage.yml +26 -0
  99. package/src/scripts/_cli/cmd_brand_status.ts +174 -0
  100. package/src/scripts/_cli/cmd_mcp_available.ts +266 -0
  101. package/src/scripts/_cli/cmd_packs_active.ts +225 -0
  102. package/src/scripts/_cli/cmd_settings_get.ts +324 -0
  103. package/src/scripts/_dispatch.bash +57 -0
  104. package/src/scripts/_lib/agent_settings.ts +82 -16
  105. package/src/scripts/_lib/carrier_divergence.ts +135 -0
  106. package/src/scripts/_lib/host_capability.ts +84 -1
  107. package/src/scripts/_lib/prompt_shape.ts +88 -0
  108. package/src/scripts/_lib/review_skipped_record.ts +102 -0
  109. package/src/scripts/_lib/rule_layer_overlap.ts +254 -0
  110. package/src/scripts/_lib/self_repair.ts +342 -0
  111. package/src/scripts/_lib/self_repair_store.ts +100 -0
  112. package/src/scripts/_lib/transcript_entry.ts +80 -0
  113. package/src/scripts/check_branch_freshness.ts +255 -0
  114. package/src/scripts/check_council_config_location.ts +125 -1
  115. package/src/scripts/check_standing_rule_delivery.ts +314 -0
  116. package/src/scripts/config/profiles.ts +13 -3
  117. package/src/scripts/conformance_scan.ts +272 -24
  118. package/src/scripts/council_availability_hook.ts +188 -0
  119. package/src/scripts/council_cli.ts +126 -7
  120. package/src/scripts/hook_manifest.yaml +107 -26
  121. package/src/scripts/hooks/block_no_verify.ts +39 -2
  122. package/src/scripts/hooks/block_unauthorized_git.ts +156 -7
  123. package/src/scripts/hooks/concern_registry.ts +10 -0
  124. package/src/scripts/hooks/delegation_nudge_hook.ts +450 -0
  125. package/src/scripts/hooks/end_review_nudge_hook.ts +726 -0
  126. package/src/scripts/hooks/orchestration_record_hook.ts +342 -0
  127. package/src/scripts/install.ts +151 -0
  128. package/src/scripts/language_mirror_hook.ts +30 -37
  129. package/src/scripts/measure_scope_dedup.ts +19 -13
  130. package/src/scripts/onboarding_gate_hook.ts +40 -1
  131. package/src/scripts/orchestration_record.ts +4 -1
  132. package/src/scripts/preamble_byte_census.ts +9 -20
  133. package/src/scripts/report_carrier_divergence.ts +364 -0
  134. package/src/scripts/report_skill_activation.ts +257 -0
  135. package/src/scripts/report_skill_obligation_violations.ts +579 -0
  136. package/src/scripts/routing_doctor.ts +77 -6
  137. package/src/scripts/self_repair_cli.ts +240 -0
  138. package/src/scripts/self_repair_hook.ts +241 -0
@@ -7,7 +7,7 @@ import {
7
7
  import {
8
8
  ProjectRootError,
9
9
  resolve_project_root
10
- } from "./chunk-HJ6DAJHR.js";
10
+ } from "./chunk-GB2FSUEE.js";
11
11
  import "./chunk-NDJLNC6Q.js";
12
12
  import "./chunk-J55WI3RR.js";
13
13
 
@@ -0,0 +1,134 @@
1
+ import { createRequire as __acCreateRequire } from 'node:module'; const require = globalThis.require ?? __acCreateRequire(import.meta.url);
2
+ import {
3
+ resolve_project_root
4
+ } from "./chunk-GB2FSUEE.js";
5
+ import "./chunk-NDJLNC6Q.js";
6
+ import "./chunk-J55WI3RR.js";
7
+
8
+ // src/scripts/_cli/cmd_brand_status.ts
9
+ import * as fs from "node:fs";
10
+ import * as path from "node:path";
11
+ import process2 from "node:process";
12
+ import { fileURLToPath, pathToFileURL } from "node:url";
13
+
14
+ // src/agent-src/templates/scripts/work_engine/directives/ui/scaffold.ts
15
+ var BRAND_TOKEN_PATHS = [
16
+ "tokens.json",
17
+ "assets/tokens.json",
18
+ "resources/tokens.json",
19
+ "agents/settings/brand/tokens.json"
20
+ ];
21
+
22
+ // src/scripts/_cli/cmd_brand_status.ts
23
+ function findBrandTokens(root) {
24
+ for (const rel of BRAND_TOKEN_PATHS) {
25
+ try {
26
+ if (fs.statSync(path.join(root, rel)).isFile()) return rel;
27
+ } catch {
28
+ continue;
29
+ }
30
+ }
31
+ return null;
32
+ }
33
+ function findDottedNearMisses(root) {
34
+ const found = [];
35
+ for (const rel of BRAND_TOKEN_PATHS) {
36
+ const dotted = path.join(path.dirname(rel), `.${path.basename(rel)}`);
37
+ const normalised = dotted.startsWith("./") ? dotted.slice(2) : dotted;
38
+ try {
39
+ if (fs.statSync(path.join(root, normalised)).isFile()) found.push(normalised);
40
+ } catch {
41
+ continue;
42
+ }
43
+ }
44
+ return found;
45
+ }
46
+ function runBrandStatus(opts) {
47
+ const out = [];
48
+ const [projectRoot] = resolve_project_root(null, { cwd: opts.cwd });
49
+ const found = findBrandTokens(projectRoot);
50
+ const nearMisses = findDottedNearMisses(projectRoot);
51
+ if (opts.json) {
52
+ out.push(
53
+ JSON.stringify(
54
+ {
55
+ brand_layer_present: found !== null,
56
+ tokens_file: found,
57
+ searched: [...BRAND_TOKEN_PATHS],
58
+ dotted_near_misses: nearMisses,
59
+ project_root: projectRoot
60
+ },
61
+ null,
62
+ 2
63
+ )
64
+ );
65
+ return { code: 0, out, err: [] };
66
+ }
67
+ if (found !== null) {
68
+ out.push(`brand layer present \u2014 ${found}`);
69
+ out.push(" brand-source-of-truth applies: these tokens outrank the corpus.");
70
+ } else {
71
+ out.push("brand layer none");
72
+ out.push(` searched ${BRAND_TOKEN_PATHS.join(", ")}`);
73
+ out.push(" meaning no consumer brand to be authoritative. The corpus is the only");
74
+ out.push(" ground, and every emitted value is corpus-sourced \u2014 which is the");
75
+ out.push(" greenfield branch of brand-source-of-truth, not a misconfiguration.");
76
+ }
77
+ if (nearMisses.length > 0) {
78
+ out.push(
79
+ "",
80
+ "\u26A0\uFE0F A dot-prefixed tokens file exists and is NOT read by anything:",
81
+ ...nearMisses.map((m) => ` ${m}`),
82
+ " The resolver searches `tokens.json`, never `.tokens.json`. Rename it to one",
83
+ " of the searched paths above, or it stays invisible while looking authored."
84
+ );
85
+ }
86
+ return { code: 0, out, err: [] };
87
+ }
88
+ function parseArgv(argv) {
89
+ let json = false;
90
+ for (const a of argv) {
91
+ if (a === "--json") {
92
+ json = true;
93
+ } else if (a === "-h" || a === "--help") {
94
+ return { ok: false, message: "usage: agent-config brand:status [--json]" };
95
+ } else {
96
+ return { ok: false, message: `unknown argument: ${a}` };
97
+ }
98
+ }
99
+ return { ok: true, json };
100
+ }
101
+ function main(argv = process2.argv.slice(2)) {
102
+ const parsed = parseArgv(argv);
103
+ if (!parsed.ok) {
104
+ process2.stderr.write(`${parsed.message ?? "usage error"}
105
+ `);
106
+ return 2;
107
+ }
108
+ const result = runBrandStatus({ cwd: process2.cwd(), json: parsed.json === true });
109
+ for (const line of result.out) process2.stdout.write(`${line}
110
+ `);
111
+ for (const line of result.err) process2.stderr.write(`${line}
112
+ `);
113
+ return result.code;
114
+ }
115
+ function _isCliEntry() {
116
+ if (process2.argv[1] === void 0) return false;
117
+ const argvUrl = pathToFileURL(path.resolve(process2.argv[1])).href;
118
+ if (import.meta.url === argvUrl) return true;
119
+ try {
120
+ return fs.realpathSync(fileURLToPath(import.meta.url)) === fs.realpathSync(path.resolve(process2.argv[1]));
121
+ } catch {
122
+ return false;
123
+ }
124
+ }
125
+ if (_isCliEntry()) {
126
+ process2.exitCode = main();
127
+ }
128
+ export {
129
+ findBrandTokens,
130
+ findDottedNearMisses,
131
+ main,
132
+ parseArgv,
133
+ runBrandStatus
134
+ };
@@ -11,8 +11,9 @@ import {
11
11
  _run_checks,
12
12
  _run_checks_no_manifest,
13
13
  _scan_foreign
14
- } from "./chunk-BCPIOAGV.js";
14
+ } from "./chunk-2BE5I2MN.js";
15
15
  import "./chunk-FTAISGDQ.js";
16
+ import "./chunk-VSYT7OHO.js";
16
17
  import "./chunk-736JCWLM.js";
17
18
  import {
18
19
  atomicAppendLine,
@@ -21,18 +22,17 @@ import {
21
22
  } from "./chunk-63WSP6YZ.js";
22
23
  import "./chunk-GRRPEPRN.js";
23
24
  import "./chunk-NXFWFAYV.js";
25
+ import "./chunk-GB2FSUEE.js";
26
+ import "./chunk-NDJLNC6Q.js";
24
27
  import {
25
28
  detectToolPresence
26
29
  } from "./chunk-OMIVVCG2.js";
27
- import {
28
- resolvePackageRoot
29
- } from "./chunk-MCJYCQPF.js";
30
- import "./chunk-VSYT7OHO.js";
31
- import "./chunk-HJ6DAJHR.js";
32
- import "./chunk-NDJLNC6Q.js";
33
30
  import {
34
31
  require_dist
35
32
  } from "./chunk-OY53J6II.js";
33
+ import {
34
+ resolvePackageRoot
35
+ } from "./chunk-MCJYCQPF.js";
36
36
  import {
37
37
  __toESM
38
38
  } from "./chunk-J55WI3RR.js";
@@ -1,14 +1,14 @@
1
1
  #!/usr/bin/env tsx
2
2
  import { createRequire as __acCreateRequire } from 'node:module'; const require = globalThis.require ?? __acCreateRequire(import.meta.url);
3
- import {
4
- resolvePackageRoot
5
- } from "./chunk-MCJYCQPF.js";
6
3
  import {
7
4
  write_target
8
5
  } from "./chunk-NDJLNC6Q.js";
9
6
  import {
10
7
  require_dist
11
8
  } from "./chunk-OY53J6II.js";
9
+ import {
10
+ resolvePackageRoot
11
+ } from "./chunk-MCJYCQPF.js";
12
12
  import {
13
13
  __toESM
14
14
  } from "./chunk-J55WI3RR.js";
@@ -64,17 +64,17 @@ import {
64
64
  _skipped_manifest_check,
65
65
  _wizard_state_path,
66
66
  main
67
- } from "./chunk-BCPIOAGV.js";
67
+ } from "./chunk-2BE5I2MN.js";
68
68
  import "./chunk-FTAISGDQ.js";
69
+ import "./chunk-VSYT7OHO.js";
69
70
  import "./chunk-736JCWLM.js";
70
71
  import "./chunk-63WSP6YZ.js";
71
72
  import "./chunk-GRRPEPRN.js";
72
73
  import "./chunk-NXFWFAYV.js";
73
- import "./chunk-MCJYCQPF.js";
74
- import "./chunk-VSYT7OHO.js";
75
- import "./chunk-HJ6DAJHR.js";
74
+ import "./chunk-GB2FSUEE.js";
76
75
  import "./chunk-NDJLNC6Q.js";
77
76
  import "./chunk-OY53J6II.js";
77
+ import "./chunk-MCJYCQPF.js";
78
78
  import "./chunk-J55WI3RR.js";
79
79
  export {
80
80
  ArgparseExit,