@event4u/agent-config 1.14.0 → 1.16.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 (293) hide show
  1. package/.agent-src/commands/agent-handoff.md +1 -1
  2. package/.agent-src/commands/bug-fix.md +3 -3
  3. package/.agent-src/commands/bug-investigate.md +2 -2
  4. package/.agent-src/commands/chat-history-checkpoint.md +3 -3
  5. package/.agent-src/commands/chat-history-clear.md +2 -2
  6. package/.agent-src/commands/chat-history-resume.md +2 -2
  7. package/.agent-src/commands/chat-history.md +3 -3
  8. package/.agent-src/commands/check-current-md.md +44 -33
  9. package/.agent-src/commands/commit-in-chunks.md +43 -23
  10. package/.agent-src/commands/compress.md +34 -2
  11. package/.agent-src/commands/council-design.md +96 -0
  12. package/.agent-src/commands/council-optimize.md +115 -0
  13. package/.agent-src/commands/council-pr.md +123 -0
  14. package/.agent-src/commands/council.md +219 -0
  15. package/.agent-src/commands/create-pr.md +23 -0
  16. package/.agent-src/commands/do-and-judge.md +3 -3
  17. package/.agent-src/commands/do-in-steps.md +4 -4
  18. package/.agent-src/commands/e2e-heal.md +1 -1
  19. package/.agent-src/commands/e2e-plan.md +1 -1
  20. package/.agent-src/commands/feature-dev.md +8 -0
  21. package/.agent-src/commands/feature-explore.md +6 -1
  22. package/.agent-src/commands/feature-plan.md +33 -2
  23. package/.agent-src/commands/feature-refactor.md +5 -0
  24. package/.agent-src/commands/feature-roadmap.md +8 -3
  25. package/.agent-src/commands/feature.md +58 -0
  26. package/.agent-src/commands/fix-ci.md +5 -0
  27. package/.agent-src/commands/fix-portability.md +7 -2
  28. package/.agent-src/commands/fix-pr-bot-comments.md +5 -0
  29. package/.agent-src/commands/fix-pr-comments.md +5 -0
  30. package/.agent-src/commands/fix-pr-developer-comments.md +5 -0
  31. package/.agent-src/commands/fix-references.md +5 -0
  32. package/.agent-src/commands/fix-seeder.md +5 -0
  33. package/.agent-src/commands/fix.md +60 -0
  34. package/.agent-src/commands/jira-ticket.md +1 -1
  35. package/.agent-src/commands/judge.md +1 -1
  36. package/.agent-src/commands/memory-add.md +3 -3
  37. package/.agent-src/commands/memory-full.md +2 -2
  38. package/.agent-src/commands/memory-promote.md +2 -2
  39. package/.agent-src/commands/mode.md +5 -5
  40. package/.agent-src/commands/onboard.md +17 -8
  41. package/.agent-src/commands/optimize-agents.md +6 -1
  42. package/.agent-src/commands/optimize-augmentignore.md +14 -0
  43. package/.agent-src/commands/optimize-rtk-filters.md +5 -0
  44. package/.agent-src/commands/optimize-skills.md +6 -1
  45. package/.agent-src/commands/optimize.md +54 -0
  46. package/.agent-src/commands/propose-memory.md +2 -2
  47. package/.agent-src/commands/refine-ticket.md +9 -7
  48. package/.agent-src/commands/review-changes.md +61 -9
  49. package/.agent-src/commands/review-routing.md +1 -1
  50. package/.agent-src/commands/roadmap-create.md +42 -4
  51. package/.agent-src/commands/roadmap-execute.md +9 -7
  52. package/.agent-src/commands/set-cost-profile.md +11 -3
  53. package/.agent-src/commands/sync-agent-settings.md +11 -2
  54. package/.agent-src/commands/tests-create.md +1 -1
  55. package/.agent-src/commands/tests-execute.md +2 -3
  56. package/.agent-src/commands/upstream-contribute.md +1 -1
  57. package/.agent-src/contexts/authority/commit-mechanics.md +57 -0
  58. package/.agent-src/contexts/authority/destructive-mechanics.md +66 -0
  59. package/.agent-src/contexts/authority/scope-mechanics.md +87 -0
  60. package/.agent-src/contexts/execution/autonomy-detection.md +54 -0
  61. package/.agent-src/contexts/execution/autonomy-examples.md +90 -0
  62. package/.agent-src/contexts/execution/autonomy-mechanics.md +29 -0
  63. package/.agent-src/contexts/execution/verification-mechanics.md +80 -0
  64. package/.agent-src/personas/README.md +1 -1
  65. package/.agent-src/rules/agent-authority.md +24 -0
  66. package/.agent-src/rules/architecture.md +1 -1
  67. package/.agent-src/rules/artifact-drafting-protocol.md +1 -1
  68. package/.agent-src/rules/artifact-engagement-recording.md +2 -2
  69. package/.agent-src/rules/ask-when-uncertain.md +1 -1
  70. package/.agent-src/rules/augment-portability.md +56 -37
  71. package/.agent-src/rules/autonomous-execution.md +78 -114
  72. package/.agent-src/rules/capture-learnings.md +1 -1
  73. package/.agent-src/rules/chat-history-cadence.md +109 -0
  74. package/.agent-src/rules/chat-history-ownership.md +123 -0
  75. package/.agent-src/rules/chat-history-visibility.md +96 -0
  76. package/.agent-src/rules/cli-output-handling.md +1 -1
  77. package/.agent-src/rules/{command-suggestion.md → command-suggestion-policy.md} +10 -9
  78. package/.agent-src/rules/commit-conventions.md +1 -1
  79. package/.agent-src/rules/commit-policy.md +43 -61
  80. package/.agent-src/rules/context-hygiene.md +3 -3
  81. package/.agent-src/rules/direct-answers.md +2 -2
  82. package/.agent-src/rules/docs-sync.md +1 -1
  83. package/.agent-src/rules/e2e-testing.md +1 -1
  84. package/.agent-src/rules/guidelines.md +4 -4
  85. package/.agent-src/rules/improve-before-implement.md +2 -2
  86. package/.agent-src/rules/language-and-tone.md +41 -96
  87. package/.agent-src/rules/minimal-safe-diff.md +3 -3
  88. package/.agent-src/rules/model-recommendation.md +4 -4
  89. package/.agent-src/rules/no-cheap-questions.md +89 -0
  90. package/.agent-src/rules/non-destructive-by-default.md +25 -59
  91. package/.agent-src/rules/onboarding-gate.md +5 -5
  92. package/.agent-src/rules/review-routing-awareness.md +9 -9
  93. package/.agent-src/rules/roadmap-progress-sync.md +132 -80
  94. package/.agent-src/rules/role-mode-adherence.md +3 -3
  95. package/.agent-src/rules/scope-control.md +65 -46
  96. package/.agent-src/rules/security-sensitive-stop.md +2 -2
  97. package/.agent-src/rules/size-enforcement.md +3 -2
  98. package/.agent-src/rules/think-before-action.md +5 -5
  99. package/.agent-src/rules/token-efficiency.md +4 -4
  100. package/.agent-src/rules/{ui-audit-before-build.md → ui-audit-gate.md} +3 -3
  101. package/.agent-src/rules/user-interaction.md +31 -7
  102. package/.agent-src/rules/verify-before-complete.md +12 -67
  103. package/.agent-src/scripts/update_roadmap_progress.py +65 -8
  104. package/.agent-src/skills/ai-council/SKILL.md +333 -0
  105. package/.agent-src/skills/api-endpoint/SKILL.md +2 -2
  106. package/.agent-src/skills/blade-ui/SKILL.md +30 -11
  107. package/.agent-src/skills/blast-radius-analyzer/SKILL.md +1 -1
  108. package/.agent-src/skills/bug-analyzer/SKILL.md +1 -1
  109. package/.agent-src/skills/command-routing/SKILL.md +1 -1
  110. package/.agent-src/skills/command-writing/SKILL.md +16 -5
  111. package/.agent-src/skills/conventional-commits-writing/SKILL.md +1 -1
  112. package/.agent-src/skills/copilot-agents-optimization/SKILL.md +2 -2
  113. package/.agent-src/skills/developer-like-execution/SKILL.md +2 -2
  114. package/.agent-src/skills/existing-ui-audit/SKILL.md +24 -9
  115. package/.agent-src/skills/fe-design/SKILL.md +20 -15
  116. package/.agent-src/skills/file-editor/SKILL.md +9 -0
  117. package/.agent-src/skills/flux/SKILL.md +1 -1
  118. package/.agent-src/skills/git-workflow/SKILL.md +1 -1
  119. package/.agent-src/skills/guideline-writing/SKILL.md +11 -11
  120. package/.agent-src/skills/learning-to-rule-or-skill/SKILL.md +4 -4
  121. package/.agent-src/skills/livewire/SKILL.md +27 -8
  122. package/.agent-src/skills/override-management/SKILL.md +2 -2
  123. package/.agent-src/skills/php-coder/SKILL.md +1 -1
  124. package/.agent-src/skills/playwright-testing/SKILL.md +2 -2
  125. package/.agent-src/skills/readme-reviewer/SKILL.md +1 -1
  126. package/.agent-src/skills/readme-writing/SKILL.md +1 -1
  127. package/.agent-src/skills/readme-writing-package/SKILL.md +1 -1
  128. package/.agent-src/skills/receiving-code-review/SKILL.md +1 -1
  129. package/.agent-src/skills/refine-ticket/SKILL.md +30 -24
  130. package/.agent-src/skills/review-routing/SKILL.md +2 -2
  131. package/.agent-src/skills/roadmap-management/SKILL.md +22 -16
  132. package/.agent-src/skills/rule-writing/SKILL.md +1 -1
  133. package/.agent-src/skills/skill-reviewer/SKILL.md +1 -1
  134. package/.agent-src/skills/skill-writing/SKILL.md +6 -6
  135. package/.agent-src/skills/subagent-orchestration/SKILL.md +1 -0
  136. package/.agent-src/skills/systematic-debugging/SKILL.md +1 -1
  137. package/.agent-src/skills/upstream-contribute/SKILL.md +3 -3
  138. package/.agent-src/skills/validate-feature-fit/SKILL.md +2 -2
  139. package/.agent-src/skills/{verify-before-complete → verify-completion-evidence}/SKILL.md +2 -2
  140. package/.agent-src/templates/agent-settings.md +9 -9
  141. package/.agent-src/templates/contexts/auth-model.md +1 -1
  142. package/.agent-src/templates/roadmaps.md +9 -8
  143. package/.agent-src/templates/scripts/README.md +2 -2
  144. package/.agent-src/templates/scripts/memory_lookup.py +1 -1
  145. package/.agent-src/templates/scripts/telemetry/aggregator.py +16 -1
  146. package/.agent-src/templates/scripts/telemetry/engagement.py +59 -0
  147. package/.agent-src/templates/scripts/telemetry/report_renderer.py +28 -1
  148. package/.agent-src/templates/scripts/telemetry_record.py +14 -1
  149. package/.agent-src/templates/scripts/work_engine/__init__.py +2 -2
  150. package/.agent-src/templates/scripts/work_engine/cli.py +64 -461
  151. package/.agent-src/templates/scripts/work_engine/cli_args.py +116 -0
  152. package/.agent-src/templates/scripts/work_engine/delivery_state.py +3 -3
  153. package/.agent-src/templates/scripts/work_engine/directives/backend/__init__.py +1 -1
  154. package/.agent-src/templates/scripts/work_engine/directives/backend/implement.py +1 -1
  155. package/.agent-src/templates/scripts/work_engine/directives/backend/memory.py +1 -1
  156. package/.agent-src/templates/scripts/work_engine/directives/backend/plan.py +1 -1
  157. package/.agent-src/templates/scripts/work_engine/directives/backend/report.py +1 -1
  158. package/.agent-src/templates/scripts/work_engine/dispatcher.py +1 -1
  159. package/.agent-src/templates/scripts/work_engine/emitters.py +43 -0
  160. package/.agent-src/templates/scripts/work_engine/errors.py +19 -0
  161. package/.agent-src/templates/scripts/work_engine/hook_bootstrap.py +76 -0
  162. package/.agent-src/templates/scripts/work_engine/input_builders.py +163 -0
  163. package/.agent-src/templates/scripts/work_engine/migration/v0_to_v1.py +34 -2
  164. package/.agent-src/templates/scripts/work_engine/persona_policy.py +1 -1
  165. package/.agent-src/templates/scripts/work_engine/resolvers/prompt.py +1 -1
  166. package/.agent-src/templates/scripts/work_engine/state_io.py +202 -0
  167. package/.claude-plugin/marketplace.json +10 -2
  168. package/AGENTS.md +16 -12
  169. package/CHANGELOG.md +206 -9
  170. package/README.md +51 -52
  171. package/config/agent-settings.template.yml +58 -1
  172. package/config/gitignore-block.txt +3 -0
  173. package/docs/MIGRATION.md +122 -0
  174. package/docs/architecture.md +83 -34
  175. package/docs/catalog.md +331 -0
  176. package/docs/contracts/STABILITY.md +134 -0
  177. package/docs/contracts/adr-chat-history-split.md +132 -0
  178. package/docs/contracts/adr-command-suggestion.md +146 -0
  179. package/docs/contracts/adr-implement-ticket-runtime.md +122 -0
  180. package/docs/contracts/adr-product-ui-track.md +384 -0
  181. package/docs/contracts/adr-prompt-driven-execution.md +187 -0
  182. package/docs/contracts/agent-memory-contract.md +149 -0
  183. package/docs/contracts/artifact-engagement-flow.md +262 -0
  184. package/docs/contracts/command-clusters.md +126 -0
  185. package/docs/contracts/command-suggestion-flow.md +148 -0
  186. package/docs/contracts/implement-ticket-flow.md +628 -0
  187. package/docs/contracts/linear-ai-rules-inclusion.md +143 -0
  188. package/docs/contracts/linear-ai-three-layers.md +131 -0
  189. package/docs/contracts/load-context-schema.md +186 -0
  190. package/docs/contracts/rule-interactions.md +107 -0
  191. package/docs/contracts/rule-interactions.yml +238 -0
  192. package/docs/contracts/rule-priority-hierarchy.md +87 -0
  193. package/docs/contracts/ui-stack-extension.md +236 -0
  194. package/docs/contracts/ui-track-flow.md +338 -0
  195. package/docs/customization.md +14 -0
  196. package/docs/end-to-end-walkthroughs.md +165 -0
  197. package/docs/getting-started.md +27 -9
  198. package/docs/github-topics.md +12 -3
  199. package/docs/guidelines/agent-infra/language-and-tone-examples.md +79 -0
  200. package/{.agent-src → docs}/guidelines/docs/readme-size-and-splitting.md +26 -25
  201. package/docs/guidelines/php/git.md +164 -0
  202. package/docs/installation.md +42 -6
  203. package/docs/migrations/commands-1.15.0.md +112 -0
  204. package/docs/showcase.md +9 -4
  205. package/docs/skills-catalog.md +14 -8
  206. package/docs/ui-track-mental-model.md +121 -0
  207. package/llms.txt +13 -7
  208. package/package.json +1 -1
  209. package/scripts/agent-config +23 -0
  210. package/scripts/ai_council/__init__.py +39 -0
  211. package/scripts/ai_council/_default_prices.py +41 -0
  212. package/scripts/ai_council/_one_off_rebalancing_audit.py +149 -0
  213. package/scripts/ai_council/_one_off_roundtrip.py +106 -0
  214. package/scripts/ai_council/budget_guard.py +172 -0
  215. package/scripts/ai_council/bundler.py +261 -0
  216. package/scripts/ai_council/clients.py +381 -0
  217. package/scripts/ai_council/modes.py +127 -0
  218. package/scripts/ai_council/orchestrator.py +350 -0
  219. package/scripts/ai_council/pricing.py +213 -0
  220. package/scripts/ai_council/project_context.py +159 -0
  221. package/scripts/ai_council/prompts.py +232 -0
  222. package/scripts/ai_council/session.py +144 -0
  223. package/scripts/build_linear_digest.py +4 -4
  224. package/scripts/check_always_budget.py +126 -0
  225. package/scripts/check_augmentignore.py +69 -0
  226. package/scripts/check_command_count_messaging.py +120 -0
  227. package/scripts/check_portability.py +57 -0
  228. package/scripts/check_public_catalog_links.py +122 -0
  229. package/scripts/check_public_links.py +185 -0
  230. package/scripts/check_references.py +5 -1
  231. package/scripts/check_roadmap_trackable.py +111 -0
  232. package/scripts/command_suggester/cooldown.py +1 -1
  233. package/scripts/generate_index.py +266 -0
  234. package/scripts/install_anthropic_key.sh +5 -0
  235. package/scripts/install_openai_key.sh +106 -0
  236. package/scripts/lint_load_context.py +163 -0
  237. package/scripts/lint_no_new_atomic_commands.py +179 -0
  238. package/scripts/lint_rule_interactions.py +149 -0
  239. package/scripts/memory_lookup.py +1 -1
  240. package/scripts/release.py +297 -64
  241. package/scripts/schemas/command.schema.json +20 -0
  242. package/scripts/schemas/rule.schema.json +10 -0
  243. package/scripts/skill_linter.py +26 -4
  244. package/scripts/sync_agent_settings.py +1 -1
  245. package/scripts/update_counts.py +19 -4
  246. package/scripts/update_prices.py +124 -0
  247. package/.agent-src/guidelines/php/git.md +0 -96
  248. package/.agent-src/rules/chat-history.md +0 -200
  249. /package/.agent-src/rules/{slash-commands.md → slash-command-routing-policy.md} +0 -0
  250. /package/{.agent-src → docs}/guidelines/agent-infra/agent-interaction-and-decision-quality.md +0 -0
  251. /package/{.agent-src → docs}/guidelines/agent-infra/break-glass-usage.md +0 -0
  252. /package/{.agent-src → docs}/guidelines/agent-infra/developer-judgment.md +0 -0
  253. /package/{.agent-src → docs}/guidelines/agent-infra/engineering-memory-data-format.md +0 -0
  254. /package/{.agent-src → docs}/guidelines/agent-infra/layered-settings.md +0 -0
  255. /package/{.agent-src → docs}/guidelines/agent-infra/memory-access.md +0 -0
  256. /package/{.agent-src → docs}/guidelines/agent-infra/naming.md +0 -0
  257. /package/{.agent-src → docs}/guidelines/agent-infra/output-patterns.md +0 -0
  258. /package/{.agent-src → docs}/guidelines/agent-infra/review-routing-data-format.md +0 -0
  259. /package/{.agent-src → docs}/guidelines/agent-infra/role-contracts.md +0 -0
  260. /package/{.agent-src → docs}/guidelines/agent-infra/role-mode-router.md +0 -0
  261. /package/{.agent-src → docs}/guidelines/agent-infra/runtime-layer.md +0 -0
  262. /package/{.agent-src → docs}/guidelines/agent-infra/self-improvement-pipeline.md +0 -0
  263. /package/{.agent-src → docs}/guidelines/agent-infra/size-and-scope.md +0 -0
  264. /package/{.agent-src → docs}/guidelines/agent-infra/tool-integration.md +0 -0
  265. /package/{.agent-src → docs}/guidelines/e2e/playwright.md +0 -0
  266. /package/{.agent-src → docs}/guidelines/php/api-design.md +0 -0
  267. /package/{.agent-src → docs}/guidelines/php/artisan-commands.md +0 -0
  268. /package/{.agent-src → docs}/guidelines/php/blade-ui.md +0 -0
  269. /package/{.agent-src → docs}/guidelines/php/controllers.md +0 -0
  270. /package/{.agent-src → docs}/guidelines/php/database.md +0 -0
  271. /package/{.agent-src → docs}/guidelines/php/eloquent.md +0 -0
  272. /package/{.agent-src → docs}/guidelines/php/flux.md +0 -0
  273. /package/{.agent-src → docs}/guidelines/php/general.md +0 -0
  274. /package/{.agent-src → docs}/guidelines/php/jobs.md +0 -0
  275. /package/{.agent-src → docs}/guidelines/php/livewire.md +0 -0
  276. /package/{.agent-src → docs}/guidelines/php/logging.md +0 -0
  277. /package/{.agent-src → docs}/guidelines/php/naming.md +0 -0
  278. /package/{.agent-src → docs}/guidelines/php/patterns/dependency-injection.md +0 -0
  279. /package/{.agent-src → docs}/guidelines/php/patterns/dtos.md +0 -0
  280. /package/{.agent-src → docs}/guidelines/php/patterns/events.md +0 -0
  281. /package/{.agent-src → docs}/guidelines/php/patterns/factory.md +0 -0
  282. /package/{.agent-src → docs}/guidelines/php/patterns/pipelines.md +0 -0
  283. /package/{.agent-src → docs}/guidelines/php/patterns/policies.md +0 -0
  284. /package/{.agent-src → docs}/guidelines/php/patterns/repositories.md +0 -0
  285. /package/{.agent-src → docs}/guidelines/php/patterns/service-layer.md +0 -0
  286. /package/{.agent-src → docs}/guidelines/php/patterns/strategy.md +0 -0
  287. /package/{.agent-src → docs}/guidelines/php/patterns.md +0 -0
  288. /package/{.agent-src → docs}/guidelines/php/performance.md +0 -0
  289. /package/{.agent-src → docs}/guidelines/php/resources.md +0 -0
  290. /package/{.agent-src → docs}/guidelines/php/security.md +0 -0
  291. /package/{.agent-src → docs}/guidelines/php/sql.md +0 -0
  292. /package/{.agent-src → docs}/guidelines/php/validations.md +0 -0
  293. /package/{.agent-src → docs}/guidelines/php/websocket.md +0 -0
