@event4u/agent-config 1.15.0 → 1.17.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 (354) hide show
  1. package/.agent-src/commands/{agents-audit.md → agents/audit.md} +4 -3
  2. package/.agent-src/commands/{agents-cleanup.md → agents/cleanup.md} +12 -6
  3. package/.agent-src/commands/{agents-prepare.md → agents/prepare.md} +4 -3
  4. package/.agent-src/commands/agents.md +46 -0
  5. package/.agent-src/commands/bug-fix.md +1 -1
  6. package/.agent-src/commands/bug-investigate.md +2 -2
  7. package/.agent-src/commands/{chat-history-checkpoint.md → chat-history/checkpoint.md} +5 -5
  8. package/.agent-src/commands/{chat-history-clear.md → chat-history/clear.md} +5 -5
  9. package/.agent-src/commands/{chat-history-resume.md → chat-history/resume.md} +4 -4
  10. package/.agent-src/commands/chat-history/show.md +107 -0
  11. package/.agent-src/commands/chat-history.md +33 -89
  12. package/.agent-src/commands/check-current-md.md +1 -1
  13. package/.agent-src/commands/{commit-in-chunks.md → commit/in-chunks.md} +15 -13
  14. package/.agent-src/commands/commit.md +22 -2
  15. package/.agent-src/commands/{context-create.md → context/create.md} +4 -3
  16. package/.agent-src/commands/{context-refactor.md → context/refactor.md} +4 -3
  17. package/.agent-src/commands/context.md +44 -0
  18. package/.agent-src/commands/{copilot-agents-init.md → copilot-agents/init.md} +4 -3
  19. package/.agent-src/commands/{copilot-agents-optimize.md → copilot-agents/optimize.md} +4 -3
  20. package/.agent-src/commands/copilot-agents.md +44 -0
  21. package/.agent-src/commands/council/default.md +221 -0
  22. package/.agent-src/commands/council/design.md +97 -0
  23. package/.agent-src/commands/council/optimize.md +116 -0
  24. package/.agent-src/commands/council/pr.md +124 -0
  25. package/.agent-src/commands/council.md +54 -0
  26. package/.agent-src/commands/{create-pr-description.md → create-pr/description-only.md} +4 -2
  27. package/.agent-src/commands/create-pr.md +49 -5
  28. package/.agent-src/commands/e2e-heal.md +1 -1
  29. package/.agent-src/commands/e2e-plan.md +1 -1
  30. package/.agent-src/commands/{feature-dev.md → feature/dev.md} +6 -3
  31. package/.agent-src/commands/{feature-explore.md → feature/explore.md} +5 -4
  32. package/.agent-src/commands/{feature-plan.md → feature/plan.md} +32 -5
  33. package/.agent-src/commands/{feature-refactor.md → feature/refactor.md} +4 -3
  34. package/.agent-src/commands/{feature-roadmap.md → feature/roadmap.md} +7 -6
  35. package/.agent-src/commands/feature.md +52 -0
  36. package/.agent-src/commands/{fix-ci.md → fix/ci.md} +4 -3
  37. package/.agent-src/commands/{fix-portability.md → fix/portability.md} +4 -3
  38. package/.agent-src/commands/{fix-pr-bot-comments.md → fix/pr-bots.md} +4 -3
  39. package/.agent-src/commands/{fix-pr-developer-comments.md → fix/pr-developers.md} +4 -3
  40. package/.agent-src/commands/{fix-pr-comments.md → fix/pr.md} +7 -6
  41. package/.agent-src/commands/{fix-references.md → fix/refs.md} +4 -3
  42. package/.agent-src/commands/{fix-seeder.md → fix/seeder.md} +4 -3
  43. package/.agent-src/commands/fix.md +54 -0
  44. package/.agent-src/commands/jira-ticket.md +1 -1
  45. package/.agent-src/commands/{do-and-judge.md → judge/on-diff.md} +7 -6
  46. package/.agent-src/commands/judge/solo.md +90 -0
  47. package/.agent-src/commands/{do-in-steps.md → judge/steps.md} +8 -7
  48. package/.agent-src/commands/judge.md +35 -70
  49. package/.agent-src/commands/{memory-add.md → memory/add.md} +7 -6
  50. package/.agent-src/commands/{memory-full.md → memory/load.md} +6 -5
  51. package/.agent-src/commands/{memory-promote.md → memory/promote.md} +6 -5
  52. package/.agent-src/commands/{propose-memory.md → memory/propose.md} +6 -5
  53. package/.agent-src/commands/memory.md +48 -0
  54. package/.agent-src/commands/mode.md +5 -5
  55. package/.agent-src/commands/{module-create.md → module/create.md} +4 -3
  56. package/.agent-src/commands/{module-explore.md → module/explore.md} +4 -3
  57. package/.agent-src/commands/module.md +44 -0
  58. package/.agent-src/commands/onboard.md +3 -3
  59. package/.agent-src/commands/{optimize-agents.md → optimize/agents.md} +5 -4
  60. package/.agent-src/commands/{optimize-augmentignore.md → optimize/augmentignore.md} +4 -4
  61. package/.agent-src/commands/{optimize-rtk-filters.md → optimize/rtk.md} +4 -3
  62. package/.agent-src/commands/{optimize-skills.md → optimize/skills.md} +5 -4
  63. package/.agent-src/commands/optimize.md +48 -0
  64. package/.agent-src/commands/{override-create.md → override/create.md} +4 -3
  65. package/.agent-src/commands/{override-manage.md → override/manage.md} +4 -3
  66. package/.agent-src/commands/override.md +44 -0
  67. package/.agent-src/commands/review-changes.md +26 -1
  68. package/.agent-src/commands/review-routing.md +1 -1
  69. package/.agent-src/commands/{roadmap-create.md → roadmap/create.md} +33 -5
  70. package/.agent-src/commands/{roadmap-execute.md → roadmap/execute.md} +4 -3
  71. package/.agent-src/commands/roadmap.md +44 -0
  72. package/.agent-src/commands/set-cost-profile.md +3 -3
  73. package/.agent-src/commands/sync-agent-settings.md +2 -2
  74. package/.agent-src/commands/{tests-create.md → tests/create.md} +5 -4
  75. package/.agent-src/commands/{tests-execute.md → tests/execute.md} +4 -3
  76. package/.agent-src/commands/tests.md +44 -0
  77. package/.agent-src/commands/upstream-contribute.md +1 -1
  78. package/.agent-src/contexts/authority/commit-mechanics.md +57 -0
  79. package/.agent-src/contexts/authority/destructive-mechanics.md +66 -0
  80. package/.agent-src/contexts/authority/scope-mechanics.md +87 -0
  81. package/.agent-src/contexts/communication/rules-auto/artifact-engagement-recording-mechanics.md +72 -0
  82. package/.agent-src/contexts/communication/rules-auto/augment-portability-mechanics.md +79 -0
  83. package/.agent-src/contexts/communication/rules-auto/augment-source-of-truth-mechanics.md +98 -0
  84. package/.agent-src/contexts/communication/rules-auto/cli-output-handling-mechanics.md +87 -0
  85. package/.agent-src/contexts/communication/rules-auto/command-suggestion-policy-mechanics.md +62 -0
  86. package/.agent-src/contexts/communication/rules-auto/docs-sync-mechanics.md +78 -0
  87. package/.agent-src/contexts/communication/rules-auto/package-ci-checks-mechanics.md +85 -0
  88. package/.agent-src/contexts/communication/rules-auto/review-routing-awareness-mechanics.md +65 -0
  89. package/.agent-src/contexts/communication/rules-auto/roadmap-progress-sync-mechanics.md +78 -0
  90. package/.agent-src/contexts/communication/rules-auto/skill-quality-mechanics.md +62 -0
  91. package/.agent-src/contexts/communication/rules-auto/slash-command-routing-policy-mechanics.md +55 -0
  92. package/.agent-src/contexts/communication/rules-auto/ui-audit-gate-mechanics.md +53 -0
  93. package/.agent-src/contexts/communication/rules-auto/user-interaction-mechanics.md +77 -0
  94. package/.agent-src/contexts/execution/autonomy-detection.md +54 -0
  95. package/.agent-src/contexts/execution/autonomy-examples.md +90 -0
  96. package/.agent-src/contexts/execution/autonomy-mechanics.md +29 -0
  97. package/.agent-src/contexts/execution/verification-mechanics.md +80 -0
  98. package/.agent-src/contexts/judges/no-consolidate-rationale.md +102 -0
  99. package/.agent-src/contexts/judges/persona-voice-rubric.md +140 -0
  100. package/.agent-src/personas/README.md +1 -1
  101. package/.agent-src/rules/agent-authority.md +24 -0
  102. package/.agent-src/rules/architecture.md +1 -1
  103. package/.agent-src/rules/artifact-drafting-protocol.md +1 -1
  104. package/.agent-src/rules/artifact-engagement-recording.md +14 -70
  105. package/.agent-src/rules/ask-when-uncertain.md +28 -43
  106. package/.agent-src/rules/augment-portability.md +15 -61
  107. package/.agent-src/rules/augment-source-of-truth.md +27 -93
  108. package/.agent-src/rules/autonomous-execution.md +78 -114
  109. package/.agent-src/rules/capture-learnings.md +1 -1
  110. package/.agent-src/rules/chat-history-cadence.md +3 -3
  111. package/.agent-src/rules/chat-history-ownership.md +3 -3
  112. package/.agent-src/rules/chat-history-visibility.md +3 -3
  113. package/.agent-src/rules/cli-output-handling.md +10 -76
  114. package/.agent-src/rules/command-suggestion-policy.md +93 -0
  115. package/.agent-src/rules/commit-conventions.md +17 -14
  116. package/.agent-src/rules/commit-policy.md +14 -42
  117. package/.agent-src/rules/context-hygiene.md +3 -3
  118. package/.agent-src/rules/direct-answers.md +34 -49
  119. package/.agent-src/rules/docker-commands.md +5 -5
  120. package/.agent-src/rules/docs-sync.md +16 -70
  121. package/.agent-src/rules/e2e-testing.md +1 -1
  122. package/.agent-src/rules/guidelines.md +4 -4
  123. package/.agent-src/rules/improve-before-implement.md +2 -2
  124. package/.agent-src/rules/language-and-tone.md +50 -133
  125. package/.agent-src/rules/minimal-safe-diff.md +3 -3
  126. package/.agent-src/rules/missing-tool-handling.md +28 -22
  127. package/.agent-src/rules/model-recommendation.md +4 -4
  128. package/.agent-src/rules/no-cheap-questions.md +82 -0
  129. package/.agent-src/rules/no-roadmap-references.md +73 -0
  130. package/.agent-src/rules/non-destructive-by-default.md +15 -49
  131. package/.agent-src/rules/onboarding-gate.md +5 -5
  132. package/.agent-src/rules/package-ci-checks.md +21 -61
  133. package/.agent-src/rules/preservation-guard.md +64 -29
  134. package/.agent-src/rules/review-routing-awareness.md +26 -45
  135. package/.agent-src/rules/roadmap-progress-sync.md +28 -96
  136. package/.agent-src/rules/role-mode-adherence.md +2 -2
  137. package/.agent-src/rules/scope-control.md +65 -46
  138. package/.agent-src/rules/security-sensitive-stop.md +9 -9
  139. package/.agent-src/rules/size-enforcement.md +1 -1
  140. package/.agent-src/rules/skill-quality.md +16 -48
  141. package/.agent-src/rules/{slash-commands.md → slash-command-routing-policy.md} +7 -4
  142. package/.agent-src/rules/think-before-action.md +55 -45
  143. package/.agent-src/rules/token-efficiency.md +4 -4
  144. package/.agent-src/rules/tool-safety.md +19 -16
  145. package/.agent-src/rules/{ui-audit-before-build.md → ui-audit-gate.md} +27 -41
  146. package/.agent-src/rules/user-interaction.md +16 -71
  147. package/.agent-src/rules/verify-before-complete.md +12 -67
  148. package/.agent-src/scripts/update_roadmap_progress.py +9 -4
  149. package/.agent-src/skills/ai-council/SKILL.md +335 -0
  150. package/.agent-src/skills/api-endpoint/SKILL.md +2 -2
  151. package/.agent-src/skills/api-testing/SKILL.md +1 -1
  152. package/.agent-src/skills/blade-ui/SKILL.md +1 -1
  153. package/.agent-src/skills/blast-radius-analyzer/SKILL.md +1 -1
  154. package/.agent-src/skills/bug-analyzer/SKILL.md +1 -1
  155. package/.agent-src/skills/check-refs/SKILL.md +59 -40
  156. package/.agent-src/skills/command-routing/SKILL.md +1 -1
  157. package/.agent-src/skills/command-writing/SKILL.md +1 -1
  158. package/.agent-src/skills/conventional-commits-writing/SKILL.md +86 -28
  159. package/.agent-src/skills/copilot-agents-optimization/SKILL.md +7 -7
  160. package/.agent-src/skills/developer-like-execution/SKILL.md +6 -6
  161. package/.agent-src/skills/finishing-a-development-branch/SKILL.md +101 -65
  162. package/.agent-src/skills/flux/SKILL.md +31 -11
  163. package/.agent-src/skills/git-workflow/SKILL.md +1 -1
  164. package/.agent-src/skills/github-ci/SKILL.md +2 -2
  165. package/.agent-src/skills/guideline-writing/SKILL.md +11 -11
  166. package/.agent-src/skills/judge-code-quality/SKILL.md +7 -8
  167. package/.agent-src/skills/judge-security-auditor/SKILL.md +4 -5
  168. package/.agent-src/skills/judge-test-coverage/SKILL.md +3 -4
  169. package/.agent-src/skills/learning-to-rule-or-skill/SKILL.md +4 -4
  170. package/.agent-src/skills/lint-skills/SKILL.md +57 -39
  171. package/.agent-src/skills/livewire/SKILL.md +1 -1
  172. package/.agent-src/skills/md-language-check/SKILL.md +61 -39
  173. package/.agent-src/skills/override-management/SKILL.md +7 -7
  174. package/.agent-src/skills/php-coder/SKILL.md +1 -1
  175. package/.agent-src/skills/playwright-testing/SKILL.md +2 -2
  176. package/.agent-src/skills/quality-tools/SKILL.md +2 -2
  177. package/.agent-src/skills/react-shadcn-ui/SKILL.md +116 -43
  178. package/.agent-src/skills/readme-reviewer/SKILL.md +31 -30
  179. package/.agent-src/skills/readme-writing/SKILL.md +79 -54
  180. package/.agent-src/skills/readme-writing-package/SKILL.md +51 -48
  181. package/.agent-src/skills/receiving-code-review/SKILL.md +53 -48
  182. package/.agent-src/skills/refine-prompt/SKILL.md +0 -1
  183. package/.agent-src/skills/requesting-code-review/SKILL.md +35 -30
  184. package/.agent-src/skills/review-routing/SKILL.md +2 -2
  185. package/.agent-src/skills/rule-writing/SKILL.md +1 -1
  186. package/.agent-src/skills/security/SKILL.md +7 -2
  187. package/.agent-src/skills/security-audit/SKILL.md +7 -3
  188. package/.agent-src/skills/skill-reviewer/SKILL.md +1 -1
  189. package/.agent-src/skills/skill-writing/SKILL.md +3 -3
  190. package/.agent-src/skills/subagent-orchestration/SKILL.md +1 -0
  191. package/.agent-src/skills/systematic-debugging/SKILL.md +69 -61
  192. package/.agent-src/skills/test-driven-development/SKILL.md +59 -57
  193. package/.agent-src/skills/test-performance/SKILL.md +0 -1
  194. package/.agent-src/skills/traefik/SKILL.md +4 -4
  195. package/.agent-src/skills/upstream-contribute/SKILL.md +1 -1
  196. package/.agent-src/skills/validate-feature-fit/SKILL.md +2 -2
  197. package/.agent-src/skills/{verify-before-complete → verify-completion-evidence}/SKILL.md +30 -28
  198. package/.agent-src/templates/agent-settings.md +8 -8
  199. package/.agent-src/templates/contexts/auth-model.md +1 -1
  200. package/.agent-src/templates/scripts/README.md +2 -2
  201. package/.agent-src/templates/scripts/telemetry/aggregator.py +16 -1
  202. package/.agent-src/templates/scripts/telemetry/engagement.py +59 -0
  203. package/.agent-src/templates/scripts/telemetry/report_renderer.py +28 -1
  204. package/.agent-src/templates/scripts/telemetry_record.py +14 -1
  205. package/.claude-plugin/marketplace.json +31 -12
  206. package/AGENTS.md +11 -9
  207. package/CHANGELOG.md +213 -2
  208. package/README.md +43 -44
  209. package/config/agent-settings.template.yml +58 -1
  210. package/config/gitignore-block.txt +3 -0
  211. package/docs/architecture.md +5 -7
  212. package/docs/catalog.md +359 -0
  213. package/docs/contracts/STABILITY.md +46 -1
  214. package/docs/contracts/adr-chat-history-split.md +1 -3
  215. package/docs/contracts/adr-command-suggestion.md +3 -5
  216. package/docs/contracts/adr-implement-ticket-runtime.md +1 -2
  217. package/docs/contracts/adr-product-ui-track.md +5 -8
  218. package/docs/contracts/adr-prompt-driven-execution.md +3 -4
  219. package/docs/contracts/agent-memory-contract.md +8 -13
  220. package/docs/contracts/artifact-engagement-flow.md +7 -10
  221. package/docs/contracts/command-clusters.md +56 -46
  222. package/docs/contracts/command-suggestion-flow.md +4 -6
  223. package/docs/contracts/context-paths.md +99 -0
  224. package/docs/contracts/file-ownership-matrix.json +6722 -0
  225. package/docs/contracts/file-ownership-matrix.md +134 -0
  226. package/docs/contracts/implement-ticket-flow.md +8 -11
  227. package/docs/contracts/linear-ai-rules-inclusion.md +1 -2
  228. package/docs/contracts/linear-ai-three-layers.md +0 -2
  229. package/docs/contracts/load-context-budget-model.md +178 -0
  230. package/docs/contracts/load-context-schema.md +184 -0
  231. package/docs/contracts/rule-interactions.md +0 -1
  232. package/docs/contracts/rule-interactions.yml +96 -0
  233. package/docs/contracts/rule-priority-hierarchy.md +87 -0
  234. package/docs/contracts/ui-track-flow.md +8 -18
  235. package/docs/customization.md +16 -0
  236. package/docs/end-to-end-walkthroughs.md +165 -0
  237. package/docs/getting-started.md +29 -10
  238. package/docs/github-topics.md +12 -3
  239. package/docs/guidelines/agent-infra/asking-and-brevity-examples.md +100 -0
  240. package/docs/guidelines/agent-infra/language-and-tone-examples.md +79 -0
  241. package/{.agent-src → docs}/guidelines/docs/readme-size-and-splitting.md +26 -25
  242. package/docs/guidelines/php/git.md +164 -0
  243. package/docs/migrations/commands-1.15.0.md +1 -1
  244. package/docs/showcase.md +9 -4
  245. package/docs/skills-catalog.md +14 -8
  246. package/docs/ui-track-mental-model.md +2 -2
  247. package/llms.txt +13 -7
  248. package/package.json +1 -1
  249. package/scripts/_one_off_phase4_dispatch_latency.py +108 -0
  250. package/scripts/_one_off_phase6_trigger_jaccard.py +92 -0
  251. package/scripts/_phase2_shim_helper.py +109 -0
  252. package/scripts/agent-config +33 -0
  253. package/scripts/ai_council/__init__.py +39 -0
  254. package/scripts/ai_council/_default_prices.py +41 -0
  255. package/scripts/ai_council/_one_off_2a4_acceptance.py +208 -0
  256. package/scripts/ai_council/_one_off_context_layer_v1_estimate.py +67 -0
  257. package/scripts/ai_council/_one_off_context_layer_v1_review.py +292 -0
  258. package/scripts/ai_council/_one_off_followups_review.py +259 -0
  259. package/scripts/ai_council/_one_off_nondestructive_inline_audit.py +209 -0
  260. package/scripts/ai_council/_one_off_phase_2a_budget_rebalance.py +257 -0
  261. package/scripts/ai_council/_one_off_phase_2a_post_revert.py +197 -0
  262. package/scripts/ai_council/_one_off_rebalancing_audit.py +149 -0
  263. package/scripts/ai_council/_one_off_roundtrip.py +106 -0
  264. package/scripts/ai_council/_one_off_rule_hardening_v1.py +251 -0
  265. package/scripts/ai_council/_one_off_structural_open_questions.py +232 -0
  266. package/scripts/ai_council/_one_off_structural_optimization.py +144 -0
  267. package/scripts/ai_council/_one_off_structural_v3_gaps.py +252 -0
  268. package/scripts/ai_council/_one_off_structural_v3_review.py +240 -0
  269. package/scripts/ai_council/budget_guard.py +172 -0
  270. package/scripts/ai_council/bundler.py +261 -0
  271. package/scripts/ai_council/clients.py +381 -0
  272. package/scripts/ai_council/modes.py +127 -0
  273. package/scripts/ai_council/orchestrator.py +350 -0
  274. package/scripts/ai_council/pricing.py +213 -0
  275. package/scripts/ai_council/project_context.py +159 -0
  276. package/scripts/ai_council/prompts.py +232 -0
  277. package/scripts/ai_council/session.py +144 -0
  278. package/scripts/check_always_budget.py +444 -0
  279. package/scripts/check_augmentignore.py +69 -0
  280. package/scripts/check_cluster_patterns.py +159 -0
  281. package/scripts/check_command_count_messaging.py +127 -0
  282. package/scripts/check_context_paths.py +201 -0
  283. package/scripts/check_no_roadmap_refs.py +155 -0
  284. package/scripts/check_phase_coupling.py +148 -0
  285. package/scripts/check_portability.py +57 -0
  286. package/scripts/check_public_catalog_links.py +122 -0
  287. package/scripts/check_references.py +33 -3
  288. package/scripts/check_roadmap_trackable.py +111 -0
  289. package/scripts/check_safety_floor_untouched.py +125 -0
  290. package/scripts/command_suggester/cooldown.py +1 -1
  291. package/scripts/command_suggester/loader.py +4 -1
  292. package/scripts/compress.py +59 -13
  293. package/scripts/generate_index.py +270 -0
  294. package/scripts/generate_ownership_matrix.py +323 -0
  295. package/scripts/hooks/augment-roadmap-progress.sh +57 -0
  296. package/scripts/install.py +49 -28
  297. package/scripts/install_anthropic_key.sh +5 -0
  298. package/scripts/install_openai_key.sh +106 -0
  299. package/scripts/lint_load_context.py +163 -0
  300. package/scripts/lint_no_new_atomic_commands.py +12 -11
  301. package/scripts/requirements-evals.txt +1 -0
  302. package/scripts/roadmap_progress_hook.py +159 -0
  303. package/scripts/schemas/command.schema.json +22 -1
  304. package/scripts/schemas/rule.schema.json +10 -0
  305. package/scripts/skill_linter.py +13 -4
  306. package/scripts/sync_agent_settings.py +26 -3
  307. package/scripts/update_counts.py +16 -4
  308. package/scripts/update_prices.py +124 -0
  309. package/.agent-src/guidelines/php/git.md +0 -96
  310. package/.agent-src/rules/command-suggestion.md +0 -134
  311. /package/{.agent-src → docs}/guidelines/agent-infra/agent-interaction-and-decision-quality.md +0 -0
  312. /package/{.agent-src → docs}/guidelines/agent-infra/break-glass-usage.md +0 -0
  313. /package/{.agent-src → docs}/guidelines/agent-infra/developer-judgment.md +0 -0
  314. /package/{.agent-src → docs}/guidelines/agent-infra/engineering-memory-data-format.md +0 -0
  315. /package/{.agent-src → docs}/guidelines/agent-infra/layered-settings.md +0 -0
  316. /package/{.agent-src → docs}/guidelines/agent-infra/memory-access.md +0 -0
  317. /package/{.agent-src → docs}/guidelines/agent-infra/naming.md +0 -0
  318. /package/{.agent-src → docs}/guidelines/agent-infra/output-patterns.md +0 -0
  319. /package/{.agent-src → docs}/guidelines/agent-infra/review-routing-data-format.md +0 -0
  320. /package/{.agent-src → docs}/guidelines/agent-infra/role-contracts.md +0 -0
  321. /package/{.agent-src → docs}/guidelines/agent-infra/role-mode-router.md +0 -0
  322. /package/{.agent-src → docs}/guidelines/agent-infra/runtime-layer.md +0 -0
  323. /package/{.agent-src → docs}/guidelines/agent-infra/self-improvement-pipeline.md +0 -0
  324. /package/{.agent-src → docs}/guidelines/agent-infra/size-and-scope.md +0 -0
  325. /package/{.agent-src → docs}/guidelines/agent-infra/tool-integration.md +0 -0
  326. /package/{.agent-src → docs}/guidelines/e2e/playwright.md +0 -0
  327. /package/{.agent-src → docs}/guidelines/php/api-design.md +0 -0
  328. /package/{.agent-src → docs}/guidelines/php/artisan-commands.md +0 -0
  329. /package/{.agent-src → docs}/guidelines/php/blade-ui.md +0 -0
  330. /package/{.agent-src → docs}/guidelines/php/controllers.md +0 -0
  331. /package/{.agent-src → docs}/guidelines/php/database.md +0 -0
  332. /package/{.agent-src → docs}/guidelines/php/eloquent.md +0 -0
  333. /package/{.agent-src → docs}/guidelines/php/flux.md +0 -0
  334. /package/{.agent-src → docs}/guidelines/php/general.md +0 -0
  335. /package/{.agent-src → docs}/guidelines/php/jobs.md +0 -0
  336. /package/{.agent-src → docs}/guidelines/php/livewire.md +0 -0
  337. /package/{.agent-src → docs}/guidelines/php/logging.md +0 -0
  338. /package/{.agent-src → docs}/guidelines/php/naming.md +0 -0
  339. /package/{.agent-src → docs}/guidelines/php/patterns/dependency-injection.md +0 -0
  340. /package/{.agent-src → docs}/guidelines/php/patterns/dtos.md +0 -0
  341. /package/{.agent-src → docs}/guidelines/php/patterns/events.md +0 -0
  342. /package/{.agent-src → docs}/guidelines/php/patterns/factory.md +0 -0
  343. /package/{.agent-src → docs}/guidelines/php/patterns/pipelines.md +0 -0
  344. /package/{.agent-src → docs}/guidelines/php/patterns/policies.md +0 -0
  345. /package/{.agent-src → docs}/guidelines/php/patterns/repositories.md +0 -0
  346. /package/{.agent-src → docs}/guidelines/php/patterns/service-layer.md +0 -0
  347. /package/{.agent-src → docs}/guidelines/php/patterns/strategy.md +0 -0
  348. /package/{.agent-src → docs}/guidelines/php/patterns.md +0 -0
  349. /package/{.agent-src → docs}/guidelines/php/performance.md +0 -0
  350. /package/{.agent-src → docs}/guidelines/php/resources.md +0 -0
  351. /package/{.agent-src → docs}/guidelines/php/security.md +0 -0
  352. /package/{.agent-src → docs}/guidelines/php/sql.md +0 -0
  353. /package/{.agent-src → docs}/guidelines/php/validations.md +0 -0
  354. /package/{.agent-src → docs}/guidelines/php/websocket.md +0 -0
