@event4u/agent-config 1.22.0 → 1.23.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 (91) hide show
  1. package/.agent-src/commands/agents/cleanup.md +31 -17
  2. package/.agent-src/commands/commit/in-chunks.md +30 -10
  3. package/.agent-src/commands/commit.md +46 -6
  4. package/.agent-src/commands/compress.md +19 -13
  5. package/.agent-src/commands/cost-report.md +120 -0
  6. package/.agent-src/commands/create-pr/description-only.md +8 -0
  7. package/.agent-src/commands/create-pr.md +95 -80
  8. package/.agent-src/commands/feature/plan.md +13 -7
  9. package/.agent-src/commands/memory/add.md +16 -8
  10. package/.agent-src/commands/memory/promote.md +17 -9
  11. package/.agent-src/commands/optimize/rtk.md +16 -11
  12. package/.agent-src/commands/prepare-for-review.md +12 -6
  13. package/.agent-src/commands/project-analyze.md +31 -20
  14. package/.agent-src/commands/review-changes.md +24 -15
  15. package/.agent-src/commands/roadmap/create.md +14 -9
  16. package/.agent-src/contexts/contracts/frugality-charter.md +57 -0
  17. package/.agent-src/rules/architecture.md +9 -0
  18. package/.agent-src/rules/ask-when-uncertain.md +3 -13
  19. package/.agent-src/rules/caveman-speak.md +78 -0
  20. package/.agent-src/rules/direct-answers.md +5 -14
  21. package/.agent-src/rules/markdown-safe-codeblocks.md +6 -7
  22. package/.agent-src/rules/no-cheap-questions.md +4 -14
  23. package/.agent-src/rules/token-efficiency.md +5 -7
  24. package/.agent-src/skills/adr-create/SKILL.md +197 -0
  25. package/.agent-src/skills/agent-docs-writing/SKILL.md +23 -1
  26. package/.agent-src/skills/command-writing/SKILL.md +23 -0
  27. package/.agent-src/skills/context-authoring/SKILL.md +23 -0
  28. package/.agent-src/skills/conventional-commits-writing/SKILL.md +23 -0
  29. package/.agent-src/skills/guideline-writing/SKILL.md +22 -0
  30. package/.agent-src/skills/persona-writing/SKILL.md +153 -0
  31. package/.agent-src/skills/readme-writing/SKILL.md +20 -0
  32. package/.agent-src/skills/readme-writing-package/SKILL.md +19 -0
  33. package/.agent-src/skills/roadmap-writing/SKILL.md +157 -0
  34. package/.agent-src/skills/rule-writing/SKILL.md +22 -0
  35. package/.agent-src/skills/script-writing/SKILL.md +226 -0
  36. package/.agent-src/skills/skill-writing/SKILL.md +23 -0
  37. package/.agent-src/skills/test-driven-development/SKILL.md +24 -0
  38. package/.agent-src/templates/agent-settings.md +73 -0
  39. package/.agent-src/templates/command.md +15 -10
  40. package/.agent-src/templates/rule.md +6 -0
  41. package/.agent-src/templates/skill.md +32 -0
  42. package/.claude-plugin/marketplace.json +6 -1
  43. package/AGENTS.md +3 -3
  44. package/CHANGELOG.md +35 -0
  45. package/README.md +5 -5
  46. package/docs/architecture.md +4 -4
  47. package/docs/customization.md +72 -0
  48. package/docs/decisions/INDEX.md +15 -0
  49. package/docs/getting-started.md +2 -2
  50. package/docs/guidelines/agent-infra/asking-and-brevity-examples.md +27 -19
  51. package/docs/guidelines/agent-infra/carve-out-predicates.md +17 -0
  52. package/docs/guidelines/agent-infra/mcp-request-signing.md +199 -0
  53. package/docs/guidelines/agent-infra/roadmap-progress-mechanics.md +11 -4
  54. package/package.json +1 -1
  55. package/scripts/_lib/__init__.py +5 -0
  56. package/scripts/_lib/script_output.py +140 -0
  57. package/scripts/adr/regenerate_index.py +79 -0
  58. package/scripts/ai_council/one_off_archive/2026-05/_one_off_add_quiet.py +149 -0
  59. package/scripts/ai_council/one_off_archive/2026-05/_one_off_inject_quiet_flag.py +33 -0
  60. package/scripts/ai_council/one_off_archive/2026-05/_one_off_measure_v2.sh +36 -0
  61. package/scripts/ai_council/one_off_archive/2026-05/_one_off_measure_verbosity.sh +26 -0
  62. package/scripts/ai_council/one_off_archive/2026-05/_one_off_per_task.sh +41 -0
  63. package/scripts/ai_council/one_off_archive/2026-05/_one_off_silent_taskfiles.py +98 -0
  64. package/scripts/check_augmentignore.py +4 -1
  65. package/scripts/check_command_count_messaging.py +4 -1
  66. package/scripts/check_compressed_paths.py +4 -1
  67. package/scripts/check_council_layout.py +4 -1
  68. package/scripts/check_council_references.py +4 -1
  69. package/scripts/check_iron_law_prominence.py +3 -1
  70. package/scripts/check_md_language.py +3 -1
  71. package/scripts/check_memory_proposal.py +3 -1
  72. package/scripts/check_public_catalog_links.py +4 -1
  73. package/scripts/check_reply_consistency.py +8 -2
  74. package/scripts/check_roadmap_trackable.py +4 -1
  75. package/scripts/compile_router.py +27 -0
  76. package/scripts/compress.py +33 -19
  77. package/scripts/cost/budget.mjs +152 -0
  78. package/scripts/cost/track.mjs +144 -0
  79. package/scripts/first-run.sh +3 -9
  80. package/scripts/install-hooks.sh +19 -1
  81. package/scripts/install.py +17 -12
  82. package/scripts/install.sh +19 -8
  83. package/scripts/lint_examples.py +6 -2
  84. package/scripts/lint_handoffs.py +4 -1
  85. package/scripts/lint_load_context.py +4 -1
  86. package/scripts/lint_roadmap_complexity.py +6 -2
  87. package/scripts/lint_rule_interactions.py +4 -1
  88. package/scripts/lint_rule_tiers.py +4 -1
  89. package/scripts/measure_frugality_savings.py +164 -0
  90. package/scripts/runtime_dispatcher.py +11 -0
  91. package/scripts/skill_linter.py +207 -2
