@event4u/agent-config 2.3.0 → 2.4.1

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 (39) hide show
  1. package/.agent-src/commands/onboard.md +14 -9
  2. package/.agent-src/skills/ai-council/SKILL.md +5 -3
  3. package/.agent-src/skills/using-git-worktrees/SKILL.md +1 -1
  4. package/.agent-src/templates/agents/agent-project-settings.example.yml +4 -3
  5. package/.agent-src/templates/scripts/work_engine/_lib/agent_settings.py +29 -7
  6. package/.agent-src/templates/scripts/work_engine/_lib/user_global_paths.py +249 -0
  7. package/.agent-src/templates/scripts/work_engine/hooks/settings.py +8 -5
  8. package/.claude-plugin/marketplace.json +1 -1
  9. package/CHANGELOG.md +39 -0
  10. package/config/agent-settings.template.yml +5 -3
  11. package/docs/catalog.md +5 -3
  12. package/docs/contracts/installed-tools-lockfile.md +4 -0
  13. package/docs/customization.md +23 -17
  14. package/docs/decisions/ADR-007-agent-discovery-scopes.md +6 -0
  15. package/docs/decisions/ADR-009-event4u-namespace.md +188 -0
  16. package/docs/decisions/INDEX.md +1 -0
  17. package/docs/guidelines/agent-infra/installed-tools-manifest.md +1 -1
  18. package/docs/guidelines/agent-infra/layered-settings.md +6 -4
  19. package/docs/installation.md +3 -2
  20. package/docs/migration/v1-to-v2.md +45 -0
  21. package/docs/setup/per-ide/claude-desktop.md +107 -65
  22. package/package.json +1 -1
  23. package/scripts/_cli/cmd_uninstall.py +17 -7
  24. package/scripts/_cli/cmd_update.py +11 -7
  25. package/scripts/_lib/agent_settings.py +29 -7
  26. package/scripts/_lib/agents_overlay.py +15 -4
  27. package/scripts/_lib/claude_desktop_bundler.py +150 -0
  28. package/scripts/_lib/installed_lock.py +56 -4
  29. package/scripts/_lib/installed_tools.py +1 -1
  30. package/scripts/_lib/update_check.py +29 -5
  31. package/scripts/_lib/user_global_paths.py +249 -0
  32. package/scripts/ai_council/__init__.py +4 -3
  33. package/scripts/ai_council/budget_guard.py +34 -4
  34. package/scripts/ai_council/bundler.py +2 -0
  35. package/scripts/ai_council/clients.py +28 -7
  36. package/scripts/install.py +149 -49
  37. package/scripts/install_anthropic_key.sh +5 -3
  38. package/scripts/install_openai_key.sh +5 -3
  39. package/scripts/skill_trigger_eval.py +13 -2
@@ -48,12 +48,14 @@ Six **DX-comfort** keys can be carried across every project that uses
48
48
  `event4u/agent-config` by storing them once in a user-global file at:
49
49
 
50
50
  ```
51
- ~/.config/agent-config/agent-settings.yml
51
+ ~/.event4u/agent-config/agent-settings.yml
52
52
  ```
53
53
 
54
- The path is XDG-style and matches the existing
55
- `~/.config/agent-config/` directory used for `anthropic.key`,
56
- `openai.key`, and `council-spend.jsonl`.
54
+ The path namespaces every event4u-owned user-global artefact under one
55
+ root same place where `anthropic.key`, `openai.key`, and
56
+ `council-spend.jsonl` now live. Pre-2.4 installs that still keep these
57
+ files under `~/.config/agent-config/` are read as a fallback until the
58
+ namespace migration shim moves them.
57
59
 
58
60
  **Whitelist (locked, exact dotted paths)** — only these six keys are
59
61
  mergeable from the user-global file; every other key is silently ignored:
@@ -71,7 +73,7 @@ caveman.speak_scope
71
73
 
