@event4u/agent-config 3.1.1 → 3.3.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 (96) hide show
  1. package/.agent-src/commands/agent-status.md +1 -1
  2. package/.agent-src/commands/analytics/prune.md +78 -0
  3. package/.agent-src/commands/analytics/show.md +107 -0
  4. package/.agent-src/commands/analytics.md +64 -0
  5. package/.agent-src/commands/knowledge/forget.md +104 -0
  6. package/.agent-src/commands/knowledge/ingest.md +122 -0
  7. package/.agent-src/commands/knowledge/list.md +102 -0
  8. package/.agent-src/commands/knowledge.md +75 -0
  9. package/.agent-src/scripts/update_roadmap_progress.py +1 -1
  10. package/.agent-src/skills/compress-memory/SKILL.md +1 -1
  11. package/.agent-src/templates/agents/agent-project-settings.example.yml +1 -1
  12. package/.claude-plugin/marketplace.json +8 -1
  13. package/AGENTS.md +5 -4
  14. package/CHANGELOG.md +54 -222
  15. package/README.md +12 -2
  16. package/dist/discovery/deprecation-report.md +1 -1
  17. package/dist/discovery/discovery-manifest.json +164 -10
  18. package/dist/discovery/discovery-manifest.json.sha256 +1 -1
  19. package/dist/discovery/discovery-manifest.summary.md +3 -3
  20. package/dist/discovery/orphan-report.md +1 -1
  21. package/dist/discovery/packs.json +12 -5
  22. package/dist/discovery/trust-report.md +2 -2
  23. package/dist/discovery/workspaces.json +11 -4
  24. package/dist/mcp/mcp-cloudflare-catalogue.json +2 -0
  25. package/dist/mcp/registry-manifest.json +5 -3
  26. package/docs/architecture.md +1 -1
  27. package/docs/archive/CHANGELOG-pre-3.2.0.md +268 -0
  28. package/docs/benchmarks.md +4 -4
  29. package/docs/catalog.md +9 -2
  30. package/docs/contracts/CHANGELOG-conventions.md +20 -1
  31. package/docs/contracts/adr-mcp-runtime.md +1 -1
  32. package/docs/contracts/at-rest-encryption.md +146 -0
  33. package/docs/contracts/benchmark-corpus-spec.md +3 -3
  34. package/docs/contracts/benchmark-report-schema.md +5 -5
  35. package/docs/contracts/caveman-telemetry.md +4 -4
  36. package/docs/contracts/compression-default-kill-criterion.md +5 -5
  37. package/docs/contracts/cost-enforcement.md +1 -1
  38. package/docs/contracts/daily-workspace.md +137 -0
  39. package/docs/contracts/explain-modes.md +146 -0
  40. package/docs/contracts/host-agent-protocol.md +88 -0
  41. package/docs/contracts/local-analytics.md +148 -0
  42. package/docs/contracts/local-knowledge-ingestion.md +96 -0
  43. package/docs/contracts/mcp-beta-criteria.md +1 -1
  44. package/docs/contracts/mcp-cloud-scope.md +4 -4
  45. package/docs/contracts/mcp-registry-manifest.schema.json +1 -1
  46. package/docs/contracts/mcp-tool-inventory.md +1 -1
  47. package/docs/contracts/mcp-tool-stub-envelope.md +1 -1
  48. package/docs/contracts/measurement-baseline.md +6 -6
  49. package/docs/contracts/role-experience.md +121 -0
  50. package/docs/contracts/workspace-documents.md +140 -0
  51. package/docs/decisions/ADR-022-daily-workspace-decomposition.md +140 -0
  52. package/docs/decisions/ADR-023-host-agent-protocol.md +129 -0
  53. package/docs/decisions/ADR-024-workspace-v0-feature-floor.md +126 -0
  54. package/docs/decisions/ADR-025-workspace-chrome.md +119 -0
  55. package/docs/decisions/ADR-026-explain-mode-translation.md +117 -0
  56. package/docs/decisions/ADR-027-changelog-machine-vs-manual.md +129 -0
  57. package/docs/decisions/ADR-028-root-layout.md +147 -0
  58. package/docs/decisions/ADR-029-multi-workspace-deferred.md +122 -0
  59. package/docs/decisions/INDEX.md +8 -0
  60. package/docs/deploy/small-team-recipe.md +148 -0
  61. package/docs/deploy/team-deployment-posture.md +91 -0
  62. package/docs/getting-started-by-role.md +27 -0
  63. package/docs/getting-started.md +1 -1
  64. package/docs/guides/local-analytics.md +125 -0
  65. package/docs/guides/local-knowledge.md +127 -0
  66. package/docs/mcp-server.md +1 -1
  67. package/docs/parity/bench-ruflo.json +3 -3
  68. package/docs/parity/ruflo.md +1 -1
  69. package/docs/setup/mcp-client-config.md +1 -1
  70. package/docs/setup/mcp-cloud-endpoints.md +1 -1
  71. package/docs/setup/mcp-cloud-setup.md +2 -2
  72. package/docs/setup/mcp-r2-bootstrap.md +1 -1
  73. package/package.json +4 -2
  74. package/scripts/__pycache__/validate_frontmatter.cpython-312.pyc +0 -0
  75. package/scripts/_lib/__pycache__/__init__.cpython-312.pyc +0 -0
  76. package/scripts/_lib/__pycache__/agent_src.cpython-312.pyc +0 -0
  77. package/scripts/_lib/bench_caveman.py +2 -2
  78. package/scripts/_lib/bench_caveman_report.py +1 -1
  79. package/scripts/_lib/bench_cost.py +2 -2
  80. package/scripts/_lib/bench_report.py +2 -2
  81. package/scripts/_lib/changelog_eras.py +330 -0
  82. package/scripts/audit_mcp_tools.py +1 -1
  83. package/scripts/bench_baseline_ready.py +3 -3
  84. package/scripts/bench_compress_memory.py +4 -4
  85. package/scripts/bench_drift_check.py +2 -2
  86. package/scripts/bench_per_tool.py +2 -2
  87. package/scripts/bench_run.py +4 -4
  88. package/scripts/build_mcp_registry_manifest.py +2 -2
  89. package/scripts/mcp_server/__init__.py +1 -1
  90. package/scripts/mcp_server/catalog.py +1 -1
  91. package/scripts/mcp_server/consumer_tool_catalog.json +1 -1
  92. package/scripts/mcp_server/tools.py +1 -1
  93. package/scripts/memory_lookup.py +78 -1
  94. package/scripts/pack_mcp_content.py +6 -6
  95. package/scripts/release.py +93 -3
  96. package/scripts/skill_trigger_eval.py +2 -2
