@event4u/agent-config 2.6.1 → 2.8.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 (164) 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/.agent-src/personas/cmo.md +122 -0
  108. package/.agent-src/personas/customer-success-lead.md +126 -0
  109. package/.agent-src/personas/growth-pm.md +134 -0
  110. package/.agent-src/personas/revops.md +125 -0
  111. package/.agent-src/skills/activation-design/SKILL.md +160 -0
  112. package/.agent-src/skills/churn-prevention/SKILL.md +156 -0
  113. package/.agent-src/skills/content-funnel-design/SKILL.md +170 -0
  114. package/.agent-src/skills/deal-qualification-meddic/SKILL.md +165 -0
  115. package/.agent-src/skills/editorial-calendar/SKILL.md +161 -0
  116. package/.agent-src/skills/expansion-playbook/SKILL.md +171 -0
  117. package/.agent-src/skills/forecast-accuracy/SKILL.md +157 -0
  118. package/.agent-src/skills/fundraising-narrative/SKILL.md +189 -0
  119. package/.agent-src/skills/funnel-analysis/SKILL.md +26 -2
  120. package/.agent-src/skills/gtm-launch/SKILL.md +165 -0
  121. package/.agent-src/skills/messaging-architecture/SKILL.md +184 -0
  122. package/.agent-src/skills/onboarding-design/SKILL.md +158 -0
  123. package/.agent-src/skills/pipeline-strategy/SKILL.md +159 -0
  124. package/.agent-src/skills/positioning-strategy/SKILL.md +177 -0
  125. package/.agent-src/skills/retention-loops/SKILL.md +161 -0
  126. package/.agent-src/skills/subagent-orchestration/SKILL.md +1 -1
  127. package/.agent-src/skills/voice-and-tone-design/SKILL.md +163 -0
  128. package/.agent-src/templates/agents/agent-project-settings.example.yml +1 -1
  129. package/.claude-plugin/marketplace.json +17 -2
  130. package/AGENTS.md +4 -4
  131. package/CHANGELOG.md +60 -2257
  132. package/README.md +59 -33
  133. package/docs/architecture/augment-projection.md +70 -0
  134. package/docs/architecture/claude-bundle.md +77 -0
  135. package/docs/architecture/compression.md +67 -0
  136. package/docs/architecture/multi-tool-projection.md +72 -0
  137. package/docs/architecture.md +32 -55
  138. package/docs/archive/CHANGELOG-pre-2.2.0.md +2138 -0
  139. package/docs/archive/CHANGELOG-pre-2.7.0.md +185 -0
  140. package/docs/catalog.md +19 -3
  141. package/docs/contracts/CHANGELOG-conventions.md +121 -0
  142. package/docs/contracts/adr-gtm-context-spine.md +115 -0
  143. package/docs/contracts/command-surface-tiers.md +145 -0
  144. package/docs/contracts/context-spine.md +50 -12
  145. package/docs/contracts/cross-wing-handoff.md +3 -3
  146. package/docs/contracts/mcp-cloud-scope.md +193 -21
  147. package/docs/contracts/mcp-phase-1-scope.md +1 -0
  148. package/docs/contracts/persona-schema.md +20 -3
  149. package/docs/decisions/ADR-007-agent-discovery-scopes.md +67 -0
  150. package/docs/guidelines/gtm-handoff.md +114 -0
  151. package/docs/setup/enterprise-and-offline.md +201 -0
  152. package/docs/setup/per-ide/augment.md +37 -25
  153. package/package.json +1 -1
  154. package/scripts/_bootstrap_tier_frontmatter.py +151 -0
  155. package/scripts/agent-config +146 -83
  156. package/scripts/hermetic-install.sh +235 -0
  157. package/scripts/install.py +8 -1
  158. package/scripts/lint_command_tiers.py +115 -0
  159. package/scripts/lint_context_spine_usage.py +4 -1
  160. package/scripts/mcp_server/__init__.py +5 -0
  161. package/scripts/schemas/command.schema.json +5 -0
  162. package/scripts/schemas/persona.schema.json +5 -0
  163. package/scripts/schemas/skill.schema.json +2 -2
  164. package/scripts/skill_linter.py +177 -3
