@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
@@ -3,6 +3,8 @@ type: "always"
3
3
  description: "Scope control — no unsolicited architectural changes, refactors, or library replacements"
4
4
  alwaysApply: true
5
5
  source: package
6
+ load_context:
7
+ - .agent-src.uncompressed/contexts/authority/scope-mechanics.md
6
8
  ---
7
9
 
8
10
  # Scope Control
@@ -20,62 +22,79 @@ source: package
20
22
 
21
23
  The user decides the git shape of the work. Never improvise.
22
24
 
23
- > **Commit specifics:** see [`commit-policy`](commit-policy.md) — narrower
24
- > than the general "no git ops without permission" below (never-ask
25
- > default + roadmap-authorized exception).
25
+ > **Commit specifics:** see the canonical [`commit-policy`](commit-policy.md)
26
+ > rule — narrower than the general "no git ops without permission"
27
+ > below (covers the never-ask-about-committing default and the
28
+ > roadmap-authorized exception).
26
29
 
27
30
  - NEVER commit, push, merge, rebase, or force-push without explicit user permission.
28
- - NEVER create, switch, or delete a branch without explicit user permission.
29
- Includes spike, scratch, throwaway, worktree branches.
30
- - NEVER create, close, reopen, or retarget a pull request without explicit
31
- user permission.
31
+ - NEVER create a new branch, switch to a different branch, or delete a
32
+ branch without explicit user permission. This includes spike, scratch,
33
+ throwaway, and worktree branches.
34
+ - NEVER create, close, reopen, or change the target of a pull request
35
+ without explicit user permission.
32
36
  - NEVER push a tag or create a release without explicit user permission.
33
- - NEVER include version numbers, releases, deprecation dates,
34
- release-tied milestones, or git tags in roadmaps, plans, tickets, or
35
- any planning artifact. Roadmaps plan **work**; releases are a
36
- separate user decision. Never surface "which release" as a numbered
37
- option, ADR field, or roadmap entry. If user wants a release pinned
38
- to a milestone, they say so explicitly.
37
+ - NEVER include version numbers, target releases, deprecation dates,
38
+ release-tied milestones, or git tags inside roadmaps, plans, tickets,
39
+ or any other planning artifact. Roadmaps plan **work**; releases and
40
+ tags are a separate decision the user makes outside the roadmap.
41
+ Never surface "which release should this ship in?" as an option in
42
+ numbered choices, ADRs, or roadmap text. If the user wants a release
43
+ pinned to a milestone, they will say so explicitly.
39
44
  - If a task seems to need a separate branch or PR, STOP and **brief
40
- first, ask second**. The brief MUST cover, in order:
41
- 1. **Why** — what the new branch solves that the current one cannot.
42
- 2. **What** files touched, experiments run, expected duration.
43
- 3. **How it continues** — merge back, cherry-pick, throwaway, PR
44
- target, how the current branch is protected meanwhile.
45
- Then present numbered options with "stay on current branch" as
46
- default. User decides. Do NOT branch first and explain later.
47
-
48
- "Explicit permission" = the user said so this turn or gave a standing
49
- instruction they have not revoked. Earlier permission for another op
50
- does not carry over.
45
+ the user before asking** see
46
+ [`scope-mechanics`](../contexts/authority/scope-mechanics.md)
47
+ § Brief-before-asking for the required Why / What / How sequence.
48
+
49
+ "Explicit permission" means the user said so **in this turn or in a
50
+ standing instruction they have not revoked**. Earlier permission for a
51
+ different operation does not carry over.
51
52
 
52
53
  ## Production, infrastructure, bulk-destructive — Hard Floor
53
54
 
54
- Subset of the above is **never** autonomous and never auto-permitted
55
- by a standing autonomy directive. Canonical rule:
56
- [`non-destructive-by-default`](non-destructive-by-default.md).
57
- Restated so this file remains the single read for git/scope concerns:
55
+ A subset of the operations above is **never** autonomous and never
56
+ auto-permitted by a standing autonomy directive. Canonical rule:
57
+ [`non-destructive-by-default`](non-destructive-by-default.md). The
58
+ trigger list (production-branch merges, deploys / releases, prod
59
+ data / infra, bulk-destructive ops) and the
60
+ "authorization is this turn, not earlier" clarification live in
61
+ [`scope-mechanics`](../contexts/authority/scope-mechanics.md)
62
+ § Production, infrastructure, bulk-destructive.
58
63
 
