@event4u/agent-config 2.7.0 → 2.9.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 (76) hide show
  1. package/.agent-src/personas/cmo.md +122 -0
  2. package/.agent-src/personas/customer-success-lead.md +126 -0
  3. package/.agent-src/personas/engineering-manager.md +133 -0
  4. package/.agent-src/personas/finance-partner.md +129 -0
  5. package/.agent-src/personas/growth-pm.md +134 -0
  6. package/.agent-src/personas/people-strategist.md +126 -0
  7. package/.agent-src/personas/revops.md +125 -0
  8. package/.agent-src/personas/strategist.md +129 -0
  9. package/.agent-src/skills/activation-design/SKILL.md +160 -0
  10. package/.agent-src/skills/build-buy-partner/SKILL.md +145 -0
  11. package/.agent-src/skills/churn-prevention/SKILL.md +156 -0
  12. package/.agent-src/skills/comp-banding/SKILL.md +160 -0
  13. package/.agent-src/skills/competitive-moat-analysis/SKILL.md +152 -0
  14. package/.agent-src/skills/content-funnel-design/SKILL.md +170 -0
  15. package/.agent-src/skills/contracts-cognition/SKILL.md +147 -0
  16. package/.agent-src/skills/data-handling-judgment/SKILL.md +155 -0
  17. package/.agent-src/skills/deal-qualification-meddic/SKILL.md +165 -0
  18. package/.agent-src/skills/editorial-calendar/SKILL.md +161 -0
  19. package/.agent-src/skills/expansion-playbook/SKILL.md +171 -0
  20. package/.agent-src/skills/forecast-accuracy/SKILL.md +157 -0
  21. package/.agent-src/skills/forecasting/SKILL.md +164 -0
  22. package/.agent-src/skills/fundraising-narrative/SKILL.md +189 -0
  23. package/.agent-src/skills/funnel-analysis/SKILL.md +26 -2
  24. package/.agent-src/skills/gtm-launch/SKILL.md +165 -0
  25. package/.agent-src/skills/hiring-loop-design/SKILL.md +167 -0
  26. package/.agent-src/skills/market-entry-analysis/SKILL.md +144 -0
  27. package/.agent-src/skills/messaging-architecture/SKILL.md +184 -0
  28. package/.agent-src/skills/onboarding-design/SKILL.md +158 -0
  29. package/.agent-src/skills/onboarding-program/SKILL.md +157 -0
  30. package/.agent-src/skills/one-on-one-cadence/SKILL.md +161 -0
  31. package/.agent-src/skills/org-design/SKILL.md +158 -0
  32. package/.agent-src/skills/perf-feedback-craft/SKILL.md +157 -0
  33. package/.agent-src/skills/pipeline-strategy/SKILL.md +159 -0
  34. package/.agent-src/skills/positioning-strategy/SKILL.md +177 -0
  35. package/.agent-src/skills/privacy-review/SKILL.md +160 -0
  36. package/.agent-src/skills/retention-loops/SKILL.md +161 -0
  37. package/.agent-src/skills/runway-cognition/SKILL.md +136 -0
  38. package/.agent-src/skills/scenario-modeling/SKILL.md +139 -0
  39. package/.agent-src/skills/subagent-orchestration/SKILL.md +1 -1
  40. package/.agent-src/skills/throughput-vs-morale-tradeoff/SKILL.md +165 -0
  41. package/.agent-src/skills/unit-economics-modeling/SKILL.md +54 -7
  42. package/.agent-src/skills/vision-articulation/SKILL.md +146 -0
  43. package/.agent-src/skills/voice-and-tone-design/SKILL.md +163 -0
  44. package/.agent-src/templates/agents/agent-project-settings.example.yml +1 -1
  45. package/.agent-src/templates/scripts/telemetry/settings.py +65 -0
  46. package/.agent-src/templates/scripts/tier_usage_report.py +183 -0
  47. package/.claude-plugin/marketplace.json +34 -2
  48. package/AGENTS.md +1 -1
  49. package/CHANGELOG.md +135 -153
  50. package/README.md +3 -3
  51. package/docs/architecture.md +37 -11
  52. package/docs/archive/CHANGELOG-pre-2.7.0.md +185 -0
  53. package/docs/catalog.md +38 -4
  54. package/docs/contracts/adr-forecast-construction-shape.md +89 -0
  55. package/docs/contracts/adr-gtm-context-spine.md +115 -0
  56. package/docs/contracts/adr-wing4-context-spine.md +125 -0
  57. package/docs/contracts/command-clusters.md +41 -0
  58. package/docs/contracts/command-surface-tiers.md +30 -9
  59. package/docs/contracts/context-spine.md +58 -12
  60. package/docs/contracts/cross-wing-handoff.md +3 -3
  61. package/docs/contracts/mcp-beta-criteria.md +129 -0
  62. package/docs/contracts/persona-schema.md +20 -3
  63. package/docs/guidelines/gtm-handoff.md +114 -0
  64. package/docs/guidelines/wing4-handoff.md +127 -0
  65. package/docs/mcp-server.md +1 -1
  66. package/package.json +1 -1
  67. package/scripts/_cli/cmd_doctor.py +527 -14
  68. package/scripts/_cli/cmd_validate.py +10 -0
  69. package/scripts/agent-config +19 -18
  70. package/scripts/install.py +5 -0
  71. package/scripts/lint_context_spine_usage.py +5 -1
  72. package/scripts/mcp_server/__init__.py +1 -0
  73. package/scripts/mcp_server/server.py +4 -3
  74. package/scripts/schemas/persona.schema.json +5 -0
  75. package/scripts/schemas/skill.schema.json +2 -2
  76. package/scripts/skill_linter.py +284 -6