@@ -103,17 +103,22 @@ Run a quick test to confirm rtk picks up the filters:
103
103
  rtk config 2>&1 | tail -5
104
104
  ```
105
105
 
106
- ### 7. Present results
107
-
108
- Show a summary table:
109
-
110
- ```
111
- | # | Filter | Match | Max Lines |
112
- |---|---|---|---|
113
- | 1 | phpstan | phpstan\|quality:phpstan\|vendor/bin/phpstan | 80 |
114
- | 2 | pest | pest\|phpunit\|artisan test | 60 |
115
- | ... | ... | ... | ... |
116
- ```
106
+ ### 7. Present results (verbosity-gated)
107
+
108
+ Read `verbosity.post_action_reports` from `.agent-settings.yml` (default
109
+ `minimal`).
110
+
111
+ - `off` emit nothing on success; surface errors only.
112
+ - `minimal` (default) → one line: `→ N filters configured in .rtk/rtk.toml`.
113
+ - `full` multi-line summary table:
114
+
115
+ ```
116
+ | # | Filter | Match | Max Lines |
117
+ |---|---|---|---|
118
+ | 1 | phpstan | phpstan\|quality:phpstan\|vendor/bin/phpstan | 80 |
119
+ | 2 | pest | pest\|phpunit\|artisan test | 60 |
120
+ | ... | ... | ... | ... |
121
+ ```
117
122
 
118
123
  ### Rules
119
124
 
@@ -80,12 +80,18 @@ Once all merges succeed:
80
80
  git checkout {head-branch-of-target-PR}
81
81
  ```
82
82
 
83
- ### 7. Report
84
-
85
- Inform the user:
86
- - Which branch chain was processed (in order)
87
- - That the target branch is now checked out and up to date
88
- - Any warnings (e.g. branch was already up to date)
83
+ ### 7. Report (verbosity-gated)
84
+
85
+ Read `verbosity.post_action_reports` from `.agent-settings.yml` (default
86
+ `minimal`).
87
+
88
+ - `off` emit nothing on success; surface warnings/errors only.
89
+ - `minimal` (default) → one line:
90
+ `→ {branch} ready · {N} branches merged · {warnings or "clean"}`.
91
+ - `full` → multi-line block listing:
92
+ - Which branch chain was processed (in order)
93
+ - That the target branch is now checked out and up to date
94
+ - Any warnings (e.g. branch was already up to date)
89
95
 
90
96
  ## Rules
91
97
 
@@ -75,12 +75,15 @@ LEGACY CHECK (indicators):
75
75
  ═══════════════════════════════════════════════
76
76
  ```
77
77
 
78
- Ask the user with numbered options:
78
+ Per `verbosity.routine_confirmations` (default `false`):
79
79
 
80
- ```
81
- > 1. Continue with Phase 2 — architecture analysis
82
- > 2. Stop here — keep the overview only
83
- ```
80
+ - `false` → continue to Phase 2 silently (user invoked `/project-analyze`
81
+ for the full pass; "continue" is dominant).
82
+ - `true` ask:
83
+ ```
84
+ > 1. Continue with Phase 2 — architecture analysis
85
+ > 2. Stop here — keep the overview only
86
+ ```
84
87
 
85
88
  ### Phase 2: Architecture mapping
86
89
 
@@ -192,12 +195,15 @@ BUSINESS DOMAINS:
192
195
  ═══════════════════════════════════════════════
193
196
  ```
