@event4u/agent-config 2.6.1 → 2.7.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 (131) hide show
  1. package/.agent-src/commands/agent-handoff.md +1 -0
  2. package/.agent-src/commands/agent-status.md +1 -0
  3. package/.agent-src/commands/agents/audit.md +1 -0
  4. package/.agent-src/commands/agents/init.md +1 -0
  5. package/.agent-src/commands/agents/optimize.md +1 -0
  6. package/.agent-src/commands/agents.md +1 -0
  7. package/.agent-src/commands/analyze-reference-repo.md +1 -0
  8. package/.agent-src/commands/bug-fix.md +1 -0
  9. package/.agent-src/commands/bug-investigate.md +1 -0
  10. package/.agent-src/commands/challenge-me/vision.md +1 -0
  11. package/.agent-src/commands/challenge-me/with-docs.md +1 -0
  12. package/.agent-src/commands/challenge-me.md +1 -0
  13. package/.agent-src/commands/chat-history/import.md +1 -0
  14. package/.agent-src/commands/chat-history/learn.md +1 -0
  15. package/.agent-src/commands/chat-history/show.md +1 -0
  16. package/.agent-src/commands/chat-history.md +1 -0
  17. package/.agent-src/commands/check-current-md.md +1 -0
  18. package/.agent-src/commands/commit/in-chunks.md +1 -0
  19. package/.agent-src/commands/commit.md +1 -0
  20. package/.agent-src/commands/compress.md +1 -0
  21. package/.agent-src/commands/context/create.md +1 -0
  22. package/.agent-src/commands/context/refactor.md +1 -0
  23. package/.agent-src/commands/context.md +1 -0
  24. package/.agent-src/commands/cost-report.md +1 -0
  25. package/.agent-src/commands/council/default.md +1 -0
  26. package/.agent-src/commands/council/design.md +1 -0
  27. package/.agent-src/commands/council/optimize.md +1 -0
  28. package/.agent-src/commands/council/pr.md +1 -0
  29. package/.agent-src/commands/council.md +1 -0
  30. package/.agent-src/commands/create-pr/description-only.md +1 -0
  31. package/.agent-src/commands/create-pr.md +1 -0
  32. package/.agent-src/commands/e2e-heal.md +1 -0
  33. package/.agent-src/commands/e2e-plan.md +1 -0
  34. package/.agent-src/commands/estimate-ticket.md +1 -0
  35. package/.agent-src/commands/feature/dev.md +1 -0
  36. package/.agent-src/commands/feature/explore.md +1 -0
  37. package/.agent-src/commands/feature/plan.md +1 -0
  38. package/.agent-src/commands/feature/refactor.md +1 -0
  39. package/.agent-src/commands/feature/roadmap.md +1 -0
  40. package/.agent-src/commands/feature.md +1 -0
  41. package/.agent-src/commands/fix/ci.md +1 -0
  42. package/.agent-src/commands/fix/portability.md +1 -0
  43. package/.agent-src/commands/fix/pr-bot-comments.md +1 -0
  44. package/.agent-src/commands/fix/pr-comments.md +1 -0
  45. package/.agent-src/commands/fix/pr-developer-comments.md +1 -0
  46. package/.agent-src/commands/fix/refs.md +1 -0
  47. package/.agent-src/commands/fix/seeder.md +1 -0
  48. package/.agent-src/commands/fix.md +1 -0
  49. package/.agent-src/commands/grill-me.md +1 -0
  50. package/.agent-src/commands/implement-ticket.md +1 -0
  51. package/.agent-src/commands/jira-ticket.md +1 -0
  52. package/.agent-src/commands/judge/on-diff.md +1 -0
  53. package/.agent-src/commands/judge/solo.md +1 -0
  54. package/.agent-src/commands/judge/steps.md +1 -0
  55. package/.agent-src/commands/judge.md +1 -0
  56. package/.agent-src/commands/memory/add.md +1 -0
  57. package/.agent-src/commands/memory/load.md +1 -0
  58. package/.agent-src/commands/memory/mine-session.md +1 -0
  59. package/.agent-src/commands/memory/promote.md +1 -0
  60. package/.agent-src/commands/memory/propose.md +1 -0
  61. package/.agent-src/commands/memory.md +1 -0
  62. package/.agent-src/commands/mode.md +1 -0
  63. package/.agent-src/commands/module/create.md +1 -0
  64. package/.agent-src/commands/module/explore.md +1 -0
  65. package/.agent-src/commands/module.md +1 -0
  66. package/.agent-src/commands/onboard.md +1 -0
  67. package/.agent-src/commands/optimize/agents-dir.md +1 -0
  68. package/.agent-src/commands/optimize/augmentignore.md +1 -0
  69. package/.agent-src/commands/optimize/rtk.md +1 -0
  70. package/.agent-src/commands/optimize/skills.md +1 -0
  71. package/.agent-src/commands/optimize-prompt.md +1 -0
  72. package/.agent-src/commands/optimize.md +1 -0
  73. package/.agent-src/commands/orchestrate.md +1 -0
  74. package/.agent-src/commands/override/create.md +1 -0
  75. package/.agent-src/commands/override/manage.md +1 -0
  76. package/.agent-src/commands/override.md +1 -0
  77. package/.agent-src/commands/package-reset.md +1 -0
  78. package/.agent-src/commands/package-test.md +1 -0
  79. package/.agent-src/commands/prepare-for-review.md +1 -0
  80. package/.agent-src/commands/project-analyze.md +1 -0
  81. package/.agent-src/commands/project-health.md +1 -0
  82. package/.agent-src/commands/quality-fix.md +1 -0
  83. package/.agent-src/commands/refine-ticket.md +1 -0
  84. package/.agent-src/commands/research/deep.md +1 -0
  85. package/.agent-src/commands/research/report.md +1 -0
  86. package/.agent-src/commands/research.md +1 -0
  87. package/.agent-src/commands/review-changes.md +1 -0
  88. package/.agent-src/commands/review-routing.md +1 -0
  89. package/.agent-src/commands/roadmap/ai-council.md +1 -0
  90. package/.agent-src/commands/roadmap/create.md +1 -0
  91. package/.agent-src/commands/roadmap/process-full.md +1 -0
  92. package/.agent-src/commands/roadmap/process-phase.md +1 -0
  93. package/.agent-src/commands/roadmap/process-step.md +1 -0
  94. package/.agent-src/commands/roadmap.md +1 -0
  95. package/.agent-src/commands/rule-compliance-audit.md +1 -0
  96. package/.agent-src/commands/set-cost-profile.md +1 -0
  97. package/.agent-src/commands/sync-agent-settings.md +1 -0
  98. package/.agent-src/commands/sync-gitignore/fix.md +1 -0
  99. package/.agent-src/commands/sync-gitignore.md +1 -0
  100. package/.agent-src/commands/tests/create.md +1 -0
  101. package/.agent-src/commands/tests/execute.md +1 -0
  102. package/.agent-src/commands/tests.md +1 -0
  103. package/.agent-src/commands/threat-model.md +1 -0
  104. package/.agent-src/commands/update-form-request-messages.md +1 -0
  105. package/.agent-src/commands/upstream-contribute.md +1 -0
  106. package/.agent-src/commands/work.md +1 -0
  107. package/.claude-plugin/marketplace.json +1 -1
  108. package/AGENTS.md +4 -4
  109. package/CHANGELOG.md +48 -2121
  110. package/README.md +58 -32
  111. package/docs/architecture/augment-projection.md +70 -0
  112. package/docs/architecture/claude-bundle.md +77 -0
  113. package/docs/architecture/compression.md +67 -0
  114. package/docs/architecture/multi-tool-projection.md +72 -0
  115. package/docs/architecture.md +30 -53
  116. package/docs/archive/CHANGELOG-pre-2.2.0.md +2138 -0
  117. package/docs/contracts/CHANGELOG-conventions.md +121 -0
  118. package/docs/contracts/command-surface-tiers.md +140 -0
  119. package/docs/contracts/mcp-cloud-scope.md +193 -21
  120. package/docs/contracts/mcp-phase-1-scope.md +1 -0
  121. package/docs/decisions/ADR-007-agent-discovery-scopes.md +67 -0
  122. package/docs/setup/enterprise-and-offline.md +201 -0
  123. package/docs/setup/per-ide/augment.md +37 -25
  124. package/package.json +1 -1
  125. package/scripts/_bootstrap_tier_frontmatter.py +151 -0
  126. package/scripts/agent-config +146 -83
  127. package/scripts/hermetic-install.sh +235 -0
  128. package/scripts/install.py +8 -1
  129. package/scripts/lint_command_tiers.py +115 -0
  130. package/scripts/mcp_server/__init__.py +5 -0
  131. package/scripts/schemas/command.schema.json +5 -0
