@event4u/agent-config 6.0.0 → 6.1.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 (378) hide show
  1. package/.claude-plugin/marketplace.json +5 -5
  2. package/CHANGELOG.md +167 -440
  3. package/README.md +3 -3
  4. package/dist/agent-src/commands/agent-handoff.md +5 -4
  5. package/dist/agent-src/commands/agent-status.md +1 -0
  6. package/dist/agent-src/commands/agents/audit.md +1 -0
  7. package/dist/agent-src/commands/agents/init.md +3 -0
  8. package/dist/agent-src/commands/agents/optimize.md +1 -0
  9. package/dist/agent-src/commands/agents/user/accept.md +1 -0
  10. package/dist/agent-src/commands/agents/user/init.md +1 -0
  11. package/dist/agent-src/commands/agents/user/review.md +1 -0
  12. package/dist/agent-src/commands/agents/user/show.md +1 -0
  13. package/dist/agent-src/commands/agents/user/update.md +1 -0
  14. package/dist/agent-src/commands/agents/user.md +1 -0
  15. package/dist/agent-src/commands/agents.md +1 -0
  16. package/dist/agent-src/commands/analytics/prune.md +3 -2
  17. package/dist/agent-src/commands/analytics/show.md +3 -2
  18. package/dist/agent-src/commands/analytics.md +3 -2
  19. package/dist/agent-src/commands/analyze-reference-repo.md +1 -0
  20. package/dist/agent-src/commands/bug-fix.md +1 -0
  21. package/dist/agent-src/commands/bug-investigate.md +1 -0
  22. package/dist/agent-src/commands/challenge-me/vision.md +3 -2
  23. package/dist/agent-src/commands/challenge-me/with-docs.md +3 -2
  24. package/dist/agent-src/commands/challenge-me.md +3 -2
  25. package/dist/agent-src/commands/chat-history/import.md +9 -9
  26. package/dist/agent-src/commands/chat-history.md +32 -30
  27. package/dist/agent-src/commands/check-current-md.md +1 -0
  28. package/dist/agent-src/commands/commit/in-chunks.md +1 -0
  29. package/dist/agent-src/commands/commit.md +1 -0
  30. package/dist/agent-src/commands/condense.md +1 -0
  31. package/dist/agent-src/commands/context/create.md +1 -0
  32. package/dist/agent-src/commands/context/refactor.md +1 -0
  33. package/dist/agent-src/commands/context.md +1 -0
  34. package/dist/agent-src/commands/cost-report.md +5 -4
  35. package/dist/agent-src/commands/council/analysis.md +3 -2
  36. package/dist/agent-src/commands/council/debate.md +5 -4
  37. package/dist/agent-src/commands/council/default.md +3 -2
  38. package/dist/agent-src/commands/council/design.md +3 -2
  39. package/dist/agent-src/commands/council/optimize.md +3 -2
  40. package/dist/agent-src/commands/council/pr.md +3 -2
  41. package/dist/agent-src/commands/council.md +4 -3
  42. package/dist/agent-src/commands/e2e-heal.md +1 -0
  43. package/dist/agent-src/commands/e2e-plan.md +1 -0
  44. package/dist/agent-src/commands/estimate-ticket.md +1 -0
  45. package/dist/agent-src/commands/feature/dev.md +1 -0
  46. package/dist/agent-src/commands/feature/explore.md +1 -0
  47. package/dist/agent-src/commands/feature/plan.md +6 -6
  48. package/dist/agent-src/commands/feature/refactor.md +1 -0
  49. package/dist/agent-src/commands/feature/roadmap.md +1 -0
  50. package/dist/agent-src/commands/feature.md +1 -0
  51. package/dist/agent-src/commands/fix/ci.md +1 -0
  52. package/dist/agent-src/commands/fix/portability.md +1 -0
  53. package/dist/agent-src/commands/fix/pr-comments.md +147 -15
  54. package/dist/agent-src/commands/fix/refs.md +1 -0
  55. package/dist/agent-src/commands/fix/seeder.md +1 -0
  56. package/dist/agent-src/commands/fix.md +8 -8
  57. package/dist/agent-src/commands/ghostwriter/delete.md +1 -0
  58. package/dist/agent-src/commands/ghostwriter/fetch.md +1 -0
  59. package/dist/agent-src/commands/ghostwriter/list.md +1 -0
  60. package/dist/agent-src/commands/ghostwriter/show.md +1 -0
  61. package/dist/agent-src/commands/ghostwriter/write.md +1 -0
  62. package/dist/agent-src/commands/ghostwriter.md +1 -0
  63. package/dist/agent-src/commands/grill-me.md +3 -2
  64. package/dist/agent-src/commands/image/analyse.md +1 -0
  65. package/dist/agent-src/commands/image/create.md +1 -0
  66. package/dist/agent-src/commands/image/verify.md +1 -0
  67. package/dist/agent-src/commands/image.md +1 -0
  68. package/dist/agent-src/commands/implement-ticket.md +1 -0
  69. package/dist/agent-src/commands/jira-ticket.md +1 -0
  70. package/dist/agent-src/commands/judge/on-diff.md +1 -0
  71. package/dist/agent-src/commands/judge/solo.md +1 -0
  72. package/dist/agent-src/commands/judge/steps.md +1 -0
  73. package/dist/agent-src/commands/judge.md +1 -0
  74. package/dist/agent-src/commands/knowledge/cross-repo.md +1 -0
  75. package/dist/agent-src/commands/knowledge/forget.md +1 -0
  76. package/dist/agent-src/commands/knowledge/ingest.md +1 -0
  77. package/dist/agent-src/commands/knowledge/list.md +1 -0
  78. package/dist/agent-src/commands/knowledge.md +1 -0
  79. package/dist/agent-src/commands/memory/add.md +8 -6
  80. package/dist/agent-src/commands/memory/learn-low-impact.md +3 -2
  81. package/dist/agent-src/commands/memory/load.md +7 -7
  82. package/dist/agent-src/commands/memory/mine-session.md +39 -12
  83. package/dist/agent-src/commands/memory/promote.md +3 -2
  84. package/dist/agent-src/commands/memory/propose.md +7 -6
  85. package/dist/agent-src/commands/memory.md +3 -2
  86. package/dist/agent-src/commands/mode.md +1 -0
  87. package/dist/agent-src/commands/module/create.md +1 -0
  88. package/dist/agent-src/commands/module/explore.md +1 -0
  89. package/dist/agent-src/commands/module.md +1 -0
  90. package/dist/agent-src/commands/optimize/agents-dir.md +1 -0
  91. package/dist/agent-src/commands/optimize/augmentignore.md +1 -0
  92. package/dist/agent-src/commands/optimize/rtk.md +1 -0
  93. package/dist/agent-src/commands/optimize/skills.md +1 -0
  94. package/dist/agent-src/commands/optimize-prompt.md +1 -0
  95. package/dist/agent-src/commands/optimize.md +1 -0
  96. package/dist/agent-src/commands/orchestrate.md +1 -0
  97. package/dist/agent-src/commands/override/create.md +1 -0
  98. package/dist/agent-src/commands/override/manage.md +1 -0
  99. package/dist/agent-src/commands/override.md +1 -0
  100. package/dist/agent-src/commands/package-reset.md +1 -0
  101. package/dist/agent-src/commands/package-test.md +1 -0
  102. package/dist/agent-src/commands/post-as/ghostwriter.md +1 -0
  103. package/dist/agent-src/commands/post-as/me.md +1 -0
  104. package/dist/agent-src/commands/post-as.md +1 -0
  105. package/dist/agent-src/commands/pr/create/description-only.md +1 -0
  106. package/dist/agent-src/commands/pr/create.md +25 -0
  107. package/dist/agent-src/commands/prediction-pool.md +1 -0
  108. package/dist/agent-src/commands/prepare-for-review.md +1 -0
  109. package/dist/agent-src/commands/profile/activate.md +1 -0
  110. package/dist/agent-src/commands/profile/deactivate.md +1 -0
  111. package/dist/agent-src/commands/profile/show.md +1 -0
  112. package/dist/agent-src/commands/profile.md +1 -0
  113. package/dist/agent-src/commands/project-analyze.md +1 -0
  114. package/dist/agent-src/commands/project-health.md +1 -0
  115. package/dist/agent-src/commands/quality-fix.md +1 -0
  116. package/dist/agent-src/commands/refine-ticket.md +1 -0
  117. package/dist/agent-src/commands/research/deep.md +1 -0
  118. package/dist/agent-src/commands/research/report.md +1 -0
  119. package/dist/agent-src/commands/research.md +1 -0
  120. package/dist/agent-src/commands/review-changes.md +1 -0
  121. package/dist/agent-src/commands/review-routing.md +1 -0
  122. package/dist/agent-src/commands/roadmap/ai-council.md +1 -0
  123. package/dist/agent-src/commands/roadmap/create.md +1 -0
  124. package/dist/agent-src/commands/roadmap/process-full.md +1 -0
  125. package/dist/agent-src/commands/roadmap/process-phase.md +1 -0
  126. package/dist/agent-src/commands/roadmap/process-step.md +1 -0
  127. package/dist/agent-src/commands/roadmap.md +1 -0
  128. package/dist/agent-src/commands/rule-compliance-audit.md +1 -0
  129. package/dist/agent-src/commands/security-audit-config.md +84 -0
  130. package/dist/agent-src/commands/set-cost-profile.md +1 -0
  131. package/dist/agent-src/commands/skill/preview.md +1 -0
  132. package/dist/agent-src/commands/skill.md +1 -0
  133. package/dist/agent-src/commands/skills/discover.md +1 -0
  134. package/dist/agent-src/commands/skills.md +1 -0
  135. package/dist/agent-src/commands/sync-agent-settings.md +1 -0
  136. package/dist/agent-src/commands/sync-gitignore/fix.md +1 -0
  137. package/dist/agent-src/commands/sync-gitignore.md +1 -0
  138. package/dist/agent-src/commands/tests/create.md +1 -0
  139. package/dist/agent-src/commands/tests/execute.md +1 -0
  140. package/dist/agent-src/commands/tests.md +1 -0
  141. package/dist/agent-src/commands/threat-model.md +1 -0
  142. package/dist/agent-src/commands/update-form-request-messages.md +1 -0
  143. package/dist/agent-src/commands/upstream-contribute.md +1 -0
  144. package/dist/agent-src/commands/video/from-script.md +1 -0
  145. package/dist/agent-src/commands/video/from-song.md +1 -0
  146. package/dist/agent-src/commands/video/scene.md +1 -0
  147. package/dist/agent-src/commands/video/stitch.md +1 -0
  148. package/dist/agent-src/commands/video/storyboard.md +1 -0
  149. package/dist/agent-src/commands/video.md +1 -0
  150. package/dist/agent-src/commands/work.md +1 -0
  151. package/dist/agent-src/contexts/augment-infrastructure.md +1 -1
  152. package/dist/agent-src/contexts/communication/rules-auto/skill-quality-mechanics.md +1 -1
  153. package/dist/agent-src/contexts/communication/rules-auto/slash-command-routing-policy-mechanics.md +2 -2
  154. package/dist/agent-src/contexts/communication/rules-auto/think-before-action-mechanics.md +6 -6
  155. package/dist/agent-src/contexts/contracts/consumer-agents-md-guide.md +2 -2
  156. package/dist/agent-src/contexts/execution/rdp-gate.md +75 -0
  157. package/dist/agent-src/contexts/subagent-configuration.md +1 -0
  158. package/dist/agent-src/personas/advisors/contrarian.md +1 -1
  159. package/dist/agent-src/personas/advisors/executor.md +1 -1
  160. package/dist/agent-src/personas/advisors/expansionist.md +1 -1
  161. package/dist/agent-src/personas/advisors/first-principles.md +1 -1
  162. package/dist/agent-src/personas/advisors/outsider.md +1 -1
  163. package/dist/agent-src/rules/autonomous-execution.md +12 -0
  164. package/dist/agent-src/rules/external-reference-deep-dive.md +1 -1
  165. package/dist/agent-src/rules/git-history-discipline.md +47 -1
  166. package/dist/agent-src/rules/improve-before-implement.md +12 -0
  167. package/dist/agent-src/rules/lethal-trifecta-guard.md +80 -0
  168. package/dist/agent-src/rules/no-pr-progress-comments.md +3 -4
  169. package/dist/agent-src/rules/notes-first-reasoning.md +71 -0
  170. package/dist/agent-src/rules/roadmap-progress-sync.md +48 -31
  171. package/dist/agent-src/rules/security-sensitive-stop.md +14 -1
  172. package/dist/agent-src/rules/source-confidentiality.md +97 -0
  173. package/dist/agent-src/rules/think-before-action.md +9 -1
  174. package/dist/agent-src/rules/untrusted-input-defense.md +76 -0
  175. package/dist/agent-src/scripts/archive_completed_roadmaps.py +171 -0
  176. package/dist/agent-src/skills/adversarial-review/SKILL.md +14 -0
  177. package/dist/agent-src/skills/agent-security-review/SKILL.md +113 -0
  178. package/dist/agent-src/skills/agent-security-review/evals/triggers.json +51 -0
  179. package/dist/agent-src/skills/ai-council/SKILL.md +3 -3
  180. package/dist/agent-src/skills/async-python-patterns/SKILL.md +1 -1
  181. package/dist/agent-src/skills/blast-radius-analyzer/SKILL.md +12 -11
  182. package/dist/agent-src/skills/command-routing/SKILL.md +1 -1
  183. package/dist/agent-src/skills/complexity-first-planning/SKILL.md +96 -0
  184. package/dist/agent-src/skills/complexity-first-planning/evals/triggers.json +16 -0
  185. package/dist/agent-src/skills/copilot-config/SKILL.md +3 -4
  186. package/dist/agent-src/skills/defense-in-depth/SKILL.md +1 -1
  187. package/dist/agent-src/skills/developer-like-execution/SKILL.md +5 -4
  188. package/dist/agent-src/skills/error-handling-patterns/SKILL.md +1 -1
  189. package/dist/agent-src/skills/feature-planning/SKILL.md +2 -2
  190. package/dist/agent-src/skills/mcp-builder/SKILL.md +1 -1
  191. package/dist/agent-src/skills/memory-consolidation/SKILL.md +63 -17
  192. package/dist/agent-src/skills/prompt-engineering-patterns/SKILL.md +1 -1
  193. package/dist/agent-src/skills/readme-writing-package/SKILL.md +1 -1
  194. package/dist/agent-src/skills/reasoning-orchestrator/SKILL.md +119 -0
  195. package/dist/agent-src/skills/reasoning-orchestrator/evals/triggers.json +16 -0
  196. package/dist/agent-src/skills/receiving-code-review/SKILL.md +6 -6
  197. package/dist/agent-src/skills/refine-prompt/SKILL.md +1 -1
  198. package/dist/agent-src/skills/refine-ticket/SKILL.md +1 -1
  199. package/dist/agent-src/skills/repomix-packer/SKILL.md +1 -1
  200. package/dist/agent-src/skills/secrets-management/SKILL.md +1 -1
  201. package/dist/agent-src/skills/subagent-orchestration/SKILL.md +10 -3
  202. package/dist/agent-src/skills/testing-anti-patterns/SKILL.md +1 -1
  203. package/dist/agent-src/skills/testing-anti-patterns/process-anti-patterns.md +1 -1
  204. package/dist/agent-src/skills/token-optimizer/SKILL.md +1 -1
  205. package/dist/agent-src/templates/agents/.gitattributes.fragment +0 -1
  206. package/dist/agent-src/templates/agents/agent-project-settings.example.yml +4 -4
  207. package/dist/agent-src/templates/scripts/check_memory.py +1 -2
  208. package/dist/agent-src/templates/scripts/check_memory_proposal.py +1 -1
  209. package/dist/agent-src/templates/scripts/memory_lookup.py +148 -289
  210. package/dist/agent-src/templates/scripts/memory_report.py +132 -2
  211. package/dist/agent-src/templates/scripts/memory_signal.py +7 -9
  212. package/dist/agent-src/templates/scripts/memory_status.py +25 -206
  213. package/dist/agent-src/templates/scripts/work_engine/directives/backend/memory.py +6 -6
  214. package/dist/agent-src/templates/scripts/work_engine/directives/ui/_passthrough.py +3 -3
  215. package/dist/agent-src/templates/scripts/work_engine/scoring/memory_visibility.py +0 -1
  216. package/dist/cli/agent-config.js +31 -300
  217. package/dist/cli/agent-config.js.map +1 -1
  218. package/dist/cli/commands/commands.js +10 -5
  219. package/dist/cli/commands/commands.js.map +1 -1
  220. package/dist/cli/discovery/loadManifest.js.map +1 -1
  221. package/dist/cli/main.js +309 -0
  222. package/dist/cli/main.js.map +1 -0
  223. package/dist/discovery/deprecation-report.md +1 -1
  224. package/dist/discovery/discovery-manifest.json +645 -342
  225. package/dist/discovery/discovery-manifest.json.sha256 +1 -1
  226. package/dist/discovery/discovery-manifest.summary.md +8 -5
  227. package/dist/discovery/orphan-report.md +1 -1
  228. package/dist/discovery/packs.json +149 -37
  229. package/dist/discovery/trust-report.md +3 -3
  230. package/dist/discovery/workspaces.json +61 -36
  231. package/dist/mcp/registry-manifest.json +4 -4
  232. package/dist/router.json +1 -1
  233. package/dist/server/routes/wizard.js +4 -3
  234. package/dist/server/routes/wizard.js.map +1 -1
  235. package/dist/server/schemas/settings.js +18 -0
  236. package/dist/server/schemas/settings.js.map +1 -1
  237. package/docs/MIGRATION.md +1 -1
  238. package/docs/adrs/cost/0001-hard-stop-hook.md +5 -5
  239. package/docs/adrs/memory/0001-consumer-side-snapshot.md +15 -7
  240. package/docs/adrs/memory/README.md +6 -5
  241. package/docs/adrs/router/0001-three-tier-routing.md +2 -2
  242. package/docs/adrs/schema/0001-json-schema-frontmatter.md +2 -2
  243. package/docs/adrs/smoke/0001-per-tier-smoke-scripts.md +5 -5
  244. package/docs/adrs/telegraph/0001-default-off-until-bench.md +3 -3
  245. package/docs/architecture.md +9 -9
  246. package/docs/archive/CHANGELOG-pre-2.2.0.md +30 -30
  247. package/docs/archive/CHANGELOG-pre-2.25.0.md +1 -1
  248. package/docs/archive/CHANGELOG-pre-4.5.0.md +1 -1
  249. package/docs/archive/CHANGELOG-pre-6.0.0.md +473 -0
  250. package/docs/benchmark.md +54 -53
  251. package/docs/benchmarks.md +2 -2
  252. package/docs/case-studies/{frontend-design-vs-ui-ux-pro-max.md → frontend-design-positioning.md} +4 -4
  253. package/docs/catalog.md +20 -13
  254. package/docs/command-flows.md +90 -92
  255. package/docs/contracts/adr-layout.md +2 -3
  256. package/docs/contracts/adr-level-6-productization.md +1 -1
  257. package/docs/contracts/ai-council-config.md +42 -7
  258. package/docs/contracts/command-clusters.md +1 -1
  259. package/docs/contracts/cost-enforcement.md +1 -1
  260. package/docs/contracts/cost-summary-schema.md +1 -1
  261. package/docs/contracts/daily-workspace.md +1 -0
  262. package/docs/contracts/discovery-manifest.schema.json +4 -2
  263. package/docs/contracts/explain-modes.md +1 -1
  264. package/docs/contracts/implement-ticket-flow.md +6 -7
  265. package/docs/contracts/mcp-tool-inventory.md +10 -10
  266. package/docs/contracts/measurement-baseline.md +1 -1
  267. package/docs/contracts/memory-visibility-v1.md +1 -5
  268. package/docs/contracts/namespace.md +1 -1
  269. package/docs/contracts/persona-schema.md +1 -1
  270. package/docs/contracts/rule-interactions.md +1 -1
  271. package/docs/contracts/smoke-contracts.md +1 -1
  272. package/docs/contracts/universal-skills.md +0 -1
  273. package/docs/contracts/workspace-boundary.md +84 -0
  274. package/docs/customization.md +3 -3
  275. package/docs/decisions/ADR-009-event4u-namespace.md +1 -1
  276. package/docs/decisions/ADR-013-discovery-frontmatter-contract.md +1 -1
  277. package/docs/decisions/ADR-026-explain-mode-translation.md +1 -1
  278. package/docs/decisions/ADR-088-no-external-runtime-federation.md +26 -27
  279. package/docs/decisions/ADR-090-visibility-command-frontmatter-field.md +95 -0
  280. package/docs/decisions/ADR-091-split-meta-capability-packs.md +113 -0
  281. package/docs/decisions/ADR-092-defer-command-tier-alias-removal.md +93 -0
  282. package/docs/decisions/ADR-093-ai-council-config-user-global.md +111 -0
  283. package/docs/decisions/ADR-094-agent-memory-layer-removal.md +94 -0
  284. package/docs/decisions/ADR-095-workspace-boundary-contract.md +108 -0
  285. package/docs/decisions/INDEX.md +6 -0
  286. package/docs/development.md +5 -7
  287. package/docs/getting-started.md +4 -4
  288. package/docs/guidelines/agent-infra/5w2h-analysis.md +1 -1
  289. package/docs/guidelines/agent-infra/comparison-matrix.md +1 -1
  290. package/docs/guidelines/agent-infra/corpus-grounding-authoring.md +1 -1
  291. package/docs/guidelines/agent-infra/critical-thinking.md +1 -1
  292. package/docs/guidelines/agent-infra/engineering-memory-data-format.md +1 -5
  293. package/docs/guidelines/agent-infra/first-principles.md +1 -1
  294. package/docs/guidelines/agent-infra/frontier-reasoning-operating-profile.md +164 -0
  295. package/docs/guidelines/agent-infra/inversion-thinking.md +1 -1
  296. package/docs/guidelines/agent-infra/ios-simulator-guide.md +9 -14
  297. package/docs/guidelines/agent-infra/mcp-request-signing.md +19 -22
  298. package/docs/guidelines/agent-infra/memory-access.md +25 -31
  299. package/docs/guidelines/agent-infra/mental-models.md +1 -1
  300. package/docs/guidelines/agent-infra/model-recommendation.md +29 -0
  301. package/docs/guidelines/agent-infra/scqa-framework.md +3 -3
  302. package/docs/guidelines/agent-infra/security-lint-containment.md +81 -0
  303. package/docs/guidelines/agent-infra/six-hats.md +1 -1
  304. package/docs/guidelines/agent-infra/systems-thinking.md +1 -1
  305. package/docs/guidelines/agent-infra/untrusted-input-spotlighting.md +72 -0
  306. package/docs/installation.md +1 -1
  307. package/docs/mcp.md +2 -2
  308. package/docs/parity/{bench-ruflo.json → bench-external.json} +10 -10
  309. package/docs/parity/{ruflo.md → external-runtime.md} +9 -9
  310. package/docs/quality.md +3 -3
  311. package/docs/safety.md +3 -3
  312. package/docs/skills-catalog.md +4 -1
  313. package/llms.txt +3 -0
  314. package/package.json +1 -1
  315. package/src/config/agent-settings.template.yml +65 -3
  316. package/src/config/discovery/packs.yml +29 -0
  317. package/src/config/discovery/workspaces.yml +3 -1
  318. package/src/config/gitignore-block.txt +6 -0
  319. package/src/scripts/__pycache__/validate_frontmatter.cpython-312.pyc +0 -0
  320. package/src/scripts/_cli/cmd_doctor.py +99 -13
  321. package/src/scripts/_lib/__pycache__/__init__.cpython-312.pyc +0 -0
  322. package/src/scripts/_lib/__pycache__/agent_src.cpython-312.pyc +0 -0
  323. package/src/scripts/_lib/bench_ab_scoring_v2.py +227 -0
  324. package/src/scripts/_lib/global_deploy_inventory.py +39 -9
  325. package/src/scripts/_lib/link_crypto.py +206 -0
  326. package/src/scripts/_lib/security_lint.py +228 -0
  327. package/src/scripts/ai_council/clients.py +2 -2
  328. package/src/scripts/ai_council/config.py +55 -0
  329. package/src/scripts/audit_adr_coverage.py +0 -2
  330. package/src/scripts/audit_command_surface.py +18 -5
  331. package/src/scripts/audit_mcp_tools.py +2 -2
  332. package/src/scripts/audit_skill_descriptions.py +2 -2
  333. package/src/scripts/bench_ab_clone.py +62 -12
  334. package/src/scripts/bench_ab_task_runner.py +475 -30
  335. package/src/scripts/bench_ab_v2_run.py +247 -0
  336. package/src/scripts/bench_ab_v2_stats.py +347 -0
  337. package/src/scripts/bench_run.py +1 -1
  338. package/src/scripts/build_discovery_manifest.py +10 -0
  339. package/src/scripts/check_bite_sized_granularity.py +1 -2
  340. package/src/scripts/check_memory.py +49 -63
  341. package/src/scripts/check_memory_proposal.py +1 -1
  342. package/src/scripts/check_no_external_sources.py +101 -0
  343. package/src/scripts/check_references.py +2 -0
  344. package/src/scripts/cost_by_conversation.py +1 -1
  345. package/src/scripts/council_cli.py +28 -14
  346. package/src/scripts/external_sources_denylist.json +91 -0
  347. package/src/scripts/hook_manifest.yaml +14 -6
  348. package/src/scripts/injection_scan_hook.py +145 -0
  349. package/src/scripts/install-hooks.sh +11 -0
  350. package/src/scripts/install.py +88 -13
  351. package/src/scripts/lint_agent_security.py +112 -0
  352. package/src/scripts/lint_bench_ab.py +5 -4
  353. package/src/scripts/lint_command_tiers.py +63 -22
  354. package/src/scripts/lint_discovery_vocabulary.py +2 -0
  355. package/src/scripts/lint_empty_roadmaps.py +80 -0
  356. package/src/scripts/lint_hidden_unicode.py +132 -0
  357. package/src/scripts/lint_instruction_smuggling.py +107 -0
  358. package/src/scripts/lint_marketplace.py +1 -1
  359. package/src/scripts/lint_mcp_config_security.py +124 -0
  360. package/src/scripts/lint_skill_frontmatter_safety.py +144 -0
  361. package/src/scripts/lint_workspace_boundary.py +122 -0
  362. package/src/scripts/mcp_server/consumer_tool_catalog.json +2 -3
  363. package/src/scripts/mcp_server/tools.py +8 -32
  364. package/src/scripts/memory_lookup.py +27 -296
  365. package/src/scripts/memory_report.py +1 -23
  366. package/src/scripts/memory_signal.py +6 -53
  367. package/src/scripts/memory_status.py +25 -206
  368. package/src/scripts/mine_session.py +118 -41
  369. package/src/scripts/pack_dependency_allowlist.json +2 -2
  370. package/src/scripts/render_benchmark_md.py +141 -52
  371. package/src/scripts/schemas/command.schema.json +6 -1
  372. package/src/scripts/security_audit_config.py +153 -0
  373. package/dist/agent-src/commands/chat-history/learn.md +0 -184
  374. package/dist/agent-src/commands/chat-history/show.md +0 -113
  375. package/dist/agent-src/commands/fix/pr-bot-comments.md +0 -157
  376. package/dist/agent-src/commands/fix/pr-developer-comments.md +0 -163
  377. package/dist/agent-src/templates/agents/memory/architecture-decisions.example.yml +0 -95
  378. package/docs/contracts/agent-memory-contract.md +0 -159