package/llms.txt CHANGED
@@ -16,7 +16,7 @@ api-testing: Use when writing API endpoint tests — integration tests, contract
16
16
  artisan-commands: Use when creating or modifying Artisan commands. Covers clear signatures, safe execution flow, helpful output, and project conventions for console tooling.
17
17
  authz-review: Use when reviewing authorization end-to-end — route → gate → policy → query scope → response filter — before changes to permissions, tenants, ownership, or admin flows.
18
18
  aws-infrastructure: Use when working with AWS resources — ECS Fargate, ECR, EFS, Secrets Manager, gomplate templates, multi-env deployments — even when the user says 'deploy to staging' without naming AWS.
19
- blade-ui: Use when creating or editing Blade views, components, partials, layouts, or view logic even when the user says 'add a new page' or 'render this data' without naming Blade.
19
+ blade-ui: Stack-implementation skill for Laravel Blade dispatched by `directives/ui/apply.py` (and `review.py` / `polish.py`) when the project's frontend stack is Blade. Covers views, components, partials, layouts, and view logic.
20
20
  blast-radius-analyzer: Use BEFORE editing shared code — enumerates every call site, event consumer, queue worker, API client, migration, and test that a planned change will touch, with a file:line citation per dependency.
21
21
  bug-analyzer: Use when the user shares a Sentry error, Jira bug ticket, or error description and wants root cause analysis. Also for proactive bug hunting and code audits for hidden bugs.
