@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
@@ -4,8 +4,7 @@ stability: beta
4
4
 
5
5
  # UI Track — Flow Contract
6
6
 
7
- > Technical contracts for the UI directive sets shipped under
8
- > [`road-to-product-ui-track.md`](../../agents/roadmaps/road-to-product-ui-track.md).
7
+ > Technical contracts for the UI directive sets.
9
8
  > Sibling of [`implement-ticket-flow.md`](implement-ticket-flow.md) — that
10
9
  > doc covers `backend`; this one covers `ui`, `ui-trivial`, and the
11
10
  > `mixed` set that stitches both.
@@ -14,11 +13,10 @@ stability: beta
14
13
  > - **Status:** Phase 1–6 shipped — audit / design / apply / review /
15
14
  > polish handlers live under
16
15
  > [`.agent-src.uncompressed/templates/scripts/work_engine/directives/ui/`](../../.agent-src.uncompressed/templates/scripts/work_engine/directives/ui/).
17
- > Mixed (Phase 4) under `directives/mixed/`. `ui-trivial` (Phase 2 Step 6)
18
- > under `directives/ui_trivial/`. R4 (Visual Review Loop) added the
16
+ > Mixed under `directives/mixed/`. `ui-trivial` under
17
+ > `directives/ui_trivial/`. R4 (Visual Review Loop) added the
19
18
  > a11y gate, the preview envelope, and a polish-termination rewrite
20
- > that splits subjective ceilings from objective a11y blocks — see
21
- > [`road-to-visual-review-loop.md`](../../agents/roadmaps/road-to-visual-review-loop.md).
19
+ > that splits subjective ceilings from objective a11y blocks.
22
20
  > Golden Transcripts GT-U1..U4, U7, U8, U9..U12 plus GT-U5 (mixed
23
21
  > flow), GT-U6A/B (stack dispatch), and R4's GT-U13..U15 (a11y polish,
24
22
  > a11y ceiling, preview render failure) pin happy-path, ambiguity,
@@ -42,8 +40,6 @@ sentinels that release each gate.
42
40
  `SKILL.md` files.
43
41
  - A migration guide for the schema — see
44
42
  [`implement-ticket-flow.md`](implement-ticket-flow.md#state-schema-v1).
45
- - A roadmap — phased delivery lives in
46
- [`road-to-product-ui-track.md`](../../agents/roadmaps/road-to-product-ui-track.md).
47
43
 
48
44
  ## The four directive sets
49
45
 
@@ -323,15 +319,9 @@ suite asserts every `BLOCKED` path has a matching declaration.
323
319
  - [`implement-ticket-flow.md`](implement-ticket-flow.md) — sibling
324
320
  contract for the `backend` set; covers `DeliveryState`, schema v1,
325
321
  hooks, persona policies, replay protocol.
326
- - [`road-to-product-ui-track.md`](../../agents/roadmaps/road-to-product-ui-track.md)
327
- phased delivery and Golden-Transcript matrix.
328
- - [`road-to-product-ui-track-followup.md`](../../agents/roadmaps/archive/road-to-product-ui-track-followup.md)
329
- — pinned GT-U5 (mixed flow), GT-U6A/B (stack dispatch), GT-U7
330
- (trivial happy path), GT-U8 (trivial reclassification).
331
- - [`road-to-visual-review-loop.md`](../../agents/roadmaps/road-to-visual-review-loop.md)
332
- — R4 contract: a11y gate, preview envelope, polish-termination
333
- rewrite. Pinned by GT-U13 (a11y polish), GT-U14 (a11y ceiling),
334
- GT-U15 (preview render failure).
322
+ - [`adr-product-ui-track.md`](adr-product-ui-track.md) — locked
323
+ decisions for the UI track (R3) and the visual-review-loop
324
+ amendment (R4: a11y gate, preview envelope, polish-termination).
335
325
  - [`existing-ui-audit` SKILL](../../.agent-src.uncompressed/skills/existing-ui-audit/SKILL.md)
336
326
  — producer of `state.ui_audit`.
337
327
  - [`ui-audit-gate` rule](../../.agent-src.uncompressed/rules/ui-audit-gate.md)
@@ -67,6 +67,8 @@ those sections.
67
67
  | `ai_council.cost_budget.max_total_usd` | `0.0` | Per-invocation USD ceiling. `0` disables (token caps still apply). |
68
68
  | `ai_council.cost_budget.daily_limit_usd` | `0.0` | Rolling 24h USD ceiling across all `/council` calls. `0` disables. Ledger lives at `~/.config/agent-config/council-spend.jsonl` (mode 0600). |
69
69
 
70
+ > **Experimental.** AI Council is not yet validated by external users. API costs apply per consultation.
71
+
70
72
  Council API tokens are installed via `./agent-config keys:install-anthropic`
71
73
  and `./agent-config keys:install-openai` — they prompt on `/dev/tty`, write to
72
74
  `~/.config/agent-config/<provider>.key` with mode `0600`, and never accept env
@@ -115,7 +115,7 @@ Your agent is now:
115
115
  - **Respecting your codebase** — no conflicting patterns
116
116
  - **Following standards** — consistent code quality
117
117
 
118
- This is enforced automatically by 57 rules. No configuration needed.
118
+ This is enforced automatically by 58 rules. No configuration needed.
119
119
 
120
120
  ---
121
121
 
@@ -155,7 +155,7 @@ Your agent now understands slash commands:
155
155
  | `/chat-history-resume` | Recover context after a crashed or switched session |
156
156
  | `/chat-history-clear` | Wipe the chat-history log (with confirmation) |
157
157
 
158
- → [Browse all 69 active commands](../.agent-src/commands/)
158
+ → [Browse all 95 active commands](../.agent-src/commands/)
159
159
 
160
160
  ---
161
161
 
@@ -167,8 +167,9 @@ for every profile), the agent keeps a JSONL log of your conversation in
167
167
  rotates at the size configured in the profile (`128 KB` on `minimal`,
168
168
  `256 KB` on `balanced`, `512 KB` on `full`).