@@ -48,7 +48,7 @@ play (e.g. `qa` for testability, `backend-architect` for system
48
48
  boundaries). Specialists carry the 7-section spine because their
49
49
  narrower scope justifies — and benefits from — explicit Critical
50
50
  Rules and Workflows blocks (pattern adopted from
51
- `alirezarezvani/claude-skills`).
51
+ an external skill suite).
52
52
 
53
53
  ## § 3 — Required sections per tier
54
54
 
@@ -115,7 +115,7 @@ source of truth and weaken it. Canonical contracts:
115
115
  |---|---|
116
116
  | Decision-Engine gates (`min_confidence`, `block_on_risk`, `require_memory_hits`, `on_block`) | [`decision-engine-gates.md`](decision-engine-gates.md) |
117
117
  | Decision-trace shape (what the engine emits per phase) | [`decision-trace-v1.md`](decision-trace-v1.md) |
118
- | Memory contract (entries, scopes, retention) | [`agent-memory-contract.md`](agent-memory-contract.md) |
118
+ | Memory contract (entries, scopes, retention) | [`../guidelines/agent-infra/memory-access.md`](../guidelines/agent-infra/memory-access.md) |
119
119
  | Memory visibility in the trace (`affected` keys) | [`memory-visibility-v1.md`](memory-visibility-v1.md) |