194
197
 
195
- Ask the user with numbered options:
198
+ Per `verbosity.routine_confirmations` (default `false`):
196
199
 
197
- ```
198
- > 1. Yes — create domain analysis files
199
- > 2. Skip — continue with next phase
200
- ```
200
+ - `false` → create domain analysis files silently (user invoked
201
+ `/project-analyze`; "yes, create" is dominant).
202
+ - `true` ask:
203
+ ```
204
+ > 1. Yes — create domain analysis files
205
+ > 2. Skip — continue with next phase
206
+ ```
201
207
 
202
208
  For each confirmed domain, create `agents/analysis/domains/{domain}.md` using the template
203
209
  from the `project-analyzer` skill.
@@ -226,12 +232,14 @@ SERVICE MAP:
226
232
  ═══════════════════════════════════════════════
227
233
  ```
228
234
 
229
- Ask the user with numbered options:
235
+ Per `verbosity.routine_confirmations` (default `false`):
230
236
 
231
- ```
232
- > 1. Yes — create API and service analysis files
233
- > 2. Skip — continue with next phase
234
- ```
237
+ - `false` → create API + service analysis files silently.
238
+ - `true` ask:
239
+ ```
240
+ > 1. Yes — create API and service analysis files
241
+ > 2. Skip — continue with next phase
242
+ ```
235
243
 
236
244
  Create:
237
245
  - `agents/analysis/api/endpoints-v1.md`
@@ -253,12 +261,15 @@ Write all remaining analysis files that haven't been created yet:
253
261
  - `agents/analysis/modules/{module}.md` — one per module
254
262
  - `agents/analysis/testing/test-map.md` — test suites, coverage, strategy
255
263
 
256
- For each file, ask with numbered options:
264
+ Per `verbosity.routine_confirmations` (default `false`):
257
265
 
258
- ```
259
- > 1. Create {filename}
260
- > 2. Skip
261
- ```
266
+ - `false` → create all listed files silently (per-file picker is pure
267
+ noise once the user invoked `/project-analyze`).
268
+ - `true` → for each file, ask:
269
+ ```
270
+ > 1. Create — {filename}
271
+ > 2. Skip
272
+ ```
262
273
 
263
274
  ### Phase 8: Gap analysis & action plan
264
275
 
@@ -81,15 +81,22 @@ Pick dispatch mode based on diff size and environment:
81
81
  Each judge returns its own `Judge / Model / Target / Verdict /