@@ -0,0 +1,145 @@
1
+ ---
2
+ stability: beta
3
+ ---
4
+
5
+
6
+ # Command Surface Tiers
7
+
8
+ > **Status:** Active. Defines the tiering contract for the two
9
+ > command surfaces this package ships:
10
+ >
11
+ > - **CLI commands** rendered by `./agent-config --help`.
12
+ > - **Slash commands** under `.agent-src.uncompressed/commands/**`.
13
+ >
14
+ > Per Phase 4 of `agents/roadmaps/road-to-distribution-maturity.md`.
15
+
16
+ ## Why tiering
17
+
18
+ `./agent-config --help` currently prints 45 CLI commands; the slash
19
+ surface ships 106 files (52 root + 54 orchestrator children). A new
20
+ contributor running `--help` reads a wall of operational, hook, and
21
+ maintenance commands before they find `init / sync / validate / work`.
22
+ Tiering separates **the path a new contributor walks** (Tier-0) from
23
+ **power-user workflows** (Tier-1) from **hook / maintenance / internal**
24
+ (Tier-2).
25
+
26
+ ## The three tiers
27
+
28
+ ### Tier-0 — daily-driver
29
+
30
+ The path a new contributor walks on day one. Visible in
31
+ `./agent-config --help` by default. Visible at the top of any
32
+ `/agents audit` listing.
33
+
34
+ **Membership criteria — ALL must hold:**
35
+
36
+ 1. **First-week need.** A solo contributor hitting the package for
37
+ the first time will run this within their first five sessions
38
+ without being told.
39
+ 2. **Stable surface.** The command name + flag set has not changed
40
+ in the last two minor releases (or is brand-new with a
41
+ commitment to two-release stability).
42
+ 3. **No prerequisite tooling beyond `bash` + `python3`.** Docker,
43
+ GPG, jq, gh CLI, npm globals are all Tier-1+ territory.
44
+ 4. **Cited in the `init → sync → validate → work` outcome path**
45
+ OR cited by a Hard-Floor safety rule
46
+ (`commit`, `keys:install-*`) OR is the AI-Council entry point
47
+ that the daily workflow depends on (`council:*`).
48
+
49
+ **Canonical Tier-0 members (2026-05-13):**
50
+
51
+ - CLI: `init`, `sync`, `validate`, `work`, `first-run`,
52
+ `keys:install-anthropic`, `keys:install-openai`,
53
+ `council:estimate`, `council:run`, `council:render`,
54
+ `implement-ticket`, `help`, `--version`.
55
+ - Slash: `/onboard`, `/commit`, `/work`, `/implement-ticket`,
56
+ `/agent-status`, `/agent-handoff`.
57
+
58
+ ### Tier-1 — power-user
59
+
60
+ Workflows a contributor reaches for in week two or beyond, or
61
+ release / review / audit paths the maintainer team uses. Visible in
62
+ `./agent-config --help --tier=1` and in `/agents audit`'s expanded
63
+ view. Documented in the same surface as Tier-0.
64
+
65
+ **Membership criteria — ANY suffices:**
66
+
67
+ 1. **Repeat workflow, not first-week.** Used by every contributor
68
+ eventually but not on day one (`/create-pr`, `/review-changes`,
69
+ `/optimize`).
70
+ 2. **Maintainer-team gate.** Release-shape commands, audits,
71
+ migration helpers (`update`, `versions`, `prune`, `doctor`,
72
+ `export`, `migrate`, `uninstall`).
73
+ 3. **Orchestrator dispatch surface.** Top-level slash orchestrators
74
+ whose children carry the actual work (`/roadmap`, `/feature`,
75
+ `/fix`, `/judge`, `/memory`, `/optimize`, `/council`).
76
+
77
+ ### Tier-2 — maintenance / internal
78
+
79
+ Default for new commands. Hidden from `./agent-config --help`
80
+ unless `--tier=all`. Reachable by full name; not advertised.
81
+
82
+ **Membership criteria — ANY suffices:**
83
+
84
+ 1. **Hook entry point.** `*-hook` commands wired by the platform
85
+ (`chat-history:hook`, `dispatch:hook`,
86
+ `roadmap-progress:hook`, `onboarding-gate:hook`,
87
+ `context-hygiene:hook`, `hooks:install`, `hooks:status`).
88
+ 2. **Internal / programmatic.** Called by other scripts or by the
89
+ work-engine, never typed by a human (`memory:*`,
90
+ `proposal:check`, `refine-ticket:detect`, `migrate-state`,
91
+ `telemetry:*`, `mcp:render`, `mcp:check`, `mcp:setup`,
92
+ `mcp:run`, `roadmap:progress-check`).
93
+ 3. **Sub-command of a slash orchestrator** — the orchestrator is
94
+ Tier-1; the children are Tier-2 because they are invoked via
95
+ the orchestrator's menu, not by name.
96
+ 4. **Anything else.** Default for new commands; promotion is the
97
+ harder direction.
98
+
99
+ ## Promotion gate (Tier-2 → Tier-1, Tier-1 → Tier-0)
100
+
101
+ Promotion is **not implicit**. Each promotion requires:
102
+
103
+ 1. A short ADR under `docs/decisions/` citing this contract and
104
+ the specific criterion satisfied.
105
+ 2. The frontmatter `tier:` change in the same commit as the ADR.
106
+ 3. CI green (`tests/test_command_surface_tiers.py` + `task ci`).
107
+
108
+ Demotion is allowed without ADR (Tier-0 → Tier-1, Tier-1 → Tier-2)
109
+ but must update this contract's canonical list.
110
+
111
+ ## Tagging shape
112
+
113
+ Slash commands carry tier in YAML frontmatter:
114
+
115
+ ```yaml
116
+ ---
117
+ name: commit
118
+ tier: 0
119
+ description: Stage and commit all uncommitted changes …
120
+ ---
121
+ ```
122
+
123
+ CLI commands carry tier in the `agent-config` heredoc, by section —
124
+ the help text groups commands under `## Tier 0`, `## Tier 1`,
125
+ `## Tier 2 (hidden by default)` headings rendered by
126
+ `./agent-config --help --tier=all`.
127
+
128
+ ## Drift / lint
129
+
130
+ `scripts/lint_command_tiers.py` enforces:
131
+
132
+ 1. Every file under `.agent-src.uncompressed/commands/**.md` has
133
+ a `tier:` frontmatter key whose value is `0`, `1`, or `2`.
134
+ 2. Every command listed under `## Tier 0` / `## Tier 1` /
135
+ `## Tier 2` in this contract resolves to a real command file or
136
+ a real CLI command name.
137
+ 3. No command appears in two tier lists in this contract.
138
+
139
+ Hooked into `task lint-skills` so it runs in CI.
140
+
141
+ ## See also
142
+
143
+ - `agents/roadmaps/road-to-distribution-maturity.md` — Phase 4.
144
+ - `docs/contracts/command-clusters.md` — orchestrator → child wiring.
145
+ - `docs/contracts/STABILITY.md` — surface-stability commitments.
@@ -32,8 +32,11 @@ Three failure modes the spine prevents:
32
32
 
