@event4u/agent-config 3.1.1 → 3.2.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 (52) hide show
  1. package/.agent-src/commands/analytics/prune.md +78 -0
  2. package/.agent-src/commands/analytics/show.md +107 -0
  3. package/.agent-src/commands/analytics.md +64 -0
  4. package/.agent-src/commands/knowledge/forget.md +104 -0
  5. package/.agent-src/commands/knowledge/ingest.md +122 -0
  6. package/.agent-src/commands/knowledge/list.md +102 -0
  7. package/.agent-src/commands/knowledge.md +75 -0
  8. package/.agent-src/scripts/update_roadmap_progress.py +1 -1
  9. package/.agent-src/templates/agents/agent-project-settings.example.yml +1 -1
  10. package/.claude-plugin/marketplace.json +8 -1
  11. package/CHANGELOG.md +38 -230
  12. package/README.md +12 -2
  13. package/dist/discovery/deprecation-report.md +1 -1
  14. package/dist/discovery/discovery-manifest.json +162 -8
  15. package/dist/discovery/discovery-manifest.json.sha256 +1 -1
  16. package/dist/discovery/discovery-manifest.summary.md +3 -3
  17. package/dist/discovery/orphan-report.md +1 -1
  18. package/dist/discovery/packs.json +12 -5
  19. package/dist/discovery/trust-report.md +2 -2
  20. package/dist/discovery/workspaces.json +11 -4
  21. package/dist/mcp/mcp-cloudflare-catalogue.json +2 -0
  22. package/dist/mcp/registry-manifest.json +5 -3
  23. package/docs/architecture.md +1 -1
  24. package/docs/archive/CHANGELOG-pre-3.2.0.md +268 -0
  25. package/docs/catalog.md +9 -2
  26. package/docs/contracts/CHANGELOG-conventions.md +19 -0
  27. package/docs/contracts/at-rest-encryption.md +146 -0
  28. package/docs/contracts/daily-workspace.md +137 -0
  29. package/docs/contracts/explain-modes.md +146 -0
  30. package/docs/contracts/host-agent-protocol.md +88 -0
  31. package/docs/contracts/local-analytics.md +148 -0
  32. package/docs/contracts/local-knowledge-ingestion.md +96 -0
  33. package/docs/contracts/role-experience.md +121 -0
  34. package/docs/contracts/workspace-documents.md +140 -0
  35. package/docs/decisions/ADR-022-daily-workspace-decomposition.md +140 -0
  36. package/docs/decisions/ADR-023-host-agent-protocol.md +129 -0
  37. package/docs/decisions/ADR-024-workspace-v0-feature-floor.md +126 -0
  38. package/docs/decisions/ADR-025-workspace-chrome.md +119 -0
  39. package/docs/decisions/ADR-026-explain-mode-translation.md +117 -0
  40. package/docs/deploy/small-team-recipe.md +148 -0
  41. package/docs/deploy/team-deployment-posture.md +91 -0
  42. package/docs/getting-started-by-role.md +27 -0
  43. package/docs/getting-started.md +1 -1
  44. package/docs/guides/local-analytics.md +125 -0
  45. package/docs/guides/local-knowledge.md +127 -0
  46. package/package.json +4 -2
  47. package/scripts/__pycache__/validate_frontmatter.cpython-312.pyc +0 -0
  48. package/scripts/_lib/__pycache__/__init__.cpython-312.pyc +0 -0
  49. package/scripts/_lib/__pycache__/agent_src.cpython-312.pyc +0 -0
  50. package/scripts/_lib/changelog_eras.py +330 -0
  51. package/scripts/memory_lookup.py +78 -1
  52. package/scripts/release.py +93 -3