72
74
  ```
73
75
  1. Package defaults (shipped by event4u/agent-config)
74
- 2. ~/.config/agent-config/agent-settings.yml (user-global · whitelist-filtered)
76
+ 2. ~/.event4u/agent-config/agent-settings.yml (user-global · whitelist-filtered · legacy ~/.config/agent-config/ read as fallback)
75
77
  3. <repo-root>/.agent-settings.yml (project-wide · all keys)
76
78
  4. <intermediate-dir>/.agent-settings.yml (subsystem-scoped · all keys · optional)
77
79
  5. <CWD>/.agent-settings.yml (deepest · all keys · wins)
@@ -126,7 +128,7 @@ Rules:
126
128
  consumers should pin.
127
129
  - **Owned by the project, not the developer.** Lives in
128
130
  `.agent-settings.yml` (committed), reviewed in PRs like any other
129
- config change. Never merged from `~/.config/agent-config/agent-settings.yml`.
131
+ config change. Never merged from `~/.event4u/agent-config/agent-settings.yml`.
130
132
  - **Resolver enforcement.** `npx @event4u/agent-config <cmd>`
131
133
  compares the resolved CLI version against the pin; mismatch
132
134
  triggers a re-exec at the pinned version
@@ -150,22 +152,23 @@ Rules:
150
152
  | `chat_history.on_overflow` | per profile | `rotate` drops oldest, `compress` marks for summarization (see matrix below). |
151
153
  | `onboarding.onboarded` | `false` | Whether `/onboard` has run. The `onboarding-gate` rule prompts for `/onboard` while this is `false`. |
152
154
  | `ai_council.enabled` | `false` | Master switch for the `/council` command. Even when enabled, every consultation asks before spending tokens. |
153
- | `ai_council.members.<provider>.enabled` | `false` | Per-provider opt-in (`anthropic`, `openai`). Tokens live in `~/.config/agent-config/<provider>.key` (mode 0600), never in this file. |
155
+ | `ai_council.members.<provider>.enabled` | `false` | Per-provider opt-in (`anthropic`, `openai`). Tokens live in `~/.event4u/agent-config/<provider>.key` (mode 0600), never in this file. Legacy `~/.config/agent-config/<provider>.key` is read as a fallback. |
154
156
  | `ai_council.members.<provider>.model` | per provider | Which model the provider sends the query to (e.g. `claude-sonnet-4-5`, `gpt-4o`). |
155
157
  | `ai_council.cost_budget.max_input_tokens` | `50000` | Hard cap on summed input tokens per `/council` invocation. |
156
158
  | `ai_council.cost_budget.max_output_tokens` | `20000` | Hard cap on summed output tokens per `/council` invocation. |
157
159
  | `ai_council.cost_budget.max_calls` | `10` | Maximum council members per invocation. |
158
160
  | `ai_council.cost_budget.max_total_usd` | `0.0` | Per-invocation USD ceiling. `0` disables (token caps still apply). |
159
- | `ai_council.cost_budget.daily_limit_usd` | `0.0` | Rolling 24h USD ceiling across all `/council` calls. `0` disables. Ledger lives at `~/.config/agent-config/council-spend.jsonl` (mode 0600). |
161
+ | `ai_council.cost_budget.daily_limit_usd` | `0.0` | Rolling 24h USD ceiling across all `/council` calls. `0` disables. Ledger lives at `~/.event4u/agent-config/council-spend.jsonl` (mode 0600). |
160
162
  | `ai_council.session_retention_days` | `14` | Auto-prune for `agents/council-sessions/` audit folders. Older session directories are removed on the next `save()`. `0` disables (keep forever). |
161
163
 
162
164
  > **Experimental.** AI Council is not yet validated by external users. API costs apply per consultation.
163
165
 
164
166
  Council API tokens are installed via `./agent-config keys:install-anthropic`
165
167
  and `./agent-config keys:install-openai` — they prompt on `/dev/tty`, write to
166
- `~/.config/agent-config/<provider>.key` with mode `0600`, and never accept env
167
- vars. The `/council` command refuses to run if the key file's permissions
168
- drift.
168
+ `~/.event4u/agent-config/<provider>.key` with mode `0600`, and never accept env
169
+ vars. Pre-2.4 installs at `~/.config/agent-config/<provider>.key` are still
170
+ honoured by the loaders as a fallback. The `/council` command refuses to run
171
+ if the key file's permissions drift.
169
172
 
170
173
  ### Cost profiles
171
174
 
@@ -316,9 +319,10 @@ shadowed.
316
319
  | `agents/roadmaps/` | ❌ No — project-rooted only. | ❌ No. | Active delivery plans. |
317
320
  | `agents/state/`, `agents/memory/`, `agents/work_engine/`, `agents/.agent-prices.md`, `agents/council-*/` | ❌ No — stateful / session-scoped. | ❌ No. | Per-session state, not shareable. |
318
321
 
319
- **User-global asymmetry.** `~/.config/agent-config/agents/overrides/`
320
- is the only user-global overlay path consulted by the loader. Files
321
- under `~/.config/agent-config/agents/contexts/` or
322
+ **User-global asymmetry.** `~/.event4u/agent-config/agents/overrides/`
323
+ is the only user-global overlay path consulted by the loader (the
324
+ legacy `~/.config/agent-config/agents/overrides/` tree is read as a
325
+ fallback). Files under `~/.event4u/agent-config/agents/contexts/` or
322
326
  `.../agents/decisions/` are silently skipped — these kinds are
323
327
  project-shaped and must not leak across projects.
324
328
 
@@ -343,9 +347,11 @@ finished. There is no prompt — the user updates when they want with
343
347
  Update: npx @event4u/agent-config update
344
348
  ```
345
349
 
346
- State is persisted at `~/.config/agent-config/update-check.json`
347
- (mode `0600`) sibling of `anthropic.key`, `council-spend.jsonl`.
348
- The fetch is hard-capped at 1 s and silent on any error.
350
+ State is persisted at `~/.event4u/agent-config/update-check.json`
351
+ (mode `0600`; the legacy `~/.config/agent-config/update-check.json`
352
+ is read as a fallback) sibling of `anthropic.key`,
353
+ `council-spend.jsonl`. The fetch is hard-capped at 1 s and silent on
354
+ any error.
349
355
 
350
356
  ### Suppression matrix
351
357
 
@@ -10,6 +10,12 @@ phase: post-v2.1.0 · simplicity-and-everywhere
10
10
 
11
11
  # ADR-007 — Agent Discovery Scopes: Global-Default Install Model
12
12
 
