@event4u/agent-config 1.16.0 → 1.18.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 (224) hide show
  1. package/.agent-src/commands/{agents-audit.md → agents/audit.md} +4 -3
  2. package/.agent-src/commands/{agents-cleanup.md → agents/cleanup.md} +12 -6
  3. package/.agent-src/commands/{agents-prepare.md → agents/prepare.md} +4 -3
  4. package/.agent-src/commands/agents.md +46 -0
  5. package/.agent-src/commands/{chat-history-checkpoint.md → chat-history/checkpoint.md} +4 -4
  6. package/.agent-src/commands/{chat-history-clear.md → chat-history/clear.md} +4 -4
  7. package/.agent-src/commands/{chat-history-resume.md → chat-history/resume.md} +4 -4
  8. package/.agent-src/commands/chat-history/show.md +107 -0
  9. package/.agent-src/commands/chat-history.md +33 -89
  10. package/.agent-src/commands/{commit-in-chunks.md → commit/in-chunks.md} +15 -13
  11. package/.agent-src/commands/commit.md +22 -2
  12. package/.agent-src/commands/{context-create.md → context/create.md} +4 -3
  13. package/.agent-src/commands/{context-refactor.md → context/refactor.md} +4 -3
  14. package/.agent-src/commands/context.md +44 -0
  15. package/.agent-src/commands/{copilot-agents-init.md → copilot-agents/init.md} +4 -3
  16. package/.agent-src/commands/{copilot-agents-optimize.md → copilot-agents/optimize.md} +4 -3
  17. package/.agent-src/commands/copilot-agents.md +44 -0
  18. package/.agent-src/commands/council/default.md +221 -0
  19. package/.agent-src/commands/{council-design.md → council/design.md} +6 -5
  20. package/.agent-src/commands/{council-optimize.md → council/optimize.md} +7 -6
  21. package/.agent-src/commands/{council-pr.md → council/pr.md} +6 -5
  22. package/.agent-src/commands/council.md +47 -212
  23. package/.agent-src/commands/{create-pr-description.md → create-pr/description-only.md} +4 -2
  24. package/.agent-src/commands/create-pr.md +26 -5
  25. package/.agent-src/commands/{feature-dev.md → feature/dev.md} +5 -10
  26. package/.agent-src/commands/{feature-explore.md → feature/explore.md} +4 -8
  27. package/.agent-src/commands/{feature-plan.md → feature/plan.md} +4 -8
  28. package/.agent-src/commands/{feature-refactor.md → feature/refactor.md} +4 -8
  29. package/.agent-src/commands/{feature-roadmap.md → feature/roadmap.md} +6 -10
  30. package/.agent-src/commands/feature.md +6 -12
  31. package/.agent-src/commands/{fix-ci.md → fix/ci.md} +4 -8
  32. package/.agent-src/commands/{fix-portability.md → fix/portability.md} +4 -8
  33. package/.agent-src/commands/{fix-pr-bot-comments.md → fix/pr-bots.md} +4 -8
  34. package/.agent-src/commands/{fix-pr-developer-comments.md → fix/pr-developers.md} +4 -8
  35. package/.agent-src/commands/{fix-pr-comments.md → fix/pr.md} +7 -11
  36. package/.agent-src/commands/{fix-references.md → fix/refs.md} +4 -8
  37. package/.agent-src/commands/{fix-seeder.md → fix/seeder.md} +4 -8
  38. package/.agent-src/commands/fix.md +7 -13
  39. package/.agent-src/commands/{do-and-judge.md → judge/on-diff.md} +4 -3
  40. package/.agent-src/commands/judge/solo.md +90 -0
  41. package/.agent-src/commands/{do-in-steps.md → judge/steps.md} +4 -3
  42. package/.agent-src/commands/judge.md +35 -70
  43. package/.agent-src/commands/{memory-add.md → memory/add.md} +4 -3
  44. package/.agent-src/commands/{memory-full.md → memory/load.md} +4 -3
  45. package/.agent-src/commands/{memory-promote.md → memory/promote.md} +4 -3
  46. package/.agent-src/commands/{propose-memory.md → memory/propose.md} +4 -3
  47. package/.agent-src/commands/memory.md +48 -0
  48. package/.agent-src/commands/{module-create.md → module/create.md} +4 -3
  49. package/.agent-src/commands/{module-explore.md → module/explore.md} +4 -3
  50. package/.agent-src/commands/module.md +44 -0
  51. package/.agent-src/commands/{optimize-agents.md → optimize/agents.md} +4 -8
  52. package/.agent-src/commands/{optimize-augmentignore.md → optimize/augmentignore.md} +4 -9
  53. package/.agent-src/commands/{optimize-rtk-filters.md → optimize/rtk.md} +4 -8
  54. package/.agent-src/commands/{optimize-skills.md → optimize/skills.md} +4 -8
  55. package/.agent-src/commands/optimize.md +4 -10
  56. package/.agent-src/commands/{override-create.md → override/create.md} +4 -3
  57. package/.agent-src/commands/{override-manage.md → override/manage.md} +4 -3
  58. package/.agent-src/commands/override.md +44 -0
  59. package/.agent-src/commands/{roadmap-create.md → roadmap/create.md} +4 -3
  60. package/.agent-src/commands/{roadmap-execute.md → roadmap/execute.md} +4 -3
  61. package/.agent-src/commands/roadmap.md +44 -0
  62. package/.agent-src/commands/{tests-create.md → tests/create.md} +4 -3
  63. package/.agent-src/commands/{tests-execute.md → tests/execute.md} +4 -3
  64. package/.agent-src/commands/tests.md +44 -0
  65. package/.agent-src/contexts/communication/rules-auto/artifact-engagement-recording-mechanics.md +72 -0
  66. package/.agent-src/contexts/communication/rules-auto/augment-portability-mechanics.md +79 -0
  67. package/.agent-src/contexts/communication/rules-auto/augment-source-of-truth-mechanics.md +98 -0
  68. package/.agent-src/contexts/communication/rules-auto/cli-output-handling-mechanics.md +87 -0
  69. package/.agent-src/contexts/communication/rules-auto/command-suggestion-policy-mechanics.md +62 -0
  70. package/.agent-src/contexts/communication/rules-auto/docs-sync-mechanics.md +78 -0
  71. package/.agent-src/contexts/communication/rules-auto/package-ci-checks-mechanics.md +85 -0
  72. package/.agent-src/contexts/communication/rules-auto/review-routing-awareness-mechanics.md +65 -0
  73. package/.agent-src/contexts/communication/rules-auto/roadmap-progress-sync-mechanics.md +78 -0
  74. package/.agent-src/contexts/communication/rules-auto/skill-quality-mechanics.md +62 -0
  75. package/.agent-src/contexts/communication/rules-auto/slash-command-routing-policy-mechanics.md +55 -0
  76. package/.agent-src/contexts/communication/rules-auto/ui-audit-gate-mechanics.md +53 -0
  77. package/.agent-src/contexts/communication/rules-auto/user-interaction-mechanics.md +77 -0
  78. package/.agent-src/contexts/judges/no-consolidate-rationale.md +102 -0
  79. package/.agent-src/contexts/judges/persona-voice-rubric.md +140 -0
  80. package/.agent-src/rules/artifact-engagement-recording.md +13 -69
  81. package/.agent-src/rules/ask-when-uncertain.md +27 -42
  82. package/.agent-src/rules/augment-portability.md +15 -61
  83. package/.agent-src/rules/augment-source-of-truth.md +27 -93
  84. package/.agent-src/rules/cli-output-handling.md +10 -76
  85. package/.agent-src/rules/command-suggestion-policy.md +18 -59
  86. package/.agent-src/rules/commit-conventions.md +17 -14
  87. package/.agent-src/rules/context-hygiene.md +6 -0
  88. package/.agent-src/rules/direct-answers.md +35 -59
  89. package/.agent-src/rules/docker-commands.md +5 -5
  90. package/.agent-src/rules/docs-sync.md +15 -69
  91. package/.agent-src/rules/language-and-tone.md +48 -72
  92. package/.agent-src/rules/missing-tool-handling.md +28 -22
  93. package/.agent-src/rules/no-cheap-questions.md +39 -53
  94. package/.agent-src/rules/no-roadmap-references.md +73 -0
  95. package/.agent-src/rules/onboarding-gate.md +7 -0
  96. package/.agent-src/rules/package-ci-checks.md +21 -61
  97. package/.agent-src/rules/preservation-guard.md +64 -29
  98. package/.agent-src/rules/review-routing-awareness.md +24 -43
  99. package/.agent-src/rules/roadmap-progress-sync.md +31 -65
  100. package/.agent-src/rules/rule-type-governance.md +28 -0
  101. package/.agent-src/rules/security-sensitive-stop.md +8 -8
  102. package/.agent-src/rules/skill-quality.md +16 -48
  103. package/.agent-src/rules/slash-command-routing-policy.md +7 -4
  104. package/.agent-src/rules/think-before-action.md +52 -42
  105. package/.agent-src/rules/tool-safety.md +19 -16
  106. package/.agent-src/rules/ui-audit-gate.md +24 -38
  107. package/.agent-src/rules/user-interaction.md +13 -68
  108. package/.agent-src/skills/ai-council/SKILL.md +2 -0
  109. package/.agent-src/skills/api-testing/SKILL.md +1 -1
  110. package/.agent-src/skills/check-refs/SKILL.md +59 -40
  111. package/.agent-src/skills/conventional-commits-writing/SKILL.md +86 -28
  112. package/.agent-src/skills/copilot-agents-optimization/SKILL.md +5 -5
  113. package/.agent-src/skills/developer-like-execution/SKILL.md +4 -4
  114. package/.agent-src/skills/finishing-a-development-branch/SKILL.md +101 -65
  115. package/.agent-src/skills/flux/SKILL.md +30 -10
  116. package/.agent-src/skills/github-ci/SKILL.md +2 -2
  117. package/.agent-src/skills/judge-code-quality/SKILL.md +7 -8
  118. package/.agent-src/skills/judge-security-auditor/SKILL.md +4 -5
  119. package/.agent-src/skills/judge-test-coverage/SKILL.md +3 -4
  120. package/.agent-src/skills/lint-skills/SKILL.md +57 -39
  121. package/.agent-src/skills/md-language-check/SKILL.md +61 -39
  122. package/.agent-src/skills/override-management/SKILL.md +5 -5
  123. package/.agent-src/skills/quality-tools/SKILL.md +2 -2
  124. package/.agent-src/skills/react-shadcn-ui/SKILL.md +116 -43
  125. package/.agent-src/skills/readme-reviewer/SKILL.md +30 -29
  126. package/.agent-src/skills/readme-writing/SKILL.md +78 -53
  127. package/.agent-src/skills/readme-writing-package/SKILL.md +50 -47
  128. package/.agent-src/skills/receiving-code-review/SKILL.md +52 -47
  129. package/.agent-src/skills/refine-prompt/SKILL.md +0 -1
  130. package/.agent-src/skills/requesting-code-review/SKILL.md +35 -30
  131. package/.agent-src/skills/security/SKILL.md +7 -2
  132. package/.agent-src/skills/security-audit/SKILL.md +7 -3
  133. package/.agent-src/skills/systematic-debugging/SKILL.md +68 -60
  134. package/.agent-src/skills/test-driven-development/SKILL.md +59 -57
  135. package/.agent-src/skills/test-performance/SKILL.md +0 -1
  136. package/.agent-src/skills/traefik/SKILL.md +4 -4
  137. package/.agent-src/skills/verify-completion-evidence/SKILL.md +28 -26
  138. package/.agent-src/templates/roadmaps.md +4 -0
  139. package/.claude-plugin/marketplace.json +22 -11
  140. package/AGENTS.md +2 -2
  141. package/CHANGELOG.md +125 -1
  142. package/README.md +18 -17
  143. package/docs/architecture.md +4 -6
  144. package/docs/catalog.md +67 -39
  145. package/docs/contracts/STABILITY.md +13 -7
  146. package/docs/contracts/adr-chat-history-split.md +1 -3
  147. package/docs/contracts/adr-command-suggestion.md +0 -2
  148. package/docs/contracts/adr-implement-ticket-runtime.md +1 -2
  149. package/docs/contracts/adr-product-ui-track.md +3 -6
  150. package/docs/contracts/adr-prompt-driven-execution.md +3 -4
  151. package/docs/contracts/agent-memory-contract.md +6 -11
  152. package/docs/contracts/artifact-engagement-flow.md +6 -9
  153. package/docs/contracts/command-clusters.md +56 -46
  154. package/docs/contracts/command-suggestion-flow.md +1 -3
  155. package/docs/contracts/context-paths.md +99 -0
  156. package/docs/contracts/file-ownership-matrix.json +6722 -0
  157. package/docs/contracts/file-ownership-matrix.md +134 -0
  158. package/docs/contracts/implement-ticket-flow.md +6 -9
  159. package/docs/contracts/linear-ai-rules-inclusion.md +0 -1
  160. package/docs/contracts/linear-ai-three-layers.md +0 -2
  161. package/docs/contracts/load-context-budget-model.md +258 -0
  162. package/docs/contracts/load-context-schema.md +21 -3
  163. package/docs/contracts/roadmap-complexity-standard.md +137 -0
  164. package/docs/contracts/rule-interactions.md +0 -1
  165. package/docs/contracts/rule-priority-hierarchy.md +1 -1
  166. package/docs/contracts/ui-track-flow.md +7 -17
  167. package/docs/customization.md +2 -0
  168. package/docs/getting-started.md +5 -4
  169. package/docs/guidelines/agent-infra/ask-when-uncertain-demos.md +134 -0
  170. package/docs/guidelines/agent-infra/asking-and-brevity-examples.md +100 -0
  171. package/docs/guidelines/agent-infra/direct-answers-demos.md +145 -0
  172. package/docs/guidelines/agent-infra/verify-before-complete-demos.md +128 -0
  173. package/package.json +1 -1
  174. package/scripts/_phase2_shim_helper.py +109 -0
  175. package/scripts/agent-config +30 -0
  176. package/scripts/ai_council/one_off_archive/2026-05/README.md +45 -0
  177. package/scripts/ai_council/one_off_archive/2026-05/_one_off_2a4_acceptance.py +208 -0
  178. package/scripts/ai_council/one_off_archive/2026-05/_one_off_budget_v2_audit.py +206 -0
  179. package/scripts/ai_council/one_off_archive/2026-05/_one_off_context_layer_v1_estimate.py +67 -0
  180. package/scripts/ai_council/one_off_archive/2026-05/_one_off_context_layer_v1_review.py +292 -0
  181. package/scripts/ai_council/one_off_archive/2026-05/_one_off_followups_review.py +259 -0
  182. package/scripts/ai_council/one_off_archive/2026-05/_one_off_nondestructive_inline_audit.py +209 -0
  183. package/scripts/ai_council/one_off_archive/2026-05/_one_off_phase4_dispatch_latency.py +108 -0
  184. package/scripts/ai_council/one_off_archive/2026-05/_one_off_phase6_trigger_jaccard.py +92 -0
  185. package/scripts/ai_council/one_off_archive/2026-05/_one_off_phase_2a_budget_rebalance.py +257 -0
  186. package/scripts/ai_council/one_off_archive/2026-05/_one_off_phase_2a_post_revert.py +197 -0
  187. package/scripts/ai_council/one_off_archive/2026-05/_one_off_rule_hardening_v1.py +251 -0
  188. package/scripts/ai_council/one_off_archive/2026-05/_one_off_structural_open_questions.py +232 -0
  189. package/scripts/ai_council/one_off_archive/2026-05/_one_off_structural_optimization.py +144 -0
  190. package/scripts/ai_council/one_off_archive/2026-05/_one_off_structural_v3_gaps.py +252 -0
  191. package/scripts/ai_council/one_off_archive/2026-05/_one_off_structural_v3_review.py +240 -0
  192. package/scripts/build_rule_trigger_matrix.py +360 -0
  193. package/scripts/check_always_budget.py +402 -45
  194. package/scripts/check_cluster_patterns.py +159 -0
  195. package/scripts/check_command_count_messaging.py +14 -7
  196. package/scripts/check_context_paths.py +201 -0
  197. package/scripts/check_no_roadmap_refs.py +155 -0
  198. package/scripts/check_one_off_location.py +81 -0
  199. package/scripts/check_phase_coupling.py +148 -0
  200. package/scripts/check_portability.py +2 -0
  201. package/scripts/check_references.py +35 -2
  202. package/scripts/check_safety_floor_untouched.py +125 -0
  203. package/scripts/command_suggester/loader.py +4 -1
  204. package/scripts/compress.py +64 -15
  205. package/scripts/context_hygiene_hook.py +173 -0
  206. package/scripts/generate_index.py +6 -2
  207. package/scripts/generate_ownership_matrix.py +323 -0
  208. package/scripts/hooks/augment-context-hygiene.sh +55 -0
  209. package/scripts/hooks/augment-onboarding-gate.sh +55 -0
  210. package/scripts/hooks/augment-roadmap-progress.sh +57 -0
  211. package/scripts/install.py +105 -45
  212. package/scripts/lint_examples.py +98 -0
  213. package/scripts/lint_no_new_atomic_commands.py +12 -11
  214. package/scripts/lint_roadmap_complexity.py +127 -0
  215. package/scripts/onboarding_gate_hook.py +137 -0
  216. package/scripts/requirements-evals.txt +1 -0
  217. package/scripts/roadmap_progress_hook.py +159 -0
  218. package/scripts/schemas/command.schema.json +4 -3
  219. package/scripts/schemas/rule.schema.json +5 -0
  220. package/scripts/skill_linter.py +1 -0
  221. package/scripts/sync_agent_settings.py +25 -2
  222. package/scripts/update_counts.py +7 -0
  223. /package/scripts/ai_council/{_one_off_rebalancing_audit.py → one_off_archive/2026-05/_one_off_rebalancing_audit.py} +0 -0
  224. /package/scripts/ai_council/{_one_off_roundtrip.py → one_off_archive/2026-05/_one_off_roundtrip.py} +0 -0