33
33
  ## § 2 — Slot definitions
34
34
 
35
- The spine has **exactly three slots**. Council Q1 verdict (2026-05-05,
36
- KEEP-3): slot count is locked; extensions require an ADR (§ 5).
35
+ The spine has **three cross-wing slots** plus **per-wing extension
36
+ slots** authorized via ADR. Council Q1 verdict (2026-05-05, KEEP-3)
37
+ locks the cross-wing slot count at 3. Per-wing extensions follow § 5.
38
+
39
+ ### Cross-wing slots (locked at 3)
37
40
 
38
41
  | Slot | Path under `agents/context-spine/` | Owner | Typical content |
39
42
  |---|---|---|---|
@@ -41,6 +44,14 @@ KEEP-3): slot count is locked; extensions require an ADR (§ 5).
41
44
  | `team` | `team.md` | RevOps / maintainer wing | Who **maintains** this codebase, how decisions are made, review-routing conventions, cadence (release rhythm, planning ritual). Read by review-routing, finishing-a-development-branch, persona overrides. |
42
45
  | `repo` | `repo.md` | Engineering wing | What the codebase **is** at the file-tree level: stack one-liner, primary languages, top-level module map, deploy target. Read by analysis skills, blast-radius-analyzer, project-analysis-* skills. |