package/README.md CHANGED
@@ -90,7 +90,7 @@ npx @event4u/agent-config init --tools=windsurf # Windsurf
90
90
  npx @event4u/agent-config init --tools=cline # Cline
91
91
  npx @event4u/agent-config init --tools=gemini-cli # Gemini CLI
92
92
  npx @event4u/agent-config init --tools=copilot # GitHub Copilot
93
- npx @event4u/agent-config init --tools=augment # Augment Code
93
+ npx @event4u/agent-config init --tools=augment --global # Augment Code (global-only)
94
94
  npx @event4u/agent-config init --tools=roocode # Roo Code
95
95
  npx @event4u/agent-config init --tools=aider # Aider
96
96
  npx @event4u/agent-config init --tools=codex # Codex CLI
@@ -112,13 +112,16 @@ npx @event4u/agent-config init --tools=claude-code --global # → ~/.claude/
112
112
  npx @event4u/agent-config init --tools=cursor --global # → ~/.cursor/
113
113
  ```
114
114
 
115
- Per-AI scope support varies — Claude Desktop, for example, is
116
- global-only (no project-local discovery on macOS), while Roo Code and
117
- Continue.dev are project-local. The Supported Tools table below
118
- documents per-AI scope. Incompatible combinations (e.g.
119
- `--tools=roocode --global` or `--tools=claude-desktop` without
120
- `--global`) are rejected with a directive error; `--tools=all`
121
- silently filters to the scope's compatible subset.
115
+ Per-AI scope support varies — Claude Desktop and Augment Code, for
116
+ example, are global-only (Claude Desktop has no project-local
117
+ discovery on macOS; Augment ships from a single user-scope tree
118
+ (`~/.augment/`) — see [`ADR-007 § Amendment 2026-05-13 — global-only`](docs/decisions/ADR-007-agent-discovery-scopes.md#amendment-2026-05-13--augment-global-only)),
119
+ while Roo Code and Continue.dev are project-local. The Supported
120
+ Tools table below documents per-AI scope. Incompatible combinations
121
+ (e.g. `--tools=roocode --global`, `--tools=claude-desktop` without
122
+ `--global`, or `--tools=augment` without `--global`) are rejected
123
+ with a directive error; `--tools=all` silently filters to the scope's
124
+ compatible subset.
122
125
 
123
126
  ### For individual use (optional)
124
127
 
@@ -154,10 +157,26 @@ Cloudflare account takes ~5 minutes:
154
157
  ```bash