120
120
  | AI-Council consultation flow | [`../skills/ai-council/SKILL.md`](../../.agent-src.uncondensed/skills/ai-council/SKILL.md) |
121
121
 
@@ -3,7 +3,7 @@ stability: beta
3
3
  keep-beta-until: 2026-08-14
4
4
  ---
5
5
 
6
- # Smoke Contracts — Phase 3 of step-11-ruflo-parity
6
+ # Smoke Contracts — Phase 3 of an internal parity roadmap (local-only)
7
7
 
8
8
  > **Status:** active · **Owner:** step-11 Phase 3 · **Sibling:**
9
9
  > [`measurement-baseline.md`](measurement-baseline.md) (snapshot semantics)
@@ -87,6 +87,5 @@ Removing a skill is breaking. It must be announced in `STABILITY.md` with a depr
87
87
  ## Related
88
88
 
89
89
  - [`STABILITY.md`](STABILITY.md) — public-identifier stability surface.
90
- - [`agent-memory-contract.md`](agent-memory-contract.md) — companion contract for the cross-cutting memory layer.
91
90
  - [`docs/getting-started-by-role.md`](../getting-started-by-role.md) — consumer-facing role docs that reference these skills.
92
91
  - [`tests/eval/corpus-non-dev.yaml`](../../tests/eval/corpus-non-dev.yaml) — empirical test corpus.
