@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
@@ -58,10 +58,13 @@ DOCS_DIR = REPO_ROOT / "docs"
58
58
  # Per-size-class VISIBLE-command budgets (docs/contracts/capability-packs.md;
59
59
  # enforced as a CI gate by 6.0.0-C Phase 1). `internal` commands are uncapped.
60
60
  SIZE_BUDGETS = {"core": 8, "small": 2, "medium": 5, "large": 8, "platform": 10}
61
- # Proxy until the `visibility:` field lands (6.0.0-C Step 4b): a command counts
62
- # toward the budget when its tier surfaces it (tier 0 daily-driver / tier 1
63
- # power-user). tier 2 (or absent defaults to 2) is internal/uncapped.
61
+ # ADR-090: `visibility:` is the named source of truth (visible / advanced /
62
+ # internal); the integer `tier:` is a back-compat alias. A command counts
63
+ # toward the per-pack budget when it is surfaced visibility in {visible,
64
+ # advanced} (or, when only the alias is present, tier in {0,1}). `internal`
65
+ # (or absent → defaults to internal) is uncapped.
64
66
  VISIBLE_TIERS = {0, 1}
67
+ VISIBLE_VISIBILITIES = {"visible", "advanced"}
65
68
 
66
69
  FRONTMATTER_RE = re.compile(r"^---\n(.*?)\n---", re.DOTALL)
67
70
  DESCRIPTION_RE = re.compile(r'^description:\s*"?(.*?)"?\s*$', re.MULTILINE)
@@ -69,6 +72,7 @@ ALIASES_RE = re.compile(r"^aliases:\s*(.*)$", re.MULTILINE)
69
72
  NAME_RE = re.compile(r"^name:\s*(.*)$", re.MULTILINE)
70
73
  CLUSTER_RE = re.compile(r"^cluster:\s*(.*)$", re.MULTILINE)
71
74
  TIER_RE = re.compile(r"^tier:\s*(\d+)", re.MULTILINE)
75
+ VISIBILITY_RE = re.compile(r"^visibility:\s*(visible|advanced|internal)", re.MULTILINE)
72
76
  PACK_RE = re.compile(r"^pack:\s*(.*)$", re.MULTILINE)
73
77
 