@@ -0,0 +1,121 @@
1
+ ---
2
+ stability: beta
3
+ keep-beta-until: 2026-08-24
4
+ ---
5
+
6
+ # Role-experience contract
7
+
8
+ **Purpose.** Freeze the on-disk shape of a `role-experience` — the artefact that turns a non-developer persona (galabau owner, content creator, consultant, …) into a first-class entry point with three first tasks, a named prompt library, and a curated skill shortlist. Pins the interface **before** the launcher in Phase 4 reads it, so the launcher and the role authors can move independently.
9
+
10
+ Last refreshed: 2026-05-24. Phase 3 of the employee-product workstream.
11
+
12
+ ## What a role experience is
13
+
14
+ A folder at `agents/roles/<role>/` that contains:
15
+
16
+ - One **identity index** (`index.md`) — one-paragraph persona, three concrete first tasks, recommended pack list, install-path hint.
17
+ - A **prompt library** (`prompts/<name>.md`) — 5–10 named prompts, each a single markdown file with structured frontmatter and a parameterised body the launcher can fill.
18
+ - A **skill shortlist** (`skills.yml`) — the existing skills the launcher should surface for this role, in priority order. Cites existing skills only; never duplicates them.
19
+
20
+ A role experience is **not**:
21
+
22
+ - A new skill — the shortlist references existing skills under `packages/<pack>/.agent-src.uncompressed/skills/`. The role experience curates; it does not implement.
23
+ - A documentation page — `docs/getting-started-by-role.md` is the prose surface and links **to** the role experience, never duplicates it.
24
+ - A persona file under `personas/` — personas are review voices the AI Council uses; role experiences are end-user entry points.
25
+
26
+ ## Folder shape
27
+
28
+ ```
29
+ agents/roles/<role>/
30
+ ├── index.md # identity + three first tasks + recommended packs
31
+ ├── skills.yml # skill shortlist (priority-ordered)
32
+ └── prompts/
33
+ ├── <name-1>.md
34
+ ├── <name-2>.md
35
+ └── … # 5–10 prompts
36
+ ```
37
+
38
+ `<role>` is a kebab-case identifier; it doubles as the launcher key and the URL slug. Reserved words: `default`, `_template`, `_archive`.
39
+
40
+ ## `index.md` frontmatter (required)
41
+
42
+ ```yaml
43
+ ---
44
+ role: <kebab-case-id>
45
+ display_name: "Galabau owner"
46
+ tagline: "One-sentence description visible in the launcher rail."
47
+ recommended_packs: [core, founder-strategy] # cites existing packs only
48
+ install_path_hint: "MCP recommended (Claude Desktop) · CLI when …"
49
+ recruit_session_ref: "agents/recruit-sessions/01-galabau-owner.md" # nullable until session lands
50
+ status: stable | beta | draft
51
+ ---
52
+ ```
53
+
54
+ The body of `index.md` then lists, in this order:
55
+
56
+ 1. **Persona paragraph** (≤ 80 words) — who this role is for, in the role's own language.
57
+ 2. **Three first tasks** — each a single sentence + the prompt name (`prompts/<name>.md`) that bootstraps it.
58
+ 3. **Recommended pack list** — referenced from frontmatter, expanded with one-line rationale per pack.
59
+
60
+ ## Prompt frontmatter (required)
61
+
62
+ Each `prompts/<name>.md` carries:
63
+
64
+ ```yaml
65
+ ---
66
+ name: <kebab-case-id> # unique within the role's prompts/ folder
67
+ intent: "One sentence: what the user gets out of this prompt."
68
+ inputs:
69
+ - name: customer_brief
70
+ required: true
71
+ shape: "free-text paragraph"
72
+ - name: tone
73
+ required: false
74
+ shape: "one of [neutral, warm, urgent]"
75
+ output_shape: "Markdown — H2 sections, ≤ 600 words, structured offer."
76
+ skill_hint: refine-prompt # which skill the host should foreground; cites existing skill
77
+ ---
78
+ ```
79
+
80
+ The body is the parameterised prompt itself, with `{{input_name}}` placeholders the launcher fills before sending to the host model. Bodies stay ≤ 200 lines; prompts longer than that get split.
81
+
82
+ ## `skills.yml` shape
83
+
84
+ ```yaml
85
+ # Priority-ordered. The launcher surfaces the first 5 in its default view; the rest go behind "more".
86
+ skills:
87
+ - id: refine-prompt
88
+ why: "Tightens fuzzy customer briefs before any drafting."
89
+ - id: voice-and-tone-design
90
+ why: "Locks the role's voice so emails read consistent across customers."
91
+ - id: doc-coauthoring
92
+ why: "Section-by-section drafting flow for longer offers."
93
+ ```
94
+
95
+ Every `id` must resolve to an existing skill under `packages/<pack>/.agent-src.uncompressed/skills/<id>/SKILL.md` — verified by the lint pass in Phase 3 Step 6.
96
+
97
+ ## Versioning + status
98
+
99
+ - `status: draft` — scaffold only, no recruit-session evidence yet. Launcher hides drafts in the default view.
100
+ - `status: beta` — scaffold + at least one recruit session backs the first-task choice. Launcher surfaces with a `beta` badge.
101
+ - `status: stable` — at least two recruit sessions concurred on the role's first tasks and the friction-inventory landed at ≤ 3 P0 items.
102
+
103
+ Status promotion is a maintainer decision, captured in the `recruit_session_ref` frontmatter trail. Demotion (stable → beta) happens when a follow-up recruit session contradicts the existing first-task choice.
104
+
105
+ ## Lint pass (deferred to Phase 3 Step 6)
106
+
107
+ The lint pass (`task lint-role-experiences`, wired into `task ci`) asserts:
108
+
109
+ 1. Every `agents/roles/<role>/index.md` has all required frontmatter keys + at least 3 first tasks.
110
+ 2. Every `prompts/<name>.md` has the four required frontmatter keys (`name`, `intent`, `inputs`, `output_shape`) plus `skill_hint`.
111
+ 3. Every `skills.yml#skills[].id` resolves to an existing skill.
112
+ 4. Every `recommended_packs[]` entry resolves to an existing pack manifest.
113
+ 5. Status promotion never happens without a non-null `recruit_session_ref`.
114
+
115
+ Lint pass code lives at `scripts/lint_role_experiences.py`, ≤ 200 LOC. Until the lint pass ships, the scaffolds in Phase 3 Steps 2–4 are hand-validated against this contract.
116
+
117
+ ## Open questions (Phase 3 optional council pass)
118
+
119
+ - Per-role default model — should `index.md` carry a `default_model` frontmatter key the launcher honours, or stay at the host's global default? Default in this contract: stay at host default; per-role override is a future ADR.
120
+ - Prompt input typing — should `inputs[].shape` be free-text or constrained to a small enum (`text`, `enum`, `file-path`, `url`)? Default: free-text; constraint enum is a future tightening.
121
+ - Multi-language prompt bodies — German vs English by role? Default: prompt bodies follow the language policy of the package (English); the host translates at runtime per `language-and-tone`.
@@ -0,0 +1,140 @@
1
+ # Workspace Documents Contract
2
+
3
+ > **Status** · v0 / design · 2026-05-24. Phase 5 of the
4
+ > employee-product workstream.
5
+ > Builds on the [`daily-workspace`](daily-workspace.md) surface and
6
+ > the host-agent protocol from
7
+ > [`ADR-023`](../decisions/ADR-023-host-agent-protocol.md). Documents
8
+ > are the **output shape** of selected launcher prompts.
9
+
10
+ ## When a launcher prompt produces a document
11
+
12
+ A launcher prompt is **document-shaped** when its frontmatter sets
13
+ `output_shape: document`. Otherwise the prompt is **chat-shaped**
14
+ (default) — the host reply lands in the session JSONL log only.
15
+
16
+ ```yaml
17
+ # agents/roles/galabau/prompts/angebot-erstellen.md
18
+ ---
19
+ title: Angebot erstellen
20
+ output_shape: document
21
+ document_type: offer
22
+ slug: from_title
23
+ ---
24
+ ```
25
+
26
+ Recognised `document_type` values (v0): `offer`, `mail-draft`,
27
+ `memo`, `brief`, `video-script`. Unknown types are rejected at
28
+ launcher-load time with a banner; the prompt falls back to
29
+ chat-shaped.
30
+
31
+ ## Storage layout
32
+
33
+ ```
34
+ ~/.event4u/agent-config/workspace/documents/
35
+ ├── offer/
36
+ │ ├── kundeX-angebot-2026-05-24.md ← body
37
+ │ └── kundeX-angebot-2026-05-24.history.jsonl ← per-save revision log
38
+ ├── mail-draft/
39
+ ├── memo/
40
+ ├── brief/
41
+ └── video-script/
42
+ ```
43
+
44
+ Slug rules: kebab-case ASCII; deduped by appending `-2`, `-3`, …;
45
+ filename never contains PII. Slug default = `slugify(title) + "-" + iso-date`.
46
+
47
+ ## Document frontmatter
48
+
49
+ ```markdown
50
+ ---
51
+ type: offer
52
+ title: Angebot Kunde X
53
+ created_at: 2026-05-24T12:08:00Z
54
+ last_edited_at: 2026-05-24T12:14:00Z
55
+ source_prompt: agents/roles/galabau/prompts/angebot-erstellen.md
56
+ source_session: 20260524T120800Z-a1b2c3d4
57
+ role: galabau
58
+ tags: [kunde-x, gartenbau, 2026-q2]
59
+ schema: workspace-document/v0
60
+ ---
61
+
62
+ [document body — Markdown, host-generated, user-edited]
63
+ ```
64
+
65
+ `source_prompt` + `source_session` form the provenance pair: every
66
+ document points back to the prompt that produced it and the session
67
+ that ran it. The session JSONL stays in the session store; only the
68
+ **reference** lives here.
69
+
70
+ ## Revision log
71
+
72
+ Path: `<slug>.history.jsonl`. Append-only. One entry per save.
73
+
74
+ ```json
75
+ {
76
+ "ts": "2026-05-24T12:14:00Z",
77
+ "actor": "user",
78
+ "kind": "save",
79
+ "delta": { "added": 12, "removed": 4 },
80
+ "body_sha256": "ab12…"
81
+ }
82
+ ```
83
+
84
+ Actor `host` marks the initial-creation save (from the host agent's
85
+ reply). Actor `user` marks every subsequent edit. No body in the
86
+ log — only the SHA. The body lives in the `.md` file; rollback walks
87
+ the SHA chain and reconstructs from a tracked-base + delta is
88
+ **deferred** to v1 (v0 keeps only the latest body).
89
+
90
+ ## Export
91
+
92
+ | Format | How | Notes |
93
+ |---|---|---|
94
+ | Markdown | identity copy of `<slug>.md` | always available |
95
+ | PDF | `markitdown` reverse path (preferred), `pandoc` fallback | requires `pandoc` on PATH for fallback |
96
+ | DOCX | `pandoc <slug>.md -o <slug>.docx` | requires `pandoc` on PATH |
97
+
98
+ Export target: user picks a folder via the OS picker. No autosave to
99
+ cloud, no upload, no remote backend. Export failures surface as a
100
+ banner; partial files are not left behind.
101
+
102
+ ## Workspace integration
103
+
104
+ - Phase 4 right-rail "Recent documents" list shows ≤ 20 most-recent
105
+ entries scoped to the current role; click → opens the body in the
106
+ user's default Markdown editor.
107
+ - The workspace **centre pane** for a document-shaped session shows
108
+ the document body live (read-only) plus a "Edit" button that
109
+ hands off to the OS default `.md` editor.
110
+ - Closing the workspace does not lock the document file — it stays
111
+ user-editable.
112
+
113
+ ## Failure modes
114
+
115
+ - Host CLI returns a non-document reply for a document-shaped prompt
116
+ → workspace stores the raw text under `<slug>.md` with a
117
+ `quarantine: true` frontmatter flag; UI shows a one-line banner.
118
+ - Disk full → red banner, no silent body loss.
119
+ - Frontmatter parse failure → revision log still appends a
120
+ `kind: save_failed` record; user's working file is preserved
121
+ alongside as `<slug>.broken.md`.
122
+
123
+ ## Coverage requirements (Phase 5 Step 6)
124
+
125
+ - Golden tests on the export rendering: 3 fixture documents × 3
126
+ export formats (Markdown / PDF / DOCX). Fixtures under
127
+ `tests/golden/workspace-documents/`.
128
+ - Schema-validation tests on the frontmatter contract using
129
+ `tests/fixtures/workspace-documents/valid/` and `invalid/`.
130
+ - ≥ 80 % branch on save + history-append paths.
131
+
132
+ ## Cross-references
133
+
134
+ - [`daily-workspace`](daily-workspace.md) — workspace shell that
135
+ hosts the document view.
136
+ - [`host-agent-protocol`](host-agent-protocol.md) — how the document
137
+ body is produced.
138
+ - [`local-knowledge-ingestion`](local-knowledge-ingestion.md) —
139
+ sources cited inside documents.
140
+ - ADRs: [`023`](../decisions/ADR-023-host-agent-protocol.md), [`024`](../decisions/ADR-024-workspace-v0-feature-floor.md), [`025`](../decisions/ADR-025-workspace-chrome.md).
@@ -0,0 +1,140 @@
1
+ ---
2
+ adr: 022
3
+ status: accepted
4
+ date: 2026-05-24
5
+ decision: daily-workspace-decomposition
6
+ supersedes: —
7
+ superseded_by: —
8
+ phase: v3.x · employee-product-and-external-proof Phase 4
9
+ type: forward-looking
10
+ ---
11
+
12
+ # ADR-022 — Daily workspace — decomposition
13
+
14
+ ## Status
15
+
16
+ **Accepted** · 2026-05-24. Phase 4 Step 1 of
17
+ [`road-to-employee-product-and-external-proof.md`](../../agents/roadmaps/road-to-employee-product-and-external-proof.md).
18
+ Records the council's verdict on the original "workspace shape"
19
+ question — that the question was malformed — and replaces a single
20
+ chrome decision with three sequenced sub-decisions.
21
+
22
+ The numeric reservation note in
23
+ [`ADR-021`](ADR-021-deployment-shape.md) (ADRs 022–025 held for the
24
+ internal-AI-OS-deployment roadmap) is retired: that roadmap is
25
+ archived ([`agents/roadmaps/archive/road-to-internal-ai-os-deployment.md`](../../agents/roadmaps/archive/road-to-internal-ai-os-deployment.md))
26
+ and the active strategy after release `3.1.1` is the
27
+ employee-product / external-proof roadmap. ADR-022 claims the
28
+ number under the new strategy.
29
+
30
+ Companion artefacts:
31
+
32
+ - Roadmap: [`agents/roadmaps/road-to-employee-product-and-external-proof.md`](../../agents/roadmaps/road-to-employee-product-and-external-proof.md)
33
+ - Council question: [`agents/decisions/open-questions/daily-workspace-shape.md`](../../agents/decisions/open-questions/daily-workspace-shape.md)
34
+ - Council verdict: `agents/runtime/council/responses/daily-workspace-shape.json` (gitignored)
35
+ - Predecessor ADRs: [`ADR-014`](ADR-014-gui-framework-choice.md) (installer chrome), [`ADR-016`](ADR-016-installer-architecture.md) (installer architecture), [`ADR-020`](ADR-020-global-only-consumer-scope.md) (consumer scope).
36
+
37
+ ## Context
38
+
39
+ Phase 4 of the post-`3.1.1` roadmap proposes a persistent daily
40
+ workspace — left rail (role + task launcher), centre pane (active
41
+ conversation with the host agent), right rail (knowledge sources +
42
+ explain-trace) — as the missing daily-use surface for non-developer
43
+ roles (galabau owner, content creator, consultant).
44
+
45
+ The original Step 1 framed the decision as a four-way chrome pick:
46
+ extend the GUI installer · separate Electron/Tauri app · browser tab
47
+ · TUI-first. The council was asked to choose one.
48
+
49
+ ## What the council said
50
+
51
+ Both council members (claude-sonnet-4-5, gpt-4o) **rejected the
52
+ question as malformed** after a two-round debate. The convergent
53
+ verdict, in their own words:
54
+
55
+ > *"The ADR masquerades as a UI choice when it is actually three
56
+ > entangled, unsequenced decisions: (1) the protocol boundary to
57
+ > host agents, (2) the v0 feature scope that validates 'non-developers
58
+ > prefer this', (3) the chrome that wraps that scope."*
59
+ > — Anthropic
60
+
61
+ > *"Without a stable, documented protocol between the workspace and
62
+ > host agents, the ADR's proposition lacks substance and could be
63
+ > shelved until a reliable, documented, and tested protocol is
64
+ > defined."* — OpenAI
65
+
66
+ The load-bearing critique is that the workspace contract requires
67
+ two capabilities the host agents (Claude Code, Augment, Cursor,
68
+ Cline, Windsurf) have not been confirmed to expose:
69
+
70
+ 1. A stable RPC / IPC surface for **launching a conversation with a
71
+ pre-filled prompt + pre-selected skill** (not just CLI flags that
72
+ drift per Hyrum's Law).
73
+ 2. Structured **explain-trace emission** (not "parse stdout and hope").
74
+
75
+ Until both are proven for at least one host agent, no chrome option
76
+ can be implemented — each inherits the same fatal coupling risk.
77
+
78
+ ## Decision
79
+
80
+ Split Phase 4 Step 1 into three sequential sub-decisions, each its
81
+ own ADR:
82
+
83
+ 1. **ADR-023 — Host-agent protocol contract** *(blocking)*. Inventory
84
+ the surface each named host agent exposes today, name the
85
+ fallback for missing surfaces, write `docs/contracts/host-agent-protocol.md`.
86
+ Status today: **drafted, not started**.
87
+ 2. **ADR-024 — Workspace v0 feature floor** *(depends on ADR-023)*.
88
+ Define the minimum viable shell that recruit-session participants
89
+ can evaluate. Pare back from "left rail + centre pane + right rail"
90
+ to whatever the protocol from ADR-023 can actually drive end-to-end.
91
+ 3. **ADR-025 — Workspace chrome** *(depends on ADR-024)*. The original
92
+ four-way pick (installer-extension · Electron/Tauri · browser tab ·
93
+ TUI), narrowed by what ADR-024 needs and what ADR-023 makes
94
+ feasible.
95
+
96
+ The roadmap is updated accordingly: Phase 4 grows two new gating
97
+ steps (ADR-023 + ADR-024) ahead of the chrome decision. The
98
+ "≤ 6 weeks for one engineer" budget assumption from the original
99
+ roadmap is preserved as a working figure — both council members
100
+ flagged it as ambitious. ADR-024 will tighten it.
101
+
102
+ ## Consequences
103
+
104
+ **Positive**
105
+
106
+ - The blocking risk (host-agent protocol feasibility) is surfaced
107
+ as its own ADR with its own go/no-go gate, not buried under a
108
+ chrome debate.
109
+ - Phase 4 cannot accidentally ship a chrome built on an unproven
110
+ integration substrate.
111
+ - Recruit sessions (Phase 1) get a clearer signal of *what* to
112
+ validate: "does the v0 feature floor solve the daily-use gap?"
113
+ rather than "do you prefer this UI?"
114
+
115
+ **Negative**
116
+
117
+ - Phase 4 ships two additional ADRs before any code lands. Adds
118
+ governance overhead; the autonomous-execution rule narrows the
119
+ ask-tax but doesn't remove it.
120
+ - The chrome decision (ADR-025) is deferred at least one council
121
+ round behind ADR-023 + ADR-024.
122
+
123
+ **Reversal cost** — low. If ADR-023 proves the protocol is trivially
124
+ stable, ADR-024 can collapse to a one-line "we re-adopt the
125
+ original v1 scope" decision and ADR-025 proceeds against the
126
+ original four-way pick.
127
+
128
+ ## Open questions (next-ADR-deferred)
129
+
130
+ - Whether the host-agent protocol investigation should be
131
+ council-gated again or treated as a research artefact (ADR-023
132
+ will say).
133
+ - Whether "host agent" remains plural or narrows to one supported
134
+ host for v0 (ADR-024 will say).
135
+
136
+ ## Cross-references
137
+
138
+ - Council question file: [`agents/decisions/open-questions/daily-workspace-shape.md`](../../agents/decisions/open-questions/daily-workspace-shape.md)
139
+ - Role identity scaffolds (Phase 3 output): [`agents/roles/`](../../agents/roles/)
140
+ - Knowledge-ingestion contract (Phase 2 input): [`docs/contracts/local-knowledge-ingestion.md`](../contracts/local-knowledge-ingestion.md)
@@ -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.