59
- - **Production-branch merges**`main`, `master`, `prod`, `production`, `release/*`, or any deployment-trunk branch. Always ask, even when the roadmap step says "merge".
60
- - **Deploys / releases** — `terraform apply` / `kubectl apply` on prod, deploy scripts, release commands, tag pushes that trigger CI deployment. Always ask.
61
- - **Production data / infrastructure** — prod DB writes / migrations, prod config edits, secrets rotation, IAM / role / policy, DNS, anything in a `prod`-scoped path or pipeline. Always ask.
62
- - **Bulk-destructive ops** — wildcard or directory deletion (`rm -rf <dir>`, `git rm -r`), `DROP TABLE`, `TRUNCATE`, `git reset --hard` past unpushed work, mass class / module / migration deletion. Always ask.
64
+ ## Decline = silence no re-asking on the same task
63
65
 
64
- A roadmap step or earlier turn does **not** count as authorization for
65
- these. Authorization is "the user said so on this turn".
66
+ After the user **declines** a proposal (branch switch, PR creation,
67
+ tag/release entry, separate worktree, version pinning in a roadmap),
68
+ do **not** raise the same proposal again on the same task. The decline
69
+ stands until the user reopens the topic themselves.
66
70
 
67
- ## Decline = silence no re-asking on the same task
71
+ Timing and "is this worth asking?" guidance lives in
72
+ [`scope-mechanics`](../contexts/authority/scope-mechanics.md)
73
+ § Decline = silence — context.
74
+
75
+ ## Fenced step — user-set review gates
76
+
77
+ When the user explicitly fences off the next step — *"don't implement
78
+ yet"*, *"plan only"*, *"just write the roadmap, I'll review"*,
79
+ *"review first"*, *"erst Roadmap, ich schau drüber"*, *"nichts
80
+ implementieren"*, *"nur planen"*, *"erstmal nur X, dann ich"* — the
81
+ agent's reply is **the deliverable plus a handoff**, never the
82
+ deliverable plus *"shall we start?"*.
68
83
 
69
- After a declined proposal (branch switch, PR, tag/release entry,
70
- worktree, version pinning in a roadmap), do **not** raise it again on
71
- the same task. Decline stands until user reopens it.
84
+ ```
85
+ USER FENCED OFF EXECUTION DELIVER + HAND BACK.
86
+ NO NUMBERED OPTION OFFERING TO BEGIN WORK.
87
+ NO "READY TO IMPLEMENT?" RE-ASK.
88
+ NO "STARTEN WIR MIT PHASE 1?" PIVOT.
89
+ ```
72
90
 
73
- Right moment to ask at most **once**, only when genuinely useful —
74
- is **before** work starts (writing roadmap, opening ticket), not
75
- mid-execution. During roadmap execution the branch question is
76
- settled; do not resurface it step by step.
91
+ The fence stands until the user reopens the topic themselves, exactly
92
+ like `Decline = silence` above. Permitted follow-up questions on the
93
+ same turn cover **the deliverable** (adjust scope, fix wording, add a
94
+ section), never **its execution**.
77
95
 
78
- A proposal that "might be sensible" is not enough reason to ask.
79
- Default: stay on current branch, no release language. Only ask with
80
- concrete evidence-based reason (e.g. risky migration spike branch).
81
- If in doubt, do not ask.
96
+ For the failure-mode catalog (Option 1 = "start now", re-asking after
97
+ delivery, hand-off-to-execution drift, inferring acceptance from a
98
+ thumbs-up) and the explicit bypass phrases that lift the fence, see
99
+ [`scope-mechanics`](../contexts/authority/scope-mechanics.md)
100
+ § Fenced step.
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  type: "auto"
3
3
  alwaysApply: false