13
+ > **Update (v2.4, 2026-05-13):** the user-scope dir was relocated from
14
+ > `~/.config/agent-config/` to `~/.event4u/agent-config/` by
15
+ > [`ADR-009`](ADR-009-event4u-namespace.md). The legacy path is still
16
+ > read as a back-compat fallback. The discovery-scope contract in this
17
+ > ADR is otherwise unchanged.
18
+ >
13
19
  > **Note (post-acceptance):** the one-shot installer command was later
14
20
  > renamed from `npx @event4u/create-agent-config init` to
15
21
  > `npx @event4u/agent-config init` when the standalone wrapper package
@@ -0,0 +1,188 @@
1
+ ---
2
+ adr: 009
3
+ status: accepted
4
+ date: 2026-05-13
5
+ decision: event4u-namespace-and-claude-desktop-zip-bundles
6
+ supersedes: —
7
+ superseded_by: —
8
+ phase: v2.4 · namespace-and-claude-desktop
9
+ ---
10
+
11
+ # ADR-009 — `~/.event4u/agent-config/` namespace + Claude Desktop ZIP bundles
12
+
13
+ ## Status
14
+
15
+ **Accepted** · 2026-05-13 · signed off by Matze after the user ask
16
+ *"auf globaler ebene sollen unsere dateien in einem
17
+ .event4u/agent-config Folder im user ordner landen"* combined with the
18
+ Claude Desktop deployment gap surfaced in the same turn (the v1
19
+ `marker-only` integration did not actually make any skill visible to
20
+ the Customize → Skills panel). Implementation tracked in
21
+ [`agents/roadmaps/road-to-event4u-namespace-and-claude-desktop.md`](../../agents/roadmaps/road-to-event4u-namespace-and-claude-desktop.md).
22
+
23
+ ## Context
24
+
25
+ ADR-007 made global-first install the default and seeded the
26
+ user-scope state at `~/.config/agent-config/` (XDG-style). Two pain
27
+ points surfaced in production use:
28
+
29
+ 1. **Namespace collision risk.** `~/.config/agent-config/` is a
30
+ generic-sounding path. Future tools owned by event4u (or
31
+ third-party suites named `agent-config`) would step on the same
32
+ prefix. The user requested a vendor-owned umbrella:
33
+ `~/.event4u/agent-config/`.
34
+ 2. **Claude Desktop deployment was a stub.** `scripts/install.py`
35
+ wrote a `claude-desktop.md` marker file under
36
+ `~/.config/agent-config/claude-desktop/` and called it done. Claude
37
+ Desktop does **not** auto-discover skills from any filesystem path
38
+ — the user must upload each skill through **Settings → Customize →
39
+ Skills → Upload**. Research against `nextlevelbuilder/ui-ux-pro-max-skill`
40
+ and the Anthropic Skills API docs confirmed there is no public
41
+ bulk-upload API for personal installs (the `/v1/skills` endpoint is
42
+ workspace + code-execution gated).
43
+
44
+ Tool anchors (`~/.claude/`, `~/.augment/`, `~/.cursor/`,
45
+ `~/.codeium/windsurf/`) are owned by the host tool and must **not** be
46
+ moved — those paths are conventionalised by the tool itself.
47
+
48
+ ## Decision
49
+
50
+ Two coordinated moves:
51
+
52
+ ### 1. Package-owned user-scope state lives under `~/.event4u/agent-config/`
53
+
54
+ | Old path | New path |
55
+ |-----------------------------------------------------|---------------------------------------------------------|
56
+ | `~/.config/agent-config/agent-settings.yml` | `~/.event4u/agent-config/agent-settings.yml` |
57
+ | `~/.config/agent-config/installed.lock` | `~/.event4u/agent-config/installed.lock` |
58
+ | `~/.config/agent-config/installed-tools.yml` | `~/.event4u/agent-config/installed-tools.yml` |
59
+ | `~/.config/agent-config/update-check.json` | `~/.event4u/agent-config/update-check.json` |
60
+ | `~/.config/agent-config/ai-council/` | `~/.event4u/agent-config/ai-council/` |
61
+
62
+ Path resolution lives in `scripts/_lib/user_global_paths.py`:
63
+
64
+ - `event4u_root()` — primary path; honours `EVENT4U_HOME` override.
65
+ - `legacy_xdg_root()` — read-only fallback for unmigrated installs.
66
+ - `resolve(name)` — returns the primary path; if absent and the legacy
67
+ copy exists, returns the legacy path. Writes always target the
68
+ primary path.
69
+
70
+ A one-shot auto-migration shim runs on first post-upgrade
71
+ `init`/`update`/`uninstall`:
72
+
73
+ 1. If `~/.event4u/agent-config/` already exists → no-op.
74
+ 2. Otherwise, copy every file from `~/.config/agent-config/` to the
75
+ new path, preserving mtimes.
76
+ 3. Drop a `MIGRATED.md` breadcrumb in the legacy dir pointing at the
77
+ new home. Legacy files stay readable; loaders fall back to them
78
+ until the next install overwrites the primary path.
79
+
80
+ Tool anchors are **untouched**. The umbrella applies only to
81
+ package-owned files.
82
+
83
+ ### 2. Claude Desktop deployment = per-skill ZIP bundles
84
+
85
+ `scripts/_lib/claude_desktop_bundler.py` walks `.claude/skills/`,
86
+ dereferences symlinks, and packs each `<skill-name>/` folder into a
87
+ self-contained ZIP under
88
+ `~/.event4u/agent-config/claude-desktop/bundles/<skill-name>.zip`.
89
+
90
+ - Exclusions: `__pycache__/`, `.git*`, `*.pyc`, `.DS_Store`.
91
+ - Atomic writes via `tempfile` + `os.replace`.
92
+ - SHA-256 sidecar (`<name>.zip.sha256`) drives content-hash idempotency.
93
+ - Repeat runs write 0 bundles when source unchanged; `--force` rebuilds.
94
+
95
+ The user imports the ZIPs manually via Claude Desktop → Settings →
96
+ Customize → Skills → Upload. The install summary surfaces the bundle
97
+ path and count so the user can paste it into Finder / Explorer.
98
+
99
+ ## Consequences
100
+
101
+ ### Positive
102
+
103
+ - **Vendor namespace is reserved.** Future event4u-owned packages can
104
+ drop sibling dirs under `~/.event4u/` without colliding with the
105
+ XDG-shape of other suites.
106
+ - **Claude Desktop integration is real.** v2.4 produces 276 ZIPs from
107
+ the package's own `.claude/skills/` and the import flow is
108
+ click-through, no terminal.
109
+ - **Migration is zero-action.** Existing users keep working — the
110
+ shim copies on first install and the legacy fallback covers any
111
+ loader that hasn't been re-run yet.
112
+ - **Override-friendly.** `EVENT4U_HOME` lets CI / sandbox / multi-tenant
113
+ layouts redirect the root without monkey-patching.
114
+
115
+ ### Negative
116
+
117
+ - **Manual upload step for Claude Desktop.** Until Anthropic ships a
118
+ public per-user Skills API, every fresh install / bundle refresh
119
+ requires the user to re-upload through Customize. The bundle count
120
+ in the install summary is the closest we can get to closing this loop.
121
+ - **Two read paths during transition.** Loaders must consult both
122
+ `event4u_root()` and `legacy_xdg_root()` for the next two minor
123
+ versions. Once usage telemetry shows the legacy dir is consistently
124
+ empty, we can retire the fallback.
125
+ - **Symlink semantics differ across platforms.** The bundler
126
+ `dereferences` symlinks during ZIP creation; on Windows this means
127
+ skills must not rely on cross-volume symlinks at pack time.
128
+
129
+ ### Neutral
130
+
131
+ - Tool anchors (`~/.claude/`, `~/.augment/`, …) keep their owner. This
132
+ ADR explicitly does **not** propose moving them under
133
+ `~/.event4u/`.
134
+
135
+ ## Rollback / kill-switch
136
+
137
+ If the migration corrupts user state, the rollback path is **manual but
138
+ zero-data-loss** by design:
139
+
140
+ 1. **Legacy tree is never auto-deleted.** Even after the breadcrumb is
141
+ written, `~/.config/agent-config/` retains every file. The user can
142
+ reinstate it by deleting `~/.event4u/agent-config/` and re-running
143
+ `bash install.sh --global` — the shim will re-copy from the legacy
144
+ tree if the new root is absent.
145
+ 2. **Per-entry atomic write.** Each top-level entry is copied to a
146
+ sibling `<name>.event4u-partial-<pid>` and then `os.replace`'d into
147
+ place. A crash mid-copy leaves `*.event4u-partial-*` debris that the
148
+ next run purges before retrying — a partial subdirectory is never
149
+ mistaken for a completed copy.
150
+ 3. **`EVENT4U_HOME` env override.** A user who needs to point the
151
+ resolver at a known-good state (e.g. a restored backup) can set
152
+ `EVENT4U_HOME=/path/to/restored/agent-config` without editing any
153
+ config file.
154
+ 4. **Bundler is hash-gated.** If `claude_desktop_bundler.py` ever
155
+ produces a corrupt ZIP, the SHA-256 sidecar diverges from the source
156
+ manifest and the next run rewrites it. `--force` forces a full
157
+ rebuild from scratch.
158
+ 5. **Out-of-scope failure modes.** Disk exhaustion mid-copy, permission
159
+ bit corruption on cross-filesystem moves, and unicode-NFC normalisation
160
+ drift on macOS HFS+ → APFS migrations are **not** auto-recovered.
161
+ Users hit by those run the manual rollback in step 1.
162
+
163
+ ## Alternatives considered
164
+
165
+ 1. **Symlink `~/.event4u/agent-config/` ↔ `~/.config/agent-config/`.**
166
+ Rejected: doubles the surface (loaders still need both paths in
167
+ memory) and creates a removal hazard (`rm -rf ~/.config/agent-config`
168
+ wipes the new home too).
169
+ 2. **Anthropic `/v1/skills` API client for Claude Desktop.** Rejected:
170
+ the endpoint is workspace + code-execution gated, not viable for
171
+ personal installs. Captured as a follow-up if user demand surfaces.
172
+ 3. **Single mega-ZIP of all skills.** Rejected: Customize → Skills
173
+ imports one skill per ZIP. A combined archive would require the
174
+ user to extract + re-zip locally, defeating the purpose.
175
+ 4. **Hard-cut migration (delete legacy on first run).** Rejected: a
176
+ crash mid-copy would leave the user with neither path readable.
177
+ The current shim is copy-then-breadcrumb, leaving the legacy dir
178
+ intact for at least one more cycle.
179
+
180
+ ## References
181
+
182
+ - [`agents/roadmaps/road-to-event4u-namespace-and-claude-desktop.md`](../../agents/roadmaps/road-to-event4u-namespace-and-claude-desktop.md)
183
+ - [`scripts/_lib/user_global_paths.py`](../../scripts/_lib/user_global_paths.py)
184
+ - [`scripts/_lib/claude_desktop_bundler.py`](../../scripts/_lib/claude_desktop_bundler.py)
185
+ - [`docs/setup/per-ide/claude-desktop.md`](../setup/per-ide/claude-desktop.md)
186
+ - [`docs/migration/v1-to-v2.md`](../migration/v1-to-v2.md) § v2 → v2.4
187
+ - ADR-007 (predecessor — global-first install scopes)
188
+ - ADR-008 (sibling — installed-tools manifest)
@@ -12,6 +12,7 @@ _Auto-generated by `scripts/adr/regenerate_index.py`. Do not edit._
12
12
  | [ADR-006](ADR-006-skill-tools-python-pilot.md) | Skill Tools Python Pilot Pass | accepted | 2026-05-09 | — |
