@event4u/agent-config 1.19.0 → 1.21.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 (297) hide show
  1. package/.agent-src/commands/agent-handoff.md +14 -10
  2. package/.agent-src/commands/agents.md +1 -1
  3. package/.agent-src/commands/bug-fix.md +1 -1
  4. package/.agent-src/commands/bug-investigate.md +2 -2
  5. package/.agent-src/commands/chat-history/import.md +166 -0
  6. package/.agent-src/commands/chat-history/learn.md +178 -0
  7. package/.agent-src/commands/chat-history/show.md +17 -18
  8. package/.agent-src/commands/chat-history.md +26 -25
  9. package/.agent-src/commands/compress.md +12 -0
  10. package/.agent-src/commands/context/create.md +2 -2
  11. package/.agent-src/commands/context.md +1 -1
  12. package/.agent-src/commands/copilot-agents.md +1 -1
  13. package/.agent-src/commands/council/default.md +21 -12
  14. package/.agent-src/commands/council.md +1 -1
  15. package/.agent-src/commands/create-pr.md +28 -8
  16. package/.agent-src/commands/e2e-heal.md +1 -1
  17. package/.agent-src/commands/e2e-plan.md +1 -1
  18. package/.agent-src/commands/feature/dev.md +3 -3
  19. package/.agent-src/commands/feature.md +1 -1
  20. package/.agent-src/commands/fix/seeder.md +2 -2
  21. package/.agent-src/commands/fix.md +1 -1
  22. package/.agent-src/commands/jira-ticket.md +1 -1
  23. package/.agent-src/commands/judge.md +2 -2
  24. package/.agent-src/commands/memory.md +1 -1
  25. package/.agent-src/commands/mode.md +5 -5
  26. package/.agent-src/commands/module.md +1 -1
  27. package/.agent-src/commands/onboard.md +4 -4
  28. package/.agent-src/commands/optimize/augmentignore.md +1 -1
  29. package/.agent-src/commands/optimize-prompt.md +61 -0
  30. package/.agent-src/commands/optimize.md +1 -1
  31. package/.agent-src/commands/override.md +1 -1
  32. package/.agent-src/commands/review-changes.md +1 -1
  33. package/.agent-src/commands/review-routing.md +1 -1
  34. package/.agent-src/commands/roadmap.md +1 -1
  35. package/.agent-src/commands/set-cost-profile.md +3 -3
  36. package/.agent-src/commands/sync-agent-settings.md +2 -2
  37. package/.agent-src/commands/sync-gitignore.md +1 -1
  38. package/.agent-src/commands/tests/create.md +2 -2
  39. package/.agent-src/commands/tests.md +1 -1
  40. package/.agent-src/commands/threat-model.md +4 -4
  41. package/.agent-src/contexts/authority/commit-mechanics.md +14 -1
  42. package/.agent-src/contexts/authority/destructive-mechanics.md +14 -1
  43. package/.agent-src/contexts/authority/scope-mechanics.md +5 -0
  44. package/.agent-src/contexts/communication/rules-auto/guidelines-mechanics.md +76 -0
  45. package/.agent-src/contexts/communication/rules-auto/skill-quality-mechanics.md +76 -0
  46. package/.agent-src/contexts/communication/rules-auto/slash-command-routing-policy-mechanics.md +4 -4
  47. package/.agent-src/contexts/communication/rules-auto/think-before-action-mechanics.md +98 -0
  48. package/.agent-src/contexts/communication/rules-auto/token-efficiency-mechanics.md +93 -0
  49. package/.agent-src/contexts/communication/rules-auto/user-interaction-mechanics.md +125 -9
  50. package/.agent-src/contexts/execution/autonomy-mechanics.md +44 -0
  51. package/.agent-src/contexts/model-recommendations.md +2 -2
  52. package/.agent-src/contexts/override-system.md +1 -1
  53. package/.agent-src/personas/product-owner.md +2 -2
  54. package/.agent-src/personas/qa.md +1 -1
  55. package/.agent-src/rules/agent-authority.md +5 -6
  56. package/.agent-src/rules/agent-docs.md +11 -53
  57. package/.agent-src/rules/analysis-skill-routing.md +10 -40
  58. package/.agent-src/rules/architecture.md +6 -1
  59. package/.agent-src/rules/artifact-drafting-protocol.md +5 -0
  60. package/.agent-src/rules/artifact-engagement-recording.md +23 -59
  61. package/.agent-src/rules/ask-when-uncertain.md +24 -47
  62. package/.agent-src/rules/augment-portability.md +14 -62
  63. package/.agent-src/rules/augment-source-of-truth.md +10 -1
  64. package/.agent-src/rules/autonomous-execution.md +17 -98
  65. package/.agent-src/rules/capture-learnings.md +9 -80
  66. package/.agent-src/rules/cli-output-handling.md +12 -42
  67. package/.agent-src/rules/command-suggestion-policy.md +25 -73
  68. package/.agent-src/rules/commit-conventions.md +9 -58
  69. package/.agent-src/rules/commit-policy.md +16 -47
  70. package/.agent-src/rules/context-hygiene.md +5 -0
  71. package/.agent-src/rules/direct-answers.md +21 -42
  72. package/.agent-src/rules/docker-commands.md +11 -45
  73. package/.agent-src/rules/docs-sync.md +10 -56
  74. package/.agent-src/rules/downstream-changes.md +5 -0
  75. package/.agent-src/rules/e2e-testing.md +9 -44
  76. package/.agent-src/rules/guidelines.md +13 -75
  77. package/.agent-src/rules/improve-before-implement.md +10 -2
  78. package/.agent-src/rules/language-and-tone.md +35 -69
  79. package/.agent-src/rules/laravel-translations.md +11 -40
  80. package/.agent-src/rules/markdown-safe-codeblocks.md +4 -0
  81. package/.agent-src/rules/minimal-safe-diff.md +4 -0
  82. package/.agent-src/rules/missing-tool-handling.md +4 -0
  83. package/.agent-src/rules/model-recommendation.md +9 -61
  84. package/.agent-src/rules/no-attribution-footers.md +53 -0
  85. package/.agent-src/rules/no-cheap-questions.md +11 -27
  86. package/.agent-src/rules/no-council-references.md +76 -0
  87. package/.agent-src/rules/no-roadmap-references.md +8 -1
  88. package/.agent-src/rules/non-destructive-by-default.md +13 -43
  89. package/.agent-src/rules/onboarding-gate.md +9 -117
  90. package/.agent-src/rules/package-ci-checks.md +10 -37
  91. package/.agent-src/rules/php-coding.md +10 -55
  92. package/.agent-src/rules/preservation-guard.md +9 -0
  93. package/.agent-src/rules/review-routing-awareness.md +9 -97
  94. package/.agent-src/rules/reviewer-awareness.md +8 -83
  95. package/.agent-src/rules/roadmap-progress-sync.md +7 -170
  96. package/.agent-src/rules/role-mode-adherence.md +6 -2
  97. package/.agent-src/rules/rule-type-governance.md +8 -66
  98. package/.agent-src/rules/runtime-safety.md +5 -0
  99. package/.agent-src/rules/scope-control.md +17 -62
  100. package/.agent-src/rules/security-sensitive-stop.md +7 -1
  101. package/.agent-src/rules/size-enforcement.md +6 -1
  102. package/.agent-src/rules/skill-improvement-trigger.md +9 -49
  103. package/.agent-src/rules/skill-quality.md +7 -64
  104. package/.agent-src/rules/slash-command-routing-policy.md +11 -63
  105. package/.agent-src/rules/think-before-action.md +22 -87
  106. package/.agent-src/rules/token-efficiency.md +10 -74
  107. package/.agent-src/rules/token-optimizer-maintenance.md +68 -0
  108. package/.agent-src/rules/tool-safety.md +4 -0
  109. package/.agent-src/rules/ui-audit-gate.md +25 -61
  110. package/.agent-src/rules/upstream-proposal.md +9 -67
  111. package/.agent-src/rules/user-interaction.md +25 -95
  112. package/.agent-src/rules/verify-before-complete.md +1 -1
  113. package/.agent-src/skills/agent-docs-writing/SKILL.md +1 -1
  114. package/.agent-src/skills/ai-council/SKILL.md +69 -5
  115. package/.agent-src/skills/analysis-autonomous-mode/SKILL.md +1 -1
  116. package/.agent-src/skills/analysis-skill-router/SKILL.md +3 -3
  117. package/.agent-src/skills/artisan-commands/SKILL.md +2 -2
  118. package/.agent-src/skills/authz-review/SKILL.md +1 -1
  119. package/.agent-src/skills/aws-infrastructure/SKILL.md +5 -5
  120. package/.agent-src/skills/blast-radius-analyzer/SKILL.md +8 -8
  121. package/.agent-src/skills/bug-analyzer/SKILL.md +5 -5
  122. package/.agent-src/skills/code-refactoring/SKILL.md +4 -4
  123. package/.agent-src/skills/code-review/SKILL.md +2 -2
  124. package/.agent-src/skills/command-writing/SKILL.md +11 -0
  125. package/.agent-src/skills/composer-packages/SKILL.md +2 -2
  126. package/.agent-src/skills/context-authoring/SKILL.md +11 -0
  127. package/.agent-src/skills/context-document/SKILL.md +1 -1
  128. package/.agent-src/skills/copilot-agents-optimization/SKILL.md +23 -0
  129. package/.agent-src/skills/copilot-config/SKILL.md +1 -1
  130. package/.agent-src/skills/dcf-modeling/SKILL.md +89 -0
  131. package/.agent-src/skills/dependency-upgrade/SKILL.md +2 -2
  132. package/.agent-src/skills/devcontainer/SKILL.md +2 -2
  133. package/.agent-src/skills/developer-like-execution/SKILL.md +1 -1
  134. package/.agent-src/skills/docker/SKILL.md +1 -1
  135. package/.agent-src/skills/dto-creator/SKILL.md +1 -1
  136. package/.agent-src/skills/estimate-ticket/SKILL.md +2 -2
  137. package/.agent-src/skills/fe-design/SKILL.md +4 -4
  138. package/.agent-src/skills/feature-planning/SKILL.md +5 -5
  139. package/.agent-src/skills/funnel-analysis/SKILL.md +100 -0
  140. package/.agent-src/skills/laravel/SKILL.md +1 -1
  141. package/.agent-src/skills/laravel-notifications/SKILL.md +5 -5
  142. package/.agent-src/skills/laravel-pennant/SKILL.md +1 -1
  143. package/.agent-src/skills/laravel-pulse/SKILL.md +4 -4
  144. package/.agent-src/skills/laravel-reverb/SKILL.md +2 -2
  145. package/.agent-src/skills/laravel-scheduling/SKILL.md +1 -1
  146. package/.agent-src/skills/md-language-check/SKILL.md +1 -1
  147. package/.agent-src/skills/migration-creator/SKILL.md +7 -7
  148. package/.agent-src/skills/multi-tenancy/SKILL.md +8 -8
  149. package/.agent-src/skills/okr-tree-modeling/SKILL.md +93 -0
  150. package/.agent-src/skills/performance-analysis/SKILL.md +3 -3
  151. package/.agent-src/skills/pest-testing/SKILL.md +6 -6
  152. package/.agent-src/skills/php-service/SKILL.md +2 -2
  153. package/.agent-src/skills/project-analysis-hypothesis-driven/SKILL.md +3 -3
  154. package/.agent-src/skills/project-analysis-react/SKILL.md +1 -1
  155. package/.agent-src/skills/project-analysis-symfony/SKILL.md +1 -1
  156. package/.agent-src/skills/project-analysis-zend-laminas/SKILL.md +2 -2
  157. package/.agent-src/skills/project-analyzer/SKILL.md +4 -4
  158. package/.agent-src/skills/prompt-optimizer/SKILL.md +108 -0
  159. package/.agent-src/skills/readme-reviewer/SKILL.md +1 -1
  160. package/.agent-src/skills/rice-prioritization/SKILL.md +100 -0
  161. package/.agent-src/skills/rule-writing/SKILL.md +33 -0
  162. package/.agent-src/skills/sentry-integration/SKILL.md +1 -1
  163. package/.agent-src/skills/skill-writing/SKILL.md +14 -0
  164. package/.agent-src/skills/subagent-orchestration/SKILL.md +34 -2
  165. package/.agent-src/skills/terraform/SKILL.md +2 -2
  166. package/.agent-src/skills/terragrunt/SKILL.md +8 -8
  167. package/.agent-src/skills/test-performance/SKILL.md +5 -5
  168. package/.agent-src/skills/threat-modeling/SKILL.md +2 -2
  169. package/.agent-src/skills/token-optimizer/SKILL.md +110 -0
  170. package/.agent-src/skills/unit-economics-modeling/SKILL.md +104 -0
  171. package/.agent-src/skills/universal-project-analysis/SKILL.md +1 -1
  172. package/.agent-src/skills/using-git-worktrees/SKILL.md +1 -0
  173. package/.agent-src/templates/AGENTS.md +1 -1
  174. package/.agent-src/templates/agent-settings.md +25 -41
  175. package/.agent-src/templates/contexts/tenant-boundaries.md +2 -2
  176. package/.agent-src/templates/contexts.md +1 -1
  177. package/.agent-src/templates/copilot-instructions.md +21 -0
  178. package/.agent-src/templates/copilot-review-instructions.md +76 -0
  179. package/.agent-src/templates/features.md +1 -1
  180. package/.agent-src/templates/rule.md +127 -0
  181. package/.agent-src/templates/scripts/work_engine/hook_bootstrap.py +7 -5
  182. package/.agent-src/templates/scripts/work_engine/hooks/__init__.py +0 -4
  183. package/.agent-src/templates/scripts/work_engine/hooks/builtin/__init__.py +0 -4
  184. package/.agent-src/templates/scripts/work_engine/hooks/builtin/_chat_history_base.py +7 -51
  185. package/.agent-src/templates/scripts/work_engine/hooks/builtin/chat_history_append.py +1 -2
  186. package/.agent-src/templates/scripts/work_engine/hooks/builtin/chat_history_halt_append.py +1 -2
  187. package/.agent-src/templates/scripts/work_engine/hooks/builtin/memory_visibility.py +2 -3
  188. package/.agent-src/templates/skill.md +30 -1
  189. package/.claude-plugin/marketplace.json +11 -4
  190. package/AGENTS.md +71 -3
  191. package/CHANGELOG.md +180 -3
  192. package/README.md +24 -23
  193. package/config/agent-settings.template.yml +63 -23
  194. package/config/gitignore-block.txt +11 -4
  195. package/docs/architecture.md +84 -3
  196. package/docs/catalog.md +23 -11
  197. package/docs/contracts/adr-chat-history-split.md +10 -1
  198. package/docs/contracts/agent-memory-contract.md +1 -1
  199. package/docs/contracts/command-clusters.md +1 -1
  200. package/docs/contracts/context-paths.md +2 -1
  201. package/docs/contracts/cross-wing-handoff.md +133 -0
  202. package/docs/contracts/file-ownership-matrix.json +678 -609
  203. package/docs/contracts/hook-architecture-v1.md +8 -1
  204. package/docs/contracts/iron-law-overrides.txt +25 -0
  205. package/docs/contracts/kernel-membership.md +273 -0
  206. package/docs/contracts/load-context-schema.md +26 -11
  207. package/docs/contracts/memory-visibility-v1.md +8 -24
  208. package/docs/contracts/pilot/agent-authority.md +24 -0
  209. package/docs/contracts/pilot/direct-answers.md +70 -0
  210. package/docs/contracts/pilot/language-and-tone.md +63 -0
  211. package/docs/contracts/rule-classification.md +170 -0
  212. package/docs/contracts/rule-router.md +153 -0
  213. package/docs/customization.md +18 -7
  214. package/docs/decisions/ADR-001-kernel-swap-deferred.md +109 -0
  215. package/docs/decisions/ADR-002-kernel-bucket-overrides.md +124 -0
  216. package/docs/decisions/ADR-rule-kernel-and-router.md +122 -0
  217. package/docs/getting-started.md +19 -27
  218. package/docs/guidelines/agent-infra/ask-when-uncertain-demos.md +1 -1
  219. package/docs/guidelines/agent-infra/roadmap-progress-mechanics.md +176 -0
  220. package/docs/guidelines/agent-infra/rule-type-governance.md +73 -0
  221. package/docs/guidelines/agent-infra/size-and-scope.md +13 -2
  222. package/docs/guidelines/agent-infra/skill-quality-checklist.md +119 -0
  223. package/docs/guidelines/augment-portability-patterns.md +68 -0
  224. package/docs/guidelines/php/php-coding-patterns.md +62 -0
  225. package/docs/hook-payload-capture.md +221 -0
  226. package/docs/migrations/commands-1.15.0.md +17 -12
  227. package/docs/skills-catalog.md +5 -4
  228. package/llms.txt +4 -3
  229. package/package.json +1 -1
  230. package/scripts/_p43_bodies.py +235 -0
  231. package/scripts/_p43_compress.py +118 -0
  232. package/scripts/_p4_migrate.py +199 -0
  233. package/scripts/_pilot_council_question.py +57 -0
  234. package/scripts/_pilot_measure.py +53 -0
  235. package/scripts/agent-config +1 -1
  236. package/scripts/ai_council/_default_prices.py +4 -4
  237. package/scripts/ai_council/clients.py +1 -1
  238. package/scripts/ai_council/modes.py +3 -4
  239. package/scripts/ai_council/pricing.py +10 -9
  240. package/scripts/ai_council/session.py +107 -5
  241. package/scripts/build_linear_digest.py +3 -5
  242. package/scripts/build_rule_trigger_matrix.py +1 -9
  243. package/scripts/chat_history.py +952 -596
  244. package/scripts/check_always_budget.py +39 -6
  245. package/scripts/check_compressed_paths.py +213 -0
  246. package/scripts/check_compression.py +15 -0
  247. package/scripts/check_context_paths.py +1 -0
  248. package/scripts/check_council_layout.py +105 -0
  249. package/scripts/check_council_references.py +145 -0
  250. package/scripts/check_portability.py +2 -0
  251. package/scripts/check_references.py +14 -2
  252. package/scripts/check_token_optimizer_freshness.py +131 -0
  253. package/scripts/compile_router.py +148 -0
  254. package/scripts/compress.py +219 -11
  255. package/scripts/council_cli.py +63 -9
  256. package/scripts/council_prune.py +81 -0
  257. package/scripts/count_token_optimizer_usage.sh +54 -0
  258. package/scripts/hook_manifest.yaml +33 -0
  259. package/scripts/hooks/augment-chat-history.sh +10 -0
  260. package/scripts/hooks/cowork-dispatcher.sh +98 -0
  261. package/scripts/hooks/dispatch_hook.py +35 -0
  262. package/scripts/hooks_status.py +12 -1
  263. package/scripts/install-hooks.sh +2 -2
  264. package/scripts/install.sh +81 -2
  265. package/scripts/iron_law_sha.py +98 -0
  266. package/scripts/lint_handoffs.py +214 -0
  267. package/scripts/lint_hook_manifest.py +2 -1
  268. package/scripts/lint_load_context.py +35 -5
  269. package/scripts/measure_rule_budget.py +314 -0
  270. package/scripts/prototype_lint_contradictions.py +150 -0
  271. package/scripts/redact_hook_capture.py +148 -0
  272. package/scripts/schemas/rule.schema.json +55 -6
  273. package/scripts/schemas/skill.schema.json +5 -0
  274. package/scripts/skill_linter.py +359 -7
  275. package/scripts/smoke_path_resolution.py +93 -0
  276. package/scripts/update_prices.py +3 -3
  277. package/scripts/validate_frontmatter.py +41 -1
  278. package/.agent-src/commands/chat-history/checkpoint.md +0 -126
  279. package/.agent-src/commands/chat-history/clear.md +0 -103
  280. package/.agent-src/commands/chat-history/resume.md +0 -183
  281. package/.agent-src/contexts/communication/rules-auto/artifact-engagement-recording-mechanics.md +0 -72
  282. package/.agent-src/contexts/communication/rules-auto/augment-portability-mechanics.md +0 -79
  283. package/.agent-src/contexts/communication/rules-auto/cli-output-handling-mechanics.md +0 -87
  284. package/.agent-src/contexts/communication/rules-auto/command-suggestion-policy-mechanics.md +0 -62
  285. package/.agent-src/contexts/communication/rules-auto/docs-sync-mechanics.md +0 -78
  286. package/.agent-src/contexts/communication/rules-auto/package-ci-checks-mechanics.md +0 -85
  287. package/.agent-src/contexts/communication/rules-auto/review-routing-awareness-mechanics.md +0 -65
  288. package/.agent-src/contexts/communication/rules-auto/roadmap-progress-sync-mechanics.md +0 -78
  289. package/.agent-src/contexts/communication/rules-auto/ui-audit-gate-mechanics.md +0 -53
  290. package/.agent-src/rules/chat-history-cadence.md +0 -143
  291. package/.agent-src/rules/chat-history-ownership.md +0 -124
  292. package/.agent-src/rules/chat-history-visibility.md +0 -97
  293. package/.agent-src/templates/scripts/work_engine/hooks/builtin/chat_history_heartbeat.py +0 -50
  294. package/.agent-src/templates/scripts/work_engine/hooks/builtin/chat_history_turn_check.py +0 -49
  295. package/scripts/check_phase_coupling.py +0 -148
  296. /package/{docs → .agent-src/contexts}/contracts/artifact-engagement-flow.md +0 -0
  297. /package/{docs → .agent-src/contexts}/contracts/command-suggestion-flow.md +0 -0