4
- description: "Security-sensitive code paths — authentication, authorization, billing, tenant boundaries, secrets, file uploads, external integrations, webhooks, public endpoints — stop and run threat analysis BEFORE editing"
4
+ description: "Security-sensitive paths — auth, billing, tenant boundaries, secrets, file uploads, external integrations, webhooks, public endpoints — stop and run threat analysis BEFORE editing"
5
5
  source: package
6
6
  ---
7
7
 
@@ -41,8 +41,8 @@ STOP writing code. Run the matching analysis skill first:
41
41
  | Data flows to logs / API / external | `data-flow-mapper` |
42
42
  | Wide refactor of security-sensitive code | `blast-radius-analyzer` |
43
43
 
44
- **Before the analysis, consult memory for prior incidents** on this
45
- surface. Via [`memory-access`](../guidelines/agent-infra/memory-access.md):
44
+ **Before running the analysis, consult memory for prior incidents** on
45
+ this surface. Via [`memory-access`](../../docs/guidelines/agent-infra/memory-access.md):
46
46
 
47
47
  ```python
48
48
  from scripts.memory_lookup import retrieve
@@ -53,14 +53,14 @@ priors = retrieve(
53
53
  )
54
54
  ```
55
55
 
56
- A prior security incident on the same path is the cheapest input to a
57
- threat pass — cite any matching `id` so the required control or
58
- regression test ships with the fix.
56
+ A prior security incident on the same path is the cheapest possible
57
+ input to a threat pass — cite any matching `id` in the analysis output
58
+ so the required control or regression test ships with the fix.
59
59
 
60
60
  Capture the analysis output (abuse cases, missing controls, required
61
- negative tests) — implement against that list, not your first instinct.
62
- Never silently fall back to editing without the analysis; if blocked,
63
- ask the user.
61
+ negative tests) — implement against that list, not against your first
62
+ instinct. Never silently fall back to editing without the analysis; if
63
+ it is blocked, ask the user.
64
64
 
65
65
  ## When NOT to fire
66
66
 
@@ -22,7 +22,7 @@ source: package
22
22
  - Rules and system instructions should stay well below 200 lines
23
23
  - Smaller (≈60 lines) is strongly preferred
24
24
 
25
- → Size limits and details: `.augment/guidelines/agent-infra/size-and-scope.md`
25
+ → Size limits and details: `../../docs/guidelines/agent-infra/size-and-scope.md`
26
26
 
27
27
  → Frontmatter contract: schemas live in `scripts/schemas/` and are enforced by
28
28
  `python3 scripts/validate_frontmatter.py`.
@@ -3,6 +3,8 @@ type: "auto"
3
3
  description: "Creating, editing, or reviewing skills — minimum quality standard, every skill must be executable, validated, and self-contained"
4
4
  alwaysApply: false
5
5
  source: package
6
+ load_context:
7
+ - .agent-src.uncompressed/contexts/communication/rules-auto/skill-quality-mechanics.md
6
8
  ---
7
9
 
8
10
  # Skill Quality
@@ -30,26 +32,13 @@ and fail `python3 scripts/validate_frontmatter.py` and the full CI pipeline.
30
32
 
31
33
  ## Description Triggering
32
34
 