13
13
  | [ADR-007](ADR-007-agent-discovery-scopes.md) | Global Default Install With Export Subcommand | accepted | 2026-05-12 | — |
14
14
  | [ADR-008](ADR-008-installed-tools-manifest.md) | Committed Installed Tools Manifest Separate From Settings | proposed | 2026-05-12 | — |
15
+ | [ADR-009](ADR-009-event4u-namespace.md) | Event4U Namespace And Claude Desktop Zip Bundles | accepted | 2026-05-13 | — |
15
16
 
16
17
  ## Unnumbered (legacy)
17
18
 
@@ -105,7 +105,7 @@ the next commit.
105
105
  |---|---|---|
106
106
  | `agents/installed-tools.lock` | **which AIs?** (this guideline) | bill of materials |
107
107
  | `.agent-project-settings.yml` | **how do agents behave?** | layered-settings (team file) |
108
- | `~/.config/agent-config/installed.lock` | **which package version did I install globally?** | per-developer global lockfile (Phase 1) |
108
+ | `~/.event4u/agent-config/installed.lock` | **which package version did I install globally?** | per-developer global lockfile (Phase 1; legacy `~/.config/agent-config/installed.lock` read as fallback) |
109
109
  | `.agent-settings.yml` | **what are my personal preferences in this project?** | layered-settings (developer file) |