@@ -0,0 +1,84 @@
1
+ ---
2
+ stability: stable
3
+ ---
4
+
5
+ # Workspace Boundary Contract
6
+
7
+ > **Status** · stable · 2026-06-14. Governed by
8
+ > [`ADR-095`](../decisions/ADR-095-workspace-boundary-contract.md). Exists to
9
+ > stop "workspace" from becoming the new "meta" — a catch-all that absorbs
10
+ > every nearby concern until it owns everything and means nothing.
11
+
12
+ The **workspace** is the task-orchestration layer behind `/work`,
13
+ `/implement-ticket`, and the host-drive loop — 13 modules under
14
+ `src/cli/python/workspace_*.py`. This contract draws the line around it.
15
+
16
+ ## Owns
17
+
18
+ The workspace owns the **orchestration and lifecycle** of work:
19
+
20
+ - **Task orchestration** — picking up, sequencing, and driving a task to done.
21
+ - **Host-session lifecycle** — host detection, tier selection, fallback, the
22
+ drive loop, the kill-switch.
23
+ - **Continuation** — multi-turn resume: a long task survives across turns
24
+ instead of restarting cold.
25
+ - **Drive health** — task completion / abandonment / retry telemetry, drive
26
+ kill-switch signals, local workspace analytics **as drive-health data**.
27
+
28
+ ## Does NOT own
29
+
30
+ The workspace orchestrates these domains but does **not** own their
31
+ *design, semantics, or policy*. It may **consume** their artefacts (read a
32
+ skill body to hand it off; read a profile to launch under it) — it must not
33
+ **define** them:
34
+
35
+ | Not owned | Owner lives at | The line |
36
+ |---|---|---|
37
+ | **Skill design** | `src/skills/`, `condense.py`, `skill_linter.py` | Workspace may *resolve* a skill body for hand-off; it must not define what a skill is or how it is authored. |
38
+ | **Profile semantics** | `src/profiles/`, `build_discovery_manifest.py` | Workspace may *launch under* a profile; it must not decide what a profile means. |
39
+ | **Video-provider logic** | `src/scripts/ai-video/` | Workspace never reaches into provider adapters or lifecycle. |
40
+ | **MCP-registry policy** | the MCP builder / registry surface | Workspace never encodes which MCP servers exist or how they install. |
41
+ | **Analytics product strategy** | the telemetry / product-analytics surface | Workspace records *drive-health* metrics locally; it does not decide analytics product strategy. |
42
+
43
+ ## Drift detection — import-edge check + doc-governance
44
+
45
+ Two layers, with an explicit division of labour:
46
+
47
+ 1. **Import-edge linter** (`scripts/lint_workspace_boundary.py`, AST-static,
48
+ wired into CI). Fails if any `src/cli/python/workspace_*.py` module imports
49
+ an owner-module of a not-owned domain. This is the cheap, precise lock — it
50
+ catches the most common concrete drift (a workspace module reaching into
51
+ video / MCP / skill-design internals).
52
+
53
+ 2. **Doc-governance (review).** The import check enforces **import edges
54
+ only**. It does **not** catch *semantic* drift — a workspace module that
55
+ encodes profile-semantics or analytics-*product-strategy* judgement without
56
+ importing anything forbidden. That stays a **review responsibility** against
57
+ this contract. **A green import check is not proof the boundary holds** — it
58
+ is one supplement to boundary thinking, not a substitute for it.
59
+
60
+ ### Escape hatch
61
+
62
+ A genuinely justified import may carry an inline pragma:
63
+
64
+ ```python
65
+ import some_owner_module # boundary-exception: <reason>
66
+ ```
67
+
68
+ The linter then allows that line. A `boundary-exception` is reviewed like any
69
+ boundary change — it is a documented, deliberate exception, not a silent
70
+ bypass. Persistent exceptions are a signal to revisit this contract or the
71
+ module's placement.
72
+
73
+ ## Day-one state
74
+
75
+ Survey of all 13 `workspace_*.py` modules (2026-06-14, recorded in ADR-095):
76
+ **zero violations**. The only cross-module import is intra-workspace
77
+ (`workspace_inbox → workspace_skills`). The import check therefore locks a
78
+ boundary that currently holds.
79
+
80
+ ## See also
81
+
82
+ - [`ADR-095`](../decisions/ADR-095-workspace-boundary-contract.md) — the decision.
83
+ - [`ADR-050`](../decisions/ADR-050-workspace-vs-package-root-boundary.md) — the workspace-vs-package-root trust boundary (this refines it at module level).
84
+ - [`daily-workspace.md`](daily-workspace.md) — the daily-workspace surface contract.
@@ -242,7 +242,7 @@ to `false` in `.agent-settings.yml` to silence post-task analysis without
242
242
  changing the profile.