@@ -2,89 +2,18 @@
2
2
  type: "auto"
3
3
  tier: "2a"
4
4
  description: "After completing a task where a repeated mistake or successful pattern appeared — capture as rule or skill"
5
- alwaysApply: false
6
5
  source: package
6
+ triggers:
7
+ - phrase: "after completing a task"
8
+ - keyword: "learning"
9
+ - keyword: "lesson"
10
+ routes_to:
11
+ - "skill:learning-to-rule-or-skill"
7
12
  ---
8
13
 
9
14
  # Capture Learnings
10
15
 
11
- When a repeated mistake, successful pattern, or new constraint appears,
12
- evaluate whether to capture as **rule** or **skill**.
16
+ **Iron Law.** After a task, capture repeated mistakes / successful patterns as a rule or skill never lose the learning.
13
17
 
14
- ## Promotion Gate
15
-
16
- A learning may be promoted to rule/skill ONLY if ALL gates pass:
17
-
18
- | Gate | Question | Must be YES |
19
- |---|---|---|
20
- | Repetition | Occurred at least twice OR clearly generalizable? | ✅ |
21
- | Impact | Improves correctness, reliability, or consistency? | ✅ |
22
- | Failure pattern | Prevents a real, observed failure? | ✅ |
23
- | Non-duplication | No existing rule/skill/guideline covers this? | ✅ |
24
- | Scope fit | Fits rule (constraint), skill (workflow), or guideline (convention)? | ✅ |
25
- | Minimal | Update existing preferred over creation? | Checked |
26
-
27
- **Reject immediately if:**
28
- - Occurred only once and is not clearly generalizable
29
- - Similar guidance already exists (update instead)
30
- - Baseline model knowledge or standard tool usage
31
- - Vague frustration without concrete failure pattern
32
-
33
- ## Triggers
34
-
35
- - Mistake that happened 2+ times
36
- - Pattern that improved outcome and should be reused
37
- - Missing constraint that caused issues
38
- - **User frustration or complaint** — extract the underlying failure pattern, don't ignore or defend
39
- - **New skill/rule/guideline created** — evaluate if it should be contributed upstream (→ `upstream-proposal` rule)
40
- - **Significant improvement to existing skill/rule** — consider upstream contribution
41
-
42
- ## Do NOT capture
43
-
44
- - One-off problems
45
- - Vague frustrations without concrete consequence
46
- - Content already covered by existing guidance
47
-
48
- ## Rule vs Skill
49
-
50
- - **Rule** → always-apply constraint ("never X", "always Y")
51
- - **Skill** → repeatable workflow with steps ("when X, do 1-5")
52
- - **Update** → existing guidance covers topic → extend, don't duplicate
53
-
54
- ## How
55
-
56
- - Smallest effective change
57
- - Update existing over creating duplicates
58
- - Full workflow: `learning-to-rule-or-skill` skill
59
-
60
- ## Where learnings are written
61
-
62
- Captured learnings live in the **consumer project's** `agents/learnings/`
63
- directory, one file per learning:
64
-
65
- ```
66
- agents/learnings/<YYYY-MM-DD>-<kebab-slug>.md
67
- ```
68
-
69
- Minimum fields (markdown with a small YAML frontmatter):
70
-
71
- ```yaml
72
- ---
73
- slug: <same as filename>
74
- captured: <ISO date>
75
- occurrences: <integer, ≥2 or note "one-off, clearly generalizable">
76
- type_hint: rule | skill | guideline | update
77
- scope_hint: project | package
78
- ---
79
- ```
80
-
81
- Body: 1-paragraph **pattern** (not anecdote) + 1 concrete example.
82
-
83
- A learning file is the input to `learning-to-rule-or-skill`, which
84
- produces a proposal draft under `agents/proposals/`. The proposal is
85
- then gated by `scripts/check_proposal.py`; see
86
- [`self-improvement-pipeline`](../../docs/guidelines/agent-infra/self-improvement-pipeline.md).
87
-
88
- The `agents/learnings/` and `agents/proposals/` directories are
89
- consumer-owned — the package ships templates and schemas, never the
90
- data.
18
+ Body migrated to `skill:learning-to-rule-or-skill` (per P4 of `road-to-kernel-and-router.md`).
19
+ Trigger-set above activates this routing under the `balanced` and `full` profiles.
@@ -1,51 +1,21 @@
1
1
  ---