110
110
 
111
111
  Each file has one job. They never overlap. The two `.lock` files look
@@ -18,7 +18,7 @@ on user request.
18
18
  | File | Git | Scope | Owner | Example values |
19
19
  |---|---|---|---|---|
20
20
  | `.agent-project-settings.yml` | **committed** | team / repo | lead maintainer | `project.stack`, `quality.php.tools`, `memory.dogfood` |
21
- | `~/.config/agent-config/agent-settings.yml` | **n/a** (outside repo) | individual developer · cross-project | individual | `name`, `ide`, `cost_profile`, `personal.bot_icon`, `personal.autonomy`, `caveman.speak_scope` |
21
+ | `~/.event4u/agent-config/agent-settings.yml` | **n/a** (outside repo) | individual developer · cross-project | individual | `name`, `ide`, `cost_profile`, `personal.bot_icon`, `personal.autonomy`, `caveman.speak_scope` (legacy `~/.config/agent-config/agent-settings.yml` read as fallback) |
22
22
  | `.agent-settings.yml` | **gitignored** | individual developer · this project | individual | `personal.ide`, `personal.user_name`, `subagents.max_parallel`, `onboarding.onboarded` |
23
23
 
24
24
  All three are YAML. Schemas:
@@ -34,7 +34,7 @@ Lowest priority → highest priority:
34
34
 
35
35
  ```
36
36
  1. Package defaults (shipped by event4u/agent-config)
37
- 2. ~/.config/agent-config/agent-settings.yml (user-global · whitelist-filtered)
37
+ 2. ~/.event4u/agent-config/agent-settings.yml (user-global · whitelist-filtered · legacy ~/.config/agent-config/ read as fallback)
38
38
  3. .agent-project-settings.yml (team file, committed)
39
39
  4. .agent-settings.yml (developer file, gitignored)
40
40
  ```
@@ -67,8 +67,10 @@ Loader contract:
67
67
  back to the next tier without raising.
68
68
  - **Silent on out-of-whitelist keys.** `verbose=True` logs which keys
69
69
  were dropped for debugging; default mode is silent.
70
- - **Never auto-creates `~/.config/agent-config/`.** That directory
71
- pre-exists from key installation; `/onboard` `mkdir -p`s on opt-in.
70
+ - **Never auto-creates `~/.event4u/agent-config/`** (nor the legacy
71
+ `~/.config/agent-config/`). The new directory is created by the
72
+ migration shim or by `/onboard` on opt-in; key installation also
73
+ `mkdir -p`s as needed.
72
74
 
73
75
  ## Lock semantics
74
76
 
@@ -11,8 +11,9 @@ committed to a repo. No Task, no Make, no build tools required.
11
11
  > to **project**. Pass `--scope=global` or `--scope=project` to override
12
12
  > detection. See `--scope` in the CLI help for the full matrix.
13
13
 