243
243
 
244
244
  The authoritative matrix of all matrix-controlled settings lives in
245
- [`.agent-src.uncondensed/templates/agent-settings.md`](../.agent-src.uncondensed/templates/agent-settings.md).
245
+ [`src/agent-src/templates/agent-settings.md`](../src/agent-src/templates/agent-settings.md).
246
246
 
247
247
  ### Chat-history defaults per profile
248
248
 
@@ -280,7 +280,7 @@ output. Iron-Law gates (`commit-policy`, `scope-control` git-ops,
280
280
  | `telegraph.speak_scope` | `off`, `prose_only`, `aggressive` | `prose_only` | How widely telegraph-speak grammar applies in chat. `off` = no telegraph; `prose_only` = telegraph in body prose, numbered options + Iron-Law-literal blocks stay full prose; `aggressive` = telegraph everywhere except Iron-Law literals. |
281
281
 
282
282
  The cross-rule index for these defaults lives in
283
- [`.agent-src.uncondensed/contexts/contracts/frugality-charter.md`](../.agent-src.uncondensed/contexts/contracts/frugality-charter.md).
283
+ [`src/agent-src/contexts/contracts/frugality-charter.md`](../src/agent-src/contexts/contracts/frugality-charter.md).
284
284
  Writer skills (`skill-writing`, `rule-writing`, `command-writing`,
285
285
  `guideline-writing`, `roadmap-writing`, `persona-writing`,
286
286
  `agent-docs-writing`, `context-authoring`, `conventional-commits-writing`,
@@ -410,7 +410,7 @@ tarball and is the source of truth consumed by:
410
410
  > When you read "the Laravel pack", picture a filter over the shared
411
411
  > artefact tree — not a separate npm package. The day ADR-011's
412
412
  > extraction trigger flips, the same scan output drives the split;
413
- > until then, every artefact lives under `.agent-src.uncondensed/`.
413
+ > until then, every artefact lives under `src/`.
414
414
 
415
415
  Alongside the JSON manifest, the scanner writes
416
416
  `dist/discovery/discovery-manifest.json.sha256` — a sidecar hash that
@@ -36,7 +36,7 @@ points surfaced in production use:
36
36
  `~/.config/agent-config/claude-desktop/` and called it done. Claude
37
37
  Desktop does **not** auto-discover skills from any filesystem path
38
38
  — the user must upload each skill through **Settings → Customize →
39
- Skills → Upload**. Research against `nextlevelbuilder/ui-ux-pro-max-skill`
39
+ Skills → Upload**. Research against an external reference suite
40
40
  and the Anthropic Skills API docs confirmed there is no public
41
41
  bulk-upload API for personal installs (the `/v1/skills` endpoint is
42
42
  workspace + code-execution gated).
@@ -267,7 +267,7 @@ and `profile.id` reservations holds.
267
267
  Added pack id `frontend-design` to the closed vocabulary (grounded design
268
268
  intelligence — design-knowledge corpus + BM25 grounding engine, design tokens,
269
269
  stack best-practice and chart/typography knowledge, adopted from the MIT
270
- `nextlevelbuilder/ui-ux-pro-max-skill` corpus per ADR-061). Mirrored in
270
+ an external reference corpus per ADR-061). Mirrored in
271
271
  [`src/config/discovery/packs.yml`](../../src/config/discovery/packs.yml) and the
272
272
  `ADR_PACKS` frozenset in
273
273
  [`scripts/lint_discovery_vocabulary.py`](../../src/scripts/lint_discovery_vocabulary.py).
@@ -112,6 +112,6 @@ glossary YAMLs translate forward.
112
112
  ## Cross-references
113
113
 
114
114
  - Contract: [`docs/contracts/explain-modes.md`](../contracts/explain-modes.md).
115
- - Envelope: [`docs/contracts/agent-memory-contract.md`](../contracts/agent-memory-contract.md).
115
+ - Envelope: [`internal/schemas/retrieval-v1.schema.json`](../../internal/schemas/retrieval-v1.schema.json).
116
116
  - Workspace: [`ADR-025`](ADR-025-workspace-chrome.md), [`docs/contracts/daily-workspace.md`](../contracts/daily-workspace.md).
117
117
  - Roles: [`docs/contracts/role-experience.md`](../contracts/role-experience.md).
@@ -5,7 +5,7 @@ date: 2026-06-11
5
5
  decision: no-external-runtime-federation
6
6
  supersedes: —
7
7
  superseded_by: —
8
- phase: ruflo-coexistence
8
+ phase: external-runtime-coexistence
9
9
  type: structural
10
10
  ---
11
11
 
@@ -14,30 +14,30 @@ type: structural
14
14
  ## Status
15
15
 
16
16
  **Accepted** · 2026-06-11. Lands with the closure of PR #262
17
- ("ruflo coexistence bridge") as superseded.
17
+ ("external-runtime coexistence bridge") as superseded.
18
18
 
19
19
  ## Context
20
20
 
21
- [`ruvnet/ruflo`](https://github.com/ruvnet/ruflo) is a multi-agent
21
+ An external multi-agent runtime is a multi-agent
22
22
  orchestration **runtime** (swarms, persistent memory / RAG, an MCP server,
23
23
  a hooks system, background workers). It also writes `.claude/` lifecycle
24
24
  hooks, so it shares a Claude Code project's `.claude/` directory with
25
25
  `event4u/agent-config`.
26
26
 
27
- PR #262 (authored 2026-05-27) proposed a "ruflo coexistence bridge" with four
27
+ PR #262 (authored 2026-05-27) proposed an "external-runtime coexistence bridge" with four
28
28
  parts:
29
29
 
30
30
  1. **Plugin-scope hook delivery** — ship agent-config's Claude hooks via the
31
31
  plugin (`hooks/hooks.json`) instead of the shared `.claude/settings.json`
32
32
  hooks array, to stop colliding with neighbour tools' hook arrays.
33
- 2. **`detect_ruflo` + `coexist`/`skip` mode + dispatcher skip-gate** — detect
34
- ruflo, offer a one-time choice, optionally skip agent-config's own
33
+ 2. **`detect_external` + `coexist`/`skip` mode + dispatcher skip-gate** — detect
34
+ the external runtime, offer a one-time choice, optionally skip agent-config's own
35
35
  dispatcher so the two tools' hooks don't double-fire.
36
- 3. **A detection-gated `ruflo-bridge` pack** (`ruflo-routing` rule +
37
- `ruflo-orchestration` skill) documenting ruflo's MCP-tool surface and a
38
- persona→agent-type map so the host agent can **drive ruflo's swarm**.
36
+ 3. **A detection-gated `external-runtime-bridge` pack** (`external-runtime-routing` rule +
37
+ `external-runtime-orchestration` skill) documenting the external runtime's MCP-tool surface and a
38
+ persona→agent-type map so the host agent can **drive the external runtime's swarm**.
39
39
  4. **A coexistence contract + an 8-phase roadmap** (later phases: shared
40
- cross-tool memory, collision namespacing, git-layer enforcement of ruflo
40
+ cross-tool memory, collision namespacing, git-layer enforcement of the external runtime's
41
41
  swarm commits, docs).
42
42
 
43
43
  Two things happened on `main` after the PR was authored:
@@ -47,15 +47,14 @@ Two things happened on `main` after the PR was authored:
47
47
  `ensure_claude_bridge` writes only `enabledPlugins`, canonical id
48
48
  `agent-config@event4u`). agent-config no longer owns the `settings.json`
49
49
  hooks array, so it coexists with *any* neighbour tool's hooks generically —
50
- ruflo included. The original hook-collision motivation is solved without
51
- anything ruflo-specific.
52
- - **(B) A "ruflo adoption" decision was recorded** (cross-vendor council,
53
- claude-sonnet-4-5 + gpt-4o, 2026-05-06; see archived
54
- `road-to-ruflo-adoption` and [`docs/parity/ruflo.md`](../parity/ruflo.md)).
55
- Verdict: harvest only **portable** patterns from ruflo (ADR methodology,
56
- cost-tracker, HMAC signing) and **explicitly do not couple to ruflo's
50
+ the external runtime included. The original hook-collision motivation is solved without
51
+ anything external-runtime-specific.
52
+ - **(B) An "external-runtime adoption" decision was recorded** (cross-vendor council,
53
+ claude-sonnet-4-5 + gpt-4o, 2026-05-06; see an internal parity record (local-only)).
54
+ Verdict: harvest only **portable** patterns from the external runtime (ADR methodology,
55
+ cost-tracker, HMAC signing) and **explicitly do not couple to the external runtime's
57
56
  runtime / swarm / MCP tools** — wording used: "out of suite identity".
58
- Candidates requiring ruflo's runtime (`observe-trace`, `test-gaps`) were
57
+ Candidates requiring the external runtime (`observe-trace`, `test-gaps`) were
59
58
  dropped for that reason; an MCP/HTTP-bridge was only "deferred-with-trigger".
60
59
 
61
60
  PR #262's parts 2–4 are precisely the runtime coupling decision (B) rejected.
@@ -77,10 +76,10 @@ not a feature, smuggled in via an incremental PR.
77
76
 
78
77
  1. **agent-config does not bridge to, or drive, external tool runtimes.**
79
78
  It is a **content suite** (skills, rules, commands) for AI coding tools —
80
- not a runtime coordinator. It ships no `ruflo-orchestration`,
79
+ not a runtime coordinator. It ships no `external-runtime-orchestration`,
81
80
  `cursor-orchestration`, `aider-routing`, `windsurf-bridge`, or equivalent
82
81
  artifact that calls another tool's runtime / swarm / MCP surface. This is a
83
- **category** boundary, not a ruflo-specific one. Consistent with the
82
+ **category** boundary, not an external-runtime-specific one. Consistent with the
84
83
  "no app runtime" identity in
85
84
  [`package-self-orientation`](../contracts/package-self-orientation.md).
86
85
 
@@ -95,7 +94,7 @@ not a feature, smuggled in via an incremental PR.
95
94
  3. **Federation is a separate, explicit decision.** If agent-config should ever
96
95
  expand from skill-suite to a "federation platform" that orchestrates
97
96
  external orchestrators, that requires its **own** ADR answering, at minimum:
98
- (a) should the suite take on that identity; (b) the generic design (ruflo +
97
+ (a) should the suite take on that identity; (b) the generic design (an external runtime +
99
98
  Cursor + Copilot + Windsurf, not one vendor); (c) the maintenance model for
100
99
  N external bridges; (d) the trust contract — who validates an external
101
100
  runtime's output, and how agent-config's safety floors
@@ -112,9 +111,9 @@ not a feature, smuggled in via an incremental PR.
112
111
  neighbour tool's installation, version, or MCP-tool stability.
113
112
  - The maintenance surface does not grow by one bridge per orchestrator, and
114
113
  behaviour does not vary by which neighbours are installed.
115
- - Users who run both agent-config and ruflo (or any neighbour) get hook
114
+ - Users who run both agent-config and the external runtime (or any neighbour) get hook
116
115
  coexistence for free via plugin scope; they do not get agent-config-driven
117
- ruflo orchestration.
116
+ external-runtime orchestration.
118
117
  - Future "let's just add detection / a bridge for tool X" PRs have a recorded
119
118
  boundary to point at, preventing re-litigation. They are redirected to the
120
119
  generic, protocol-level, ADR-gated path in (2)–(3).
@@ -124,7 +123,7 @@ not a feature, smuggled in via an incremental PR.
124
123
  - **Finish & merge PR #262 as-is** — rejected: reintroduces the runtime
125
124
  coupling decision (B) dropped, across an unvalidated trust boundary, and
126
125
  enacts a strategic pivot without an explicit decision.
127
- - **Repurpose to the defensive sliver only** (`detect_ruflo` + dispatcher
126
+ - **Repurpose to the defensive sliver only** (`detect_external` + dispatcher
128
127
  skip-gate + a generalised neighbour-coexistence contract) — rejected as the
129
128
  default: the council found it wrong-layer (coordination belongs at the
130
129
  protocol layer, not in tool-specific detection code) and redundant given (A),
@@ -136,10 +135,10 @@ not a feature, smuggled in via an incremental PR.
136
135
 
137
136
  ## References
138
137
 
139
- - PR #262 — "feat: ruflo coexistence bridge" (closed as superseded, 2026-06-11).
140
- - [`docs/parity/ruflo.md`](../parity/ruflo.md) — ruflo parity verdict
138
+ - PR #262 — "feat: external-runtime coexistence bridge" (closed as superseded, 2026-06-11).
139
+ - An internal parity record (local-only) — external-runtime parity verdict
141
140
  (all patterns mechanism-covered; no runtime coupling).
142
- - Archived `road-to-ruflo-adoption` — the 2026-05-06 cross-vendor council
141
+ - An internal parity record (local-only) — the 2026-05-06 cross-vendor council
143
142
  decision: harvest portable patterns, "out of suite identity" for the runtime.
144
143
  - [`package-self-orientation`](../contracts/package-self-orientation.md) —
145
144
  "no app runtime" identity.
@@ -0,0 +1,95 @@
1
+ ---
2
+ adr: 090
3
+ status: accepted
4
+ date: 2026-06-13
5
+ decision: visibility-command-frontmatter-field
6
+ supersedes: —
7
+ superseded_by: —
8
+ phase: command-surface-refactor-residuals
9
+ type: structural
10
+ ---
11
+
12
+ # ADR-090 — First-class `visibility:` command-frontmatter field
13
+
14
+ ## Status
15
+
16
+ **Accepted** · 2026-06-13. Decided by AI council (anthropic/claude-sonnet-4-5
17
+ + openai/gpt-4o, peer-review, deep) — converged on **Option A** with execution
18
+ refinements. Council necessity-gate: borderline (3 necessary / 3 unnecessary);
19
+ proceeded on the standing reviewer ask plus design-intent evidence already in
20
+ the codebase (the `visibilityLabel(tier)` helper and the
21
+ `# Proxy until the 'visibility:' field lands` comment).
22
+
23
+ ## Context
24
+
25
+ A reviewer repeatedly asked for a real
26
+ `visibility: visible | advanced | internal` command-frontmatter field instead of
27
+ overloading the integer `tier:` (`0/1/2`) as the visibility proxy
28
+ (`docs/contracts/command-surface-tiers.md`). All 150 command sources under
29
+ `src/domains/<pack>/<verb>/command.md` carry `tier:`; no `visibility:` field
30
+ existed.
31
+
32
+ Design-intent evidence already in the tree:
33
+
34
+ - `src/cli/commands/commands.ts` has `visibilityLabel(tier) →
35
+ {0:'visible',1:'advanced',2:'internal'}` and a `--visible` filter on
36
+ `VISIBLE_TIERS={0,1}`. The consumer surface already speaks "visibility",
37
+ derived from the integer.
38
+ - `src/scripts/audit_command_surface.py` carries a standing comment:
39
+ `# Proxy until the 'visibility:' field lands (6.0.0-C Step 4b)`.
40
+
41
+ `tier:` was always a backend integer encoding; "visibility" is the correct
42
+ domain concept for a classification surface consumed by humans and LLM routers.
43
+ Keeping the integer as the contract source of truth is a reversed abstraction.
44
+
45
+ ## Decision
46
+
47
+ **Option A — `visibility:` becomes the classifier source of truth; `tier:`
48
+ stays as a derived, back-compat alias.**
49
+
50
+ 1. Add an optional `visibility:` enum (`visible | advanced | internal`) to the
51
+ command frontmatter schema. Keep `tier:` (`0/1/2`) in the schema as a
52
+ back-compat alias.
53
+ 2. Backfill `visibility:` on all 150 command sources, derived from the current
54
+ `tier:` mapping: `0 → visible`, `1 → advanced`, `2 → internal`. Scripted +
55
+ auditable (one diff, reviewable).
56
+ 3. Repoint every reader to **prefer `visibility:`, fall back to `tier:`**:
57
+ `commands.ts` (ls/explain), `audit_command_surface.py` (per-pack
58
+ visible-command budget), `build_discovery_manifest.py`.
59
+ 4. The discovery manifest is a **published data contract**. To avoid a silent
60
+ breaking change for external consumers that read the integer `tier` key, the
61
+ manifest **dual-emits** both `tier` and `visibility` during the deprecation
62
+ window.
63
+ 5. Validation is **backfill-first, then enforce**: once every command carries
64
+ `visibility:`, the existing tier lint (`lint_command_tiers.py`) is extended
65
+ to require `visibility:` present + a valid enum + consistent with `tier:`
66
+ when both are set. No new standalone script; the check rides the existing
67
+ lint that already runs in CI.
68
+
69
+ ### Rejected alternatives
70
+
71
+ - **Option B — hard rename `tier:` → `visibility:`, drop `tier:`.** Cleanest
72
+ end-state but largest blast radius and a hard break of the published manifest
73
+ contract with no migration window. Deferred; may follow once the deprecation
74
+ window closes.
75
+ - **Option C — keep `tier:` authoritative, add `visibility:` only as a
76
+ validate-when-present label (category-field precedent).** Lowest blast radius
77
+ but fails the phase acceptance criterion ("`visibility:` … is the classifier's
78
+ source of truth").
79
+
80
+ ## Consequences
81
+
82
+ - Two fields encode the same concept during the deprecation window → drift risk,
83
+ mitigated by the lint consistency check (when both present, they must agree)
84
+ and the scripted single-source backfill.
85
+ - External manifest consumers keep working (dual-emit); migration to read
86
+ `visibility` can proceed on their own schedule.
87
+ - A future ADR may drop `tier:` (Option B end-state) once readers and the
88
+ manifest have fully migrated; `tier:` removal is out of scope here.
89
+
90
+ ## References
91
+
92
+ - `agents/roadmaps/archive/road-to-command-surface-refactor-residuals.md` — Phase 1.
93
+ - `docs/contracts/command-surface-tiers.md` — tier contract this field supersedes
94
+ as the human-facing source of truth.
95
+ - ADR-048 — the `category:` validate-when-present precedent weighed against here.
@@ -0,0 +1,113 @@
1
+ ---
2
+ adr: 091
3
+ status: accepted
4
+ date: 2026-06-13
5
+ decision: split-meta-capability-packs
6
+ supersedes: —
7
+ superseded_by: —
8
+ phase: command-surface-refactor-residuals
9
+ type: structural
10
+ ---
11
+
12
+ # ADR-091 — Split the `meta` pack into capability-scoped packs (logical re-tag)
13
+
14
+ ## Status
15
+
16
+ **Accepted** · 2026-06-13. Decided by AI council (anthropic/claude-sonnet-4-5
17
+ + openai/gpt-4o, peer-review, deep) — converged on **logical re-tag, phased,
18
+ memory-first**, and flagged the `council`/`challenge-me`/`grill-me`
19
+ surface-map↔pack ontology mismatch as the real defect to fix.
20
+
21
+ ## Context
22
+
23
+ `meta` was one capability pack owning the artefacts that maintain the package
24
+ itself: **68 commands** (`pack: meta`) + **58 skills** (`packs: [meta]`),
25
+ `artefact_count: 263`, `size_class: core`, `always_on: true`, `domain: meta`.
26
+ A reviewer and the 6.1.0 roadmap (line 103) repeatedly asked to split it into
27
+ capability-scoped packs; it was punted twice.
28
+
29
+ Verified mechanism facts that shaped the decision:
30
+
31
+ - Pack-manifest membership is the frontmatter `packs:` axis
32
+ (`generate_pack_manifests.py::_collect_flat` → `pid in fm['packs']`); the
33
+ per-pack visible-command budget groups by the canonical `pack:` owner.
34
+ - Command **slugs are derived from the physical `src/domains/<pack>/<subpath>`
35
+ path**, independent of the `pack:`/`packs:` tags. A frontmatter re-tag
36
+ therefore changes ownership **without** changing any slug → no deprecation
37
+ aliases needed.
38
+ - The discovery resolver's `always_on` seeding is vocabulary-driven
39
+ (`config/packs.always_on_packs`), not hard-coded to the string `meta`.
40
+ - A **physical** re-parent hits real friction: an orchestrator-root command
41
+ (`/memory`, `/council`) lives at `src/domains/<pack>/<cluster>/command.md`
42
+ and cannot sit at a pack root (the activation gate rejects a bare
43
+ `src/domains/<pack>/command.md`), and `slug_prefix` only resolves for packs
44
+ homed under `src/domains/`. This is the hidden cost that stalled the split
45
+ twice.
46
+ - The council's stated "budget violation (8.5×)" premise is **false**: the
47
+ 68 are mostly tier-2 *internal* commands (uncapped); meta's *visible* count
48
+ is within its budget of 8 (`audit_command_surface.py --budget` → 0 over
49
+ budget). There is no CI-forcing function; the driver is capability clarity.
50
+
51
+ ## Decision
52
+
53
+ **Logical re-tag.** Carve three cohesive capabilities out of `meta` by
54
+ re-tagging command frontmatter (`pack:` + `packs:`) and adding the new pack
55
+ ids to `src/config/discovery/packs.yml`. Command files stay physically under
56
+ `src/domains/meta/<cluster>/` (no moves → no slug churn → no aliases); the new
57
+ packs are homed under `src/packs/<id>/` like the other capability packs.
58
+
59
+ New packs (all `workspaces: [agent-config-maintainer]`, `trust_level_default:
60
+ core`, `always_on: false` — opt-in capabilities surfaced to the maintainer
61
+ workspace):
62
+
63
+ | Pack | Clusters carved out | size_class |
64
+ |---|---|---|
65
+ | `memory` | `memory`, `chat-history` | small |
66
+ | `analytics` | `analytics`, `cost-report` | small |
67
+ | `product-reasoning` | `council`, `challenge-me`, `grill-me` | medium |
68
+
69
+ `meta` **stays** the `always_on` platform / agent-admin core pack (agents,
70
+ mode, profile, override, sync-*, optimize, skill(s), condense, context,
71
+ orchestrate, package-reset, set-cost-profile, upstream-contribute,
72
+ review-routing, rule-compliance-audit, agent-handoff, agent-status,
73
+ check-current-md) plus all 58 skills. `review-routing` +
74
+ `rule-compliance-audit` (governance, 2 commands) stay folded into `meta`
75
+ rather than a 2-command pack of their own.
76
+
77
+ The `knowledge` cluster is intentionally **not** part of `memory`: it is
78
+ already owned by `pack: product-discovery` (`src/domains/product-discovery/
79
+ knowledge/`), not `meta`, so it is out of this split's scope.
80
+
81
+ `product-reasoning` resolves the ontology bug: `council`/`challenge-me`/
82
+ `grill-me` are classified `product` in `src/flows/surface-map.yaml` but were
83
+ owned by `pack: meta`. They now have an owning capability pack.
84
+
85
+ ### Rejected / deferred
86
+
87
+ - **Physical re-parent** (moving command dirs under `src/domains/<newpack>/`):
88
+ deferred — the orchestrator-root + `slug_prefix` friction above makes it a
89
+ separate, careful change with deprecation-alias cost, and the logical re-tag
90
+ already satisfies the acceptance criterion. Recorded as a follow-up.
91
+ - **`governance` as its own pack**: rejected — 2 commands do not warrant a
92
+ budget unit; folded into `meta`.
93
+ - **Big-bang full split** in one pass: rejected per the council's phased
94
+ guidance; executed memory-first as the proof, then analytics +
95
+ product-reasoning in the same change once the pipeline was proven green.
96
+
97
+ ## Consequences
98
+
99
+ - The carved commands move from the `always_on` meta surface to opt-in
100
+ capability packs scoped to the `agent-config-maintainer` workspace; the
101
+ maintainer still resolves them via that workspace.
102
+ - `meta`'s `artefact_count` drops; three new `pack.yaml` manifests are
103
+ generated; the discovery manifest gains the new pack tags.
104
+ - Pack-dependency, budget, and marketplace lints stay green (verified).
105
+ - Physical co-location of the carved commands under their new pack homes
106
+ remains a future, alias-bearing change.
107
+
108
+ ## References
109
+
110
+ - `agents/roadmaps/archive/road-to-command-surface-refactor-residuals.md` — Phase 2.
111
+ - `docs/contracts/capability-packs.md` — pack ownership + budget model.
112
+ - `src/flows/surface-map.yaml` — the `product` classification reconciled here.
113
+ - ADR-057 — consolidation-evidence-gate outcomes (physical folding out of scope).
@@ -0,0 +1,93 @@
1
+ ---
2
+ adr: 092
3
+ status: accepted
4
+ date: 2026-06-13
5
+ decision: defer-command-tier-alias-removal
6
+ supersedes: —
7
+ superseded_by: —
8
+ phase: metadata-and-command-surface-leanness
9
+ type: structural
10
+ ---
11
+
12
+ # ADR-092 — Defer the command `tier:` alias removal (close ADR-090 Option B as deferred-with-forcing-function)
13
+
14
+ ## Status
15
+
16
+ **Accepted** · 2026-06-13. Decided by AI council (anthropic/claude-sonnet-4-5
17
+ + openai/gpt-4o, peer-review, deep) — converged on **defer**, with a
18
+ forcing-function refinement: a defer without a re-open mechanism is
19
+ abandonment in disguise.
20
+
21
+ ## Context
22
+
23
+ [ADR-090](ADR-090-visibility-command-frontmatter-field.md) made `visibility:`
24
+ the command-classifier source of truth and kept the integer `tier:` (`0/1/2`)
25
+ as a back-compat alias, **deferring** the alias removal ("Option B") "once
26
+ readers and the manifest have fully migrated". This ADR closes that deferred
27
+ question with the Phase-3 investigation evidence.
28
+
29
+ Investigation findings (`road-to-metadata-and-command-surface-leanness`, Phase 3):
30
+
31
+ - **Integer-`tier` readers are internal:** `src/cli/commands/commands.ts`
32
+ (fallback after `visibility`), `src/scripts/audit_command_surface.py`
33
+ (report column + budget fallback), `src/scripts/build_discovery_manifest.py`
34
+ (**dual-emits `tier`** into the manifest). `src/cli/python/workspace_hosts.py`
35
+ uses a semantically unrelated host-inventory tier.
36
+ - **The discovery manifest is a published npm artifact** — `package.json`
37
+ `files` + `build:discovery` in `prepack` + `prepublishOnly:
38
+ check_release_includes_discovery.py`. It dual-emits the integer `tier`.
39
+ **External npm consumers that read the integer key are unknown.**
40
+ - The defer rests on a **Runtime Risk that cannot be ruled out** (a consumer
41
+ may register/branch on the integer `tier`), not on evidence that such a
42
+ consumer exists. Maximal caution by default.
43
+
44
+ ## Decision
45
+
46
+ **Defer Option B.** Keep the `tier:` alias + the manifest dual-emit. Do not
47
+ remove `tier:` now: the published manifest's external consumers are unknown,
48
+ so the "unknown external consumers = hard stop" rule applies.
49
+
50
+ The defer is a **waypoint, not an end state** — it ships with a re-open
51
+ forcing function so it cannot calcify into permanent debt:
52
+
53
+ 1. **Re-open mechanism (one of):**
54
+ - **Versioned manifest** — publish `discovery-manifest` v2 *without* `tier`
55
+ alongside v1; v1 header carries `deprecated: true` + a `sunset` date;
56
+ after the soak window with no breakage reported, drop `tier`.
57
+ - **Evidence of zero external integer-`tier` reads** (manifest-fetch
58
+ telemetry / a documented "tier key deprecated" notice + soak).
59
+ 2. **Time-boxed review** — re-evaluate at the next minor-release planning (or
60
+ within 12 months, whichever is first), escalating to the maintainer with
61
+ pre-committed options (build the v2 mechanism · proceed · keep deferred).
62
+ 3. Execution of the removal itself is carried to
63
+ `road-to-tier-removal.md` (blocked on the mechanism above), not this ADR.
64
+
65
+ ### Rejected alternatives
66
+
67
+ - **Accept now — drop `tier:` immediately.** Breaks the published-manifest
68
+ contract for unknown consumers with no migration window. Hard stop.
69
+ - **Record the defer in the evidence note only, no ADR.** The re-open trigger
70
+ + escalation is *decision-level* content (who authorised the timeout, under
71
+ what gate it proceeds), not evidence — it belongs in a decision record. The
72
+ investigation evidence stays in
73
+ `agents/settings/contexts/tier-visibility-and-merge-evidence.md`.
74
+
75
+ ## Consequences
76
+
77
+ - The `tier:` ⇄ `visibility:` dual-field persists during the deferral;
78
+ drift is mitigated by the `lint_command_tiers.py` consistency check (when
79
+ both present, they must agree).
80
+ - The removal is **cheaply reversible** if ever executed: restoring the `tier`
81
+ field is a manifest schema patch (< 1h to publish), far below the rollback
82
+ cost of a runtime or DB change — but reversibility does not lift the
83
+ unknown-consumer hard stop.
84
+ - `road-to-tier-removal.md` institutionalises the trigger so the defer stays
85
+ visible in planning rather than becoming folklore.
86
+
87
+ ## References
88
+
89
+ - [ADR-090](ADR-090-visibility-command-frontmatter-field.md) — the deferred
90
+ Option B this ADR closes.
91
+ - `docs/contracts/command-surface-tiers.md` — tier/visibility contract.
92
+ - `agents/settings/contexts/tier-visibility-and-merge-evidence.md` —
93
+ consumer-investigation evidence.