@@ -0,0 +1,129 @@
1
+ ---
2
+ adr: 023
3
+ status: accepted
4
+ date: 2026-05-24
5
+ decision: host-agent-protocol
6
+ supersedes: —
7
+ superseded_by: —
8
+ phase: v3.x · employee-product-and-external-proof Phase 4
9
+ type: forward-looking
10
+ ---
11
+
12
+ # ADR-023 — Host-agent protocol — CLI shell-out, three-tier fallback
13
+
14
+ ## Status
15
+
16
+ **Accepted** · 2026-05-24. First of three sub-ADRs created by
17
+ [`ADR-022`](ADR-022-daily-workspace-decomposition.md). Locks the
18
+ protocol boundary between the daily workspace and the host agents
19
+ (Claude Code, Codex, Gemini, Augment, Cursor, Cline, Windsurf,
20
+ others). ADR-024 and ADR-025 follow this decision.
21
+
22
+ Companion artefacts:
23
+
24
+ - Contract: [`docs/contracts/host-agent-protocol.md`](../contracts/host-agent-protocol.md)
25
+ - Council question: [`agents/decisions/open-questions/daily-workspace-shape.md`](../../agents/decisions/open-questions/daily-workspace-shape.md)
26
+ - Predecessor ADR: [`ADR-022`](ADR-022-daily-workspace-decomposition.md)
27
+
28
+ ## Context
29
+
30
+ The council critique on the original Phase 4 chrome question
31
+ identified the host-agent protocol as the blocking unknown. The
32
+ workspace must (a) launch a conversation in the host with a
33
+ pre-filled prompt and (optionally) a pre-selected skill, and (b)
34
+ read structured tool / model output back without parsing the host's
35
+ UI. Either capability missing forces the workspace into "render a
36
+ banner and ask the user to paste" territory.
37
+
38
+ The inventory in `host-agent-protocol.md` enumerates what each
39
+ named host agent exposes today. The convergent finding:
40
+
41
+ - **Claude Code, Codex, Gemini** — first-party CLIs with documented
42
+ stdin / stdout JSON envelopes. Both surfaces present, with caveats.
43
+ - **Augment, Cursor, Cline, Windsurf** — IDE / extension hosts. Hook
44
+ trampolines exist for post-event observation but neither surface
45
+ exists at the protocol layer.
46
+
47
+ No vendor-stable RPC, MCP-driven agent control, or shared SQLite
48
+ exists across this set. Building against any single non-CLI host
49
+ locks the workspace to one IDE; building against the CLI set covers
50
+ the most users without vendor coordination.
51
+
52
+ ## Decision
53
+
54
+ Adopt a **CLI shell-out protocol** as the workspace's only
55
+ host-agent integration mechanism in v0, with a **three-tier**
56
+ fallback policy:
57
+
58
+ ### Tier 1 — first-class CLI host
59
+
60
+ Workspace spawns `claude -p "<prompt>" --output-format json` (or the
61
+ Codex / Gemini equivalent) as a subprocess. The JSON envelope is the
62
+ contract; parsing is by named keys; session id is preserved across
63
+ turns. Claude Code is the only Tier-1 host with a stable
64
+ skill-resolution surface today.
65
+
66
+ ### Tier 2 — degraded CLI host
67
+
68
+ Reserved for hosts that gain one of the two surfaces but not both
69
+ (e.g. launch with no trace, or trace with no launch). No host
70
+ occupies this tier today; the slot exists so vendor changes don't
71
+ force a binary tier 1 / tier 3 reclassification.
72
+
73
+ ### Tier 3 — observe-only host (inbox handoff)
74
+
75
+ For hosts without either surface (Augment, Cursor, Cline, Windsurf,
76
+ JetBrains, others), the workspace writes the rendered prompt + skill
77
+ context into `~/.event4u/agent-config/workspace/inbox/<id>.md` and
78
+ surfaces a one-line copy-to-clipboard banner. The user opens the
79
+ host themselves. No tighter integration is attempted in v0. Hook
80
+ trampolines (`scripts/hooks/*-dispatcher.sh`) remain available for
81
+ passive recording but do not initiate conversations.
82
+
83
+ ### Stability & fail-closed
84
+
85
+ A host-agent CLI release that breaks the JSON envelope demotes the
86
+ host to Tier 3 with a workspace banner until
87
+ [`host-agent-protocol.md`](../contracts/host-agent-protocol.md) is
88
+ updated. No silent stdout reparse, no positional-key fallback.
89
+
90
+ ## Consequences
91
+
92
+ **Positive**
93
+
94
+ - The workspace can ship against the existing CLI surface today; no
95
+ vendor coordination required.
96
+ - Tier-3 hosts get a documented, honest fallback rather than a
97
+ half-built integration that breaks under the next vendor release.
98
+ - The protocol surface is small enough to test end-to-end in CI
99
+ (subprocess + JSON parse).
100
+
101
+ **Negative**
102
+
103
+ - IDE / extension hosts are second-class until vendors expose a
104
+ launch / trace surface. The workspace cannot drive Cursor or
105
+ Augment in v0 except via inbox handoff.
106
+ - Codex and Gemini are Tier 1 but lack skill resolution; the
107
+ workspace must pre-render skill context into the prompt body.
108
+ ADR-024 covers this.
109
+ - The session-state model is per-host: closing the workspace mid-turn
110
+ does not stop the host CLI subprocess.
111
+
112
+ **Reversal cost** — low at the protocol layer (the contract file is
113
+ single-source); medium at the workspace if features have been built
114
+ against assumed Tier-1 capabilities for hosts that drop a surface.
115
+
116
+ ## Open questions (next-ADR-deferred)
117
+
118
+ - v0 floor: which features survive in the no-skill-surface case
119
+ (Codex / Gemini)? ADR-024 will answer.
120
+ - Chrome: does the workspace ship as a browser tab against the
121
+ installer GUI, an Electron / Tauri app, or a TUI? ADR-025 will
122
+ answer, informed by what ADR-024 demands.
123
+
124
+ ## Cross-references
125
+
126
+ - Protocol contract: [`docs/contracts/host-agent-protocol.md`](../contracts/host-agent-protocol.md)
127
+ - Council CLI precedent: [`ai-council` skill](../../.agent-src/skills/ai-council/SKILL.md) — same subprocess + JSON-envelope pattern, in production.
128
+ - Hook architecture: [`docs/contracts/hook-architecture-v1.md`](../contracts/hook-architecture-v1.md) — Tier-3 observe-only surface.
129
+ - Predecessor ADR: [`ADR-022`](ADR-022-daily-workspace-decomposition.md).
@@ -0,0 +1,126 @@
1
+ ---
2
+ adr: 024
3
+ status: accepted
4
+ date: 2026-05-24
5
+ decision: workspace-v0-feature-floor
6
+ supersedes: —
7
+ superseded_by: —
8
+ phase: v3.x · employee-product-and-external-proof Phase 4
9
+ type: forward-looking
10
+ ---
11
+
12
+ # ADR-024 — Workspace v0 feature floor
13
+
14
+ ## Status
15
+
16
+ **Accepted** · 2026-05-24. Second of three sub-ADRs created by
17
+ [`ADR-022`](ADR-022-daily-workspace-decomposition.md), depends on
18
+ [`ADR-023`](ADR-023-host-agent-protocol.md). Locks the minimum
19
+ viable shell that recruit-session participants will evaluate.
20
+
21
+ ## Context
22
+
23
+ The original Phase 4 roadmap proposed a three-rail workspace (role
24
+ launcher · conversation pane · knowledge-source rail) with persistent
25
+ session history, citations, explain-trace, and per-user document
26
+ store. The council flagged this as unachievable in the stated ≤ 6
27
+ weeks given a single-engineer budget — and observed that the
28
+ recruit-session signal (Phase 1) is not yet collected, so the v0
29
+ scope cannot be over-fitted to assumed user needs.
30
+
31
+ ADR-023 narrows the host-agent surface to Tier-1 CLI shell-out
32
+ (Claude Code, Codex, Gemini) plus a Tier-3 inbox-handoff fallback.
33
+ The v0 floor must be the smallest surface that exercises both tiers
34
+ end-to-end so the recruit sessions can falsify the workspace
35
+ premise.
36
+
37
+ ## Decision
38
+
39
+ The v0 ships **three features only**:
40
+
41
+ ### 1. Role-keyed task launcher
42
+
43
+ - Reads `agents/roles/<role>/skills.yml` + per-role prompts directory.
44
+ - One-click launcher: pick role → pick task → renders the prompt
45
+ with skill context inlined (so it works on Codex / Gemini too).
46
+ - Routes to the active host:
47
+ - **Tier 1** → spawns `claude -p` / `codex exec` / `gemini` subprocess
48
+ per [`ADR-023`](ADR-023-host-agent-protocol.md).
49
+ - **Tier 3** → writes the rendered prompt into the inbox file and
50
+ surfaces a copy-to-clipboard banner.
51
+ - No skill execution happens inside the workspace itself.
52
+
53
+ ### 2. Per-user conversation log
54
+
55
+ - Single append-only JSONL per session at
56
+ `~/.event4u/agent-config/workspace/sessions/<yyyy-mm-dd>/<session-id>.jsonl`.
57
+ - Captures: launcher input (role, task, rendered prompt), host-agent
58
+ envelope output (Tier 1) or inbox-handoff marker (Tier 3),
59
+ timestamps. No PII in filenames. Encryption deferred.
60
+ - No remote sync. No cross-user view. Local-only.
61
+
62
+ ### 3. Knowledge-pane stub
63
+
64
+ - Reads from the Phase 2 `knowledge:` memory namespace (when
65
+ populated) and renders source citations *next to* the launcher
66
+ output. Does **not** parse Tier-1 envelopes for inline citations
67
+ in v0 — that's a v1 ask.
68
+ - When the knowledge namespace is empty, the pane shows a
69
+ one-line "no sources yet" message and links to the
70
+ ingestion contract.
71
+
72
+ ### Hard cuts from the original Phase 4 scope
73
+
74
+ The following are **deferred** to v1+ and explicitly out of scope
75
+ for v0:
76
+
77
+ - Inline citations inside the conversation pane.
78
+ - Plain-mode explain-trace (Phase 6 dependency; reads same JSON
79
+ envelope but is its own surface).
80
+ - Document-store integration (Phase 5; would force a v0 schema
81
+ decision before recruit sessions inform it).
82
+ - Multi-host concurrency (one host CLI at a time per workspace).
83
+ - Accessibility audit (deferred to post-recruit-session because the
84
+ chrome decision in ADR-025 changes the surface).
85
+
86
+ ### Budget
87
+
88
+ - Single engineer, **8 weeks** (revised from the original 6 weeks
89
+ per the council critique). Stretch goal: 6 weeks if recruit
90
+ sessions defer the knowledge-pane stub.
91
+
92
+ ## Consequences
93
+
94
+ **Positive**
95
+
96
+ - Smallest possible surface that exercises the Tier-1 + Tier-3
97
+ protocol split. Recruit-session signal is interpretable.
98
+ - Codex / Gemini work end-to-end via inlined skill context — no host
99
+ is structurally excluded.
100
+ - The three artefacts (launcher, JSONL log, knowledge stub) are
101
+ testable in isolation and ship-able incrementally.
102
+
103
+ **Negative**
104
+
105
+ - Phase 5 (documents) and Phase 6 (plain-mode explain) cannot start
106
+ until v0 lands. Three months of strict sequencing.
107
+ - "No inline citations" will read as a regression vs the original
108
+ roadmap pitch; needs to be flagged in recruit-session prep.
109
+ - The inbox-handoff fallback is rough by design; Tier-3 users will
110
+ feel second-class until v1.
111
+
112
+ **Reversal cost** — low. The three features are decoupled; any can
113
+ be dropped or expanded without rewriting the others.
114
+
115
+ ## Open questions (next-ADR-deferred)
116
+
117
+ - The chrome: browser-tab against installer GUI · Electron / Tauri ·
118
+ TUI-first. ADR-025 answers, informed by what these three features
119
+ actually need from a UI.
120
+
121
+ ## Cross-references
122
+
123
+ - Predecessor ADRs: [`ADR-022`](ADR-022-daily-workspace-decomposition.md), [`ADR-023`](ADR-023-host-agent-protocol.md).
124
+ - Knowledge ingestion contract: [`docs/contracts/local-knowledge-ingestion.md`](../contracts/local-knowledge-ingestion.md).
125
+ - Role experience contract: [`docs/contracts/role-experience.md`](../contracts/role-experience.md).
126
+ - Roadmap: [`agents/roadmaps/road-to-employee-product-and-external-proof.md`](../../agents/roadmaps/road-to-employee-product-and-external-proof.md) Phase 4.
@@ -0,0 +1,119 @@
1
+ ---
2
+ adr: 025
3
+ status: accepted
4
+ date: 2026-05-24
5
+ decision: workspace-chrome
6
+ supersedes: —
7
+ superseded_by: —
8
+ phase: v3.x · employee-product-and-external-proof Phase 4
9
+ type: forward-looking
10
+ ---
11
+
12
+ # ADR-025 — Workspace chrome — browser tab against the installer GUI
13
+
14
+ ## Status
15
+
16
+ **Accepted** · 2026-05-24. Third of three sub-ADRs created by
17
+ [`ADR-022`](ADR-022-daily-workspace-decomposition.md), depends on
18
+ [`ADR-023`](ADR-023-host-agent-protocol.md) (protocol) and
19
+ [`ADR-024`](ADR-024-workspace-v0-feature-floor.md) (feature floor).
20
+ Picks the UI shape that wraps the v0 feature floor.
21
+
22
+ ## Context
23
+
24
+ The original Phase 4 question framed chrome as a four-way pick:
25
+
26
+ | Option | Pitch |
27
+ |---|---|
28
+ | **(a) Extend installer GUI** | Reuse `packages/core/installer/src/gui/`, add workspace routes. Same loopback server, same CSRF gate, same browser. |
29
+ | **(b) Electron / Tauri desktop app** | Native shell, OS integration (tray icon, hotkeys, autostart). |
30
+ | **(c) Browser tab against the installer GUI** | Same as (a) on the runtime side, but framed as a standalone surface (`/workspace`) the user bookmarks. |
31
+ | **(d) TUI-first** | Terminal UI, optional browser companion. Lowest install footprint. |
32
+
33
+ The council demanded ADRs 023 and 024 land first. With those in
34
+ place: the v0 surface is three small features (launcher, JSONL log,
35
+ knowledge stub) talking to a CLI subprocess. There is no need for
36
+ OS-level integration, no native APIs to call, no real-time low-latency
37
+ rendering. The installer already ships a loopback HTTP + CSRF +
38
+ browser-launch path ([`docs/contracts/gui-wizard.md`](../contracts/gui-wizard.md)).
39
+
40
+ ## Decision
41
+
42
+ Ship workspace v0 as **(c) — a browser tab against the installer
43
+ GUI**.
44
+
45
+ Concretely:
46
+
47
+ - New route group `/workspace` inside the existing
48
+ `packages/core/installer/src/gui/server.ts` Node server (single
49
+ process, single CSRF token, same loopback bind).
50
+ - `npx @event4u/agent-config workspace` opens the browser at the
51
+ `/workspace` route — same launch UX as `init --gui`, different
52
+ default landing page.
53
+ - Per-user state lives under `~/.event4u/agent-config/workspace/`
54
+ (sessions JSONL + inbox files per ADR-024).
55
+ - The installer GUI and the workspace UI **share the same shell**
56
+ (header, identity strip, theme) so a user installing for the
57
+ first time sees the workspace as the natural next surface.
58
+
59
+ ### Why this option
60
+
61
+ - **(c)** is the only option that reuses the proven loopback +
62
+ CSRF + browser-launch path. Zero new infrastructure surface.
63
+ - **(a)** is functionally identical at runtime — the only delta is
64
+ framing. The framing matters: a user-facing "workspace" needs its
65
+ own URL and bookmark story. (c) gets that for free.
66
+ - **(b)** Electron / Tauri adds a ~150 MB install, a code-signing
67
+ story, an autoupdate channel, and a native event loop. None of
68
+ that is needed for the v0 floor; deferred to v1 if recruit
69
+ sessions surface OS-integration demand.
70
+ - **(d)** TUI-first is intriguing for the developer audience but
71
+ excludes the non-developer roles (galabau owner, content creator,
72
+ consultant) named in Phase 1 — the audience this roadmap is for.
73
+
74
+ ### Hard rule: no chrome rewrite without recruit-session signal
75
+
76
+ The chrome choice does **not** survive the recruit sessions
77
+ silently. If Phase 1 (recruit sessions) surfaces a hard "browser
78
+ tabs are wrong" signal from ≥ 2 of the 3 cohorts, this ADR is
79
+ superseded by a new ADR-027 before any further work on the chrome.
80
+ A maintainer note (not a vendor lock-in) ensures the rewrite can
81
+ happen at v0.5, not v2.
82
+
83
+ ## Consequences
84
+
85
+ **Positive**
86
+
87
+ - Zero new infrastructure. Installer GUI is the substrate.
88
+ - Cross-platform for free (browser).
89
+ - One CSRF / port / bind story across installer + workspace —
90
+ one audit surface, one threat model.
91
+
92
+ **Negative**
93
+
94
+ - No native OS hooks (tray icon, global hotkey, autostart). Users
95
+ must manually run `npx ... workspace` to open the tab.
96
+ - Browser-tab UX has a "where did my workspace go?" failure mode
97
+ when the tab is closed. Mitigated by a persistent bookmark and a
98
+ reopen-on-launch flag in `.agent-settings.yml`.
99
+ - Electron / Tauri loyalists will read this as conservative; the
100
+ v1 ADR can reopen if signal supports it.
101
+
102
+ **Reversal cost** — medium. Migrating from browser-tab to native
103
+ requires re-implementing the shell and the asset bundling pipeline,
104
+ but the underlying state model (filesystem JSONL + inbox) is shell-
105
+ agnostic.
106
+
107
+ ## Open questions (post-recruit-session)
108
+
109
+ - Tray-icon / autostart story (Phase 1 + Phase 4 v0.5 — defer).
110
+ - Multi-tenant browser surface for the deployed `agent-config`
111
+ topology (covered by [`ADR-021`](ADR-021-deployment-shape.md);
112
+ v0 is single-user local only).
113
+
114
+ ## Cross-references
115
+
116
+ - Predecessor ADRs: [`ADR-022`](ADR-022-daily-workspace-decomposition.md), [`ADR-023`](ADR-023-host-agent-protocol.md), [`ADR-024`](ADR-024-workspace-v0-feature-floor.md).
117
+ - GUI wizard substrate: [`docs/contracts/gui-wizard.md`](../contracts/gui-wizard.md).
118
+ - Installer architecture: [`ADR-016`](ADR-016-installer-architecture.md).
119
+ - Deployment shape: [`ADR-021`](ADR-021-deployment-shape.md).
@@ -0,0 +1,117 @@
1
+ ---
2
+ adr: 026
3
+ status: accepted
4
+ date: 2026-05-24
5
+ decision: explain-mode-translation
6
+ supersedes: —
7
+ superseded_by: —
8
+ phase: v3.x · employee-product-and-external-proof Phase 6
9
+ type: forward-looking
10
+ ---
11
+
12
+ # ADR-026 — Explain-mode translation — plain as a renderer, not a new pipeline
13
+
14
+ ## Status
15
+
16
+ **Accepted** · 2026-05-24. Phase 6 design. Depends on the existing
17
+ `explain-v1` envelope shape stabilized in `agent-memory` 3.0 and the
18
+ workspace surface from [`ADR-025`](ADR-025-workspace-chrome.md).
19
+
20
+ ## Context
21
+
22
+ Feedback A names the technical explain-trace as a non-technical-employee
23
+ barrier. Today the right rail shows `trust_score: 0.74`,
24
+ `promotion_history: [...]`, `contradictions: 0` — vocabulary that
25
+ assumes the reader knows the memory model. For galabau, content-creator,
26
+ and consultant roles, this is opaque.
27
+
28
+ Two options surveyed:
29
+
30
+ | Option | Pitch | Cost |
31
+ |---|---|---|
32
+ | **(a) Second MCP surface** | Add `memory_explain_plain` returning a pre-translated envelope. | New endpoint, new schema, drift risk between two surfaces, requires MCP version bump. |
33
+ | **(b) Renderer over existing envelope** | Treat plain mode as a pure rendering function over the existing `explain-v1` envelope. Per-role glossary overrides labels. | Zero MCP change, zero data drift, zero schema bump. Renderer testable with fixtures. |
34
+
35
+ ## Decision
36
+
37
+ Ship Phase 6 plain mode as **(b) — a pure renderer over the existing
38
+ `explain-v1` envelope**.
39
+
40
+ Concretely:
41
+
42
+ - `renderExplain(envelope, { mode, glossary?, locale? })` is a pure
43
+ function in `packages/core/src/workspace/explain/`.
44
+ - Two modes: `technical` (current surface, verbatim) and `plain`
45
+ (4 labelled paragraphs: where from, how confident, when reviewed,
46
+ what's contested).
47
+ - 4-band confidence label (Very High / High / Medium / Low) with
48
+ default thresholds per [`docs/contracts/explain-modes.md`](../contracts/explain-modes.md);
49
+ thresholds overridable per role.
50
+ - 3-band freshness label (Fresh / Aging / Stale) from `decay.applied_factor`.
51
+ - Per-role `agents/roles/<role>/explain-glossary.yml` overrides
52
+ default labels and band thresholds. Glossary YAMLs are the
53
+ one carve-out from the `.md`-must-be-English rule for role-native
54
+ rendered strings.
55
+ - `/why` quick command available to every role; resolves `mem://<id>`
56
+ markers in the last reply and calls `memory_explain` per id, then
57
+ renders in the active mode.
58
+
59
+ ## Why (b)
60
+
61
+ - **Zero MCP drift.** One envelope, two views. No risk of plain
62
+ text saying something the engineer view contradicts.
63
+ - **Testable.** Pure function over fixtures. Golden tests cover
64
+ high-trust, low-trust, contradicted, recently-promoted, deprecated.
65
+ - **No version bump.** `agent-memory` MCP surface stays at the
66
+ current contract; consumers running older clients still see the
67
+ technical envelope unchanged.
68
+ - **Glossary carve-out is bounded.** Only the `explain-glossary.yml`
69
+ per role holds runtime strings in role-native language; the
70
+ contract `.md`, the ADR, the renderer code stay English.
71
+
72
+ ## Why not (a)
73
+
74
+ - A second MCP endpoint duplicates the envelope shape and creates
75
+ two surfaces that must stay in sync. Drift will land within one
76
+ release.
77
+ - Schema bump on `agent-memory` cascades to every downstream package
78
+ consuming the MCP; Phase 6 is not the right time to force that.
79
+
80
+ ## Consequences
81
+
82
+ **Positive**
83
+
84
+ - Plain mode lands as a renderer change, no MCP version bump.
85
+ - Per-role glossary opens the door for the recruit-session
86
+ participants (Phase 1) to localize the plain surface without a
87
+ code change.
88
+ - Technical mode survives unchanged for engineering-lead role.
89
+
90
+ **Negative**
91
+
92
+ - Plain mode is downstream of envelope shape; an `explain-v2`
93
+ envelope (next major) requires updating the renderer too. Cost
94
+ is bounded — the renderer is one file.
95
+ - Glossary localization can drift from English defaults if a role
96
+ ships a partial override. Mitigated by the renderer falling back
97
+ to defaults for missing keys.
98
+
99
+ **Reversal cost** — low. Replacing (b) with (a) later if the
100
+ renderer surface grows beyond pure rendering (e.g. needs a different
101
+ data fetch) requires only adding the second MCP endpoint; existing
102
+ glossary YAMLs translate forward.
103
+
104
+ ## Open questions (deferred)
105
+
106
+ - Localization of the technical view (today: English only). Out of
107
+ scope for v0; deferred until ≥ 1 recruit-session participant
108
+ asks for it.
109
+ - Audio / spoken-mode rendering of the plain envelope for the
110
+ consultant-on-the-road role. Defer to a future ADR.
111
+
112
+ ## Cross-references
113
+
114
+ - Contract: [`docs/contracts/explain-modes.md`](../contracts/explain-modes.md).
115
+ - Envelope: [`docs/contracts/agent-memory-contract.md`](../contracts/agent-memory-contract.md).
116
+ - Workspace: [`ADR-025`](ADR-025-workspace-chrome.md), [`docs/contracts/daily-workspace.md`](../contracts/daily-workspace.md).
117
+ - Roles: [`docs/contracts/role-experience.md`](../contracts/role-experience.md).
@@ -0,0 +1,129 @@
1
+ ---
2
+ adr: 027
3
+ status: accepted
4
+ date: 2026-05-25
5
+ decision: changelog-machine-vs-manual
6
+ supersedes: —
7
+ superseded_by: —
8
+ phase: v3.x · changelog-era-auto-split Phase 4
9
+ type: discovery-loop-closure
10
+ review_date: 2027-05-25
11
+ ---
12
+
13
+ # ADR-027 — CHANGELOG convention — confirm manual narrative + auto-split for 12 months
14
+
15
+ ## Status
16
+
17
+ **Accepted** · 2026-05-25. Closes Phase 4 of
18
+ [`road-to-changelog-era-auto-split.md`](../../agents/roadmaps/archive/road-to-changelog-era-auto-split.md).
19
+ Time-boxed: review on 2027-05-25 or earlier if a trigger below fires.
20
+
21
+ ## Context
22
+
23
+ The AI Council that produced the auto-split design surfaced one upstream
24
+ question: **is the manual changelog convention itself the right primitive
25
+ for a package that bills itself as an "Universal AI Agent OS"?** Phase 4
26
+ investigates without committing to a rewrite — either confirm
27
+ `docs/contracts/CHANGELOG-conventions.md` + the Tier 2/3 machinery stand
28
+ for 12 months, or draft a successor roadmap.
29
+
30
+ ### Step 1 — Consumer touchpoint audit
31
+
32
+ Every place a consumer reads the changelog and which fields they read:
33
+
34
+ | # | Surface | What the consumer sees | Field weight |
35
+ |---|---|---|---|
36
+ | 1 | **GitHub Release notes** | `plan.changelog_body` rendered via `scripts/release.py:818` | narrative + bullets + tests-delta |
37
+ | 2 | **npmjs.com package page** | auto-rendered `CHANGELOG.md` (top of file) | narrative paragraph dominates the fold |
38
+ | 3 | **packagist.org package page** | same — auto-rendered `CHANGELOG.md` | same |
39
+ | 4 | **`README.md` footer** | link only to `CHANGELOG.md` and `releases/latest` | navigation, no content |
40
+ | 5 | **`CHANGELOG.md` direct** | full structured entries | full Keep-a-Changelog shape |
41
+ | 6 | **`docs/archive/CHANGELOG-pre-*.md`** | historical eras behind the active-era pointer | follow-up reads only |
42
+ | 7 | **`agents/settings/contexts/adr-artifact-engagement.md` § L100** | guidance to write a deprecation note in `CHANGELOG.md` | governance / authoring, not consumer |
43
+
44
+ `docs/getting-started-by-role.md` — not in scope. No role-pack `FIRST_WIN.md` references the changelog.
45
+
46
+ **Reader insight.** Surfaces 1–3 are the high-traffic consumer surfaces.
47
+ Each renders the *top* of the changelog: the narrative paragraph + the
48
+ first bullet group + the tests-delta. The narrative paragraph carries
49
+ the framing every other layer (bullets, compare-link) loses.
50
+
51
+ ### Step 2 — Spike comparison against the audit
52
+
53
+ Three shapes, measured against the 3.2.0 release (38 commits, 141 lines
54
+ of narrative + bullets in the current convention):
55
+
56
+ | Metric | Current (manual narrative + auto-split) | (a) `release-please` fully generated | (b) Hybrid (manual paragraph + generated bullets) |
57
+ |---|---:|---:|---:|
58
+ | **Token budget per release** | ~2.8k (141 lines × ~80 chars) | ~1.1k (38 commits × ~120 chars) | ~2.6k (same as current; bullets generated, paragraph hand-written) |
59
+ | **Maintainer minutes per release** | 5–15 (write narrative; auto-split runs in `task release`) | 0 direct + ~30/month policing commit messages | 5–10 (paragraph only) |
60
+ | **Information density per line** | high — narrative compresses 5–10 bullets of context | low — every infrastructure commit becomes a line | high — same as current |
61
+ | **Parseability for downstream agents** | high — `### Features` / `### Fixes` / `### BREAKING` are semantic anchors | medium — same headings, but no narrative anchor to disambiguate scope churn | high |
62
+ | **Hands-off failure mode** | era over-cap → auto-split fires | commit-message drift pollutes the log → no recovery without rewriting commits | narrative drift → degrades to release-please equivalent |
63
+
64
+ The fully-generated shape **loses the narrative paragraph**, which is
65
+ the field weight #1–3 surfaces lean on. The hybrid shape is what the
66
+ current convention *already* allows — `release-please` is just the
67
+ extreme end of the auto-spectrum; the convention sits at a defensible
68
+ middle.
69
+
70
+ The operational cost that prompted the question (era over-cap blocking
71
+ the release PR) is solved by Tier 2 in the same roadmap. The discovery
72
+ question therefore reduces to: **is the narrative paragraph worth
73
+ ~2.5k tokens per release?** Audit says yes — it is the field consumers
74
+ read first and the field that differentiates the package from bot
75
+ output.
76
+
77
+ ## Decision
78
+
79
+ **Confirm `docs/contracts/CHANGELOG-conventions.md` + Tier 2/3
80
+ machinery for 12 months.** No successor roadmap.
81
+
82
+ The current convention:
83
+
84
+ - Keeps the **hand-written narrative paragraph** as the load-bearing
85
+ framing for consumer surfaces (npm, packagist, GitHub Releases).
86
+ - Lets `scripts/release.py` generate the **bullet list** under
87
+ Features / Fixes / Chores / Docs / BREAKING via the auto-split flow
88
+ plus the existing Keep-a-Changelog shape.
89
+ - Lets the **drift gate** (`tests/test_changelog_eras.py`) catch
90
+ non-release edits that grow the active era past 250 lines.
91
+
92
+ The "Universal AI Agent OS" framing **argues for**, not against, a
93
+ human-curated changelog — agents that consume `CHANGELOG.md` as a
94
+ ground-truth of "what changed" prefer structured, semantic, framed
95
+ entries over a flat commit dump.
96
+
97
+ ## Consequences
98
+
99
+ - `docs/contracts/CHANGELOG-conventions.md` stands as-is. The
100
+ Tier 3 Step 3 "Gate-vs-script contract" subsection is the canonical
101
+ reference for the gate / script split.
102
+ - No new tooling lands as a Phase 4 follow-up.
103
+ - Review on **2027-05-25** or earlier if any trigger fires:
104
+ 1. The narrative paragraph stops being written for two consecutive
105
+ releases (signal: convention is breaking down naturally).
106
+ 2. The active-era body grows past 250 lines from non-release edits
107
+ more than twice in a quarter (signal: humans are bypassing the
108
+ gate; auto-split is no longer the right primitive).
109
+ 3. A downstream consumer (npm/packagist/GitHub Release renderer)
110
+ changes how it slices the top-of-file (signal: the field weight
111
+ assumption above is invalidated).
112
+ 4. Council session re-opens the question with new evidence.
113
+
114
+ ## Alternatives considered
115
+
116
+ | Option | Why rejected |
117
+ |---|---|
118
+ | **`release-please` fully generated** | Loses the narrative paragraph; surfaces 1–3 lose their highest-weight field. |
119
+ | **Hybrid (manual paragraph + generated bullets, separate tool)** | Indistinguishable from current convention in output; adds a tool boundary without changing the artefact. |
120
+ | **Drop the changelog entirely, point to GitHub Releases** | npm / packagist auto-render `CHANGELOG.md` from the repo; deleting it degrades surfaces 2–3 to a generic placeholder. |
121
+
122
+ ## References
123
+
124
+ - [`docs/contracts/CHANGELOG-conventions.md`](../contracts/CHANGELOG-conventions.md) — convention being confirmed.
125
+ - [`agents/roadmaps/archive/road-to-changelog-era-auto-split.md`](../../agents/roadmaps/archive/road-to-changelog-era-auto-split.md) — closes Phase 4.
126
+ - [`agents/runtime/council/responses/changelog-era-split-2026-05-25.json`](../../agents/runtime/council/responses/changelog-era-split-2026-05-25.json) — the originating council synthesis.
127
+ - `scripts/_lib/changelog_eras.py` — shared cap + splitter (Tier 2 output).
128
+ - `scripts/release.py:818` — `plan.changelog_body` → GitHub Release notes wire.
129
+ - `tests/test_changelog_eras.py`, `tests/test_changelog_split.py` — gate + splitter coverage.