@@ -3,6 +3,8 @@ type: "auto"
3
3
  alwaysApply: false
4
4
  description: "After a /implement-ticket or /work phase-step (refine/memory/analyze/plan/implement/test/verify/report) or full task — emit one telemetry:record call with consulted+applied ids when enabled"
5
5
  source: package
6
+ load_context:
7
+ - .agent-src.uncompressed/contexts/communication/rules-auto/artifact-engagement-recording-mechanics.md
6
8
  ---
7
9
 
8
10
  <!-- cloud_safe: noop -->
@@ -15,11 +17,10 @@ Default-off; opt-in via `.agent-settings.yml`. Zero overhead when disabled.
15
17
 
16
18
  The schema, CLI, and storage layer are owned by
17
19
  [`scripts/telemetry/`](../../../scripts/telemetry/) and the
18
- `./agent-config telemetry:record` / `telemetry:status` commands shipped
19
- in Phase 1+2 of the
20
- [`road-to-artifact-engagement-telemetry`](../../../agents/roadmaps/road-to-artifact-engagement-telemetry.md)
21
- roadmap. This rule says **when** to call the CLI, not how the file is
22
- structured.
20
+ `./agent-config telemetry:record` / `telemetry:status` commands. The
21
+ recording contract lives in
22
+ [`docs/contracts/artifact-engagement-flow.md`](../../docs/contracts/artifact-engagement-flow.md).
23
+ This rule says **when** to call the CLI, not how the file is structured.
23
24
 