169
169
 
170
- When a chat opens and finds an existing log, the agent runs a
171
- 4-state ownership check and chooses the right flow:
170
+ When a chat opens and finds an existing log, the host agent is
171
+ instructed to run a 4-state ownership check and choose the right
172
+ flow:
172
173
 
173
174
  - **match** — this chat already owns the file. Append silently.
174
175
  - **foreign** — a different session's file. You get 3 options:
@@ -0,0 +1,134 @@
1
+ ---
2
+ demo_for: ask-when-uncertain
3
+ layer: pattern-memory
4
+ prose_delta:
5
+ rule_chars_before: 3893
6
+ rule_chars_after: 4267
7
+ measured_at: phase-3.3-cross-link-landing
8
+ note: "+374 chars from the Examples cross-link block; future prose-pruning rounds (out of scope for Phase 3) will pull pattern prose from the rule into this demo and drive the after-count below the before-count."
9
+ ---
10
+
11
+ # ask-when-uncertain — Pattern Memory
12
+
13
+ > Wrong / right / why demos for the `ask-when-uncertain` Iron Law
14
+ > (one question per turn, vague-request must ask). Linked from
15
+ > [`ask-when-uncertain`](../../.agent-src.uncompressed/rules/ask-when-uncertain.md)
16
+ > § Examples. Outcome baseline at
17
+ > [`tests/golden/outcomes/ask_when_uncertain.json`](../../tests/golden/outcomes/ask_when_uncertain.json).
18
+
19
+ ## Demo 1 — Vague request, multi-question stack
20
+
21
+ ### Wrong shape
22
+
23
+ ```
24
+ User: improve this
25
+
26
+ Agent:
27
+ 1. Should I optimize for readability or speed?
28
+ 2. Refactor the function signature?
29
+ 3. Add tests too?
30
+ 4. Run PHPStan after?
31
+
32
+ Reply with a, b, c, d so I can pick.
33
+ ```
34
+
35
+ **Failure mode:** four `?` aimed at the user, structured-answer
36
+ demand (`a, b, c, d`), no triage. Iron Law breach: a turn with a
37
+ question has *exactly one*. Compound thinking load — answer to Q1
38
+ reframes Q2.
39
+
40
+ ### Right shape
41
+
42
+ ```
43
+ User: improve this
44
+
45
+ Agent: Welche Achse soll "improve" treffen?
46
+
47
+ 1. Lesbarkeit (Naming, Funktions-Splits)
48
+ 2. Performance (Allokationen, N+1)
49
+ 3. Robustheit (Error-Handling, Edge Cases)
50
+
51
+ Dann lege ich los.
52
+ ```
53
+
54
+ ### Why it works
55
+
56
+ Single `?`, numbered options without compound asks, picks the
57
+ question whose answer reframes everything downstream. The follow-up
58
+ ("tests? PHPStan?") rides on the next turn — its framing depends on
59
+ the answer here.
60
+
61
+ ## Demo 2 — Drive-by execution on a vague trigger
62
+
63
+ ### Wrong shape
64
+
65
+ ```
66
+ User: clean up this file
67
+
68
+ Agent: [edits 12 files, removes 200 lines, reformats imports,
69
+ extracts 3 helpers, renames 5 variables]
70
+ Done.
71
+ ```
72
+
73
+ **Failure mode:** "clean up" is a vague-request trigger
74
+ (`ask-when-uncertain` § Vague-request triggers). MUST-ask before
75
+ touching code. Without scope, the diff is a guess at the user's
76
+ intent.
77
+
78
+ ### Right shape
79
+
80
+ ```
81
+ User: clean up this file
82
+
83
+ Agent: Was bedeutet "clean up" hier?
84
+
85
+ 1. Toten Code raus
86
+ 2. Format / Imports sortieren
87
+ 3. Refactor (Funktionen splitten)
88
+
89
+ Pick one — sonst ist der Diff Raten.
90
+ ```
91
+
92
+ ### Why it works
93
+
94
+ Names the trigger explicitly ("vague-request"), surfaces the three
95
+ canonical interpretations from the rule's trigger table, and
96
+ declines to act without scope. The cost of asking once << cost of
97
+ ripping through 12 files in the wrong direction.
98
+
99
+ ## Demo 3 — Stacked questions inside a handoff
100
+
101
+ ### Wrong shape
102
+
103
+ ```
104
+ Agent: Bevor ich die Roadmap übergebe:
105
+
106
+ - Welcher Branch?
107
+ - Soll ich PRs erwähnen?
108
+ - Welches Modell für die Fortsetzung?
109
+ - Soll ich .agent-chat-history zitieren?
110
+
111
+ Antworte als 1, 2, 3, 4.
112
+ ```
113
+
114
+ **Failure mode:** four-question handoff block. Per § Ordering &
115
+ handoff: handoff questions ride LAST, after domain clarifications,
116
+ folded into the handoff prompt itself — not as a parallel quiz.
117
+
118
+ ### Right shape
119
+
120
+ ```
121
+ Agent: [delivers the handoff prompt with sensible defaults filled
122
+ in: current branch, PR link present if open, model
123
+ recommendation per `model-recommendation`, history reference
124
+ auto-included]
125
+
126
+ Welche der vier Defaults soll ich vor dem Übergeben anpassen?
127
+ ```
128
+
129
+ ### Why it works
130
+
131
+ Defaults absorb three of the four "questions"; the remaining
132
+ question is the only one that genuinely needs user input — and it's
133
+ phrased so a one-word answer ("PR link" / "model" / "passt") closes
134
+ the loop.
@@ -0,0 +1,100 @@
1
+ # asking-and-brevity-examples
2
+
3
+ Companion examples for three always-rules:
4
+ [`ask-when-uncertain`](../../../.agent-src.uncompressed/rules/ask-when-uncertain.md),
5
+ [`no-cheap-questions`](../../../.agent-src.uncompressed/rules/no-cheap-questions.md),
6
+ [`direct-answers`](../../../.agent-src.uncompressed/rules/direct-answers.md).
7
+
8
+ The rules carry the Iron Laws and the obligation surface. This file
9
+ carries the illustrative material (example questions, rationale
10
+ tables, failure-mode catalogs) that does not need to live in the
11
+ always-loaded rule body — extracted to fit the always-rule budget.
12
+
13
+ ## Vague-request triggers — example questions
14
+
15
+ Companion to `ask-when-uncertain` § Vague-request triggers. The rule
16
+ lists the trigger patterns and the "missing info" columns; this file
17
+ adds the example question to ask back at the user.
18
+
19
+ | Pattern | Example clarifying question |
20
+ |---|---|
21
+ | "improve / optimize this" | "Optimize for what — execution speed or readability?" |
22
+ | "add caching" | "Which cache driver, and what invalidates it?" |
23
+ | "make it better / cleaner" | "What specifically feels wrong in the current code?" |
24
+ | "clean up this file" | "Remove unused code, reformat, or restructure?" |
25
+ | "fix this" (without specifying) | "What output/behavior is wrong right now?" |
26
+ | "refactor X" | "Refactor toward what — smaller methods, extract class, or something else?" |
27
+ | "use best practices" | "Best practices for what specifically — testing, naming, structure?" |
28
+ | "handle errors properly" | "For which failure modes, and what should happen on error?" |
29
+ | "add a UI / component / tile / page" when the repo mixes frameworks | "This repo uses {A} and {B} for UI — which one for this?" |
30
+
31
+ ## One-question-per-turn — why serial always wins
32
+
33
+ Companion to `ask-when-uncertain` § How to ask. The rule states the
34
+ Iron Law and the self-check; this file expands the rationale.
35
+
36
+ | Situation | Why serial always wins |
37
+ |---|---|
38
+ | Design / architecture decisions | Answer to Q1 reframes Q2 |
39
+ | Naming / command-syntax / API shape | Later choices depend on it |
40
+ | Scope / PR boundaries | Changes what the other questions even mean |
41
+ | Tool / library selection | Downstream choices branch from it |
42
+ | "Which approach: A vs B vs C" | Each answer opens a different follow-up |
43
+ | Even "independent" yes/no pairs | User still has to parse two contexts |
44
+ | Any question the user has to **think** about, not just pick | Thinking load compounds when stacked |
45
+
46
+ The shorthand: if the user has to *think* about an answer, that
47
+ answer almost always reframes whatever question would have come
48
+ next. Serial preserves the framing; parallel destroys it.
49
+
50
+ ## Cheap-question class catalog — extended examples
51
+
52
+ Companion to `no-cheap-questions` § What counts as cheap. The rule
53
+ lists the classes; this file adds longer-form examples per class.
54
+
55
+ | Class | Pattern · why cheap | Concrete example |
56
+ |---|---|---|
57
+ | **Sequencing** | "Step 2 or 3 next?" when roadmap orders them — answer is in the roadmap | Roadmap says "2.1 then 2.2" → don't ask "should I do 2.2 next?" |
58
+ | **Format-only** | "Table or paragraph?" — no semantic trade-off | User asked for a summary; format is a non-decision |
59
+ | **Commit asks** | "Commit now?" — `commit-policy`: never ask | The commit-policy Iron Law forbids the question |
60
+ | **CI / test asks** | "Run tests now?" — `verify-before-complete` decides | Verification is mandatory before completion claims; not a choice |
61
+ | **Fenced-step re-asks** | "Start Phase 1?" after "plan only" — `scope-control § fenced step` | The fence stands until the user explicitly lifts it |
62
+ | **Iron-Law option** | Option breaches `commit-policy`, `scope-control § git-ops`, or `non-destructive-by-default` — does not exist | Don't surface "force-push to main?" as Option 2 |
63
+ | **Context-derived** | Answer follows from prior turn / standing instruction / roadmap — act, state assumption inline | "Use the same branch?" after user said "stay on this branch" |
64
+ | **Dominant option** | One choice obviously correct; alternatives carry no upside — pick it | "Run the linter or skip it?" when the linter is part of CI |
65
+ | **Re-ask after decline** | Same path after user said no — `scope-control § decline = silence` | User declined a separate branch → don't propose it again on the same task |
66
+
67
+ ## Direct-answers — severity-tiered claim examples
68
+
69
+ Companion to `direct-answers` § Iron Law 2 (no invented facts). The
70
+ rule lists the severity table; this file adds concrete examples and
71
+ hedge-language patterns.
72
+
73
+ | Severity | Examples | Verification action |
74
+ |---|---|---|
75
+ | **High — load-bearing** | "Method `X::y()` exists at `path/to/file.php:142`", "version 12.4.1 added the API", "this test passes" | MUST verify with `view`, `grep`, `codebase-retrieval`, or fresh command output **before** claiming. Too expensive → ask. |
76
+ | **Medium — project-shape** | "This project uses Pest for testing", "controllers live under `app/Http/Controllers`" | Verify if one tool call reaches it; otherwise hedge: *"I'd guess X — not checked"*. |
77
+ | **Low — well-known idioms** | "PHP `array_map` returns a new array", "git tags are immutable", "JS arrays are zero-indexed" | Inference acceptable. Mark as inference if not 100% sure. |
78
+
79
+ Hedge-language patterns:
80
+
81
+ - ✅ "haven't verified X — likely from {known-similar-codebase}"
82
+ - ✅ "guess, not checked — `path/to/file.php:142` is my best read"
83
+ - ❌ "probably" alone — name what's unverified
84
+ - ❌ "vermutlich" without hedge target
85
+
86
+ ## Direct-answers — failure modes the user will call out
87
+
88
+ Companion to `direct-answers` § Failure modes. The rule lists the
89
+ modes; this file adds the trigger phrases and the in-language
90
+ correction pattern.
91
+
92
+ | Failure | User's typical callout | Correct response |
93
+ |---|---|---|
94
+ | Iron Law 1 violation | "skip the flattery", "ohne smalltalk" | drop the opener; deliver substance |
95
+ | Iron Law 2 violation | "have you actually checked?", "wo steht das?" | re-verify with a tool call; correct or retract the claim |
96
+ | Iron Law 3 violation | "kürzer", "less prose", "tldr" | trim to one sentence + the answer |
97
+ | Emoji blacklist hit | "ohne emojis", "no decoration" | re-render plain |
98
+
99
+ Acknowledge once, in the user's language, switch behavior, no
100
+ excuses (mirrors `language-and-tone` § slip handling).
@@ -0,0 +1,145 @@
1
+ ---
2
+ demo_for: direct-answers
3
+ layer: pattern-memory
4
+ prose_delta:
5
+ rule_chars_before: 4098
6
+ rule_chars_after: 4514
7
+ measured_at: phase-3.3-cross-link-landing
8
+ note: "+416 chars from the Examples cross-link block; future prose-pruning rounds (out of scope for Phase 3) will pull pattern prose from the rule into this demo and drive the after-count below the before-count."
9
+ ---
10
+
11
+ # direct-answers — Pattern Memory
12
+
13
+ > Wrong / right / why demos for the three Iron Laws of
14
+ > `direct-answers` (no flattery, no invented facts, brevity by
15
+ > default). Linked from
16
+ > [`direct-answers`](../../.agent-src.uncompressed/rules/direct-answers.md)
17
+ > § Examples. Outcome baseline at
18
+ > [`tests/golden/outcomes/direct_answers.json`](../../tests/golden/outcomes/direct_answers.json).
19
+
20
+ ## Demo 1 — Flattery opener (Iron Law 1)
21
+
22
+ ### Wrong shape
23
+
24
+ ```
25
+ User: Wie viele Always-Rules gibt es aktuell?
26
+
27
+ Agent: Sehr gute Frage! Das ist tatsächlich eine spannende
28
+ Eigenschaft des Systems. Lass mich das für dich aufschlüsseln —
29
+ aktuell sind es 38 Always-Rules.
30
+ ```
31
+
32
+ **Failure mode:** flattery opener ("Sehr gute Frage!"), action
33
+ announcement ("Lass mich…"), then 30 Wörter Anlauf für eine
34
+ Ein-Wort-Antwort. Iron Law 1 + Iron Law 3 zusammen verletzt.
35
+
36
+ ### Right shape
37
+
38
+ ```
39
+ User: Wie viele Always-Rules gibt es aktuell?
40
+
41
+ Agent: 38.
42
+ ```
43
+
44
+ ### Why it works
45
+
46
+ Eine Frage mit einer wahren Antwort = ein Satz. Kein Anlauf, kein
47
+ Kissen, kein "let me…". Die Zahl ist die ganze Antwort.
48
+
49
+ ## Demo 2 — Hedged claim without verification (Iron Law 2)
50
+
51
+ ### Wrong shape
52
+
53
+ ```
54
+ User: Hat verify-before-complete ein "load_context"-Feld?
55
+
56
+ Agent: Ja, ich glaube schon — die meisten Always-Rules haben das
57
+ inzwischen. Sollte in der Frontmatter stehen.
58
+ ```
59
+
60
+ **Failure mode:** load-bearing project-shape claim ohne Verify, mit
61
+ zwei Hedges ("ich glaube", "sollte"). Iron Law 2 § Severity-tiered:
62
+ project-shape claims müssen mit einem Tool-Call belegt werden, wenn
63
+ einer reicht — und hier reicht ein `view`/`grep` locker.
64
+
65
+ ### Right shape
66
+
67
+ ```
68
+ User: Hat verify-before-complete ein "load_context"-Feld?
69
+
70
+ Agent: [grept frontmatter]
71
+ Nein. `verify-before-complete.md` deklariert keinen load_context-
72
+ Eintrag (nur die anderen vier Safety-Floor-Rules tun das).
73
+ ```
74
+
75
+ ### Why it works
76
+
77
+ Tool-Call vor Antwort, dann konkrete Aussage mit Begründung. Wenn
78
+ der Verify-Aufwand zu groß wäre → fragen, nicht raten. Hier kostet
79
+ ein `grep` zwei Sekunden, also Tool-Call ist Pflicht.
80
+
81
+ ## Demo 3 — Post-hoc summary creep (Iron Law 3)
82
+
83
+ ### Wrong shape
84
+
85
+ ```
86
+ User: Wie öffne ich die VBC-Demos?
87
+
88
+ Agent: Hier der Pfad zur Datei:
89
+
90
+ `docs/guidelines/agent-infra/verify-before-complete-demos.md`
91
+
92
+ Zusammenfassend: das ist die Demo-Datei für die Iron Law des
93
+ verify-before-complete-Rule. Sie folgt dem wrong/right/why-Schema
94
+ und ist Teil der Phase 3 von road-to-context-layer-maturity.
95
+ Lass mich wissen, falls du Fragen dazu hast.
96
+ ```
97
+
98
+ **Failure mode:** Nutzlose Zusammenfassung nach der Antwort, dann
99
+ Service-Floskel ("Lass mich wissen…"). Iron Law 3: kürzeste
100
+ vollständige Antwort gewinnt; Restaurierung von Kontext und
101
+ Closing-Floskel sind beide Failure-Modes.
102
+
103
+ ### Right shape
104
+
105
+ ```
106
+ User: Wie öffne ich die VBC-Demos?
107
+
108
+ Agent: `docs/guidelines/agent-infra/verify-before-complete-demos.md`
109
+ ```
110
+
111
+ ### Why it works
112
+
113
+ Pfad ist die ganze Antwort. Kein Re-Frame der Frage, kein
114
+ "Zusammenfassend", kein angebotenes Follow-up. Wenn Matze mehr
115
+ will, fragt er.
116
+
117
+ ## Demo 4 — Functional emoji vs prose flair
118
+
119
+ ### Wrong shape
120
+
121
+ ```
122
+ Agent: 🚀 Tests sind durch! ✨ Alle 47 grün 🎉 Bereit für den nächsten Schritt 💪
123
+ ```
124
+
125
+ **Failure mode:** Emoji als Stil-Element, nicht als funktionaler
126
+ Marker. § Emoji Scope erlaubt nur die Whitelist (`📒` Heartbeat,
127
+ mode marker, `❌` `✅` `⚠️` mit Two-Space-Regel, Roadmap-`[x]/[~]/[-]`).
128
+ Alles andere ist Rauschen.
129
+
130
+ ### Right shape
131
+
132
+ ```
133
+ Agent: Tests durch:
134
+
135
+ $ vendor/bin/pest -q
136
+ ............................................... 47 passed
137
+
138
+ ✅ 47/47 grün, Exit 0.
139
+ ```
140
+
141
+ ### Why it works
142
+
143
+ Genau ein Emoji aus der Whitelist (`✅` mit Two-Space), funktional
144
+ verwendet als Status-Marker neben dem CLI-Output. Keine Deko, keine
145
+ Reaktions-Emojis.
@@ -0,0 +1,128 @@
1
+ ---
2
+ demo_for: verify-before-complete
3
+ layer: pattern-memory
4
+ prose_delta:
5
+ rule_chars_before: 2196
6
+ rule_chars_after: 2603
7
+ measured_at: phase-3.3-cross-link-landing
8
+ note: "+407 chars from the Examples cross-link block; future prose-pruning rounds (out of scope for Phase 3) will pull pattern prose from the rule into this demo and drive the after-count below the before-count."
9
+ ---
10
+
11
+ # verify-before-complete — Pattern Memory
12
+
13
+ > Wrong / right / why demos for the `verify-before-complete` Iron
14
+ > Law (no completion claim without fresh evidence in this message).
15
+ > Linked from
16
+ > [`verify-before-complete`](../../.agent-src.uncompressed/rules/verify-before-complete.md)
17
+ > § Examples. Outcome baseline at
18
+ > [`tests/golden/outcomes/verify_before_complete.json`](../../tests/golden/outcomes/verify_before_complete.json).
19
+
20
+ ## Demo 1 — Hedged completion claim
21
+
22
+ ### Wrong shape
23
+
24
+ ```
25
+ User: ist der Fix fertig?
26
+
27
+ Agent: Ja, sollte jetzt durchlaufen — ich habe die fehlende
28
+ Bedingung ergänzt und die Tests müssten grün sein.
29
+ ```
30
+
31
+ **Failure mode:** "sollte", "müssten" are red-flag hedges (§ Red
32
+ flags — STOP immediately). No fresh command output in this message.
33
+ The claim rides on inference, not evidence.
34
+
35
+ ### Right shape
36
+
37
+ ```
38
+ User: ist der Fix fertig?
39
+
40
+ Agent: Frisch gerade ausgeführt:
41
+
42
+ $ python3 -m pytest tests/test_load_context.py -v
43
+ ============================== 7 passed in 0.07s ===============================
44
+
45
+ Exit code 0, 7/7 grün. Damit ist der Fix verifiziert.
46
+ ```
47
+
48
+ ### Why it works
49
+
50
+ Literal command line, fresh output, exit code, pass count — all in
51
+ this message. The user can scroll up and see the same shape that
52
+ the test runner produced. No hedging vocabulary.
53
+
54
+ ## Demo 2 — Trusting an earlier run
55
+
56
+ ### Wrong shape
57
+
58
+ ```
59
+ [12 messages earlier, agent ran tests — green]
60
+
61
+ User: also fertig zum committen?
62
+
63
+ Agent: Ja, die Tests waren ja grün vorhin. Du kannst committen.
64
+ ```
65
+
66
+ **Failure mode:** "Trusting a previous run from earlier in the
67
+ conversation" — explicit red flag. Code drifted in the meantime;
68
+ the earlier run is stale evidence.
69
+
70
+ ### Right shape
71
+
72
+ ```
73
+ User: also fertig zum committen?
74
+
75
+ Agent: Ich verifiziere kurz — Tests laufen jetzt:
76
+
77
+ $ python3 -m pytest tests/ -q
78
+ ... 47 passed in 2.31s
79
+
80
+ Grün. Plus ein quality-tools-Lauf:
81
+
82
+ $ task ci
83
+ ... ✅ All checks passed
84
+
85
+ Jetzt ist der Stand sauber.
86
+ ```
87
+
88
+ ### Why it works
89
+
90
+ Re-runs both gates *now*. The `quality-tools` skill handles the
91
+ specific commands; the rule only mandates "fresh in this message".
92
+ "Stand sauber" is anchored on actual exit codes, not on memory.
93
+
94
+ ## Demo 3 — Partial verification claimed as complete
95
+
96
+ ### Wrong shape
97
+
98
+ ```
99
+ User: ready für den PR?
100
+
101
+ Agent: Tests sind grün, ich öffne den PR.
102
+ ```
103
+
104
+ **Failure mode:** "Relying on partial verification (ran tests but
105
+ not PHPStan)" — explicit red flag. PR-readiness needs the full
106
+ gate, not a single channel.
107
+
108
+ ### Right shape
109
+
110
+ ```
111
+ User: ready für den PR?
112
+
113
+ Agent: Ich check beide Gates:
114
+
115
+ $ vendor/bin/pest
116
+ ... 47 passed
117
+ $ vendor/bin/phpstan analyse
118
+ ... [OK] No errors
119
+
120
+ Beide grün. Soll ich den PR jetzt erstellen?
121
+ ```
122
+
123
+ ### Why it works
124
+
125
+ Both gates run fresh, both outputs in the message, exit summaries
126
+ visible. The follow-up question is permission-gated per
127
+ `scope-control` § Git operations — the verification is done
128
+ independently of the user's go-ahead.
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@event4u/agent-config",
3
- "version": "1.16.0",
3
+ "version": "1.18.0",
4
4
  "description": "Shared agent configuration \u2014 skills, rules, commands, guidelines, and templates for AI coding tools",
5
5
  "license": "MIT",
6
6
  "private": false,