33
- Claude routes skills by reading the frontmatter `description`. Polite, generic,
34
- or hedged descriptions cause **undertriggering**the skill never loads when it
35
- should, and the user never learns it exists.
36
-
37
- Make descriptions "pushy" — explicit about when to fire:
38
-
39
- - Start with a concrete verb phrase: `Use when ...`, `Creates ...`, `Reviews ...`.
40
- - Name 2+ concrete triggers — domains, symptoms, file types, user phrasing.
41
- - End with: `... even if they don't explicitly ask for \`<skill-name>\`.`
42
- - Avoid hedges: `may help with`, `can be useful for`, `covers various`.
43
- - **Keep it ≤ 200 characters.** `scripts/skill_linter.py` warns at
44
- `description_too_long` above this. If the pushy tail pushes you over, cut
45
- adjectives, drop the second example phrasing, or collapse a list — do
46
- **not** drop the trigger vocabulary or the `even if ...` tail.
47
-
48
- Source: [`skills/skill-creator` in `anthropics/skills`](https://github.com/anthropics/skills/blob/main/skills/skill-creator/SKILL.md).
49
-
50
- **Litmus test:** Read the description cold, without the skill's body. If you
51
- cannot name at least two phrasings a user would realistically type that should
52
- route to this skill, the description is too polite. Rewrite it.
35
+ Claude routes skills by their frontmatter `description`. Pushy,
36
+ trigger-rich descriptions are requiredpolite or hedged ones cause
37
+ undertriggering. The full recipe (concrete verb phrase, ≥2 triggers,
38
+ `even if they don't explicitly ask for …` tail, ≤200 chars,
39
+ litmus test) lives in
40
+ [`contexts/communication/rules-auto/skill-quality-mechanics.md`](../contexts/communication/rules-auto/skill-quality-mechanics.md)
41
+ § Description Triggering.
53
42
 
54
43
  ## Skill Independence
55
44
 
@@ -64,35 +53,14 @@ If a skill is not executable without opening a guideline, it is broken.
64
53
  **Litmus test:** Cover all guideline references in the Procedure. Is it still executable?
65
54
  If not → the skill needs more own steps, decisions, and validation — not more guideline links.
66
55
 
67
- ## Merge Preservation
68
-
69
- When merging or refactoring skills, the merged result MUST preserve:
70
-
71
- 1. **Strongest validation** from each source skill
72
- 2. **Strongest example** (good/bad contrast) from each source
73
- 3. **Strongest anti-pattern** from each source
74
- 4. **All concrete decision criteria** that differ between sources
75
-
76
- A merge is invalid if:
77
- - Validation got weaker than the strongest source
78
- - Examples were lost without replacement
79
- - Anti-pattern coverage decreased
80
- - The merged skill became a generic umbrella doc
81
-
82
- ## Compression Preservation
83
-
84
- When compressing a skill, the compressed version MUST preserve:
85
-
86
- - Trigger quality (description + When to use)
87
- - All procedure steps that contain decisions
88
- - All concrete validation checks
89
- - All gotchas and anti-patterns
90
- - Strongest example (at minimum one good/bad contrast)
56
+ ## Merge & Compression Preservation
91
57
 
92
- Compression may remove:
93
- - Verbose explanations
94
- - Redundant examples (keep the strongest)
95
- - Commentary that doesn't affect execution
58
+ When merging or compressing skills, the result MUST preserve the
59
+ strongest validation, strongest examples, all anti-patterns, all
60
+ decision criteria, and trigger quality. Full preservation invariants
61
+ and "merge is invalid if …" / "compression may remove …" lists in
62
+ [`contexts/communication/rules-auto/skill-quality-mechanics.md`](../contexts/communication/rules-auto/skill-quality-mechanics.md)
63
+ § Merge Preservation and § Compression Preservation.
96
64
 
97
65
  ## Refactor Safety
98
66
 
@@ -3,6 +3,8 @@ type: "auto"
3
3
  description: "When user types a slash command like /create-pr, /commit, or pastes command file content"
4
4
  alwaysApply: false
5
5
  source: package
6
+ load_context:
7
+ - .agent-src.uncompressed/contexts/communication/rules-auto/slash-command-routing-policy-mechanics.md
6
8
  ---
7
9
 
8
10
  # Commands
@@ -22,9 +24,10 @@ When the user types a command (`/create-pr`, `# create-pr`, or pastes a command
22
24
 
23
25
  ## Open files are irrelevant for command detection
24
26
 
25
- Editor may report an open file (e.g., "user has `compress.md` open"). **Irrelevant** for commands.
27
+ The editor may report that the user has a file open (e.g., "The user has file `compress.md` open").
28
+ This is **irrelevant** for command detection.
26
29
 
27
- - `/compress` typed **run** compress command — even if `compress.md` is open in editor.
28
- - Command content in context + open file **command invocation takes priority**.
30
+ - If the user types `/compress`, they want to **run** the compress command — even if `compress.md` is open in the editor.
31
+ - If command file content appears in the context alongside an open file, the **command invocation takes priority**.
29
32
  - Do NOT confuse "file is open" with "user wants to discuss this file".
30
- - User's typed message determines intent — not editor state.
33
+ - The user's typed message determines intent — not editor state.
@@ -1,7 +1,7 @@
1
1
  ---
2
- type: "always"
3
- description: "Always analyze before acting. Prefer targeted inspection, tests, and real verification over guessing or trial-and-error."
4
- alwaysApply: true
2
+ type: "auto"
3
+ description: "Before coding, modifying, or debugging analyze first, verify with real tools, never guess or trial-and-error"
4
+ alwaysApply: false
5
5
  source: package
6
6
  ---
7
7
 
@@ -16,77 +16,87 @@ source: package
16
16
  - If requirements are unclear, ask a precise clarification question instead of making hidden assumptions
17
17
  - Refactors must preserve behavior, validation, examples, and anti-failure guidance unless there is an explicit reason to change them
18
18
  - Do NOT modify code you do not fully understand — read it first, trace the flow, then change it
19
- - Multiple valid frameworks/patterns already in the codebase (Tailwind + Flux, multiple form libs, competing state stores) do NOT pick one silently, ask. See [`no blind implementation`](../guidelines/agent-infra/agent-interaction-and-decision-quality.md#2-no-blind-implementation)
19
+ - When multiple valid frameworks/patterns already exist in the codebase (e.g. Tailwind + Flux, multiple form libraries, competing state stores), do NOT pick one silently ask which to use. See [`no blind implementation`](../../docs/guidelines/agent-infra/agent-interaction-and-decision-quality.md#2-no-blind-implementation)
20
20
 
21
21
  ## The Developer Workflow
22
22
 
23
- Work like a real developer. Follow this order strictly:
23
+ Work like a real developer — not a text generator. Follow this order strictly:
24
24
 
25
- 1. **Understand** — Read task, ticket, acceptance criteria. Unclear? Ask, don't assume.
26
- 2. **Analyze** — Read affected code, trace data flow, compare with requirements.
27
- 3. **Plan** — What to change, what NOT to change, how to verify.
28
- 4. **Implement** — Focused changes. Follow existing patterns. No unrelated rewrites.
29
- 5. **Verify** — Run tests, hit endpoint, check UI. Real execution, not "should work".
25
+ 1. **Understand** — Read the task, ticket, acceptance criteria. If unclear: ask, don't assume.
26
+ 2. **Analyze** — Read affected code, trace data flow, compare with requirements and existing patterns.
27
+ 3. **Plan** — Decide what to change, what NOT to change, and how to verify success.
28
+ 4. **Implement** — Make focused changes. Follow existing patterns. No unrelated rewrites.
29
+ 5. **Verify** — Run tests, hit the endpoint, check the UI. Real execution, not "should work".
30
30
 
31
- Skipping steps 1-3 = #1 cause of wrong implementations and wasted retries.
31
+ Skipping steps 1-3 is the #1 cause of wrong implementations and wasted retries.
32
32
 
33
- ## Consult memory before editing
33
+ ## Minimum read set — read before you write
34
34
 
35
- Before writing code for the touched paths, call
36
- [`memory-access`](../guidelines/agent-infra/memory-access.md):
35
+ Before editing code, read the minimum set that defines its behavior:
37
36
 
38
- ```python
39
- from scripts.memory_lookup import retrieve
40
- priors = retrieve(
41
- types=["architecture-decisions", "domain-invariants"],
42
- keys=<touched paths>,
43
- limit=3,
44
- )
45
- ```
37
+ 1. **Symbol under edit** — full method/function body, not just the planned line.
38
+ 2. **Direct callers** — one level up (`grep -rn "<symbol>"` + open the matches).
39
+ 3. **Tests** — if a test file exists, it encodes the contract.
40
+ 4. **One layer of related abstractions** — interface, parent class, or trait (one hop, not the full hierarchy).
41
+ 5. **Data changes:** the migration that created the column + any seeder/factory that references it.
46
42
 
43
+ Stop expanding once you can explain, in your own words, what the symbol does, who calls
44
+ it, and what breaks if you change its behavior. If you cannot → read more. Never write
45
+ code based on guessed behavior.
46
+
47
+ ### Consult memory before editing
48
+
49
+ Prior decisions and invariants live in the memory layer. Via
50
+ [`memory-access`](../../docs/guidelines/agent-infra/memory-access.md), call
51
+ `retrieve(types=["architecture-decisions", "domain-invariants"], keys=<touched paths>, limit=3)`.
47
52
  A matching `architecture-decision` explains *why* the current shape
48
53
  exists; a matching `domain-invariant` is a hard constraint you cannot
49
- violate. Cite the `id` if a match influences the plan. No match → no
50
- overhead; proceed.
54
+ violate. Cite the `id` if a match influences the plan.
51
55
 
52
56
  ## Verify with real tools
53
57
 
58
+ Always verify changes with actual execution — not by reading code and assuming it works.
59
+
54
60
  | What changed | How to verify |
55
61
  |---|---|
56
- | **Backend/API** | `curl`, Postman (or Postman MCP), test endpoint |
57
- | **Frontend/UI** | Playwright MCP or browser — rendered state, interactions |
58
- | **Logic/flow** | Xdebug (or Xdebug MCP) — trace execution, inspect variables |
59
- | **CLI/Jobs** | Run command, check side effects, exit code |
60
- | **Database** | Query result, check migrations |
62
+ | **Backend/API** | `curl`, Postman (or Postman MCP if available), test endpoint |
63
+ | **Frontend/UI** | Playwright MCP or browser — check rendered state, interactions |
64
+ | **Logic/flow** | Xdebug (or Xdebug MCP if available) — trace execution, inspect variables |
65
+ | **CLI/Jobs** | Run the command, check side effects, verify exit code |
66
+ | **Database** | Query the result, check migrations ran correctly |
61
67
 
62
- If debugging/testing tool available as MCP server — prefer it.
68
+ If a debugging/testing tool is available as MCP server — prefer it over manual alternatives.
63
69
 
64
- If verification not possible: state what is missing and how change should be tested.
70
+ If verification is not possible (no endpoint, no UI, no test): explicitly state what is missing
71
+ and explain how the change should be tested.
65
72
 
66
73
  ## Reduce output — targeted tools over full dumps
67
74
 
68
75
  Never load full datasets into context. Extract what you need:
69
76
 
70
- - `jq` for JSON: `curl -s /api/users | jq '.[0] | {id, email}'`
71
- - `rg` / `grep` for text specific patterns, not full files
72
- - `head`, `tail`, `cut`, `sort`, `uniq` to narrow results
73
- - `--filter`, `--json`, `--format` flags on CLI tools
74
- - Logs: filter by request ID, timestamp, error type — not full files
77
+ - `jq` for JSON: `curl -s /api/users | jq '.[0] | {id, email}'` — not the full response
78
+ - `rg` / `grep` for text: search specific patterns, not full files
79
+ - `head`, `tail`, `cut`, `sort`, `uniq` for narrowing results
80
+ - `--filter`, `--json`, `--format` flags on CLI tools — use them
81
+ - Laravel: `route:list --json | jq` over raw `route:list` dump
82
+ - Logs: filter by request ID, timestamp, or error type — not full log files
75
83
 
76
84
  ## No blind retries
77
85
 
78
- - Fail? **Read the error**, analyze cause, then fix
79
- - Do NOT retry same approach hoping for different result
80
- - Do NOT loop trial-and-error when one inspection reveals the cause
81
- - Max 2 retries same approach — then stop and rethink
86
+ - If something fails: **read the error**, analyze the cause, then fix it
87
+ - Do NOT retry the same approach hoping for a different result
88
+ - Do NOT loop through trial-and-error when one targeted inspection would reveal the cause
89
+ - Max 2 retries for the same approach — then stop and rethink
82
90
 
83
91
  ## Open files are context, not intent
84
92
 
85
- The editor may report an open file. This is **background context only** — NOT the user's intent.
93
+ The editor may report that the user has a file open. This is **background context only** —
94
+ it does NOT mean the user's message is about that file.
86
95
 
87
- - **User's message determines intent** — not which file is open.
88
- - User has `README.md` open + types `/compress` intent is compress, not README.
89
- - User has `UserController.php` open + asks "how do tests work?" intent is testing, not the controller.
90
- - Only treat open file as relevant when the user explicitly references it ("fix this file", "what does this do?").
96
+ - **The user's message determines intent** — not which file is open.
97
+ - A user can have `README.md` open and type `/compress` the intent is to compress, not to discuss the README.
98
+ - A user can have `UserController.php` open and ask "how do tests work?" the intent is testing, not the controller.
99
+ - Only treat the open file as relevant when the user's message explicitly references it
100
+ (e.g., "fix this file", "what does this do?", "update the open file").
91
101
 
92
102
  If analysis is skipped → results are unreliable.
@@ -1,7 +1,7 @@
1
1
  ---
2
- type: "always"
3
- description: "Token efficiency — redirect output, minimize tool calls, keep responses concise"
4
- alwaysApply: true
2
+ type: "auto"
3
+ description: "When running CLI tools, fetching logs, or producing replies — redirect verbose output, minimize tool calls, keep replies concise"
4
+ alwaysApply: false
5
5
  source: package
6
6
  ---
7
7
 
@@ -96,4 +96,4 @@ When `personal.minimal_output: true`:
96
96
  - Debugging: OK to read more context around one error.
97
97
  - User explicitly asks for full output: show it.
98
98
 
99
- → Detailed patterns: `guidelines/agent-infra/output-patterns.md`
99
+ → Detailed patterns: `docs/guidelines/agent-infra/output-patterns.md`
@@ -6,31 +6,34 @@ description: "When a skill uses external tools — enforce allowlist, deny-by-de
6
6
 
7
7
  # Tool Safety
8
8
 
9
+ ## Core principle
10
+
9
11
  Tools are permissions, not abilities. Every tool access must be declared and reviewable.
10
12
 
11
13
  ## Constraints
12
14
 
13
- - **Deny by default** — no access unless in `allowed_tools`
14
- - **Allowlist only** — names must match tool registry
15
- - **Read-first** — write requires explicit approval
16
- - **No hidden credentials** — no API keys in skill files
17
- - **No arbitrary execution** — adapters have fixed interfaces
18
- - **Audit trail** — tool usage must be observable
15
+ - **Deny by default** — no tool access unless explicitly listed in `allowed_tools`
16
+ - **Allowlist only** — tool names must match the tool registry
17
+ - **Read-first** — prefer read-only actions; write requires explicit approval
18
+ - **No hidden credentials** — tools must not embed API keys or tokens in skill files
19
+ - **No arbitrary execution** — tool adapters have fixed interfaces, not free-form calls
20
+ - **Audit trail** — tool usage should be observable and logged
19
21
 
20
22
  ## When this applies
21
23
 
22
- - Skills declaring `allowed_tools`
23
- - Skills referencing external APIs (GitHub, Jira)
24
- - Runtime execution accessing external services
24
+ - Skills that declare `allowed_tools` in their execution block
25
+ - Skills that reference external APIs (GitHub, Jira, etc.)
26
+ - Any runtime execution that accesses external services
25
27
 
26
28
  ## Escalation
27
29
 
28
- 1. Do NOT use unregistered tools
29
- 2. Flag as registry extension suggestion
30
- 3. Tool must be added to registry before use
30
+ If a skill needs a tool that is not in the registry:
31
+ 1. Do NOT use the tool
32
+ 2. Flag it as a suggestion for registry extension
33
+ 3. The tool must be added to the registry before use
31
34
 
32
- ## Not covered
35
+ ## What this rule does NOT cover
33
36
 
34
- - Internal agent capabilities (not external tools)
35
- - MCP server configuration (`mcp` skill)
36
- - Credential management (environment config)
37
+ - Internal agent capabilities (file reading, code analysis) — these are not external tools
38
+ - MCP server configuration — handled by the `mcp` skill
39
+ - Credential management — handled by environment configuration
@@ -1,8 +1,10 @@
1
1
  ---
2
- type: "always"
3
- description: "UI work never write a component, screen, or partial without existing-ui-audit findings populated in state.ui_audit; the audit is the gate, not a suggestion"
4
- alwaysApply: true
2
+ type: "auto"
3
+ description: "Writing or editing UI components, screens, partials, layouts, design tokens — require existing-ui-audit findings in state.ui_audit before non-trivial UI change; gate, not suggestion"
4
+ alwaysApply: false
5
5
  source: package
6
+ load_context:
7
+ - .agent-src.uncompressed/contexts/communication/rules-auto/ui-audit-gate-mechanics.md
6
8
  ---
7
9
 
8
10
  # UI-Audit Before Build
@@ -50,19 +52,6 @@ Any precondition fails at edit time → stop, reclassify as
50
52
  `ui-improve`, re-enter the gate. Backend-only edits and
51
53
  documentation work were never in scope for this rule.
52
54
 
53
- ## What "audit findings" means
54
-
55
- `state.ui_audit` is a non-empty dict carrying at least one of:
56
-
57
- - `components_found` — `{path, name, kind, similarity?}` inventory
58
- entries from [`existing-ui-audit`](../skills/existing-ui-audit/SKILL.md).
59
- - `greenfield: true` plus `greenfield_decision` ∈
60
- `{scaffold, bare, external_reference}`.
61
- - Legacy `components` alias — back-compat for the same shape.
62
-
63
- `null`, `{}`, or a dict without those keys is **not** findings;
64
- emit `@agent-directive: existing-ui-audit` instead of writing code.
65
-
66
55
  ## What to do when the gate fires
67
56
 
68
57
  1. Stop. Do not open an editor on a component file.
@@ -74,33 +63,30 @@ emit `@agent-directive: existing-ui-audit` instead of writing code.
74
63
  external-reference halt **before** code; record the pick in
75
64
  `state.ui_audit.greenfield_decision`.
76
65
 
66
+ ## What "audit findings" means
67
+
68
+ `state.ui_audit` is a non-empty dict carrying at least one of:
69
+
70
+ - `components_found` — inventory entries from `existing-ui-audit`.
71
+ - `greenfield: true` plus `greenfield_decision` ∈
72
+ `{scaffold, bare, external_reference}`.
73
+ - Legacy `components` alias — back-compat for the same shape.
74
+
75
+ `null`, `{}`, or a dict without those keys is **not** findings —
76
+ the empty dict is rejected on purpose. An audit that finds nothing
77
+ must record either ≥1 `components_found` or the greenfield branch.
78
+
77
79
  ## Failure modes
78
80
 
79
81
  - Writing the component first and "thinking about reuse later".
80
- - Citing a similar-looking component from memory without verifying
81
- it via the audit.
82
- - Treating `state.ui_audit = {}` as "audit ran, found nothing" —
83
- empty dict is rejected on purpose; an audit that finds nothing
84
- must record either ≥1 `components_found` or the greenfield branch.
82
+ - Citing a similar-looking component from memory without verifying.
83
+ - Treating `state.ui_audit = {}` as "audit ran, found nothing".
85
84
  - Bypassing the gate for "just one tile".
86
85
 
87
- ## Interactions
88
-
89
- - [`improve-before-implement`](improve-before-implement.md) runs
90
- first when the request is ambiguous; this rule is the next gate.
91
- - [`ask-when-uncertain`](ask-when-uncertain.md) — "just build it"
92
- does **not** drop the audit; acknowledge, run audit, continue.
93
- - [`directives/ui/audit.py`](../templates/scripts/work_engine/directives/ui/audit.py)
94
- — code-layer twin; this rule covers the cases where the engine
95
- is not in the loop.
96
- - [`existing-ui-audit`](../skills/existing-ui-audit/SKILL.md) — the
97
- skill that produces the findings.
98
-
99
- ## Cloud Behavior
100
-
101
- On cloud surfaces the engine is not shipped, so `state.ui_audit`
102
- does not exist. The Iron Law still applies: take the visible
103
- inventory of files in conversation context as the audit, and
104
- surface a one-line audit summary in the reply before writing the
105
- component. The gate is satisfied by an explicit summary, not by
106
- silently skipping.
86
+ ## Lookup material — see mechanics
87
+
88
+ The full failure-mode catalog, cross-rule interactions, and the
89
+ cloud-surface adaptation live in
90
+ [`contexts/communication/rules-auto/ui-audit-gate-mechanics.md`](../contexts/communication/rules-auto/ui-audit-gate-mechanics.md).
91
+ Pull it whenever the gate fires or the agent is unsure whether a
92
+ recorded `state.ui_audit` qualifies.