@event4u/agent-config 11.0.0 → 12.0.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 (249) hide show
  1. package/.claude-plugin/marketplace.json +1 -1
  2. package/CHANGELOG.md +71 -249
  3. package/dist/agent-src/commands/agent-handoff.md +0 -1
  4. package/dist/agent-src/commands/agent-status.md +0 -1
  5. package/dist/agent-src/commands/agents/audit.md +0 -1
  6. package/dist/agent-src/commands/agents/init.md +0 -1
  7. package/dist/agent-src/commands/agents/optimize.md +0 -1
  8. package/dist/agent-src/commands/agents/user/accept.md +0 -1
  9. package/dist/agent-src/commands/agents/user/delete.md +0 -1
  10. package/dist/agent-src/commands/agents/user/init.md +0 -1
  11. package/dist/agent-src/commands/agents/user/review.md +0 -1
  12. package/dist/agent-src/commands/agents/user/show.md +0 -1
  13. package/dist/agent-src/commands/agents/user/update.md +0 -1
  14. package/dist/agent-src/commands/agents/user.md +0 -1
  15. package/dist/agent-src/commands/agents.md +0 -1
  16. package/dist/agent-src/commands/analytics/prune.md +0 -1
  17. package/dist/agent-src/commands/analytics/show.md +0 -1
  18. package/dist/agent-src/commands/analytics.md +0 -1
  19. package/dist/agent-src/commands/analyze/conformance.md +0 -1
  20. package/dist/agent-src/commands/analyze/decision.md +0 -1
  21. package/dist/agent-src/commands/analyze/inbox.md +0 -1
  22. package/dist/agent-src/commands/analyze/incident.md +0 -1
  23. package/dist/agent-src/commands/analyze/near-miss.md +0 -1
  24. package/dist/agent-src/commands/analyze/postmortem.md +0 -1
  25. package/dist/agent-src/commands/analyze/premortem.md +0 -1
  26. package/dist/agent-src/commands/analyze/reference-repo.md +0 -1
  27. package/dist/agent-src/commands/analyze.md +0 -1
  28. package/dist/agent-src/commands/brand/identity.md +0 -1
  29. package/dist/agent-src/commands/brand/review.md +0 -1
  30. package/dist/agent-src/commands/brand/strategy.md +0 -1
  31. package/dist/agent-src/commands/brand/tokens.md +0 -1
  32. package/dist/agent-src/commands/brand/voice.md +0 -1
  33. package/dist/agent-src/commands/brand.md +0 -1
  34. package/dist/agent-src/commands/bug/fix.md +0 -1
  35. package/dist/agent-src/commands/bug/investigate.md +0 -1
  36. package/dist/agent-src/commands/bug.md +0 -1
  37. package/dist/agent-src/commands/challenge-me/vision.md +0 -1
  38. package/dist/agent-src/commands/challenge-me/with-docs.md +0 -1
  39. package/dist/agent-src/commands/challenge-me.md +0 -1
  40. package/dist/agent-src/commands/chat-history/import.md +0 -1
  41. package/dist/agent-src/commands/chat-history.md +0 -1
  42. package/dist/agent-src/commands/check-current-md.md +0 -1
  43. package/dist/agent-src/commands/commit/in-chunks.md +0 -1
  44. package/dist/agent-src/commands/commit.md +0 -1
  45. package/dist/agent-src/commands/condense.md +0 -1
  46. package/dist/agent-src/commands/context/create.md +0 -1
  47. package/dist/agent-src/commands/context/refactor.md +0 -1
  48. package/dist/agent-src/commands/context.md +0 -1
  49. package/dist/agent-src/commands/contribution-precheck.md +0 -1
  50. package/dist/agent-src/commands/cost/profile.md +0 -1
  51. package/dist/agent-src/commands/cost/report.md +0 -1
  52. package/dist/agent-src/commands/cost.md +0 -1
  53. package/dist/agent-src/commands/council/analysis.md +0 -1
  54. package/dist/agent-src/commands/council/debate.md +0 -1
  55. package/dist/agent-src/commands/council/default.md +0 -1
  56. package/dist/agent-src/commands/council/design.md +0 -1
  57. package/dist/agent-src/commands/council/optimize.md +0 -1
  58. package/dist/agent-src/commands/council/pr.md +0 -1
  59. package/dist/agent-src/commands/council.md +0 -1
  60. package/dist/agent-src/commands/design-system/capture.md +0 -1
  61. package/dist/agent-src/commands/design-system/generate.md +0 -1
  62. package/dist/agent-src/commands/design-system/import.md +0 -1
  63. package/dist/agent-src/commands/design-system.md +0 -1
  64. package/dist/agent-src/commands/estimate-ticket.md +0 -1
  65. package/dist/agent-src/commands/explain-run.md +0 -1
  66. package/dist/agent-src/commands/feature/dev.md +0 -1
  67. package/dist/agent-src/commands/feature/explore.md +0 -1
  68. package/dist/agent-src/commands/feature/plan.md +0 -1
  69. package/dist/agent-src/commands/feature/refactor.md +0 -1
  70. package/dist/agent-src/commands/feature/roadmap.md +0 -1
  71. package/dist/agent-src/commands/feature.md +0 -1
  72. package/dist/agent-src/commands/fix/ci.md +0 -1
  73. package/dist/agent-src/commands/fix/comments.md +0 -1
  74. package/dist/agent-src/commands/fix/portability.md +0 -1
  75. package/dist/agent-src/commands/fix/pr-comments-loop.md +0 -1
  76. package/dist/agent-src/commands/fix/pr-comments.md +0 -1
  77. package/dist/agent-src/commands/fix/quality.md +0 -1
  78. package/dist/agent-src/commands/fix/refs.md +0 -1
  79. package/dist/agent-src/commands/fix/route.md +0 -1
  80. package/dist/agent-src/commands/fix/seeder.md +0 -1
  81. package/dist/agent-src/commands/fix.md +0 -1
  82. package/dist/agent-src/commands/ghostwriter/delete.md +0 -1
  83. package/dist/agent-src/commands/ghostwriter/fetch.md +0 -1
  84. package/dist/agent-src/commands/ghostwriter/list.md +0 -1
  85. package/dist/agent-src/commands/ghostwriter/show.md +0 -1
  86. package/dist/agent-src/commands/ghostwriter/write.md +0 -1
  87. package/dist/agent-src/commands/ghostwriter.md +0 -1
  88. package/dist/agent-src/commands/grill-me.md +0 -1
  89. package/dist/agent-src/commands/humanize.md +0 -1
  90. package/dist/agent-src/commands/image/analyse.md +0 -1
  91. package/dist/agent-src/commands/image/create.md +0 -1
  92. package/dist/agent-src/commands/image/verify.md +0 -1
  93. package/dist/agent-src/commands/image.md +0 -1
  94. package/dist/agent-src/commands/implement-ticket.md +0 -1
  95. package/dist/agent-src/commands/jira-ticket.md +0 -1
  96. package/dist/agent-src/commands/judge/on-diff.md +0 -1
  97. package/dist/agent-src/commands/judge/solo.md +0 -1
  98. package/dist/agent-src/commands/judge/steps.md +0 -1
  99. package/dist/agent-src/commands/judge.md +0 -1
  100. package/dist/agent-src/commands/knowledge/cross-repo.md +0 -1
  101. package/dist/agent-src/commands/knowledge/forget.md +0 -1
  102. package/dist/agent-src/commands/knowledge/ingest.md +0 -1
  103. package/dist/agent-src/commands/knowledge/list.md +0 -1
  104. package/dist/agent-src/commands/knowledge.md +0 -1
  105. package/dist/agent-src/commands/memory/add.md +0 -1
  106. package/dist/agent-src/commands/memory/learn-low-impact.md +0 -1
  107. package/dist/agent-src/commands/memory/load.md +0 -1
  108. package/dist/agent-src/commands/memory/mine-session.md +0 -1
  109. package/dist/agent-src/commands/memory/promote.md +0 -1
  110. package/dist/agent-src/commands/memory/propose.md +0 -1
  111. package/dist/agent-src/commands/memory.md +0 -1
  112. package/dist/agent-src/commands/mission/upgrade.md +0 -1
  113. package/dist/agent-src/commands/mode.md +0 -1
  114. package/dist/agent-src/commands/module/create.md +0 -1
  115. package/dist/agent-src/commands/module/explore.md +0 -1
  116. package/dist/agent-src/commands/module.md +0 -1
  117. package/dist/agent-src/commands/optimize/agents-dir.md +0 -1
  118. package/dist/agent-src/commands/optimize/augmentignore.md +0 -1
  119. package/dist/agent-src/commands/optimize/deep.md +0 -1
  120. package/dist/agent-src/commands/optimize/project.md +0 -1
  121. package/dist/agent-src/commands/optimize/prompt.md +0 -1
  122. package/dist/agent-src/commands/optimize/rtk.md +0 -1
  123. package/dist/agent-src/commands/optimize/skills.md +0 -1
  124. package/dist/agent-src/commands/optimize.md +0 -1
  125. package/dist/agent-src/commands/orchestrate.md +0 -1
  126. package/dist/agent-src/commands/override/create.md +0 -1
  127. package/dist/agent-src/commands/override/manage.md +0 -1
  128. package/dist/agent-src/commands/override.md +0 -1
  129. package/dist/agent-src/commands/package/reset.md +0 -1
  130. package/dist/agent-src/commands/package/test.md +0 -1
  131. package/dist/agent-src/commands/package.md +0 -1
  132. package/dist/agent-src/commands/post-as/ghostwriter.md +0 -1
  133. package/dist/agent-src/commands/post-as/me.md +0 -1
  134. package/dist/agent-src/commands/post-as.md +0 -1
  135. package/dist/agent-src/commands/pr/create/description-only.md +0 -1
  136. package/dist/agent-src/commands/pr/create.md +23 -9
  137. package/dist/agent-src/commands/prediction-pool.md +0 -1
  138. package/dist/agent-src/commands/prepare-for-review.md +0 -1
  139. package/dist/agent-src/commands/profile/activate.md +0 -1
  140. package/dist/agent-src/commands/profile/deactivate.md +0 -1
  141. package/dist/agent-src/commands/profile/show.md +0 -1
  142. package/dist/agent-src/commands/profile.md +0 -1
  143. package/dist/agent-src/commands/project/analyze.md +0 -1
  144. package/dist/agent-src/commands/project/health.md +0 -1
  145. package/dist/agent-src/commands/project.md +0 -1
  146. package/dist/agent-src/commands/refine-ticket.md +0 -1
  147. package/dist/agent-src/commands/research/deep.md +0 -1
  148. package/dist/agent-src/commands/research/report.md +0 -1
  149. package/dist/agent-src/commands/research.md +0 -1
  150. package/dist/agent-src/commands/review/changes.md +0 -1
  151. package/dist/agent-src/commands/review/routing.md +0 -1
  152. package/dist/agent-src/commands/review.md +0 -1
  153. package/dist/agent-src/commands/roadmap/ai-council.md +0 -1
  154. package/dist/agent-src/commands/roadmap/create.md +0 -1
  155. package/dist/agent-src/commands/roadmap/materialize.md +0 -1
  156. package/dist/agent-src/commands/roadmap/next.md +0 -1
  157. package/dist/agent-src/commands/roadmap/process-full.md +0 -1
  158. package/dist/agent-src/commands/roadmap/process-phase.md +0 -1
  159. package/dist/agent-src/commands/roadmap/process-step.md +0 -1
  160. package/dist/agent-src/commands/roadmap.md +0 -1
  161. package/dist/agent-src/commands/rule-compliance-audit.md +0 -1
  162. package/dist/agent-src/commands/security-audit-config.md +0 -1
  163. package/dist/agent-src/commands/skill/preview.md +0 -1
  164. package/dist/agent-src/commands/skill.md +0 -1
  165. package/dist/agent-src/commands/skills/discover.md +0 -1
  166. package/dist/agent-src/commands/skills.md +0 -1
  167. package/dist/agent-src/commands/sync/agent-settings.md +0 -1
  168. package/dist/agent-src/commands/sync/gitignore/fix.md +0 -1
  169. package/dist/agent-src/commands/sync/gitignore.md +0 -1
  170. package/dist/agent-src/commands/sync.md +0 -1
  171. package/dist/agent-src/commands/tdd/green.md +0 -1
  172. package/dist/agent-src/commands/tdd/red.md +0 -1
  173. package/dist/agent-src/commands/tdd/refactor.md +0 -1
  174. package/dist/agent-src/commands/tdd.md +0 -1
  175. package/dist/agent-src/commands/team/adversarial.md +0 -1
  176. package/dist/agent-src/commands/team/delegate.md +0 -1
  177. package/dist/agent-src/commands/team/review.md +0 -1
  178. package/dist/agent-src/commands/team/status.md +0 -1
  179. package/dist/agent-src/commands/team-knowledge/bootstrap.md +0 -1
  180. package/dist/agent-src/commands/team-knowledge/consolidate.md +0 -1
  181. package/dist/agent-src/commands/team-knowledge.md +0 -1
  182. package/dist/agent-src/commands/team.md +0 -1
  183. package/dist/agent-src/commands/tests/create.md +0 -1
  184. package/dist/agent-src/commands/tests/e2e-heal.md +0 -1
  185. package/dist/agent-src/commands/tests/e2e-plan.md +0 -1
  186. package/dist/agent-src/commands/tests/execute.md +0 -1
  187. package/dist/agent-src/commands/tests.md +0 -1
  188. package/dist/agent-src/commands/threat-model.md +0 -1
  189. package/dist/agent-src/commands/update-form-request-messages.md +0 -1
  190. package/dist/agent-src/commands/upstream-contribute.md +0 -1
  191. package/dist/agent-src/commands/video/from-script.md +0 -1
  192. package/dist/agent-src/commands/video/from-song.md +0 -1
  193. package/dist/agent-src/commands/video/scene.md +0 -1
  194. package/dist/agent-src/commands/video/stitch.md +0 -1
  195. package/dist/agent-src/commands/video/storyboard.md +0 -1
  196. package/dist/agent-src/commands/video.md +0 -1
  197. package/dist/agent-src/commands/work.md +0 -1
  198. package/dist/agent-src/commands/worktree/cleanup.md +0 -1
  199. package/dist/agent-src/commands/worktree/create.md +0 -1
  200. package/dist/agent-src/commands/worktree/status.md +0 -1
  201. package/dist/agent-src/commands/worktree/verify.md +0 -1
  202. package/dist/agent-src/commands/worktree.md +0 -1
  203. package/dist/agent-src/skills/docx-authoring/SKILL.md +1 -0
  204. package/dist/agent-src/skills/git-workflow/SKILL.md +9 -1
  205. package/dist/agent-src/skills/pdf-tools/SKILL.md +1 -0
  206. package/dist/agent-src/skills/skill-writing/SKILL.md +35 -0
  207. package/dist/agent-src/templates/agents/agent-project-settings.example.yml +1 -1
  208. package/dist/cli/commands/commands.candidates.test.js +1 -1
  209. package/dist/cli/commands/commands.candidates.test.js.map +1 -1
  210. package/dist/cli/commands/commands.js +9 -15
  211. package/dist/cli/commands/commands.js.map +1 -1
  212. package/dist/cli/commands/profiles.test.js +7 -7
  213. package/dist/cli/commands/profiles.test.js.map +1 -1
  214. package/dist/cli/discovery/loadManifest.js.map +1 -1
  215. package/dist/cli/main.js +2 -2
  216. package/dist/cli/main.js.map +1 -1
  217. package/dist/cli-delegate/cmd_conformance.js +14 -2
  218. package/dist/discovery/deprecation-report.md +1 -1
  219. package/dist/discovery/discovery-manifest.json +211 -410
  220. package/dist/discovery/discovery-manifest.json.sha256 +1 -1
  221. package/dist/discovery/discovery-manifest.summary.md +2 -2
  222. package/dist/discovery/dormancy-report.md +1 -1
  223. package/dist/discovery/orphan-report.md +1 -1
  224. package/dist/discovery/packs.json +3 -3
  225. package/dist/discovery/trust-report.md +1 -1
  226. package/dist/discovery/workspaces.json +3 -3
  227. package/dist/hooks/dispatch.js +14 -2
  228. package/dist/mcp/registry-manifest.json +3 -3
  229. package/dist/mcp/server.json +2 -2
  230. package/dist/mcp/server.mjs +46 -5
  231. package/docs/MIGRATION.md +1 -0
  232. package/docs/contracts/settings-classes.md +41 -0
  233. package/package.json +1 -1
  234. package/src/config/agent-settings.template.yml +34 -0
  235. package/src/config/gate-violation-baselines.json +3 -3
  236. package/src/scripts/_dispatch.bash +42 -5
  237. package/src/scripts/audit_command_surface.ts +21 -15
  238. package/src/scripts/build_catalog_index.ts +1 -1
  239. package/src/scripts/build_discovery_manifest.ts +30 -34
  240. package/src/scripts/check_branch_freshness.ts +210 -61
  241. package/src/scripts/gen_discovery_baseline.ts +3 -3
  242. package/src/scripts/hook_manifest.yaml +20 -0
  243. package/src/scripts/hooks/subagent_ledger_hook.ts +17 -4
  244. package/src/scripts/lint_command_tiers.ts +29 -75
  245. package/src/scripts/lint_originality.ts +101 -14
  246. package/src/scripts/schemas/command.schema.json +4 -9
  247. package/src/scripts/schemas/skill.schema.json +10 -1
  248. package/src/scripts/skill_linter.ts +82 -2
  249. package/src/scripts/worktree_cleanup_check.ts +111 -7