@@ -0,0 +1,125 @@
1
+ ---
2
+ stability: beta
3
+ ---
4
+
5
+ # ADR — Wing-4 context-spine: Money / Strategy / Ops slot extension
6
+
7
+ > **Status:** Decided · 2026-05-13
8
+ > **Builds on:** [`context-spine.md`](context-spine.md) — tri-slot cross-wing
9
+ > contract (`product`, `team`, `repo`) locked at 3 by council Q1
10
+ > (2026-05-05 KEEP-3, unified-senior-roles iter 1) plus the wing-scoped
11
+ > track established by [`adr-gtm-context-spine.md`](adr-gtm-context-spine.md).
12
+ > **Defers to:** [`cross-wing-handoff.md`](cross-wing-handoff.md) — typed
13
+ > handoff contract; orthogonal to slot membership.
14
+
15
+ ## Decision
16
+
17
+ The context-spine adds **three Wing-4-specific slots** under
18
+ `agents/context-spine/`: `fiscal-period`, `org-stage`,
19
+ `regulatory-regime`. The schema enum in
20
+ [`scripts/schemas/skill.schema.json`](../../scripts/schemas/skill.schema.json)
21
+ extends from
22
+ `{product, team, repo, channel-stage, funnel-stage, customer-segment}`
23
+ to additionally include
24
+ `{fiscal-period, org-stage, regulatory-regime}`.
25
+
26
+ The KEEP-3 lock from council Q1 still applies to **cross-wing slots**.
27
+ The Wing-4 slots are **wing-scoped** under § 5 of the contract: they
28
+ exist for the Money / Strategy / Ops cluster (Block O–S, 18 skills)
29
+ and the Wing-4 personas (Block T, 4 personas). Engineering,
30
+ Foundation, and GTM wings do not opt into them.
31
+
32
+ | Slot | Path | Typical content |
33
+ |---|---|---|
34
+ | `fiscal-period` | `agents/context-spine/fiscal-period.md` | Reporting cadence (monthly · quarterly · annual · multi-year-plan), fiscal-year start, close-window timing. Read by O1 (`unit-economics`), O2 (`forecasting`), O3 (`runway-cognition`), O4 (`scenario-modeling`). |
35
+ | `org-stage` | `agents/context-spine/org-stage.md` | Stage label (seed · series-A · series-B · growth · public), funding posture, headcount band, governance posture. Read by P1 (`build-buy-partner`), P4 (`vision-articulation`), Q1 (`org-design`), Q2 (`comp-banding`), S2 (`hiring-loop-design`). |
36
+ | `regulatory-regime` | `agents/context-spine/regulatory-regime.md` | Active regimes (none · GDPR · HIPAA · SOC2 · PCI · CCPA), data-residency posture, breach-notification timer. Read by P5 (`contracts-cognition`), P6 (`privacy-review`), P7 (`data-handling-judgment`). |
37
+
38
+ ## Why this was a real question
39
+
40
+ Three options were on the table:
41
+
42
+ 1. **Force-fit into existing slots.** Stuff fiscal cadence into
43
+ `team`, stage into `repo`, regulatory regime into `product`.
44
+ Rejected: each slab is owned by a different wing and Wing-4 reads
45
+ would mix tenant-of-record semantics (stage is not codebase
46
+ shape, regulatory regime is not product scope).
47
+ 2. **Wing-4-only frontmatter key.** Add `wing4_spine: [...]` parallel
48
+ to `context_spine`. Rejected for the same reason as Wing-3 ADR:
49
+ two spines duplicate the read-discipline mechanism, the lint
50
+ gate, and the skill-author cognitive load.
51
+ 3. **Extend the spine, scope the slots.** Accepted: same mechanism,
52
+ same lint gate, same opt-in discipline; slot names carry the
53
+ wing scope (`fiscal-period`, `org-stage`, `regulatory-regime`
54
+ are visibly Money / Strategy / Ops shaped).
55
+
56
+ ## Citation-evidence gating — prospective
57
+
58
+ Per § 5 wing-scoped track, the citation chain is **prospective**: the
59
+ roadmap (J1 → O / P / Q / S → T) ships citing skills in the same
60
+ iteration. The ADR is the gating artefact (not the citations); each
61
+ Block O / P / Q / S skill cites ≥ 1 of the three new slots in its
62
+ frontmatter or carries a one-line ADR-opt-out comment in the skill
63
+ body.
64
+
65
+ The J2 linter (council Q7 boundary tests) enforces stage-agnosticism,
66
+ which is orthogonal — a skill can cite `org-stage` for context
67
+ without prescribing stage-specific thresholds (e.g. `runway-cognition`
68
+ reads the stage to colour heuristics, but the procedure must remain
69
+ readable across seed and public).
70
+
71
+ ## Migration plan for the existing senior catalog
72
+
73
+ - **No retrofitting required.** Existing senior skills keep their
74
+ current `context_spine` declarations. Wing-3 skills MAY add a
75
+ Wing-4 slot if their cognition genuinely reads it (e.g. a Growth
76
+ PM reading `regulatory-regime` to scope activation experiments);
77
+ they MUST NOT be retrofitted mechanically.
78
+ - **Opt-out for off-wing skills.** Engineering / Foundation senior
79
+ skills do not need to mention the Wing-4 slots in any way. The
80
+ schema accepts subsets — declaring only `[product, team]` remains
81
+ valid.
82
+ - **Slot-file authoring is consumer-side.** The package ships the
83
+ contract; consumer projects fill
84
+ `agents/context-spine/fiscal-period.md` etc. when adopting Wing-4
85
+ skills. Missing slot file is graceful per § 4 of the contract.
86
+
87
+ ## Counter-evidence the agent should listen for
88
+
89
+ Three signals that this decision is wrong and the ADR needs revisiting:
90
+
91
+ 1. **Off-wing skills start declaring Wing-4 slots.** If an
92
+ Engineering skill cites `org-stage`, the slot is misnamed or the
93
+ wing boundary is leaking. Re-scope the slot or rename it.
94
+ 2. **Wing-4 skills consistently ignore the slot they declared.** If
95
+ Block P privacy skills declare `regulatory-regime` but never
96
+ quote it in their procedure, the slot is decorative and should be
97
+ deleted.
98
+ 3. **A fourth Wing-4 slot is proposed within the same iteration.**
99
+ That is slot-sprawl on the same wing — Block J2 boundary tests
100
+ should reject the addition until a follow-up ADR documents why
101
+ three slots are insufficient.
102
+
103
+ ## Distinction from Wing-3 ADR
104
+
105
+ `adr-gtm-context-spine.md` extends the spine with **flow-state slots**
106
+ (funnel stage, channel stage, customer segment) — slabs that change
107
+ *every quarter* as the GTM motion evolves. Wing-4 extends the spine
108
+ with **constraint slots** (fiscal cadence, org stage, regulatory
109
+ regime) — slabs that change *every fundraise / audit / boundary
110
+ expansion*. Both extensions follow § 5 wing-scoped track; their
111
+ combined accept means the spine schema now declares 9 slots (3
112
+ cross-wing + 3 Wing-3 + 3 Wing-4). Any fourth slot at any wing
113
+ re-opens the slot-sprawl risk and needs a separate ADR.
114
+
115
+ ## See also
116
+
117
+ - [`context-spine.md`](context-spine.md) § 2 (slot table — extended),
118
+ § 5 (slot-add policy — wing-scoped track).
119
+ - [`adr-gtm-context-spine.md`](adr-gtm-context-spine.md) — Wing-3
120
+ reference ADR this one composes against.
121
+ - [`scripts/schemas/skill.schema.json`](../../scripts/schemas/skill.schema.json)
122
+ — `context_spine.items.enum` extended in this ADR.
123
+ - [`.agent-src.uncompressed/rules/skill-quality.md`](../../.agent-src.uncompressed/rules/skill-quality.md)
124
+ § Senior-Tier Required Structure — the four blocks every senior
125
+ skill ships independently of spine opt-in.
@@ -194,7 +194,48 @@ future cluster expansion.
194
194
  steps, `## Migration` notice, `## Rules` block.