74
78
  STOPWORDS = {
@@ -96,6 +100,7 @@ class Command:
96
100
  description: str
97
101
  aliases: List[str] = field(default_factory=list)
98
102
  tier: int | None = None
103
+ visibility: str | None = None
99
104
  cluster: str = ""
100
105
  pack: str = ""
101
106
  line_count: int = 0
@@ -120,6 +125,8 @@ def parse_frontmatter(text: str) -> dict:
120
125
  out["cluster"] = c.group(1).strip().strip('"').strip("'")
121
126
  if t := TIER_RE.search(block):
122
127
  out["tier"] = int(t.group(1))
128
+ if v := VISIBILITY_RE.search(block):
129
+ out["visibility"] = v.group(1)
123
130
  if pk := PACK_RE.search(block):
124
131
  out["pack"] = pk.group(1).strip().strip('"').strip("'")
125
132
  if a := ALIASES_RE.search(block):
@@ -204,6 +211,7 @@ def collect(root: Path) -> List[Command]:
204
211
  description=fm.get("description", ""),
205
212
  aliases=fm.get("aliases", []),
206
213
  tier=fm.get("tier"),
214
+ visibility=fm.get("visibility"),
207
215
  cluster=fm.get("cluster", ""),
208
216
  pack=fm.get("pack", ""),
209
217
  line_count=len(text.splitlines()),
@@ -394,7 +402,10 @@ def citation_count(name: str) -> int:
394
402
 
395
403
 
396
404
  def _is_visible(c: Command) -> bool:
397
- # Absent tier defaults to 2 (internal) per command-surface-tiers.md.
405
+ # ADR-090: prefer the named visibility field; fall back to the tier alias.
406
+ # Absent both → internal per command-surface-tiers.md.
407
+ if c.visibility is not None:
408
+ return c.visibility in VISIBLE_VISIBILITIES
398
409
  return (c.tier if c.tier is not None else 2) in VISIBLE_TIERS
399
410
 
400
411
 
@@ -552,10 +563,12 @@ def grown_packs(baseline: str, commands: List[Command]) -> dict[str, list[str]]:
552
563
  cmd = by_relpath.get(relpath)
553
564
  if cmd is None or not cmd.pack:
554
565
  continue
555
- if not _is_visible_tier(cmd.tier):
566
+ if not _is_visible(cmd):
556
567
  continue # internal now — never counts toward a visible budget
557
568
  if relpath in modified and relpath not in added:
558
569
  # Modified file: only a *promotion* into visibility grows the surface.
570
+ # Baseline is historical (pre-ADR-090) so it carries only the tier
571
+ # alias — the tier proxy is the correct read for the old revision.
559
572
  if _is_visible_tier(_tier_at_ref(baseline, relpath)):
560
573
  continue # was already visible — not a new surface
561
574
  grew.setdefault(cmd.pack, []).append(cmd.name)
@@ -7,7 +7,7 @@ registry at `scripts/mcp_server/tools.py`, emits
7
7
  claim is banned.
8
8
 
9
9
  Contract: step-11 Phase 5 Step 3
10
- (agents/roadmaps/step-11-ruflo-parity.md).
10
+ (an internal parity roadmap (local-only)).
11
11
 
12
12
  Modes:
13
13
  --check exit non-zero if the generated inventory drifts from
@@ -73,7 +73,7 @@ def _render(catalog: dict, handlers: dict[str, int], cat_lines: dict[str, int])
73
73
  lines.append("> [`scripts/mcp_server/consumer_tool_catalog.json`](../../scripts/mcp_server/consumer_tool_catalog.json).")
74
74
  lines.append("> Do **not** hand-edit; rerun `python3 scripts/audit_mcp_tools.py --write`.")
75
75
  lines.append(">")
76
- lines.append("> Step-11 Phase 5 Step 3 (`step-11-ruflo-parity.md`).")
76
+ lines.append("> Step-11 Phase 5 Step 3 (an internal parity roadmap (local-only)).")
77
77
  lines.append("")
78
78
  lines.append("## Summary")
79
79
  lines.append("")
@@ -8,8 +8,8 @@ Flags descriptions that are:
8
8
  - containing hedge terms ("may help", "can be useful", "covers various", ...)
9
9
 
10
10
  Context:
11
- `archive/road-to-anthropic-alignment.md` Phase 2.2 — "pushy description" pattern from
12
- anthropics/skills/skills/skill-creator (roadmap archived 2026-04-21).
11
+ `archive/road-to-anthropic-alignment.md` Phase 2.2 — "pushy description" pattern
12
+ adapted from an external reference (roadmap archived 2026-04-21).
13
13
 
14
14
  Usage:
15
15
  python3 scripts/audit_skill_descriptions.py # human table
@@ -1,5 +1,5 @@
1
1
  #!/usr/bin/env python3
2
- """Materialise the `with` and `without` clones for the package-impact A/B bench.
2
+ """Materialise the `with`, `without`, and `with-rdp` clones for the value bench.
3
3
 
4
4
  Phase 1 Step 2 of `agents/roadmaps/road-to-package-impact-benchmark.md`.
5
5
 
@@ -55,7 +55,44 @@ def copytree_preserve(src: Path, dst: Path) -> None:
55
55
  """
56
56
  if dst.exists():
57
57
  shutil.rmtree(dst)
58
- shutil.copytree(src, dst, symlinks=False)
58
+ _patterns = shutil.ignore_patterns("worktrees", ".git", "clones", "node_modules")
59
+
60
+ def _ignore(directory: str, names: list[str]) -> set[str]:
61
+ # Exclude local dev / VCS artifacts (worktrees alone are ~740 MB and are
62
+ # NOT part of the agent-config surface a consumer receives) AND any broken
63
+ # symlink. The projected `.claude` surface can carry a stale symlink — e.g.
64
+ # a rule renamed in src/ but not yet re-projected — and `symlinks=False`
65
+ # would try to copy its missing target and crash. `os.path.exists` resolves
66
+ # each symlink from its own directory (unlike copytree's flaky
67
+ # `ignore_dangling_symlinks`, which checks the raw target against the CWD).
68
+ skip = set(_patterns(directory, names))
69
+ for name in names:
70
+ path = os.path.join(directory, name)
71
+ if os.path.islink(path) and not os.path.exists(path):
72
+ skip.add(name)
73
+ return skip
74
+
75
+ shutil.copytree(src, dst, symlinks=False, ignore=_ignore)
76
+
77
+
78
+ def write_clone_settings(variant: str, target: Path) -> None:
79
+ """Write a minimal `.agent-settings.yml` carrying the RDP toggle.
80
+
81
+ `with` pins `reasoning.enabled: false` (package without the RDP lift);
82
+ `with-rdp` sets `reasoning.enabled: true` (package + RDP lift). This is the
83
+ A/B/C lever for the 3-condition value benchmark — the RDP artifacts in the
84
+ copied surface are gated on this flag (see contexts/execution/rdp-gate.md),
85
+ so the diff between the two `with*` clones is exactly the lift under test.
86
+ """
87
+ enabled = "true" if variant == "with-rdp" else "false"
88
+ settings = (
89
+ "# Generated by bench_ab_clone.py for the A/B/C value benchmark.\n"
90
+ "# Only the RDP toggle is set here; everything else uses package defaults.\n"
91
+ "reasoning:\n"
92
+ f" enabled: {enabled}\n"
93
+ " auto_gate: true\n"
94
+ )
95
+ (target / ".agent-settings.yml").write_text(settings)
59
96
 
60
97
 
61
98
  def materialise_clone(variant: str, target: Path) -> None:
@@ -68,15 +105,15 @@ def materialise_clone(variant: str, target: Path) -> None:
68
105
  copytree_preserve(entry, dest)
69
106
  else:
70
107
  shutil.copy2(entry, dest)
71
- # Layer the agent-config surface onto the `with` variant
72
- if variant == "with":
108
+ # Layer the agent-config surface onto the `with` + `with-rdp` variants
109
+ if variant in ("with", "with-rdp"):
73
110
  for surface in WITH_SURFACES:
74
111
  src = REPO_ROOT / surface
75
112
  if not src.exists():
76
113
  # Best-effort: a missing surface is reported but does not fail
77
114
  sys.stderr.write(
78
115
  f"bench_ab_clone: surface '{surface}' missing in package root; "
79
- "with-clone may not be representative\n"
116
+ f"{variant}-clone may not be representative\n"
80
117
  )
81
118
  continue
82
119
  dest = target / surface
@@ -84,6 +121,10 @@ def materialise_clone(variant: str, target: Path) -> None:
84
121
  copytree_preserve(src, dest)
85
122
  else:
86
123
  shutil.copy2(src, dest)
124
+ # The RDP cost-gate reads `reasoning.enabled` from .agent-settings.yml,
125
+ # which is NOT in WITH_SURFACES. Write a minimal settings file so the
126
+ # toggle is the explicit A/B/C lever: `with` = RDP off, `with-rdp` = on.
127
+ write_clone_settings(variant, target)
87
128
 
88
129
 
89
130
  def target_shape_hash() -> str:
@@ -108,8 +149,9 @@ def write_manifest(variant: str, target: Path) -> None:
108
149
  """Drop a small manifest so other scripts can verify the clone shape."""
109
150
  manifest = {
110
151
  "variant": variant,
152
+ "reasoning_enabled": variant == "with-rdp",
111
153
  "target_shape_hash": target_shape_hash(),
112
- "with_surfaces": list(WITH_SURFACES),
154
+ "with_surfaces": list(WITH_SURFACES) if variant in ("with", "with-rdp") else [],
113
155
  "fixture_relpath": FIXTURE.relative_to(REPO_ROOT).as_posix(),
114
156
  }
115
157
  (target / ".bench-ab-manifest.json").write_text(
@@ -117,16 +159,18 @@ def write_manifest(variant: str, target: Path) -> None:
117
159
  )
118
160
 
119
161
 
120
- def clone(variant: str, *, refresh: bool) -> Path:
162
+ def clone(variant: str, *, refresh: bool, quiet: bool = False) -> Path:
121
163
  target = CLONES / variant
122
164
  if target.exists() and not refresh:
123
- sys.stdout.write(f"bench_ab_clone: {variant} clone already present at {target} (use --refresh to rebuild)\n")
165
+ if not quiet:
166
+ sys.stdout.write(f"bench_ab_clone: {variant} clone already present at {target} (use --refresh to rebuild)\n")
124
167
  return target
125
168
  if target.exists():
126
169
  shutil.rmtree(target)
127
170
  materialise_clone(variant, target)
128
171
  write_manifest(variant, target)
129
- sys.stdout.write(f"bench_ab_clone: built {variant} clone at {target}\n")
172
+ if not quiet:
173
+ sys.stdout.write(f"bench_ab_clone: built {variant} clone at {target}\n")
130
174
  return target
131
175
 
132
176
 
@@ -141,9 +185,10 @@ def parse_args(argv: list[str]) -> argparse.Namespace:
141
185
  )
142
186
  parser.add_argument(
143
187
  "--variant",
144
- choices=("with", "without", "both"),
188
+ choices=("with", "without", "with-rdp", "both", "all"),
145
189
  default="both",
146
- help="Which clone to materialise (default: both).",
190
+ help="Which clone(s): with | without | with-rdp | both (=with+without, "
191
+ "back-compat default) | all (=with+without+with-rdp, the 3-condition set).",
147
192
  )
148
193
  parser.add_argument(
149
194
  "--print-shape-hash",
@@ -160,7 +205,12 @@ def main(argv: list[str] | None = None) -> int:
160
205
  if args.print_shape_hash:
161
206
  sys.stdout.write(target_shape_hash() + "\n")
162
207
  return 0
163
- variants = ("with", "without") if args.variant == "both" else (args.variant,)
208
+ if args.variant == "both":
209
+ variants = ("with", "without")
210
+ elif args.variant == "all":
211
+ variants = ("with", "without", "with-rdp")
212
+ else:
213
+ variants = (args.variant,)
164
214
  for v in variants:
165
215
  clone(v, refresh=args.refresh)
166
216
  return 0