@event4u/agent-config 2.1.0 → 2.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.
@@ -20,9 +20,17 @@ NEVER OFFER NUMBERED CHOICES WITHOUT A REAL TRADE-OFF.
20
20
 
21
21
  ## What counts as cheap
22
22
 
23
- Nine classes — sequencing · format-only · commit asks (forbidden by [`commit-policy`](commit-policy.md)) · CI / test asks ([`verify-before-complete`](verify-before-complete.md) decides) · fenced-step re-asks ([`scope-control § fenced step`](scope-control.md#fenced-step--user-set-review-gates)) · Iron-Law option (breaches `commit-policy`, `scope-control § git-ops`, or `non-destructive-by-default`) · context-derived · dominant option · re-ask after decline ([`scope-control § decline = silence`](scope-control.md#decline--silence--no-re-asking-on-the-same-task)).
23
+ Ten classes — sequencing · format-only · commit asks · CI / test asks · fenced-step re-asks · Iron-Law option · context-derived · dominant option · re-ask after decline · **paternalistic state-assuming option** (Iron Law 3 below). Per-class detail + governing rule: [`asking-and-brevity-examples § cheap-question-catalog`](../docs/guidelines/agent-infra/asking-and-brevity-examples.md#cheap-question-class-catalog--extended-examples).
24
24
 
25
- Per-class patterns and examples: [`asking-and-brevity-examples § cheap-question-catalog`](../docs/guidelines/agent-infra/asking-and-brevity-examples.md#cheap-question-class-catalog--extended-examples).
25
+ ## Iron Law 3 No Paternalistic State-Assuming Options
26
+
27
+ ```
28
+ NEVER FABRICATE USER STATE TO JUSTIFY AN OPTION.
29
+ "TAKE A BREAK", "SLEEP ON IT", "COME BACK FRESH" — FORBIDDEN.
30
+ THE USER DECIDES WHEN TO STOP. THE AGENT DECIDES WHAT TO BUILD NEXT.
31
+ ```
32
+
33
+ Every numbered option = technical / scope / sequencing choice with real trade-off, not mood-management nudge. Forbidden patterns + carve-outs: [`asking-and-brevity-examples § iron-law-3`](../docs/guidelines/agent-infra/asking-and-brevity-examples.md#no-cheap-questions--iron-law-3-detail-paternalistic-state-options).
26
34
 
27
35
  ## Pre-Send Self-Check — MANDATORY before every question
28
36
 
@@ -34,6 +42,7 @@ Run silently before any numbered-options block:
34
42
  4. One option obviously dominant?
35
43
  5. User fenced next step (*"plan only"*, *"review first"*) → deliver + handback per `scope-control § fenced step`.
36
44
  6. User already declined? Re-ask forbidden per `scope-control § decline = silence`.
45
+ 7. Any option assumes user fatigue / frustration / "had enough" without in-message citation? Iron Law 3 — drop it.
37
46
 
38
47
  Any "yes" → **do not ask**. Pick the dominant path, state assumption inline (*"assuming X — adjust if wrong"*), hand back. One-question-per-turn from [`ask-when-uncertain`](ask-when-uncertain.md) still applies when the question is genuine.
39
48
 
@@ -146,6 +146,30 @@ install, first example, or requirements.
146
146
  deep-link-table pattern, collapsibles, and anti-patterns (premature
147
147
  splitting, duplication between README and `/docs/`).
148
148
 
149
+ #### Per-AI catalog pattern (multi-platform AI / CLI packages)
150
+
151
+ For packages targeting many AI assistants or platforms (CLI installers,
152
+ agent-config tools, language SDKs with 10+ targets), prefer flat per-AI
153
+ catalog over giant matrix. One line per target, install command on left,
154
+ aligned trailing comment naming platform:
155
+
156
+ ```bash
157
+ npx <package> init --tools=claude-code # Claude Code
158
+ npx <package> init --tools=cursor # Cursor
159
+ npx <package> init --tools=windsurf # Windsurf
160
+ # ... one line per supported target
161
+ ```
162
+
163
+ Pair catalog with separate "Global install" subsection (same flags plus
164
+ `--global`) and "Other commands" subsection. Reference example:
165
+ [`README.md § Pick specific AIs`](../../../README.md#pick-specific-ais) in
166
+ this repo. Inspiration:
167
+ [`ui-ux-pro-max-skill § Installation`](https://github.com/nextlevelbuilder/ui-ux-pro-max-skill#installation).
168
+
169
+ Use catalog when package's primary install action varies by platform; use
170
+ matrix table (Tool / Rules / Skills / Commands) for capability comparison.
171
+ Different jobs — install vs. coverage.
172
+
149
173
  README = enough to adopt. Docs = enough to master.
150
174
 
151
175
  ### 8. Validate
@@ -6,7 +6,7 @@
6
6
  },
7
7
  "metadata": {
8
8
  "description": "Shared agent configuration \u2014 skills for AI coding tools (Claude Code, Augment, Cursor, Cline, Windsurf, Gemini CLI).",
9
- "version": "2.1.0"
9
+ "version": "2.2.0"
10
10
  },
11
11
  "plugins": [
12
12
  {
package/CHANGELOG.md CHANGED
@@ -9,6 +9,23 @@ versioning policy is documented in [CONTRIBUTING.md](CONTRIBUTING.md#versioning-
9
9
 
10
10
  ## [Unreleased]
11
11
 
12
+ Four roadmaps land in this release.
13
+
14
+ **Global-First Install (R4)** — `npx @event4u/create-agent-config init`
15
+ now defaults to a **global** install (`~/.claude/`, `~/.cursor/`, …)
16
+ when run outside a project, and a **project** install when run inside
17
+ one. A new global lockfile at `~/.config/agent-config/installed.lock`
18
+ records `agent_config_version` + `tools[]` and refuses mismatched
19
+ re-installs (exit 1) until `update` or `--force` realigns it. New
20
+ `agent-config export --tool=<id> --output=<path>` subcommand ejects a
21
+ named tool's resolved content into the project tree (idempotent;
22
+ `--force` overrides drift). 12 supported tool ids (claude-code,
23
+ cursor, windsurf, cline, aider, codex, gemini, copilot,
24
+ claude-desktop, continue, kilocode, zed, jetbrains, kiro). Windows
25
+ CI matrix added for the lockfile + export paths. See
26
+ [`docs/decisions/ADR-007-agent-discovery-scopes.md`](docs/decisions/ADR-007-agent-discovery-scopes.md)
27
+ and [`docs/decisions/ADR-008-installed-tools-manifest.md`](docs/decisions/ADR-008-installed-tools-manifest.md).
28
+
12
29
  Three roadmaps land in this release.
13
30
 
14
31
  **Universal Execution Engine (R1)** — the `/implement-ticket` runtime is
@@ -318,6 +335,37 @@ our recommendation order, not its support status.
318
335
  users" tension without removing any path that an existing user
319
336
  might rely on.
320
337
 
338
+ ## [2.2.0](https://github.com/event4u-app/agent-config/compare/2.1.0...2.2.0) (2026-05-12)
339
+
340
+ ### Features
341
+
342
+ * **npx:** expand --tools validator to 13 supported AI ids ([7af69a7](https://github.com/event4u-app/agent-config/commit/7af69a766f575c30d8f29ea04052647b6a1b8a19))
343
+ * **cli:** add sync and validate subcommands for installed-tools manifest ([62a5c66](https://github.com/event4u-app/agent-config/commit/62a5c66a131bcf8866be2a8c0e76ba6e054017af))
344
+ * **cli:** add export subcommand and update version-drift handling ([6110f3b](https://github.com/event4u-app/agent-config/commit/6110f3b0ee454ca215c569d8f42ca38ffce577e8))
345
+ * **install:** global-first install with lockfile + installed-tools manifest engine ([6200d42](https://github.com/event4u-app/agent-config/commit/6200d42225d5712a10d5458dc608da3f5cd0164c))
346
+
347
+ ### Bug Fixes
348
+
349
+ * **rules:** trim no-cheap-questions to satisfy 12% concentration cap ([4abf946](https://github.com/event4u-app/agent-config/commit/4abf94628838c027da13d190e5e7b27738070db2))
350
+
351
+ ### Documentation
352
+
353
+ * **rules:** add no-cheap-questions Iron Law 3 against paternalistic state options ([b98687b](https://github.com/event4u-app/agent-config/commit/b98687bd397d39eae6811e54eb743a095fa33b8b))
354
+ * README + installation + manifest guideline for global-first install ([cdc52ff](https://github.com/event4u-app/agent-config/commit/cdc52ffc5abb9cff6fda9133dd0b8dc524794d18))
355
+ * **contracts:** add tier-3 contrib plugin contract ([2dbf9cd](https://github.com/event4u-app/agent-config/commit/2dbf9cd2ec772dc2248de2b8f17248e97a67a60b))
356
+ * **adr:** add ADR-007 global-first install + ADR-008 installed-tools manifest ([e214de2](https://github.com/event4u-app/agent-config/commit/e214de27bd8d19858fdc16cecc4ebfeaaebce136))
357
+
358
+ ### CI
359
+
360
+ * **windows:** add lockfile + export tests on Windows runner ([e5802a5](https://github.com/event4u-app/agent-config/commit/e5802a56f45bcfd5eb845c7af816bb12a0b4492b))
361
+
362
+ ### Chores
363
+
364
+ * **taskfile:** add test-install-local for offline one-liner smoke test ([594ac69](https://github.com/event4u-app/agent-config/commit/594ac69c8682f106dee9ebc9ce3e55bb0083e254))
365
+ * **roadmap:** archive road-to-global-first-install (24/24 complete) ([71d8cf2](https://github.com/event4u-app/agent-config/commit/71d8cf2966976c286ffecc1646cb7990255cccd1))
366
+
367
+ Tests: 3350 (+97 since 2.1.0)
368
+
321
369
  ## [2.1.0](https://github.com/event4u-app/agent-config/compare/2.0.0...2.1.0) (2026-05-12)
322
370
 
323
371
  ### Features
package/README.md CHANGED
@@ -14,7 +14,7 @@ Give your AI agents an audit-disciplined orchestration contract — testing, Git
14
14
  > Your agent picks up the project's stack, runs tests, prepares PRs, fixes CI — and follows your team's coding standards while doing it. Stack-aware skill sets ship for PHP (Laravel · Symfony · Zend/Laminas), JavaScript (Next.js · React · Node), and cross-stack concerns (API · testing · security · observability).
15
15
 
16
16
  <p align="center">
17
- <strong>174 Skills</strong> · <strong>60 Rules</strong> · <strong>106 Commands</strong> · <strong>69 Guidelines</strong> · <strong>8 AI Tools</strong>
17
+ <strong>174 Skills</strong> · <strong>60 Rules</strong> · <strong>106 Commands</strong> · <strong>70 Guidelines</strong> · <strong>8 AI Tools</strong>
18
18
  </p>
19
19
 
20
20
  ---
@@ -36,6 +36,14 @@ If none of those apply yet — start with the [Quickstart](#quickstart) and pick
36
36
  Two minutes from `npx` to a better-behaved agent — no install, no
37
37
  vendored package, no postinstall hook.
38
38
 
39
+ **v2.1+ — global-first by default.** Running `init` outside a project
40
+ defaults to a user-scope install (`~/.claude/`, `~/.cursor/`, …) and
41
+ records itself in `~/.config/agent-config/installed.lock`. Running it
42
+ inside a project (a `package.json` / `composer.json` / `pyproject.toml`
43
+ manifest is present) defaults to a project-scope install. Override with
44
+ `--scope=global` or `--scope=project`. See
45
+ [`docs/installation.md`](docs/installation.md) for the full matrix.
46
+
39
47
  ### For teams (recommended)
40
48
 
41
49
  Run once in the project root — `npx` resolves the runtime against the
@@ -77,6 +85,48 @@ Copilot fallback) is wired through one universal dispatcher per
77
85
  `--format json` for tooling). The installer also dry-fires the
78
86
  dispatcher per bridge as a post-install smoke test (skip: `--no-smoke`).
79
87
 
88
+ ### Pick specific AIs
89
+
90
+ Default `init` wires every supported AI. To install just one, pass
91
+ `--tools=<name>`:
92
+
93
+ ```bash
94
+ npx @event4u/agent-config init --tools=claude-code # Claude Code
95
+ npx @event4u/agent-config init --tools=cursor # Cursor
96
+ npx @event4u/agent-config init --tools=windsurf # Windsurf
97
+ npx @event4u/agent-config init --tools=cline # Cline
98
+ npx @event4u/agent-config init --tools=gemini-cli # Gemini CLI
99
+ npx @event4u/agent-config init --tools=copilot # GitHub Copilot
100
+ npx @event4u/agent-config init --tools=augment # Augment Code
101
+ npx @event4u/agent-config init --tools=roocode # Roo Code
102
+ npx @event4u/agent-config init --tools=aider # Aider
103
+ npx @event4u/agent-config init --tools=codex # Codex CLI
104
+ npx @event4u/agent-config init --tools=claude-desktop # Claude Desktop
105
+ npx @event4u/agent-config init --tools=continue # Continue
106
+ ```
107
+
108
+ Multiple AIs in one shot: `--tools=claude-code,cursor,augment`.
109
+
110
+ #### Global install (user-scope, available across projects)
111
+
112
+ Add `--global` to write to the user-scope paths from
113
+ [`ADR-007`](docs/decisions/ADR-007-agent-discovery-scopes.md) (`~/.claude/`,
114
+ `~/.cursor/`, …) instead of the current project:
115
+
116
+ ```bash
117
+ npx @event4u/agent-config init --global # all tools, user-scope
118
+ npx @event4u/agent-config init --tools=claude-code --global # → ~/.claude/
119
+ npx @event4u/agent-config init --tools=cursor --global # → ~/.cursor/
120
+ ```
121
+
122
+ Per-AI scope support varies — Claude Desktop, for example, is
123
+ global-only (no project-local discovery on macOS), while Roo Code and
124
+ Continue.dev are project-local. The Supported Tools table below
125
+ documents per-AI scope. Incompatible combinations (e.g.
126
+ `--tools=roocode --global` or `--tools=claude-desktop` without
127
+ `--global`) are rejected with a directive error; `--tools=all`
128
+ silently filters to the scope's compatible subset.
129
+
80
130
  ### For individual use (optional)
81
131
 
82
132
  Skills-only, global across projects — installs into the agent itself,
@@ -431,16 +481,31 @@ Every developer gets the same behavior. No per-user setup needed —
431
481
  | **Windsurf** | ✅ | — | ☑️ | Reads `.windsurfrules` + commands via AGENTS.md |
432
482
  | **Gemini CLI** | ✅ | — | ☑️ | Reads `GEMINI.md` (includes commands reference) |
433
483
  | **GitHub Copilot** | ✅ | — | ☑️ | Reads `.github/copilot-instructions.md` (includes commands) |
484
+ | **Roo Code** | ✅ | — | ☑️ | Auto-discovers `.roo/rules/*.md` + AGENTS.md |
485
+ | **Codex CLI** | ✅ | — | ☑️ | Auto-discovers `AGENTS.md` at project root |
486
+ | **Continue.dev** | ✅ | — | ☑️ | Auto-discovers `.continue/rules/*.md` + AGENTS.md |
487
+ | **Aider** | 📌 | — | — | Marker + manual `read:` in `.aider.conf.yml` |
488
+ | **Claude Desktop** | 📌 | — | — | Global-only — install with `--global` (see ADR-007) |
434
489
 
435
490
  ✅ = native support &nbsp; — = not available &nbsp; ☑️ = text reference only
436
- (commands are listed in `AGENTS.md`, but the tool cannot invoke them as
437
- native slash-commands)
491
+ (commands listed in `AGENTS.md`, tool cannot invoke them as native
492
+ slash-commands) &nbsp; 📌 = informational marker only (no auto-discovery
493
+ or manual wiring required)
438
494
 
439
495
  > **What this means in practice:** Augment Code and Claude Code get the full
440
496
  > package (rules + 174 skills + 106 native commands). Cursor, Cline, Windsurf,
441
- > Gemini CLI, and GitHub Copilot only get the **rules** natively; skills and
442
- > commands are available to them as documentation the agent can read, not as
443
- > first-class features.
497
+ > Gemini CLI, GitHub Copilot, Roo Code, Codex CLI, and Continue.dev only get
498
+ > the **rules** natively; skills and commands are available as documentation
499
+ > the agent can read, not as first-class features. Aider and Claude Desktop
500
+ > ship marker-only bridges — Aider needs a one-line `read:` entry in
501
+ > `.aider.conf.yml`; Claude Desktop is global-scope and pairs with `--global`.
502
+
503
+ > **Team reproducibility (ADR-008):** every tool you `init` is also recorded in
504
+ > `agents/installed-tools.lock` — committed, machine-managed. New team members
505
+ > run `npx @event4u/agent-config sync` after cloning and every bridge in the
506
+ > table above is replayed locally. CI can gate drift with `agent-config validate`.
507
+ > Schema, workflow, and drift catalog:
508
+ > [`docs/guidelines/agent-infra/installed-tools-manifest.md`](docs/guidelines/agent-infra/installed-tools-manifest.md).
444
509
 
445
510
  ### Plugin-installed (optional, for global use)
446
511
 
@@ -145,7 +145,7 @@ fails on any source-side violation, without producing artifacts.
145
145
  | **Skills** | 174 | On-demand expertise — stack analysis (Laravel · Symfony · Zend / Laminas · Next.js · React · Node), testing, Docker, API design, security, observability, … |
146
146
  | **Rules** | 60 | Always-active constraints — coding standards, scope control, verification, language-and-tone, agent-authority |
147
147
  | **Commands** | 106 | Slash-command workflows — `/commit`, `/create-pr`, `/fix ci`, `/optimize skills`, `/feature plan`, `/work`, `/implement-ticket`, `/compress`, … |
148
- | **Guidelines** | 69 | Reference material cited by skills — PHP patterns, Eloquent, Playwright, agent-infra, … |
148
+ | **Guidelines** | 70 | Reference material cited by skills — PHP patterns, Eloquent, Playwright, agent-infra, … |
149
149
  | **Templates** | 7 | Scaffolds for features, roadmaps, contexts, skills, overrides |
150
150
  | **Contexts** | 5 | Shared knowledge about the system itself |
151
151
 
@@ -0,0 +1,129 @@
1
+ ---
2
+ stability: beta
3
+ ---
4
+
5
+ # Tier-3 contrib plugin pattern
6
+
7
+ **Purpose.** Document the deferred-implementation contract for
8
+ **Tier-3 community AIs** — surfaces that have been named in scoping
9
+ discussions or council rounds but have **not yet been requested by
10
+ a real user**. Tier-3 ships when the first user request lands, not
11
+ on speculation.
12
+
13
+ **Scope.** Defines the candidate list, the manifest shape, the
14
+ promotion path from Tier-3 → Tier-2, and the non-implementation
15
+ guarantee. Does **not** ship code: `agents/manifests/contrib/` is
16
+ unmanifested until a user asks for an entry by name.
17
+
18
+ Last refreshed: 2026-05-12.
19
+
20
+ ## Tier definitions
21
+
22
+ | Tier | Status | Trigger | Implementation |
23
+ |---|---|---|---|
24
+ | **Tier-1** | Shipped | First-class surfaces with daily users | Imperative bridge in `scripts/install.py` |
25
+ | **Tier-2** | Shipped | Named in roadmaps + has plausible audience | Imperative bridge, same pattern as Tier-1 |
26
+ | **Tier-3** | **Deferred** | Named in scoping/council but zero user demand | Manifest YAML in `agents/manifests/contrib/` (not yet implemented) |
27
+
28
+ Phase 2.1 + 2.2 of
29
+ [`road-to-global-first-install`](../../agents/roadmaps/road-to-global-first-install.md)
30
+ closed Tier-1 and Tier-2 at **16 AIs**. Tier-3 is the explicit
31
+ overflow bucket.
32
+
33
+ ## Candidate list (frozen at proposal time)
34
+
35
+ The following surfaces are Tier-3 candidates as of 2026-05-12. They
36
+ were surfaced during the
37
+ [`2026-05-12-installer-expansion`](../../agents/council-sessions/2026-05-12-installer-expansion/synthesis.md)
38
+ council round and have **no entries** in `_VALID_TOOLS`,
39
+ `USER_SCOPE_PATHS`, `SCOPE_SUPPORT`, or the bash `VALID_TOOLS` set.
40
+
41
+ - `qoder` — community fork, no public adoption signal
42
+ - `trae` — ByteDance IDE, behind login wall
43
+ - `opencode` — bundled into VS Code variants; coverage already via `vscode`
44
+ - `codebuddy` — Tencent-internal, no public install path
45
+ - `droid` — proposed CLI agent, alpha
46
+ - `warp` — terminal-with-AI; integration shape unclear (PTY vs file marker)
47
+ - `antigravity` — Google research project, no shipping surface
48
+
49
+ Inclusion in this list is **not** a commitment to ship. Promotion
50
+ requires a real user asking by name (issue, PR, council session, or
51
+ recorded ask).
52
+
53
+ ## Manifest shape (when implemented)
54
+
55
+ When the first user request lands, the responder MUST:
56
+
57
+ 1. Create `agents/manifests/contrib/<tool-id>.yml` matching the
58
+ schema below.
59
+ 2. Add the tool ID to `_VALID_TOOLS`, `USER_SCOPE_PATHS`,
60
+ `SCOPE_SUPPORT`, and the bash `VALID_TOOLS` set.
61
+ 3. Implement `ensure_<tool>_bridge` in `scripts/install.py` (≤60 LOC
62
+ — if larger, escalate via ADR per Phase 2.5 gate).
63
+ 4. Append a row to the `README.md` "Supported Tools" table.
64
+ 5. Re-run `task lint-skills` + `python3 -m pytest tests/test_install_py.py`.
65
+
66
+ ```yaml
67
+ # agents/manifests/contrib/<tool-id>.yml
68
+ tool_id: <slug> # lowercase, hyphen-separated
69
+ display_name: <Pretty> # for README + CLI catalog
70
+ scope: project | global | both
71
+ discovery: marker | hook | config-merge
72
+ marker_path: <relative> # e.g. .tool-id/agent-config.md
73
+ requested_by: <ref> # GitHub issue, PR, council session, etc.
74
+ requested_date: YYYY-MM-DD
75
+ notes: |
76
+ Short rationale, integration shape, known limitations.
77
+ ```
78
+
79
+ ## Non-implementation guarantee
80
+
81
+ `agents/manifests/contrib/` does **not** exist until needed. CI does
82
+ not enforce its presence. The pattern is documented, not scaffolded.
83
+
84
+ This prevents two failure modes:
85
+
86
+ 1. **Empty-shell drift** — a directory of YAML stubs with no
87
+ corresponding code, where the manifest claims support but the
88
+ installer silently no-ops.
89
+ 2. **Speculative breadth** — adding 7 IDs to `_VALID_TOOLS` "in
90
+ case" a user asks, then carrying maintenance cost on dead code.
91
+
92
+ ## Promotion path
93
+
94
+ Tier-3 → Tier-2 promotion happens in a single PR:
95
+
96
+ 1. The first user request anchors the PR (link in commit body).
97
+ 2. Manifest YAML lands alongside the bridge.
98
+ 3. README + roadmap update in the same commit.
99
+ 4. After two reported successful installs (or one release cycle of
100
+ no bug reports), the tool moves out of `contrib/` and the manifest
101
+ YAML is deleted — the bridge stands on its own under the Tier-2
102
+ contract.
103
+
104
+ There is no Tier-3 → Tier-3 churn: a candidate either gets
105
+ requested and promoted, or stays unimplemented indefinitely. We do
106
+ not "preemptively scaffold" Tier-3 entries.
107
+
108
+ ## Out of scope
109
+
110
+ - **Capability matrices** — the manifest does not describe what the
111
+ tool _can_ do, only what the installer must emit. Capability docs
112
+ live in the consumer tool's own documentation.
113
+ - **Auto-discovery** — there is no plugin loader. The installer is
114
+ imperative (see Phase 2.5 gate); manifests are a documentation
115
+ contract, not a runtime input.
116
+ - **Third-party contribution channel** — this contract governs the
117
+ package maintainer's response to user requests, not a community
118
+ plugin marketplace. External plugins would require ADR-009+ to
119
+ introduce a stable extension surface.
120
+
121
+ ## Cross-references
122
+
123
+ - [`ADR-007`](../decisions/ADR-007-agent-discovery-scopes.md) —
124
+ project / global / both scope taxonomy that Tier-3 entries inherit.
125
+ - [`ADR-008`](../decisions/ADR-008-installed-tools-manifest.md) —
126
+ `agents/installed-tools.lock` for per-project state, distinct
127
+ from this maintainer-side contract.
128
+ - [`road-to-global-first-install`](../../agents/roadmaps/road-to-global-first-install.md)
129
+ Phase 2.6 — completion trigger for this contract.
@@ -0,0 +1,278 @@
1
+ ---
2
+ adr: 007
3
+ status: accepted
4
+ date: 2026-05-12
5
+ decision: global-default-install-with-export-subcommand
6
+ supersedes: —
7
+ superseded_by: —
8
+ phase: post-v2.1.0 · simplicity-and-everywhere
9
+ ---
10
+
11
+ # ADR-007 — Agent Discovery Scopes: Global-Default Install Model
12
+
13
+ ## Status
14
+
15
+ **Accepted** · 2026-05-12 · signed off by Matze after Council Round 3 convergence. Implementation tracked in `agents/roadmaps/road-to-global-first-install.md`.
16
+
17
+ Originates from user ask: "Es macht keinen Sinn, das paket nicht
18
+ global zu installieren." Validated through AI Council (2 + 1 rounds,
19
+ 2026-05-12 · members claude-sonnet-4-5 + gpt-4o). Council session:
20
+ [`agents/council-sessions/2026-05-12-global-first-strategy/`](../../agents/council-sessions/2026-05-12-global-first-strategy/). <!-- council-ref-allowed: ADR decision trace -->
21
+
22
+ ## Context
23
+
24
+ `event4u/agent-config` v2.1.0 ships strictly via
25
+ `npx @event4u/create-agent-config init`, project-scoped. The package
26
+ must serve **10 distinct AI agents**, each with its own discovery
27
+ rules — both user-scope (global) and project-scope (workspace) paths.
28
+ Today the CLI only installs project-locally; a `global` subcommand
29
+ in `scripts/agent-config` returns "reserved for Phase 3 of
30
+ road-to-simplicity-and-everywhere".
31
+
32
+ The user wants global to be the **default** path, not a special case.
33
+ Before flipping the default, we needed to answer four blocking
34
+ questions: (1) is global-default sound across all 10 agents? (2) how
35
+ do we detect user intent? (3) how do we handle tools that
36
+ project-scope wins? (4) how do we preserve version reproducibility
37
+ once `npx` resolves global state?
38
+
39
+ ### Relationship to the retired `--global` (commit `5388de25`)
40
+
41
+ A previous `--global` flag existed in `scripts/install.py` and was
42
+ **retired** on 2026-05-12 alongside the composer/npm drop
43
+ (`road-to-portable-runtime-and-update-check` step P0.5,
44
+ [archived roadmap](../../agents/roadmaps/archive/road-to-portable-runtime-and-update-check.md)).
45
+ The retired design was an **in-project symlink scheme** driven by
46
+ `templates/global-install-manifest.yml` — it wrote symlinks *into the
47
+ project* pointing back at a curated set in the user's home. Pain that
48
+ killed it: gitignore drift, link breakage on rebase / worktree, and a
49
+ manifest separate from the main install set that drifted out of sync.
50
+
51
+ ADR-007's `--global` is a **different mechanism with the same flag
52
+ name**:
53
+
54
+ | Dimension | Retired `--global` (pre `5388de25`) | ADR-007 `--global` (this decision) |
55
+ |---|---|---|
56
+ | Files live in | Project repo (`.claude/`, …) as symlinks | User home (`~/.claude/`, …) as **real files** |
57
+ | Manifest | Separate curated `global-install-manifest.yml` | Same full set as project install (D4) |
58
+ | Project-side artefacts | Symlinks, gitignored | None by default; opt-in via `export` (D3) |
59
+ | Version-pin governance | None — drift via symlink target swap | `~/.config/agent-config/installed.lock` (D5) |
60
+ | In-project gitignore footprint | Required and brittle | Zero |
61
+
62
+ The retired pain is structurally absent from the new design: no
63
+ in-project symlinks, no manifest split, an explicit version lockfile.
64
+ The flag name is reused; the implementation is rebuilt.
65
+
66
+ ### Verified per-agent discovery matrix (May 2026)
67
+
68
+ | Agent | User-scope (global) | Project-scope | Precedence |
69
+ |---|---|---|---|
70
+ | Claude Code | `~/.claude/{skills,commands,rules,settings.json}` + `~/.claude/CLAUDE.md` | `.claude/…` + `CLAUDE.md` | managed > user > project (skills) |
71
+ | Claude Desktop | `~/.claude/` (shared) | — | user only |
72
+ | Cursor | User Rules (app settings) + `~/.cursor/` (MCP) | `.cursor/rules/*.mdc` | team > user > project |
73
+ | Windsurf | `~/.codeium/windsurf/global_rules.md` + `…/global_workflows/` | `.windsurfrules` + `.windsurf/{rules,workflows}/` | **workspace > global** |
74
+ | Cline | `~/Documents/Cline/Rules/` | `.clinerules` (file or dir) | **workspace > global** |
75
+ | Augment Code | `~/.augment/{rules,commands}/` | `.augment/{rules,commands}` + `.augment-guidelines` + `AGENTS.md` | workspace > user (cmds); user always-on (rules) |
76
+ | GitHub Copilot | `~/.copilot/copilot-instructions.md` (CLI) + Personal Instructions (settings) | `.github/copilot-instructions.md` + `.github/instructions/*` | personal > repo > org |
77
+ | Gemini CLI | `~/.gemini/GEMINI.md` + `~/.gemini/settings.json` | `GEMINI.md` (hierarchical) + `.gemini/settings.json` | **project > user > system** |
78
+ | Aider | `~/.aider.conf.yml` + `~/.aider.conventions.md` | `.aider.conf.yml` (git root) + `CONVENTIONS.md` | last loaded wins |
79
+ | OpenAI Codex | `~/.codex/AGENTS.md` (+ override) + `$HOME/.agents/skills` | `AGENTS.md` (repo + nested) + `.agents/skills` + `.codex/config.toml` | closer-to-cwd wins |
80
+
81
+ **Finding:** every supported agent has a user-scope path. Global
82
+ install is technically viable across the entire matrix.
83
+
84
+ **Asymmetry that bit the original strategy:** Windsurf and Cline are
85
+ `workspace > global` — a project-local override silently wins. Gemini
86
+ is `project > user > system`. Claude Code is `user > project` for
87
+ skills. A symlink-bridge approach (originally proposed) cannot give a
88
+ consistent cross-tool experience because per-tool precedence rules
89
+ differ.
90
+
91
+ ## Council Process
92
+
93
+ | Round | Members | Cost (actual) | Verdict |
94
+ |---|---|---|---|
95
+ | 1 + 2 (interleaved) | claude-sonnet-4-5 + gpt-4o | $0.0443 | claude: **REJECT** · gpt-4o: **MODIFY** |
96
+ | 3 (targeted resolution) | same | $0.0252 | **3/4 convergence** |
97
+
98
+ Full responses:
99
+ [`responses.json`](../../agents/council-sessions/2026-05-12-global-first-strategy/responses.json), <!-- council-ref-allowed: ADR decision trace -->
100
+ [`responses-round3.json`](../../agents/council-sessions/2026-05-12-global-first-strategy/responses-round3.json). <!-- council-ref-allowed: ADR decision trace -->
101
+
102
+ ## Decision
103
+
104
+ Adopt **Global-Default Install with Export-Subcommand** in five parts.
105
+
106
+ ### D1 — Install scope: global is the default
107
+
108
+ `npx @event4u/create-agent-config init` defaults to **user-scope
109
+ install** (`~/.claude/`, `~/.cursor/`, `~/.codeium/windsurf/`,
110
+ `~/.augment/`, `~/Documents/Cline/Rules/`, `~/.copilot/`, `~/.gemini/`,
111
+ `~/.aider.conventions.md`, `~/.codex/`). Project-scope install is
112
+ **opt-in** via `--project[=<dir>]`. Global is no longer a flag — it
113
+ is the brand promise.
114
+
115
+ Rationale: one npx invocation = configured everywhere. Per-project
116
+ overrides remain available via existing `.agent-settings.yml` merge
117
+ chain (`~/.config/agent-config/agent-settings.yml` → project
118
+ `.agent-settings.yml` → CLI flags).
119
+
120
+ ### D2 — Init UX: prompt only on ambiguity
121
+
122
+ | Signal | Behaviour |
123
+ |---|---|
124
+ | CWD has existing `.agent-settings.yml` | Install **project** (current behaviour preserved) |
125
+ | CWD has `package.json` / `composer.json` / `pyproject.toml` AND existing AI-tool config (`.claude/`, `.cursor/`, etc.) | Prompt: `Project (current dir) / User (~/) / Custom path` |
126
+ | CWD has existing `~/.claude/CLAUDE.md` and command would overwrite | Prompt: `Merge / Backup-and-replace / Abort` — **Hard Floor** |
127
+ | Anything else (incl. CWD = `~/`, empty dir, dotfile-git repos) | Install **global**, no prompt |
128
+
129
+ `.git/` presence is **explicitly not a signal** (monorepos, dotfile
130
+ managers, Hg/SVN workspaces all break it). Replaced by multi-signal
131
+ detection + collision-triggered prompt.
132
+
133
+ ### D3 — Bridge → Export
134
+
135
+ The originally proposed symlink-bridge subcommand is **rejected**.
136
+ Replaced by:
137
+
138
+ ```
139
+ agent-config export --tool=<x> --output=<path> [--force]
140
+ ```
141
+
142
+ Behaviour:
143
+ - Writes a **real file** (no symlink) with the resolved content for
144
+ the named tool, into the user-specified path.
145
+ - Idempotent. `--force` overwrites; default refuses on existing file
146
+ with non-matching content (Hard Floor).
147
+ - User decides path — no canonical defaults baked in (tool-specific
148
+ paths drift upstream).
149
+ - Use cases: committing `.github/copilot-instructions.md` for team
150
+ sharing, versioning `AGENTS.md` or `CLAUDE.md` in repo, exporting
151
+ curated subsets to `docs/ai-context.md`.
152
+
153
+ Rejected: symlink-bridge. Reasons (council-converged):
154
+ - Tool-precedence asymmetry makes symlinks behave differently per
155
+ tool (Windsurf ignores global-bridged file; Claude Code honors it).
156
+ - Symlinks under Git track the pointer path, not content — useless
157
+ on team-mate machines where `~/` differs.
158
+ - Windows symlink privilege (`SeCreateSymbolicLinkPrivilege`) is
159
+ developer-mode / admin-only; corporate Group Policy frequently
160
+ blocks it.
161
+ - EDR tools quarantine symlinks in user-profile config directories
162
+ as "unusual script activity".
163
+
164
+ ### D4 — Manifest: single full set, no curation split
165
+
166
+ Global install ships **all** kernel + tier-1 + tier-2 + skills (same
167
+ manifest as project install). No `templates/global-install-manifest.yml`.
168
+
169
+ Council convergence is **3/4** here — anthropic strongly recommends
170
+ **(a) full** with the argument "10 MB is negligible on any dev
171
+ machine; curated subset creates drift + discovery problems + a second
172
+ command to unblock the rest". OpenAI prefers **(b) curated** but with
173
+ generic rationale.
174
+
175
+ **Residual debate:** the (b) curated camp can still be honored
176
+ post-implementation by adding an `agent-config install --minimal`
177
+ flag without changing the default, if real-world feedback shows the
178
+ full footprint hurts. The decision here is "ship full, narrow later
179
+ if needed" rather than "ship curated, broaden later".
180
+
181
+ ### D5 — Version reproducibility: lockfile
182
+
183
+ ```
184
+ ~/.config/agent-config/installed.lock
185
+ ```
186
+
187
+ Schema:
188
+ ```json
189
+ {
190
+ "version": "2.2.0",
191
+ "installed_at": "2026-05-12T10:30:00Z",
192
+ "tools": ["claude-code", "cursor", "windsurf"]
193
+ }
194
+ ```
195
+
196
+ `init` on existing lock with matching version: **skip**.
197
+ `init` on existing lock with differing version: **fail loud** with
198
+ "Installed: v2.1.0. Current: v2.2.0. Run `agent-config update` or
199
+ `init --force`."
200
+
201
+ `update` is an explicit subcommand. Writes new lock atomically. No
202
+ silent updates ever.
203
+
204
+ ### D6 — Source-repo guard stays
205
+
206
+ `AGENT_CONFIG_ALLOW_SELF_INSTALL=1` requirement when run from inside
207
+ the `agent-config` source repo applies to **both** global and
208
+ project modes (a stray `npx … init` from inside the source tree
209
+ would overwrite the maintainer's `~/.claude/` with package's own
210
+ maintainer manifest).
211
+
212
+ ## Consequences
213
+
214
+ ### Positive
215
+
216
+ - One command, every project: `npx @event4u/create-agent-config init` works
217
+ in `~/`, in a fresh project, in an existing project with no config.
218
+ - Cross-tool consistency: every supported agent gets the same skill /
219
+ rule set from one source of truth in `~/`.
220
+ - No symlink-related fragility (Windows, EDR, Git semantics).
221
+ - Version reproducibility via lockfile is auditable, inspectable, and
222
+ explicit.
223
+
224
+ ### Negative
225
+
226
+ - Behavioural change vs v2.1.0: existing project-installs continue to
227
+ work, but new installs default to a different location. Ships as a
228
+ v2.x release (v2.0.0 was the breaking npx-only cut; subsequent v2.x
229
+ work refines that line — no v3.0.0 planned). Documented migration
230
+ in the release notes is required.
231
+ - Tools with `workspace > global` precedence (Windsurf, Cline,
232
+ Gemini) require user action to bridge: either `agent-config export`
233
+ into the project or `--project` flag at install. Pure global-only
234
+ users on those tools may not see the rules apply inside specific
235
+ repos.
236
+ - A `~/.config/agent-config/installed.lock` introduces a new state
237
+ surface. Uninstall must remove it cleanly; corrupted-lock recovery
238
+ needs documenting.
239
+ - Curation decision is provisional. If `~/.claude/skills/` footprint
240
+ causes complaints, post-launch we may need to add a `--minimal`
241
+ install profile (revisits D4).
242
+
243
+ ### Neutral
244
+
245
+ - The latent `--global` flag in `scripts/install.py` becomes the new
246
+ default codepath — no longer hidden, fully exercised in CI.
247
+ - The `bridge` subcommand reserved for "Phase 3 of
248
+ road-to-simplicity-and-everywhere" is **never built**. Roadmap
249
+ entry should be updated to point at `export` instead.
250
+
251
+ ## Implementation Plan (deferred to roadmap)
252
+
253
+ Out of scope for this ADR. Sequencing target for a separate roadmap:
254
+
255
+ 1. Branch `feat/global-first-install` (requires user permission to
256
+ create — not auto-spawned by this ADR).
257
+ 2. Wire `scripts/install.py --global` through `create-agent-config`
258
+ npx entry + `scripts/agent-config global` subcommand.
259
+ 3. Implement multi-signal detection + collision prompt.
260
+ 4. Implement `agent-config export --tool=<x> --output=<path>`.
261
+ 5. Implement `~/.config/agent-config/installed.lock` + `update`
262
+ subcommand.
263
+ 6. Update `docs/installation.md`, per-IDE setup pages, `README.md`
264
+ tagline.
265
+ 7. Add CI matrix: global-install path on macOS, Linux, Windows
266
+ (lockfile, prompt suppression, Hard Floor enforcement).
267
+ 8. CHANGELOG entry + v2.x migration guide.
268
+
269
+ ## References
270
+
271
+ - Council session:
272
+ [`agents/council-sessions/2026-05-12-global-first-strategy/`](../../agents/council-sessions/2026-05-12-global-first-strategy/) <!-- council-ref-allowed: ADR decision trace -->
273
+ - User-scope discovery matrix sources: agent vendor official docs
274
+ (Claude, Cursor, Windsurf, Cline, Augment, Copilot, Gemini, Aider,
275
+ Codex) accessed 2026-05-12.
276
+ - Prior latent global code: `scripts/install.py` (~280 LOC, never
277
+ reachable from npx entry).
278
+ - Related rule: [`non-destructive-by-default`](../../.augment/rules/non-destructive-by-default.md) — Hard Floor on overwrite of user's existing `~/.claude/CLAUDE.md`.