22
22
  check-refs: Use when verifying cross-references between skills, rules, commands, guidelines, and context documents are not broken after edits, renames, or deletions.
@@ -41,15 +41,17 @@ developer-like-execution: Use when implementing, debugging, refactoring, or revi
41
41
  docker: Use when working with Docker — Dockerfile edits, docker-compose services, containers, or the dual-container (fast + Xdebug) setup — even when the user just says 'my container won't start'.
42
42
  dto-creator: Use when the user says "create a DTO", "new data transfer object", or needs to convert request/response data into a typed PHP class. Creates DTOs with SimpleDto base class and attribute mapping.
43
43
  eloquent: Use when writing Eloquent models, relationships, scopes, or queries via Model:: — 'fetch users with their orders'. NOT for PHPStan output, non-Eloquent services, or raw SQL questions.
44
- fe-design: Use when designing frontend interfaces component architecture, layout patterns, form design, table patterns, responsive strategies, and UX principles for Blade/Livewire/Flux/Tailwind.
44
+ "estimate-ticket": Estimate a Jira/Linear ticket'estimate PROJ-123', 'wie groß ist das?', 'should we split this?' size + risk + split + uncertainty, sibling of /refine-ticket, close-prompt.
45
+ existing-ui-audit: Use BEFORE writing or editing any non-trivial UI — inventories components, design tokens, shadcn primitives, and reusable patterns into state.ui_audit. Hard gate for the ui directive set.
46
+ fe-design: Reference for frontend-design heuristics — component architecture, layout patterns, form/table design, responsive strategy, a11y, UX principles. Stack-agnostic; cited by directives/ui/design.py.
45
47
  feature-planning: Use when the user says "plan a feature", "brainstorm", "explore this idea", or wants to go from idea to structured plan and roadmap.
