@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.
- package/.agent-src/commands/agent-handoff.md +1 -0
- package/.agent-src/commands/agent-status.md +1 -0
- package/.agent-src/commands/agents/audit.md +1 -0
- package/.agent-src/commands/agents/init.md +1 -0
- package/.agent-src/commands/agents/optimize.md +1 -0
- package/.agent-src/commands/agents.md +1 -0
- package/.agent-src/commands/analyze-reference-repo.md +1 -0
- package/.agent-src/commands/bug-fix.md +1 -0
- package/.agent-src/commands/bug-investigate.md +1 -0
- package/.agent-src/commands/challenge-me/vision.md +1 -0
- package/.agent-src/commands/challenge-me/with-docs.md +1 -0
- package/.agent-src/commands/challenge-me.md +1 -0
- package/.agent-src/commands/chat-history/import.md +1 -0
- package/.agent-src/commands/chat-history/learn.md +1 -0
- package/.agent-src/commands/chat-history/show.md +1 -0
- package/.agent-src/commands/chat-history.md +1 -0
- package/.agent-src/commands/check-current-md.md +1 -0
- package/.agent-src/commands/commit/in-chunks.md +1 -0
- package/.agent-src/commands/commit.md +1 -0
- package/.agent-src/commands/compress.md +1 -0
- package/.agent-src/commands/context/create.md +1 -0
- package/.agent-src/commands/context/refactor.md +1 -0
- package/.agent-src/commands/context.md +1 -0
- package/.agent-src/commands/cost-report.md +1 -0
- package/.agent-src/commands/council/default.md +1 -0
- package/.agent-src/commands/council/design.md +1 -0
- package/.agent-src/commands/council/optimize.md +1 -0
- package/.agent-src/commands/council/pr.md +1 -0
- package/.agent-src/commands/council.md +1 -0
- package/.agent-src/commands/create-pr/description-only.md +1 -0
- package/.agent-src/commands/create-pr.md +1 -0
- package/.agent-src/commands/e2e-heal.md +1 -0
- package/.agent-src/commands/e2e-plan.md +1 -0
- package/.agent-src/commands/estimate-ticket.md +1 -0
- package/.agent-src/commands/feature/dev.md +1 -0
- package/.agent-src/commands/feature/explore.md +1 -0
- package/.agent-src/commands/feature/plan.md +1 -0
- package/.agent-src/commands/feature/refactor.md +1 -0
- package/.agent-src/commands/feature/roadmap.md +1 -0
- package/.agent-src/commands/feature.md +1 -0
- package/.agent-src/commands/fix/ci.md +1 -0
- package/.agent-src/commands/fix/portability.md +1 -0
- package/.agent-src/commands/fix/pr-bot-comments.md +1 -0
- package/.agent-src/commands/fix/pr-comments.md +1 -0
- package/.agent-src/commands/fix/pr-developer-comments.md +1 -0
- package/.agent-src/commands/fix/refs.md +1 -0
- package/.agent-src/commands/fix/seeder.md +1 -0
- package/.agent-src/commands/fix.md +1 -0
- package/.agent-src/commands/grill-me.md +1 -0
- package/.agent-src/commands/implement-ticket.md +1 -0
- package/.agent-src/commands/jira-ticket.md +1 -0
- package/.agent-src/commands/judge/on-diff.md +1 -0
- package/.agent-src/commands/judge/solo.md +1 -0
- package/.agent-src/commands/judge/steps.md +1 -0
- package/.agent-src/commands/judge.md +1 -0
- package/.agent-src/commands/memory/add.md +1 -0
- package/.agent-src/commands/memory/load.md +1 -0
- package/.agent-src/commands/memory/mine-session.md +1 -0
- package/.agent-src/commands/memory/promote.md +1 -0
- package/.agent-src/commands/memory/propose.md +1 -0
- package/.agent-src/commands/memory.md +1 -0
- package/.agent-src/commands/mode.md +1 -0
- package/.agent-src/commands/module/create.md +1 -0
- package/.agent-src/commands/module/explore.md +1 -0
- package/.agent-src/commands/module.md +1 -0
- package/.agent-src/commands/onboard.md +1 -0
- package/.agent-src/commands/optimize/agents-dir.md +1 -0
- package/.agent-src/commands/optimize/augmentignore.md +1 -0
- package/.agent-src/commands/optimize/rtk.md +1 -0
- package/.agent-src/commands/optimize/skills.md +1 -0
- package/.agent-src/commands/optimize-prompt.md +1 -0
- package/.agent-src/commands/optimize.md +1 -0
- package/.agent-src/commands/orchestrate.md +1 -0
- package/.agent-src/commands/override/create.md +1 -0
- package/.agent-src/commands/override/manage.md +1 -0
- package/.agent-src/commands/override.md +1 -0
- package/.agent-src/commands/package-reset.md +1 -0
- package/.agent-src/commands/package-test.md +1 -0
- package/.agent-src/commands/prepare-for-review.md +1 -0
- package/.agent-src/commands/project-analyze.md +1 -0
- package/.agent-src/commands/project-health.md +1 -0
- package/.agent-src/commands/quality-fix.md +1 -0
- package/.agent-src/commands/refine-ticket.md +1 -0
- package/.agent-src/commands/research/deep.md +1 -0
- package/.agent-src/commands/research/report.md +1 -0
- package/.agent-src/commands/research.md +1 -0
- package/.agent-src/commands/review-changes.md +1 -0
- package/.agent-src/commands/review-routing.md +1 -0
- package/.agent-src/commands/roadmap/ai-council.md +1 -0
- package/.agent-src/commands/roadmap/create.md +1 -0
- package/.agent-src/commands/roadmap/process-full.md +1 -0
- package/.agent-src/commands/roadmap/process-phase.md +1 -0
- package/.agent-src/commands/roadmap/process-step.md +1 -0
- package/.agent-src/commands/roadmap.md +1 -0
- package/.agent-src/commands/rule-compliance-audit.md +1 -0
- package/.agent-src/commands/set-cost-profile.md +1 -0
- package/.agent-src/commands/sync-agent-settings.md +1 -0
- package/.agent-src/commands/sync-gitignore/fix.md +1 -0
- package/.agent-src/commands/sync-gitignore.md +1 -0
- package/.agent-src/commands/tests/create.md +1 -0
- package/.agent-src/commands/tests/execute.md +1 -0
- package/.agent-src/commands/tests.md +1 -0
- package/.agent-src/commands/threat-model.md +1 -0
- package/.agent-src/commands/update-form-request-messages.md +1 -0
- package/.agent-src/commands/upstream-contribute.md +1 -0
- package/.agent-src/commands/work.md +1 -0
- package/.claude-plugin/marketplace.json +1 -1
- package/AGENTS.md +4 -4
- package/CHANGELOG.md +48 -2121
- package/README.md +58 -32
- package/docs/architecture/augment-projection.md +70 -0
- package/docs/architecture/claude-bundle.md +77 -0
- package/docs/architecture/compression.md +67 -0
- package/docs/architecture/multi-tool-projection.md +72 -0
- package/docs/architecture.md +30 -53
- package/docs/archive/CHANGELOG-pre-2.2.0.md +2138 -0
- package/docs/contracts/CHANGELOG-conventions.md +121 -0
- package/docs/contracts/command-surface-tiers.md +140 -0
- package/docs/contracts/mcp-cloud-scope.md +193 -21
- package/docs/contracts/mcp-phase-1-scope.md +1 -0
- package/docs/decisions/ADR-007-agent-discovery-scopes.md +67 -0
- package/docs/setup/enterprise-and-offline.md +201 -0
- package/docs/setup/per-ide/augment.md +37 -25
- package/package.json +1 -1
- package/scripts/_bootstrap_tier_frontmatter.py +151 -0
- package/scripts/agent-config +146 -83
- package/scripts/hermetic-install.sh +235 -0
- package/scripts/install.py +8 -1
- package/scripts/lint_command_tiers.py +115 -0
- package/scripts/mcp_server/__init__.py +5 -0
- package/scripts/schemas/command.schema.json +5 -0
|
@@ -0,0 +1,121 @@
|
|
|
1
|
+
---
|
|
2
|
+
stability: stable
|
|
3
|
+
---
|
|
4
|
+
|
|
5
|
+
# Changelog Conventions
|
|
6
|
+
|
|
7
|
+
> **Status:** Active · governs the shape of [`CHANGELOG.md`](../../CHANGELOG.md)
|
|
8
|
+
> and the per-era archive files under [`docs/archive/`](../archive/).
|
|
9
|
+
> Cited from the CHANGELOG header and enforced by
|
|
10
|
+
> `tests/test_changelog_eras.py`.
|
|
11
|
+
|
|
12
|
+
## Purpose
|
|
13
|
+
|
|
14
|
+
Locks the entry shape, the breaking-change rules, and the era-split
|
|
15
|
+
discipline for `event4u/agent-config`. Auto-generated entries (e.g.
|
|
16
|
+
release-please) and hand-written entries follow the same shape so the
|
|
17
|
+
file remains uniform across automated and manual releases.
|
|
18
|
+
|
|
19
|
+
## Entry shape
|
|
20
|
+
|
|
21
|
+
Each released version is a level-2 heading with a compare link and a
|
|
22
|
+
release date:
|
|
23
|
+
|
|
24
|
+
```md
|
|
25
|
+
## [X.Y.Z](https://github.com/event4u-app/agent-config/compare/PREV...X.Y.Z) (YYYY-MM-DD)
|
|
26
|
+
```
|
|
27
|
+
|
|
28
|
+
Inside the version block, group changes under level-3 headings using
|
|
29
|
+
the Conventional Commits family the entry came from:
|
|
30
|
+
|
|
31
|
+
- `### Features` — `feat:` commits.
|
|
32
|
+
- `### Bug Fixes` — `fix:` commits.
|
|
33
|
+
- `### Chores` — `chore:`, `build:`, `ci:` commits a user might want
|
|
34
|
+
to see (silent infra-only chores stay out).
|
|
35
|
+
- `### Docs` — `docs:` commits that change user-facing behaviour or
|
|
36
|
+
surface (otherwise drop them).
|
|
37
|
+
- `### BREAKING CHANGES` — see [What counts as breaking](#what-counts-as-breaking).
|
|
38
|
+
- `### Reverts` — `revert:` commits, with the SHA of the original commit.
|
|
39
|
+
|
|
40
|
+
Each bullet is one line, scope-prefixed, with the short SHA linked:
|
|
41
|
+
|
|
42
|
+
```md
|
|
43
|
+
* **scope:** imperative-mood summary ([abc1234](https://github.com/event4u-app/agent-config/commit/abc1234...))
|
|
44
|
+
```
|
|
45
|
+
|
|
46
|
+
Optional trailers — a free-form paragraph for the release narrative
|
|
47
|
+
(only for non-trivial releases), followed by a single-line test count
|
|
48
|
+
delta:
|
|
49
|
+
|
|
50
|
+
```md
|
|
51
|
+
Tests: NNNN (+M since X.Y.(Z-1))
|
|
52
|
+
```
|
|
53
|
+
|
|
54
|
+
The test-count line is enforced for any release that ships changes to
|
|
55
|
+
`scripts/`, `workers/`, or `.agent-src/` content; it can be omitted for
|
|
56
|
+
pure-docs releases.
|
|
57
|
+
|
|
58
|
+
## What counts as breaking
|
|
59
|
+
|
|
60
|
+
A change is **breaking** (and MUST appear under `### BREAKING CHANGES`
|
|
61
|
+
**and** bump the major version) when it changes:
|
|
62
|
+
|
|
63
|
+
1. **Public CLI surface** — `agent-config <cmd>` flags / subcommands at
|
|
64
|
+
Tier-0 or Tier-1 (Tier-2 is internal per
|
|
65
|
+
[`command-surface-tiers.md`](command-surface-tiers.md) and may shift
|
|
66
|
+
without a major bump).
|
|
67
|
+
2. **Install scopes** — adding / removing a scope (`global`, `project`,
|
|
68
|
+
`mcp_scope: lite|full`) or changing its default discovery path per
|
|
69
|
+
[`ADR-007`](../decisions/ADR-007-agent-discovery-scopes.md).
|
|
70
|
+
3. **MCP Worker contracts** — anything that breaks
|
|
71
|
+
[`mcp-cloud-scope.md`](mcp-cloud-scope.md) or
|
|
72
|
+
[`mcp-phase-1-scope.md`](mcp-phase-1-scope.md) (tool shape, prompt
|
|
73
|
+
ids, resource URIs).
|
|
74
|
+
4. **Generated tree shape** — removing or renaming top-level
|
|
75
|
+
directories under `.agent-src/`, `.augment/`, `.claude/`,
|
|
76
|
+
`.cursor/`, `.clinerules/`, or `.windsurfrules`.
|
|
77
|
+
5. **Settings keys** — removing / renaming a key in
|
|
78
|
+
`.agent-settings.yml` that consumer projects may rely on. Adding a
|
|
79
|
+
new key with a default is **not** breaking.
|
|
80
|
+
6. **AGENTS.md / kernel rules** — removing or renaming an Iron-Law
|
|
81
|
+
rule, or changing the kernel-membership contract per
|
|
82
|
+
[`kernel-membership.md`](kernel-membership.md).
|
|
83
|
+
|
|
84
|
+
Internal refactors, doc rewrites, test changes, and any change to
|
|
85
|
+
files under `.agent-src.uncompressed/` that round-trip through
|
|
86
|
+
`task sync` unchanged are **not** breaking.
|
|
87
|
+
|
|
88
|
+
## Era splits
|
|
89
|
+
|
|
90
|
+
`CHANGELOG.md` keeps only the **current era** inline; prior eras live
|
|
91
|
+
under [`docs/archive/`](../archive/) and are read-only.
|
|
92
|
+
|
|
93
|
+
Drift gate — `tests/test_changelog_eras.py` fails when the current
|
|
94
|
+
era's body (lines between `# Era: X.Y.x — current` and the next era
|
|
95
|
+
header) exceeds **200 lines**. When that happens:
|
|
96
|
+
|
|
97
|
+
1. Pick the next major or significant minor boundary at the bottom of
|
|
98
|
+
the current era (typically the last `X.Y.0` release).
|
|
99
|
+
2. Move every entry at or below that boundary into
|
|
100
|
+
`docs/archive/CHANGELOG-pre-<boundary>.md`, prepending the standard
|
|
101
|
+
archive header.
|
|
102
|
+
3. Replace the moved entries in `CHANGELOG.md` with a single collapsed
|
|
103
|
+
`# Era: pre-<boundary> — archived` section that links to the
|
|
104
|
+
archive file.
|
|
105
|
+
4. Rename the active era header to `# Era: <new-current>.x — current`.
|
|
106
|
+
5. Update the `## [Unreleased]` placeholder unchanged.
|
|
107
|
+
|
|
108
|
+
Each era split lands as its own `chore(changelog): split era X.Y.x →
|
|
109
|
+
pre-X.Y.x` commit — never bundled with a feature release.
|
|
110
|
+
|
|
111
|
+
## Cross-references
|
|
112
|
+
|
|
113
|
+
- [`../../CHANGELOG.md`](../../CHANGELOG.md) — active era + Unreleased.
|
|
114
|
+
- [`../archive/CHANGELOG-pre-2.2.0.md`](../archive/CHANGELOG-pre-2.2.0.md) —
|
|
115
|
+
frozen pre-2.2.0 entries.
|
|
116
|
+
- [`command-surface-tiers.md`](command-surface-tiers.md) — Tier-0/1/2
|
|
117
|
+
split that governs CLI-surface breaking-change classification.
|
|
118
|
+
- [`mcp-cloud-scope.md`](mcp-cloud-scope.md) ·
|
|
119
|
+
[`mcp-phase-1-scope.md`](mcp-phase-1-scope.md) — MCP contract bounds.
|
|
120
|
+
- [`../decisions/ADR-007-agent-discovery-scopes.md`](../decisions/ADR-007-agent-discovery-scopes.md) —
|
|
121
|
+
install scope discovery.
|
|
@@ -0,0 +1,140 @@
|
|
|
1
|
+
# Command Surface Tiers
|
|
2
|
+
|
|
3
|
+
> **Status:** Active. Defines the tiering contract for the two
|
|
4
|
+
> command surfaces this package ships:
|
|
5
|
+
>
|
|
6
|
+
> - **CLI commands** rendered by `./agent-config --help`.
|
|
7
|
+
> - **Slash commands** under `.agent-src.uncompressed/commands/**`.
|
|
8
|
+
>
|
|
9
|
+
> Per Phase 4 of `agents/roadmaps/road-to-distribution-maturity.md`.
|
|
10
|
+
|
|
11
|
+
## Why tiering
|
|
12
|
+
|
|
13
|
+
`./agent-config --help` currently prints 45 CLI commands; the slash
|
|
14
|
+
surface ships 106 files (52 root + 54 orchestrator children). A new
|
|
15
|
+
contributor running `--help` reads a wall of operational, hook, and
|
|
16
|
+
maintenance commands before they find `init / sync / validate / work`.
|
|
17
|
+
Tiering separates **the path a new contributor walks** (Tier-0) from
|
|
18
|
+
**power-user workflows** (Tier-1) from **hook / maintenance / internal**
|
|
19
|
+
(Tier-2).
|
|
20
|
+
|
|
21
|
+
## The three tiers
|
|
22
|
+
|
|
23
|
+
### Tier-0 — daily-driver
|
|
24
|
+
|
|
25
|
+
The path a new contributor walks on day one. Visible in
|
|
26
|
+
`./agent-config --help` by default. Visible at the top of any
|
|
27
|
+
`/agents audit` listing.
|
|
28
|
+
|
|
29
|
+
**Membership criteria — ALL must hold:**
|
|
30
|
+
|
|
31
|
+
1. **First-week need.** A solo contributor hitting the package for
|
|
32
|
+
the first time will run this within their first five sessions
|
|
33
|
+
without being told.
|
|
34
|
+
2. **Stable surface.** The command name + flag set has not changed
|
|
35
|
+
in the last two minor releases (or is brand-new with a
|
|
36
|
+
commitment to two-release stability).
|
|
37
|
+
3. **No prerequisite tooling beyond `bash` + `python3`.** Docker,
|
|
38
|
+
GPG, jq, gh CLI, npm globals are all Tier-1+ territory.
|
|
39
|
+
4. **Cited in the `init → sync → validate → work` outcome path**
|
|
40
|
+
OR cited by a Hard-Floor safety rule
|
|
41
|
+
(`commit`, `keys:install-*`) OR is the AI-Council entry point
|
|
42
|
+
that the daily workflow depends on (`council:*`).
|
|
43
|
+
|
|
44
|
+
**Canonical Tier-0 members (2026-05-13):**
|
|
45
|
+
|
|
46
|
+
- CLI: `init`, `sync`, `validate`, `work`, `first-run`,
|
|
47
|
+
`keys:install-anthropic`, `keys:install-openai`,
|
|
48
|
+
`council:estimate`, `council:run`, `council:render`,
|
|
49
|
+
`implement-ticket`, `help`, `--version`.
|
|
50
|
+
- Slash: `/onboard`, `/commit`, `/work`, `/implement-ticket`,
|
|
51
|
+
`/agent-status`, `/agent-handoff`.
|
|
52
|
+
|
|
53
|
+
### Tier-1 — power-user
|
|
54
|
+
|
|
55
|
+
Workflows a contributor reaches for in week two or beyond, or
|
|
56
|
+
release / review / audit paths the maintainer team uses. Visible in
|
|
57
|
+
`./agent-config --help --tier=1` and in `/agents audit`'s expanded
|
|
58
|
+
view. Documented in the same surface as Tier-0.
|
|
59
|
+
|
|
60
|
+
**Membership criteria — ANY suffices:**
|
|
61
|
+
|
|
62
|
+
1. **Repeat workflow, not first-week.** Used by every contributor
|
|
63
|
+
eventually but not on day one (`/create-pr`, `/review-changes`,
|
|
64
|
+
`/optimize`).
|
|
65
|
+
2. **Maintainer-team gate.** Release-shape commands, audits,
|
|
66
|
+
migration helpers (`update`, `versions`, `prune`, `doctor`,
|
|
67
|
+
`export`, `migrate`, `uninstall`).
|
|
68
|
+
3. **Orchestrator dispatch surface.** Top-level slash orchestrators
|
|
69
|
+
whose children carry the actual work (`/roadmap`, `/feature`,
|
|
70
|
+
`/fix`, `/judge`, `/memory`, `/optimize`, `/council`).
|
|
71
|
+
|
|
72
|
+
### Tier-2 — maintenance / internal
|
|
73
|
+
|
|
74
|
+
Default for new commands. Hidden from `./agent-config --help`
|
|
75
|
+
unless `--tier=all`. Reachable by full name; not advertised.
|
|
76
|
+
|
|
77
|
+
**Membership criteria — ANY suffices:**
|
|
78
|
+
|
|
79
|
+
1. **Hook entry point.** `*-hook` commands wired by the platform
|
|
80
|
+
(`chat-history:hook`, `dispatch:hook`,
|
|
81
|
+
`roadmap-progress:hook`, `onboarding-gate:hook`,
|
|
82
|
+
`context-hygiene:hook`, `hooks:install`, `hooks:status`).
|
|
83
|
+
2. **Internal / programmatic.** Called by other scripts or by the
|
|
84
|
+
work-engine, never typed by a human (`memory:*`,
|
|
85
|
+
`proposal:check`, `refine-ticket:detect`, `migrate-state`,
|
|
86
|
+
`telemetry:*`, `mcp:render`, `mcp:check`, `mcp:setup`,
|
|
87
|
+
`mcp:run`, `roadmap:progress-check`).
|
|
88
|
+
3. **Sub-command of a slash orchestrator** — the orchestrator is
|
|
89
|
+
Tier-1; the children are Tier-2 because they are invoked via
|
|
90
|
+
the orchestrator's menu, not by name.
|
|
91
|
+
4. **Anything else.** Default for new commands; promotion is the
|
|
92
|
+
harder direction.
|
|
93
|
+
|
|
94
|
+
## Promotion gate (Tier-2 → Tier-1, Tier-1 → Tier-0)
|
|
95
|
+
|
|
96
|
+
Promotion is **not implicit**. Each promotion requires:
|
|
97
|
+
|
|
98
|
+
1. A short ADR under `docs/decisions/` citing this contract and
|
|
99
|
+
the specific criterion satisfied.
|
|
100
|
+
2. The frontmatter `tier:` change in the same commit as the ADR.
|
|
101
|
+
3. CI green (`tests/test_command_surface_tiers.py` + `task ci`).
|
|
102
|
+
|
|
103
|
+
Demotion is allowed without ADR (Tier-0 → Tier-1, Tier-1 → Tier-2)
|
|
104
|
+
but must update this contract's canonical list.
|
|
105
|
+
|
|
106
|
+
## Tagging shape
|
|
107
|
+
|
|
108
|
+
Slash commands carry tier in YAML frontmatter:
|
|
109
|
+
|
|
110
|
+
```yaml
|
|
111
|
+
---
|
|
112
|
+
name: commit
|
|
113
|
+
tier: 0
|
|
114
|
+
description: Stage and commit all uncommitted changes …
|
|
115
|
+
---
|
|
116
|
+
```
|
|
117
|
+
|
|
118
|
+
CLI commands carry tier in the `agent-config` heredoc, by section —
|
|
119
|
+
the help text groups commands under `## Tier 0`, `## Tier 1`,
|
|
120
|
+
`## Tier 2 (hidden by default)` headings rendered by
|
|
121
|
+
`./agent-config --help --tier=all`.
|
|
122
|
+
|
|
123
|
+
## Drift / lint
|
|
124
|
+
|
|
125
|
+
`scripts/lint_command_tiers.py` enforces:
|
|
126
|
+
|
|
127
|
+
1. Every file under `.agent-src.uncompressed/commands/**.md` has
|
|
128
|
+
a `tier:` frontmatter key whose value is `0`, `1`, or `2`.
|
|
129
|
+
2. Every command listed under `## Tier 0` / `## Tier 1` /
|
|
130
|
+
`## Tier 2` in this contract resolves to a real command file or
|
|
131
|
+
a real CLI command name.
|
|
132
|
+
3. No command appears in two tier lists in this contract.
|
|
133
|
+
|
|
134
|
+
Hooked into `task lint-skills` so it runs in CI.
|
|
135
|
+
|
|
136
|
+
## See also
|
|
137
|
+
|
|
138
|
+
- `agents/roadmaps/road-to-distribution-maturity.md` — Phase 4.
|
|
139
|
+
- `docs/contracts/command-clusters.md` — orchestrator → child wiring.
|
|
140
|
+
- `docs/contracts/STABILITY.md` — surface-stability commitments.
|
|
@@ -1,5 +1,6 @@
|
|
|
1
1
|
---
|
|
2
2
|
stability: experimental
|
|
3
|
+
mcp_scope: lite
|
|
3
4
|
---
|
|
4
5
|
|
|
5
6
|
# MCP Server — Cloud Scope (A0-cloud Hard Contract)
|
|
@@ -26,6 +27,88 @@ not a sub-process), and (2) no HMAC for MVP-1 (content is OSS and
|
|
|
26
27
|
read-only; the appendix pattern's `verifyRequest` is deferred to MVP-2
|
|
27
28
|
alongside auth).
|
|
28
29
|
|
|
30
|
+
## MCP scope: Lite vs Full
|
|
31
|
+
|
|
32
|
+
The package ships **two MCP surfaces** governed by named scopes. Every
|
|
33
|
+
MCP-related doc, ADR, and code path carries `mcp_scope: lite|full|deferred`
|
|
34
|
+
in its frontmatter (Phase 1 Step 6 of
|
|
35
|
+
`agents/roadmaps/road-to-distribution-maturity.md`) so the boundary is
|
|
36
|
+
machine-checkable, not prose-only.
|
|
37
|
+
|
|
38
|
+
### `mcp_scope: lite` — hosted, read-only knowledge surfaces
|
|
39
|
+
|
|
40
|
+
- **What it serves:** the governance content as MCP `prompts` and
|
|
41
|
+
`resources` — skills (`.agent-src/skills/<name>/SKILL.md`), commands
|
|
42
|
+
(`.agent-src/commands/**/*.md`), rules (`.agent-src/rules/*.md`),
|
|
43
|
+
guidelines (`docs/guidelines/`), and the docs index. Plus a small
|
|
44
|
+
set of **read-only tools** (`memory_lookup`, `chat_history_read`,
|
|
45
|
+
`list_*`, `read_resource_body`) that touch the content blob only.
|
|
46
|
+
- **What it never does:** execute Python scripts, shell out, spawn
|
|
47
|
+
runtimes, touch consumer FS, write to R2, mutate consumer state,
|
|
48
|
+
call upstream LLM APIs, or read `.agent-src.uncompressed/`.
|
|
49
|
+
- **Owner code path:** `workers/mcp/` (TypeScript, Cloudflare Worker).
|
|
50
|
+
This contract is the normative spec.
|
|
51
|
+
- **Auth model:** `public` (default) or `bearer-auth` (operator opt-in)
|
|
52
|
+
per `## Auth surface`. HMAC and CF Access are declared but deferred.
|
|
53
|
+
- **Invariant 8 binding:** **layered, mode-aware ingress protection**
|
|
54
|
+
(edge cache + Cloudflare DDoS shielding + per-request bearer when
|
|
55
|
+
set) is the **only** access control. Anything that would require a
|
|
56
|
+
finer-grained policy — per-tool ACLs, per-tenant scoping, mutation
|
|
57
|
+
authorization — is **out of `lite` scope by construction**, and
|
|
58
|
+
per `## A0-cloud invariants § 8` would require a contract amendment,
|
|
59
|
+
not a Worker code change.
|
|
60
|
+
|
|
61
|
+
### `mcp_scope: full` — local stdio kernel, MVP-2+ execution
|
|
62
|
+
|
|
63
|
+
- **What it serves:** the full local kernel — `prompts/list`,
|
|
64
|
+
`prompts/get`, `resources/list`, `resources/read` **plus**
|
|
65
|
+
execution-side tools (`lint_skills`, `chat_history_append`, and
|
|
66
|
+
the MVP-2 deferred tool set). Reads from the live worktree
|
|
67
|
+
(`.agent-src/` projection), not a release-pinned blob.
|
|
68
|
+
- **What it requires:** a local install per Quickstart (`npx
|
|
69
|
+
@event4u/agent-config init` or `task mcp:setup`) — Python runtime,
|
|
70
|
+
the package's ~112 scripts on disk, and a consumer-side
|
|
71
|
+
`.agent-settings.yml`.
|
|
72
|
+
- **Owner code path:** `scripts/mcp_server/` (Python stdio). Governed
|
|
73
|
+
by [`mcp-phase-1-scope.md`](mcp-phase-1-scope.md), not this
|
|
74
|
+
contract — the two surfaces are siblings, not parent / child.
|
|
75
|
+
- **Auth model:** filesystem-trusted (stdio child of the consumer
|
|
76
|
+
agent). No network surface, so no per-request auth applies.
|
|
77
|
+
- **Invariant 8 binding:** the hosted-surface ingress protection
|
|
78
|
+
declared in `## A0-cloud invariants § 8` **does not apply** to
|
|
79
|
+
`mcp_scope: full` — the trust boundary is the local FS, not the
|
|
80
|
+
Cloudflare edge. Promotion of a `full`-scope tool into the hosted
|
|
81
|
+
Worker is a **scope migration** (lite ← full), gated on the wake-up
|
|
82
|
+
triggers in `## MVP-2 wake-up triggers` plus a security review per
|
|
83
|
+
`## A0-cloud invariants § 1 + § 6`.
|
|
84
|
+
|
|
85
|
+
### `mcp_scope: deferred` — declared, not yet shipped
|
|
86
|
+
|
|
87
|
+
- Modes named in this contract (`hmac-deferred`, `cf-access-deferred`)
|
|
88
|
+
and tools listed as deprecated stubs (`lint_skills`,
|
|
89
|
+
`chat_history_append` on the hosted Worker) carry `mcp_scope:
|
|
90
|
+
deferred` until their wake-up triggers fire. README MUST NOT
|
|
91
|
+
recommend a `deferred` mode or tool — the bidirectional drift
|
|
92
|
+
test enforces this per `## Auth surface § Bidirectional contract ↔
|
|
93
|
+
README drift`.
|
|
94
|
+
|
|
95
|
+
### Boundary properties
|
|
96
|
+
|
|
97
|
+
- **README citations are normative.** The README MCP section names
|
|
98
|
+
`mcp_scope: lite` and `mcp_scope: full` as canonical scopes (see
|
|
99
|
+
[`README.md`](../../README.md) § "Self-hosted MCP on Cloudflare").
|
|
100
|
+
The bidirectional drift test ensures the names this contract
|
|
101
|
+
declares match the names the README cites.
|
|
102
|
+
- **No scope inheritance.** A `lite`-scope code path may not assume a
|
|
103
|
+
`full`-scope capability is available (e.g., the Worker may not
|
|
104
|
+
assume `lint_skills` is reachable via a fallback to the local
|
|
105
|
+
server). Each scope is self-contained.
|
|
106
|
+
- **Scope migration is a contract event.** Moving a tool from
|
|
107
|
+
`full` to `lite` (e.g., restoring `lint_skills` on the hosted
|
|
108
|
+
Worker in MVP-2+) requires this contract's `## In-scope (MVP-1)` /
|
|
109
|
+
`## Deprecated tool stub contract` sections to be updated in the
|
|
110
|
+
same PR that lands the implementation — not a follow-up.
|
|
111
|
+
|
|
29
112
|
## In-scope (MVP-1)
|
|
30
113
|
|
|
31
114
|
- **Transport:** HTTP + SSE (Cloudflare Worker `fetch` handler). The
|
|
@@ -74,12 +157,90 @@ alongside auth).
|
|
|
74
157
|
- **Chat history persistence** — the local kernel writes to
|
|
75
158
|
`agents/.agent-chat-history`; the Worker has no equivalent. Listed
|
|
76
159
|
as a deprecated stub per above.
|
|
77
|
-
- **
|
|
78
|
-
|
|
79
|
-
|
|
160
|
+
- **HMAC request signing.** Deferred to MVP-2 alongside tool
|
|
161
|
+
restoration — see `## Auth surface` § `hmac-deferred`.
|
|
162
|
+
- **Cloudflare Access integration.** Deferred to MVP-2 — see
|
|
163
|
+
`## Auth surface` § `cf-access-deferred`.
|
|
164
|
+
- **Multi-tenancy.** No per-tenant content, no tenant routing,
|
|
165
|
+
no tenant-scoped tokens. Future scope.
|
|
80
166
|
- **Network egress from the Worker** beyond an **explicit subrequest
|
|
81
167
|
allowlist** — see invariants below.
|
|
82
168
|
|
|
169
|
+
## Auth surface
|
|
170
|
+
|
|
171
|
+
The Worker ships with **two MVP-1 modes** (operator-selectable at deploy
|
|
172
|
+
time) and **two deferred modes**. The mode in effect is determined by
|
|
173
|
+
which Wrangler secrets are set on the deployed Worker — there is no
|
|
174
|
+
runtime mode switch.
|
|
175
|
+
|
|
176
|
+
### Mode `public` (MVP-1 default)
|
|
177
|
+
|
|
178
|
+
- **Trigger:** `MCP-Token` Wrangler secret is **unset**.
|
|
179
|
+
- **Ingress protection:** edge cache (Invariant 4) + Cloudflare
|
|
180
|
+
account-level anti-abuse + DDoS shielding (Invariant 8). No
|
|
181
|
+
per-request auth check.
|
|
182
|
+
- **README allowed to recommend:** mode `public` for OSS,
|
|
183
|
+
read-only deploys where the catalog URL is shared widely.
|
|
184
|
+
- **Out of scope:** any guarantee of privacy. The content is OSS;
|
|
185
|
+
the URL is the gate, the catalog is not.
|
|
186
|
+
|
|
187
|
+
### Mode `bearer-auth` (MVP-1 operator opt-in)
|
|
188
|
+
|
|
189
|
+
- **Trigger:** `MCP-Token` Wrangler secret is **set** (via
|
|
190
|
+
`task mcp:cloud:secret-put` → `wrangler secret put MCP-Token`).
|
|
191
|
+
The secret value is the bearer token clients must present.
|
|
192
|
+
- **Enforcement:** every `POST /` request must carry
|
|
193
|
+
`Authorization: Bearer <MCP-Token>`. On mismatch the Worker
|
|
194
|
+
returns HTTP `401` with a JSON-RPC error envelope (code `-32001`,
|
|
195
|
+
message `"Unauthorized"`) and the RFC 6750
|
|
196
|
+
`WWW-Authenticate: Bearer realm="agent-config-mcp"` header.
|
|
197
|
+
Implementation: `workers/mcp/src/index.ts` § auth gate (the
|
|
198
|
+
`if (requiredToken) { … }` block).
|
|
199
|
+
- **Liveness carve-out:** the `GET /` liveness probe is
|
|
200
|
+
unauthenticated by design — health checks and `curl` smoke tests
|
|
201
|
+
keep working without the token. Only `POST /` (the JSON-RPC
|
|
202
|
+
surface) is gated.
|
|
203
|
+
- **Token handling:** the secret is prompted for interactively by
|
|
204
|
+
`wrangler` — never accepted via argv per
|
|
205
|
+
[`tool-safety`](../../.agent-src/rules/tool-safety.md). The
|
|
206
|
+
Worker never logs the secret, never echoes it in error bodies,
|
|
207
|
+
and never includes it in telemetry sinks.
|
|
208
|
+
- **README allowed to recommend:** mode `bearer-auth` for private
|
|
209
|
+
deploys where the catalog URL must be unguessable but a shared
|
|
210
|
+
token is acceptable.
|
|
211
|
+
- **Out of scope:** per-client token rotation, token expiry,
|
|
212
|
+
token-scoped tool subsets, OAuth flows. Operators rotate the
|
|
213
|
+
secret by re-running `task mcp:cloud:secret-put` and updating
|
|
214
|
+
client config — there is no in-band rotation path.
|
|
215
|
+
|
|
216
|
+
### Mode `hmac-deferred` (MVP-2)
|
|
217
|
+
|
|
218
|
+
- **Status:** deferred. Wake-up triggers per `## MVP-2 wake-up
|
|
219
|
+
triggers` below.
|
|
220
|
+
- **Shape (if and when restored):** request signing per
|
|
221
|
+
[`mcp-request-signing`](../guidelines/agent-infra/mcp-request-signing.md)
|
|
222
|
+
§ HMAC pattern. Replaces `bearer-auth` for the same operator
|
|
223
|
+
cohort; not additive in MVP-2.
|
|
224
|
+
- **README allowed to recommend:** none until the mode ships. A
|
|
225
|
+
README that names `hmac-deferred` as available is a contract
|
|
226
|
+
violation.
|
|
227
|
+
|
|
228
|
+
### Mode `cf-access-deferred` (MVP-2)
|
|
229
|
+
|
|
230
|
+
- **Status:** deferred. Same wake-up triggers as `hmac-deferred`.
|
|
231
|
+
- **Shape (if and when restored):** Cloudflare Access policy in
|
|
232
|
+
front of the Worker — SSO-fronted, per-identity. Replaces
|
|
233
|
+
`bearer-auth` for the corporate-SSO operator cohort.
|
|
234
|
+
- **README allowed to recommend:** none until the mode ships.
|
|
235
|
+
|
|
236
|
+
### Bidirectional contract ↔ README drift
|
|
237
|
+
|
|
238
|
+
The README MCP section may **only** name modes that this `## Auth
|
|
239
|
+
surface` section declares. This contract must declare every mode the
|
|
240
|
+
README names. The drift test
|
|
241
|
+
`tests/test_mcp_contract_readme_sync.py` enforces both directions
|
|
242
|
+
per Phase 1 Step 4 of `agents/roadmaps/road-to-distribution-maturity.md`.
|
|
243
|
+
|
|
83
244
|
## A0-cloud invariants
|
|
84
245
|
|
|
85
246
|
The Worker code must satisfy all of:
|
|
@@ -112,22 +273,30 @@ The Worker code must satisfy all of:
|
|
|
112
273
|
Concurrent deployments are not supported; the release pipeline
|
|
113
274
|
serializes through `release: published` + `workflow_dispatch`
|
|
114
275
|
hotfix paths.
|
|
115
|
-
8. **Ingress protection
|
|
116
|
-
is
|
|
117
|
-
|
|
118
|
-
|
|
119
|
-
|
|
120
|
-
|
|
121
|
-
|
|
122
|
-
|
|
123
|
-
|
|
124
|
-
|
|
125
|
-
|
|
126
|
-
|
|
127
|
-
|
|
128
|
-
|
|
129
|
-
|
|
130
|
-
—
|
|
276
|
+
8. **Ingress protection — layered, mode-aware.** MVP-1's default
|
|
277
|
+
mode is `public` (`## Auth surface` § `public`); operators may
|
|
278
|
+
opt into `bearer-auth` by setting the `MCP-Token` Wrangler secret.
|
|
279
|
+
Two infrastructure layers apply unconditionally and one
|
|
280
|
+
per-request layer applies only in `bearer-auth`:
|
|
281
|
+
- (a) **Edge cache** per invariant 4 (1 h on pinned URLs, 5 min
|
|
282
|
+
on `latest`) absorbs read-loop traffic before it reaches the
|
|
283
|
+
Worker.
|
|
284
|
+
- (b) **Cloudflare account-level anti-abuse + DDoS shielding**
|
|
285
|
+
caps per-IP burst on `*.workers.dev`.
|
|
286
|
+
- (c) **Per-request bearer check** when `MCP-Token` is set:
|
|
287
|
+
`POST /` mismatches return HTTP 401 + JSON-RPC error +
|
|
288
|
+
RFC 6750 `WWW-Authenticate`; `GET /` liveness is exempt.
|
|
289
|
+
Layers (a)+(b) are the **public-mode** auth surrogate. Layer
|
|
290
|
+
(c) is the **bearer-auth-mode** narrowing. **Promotion triggers**
|
|
291
|
+
— any of these flips HMAC (currently `hmac-deferred` per
|
|
292
|
+
`## Auth surface`) from deferred to active before the wake-up
|
|
293
|
+
triggers below would otherwise fire: sustained 429 spikes from
|
|
294
|
+
origin (cache miss storm), Workers request-cost line item
|
|
295
|
+
exceeding the free-tier budget for two consecutive billing
|
|
296
|
+
periods, or a CVE-class abuse report against the endpoint. A
|
|
297
|
+
per-Worker `[[unsafe.bindings]]` rate-limiter in `wrangler.toml`
|
|
298
|
+
is **not** configured in MVP-1 — adding one is a contract
|
|
299
|
+
amendment, not a free hand.
|
|
131
300
|
|
|
132
301
|
## Deprecated tool stub contract
|
|
133
302
|
|
|
@@ -154,14 +323,17 @@ deprecation message. No other tool name is reachable.
|
|
|
154
323
|
## MVP-2 wake-up triggers
|
|
155
324
|
|
|
156
325
|
The Phase-7 deferred items in the roadmap (tool restoration, history
|
|
157
|
-
persistence,
|
|
326
|
+
persistence, `hmac-deferred` / `cf-access-deferred` from `## Auth
|
|
327
|
+
surface`) wake up only when **all** of these fire:
|
|
158
328
|
|
|
159
329
|
- A named consumer (internal or external) requests hosted lint or
|
|
160
330
|
history.
|
|
161
331
|
- A security review has approved the validation layer for
|
|
162
332
|
`lint_skills` (URI regex allowlist, size limits, timeout,
|
|
163
333
|
concurrency cap).
|
|
164
|
-
-
|
|
334
|
+
- A second auth model beyond `bearer-auth` has been selected
|
|
335
|
+
(HMAC or CF Access). Bearer is already MVP-1 per `## Auth
|
|
336
|
+
surface` § `bearer-auth`; the wake-up gates the **second** mode.
|
|
165
337
|
- The server stability label has been promoted from *experimental*
|
|
166
338
|
to *beta*.
|
|
167
339
|
|
|
@@ -262,6 +262,73 @@ maintainer manifest).
|
|
|
262
262
|
road-to-simplicity-and-everywhere" is **never built**. Roadmap
|
|
263
263
|
entry should be updated to point at `export` instead.
|
|
264
264
|
|
|
265
|
+
## Amendment 2026-05-13 — Augment global-only
|
|
266
|
+
|
|
267
|
+
**Status:** Accepted · 2026-05-13 · signed off by Matze.
|
|
268
|
+
|
|
269
|
+
### Trigger
|
|
270
|
+
|
|
271
|
+
Real install measurement: the full body of every file in
|
|
272
|
+
`~/.augment/rules/` counts against Augment's **49,512-char
|
|
273
|
+
workspace-guidelines limit** (not just the description stubs that
|
|
274
|
+
`scripts/measure_augment_budget.py` assumes for `type: auto` rules).
|
|
275
|
+
A populated `~/.augment/rules/` deterministically exceeds the budget
|
|
276
|
+
on every workspace (~138k chars observed — ~89k over limit).
|
|
277
|
+
|
|
278
|
+
The competing pressure: a per-project deploy of the same content
|
|
279
|
+
would still overflow Augment's limit (the limit is per-workspace,
|
|
280
|
+
not per-scope) **and** would scatter the content across every repo
|
|
281
|
+
the developer opens, multiplying the maintenance surface.
|
|
282
|
+
|
|
283
|
+
### Decision
|
|
284
|
+
|
|
285
|
+
`augment` becomes **global-only** in `SCOPE_SUPPORT`:
|
|
286
|
+
|
|
287
|
+
- `npx @event4u/agent-config init --tools=augment --global` — supported.
|
|
288
|
+
- `npx @event4u/agent-config init --tools=augment` (project) — **rejected**
|
|
289
|
+
with a directive error pointing at this amendment.
|
|
290
|
+
- `npx @event4u/agent-config init` (default `--tools=all` at project
|
|
291
|
+
scope) — silently filters `augment` out (matching the
|
|
292
|
+
`claude-desktop` / `jetbrains` pattern).
|
|
293
|
+
|
|
294
|
+
Project-scope `init` still writes `.augment/settings.json` as a
|
|
295
|
+
substrate bridge (plugin activation marker for the workspace) — but
|
|
296
|
+
**no** rules, skills, commands, contexts, personas, or templates are
|
|
297
|
+
written into `.augment/` at project scope.
|
|
298
|
+
|
|
299
|
+
### Trade-off accepted
|
|
300
|
+
|
|
301
|
+
The Augment workspace-guidelines overflow is a **known, surfaced
|
|
302
|
+
trade-off**, not a defect to fix. The package owner accepts that the
|
|
303
|
+
IDE will report the budget exceeded; the content shape is the
|
|
304
|
+
source of value, and chunking it to fit the limit would dilute that
|
|
305
|
+
value below the threshold that justifies the tool. The overflow
|
|
306
|
+
warning is documented in
|
|
307
|
+
[`docs/setup/per-ide/augment.md`](../setup/per-ide/augment.md#troubleshooting).
|
|
308
|
+
|
|
309
|
+
### Supersedes
|
|
310
|
+
|
|
311
|
+
The earlier `fix/augment-project-scope-only` branch (commit
|
|
312
|
+
`158f9912`, never merged) — which inverted the scope to
|
|
313
|
+
**project-only** — is hereby superseded. The project-only direction
|
|
314
|
+
solved the overflow at the cost of fragmenting content across every
|
|
315
|
+
repo; this amendment trades that cost for a single global surface
|
|
316
|
+
plus an explicit overflow tolerance.
|
|
317
|
+
|
|
318
|
+
### Consequences
|
|
319
|
+
|
|
320
|
+
- `GLOBAL_DEPLOY_SOURCES['augment']` carries the 6 source-to-dest
|
|
321
|
+
mappings (rules, skills, commands, contexts, personas, templates)
|
|
322
|
+
and remains the canonical Augment install surface.
|
|
323
|
+
- `_validate_scope` hard-rejects explicit `augment` at project scope
|
|
324
|
+
and silently filters under `--tools=all --project`.
|
|
325
|
+
- Tests: `test_augment_rejects_project`,
|
|
326
|
+
`test_all_silent_filters_augment_under_project`, and the existing
|
|
327
|
+
`test_install_global_deploys_augment_content` pin the contract.
|
|
328
|
+
- The Supported Tools table in `README.md` moves Augment out of the
|
|
329
|
+
project-installed category into the global-only (marker-in-project)
|
|
330
|
+
category, alongside Claude Desktop.
|
|
331
|
+
|
|
265
332
|
## Implementation Plan (deferred to roadmap)
|
|
266
333
|
|
|
267
334
|
Out of scope for this ADR. Sequencing target for a separate roadmap:
|