43
46
 
47
+ ### Wing-3 slots (GTM and Growth — added 2026-05-13 per [`adr-gtm-context-spine.md`](adr-gtm-context-spine.md))
48
+
49
+ | Slot | Path under `agents/context-spine/` | Owner | Typical content |
50
+ |---|---|---|---|
51
+ | `channel-stage` | `channel-stage.md` | GTM / Marketing wing | Which channels the GTM motion uses (awareness · consideration · decision · retention · expansion), per-channel maturity, channel-cost band. Read by `positioning-strategy`, `messaging-architecture`, `gtm-launch`, `editorial-calendar`. |
52
+ | `funnel-stage` | `funnel-stage.md` | Growth / RevOps wing | Funnel topology (top / mid / bottom / activation / retention), per-stage definition, exit-criteria for each. Read by `pipeline-strategy`, `funnel-analysis`, `activation-design`, `onboarding-design`. |
53
+ | `customer-segment` | `customer-segment.md` | Sales / CS wing | ICP, persona-by-segment, ARR-band-by-segment. Read by `ICP`, `pipeline-strategy`, `MEDDIC`, `retention-loops`. |
54
+
44
55
  Slots are markdown files. Each is **≤ 200 lines**; longer means the
45
56
  slot is doing two jobs and the author should split or trim. Empty /
46
57
  missing slot is allowed — the citing skill MUST handle absence
@@ -64,9 +75,10 @@ Rules:
64
75
 
65
76
  - The key is **optional**. Senior skills MAY ship without it; the
66
77
  default (`[]`) means the skill does not read the spine.
67
- - Values are restricted to the literal slot names: `product`, `team`,
68
- `repo`. Unknown values fail `task lint-skills` with
69
- `unknown_context_spine_slot`.
78
+ - Values are restricted to the slot names in § 2: cross-wing
79
+ (`product`, `team`, `repo`) plus wing-scoped extensions
80
+ (`channel-stage`, `funnel-stage`, `customer-segment`). Unknown
81
+ values fail `task lint-skills` with `unknown_context_spine_slot`.
70
82
  - Reads MUST be opt-in and explicit. A skill body that says *"reads
71
83
  `agents/context-spine/product.md` if present"* without declaring
72
84
  the slot in frontmatter is **incorrect** — it bypasses the lint
@@ -91,8 +103,13 @@ file does not break the skill).
91
103
 
92
104
  ## § 5 — Slot-add policy
93
105
 
94
- Adding a fourth slot is **structurally allowed but procedurally
95
- expensive**. Two preconditions:
106
+ Two tracks: **cross-wing** (locked at 3, citations-first) and
107
+ **wing-scoped** (per-wing ADR, citations prospective).
108
+
109
+ ### Cross-wing track — citations-first
110
+
111
+ Adding a fourth **cross-wing** slot (one every wing might read) is
112
+ **structurally allowed but procedurally expensive**. Two preconditions:
96
113
 
97
114
  1. **Citation evidence.** ≥ 2 shipped senior skills declare the new
98
115
  slot in their frontmatter and cite it in the body, with PRs
@@ -103,21 +120,42 @@ expensive**. Two preconditions:
103
120
  the migration plan for the existing senior catalog (do they
104
121
  declare the new slot, do they ignore it, do they get retrofitted).
105
122
 