@@ -1 +1 @@
1
- f33d22f3d9b5701a1f97bf3a9502abc616f9b4145f28842793d5a44ea29cb54a discovery-manifest.json
1
+ 1f3def9df2aafa22184906d7d5ca0c5a4b3df01910297740edebe0717d7de28d discovery-manifest.json
@@ -1,7 +1,7 @@
1
1
  # Discovery Manifest — Summary
2
2
 
3
- - Generated: `2026-08-13T21:21:23Z`
4
- - Scanner: `1eaf68b6e9c9`
3
+ - Generated: `2026-08-14T23:10:05Z`
4
+ - Scanner: `de0a22b4ac4c`
5
5
  - Artefacts: **607**
6
6
  - Unassigned: **0**
7
7
 
@@ -1,6 +1,6 @@
1
1
  # Discovery — Dormancy Report
2
2
 
3
- - Generated: `2026-08-13T21:21:23Z`
3
+ - Generated: `2026-08-14T23:10:05Z`
4
4
  - Window: **6 months** without a commit
5
5
 
6
6
  > Dormancy triggers **review, never auto-deprecation**
@@ -1,6 +1,6 @@
1
1
  # Discovery — Orphan Report
2
2
 
3
- - Generated: `2026-08-13T21:21:23Z`
3
+ - Generated: `2026-08-14T23:10:05Z`
4
4
  - Orphan artefacts: **0**