24
25
  ## Activation gate — read settings ONCE per task, then cache
25
26
 
@@ -60,73 +61,16 @@ consulted three times in the same boundary records once.
60
61
  When in doubt → record as `consulted` only. Over-recording `applied`
61
62
  inflates the engagement signal and defeats the purpose.
62
63
 
63
- ## What to record id-only, no payload
64
-
65
- ```bash
66
- ./agent-config telemetry:record \
67
- --task-id "$TASK_ID" \
68
- --boundary task \
69
- --consulted skills:php-coder \
70
- --consulted skills:eloquent \
71
- --consulted rules:scope-control \
72
- --applied skills:php-coder \
73
- --applied rules:scope-control
74
- ```
75
-
76
- - `--task-id` — the ticket key (`PROJ-123`) for `/implement-ticket`, or a
77
- short opaque slug derived from the prompt for `/work`. **Never** a
78
- branch name, a file path, or a free-text title.
79
- - `--boundary` — `task` or `phase-step`, matching the cadence above.
80
- - `--consulted <kind>:<id>` — repeat per artefact. `<kind>` is one of
81
- `skills`, `rules`, `commands`, `guidelines`, `personas`.
82
- - `--applied <kind>:<id>` — repeat per artefact actually applied.
83
- - Exit `0` always when disabled (silent). Exit `1` on schema validation
84
- failure (rule must NOT swallow this — surface to the user). Exit `2`
85
- on IO failure.
86
-
87
- ## Privacy contract — what NEVER goes into a record
88
-
89
- The CLI rejects most violations on the input boundary, but the agent must
90
- not even attempt these:
91
-
92
- - ❌ File paths (`src/Foo.php`, `tests/...`) — id fields are
93
- artefact identifiers only.
94
- - ❌ Source code, prompt text, ticket body, AC text.
95
- - ❌ Branch names, commit shas, PR numbers, URLs.
96
- - ❌ Secrets, env vars, credentials, customer data.
97
- - ❌ Free-text strings longer than 200 chars (CLI enforces; agent must
98
- not generate).
99
-
100
- When in doubt → **don't record**. A missing event is cheap; a leaked
101
- prompt is not.
102
-
103
- ## Failure modes — DO NOT block the user's task
104
-
105
- - Schema rejection (CLI exit `1`) → log the message internally, continue
106
- the user's task. Do **not** halt the dispatch loop.
107
- - IO failure (CLI exit `2`) → same. The telemetry is **observation**, not
108
- a delivery requirement.
109
- - Settings malformed → already handled by the CLI: it falls back to
110
- disabled and exits `0`. Agent treats it as "disabled this task".
111
-
112
- The only error the agent surfaces is when the user explicitly asked for
113
- recording (`telemetry:status` confirms enabled) but no event reached the
114
- log — that is a real bug, not a swallowed error.
115
-
116
- ## What this rule does NOT do
117
-
118
- - Run when `enabled: false` (cost floor is zero — see
119
- [`tests/telemetry/test_cost_floor.py`](../../../tests/telemetry/test_cost_floor.py)).
120
- - Track the agent's tool calls, file reads, or token spend — that is
121
- out of scope, see the roadmap's "out-of-scope" section.
122
- - Decide retirement. Phase 4's aggregator + report renderer are the only
123
- consumers that may interpret the JSONL.
124
- - Run on cloud surfaces (Claude.ai Web, Skills API). The
125
- `cloud_safe: noop` marker keeps it inert there.
64
+ ## Mechanics CLI invocation, privacy contract, failure handling
65
+
66
+ The exact `telemetry:record` call shape with all flags, the privacy
67
+ contract (what NEVER goes into a record), the failure-mode handling
68
+ (do NOT block the user's task), and the "what this rule does NOT do"
69
+ catalog live in
70
+ [`contexts/communication/rules-auto/artifact-engagement-recording-mechanics.md`](../contexts/communication/rules-auto/artifact-engagement-recording-mechanics.md).
126
71
 
127
72
  ## See also
128
73
 
129
- - [`road-to-artifact-engagement-telemetry`](../../../agents/roadmaps/road-to-artifact-engagement-telemetry.md) — phase contract
130
74
  - [`docs/contracts/artifact-engagement-flow.md`](../../docs/contracts/artifact-engagement-flow.md) — recording contract details
131
75
  - [`/implement-ticket`](../commands/implement-ticket.md) and [`/work`](../commands/work.md) — boundary points where this rule fires
132
76
  - [`scripts/telemetry/`](../../../scripts/telemetry/) — engine source
@@ -17,16 +17,13 @@ ONE QUESTION PER TURN. NO EXCEPTIONS.
17
17
  ASK. WAIT FOR THE ANSWER. THEN ASK THE NEXT.
18
18
  ```
19
19
 
20
- This is absolute. Not a default, not a guideline, not "usually".
21
- Every turn that contains a question contains **exactly one** question.
22
- Even if the questions look trivial. Even if they look independent.
23
- Even if they would fit on one screen. Even if batching "feels more
24
- efficient". Full self-check, ordering, and handoff rules under
25
- [How to ask](#how-to-ask).
20
+ Absolute. Not a default, not "usually". Every turn with a question
21
+ has **exactly one**. Even if trivial, independent, or batchable.
22
+ Self-check, ordering, handoff under [How to ask](#how-to-ask).
26
23
 
27
24
  ## When to ask
28
25
 
29
- - Requirement is ambiguous or could be interpreted multiple ways
26
+ - Requirement ambiguous or multi-interpretable
30
27
  - Not 100% sure which approach is correct
31
28
  - About to touch code you haven't fully understood
32
29
  - Choosing between multiple valid approaches
@@ -34,47 +31,35 @@ efficient". Full self-check, ordering, and handoff rules under
34
31
 
35
32
  ## Vague-request triggers — MUST ask
36
33
 
37
- The following patterns are almost always too vague to execute safely. When the user's
38
- request matches one of these without further context, ask **before** touching code:
34
+ These patterns are too vague to execute safely. Match without further
35
+ context ask **before** touching code:
39
36
 
40
- | Pattern | Missing info | Example question |
41
- |---|---|---|
42
- | "improve / optimize this" | What metric? Speed, readability, memory? | "Optimize for what execution speed or readability?" |
43
- | "add caching" | Cache store? Scope? Invalidation rules? | "Which cache driver, and what invalidates it?" |
44
- | "make it better / cleaner" | By what standard? | "What specifically feels wrong in the current code?" |
45
- | "clean up this file" | Dead code? Formatting? Refactor? | "Remove unused code, reformat, or restructure?" |
46
- | "fix this" (without specifying) | What's the symptom? | "What output/behavior is wrong right now?" |
47
- | "refactor X" | Target pattern? Boundaries? | "Refactor toward what smaller methods, extract class, or something else?" |
48
- | "use best practices" | Whose? For what? | "Best practices for what specifically testing, naming, structure?" |
49
- | "handle errors properly" | Which errors? How? Log, retry, propagate? | "For which failure modes, and what should happen on error?" |
50
- | "add a UI / component / tile / page" when the repo mixes frameworks | Which stack? Tailwind? Flux? Livewire? Custom? | "This repo uses {A} and {B} for UI — which one for this?" |
37
+ - "improve / optimize this" metric? speed, readability, memory?
38
+ - "add caching" — store? scope? invalidation?
39
+ - "make it better / cleaner" — by what standard?
40
+ - "clean up this file" dead code? format? refactor?
41
+ - "fix this" (no symptom) what output is wrong?
42
+ - "refactor X" target pattern? boundaries?
43
+ - "use best practices" whose? for what?
44
+ - "handle errors properly" — which errors? log/retry/propagate?
45
+ - "add a UI/component/tile/page" in mixed-framework repowhich stack?
51
46
 
52
- **Escape hatch:** If surrounding context (ticket, open file, prior conversation)
53
- makes the answer unambiguous, proceed — but state the assumption explicitly.
47
+ Example questions per pattern:
48
+ [`asking-and-brevity-examples`](../../docs/guidelines/agent-infra/asking-and-brevity-examples.md#vague-request-triggers--example-questions).
54
49
 
55
- ## How to ask
56
-
57
- Be specific. Present numbered options (per `user-interaction`). Keep it short.
50
+ **Escape hatch:** if context (ticket, open file, prior turn) makes
51
+ the answer unambiguous, proceed — but state the assumption.
58
52
 
59
- The Iron Law (one question per turn) is at the top of this file.
60
- This section adds the rationale, self-check, and ordering.
61
-
62
- The user must never have to track sub-numbers, scroll through stacked
63
- option blocks, or split their reply across multiple questions. One
64
- question, numbered options (per `user-interaction`), one short
65
- answer, next turn.
53
+ ## How to ask
66
54
 
67
- Rationale why even "trivial" batches fail:
55
+ Numbered options (per `user-interaction`). Short. The Iron Law is at
56
+ the top; this section adds self-check and ordering.
68
57
 
69
- | Situation | Why serial always wins |
70
- |---|---|
71
- | Design / architecture decisions | Answer to Q1 reframes Q2 |
72
- | Naming / command-syntax / API shape | Later choices depend on it |
73
- | Scope / PR boundaries | Changes what the other questions even mean |
74
- | Tool / library selection | Downstream choices branch from it |
75
- | "Which approach: A vs B vs C" | Each answer opens a different follow-up |
76
- | Even "independent" yes/no pairs | User still has to parse two contexts |
77
- | Any question the user has to **think** about, not just pick | Thinking load compounds when stacked |
58
+ The user must never track sub-numbers, scroll stacked option blocks,
59
+ or split a reply across multiple questions. Rationale shorthand: if
60
+ the user has to *think* about an answer, that answer almost always
61
+ reframes the next question. Full rationale:
62
+ [`asking-and-brevity-examples`](../../docs/guidelines/agent-infra/asking-and-brevity-examples.md#one-question-per-turn--why-serial-always-wins).
78
63
 
79
64
  ### Self-check before asking
80
65
 
@@ -2,6 +2,8 @@
2
2
  type: "auto"
3
3
  description: "Editing or creating files inside .augment/ directory — skills, rules, commands, templates, contexts must be project-agnostic"
4
4
  source: package
5
+ load_context:
6
+ - .agent-src.uncompressed/contexts/communication/rules-auto/augment-portability-mechanics.md
5
7
  ---
6
8
 
7
9
  # Package Portability
@@ -36,76 +38,28 @@ content into any of them pollutes downstream projects or misleads agents.
36
38
 
37
39
  ## Runtime invocations — no `task` commands
38
40
 
39
- Skills, rules, commands, guidelines, personas, and context docs
40
- shipped by this package run in **consumer projects**. Consumer
41
- projects may not have [Task](https://taskfile.dev) installed
42
- they might use npm scripts, Composer scripts, Make, or nothing at
43
- all. A skill that instructs an agent to run `task <something>`
44
- silently breaks in every project without a `Taskfile.yml`.
45
-
46
- **Rule:** Never reference a `task <something>` invocation inside any
47
- artefact file under `.agent-src.uncompressed/{skills,rules,commands,guidelines,personas,contexts}/`
41
+ Skills, rules, commands, guidelines, personas, and context docs run in
42
+ **consumer projects**, which may not have Task installed. **Never**
43
+ reference a `task <something>` invocation inside any artefact file
44
+ under `.agent-src.uncompressed/{skills,rules,commands,guidelines,personas,contexts}/`
48
45
  (and therefore also not in the compressed mirror under `.agent-src/`).
49
- Use the direct script invocation instead:
50
-
51
- | ❌ Forbidden | ✅ Portable |
52
- |---|---|
53
- | `task sync` | `bash scripts/compress.sh --sync` |
54
- | `task sync-check` | `bash scripts/compress.sh --check` |
55
- | `task sync-check-hashes` | `bash scripts/compress.sh --check-hashes` |
56
- | `task sync-changed` | `bash scripts/compress.sh --changed` |
57
- | `task sync-mark-done -- X` | `bash scripts/compress.sh --mark-done X` |
58
- | `task generate-tools` | `python3 scripts/compress.py --generate-tools` |
59
- | `task lint-skills` | `python3 scripts/skill_linter.py --all` |
60
- | `task check-refs` | `python3 scripts/check_references.py` |
61
- | `task check-portability` | `python3 scripts/check_portability.py` |
62
- | `task check-compression` | `python3 scripts/check_compression.py` |
63
- | `task validate-schema` | `python3 scripts/validate_frontmatter.py` |
64
- | `task counts-check` | `python3 scripts/update_counts.py --check` |
65
- | `task roadmap-progress` | `./agent-config roadmap:progress` |
66
- | `task ci` | run each underlying script directly (no single portable equivalent) |
67
-
68
- Task remains a convenience shortcut for maintainers working on the
69
- package repo itself — `task ci` is the recommended local gate before
70
- a PR and lives in `Taskfile.yml`, `AGENTS.md`, and the package README.
71
- Those maintainer-facing surfaces are outside the scope of this rule.
72
- Artefact files must assume Task is absent.
73
-
74
- The detection pattern *"if the consumer has a `Makefile` / build
75
- script, prefer its targets over raw commands"* is still allowed when
76
- the skill adapts to the **consumer's own** tooling (e.g.
77
- `tests-execute` detecting `php artisan test` vs `vendor/bin/pest`).
78
- It is not allowed to reference `task <name>` as the detected target —
79
- every direct invocation must resolve to a real script path.
46
+ Use direct script invocations instead.
80
47
 
81
48
  ## Consumer CLI — `./agent-config`
82
49
 
83
50
  A subset of package scripts is exposed through a project-local CLI
84
51
  wrapper `./agent-config` (written into the project root by the
85
52
  installer, gitignored). Artefacts MUST prefer the CLI over raw
86
- `python3 scripts/…` paths for every command the CLI already covers,
87
- because the raw paths only resolve inside the package repo — in a
88
- consumer project the scripts live under `node_modules/` or `vendor/`.
53
+ `python3 scripts/…` paths for every command the CLI already covers.
89
54
 
90
- | Forbidden in artefacts | ✅ Portable |
91
- |---|---|
92
- | `python3 scripts/mcp_render.py` | `./agent-config mcp:render` |
93
- | `python3 scripts/mcp_render.py --check` | `./agent-config mcp:check` |
94
- | `python3 .augment/scripts/update_roadmap_progress.py` | `./agent-config roadmap:progress` |
95
- | `python3 .augment/scripts/update_roadmap_progress.py --check` | `./agent-config roadmap:progress-check` |
96
- | `bash scripts/first-run.sh` | `./agent-config first-run` |
97
- | `PYTHONPATH=… python3 -m implement_ticket` | `./agent-config implement-ticket` |
98
- | `python3 scripts/memory_lookup.py` | `./agent-config memory:lookup` |
99
- | `python3 scripts/memory_signal.py` | `./agent-config memory:signal` |
100
- | `python3 scripts/memory_hash.py` | `./agent-config memory:hash` |
101
- | `python3 scripts/check_memory.py` | `./agent-config memory:check` |
102
- | `python3 scripts/check_memory_proposal.py` | `./agent-config memory:check-proposal` |
103
- | `python3 scripts/check_proposal.py` | `./agent-config proposal:check` |
104
- | `python3 scripts/refine_ticket_detect.py` | `./agent-config refine-ticket:detect` |
55
+ ## Translation tables see mechanics
105
56
 
106
- Commands not covered by the CLI stay as direct script invocations
107
- (e.g. `bash scripts/compress.sh --sync`) those are maintainer-only
108
- and not reachable from a consumer project anyway.
57
+ The full `task`-to-script translation table, the `./agent-config`
58
+ CLI mapping, and the rationale (Task absence on consumers,
59
+ maintainer-vs-artefact split) all live in
60
+ [`contexts/communication/rules-auto/augment-portability-mechanics.md`](../contexts/communication/rules-auto/augment-portability-mechanics.md).
61
+ Pull it whenever an artefact is about to mention a runtime
62
+ invocation.
109
63
 
110
64
  ## Enforcement
111
65
 
@@ -2,19 +2,22 @@
2
2
  type: "auto"
3
3
  description: "Creating, editing, or modifying files inside .agent-src/ or .augment/ — the source of truth is .agent-src.uncompressed/, never edit the generated directories directly"
4
4
  source: package
5
+ load_context:
6
+ - .agent-src.uncompressed/contexts/communication/rules-auto/augment-source-of-truth-mechanics.md
5
7
  ---
6
8
 
7
9
  # Source of Truth
8
10
 
9
- `.agent-src.uncompressed/` is the **single source of truth**. Compressed output
10
- ships as `.agent-src/`. In the package repo, `.augment/` is a local projection
11
- of `.agent-src/` for Augment Code (rules copied, rest symlinked). Consumer
12
- projects still see `.augment/` as the installed runtime tree.
11
+ `.agent-src.uncompressed/` is the **single source of truth**. The compressed
12
+ output ships as `.agent-src/`. In the package repo, `.augment/` is a local
13
+ projection of `.agent-src/` for Augment Code (rules copied, rest symlinked).
14
+ Consumer projects still see `.augment/` as the installed runtime tree.
13
15
 
14
- Never edit any generated layer directly:
16
+ Never edit any of these generated layers directly:
15
17
 
16
18
  - `.agent-src/` — compressed output shipped in the package
17
- - `.augment/` — local projection (gitignored in package; installer output in consumers)
19
+ - `.augment/` — local projection (gitignored in the package repo; installer
20
+ output in consumer projects)
18
21
  - `.claude/`, `.cursor/`, `.clinerules/`, `.windsurfrules` — tool projections
19
22
 
20
23
  ## The Iron Rule
@@ -24,73 +27,20 @@ NEVER create or edit files in .agent-src/ or .augment/ directly — not even "ju
24
27
  ALWAYS work in .agent-src.uncompressed/ — then compress via /compress command.
25
28
  ```
26
29
 
27
- **ZERO exceptions.** Even if the fix is obvious, small, or "faster" — STOP.
28
- Edit `.agent-src.uncompressed/` first. Always.
30
+ **There are ZERO exceptions to this rule.** Even if:
29
31
 
30
- Direct edits to `.agent-src/` break compression hashes, cause CI failures, and create drift.
32
+ - You "know" the compressed content is correct
33
+ - It's "just adding a missing section"
34
+ - It's "faster to edit the compressed file directly"
35
+ - The fix is "trivially obvious"
31
36
 
32
- **Compression ONLY via `/compress` command.** Handles hashing, sync, and quality checks.
37
+ **STOP. Edit `.agent-src.uncompressed/` first. Always.**
33
38
 
34
- ## Workflow
39
+ Direct edits to `.agent-src/` break compression hashes, cause CI failures
40
+ ("Verify compression hashes" step), and create drift between source and output.
35
41
 
36
- 1. **Create or edit** the file in `.agent-src.uncompressed/{path}`
37
- 2. **Do NOT auto-compress.** Continue working.
38
- 3. **Before commit/push:** Check if compression is needed (`bash scripts/compress.sh --changed`).
39
- If files need compression, ask the user:
40
- ```
41
- > 📦 {N} .agent-src files need compression before commit.
42
- >
43
- > 1. Compress now — run /compress
44
- > 2. Later — commit without compression
45
- ```
46
- 4. If compressing: run `/compress` command, then `bash scripts/compress.sh --mark-done {path}`
47
-
48
- For new non-.md files (`.php`, configs): `bash scripts/compress.sh --sync` copies them automatically.
49
-
50
- **Key change:** Compression happens once before commit/push — not after every edit.
51
- This avoids interruptions when work is still in progress.
52
-
53
- ## What "compress" means
54
-
55
- - Remove articles (a, an, the), filler, hedging, connective fluff
56
- - Shorten phrases: "in order to" → "to", "make sure to" → "ensure"
57
- - Fragments OK: "Run tests before commit" not "You should always run tests before committing"
58
- - Merge redundant bullets
59
-
60
- ## What NEVER changes during compression
61
-
62
- - Code blocks, inline code, URLs, file paths, commands
63
- - Headings (exact text preserved)
64
- - Tables (structure preserved, compress cell text only)
65
- - YAML frontmatter
66
- - Technical terms, library names, API names
67
- - Strong language: "NEVER", "MUST", "Do NOT" — these are load-bearing
68
-
69
- ## Commands workflow
70
-
71
- Commands live in `.agent-src.uncompressed/commands/{name}.md` (single source of truth).
72
- Claude Code reads them via symlinks in `.claude/skills/{name}/SKILL.md`.
73
-
74
- **Required frontmatter for commands:**
75
-
76
- ```yaml
77
- name: {command-name}
78
- description: {what it does}
79
- disable-model-invocation: true
80
- ```
81
-
82
- - `name` and `disable-model-invocation: true` are required for Claude Code compatibility
83
- - Augment ignores unknown frontmatter fields — no conflict
84
- - Template: `.agent-src.uncompressed/templates/command.md`
85
-
86
- **Creating a new command:**
87
-
88
- 1. Create `.agent-src.uncompressed/commands/{name}.md` (use template)
89
- 2. Run `python3 scripts/skill_linter.py` — must be 0 FAIL
90
- 3. Compress via `/compress`, which writes to `.agent-src/commands/`
91
- 4. Run `python3 scripts/compress.py --generate-tools` — creates Claude symlink automatically
92
-
93
- **Never** create `.claude/skills/{name}/SKILL.md` manually for commands — always use the symlink workflow.
42
+ **Compression is ONLY done via the `/compress` command.** The command handles
43
+ hashing, sync verification, and quality checks automatically.
94
44
 
95
45
  ## Pre-review consistency checkpoints
96
46
 
@@ -101,28 +51,12 @@ Before asking for review or creating a PR, verify derived outputs are not stale:
101
51
  3. Before merge: verify derived outputs (`.agent-src/`, `.augment/`, `.claude/skills/`) are regenerated
102
52
  4. Do NOT leave `.agent-src/` stale across review cycles
103
53
 
104
- ## Multi-agent symlink mapping
105
-
106
- `.claude/skills/` contains symlinks to **both** `.agent-src/skills/` and `.agent-src/commands/`.
107
- Claude Code treats both as "skills" — but they are different artifact types in our taxonomy.
108
-
109
- | `.claude/skills/{name}/SKILL.md` points to... | Actual type |
110
- |---|---|
111
- | `.agent-src/skills/{name}/SKILL.md` | **Skill** (workflow) |
112
- | `.agent-src/commands/{name}.md` | **Command** (slash-invoked procedure) |
113
-
114
- Always check the symlink target to determine the actual artifact type.
115
- Commands have `disable-model-invocation: true` in their frontmatter.
116
-
117
- ## Quick reference
54
+ ## Mechanics workflow, compression rules, commands, symlinks, quick reference
118
55
 
119
- | Task | What to do |
120
- |---|---|
121
- | Edit existing file | Edit in `.agent-src.uncompressed/`, compress to `.agent-src/` |
122
- | Create new `.md` | Create in `.agent-src.uncompressed/`, compress to `.agent-src/` |
123
- | Create new non-`.md` | Create in `.agent-src.uncompressed/`, run `bash scripts/compress.sh --sync` |
124
- | Create new command | Create in `.agent-src.uncompressed/commands/`, sync, `python3 scripts/compress.py --generate-tools` |
125
- | Delete a file | Delete from `.agent-src.uncompressed/` and `.agent-src/` |
126
- | Check what needs compression | `bash scripts/compress.sh --changed` |
127
- | Mark file as compressed | `bash scripts/compress.sh --mark-done {path}` |
128
- | Verify everything is in sync | `bash scripts/compress.sh --check` |
56
+ The authoring workflow, what compression does (and never touches), the
57
+ commands workflow with required frontmatter, the multi-agent symlink
58
+ mapping, and the per-task quick-reference table live in
59
+ [`contexts/communication/rules-auto/augment-source-of-truth-mechanics.md`](../contexts/communication/rules-auto/augment-source-of-truth-mechanics.md).
60
+ Pull it whenever an edit, new file, new command, or sync question
61
+ fires the rule above is the obligation surface; the mechanics file
62
+ is the lookup material.
@@ -3,6 +3,8 @@ type: "auto"
3
3
  alwaysApply: false
4
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."
5
5
  source: package
6
+ load_context:
7
+ - .agent-src.uncompressed/contexts/communication/rules-auto/cli-output-handling-mechanics.md
6
8
  ---
7
9
 
8
10
  # Development Efficiency
@@ -32,83 +34,15 @@ exits 0. Caching the result for the session is fine.
32
34
  For the full rtk subcommand catalog and project-local filter setup → see
33
35
  the `rtk-output-filtering` skill.
34
36
 
35
- ## Codebase Navigation
37
+ ## Lookup material — see mechanics
36
38
 
37
- ### Use what you already have
38
-
39
- - Edited a file the edit tool already returned the result. Skip re-reading.
40
- - Ran a command → you have the output. Skip re-running to "verify".
41
- - File in context from recent messages → skip reloading.
42
- - Found a symbol use it. Skip searching again differently.
43
-
44
- ### Search before reading
45
-
46
- - **Search first** — `codebase-retrieval`, `search_query_regex`, or `grep`.
47
- - **Load only what you need** — use `view_range` or `search_query_regex`, not full files.
48
- - **Small files** (< 50 lines) — OK to read fully.
49
-
50
- ### Ignored files (`.augmentignore`)
51
-
52
- - `vendor/`, `node_modules/`, lock files, and generated files are excluded from `codebase-retrieval`.
53
- - When you need to understand a vendor package (base class, interface, API), **read the specific file** with `view`. This bypasses the ignore.
54
- - Load only the file you need — never browse entire vendor directories.
55
-
56
- ### Minimize tool calls
57
-
58
- - **Parallel reads** — read multiple files in one batch, not sequentially.
59
- - **`search_query_regex`** over full file reads.
60
- - **`view_range`** when you know the exact lines.
61
- - **One `codebase-retrieval` call** with all symbols — batch, not 5 separate calls.
62
-
63
- ## Fallback Pattern: Redirect, Summarize, Target
64
-
65
- When `rtk` has no matching subcommand for the tool at hand, fall back to
66
- this pattern. Every command that MAY produce more than ~30 lines of output:
67
-
68
- ### Step 1: Redirect to file
69
- ```bash
70
- docker compose exec -T <service> <command> 2>&1 > /tmp/<tool>-output.txt
71
- echo "EXIT=$?"
72
- ```
73
-
74
- ### Step 2: Read ONLY the summary
75
- ```bash
76
- tail -5 /tmp/<tool>-output.txt
77
- ```
78
-
79
- ### Step 3: If errors exist, read ONLY what you need to fix
80
- ```bash
81
- grep "ERROR\|error\|✏️" /tmp/<tool>-output.txt | head -20
82
- grep "app/Services/MyService.php" /tmp/<tool>-output.txt
83
- ```
84
-
85
- **NEVER** do:
86
- - `cat /tmp/<tool>-output.txt` (loads everything)
87
- - Read the full output of a passing command (waste)
88
- - Read diffs you don't plan to act on
89
-
90
- ## General Rules
91
-
92
- For tool-specific commands → see the `quality-tools` skill.
93
-
94
- 1. **Exit code first**: Check `$?` before reading ANY output. If 0, you're done — skip reading.
95
- 2. **Summary line**: Most tools print a summary as the last few lines. That's all you need.
96
- 3. **Targeted grep**: When you need details, `grep` for the specific file or error type.
97
- 4. **Read once, act, move on**: Once you've read output and acted on it, skip re-reading.
98
- 5. **Iterative fixing**: Fix one error at a time, re-run, check exit code.
99
- Output becomes stale after each fix — always re-run before reading again.
100
-
101
- ## CLI Over MCP
102
-
103
- MCP servers are **significantly more token-expensive** than CLI equivalents.
104
- When both options exist, prefer the CLI tool.
105
-
106
- - **Git**: `git` CLI, not Git MCP
107
- - **Files**: shell commands, not filesystem MCP
108
- - **APIs**: `curl`/`httpie`, not HTTP MCP
109
- - **Database**: `mysql`/`psql` CLI, not DB MCP
110
-
111
- Exception: MCPs with **unique capabilities** (Sentry, Playwright, Jira).
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.
112
46
 
113
47
  ## Exceptions
114
48