46
48
  file-editor: Use when opening edited files in the user's IDE. Reads settings from .agent-settings.yml to determine IDE and whether auto-open is enabled.
47
49
  finishing-a-development-branch: Use when the feature is implementation-complete and the next step is 'ship it' — verifies, cleans up, and routes to merge/PR/park/discard — even when the user just says 'I'm done, what now?'.
48
- flux: Use when writing Laravel Flux UI components the official Livewire component library by the Laravel team. Covers components, slots, and variants.
50
+ flux: Stack-implementation skill for Laravel Flux dispatched by `directives/ui/apply.py` (and `review.py` / `polish.py`) when the project uses `livewire/flux`. Covers Flux components, slots, variants, and form primitives.
49
51
  git-workflow: Use when working with Git — branch naming, commit messages, PR creation, rebasing, or the code review process — even when the user says 'push this' or 'merge the branch' without naming Git.
50
52
  github-ci: Use when working with GitHub Actions — workflow YAML, quality gates, test matrices, deployment triggers, reusable workflows — even when the user just says 'my CI is failing' or 'add a check'.
51
53
  grafana: Use when working with Grafana — dashboards, Loki LogQL queries, alerting rules, monitoring panels — even when the user just says 'build me a dashboard' or 'query the logs' without naming Grafana.
52
- guideline-writing: Use when creating or editing a guideline in .agent-src.uncompressed/guidelines/ — reference material cited by skills, no auto-triggers — even when the user just says 'write up our naming conventions'.
54
+ guideline-writing: Use when creating or editing a guideline in docs/guidelines/ — reference material cited by skills, no auto-triggers — even when the user just says 'write up our naming conventions'.
53
55
  jira-integration: Use when the user says "check Jira", "create ticket", "update issue", or needs JQL queries, ticket transitions, or branch-to-ticket linking.
54
56
  jobs-events: Use when creating Laravel jobs, queued workflows, events, or listeners. Covers clear responsibilities, safe serialization, and retry/failure handling.
55
57
  judge-bug-hunter: Use when a diff needs correctness review — null-safety, edge cases, off-by-one, races, error handling — dispatched by /review-changes, /do-and-judge, /judge, even without 'judge'.
@@ -68,9 +70,10 @@ laravel-scheduling: Use when configuring Laravel task scheduling — cron expres
68
70
  laravel-validation: Use when writing validation — Form Requests, rules, custom rule objects, request-boundary design — even when the user just says 'validate this input' or 'check the request' without naming it.
69
71
  learning-to-rule-or-skill: Use when a repeated learning, mistake, or successful pattern should be turned into a new rule or skill. Also use after completing a task to capture learnings from the work.
70
72
  lint-skills: Use when running the package's skill linter against all skills and rules to validate frontmatter, required sections, and execution metadata.
71
- livewire: Use when writing Livewire components reactive state, events, lifecycle hooks, and clean separation between component logic and Blade templates.
73
+ livewire: Stack-implementation skill for Livewire — dispatched by `directives/ui/apply.py` (and `review.py` / `polish.py`) when the project's frontend stack is Livewire. Covers reactive state, events, lifecycle hooks, and component/view separation.
72
74
  logging-monitoring: Use when working with logging or monitoring — Sentry error tracking, Grafana/Loki log aggregation, structured logging channels, or monitoring helpers.
73
75
  mcp: Use when working with MCP (Model Context Protocol) servers — their tools, capabilities, and best practices for effective agent workflows.
76
+ md-language-check: Use BEFORE saving any .md under .augment/, .agent-src*/, or agents/ — scans umlauts, German function words, and quoted German phrases outside DE:/EN: anchor blocks. Hard gate per language-and-tone.
74
77
  merge-conflicts: Use when the user has merge conflicts or says "resolve conflicts". Understands conflict markers, resolution strategies, and verification workflow.
75
78
  migration-creator: Use when the user says "create migration", "add column", or "new table". Creates migrations with correct table prefixes, column naming, and multi-tenant awareness.
76
79
  module-management: Use when the user says "create module", "explore module", or works within app/Modules/. Understands module structure, auto-loading, route registration, and namespace conventions.
@@ -95,10 +98,13 @@ project-analysis-zend-laminas: Use for deep Zend Framework or Laminas project an
95
98
  project-analyzer: ONLY when user explicitly requests: full project analysis, tech stack detection, or structured analysis documents for agents/analysis/. NOT for regular feature work.
96
99
  project-docs: Use when looking for project-specific documentation. Knows which docs exist in agents/docs/ and agents/contexts/ and maps work areas to relevant docs.
97
100
  quality-tools: Use when PHPStan, Rector, or ECS output appears — \"phpstan says mixed\", type errors, \"fix code style\", \"run rector\" — even when Eloquent/Laravel/model code is also mentioned.
101
+ react-shadcn-ui: Use when building React UI on shadcn/ui primitives + Tailwind — the apply/review/polish skill dispatched by `directives/ui/*` for the `react-shadcn` stack.
98
102
  readme-reviewer: Use when reviewing a README for accuracy, usability, and alignment with the actual repository. Detects invented content, broken setup steps, and structural issues.
99
103
  readme-writing: Use when creating, rewriting, or significantly improving a README based on the actual repository structure, commands, and intended audience.
100
104
  readme-writing-package: Use when creating or rewriting a README for a reusable package or library. Focus on installability, minimal usage example, compatibility, and developer onboarding.
101
105
  receiving-code-review: Use when processing code review feedback (bot or human) before changing anything — triages, verifies, and pushes back with technical reasoning — even when the user just says 'fix the comments'.
106
+ "refine-prompt": Reconstruct a free-form prompt into actionable AC + assumptions + confidence band before the engine plans — '/work \"…\"', 'baue X', 'ist der Prompt klar genug für die Engine?'.
107
+ "refine-ticket": Refine a Jira/Linear ticket before planning — 'refine ticket', 'tighten AC on PROJ-123', 'ist das Ticket klar?' — rewritten ticket, Top-5 risks, persona voices, sub-skills orchestrated, close-prompt.
102
108
  requesting-code-review: Use when asking for a review or creating a PR — self-review first, frame the right context, test plan included — even when the user just says 'open a PR' or 'ready to merge'.
103
109
  review-routing: Use when preparing a PR description, suggesting reviewers, or flagging risk — produces owner-mapped roles plus historical bug-pattern matches from project-local YAML.
104
110
  roadmap-management: Use when the user says "create roadmap", "show roadmap", or "execute roadmap". Creates, reads, and manages roadmap files with phase tracking.
@@ -113,7 +119,7 @@ skill-management: Use when compressing, decompressing, refactoring, or improving
113
119
  skill-reviewer: Use when reviewing, auditing, or optimizing skills — validates against the 7 Skill Killers checklist and produces fix recommendations.
114
120
  skill-writing: Use when deciding 'should this be a skill or a rule?', creating/improving/reviewing agent skills, SKILL.md frontmatter, or procedure sections — even without saying 'skill-writing'.
115
121
  sql-writing: Use when writing raw SQL — MariaDB/MySQL syntax, parameterization, raw migrations, seeders with `DB::statement` — even when the user just pastes a query and asks 'why is this slow' without naming SQL.
116
- subagent-orchestration: Use when orchestrating implementer/judge subagents — five modes (do-and-judge, do-in-steps, do-in-parallel, do-competitively, judge-with-debate) — model pairing and parallelism from .agent-settings.yml.
122
+ subagent-orchestration: Use when orchestrating implementer/judge subagents — five modes (do-and-judge, do-in-steps, do-in-parallel, do-competitively, judge-with-debate) — models from .agent-settings.yml.
117
123
  systematic-debugging: Use when hitting a bug, test failure, crash, or unexpected behavior — enforces reproduce → isolate → hypothesize → verify before any fix — even when the user just says 'this is broken' or 'quick fix'.
118
124
  technical-specification: Use when the user says "write a spec", "create RFC", or "document this decision". Writes technical specifications, RFCs, and ADRs with clear structure.
119
125
  terraform: Use when writing Terraform — AWS modules, resources, variables, outputs, remote state — even when the user just says 'provision this infra' or 'add an S3 bucket' without naming Terraform.
@@ -126,5 +132,5 @@ universal-project-analysis: ONLY when user explicitly requests: full project ana
126
132
  upstream-contribute: Use when a learning, new skill, rule improvement, or bug fix from a consumer project should be contributed back to the shared agent-config package.
127
133
  using-git-worktrees: Use when starting parallel work in isolation from the current branch — spawn a git worktree with ignore-safety checks and a clean test baseline — even when the user says 'try this on the side'.
128
134
  "validate-feature-fit": Validate whether a feature request fits the existing codebase — check for duplicates, contradictions, scope creep, and architectural misfit
129
- verify-before-complete: Use when claiming 'done', suggesting a commit, push, or PR — runs the evidence gate so completion claims come from fresh output in this message, not memory or earlier runs.
135
+ verify-completion-evidence: Use when claiming 'done', suggesting a commit, push, or PR — runs the evidence gate so completion claims come from fresh output in this message, not memory or earlier runs.
130
136
  websocket: Use when building real-time features — WebSocket broadcasting, live updates, presence channels, connection state — even when the user just says 'push this to the client live'.
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@event4u/agent-config",
3
- "version": "1.15.0",
3
+ "version": "1.17.0",
4
4
  "description": "Shared agent configuration \u2014 skills, rules, commands, guidelines, and templates for AI coding tools",
5
5
  "license": "MIT",
6
6
  "private": false,
@@ -0,0 +1,108 @@
1
+ #!/usr/bin/env python3
2
+ """Phase 4.3.1 — council cluster dispatch-latency benchmark.
3
+
4
+ Measures the wall-clock overhead of the cluster dispatch layer for the
5
+ `/council` family. Compares:
6
+
7
+ baseline: directly read council-pr.md / council-design.md (atomic shape)
8
+ cluster : read council.md (dispatcher) + parse table + read council-pr.md
9
+ / council-design.md (cluster shape)
10
+
11
+ The dispatch layer in agent-config is a markdown parse, not a runtime
12
+ function, so this benchmarks the file-system + frontmatter + table-row
13
+ extraction cost. Threshold per roadmap § 4.3.1: ≤ +100ms wall-clock.
14
+ """
15
+ from __future__ import annotations
16
+
17
+ import re
18
+ import statistics
19
+ import time
20
+ from pathlib import Path
21
+
22
+ ROOT = Path(__file__).resolve().parent.parent
23
+ COMMANDS = ROOT / ".agent-src/commands"
24
+ N_ITER = 1000 # cold + warm; markdown is tiny so we run a lot of iterations
25
+
26
+ FRONTMATTER_RE = re.compile(r"^---\n(.*?)\n---\n", re.DOTALL)
27
+ TABLE_ROW_RE = re.compile(r"\|\s*`/council\s+([a-z-]+)`\s*\|\s*`([^`]+)`")
28
+
29
+
30
+ def _read_atomic(target: str) -> str:
31
+ """Baseline: directly read the routed file (atomic shape)."""
32
+ path = COMMANDS / f"council-{target}.md"
33
+ text = path.read_text(encoding="utf-8")
34
+ m = FRONTMATTER_RE.match(text)
35
+ if not m:
36
+ raise RuntimeError(f"no frontmatter in {path}")
37
+ return text
38
+
39
+
40
+ def _read_cluster(target: str) -> str:
41
+ """Cluster: read dispatcher, parse routing table, then read routed file."""
42
+ dispatcher = (COMMANDS / "council.md").read_text(encoding="utf-8")
43
+ routes = dict(TABLE_ROW_RE.findall(dispatcher))
44
+ routed = routes.get(target)
45
+ if routed is None:
46
+ raise RuntimeError(f"no route for {target!r} in dispatcher")
47
+ text = (COMMANDS / routed).read_text(encoding="utf-8")
48
+ m = FRONTMATTER_RE.match(text)
49
+ if not m:
50
+ raise RuntimeError(f"no frontmatter in {routed}")
51
+ return text
52
+
53
+
54
+ def _bench(fn, target: str, n: int) -> list[float]:
55
+ samples: list[float] = []
56
+ for _ in range(n):
57
+ t0 = time.perf_counter()
58
+ fn(target)
59
+ samples.append((time.perf_counter() - t0) * 1000.0)
60
+ return samples
61
+
62
+
63
+ def _summary(name: str, samples: list[float]) -> None:
64
+ samples = sorted(samples)
65
+ p50 = statistics.median(samples)
66
+ p95 = samples[int(len(samples) * 0.95)]
67
+ p99 = samples[int(len(samples) * 0.99)]
68
+ mean = statistics.mean(samples)
69
+ print(f" {name:18s} mean={mean:6.3f}ms p50={p50:6.3f}ms p95={p95:6.3f}ms p99={p99:6.3f}ms")
70
+
71
+
72
+ def main() -> int:
73
+ print(f"Phase 4.3.1 — council cluster dispatch latency (n={N_ITER} per probe)")
74
+ print()
75
+
76
+ overruns = 0
77
+ for target in ("pr", "design"):
78
+ print(f"target = /council {target}")
79
+
80
+ # warm cache
81
+ _read_atomic(target)
82
+ _read_cluster(target)
83
+
84
+ baseline = _bench(_read_atomic, target, N_ITER)
85
+ cluster = _bench(_read_cluster, target, N_ITER)
86
+
87
+ _summary("atomic (baseline)", baseline)
88
+ _summary("cluster (dispatcher)", cluster)
89
+
90
+ delta_mean = statistics.mean(cluster) - statistics.mean(baseline)
91
+ delta_p95 = sorted(cluster)[int(N_ITER * 0.95)] - sorted(baseline)[int(N_ITER * 0.95)]
92
+ verdict = "PASS" if delta_p95 <= 100.0 else "FAIL"
93
+ marker = "✅" if verdict == "PASS" else "❌"
94
+ print(f" delta-mean = {delta_mean:+.3f}ms delta-p95 = {delta_p95:+.3f}ms threshold = +100ms {marker} {verdict}")
95
+ print()
96
+
97
+ if delta_p95 > 100.0:
98
+ overruns += 1
99
+
100
+ if overruns:
101
+ print(f"❌ {overruns} probe(s) exceeded +100ms p95 threshold.")
102
+ return 1
103
+ print("✅ All probes within +100ms p95 threshold.")
104
+ return 0
105
+
106
+
107
+ if __name__ == "__main__":
108
+ raise SystemExit(main())
@@ -0,0 +1,92 @@
1
+ #!/usr/bin/env python3
2
+ """Phase 6.1 — chat-history-* trigger overlap (Jaccard).
3
+
4
+ Source of truth per rule = frontmatter `description:` field
5
+ (the trigger surface that decides when an `auto` rule activates).
6
+ Tokens = lowercased alphanum words length ≥ 3, minus a small
7
+ stop-list of file-name fragments and connective words that carry
8
+ no trigger signal.
9
+
10
+ Output: pairwise Jaccard + branch verdict per roadmap § 6.1.
11
+ """
12
+ from __future__ import annotations
13
+
14
+ import re
15
+ from itertools import combinations
16
+ from pathlib import Path
17
+
18
+ ROOT = Path(__file__).resolve().parent.parent
19
+ RULES_DIR = ROOT / ".agent-src.uncompressed/rules"
20
+
21
+ RULES = [
22
+ "chat-history-cadence",
23
+ "chat-history-ownership",
24
+ "chat-history-visibility",
25
+ ]
26
+
27
+ STOP = {
28
+ "the", "and", "for", "with", "from", "via", "per", "not",
29
+ "into", "onto", "out", "off", "any", "all", "this", "that",
30
+ "agent", "chat", "history",
31
+ "agentchathistory", "chathistory",
32
+ "rule", "rules", "file", "files",
33
+ }
34
+
35
+ DESC_RE = re.compile(r'^description:\s*"([^"]+)"', re.MULTILINE)
36
+ TOKEN_RE = re.compile(r"[a-z][a-z0-9_]{2,}")
37
+
38
+
39
+ def tokens(rule_id: str) -> set[str]:
40
+ text = (RULES_DIR / f"{rule_id}.md").read_text(encoding="utf-8")
41
+ m = DESC_RE.search(text)
42
+ if not m:
43
+ raise RuntimeError(f"no description in {rule_id}")
44
+ desc = m.group(1).lower()
45
+ raw = TOKEN_RE.findall(desc)
46
+ return {t for t in raw if t not in STOP}
47
+
48
+
49
+ def jaccard(a: set[str], b: set[str]) -> float:
50
+ union = a | b
51
+ if not union:
52
+ return 0.0
53
+ return len(a & b) / len(union)
54
+
55
+
56
+ def main() -> int:
57
+ sets = {r: tokens(r) for r in RULES}
58
+
59
+ print(f"Phase 6.1 — trigger Jaccard (source: frontmatter `description:`)")
60
+ print()
61
+ for r, ts in sets.items():
62
+ print(f" {r} ({len(ts)} tokens)")
63
+ print(f" {sorted(ts)}")
64
+ print()
65
+
66
+ print("Pairwise Jaccard:")
67
+ print()
68
+ print(f" {'pair':55s} intersect union Jaccard")
69
+ pairs_above = 0
70
+ for a, b in combinations(RULES, 2):
71
+ inter = sets[a] & sets[b]
72
+ union = sets[a] | sets[b]
73
+ j = jaccard(sets[a], sets[b])
74
+ marker = " **" if j >= 0.30 else ""
75
+ print(f" {a + ' × ' + b:55s} {len(inter):>8d} {len(union):>5d} {j:>6.3f}{marker}")
76
+ print(f" intersection: {sorted(inter)}")
77
+ if j >= 0.30:
78
+ pairs_above += 1
79
+ print()
80
+
81
+ if pairs_above >= 2:
82
+ print(f"VERDICT: ≥ 30% on {pairs_above}/3 pairs → PROCEED to 6.2 (unified shape).")
83
+ return 0
84
+ if pairs_above == 1:
85
+ print(f"VERDICT: mixed ({pairs_above}/3 pairs ≥ 30%) → ESCALATE to council.")
86
+ return 0
87
+ print(f"VERDICT: < 30% on all 3 pairs → STOP at 6.1 (orthogonal — current shape optimal).")
88
+ return 0
89
+
90
+
91
+ if __name__ == "__main__":
92
+ raise SystemExit(main())
@@ -0,0 +1,109 @@
1
+ #!/usr/bin/env python3
2
+ """One-shot helper: add `superseded_by:` + `deprecated_in:` + warning
3
+ banner to Phase 2 atomic-command shims.
4
+
5
+ Idempotent — if a file already has `superseded_by:` set, it is skipped.
6
+ """
7
+ from __future__ import annotations
8
+ import sys
9
+ from pathlib import Path
10
+
11
+ # (file-stem, "<cluster> <sub>") — "<cluster> --flag" for flag-based
12
+ PHASE2_SHIMS: list[tuple[str, str]] = [
13
+ # chat-history cluster
14
+ ("chat-history-resume", "chat-history resume"),
15
+ ("chat-history-clear", "chat-history clear"),
16
+ ("chat-history-checkpoint", "chat-history checkpoint"),
17
+ # agents cluster
18
+ ("agents-audit", "agents audit"),
19
+ ("agents-cleanup", "agents cleanup"),
20
+ ("agents-prepare", "agents prepare"),
21
+ # memory cluster
22
+ ("memory-add", "memory add"),
23
+ ("memory-full", "memory load"),
24
+ ("memory-promote", "memory promote"),
25
+ ("propose-memory", "memory propose"),
26
+ # roadmap cluster
27
+ ("roadmap-create", "roadmap create"),
28
+ ("roadmap-execute", "roadmap execute"),
29
+ # module cluster
30
+ ("module-create", "module create"),
31
+ ("module-explore", "module explore"),
32
+ # tests cluster
33
+ ("tests-create", "tests create"),
34
+ ("tests-execute", "tests execute"),
35
+ # context cluster
36
+ ("context-create", "context create"),
37
+ ("context-refactor", "context refactor"),
38
+ # override cluster
39
+ ("override-create", "override create"),
40
+ ("override-manage", "override manage"),
41
+ # copilot-agents cluster
42
+ ("copilot-agents-init", "copilot-agents init"),
43
+ ("copilot-agents-optimize", "copilot-agents optimize"),
44
+ # judge cluster (do-and-judge / do-in-steps now sub-commands)
45
+ ("do-and-judge", "judge on-diff"),
46
+ ("do-in-steps", "judge steps"),
47
+ # commit / create-pr — flag-based clusters
48
+ ("commit-in-chunks", "commit --in-chunks"),
49
+ ("create-pr-description", "create-pr --description-only"),
50
+ ]
51
+
52
+ DEPRECATED_IN = "1.17.0"
53
+ COMMANDS_DIR = Path(".agent-src.uncompressed/commands")
54
+
55
+
56
+ def patch_file(stem: str, target: str) -> str:
57
+ path = COMMANDS_DIR / f"{stem}.md"
58
+ if not path.exists():
59
+ return f"SKIP {stem}: not found"
60
+ text = path.read_text(encoding="utf-8")
61
+ if "superseded_by:" in text.split("---", 2)[1] if text.startswith("---") else False:
62
+ return f"SKIP {stem}: already shimmed"
63
+
64
+ if not text.startswith("---\n"):
65
+ return f"SKIP {stem}: no frontmatter"
66
+ end = text.find("\n---\n", 4)
67
+ if end == -1:
68
+ return f"SKIP {stem}: malformed frontmatter"
69
+ fm_block = text[4:end]
70
+ body = text[end + len("\n---\n"):]
71
+
72
+ if "superseded_by:" in fm_block:
73
+ return f"SKIP {stem}: already shimmed"
74
+
75
+ new_fm_lines = fm_block.rstrip("\n").splitlines()
76
+ new_fm_lines.append(f"superseded_by: {target}")
77
+ new_fm_lines.append(f'deprecated_in: "{DEPRECATED_IN}"')
78
+ new_fm = "\n".join(new_fm_lines)
79
+
80
+ is_flag = target.startswith(("commit ", "create-pr "))
81
+ if is_flag:
82
+ cluster_invocation = f"/{target}"
83
+ else:
84
+ cluster_invocation = f"/{target}"
85
+ banner = (
86
+ f"> ⚠️ /{stem} is deprecated; use {cluster_invocation} instead.\n"
87
+ f"> This shim is retained for one release cycle "
88
+ f"({DEPRECATED_IN} → next minor) and forwards to the same "
89
+ f"instructions below. See "
90
+ f"[`docs/contracts/command-clusters.md`]"
91
+ f"(../../docs/contracts/command-clusters.md).\n\n"
92
+ )
93
+
94
+ new_text = f"---\n{new_fm}\n---\n\n{banner}{body.lstrip(chr(10))}"
95
+ path.write_text(new_text, encoding="utf-8")
96
+ return f"OK {stem} → {target}"
97
+
98
+
99
+ def main() -> int:
100
+ results = []
101
+ for stem, target in PHASE2_SHIMS:
102
+ results.append(patch_file(stem, target))
103
+ for r in results:
104
+ print(r)
105
+ return 0
106
+
107
+
108
+ if __name__ == "__main__":
109
+ sys.exit(main())
@@ -48,6 +48,10 @@ Commands:
48
48
  roadmap:progress-check Fail if agents/roadmaps-progress.md is stale (for CI)