5
5
 
6
6
  > An orphan is an artefact whose declared pack has no other members.
@@ -1,6 +1,6 @@
1
1
  {
2
- "checksum": "sha256:b374e255b7b97cbde52ce8315706c94b4d61db7e4699ab4428acdfa333e68b5d",
3
- "generated_at": "2026-08-13T21:21:23Z",
2
+ "checksum": "sha256:ddfc3dea1e837066fb3f48b8cc8a2d4cdc326908cd22f67fc2629d63f8a5b53f",
3
+ "generated_at": "2026-08-14T23:10:05Z",
4
4
  "packs": [
5
5
  {
6
6
  "always_on": false,
@@ -1818,5 +1818,5 @@
1818
1818
  ]
1819
1819
  }
1820
1820
  ],
1821
- "scanner_version": "1eaf68b6e9c9"
1821
+ "scanner_version": "de0a22b4ac4c"
1822
1822
  }
@@ -1,6 +1,6 @@
1
1
  # Discovery — Trust Report
2
2
 
3
- - Generated: `2026-08-13T21:21:23Z`
3
+ - Generated: `2026-08-14T23:10:05Z`
4
4
  - Workspaces tracked: **10**
5
5
  - Human-review-required artefacts: **3**
6
6
 
@@ -1,7 +1,7 @@
1
1
  {
2
- "checksum": "sha256:b374e255b7b97cbde52ce8315706c94b4d61db7e4699ab4428acdfa333e68b5d",
3
- "generated_at": "2026-08-13T21:21:23Z",
4
- "scanner_version": "1eaf68b6e9c9",
2
+ "checksum": "sha256:ddfc3dea1e837066fb3f48b8cc8a2d4cdc326908cd22f67fc2629d63f8a5b53f",
3
+ "generated_at": "2026-08-14T23:10:05Z",
4
+ "scanner_version": "de0a22b4ac4c",
5
5
  "workspaces": [
6
6
  {
7
7
  "artefact_count": 206,
@@ -26113,6 +26113,13 @@ function handleStart(root, payload, nowIso, sessionId2) {
26113
26113
  event: "subagent_start",
26114
26114
  ts: nowIso,
26115
26115
  ref,
26116
+ // Phase 1 Step 4 correction (b): without this the dispatch denominator
26117
+ // is not per-session. Three sessions share one ledger file, so a rate
26118
+ // computed over the file aggregates strangers — the measured window
26119
+ // held 7 starts against 25 stops, one of them an agent type this
26120
+ // session never dispatched. The open record already carried it; the
26121
+ // appended line did not, and the line is what a rate is computed from.
26122
+ session_id: sessionId2,
26116
26123
  agent_type: rec.agent_type,
26117
26124
  parent_ref: parentRef,
26118
26125
  depth,
@@ -26120,7 +26127,7 @@ function handleStart(root, payload, nowIso, sessionId2) {
26120
26127
  concurrent_open: countOpen(root)
26121
26128
  });
26122
26129
  }
26123
- function handleStop(root, payload, nowIso) {
26130
+ function handleStop(root, payload, nowIso, sessionId2) {
26124
26131
  const agentId = str4(payload, "agent_id", "agentId");
26125
26132
  if (agentId === null) {
26126
26133
  appendUnidentified(root, "subagent_stop", nowIso, payload);
@@ -26139,6 +26146,11 @@ function handleStop(root, payload, nowIso) {
26139
26146
  event: "subagent_stop",
26140
26147
  ts: nowIso,
26141
26148
  ref,
26149
+ // The session this stop was OBSERVED in, read from the same envelope
26150
+ // position as the start's — never back-filled from `rec`, which would
26151
+ // relabel a cross-session stop as belonging to the dispatching session
26152
+ // and hide exactly the mismatch this field exists to expose.
26153
+ session_id: sessionId2,
26142
26154
  agent_type: rec?.agent_type ?? str4(payload, "agent_type", "agentType", "subagent_type", "subagentType"),
26143
26155
  depth: rec?.depth ?? null,
26144
26156
  depth_basis: rec?.depth_basis ?? null,
@@ -26164,7 +26176,7 @@ function processEnvelope2(envelope, consumerRoot) {
26164
26176
  const sessionId2 = str4(payload, "session_id", "sessionId") ?? str4(envelope, "session_id", "sessionId");
26165
26177
  reapStaleOpenRecords(consumerRoot, nowIso);
26166
26178
  if (event === "subagent_start") handleStart(consumerRoot, payload, nowIso, sessionId2);
26167
- else handleStop(consumerRoot, payload, nowIso);
26179
+ else handleStop(consumerRoot, payload, nowIso, sessionId2);
26168
26180
  } catch {
26169
26181
  return EXIT_ALLOW18;
26170
26182
  }
@@ -1,15 +1,15 @@
1
1
  {
2
2
  "discovery": {
3
3
  "artefact_count": 607,
4
- "scanner_version": "1eaf68b6e9c9"
4
+ "scanner_version": "de0a22b4ac4c"
5
5
  },
6
- "generated_at": "2026-08-13",
6
+ "generated_at": "2026-08-14",
7
7
  "package": {
8
8
  "description": "Governed skills, rules and commands for AI coding tools (Claude Code, Cursor, Windsurf, Copilot) \u2014 every claim machine-checked, including \"zero runtime daemon\".",
9
9
  "homepage": "https://event4u-app.github.io/agent-config",
10
10
  "name": "@event4u/agent-config",
11
11
  "repository": "https://github.com/event4u-app/agent-config",
12
- "version": "11.0.0"
12
+ "version": "12.0.0"
13
13
  },
14
14
  "registries": [
15
15
  {
@@ -9,12 +9,12 @@
9
9
  "transport": {
10
10
  "type": "stdio"
11
11
  },
12
- "version": "11.0.0"
12
+ "version": "12.0.0"
13
13
  }
14
14
  ],
15
15
  "repository": {
16
16
  "source": "github",
17
17
  "url": "https://github.com/event4u-app/agent-config"
18
18
  },
19
- "version": "11.0.0"
19
+ "version": "12.0.0"
20
20
  }
@@ -15262,7 +15262,7 @@ function lint_wing4_boundaries(text) {
15262
15262
  }
15263
15263
  return issues;
15264
15264
  }
15265
- function lint_execution_metadata(execution, frontmatter) {
15265
+ function lint_execution_metadata(execution, frontmatter, body = "") {
15266
15266
  const issues = [];
15267
15267
  const execType = execution.type;
15268
15268
  if (execType !== void 0) {
@@ -15332,6 +15332,15 @@ function lint_execution_metadata(execution, frontmatter) {
15332
15332
  new Issue("error", "invalid_safety_mode", `Invalid safety_mode '${String(safetyMode)}'; must be 'strict'`)
15333
15333
  );
15334
15334
  }
15335
+ if (safetyMode === "strict" && body !== "" && !STRICT_WRITE_GATE_PATTERNS.some((p) => p.test(body)) && !SKILL_REFERENCE_DEFERRAL_PATTERN.test(body)) {
15336
+ issues.push(
15337
+ new Issue(
15338
+ "warning",
15339
+ "strict_mode_missing_write_gate",
15340
+ "execution.safety_mode is 'strict' but the body names no precondition on the write path and defers no write-path steps to the skill's references/ \u2014 state the gate inline (propose-then-confirm, --dry-run) or defer it, per skill-writing \xA7 Action-reference split"
15341
+ )
15342
+ );
15343
+ }
15335
15344
  const timeout = execution.timeout_seconds;
15336
15345
  if (timeout !== void 0) {
15337
15346
  if (typeof timeout !== "number" || !Number.isInteger(timeout) || timeout <= 0) {
@@ -15506,9 +15515,18 @@ function lint_skill(p, text, absPath = null) {
15506
15515
  issues.push(new Issue("warning", "superseded_skill", msg));
15507
15516
  }
15508
15517
  }
15518
+ if (COMPATIBILITY_KEY_PATTERN.test(frontmatter) && !HARNESS_COMPAT_KEY_PATTERN.test(frontmatter)) {
15519
+ issues.push(
15520
+ new Issue(
15521
+ "warning",
15522
+ "deprecated_compatibility_field",
15523
+ "Frontmatter declares the deprecated free-text 'compatibility:' without the structured 'harness_compat:' that supersedes it \u2014 add harness_compat (see skill.schema.json and docs/MIGRATION.md \xA7 Scheduled deprecations); compatibility stays accepted until removal"
15524
+ )
15525
+ );
15526
+ }
15509
15527
  const execution = parseExecutionBlock(frontmatter);
15510
15528
  if (execution !== null) {
15511
- issues.push(...lint_execution_metadata(execution, frontmatter));
15529
+ issues.push(...lint_execution_metadata(execution, frontmatter, text.replace(FRONTMATTER_PATTERN, "")));
15512
15530
  }
15513
15531
  const tierMatch = TIER_PATTERN.exec(frontmatter);
15514
15532
  if (tierMatch && tierMatch[1] === "senior") {
@@ -18030,7 +18048,7 @@ function _isCliEntry7() {
18030
18048
  return false;
18031
18049
  }
18032
18050
  }
18033
- var _HERE4, REQUIRED_PERSONA_SECTIONS_CORE, REQUIRED_PERSONA_SECTIONS_SPECIALIST, VALID_PERSONA_TIERS, PERSONA_LINE_BUDGETS, REQUIRED_USERTYPE_SECTIONS, USERTYPE_LINE_BUDGET, VALID_PERSONA_WINGS, PERSONA_LINE_BUDGETS_BY_WING, REQUIRED_SKILL_SECTIONS, SECTION_ALIASES, RECOMMENDED_SKILL_SECTIONS, CONDITIONAL_SKILL_SECTIONS, RULE_BAD_SIGNS, FRUGALITY_WRITER_SKILLS, FRUGALITY_CHARTER_RELPATH, FRUGALITY_CHARTER_INDEX_RULES, VAGUE_VALIDATION_PATTERNS, TRIGGER_WARNING_PATTERNS, ORDERED_STEP_PATTERN, SECTION_PATTERN, FRONTMATTER_PATTERN, DESCRIPTION_PATTERN, STATUS_PATTERN, REPLACED_BY_PATTERN, TIER_PATTERN, TYPE_PATTERN, SOURCE_PATTERN, SENIOR_RELATED_SKILLS_PATTERN, SENIOR_RELATED_WHEN_PATTERN, SENIOR_RELATED_WHEN_NOT_PATTERN, SENIOR_PROACTIVE_PATTERN, SENIOR_OUTPUT_PATTERN, H1_PATTERN, DOUBLE_BLANK_PATTERN, VALID_RULE_TYPES, VALID_RULE_SOURCES, ROUTER_ALLOWED_TRIGGER_KEYS, KERNEL_RULE_IDS2, VALID_EXECUTION_TYPES, VALID_EXECUTION_HANDLERS, VALID_EXECUTION_SAFETY_MODES, EXTERNAL_EXECUTION_HANDLERS, RUNTIME_REQUIRES_BLOCK_PATTERN, VALID_EXECUTION_FIELDS, WING3_SPINE_SLOTS, CONTEXT_SPINE_INLINE_PATTERN, WING3_SAAS_URL_PATTERN, WING3_VENDOR_BLACKLIST, WING3_STACK_LOCKED_PATTERN, WING3_CHANNEL_TACTIC_PATTERN, WING4_SPINE_SLOTS, WING4_SAAS_URL_PATTERN, WING4_VENDOR_BLACKLIST, WING4_STAGE_AGNOSTIC_PATTERN, Issue, LintResult, _ROLE_CONTRACT_CANDIDATES, _ROLE_CONTRACT_SLUGS_CACHE, _ROLE_CONTRACT_REF_PATTERN, PROCEDURE_HEADING_PATTERN, COMMAND_FRONTMATTER_DELEGATION_KEYS, MD_LINK_PATTERN_G, NAME_PATTERN, DISABLE_MODEL_PATTERN, _INSPECT_VERB_PATTERN, last_changed_scope_reason, last_changed_base_diff_ok, _INTERACTION_NAME_PATTERNS, _INTERACTION_CONTENT_KEYWORDS, _EXEC_FILE_SIGNALS, _EXEC_CONTENT_SIGNALS, _TASK_TYPE_SIGNALS, _VERIFICATION_TOOLS, _FRUGALITY_STANDARDS_PATTERN, _FRUGALITY_CHARTER_LINK_PATTERN, _MD_LINK_PATTERN, _MALICE_CRED_EXFIL, _MALICE_REMOTE_EXEC, _MALICE_FORCE_PUSH, _MALICE_CHMOD_SECRETS, _MALICE_SHELL_INJECT, _MALICE_PATTERNS, _NAG_UPDATE_CHECK, _NAG_STAY_CURRENT, _NAG_SELF_PROMO, _NAG_BEST_SKILL, _NAG_MUST_USE, _NAG_ALWAYS_USE, _NAG_PATTERNS, _OUTPUT_SCHEMA_KEY_PATTERN, _SCHEMA_ARTEFACT_TYPES, ArgError, isCliEntry2;
18051
+ var _HERE4, REQUIRED_PERSONA_SECTIONS_CORE, REQUIRED_PERSONA_SECTIONS_SPECIALIST, VALID_PERSONA_TIERS, PERSONA_LINE_BUDGETS, REQUIRED_USERTYPE_SECTIONS, USERTYPE_LINE_BUDGET, VALID_PERSONA_WINGS, PERSONA_LINE_BUDGETS_BY_WING, REQUIRED_SKILL_SECTIONS, SECTION_ALIASES, RECOMMENDED_SKILL_SECTIONS, CONDITIONAL_SKILL_SECTIONS, RULE_BAD_SIGNS, FRUGALITY_WRITER_SKILLS, FRUGALITY_CHARTER_RELPATH, FRUGALITY_CHARTER_INDEX_RULES, VAGUE_VALIDATION_PATTERNS, TRIGGER_WARNING_PATTERNS, ORDERED_STEP_PATTERN, SECTION_PATTERN, FRONTMATTER_PATTERN, DESCRIPTION_PATTERN, STATUS_PATTERN, REPLACED_BY_PATTERN, TIER_PATTERN, TYPE_PATTERN, SOURCE_PATTERN, SENIOR_RELATED_SKILLS_PATTERN, SENIOR_RELATED_WHEN_PATTERN, SENIOR_RELATED_WHEN_NOT_PATTERN, SENIOR_PROACTIVE_PATTERN, SENIOR_OUTPUT_PATTERN, H1_PATTERN, DOUBLE_BLANK_PATTERN, VALID_RULE_TYPES, VALID_RULE_SOURCES, ROUTER_ALLOWED_TRIGGER_KEYS, KERNEL_RULE_IDS2, VALID_EXECUTION_TYPES, VALID_EXECUTION_HANDLERS, VALID_EXECUTION_SAFETY_MODES, EXTERNAL_EXECUTION_HANDLERS, RUNTIME_REQUIRES_BLOCK_PATTERN, COMPATIBILITY_KEY_PATTERN, HARNESS_COMPAT_KEY_PATTERN, STRICT_WRITE_GATE_PATTERNS, SKILL_REFERENCE_DEFERRAL_PATTERN, VALID_EXECUTION_FIELDS, WING3_SPINE_SLOTS, CONTEXT_SPINE_INLINE_PATTERN, WING3_SAAS_URL_PATTERN, WING3_VENDOR_BLACKLIST, WING3_STACK_LOCKED_PATTERN, WING3_CHANNEL_TACTIC_PATTERN, WING4_SPINE_SLOTS, WING4_SAAS_URL_PATTERN, WING4_VENDOR_BLACKLIST, WING4_STAGE_AGNOSTIC_PATTERN, Issue, LintResult, _ROLE_CONTRACT_CANDIDATES, _ROLE_CONTRACT_SLUGS_CACHE, _ROLE_CONTRACT_REF_PATTERN, PROCEDURE_HEADING_PATTERN, COMMAND_FRONTMATTER_DELEGATION_KEYS, MD_LINK_PATTERN_G, NAME_PATTERN, DISABLE_MODEL_PATTERN, _INSPECT_VERB_PATTERN, last_changed_scope_reason, last_changed_base_diff_ok, _INTERACTION_NAME_PATTERNS, _INTERACTION_CONTENT_KEYWORDS, _EXEC_FILE_SIGNALS, _EXEC_CONTENT_SIGNALS, _TASK_TYPE_SIGNALS, _VERIFICATION_TOOLS, _FRUGALITY_STANDARDS_PATTERN, _FRUGALITY_CHARTER_LINK_PATTERN, _MD_LINK_PATTERN, _MALICE_CRED_EXFIL, _MALICE_REMOTE_EXEC, _MALICE_FORCE_PUSH, _MALICE_CHMOD_SECRETS, _MALICE_SHELL_INJECT, _MALICE_PATTERNS, _NAG_UPDATE_CHECK, _NAG_STAY_CURRENT, _NAG_SELF_PROMO, _NAG_BEST_SKILL, _NAG_MUST_USE, _NAG_ALWAYS_USE, _NAG_PATTERNS, _OUTPUT_SCHEMA_KEY_PATTERN, _SCHEMA_ARTEFACT_TYPES, ArgError, isCliEntry2;
18034
18052
  var init_skill_linter = __esm({
18035
18053
  "src/scripts/skill_linter.ts"() {
18036
18054
  "use strict";
@@ -18171,6 +18189,17 @@ var init_skill_linter = __esm({
18171
18189
  VALID_EXECUTION_SAFETY_MODES = /* @__PURE__ */ new Set(["strict"]);
18172
18190
  EXTERNAL_EXECUTION_HANDLERS = /* @__PURE__ */ new Set(["shell", "php", "node"]);
18173
18191
  RUNTIME_REQUIRES_BLOCK_PATTERN = /^runtime_requires:[ \t]*(\{.*)?$/m;
18192
+ COMPATIBILITY_KEY_PATTERN = /^compatibility:[ \t]*\S/m;
18193
+ HARNESS_COMPAT_KEY_PATTERN = /^harness_compat:[ \t]*\S/m;
18194
+ STRICT_WRITE_GATE_PATTERNS = [
18195
+ /--dry-run/i,
18196
+ /\bnever silent[- ]run/i,
18197
+ /\bpropose,? never\b/i,
18198
+ /\bconfirms? before\b/i,
18199
+ /\bexplicit (?:user )?confirmation\b/i,
18200
+ /\basks? (?:the user )?(?:first|before)\b/i
18201
+ ];
18202
+ SKILL_REFERENCE_DEFERRAL_PATTERN = /\]\(\.{0,2}\/?references\//;
18174
18203
  VALID_EXECUTION_FIELDS = /* @__PURE__ */ new Set([
18175
18204
  "type",
18176
18205
  "handler",
@@ -35377,6 +35406,13 @@ function handleStart(root, payload, nowIso, sessionId) {
35377
35406
  event: "subagent_start",
35378
35407
  ts: nowIso,
35379
35408
  ref,
35409
+ // Phase 1 Step 4 correction (b): without this the dispatch denominator
35410
+ // is not per-session. Three sessions share one ledger file, so a rate
35411
+ // computed over the file aggregates strangers — the measured window
35412
+ // held 7 starts against 25 stops, one of them an agent type this
35413
+ // session never dispatched. The open record already carried it; the
35414
+ // appended line did not, and the line is what a rate is computed from.
35415
+ session_id: sessionId,
35380
35416
  agent_type: rec.agent_type,
35381
35417
  parent_ref: parentRef,
35382
35418
  depth,
@@ -35384,7 +35420,7 @@ function handleStart(root, payload, nowIso, sessionId) {
35384
35420
  concurrent_open: countOpen(root)
35385
35421
  });
35386
35422
  }
35387
- function handleStop(root, payload, nowIso) {
35423
+ function handleStop(root, payload, nowIso, sessionId) {
35388
35424
  const agentId = str2(payload, "agent_id", "agentId");
35389
35425
  if (agentId === null) {
35390
35426
  appendUnidentified(root, "subagent_stop", nowIso, payload);
@@ -35403,6 +35439,11 @@ function handleStop(root, payload, nowIso) {
35403
35439
  event: "subagent_stop",
35404
35440
  ts: nowIso,
35405
35441
  ref,
35442
+ // The session this stop was OBSERVED in, read from the same envelope
35443
+ // position as the start's — never back-filled from `rec`, which would
35444
+ // relabel a cross-session stop as belonging to the dispatching session
35445
+ // and hide exactly the mismatch this field exists to expose.
35446
+ session_id: sessionId,
35406
35447
  agent_type: rec?.agent_type ?? str2(payload, "agent_type", "agentType", "subagent_type", "subagentType"),
35407
35448
  depth: rec?.depth ?? null,
35408
35449
  depth_basis: rec?.depth_basis ?? null,
@@ -35428,7 +35469,7 @@ function processEnvelope(envelope, consumerRoot) {
35428
35469
  const sessionId = str2(payload, "session_id", "sessionId") ?? str2(envelope, "session_id", "sessionId");
35429
35470
  reapStaleOpenRecords(consumerRoot, nowIso);
35430
35471
  if (event === "subagent_start") handleStart(consumerRoot, payload, nowIso, sessionId);
35431
- else handleStop(consumerRoot, payload, nowIso);
35472
+ else handleStop(consumerRoot, payload, nowIso, sessionId);
35432
35473
  } catch {
35433
35474
  return EXIT_ALLOW4;
35434
35475
  }
package/docs/MIGRATION.md CHANGED
@@ -16,6 +16,7 @@ releaser here on every `release:major`.
16
16
 
17
17
  | Surface | Committed | Deprecation notice due | Removal due | Reversal condition |
18
18
  |---|---|---|---|---|
19
+ | Free-text `compatibility` skill-frontmatter field (`src/scripts/schemas/skill.schema.json`) | 2026-08-14 | shipped 2026-08-14 — `deprecated: true` + superseded-by note in the schema; `harness_compat` lands beside it, additively | next major after the notice — **not pinned here** (removal date is maintainer-owned, same stance as the manifest `tier` entry, whose `sunset` shipped `null`) | The public Agent-Skills spec makes `compatibility` load-bearing for cross-host portability, or an external consumer is found reading it. `harness_compat` is package-local; `compatibility` mirrors the public spec, so keeping the mirror stays cheaply reversible. Superseded by `harness_compat` (class) + `runtime_requires` (probeable detail); both users (`docx-authoring`, `pdf-tools`) already carry both fields, so nothing breaks on removal day. |
19
20
  | `code_graph` native code-graph engine (`code_graph.enabled`, the `code-intelligence` skill's native arm, `code_graph_nudge_hook`) | 2026-07-28 | next major after 9.x | the major after that | A consumer case the graph answers and disciplined grep cannot. Measured null: recall 0.365 vs grep 0.797 (`docs/CLAIMS.md` `code-graph-retrieval-null`). Until then `enabled: false` is permanent. **Its parser pair (`web-tree-sitter@0.24.7` / `tree-sitter-wasms@0.1.13`, ~51 MB unpacked) moved from `dependencies` to `devDependencies` ahead of the schedule, so consumers no longer install it — the runtime paths (CLI leaf, nudge hook, skill, rule) stay registered until the removal date above, but re-enabling now also means installing that ABI-locked pair yourself.** |
20
21
 
21
22
  **Adding a row:** any change that ships a capability as default-off-pending-removal,
@@ -142,6 +142,47 @@ larger set; it is the set that passes both halves.
142
142
  | `personal.canary_name` | un-inferrable, and answering arms the session-degradation canary; one keypress to accept the prefill | `""` (canary dark) |
143
143
  | `memory.learn_on_session_end` | it turns on automatic memory writes at the end of every session — a standing write the user should authorise | `false` |
144
144
 
145
+ ## Class B is a persistence property, not an enforcement claim
146
+
147
+ Recorded 2026-08-13, from `road-to-zero-settings` step 3.2 — the step that asked
148
+ each class-B key *"does the action need authorising at all?"*. Two of the three
149
+ answers turned out not to be about the keys.
150
+
151
+ ```
152
+ CLASS B SAYS: MAY BE ASKED ONCE, THEN PERSISTED. IT SAYS NOTHING ABOUT
153
+ WHETHER ANYTHING CAN REFUSE THE ACTION. THE DISPOSITION SAYS THAT.
154
+ A `consent` KEY NEEDS A MECHANISM THAT CAN WITHHOLD, OR AN EXPLICIT
155
+ PROSE-ONLY LABEL. AN `un-inferrable` KEY NEEDS ONLY PERSISTENCE.
156
+ ```
157
+
158
+ The two axes are independent, and reading class B as implying an enforcement
159
+ obligation is what made two non-problems look like problems:
160
+
161
+ - **`personal.canary_name`** authorises nothing — it holds a nickname used as a
162
+ liveness marker. It is class B because it cannot be inferred and is worth
163
+ keeping once answered, and its disposition (`un-inferrable`) already says so.
164
+ There is no gate to build here and never was.
165
+ - **`personal.open_edited_files`** is a genuine `consent` key with **no mechanism
166
+ that can refuse the action** — its only reader is prose in
167
+ `src/skills/file-editor/SKILL.md`. The suite's standing rule is *never claim
168
+ enforcement you do not have*, and the discharge of that rule is to **declare
169
+ the limit**, not to delete the user's choice: it is carried as an explicitly
170
+ prose-only preference. An unenforceable flag that says it is unenforceable is
171
+ honest; one that presents as a gate is not.
172
+ - **`memory.learn_on_session_end`** is what a consent key looks like when the
173
+ mechanism exists: `src/scripts/memory_learn_hook.ts` reads it and can withhold
174
+ the write, and the default is conservative.
175
+
176
+ Splitting class B into `B-consent` and `B-config` was considered and **not
177
+ taken** — it would churn a contract, a linter and every consumer's mental model
178
+ to express what this paragraph expresses. What the split would have bought is
179
+ the obligation stated above; stating it directly costs one section.
180
+
181
+ **Consequence for anyone adding a class-B key:** the § B eligibility invariant
182
+ still binds in full. This section adds one question on top of it — *if the
183
+ disposition is `consent`, what can refuse the action?* An answer of "nothing"
184
+ is allowed, and must then be written down as such.
185
+
145
186
  ## The one exception — `emergency.orchestration_halt`
146
187
 
147
188
  The always-on-orchestration doctrine (subagents, council, team) deletes every
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "@event4u/agent-config",
3
3
  "mcpName": "io.github.event4u-app/agent-config",
4
- "version": "11.0.0",
4
+ "version": "12.0.0",
5
5
  "description": "Governed skills, rules and commands for AI coding tools (Claude Code, Cursor, Windsurf, Copilot) — every claim machine-checked, including \"zero runtime daemon\".",
6
6
  "license": "MIT",
7
7
  "private": false,
@@ -133,6 +133,40 @@ projection:
133
133
  # (vendor-granular unknown_defaults in src/config/host-capabilities.yml).
134
134
  discipline_profile: __DISCIPLINE_PROFILE__
135
135
 
136
+ # OPT-IN PRESET — the measured-lift configuration, shown but NOT shipped.
137
+ #
138
+ # The evidence above says `essential` carries the significant discipline lift
139
+ # (+0.458, p=0.0135) while `full`'s residual over it is not significant
140
+ # (p=0.37). That reads like an argument to flip the shipped default. It is not,
141
+ # for two independent reasons, and both are worth stating where the key lives
142
+ # rather than in a roadmap nobody reads at install time.
143
+ #
144
+ # 1. This key family is marked "do not set this from automation". That reads
145
+ # as ABSOLUTE — it forbids an automated CHOICE of default for the family,
146
+ # not merely a script rewriting your file. No measurement, however clean,
147
+ # licenses an agent to flip it on your behalf.
148
+ # 2. The flip was pre-registered against a fresh-install census of
149
+ # <= 30k tokens of always-on rule prose. Measured at audit time: ~163k as
150
+ # loaded, i.e. 5.4x the target. The criterion fails on its own terms
151
+ # regardless of point 1.
152
+ #
153
+ # So the better-evidenced value is carried here as a visible option you may
154
+ # uncomment, with its cost stated inline. Uncomment the line below to replace
155
+ # the resolved value above:
156
+ #
157
+ # discipline_profile: essential # ~3.3x kernel tokens (vs ~11.7x for full)
158
+ #
159
+ # Read the two factors as what they are: multiples of the kernel-only baseline
160
+ # from the cost-factor sweep, NOT the fresh-install census. They answer "what
161
+ # does this tier cost relative to `off`", never "does this tier reach 30k" —
162
+ # nothing has measured the latter for `essential`, and this comment does not
163
+ # claim it does.
164
+ #
165
+ # Recorded 2026-08-14 on an outside opinion (1 seat, 2 rounds; the second seat
166
+ # failed to start, so a single-model judgement on its checkable merit and NOT a
167
+ # convergence). It rejected both the flip and the do-nothing, and proposed this
168
+ # third route: you see the option, nothing automated chose for you.
169
+
136
170
  # --- Cost profile (legacy knob — superseded by discipline_profile above) ---
137
171
  #
138
172
  # Master switch that controls which rule tiers load each session.
@@ -8,9 +8,9 @@
8
8
  "falsifier": "./scripts-run src/scripts/check_ci_local_parity"
9
9
  },
10
10
  "check_no_new_legacy_path:hardcoded-scan-roots": {
11
- "count": 48,
12
- "landed": "2026-08-09",
13
- "note": "Lines under src/scripts/**/*.{ts,mts,mjs} that pass the retired `.agent-src.uncondensed` directory into `path.join(...)` — a filesystem path CONSTRUCTED against the tree ADR-051 abandoned, which is the exact shape of all 14 dead gates. Deliberately narrow so the number is signal, not noise: 236 raw mentions under src/scripts → 147 string-literal lines → 67 path-constructing lines when the pass was written, after exempting src/scripts/_lib/agent_src.ts (the shared resolver, whose job IS owning the constant — gates that route through it survived the move). Detectors holding the literal as data to match, strip, or print are not counted, and no prose, docs, tests or fixtures are read: that full-tree shape was measured at 44 files / 213 hits and rejected as the wrong lint (see the note in check_no_new_legacy_path.ts::find_offenders). Recorded at 58 rather than 67 because Phase 1's scan-root repairs were landing on this branch while the pass was being written and had already removed 9 — a baseline above the truth silently permits new violations. This count goes to ZERO as the remaining repairs land; every repair is a lowering commit. Lowered 56→51 by the road-to-renewal-foundation Phase 1 dead-root sweep (check_always_budget, check_portability, check_references, lint_framework_leakage, lint_agents_md). Lowered 51→49 by the gate-hardening adoption PR: skill_collision_clusters and skill_overlap were repointed at the live skills tree via the shared resolver — two gates that had been reading the retired container and scoring 0 of 288 skills. Lowered 49→48 by road-to-rule-delivery-integrity P2.2: score_skill_selection was repointed at the live skills tree via the shared resolver. It is the same shape as the two gates lowered before it — a scorer reading the retired container and scoring 0 of 288 skills — and here the consequence was sharper than a dead gate: the roadmap's pre-registered selection-accuracy criteria would have been compared against a baseline of silent zeros."
11
+ "count": 47,
12
+ "landed": "2026-08-13",
13
+ "note": "Lines under src/scripts/**/*.{ts,mts,mjs} that pass the retired `.agent-src.uncondensed` directory into `path.join(...)` — a filesystem path CONSTRUCTED against the tree ADR-051 abandoned, which is the exact shape of all 14 dead gates. Deliberately narrow so the number is signal, not noise: 236 raw mentions under src/scripts → 147 string-literal lines → 67 path-constructing lines when the pass was written, after exempting src/scripts/_lib/agent_src.ts (the shared resolver, whose job IS owning the constant — gates that route through it survived the move). Detectors holding the literal as data to match, strip, or print are not counted, and no prose, docs, tests or fixtures are read: that full-tree shape was measured at 44 files / 213 hits and rejected as the wrong lint (see the note in check_no_new_legacy_path.ts::find_offenders). Recorded at 58 rather than 67 because Phase 1's scan-root repairs were landing on this branch while the pass was being written and had already removed 9 — a baseline above the truth silently permits new violations. This count goes to ZERO as the remaining repairs land; every repair is a lowering commit. Lowered 56→51 by the road-to-renewal-foundation Phase 1 dead-root sweep (check_always_budget, check_portability, check_references, lint_framework_leakage, lint_agents_md). Lowered 51→49 by the gate-hardening adoption PR: skill_collision_clusters and skill_overlap were repointed at the live skills tree via the shared resolver — two gates that had been reading the retired container and scoring 0 of 288 skills. Lowered 49→48 by road-to-rule-delivery-integrity P2.2: score_skill_selection was repointed at the live skills tree via the shared resolver. It is the same shape as the two gates lowered before it — a scorer reading the retired container and scoring 0 of 288 skills — and here the consequence was sharper than a dead gate: the roadmap's pre-registered selection-accuracy criteria would have been compared against a baseline of silent zeros. Lowered 48→47 on 2026-08-13, and this one is a catch-up rather than a repair: the pass reported 47 against a baseline of 48, so a gain had already landed without the ratchet following it. Attributed to 455160160 (fix(evals): resolve the eval orchestrator against the live skills tree), the most recent repair in this branch's base that removes a path-constructing line — SKILLS_ROOT repointed through _lib/agent_src.ts::SRC_SKILLS(). A loose ratchet is not harmless: it silently permits one new violation to be added back without any gate noticing, which is the shape this entry exists to prevent."
14
14
  },
15
15
  "audit_user_type_axis": {
16
16
  "count": 1,
@@ -447,6 +447,9 @@ require_tsx() {
447
447
  # command surface (`sync`, `doctor`, `validate`, `upgrade`, …) and its
448
448
  # basenames are unique, so the mapping is collision-free. Other exec_ts
449
449
  # callers (resolve_script results, the work engine, …) are unaffected.
450
+ #
451
+ # In a DEV tree the bundle is also suppressed when any `src/**/*.ts` is newer
452
+ # than it — see cli_delegate_bundle_is_stale.
450
453
  cli_delegate_bundle() {
451
454
  local ts_abs="$1"
452
455
  case "$ts_abs" in
@@ -457,18 +460,52 @@ cli_delegate_bundle() {
457
460
  name="$(basename "${ts_abs%.ts}")"
458
461
  local bundle="$PACKAGE_ROOT/dist/cli-delegate/$name.js"
459
462
  if [[ -f "$bundle" ]] && command -v node >/dev/null 2>&1; then
463
+ cli_delegate_bundle_is_stale "$bundle" && return 0
460
464
  printf '%s' "$bundle"
461
465
  fi
462
466
  }
463
467
 
468
+ # Is a `dist/cli-delegate/` bundle older than the sources it was built from?
469
+ #
470
+ # Only asked in a DEV tree — `$PACKAGE_ROOT/src` exists there and nowhere else.
471
+ # A consumer install ships no `src/`, so it returns "not stale" without a single
472
+ # stat and the ADR-204 fast path is untouched.
473
+ #
474
+ # The scan covers `src` WHOLE, not `src/scripts`: `_cli/*.ts` imports reach into
475
+ # `src/shared`, `src/install`, `src/server`, `src/agent`, `src/config` and
476
+ # `src/agent-src`, and the defect this guard exists for lived two hops away in
477
+ # `src/scripts/_lib/cc_transcript.ts` — a scan narrowed to the entry point's own
478
+ # directory would have missed it.
479
+ #
480
+ # Cost, measured 2026-08-14 on the local tree (1075 `.ts` files): 78 ms when the
481
+ # bundle is current (the full walk) and ~12 ms when it is not (`-quit` exits at
482
+ # the first newer file). The bundle saves ~290 ms against the tsx path, so the
483
+ # worst case still leaves most of that — and buys the guarantee that a dev-tree
484
+ # edit is never silently ignored in favour of a stale compile.
485
+ cli_delegate_bundle_is_stale() {
486
+ local bundle="$1"
487
+ [[ -d "$PACKAGE_ROOT/src" ]] || return 1
488
+ local newer
489
+ newer="$(find "$PACKAGE_ROOT/src" -name '*.ts' -newer "$bundle" -print -quit 2>/dev/null)"
490
+ [[ -n "$newer" ]]
491
+ }
492
+
464
493
  # Run an absolute script path. The argument is an absolute path that may carry
465
494
  # a `.py` (legacy) or `.ts` extension; we resolve the `.ts` twin.
466
495
  #
467
- # A precompiled `dist/cli-delegate/` bundle wins when present — the consumer
468
- # tree ships no tsx (see require_tsx), and the bundle is also ~5.7x faster
469
- # than the npx path it replaces (p50 56-71 ms vs 346-392 ms, measured
470
- # 2026-07-31; see docs/decisions/ADR-204). The tsx path stays as the dev-tree
471
- # route and as the fallback for every non-`_cli` caller.
496
+ # A precompiled `dist/cli-delegate/` bundle wins when present AND not stale —
497
+ # the consumer tree ships no tsx (see require_tsx), and the bundle is also
498
+ # ~5.7x faster than the npx path it replaces (p50 56-71 ms vs 346-392 ms,
499
+ # measured 2026-07-31; see docs/decisions/ADR-204). The tsx path stays as the
500
+ # dev-tree route and as the fallback for every non-`_cli` caller.
501
+ #
502
+ # "Not stale" is the load-bearing qualifier, and it was added because the
503
+ # unqualified version shipped a real failure: a dev-tree `dist/cli-delegate/`
504
+ # built before a `projectStoreSlug` fix kept running the OLD slug, so
505
+ # `agent-config handoff --list` reported "no recent sessions" in any worktree
506
+ # whose path carried a `+`, while the fixed source right next to it listed ten.
507
+ # A compiled copy that silently outranks the source it was built from turns
508
+ # every edit into a coin flip — see cli_delegate_bundle_is_stale.
472
509
  #
473
510
  # Argv/stdin/stdout/stderr/exit-code pass through unchanged in both routes —
474
511
  # mirrors src/scripts/run.ts resolution.
@@ -57,9 +57,14 @@ const SIZE_BUDGETS: Record<string, number> = {
57
57
  platform: 10,
58
58
  };
59
59
  // ADR-092: `visibility:` is the named source of truth (visible / advanced /
60
- // internal); the integer `tier:` is a back-compat alias. A command counts
61
- // toward the per-pack budget when it is surfaced — visibility in {visible,
62
- // advanced} (or, when only the alias is present, tier in {0,1}). `internal`
60
+ // internal). The integer `tier:` alias was REMOVED from live command files in
61
+ // road-to-tier-removal Phase 4, but this file still parses it on purpose: the
62
+ // surface-growth check reads PAST git revisions (`_tier_at_ref`), and pre-ADR-092
63
+ // blobs carry only the alias. The live-file tier read below is therefore a
64
+ // harmless residue on current files and the correct read on historical ones.
65
+ // A command counts toward the per-pack budget when it is surfaced — visibility
66
+ // in {visible, advanced} (or, when only the alias is present, tier in {0,1}).
67
+ // `internal`
63
68
  // (or absent → defaults to internal) is uncapped.
64
69
  const VISIBLE_TIERS: ReadonlySet<number> = new Set([0, 1]);
65
70
  const VISIBLE_VISIBILITIES: ReadonlySet<string> = new Set(['visible', 'advanced']);
@@ -622,17 +627,17 @@ export function render_md(commands: Command[], pairs: OverlapPair[]): string {
622
627
  '[`command-surface-synthesis.md`](command-surface-synthesis.md). Every command ' +
623
628
  "in this table maps to `keep` unless named in that file's tables.",
624
629
  '',
625
- '| Name | Path | Tier | Cluster | Aliases | Lines | Commits | Age (d) | Bucket |',
630
+ '| Name | Path | Visibility | Cluster | Aliases | Lines | Commits | Age (d) | Bucket |',
626
631
  '|---|---|---:|---|---|---:|---:|---:|---|',
627
632
  );
628
633
  const sortedCmds = _stableSortStr(commands, (c) => c.relpath);
629
634
  for (const c of sortedCmds) {
630
635
  const aliases = c.aliases.length ? c.aliases.join(', ') : '—';
631
- const tier = c.tier === null ? '—' : String(c.tier);
636
+ const visibility = c.visibility === null ? '—' : c.visibility;
632
637
  const cluster = c.cluster || '—';
633
638
  const age = c.days_since_first_commit === null ? '—' : String(c.days_since_first_commit);
634
639
  lines.push(
635
- `| \`${c.name}\` | \`${c.relpath}\` | ${tier} | ${cluster} | ${aliases} | ` +
640
+ `| \`${c.name}\` | \`${c.relpath}\` | ${visibility} | ${cluster} | ${aliases} | ` +
636
641
  `${c.line_count} | ${c.commit_count} | ${age} | |`,
637
642
  );
638
643
  }
@@ -738,7 +743,7 @@ function _is_visible(c: Command): boolean {
738
743
 
739
744
  interface VisibleCommand {
740
745
  name: string;
741
- tier: number | null;
746
+ visibility: string | null;
742
747
  cluster: string;
743
748
  citations_docs: number;
744
749
  commit_count: number;
@@ -797,7 +802,7 @@ export function build_budget_audit(
797
802
  if (over) {
798
803
  const vis = visible.map((c) => ({
799
804
  name: c.name,
800
- tier: c.tier,
805
+ visibility: c.visibility,
801
806
  cluster: c.cluster,
802
807
  citations_docs: citation_count(c.name),
803
808
  commit_count: c.commit_count,
@@ -832,8 +837,9 @@ export function render_budget_md(audit: BudgetAudit): string {
832
837
  L.push('# Command budget audit (6.0.0-B Phase 2 Step 4)\n');
833
838
  L.push(
834
839
  '> Per-pack VISIBLE-command counts vs. the `size_class` budget ' +
835
- '(capability-packs.md). `visible` = tier ∈ {0,1}; tier 2 / absent = ' +
836
- 'internal (uncapped). Citations = docs/ files referencing `/<name>`.\n' +
840
+ '(capability-packs.md). `visible` = visibility ∈ {visible, advanced}; ' +
841
+ '`internal` / absent = uncapped. Citations = docs/ files referencing ' +
842
+ '`/<name>`.\n' +
837
843
  '>\n' +
838
844
  '> **Signal note:** docs-citations is the load-bearing signal (rank ' +
839
845
  'candidates low→high). The git commit/idle columns are low-variance on ' +
@@ -862,11 +868,11 @@ export function render_budget_md(audit: BudgetAudit): string {
862
868
  `budget ${p.budget} (${p.size_class}), over by ${p.over_by}\n`,
863
869
  );
864
870
  L.push('Decide per command: keep-visible · set `internal` · relocate-to-pack-X.\n');
865
- L.push('| Command | tier | cluster | docs citations | commits | days idle |');
866
- L.push('|---|--:|---|--:|--:|--:|');
871
+ L.push('| Command | visibility | cluster | docs citations | commits | days idle |');
872
+ L.push('|---|---|---|--:|--:|--:|');
867
873
  for (const c of p.visible_commands ?? []) {
868
874
  L.push(
869
- `| \`${c.name}\` | ${c.tier} | ${c.cluster || '—'} | ` +
875
+ `| \`${c.name}\` | ${c.visibility ?? '—'} | ${c.cluster || '—'} | ` +
870
876
  `${c.citations_docs} | ${c.commit_count} | ` +
871
877
  `${c.days_since_modified !== null ? c.days_since_modified : '—'} |`,
872
878
  );
@@ -1050,8 +1056,8 @@ export function check_new_budget(baseline: string, quiet: boolean): number {
1050
1056
  );
1051
1057
  }
1052
1058
  process.stdout.write(
1053
- '\nResolve by one of: set the command to `tier: 2` (internal, ' +
1054
- 'uncapped) · merge into a sibling cluster · relocate to a pack ' +
1059
+ '\nResolve by one of: set the command to `visibility: internal` ' +
1060
+ '(uncapped) · merge into a sibling cluster · relocate to a pack ' +
1055
1061
  'with budget headroom · file a budget-exemption ADR ' +
1056
1062
  '(docs/contracts/capability-packs.md § Budget exemption process).\n',
1057
1063
  );
@@ -138,7 +138,7 @@ export function buildEntries(): CatalogIndexEntry[] {
138
138
  cls: 'command',
139
139
  name,
140
140
  description: _str(fm['description']) || _str(fm['intent']),
141
- tags: [_str(fm['pack']), _str(fm['tier']), _str(fm['visibility'])].filter((s) => s.length > 0),
141
+ tags: [_str(fm['pack']), _str(fm['visibility'])].filter((s) => s.length > 0),
142
142
  path: _rel(abs),
143
143
  });
144
144
  }