195
195
  - Fails CI if a new cluster invents a different dispatch shape.
196
196
 
197
+ ## Tier-usage signal contract
198
+
199
+ Empirical retiering needs evidence; evidence needs a signal. The minimum signal the package collects to validate command tiering, with **zero new external surface** and the same privacy floor as artefact-engagement telemetry:
200
+
201
+ | Field | Type | Source | Notes |
202
+ |---|---|---|---|
203
+ | `ts_bucket` | str (ISO-8601 UTC, hour-resolution) | clock at invocation | hour-bucket, not raw timestamp — limits re-identification |
204
+ | `command` | str | dispatcher | the cluster + sub-command (`fix:ci`, `commit`, `work`) — never argv |
205
+ | `tier` | int (0/1/2/3) | `command-surface-tiers.md` lookup at invocation | the tier the command had **at the time of the call** |
206
+ | `outcome` | str | dispatcher exit shape | one of `success` / `error` / `blocked` — no message bodies |
207
+ | `user_hash` | str (sha256 first 16 hex chars) | hash of `$USER` + machine-id salt | distinct-user counting **without** identity recovery — never raw login |
208
+
209
+ **Forbidden — never recorded, enforced at the four privacy layers:**
210
+
211
+ - argv, flags, file paths, file contents.
212
+ - error messages, stdout, stderr.
213
+ - tickets, branch names, repo slugs.
214
+ - exact timestamps (only hour-buckets), exact env-var values.
215
+ - the user's name, email, or IP.
216
+
217
+ **Storage.** Append to `.agent-tier-usage.jsonl` (consumer-project root; configurable via `telemetry.tier_usage.output.path`). Separate file from `.agent-engagement.jsonl` — orthogonal signals, separate retention defaults, separate opt-in.
218
+
219
+ **Settings gate.** `telemetry.tier_usage.enabled` (default `false`, same opt-in posture as artefact-engagement). When disabled, the dispatcher records nothing and incurs zero file IO — the default-off doctrine carries over.
220
+
221
+ **Aggregation.** Local-only, hour-bucketed counts: `(command, tier) → invocation_count` and `(command, tier) → distinct_user_count`. No remote upload anywhere in scope.
222
+
223
+ ## Empirical retiering rule
224
+
225
+ A command **stays at Tier-0** at the next minor release only if **both** floors clear:
226
+
227
+ - **Frequency floor.** ≥ N invocations across the trailing W-day window — defaults `N = 20`, `W = 30` (tunable via `.agent-settings.yml` `telemetry.tier_usage.retier`).
228
+ - **Distinct-user floor.** ≥ K distinct `user_hash` values across the same window — default `K = 3`.
229
+
230
+ A command that fails either floor drops to **Tier-1** at the next minor release; the release notes cite the floor that failed. Promotion the other way (Tier-1 → Tier-0) follows the same rule symmetrically and additionally requires explicit listing in `command-surface-tiers.md`.
231
+
232
+ **Authority.** This is a maintainer decision aid, not an autonomous rule — the dispatcher records, `scripts/telemetry/tier_usage_report.py` reports, the maintainer files the move in the next minor release. No runtime tier-flipping.
233
+
234
+ **Floor governance.** N / W / K live in `.agent-settings.yml`; bumping them is a contract change (this file), not a settings change.
235
+
197
236
  ## See also
198
237
 
199
238
  - [`docs/migrations/commands-1.15.0.md`](../migrations/commands-1.15.0.md) — user-facing migration notes.
200
239
  - [`docs/contracts/STABILITY.md`](STABILITY.md) — `beta` level rules apply.
240
+ - [`docs/contracts/command-surface-tiers.md`](command-surface-tiers.md) — what each tier means and what `--help` surfaces.
241
+ - [`.agent-src.uncompressed/contexts/contracts/artifact-engagement-flow.md`](../../.agent-src.uncompressed/contexts/contracts/artifact-engagement-flow.md) — sibling telemetry surface; same privacy floor and four-layer enforcement model.
@@ -1,3 +1,8 @@
1
+ ---
2
+ stability: beta
3
+ ---
4
+
5
+
1
6
  # Command Surface Tiers
2
7
 
3
8
  > **Status:** Active. Defines the tiering contract for the two
@@ -36,17 +41,15 @@ The path a new contributor walks on day one. Visible in
36
41
  commitment to two-release stability).
37
42
  3. **No prerequisite tooling beyond `bash` + `python3`.** Docker,
38
43
  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:*`).
44
+ 4. **Cited in the `init → sync → validate → work` outcome path.**
45
+ Setup helpers (`first-run`, `keys:install-*`) and AI-Council entry
46
+ points (`council:*`) are **not** Tier-0 they are run once-per-
47
+ project or on-demand, not in the daily loop. They live at Tier-1.
43
48
 
44
- **Canonical Tier-0 members (2026-05-13):**
49
+ **Canonical Tier-0 members (2026-05-13, post-`road-to-surface-discipline`):**
45
50
 
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`.
51
+ - CLI: `init`, `sync`, `validate`, `work`, `implement-ticket`,
52
+ `help`, `--version`.
50
53
  - Slash: `/onboard`, `/commit`, `/work`, `/implement-ticket`,
51
54
  `/agent-status`, `/agent-handoff`.
52
55
 
@@ -68,6 +71,24 @@ view. Documented in the same surface as Tier-0.
68
71
  3. **Orchestrator dispatch surface.** Top-level slash orchestrators
69
72
  whose children carry the actual work (`/roadmap`, `/feature`,
70
73
  `/fix`, `/judge`, `/memory`, `/optimize`, `/council`).
74
+ 4. **Once-per-project or on-demand setup helper.** Commands invoked
75
+ to bootstrap or rotate credentials, not in the daily loop
76
+ (`first-run`, `keys:install-anthropic`, `keys:install-openai`,
77
+ `council:estimate`, `council:run`, `council:render`).
78
+
79
+ **Canonical Tier-1 CLI members (2026-05-13, post-`road-to-surface-discipline`):**
80
+
81
+ `update`, `versions`, `global`, `export`, `uninstall`, `prune`,
82
+ `doctor`, `migrate`, `first-run`, `keys:install-anthropic`,
83
+ `keys:install-openai`, `council:estimate`, `council:run`,
84
+ `council:render`.
85
+
86
+ **Surface-trim changelog (2026-05-13):** Six CLI commands moved
87
+ Tier-0 → Tier-1: `first-run` (run once per project), `keys:install-anthropic` /
88
+ `keys:install-openai` (one-time credential setup), `council:estimate` /
89
+ `council:run` / `council:render` (on-demand review tool, not daily
90
+ driver). Commands stay invokable by full name; only `--help`
91
+ surfacing changed.
71
92
 
72
93
  ### Tier-2 — maintenance / internal
73
94
 
@@ -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,22 @@ 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
+
55
+ ### Wing-4 slots (Money / Strategy / Ops — added 2026-05-13 per [`adr-wing4-context-spine.md`](adr-wing4-context-spine.md))
56
+
57
+ | Slot | Path under `agents/context-spine/` | Owner | Typical content |
58
+ |---|---|---|---|
59
+ | `fiscal-period` | `fiscal-period.md` | Finance wing | Reporting cadence (monthly · quarterly · annual · multi-year-plan), fiscal-year start, close-window timing. Read by `unit-economics`, `forecasting`, `runway-cognition`, `scenario-modeling`. |
60
+ | `org-stage` | `org-stage.md` | Strategy / People wing | Stage label (seed · series-A · series-B · growth · public), funding posture, headcount band, governance posture. Read by `build-buy-partner`, `vision-articulation`, `org-design`, `comp-banding`, `hiring-loop-design`. |
61
+ | `regulatory-regime` | `regulatory-regime.md` | Strategy wing (legal-absorbed) | Active regimes (none · GDPR · HIPAA · SOC2 · PCI · CCPA), data-residency posture, breach-notification timer. Read by `contracts-cognition`, `privacy-review`, `data-handling-judgment`. |
62
+
44
63
  Slots are markdown files. Each is **≤ 200 lines**; longer means the
45
64
  slot is doing two jobs and the author should split or trim. Empty /
46
65
  missing slot is allowed — the citing skill MUST handle absence
@@ -64,9 +83,10 @@ Rules:
64
83
 
65
84
  - The key is **optional**. Senior skills MAY ship without it; the
66
85
  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`.
86
+ - Values are restricted to the slot names in § 2: cross-wing
87
+ (`product`, `team`, `repo`) plus wing-scoped extensions
88
+ (`channel-stage`, `funnel-stage`, `customer-segment`). Unknown
89
+ values fail `task lint-skills` with `unknown_context_spine_slot`.
70
90
  - Reads MUST be opt-in and explicit. A skill body that says *"reads
71
91
  `agents/context-spine/product.md` if present"* without declaring
72
92
  the slot in frontmatter is **incorrect** — it bypasses the lint
@@ -91,8 +111,13 @@ file does not break the skill).
91
111
 
92
112
  ## § 5 — Slot-add policy
93
113
 
94
- Adding a fourth slot is **structurally allowed but procedurally
95
- expensive**. Two preconditions:
114
+ Two tracks: **cross-wing** (locked at 3, citations-first) and
115
+ **wing-scoped** (per-wing ADR, citations prospective).
116
+
117
+ ### Cross-wing track — citations-first
118
+
119
+ Adding a fourth **cross-wing** slot (one every wing might read) is
120
+ **structurally allowed but procedurally expensive**. Two preconditions:
96
121
 
97
122
  1. **Citation evidence.** ≥ 2 shipped senior skills declare the new
98
123
  slot in their frontmatter and cite it in the body, with PRs
@@ -103,21 +128,42 @@ expensive**. Two preconditions:
103
128
  the migration plan for the existing senior catalog (do they
104
129
  declare the new slot, do they ignore it, do they get retrofitted).
105
130
 
131
+ ### Wing-scoped track — per-wing ADR, prospective citations
132
+
133
+ A wing may add **its own slots** for cognition specific to that wing
134
+ (e.g. Wing-3 `channel-stage`, `funnel-stage`, `customer-segment`).
135
+ Preconditions:
136
+
137
+ 1. **Per-wing ADR.** One ADR under `docs/contracts/` named
138
+ `adr-<wing>-context-spine.md` names the slots, the cognition gap,
139
+ the citing-skill chain in the same iteration, and the off-wing
140
+ migration plan (off-wing skills do **not** retrofit).
141
+ 2. **Prospective citations.** The ADR-naming iteration must ship
142
+ ≥ 2 skills citing each new slot before the iteration closes.
143
+ Drafts and roadmap items inside the same iteration **do** count
144
+ for prospective gating; cross-iteration citations do not.
145
+
146
+ Existing wing-3 reference: [`adr-gtm-context-spine.md`](adr-gtm-context-spine.md).
147
+
148
+ ### Schema and changelog rules — both tracks
149
+
106
150
  The ADR ships with the schema bump (`scripts/schemas/skill.schema.json`
107
151
  extends the `context_spine` enum) and a CHANGELOG entry under
108
152
  `### Breaking` if the new enum value tightens an existing skill's
109
153
  declaration.
110
154
 
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.
155
+ This policy mitigates the slot-sprawl failure mode: "cross-wing
156
+ locked at 3 + wing-scoped via per-wing ADR" is the brake. ADRs are
157
+ the single growth lever; no consumer-side override exists.
114
158
 
115
159
  ## § 6 — Author checklist
116
160
 
117
161
  Before shipping a senior skill that opts into the spine:
118
162
 
119
- - [ ] Frontmatter declares `context_spine:` with values from
120
- `{product, team, repo}`.
163
+ - [ ] Frontmatter declares `context_spine:` with values from the
164
+ cross-wing slots (`product`, `team`, `repo`) and/or wing-scoped
165
+ slots authorized via per-wing ADR (e.g. Wing-3:
166
+ `channel-stage`, `funnel-stage`, `customer-segment`).
121
167
  - [ ] Skill body cites `agents/context-spine/<slot>.md` near the top
122
168
  (one link per declared slot).
123
169
  - [ ] 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
@@ -0,0 +1,129 @@
1
+ ---
2
+ stability: experimental
3
+ mcp_scope: lite
4
+ ---
5
+
6
+ # MCP Beta Criteria — Promotion Gate (Hard Contract)
7
+
8
+ > **Status:** Active · governs the `experimental → beta` promotion for
9
+ > the MCP surface (`scripts/mcp_server/` local stdio kernel + the
10
+ > hosted `workers/mcp/` bridge). Owned by Phase 3 of
11
+ > [`road-to-surface-discipline.md`](../../agents/roadmaps/road-to-surface-discipline.md).
12
+ > Companion contract:
13
+ > [`mcp-phase-1-scope.md`](mcp-phase-1-scope.md) (local) ·
14
+ > [`mcp-cloud-scope.md`](mcp-cloud-scope.md) (hosted).
15
+
16
+ ## Purpose
17
+
18
+ The current MCP wording uses `experimental` across READMEs, module
19
+ docstrings, and the initialize-result server description. There is no
20
+ defined bar for retiring that label. This contract names six gates
21
+ that together flip `experimental → beta`. Every gate is **observable**
22
+ (test file, doc, or script), **falsifiable** (red is allowed; missing
23
+ is not), and **machine-reportable** through `agent-config doctor
24
+ --check mcp-beta-readiness` (lands in Phase 3 Step 5).
25
+
26
+ > **Iron Law:** all six gates must be green for the same release tag
27
+ > before any user-visible surface drops `experimental`. A green gate
28
+ > sheet on `main` does not authorize a back-dated wording change on a
29
+ > release branch that did not also pass the sheet.
30
+
31
+ ## The six gates
32
+
33
+ Each gate is owned by a single artefact. When the artefact is missing,
34
+ Phase 3 Step 3 creates a **failing test** (`pytest.skip("pending: …",
35
+ allow_module_level=True)` or `raise NotImplementedError("mcp-beta-gate-N
36
+ pending")`) so the AC stays falsifiable.
37
+
38
+ ### Gate 1 — External-client end-to-end run
39
+
40
+ At least one MCP client **outside this repo's own test harness** has
41
+ completed a full session against MCP Lite: `initialize` →
42
+ `prompts/list` → `prompts/get` → `resources/list` → `resources/read`
43
+ → shutdown. Evidence is a transcript or recorded session under
44
+ `tests/mcp/external-clients/` plus the client name and version
45
+ (Claude Desktop ≥ vX, Cursor ≥ vY, Zed ≥ vZ, Continue ≥ vW).
46
+
47
+ ### Gate 2 — Bearer-auth coverage
48
+
49
+ `tests/mcp/auth/` must cover four cases against the hosted Worker
50
+ surface — **happy path**, **401 on missing token**, **401 on expired
51
+ token**, **401 → 200 on rotated token**. Each case asserts the wire
52
+ envelope shape, not only the status code. Gate fails if any case is
53
+ skipped, xfailed, or absent.
54
+
55
+ ### Gate 3 — Lite/Full parity smoke suite
56
+
57
+ For every primitive the published surface exposes (`prompts/list`,
58
+ `prompts/get`, `resources/list`, `resources/read`), a parametrized
59
+ test asserts the response body from the hosted Worker (Lite) and the
60
+ local stdio kernel (Full) **byte-identical** (modulo the documented
61
+ deltas in `mcp-cloud-scope.md § Lite vs Full`). Failure must surface
62
+ the diff, not just a boolean.
63
+
64
+ ### Gate 4 — Health endpoint under load
65
+
66
+ The hosted Worker exposes `/healthz` (or equivalent) that returns a
67
+ structured JSON envelope `{status, uptime_s, build_sha,
68
+ last_content_refresh}`. A k6 / wrk smoke test in
69
+ `tests/mcp/load/healthz.k6.js` proves p95 < 200 ms across 60 s at 50
70
+ RPS. The local stdio kernel surfaces the same envelope through a
71
+ `server/health` JSON-RPC ping.
72
+
73
+ ### Gate 5 — Abuse / rate-limit plan
74
+
75
+ `docs/contracts/mcp-rate-limit.md` exists and pins three knobs —
76
+ per-token RPS, per-token daily quota, per-IP burst — with a fallback
77
+ behaviour on overrun (`429` + `Retry-After`). The Worker enforces the
78
+ knobs; a contract test in `tests/mcp/rate-limit/` asserts that
79
+ exceeding any knob returns `429` with a non-empty `Retry-After`.
80
+
81
+ ### Gate 6 — Lite ↔ Full no-drift
82
+
83
+ A nightly CI job runs the Phase 3 Step 3 parity suite (Gate 3) plus a
84
+ canary: ingest one prompt and one resource on both surfaces, hash the
85
+ body, and assert equality. Drift > 0 fails the job and posts a Slack
86
+ ping. Evidence: the workflow file (`.github/workflows/mcp-no-drift.yml`)
87
+ **and** at least one successful run within the last 7 days.
88
+
89
+ ## Promotion procedure
90
+
91
+ 1. Open a release-candidate branch named `release/mcp-beta-rcN`.
92
+ 2. Run `./agent-config doctor --check mcp-beta-readiness` — must
93
+ print all six gates green.
94
+ 3. Flip the wording in the **five** surfaces inventoried in
95
+ [`road-to-surface-discipline.md` Phase 3 Step 1](../../agents/roadmaps/road-to-surface-discipline.md):
96
+ `docs/mcp-server.md` (status banner + Remote-MCP sub-claim),
97
+ `README.md` (pointer line), `scripts/mcp_server/server.py`
98
+ (initialize-result `serverInfo.name`),
99
+ `scripts/mcp_server/__init__.py` (module docstring `Stability:`).
100
+ 4. Update the changelog with the gate sheet snapshot.
101
+ 5. Merge the RC branch through the normal review path. Tag is **not**
102
+ created until the gate sheet is reproducible on the merge commit.
103
+
104
+ ## Demotion procedure
105
+
106
+ Any single gate going red on `main` for more than 7 consecutive days
107
+ demotes the surface back to `experimental` at the next release. This
108
+ is a wording-only demotion; no code is reverted. The doctor check
109
+ reports the demotion automatically.
110
+
111
+ ## Surface delta
112
+
113
+ This contract adds **0 new commands**, **0 new skills**, **0 new
114
+ personas**. It defines a promotion gate; nothing more. Net surface
115
+ delta for Phase 3: ≤ 0.
116
+
117
+ ## Cross-references
118
+
119
+ - [`mcp-phase-1-scope.md`](mcp-phase-1-scope.md) — local stdio kernel
120
+ hard contract (A0).
121
+ - [`mcp-cloud-scope.md`](mcp-cloud-scope.md) — hosted Worker hard
122
+ contract (A0-cloud).
123
+ - [`mcp-tool-stub-envelope.md`](mcp-tool-stub-envelope.md) — Phase 1
124
+ discovery contract.
125
+ - [`STABILITY.md`](STABILITY.md) — stability tier definitions
126
+ (`experimental` / `beta` / `stable`) and what wording each tier may
127
+ use in user-visible surfaces.
128
+ - [`road-to-surface-discipline.md`](../../agents/roadmaps/road-to-surface-discipline.md)
129
+ — Phase 3 acceptance criteria and step-level evidence pointers.
@@ -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