49
49
  hooks:install Install the pre-commit roadmap-progress hook
50
50
  (use --print to dump it, --force to overwrite an existing hook)
51
+ keys:install-anthropic Install the Anthropic API key for the AI Council
52
+ (interactive, /dev/tty only, writes ~/.config/agent-config/anthropic.key 0600)
53
+ keys:install-openai Install the OpenAI API key for the AI Council
54
+ (interactive, /dev/tty only, writes ~/.config/agent-config/openai.key 0600)
51
55
  first-run Guided first-run setup — cost profile, settings, tooling
52
56
  implement-ticket Drive the work_engine Python engine on a ticket envelope
53
57
  (Option-A loop; called by the /implement-ticket command)
@@ -66,6 +70,8 @@ Commands:
66
70
  Usage: chat-history:hook --platform <claude|augment|cursor|cline|windsurf|gemini>
67
71
  chat-history:checkpoint Append a phase-boundary entry to .agent-chat-history
68
72
  (CHECKPOINT fallback for platforms without native hooks)
73
+ roadmap-progress:hook PostToolUse hook entry point (read JSON from stdin)
74
+ Regenerates roadmaps-progress.md when a tool wrote under agents/roadmaps/
69
75
  telemetry:record Append one artefact-engagement event (default-off)
70
76
  telemetry:status Print artefact-engagement telemetry status (read-only)