14
- A global install records itself in `~/.config/agent-config/installed.lock`
15
- (schema_version, agent_config_version, installed_at, tools[]). `npx
14
+ A global install records itself in `~/.event4u/agent-config/installed.lock`
15
+ (schema_version, agent_config_version, installed_at, tools[]; the legacy
16
+ `~/.config/agent-config/installed.lock` is read as a fallback). `npx
16
17
  @event4u/agent-config update` keeps that manifest in lockstep
17
18
  with the project pin in `.agent-settings.yml`. A version-mismatched
18
19
  re-run of `init --scope=global` is refused with exit code 1 until you
@@ -91,8 +91,53 @@ npx @event4u/agent-config doctor # P3 — runtime sanity check
91
91
 
92
92
  Expected: pin resolved, no v1 markers detected, `update_check` reachable.
93
93
 
94
+ ## v2 → v2.4 — `~/.event4u/agent-config/` namespace move
95
+
96
+ v2.4 relocates package-owned user-scope state from
97
+ `~/.config/agent-config/` to `~/.event4u/agent-config/`. Tool anchors
98
+ (`~/.claude/`, `~/.augment/`, `~/.cursor/`, `~/.codeium/windsurf/`) are
99
+ **not** moved — those belong to their host tools.
100
+
101
+ ### What moves
102
+
103
+ | Old path | New path |
104
+ |-----------------------------------------------------|---------------------------------------------------------|
105
+ | `~/.config/agent-config/agent-settings.yml` | `~/.event4u/agent-config/agent-settings.yml` |
106
+ | `~/.config/agent-config/installed.lock` | `~/.event4u/agent-config/installed.lock` |
107
+ | `~/.config/agent-config/installed-tools.yml` | `~/.event4u/agent-config/installed-tools.yml` |
108
+ | `~/.config/agent-config/update-check.json` | `~/.event4u/agent-config/update-check.json` |
109
+ | `~/.config/agent-config/ai-council/` | `~/.event4u/agent-config/ai-council/` |
110
+
111
+ ### Migration — zero action required
112
+
113
+ A one-shot auto-migration shim runs on the first `init` / `update` /
114
+ `uninstall` after upgrading to ≥ 2.4:
115
+
116
+ 1. If `~/.event4u/agent-config/` already exists → no-op.
117
+ 2. Otherwise, copy every file from `~/.config/agent-config/` to the new
118
+ path, preserving mtimes.
119
+ 3. Drop a `MIGRATED.md` breadcrumb in the legacy dir pointing at the new
120
+ home. Legacy files stay readable; loaders fall back to them until a
121
+ subsequent install overwrites the new path.
122
+
123
+ Override the target dir with `EVENT4U_HOME=/some/path` if you keep a
124
+ non-standard home (`$HOME` substitute) or want to test the migration
125
+ against a sandbox.
126
+
127
+ ### Claude Desktop — new bundle output
128
+
129
+ v2.4 ships a real Claude Desktop deployment instead of the
130
+ marker-only stub. Running `npx @event4u/agent-config init
131
+ --tools=claude-desktop` (or any superset that includes it) now produces
132
+ one ZIP per `.claude/skills/<name>/` under
133
+ `~/.event4u/agent-config/claude-desktop/bundles/`. Import them via
134
+ Claude Desktop → Customize → Skills → Upload. See
135
+ [`docs/setup/per-ide/claude-desktop.md`](../setup/per-ide/claude-desktop.md)
136
+ for the click-through.
137
+
94
138
  ## See also
95
139
 
96
140
  - [`docs/architecture.md` § Distribution model](../architecture.md#distribution-model--npx-only--version-pin-governance) — Q1 council rejection + override + pin substitution.
97
141
  - [`agents/roadmaps/road-to-portable-runtime-and-update-check.md`](../../agents/roadmaps/road-to-portable-runtime-and-update-check.md) — full delivery plan and acceptance criteria.
142
+ - [`agents/roadmaps/road-to-event4u-namespace-and-claude-desktop.md`](../../agents/roadmaps/road-to-event4u-namespace-and-claude-desktop.md) — v2.4 namespace + bundle delivery plan.
98
143
  - [`docs/installation.md`](../installation.md) — v2 install reference.
@@ -1,65 +1,97 @@
1
1
  # Claude Desktop — agent-config setup
2
2
 
3
3
  The fastest path to running our skills, rules, and (optionally) the MCP
4
- server inside Claude Desktop. macOS / Windows / Linux. ~5 minutes.
5
-
6
- > **TL;DR** — Claude Desktop reads from `~/.claude/` (global only, no
7
- > project-local discovery on macOS). Run `npx @event4u/agent-config
8
- > global --tools=claude-desktop` once per user, or
9
- > `npx @event4u/agent-config init --tools=claude-code` per project
10
- > (Claude Code's project install also covers Desktop on macOS via the
11
- > shared `~/.claude/` location seeded during `init`). The v1 npm /
12
- > composer install scheme is retired; the new global-first scheme is
13
- > ADR-007 and writes through `~/.config/agent-config/installed.lock`.
4
+ server inside Claude Desktop. macOS / Windows / Linux. ~10 minutes.
5
+
6
+ > **TL;DR** — Claude Desktop does **not** auto-discover skills from any
7
+ > filesystem path. It loads skills only after they are uploaded through
8
+ > **Settings Customize Skills → Upload**. The package generates one
9
+ > ZIP per skill under
10
+ > `~/.event4u/agent-config/claude-desktop/bundles/` so you can drag /
11
+ > drop them into the Customize panel. The v1 npm / composer install
12
+ > scheme is retired; the new global-first scheme is ADR-007 and writes
13
+ > through `~/.event4u/agent-config/installed.lock` (legacy
14
+ > `~/.config/agent-config/installed.lock` read as fallback).
14
15
 
15
16
  ## Prerequisites
16
17
 
17
18
  - Claude Desktop installed (free or paid plan — same install path).
18
19
  - Node ≥ 18 (`npx` resolves the package per-project).
19
- - 5 minutes.
20
+ - 10 minutes (most of it is clicking through the Customize panel once).
20
21
 
21
- ## Step 1 — project-local install
22
+ ## Step 1 — generate the ZIP bundles
22
23
 
23
- Run inside each project that should be visible to Claude Desktop:
24
+ Run once per user. Writes the per-skill ZIPs into the namespace dir:
24
25
 
25
26
  ```bash