155
158
  task mcp:cloud:login # one-time, opens browser
156
159
  task mcp:cloud:setup # check → r2-create → r2-verify → whoami
157
- task mcp:cloud:secret-put # set MCP-Token (Bearer auth, recommended)
160
+ task mcp:cloud:secret-put # opt in to bearer-auth mode (recommended for private deploys)
158
161
  # Then deploy via CI — see operator guide below.
159
162
  ```
160
163
 
164
+ The Worker ships **two MVP-1 auth modes** the operator picks at deploy
165
+ time (per `docs/contracts/mcp-cloud-scope.md` § `Auth surface`):
166
+
167
+ - **`public`** — default. No per-request auth. Edge cache plus
168
+ Cloudflare account-level DDoS shielding are the ingress controls.
169
+ Use only for OSS, read-only deploys where the URL is shared widely.
170
+ - **`bearer-auth`** — operator opt-in. Set the `MCP-Token` Wrangler
171
+ secret with `task mcp:cloud:secret-put`. Every `POST /` then
172
+ requires `Authorization: Bearer <MCP-Token>`. `GET /` liveness
173
+ stays open. Use this for private deploys.
174
+
175
+ HMAC and Cloudflare Access modes are declared but **deferred** in the
176
+ contract (`hmac-deferred`, `cf-access-deferred`) — wake-up triggers
177
+ listed there. The README intentionally names no mode the contract
178
+ has not declared (bidirectional drift test enforces this).
179
+
161
180
  After deploy your Worker lives at
162
181
  `https://agent-config-mcp.<your-account>.workers.dev` (or a custom
163
182
  domain you wire in Step 7 of the operator guide). Verify:
@@ -174,11 +193,13 @@ Full operator walkthrough (account, R2, GitHub secrets, deploy) —
174
193
  [`docs/setup/mcp-cloud-setup.md`](docs/setup/mcp-cloud-setup.md).
175
194
  Experimental — A0-cloud contract lives at `docs/contracts/mcp-cloud-scope.md` (internal reference only per `STABILITY.md`).
176
195
 
177
- #### Lock your Worker behind a Bearer token
196
+ #### Lock your Worker behind a Bearer token (`bearer-auth` mode)
178
197
 
179
- Without auth, any MCP client that knows your `*.workers.dev` URL can
180
- read the catalog. For private deploys, set the `MCP-Token` secret and
181
- the Worker will require `Authorization: Bearer <token>` on every POST:
198
+ In `bearer-auth` mode the Worker requires `Authorization: Bearer
199
+ <MCP-Token>` on every `POST /` and returns HTTP 401 + RFC 6750
200
+ `WWW-Authenticate` on mismatch. The `GET /` liveness probe stays open
201
+ so health checks keep working without the token. Switch modes by
202
+ setting (or clearing) the `MCP-Token` secret:
182
203
 
183
204
  ```bash
184
205
  task mcp:cloud:secret-put # wraps `npx wrangler secret put MCP-Token --name agent-config-mcp`
@@ -188,18 +209,21 @@ task mcp:cloud:secret-put # wraps `npx wrangler secret put MCP-Token --
188
209
  Once the secret is set, every client config block needs the token in
189
210
  its headers — see [`docs/setup/mcp-client-config.md`](docs/setup/mcp-client-config.md) § Bearer auth for the