123
+ ### Wing-scoped track — per-wing ADR, prospective citations
124
+
125
+ A wing may add **its own slots** for cognition specific to that wing
126
+ (e.g. Wing-3 `channel-stage`, `funnel-stage`, `customer-segment`).
127
+ Preconditions:
128
+
129
+ 1. **Per-wing ADR.** One ADR under `docs/contracts/` named
130
+ `adr-<wing>-context-spine.md` names the slots, the cognition gap,
131
+ the citing-skill chain in the same iteration, and the off-wing
132
+ migration plan (off-wing skills do **not** retrofit).
133
+ 2. **Prospective citations.** The ADR-naming iteration must ship
134
+ ≥ 2 skills citing each new slot before the iteration closes.
135
+ Drafts and roadmap items inside the same iteration **do** count
136
+ for prospective gating; cross-iteration citations do not.
137
+
138
+ Existing wing-3 reference: [`adr-gtm-context-spine.md`](adr-gtm-context-spine.md).
139
+
140
+ ### Schema and changelog rules — both tracks
141
+
106
142
  The ADR ships with the schema bump (`scripts/schemas/skill.schema.json`
107
143
  extends the `context_spine` enum) and a CHANGELOG entry under
108
144
  `### Breaking` if the new enum value tightens an existing skill's
109
145
  declaration.
110
146
 
111
- This policy mitigates the slot-sprawl failure mode: "tri-slot locked
112
- at 3 + ADR-gated growth" is the brake. The ADR is the single growth
113
- lever; no consumer-side override exists.
147
+ This policy mitigates the slot-sprawl failure mode: "cross-wing
148
+ locked at 3 + wing-scoped via per-wing ADR" is the brake. ADRs are
149
+ the single growth lever; no consumer-side override exists.
114
150
 
115
151
  ## § 6 — Author checklist
116
152
 
117
153
  Before shipping a senior skill that opts into the spine:
118
154
 
119
- - [ ] Frontmatter declares `context_spine:` with values from
120
- `{product, team, repo}`.
155
+ - [ ] Frontmatter declares `context_spine:` with values from the
156
+ cross-wing slots (`product`, `team`, `repo`) and/or wing-scoped
157
+ slots authorized via per-wing ADR (e.g. Wing-3:
158
+ `channel-stage`, `funnel-stage`, `customer-segment`).
121
159
  - [ ] Skill body cites `agents/context-spine/<slot>.md` near the top
122
160
  (one link per declared slot).
123
161
  - [ ] Procedure handles missing-slot gracefully — falls back to the
@@ -101,10 +101,10 @@ mirrors `lint_skills` (`file:line:reason`).
101
101
 
102
102
  Three shipped chains across the suite illustrate the contract:
103
103
 
104
- ### W3 launch chain — `positioning` → `messaging-architecture` → `gtm-launch`
104
+ ### W3 launch chain — `positioning-strategy` → `messaging-architecture` → `gtm-launch`
105
105
 
106
- - `positioning` (H1) owns category framing.
107
- - `messaging-architecture` (H2) **composes** `positioning` — primary
106
+ - `positioning-strategy` (H1) owns category framing.
107
+ - `messaging-architecture` (H2) **composes** `positioning-strategy` — primary
108
108
  message + supporting proofs derive from H1's point-of-view output.
109
109
  - `gtm-launch` (H3) **composes** `messaging-architecture` plus
110
110
  `release-comms` (unified-senior-roles Block L) — launch sequencing