26
- npx @event4u/agent-config init --tools=claude-code
27
+ npx @event4u/agent-config init --tools=claude-desktop --global
27
28
  ```
28
29
 
29
- > `--tools=claude-code` covers both Claude Code **and** Claude
30
- > Desktop — the two surfaces share the project's `.claude/`
31
- > directory. Pass `--tools=claude-code,cursor,windsurf` to seed
32
- > additional surfaces in the same run.
33
-
34
30
  The init writes:
35
31
 
36
32
  ```
37
- .claude/
38
- ├── rules/ # active rules for the project
39
- ├── skills/ # active skills for the project
40
- └── commands/ # slash commands
33
+ ~/.event4u/agent-config/
34
+ ├── claude-desktop/
35
+ ├── bundles/ # one <skill-name>.zip per .claude/skills/* folder
36
+ └── claude-desktop.md # human-readable marker with the import flow
37
+ ├── agent-settings.yml
38
+ ├── installed.lock
39
+ └── installed-tools.yml
41
40
  ```
42
41
 
43
- `.agent-settings.yml` carries the `agent_config_version` pin so every
44
- `npx` invocation resolves the same runtime.
42
+ Re-running is safe: each ZIP carries a SHA-256 sidecar. Bundles whose
43
+ content didn't change are skipped (idempotent).
44
+
45
+ ## Step 1b — import skills into Customize
46
+
47
+ Claude Desktop does not read the bundle dir directly — you upload each
48
+ ZIP through the **Customize** panel.
49
+
50
+ 1. Open Claude Desktop → **Settings** (`Cmd+,` on macOS).
51
+ 2. Pick **Customize** in the left sidebar, then the **Skills** tab.
52
+ 3. Click **Upload** (the button shown next to the search box).
53
+ 4. Navigate to `~/.event4u/agent-config/claude-desktop/bundles/` and
54
+ either:
55
+ - drag-drop the ZIPs you want into the upload zone, or
56
+ - select multiple ZIPs in the file picker (`Cmd-click` on macOS,
57
+ `Ctrl-click` on Windows / Linux) and confirm.
58
+ 5. The skills appear in the Customize list. Toggle each one **On**
59
+ (the toggle is the gate Claude Desktop uses at runtime, not the
60
+ upload itself).
61
+
62
+ > The bundles dir prints in the install summary so you can paste-copy
63
+ > it into Finder / Explorer. The marker file at the same path
64
+ > (`claude-desktop.md`) repeats the click-through instructions.
45
65
 
46
66
  ## Step 2 — verify
47
67
 
48
- 1. Restart Claude Desktop (full quit, not just window close).
49
- 2. Open the project folder in a new conversation.
50
- 3. Type `/` the curated skills (`/work`, `/commit`, `/create-pr`,
51
- `/quality-fix`, `/review-changes`, `/agent-handoff`,
52
- `/project-analyze`, …) appear in the slash-command menu.
53
- 4. Open Settings Connectors. The kernel rules count appears under
54
- "rules loaded".
68
+ 1. Restart Claude Desktop (full quit, not just window close — `Cmd+Q`
69
+ on macOS).
70
+ 2. Open a new conversation.
71
+ 3. Type `/` — the uploaded skills appear in the slash-command menu.
72
+ 4. **Settings Customize Skills** should list every skill you
73
+ uploaded, each with its **On** toggle live.
74
+
75
+ If a skill is missing from `/`:
76
+
77
+ - Confirm the **On** toggle is enabled in Customize → Skills.
78
+ - Re-upload that specific ZIP — partial uploads can show up listed but
79
+ disabled.
80
+ - Quit Claude Desktop fully (the menubar process on macOS caches old
81
+ skill state). Re-open and re-check.
55
82
 
56
- If the menu is empty:
83
+ ## Step 2b optional: project-local install for Claude Code
57
84
 
58
- - Check `ls .claude/skills/` inside the project should list the
59
- curated skills.
60
- - Quit Claude Desktop (`Cmd+Q` on macOS, **not** just close the
61
- window — the menubar process keeps the old skills cached).
62
- - Re-open and try `/` again.
85
+ If you also use **Claude Code** in the same project, install the
86
+ project-local config in the same run:
87
+
88
+ ```bash
89
+ npx @event4u/agent-config init --tools=claude-code
90
+ ```
91
+
92
+ Claude Code reads `.claude/` directly from the project — no upload
93
+ step required. Pass `--tools=claude-code,claude-desktop,cursor,…` to
94
+ seed multiple surfaces with one invocation.
63
95
 
64
96
  ## Step 3 — optional MCP server
65
97
 
@@ -116,34 +148,39 @@ Restart Claude Desktop. The 🔌 icon shows the connector under
116
148
  native HTTP) and per-client Bearer-auth snippets live in
117
149
  [`../mcp-client-config.md`](../mcp-client-config.md).
118
150
 
119
- ## Claude Desktop ↔ Claude Code config sharing
120
-
121
- Both surfaces read **the same project `.claude/` directory**. Anything
122
- the `npx init` writes for one is automatically picked up by the
123
- other when the project folder is opened:
124
-
125
- | File / dir | Shared by Desktop & Code? |
126
- | -------------------------------- | ------------------------- |
127
- | `<project>/.claude/CLAUDE.md` | yes project system prompt |
128
- | `<project>/.claude/rules/` | yes — written by `npx … init` |
129
- | `<project>/.claude/skills/` | yes — written by `npx … init` |
130
- | `<project>/.claude/commands/` | yes — slash commands |
131
- | `<project>/.claude/hooks/` | yes — lifecycle hooks |
132
- | `claude_desktop_config.json` | Desktop only (MCP) |
133
- | `~/.claude.json` (CLI config) | Code only |
134
-
135
- Translation: run `npx @event4u/agent-config init` once per project,
136
- both clients pick the files up. Cross-link to
137
- [`claude-code.md`](claude-code.md) for the CLI-side view.
151
+ ## Claude Desktop ↔ Claude Code what is shared, what is not
152
+
153
+ Claude Code reads `.claude/` directly from the project. Claude Desktop
154
+ does **not** auto-discover from any filesystem path skills must be
155
+ uploaded through Customize Skills (Step 1b). MCP configuration is
156
+ shared via `claude_desktop_config.json`.
157
+
158
+ | Surface | Loaded by Desktop? | Loaded by Code? |
159
+ | -------------------------------- | ---------------------------- | -------------------------- |
160
+ | `<project>/.claude/CLAUDE.md` | no | yes — project system prompt |
161
+ | `<project>/.claude/rules/` | no | yes — written by `npx … init` |
162
+ | `<project>/.claude/skills/` | no (upload via Customize) | yes — written by `npx … init` |
163
+ | `<project>/.claude/commands/` | no | yes — slash commands |
164
+ | `<project>/.claude/hooks/` | no | yes — lifecycle hooks |
165
+ | `~/.event4u/agent-config/claude-desktop/bundles/*.zip` | imported via Customize → Skills | not used |
166
+ | `claude_desktop_config.json` | yes — MCP servers | no |
167
+ | `~/.claude.json` (CLI config) | no | yes CLI session state |
168
+
169
+ Translation: run `npx @event4u/agent-config init --tools=claude-desktop
170
+ --global` once per user to refresh the bundles, then re-upload through
171
+ Customize → Skills whenever a bundle is rebuilt. Run
172
+ `npx @event4u/agent-config init --tools=claude-code` per project for
173
+ the Code-side files. Cross-link to [`claude-code.md`](claude-code.md)
174
+ for the CLI-side view.
138
175
 
139
176
  ## Claude Cowork
140
177
 
141
- Claude Cowork (paid plans only — Pro / Max / Team) **shares the
142
- Desktop config**. Once Step 1 + Step 3 are done in Desktop:
178
+ Claude Cowork (paid plans only — Pro / Max / Team) **inherits the
179
+ Desktop session**. Once Steps 1 + 1b + 3 are done in Desktop:
143
180
 
144
- - Skills and rules under `~/.claude/` are picked up automatically.
145
- - MCP servers under `claude_desktop_config.json` are available
146
- inside Cowork sessions without a separate install.
181
+ - Uploaded skills from Customize are available inside Cowork.
182
+ - MCP servers under `claude_desktop_config.json` are available inside
183
+ Cowork sessions without a separate install.
147
184
  - Cowork-specific limit (per Anthropic docs): MCP tools that write to
148
185
  the local filesystem are sandboxed — read-only tools (the entire
149
186
  `agent-config-mcp` Worker surface) work fine.
@@ -154,9 +191,14 @@ client-side feature set.
154
191
 
155
192
  ## Uninstall
156
193
 
157
- Remove the project's `.claude/`, `.agent-settings.yml`, and any bridge
158
- files written by `npx … init`. Nothing lives under `~/.claude/` from
159
- this package any more.
194
+ 1. Open Claude Desktop Settings Customize → Skills, toggle off and
195
+ delete each skill you uploaded.
196
+ 2. Delete `~/.event4u/agent-config/claude-desktop/` to remove the local
197
+ bundles. The legacy `~/.config/agent-config/` path can stay; the
198
+ loader treats it as read-only fallback.
199
+ 3. Run `npx @event4u/agent-config uninstall --tools=claude-desktop` to
200
+ refresh `installed.lock` (or `--all` to fully remove the user-scope
201
+ state).
160
202
 
161
203
  ## See also
162
204