@event4u/agent-config 9.3.0 → 9.4.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 (72) hide show
  1. package/.claude-plugin/marketplace.json +1 -1
  2. package/CHANGELOG.md +78 -0
  3. package/CONTRIBUTING.md +14 -0
  4. package/README.md +12 -4
  5. package/dist/agent-src/commands/contribution-precheck.md +100 -0
  6. package/dist/agent-src/commands/team.md +4 -0
  7. package/dist/agent-src/contexts/model-recommendations.md +6 -0
  8. package/dist/agent-src/rules/token-efficiency.md +7 -0
  9. package/dist/agent-src/skills/adversarial-review/SKILL.md +5 -0
  10. package/dist/agent-src/skills/ai-council/SKILL.md +3 -0
  11. package/dist/agent-src/skills/build-buy-partner/SKILL.md +1 -0
  12. package/dist/agent-src/skills/decision-record/SKILL.md +35 -1
  13. package/dist/agent-src/skills/decision-record/evals/triggers.json +82 -12
  14. package/dist/agent-src/skills/decision-record/references/weighted-matrix.md +119 -0
  15. package/dist/agent-src/skills/evaluate-llm-feature/SKILL.md +142 -0
  16. package/dist/agent-src/skills/judge-synthesis/SKILL.md +1 -0
  17. package/dist/agent-src/skills/learning-tutor/SKILL.md +215 -0
  18. package/dist/agent-src/skills/rice-prioritization/SKILL.md +1 -0
  19. package/dist/agent-src/skills/stakeholder-tradeoff/SKILL.md +3 -1
  20. package/dist/agent-src/skills/subagent-orchestration/SKILL.md +2 -1
  21. package/dist/agent-src/templates/agents/agent-project-settings.example.yml +1 -1
  22. package/dist/discovery/deprecation-report.md +1 -1
  23. package/dist/discovery/discovery-manifest.json +94 -24
  24. package/dist/discovery/discovery-manifest.json.sha256 +1 -1
  25. package/dist/discovery/discovery-manifest.summary.md +4 -4
  26. package/dist/discovery/orphan-report.md +1 -1
  27. package/dist/discovery/packs.json +13 -10
  28. package/dist/discovery/trust-report.md +3 -3
  29. package/dist/discovery/workspaces.json +9 -6
  30. package/dist/mcp/registry-manifest.json +3 -3
  31. package/docs/CLAIMS.md +16 -2
  32. package/docs/announcements/2026-07-honest-cost-sweep-launch.md +84 -0
  33. package/docs/anti-reskin-gate.md +60 -0
  34. package/docs/architecture.md +2 -2
  35. package/docs/catalog.md +303 -278
  36. package/docs/command-flows.md +2 -1
  37. package/docs/comparison.yaml +10 -0
  38. package/docs/contracts/adoption-signal-floor.md +17 -0
  39. package/docs/contracts/ai-council-config.md +25 -0
  40. package/docs/contracts/mcp-tool-inventory.md +25 -22
  41. package/docs/contracts/tier-3-contrib-plugin.md +12 -4
  42. package/docs/featured-skills.md +2 -2
  43. package/docs/getting-started-by-role.md +1 -1
  44. package/docs/getting-started.md +1 -1
  45. package/docs/governance-advantage.md +1 -1
  46. package/docs/proof.md +10 -6
  47. package/docs/self-review-gate.md +14 -0
  48. package/docs/setup/per-ide/antigravity.md +8 -3
  49. package/docs/us-vs-the-category.md +38 -0
  50. package/docs/wedge/production-validator/README.md +24 -0
  51. package/docs/wedge/production-validator/first-run-check.sh +42 -0
  52. package/package.json +1 -1
  53. package/src/scripts/_lib/catalog_score.ts +64 -0
  54. package/src/scripts/_lib/shingle_similarity.ts +146 -0
  55. package/src/scripts/ai_council/clients.ts +50 -1
  56. package/src/scripts/ai_council/config.ts +28 -3
  57. package/src/scripts/ai_council/low_impact.ts +16 -0
  58. package/src/scripts/ai_council/necessity.ts +11 -0
  59. package/src/scripts/ai_council/orchestrator.ts +78 -26
  60. package/src/scripts/ai_council/pricing.ts +59 -0
  61. package/src/scripts/ai_council/stance_tally.ts +42 -5
  62. package/src/scripts/build_catalog_index.ts +188 -0
  63. package/src/scripts/council_cli.ts +56 -1
  64. package/src/scripts/generate_index.ts +6 -3
  65. package/src/scripts/lint_originality.ts +464 -0
  66. package/src/scripts/mcp_server/catalog_tools.ts +114 -0
  67. package/src/scripts/mcp_server/consumer_tool_catalog.json +46 -0
  68. package/src/scripts/schemas/flow.schema.json +17 -0
  69. package/src/scripts/schemas/skill.schema.json +166 -32
  70. package/src/scripts/self_review_gate.test.ts +48 -0
  71. package/src/scripts/self_review_gate.ts +73 -5
  72. package/src/scripts/validate_flow_teams.ts +127 -0
@@ -6,7 +6,7 @@
6
6
  },