@@ -0,0 +1,143 @@
1
+ ---
2
+ stability: beta
3
+ ---
4
+
5
+ # Linear AI — rules inclusion list
6
+
7
+ > Phase 3 Step 1 deliverable for [`road-to-universal-distribution.md`](../../agents/roadmaps/road-to-universal-distribution.md).
8
+ > Per-rule decision for the Linear AI rules digest. The digest is a
9
+ > Markdown blob the user pastes into Linear's `Settings → Agents →
10
+ > Additional guidance` (workspace / team / personal). The third-party
11
+ > agent (Codegen, Charlie, Cursor's Linear app, …) reads it verbatim —
12
+ > no skill triggering, no script execution, no `.augment/` access.
13
+ >
14
+ > Source of tier data: `python3 scripts/audit_cloud_compatibility.py
15
+ > --details` (47 rules: T1=20, T2=19, T3-S=8).
16
+ >
17
+ > Last refreshed: 2026-04-29.
18
+
19
+ ## Inclusion criteria
20
+
21
+ - **Workspace** — universal coding posture and interaction discipline.
22
+ Survives without filesystem, scripts, or this package's tooling.
23
+ - **Team** — framework-specific (Laravel, PHP, E2E with Playwright).
24
+ Only applied where the team uses that stack.
25
+ - **Personal** — empty by default; reserved for individual preferences
26
+ the user may add manually.
27
+ - **Excluded** — meta-rules about authoring this package, Augment Code
28
+ specifics, or rules already declared `cloud_safe: noop`.
29
+
30
+ Two transformations the digest builder (Phase 3 Step 2) must apply
31
+ to *included-degraded* rules:
32
+
33
+ 1. Strip references to scripts, `.agent-settings.yml`, `.agent-src/`,
34
+ `.augment/`, `agents/`, and `task <foo>` invocations.
35
+ 2. Replace `[link](path)` to other rules/skills/files with a footnote
36
+ or inline summary, since the path won't resolve outside this repo.
37
+
38
+ ## Workspace digest (18 rules)
39
+
40
+ Universal coding posture — applies to every team regardless of stack.
41
+
42
+ | Rule | Tier | Mode | Notes |
43
+ |---|---|---|---|
44
+ | `ask-when-uncertain` | T1 | as-is | One-question-per-turn iron law; strip cross-refs to `user-interaction` / `artifact-drafting-protocol` |
45
+ | `commit-conventions` | T1 | as-is | Generic Conventional Commits |
46
+ | `context-hygiene` | T1 | as-is | Conversation freshness, 3-Failure Rule, tool-loop detection; strip Augment-specific `.augmentignore` section |
47
+ | `direct-answers` | T1 | as-is | Iron Laws (no flattery, no invented facts, brevity); strip emoji whitelist refs to other rules |
48
+ | `markdown-safe-codeblocks` | T1 | as-is | Generic markdown safety |
49
+ | `minimal-safe-diff` | T1 | as-is | Universal coding discipline |
50
+ | `reviewer-awareness` | T1 | as-is | Anchor reviewer choice in paths and risk |
51
+ | `scope-control` | T1 | as-is | Universal scope discipline + git-ops permission gating |
52
+ | `security-sensitive-stop` | T1 | as-is | Stop-and-threat-model on security-sensitive paths |
53
+ | `think-before-action` | T1 | degraded | Strip `memory-access` guideline ref (no shared memory on Linear) |
54
+ | `verify-before-complete` | T1 | as-is | Evidence gate; the tool list (PHPStan etc.) is illustrative, harmless |
55
+ | `cli-output-handling` | T2 | degraded | Keep "use targeted output, not full dumps"; strip `rtk` Iron Law (rtk is a local tool) |
56
+ | `downstream-changes` | T2 | as-is | Universal post-edit propagation |
57
+ | `improve-before-implement` | T2 | as-is | Challenge weak requirements before implementing |
58
+ | `language-and-tone` | T2 | degraded | Keep mirroring + tone; strip "all `.md` docs must be English" clause (no `.md` files on Linear) |
59
+ | `missing-tool-handling` | T2 | as-is | Don't install silently |
60
+ | `token-efficiency` | T2 | degraded | Strip `.agent-settings.yml` references (`personal.minimal_output`, `personal.play_by_play`) |
61
+ | `user-interaction` | T3-S | degraded | Numbered-options Iron Law, single-source recommendation; strip `scripts/check_reply_consistency.py` reference |
62
+
63
+ ## Team digest (4 rules)
64
+
65
+ Framework-specific. Only paste into the Team layer of teams that use
66
+ the stack. Each rule already names the stack in its own trigger line,
67
+ so nothing to strip.
68
+
69
+ | Rule | Tier | Stack | Notes |
70
+ |---|---|---|---|
71
+ | `docker-commands` | T1 | Docker / Laravel | Container-prefixed CLI for artisan/composer/phpunit |
72
+ | `laravel-translations` | T1 | Laravel | `__()` helper, `lang/de`, `lang/en` |
73
+ | `e2e-testing` | T2 | Playwright | Locators, Page Objects, fixtures, flake prevention |
74
+ | `php-coding` | T2 | PHP | Strict types, naming, comparisons, Eloquent conventions |
75
+
76
+ ## Personal digest (0 rules)
77
+
78
+ Empty by default. The user may paste individual preferences (preferred
79
+ naming, IDE-specific shortcuts, response language overrides) into this
80
+ layer manually. The digest builder emits an empty stub with a comment.
81
+
82
+ ## Excluded (25 rules) — categorised
83
+
84
+ ### Meta — about authoring this package (20)
85
+
86
+ These rules govern how skills/rules/commands are created, kept in sync,
87
+ and shipped from this repository. They have no meaning for a third-party
88
+ agent that does not maintain `event4u/agent-config`.
89
+
90
+ `agent-docs`, `architecture`, `artifact-drafting-protocol`,
91
+ `augment-portability`, `augment-source-of-truth`, `capture-learnings`,
92
+ `docs-sync`, `guidelines`, `package-ci-checks`, `preservation-guard`,
93
+ `review-routing-awareness`, `roadmap-progress-sync`,
94
+ `role-mode-adherence`, `rule-type-governance`, `runtime-safety`,
95
+ `size-enforcement`, `skill-improvement-trigger`, `skill-quality`,
96
+ `tool-safety`, `upstream-proposal`.
97
+
98
+ ### Augment Code specifics (3)
99
+
100
+ These reference Augment-only mechanics — model identity in Augment's
101
+ system prompt, Augment's `/slash` command surface, and the Augment
102
+ onboarding flow gated by `.agent-settings.yml`.
103
+
104
+ `model-recommendation`, `onboarding-gate`, `slash-command-routing-policy`.
105
+
106
+ ### Skill-routing only (1)
107
+
108
+ `analysis-skill-routing` — routes to one of our `analysis-*` skills.
109
+ Skills do not exist on Linear AI; the third-party agent has its own
110
+ capability surface.
111
+
112
+ ### Already declared inert on cloud (1)
113
+
114
+ `chat-history` — carries `<!-- cloud_safe: noop -->` by design. No
115
+ persistence on cloud platforms; the rule is a no-op.
116
+
117
+ ## Open follow-ups
118
+
119
+ - **Phase 3 Step 2** (`scripts/build_linear_digest.py`) implements the
120
+ two transformations above (strip script/path/setting refs, replace
121
+ cross-refs with inline summaries or footnotes). Pin the *degraded*
122
+ set in the script's source so a human can audit which rules ship
123
+ modified vs. as-is.
124
+ - **Phase 3 Step 4 char-budget test** — Linear's per-field char limit
125
+ is still unresearched (Open Question #1 in the roadmap). Before the
126
+ test is wired, run a quick recon and capture the value. The
127
+ conservative fallback (~30 KB) probably fits this 18-rule workspace
128
+ digest without contention; team layer is far smaller.
129
+ - **Phase 3 Step 3 three-layer split** — this document already
130
+ partitions workspace / team / personal. Step 3 only needs to
131
+ document the three-layer rationale for the README.
132
+ - Re-classify on every audit run; if a rule is added to
133
+ `.agent-src.uncompressed/rules/`, this document MUST gain a row.
134
+
135
+ ## Source of tier data
136
+
137
+ ```
138
+ python3 scripts/audit_cloud_compatibility.py --details --format json
139
+ ```
140
+
141
+ 47 rules: T1=20, T2=19, T3-S=8. Counts in this document derive from the
142
+ above; if they drift, this document is stale and the digest builder
143
+ must refuse to emit until reconciled.
@@ -0,0 +1,131 @@
1
+ ---
2
+ stability: beta
3
+ ---
4
+
5
+ # Linear AI — three-layer split rationale
6
+
7
+ > Phase 3 Step 3 deliverable for [`road-to-universal-distribution.md`](../../agents/roadmaps/road-to-universal-distribution.md).
8
+ > Per-rule routing is in [`linear-ai-rules-inclusion.md`](linear-ai-rules-inclusion.md);
9
+ > this file documents *why* the split is workspace / team / personal and
10
+ > what belongs in each.
11
+
12
+ ## The three slots Linear gives us
13
+
14
+ `Settings → Agents → Additional guidance` exposes three text fields:
15
+
16
+ | Field | Scope | Inheritance | Editable by |
17
+ |---|---|---|---|
18
+ | **Workspace** | Whole organisation | Inherited by every team and every member | Workspace admins |
19
+ | **Team** | One Linear team | Overrides workspace for that team's issues | Team admins |
20
+ | **Personal** | One member, on their own assigned issues | Layered on top of workspace + team | The member |
21
+
22
+ Linear's docs frame this as **most-specific-wins**: when an agent is
23
+ linked to a Linear issue, it reads workspace + team + personal
24
+ concatenated, with later layers overriding earlier ones. The third-party
25
+ agent (Codegen, Charlie, Cursor's Linear app, …) receives the bytes
26
+ verbatim — no filesystem, no skill triggering, no `.augment/` access.
27
+
28
+ ## Our mapping — workspace / team / personal
29
+
30
+ The inclusion list partitions our 47 rules into three mutually exclusive
31
+ buckets. Counts and per-rule decisions live in
32
+ [`linear-ai-rules-inclusion.md`](linear-ai-rules-inclusion.md); this
33
+ section explains the *principle* behind each bucket.
34
+
35
+ ### Workspace — universal coding posture (18 rules)
36
+
37
+ Goes into the **Workspace** field. Rules that:
38
+
39
+ - Apply regardless of stack (PHP, Node, Python, Go, …)
40
+ - Govern *interaction discipline* — when to ask, how to commit, how to
41
+ surface options, how to push back on weak reviews
42
+ - Survive without filesystem, scripts, or this package's tooling
43
+ - Carry no Augment-specific or repo-authoring scaffolding
44
+
45
+ Examples: `ask-when-uncertain`, `commit-conventions`, `direct-answers`,
46
+ `minimal-safe-diff`, `scope-control`, `verify-before-complete`,
47
+ `user-interaction`. Anything that helps a generic third-party agent
48
+ behave like a competent engineer on *any* codebase.
49
+
50
+ A few rules in this bucket are **degraded** — the digest builder strips
51
+ the local-only sections (rtk, `.agent-settings.yml`, `.augment/` paths,
52
+ `.md`-files-must-be-English clause). The substance survives; the tooling
53
+ references don't.
54
+
55
+ ### Team — framework-specific (4 rules)
56
+
57
+ Goes into the **Team** field of teams that match the stack. Rules that:
58
+
59
+ - Name a specific framework, language, or tool in their trigger line
60
+ - Carry conventions that only fire when that stack is touched
61
+ - Don't apply to teams using a different stack (a frontend-only team
62
+ doesn't need the PHP rules)
63
+
64
+ Currently four rules: `docker-commands`, `laravel-translations`,
65
+ `e2e-testing` (Playwright), `php-coding`. Each rule already names its
66
+ stack, so the digest builder ships them as-is — no per-rule stripping.
67
+
68
+ If the org has a Node-only team, paste only `e2e-testing`. If a
69
+ Laravel-Docker team, paste all four. The Team layer is per-team, not
70
+ universal.
71
+
72
+ ### Personal — empty by default (0 rules)
73
+
74
+ Goes into the **Personal** field of individual members. Empty stub by
75
+ default. Each developer pastes their own preferences into this layer
76
+ manually. Examples a member might add:
77
+
78
+ - Response language overrides ("respond in German on my issues")
79
+ - Personal naming conventions ("I prefer `result_` prefixes for outputs")
80
+ - Individual IDE shortcuts they want surfaced in PR descriptions
81
+ - Scoped opt-outs from a workspace rule, with a one-sentence reason
82
+
83
+ The digest builder emits an empty stub with a comment line so members
84
+ have a starting point, but the file is intentionally minimal — the
85
+ package does not own personal preferences.
86
+
87
+ ## Why this split, not a flat blob
88
+
89
+ Three reasons we don't merge everything into one workspace digest:
90
+
91
+ 1. **Stack-specific noise.** A frontend-only team doesn't need 4 KB of
92
+ Laravel + PHP + Docker conventions cluttering their guidance field.
93
+ Pushing those into Team layers keeps the workspace lean and
94
+ universal.
95
+ 2. **Per-team override surface.** When a team needs to override a
96
+ workspace rule (e.g. their own commit-message convention), Linear's
97
+ layering already gives them the surface. We don't need to fork the
98
+ workspace digest per team.
99
+ 3. **Personal autonomy.** Members own the Personal layer. The package
100
+ never writes there; it's the user's escape hatch for individual
101
+ preferences without lobbying for a workspace-wide rule change.
102
+
103
+ ## Excluded from all three layers (25 rules)
104
+
105
+ [`linear-ai-rules-inclusion.md`](linear-ai-rules-inclusion.md) §
106
+ "Excluded" covers the four categories: meta-rules about authoring this
107
+ package (20), Augment Code specifics (3), skill-routing only (1),
108
+ already-cloud-inert (1). None of these benefit a third-party agent that
109
+ does not maintain `event4u/agent-config`.
110
+
111
+ ## Future evolution
112
+
113
+ - **More stacks → more team rules.** When the package gains a Node,
114
+ Python, or Go equivalent of `php-coding`, the Team digest grows. The
115
+ decision criterion stays: stack-named in the trigger line → Team;
116
+ stack-agnostic → Workspace.
117
+ - **Workspace stays bounded.** Adding new universal rules is fine, but
118
+ the workspace digest should not grow to swamp Linear's per-field cap.
119
+ Current digest is well under the 100 KB safety budget; if growth
120
+ approaches the cap, split workspace by *concern* (interaction vs.
121
+ code-shape vs. delivery) rather than relaxing the cap.
122
+ - **Personal layer stays empty in this package.** Even if patterns
123
+ emerge, they belong in workspace (if universal) or team (if
124
+ stack-bound), not in a curated personal blob the package owns.
125
+
126
+ ## Source of truth
127
+
128
+ - Per-rule decision: [`linear-ai-rules-inclusion.md`](linear-ai-rules-inclusion.md)
129
+ - Builder script: [`scripts/build_linear_digest.py`](../../scripts/build_linear_digest.py)
130
+ - Generated digests: `dist/linear/{workspace,team,personal}.md` (gitignored)
131
+ - Roadmap: [`road-to-universal-distribution.md`](../../agents/roadmaps/road-to-universal-distribution.md) Phase 3
@@ -0,0 +1,186 @@
1
+ ---
2
+ stability: beta
3
+ ---
4
+
5
+ # `load_context:` Frontmatter Schema
6
+
7
+ > **Audience:** rule authors and reviewers who want to keep an Always-rule
8
+ > small while making deeper reasoning available on demand.
9
+ > **Linter:** `scripts/lint_load_context.py` (run via `task lint-load-context`).
10
+ > **Companion:** [`rule-priority-hierarchy.md`](rule-priority-hierarchy.md) —
11
+ > hierarchy that decides *which* rule wins when several fire on the same turn.
12
+
13
+ This contract defines the frontmatter convention by which a rule (or
14
+ another context) declares the deeper reading material it relies on.
15
+ The convention is **lazy by default**: declared entries are *available
16
+ to load* when the situation demands them, never auto-loaded into every
17
+ turn.
18
+
19
+ ## Schema
20
+
21
+ Two keys, both optional, both top-level frontmatter:
22
+
23
+ ```yaml
24
+ ---
25
+ type: "always"
26
+ description: "..."
27
+ load_context: # lazy — on-demand reference list
28
+ - .agent-src.uncompressed/contexts/<file>.md
29
+ - agents/contexts/<file>.md
30
+ load_context_eager: # opt-in eager — auto-loaded on rule fire
31
+ - .agent-src.uncompressed/contexts/<file>.md
32
+ ---
33
+ ```
34
+
35
+ | Key | Loading | When to use |
36
+ |---|---|---|
37
+ | `load_context:` | **Lazy.** The agent reads the entry only when the rule's reasoning needs it. | Default. Use for everything that is "available knowledge" rather than "on every turn". |
38
+ | `load_context_eager:` | **Eager.** The entry is concatenated into the active context whenever the rule fires. | Only when the deeper material is needed *every single time* the rule fires. Counts against the combined char budget. |
39
+
40
+ **No default eager-load.** A rule with `load_context:` only does **not**
41
+ auto-load anything; the agent decides per turn. Eager loading is
42
+ opt-in and budget-gated.
43
+
44
+ ## Path rules
45
+
46
+ - Paths are repo-root relative.
47
+ - Paths MUST end in `.md`.
48
+ - Allowed roots: `.agent-src.uncompressed/contexts/`, `agents/contexts/`,
49
+ `.agent-src/contexts/` (compressed mirror). Any other root → linter
50
+ error.
51
+ - A rule MAY reference contexts under either tree, but a
52
+ `.agent-src.uncompressed/` rule SHOULD NOT eager-load an
53
+ `agents/contexts/` file (project-local leak into shared package).
54
+ Linter warns on this combination.
55
+ - A context file may itself declare `load_context:` (chain reasoning).
56
+ The linter rejects cycles.
57
+
58
+ ## Subdirectory conventions
59
+
60
+ Subdirectories under `contexts/` are **conventional, not enforced**.
61
+ The linter only validates the root prefix; subdirectory layout is a
62
+ documentation contract for human reviewers.
63
+
64
+ Two canonical subdirectories are in production:
65
+
66
+ | Subdir | Holds | First consumer |
67
+ |---|---|---|
68
+ | `contexts/execution/` | runtime decision logic, mechanics, and examples for execution-time rules (autonomy detection, verification mechanics, etc.) | `autonomous-execution` (Phase 2 of `road-to-pr-34-followups`) |
69
+ | `contexts/authority/` | mechanics behind authority gates — what makes commits, scope changes, and git ops legal vs. illegal | `commit-policy` and `scope-control` (Phase 6 of `road-to-pr-34-followups`) |
70
+
71
+ A third subdirectory, `contexts/communication/`, was proposed by the
72
+ PR #34 round-6 review for user-interaction and language-and-tone
73
+ mechanics. It is **not yet created** — the anti-speculation guard in
74
+ Phase 6 forbids creating a context root before its triggering rule
75
+ exists. Add it the same turn as the first migrating rule, not before.
76
+
77
+ A new subdirectory is justified when:
78
+
79
+ - A second rule needs to share contexts with the first one, AND
80
+ - The contexts have a coherent topic (execution, authority, communication, …), AND
81
+ - The triggering rule and its content move at the same time
82
+ (no empty subdir reservations).
83
+
84
+ Single-rule contexts that don't fit one of the canonical topics live
85
+ directly under `contexts/` (see `contexts/model-recommendations.md`,
86
+ `contexts/skills-and-commands.md`).
87
+
88
+ ## Combined char-budget guard
89
+
90
+ `load_context_eager:` triggers a budget check:
91
+
92
+ ```
93
+ chars(rule.md) + sum(chars(eager_target.md) for each entry) ≤ rule_cap
94
+ ```
95
+
96
+ `rule_cap` is the per-rule budget from
97
+ [`road-to-rebalancing.md`](../../agents/roadmaps/road-to-rebalancing.md)
98
+ § Target architecture:
99
+
100
+ - Always rule: 2,500
101
+ - Auto rule: 4,000
102
+ - Safety rule (`type: "always"` AND covers Hard-Floor topics): 5,000
103
+
104
+ Linter computes the rule's class from frontmatter `type:` and the
105
+ hard-floor allowlist (`non-destructive-by-default`,
106
+ `security-sensitive-stop`). Exceeding the cap → linter error.
107
+
108
+ Lazy `load_context:` does **not** count against the budget — by
109
+ definition it is not loaded into every turn.
110
+
111
+ ## Public-vs-internal leak
112
+
113
+ A rule shipped to consumers (`.agent-src.uncompressed/rules/`) may
114
+ declare `load_context:` entries pointing at:
115
+
116
+ - `.agent-src.uncompressed/contexts/` — public, OK.
117
+ - `agents/contexts/` — package-internal, **lint warning** (the entry
118
+ will not exist in consumer projects).
119
+
120
+ Project-local rules may reference either. The linter classifies by
121
+ the rule's tree, not by the target's tree.
122
+
123
+ ## No circular references
124
+
125
+ A `load_context:` graph that cycles fails the linter. Cycles are
126
+ defined across both `load_context:` and `load_context_eager:` edges.
127
+
128
+ ## Examples
129
+
130
+ ### Real consumer — `autonomous-execution`
131
+
132
+ `.agent-src.uncompressed/rules/autonomous-execution.md` is the first
133
+ production rule to declare `load_context:`. Its frontmatter:
134
+
135
+ ```yaml
136
+ ---
137
+ type: "auto"
138
+ description: "Deciding whether to ask the user or just act on a workflow step — trivial-vs-blocking classification, autonomy opt-in detection, commit default; defers to non-destructive-by-default for the Hard Floor"
139
+ alwaysApply: false
140
+ source: package
141
+ load_context:
142
+ - .agent-src.uncompressed/contexts/execution/autonomy-detection.md
143
+ - .agent-src.uncompressed/contexts/execution/autonomy-mechanics.md
144
+ - .agent-src.uncompressed/contexts/execution/autonomy-examples.md
145
+ ---
146
+ ```
147
+
148
+ Three lazy-loaded contexts, no `load_context_eager:`. The agent reads
149
+ each context only when the corresponding section of the slim rule
150
+ points at it (the rule body cites the same paths in prose so the
151
+ load is intent-driven, not blanket).
152
+
153
+ Pattern proven by this consumer:
154
+
155
+ - **Slim the rule to obligations only** — the 192-line pre-split
156
+ source dropped to 119 lines (≤ 120 target met) by extracting LOGIC
157
+ (detection algorithm), MECHANICS (setting table, cloud behavior),
158
+ and EXAMPLES (anchor phrases, worked cases, failure modes) into
159
+ three separate context files.
160
+ - **Cite, don't duplicate** — the slim rule contains zero
161
+ algorithm/mechanics/example prose; everything moved was physically
162
+ removed (verified by Phase 2.5 obligation diff:
163
+ [`agents/reports/pr-34-phase-2-5-autonomous-execution-obligation-check.md`](../../agents/reports/pr-34-phase-2-5-autonomous-execution-obligation-check.md)).
164
+ - **Lazy by default** — no eager-load is declared; the budget guard
165
+ is therefore a no-op for this rule.
166
+
167
+ `task lint-load-context` reports **1 declarer**, all paths resolve,
168
+ no cycles.
169
+
170
+ ## Stability
171
+
172
+ `beta` — schema is settled and serves one production rule
173
+ (`autonomous-execution`). A breaking schema change is a SemVer-minor
174
+ pre-1.0 bump. Adding a new optional key is non-breaking. The first
175
+ consumer surfaced no schema gaps; the next migration batch (roadmap
176
+ `road-to-pr-34-followups` Phase 6 — `commit-policy`, `scope-control`,
177
+ `verify-before-complete`) is the next stress test.
178
+
179
+ ## Cross-references
180
+
181
+ - [`rule-priority-hierarchy.md`](rule-priority-hierarchy.md) — which
182
+ rule wins on conflict; this schema is orthogonal (depth, not
183
+ priority).
184
+ - [`rule-interactions.yml`](rule-interactions.yml) — pairwise rule
185
+ interaction matrix.
186
+ - [`STABILITY.md`](STABILITY.md) — beta-tag implications.
@@ -0,0 +1,107 @@
1
+ ---
2
+ stability: beta
3
+ ---
4
+
5
+ # Rule-Interaction Matrix
6
+
7
+ > **Audience:** rule authors and reviewers — anyone editing
8
+ > `.agent-src.uncompressed/rules/*.md` or proposing a new always-rule.
9
+ > **Authoritative source:** [`rule-interactions.yml`](rule-interactions.yml).
10
+ > **Linter:** `scripts/lint_rule_interactions.py` (run via `task lint-rule-interactions`).
11
+
12
+ The matrix captures how the package's `always` rules relate when more
13
+ than one fires on the same turn. It exists because rules at this size
14
+ (55 rules, ~49k tokens budget) develop emergent precedence relationships
15
+ that no single rule file can document on its own.
16
+
17
+ The anchor pair is `non-destructive-by-default` — the universal safety
18
+ floor — paired with the five rules most likely to be invoked in the
19
+ same turn:
20
+
21
+ - `autonomous-execution` — autonomy never lifts the floor.
22
+ - `scope-control` — git-ops permission gate; floor is the never-overridable subset.
23
+ - `commit-policy` — four exception paths to commit; floor still gates the diff content.
24
+ - `ask-when-uncertain` — both rules push toward the same response on a destructive ambiguous request.
25
+ - `verify-before-complete` — independent gates; both must be satisfied.
26
+
27
+ ## Diagram
28
+
29
+ ```mermaid
30
+ graph LR
31
+ NDD["non-destructive-by-default<br/>(Hard Floor)"]
32
+ AE["autonomous-execution"]
33
+ SC["scope-control"]
34
+ CP["commit-policy"]
35
+ AWU["ask-when-uncertain"]
36
+ VBC["verify-before-complete"]
37
+
38
+ NDD -- "overrides" --> AE
39
+ NDD -- "restates" --> SC
40
+ NDD -- "gates diff" --> CP
41
+ NDD -- "complements" --> AWU
42
+ NDD -- "complements" --> VBC
43
+
44
+ SC -- "gates git ops" --> AE
45
+ CP -- "overrides<br/>commit Q" --> AE
46
+
47
+ classDef floor fill:#7a1f1f,stroke:#fff,color:#fff,font-weight:bold
48
+ classDef gate fill:#1f4f7a,stroke:#fff,color:#fff
49
+ class NDD floor
50
+ class SC,CP gate
51
+ ```
52
+
53
+ ## Relations
54
+
55
+ The YAML uses six relation kinds. Definitions:
56
+
57
+ | Relation | Meaning |
58
+ |---|---|
59
+ | `overrides` | Senior rule's outcome wins when both fire — junior's permission cannot proceed past senior's stop. |
60
+ | `narrows` | Senior shrinks the surface area on which junior applies, but does not stop it. |
61
+ | `defers_to` | Junior explicitly hands over to senior on the overlapping surface. |
62
+ | `restates` | The two rules cover overlapping ground intentionally — the restatement prevents future weakening of one side. |
63
+ | `gates` | Senior fires *in addition to* junior on a specific subset, not instead of. |
64
+ | `complements` | Both rules independently apply; outcomes are additive and harmonious. |
65
+
66
+ ## Reading a pair entry
67
+
68
+ ```yaml
69
+ - id: ndd-x-autonomous-execution
70
+ rules: [non-destructive-by-default, autonomous-execution] # senior, junior
71
+ relation: overrides
72
+ conflict: … # what triggers both
73
+ resolution: … # what the agent does
74
+ evidence:
75
+ - .agent-src.uncompressed/rules/non-destructive-by-default.md#the-iron-law
76
+ - .agent-src.uncompressed/rules/autonomous-execution.md#hard-floor--see-non-destructive-by-default
77
+ ```
78
+
79
+ `rules: [a, b]` is ordered: `a` is senior (wins on conflict), `b` is
80
+ junior (yields). For `complements`, ordering is documentary only.
81
+
82
+ ## Adding a new pair
83
+
84
+ 1. Edit `rule-interactions.yml`, append a pair under `pairs:` with all
85
+ six required fields.
86
+ 2. Add both rule slugs to the top-level `rules:` block if not already
87
+ listed.
88
+ 3. Run `task lint-rule-interactions` — must exit 0.
89
+ 4. Update the Mermaid diagram above if the pair is anchor-relevant
90
+ (involves `non-destructive-by-default` or one of its five partners).
91
+ 5. Reference the matrix from the rule files that are involved (one
92
+ line each — the matrix is the source, not the rules).
93
+
94
+ ## When **not** to add a pair
95
+
96
+ - Two rules that never fire on the same turn — no interaction means
97
+ no entry; the matrix is for *active* relationships.
98
+ - Documentation-only cross-references (e.g. "see also") — those stay
99
+ in the rule files.
100
+ - Skill ↔ rule interactions — the matrix is rule-only. Skills are
101
+ invoked, not always-active.
102
+
103
+ ## See also
104
+
105
+ - [`docs/contracts/STABILITY.md`](STABILITY.md) — public-surface stability tiers.
106
+ - [`docs/contracts/adr-chat-history-split.md`](adr-chat-history-split.md) — ADR pattern for major rule structural changes.
107
+ - [`agents/roadmaps/archive/road-to-post-pr29-optimize.md`](../../agents/roadmaps/archive/road-to-post-pr29-optimize.md) § P2.2 — anchor for this matrix.