82
82
  Issues` block in the format defined by that skill.
83
83
 
84
- ### 4b. Optional external council (B3 hook)
84
+ ### 4b. Optional external council (B3 hook, verbosity-gated)
85
85
 
86
- If `.agent-settings.yml` has `ai_council.enabled: true` **and** at least
87
- one member is enabled, ask (in the user's language):
86
+ Read `verbosity.offer_council_in_delivery` from `.agent-settings.yml`
87
+ (default `false`):
88
88
 
89
- > 1. Add an external council review alongside the four internal judges? (billable)
90
- > 2. Skip internal judges only
89
+ - `false` (default): skip the prompt silently. When `ai_council.enabled:
90
+ true` AND at least one member enabled, emit one line: `→ council
91
+ skipped (set verbosity.offer_council_in_delivery: true to enable, or
92
+ run /council diff:<base>..<head> directly)`. Otherwise emit nothing.
93
+ - `true`: when `ai_council.enabled: true` **and** at least one member
94
+ enabled, ask (in the user's language):
91
95
 
92
- Suppress when `personal.autonomy: on` (council is billable).
96
+ > 1. Add an external council review alongside the four internal judges? (billable)
97
+ > 2. Skip — internal judges only
98
+
99
+ Also suppress when `personal.autonomy: on` (council is billable).
93
100
 
94
101
  If picked **1**:
95
102
 
@@ -124,17 +131,19 @@ Produce one combined report:
124
131
  ask before fixing 🟡 findings, report 🟢 as suggestions
125
132
  - If all four returned `apply` → the diff is ready; report and stop
126
133
 
127
- ### 7. Quality tools (optional)
128
-
129
- After the consolidated report, ask:
134
+ ### 7. Quality tools (verbosity-gated)
130
135
 
131
- ```
132
- > 1. Yes — run quality tools (formatter, static analyzer, linters)
133
- > 2. No — review done
134
- ```
136
+ Per `verbosity.routine_confirmations` (default `false`):
135
137
 
136
- If yes, hand off to the project's quality workflow (e.g. `/quality-fix`
137
- or the equivalent configured command).
138
+ - `false` (default) emit `→ run /quality-fix to format + lint` as a
139
+ single follow-up line; do not auto-invoke. User runs explicitly.
140
+ - `true` → ask:
141
+ ```
142
+ > 1. Yes — run quality tools (formatter, static analyzer, linters)
143
+ > 2. No — review done
144
+ ```
145
+ If yes, hand off to the project's quality workflow (e.g.
146
+ `/quality-fix` or the equivalent configured command).
138
147
 
139
148
  ## Backward compatibility
140
149
 
@@ -137,18 +137,23 @@ Regenerate `agents/roadmaps-progress.md` so the new roadmap shows up:
137
137
 
138
138
  Mention the new overall count to the user.
139
139
 
140
- ### 8. Offer council review (B1 hook)
140
+ ### 8. Offer council review (B1 hook, verbosity-gated)
141
141
 
142
- If `.agent-settings.yml` has `ai_council.enabled: true` **and** at least
143
- one member is enabled (`anthropic` or `openai`), ask the user (in their
144
- language):
142
+ Read `verbosity.offer_council_in_delivery` from `.agent-settings.yml`
143
+ (default `false`):
145
144
 
146
- > 1. Run the council on this roadmap before execution? (billable)
147
- > 2. Skip council review
145
+ - `false` (default): skip the prompt silently. When `ai_council.enabled:
146
+ true` AND at least one member enabled, emit one line: `→ council
147
+ skipped (set verbosity.offer_council_in_delivery: true to enable, or
148
+ run /council roadmap:<path> directly)`. Otherwise emit nothing.
149
+ - `true`: when `ai_council.enabled: true` **and** at least one member
150
+ enabled (`anthropic` or `openai`), ask (in the user's language):
148
151
 
149
- Suppress this question entirely when `personal.autonomy: on` is set
150
- council is billable, autonomous mode must not silently spend tokens
151
- (see `road-to-ai-council.md` Decision 3 / Q47).
152
+ > 1. Run the council on this roadmap before execution? (billable)
153
+ > 2. Skip council review
154
+
155
+ Also suppress when `personal.autonomy: on` (council is billable; see
156
+ `road-to-ai-council.md` Decision 3 / Q47).
152
157
 
153
158
  If the user picks **1**:
154
159
 
@@ -0,0 +1,57 @@
1
+ # Frugality Charter
2
+
3
+ Cross-rule index for **writer skills** (skill-writing, rule-writing,
4
+ command-writing, guideline-writing, context-authoring,
5
+ agent-docs-writing, conventional-commits-writing, readme-writing,
6
+ readme-writing-package, adr-create, persona-writing, roadmap-writing,
7
+ script-writing).
8
+ The canon is held by the named rules below; this file is index-only,
9
+ plus the settings-hooks section that has no other canonical home.
10
+
11
+ ## Frugality canon — links into authoritative rules
12
+
13
+ Cite the source rule in writer artifacts; do **not** restate it here.
14
+
15
+ | Concern | Authoritative source |
16
+ |---|---|
17
+ | Default-terse output, skip intent prose, skip post-action summaries | [`direct-answers § Iron Law 3 — Brevity by Default`](../../rules/direct-answers.md#iron-law-3--brevity-by-default) |
18
+ | Numbered-options trade-off rule (real consequence, not sequencing) | [`user-interaction § Iron Law 1 — Single-Source Recommendation`](../../rules/user-interaction.md#iron-law-1--single-source-recommendation) |
19
+ | Cheap-question pre-send check (skip the ask if context already answers) | [`no-cheap-questions § Pre-Send Self-Check`](../../rules/no-cheap-questions.md#pre-send-self-check--mandatory-before-every-question) |
20
+ | Tool-call discipline, act-skip-narration, fresh output over memory | [`token-efficiency § The Iron Laws`](../../rules/token-efficiency.md#the-iron-laws) and its mechanics file |
21
+
22
+ ## Confirmation taxonomy
23
+
24
+ Iron-Law / Routine / Contextual classification with carve-outs
25
+ lives in the roadmap [`§ Confirmation taxonomy`](../../../agents/roadmaps/road-to-token-frugality.md#confirmation-taxonomy).
26
+ Charter does not duplicate the table.
27
+
28
+ ## Settings hooks
29
+
30
+ Live Phase 1 schema (see [`templates/agent-settings.md`](../../templates/agent-settings.md#settings-reference)).
31
+
32
+ | Key | One-line semantics |
33
+ |---|---|
34
+ | `verbosity.preview_artifacts` | When `false`, skip generated commit messages / PR titles / branch names preview before acting. |
35
+ | `verbosity.routine_confirmations` | When `false`, skip "looks good?" gates on routine workflow steps. Iron-Law gates always ask. |
36
+ | `verbosity.offer_council_in_delivery` | When `false`, delivery commands skip the optional "run Council on this?" offer. |
37
+ | `verbosity.post_action_reports` | `off` / `minimal` / `full` — multi-line status blocks after a successful action. |
38
+ | `verbosity.intent_announcements` | When `false`, writers must not generate "Let me…", "Now I will…", "Found it" openers. |
39
+ | `caveman.speak_scope` | `off` / `prose_only` / `aggressive` — caveman-speak grammar scope. Iron-Law fenced blocks never touched. |
40
+
41
+ Phase 10 adds `verbosity.script_output` (`silent` / `minimal` / `verbose`) and `verbosity.taskfile_command_echo` (`true` / `false`); writer artifacts cite this row when those land.
42
+
43
+ ## Cross-references — frugality canon rules
44
+
45
+ Consolidated index. Source rules used to carry trailing
46
+ `Interactions` / `See also` blocks; those are stripped to reclaim
47
+ kernel chars. The pointers below replace them.
48
+
49
+ | Rule | Interacts with |
50
+ |---|---|
51
+ | `direct-answers` | `language-and-tone` · `ask-when-uncertain` · `think-before-action` · `verify-before-complete` · `token-efficiency` · `user-interaction` (overrides brevity) · `caveman-speak` |
52
+ | `no-cheap-questions` | `ask-when-uncertain` · `autonomous-execution` · `commit-policy` · `scope-control` · `non-destructive-by-default` · `user-interaction` · `direct-answers` |
53
+ | `caveman-speak` | `language-and-tone` (mirror user language **before** caveman) · `direct-answers` Iron Law 3 (caveman is one brevity tactic, not a replacement) · `user-interaction` (numbered-options carve-out) · `commit-policy`, `non-destructive-by-default`, `scope-control` (Iron-Law literal fence carve-outs) |
54
+
55
+ ## Decidable carve-out predicates
56
+
57
+ Predicates with one-sentence tests live in [`docs/guidelines/agent-infra/carve-out-predicates.md`](../../../docs/guidelines/agent-infra/carve-out-predicates.md). Default-terse applies unless a predicate's test is yes/no decidable from the artifact alone.
@@ -40,6 +40,15 @@ Each project documents its own architecture in `./agents/` and/or `AGENTS.md`.
40
40
  **Always read those files** before making structural decisions. Do not rely on this rule file
41
41
  for project-specific directory layouts, database conventions, or module systems.
42
42
 
43
+ ## Architectural Decision Records (ADRs)
44
+
45
+ When a structural decision is non-trivial (kernel membership, contract change, library swap,
46
+ deprecation, scope re-cut), record it as an ADR. Use the [`adr-create`](../skills/adr-create/SKILL.md)
47
+ skill — it numbers the file (`ADR-NNN-<slug>.md`), writes the standard template
48
+ (Status / Context / Decision / Consequences / Alternatives / References), and regenerates the
49
+ index via `scripts/adr/regenerate_index.py`. ADRs land in `docs/adr/` by default; legacy
50
+ projects use `docs/decisions/`. Reversible refactors and minor cleanups do **not** need ADRs.
51
+
43
52
  ## Module-Level Documentation
44
53
 
45
54
  Some projects use a module system (e.g. `app/Modules/` in Laravel projects).
@@ -17,7 +17,7 @@ ONE QUESTION PER TURN. NO EXCEPTIONS.
17
17
  ASK. WAIT FOR THE ANSWER. THEN ASK THE NEXT.
18
18
  ```