2
2
  type: "auto"
3
3
  tier: "2a"
4
- alwaysApply: false
5
4
  description: "Running CLI commands that produce verbose output — git, tests, linters, docker, build tools, artisan, npm, composer. Wrap with rtk when installed; tail/grep is fallback."
6
5
  source: package
7
- load_context:
8
- - .agent-src.uncompressed/contexts/communication/rules-auto/cli-output-handling-mechanics.md
6
+ triggers:
7
+ - keyword: "git"
8
+ - keyword: "phpstan"
9
+ - keyword: "rector"
10
+ - keyword: "phpunit"
11
+ - keyword: "composer"
12
+ routes_to:
13
+ - "skill:rtk-output-filtering"
9
14
  ---
10
15
 
11
- # Development Efficiency
16
+ # Cli Output Handling
12
17
 
13
- Loaded for code, tests, quality tools, CLI, analysis. Communication / response style always-loaded `token-efficiency`.
18
+ **Iron Law.** Wrap verbose CLI output with `rtk` when installed; fall back to `tail`/`grep` only when missing.
14
19
 
15
- ## Iron Law rtk first, tail/grep fallback
16
-
17
- ```
18
- IF `rtk` IS INSTALLED, WRAP VERBOSE COMMANDS WITH rtk.
19
- USE tail / grep / cat ONLY AS FALLBACK WHEN rtk HAS NO MATCHING SUBCOMMAND.
20
- NEVER PIPE A STILL-RUNNING LONG COMMAND THROUGH tail — IT BUFFERS TO EOF.
21
- ```
22
-
23
- Detection: `rtk_installed: true` in `.agent-settings.yml`, or `which rtk`
24
- exits 0. Caching the result for the session is fine.
25
-
26
- | Verbose command | Use | Fallback (no rtk) |
27
- |---|---|---|
28
- | CI-style suites, full test runs | `rtk err <cmd>` — only errors/warnings | redirect → tail → grep |
29
- | Unit tests | `rtk test <cmd>` — only failures | redirect → tail → grep |
30
- | `git status`/`log`/`diff` | `rtk git <subcmd>` | plain |
31
- | `gh pr list`, `gh run view` | `rtk gh <subcmd>` | plain |
32
- | Generic noisy command | `rtk summary <cmd>` or `rtk err <cmd>` | redirect → tail |
33
-
34
- For the full rtk subcommand catalog and project-local filter setup → see
35
- the `rtk-output-filtering` skill.
36
-
37
- ## Lookup material — see mechanics
38
-
39
- Codebase-navigation tips, the redirect-summarize-target fallback
40
- pattern (with the three-step `tail`/`grep` recipe), the general rules
41
- (exit code first, summary line, targeted `grep`, read-once-act-move-on,
42
- iterative fixing), and the CLI-over-MCP catalog all live in
43
- [`contexts/communication/rules-auto/cli-output-handling-mechanics.md`](../contexts/communication/rules-auto/cli-output-handling-mechanics.md).
44
- Pull it whenever a verbose command is about to run without an `rtk`
45
- match.
46
-
47
- ## Exceptions
48
-
49
- - **Small output** (< 30 lines): Read directly, no redirect needed.
50
- - **Debugging**: OK to read more context around the specific error.
51
- - **User asks** for full output: Show it.
20
+ Body migrated to `skill:rtk-output-filtering` (per P4 of `road-to-kernel-and-router.md`).
21
+ Trigger-set above activates this routing under the `balanced` and `full` profiles.
@@ -2,28 +2,22 @@
2
2
  type: "auto"
3
3
  tier: "mechanical-already"
4
4
  description: "User prompt without /command but matching an eligible slash command — surface matches as numbered options with as-is escape hatch; never auto-executes, user always picks"
5
- alwaysApply: false
6
5
  source: package
6
+ triggers:
7
+ - phrase: "free-form prompt"
8
+ - phrase: "command suggestion"
9
+ routes_to:
10
+ - "contract:command-suggestion-flow"
7
11
  load_context:
8
- - .agent-src.uncompressed/contexts/communication/rules-auto/command-suggestion-policy-mechanics.md
12
+ - "../contexts/contracts/command-suggestion-flow.md"
9
13
  ---
10
14
 
11
- # Command Suggestion
15
+ # Command Suggestion Policy
12
16
 
13
- When the user's prompt matches an eligible slash command, surface it
14
- as a **numbered option** alongside an "as-is" escape hatch the
15
- "run prompt as-is" option is **always last** and **always present**,
16
- never omitted. The user always picks. **Nothing auto-executes.** The
17
- suggestion layer is a read-only shortcut *finder*, not an invocation
18
- path.
19
-
20
- The deterministic engine lives in `scripts/command_suggester/`. The
21
- locked eligibility table lives in
22
- [`agents/contexts/command-suggestion-eligibility.md`](../../agents/contexts/command-suggestion-eligibility.md).
23
- The scoring contract and hardening list live in
24
- [`docs/contracts/adr-command-suggestion.md`](../../docs/contracts/adr-command-suggestion.md)
25
- and
26
- [`docs/contracts/command-suggestion-flow.md`](../../docs/contracts/command-suggestion-flow.md).
17
+ When the user's prompt matches an eligible slash command, surface it as a
18
+ **numbered option** alongside an "as-is" escape hatch. The user always
19
+ picks. **Nothing auto-executes.** Flow contract + senior-gate map:
20
+ [`contexts/contracts/command-suggestion-flow.md`](../contexts/contracts/command-suggestion-flow.md).
27
21
 
28
22
  ## Iron Law — never auto-execute
29
23
 
@@ -31,64 +25,22 @@ and
31
25
  SUGGEST. NEVER INVOKE. THE USER PICKS, ALWAYS.
32
26
  ```
33
27
 
34
- A suggestion block emits options. It does **not** start a command
35
- flow. The user picking option N triggers `slash-command-routing-policy` on the
36
- **next** turn — with all the command's own halts intact.
37
-
38
- ## When to fire
39
-
40
- On a user turn that matches **all** of the following:
41
-
42
- 1. The message does **not** start with an explicit `/command` (those
43
- bypass suggestion entirely — see `slash-command-routing-policy`).
44
- 2. `commands.suggestion.enabled` is `true` (default).
45
- 3. The user has not issued `/command-suggestion-off` in this conversation.
46
- 4. No clarification is owed for the same turn (per
47
- `ask-when-uncertain` — clarification wins; suggestion can fire next turn).
48
- 5. No active engine flow is mid-halt (e.g. an `/implement-ticket`
49
- step waiting on the user — the active flow has the floor).
50
- 6. The matcher returns at least one match above the effective
51
- `confidence_floor` after rank + cooldown + anti-noise.
52
-
53
- When all six hold, the suggestion block is the **first and only**
54
- thing the agent emits that turn. No tools, no edits, no other prose.
28
+ A suggestion block emits options. It does **not** start a command flow.
29
+ The "run as-is" option is **always present**, **always last**, never
30
+ removed.
55
31
 
56
32
  ## Subordination — when to stay silent
57
33
 
58
34
  The suggestion rule is **junior** to:
59
35
 
60
- - `scope-control` — never surfaces a git-op command behind a
61
- permission gate the user already declined this turn.
62
- - `ask-when-uncertain` — if a clarification is owed, the
63
- clarification is the only question; suggestion suppresses for
64
- that turn.
65
- - `verify-before-complete` — suggestion does not interrupt an
66
- evidence-gate verification that's already running.
67
- - Any active role-mode contract (`role-mode-adherence`).
68
- - Any active engine halt (`/implement-ticket`, `/work`, etc.).
69
-
70
- On any conflict → suggestion stays silent. Zero output. The user's
71
- prompt is processed as it would be without this rule.
72
-
73
- ## Cloud Behavior
74
-
75
- On cloud surfaces (Claude.ai Web, Skills API) the rule is **inert**
76
- unless the suggester package is shipped in the bundle. Treat
77
- `commands.suggestion.enabled` as `false` when the engine is not
78
- available — degrade silently, never crash the turn.
79
-
80
- ## Mechanics — output format, anti-noise, what this rule does NOT do
81
-
82
- The exact rendered options block, the `Recommendation:` rules, the
83
- `max_options` cap, the `rank.py` anti-noise filters, and the
84
- "what this rule does NOT do" catalog live in
85
- [`contexts/communication/rules-auto/command-suggestion-policy-mechanics.md`](../contexts/communication/rules-auto/command-suggestion-policy-mechanics.md).
86
-
87
- ## Interactions
88
-
89
- - [`slash-command-routing-policy`](slash-command-routing-policy.md) — explicit `/command` skips suggestion entirely.
90
- - [`user-interaction`](user-interaction.md) — numbered-options Iron Law and single-source recommendation.
91
- - [`ask-when-uncertain`](ask-when-uncertain.md) — clarification wins on conflict.
92
- - [`scope-control`](scope-control.md) — git-op gates outrank suggestion.
93
- - [`role-mode-adherence`](role-mode-adherence.md) — active mode contract outranks suggestion.
94
- - [`agents/contexts/command-suggestion-eligibility.md`](../../agents/contexts/command-suggestion-eligibility.md) — locked eligibility table.
36
+ - [`scope-control`](scope-control.md) — never surfaces a git-op command
37
+ behind a permission gate the user already declined.
38
+ - [`ask-when-uncertain`](ask-when-uncertain.md) — clarification wins on
39
+ conflict; suggestion suppresses for that turn.
40
+ - [`verify-before-complete`](verify-before-complete.md) — suggestion does
41
+ not interrupt an evidence-gate verification.
42
+ - [`role-mode-adherence`](role-mode-adherence.md) active role-mode
43
+ contract outranks suggestion.
44
+ - Any active engine halt (`/implement-ticket`, `/work`).
45
+
46
+ On any conflict → suggestion stays silent.
@@ -1,68 +1,19 @@
1
1
  ---
2
2
  type: "auto"
3
3
  tier: "2a"
4
- alwaysApply: false
5
4
  description: "Git commit message format, branch naming, conventional commits, committing, pushing, or creating pull requests"
6
5
  source: package
6
+ triggers:
7
+ - keyword: "commit"
8
+ - keyword: "branch"
9
+ - phrase: "conventional commits"
10
+ routes_to:
11
+ - "skill:conventional-commits-writing"
7
12
  ---
8
13
 
9
14
  # Commit Conventions
10
15
 
11
- All commit messages and squash/merge titles must follow [Conventional Commits](https://www.conventionalcommits.org/en/v1.0.0/).
16
+ **Iron Law.** Use Conventional Commits (`feat:`, `fix:`, `chore:` …); branches `<type>/<short-slug>`; never invent your own format.
12
17
 
13
- ## Format
14
-
15
- - With scope: `<type>(<scope>): <description>`
16
- - Without scope: `<type>: <description>` (omit parentheses when no scope)
17
- - **Always English** — regardless of user's language.
18
- - **Imperative mood** ("add feature", not "added feature").
19
- - **First line max 72 characters.**
20
-
21
- ## Types
22
-
23
- | Type | When |
24
- |---|---|
25
- | `feat` | New user-facing functionality |
26
- | `fix` | Bug fix |
27
- | `refactor` | Code/structure change, no behavior change |
28
- | `docs` | Documentation only |
29
- | `test` | Tests only |
30
- | `chore` | Maintenance (deps, configs, tooling, cleanup) |
31
- | `ci` | CI/CD and workflow changes |
32
- | `style` | Code style (formatting, no logic change) |
33
- | `perf` | Performance improvement |
34
- | `build` | Build tooling / packaging changes |
35
-
36
- ## Scope
37
-
38
- - Use the **Jira ticket ID** as scope when the branch contains one (e.g. `DEV-1234`).
39
- - Otherwise use a short module or area name (e.g. `api`, `auth`, `skills`).
40
- - Scope is optional — only add when it improves clarity.
41
-
42
- ## Breaking changes
43
-
44
- Mark explicitly with `!` after type/scope or `BREAKING CHANGE:` in footer:
45
-
46
- ```
47
- feat(api)!: rename invoice status values
48
- refactor(auth)!: remove legacy session flow
49
- ```
50
-
51
- ## Commit splitting
52
-
53
- If a change mixes unrelated concerns, split into multiple commits.
54
- Do NOT hide bug fixes, CI work, docs, and refactors in one commit.
55
-
56
- ## Examples
57
-
58
- ```
59
- feat(DEV-1234): add absence type filter to working time report
60
- fix(DEV-1234): handle null value in equipment import
61
- test(DEV-1234): add component test for working time controller
62
- refactor: extract user sync logic into dedicated service
63
- chore: update PHP quality package to 2.1.0
64
- ci(lint): add skill-lint workflow
65
- docs(roadmap): add phase 3 implementation plan
66
- ```
67
-
68
- → Full type selection rules and anti-patterns: see guideline `docs/guidelines/php/git.md`.
18
+ Body migrated to `skill:conventional-commits-writing` (per P4 of `road-to-kernel-and-router.md`).
19
+ Trigger-set above activates this routing under the `balanced` and `full` profiles.
@@ -5,16 +5,11 @@ description: "Commit policy — never commit and never ask about committing unle
5
5
  alwaysApply: true
6
6
  source: package
7
7
  load_context:
8
- - .agent-src.uncompressed/contexts/authority/commit-mechanics.md
8
+ - ../contexts/authority/commit-mechanics.md
9
9
  ---
10
10
 
11
11
  # Commit Policy
12
12
 
13
- Local commits do not change remote state, but committing prematurely
14
- makes review harder. This is the **canonical** rule for committing,
15
- referenced by [`autonomous-execution`](autonomous-execution.md),
16
- [`scope-control`](scope-control.md), and the roadmap commands.
17
-
18
13
  ## The Iron Law
19
14
 
20
15
  ```
@@ -22,61 +17,35 @@ NEVER COMMIT. NEVER ASK ABOUT COMMITTING.
22
17
  EXCEPTIONS ARE EXPLICIT, NOT INFERRED.
23
18
  ```
24
19
 
25
- Applies regardless of `personal.autonomy`, conversation momentum, or
26
- "but it's a clean stopping point". Default is **no commit, no
27
- question**.
20
+ Applies regardless of `personal.autonomy`, conversation momentum, or "clean stopping point". Default: **no commit, no question**.
28
21
 
29
22
  ## Exceptions — when committing IS allowed
30
23
 
31
- Exactly four ways the agent may commit:
24
+ Exactly four:
32
25
 
33
- 1. **User says so this turn** — explicit phrase like "commit this now",
34
- "go ahead and commit". Permission is for **this commit only**, not
35
- standing.
36
- 2. **Standing instruction not yet revoked** user said earlier in
37
- the conversation "commit after every phase" or similar, and has not
38
- revoked it. Cache and honor.
39
- 3. **Commit command invoked** — `/commit` (with confirmation) or
40
- `/commit-in-chunks` (auto-split, no confirmation).
41
- 4. **Roadmap authorization** — the roadmap file lists explicit commit
42
- steps and the user invoked roadmap execution.
26
+ 1. **User says so this turn** — "commit this now", "go ahead and commit". This commit only, not standing.
27
+ 2. **Standing instruction not yet revoked** — "commit after every phase" earlier in the conversation; cache and honor.
28
+ 3. **Commit command invoked** — `/commit` (with confirmation) or `/commit:in-chunks` (auto-split, no confirmation).
29
+ 4. **Roadmap authorization** roadmap file lists explicit commit steps and the user invoked roadmap execution.
43
30
 
44
- Anything else → no commit. Hard Floor (bulk deletions, infra changes)
45
- still fires on top of any exception — see
46
- [`commit-mechanics`](../contexts/authority/commit-mechanics.md) for
47
- the diff triggers and the roadmap-authorized commit flow.
31
+ Anything else → no commit. Hard Floor (bulk deletions, infra changes) still fires on top of any exception — see [`commit-mechanics`](../contexts/authority/commit-mechanics.md) for diff triggers and roadmap-authorized commit flow.
48
32
 
49
33
  ## NEVER ask about committing
50
34
 
51
- Asking "should I commit this?", "do we want to commit?", or any
52
- variant is **forbidden**. The user invokes a command or says so
53
- explicitly. Don't surface a commit option in numbered-options blocks
54
- unless the rest of the message would be incomplete without it.
35
+ "Should I commit this?" / "do we want to commit?" — **forbidden**. The user invokes a command or says so explicitly. Don't surface a commit option in numbered-options blocks unless the rest of the message would be incomplete without it.
55
36
 
56
- Quoted commit phrases (chat-log paste, log excerpt, roadmap snippet)
57
- are **not** permission — see
58
- [`commit-mechanics`](../contexts/authority/commit-mechanics.md)
59
- § Speech-act check.
37
+ Quoted commit phrases (chat-log paste, log excerpt, roadmap snippet) are **not** permission — see [`commit-mechanics § Speech-act check`](../contexts/authority/commit-mechanics.md).
60
38
 
61
39
  ## NEVER write commit steps into roadmaps unsolicited
62
40
 
63
- When **creating** a roadmap (via `/roadmap-create`,
64
- `/feature-roadmap`, or any roadmap-producing flow), do **not** include
65
- commit steps unless the user explicitly requested them. Commits are a
66
- delivery decision; roadmaps plan **work**.
41
+ When **creating** a roadmap (`/roadmap-create`, `/feature-roadmap`, any roadmap-producing flow) — do **not** include commit steps unless the user explicitly requested them. Commits are a delivery decision; roadmaps plan **work**.
67
42
 
68
- If the user explicitly wants commit steps in the roadmap, write them
69
- clearly and unambiguously (e.g. "Commit phase X: chore: …").
43
+ If the user explicitly wants commit steps, write them clearly (e.g. "Commit phase X: chore: …").
70
44
 
71
45
  ## See also
72
46
 
73
- - [`autonomous-execution`](autonomous-execution.md) — when to suppress
74
- trivial questions; this rule survives the suppression.
75
- - [`no-cheap-questions`](no-cheap-questions.md) — commit asks are
76
- cheap by construction; this rule is the canonical Iron Law, the
77
- cheap-questions rule cites it and refuses to surface the option.
78
- - [`scope-control`](scope-control.md) — git-ops permission gate
79
- (push, merge, branch, PR, tag stay separately permission-gated).
47
+ - [`autonomous-execution`](autonomous-execution.md) — trivial-question suppression; this rule survives the suppression.
48
+ - [`no-cheap-questions`](no-cheap-questions.md) — commit asks are cheap by construction; this rule is the canonical Iron Law.
49
+ - [`scope-control`](scope-control.md) — git-ops permission gate (push, merge, branch, PR, tag).
80
50
  - [`/commit`](../commands/commit.md) — split and commit with confirmation.
81
- - [`/commit-in-chunks`](../commands/commit-in-chunks.md) — auto-split
82
- and commit without confirmation.
51
+ - [`/commit:in-chunks`](../commands/commit/in-chunks.md) — auto-split, no confirmation.
@@ -4,6 +4,11 @@ tier: "1"
4
4
  alwaysApply: false
5
5
  description: "When debugging, fixing errors, or running long conversations — 3-failure stop rule, tool-loop detection, fresh-chat triggers"
6
6
  source: package
7
+ triggers:
8
+ - intent: "long conversation"
9
+ - intent: "tool loop"
10
+ - intent: "fresh chat"
11
+ - keyword: "3-failure"
7
12
  ---
8
13
 
9
14
  # Context Hygiene
@@ -8,8 +8,7 @@ source: package
8
8
 
9
9
  # Direct Answers
10
10
 
11
- Three Iron Laws govern every reply. They override conversation
12
- momentum, politeness defaults, and the urge to fill space.
11
+ Three Iron Laws govern every reply.
13
12
 
14
13
  ## Iron Law 1 — No Flattery
15
14
 
@@ -19,11 +18,10 @@ NEVER PRAISE THE USER'S IDEA TO MAKE THEM HAPPY.
19
18
  ANSWER THE SUBSTANCE. SHIP THE TRUTH.
20
19
  ```
21
20
 
22
- - No positive adjectives about user, question, idea, or work product as opener.
23
- - No subjective judgments on user's code/decisions ("nice approach", "boring") unless evaluation was asked.
24
- - "Good catch" / "you're right" only when literally true and load-bearing.
25
- - Acknowledge mistakes without performative apologies — one sentence, switch behavior.
26
- - Failure mode — praise hedging bad news; drop the cushion, deliver the news.
21
+ - No positive-adjective opener about user / question / idea / work.
22
+ - No subjective judgment on user code unless evaluation was asked.
23
+ - "Good catch" / "you're right" only when literally true.
24
+ - Mistakes — one-sentence acknowledge, switch behavior, no apology theatre.
27
25
 
28
26
  ## Iron Law 2 — No Invented Facts (severity-tiered)
29
27
 
@@ -33,16 +31,14 @@ THE MORE LOAD-BEARING THE CLAIM, THE HARDER YOU VERIFY.
33
31
  WHEN VERIFICATION IS NOT WORTH THE COST → ASK.
34
32
  ```
35
33
 
36
- | Severity | Required action |
34
+ | Severity | Action |
37
35
  |---|---|
38
- | **High — load-bearing** (file paths, signatures, version numbers, security claims, "this test passes") | MUST verify with `view`, `grep`, `codebase-retrieval`, or fresh command output. Too expensive → ask. |
39
- | **Medium — project-shape** ("uses X for Y", conventions, file location) | Verify if one tool call reaches it; otherwise hedge: *"I'd guess X — not checked"*. |
40
- | **Low — well-known idioms** (generic language/framework idioms, public APIs) | Inference acceptable. Mark as inference if not 100% sure. |
36
+ | **High** — load-bearing (paths, signatures, versions, security, "this passes") | Verify with `view` / `grep` / `codebase-retrieval` / fresh output. Too expensive → ask. |
37
+ | **Medium** — project-shape (conventions, file location) | One-tool-call verify, else hedge: *"I'd guess X — not checked"*. |
38
+ | **Low** — well-known idioms | Inference OK; mark as inference if not 100% sure. |
41
39
 
42
- Examples + hedge-language patterns:
43
- [`asking-and-brevity-examples`](../../docs/guidelines/agent-infra/asking-and-brevity-examples.md#direct-answers--severity-tiered-claim-examples).
44
- Override: "just guess", "rough estimate is fine", "skip the verify"
45
- → drop to Low for that turn.
40
+ Override: "just guess" / "rough estimate" / "skip verify" → drop to Low for that turn.
41
+ Examples + hedge patterns: [`asking-and-brevity-examples § severity`](../docs/guidelines/agent-infra/asking-and-brevity-examples.md#direct-answers--severity-tiered-claim-examples).
46
42
 
47
43
  ## Iron Law 3 — Brevity by Default
48
44
 
@@ -51,41 +47,24 @@ THE SHORTEST REPLY THAT FULLY ANSWERS THE QUESTION IS THE RIGHT REPLY.
51
47
  LONG ANSWERS ARE A FAILURE MODE, NOT A SIGN OF EFFORT.
52
48
  ```
53
49
 
54
- - Skip restating the user's question.
55
- - Skip announcing intent ("Let me…", "I will now…") — just do.
50
+ - Skip restating the question; skip "Let me…" intent announcements.
56
51
  - Skip explaining tool use — the call result speaks.
57
52
  - Skip post-hoc summary unless rechecking a decision.
58
- - Multi-step → bullets, not paragraphs.
59
- - One-true-answer question → one sentence + the answer.
53
+ - Multi-step → bullets. One-true-answer → one sentence.
60
54
 
61
- `token-efficiency` covers the loop side; this rule covers per-reply
62
- length. **Never overrides** `user-interaction` (numbered options stay)
63
- or command-mandated steps.
55
+ Never overrides `user-interaction` (numbered options stay) or command-mandated steps.
64
56
 
65
57
  ## Emoji Scope — functional markers only
66
58
 
67
- **Whitelist:** `📒` (chat-history heartbeat, verbatim per
68
- `chat-history-visibility`); mode markers from `role-mode-adherence`;
69
- CLI status `❌` / `✅` / `⚠️` (two-space rule from `language-and-tone`);
70
- roadmap checkboxes `[x]` / `[~]` / `[-]`.
59
+ **Whitelist:** mode markers (`role-mode-adherence`); CLI status `❌` / `✅` / `⚠️`; roadmap checkboxes `[x]` / `[~]` / `[-]`.
60
+ **Blacklist:** opening flair (✨, 🚀, 🎉, 💡, 🔥, 👍); empathy (❤️, 🤗, 😊); section dividers; reaction emojis. Unsure → blacklist.
71
61
 
72
- **Blacklist (never in prose):** opening flair (✨, 🚀, 🎉, 💡, 🔥, 👍);
73
- empathy (❤️, 🤗, 😊); section dividers, headline ornaments, reaction
74
- emojis. Unsure → assume blacklist.
62
+ ## Failure modes & examples
75
63
 
76
- ## Failure modes
77
-
78
- Trigger phrases + in-language correction pattern:
79
- [`asking-and-brevity-examples`](../../docs/guidelines/agent-infra/asking-and-brevity-examples.md#direct-answers--failure-modes-the-user-will-call-out).
80
- On call-out: acknowledge once in the user's language, switch, no
81
- excuses (mirrors `language-and-tone` § slip handling).
64
+ Trigger phrases + correction pattern: [`asking-and-brevity-examples § failure-modes`](../docs/guidelines/agent-infra/asking-and-brevity-examples.md#direct-answers--failure-modes-the-user-will-call-out).
65
+ Pattern Memory (wrong / right / why): [`direct-answers-demos`](../docs/guidelines/agent-infra/direct-answers-demos.md).
66
+ Outcome baseline: [`tests/golden/outcomes/direct_answers.json`](../../tests/golden/outcomes/direct_answers.json).
82
67
 
83
68
  ## Interactions
84
69
 
85
- - `language-and-tone` language mirroring, `.md` always English,
86
- CLI-icon two-space rule.
87
- - `ask-when-uncertain` — resolution surface for Iron Law 2 gaps.
88
- - `think-before-action` — how to verify code-behavior claims.
89
- - `verify-before-complete` — completion-claim evidence gate.
90
- - `token-efficiency` — loop-side brevity.
91
- - `user-interaction` — numbered-options Iron Law overrides brevity.
70
+ `language-and-tone` · `ask-when-uncertain` · `think-before-action` · `verify-before-complete` · `token-efficiency` · `user-interaction` (overrides brevity).
@@ -1,54 +1,20 @@
1
1
  ---
2
2
  type: "auto"
3
3
  tier: "3"
4
- alwaysApply: false
5
4
  description: "Running PHP commands inside Docker containers — artisan, composer, phpstan, rector, ecs, phpunit, tests, migrations, and any CLI tool execution"
6
5
  source: package
6
+ triggers:
7
+ - keyword: "docker"
8
+ - keyword: "artisan"
9
+ - keyword: "composer"
10
+ - phrase: "inside the container"
11
+ routes_to:
12
+ - "skill:docker"
7
13
  ---
8
14
 
9
- # Docker Container Commands
15
+ # Docker Commands
10
16
 
11
- All PHP commands (PHPStan, Rector, Composer, PHPUnit, Artisan) must be executed **inside the Docker container**, not on the host.
17
+ **Iron Law.** Run PHP / artisan / composer / phpstan / rector / ecs / phpunit inside the project container, never on the host.
12
18
 
13
- ## Container Detection
14
-
15
- Detect the correct PHP container service name from `docker-compose.yml` / `compose.yaml`.
16
- Read the compose file to find the PHP service name — it varies per project.
17
-
18
- Use `docker compose exec -T <service> ...` for non-interactive commands (scripts, CI).
19
- Use `make console` to enter the container interactively (if available).
20
-
21
- ## Tooling Detection
22
-
23
- Check if `artisan` exists in the project root:
24
-
25
- - **Laravel** (`artisan` exists): `php artisan test`, `vendor/bin/phpstan analyse`, `vendor/bin/rector process`
26
- - **Composer** (no `artisan`): `vendor/bin/phpunit`, `vendor/bin/phpstan analyse`, `vendor/bin/rector process`
27
-
28
- ## Examples (Laravel project)
29
-
30
- ```bash
31
- docker compose exec -T <php-service> vendor/bin/phpstan analyse
32
- docker compose exec -T <php-service> vendor/bin/rector process
33
- docker compose exec -T <php-service> vendor/bin/ecs check --fix
34
- docker compose exec -T <php-service> php artisan test
35
- ```
36
-
37
- ## Examples (Composer project)
38
-
39
- ```bash
40
- docker compose exec -T <php-service> vendor/bin/phpstan analyse
41
- docker compose exec -T <php-service> vendor/bin/rector process
42
- docker compose exec -T <php-service> vendor/bin/ecs check --fix
43
- docker compose exec -T <php-service> vendor/bin/phpunit
44
- ```
45
-
46
- ## Build / Task Runner
47
-
48
- Before using raw `docker compose exec` commands, check if the consumer
49
- project ships a `Makefile` for common targets (e.g. `make console`,
50
- `make test`, `make phpstan`). Read the Makefile first to discover
51
- available shortcuts. If the project uses a different task runner,
52
- inspect its config file before defaulting to raw `docker compose exec`.
53
-
54
- Frontend commands (npm, webpack) run on the host or in the node container.
19
+ Body migrated to `skill:docker` (per P4 of `road-to-kernel-and-router.md`).
20
+ Trigger-set above activates this routing under the `balanced` and `full` profiles.