@@ -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
- - **Authentication / multi-tenancy.** MVP-1 is open (OSS content,
78
- read-only). Bearer / CF Access / HMAC moves to MVP-2 alongside
79
- tool restoration.
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 = edge cache + platform rate limit.** MVP-1
116
- is auth-less by design; the public surface is shielded by two
117
- layers Cloudflare provides without code: (a) edge caching per
118
- invariant 4 (1 h on pinned URLs, 5 min on `latest`) absorbs
119
- read-loop traffic before it reaches the Worker, and (b)
120
- Cloudflare's account-level anti-abuse + DDoS shielding caps
121
- per-IP burst on `*.workers.dev`. These two together **are** the
122
- MVP-1 auth surrogate. **Promotion triggers** — any of these
123
- flips HMAC (currently MVP-2 §Out-of-scope) from deferred to
124
- active before the wake-up triggers below would otherwise fire:
125
- sustained 429 spikes from origin (cache miss storm), Workers
126
- request-cost line item exceeding the free-tier budget for two
127
- consecutive billing periods, or a CVE-class abuse report
128
- against the endpoint. A per-Worker `[[unsafe.bindings]]`
129
- rate-limiter in `wrangler.toml` is **not** configured in MVP-1
130
- adding one is a contract amendment, not a free hand.
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, auth) wake up only when **all** of these fire:
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
- - An auth model has been selected (bearer vs. CF Access vs. HMAC).
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
 
@@ -1,5 +1,6 @@
1
1
  ---
2
2
  stability: experimental
3
+ mcp_scope: full
3
4
  ---
4
5
 
5
6
  # MCP Server — Phase 1–6 Scope (A0 Hard Contract)
@@ -22,6 +22,7 @@ tiers, a 5-section spine for Core, and a 7-section spine for Specialist
22
22
  | `role` | string | yes | human-readable role name |
23
23
  | `description` | string | yes | one sentence, ≤ 160 chars |
24
24
  | `tier` | enum | yes | `core` \| `specialist` |
25
+ | `wing` | int | optional | `1`\|`2`\|`3`\|`4` — cognition cluster per [`package-self-orientation § The four wings`](package-self-orientation.md#the-four-wings); raises the specialist size cap for denser wings |
25
26
  | `mode` | string | optional | advisory link to a role-contract workflow mode |
26
27
  | `version` | string | yes | semver; bump on breaking changes |
27
28
  | `source` | enum | yes | `package` \| `project` |
@@ -77,13 +78,28 @@ beyond the global line cap).
77
78
 
78
79
  ## § 4 — Size budgets
79
80
 
81
+ Base caps by tier:
82
+
80
83
  | Tier | Section count | Line cap | Rationale |
81
84
  |---|---|---|---|
82
85
  | `core` | 5 | ≤ 120 | always-loaded, stay lean |
83
86
  | `specialist` | 7 | ≤ 100 | opt-in, denser per section |
84
87
 
85
- The line cap is enforced by `lint-skills` against the full file
86
- including frontmatter and trailing blank line.
88
+ Wing-scoped overrides for the `specialist` tier (Wings 3 and 4 carry
89
+ denser cognition than Wings 1 and 2 funnel × channel × lifecycle for
90
+ GTM, finance × org × strategy for Money/Ops — so the seven-section
91
+ spine needs more room to land without amputating Workflows):
92
+
93
+ | Tier | Wing | Line cap |
94
+ |---|---|---|
95
+ | `specialist` | 1 (Engineering) | ≤ 100 |
96
+ | `specialist` | 2 (Product + Foundation) | ≤ 100 |
97
+ | `specialist` | 3 (GTM + Growth) | ≤ 140 |
98
+ | `specialist` | 4 (Money + Strategy + Ops) | ≤ 140 |
99
+
100
+ Personas without a `wing:` field fall back to the tier baseline. The
101
+ line cap is enforced by `lint-skills` against the full file including
102
+ frontmatter and trailing blank line.
87
103
 
88
104
  ## § 5 — Schema enforcement
89
105
 
@@ -91,8 +107,9 @@ The linter (A2 work) enforces:
91
107
 
92
108
  - frontmatter shape (table in § 1)
93
109
  - tier enum
110
+ - wing enum (when present)
94
111
  - required sections per tier (§ 3)
95
- - size budget per tier (§ 4)
112
+ - size budget per tier — wing override applied when `wing:` is set (§ 4)
96
113
  - ≥ 3 bullets in `Unique Questions`
97
114
  - `id` matches filename stem
98
115
  - description ≤ 160 chars
@@ -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: