@event4u/agent-config 9.7.0 → 9.8.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 (185) hide show
  1. package/.claude-plugin/marketplace.json +1 -1
  2. package/CHANGELOG.md +144 -0
  3. package/README.md +5 -5
  4. package/dist/agent-src/commands/commit/in-chunks.md +8 -0
  5. package/dist/agent-src/commands/commit.md +17 -0
  6. package/dist/agent-src/commands/pr/create.md +4 -0
  7. package/dist/agent-src/contexts/override-system.md +75 -5
  8. package/dist/agent-src/rules/context-hygiene.md +2 -0
  9. package/dist/agent-src/rules/doc-screenshot-hygiene.md +97 -0
  10. package/dist/agent-src/rules/domain-safety-pii.md +1 -0
  11. package/dist/agent-src/rules/external-code-graph-interop.md +13 -3
  12. package/dist/agent-src/rules/framework-neutrality-in-generic-skills.md +2 -0
  13. package/dist/agent-src/rules/git-history-discipline.md +2 -0
  14. package/dist/agent-src/rules/language-and-tone.md +2 -0
  15. package/dist/agent-src/rules/lethal-trifecta-guard.md +3 -0
  16. package/dist/agent-src/rules/media-governance-routing.md +2 -0
  17. package/dist/agent-src/rules/minimal-safe-diff.md +2 -0
  18. package/dist/agent-src/rules/no-roadmap-references.md +3 -0
  19. package/dist/agent-src/rules/non-destructive-by-default.md +20 -0
  20. package/dist/agent-src/rules/onboarding-gate.md +2 -0
  21. package/dist/agent-src/rules/output-discipline.md +2 -0
  22. package/dist/agent-src/rules/persona-governance.md +2 -0
  23. package/dist/agent-src/rules/preservation-guard.md +3 -0
  24. package/dist/agent-src/rules/roadmap-progress-sync.md +2 -0
  25. package/dist/agent-src/rules/secret-vcs-guard.md +106 -0
  26. package/dist/agent-src/rules/security-sensitive-stop.md +1 -1
  27. package/dist/agent-src/rules/skill-quality.md +2 -0
  28. package/dist/agent-src/rules/source-confidentiality.md +2 -0
  29. package/dist/agent-src/rules/source-of-truth.md +2 -0
  30. package/dist/agent-src/rules/telegraph-speak.md +2 -0
  31. package/dist/agent-src/rules/token-optimizer-maintenance.md +2 -0
  32. package/dist/agent-src/rules/tool-safety.md +1 -0
  33. package/dist/agent-src/rules/verify-before-complete.md +2 -0
  34. package/dist/agent-src/skills/adr-create/SKILL.md +17 -1
  35. package/dist/agent-src/skills/code-intelligence/SKILL.md +94 -0
  36. package/dist/agent-src/skills/gated-reach/SKILL.md +185 -0
  37. package/dist/agent-src/skills/gated-reach/evals/triggers.json +72 -0
  38. package/dist/agent-src/skills/image-analyser/SKILL.md +14 -12
  39. package/dist/agent-src/skills/image-editing/SKILL.md +1 -0
  40. package/dist/agent-src/skills/readme-writing/SKILL.md +6 -1
  41. package/dist/agent-src/skills/screenshot-hygiene/SKILL.md +171 -0
  42. package/dist/agent-src/skills/secrets-management/SKILL.md +44 -1
  43. package/dist/agent-src/skills/subagent-orchestration/prompts/adversarial-verification-council.md +29 -0
  44. package/dist/agent-src/skills/subagent-orchestration/prompts/do-and-judge-two-stage.md +29 -0
  45. package/dist/agent-src/skills/subagent-orchestration/prompts/do-and-judge.md +29 -0
  46. package/dist/agent-src/skills/subagent-orchestration/prompts/do-competitively.md +29 -0
  47. package/dist/agent-src/skills/subagent-orchestration/prompts/do-in-parallel.md +29 -0
  48. package/dist/agent-src/skills/subagent-orchestration/prompts/do-in-steps.md +29 -0
  49. package/dist/agent-src/skills/subagent-orchestration/prompts/do-in-worktrees.md +29 -0
  50. package/dist/agent-src/skills/subagent-orchestration/prompts/judge-with-debate.md +29 -0
  51. package/dist/agent-src/skills/verify-repair-loop/SKILL.md +4 -0
  52. package/dist/agent-src/templates/agents/agent-project-settings.example.yml +1 -1
  53. package/dist/agent-src/templates/github-workflows/secret-scan.yml +65 -0
  54. package/dist/cli/configRoot.js +112 -0
  55. package/dist/cli/configRoot.js.map +1 -0
  56. package/dist/cli/configRoot.test.js +97 -0
  57. package/dist/cli/configRoot.test.js.map +1 -0
  58. package/dist/cli/help.js +4 -1
  59. package/dist/cli/help.js.map +1 -1
  60. package/dist/cli/main.js +19 -2
  61. package/dist/cli/main.js.map +1 -1
  62. package/dist/cli/registry.js +1 -0
  63. package/dist/cli/registry.js.map +1 -1
  64. package/dist/discovery/deprecation-report.md +1 -1
  65. package/dist/discovery/discovery-manifest.json +161 -44
  66. package/dist/discovery/discovery-manifest.json.sha256 +1 -1
  67. package/dist/discovery/discovery-manifest.summary.md +4 -4
  68. package/dist/discovery/orphan-report.md +1 -1
  69. package/dist/discovery/packs.json +13 -8
  70. package/dist/discovery/trust-report.md +11 -11
  71. package/dist/discovery/workspaces.json +11 -6
  72. package/dist/install/install.mjs +16 -0
  73. package/dist/mcp/registry-manifest.json +3 -3
  74. package/dist/router.json +1 -1
  75. package/dist/server/app.js +10 -0
  76. package/dist/server/app.js.map +1 -1
  77. package/dist/server/routes/ping.js +18 -0
  78. package/dist/server/routes/ping.js.map +1 -1
  79. package/dist/server/schemas/settings.js +8 -0
  80. package/dist/server/schemas/settings.js.map +1 -1
  81. package/dist/server/serverInfo.js +6 -2
  82. package/dist/server/serverInfo.js.map +1 -1
  83. package/dist/server/token.js +11 -4
  84. package/dist/server/token.js.map +1 -1
  85. package/dist/server/writeRoot.js +15 -1
  86. package/dist/server/writeRoot.js.map +1 -1
  87. package/dist/shared/capabilities.js +33 -0
  88. package/dist/shared/capabilities.js.map +1 -0
  89. package/dist/shared/capabilities.test.js +39 -0
  90. package/dist/shared/capabilities.test.js.map +1 -0
  91. package/dist/ui/assets/{index-BiEZiZ31.js → index-CrmZ34Rg.js} +16 -16
  92. package/dist/ui/assets/index-CrmZ34Rg.js.map +1 -0
  93. package/dist/ui/index.html +14 -5
  94. package/docs/CLAIMS.md +62 -37
  95. package/docs/architecture.md +2 -2
  96. package/docs/benchmark.md +137 -0
  97. package/docs/catalog.md +8 -3
  98. package/docs/comparison.yaml +44 -2
  99. package/docs/contracts/local-server-ports.md +53 -0
  100. package/docs/contracts/no-runtime-boundary.md +1 -1
  101. package/docs/contracts/subagent-boundary.md +15 -0
  102. package/docs/customization.md +14 -3
  103. package/docs/decisions/ADR-016-installer-architecture.md +2 -0
  104. package/docs/decisions/ADR-088-no-external-runtime-federation.md +1 -1
  105. package/docs/decisions/ADR-094-agent-memory-layer-removal.md +1 -1
  106. package/docs/decisions/ADR-109-subagent-v1-contract.md +2 -0
  107. package/docs/decisions/ADR-110-discipline-profile-resolution-locus.md +2 -0
  108. package/docs/decisions/ADR-113-ci-native-release-label-trigger.md +11 -3
  109. package/docs/decisions/ADR-124-embedded-engine-doctrine.md +255 -0
  110. package/docs/decisions/ADR-125-doc-screenshot-anonymization.md +131 -0
  111. package/docs/decisions/ADR-126-internet-reach-operator-tooling.md +254 -0
  112. package/docs/decisions/ADR-127-enforcement-claims-must-resolve.md +150 -0
  113. package/docs/decisions/ADR-128-executable-evidence-and-measured-escalation.md +201 -0
  114. package/docs/decisions/INDEX.md +21 -0
  115. package/docs/decisions/engine-reclassification-2026-07.md +104 -0
  116. package/docs/distribution/awesome-list-submission.md +1 -1
  117. package/docs/distribution/registries.md +36 -27
  118. package/docs/enforcement-by-host.md +7 -0
  119. package/docs/featured-skills.md +2 -2
  120. package/docs/getting-started-by-role.md +1 -1
  121. package/docs/getting-started.md +1 -1
  122. package/docs/governance-advantage.md +1 -1
  123. package/docs/guides/gated-platform-reads.md +221 -0
  124. package/docs/positioning-evidence.md +1 -1
  125. package/docs/proof.md +92 -16
  126. package/docs/threat-model.md +1 -0
  127. package/package.json +5 -2
  128. package/src/config/agent-settings.template.yml +43 -0
  129. package/src/config/reach-channels.yml +217 -0
  130. package/src/config/reach-prescriptions-intake.yml +200 -0
  131. package/src/scripts/_dispatch.bash +15 -0
  132. package/src/scripts/_lib/exec_evidence.ts +251 -0
  133. package/src/scripts/_lib/fixtures/secret-detector/negatives.txt +10 -0
  134. package/src/scripts/_lib/fixtures/secret-detector/positives.txt +11 -0
  135. package/src/scripts/_lib/kernel_rules.ts +46 -0
  136. package/src/scripts/_lib/reddit_thread_parse.ts +598 -0
  137. package/src/scripts/_lib/risk_paths.ts +160 -0
  138. package/src/scripts/_lib/secret_detector.test.ts +103 -0
  139. package/src/scripts/_lib/secret_detector.ts +319 -0
  140. package/src/scripts/_lib/tool_probe.ts +359 -0
  141. package/src/scripts/adr/regenerate_index.ts +81 -6
  142. package/src/scripts/audit_adr_coverage.ts +33 -0
  143. package/src/scripts/build_proof.ts +162 -0
  144. package/src/scripts/check_adr_frontmatter.ts +195 -0
  145. package/src/scripts/check_artefact_count_messaging.ts +4 -0
  146. package/src/scripts/check_backstop_debt.ts +200 -0
  147. package/src/scripts/check_claims.ts +188 -8
  148. package/src/scripts/check_comparison.ts +12 -0
  149. package/src/scripts/check_enforcement_coverage.ts +592 -0
  150. package/src/scripts/check_kernel_rule_bundle.ts +16 -12
  151. package/src/scripts/check_reach_channels.ts +407 -0
  152. package/src/scripts/check_reach_staleness.ts +364 -0
  153. package/src/scripts/check_secret_leak.test.ts +47 -0
  154. package/src/scripts/check_secret_leak.ts +290 -0
  155. package/src/scripts/code_graph/build.ts +0 -0
  156. package/src/scripts/code_graph/cli.ts +207 -0
  157. package/src/scripts/code_graph/detect.ts +134 -0
  158. package/src/scripts/code_graph/extract.ts +386 -0
  159. package/src/scripts/code_graph/loader.ts +123 -0
  160. package/src/scripts/code_graph/query.ts +176 -0
  161. package/src/scripts/code_graph/sanitize.ts +30 -0
  162. package/src/scripts/code_graph/types.ts +83 -0
  163. package/src/scripts/code_graph/validate.ts +63 -0
  164. package/src/scripts/external_sources_denylist.json +3 -1
  165. package/src/scripts/generate_subagent_floor.ts +194 -0
  166. package/src/scripts/hook_manifest.yaml +13 -3
  167. package/src/scripts/hooks/code_graph_nudge_hook.ts +184 -0
  168. package/src/scripts/iron_law_sha.ts +3 -12
  169. package/src/scripts/lint_override_kernel_guard.ts +219 -0
  170. package/src/scripts/measure_rule_budget.ts +3 -12
  171. package/src/scripts/postinstall_gui.ts +129 -0
  172. package/src/scripts/reach_doctor.ts +1651 -0
  173. package/src/scripts/release.ts +24 -3
  174. package/src/scripts/risk_escalation_shadow.ts +160 -0
  175. package/src/scripts/schemas/agent-settings.schema.json +23 -0
  176. package/src/scripts/schemas/reach-channels.schema.json +134 -0
  177. package/src/scripts/schemas/reach-doctor-payload.schema.json +220 -0
  178. package/src/scripts/schemas/rule.schema.json +10 -0
  179. package/src/scripts/skill_linter.ts +55 -0
  180. package/src/scripts/validate_reach_prescriptions.ts +751 -0
  181. package/src/server/schemas/settings.ts +16 -0
  182. package/src/shared/capabilities.test.ts +43 -0
  183. package/src/shared/capabilities.ts +75 -0
  184. package/src/templates/minimal/agents-overrides-readme.md +20 -0
  185. package/dist/ui/assets/index-BiEZiZ31.js.map +0 -1