190
211
  per-client snippets (Claude Desktop, Claude Code, Cursor, Zed,
191
- Continue). The `GET /` liveness probe stays open so health checks keep
192
- working without the token.
193
-
194
- > **Scope — Lite, not Full.** The Worker serves the read-only governance
195
- > surface (skills · commands · rules · guidelines · contexts) as MCP
196
- > prompts and resources, plus a small set of read-only tools (`memory_lookup`,
197
- > `chat_history_read`, `list_*`, `read_resource_body`). It does **not**
198
- > execute any of the ~112 Python scripts that ship with the package
199
- > (linters, audits, `task ci`, work-engine hooks, …). Those require the
200
- > full local install per [Quickstart](#quickstart). See
212
+ Continue). Mode contract is normative: `docs/contracts/mcp-cloud-scope.md`
213
+ § `Auth surface` § `bearer-auth`.
214
+
215
+ > **Scope — Lite, not Full.** The Worker serves the **MCP Lite
216
+ > scope** (`mcp_scope: lite` per `docs/contracts/mcp-cloud-scope.md`):
217
+ > the read-only governance surface (skills · commands · rules ·
218
+ > guidelines · contexts) as MCP prompts and resources, plus a small
219
+ > set of read-only tools (`memory_lookup`, `chat_history_read`,
220
+ > `list_*`, `read_resource_body`). It does **not** execute any of the
221
+ > ~112 Python scripts that ship with the package (linters, audits,
222
+ > `task ci`, work-engine hooks, …) — those require the **MCP Full
223
+ > scope** (`mcp_scope: full` — local install per [Quickstart](#quickstart)).
224
+ > The Lite vs Full boundary is normative in
201
225
  > `docs/contracts/mcp-cloud-scope.md` (internal reference only per
202
- > `STABILITY.md`) for the execution-safety boundary.
226
+ > `STABILITY.md`).
203
227
 
204
228
  ### Optional: persistent agent memory
205
229
 
@@ -467,7 +491,6 @@ Every developer gets the same behavior. No per-user setup needed —
467
491
 
468
492
  | Tool | Rules | Skills | Commands | How it works |
469
493
  |---|---|---|---|---|
470
- | **Augment VSCode/IntelliJ** | ✅ | ✅ | ✅ | Reads `.augment/` from project |
471
494
  | **Claude Code** | ✅ | ✅ | ✅ | Reads `.claude/` (skills + commands as skills) |
472
495
  | **Cursor** | ✅ | — | ☑️ | Reads `.cursor/rules/` + commands via AGENTS.md |
473
496
  | **Cline** | ✅ | — | ☑️ | Reads `.clinerules/` + commands via AGENTS.md |
@@ -478,6 +501,7 @@ Every developer gets the same behavior. No per-user setup needed —
478
501
  | **Codex CLI** | ✅ | — | ☑️ | Auto-discovers `AGENTS.md` at project root |
479
502
  | **Continue.dev** | ✅ | — | ☑️ | Auto-discovers `.continue/rules/*.md` + AGENTS.md |
480
503
  | **Aider** | 📌 | — | — | Marker + manual `read:` in `.aider.conf.yml` |
504
+ | **Augment VSCode/IntelliJ** | 📌 | — | — | Global-only — install with `--global` (see [ADR-007 Amendment 2026-05-13](docs/decisions/ADR-007-agent-discovery-scopes.md#amendment-2026-05-13--augment-global-only)); project writes `.augment/settings.json` marker only |
481
505
  | **Claude Desktop** | 📌 | — | — | Global-only — install with `--global` (see ADR-007) |
482
506
 
483
507
  ✅ = native support &nbsp; — = not available &nbsp; ☑️ = text reference only
@@ -485,13 +509,15 @@ Every developer gets the same behavior. No per-user setup needed —
485
509
  slash-commands) &nbsp; 📌 = informational marker only (no auto-discovery
486
510
  or manual wiring required)
487
511
 
488
- > **What this means in practice:** Augment Code and Claude Code get the full
489
- > package (rules + 174 skills + 106 native commands). Cursor, Cline, Windsurf,
490
- > Gemini CLI, GitHub Copilot, Roo Code, Codex CLI, and Continue.dev only get
491
- > the **rules** natively; skills and commands are available as documentation
492
- > the agent can read, not as first-class features. Aider and Claude Desktop
493
- > ship marker-only bridges Aider needs a one-line `read:` entry in
494
- > `.aider.conf.yml`; Claude Desktop is global-scope and pairs with `--global`.
512
+ > **What this means in practice:** Claude Code gets the full project-scoped
513
+ > package (rules + 174 skills + 106 native commands); Augment Code gets the
514
+ > same content but only from a single global install at `~/.augment/`.
515
+ > Cursor, Cline, Windsurf, Gemini CLI, GitHub Copilot, Roo Code, Codex CLI,
516
+ > and Continue.dev only get the **rules** natively; skills and commands are
517
+ > available as documentation the agent can read, not as first-class features.
518
+ > Aider, Augment, and Claude Desktop ship marker-only bridges in projects
519
+ > Aider needs a one-line `read:` entry in `.aider.conf.yml`; Augment and
520
+ > Claude Desktop are global-scope and pair with `--global`.
495
521
 
496
522
  > **Team reproducibility (ADR-008):** every tool you `init` is also recorded in
497
523
  > `agents/installed-tools.lock` — committed, machine-managed. New team members
@@ -0,0 +1,70 @@
1
+ # Pipeline B — Augment projection
2
+
3
+ > **Scope:** project the shipped `.agent-src/` payload into the
4
+ > `.augment/` tree that Augment Code (CLI + IDE) reads on startup.
5
+
6
+ ## Input → Transform → Output
7
+
8
+ ```
9
+ .agent-src/** ← Compressed payload (shipped in @event4u/agent-config)
10
+ ↓ scripts/compress.py:project_to_augment()
11
+ .augment/** ← Local projection (gitignored on consumer side)
12
+ rules/ ← copies (Augment historically does not load symlinked rules)
13
+ skills/ commands/ contexts/
14
+ personas/ templates/ ← symlinks into .agent-src/<dir>/
15
+ docs/guidelines/ ← symlink → docs/guidelines/ (only docs/ subdir exposed)
16
+ ```
17
+
18
+ The default mode is **copy-rules-symlink-everything-else**. The toggle
19
+ `augment.rules_use_symlinks: true` in `.agent-settings.yml` flips
20
+ rules to symlinks once the host supports it. The toggle is honored by
21
+ both [`scripts/install.sh`](../../scripts/install.sh) on the consumer
22
+ side and `project_to_augment()` in the package's own self-projection.
23
+
24
+ Cross-references inside `.agent-src/rules/*.md` use **relative paths
25
+ from `.agent-src/rules/`** (e.g. `../contexts/execution/foo.md`).
26
+ After projection, those paths resolve through the symlinks in
27
+ `.augment/`. The host agent reads `.augment/`, follows the symlink to
28
+ `.agent-src/`, and lands on the payload.
29
+
30
+ ## Entry points
31
+
32
+ | Surface | Command |
33
+ |---|---|
34
+ | Project self-projection | `task sync` (`project_to_augment()` step) — [`taskfiles/content.yml:4`](../../taskfiles/content.yml) |
35
+ | Standalone project-augment | `task project-augment` — [`taskfiles/content.yml:23`](../../taskfiles/content.yml) |
36
+ | Consumer install | `scripts/install.sh` (delegates to `scripts/install.py`) |
37
+ | Direct script | `python3 scripts/compress.py --project-augment` |
38
+
39
+ ## Invariants
40
+
41
+ 1. **`.augment/rules/` are real files** by default — symlinks break
42
+ Augment's rule loader on current versions.
43
+ 2. **Symlink targets exist** — `task sync-check` verifies every
44
+ `.augment/` symlink resolves into `.agent-src/`.
45
+ 3. **Single docs subtree** — only `docs/guidelines/` is exposed; the
46
+ `docs/contracts/` and `docs/decisions/` trees stay package-internal
47
+ (rules inline 2–3 line excerpts instead of linking out).
48
+ 4. **Idempotent** — re-running projection on a clean tree must
49
+ produce no diff. Enforced by CI.
50
+
51
+ ## Failure modes
52
+
53
+ | Symptom | Cause | Fix |
54
+ |---|---|---|
55
+ | Rule not loading in Augment | rule was symlinked instead of copied | unset `augment.rules_use_symlinks` or re-run `task project-augment` |
56
+ | Broken `load_context:` path | symlink target missing in `.agent-src/` | run `task sync` first (Pipeline A must succeed) |
57
+ | `task sync-check` fails on clean tree | source edited but `.augment/` not regenerated | `task sync` |
58
+ | Stale skill / command in `.augment/` after rename in source | projection didn't clean orphans | `task project-augment` re-runs cleanup |
59
+
60
+ ## Proving the pipeline
61
+
62
+ - [`tests/test_compress.py`](../../tests/test_compress.py) §
63
+ `test_project_to_augment_rules_mode_toggle` and surrounding cases
64
+ — exercises both copy-mode and symlink-mode for rules; verifies
65
+ symlink targets for skills / commands / contexts.
66
+ - [`scripts/smoke_path_resolution.py`](../../scripts/smoke_path_resolution.py)
67
+ — walks `.augment/rules/*.md` and resolves every `load_context:`
68
+ entry; non-zero exit means a consumer would see the same break.
69
+
70
+ ← [Architecture overview](../architecture.md)
@@ -0,0 +1,77 @@
1
+ # Pipeline D — Claude.ai cloud bundle
2
+
3
+ > **Scope:** package shipped skills into Anthropic Skills ZIP bundles
4
+ > for upload to Claude.ai Web or the Skills API. Cloud-side surfaces
5
+ > have no filesystem access, so the builder applies sandbox-aware
6
+ > transformations not needed in the on-disk projections.
7
+
8
+ ## Input → Transform → Output
9
+
10
+ ```
11
+ .agent-src/skills/<id>/SKILL.md ← Compressed skill (+ supporting assets)
12
+ ↓ scripts/build_cloud_bundle.py
13
+ dist/cloud/<skill>.zip ← Anthropic Skills bundle (Claude.ai Web / Skills API)
14
+ ```
15
+
16
+ Per-skill tier classification comes from
17
+ [`scripts/audit_cloud_compatibility.py`](../../scripts/audit_cloud_compatibility.py):
18
+
19
+ | Tier | Bundle action |
20
+ |---|---|
21
+ | **T1** | Bundle as-is — pure guidance, sandbox-safe |
22
+ | **T2** | Bundle with prepended sandbox note + package-internal path-swap |
23
+ | **T3-S** | Same as T2; optional script calls degrade gracefully on cloud |
24
+ | **T3-H** | **Skipped** — cloud-aware variant required before bundling |
25
+
26
+ Cloud-side caps enforced by the builder:
27
+
28
+ - `description` ≤ 200 chars (Claude.ai Web display limit).
29
+ - 1024-char hard cap (Anthropic Skills API spec).
30
+ - Sandbox note explains to the agent that `.agent-src/`, `agents/`,
31
+ and `task …` references are descriptive — the host has no
32
+ filesystem access.
33
+
34
+ ## Entry points
35
+
36
+ | Surface | Command |
37
+ |---|---|
38
+ | Build one skill | `task build-cloud-bundle -- SKILL=<id>` ([`taskfiles/engine.yml:184`](../../taskfiles/engine.yml)) |
39
+ | Build all eligible | `task build-cloud-bundles-all` ([`taskfiles/engine.yml:189`](../../taskfiles/engine.yml)) |
40
+ | CI dry-run | `task ci-cloud-bundle` ([`taskfiles/engine.yml:194`](../../taskfiles/engine.yml)) |
41
+ | Tier audit only | `task audit-cloud` ([`taskfiles/engine.yml:199`](../../taskfiles/engine.yml)) |
42
+
43
+ ## Invariants
44
+
45
+ 1. **No T3-H bundles** — high-coupling skills are skipped, never
46
+ silently bundled with broken expectations.
47
+ 2. **Description budget enforced** — overlong descriptions fail
48
+ the build (and CI via `ci-cloud-bundle --check`).
49
+ 3. **Package-internal paths swapped** — references to `.agent-src/`,
50
+ `scripts/`, `agents/` are rewritten to descriptive form so the
51
+ cloud agent does not attempt filesystem access.
52
+ 4. **`mcp_scope: lite`** — bundles tagged `lite` may not reference
53
+ MCP servers that require local stdio (per
54
+ [`docs/contracts/mcp-cloud-scope.md`](../contracts/mcp-cloud-scope.md)).
55
+ 5. **Deterministic ZIP** — same skill input produces identical
56
+ archive bytes (modulo timestamps, normalized in the builder).
57
+
58
+ ## Failure modes
59
+
60
+ | Symptom | Cause | Fix |
61
+ |---|---|---|
62
+ | `ci-cloud-bundle` fails on a skill | description > 200 chars, or T3-H detected | shorten frontmatter, or add cloud variant |
63
+ | `frontmatter.description` reflows to the prompt unexpectedly | over the 200-char Claude.ai cap (hard 1024) | tighten the description |
64
+ | Bundle references `.agent-src/` in body | path-swap rule missing | extend `build_cloud_bundle.py` rewrite table |
65
+ | Skill silently dropped from `dist/cloud/` | T3-H tier (cloud-unsafe) | author a cloud-aware variant, re-classify |
66
+
67
+ ## Proving the pipeline
68
+
69
+ - [`tests/test_build_cloud_bundle.py`](../../tests/test_build_cloud_bundle.py)
70
+ — covers tier filtering, sandbox-note injection, path-swap, and
71
+ description-cap enforcement.
72
+ - [`tests/test_claude_desktop_bundler.py`](../../tests/test_claude_desktop_bundler.py)
73
+ — complementary coverage for the Claude Desktop bundle surface.
74
+ - CI gate: `task ci-cloud-bundle` runs the builder in `--check` mode
75
+ on every PR.
76
+
77
+ ← [Architecture overview](../architecture.md)
@@ -0,0 +1,67 @@
1
+ # Pipeline A — Compression
2
+
3
+ > **Scope:** transform verbose authoring source into the token-efficient
4
+ > distribution payload that ships in the npm package.
5
+
6
+ ## Input → Transform → Output
7
+
8
+ ```
9
+ .agent-src.uncompressed/** ← Source of truth (verbose, human-readable)
10
+ ↓ scripts/compress.py + scripts/compress.sh (--sync)
11
+ .agent-src/** ← Compressed, hash-tracked, shipped in @event4u/agent-config
12
+ ```
13
+
14
+ | Layer | Source | Output |
15
+ |---|---|---|
16
+ | Skills | `.agent-src.uncompressed/skills/<id>/SKILL.md` (+ assets) | `.agent-src/skills/<id>/SKILL.md` |
17
+ | Rules | `.agent-src.uncompressed/rules/<name>.md` | `.agent-src/rules/<name>.md` |
18
+ | Commands | `.agent-src.uncompressed/commands/**` | `.agent-src/commands/**` |
19
+ | Personas, contexts, templates | `.agent-src.uncompressed/<dir>/**` | `.agent-src/<dir>/**` |
20
+
21
+ The path rewriter ([`scripts/compress.py:157`](../../scripts/compress.py)
22
+ `apply_path_rewriter()`) converts logical names in source frontmatter
23
+ (`contexts/execution/foo.md`) into the relative form expected from
24
+ `.agent-src/rules/` (`../contexts/execution/foo.md`). Hardcoding
25
+ `.agent-src.uncompressed/` in source is a CI failure — caught by
26
+ [`scripts/check_compressed_paths.py`](../../scripts/check_compressed_paths.py).
27
+
28
+ ## Entry points
29
+
30
+ | Surface | Command |
31
+ |---|---|
32
+ | Full sync | `task sync` ([`taskfiles/content.yml:4`](../../taskfiles/content.yml)) |
33
+ | Sync drift check | `task sync-check` ([`taskfiles/content.yml:38`](../../taskfiles/content.yml)) |
34
+ | Hash drift check | `task sync-check-hashes` ([`taskfiles/content.yml:43`](../../taskfiles/content.yml)) |
35
+ | Single file | `task sync-mark-done -- <path>` |
36
+ | Direct script | `bash scripts/compress.sh --sync` |
37
+
38
+ ## Invariants
39
+
40
+ 1. **Determinism** — same input must produce identical bytes in
41
+ `.agent-src/`. CI enforces via `task sync-check` (no output diff
42
+ permitted on a clean checkout).
43
+ 2. **Hash tracking** — every compressed file's source-hash is stored
44
+ in `.agent-src/.compression-hashes.json`; stale hashes are caught
45
+ by `task sync-check-hashes`.
46
+ 3. **No source-side leakage** — `.agent-src.uncompressed/` must not
47
+ appear anywhere in compressed output (frontmatter, body, includes).
48
+ 4. **Frontmatter preserved** — YAML frontmatter survives compression
49
+ unchanged except for the path rewriter on `load_context:` entries.
50
+
51
+ ## Failure modes
52
+
53
+ | Symptom | Cause | Fix |
54
+ |---|---|---|
55
+ | `task sync-check` fails on clean tree | source edited but not re-compressed | `task sync` |
56
+ | `check-compressed-paths` fails | `.agent-src.uncompressed/` substring leaked into compressed output | re-author source, re-run `task sync` |
57
+ | Hash drift on unchanged file | concurrent edits / merge artefact | `task sync-clean-hashes && task sync` |
58
+ | Path rewriter mangles a link | logical name collision with a real relative path | declare `validator_ignore:` in rule frontmatter |
59
+
60
+ ## Proving the pipeline
61
+
62
+ - [`tests/test_compress.py`](../../tests/test_compress.py) — end-to-end
63
+ compression, hash invariants, path rewriter.
64
+ - [`tests/test_compress_paths.py`](../../tests/test_compress_paths.py)
65
+ — path-rewriter edge cases and forbidden-substring detection.
66
+
67
+ ← [Architecture overview](../architecture.md)
@@ -0,0 +1,72 @@
1
+ # Pipeline C — Multi-tool projection
2
+
3
+ > **Scope:** generate the tool-specific surface files that non-Augment
4
+ > hosts (Claude Code, Cursor, Cline, Windsurf, Gemini CLI, Copilot CLI)
5
+ > read from their conventional locations.
6
+
7
+ ## Input → Transform → Output
8
+
9
+ ```
10
+ .agent-src/** ← Compressed payload
11
+ ↓ scripts/compress.py --generate-tools
12
+ .claude/ .cursor/ ← Claude Code, Cursor (rules + skills)
13
+ .clinerules/ .windsurfrules ← Cline (rules dir), Windsurf (concatenated file)
14
+ GEMINI.md ← Gemini CLI (symlink → AGENTS.md)
15
+ .github/copilot-instructions.md ← Copilot Chat + PR review (already shipped)
16
+ ```
17
+
18
+ Per-tool method ([`scripts/compress.py:_filter_tool_dirs`](../../scripts/compress.py)):
19
+
20
+ | Tool | Surface | Method | Coverage |
21
+ |---|---|---|---|
22
+ | Claude Code | `.claude/` | native plugin + symlinks | rules + skills + commands |
23
+ | Augment VSCode/IntelliJ | `.augment/` | install.sh copies + symlinks | rules + skills + commands |
24
+ | Copilot CLI | (plugin) | native plugin | rules + skills + commands |
25
+ | Cursor | `.cursor/` | install.sh symlinks | rules only |
26
+ | Cline | `.clinerules/` | install.sh symlinks | rules only |
27
+ | Windsurf | `.windsurfrules` | install.sh concatenates | rules only |
28
+ | Gemini CLI | `GEMINI.md` | install.sh symlink → AGENTS.md | rules only |
29
+
30
+ Hosts opt in / out via `.agent-settings.yml § tools.enabled`. The
31
+ generator filters output to enabled tools only — disabling Cursor
32
+ removes `.cursor/` on next `task generate-tools`.
33
+
34
+ ## Entry points
35
+
36
+ | Surface | Command |
37
+ |---|---|
38
+ | Regenerate all enabled | `task generate-tools` ([`taskfiles/content.yml:63`](../../taskfiles/content.yml)) |
39
+ | Clean output | `task clean-tools` ([`taskfiles/content.yml:69`](../../taskfiles/content.yml)) |
40
+ | Direct script | `python3 scripts/compress.py --generate-tools` |
41
+ | Consumer install | `scripts/install.sh` (calls `--generate-tools` after `--project-augment`) |
42
+
43
+ ## Invariants
44
+
45
+ 1. **Modern formats only** — Claude / Cursor get the host's modern
46
+ skill / rule format; legacy XML / `.cursorrules` is not emitted.
47
+ 2. **Tool gating respected** — output for `tools.enabled = false`
48
+ never appears on disk.
49
+ 3. **Determinism** — same input + settings produce identical output;
50
+ CI enforces via `task sync-check`.
51
+ 4. **Path stability** — surface files live at the host's documented
52
+ location ([Cursor](https://docs.cursor.com), [Cline](https://docs.cline.bot),
53
+ [Windsurf](https://docs.codeium.com)).
54
+
55
+ ## Failure modes
56
+
57
+ | Symptom | Cause | Fix |
58
+ |---|---|---|
59
+ | Cursor doesn't see rules | `.cursor/` not generated | `tools.enabled.cursor: true` then `task generate-tools` |
60
+ | Claude Code missing a skill | skill not in `.agent-src/` yet | run Pipeline A (`task sync`) first |
61
+ | Stale `.windsurfrules` after rule rename | concatenation cache | `task clean-tools && task generate-tools` |
62
+ | Gemini CLI reads outdated content | `AGENTS.md` changed without re-symlink | `task generate-tools` |
63
+
64
+ ## Proving the pipeline
65
+
66
+ - [`tests/test_modern_editor_formats.py`](../../tests/test_modern_editor_formats.py)
67
+ — verifies Claude / Cursor receive modern format with correct
68
+ frontmatter; runs only when `task generate-tools` has been executed.
69
+ - [`tests/test_compress.py`](../../tests/test_compress.py) — covers
70
+ the shared compress / generate-tools entrypoint and `_filter_tool_dirs`.
71
+
72
+ ← [Architecture overview](../architecture.md)
@@ -21,44 +21,36 @@ Stability tiers follow [`docs/contracts/STABILITY.md`](contracts/STABILITY.md):
21
21
  > The previous "observability, feedback, lifecycle" layers were removed in
22
22
  > 1.5 — they were scaffolds without production consumers.
23
23
 
24
- ## Content pipeline
24
+ ## Content pipelines
25
+
26
+ The end-to-end flow from source authoring to distributed surfaces
27
+ is four discrete pipelines, each owned by one sub-page. Each page
28
+ documents input → transform → output, invariants, failure modes,
29
+ and cites the script, Taskfile target, and test file that prove
30
+ the pipeline.
25
31
 
26
32
  ```
27
- .agent-src.uncompressed/ Source of truth (verbose, human-readable)
28
- ↓ /compress command
29
- .agent-src/ ← Compressed output (token-efficient, shipped in the package)
30
- ↓ project_to_augment() — copies rules by default, symlinks rest
31
- (toggle: augment.rules_use_symlinks)
32
- .augment/ ← Local projection for Augment Code (gitignored)
33
- ↓ install.sh (Cursor, Cline, Windsurf, Augment VSCode) / plugin system
34
- .claude/ .cursor/ .clinerules/ ← Tool-specific symlinks/copies (auto-generated)
35
- .windsurfrules GEMINI.md
36
- ↓ scripts/build_cloud_bundle.py (Phase 1 — cloud distribution)
37
- dist/cloud/<skill>.zip ← Anthropic Skills bundles (Claude.ai Web / Skills API)
33
+ .agent-src.uncompressed/ ──Pipeline A──▶ .agent-src/
34
+
35
+ ├──Pipeline B──▶ .augment/
36
+
37
+ ├──Pipeline C──▶ .claude/ · .cursor/ · .clinerules/
38
+ .windsurfrules · GEMINI.md
39
+
40
+ └──Pipeline D──▶ dist/cloud/<skill>.zip
38
41
  ```
39
42
 
40
- ### Installer layout
41
-
42
- In a consumer project, the installer (`scripts/install.sh`) and the
43
- package's own `project_to_augment()` projection produce a `.augment/`
44
- tree where:
45
-
46
- - `.augment/rules/` — **copies** of compressed rule files by default.
47
- Augment Code historically does not load symlinked rules, so each
48
- rule is a real file. Set `augment.rules_use_symlinks: true` in
49
- `.agent-settings.yml` to switch them to symlinks once Augment Code
50
- supports it (the toggle is honored by both `scripts/install.sh` on
51
- the consumer side and `project_to_augment()` in the package).
52
- - `.augment/skills/`, `.augment/commands/`, `.augment/personas/`,
53
- `.augment/contexts/`, `.augment/templates/` — **symlinks** into
54
- `.agent-src/<subdir>/`. Reading a context follows the symlink to
55
- the package payload.
56
- - `.augment/docs/guidelines/` — **symlink** into the package's
57
- `docs/guidelines/` (consumer side: `node_modules/@event4u/agent-config/docs/guidelines/`;
58
- package self-projection: `../docs/guidelines/`). This is the only
59
- `docs/` subdirectory exposed in `.augment/`; `docs/contracts/` and
60
- `docs/decisions/` are package-internal — rules that reference
61
- contracts inline a 2–3 line excerpt instead of linking out.
43
+ | Pipeline | Page | Output |
44
+ |---|---|---|
45
+ | **A.** Compression | [`architecture/compression.md`](architecture/compression.md) | `.agent-src/` |
46
+ | **B.** Augment projection | [`architecture/augment-projection.md`](architecture/augment-projection.md) | `.augment/` |
47
+ | **C.** Multi-tool projection | [`architecture/multi-tool-projection.md`](architecture/multi-tool-projection.md) | `.claude/`, `.cursor/`, `.clinerules/`, `.windsurfrules`, `GEMINI.md` |
48
+ | **D.** Claude.ai bundle | [`architecture/claude-bundle.md`](architecture/claude-bundle.md) | `dist/cloud/<skill>.zip` |
49
+
50
+ The drift check
51
+ [`tests/test_architecture_docs_pipelines.py`](../tests/test_architecture_docs_pipelines.py)
52
+ fails if any of the four sub-pages exists without its cited script /
53
+ Taskfile target or vice versa.
62
54
 
63
55
  Cross-references inside `.agent-src/rules/*.md` are written
64
56
  **relative to `.agent-src/rules/`** (e.g. `../contexts/execution/foo.md`,
@@ -118,25 +110,10 @@ green.
118
110
 
119
111
  ### Cloud-bundle pipeline
120
112
 
121
- `task build-cloud-bundles-all` produces one ZIP per skill at
122
- `dist/cloud/<skill>.zip`, ready for upload to Claude.ai Web (Settings
123
- Customize Skills) or the Anthropic Skills API. Per-skill behavior
124
- follows the cloud-tier classification from `scripts/audit_cloud_compatibility.py`:
125
-
126
- | Tier | Bundle action |
127
- |-------|-------------------------------------------------------------------|
128
- | T1 | Bundle as-is — pure guidance, sandbox-safe |
129
- | T2 | Bundle with prepended sandbox note + package-internal path-swap |
130
- | T3-S | Same as T2; optional script calls degrade gracefully on cloud |
131
- | T3-H | **Skipped** — Phase 2 cloud-aware variant required before bundling |
132
-
133
- Cloud-side caps enforced by the builder: `description` ≤ 200 chars
134
- (Claude.ai Web) with a 1024-char hard cap (Anthropic spec). The sandbox
135
- note explains to the agent that `.agent-src/`, `agents/`, and `task …`
136
- references are descriptive — the host has no filesystem access.
137
-
138
- CI gate: `task ci-cloud-bundle` runs the builder in `--check` mode and
139
- fails on any source-side violation, without producing artifacts.
113
+ See [`architecture/claude-bundle.md`](architecture/claude-bundle.md)
114
+ for the full Pipeline D documentation tier classification, sandbox
115
+ note, package-internal path-swap, description budget, and the
116
+ `task ci-cloud-bundle` dry-run gate.
140
117
 
141
118
  ## What's inside
142
119