7
7
  "metadata": {
8
8
  "description": "Bootstrap shim for the event4u agent-config suite. This plugin ships ONLY the dispatcher hooks plus one install-pointer skill — ALL content (skills, rules, commands) is installed via `npx -y @event4u/agent-config init`, which writes the file projection AND registers the same hooks in ~/.claude/settings.json. DEPRECATED as a content channel; kept so the marketplace listing stays discoverable and existing installs keep working hooks.",
9
- "version": "9.3.0",
9
+ "version": "9.4.0",
10
10
  "keywords": [
11
11
  "agent-config",
12
12
  "skills",
package/CHANGELOG.md CHANGED
@@ -166,6 +166,29 @@ gated on the telemetry from 6.0.0-C. Deferred to 6.0.0-C: a
166
166
  `skills_discoverable` field, reactive just-in-time pack activation, and the
167
167
  per-pack budget lint.
168
168
 
169
+ ### Added — team mode: governed cross-model review (default-off, `road-to-team-mode`)
170
+
171
+ A new default-off `/team` command family (`review`, `adversarial`, `delegate`,
172
+ `status`) that governs the official `openai/codex-plugin-cc` as the Claude-Code
173
+ transport — a second strong model reviewing the real working-tree diff (depth),
174
+ the complement to the council's neutral-artefact breadth.
175
+
176
+ - **Default-off + fail-closed.** With `ai_team.enabled: false` (default) no
177
+ command is suggested and invocation prints an enable pointer — byte-identical
178
+ to pre-roadmap behaviour. On Claude-Code hosts the wrappers are thin
179
+ delegations to `/codex:*`; absent the plugin they fail closed with the
180
+ `agent-config doctor --check team` remediation, never a silent no-op.
181
+ - **Multi-host fallback (review lens only).** On non-Claude-Code hosts
182
+ `/team:review` sends a size-capped repo-diff bundle through the existing
183
+ subscription `OpenAICliClient`, with an honest capability-delta header.
184
+ - **Governed, not rebuilt.** Nothing upstream-maintained is reimplemented; the
185
+ Review-Gate stays upstream's (we add an opt-in loop-bound + ledger line), and
186
+ `/team:delegate` (write access) sits behind a second opt-in
187
+ `ai_team.allow_delegate: false`. Config: `docs/contracts/ai-team-config.md`.
188
+ - **No quality claim yet.** Cross-model defect-finding lift is unproven until
189
+ the Phase 5 benchmark runs (spend-gated); the docs describe workflow value
190
+ only, never a lift claim.
191
+
169
192
  ### Breaking — v4.0.0 unified setup (`road-to-unified-setup`)
170
193
 
171
194
  `v4.0.0` is a **hard-cut** release. The legacy Python installer at
@@ -1033,6 +1056,61 @@ our recommendation order, not its support status.
1033
1056
  > that forces a new era split (`# Era: 9.3.x`, etc.) — see
1034
1057
  > [`docs/contracts/CHANGELOG-conventions.md § Era splits`](docs/contracts/CHANGELOG-conventions.md).
1035
1058
 
1059
+ ## [9.4.0](https://github.com/event4u-app/agent-config/compare/9.3.0...9.4.0) (2026-07-20)
1060
+
1061
+ ### Features
1062
+
1063
+ * **self-review:** large-diff / claim-affecting ai-council escalation (detect + recommend) ([1308e22](https://github.com/event4u-app/agent-config/commit/1308e220179600424d4ac590ae9295b522f3f22c))
1064
+ * **council:** cross-round prompt-cache read unlock ([5faf32b](https://github.com/event4u-app/agent-config/commit/5faf32bc3b0522e7e0af3b28a108ce808133a56e))
1065
+ * **council:** auto model-tiering gated on the A1<->A3 cache coupling ([1a693bf](https://github.com/event4u-app/agent-config/commit/1a693bffe79addde715becc9a366c5185e9545b9))
1066
+ * **council:** stance repair fires only on genuinely unparseable STANCE ([40196bd](https://github.com/event4u-app/agent-config/commit/40196bdac2489dc50ac1213976e776d94f3f89c7))
1067
+ * **adoption:** wedge promise, opt-in first-run instrument, honest positioning surface ([c93e314](https://github.com/event4u-app/agent-config/commit/c93e314b102ba437afcbef994306a5f0c42d2476))
1068
+ * **routing:** reciprocal cluster routing for the weighted-matrix mode ([6be7bc5](https://github.com/event4u-app/agent-config/commit/6be7bc5b7d042bdfc000c5a51270a7c9da5a2f28))
1069
+ * **skill:** weighted-matrix mode in decision-record ([7eaf4db](https://github.com/event4u-app/agent-config/commit/7eaf4db125eebe19cb0d57ac32f15f917530b206))
1070
+ * **command:** /contribution-precheck — contributor self-service gate subset ([5e7de9b](https://github.com/event4u-app/agent-config/commit/5e7de9b6b828653bb0e49e1711f42ee56c18e4cd))
1071
+ * **catalog:** provenance source column + CREDITS.md ([10cca8a](https://github.com/event4u-app/agent-config/commit/10cca8af8a244aa30d0ee036126e24c506c82e48))
1072
+ * **ci:** wire lint_originality --changed as the originality-gate PR job ([00c3754](https://github.com/event4u-app/agent-config/commit/00c3754df8d9a95c30a84c294bfb3ab9cfbbe509))
1073
+ * **skills:** add learning-tutor skill — six structured tutoring modes ([8ed343d](https://github.com/event4u-app/agent-config/commit/8ed343d282ad669489866cda84a6a214f1943ca6))
1074
+ * **skill:** evaluate-llm-feature — black-box LLM-feature evaluator ([b94249f](https://github.com/event4u-app/agent-config/commit/b94249fb067c39d8fa5c8f4fa6cfe2b1290e336b))
1075
+ * **flows:** optional team annotation + resolver ([7b14ed5](https://github.com/event4u-app/agent-config/commit/7b14ed5cbba5bec6b4e5500fb68c6770ad7d5f87))
1076
+ * **mcp:** lazy catalog router — index, scoring, stub tools ([d17b9e0](https://github.com/event4u-app/agent-config/commit/d17b9e05fc5742f922177febab086c4723796029))
1077
+ * **originality:** anti-reskin shingle-overlap gate ([dae4760](https://github.com/event4u-app/agent-config/commit/dae4760c7b041844bde10fa3e2eb6ae5f34a9fa6))
1078
+
1079
+ ### Bug Fixes
1080
+
1081
+ * **skill:** keep subagent-orchestration under the 400-line size gate ([c419da9](https://github.com/event4u-app/agent-config/commit/c419da949db135c6c1723d85e78906669ee881a2))
1082
+ * **portability:** drop task-ci literals from the shipped precheck command ([a0d83d3](https://github.com/event4u-app/agent-config/commit/a0d83d33984847143749131fe0e01509c72edbbb))
1083
+ * **ci:** CAPABILITIES 277 count + defang injection-probe examples ([c1d4036](https://github.com/event4u-app/agent-config/commit/c1d4036dd615fa2bcbd670e66583f8eac15fbb6a))
1084
+ * **originality:** close the adversarial DF batch-masking hole ([dd84403](https://github.com/event4u-app/agent-config/commit/dd8440363a7ecda67934cca27cb0df4b69ba34e6))
1085
+ * **mcp:** version the catalog-index cache filename ([93d980a](https://github.com/event4u-app/agent-config/commit/93d980aff254ceb9d31bf290f36a249377e81eea))
1086
+
1087
+ ### Documentation
1088
+
1089
+ * **team:** CHANGELOG entry + close-out (Phase 6 + prereqs); upstream re-verified ([a6405c5](https://github.com/event4u-app/agent-config/commit/a6405c5ade5e4e1a22c7cb60eaf0d31f7f212b9e))
1090
+ * **team:** three-way router disambiguation cross-links (council / team / subagents) ([f82ed16](https://github.com/event4u-app/agent-config/commit/f82ed168f81c48ef98b0e561f44bc13c8691ce77))
1091
+ * **self-review:** document the escalation path; flip Phase 1 step (part c) ([9f26716](https://github.com/event4u-app/agent-config/commit/9f267166b1305f9833f89ae8119638105ecd42c1))
1092
+ * **roadmap:** archive road-to-api-cost-optimization — A3 executed, fully closed ([94e2044](https://github.com/event4u-app/agent-config/commit/94e20444f215491d6f5350b09910d37a928a090e))
1093
+ * **cost:** B2 index-branch pointers (deferred follow-up closed) ([7d68245](https://github.com/event4u-app/agent-config/commit/7d68245ebc013b5fa05f0790473e910e45227a5e))
1094
+ * **roadmap:** adoption roadmap — second autonomous slice landed ([0febec6](https://github.com/event4u-app/agent-config/commit/0febec66d629dc2cca6410bfaa07c841711e1966))
1095
+ * **announcements:** draft the honest-launch story (drafted, not posted) ([8e1b757](https://github.com/event4u-app/agent-config/commit/8e1b757f53f367c1fdc7d7150eed4ff8edc1e426))
1096
+ * **roadmap:** archive road-to-weighted-decision-matrix — fully executed ([4586dcd](https://github.com/event4u-app/agent-config/commit/4586dcd5432c618ffd007af2f0977a24249945aa))
1097
+ * **roadmap:** originality-gate + contributor-funnel roadmap, executed and parked ([4d0e73b](https://github.com/event4u-app/agent-config/commit/4d0e73b67298cd78b509778514ab170fcc75e930))
1098
+ * **probe:** anti-reskin-gate demand probe + extraction floor ([b849580](https://github.com/event4u-app/agent-config/commit/b8495802f93a966bcf5808e01b15b93e4017fd9a))
1099
+ * **roadmap:** complete + archive the ecosystem-harvest index hub ([e1752d1](https://github.com/event4u-app/agent-config/commit/e1752d176fbf948aff364fb1271532164bb2b755))
1100
+ * regenerate proof page for the new skill count (277) ([2476284](https://github.com/event4u-app/agent-config/commit/247628404098690ba2f68fa1bef6fdba1753ee13))
1101
+ * **roadmap:** complete + archive ecosystem-harvest domain-watch ([d07e81e](https://github.com/event4u-app/agent-config/commit/d07e81e017a90e92863d9bcffd1818b232fefaeb))
1102
+ * **domain-watch:** watch-notes for the two gated verticals ([26bb9dd](https://github.com/event4u-app/agent-config/commit/26bb9dd77c7c6adb1bebc9677f5096d8e66ef999))
1103
+ * **roadmap:** correct the flip-gate checkbox and tighten the flow-team criterion ([89a2d26](https://github.com/event4u-app/agent-config/commit/89a2d26721090cc7545a19ef73877689a445420f))
1104
+ * **roadmap:** persona-library harvest — executed and archived ([1c6940a](https://github.com/event4u-app/agent-config/commit/1c6940a2693c94ad366ddc31f791d13870da6d07))
1105
+ * correct outdated Antigravity host claims ([fca90e2](https://github.com/event4u-app/agent-config/commit/fca90e2c3413465e0a4bfbfd65d1da01ea15bef7))
1106
+
1107
+ ### Chores
1108
+
1109
+ * **meta:** sync pack README with shortened precheck description ([601fdc1](https://github.com/event4u-app/agent-config/commit/601fdc111553d8d4c55796d43c3203d938b5c179))
1110
+ * **ci:** wire lint-originality and validate-flow-teams into the pipeline ([48bc88a](https://github.com/event4u-app/agent-config/commit/48bc88a2ce24bfffd1f98e4194163986b3adf245))
1111
+
1112
+ Tests: 7833 (+63 since 9.3.0)
1113
+
1036
1114
  ## [9.3.0](https://github.com/event4u-app/agent-config/compare/9.2.0...9.3.0) (2026-07-16)
1037
1115
 
1038
1116
  ### Features
package/CONTRIBUTING.md CHANGED
@@ -127,6 +127,20 @@ the review floor, not around it.
127
127
  specific consumer project, domain, or stack. The
128
128
  [`augment-portability`](dist/agent-src/rules/augment-portability.md) rule and
129
129
  `scripts/check_portability.py` enforce this in CI.
130
+ - **External contributions get credited.** A merged community skill carries
131
+ `provenance: community` in its frontmatter — the public catalog
132
+ ([`docs/catalog.md`](docs/catalog.md)) renders it as `community` in the
133
+ `source` column — and gets a row in [`CREDITS.md`](CREDITS.md)
134
+ (§ Community contributions). Maintainers add both on merge; if you were
135
+ missed, open an issue — attribution gaps are treated as bugs.
136
+ - **Originality is CI-gated.** Every PR touching skills, personas, or domain
137
+ commands runs `lint_originality --changed` (the anti-reskin gate, see the
138
+ `originality-gate` job in `.github/workflows/skill-lint.yml`). Run it
139
+ locally before pushing:
140
+ `./scripts-run src/scripts/lint_originality --changed <changed files>` —
141
+ or run the whole contributor precheck in one pass via the
142
+ [`/contribution-precheck`](src/domains/meta/contribution-precheck/command.md)
143
+ command (frontmatter schema + skill lint + originality, Node-only).
130
144
 
131
145
  ## Agent-assisted contribution workflow
132
146
 
package/README.md CHANGED
@@ -4,11 +4,13 @@
4
4
 
5
5
  [![Smoke](https://github.com/event4u-app/agent-config/actions/workflows/smoke.yml/badge.svg)](https://github.com/event4u-app/agent-config/actions/workflows/smoke.yml) [![Public install smoke (3 OS × 2 Node)](https://github.com/event4u-app/agent-config/actions/workflows/smoke-public-install.yml/badge.svg)](https://github.com/event4u-app/agent-config/actions/workflows/smoke-public-install.yml) [![npm](https://img.shields.io/npm/v/@event4u/agent-config?style=flat-square&label=npm&color=orange)](https://www.npmjs.com/package/@event4u/agent-config) [![agent-config MCP server](https://glama.ai/mcp/servers/event4u-app/agent-config/badges/score.svg)](https://glama.ai/mcp/servers/event4u-app/agent-config)
6
6
 
7
- [![Skills](https://img.shields.io/badge/Skills-276-orange?style=flat-square)](dist/agent-src/skills/) [![Rules](https://img.shields.io/badge/Rules-105-orange?style=flat-square)](dist/agent-src/rules/) [![Commands](https://img.shields.io/badge/Commands-184-orange?style=flat-square)](dist/agent-src/commands/) [![Guidelines](https://img.shields.io/badge/Guidelines-101-orange?style=flat-square)](docs/guidelines/) [![Personas](https://img.shields.io/badge/Personas-29-orange?style=flat-square)](dist/agent-src/personas/) [![Advisors](https://img.shields.io/badge/Advisors-5-orange?style=flat-square)](dist/agent-src/personas/advisors/)
7
+ [![Skills](https://img.shields.io/badge/Skills-278-orange?style=flat-square)](dist/agent-src/skills/) [![Rules](https://img.shields.io/badge/Rules-105-orange?style=flat-square)](dist/agent-src/rules/) [![Commands](https://img.shields.io/badge/Commands-190-orange?style=flat-square)](dist/agent-src/commands/) [![Guidelines](https://img.shields.io/badge/Guidelines-101-orange?style=flat-square)](docs/guidelines/) [![Personas](https://img.shields.io/badge/Personas-29-orange?style=flat-square)](dist/agent-src/personas/) [![Advisors](https://img.shields.io/badge/Advisors-5-orange?style=flat-square)](dist/agent-src/personas/advisors/)
8
8
 
9
9
  > **Choose your experience — developer · founder · content · agency · finance · ops. Add packs. Get a focused command set, not a 500-artefact dump.** Bring your own AI provider.
10
10
 
11
- **Try it in 30 seconds** — drop one read-only subagent into any repo and watch it gate "done": `@production-validator check this branch is actually done`. No wizard, no lock-in, nothing else installed — the [30-second wedge ↓](#quickstart) is the whole first step. Full docs: **[event4u-app.github.io/agent-config](https://event4u-app.github.io/agent-config)**.
11
+ **Try it in 30 seconds** — drop one read-only subagent into any repo and watch it gate "done": `@production-validator check this branch is actually done`. No wizard, no lock-in, nothing else installed — the [30-second wedge ↓](#quickstart) is the whole first step. Start at the proof, not the catalog: **[event4u-app.github.io/agent-config/proof/](https://event4u-app.github.io/agent-config/proof/)**.
12
+
13
+ ![The trust surface running green — every "verify it yourself" command from a real, CI-re-executed run](docs/media/proof-demo.gif)
12
14
 
13
15
  **Every public claim in this README is machine-checked — [verify it yourself](docs/proof.md).** In a market that runs on unbacked headline numbers, this one binds each claim to resolvable evidence or fails its own build.
14
16
 
@@ -120,8 +122,14 @@ is generated from source: a claim→evidence table (every public claim binds to
120
122
  resolvable pointer, or CI fails), honest-null benchmarks *including the runs where
121
123
  the package changed nothing*, and a "verify it yourself" block you run on a fresh
122
124
  checkout. The proof page fails CI if it drifts from its sources — reproducibility
123
- is the proof. Browse it on the deployed docs site:
124
- [event4u-app.github.io/agent-config](https://event4u-app.github.io/agent-config).
125
+ is the proof. Browse it on the deployed docs site — the proof page is the primary entry:
126
+ [event4u-app.github.io/agent-config/proof/](https://event4u-app.github.io/agent-config/proof/).
127
+ The honest comparison frame lives at
128
+ [`docs/us-vs-the-category.md`](docs/us-vs-the-category.md).
129
+
130
+ Maintaining a skills catalog yourself? The **anti-reskin gate** that blocks
131
+ find-replace re-skin PRs here runs on your catalog too —
132
+ [`docs/anti-reskin-gate.md`](docs/anti-reskin-gate.md).
125
133
 
126
134
  Audit-disciplined by construction — every memory consult, decision
127
135
  key, and hook concern lands in `agents/runtime/state/` so you can replay it.
@@ -0,0 +1,100 @@
1
+ ---
2
+ model_tier: medium
3
+ name: contribution-precheck
4
+ pack: meta
5
+ tier: 2
6
+ visibility: internal
7
+ skills: [lint-skills, check-refs]
8
+ description: "Contributor self-service precheck: run the PR-relevant lint subset (skill linter, originality gate, frontmatter schema) on changed files locally — a verdict with fix hints before opening a PR."
9
+ suggestion:
10
+ eligible: false
11
+ rationale: "Package-internal — contributors to event4u/agent-config invoke it explicitly before opening a PR."
12
+ workspaces:
13
+ - agent-config-maintainer
14
+ packs:
15
+ - meta
16
+ ---
17
+
18
+ # contribution-precheck
19
+
20
+ Run the same gates a PR will hit — locally, Node-only, before pushing. Mirrors
21
+ the CI enforcement path (`originality-gate` + skill-lint jobs in
22
+ `.github/workflows/skill-lint.yml`) so a contributor never learns about a
23
+ failure from remote CI first.
24
+
25
+ Requires only Node + installed `node_modules` (the `./scripts-run` shim invokes
26
+ `tsx` directly — no task runner, no full CI toolchain).
27
+
28
+ ## Instructions
29
+
30
+ ### 1. Compute the changed set
31
+
32
+ ```bash
33
+ BASE=$(git merge-base origin/main HEAD 2>/dev/null || echo HEAD)
34
+ CHANGED=$(git diff --name-only --diff-filter=ACMR "$BASE" -- \
35
+ 'src/skills/*/SKILL.md' \
36
+ 'src/agent-src/personas/*.md' \
37
+ 'src/domains/**/command.md' \
38
+ | grep -v '^src/agent-src/personas/_' || true)
39
+ ```
40
+
41
+ Uncommitted work counts: append `git diff --name-only` + `git diff --cached
42
+ --name-only` output filtered to the same patterns. Empty set → report
43
+ "nothing to precheck — no changed skills / personas / domain commands" and
44
+ stop (that is an honest no-op, not a pass).
45
+
46
+ ### 2. Run the three gates, in order
47
+
48
+ | Gate | Command | Mirrors |
49
+ |---|---|---|
50
+ | Frontmatter schema | `./scripts-run src/scripts/validate_frontmatter --root src` | CI schema validation |
51
+ | Skill lint | `./scripts-run src/scripts/skill_linter <changed SKILL.md files>` | `skill-lint` job (`--changed`) |
52
+ | Originality (anti-reskin) | `./scripts-run src/scripts/lint_originality --changed $CHANGED` | `originality-gate` job |
53
+
54
+ Notes:
55
+
56
+ - `skill_linter` takes positional paths — pass the changed `SKILL.md` files
57
+ explicitly (its own `--changed` derivation filters to the projected trees,
58
+ not `src/`, and would silently check nothing on authored edits).
59
+ - `lint_originality --changed` needs the explicit file list from step 1 — it
60
+ does not self-derive.
61
+
62
+ ### 3. Emit the verdict
63
+
64
+ One compact block, worst gate first:
65
+
66
+ ```
67
+ Precheck: <N> changed file(s)
68
+ ✅|❌ frontmatter — <0 failing | list failing files + first error each>
69
+ ✅|❌ skill lint — <pass/warn/fail counts | per-file errors>
70
+ ✅|❌ originality — <no overlap ≥ WARN | offending pair + overlap %>
71
+ Verdict: READY | FIX FIRST (<n> blocking finding(s))
72
+ ```
73
+
74
+ For every ❌ add one fix hint: the failing file, the rule/pair it tripped, and
75
+ the smallest change that clears it (e.g. "overlap 72% with `<skill>` — rewrite
76
+ the shared procedure sections in your own words; find-replace re-skins score
77
+ ~100% because entities are neutralized").
78
+
79
+ ### 4. Degraded mode (no git remote / shallow clone)
80
+
81
+ `origin/main` missing → fall back to `git diff --name-only HEAD` (working
82
+ tree) for step 1 and say so in the verdict header. Never claim the CI result
83
+ will match exactly in degraded mode — the PR gate diffs against the real base.
84
+
85
+ ## Gotcha
86
+
87
+ - A clean precheck is **necessary, not sufficient** — remote CI additionally
88
+ runs the per-pack matrix, security linters and reference checks. The
89
+ precheck covers the gates that most commonly fail external contributions.
90
+ - Do not "fix" an originality failure by shuffling words until the score dips
91
+ under the threshold — the entity-neutralized shingle gate is calibrated for
92
+ find-replace re-skins; a borderline score means the artifact needs its own
93
+ substance, not better camouflage.
94
+
95
+ ## Do NOT
96
+
97
+ - Do NOT run the full local CI pipeline as a substitute — this command exists precisely so a
98
+ contributor without the full toolchain gets a verdict.
99
+ - Do NOT skip step 1's empty-set report — "0 files checked" is INCONCLUSIVE,
100
+ never a pass (same guard as CI).
@@ -146,6 +146,10 @@ measured improvement.
146
146
 
147
147
  - `/council` — breadth under a neutrality contract; the complement, not the
148
148
  competitor.
149
+ - `subagent-orchestration` skill — the in-session, same-weights variant (no
150
+ network, no spend); team is cross-model with repo access. The three-way
151
+ router split: council = independent breadth, team = collaborative depth,
152
+ subagents = in-session same-weights.
149
153
  - `adversarial-review` skill — the free single-model first rung below
150
154
  `/team adversarial`.
151
155
  - `docs/contracts/ai-team-config.md` — the `ai_team` settings block
@@ -58,6 +58,12 @@ ABOVE the implementer tier (ladder in
58
58
  [`subagent-configuration`](subagent-configuration.md)). Downshifting an
59
59
  implementer never downshifts its judge.
60
60
 
61
+ ## Cost cross-link
62
+
63
+ Tier choice is also a **billing lever** — for the dollar side (caching, batch,
64
+ model tiering, effort right-sizing) route via `token-optimizer` skill's index
65
+ branch (`api-cost-levers` row); `/cost:report` names the dominant lever.
66
+
61
67
  ## Detection Heuristics
62
68
 
63
69
  | Signal | Task Type | Tier |
@@ -30,6 +30,13 @@ IF YOU CATCH YOURSELF REPEATING → STOP, RETHINK, ASK.
30
30
 
31
31
  When a tool returns a value (branch name, file path, PR number), use that EXACT value in subsequent API calls. NEVER substitute a value from earlier in the conversation. Context decay causes silent mismatches — fresh output is the only source of truth.
32
32
 
33
+ ## API-dollar levers
34
+
35
+ Large stable context reused across turns (caching), non-interactive bulk
36
+ cohorts (batch), or cost-aware model/effort decision → route via
37
+ [`token-optimizer`](../skills/token-optimizer/SKILL.md) index branch
38
+ (`api-cost-levers` row) — single source of truth for billing levers.
39
+
33
40
  ## Mechanics
34
41
 
35
42
  Anti-loop patterns, act-skip-narration / stop-early / minimize-tool-calls clauses, and small-output / debugging exceptions: [`token-efficiency-mechanics`](../contexts/communication/rules-auto/token-efficiency-mechanics.md). Precedence: never overrides `user-interaction` or command rules.
@@ -27,6 +27,11 @@ Do NOT use when:
27
27
  - The user explicitly asked for a quick/rough draft.
28
28
  - You're exploring options, not committing to one yet.
29
29
 
30
+ **Inbound delegation:** [`decision-record`](../decision-record/SKILL.md)
31
+ § Weighted-matrix mode delegates a scoped attack here after the weighted
32
+ sums ("attack the winner, using the losing options' strongest criteria") —
33
+ treat the matrix + sensitivity block as the artifact under review.
34
+
30
35
  ## Procedure: Adversarial review
31
36
 
32
37
  1. **Inspect the artifact** — Read the plan, diff, or draft you are about to critique; note its scope, assumptions, and the explicit asks before attacking.
@@ -958,6 +958,9 @@ fast-path entries (clean session is not an error).
958
958
  - `/council` command — the user-facing entry point.
959
959
  - `subagent-orchestration` skill — internal multi-agent variant (no
960
960
  network, no spend, but no diversity of weights either).
961
+ - `/team` command — collaborative cross-model review WITH repo access
962
+ (depth); council is breadth on an artefact, team is one strong model in
963
+ the repo. Different mechanism, not a competitor.
961
964
  - `scripts/ai_council/prompts.ts` — neutrality preamble + per-mode
962
965
  system prompts.
963
966
  - `scripts/ai_council/advisors.ts` — replace-mode planning + persona
@@ -109,6 +109,7 @@ Pick one. Emit a build-buy-partner ADR via the `adr-create` skill, citing this s
109
109
  - Scenario shape comparison — route to [`scenario-modeling`](../scenario-modeling/SKILL.md) (O4); P1 consumes O4's `scenario-bundle.md`.
110
110
  - Org-shape changes (reorg, team-split) — route to [`org-design`](../org-design/SKILL.md) (Q1); P1 composes Q1 for the "build" option's team shape.
111
111
  - Decision-record authoring mechanics — route to [`adr-create`](../adr-create/SKILL.md); P1 emits an ADR via that skill.
112
+ - A generic multi-option choice on custom user-weighted criteria (not build/buy/partner-shaped) — route to [`decision-record`](../decision-record/SKILL.md) § Weighted-matrix mode; this skill stays the domain-specific instance.
112
113
 
113
114
  ## When the agent should load this
114
115
 
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  model_tier: high
3
3
  name: decision-record
4
- description: "Use when choosing between alternatives with trade-offs — X-or-Y decisions (pattern vs pattern, strategy vs strategy) — frames options · trade-offs · consequences; ADR draft via `adr-create`."
4
+ description: "Use when choosing between alternatives with trade-offs — X-or-Y decisions or a weighted decision matrix / gewichtete Entscheidungsmatrix ('score my options'); ADR via `adr-create`."
5
5
  status: active
6
6
  tier: senior
7
7
  domain: process
@@ -126,6 +126,35 @@ If this decision overrides a prior ADR:
126
126
  Output the structured payload (below). The user — or
127
127
  `adr-create` — turns it into the file.
128
128
 
129
+ ## Weighted-matrix mode (quantitative)
130
+
131
+ Optional numeric variant of step 3. **Gate — fire only when ALL hold:**
132
+ ≥ 3 options · no single dominant criterion · costly / hard-to-reverse ·
133
+ commensurable criteria (no values conflict). 2-option or reversible choice →
134
+ one-line redirect: just decide, or qualitative matrix above. Full procedure,
135
+ anchors, worked example: [`references/weighted-matrix.md`](references/weighted-matrix.md).
136
+
137
+ 1. User states decision + options.
138
+ 2. **User lists criteria + weights (1-10) BEFORE any scoring** — AI may
139
+ append missed criteria afterward, each labeled `(AI-suggested)`. Never
140
+ propose criteria first (anchoring).
141
+ 3. Criteria hygiene: cap 4-8, merge near-synonyms (double-counting check).
142
+ 4. Score options 1-10 against **fixed anchors** (each criterion declares
143
+ what 1 and what 10 mean — never relative-to-best-in-set).
144
+ 5. Weighted sums, then **sensitivity block — the load-bearing gate**:
145
+ close-call margin (< 10 % = "no clear winner — decide on unquantified
146
+ factors"), smallest weight change that flips the winner, ±1-score flip
147
+ test. Fragile winner reported as fragile, never as "the rational choice".
148
+ 6. Delegate argue-against to
149
+ [`adversarial-review`](../adversarial-review/SKILL.md), scoped: "attack
150
+ the winner, using the losing options' strongest criteria" (`premortem`
151
+ delegation pattern — never reimplemented inline).
152
+
153
+ Output appends matrix + sensitivity block + attack summary + intuition
154
+ caveat (resistance to the result signals a wrong weight or unquantified
155
+ information — surface it, don't ignore it). **The score is a structured
156
+ argument, not a verdict.** Hand-off to `adr-create` unchanged.
157
+
129
158
  ## Related Skills
130
159
 
131
160
  **WHEN to use this**
@@ -147,6 +176,9 @@ Output the structured payload (below). The user — or
147
176
  payload, not the file.
148
177
  - The risk shape is the dominant question — route to
149
178
  [`risk-officer`](../risk-officer/SKILL.md) first, then return.
179
+ - MANY items to rank on the fixed R×I×C/E formula (backlog, feature
180
+ list) — route to [`rice-prioritization`](../rice-prioritization/SKILL.md);
181
+ the weighted-matrix mode here is for ONE choice on custom criteria.
150
182
  - The decision is reversible and cheap — write a one-line note and
151
183
  move on; ADRs are for irreversible or expensive constraints.
152
184
 
@@ -157,6 +189,8 @@ Output the structured payload (below). The user — or
157
189
  - "Wir müssen ein ADR draus machen."
158
190
  - "Trade-off-Matrix für X vs Y."
159
191
  - "Diese Entscheidung überschreibt das alte ADR-NN."
192
+ - "Weighted decision matrix für die Optionen" / "score my options
193
+ against my criteria" — fires the weighted-matrix mode (gate permitting).
160
194
 
161
195
  ## Output
162
196
 
@@ -1,17 +1,87 @@
1
1
  {
2
2
  "skill": "decision-record",
3
- "last_eval": "2026-06-16",
4
- "description": "5 should-trigger + 5 should-not-trigger. Seeded from the RDP `decision` discipline rows in tests/reasoning-layer-eval/trigger-fixtures.json (choice among alternatives with real tradeoffs -> decision ledger; escalate to ADR only when cross-task/structural). Should-not covers tasks with no alternatives to weigh (mechanical / single-path).",
3
+ "last_eval": "2026-07-20",
4
+ "description": "5 should-trigger + 5 should-not-trigger. Seeded from the RDP `decision` discipline rows in tests/reasoning-layer-eval/trigger-fixtures.json (choice among alternatives with real tradeoffs -> decision ledger; escalate to ADR only when cross-task/structural). Should-not covers tasks with no alternatives to weigh (mechanical / single-path). Extended 2026-07-20 with 5+5 weighted-matrix-mode cases: quantitative scoring asks trigger; RICE-shaped ranking, 2-option reversible, stakeholder-conflict, pure prioritization and explicit rice-prioritization asks do not.",
5
5
  "queries": [
6
- { "q": "should we use the Action pattern or a Service class for this workflow?", "trigger": true },
7
- { "q": "should we adopt Redis or Postgres for the rate-limiter store? weigh the tradeoffs", "trigger": true },
8
- { "q": "pick a migration strategy for the column rename: expand-contract or big-bang", "trigger": true },
9
- { "q": "do we put authorization in middleware or a policy layer here?", "trigger": true },
10
- { "q": "choose between optimistic and pessimistic locking for the checkout flow", "trigger": true },
11
- { "q": "use the existing UserRepository to load the user", "trigger": false },
12
- { "q": "add a created_at timestamp column to the orders table", "trigger": false },
13
- { "q": "rename the variable usr to user in this function", "trigger": false },
14
- { "q": "import the logger and log the request id", "trigger": false },
15
- { "q": "format this file with the project formatter", "trigger": false }
6
+ {
7
+ "q": "should we use the Action pattern or a Service class for this workflow?",
8
+ "trigger": true
9
+ },
10
+ {
11
+ "q": "should we adopt Redis or Postgres for the rate-limiter store? weigh the tradeoffs",
12
+ "trigger": true
13
+ },
14
+ {
15
+ "q": "pick a migration strategy for the column rename: expand-contract or big-bang",
16
+ "trigger": true
17
+ },
18
+ {
19
+ "q": "do we put authorization in middleware or a policy layer here?",
20
+ "trigger": true
21
+ },
22
+ {
23
+ "q": "choose between optimistic and pessimistic locking for the checkout flow",
24
+ "trigger": true
25
+ },
26
+ {
27
+ "q": "use the existing UserRepository to load the user",
28
+ "trigger": false
29
+ },
30
+ {
31
+ "q": "add a created_at timestamp column to the orders table",
32
+ "trigger": false
33
+ },
34
+ {
35
+ "q": "rename the variable usr to user in this function",
36
+ "trigger": false
37
+ },
38
+ {
39
+ "q": "import the logger and log the request id",
40
+ "trigger": false
41
+ },
42
+ {
43
+ "q": "format this file with the project formatter",
44
+ "trigger": false
45
+ },
46
+ {
47
+ "q": "build me a weighted decision matrix for our three hosting options",
48
+ "trigger": true
49
+ },
50
+ {
51
+ "q": "gewichtete Entscheidungsmatrix für die vier Anbieter, Kriterien gewichte ich selbst",
52
+ "trigger": true
53
+ },
54
+ {
55
+ "q": "help me decide between 4 job offers — I want to weight my criteria and score each",
56
+ "trigger": true
57
+ },
58
+ {
59
+ "q": "score my options against my criteria with weights and show which one wins",
60
+ "trigger": true
61
+ },
62
+ {
63
+ "q": "we have 3 vendor candidates; weigh cost, support and lock-in and compute a winner",
64
+ "trigger": true
65
+ },
66
+ {
67
+ "q": "rank our backlog of 40 feature ideas by reach, impact, confidence and effort",
68
+ "trigger": false
69
+ },
70
+ {
71
+ "q": "tabs or spaces for this repo? quick call, easily reversible",
72
+ "trigger": false
73
+ },
74
+ {
75
+ "q": "PO wants to ship, ops wants stability — who should win this conflict?",
76
+ "trigger": false
77
+ },
78
+ {
79
+ "q": "prioritize this quarter's initiatives for the roadmap",
80
+ "trigger": false
81
+ },
82
+ {
83
+ "q": "run rice-prioritization on these feature requests",
84
+ "trigger": false
85
+ }
16
86
  ]
17
87
  }
@@ -0,0 +1,119 @@
1
+ # Weighted-matrix mode — full procedure
2
+
3
+ Quantitative variant of the `decision-record` trade-off matrix. Loaded from
4
+ [`SKILL.md § Weighted-matrix mode`](../SKILL.md) when the gate fires; this
5
+ file carries the elicitation detail, anchor discipline, sensitivity math and
6
+ a worked example. The score is a **structured argument, not a verdict**.
7
+
8
+ ## Gate — when the mode fires (all four, else stay qualitative)
9
+
10
+ 1. **≥ 3 options.** Two options rarely need weights — the qualitative matrix
11
+ or a plain decision is faster and less pseudo-precise.
12
+ 2. **No single dominant criterion.** If one criterion decides it (a hard
13
+ budget cap, a regulatory constraint), the matrix is theatre — decide on
14
+ the constraint.
15
+ 3. **Costly / hard to reverse.** Reversible decisions get a one-line "just
16
+ decide" redirect; the mode's overhead is only worth a one-way door.
17
+ 4. **Commensurable criteria.** When options conflict on *values* (privacy vs
18
+ revenue, safety vs speed-to-market), numbers hide the conflict instead of
19
+ resolving it — route to `stakeholder-tradeoff` first.
20
+
21
+ ## Elicitation — user first, always
22
+
23
+ 1. User states the decision in one sentence and names the options.
24
+ 2. **User lists criteria and assigns weights 1-10 BEFORE any scoring.** Do
25
+ not propose criteria first: an AI-proposed list anchors the user onto the
26
+ AI's frame (anchoring evidence — the council overruled AI-first
27
+ elicitation on exactly this ground, 2026-07-19). Prompt shape: *"Which
28
+ criteria matter for this decision, and how much does each weigh, 1-10?"*
29
+ 3. After the user's list is locked, the AI may append missed criteria — each
30
+ explicitly labeled `(AI-suggested)`, each weighted by the user, never by
31
+ the AI.
32
+ 4. **Criteria hygiene:** cap the list at 4-8. Merge near-synonyms
33
+ ("maintainability" + "ease of change" = one criterion) — two names for
34
+ one concern double-counts its weight. Check independence: if scoring one
35
+ criterion forces another's score, merge or drop.
36
+
37
+ ## Scoring — fixed anchors, never relative
38
+
39
+ Score every option 1-10 per criterion against a **fixed anchor line the
40
+ matrix declares up front**:
41
+
42
+ ```
43
+ Criterion: Operational cost (weight 8)
44
+ 1 = needs a dedicated on-call rotation
45
+ 10 = fully managed, zero routine operations
46
+ ```
47
+
48
+ Never score relative-to-best-in-set ("this one is the cheapest → 10") — a
49
+ new option would silently re-scale every row. Anchors make scores
50
+ re-checkable and the matrix extensible.
51
+
52
+ ## Sensitivity block — the load-bearing gate
53
+
54
+ Compute weighted sums, then ALWAYS report, in this order:
55
+
56
+ 1. **Close-call margin.** Winner's sum vs runner-up as a percentage of the
57
+ winner. **< 10 % → "no clear winner — the matrix says the options are
58
+ equivalent; decide on unquantified factors."** Never present a < 10 %
59
+ margin as a verdict.
60
+ 2. **Weight-flip threshold.** The smallest single weight change that flips
61
+ the winner (*"raise Operational cost from 6 to 8 and Option B wins"*). A
62
+ one-step flip is a fragile result — say so.
63
+ 3. **±1-score flip test.** Does any single score changed by ±1 flip the
64
+ winner? User-guessed scores carry at least ±1 of noise; a winner inside
65
+ that noise band is reported as fragile, never as "the rational choice".
66
+
67
+ Rationale: user-guessed scores × user-guessed weights is pseudo-precision
68
+ unless the fragility is surfaced — the sensitivity block, not the
69
+ argue-against step, is what keeps the mode honest (council dissent encoded
70
+ 2026-07-19).
71
+
72
+ ## Argue against the winner — delegated, scoped
73
+
74
+ After the sums, delegate to `adversarial-review` — the `premortem`
75
+ delegation pattern, never an inline reimplementation:
76
+
77
+ > Attack the top-scoring option. Use the losing options' strongest criteria
78
+ > as the attack surface: what did the weights hide, what breaks first, which
79
+ > anchor was scored generously?
80
+
81
+ Fold the attack summary into the output. If the attack finds a criterion the
82
+ matrix missed, re-run elicitation step 3 — do not silently patch the score.
83
+
84
+ ## Output contract (appended to the standard payload)
85
+
86
+ ```
87
+ Weighted matrix (weights 1-10, scores 1-10 vs fixed anchors):
88
+ | Criterion (weight) | <opt 1> | <opt 2> | <opt 3> |
89
+ | ... | | | |
90
+ Weighted sums: <opt 1>: NN · <opt 2>: NN · <opt 3>: NN
91
+
92
+ Sensitivity:
93
+ margin: NN % (< 10 % → no clear winner)
94
+ weight-flip: <smallest change that flips> | none within ±2
95
+ ±1-score flip: yes → fragile | no
96
+
97
+ Attack summary (adversarial-review, scoped to the winner):
98
+ <2-4 bullets>
99
+
100
+ Intuition caveat: the matrix complements intuition — resistance to the
101
+ result signals a wrong weight or unquantified information; surface it,
102
+ don't ignore it.
103
+
104
+ The score is a structured argument, not a verdict.
105
+ ```
106
+
107
+ Then hand off to `adr-create` exactly as the qualitative flow does.
108
+
109
+ ## Worked example (compressed)
110
+
111
+ Decision: pick a queue backend (4 options, no dominant criterion, one-way
112
+ door — gate passes). User criteria/weights: Operational cost 8, Ecosystem
113
+ maturity 6, Throughput headroom 5, Migration effort 4; AI appends
114
+ `Vendor lock-in (AI-suggested)`, user weights it 3. Anchors declared per
115
+ criterion; scores land; sums: A 178 · B 171 · C 149 · D 122. Margin 3.9 % →
116
+ **no clear winner** — report equivalence, surface that A vs B differ mainly
117
+ on lock-in (unquantified confidence), delegate the attack on A, let the
118
+ user decide on the surfaced residual. The matrix did its job by *refusing*
119
+ to hand down a verdict.