71
77
  telemetry:report Aggregate the engagement log into a quartile report
@@ -78,6 +84,8 @@ Examples:
78
84
  ./agent-config mcp:check
79
85
  ./agent-config roadmap:progress
80
86
  ./agent-config hooks:install
87
+ ./agent-config keys:install-anthropic
88
+ ./agent-config keys:install-openai
81
89
  ./agent-config first-run
82
90
  ./agent-config implement-ticket --state-file .work-state.json
83
91
  ./agent-config work --state-file .work-state.json --prompt-file prompt.txt
@@ -310,6 +318,13 @@ cmd_chat_history_hook() {
310
318
  exec python3 "$script" hook-dispatch "$@"
311
319
  }
312
320
 
321
+ cmd_roadmap_progress_hook() {
322
+ require_python3
323
+ local script
324
+ script="$(resolve_script "scripts/roadmap_progress_hook.py")" || return 1
325
+ exec python3 "$script" "$@"
326
+ }
327
+
313
328
  cmd_chat_history_checkpoint() {
314
329
  require_python3
315
330
  local script
@@ -390,6 +405,21 @@ HELP
390
405
  echo " To uninstall: rm $target"
391
406
  }
392
407
 
408
+ # Wrap the interactive key installers under a stable CLI entry. The shell
409
+ # scripts themselves enforce /dev/tty, 0600, and atomic write — this is
410
+ # pure routing so consumers never have to know the package layout.
411
+ cmd_keys_install_anthropic() {
412
+ local script
413
+ script="$(resolve_script "scripts/install_anthropic_key.sh")" || return 1
414
+ exec bash "$script" "$@"
415
+ }
416
+
417
+ cmd_keys_install_openai() {
418
+ local script
419
+ script="$(resolve_script "scripts/install_openai_key.sh")" || return 1
420
+ exec bash "$script" "$@"
421
+ }
422
+
393
423
  main() {
394
424
  local cmd="${1-}"
395
425
  [[ $# -gt 0 ]] && shift || true
@@ -400,6 +430,8 @@ main() {
400
430
  roadmap:progress) cmd_roadmap_progress "$@" ;;
401
431
  roadmap:progress-check) cmd_roadmap_progress_check "$@" ;;
402
432
  hooks:install) cmd_hooks_install "$@" ;;
433
+ keys:install-anthropic) cmd_keys_install_anthropic "$@" ;;
434
+ keys:install-openai) cmd_keys_install_openai "$@" ;;
403
435
  first-run) cmd_first_run "$@" ;;
404
436
  implement-ticket) cmd_implement_ticket "$@" ;;
405
437
  work) cmd_work "$@" ;;
@@ -413,6 +445,7 @@ main() {
413
445
  refine-ticket:detect) cmd_refine_ticket_detect "$@" ;;
414
446
  chat-history:hook) cmd_chat_history_hook "$@" ;;
415
447
  chat-history:checkpoint) cmd_chat_history_checkpoint "$@" ;;
448
+ roadmap-progress:hook) cmd_roadmap_progress_hook "$@" ;;
416
449
  telemetry:record) cmd_telemetry_record "$@" ;;
417
450
  telemetry:status) cmd_telemetry_status "$@" ;;
418
451
  telemetry:report) cmd_telemetry_report "$@" ;;
@@ -0,0 +1,39 @@
1
+ """ai_council — external-AI consultation module.
2
+
3
+ The host agent uses this to poll independent models (OpenAI, Anthropic)
4
+ for second opinions on roadmaps, diffs, free-form prompts, or file sets.
5
+ Council members never see the host agent's reasoning — only the artefact
6
+ plus a neutral system prompt asking for an independent critique.
7
+
8
+ Architecture:
9
+ clients.py — ExternalAIClient ABC + concrete OpenAI/Anthropic
10
+ impls + 0600 key loaders (no env-var fallback).
11
+ bundler.py — Context bundling with redaction + size guard.
12
+ orchestrator.py — Parallel fan-out, error normalisation, cost cap.
13
+ prompts.py — Neutrality system-prompt templates per input mode.
14
+
15
+ Trust boundary: this module makes networked, paid calls. Tokens come
16
+ exclusively from ~/.config/agent-config/<provider>.key (mode 0600). The
17
+ module never edits files, never opens PRs, never merges — output is
18
+ text only, advisory.
19
+ """
20
+
21
+ from scripts.ai_council.clients import (
22
+ AnthropicClient,
23
+ CouncilResponse,
24
+ ExternalAIClient,
25
+ KeyGateError,
26
+ OpenAIClient,
27
+ load_anthropic_key,
28
+ load_openai_key,
29
+ )
30
+
31
+ __all__ = [
32
+ "AnthropicClient",
33
+ "CouncilResponse",
34
+ "ExternalAIClient",
35
+ "KeyGateError",
36
+ "OpenAIClient",
37
+ "load_anthropic_key",
38
+ "load_openai_key",
39
+ ]
@@ -0,0 +1,41 @@
1
+ """Shipped baseline prices for the AI Council.
2
+
3
+ This file is the bootstrap source for `.agent-prices.md` when the
4
+ runtime file is missing. It is also the network-fallback source for
5
+ `scripts/update_prices.py` when the upstream feed (LiteLLM) is
6
+ unreachable.
7
+
8
+ Prices are USD per **1 000 000** tokens. Models are identified by the
9
+ exact `model:` string the user puts into `.agent-settings.yml`.
10
+
11
+ Numbers below are a hand-curated snapshot — they will drift. The
12
+ runtime never reads them directly once `.agent-prices.md` exists; the
13
+ weekly refresh and user edits are the live source of truth.
14
+ """
15
+
16
+ from __future__ import annotations
17
+
18
+ # YYYY-MM-DD of when this table was last hand-edited. Keep in sync with
19
+ # the test_default_prices freshness assertion if you bump this.
20
+ LAST_UPDATED = "2026-04-29"
21
+
22
+ # (provider, model) -> (input_per_1m_usd, output_per_1m_usd)
23
+ DEFAULT_PRICES: dict[tuple[str, str], tuple[float, float]] = {
24
+ # ── Anthropic ────────────────────────────────────────────────────
25
+ ("anthropic", "claude-sonnet-4-5"): (3.00, 15.00),
26
+ ("anthropic", "claude-opus-4-1"): (15.00, 75.00),
27
+ ("anthropic", "claude-haiku-4-5"): (1.00, 5.00),
28
+ # ── OpenAI ───────────────────────────────────────────────────────
29
+ ("openai", "gpt-4o"): (2.50, 10.00),
30
+ ("openai", "gpt-4o-mini"): (0.15, 0.60),
31
+ ("openai", "o1"): (15.00, 60.00),
32
+ ("openai", "o3-mini"): (1.10, 4.40),
33
+ }
34
+
35
+
36
+ def as_rows() -> list[tuple[str, str, float, float]]:
37
+ """Return the table sorted (provider, model) for stable Markdown output."""
38
+ return [
39
+ (provider, model, prices[0], prices[1])
40
+ for (provider, model), prices in sorted(DEFAULT_PRICES.items())
41
+ ]