@@ -209,6 +209,17 @@ export const settingsSchema = z.object({
209
209
  'Consumed by the cross-source-consistency rule. When the agent works from multiple sources (ticket text, an attached image/mockup, the spec, the codebase) it checks them against each other and asks before proceeding on a discrepancy — instead of silently guessing. on (default) = surface every real cross-source contradiction / silent-scope-expansion as one question; auto = surface only high-confidence contradictions, state low-confidence as an assumption; off = no cross-source checking.',
210
210
  ),
211
211
  }).default({ cross_source: 'on' }),
212
+ screenshots: z.object({
213
+ identity_allowlist: z.array(z.string()).default([]).describe(
214
+ "Consumed by the doc-screenshot-hygiene rule and screenshot-hygiene skill. Public identity tokens SAFE to show unredacted in a documentation screenshot — the maintainer's own public handles plus well-known fake-data tokens. Not a general fake-data dictionary and not identity-resolution: everything not listed is treated as sensitive by default, and a public handle co-located with a real name does not whitelist the real name. Default [] = nothing auto-allowed.",
215
+ ),
216
+ forbid_terminal_capture: z.boolean().default(true).describe(
217
+ 'Consumed by the doc-screenshot-hygiene rule. true (default) = terminal/CLI/IDE screenshots are forbidden (highest leak vector: absolute local paths, env tokens); use text code blocks with text redaction instead. false = allowed, still subject to the data-bearing human gate.',
218
+ ),
219
+ data_bearing_gate: z.enum(['on', 'off']).default('on').describe(
220
+ 'Consumed by the doc-screenshot-hygiene rule. on (default) = a data-bearing screenshot embed is gated behind this-turn human confirmation; uncertain/unresolved regions redact-or-refuse, never ship-and-hope; illustrative/no-data screenshots may embed with a stated justification. off = no data-bearing gate (the anonymization taxonomy still applies).',
221
+ ),
222
+ }).default({ identity_allowlist: [], forbid_terminal_capture: true, data_bearing_gate: 'on' }),
212
223
  tokens: z.object({
213
224
  rich_skills: richSkillsMode.default('on').describe(
214
225
  'Whether skills marked token_budget_class: rich may load in full (exempt from telegraph-speak + thin-projector trimming), consumed by the token-budget-discipline rule. on = allowed (default); off = fall back to standard condensed behavior; ask = surface an estimated token delta (tokens, not dollars) and ask once per session before loading.',
@@ -439,6 +450,11 @@ export const settingsSchema = z.object({
439
450
  'PreToolUse anti-slop nudge (road-to-anti-slop-detector Phase 3). Default off. When on, runs the lint_design_slop registry against about-to-be-written UI content and WARNS (never blocks) on P0/P1 aesthetic tells (side-stripe, gradient-text, magic z-index, …). Flags are rebuttable via DESIGN.md / design-slop-disable. Anti-loop: a file::rule signature surfaced 3x goes silent. Host-limited convenience layer; the universal gate is the lint_design_slop linter/CI.',
440
451
  ),
441
452
  }).default({}),
453
+ code_graph: z.object({
454
+ enabled: z.boolean().default(false).describe(
455
+ 'PreToolUse code-graph nudge (ADR-124 Phase 4). Default off. When on AND a native code-graph cache or a consumer-shipped graph.json/SCIP index is present, warns once per session (never blocks) as the agent is about to Grep/Glob or Read a source file — query the graph first for who-calls/where-used/impact questions (or rebuild if stale, build if absent). Source G’s strict block-first-read mode is deliberately un-ported.',
456
+ ),
457
+ }).default({}),
442
458
  }),