19
19
 
20
- Absolute. Every turn with a question has **exactly one** — even if trivial, independent, or batchable.
20
+ Even if trivial, independent, or batchable — exactly one.
21
21
 
22
22
  ## When to ask
23
23
 
@@ -29,19 +29,9 @@ Absolute. Every turn with a question has **exactly one** — even if trivial, in
29
29
 
30
30
  ## Vague-request triggers — MUST ask
31
31
 
32
- Match without further context → ask **before** touching code:
32
+ Nine patterns — "improve / optimize" · "add caching" · "make it better / cleaner" · "clean up this file" · "fix this" (no symptom) · "refactor X" · "use best practices" · "handle errors properly" · "add a UI / component / tile / page" in a mixed-framework repo. Match without further context → ask **before** touching code.
33
33
 
34
- - "improve / optimize this" metric? speed, readability, memory?
35
- - "add caching" — store? scope? invalidation?
36
- - "make it better / cleaner" — by what standard?
37
- - "clean up this file" — dead code? format? refactor?
38
- - "fix this" (no symptom) — what output is wrong?
39
- - "refactor X" — target pattern? boundaries?
40
- - "use best practices" — whose? for what?
41
- - "handle errors properly" — which errors? log/retry/propagate?
42
- - "add a UI/component/tile/page" in mixed-framework repo — which stack?
43
-
44
- Examples: [`asking-and-brevity-examples § vague-triggers`](../docs/guidelines/agent-infra/asking-and-brevity-examples.md#vague-request-triggers--example-questions).
34
+ Per-pattern missing-info and clarifying questions: [`asking-and-brevity-examples § vague-triggers`](../docs/guidelines/agent-infra/asking-and-brevity-examples.md#vague-request-triggers--example-questions).
45
35
 
46
36
  **Escape hatch:** unambiguous from ticket / open file / prior turn → proceed, state the assumption.
47
37
 
@@ -0,0 +1,78 @@
1
+ ---
2
+ type: "auto"
3
+ tier: "1"
4
+ description: "When caveman.speak_scope != off — compress reply prose to caveman grammar with byte-for-byte carve-outs for numbered options, Iron-Law literals, code, paths, and error markers."
5
+ source: package
6
+ triggers:
7
+ - intent: "any reply"
8
+ ---
9
+
10
+ # Caveman Speak
11
+
12
+ Compress reply prose to caveman grammar per `caveman.speak_scope`. Body
13
+ prose only — carve-outs preserved byte-for-byte.
14
+
15
+ ## Scope
16
+
17
+ Read `caveman.speak_scope` from `.agent-settings.yml`:
18
+
19
+ - `off` — rule inactive.
20
+ - `prose_only` (default) — caveman in body prose; carve-outs preserved.
21
+ - `aggressive` — caveman everywhere except Iron-Law literals.
22
+
23
+ Compile-time toggle `caveman.speak`: `false` → rule omitted from
24
+ `router.json` (zero runtime cost). `caveman.enabled: false` forces all
25
+ sub-switches off regardless.
26
+
27
+ ## Carve-outs — byte-for-byte preserved
28
+
29
+ Mangling these breaks Iron Laws. Apply regardless of `speak_scope`:
30
+
31
+ 1. **Triple-backtick ALL-CAPS blocks** — Iron-Law literal fences in
32
+ `commit-policy`, `non-destructive-by-default`, `direct-answers`, etc.
33
+ 2. **Numbered-options blocks** — lines matching `^>?\s*\d+\.\s` plus
34
+ the `**Recommendation:**` / `**Empfehlung:**` label
35
+ (`user-interaction` Iron Law 1).
36
+ 3. **Code blocks** — any triple-backtick fence, any language.
37
+ 4. **Backtick spans** — file paths, command names, identifiers
38
+ (`direct-answers` Iron Law 2 — no invented facts).
39
+ 5. **Status / error markers** — lines prefixed `❌`, `⚠️`, `✅`.
40
+ 6. **Mode markers** per `role-mode-adherence`.
41
+ 7. **Deliverables** — PR titles / bodies, commit messages, ticket
42
+ summaries, articles, single-question prompts asked to the user.
43
+ These are written **for** the user, not chat-prose.
44
+
45
+ ## Enforcement mechanism
46
+
47
+ Post-rewrite validator runs on every reply when `speak_scope != off`:
48
+
49
+ 1. **Snapshot** — before compression, hash each line in carve-out
50
+ regions (1–7 above).
51
+ 2. **Rewrite** — compress body prose to caveman grammar.
52
+ 3. **Validate** — re-scan; for each carve-out region whose line hash
53
+ differs from the snapshot, **restore the original prose**.
54
+ 4. **Emit** — the validated reply.
55
+
56
+ The rule documents the algorithm; agents apply it inline before
57
+ sending. The mechanism is the rule, not a hidden script.
58
+
59
+ ## Caveman grammar
60
+
61
+ - Drop articles (`the`, `a`, `an`).
62
+ - Drop linking auxiliaries (`is`, `are`, `was`, `be`) where
63
+ unambiguous.
64
+ - Drop pronouns when context is clear.
65
+ - Keep nouns, verbs, key adjectives, negation, numbers.
66
+
67
+ Example: *"I will now check the file and see if it exists"* →
68
+ *"Check file. Exists?"*
69
+
70
+ ## Settings
71
+
72
+ | Key | Default | Effect |
73
+ |---|---|---|
74
+ | `caveman.enabled` | `true` | Master — `false` forces all sub-switches off. |
75
+ | `caveman.speak` | `true` | Compile-time include in `router.json`. |
76
+ | `caveman.speak_scope` | `prose_only` | Runtime scope of caveman grammar. |
77
+
78
+ Cross-rule index: [`frugality-charter § cross-references`](../contexts/contracts/frugality-charter.md#cross-references--frugality-canon-rules).
@@ -13,12 +13,10 @@ Three Iron Laws govern every reply.
13
13
  ## Iron Law 1 — No Flattery
14
14
 
15
15
  ```
16
- NEVER OPEN WITH "GREAT QUESTION", "FASCINATING", "EXCELLENT POINT".
17
- NEVER PRAISE THE USER'S IDEA TO MAKE THEM HAPPY.
16
+ NEVER OPEN WITH "GREAT QUESTION", "FASCINATING", OR PRAISE TO PLEASE THE USER.
18
17
  ANSWER THE SUBSTANCE. SHIP THE TRUTH.
19
18
  ```
20
19
 
21
- - No positive-adjective opener about user / question / idea / work.
22
20
  - No subjective judgment on user code unless evaluation was asked.
23
21
  - "Good catch" / "you're right" only when literally true.
24
22
  - Mistakes — one-sentence acknowledge, switch behavior, no apology theatre.
@@ -31,14 +29,7 @@ THE MORE LOAD-BEARING THE CLAIM, THE HARDER YOU VERIFY.
31
29
  WHEN VERIFICATION IS NOT WORTH THE COST → ASK.
32
30
  ```
33
31
 
34
- | Severity | Action |
35
- |---|---|
36
- | **High** — load-bearing (paths, signatures, versions, security, "this passes") | Verify with `view` / `grep` / `codebase-retrieval` / fresh output. Too expensive → ask. |
37
- | **Medium** — project-shape (conventions, file location) | One-tool-call verify, else hedge: *"I'd guess X — not checked"*. |
38
- | **Low** — well-known idioms | Inference OK; mark as inference if not 100% sure. |
39
-
40
- Override: "just guess" / "rough estimate" / "skip verify" → drop to Low for that turn.
41
- Examples + hedge patterns: [`asking-and-brevity-examples § severity`](../docs/guidelines/agent-infra/asking-and-brevity-examples.md#direct-answers--severity-tiered-claim-examples).
32
+ Severity tiers (High = load-bearing · Medium = project-shape · Low = idioms), per-tier verification actions, and "just guess" override: [`asking-and-brevity-examples § severity`](../docs/guidelines/agent-infra/asking-and-brevity-examples.md#direct-answers--severity-tiered-claim-examples).
42
33
 
43
34
  ## Iron Law 3 — Brevity by Default
44
35
 
@@ -54,6 +45,8 @@ LONG ANSWERS ARE A FAILURE MODE, NOT A SIGN OF EFFORT.
54
45
 
55
46
  Never overrides `user-interaction` (numbered options stay) or command-mandated steps.
56
47
 
48
+ **Narration carve-out:** restore narration only when both `personal.play_by_play` AND `verbosity.intent_announcements` are `true` in `.agent-settings.yml`.
49
+
57
50
  ## Emoji Scope — functional markers only
58
51
 
59
52
  **Whitelist:** mode markers (`role-mode-adherence`); CLI status `❌` / `✅` / `⚠️`; roadmap checkboxes `[x]` / `[~]` / `[-]`.
@@ -65,6 +58,4 @@ Trigger phrases + correction pattern: [`asking-and-brevity-examples § failure-m
65
58
  Pattern Memory (wrong / right / why): [`direct-answers-demos`](../docs/guidelines/agent-infra/direct-answers-demos.md).
66
59
  Outcome baseline: [`tests/golden/outcomes/direct_answers.json`](../../tests/golden/outcomes/direct_answers.json).
67
60
 
68
- ## Interactions
69
-
70
- `language-and-tone` · `ask-when-uncertain` · `think-before-action` · `verify-before-complete` · `token-efficiency` · `user-interaction` (overrides brevity).
61
+ Cross-rule index: [`frugality-charter § cross-references`](../contexts/contracts/frugality-charter.md#cross-references--frugality-canon-rules).
@@ -12,12 +12,11 @@ triggers:
12
12
 
13
13
  # Markdown Safe Codeblocks
14
14
 
15
- When generating markdown with code blocks:
15
+ When generating markdown that contains code blocks:
16
16
 
17
- - **NEVER** nest triple backticks inside triple backticks — this breaks rendering and copy/paste.
18
- - If content already contains triple backticks, use one of:
19
- - Plain text blocks (indented by 4 spaces) — **preferred**
20
- - `~~~` fences instead of backtick fences
21
- - Four backticks (``````) as outer fence
17
+ - **NEVER** nest triple backticks inside triple backticks — breaks rendering and copy/paste.
18
+ - Content to be wrapped contains ``` blocks → **use `~~~` as the outer fence. This is the default.** Inner ``` renders correctly inside `~~~`.
19
+ - Four-backtick outer fences render inconsistently across clients — **do not use**.
20
+ - 4-space indented blocks: acceptable fallback only when plain text without language highlighting is enough.
22
21
  - Prefer stability over pretty formatting.
23
- - Always validate: no broken rendering, no prematurely closed blocks, entire content is selectable and copyable.
22
+ - Always validate before sending: no broken rendering, no prematurely closed blocks, entire content selectable and copyable.
@@ -20,17 +20,9 @@ NEVER OFFER NUMBERED CHOICES WITHOUT A REAL TRADE-OFF.
20
20
 
21
21
  ## What counts as cheap
22
22
 
23
- - **Sequencing**"Step 2 or 3 next?" when the roadmap orders them.
24
- - **Format-only** — "Table or paragraph?"; no semantic trade-off.
25
- - **Commit asks** forbidden by [`commit-policy`](commit-policy.md).
26
- - **CI / test asks** — [`verify-before-complete`](verify-before-complete.md) decides, not the user.
27
- - **Fenced-step re-asks** — "Start Phase 1?" after *"plan only"*; see [`scope-control § fenced step`](scope-control.md#fenced-step--user-set-review-gates).
28
- - **Iron-Law option** — breaches `commit-policy`, `scope-control § git-ops`, or `non-destructive-by-default`.
29
- - **Context-derived** — answer follows from prior turn / standing instruction / roadmap; act, state the assumption inline.
30
- - **Dominant option** — one choice obviously correct; alternatives carry no upside.
31
- - **Re-ask after decline** — forbidden per [`scope-control § decline = silence`](scope-control.md#decline--silence--no-re-asking-on-the-same-task).
32
-
33
- Examples per class: [`asking-and-brevity-examples § cheap-question-catalog`](../docs/guidelines/agent-infra/asking-and-brevity-examples.md#cheap-question-class-catalog--extended-examples).
23
+ Nine classessequencing · format-only · commit asks (forbidden by [`commit-policy`](commit-policy.md)) · CI / test asks ([`verify-before-complete`](verify-before-complete.md) decides) · fenced-step re-asks ([`scope-control § fenced step`](scope-control.md#fenced-step--user-set-review-gates)) · Iron-Law option (breaches `commit-policy`, `scope-control § git-ops`, or `non-destructive-by-default`) · context-derived · dominant option · re-ask after decline ([`scope-control § decline = silence`](scope-control.md#decline--silence--no-re-asking-on-the-same-task)).
24
+
25
+ Per-class patterns and examples: [`asking-and-brevity-examples § cheap-question-catalog`](../docs/guidelines/agent-infra/asking-and-brevity-examples.md#cheap-question-class-catalog--extended-examples).
34
26
 
35
27
  ## Pre-Send Self-Check — MANDATORY before every question
36
28
 
@@ -55,6 +47,4 @@ Any "yes" → **do not ask**. Pick the dominant path, state assumption inline (*
55
47
 
56
48
  In doubt → ask. This rule narrows asking, never widens silence.
57
49
 
58
- ## Interactions
59
-
60
- [`ask-when-uncertain`](ask-when-uncertain.md) · [`autonomous-execution`](autonomous-execution.md) · [`commit-policy`](commit-policy.md) · [`scope-control`](scope-control.md) · [`non-destructive-by-default`](non-destructive-by-default.md) · [`user-interaction`](user-interaction.md) · [`direct-answers`](direct-answers.md).
50
+ Cross-rule index: [`frugality-charter § cross-references`](../contexts/contracts/frugality-charter.md#cross-references--frugality-canon-rules).
@@ -21,16 +21,14 @@ NEVER load full command output into context. Redirect → read summary → targe
21
21
  ```
22
22
 
23
23
  ```
24
- NEVER call the same tool more than 2 times in a row with similar parameters.
25
- If you catch yourself repeating a tool call — STOP, rethink, try a different approach, or ask the user.
24
+ NEVER CALL THE SAME TOOL >2 TIMES IN A ROW WITH SIMILAR PARAMETERS.
25
+ IF YOU CATCH YOURSELF REPEATING STOP, RETHINK, ASK.
26
26
  ```
27
27
 
28
28
  ## Fresh Output Over Memory
29
29
 
30
- When a tool or command returns a value (branch name, file path, PR number), use that EXACT value in subsequent API calls. NEVER substitute a value from earlier in the conversation. Context decay silent mismatches — fresh output is the only source of truth.
30
+ When a tool returns a value (branch name, file path, PR number), use that EXACT value in subsequent API calls. NEVER substitute a value from earlier in the conversation. Context decay causes silent mismatches — fresh output is the only source of truth.
31
31
 
32
- ## Mechanics — anti-loop patterns, conversation efficiency, exceptions
32
+ ## Mechanics
33
33
 
34
- The anti-loop patterns (extended-reasoning loops, "CRITICAL INSTRUCTION" self-prompting), the act-skip-narration / stop-early / keep-output-minimal / don't-re-read / minimize-tool-calls clauses, and the small-output / debugging / explicit-full-output exceptions all live in [`contexts/communication/rules-auto/token-efficiency-mechanics.md`](../contexts/communication/rules-auto/token-efficiency-mechanics.md). The rule above is the obligation surface; the mechanics file is the lookup material.
35
-
36
- This rule NEVER overrides `user-interaction` or command rules. Token efficiency means fewer *unnecessary* words — NOT skipping required questions, numbered options, or command steps.
34
+ Anti-loop patterns, act-skip-narration / stop-early / minimize-tool-calls clauses, and small-output / debugging exceptions: [`token-efficiency-mechanics`](../contexts/communication/rules-auto/token-efficiency-mechanics.md). Precedence: never overrides `user-interaction` or command rules.