443
459
  decision_engine: z.object({
444
460
  surface_traces: z.boolean().default(false).describe(
@@ -0,0 +1,43 @@
1
+ /**
2
+ * Unit tests for the host-facing capability advertisement.
3
+ *
4
+ * The `configRoot` and `embed` capabilities must appear in the
5
+ * `--version --json` readout (and, via the same module, `GET /api/v1/ping`)
6
+ * so a spawner can feature-detect support before relying on either.
7
+ */
8
+ import { describe, expect, it } from 'vitest';
9
+ import { CAPABILITIES, buildVersionReadout } from './capabilities.js';
10
+
11
+ describe('capabilities', () => {
12
+ it('advertises configRoot support', () => {
13
+ expect(CAPABILITIES.configRoot).toBe(true);
14
+ });
15
+
16
+ it('advertises the embed contract (reciprocal-ecosystem Phase 3)', () => {
17
+ expect(CAPABILITIES.embed).toEqual({
18
+ supported: true,
19
+ version: 1,
20
+ features: ['theme', 'deepLink'],
21
+ });
22
+ });
23
+
24
+ it('does NOT advertise the accent feature (v2, not v1)', () => {
25
+ expect(CAPABILITIES.embed.features).not.toContain('accent');
26
+ });
27
+
28
+ it('buildVersionReadout carries the version and the full capability block', () => {
29
+ const readout = buildVersionReadout('9.7.0');
30
+ expect(readout).toEqual({
31
+ version: '9.7.0',
32
+ capabilities: {
33
+ configRoot: true,
34
+ embed: { supported: true, version: 1, features: ['theme', 'deepLink'] },
35
+ },
36
+ });
37
+ });
38
+
39
+ it('buildVersionReadout copies capabilities (no shared mutable reference)', () => {
40
+ const readout = buildVersionReadout('1.2.3');
41
+ expect(readout.capabilities).not.toBe(CAPABILITIES);
42
+ });
43
+ });
@@ -0,0 +1,75 @@
1
+ /**
2
+ * Host-facing capability advertisement.
3
+ *
4
+ * A host that spawns `agent-config` (e.g. an orchestrator managing
5
+ * profile-scoped configuration) needs to detect, before it relies on a
6
+ * behaviour, whether the AC binary on `PATH` actually supports it. This
7
+ * module is the single source of truth for that advertisement; it is
8
+ * surfaced in two readouts a host can probe:
9
+ *
10
+ * - `agent-config --version --json` — the CLI capability readout.
11
+ * - `GET /api/v1/ping` — the local-server status readout.
12
+ *
13
+ * An older AC (predating a capability) omits the flag / the whole
14
+ * `capabilities` block, so a newer host reading `capabilities.<x> === true`
15
+ * degrades to a clear "not supported" instead of silently breaking.
16
+ *
17
+ * `src/shared/**` is consumed by both the Node server and the browser UI
18
+ * bundle, so this module stays pure — no Node built-ins, no I/O.
19
+ */
20
+
21
+ /**
22
+ * Named embed features this build actually ships (reciprocal-ecosystem
23
+ * embed contract). A host reads the list to feature-detect instead of
24
+ * version-guessing. Only shipped features appear — v1 ships `theme`
25
+ * (the `?theme=light|dark` boot query) and `deepLink` (`#/settings` /
26
+ * `#/settings/<section>` deep links under `?embed=1`). `accent` is a
27
+ * v2 feature and is deliberately absent.
28
+ */
29
+ export type EmbedFeature = 'theme' | 'deepLink';
30
+
31
+ export interface EmbedCapability {
32
+ /** `true` when this build honours the `?embed=1` embed contract. */
33
+ supported: boolean;
34
+ /** Embed-contract version this build implements. */
35
+ version: number;
36
+ /** The embed features actually shipped by this build. */
37
+ features: EmbedFeature[];
38
+ }
39
+
40
+ export interface Capabilities {
41
+ /**
42
+ * `true` when the binary accepts a host-supplied config root on spawn
43
+ * via the `--config-root <path>` flag or the `EVENT4U_CONFIG_HOME`
44
+ * environment variable — letting a host scope AC's config/settings/
45
+ * state to a per-profile directory instead of the shared default.
46
+ */
47
+ configRoot: boolean;
48
+ /**
49
+ * Host-embed contract advertisement — a host reads `embed.supported`
50
+ * + `embed.version` + `embed.features` to decide whether it can render
51
+ * AC's settings surface inside its own window (via `?embed=1`, a
52
+ * `?theme=` boot query, and settings deep links) before relying on it.
53
+ */
54
+ embed: EmbedCapability;
55
+ }
56
+
57
+ /** The capabilities this build advertises. */
58
+ export const CAPABILITIES: Capabilities = {
59
+ configRoot: true,
60
+ embed: { supported: true, version: 1, features: ['theme', 'deepLink'] },
61
+ };
62
+
63
+ export interface VersionReadout {
64
+ version: string;
65
+ capabilities: Capabilities;
66
+ }
67
+
68
+ /**
69
+ * Build the machine-readable `--version --json` payload. Pure — the
70
+ * caller supplies the version string it already resolved from
71
+ * `package.json`.
72
+ */
73
+ export function buildVersionReadout(version: string): VersionReadout {
74
+ return { version, capabilities: { ...CAPABILITIES } };
75
+ }
@@ -29,6 +29,26 @@ Drop a file under `agents/overrides/rules/foo.md` to override the global
29
29
  copy. The bridge anchor at `agents/.event4u-bridge.yml` tells the loader which
30
30
  `~/.event4u/agent-config/` install to pair with.
31
31
 
32
+ ## What you cannot override
33
+
34
+ The nine kernel rules — `agent-authority`, `ask-when-uncertain`, `commit-policy`,
35
+ `direct-answers`, `language-and-tone`, `no-cheap-questions`,
36
+ `non-destructive-by-default`, `scope-control`, `verify-before-complete` — and
37
+ anything marked `tier: safety-floor` are **not replaceable**. You may *tighten*
38
+ one with a `Mode: extend` override plus an entry in
39
+ `agents/overrides/kernel-exceptions.yml` recording why. A `Mode: replace` on one
40
+ is refused and reported.
41
+
42
+ Two consequences that are easy to miss:
43
+
44
+ - **"Wins on name match" is not unconditional.** An empty file at
45
+ `agents/overrides/rules/non-destructive-by-default.md` does not switch off the
46
+ Hard Floor — it is refused.
47
+ - **Whole-file replacement freezes that file.** Later fixes to the original,
48
+ including security fixes, stop reaching you for as long as your copy exists,
49
+ and nothing announces it. Prefer `extend`, which keeps the rest of the rule in
50
+ the update flow.
51
+
32
52
  ## Adding your first override
33
53
 
34
54
  ```bash