@event4u/agent-config 9.16.0 → 9.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 (227) hide show
  1. package/.claude-plugin/marketplace.json +1 -1
  2. package/AGENTS.md +1 -1
  3. package/CHANGELOG.md +80 -130
  4. package/README.md +1 -1
  5. package/dist/agent-src/commands/agent-handoff.md +100 -48
  6. package/dist/agent-src/commands/challenge-me/vision.md +5 -0
  7. package/dist/agent-src/commands/commit.md +1 -1
  8. package/dist/agent-src/commands/condense.md +19 -64
  9. package/dist/agent-src/commands/evals/agent-handoff.json +13 -1
  10. package/dist/agent-src/commands/evals/rule-compliance-audit.json +46 -0
  11. package/dist/agent-src/commands/feature/plan.md +20 -0
  12. package/dist/agent-src/commands/feature/roadmap.md +19 -0
  13. package/dist/agent-src/commands/memory/promote.md +14 -1
  14. package/dist/agent-src/commands/mode.md +9 -5
  15. package/dist/agent-src/commands/optimize/deep.md +72 -11
  16. package/dist/agent-src/commands/pr/create.md +29 -0
  17. package/dist/agent-src/commands/roadmap/create.md +29 -0
  18. package/dist/agent-src/commands/rule-compliance-audit.md +28 -5
  19. package/dist/agent-src/contexts/authority/commit-mechanics.md +5 -5
  20. package/dist/agent-src/contexts/communication/rules-auto/guidelines-mechanics.md +1 -0
  21. package/dist/agent-src/contexts/communication/rules-auto/skill-quality-mechanics.md +1 -1
  22. package/dist/agent-src/contexts/communication/rules-auto/think-before-action-mechanics.md +6 -1
  23. package/dist/agent-src/contexts/communication/rules-auto/token-efficiency-mechanics.md +4 -1
  24. package/dist/agent-src/contexts/execution/autonomy-mechanics.md +27 -1
  25. package/dist/agent-src/contexts/execution/plan-confidence-gate.md +133 -0
  26. package/dist/agent-src/contexts/execution/roadmap-process-loop.md +5 -2
  27. package/dist/agent-src/profiles/agency.yml +3 -3
  28. package/dist/agent-src/profiles/content_creator.yml +2 -2
  29. package/dist/agent-src/profiles/developer.yml +2 -2
  30. package/dist/agent-src/profiles/finance.yml +1 -1
  31. package/dist/agent-src/profiles/founder.yml +2 -2
  32. package/dist/agent-src/profiles/ops.yml +2 -2
  33. package/dist/agent-src/rules/active-remediation.md +2 -0
  34. package/dist/agent-src/rules/architecture.md +4 -2
  35. package/dist/agent-src/rules/augment-edit-discipline.md +2 -0
  36. package/dist/agent-src/rules/autonomous-execution.md +1 -1
  37. package/dist/agent-src/rules/brand-consistency.md +10 -62
  38. package/dist/agent-src/rules/brand-source-of-truth.md +62 -11
  39. package/dist/agent-src/rules/broken-access-control.md +4 -0
  40. package/dist/agent-src/rules/cli-output-handling.md +5 -0
  41. package/dist/agent-src/rules/code-comment-discipline.md +3 -0
  42. package/dist/agent-src/rules/commit-conventions.md +2 -0
  43. package/dist/agent-src/rules/context-hygiene.md +3 -2
  44. package/dist/agent-src/rules/cross-source-consistency.md +3 -0
  45. package/dist/agent-src/rules/design-fidelity.md +2 -0
  46. package/dist/agent-src/rules/doc-screenshot-hygiene.md +2 -0
  47. package/dist/agent-src/rules/docker-commands.md +4 -0
  48. package/dist/agent-src/rules/domain-adoption-policy.md +2 -0
  49. package/dist/agent-src/rules/domain-safety-disclaimer.md +5 -2
  50. package/dist/agent-src/rules/domain-safety-pii.md +1 -1
  51. package/dist/agent-src/rules/engineering-safety-floor.md +2 -0
  52. package/dist/agent-src/rules/framework-neutrality-in-generic-skills.md +9 -0
  53. package/dist/agent-src/rules/image-likeness-and-rights.md +4 -0
  54. package/dist/agent-src/rules/improve-before-implement.md +4 -0
  55. package/dist/agent-src/rules/laravel-routing.md +4 -0
  56. package/dist/agent-src/rules/legal-safety-floor.md +3 -0
  57. package/dist/agent-src/rules/lethal-trifecta-guard.md +3 -0
  58. package/dist/agent-src/rules/media-governance-routing.md +5 -0
  59. package/dist/agent-src/rules/minimal-safe-diff.md +2 -0
  60. package/dist/agent-src/rules/no-roadmap-references.md +2 -0
  61. package/dist/agent-src/rules/notes-first-reasoning.md +2 -0
  62. package/dist/agent-src/rules/output-discipline.md +9 -2
  63. package/dist/agent-src/rules/php-coding.md +2 -0
  64. package/dist/agent-src/rules/prefer-enums-over-literals.md +3 -0
  65. package/dist/agent-src/rules/provider-lifecycle-discipline.md +5 -0
  66. package/dist/agent-src/rules/roadmap-ci-steps-policy.md +2 -0
  67. package/dist/agent-src/rules/roadmap-progress-sync.md +2 -0
  68. package/dist/agent-src/rules/rule-type-governance.md +2 -0
  69. package/dist/agent-src/rules/scale-discipline.md +3 -0
  70. package/dist/agent-src/rules/secret-vcs-guard.md +2 -0
  71. package/dist/agent-src/rules/security-sensitive-stop.md +9 -2
  72. package/dist/agent-src/rules/senior-engineering-discipline.md +6 -0
  73. package/dist/agent-src/rules/skill-quality.md +2 -0
  74. package/dist/agent-src/rules/source-confidentiality.md +4 -0
  75. package/dist/agent-src/rules/source-discovery-gate.md +3 -0
  76. package/dist/agent-src/rules/source-of-truth.md +2 -0
  77. package/dist/agent-src/rules/strategy-safety-floor.md +2 -0
  78. package/dist/agent-src/rules/think-before-action.md +5 -0
  79. package/dist/agent-src/rules/token-budget-discipline.md +2 -2
  80. package/dist/agent-src/rules/ui-audit-gate.md +2 -0
  81. package/dist/agent-src/rules/user-interaction.md +3 -4
  82. package/dist/agent-src/skills/build-buy-partner/SKILL.md +1 -1
  83. package/dist/agent-src/skills/copilot-agents-optimization/SKILL.md +4 -4
  84. package/dist/agent-src/skills/copilot-config/SKILL.md +1 -1
  85. package/dist/agent-src/skills/deep-reading-analyst/SKILL.md +7 -4
  86. package/dist/agent-src/skills/description-assist/SKILL.md +1 -1
  87. package/dist/agent-src/skills/design-intelligence/SKILL.md +6 -180
  88. package/dist/agent-src/skills/design-intelligence/references/context-and-registers.md +100 -0
  89. package/dist/agent-src/skills/design-intelligence/references/integration-mapping.md +91 -0
  90. package/dist/agent-src/skills/design-review/SKILL.md +4 -141
  91. package/dist/agent-src/skills/design-review/references/review-communication.md +92 -0
  92. package/dist/agent-src/skills/design-review/references/verification-automation.md +61 -0
  93. package/dist/agent-src/skills/existing-ui-audit/SKILL.md +8 -27
  94. package/dist/agent-src/skills/existing-ui-audit/references/anti-slop-cross-reference.md +31 -0
  95. package/dist/agent-src/skills/fe-design/SKILL.md +4 -289
  96. package/dist/agent-src/skills/fe-design/references/design-patterns.md +227 -0
  97. package/dist/agent-src/skills/fe-design/references/design-read-and-memory.md +75 -0
  98. package/dist/agent-src/skills/market-entry-analysis/SKILL.md +1 -1
  99. package/dist/agent-src/skills/persona-writing/SKILL.md +2 -2
  100. package/dist/agent-src/skills/readme-reviewer/SKILL.md +2 -1
  101. package/dist/agent-src/skills/roadmap-management/SKILL.md +10 -0
  102. package/dist/agent-src/skills/roadmap-writing/SKILL.md +12 -1
  103. package/dist/agent-src/skills/rule-writing/SKILL.md +4 -2
  104. package/dist/agent-src/skills/skill-reviewer/SKILL.md +1 -1
  105. package/dist/agent-src/skills/skill-writing/SKILL.md +2 -2
  106. package/dist/agent-src/skills/tailwind-engineer/SKILL.md +3 -1
  107. package/dist/agent-src/skills/token-optimizer/SKILL.md +2 -2
  108. package/dist/agent-src/skills/ui-component-architect/SKILL.md +6 -3
  109. package/dist/agent-src/templates/agent-settings.md +13 -15
  110. package/dist/agent-src/templates/agents/agent-project-settings.example.yml +6 -2
  111. package/dist/agent-src/templates/persona.md +2 -2
  112. package/dist/agent-src/templates/roadmaps.md +13 -1
  113. package/dist/agent-src/templates/rule.md +1 -1
  114. package/dist/agent-src/templates/scripts/work_engine/directives/ui/_fix_lane.ts +52 -0
  115. package/dist/agent-src/templates/scripts/work_engine/directives/ui/audit.ts +8 -0
  116. package/dist/agent-src/templates/scripts/work_engine/directives/ui/design.ts +6 -0
  117. package/dist/agent-src/templates/scripts/work_engine/intent/classify.ts +56 -4
  118. package/dist/agent-src/templates/skill.md +1 -1
  119. package/dist/cli/registry.js +3 -0
  120. package/dist/cli/registry.js.map +1 -1
  121. package/dist/cli-delegate/chunk-AIIUU73N.js +2040 -0
  122. package/dist/cli-delegate/{chunk-ZXXJLL5K.js → chunk-BSLUHV2F.js} +127 -1487
  123. package/dist/cli-delegate/{chunk-H574KOUH.js → chunk-ELMFOQPW.js} +35 -1
  124. package/dist/cli-delegate/chunk-LF2KKJ4Q.js +183 -0
  125. package/dist/cli-delegate/chunk-VSYT7OHO.js +1382 -0
  126. package/dist/cli-delegate/chunk-XGA2NTU4.js +3727 -0
  127. package/dist/cli-delegate/cmd_conformance.js +4 -3
  128. package/dist/cli-delegate/cmd_converge.js +3 -3
  129. package/dist/cli-delegate/cmd_doctor.js +3 -2
  130. package/dist/cli-delegate/cmd_explain.js +36 -36
  131. package/dist/cli-delegate/cmd_export.js +4 -4
  132. package/dist/cli-delegate/cmd_handoff.js +1169 -0
  133. package/dist/cli-delegate/cmd_memory_get.js +35 -3754
  134. package/dist/cli-delegate/cmd_migrate.js +2 -2
  135. package/dist/cli-delegate/cmd_prune.js +4 -4
  136. package/dist/cli-delegate/cmd_route_audit.js +249 -0
  137. package/dist/cli-delegate/cmd_route_explain.js +285 -0
  138. package/dist/cli-delegate/cmd_settings_migrate.js +4 -4
  139. package/dist/cli-delegate/cmd_sync.js +4 -4
  140. package/dist/cli-delegate/cmd_uninstall.js +4 -4
  141. package/dist/cli-delegate/cmd_update.js +3 -3
  142. package/dist/cli-delegate/cmd_upgrade.js +3 -3
  143. package/dist/cli-delegate/cmd_validate.js +4 -4
  144. package/dist/cli-delegate/cmd_versions.js +3 -3
  145. package/dist/discovery/deprecation-report.md +1 -1
  146. package/dist/discovery/discovery-manifest.json +84 -84
  147. package/dist/discovery/discovery-manifest.json.sha256 +1 -1
  148. package/dist/discovery/discovery-manifest.summary.md +1 -1
  149. package/dist/discovery/orphan-report.md +1 -1
  150. package/dist/discovery/packs.json +2 -2
  151. package/dist/discovery/trust-report.md +1 -1
  152. package/dist/discovery/workspaces.json +2 -2
  153. package/dist/hooks/dispatch.js +602 -507
  154. package/dist/install/install.mjs +34 -0
  155. package/dist/mcp/awesome-mcp-servers.row.md +1 -1
  156. package/dist/mcp/mcp-cloudflare-catalogue.json +2 -2
  157. package/dist/mcp/registry-manifest.json +4 -4
  158. package/dist/mcp/server.json +2 -2
  159. package/dist/mcp/server.mjs +25 -3
  160. package/dist/router.json +1 -1
  161. package/dist/scripts/_lib/agent_src.js +39 -6
  162. package/dist/scripts/_lib/agent_src.js.map +1 -1
  163. package/dist/server/schemas/settings.js +25 -0
  164. package/dist/server/schemas/settings.js.map +1 -1
  165. package/docs/guidelines/abstraction-thresholds.md +53 -0
  166. package/docs/guidelines/agent-infra/agent-interaction-and-decision-quality.md +1 -1
  167. package/docs/guidelines/agent-infra/asking-and-brevity-examples.md +7 -0
  168. package/docs/guidelines/agent-infra/context-hygiene-mechanics.md +2 -2
  169. package/docs/guidelines/agent-infra/minimal-safe-diff-mechanics.md +5 -3
  170. package/docs/guidelines/agent-infra/size-and-scope.md +8 -2
  171. package/docs/guidelines/component-oriented-and-oop-development.md +11 -6
  172. package/docs/guidelines/docs/readme-size-and-splitting.md +5 -2
  173. package/llms.txt +1 -0
  174. package/package.json +1 -1
  175. package/src/agent-src/templates/scripts/work_engine/directives/ui/_fix_lane.ts +52 -0
  176. package/src/agent-src/templates/scripts/work_engine/directives/ui/audit.ts +8 -0
  177. package/src/agent-src/templates/scripts/work_engine/directives/ui/design.ts +6 -0
  178. package/src/agent-src/templates/scripts/work_engine/intent/classify.ts +56 -4
  179. package/src/config/agent-settings.template.yml +68 -0
  180. package/src/config/evaluator-budgets.json +8 -11
  181. package/src/config/gate-coverage.yml +70 -0
  182. package/src/scripts/_cli/cmd_explain.ts +41 -36
  183. package/src/scripts/_cli/cmd_handoff.ts +405 -0
  184. package/src/scripts/_cli/cmd_route_audit.ts +290 -0
  185. package/src/scripts/_cli/cmd_route_explain.ts +269 -0
  186. package/src/scripts/_cli/handoff_generate.ts +453 -0
  187. package/src/scripts/_cli/handoff_sessions.ts +435 -0
  188. package/src/scripts/_dispatch.bash +32 -0
  189. package/src/scripts/_lib/agent_src.ts +36 -6
  190. package/src/scripts/_lib/git_env.ts +40 -0
  191. package/src/scripts/_lib/md_table.ts +27 -0
  192. package/src/scripts/_lib/planning_settings.ts +43 -0
  193. package/src/scripts/_lib/release_material.ts +156 -0
  194. package/src/scripts/_lib/router_match.ts +301 -0
  195. package/src/scripts/annotate_r1_outcomes.ts +258 -0
  196. package/src/scripts/check_completion_review.ts +1140 -0
  197. package/src/scripts/check_condensation.ts +2 -1
  198. package/src/scripts/check_finding_dispositions.ts +278 -0
  199. package/src/scripts/check_pack_size.ts +4 -3
  200. package/src/scripts/check_references.ts +1 -0
  201. package/src/scripts/check_release_highlights.ts +300 -0
  202. package/src/scripts/check_release_pr_shape.ts +4 -0
  203. package/src/scripts/check_release_surface_equality.ts +132 -0
  204. package/src/scripts/check_reply_consistency.ts +187 -138
  205. package/src/scripts/compile_router.ts +20 -3
  206. package/src/scripts/dispatch_r2_reviewer.ts +968 -0
  207. package/src/scripts/eval_ui_triviality.ts +156 -0
  208. package/src/scripts/handoff_context_hook.ts +148 -0
  209. package/src/scripts/hook_manifest.yaml +17 -7
  210. package/src/scripts/hooks/concern_registry.ts +2 -0
  211. package/src/scripts/lint_abstraction_thresholds.ts +327 -0
  212. package/src/scripts/lint_framework_leakage_allowlist.json +2 -2
  213. package/src/scripts/lint_plan_risk_register.ts +931 -0
  214. package/src/scripts/lint_profile_personas.ts +153 -0
  215. package/src/scripts/lint_token_budget_discipline.ts +148 -0
  216. package/src/scripts/lint_trigger_collisions.ts +257 -0
  217. package/src/scripts/release.ts +156 -32
  218. package/src/scripts/release_drill.ts +491 -0
  219. package/src/scripts/router_telemetry.ts +16 -290
  220. package/src/scripts/schemas/command.schema.json +33 -0
  221. package/src/scripts/schemas/rule.schema.json +10 -0
  222. package/src/scripts/self_review_gate.ts +41 -3
  223. package/src/scripts/skill_linter.ts +3 -1
  224. package/src/scripts/smoke/router.sh +1 -1
  225. package/src/scripts/update_counts.ts +60 -12
  226. package/src/server/schemas/settings.ts +41 -0
  227. package/dist/cli-delegate/{chunk-XX6TOPD7.js → chunk-WR6GTRHJ.js} +3 -3
@@ -20,8 +20,8 @@ packs:
20
20
 
21
21
  # condense
22
22
 
23
- Condense agent config `.md` files from `src/` into token-efficient telegraph format
24
- and write the condensed output to `dist/agent-src/`.
23
+ Project agent config `.md` files from `src/` into `dist/agent-src/` — verbatim
24
+ copy with the path rewriter applied (ADR-201; the LLM prose rewrite is removed).
25
25
 
26
26
  The projection is deterministic: `dist == rewrite(src)` byte-for-byte. A file is
27
27
  out of date only when its projection does not match that rewrite.
@@ -96,76 +96,31 @@ Read `verbosity.post_action_reports` from `.agent-settings.yml` (default
96
96
  `minimal`).
97
97
 
98
98
  - `off` → emit nothing on success; surface errors only.
99
- - `minimal` (default) → one line: `→ N files condensed (avg X% savings)`.
100
- - `full` → multi-line table with per-category stats (files condensed,
101
- avg savings).
99
+ - `minimal` (default) → one line: `→ N files synced`.
100
+ - `full` → multi-line table with per-category stats (files synced,
101
+ stale files reaped).
102
102
 
103
- ## Iron Laws — do not touch
103
+ ## Iron Laws — preserved by construction
104
104
 
105
105
  Sections under headings matching `Iron Law`, `Iron Laws`, or `The Iron Law` (any
106
106
  heading level, numbered variants like `Iron Law 1` included) are **load-bearing
107
- behavioral rules**. Condensation rules above do **not** apply to them.
108
-
109
- For every Iron Law section in a source file:
110
-
111
- - **Copy the heading verbatim**, exact text, exact `#` level. NEVER downgrade
112
- `## Iron Law` to `### Iron Law` or to inline `**Iron Law:**`.
113
- - **Copy the fenced code block byte-for-byte**, including capitalization, line
114
- breaks, and trailing punctuation.
115
- - **Copy the negation clauses verbatim** — `NO X`, `NEVER Y`, `NOT Z`. These
116
- are the law's exception denials; stripping them weakens the rule.
117
- - **Telegraph the prose, keep every passage** — every paragraph, every list
118
- item, and every fenced code block from the source must appear in the
119
- condensed output, in order. Drop articles, shorten phrasing, primitive
120
- grammar, terse cave-speak — all encouraged. What's forbidden is dropping
121
- whole sentences, merging two paragraphs into one, or skipping a bullet.
122
- One paragraph → one paragraph; one bullet → one bullet.
123
- - **No word-count budget** — condense the prose as hard as telegraph style
124
- allows. The check is structural (passage count), not quantitative.
125
-
126
- `scripts/check_condensation.ts` enforces these mechanically — `iron_law_missing`,
127
- `iron_law_passage_dropped`, and `iron_law_heading_downgrade` are `error`-level
128
- and block CI.
107
+ behavioral rules**. Post-ADR-201 the projection is a verbatim copy, so headings,
108
+ fenced blocks, and negation clauses survive by construction — there is no manual
109
+ preservation step for the agent to perform.
129
110
 
130
- If an Iron Law section genuinely contains filler (rare): edit the SOURCE in
131
- `src/`, not the condensed copy. Source is the truth.
132
-
133
- ## Condensation quality checklist
134
-
135
- **Also apply the [preservation-guard](../rules/preservation-guard.md) rule** — strongest validation, example, anti-pattern, and decision hints must survive condensation. Iron Laws are non-negotiable.
136
-
137
- See also: [markdown-safe-codeblocks](../rules/markdown-safe-codeblocks.md) for fenced-block hygiene.
138
-
139
- After condensing each file, verify:
111
+ `scripts/check_condensation.ts` enforces this mechanically — since ADR-201 it
112
+ asserts `dist == rewrite(src)` byte-for-byte; `iron_law_missing`,
113
+ `iron_law_passage_dropped`, and `iron_law_heading_downgrade` remain `error`-level
114
+ diagnostics that name what differs when the bytes do.
140
115
 
141
- - [ ] All code blocks preserved exactly (no content changes)
142
- - [ ] All inline code, URLs, file paths unchanged
143
- - [ ] YAML frontmatter identical to source
144
- - [ ] Headings match source exactly
145
- - [ ] Tables structure preserved (cell text may be shortened)
146
- - [ ] "NEVER", "MUST", "Do NOT" and other strong language preserved
147
- - [ ] Technical terms, library names, API names unchanged
148
- - [ ] No meaning lost — condensed version says the same thing, shorter
149
- - [ ] No sections accidentally removed
150
- - [ ] Word count reduction is 20-50% (typical range for prose-heavy files)
151
-
152
- ### Safe vs unsafe condensation
153
-
154
- Safe:
155
- - "You should always make sure to run the tests before committing" → "Run tests before commit"
156
- - "In order to ensure that the configuration is correct" → "To verify config"
157
- - "It is important to note that this feature requires" → "Requires"
158
-
159
- Unsafe (DO NOT do this):
160
- - Removing a bullet point that contains unique information
161
- - Changing `php artisan test --filter=MyTest` to `php artisan test`
162
- - Shortening "Do NOT use float for money" to "Avoid float"
163
- - Removing "NEVER" from "NEVER add to phpstan-baseline.neon"
116
+ If an Iron Law section genuinely contains filler (rare): edit the SOURCE in
117
+ `src/`, not the projected copy. Source is the truth. Authoring-time transforms
118
+ (merges, splits, refactors) remain governed by
119
+ [preservation-guard](../rules/preservation-guard.md).
164
120
 
165
121
  ## Rules
166
122
 
167
123
  - **Do NOT commit or push.** Only write files.
168
124
  - **Do NOT modify `src/`** — it is the source of truth.
169
- - **Only write to `.augment/`** — the condensed output directory.
170
- - **Preserve ALL technical content** — only condense natural language prose.
171
- - **YAML frontmatter** in command/skill files must be preserved exactly.
125
+ - **Only write to `dist/agent-src/`** (via `condense.sh` / the script) — never
126
+ hand-edit any projection.
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "command": "agent-handoff",
3
- "intent": "Generate a session-handoff summary to continue work in a fresh chat",
3
+ "intent": "Resume a previous session in a fresh chat: pick a session, generate a handoff, auto-seed the next session",
4
4
  "cases": [
5
5
  {
6
6
  "prompt": "summarize where we are so I can paste it into a new chat",
@@ -29,6 +29,18 @@
29
29
  {
30
30
  "prompt": "show me the current message count and token cost",
31
31
  "expected": "agent-status"
32
+ },
33
+ {
34
+ "prompt": "let me continue an old session in a fresh chat",
35
+ "expected": "agent-handoff"
36
+ },
37
+ {
38
+ "prompt": "starte eine neue session mit dem stand von gestern",
39
+ "expected": "agent-handoff"
40
+ },
41
+ {
42
+ "prompt": "resume my previous session where we left off, but in a clean chat",
43
+ "expected": "agent-handoff"
32
44
  }
33
45
  ]
34
46
  }
@@ -0,0 +1,46 @@
1
+ {
2
+ "command": "rule-compliance-audit",
3
+ "intent": "Audit rule trigger quality and replay the router matcher over recent prompts (routing audit)",
4
+ "cases": [
5
+ {
6
+ "prompt": "audit my rules for weak triggers",
7
+ "expected": "rule-compliance-audit"
8
+ },
9
+ {
10
+ "prompt": "run a routing audit — which rules fired on my last prompts",
11
+ "expected": "rule-compliance-audit"
12
+ },
13
+ {
14
+ "prompt": "check whether the rule routing actually matches what I type",
15
+ "expected": "rule-compliance-audit"
16
+ },
17
+ {
18
+ "prompt": "why did no rule activate on my last message — audit the triggers",
19
+ "expected": "rule-compliance-audit"
20
+ },
21
+ {
22
+ "prompt": "find rules whose descriptions overlap or never activate",
23
+ "expected": "rule-compliance-audit"
24
+ },
25
+ {
26
+ "prompt": "fix the failing CI on this branch",
27
+ "expected": "fix"
28
+ },
29
+ {
30
+ "prompt": "review the changes on this branch before I push",
31
+ "expected": "review-changes"
32
+ },
33
+ {
34
+ "prompt": "run a full project health check",
35
+ "expected": "project-health"
36
+ },
37
+ {
38
+ "prompt": "estimate this ticket for me",
39
+ "expected": "estimate-ticket"
40
+ },
41
+ {
42
+ "prompt": "commit these changes in logical chunks",
43
+ "expected": "commit"
44
+ }
45
+ ]
46
+ }
@@ -21,6 +21,19 @@ packs:
21
21
  # /feature plan
22
22
  ## Instructions
23
23
 
24
+ ### 0. Confidence gate (Gate C)
25
+
26
+ Before gathering, run the plan-confidence gate per
27
+ [`plan-confidence-gate`](../../contexts/execution/plan-confidence-gate.md):
28
+ read `planning.challenge_on_create` (missing = `true`), do the codebase
29
+ lookup, and assess the four 95%-conditions — **seed = the provided
30
+ description** (when none was provided, step 1's ask supplies it first).
31
+ Confident → single marker line, continue with step 1. Uncertain → route
32
+ into `/challenge-me vision` (inline degrade protocol without the command);
33
+ the pitch feeds steps 5c–6, and the C→R1 handoff state is written so the
34
+ risk-review step re-asks nothing. Explicit user bypass wins for the turn
35
+ and is counted.
36
+
24
37
  ### 1. Gather the idea
25
38
 
26
39
  If the user provided a description, use it. Otherwise ask:
@@ -259,6 +272,13 @@ If picked **2** → continue.
259
272
  - Set the `Module` field in the feature doc accordingly.
260
273
  - Set status to `📋 Planned`.
261
274
  - If Jira tickets were provided, add them to the `Jira` field and reference them in the feature doc.
275
+ - **Risk review (Gate R1)** — before saving, add a `## Risk Register`
276
+ section per [`plan-review-gates § 1`](../../../docs/contracts/plan-review-gates.md):
277
+ read the C→R1 handoff state from step 0 if present (resolved branches
278
+ seed the risks — never re-ask them), rank the highest product and
279
+ implementation risks descending, one mitigation per row, each row
280
+ anchored to a section of this document. No material risks → the exact
281
+ honest-null grammar. Self-review suffices.
262
282
 
263
283
  **Ask for the filename:**
264
284
  ```
@@ -55,6 +55,15 @@ Stop.
55
55
  - Read the roadmap template at `.augment/templates/roadmaps.md` for the structure.
56
56
  - Research the codebase for affected areas mentioned in the feature.
57
57
 
58
+ **Confidence gate (Gate C)** — after reading the feature plan, run
59
+ [`plan-confidence-gate`](../../contexts/execution/plan-confidence-gate.md)
60
+ with the **feature document as seed** (`planning.challenge_on_create`,
61
+ missing = `true`). All four 95%-conditions hold → single marker line,
62
+ continue. A gap that would change the phases or acceptance criteria →
63
+ `/challenge-me vision` interview (or inline degrade protocol) **before**
64
+ proposing roadmaps; the C→R1 handoff state is written so the risk-review
65
+ step re-asks nothing. Explicit user bypass wins for the turn and is counted.
66
+
58
67
  Determine how many roadmaps are needed:
59
68
 
60
69
  - **Single roadmap:** Small/medium features that fit in one document.
@@ -143,6 +152,16 @@ If any planned name already exists anywhere under the namespace,
143
152
  Re-run the check after a rename. Never silently overwrite, never
144
153
  auto-suffix without the user's pick.
145
154
 
155
+ **Risk review (Gate R1)** — every generated roadmap that is saved ready
156
+ (non-draft) carries a `## Risk Register` per
157
+ [`plan-review-gates § 1`](../../../docs/contracts/plan-review-gates.md):
158
+ read the C→R1 handoff state from step 2 if present (resolved branches
159
+ seed the risks — never re-ask them), rank the highest product and
160
+ implementation risks descending, one mitigation per row, each row
161
+ anchored to a phase/step of that roadmap. No material risks → the exact
162
+ honest-null grammar. `lint_plan_risk_register` enforces this at
163
+ pre-push + CI; drafts are exempt until flipped to ready.
164
+
146
165
  ### 5. Link roadmaps in the feature plan
147
166
 
148
167
  Update the feature file's `## Roadmaps` section:
@@ -184,7 +184,20 @@ echo '{"type":"supersede","supersedes":"<sig-id>","promoted_to":"<curated id>"}'
184
184
  This keeps the intake stream truthful — lookups will ignore the
185
185
  superseded signal.
186
186
 
187
- ### 6. Open a promotion PR
187
+ ### 6. Open a promotion PR — git ops are permission-gated
188
+
189
+ Branch, commit, and push are NOT authorized by invoking this command
190
+ (per `scope-control` § git-ops and the `non-destructive-by-default`
191
+ push floor — invoking `/memory:promote` names the promotion, not a git
192
+ destination). Surface the exact operations and wait for explicit
193
+ confirmation this turn:
194
+
195
+ > Promotion is written. Ship it as a PR?
196
+ >
197
+ > 1. Yes — branch `memory/promote-<curated-id>`, commit, push, then `/create-pr`
198
+ > 2. No — keep the promotion local, I'll ship it myself
199
+
200
+ Only on option 1:
188
201
 
189
202
  ```bash
190
203
  git checkout -b memory/promote-<curated-id>
@@ -63,7 +63,9 @@ Extract `roles.default_role` and `roles.active_role`.
63
63
 
64
64
  Echo the full contract body for the target mode from `role-contracts.md`:
65
65
 
66
- - Goal / Constraints / Output fields
66
+ - The mode's contract-skeleton fields (each mode's skeleton differs —
67
+ e.g. developer: Goal / Plan / Changes / Tests / Open questions;
68
+ planner: Goal / Constraints / Option set / …)
67
69
  - Default skills the mode loads first
68
70
  - Structured mode marker the agent will emit when closing
69
71
 
@@ -85,7 +87,7 @@ Do NOT write anything for `/mode` without an argument (status only).
85
87
  Announce the switch as:
86
88
 
87
89
  ```
88
- > entering {mode} mode — contract: {goal-field} / {constraints-field} / {output-field}
90
+ > entering {mode} mode — contract fields: {first-3-field-names-from-skeleton}
89
91
  ```
90
92
 
91
93
  From this point in the session: the rule
@@ -105,7 +107,7 @@ numbered prompt:
105
107
  ## Output format
106
108
 
107
109
  ```
108
- > entering {mode} mode — contract: …
110
+ > entering {mode} mode — contract fields: …
109
111
  >
110
112
  > Default skills: {skill-a}, {skill-b}, {skill-c}
111
113
  > Closing marker: <!-- role-mode: {mode} | contract: … -->
@@ -121,8 +123,10 @@ For `/mode` (status only):
121
123
  ## Gotchas
122
124
 
123
125
  - `.agent-settings.yml` is git-ignored. `/mode` never commits the file.
124
- - If the file is missing the `roles:` section, add it in the correct
125
- place (between `subagents:` and EOF) using the template layout.
126
+ - If the file is missing the `roles:` section, add it — note
127
+ `agent-settings.template.yml` ships no `roles:` block; the reference
128
+ `roles:` layout lives in
129
+ `src/agent-src/templates/agents/agent-project-settings.example.yml`.
126
130
  - Mode names are case-sensitive in the file; case-insensitive on input.
127
131
  - The contract is the source of truth, not this command — if the
128
132
  guideline changes, this command reflects the new contract on next run.
@@ -8,7 +8,13 @@ sub: deep
8
8
  cluster: optimize
9
9
  skills: [ai-council, roadmap-writing, subagent-orchestration, decision-review]
10
10
  description: "Autonomous deep-refactoring loop — subagent analysis, verified findings, council, central + sub-roadmaps, PR, then N refinement loops (default 3). E.g. 'run a deep optimization pass'."
11
- argument-hint: "[--loops=N] [--scope=<path>] [--no-external]"
11
+ argument-hint: "[--mode=plan|execute] [--loops=N] [--scope=<path>] [--no-external]"
12
+ limits:
13
+ mode_default: plan
14
+ max_iterations: 3
15
+ hard_ceiling: 5
16
+ no_gain_stop: 2
17
+ target_metric: required
12
18
  suggestion:
13
19
  eligible: false
14
20
  rationale: "Cluster sub-command — reached via its cluster head's routing or its explicit /cluster:sub name; not independently suggested (surface-consolidation)."
@@ -44,22 +50,71 @@ Do NOT invoke for: a single named bug, an interview-style sweep with the
44
50
  user in the loop (route to `/optimize project`), a code-only analysis
45
51
  (`/project-analyze`), or agent-layer file tooling (`/optimize` siblings).
46
52
 
47
- ## Loop budget
53
+ ## Enforced limits (release-truth Phase 4)
54
+
55
+ The frontmatter `limits:` block is the machine-readable pin
56
+ (`tests/scripts/optimize_deep_limits.test.ts` fails when flow and pin
57
+ drift); the flow steps below are the enforcement — each limit is a step
58
+ the run MUST execute, not advice. The reviews' P0 this closes: an
59
+ autonomous deep-refactoring loop shipped without technically enforced
60
+ limits.
61
+
62
+ ### Execution mode — plan-only default
63
+
64
+ `--mode=plan` is the **default**: run Steps 0–4 only — analyze, verify,
65
+ council, author the roadmap set in the worktree — then present the plan
66
+ plus the predicted delta on the target metric and STOP. No push, no PR, no
67
+ refinement loop, no edit outside the worktree's roadmap drafts.
68
+ `--mode=execute` must be **explicitly present in the invocation** to enter
69
+ Steps 5–6; treat its absence as plan mode even when conversation momentum
70
+ suggests otherwise. An execute-mode run still respects every gate below.
71
+
72
+ ### Pre-registered target metric — required before loop 1
73
+
74
+ Before Step 5 may run (and therefore before any refinement loop), the
75
+ central roadmap MUST carry a `Target metric` block naming ONE measurable
76
+ metric (e.g. always-loaded token budget, gate wall-clock, red-test count),
77
+ its **measured baseline at the branch SHA** (command output pasted, not
78
+ asserted), and the predicted direction. No block → REFUSE to enter Step 5
79
+ with: `target metric not pre-registered — record it in the central roadmap
80
+ first`. Loops never move the goalposts: the metric named before loop 1 is
81
+ the metric every loop is scored against.
82
+
83
+ ### Loop budget
48
84
 
49
85
  `--loops=N` caps the refinement loops. **Default: 3** (council-locked
50
86
  2026-08-02: autonomous loops without a fast, trustworthy CI oracle are
51
87
  compounding-error machines; 3 with a tripwire beats 5 on cost/benefit).
52
- Hard ceiling: 5 — above that, re-invoke deliberately with fresh context.
88
+ Hard ceiling: 5 — a larger `--loops` value is clamped to 5 with a warning;
89
+ above that, re-invoke deliberately with fresh context.
53
90
 
54
91
  **Halt-on-spin tripwire (checked after every loop, overrides the budget):**
55
92
 
56
93
  - A loop ends with no material roadmap delta (no step added, removed,
57
94
  re-scoped, or re-ordered) → STOP, the set has converged.
95
+ - **Two consecutive loops deliver no measurable gain on the pre-registered
96
+ target metric (re-measured per loop, Step 6e) → STOP** — spinning without
97
+ gain is the failure the metric exists to catch.
58
98
  - The council splits on the same question twice → STOP, escalate that
59
99
  question to the user instead of burning a third loop on it.
60
100
  - Any validation target fails 3 consecutive refinement attempts → STOP
61
101
  (N=3 budget, `autonomous-execution`).
62
102
 
103
+ ### Hard exclusions — never inside this command
104
+
105
+ - **Kernel rules:** the run NEVER edits a kernel rule (`is_kernel_rule` in
106
+ `src/scripts/_lib/kernel_rules.ts`; the `block-kernel-rule-writes`
107
+ PreToolUse guard denies the write anyway). A finding that wants a
108
+ kernel-rule change is recorded in the roadmap as a **proposal routed to
109
+ the kernel slow-rollout process** (`contexts/authority/kernel-rule-edits.md`:
110
+ own PR, ≥ 24 h soak) — the refusal names that process, never edits.
111
+ - **Public contracts:** no change to a `docs/contracts/` surface marked
112
+ `stability: stable` without explicit user approval this run — record as a
113
+ proposal otherwise.
114
+ - **Commit / push / PR floors:** unchanged — the invocation authorizes the
115
+ worktree branch and (execute mode) pushes to the run's own PR; merge,
116
+ deploy, and every Hard-Floor action stay this-turn gated.
117
+
63
118
  ## Steps
64
119
 
65
120
  ### Step 0 — Preflight (read-only)
@@ -115,22 +170,28 @@ work (whatever must be true for the rest to be verifiable — typically the
115
170
  CI oracle) gates the leverage-class work explicitly. Regenerate the
116
171
  dashboard (`roadmap:progress`) in the same response as any roadmap write.
117
172
 
118
- ### Step 5 — Pull request
173
+ ### Step 5 — Pull request (execute mode only)
119
174
 
120
- Push the branch and open the PR per [`/create-pr`](../pr/create.md) — its
121
- mechanics and the always-active PR-surface rules govern the body and reply
122
- shape; do not restate them here.
175
+ **Gate first:** `--mode=execute` present in the invocation AND the
176
+ `Target metric` block recorded (§ Enforced limits) — otherwise STOP here
177
+ and present the plan (plan mode's defined end state). Then push the branch
178
+ and open the PR per [`/create-pr`](../pr/create.md) — its mechanics and the
179
+ always-active PR-surface rules govern the body and reply shape; do not
180
+ restate them here.
123
181
 
124
- ### Step 6 — Refinement loops (×N, autonomous)
182
+ ### Step 6 — Refinement loops (×N, execute mode only)
125
183
 
126
184
  Each loop: (a) re-read the roadmap set with fresh subagent reviewers
127
185
  (adversarial: hunt over-building, missing evidence, lock violations,
128
186
  sequencing errors); (b) resolve contested deltas in the council; (c) any
129
187
  delta resting on a NEW factual claim re-enters the Step-2 verification gate
130
188
  before application — reviewer assertions are findings, not facts; (d) apply
131
- the surviving deltas to the roadmaps; (e) push to the same PR; (f) evaluate
132
- the tripwire. Loop output is a delta summary in the PR description's
133
- changelog section, not a comment (`no-pr-progress-comments`).
189
+ the surviving deltas to the roadmaps; (e) **re-measure the pre-registered
190
+ target metric at the new SHA and record the value in the loop verdict** —
191
+ this is the per-loop verification the no-gain tripwire consumes; (f) push
192
+ to the same PR; (g) evaluate the tripwire (§ Enforced limits — including
193
+ the two-consecutive-no-gain stop). Loop output is a delta summary in the PR
194
+ description's changelog section, not a comment (`no-pr-progress-comments`).
134
195
 
135
196
  ## Output
136
197
 
@@ -139,6 +139,35 @@ completion is read from the checkbox counts.
139
139
  in the working tree.
140
140
  - **It reported nothing → proceed.** No completed roadmap in this branch.
141
141
 
142
+ ### 1d. Completion review (Gate R2) — after the sweep, before the PR
143
+
144
+ Fixed sequence: (1) the § 1c archival sweep runs first, (2) the R2 review
145
+ runs on the post-archival state (the findings artifact references
146
+ post-archival paths), (3) the PR is created only with a valid findings
147
+ artifact, honest-null, or skip declaration **for the current review-scope
148
+ hash** per
149
+ [`plan-review-gates § 2`](../../../docs/contracts/plan-review-gates.md).
150
+
151
+ - A completion-review artifact from the roadmap-completion event
152
+ (`agents/evidence/reviews/<slug>.findings.md`) is re-used when its
153
+ `scope:` equals the current review-scope hash — one artifact covers
154
+ both triggers. **Never compare the `diff:` sha**: it is provenance only
155
+ (§ 2.1), and § 2.0 proves that comparison unsatisfiable — committing the
156
+ artifact moves HEAD, and CI checks out a synthetic merge commit.
157
+ Otherwise dispatch a fresh review via `dispatch_r2_reviewer` (fresh
158
+ subagent, no implementation context, findings BEFORE fixes; every
159
+ finding ends `fixed` / `accepted-risk` / `deferred`).
160
+ - **Review last.** Any content commit after the review changes the scope
161
+ hash and invalidates the artifact — freeze the content, then review.
162
+ Artifacts from earlier rounds stay as audit trail under a name outside
163
+ the `*.findings.md` glob; the final round is the binding one.
164
+ - Docs-only / plan-only diffs take the explicit skip declaration, never
165
+ a silent skip.
166
+ - The agent-side check here is advisory; `check_completion_review` at
167
+ pre-push + CI is the enforcing layer (CI authoritative; advisory mode
168
+ during the Stage-A baseline window). `planning.completion_review:
169
+ false` is the settings escape hatch.
170
+
142
171
  ### 2. Generate PR content
143
172
 
144
173
  Run `/create-pr:description-only` Steps 1–4 to generate the PR title and body.
@@ -20,6 +20,22 @@ packs:
20
20
  # /roadmap create
21
21
  ## Instructions
22
22
 
23
+ ### 0. Confidence gate (Gate C)
24
+
25
+ Before anything else, run the plan-confidence gate per
26
+ [`plan-confidence-gate`](../../contexts/execution/plan-confidence-gate.md):
27
+ read `planning.challenge_on_create` (missing = `true`), do the codebase
28
+ lookup, and assess the four 95%-conditions against the seed.
29
+
30
+ - **Confident** (all four hold) → emit the single marker line and continue
31
+ with step 1.
32
+ - **Uncertain** → route into `/challenge-me vision` with the ask as seed
33
+ (inline degrade protocol when the command is unavailable); the resulting
34
+ pitch pre-fills steps 3–4, and the C→R1 handoff state is written per the
35
+ context doc so the risk-review step re-asks nothing.
36
+ - **Explicit user bypass** ("just write it") → skip the gate for this turn;
37
+ count the bypass.
38
+
23
39
  ### 1. Determine location
24
40
 
25
41
  Ask the user (in their language) where the roadmap should be created:
@@ -99,6 +115,19 @@ Show the complete roadmap to the user and ask (in their language) if anything sh
99
115
  - If yes → apply changes, show again.
100
116
  - Repeat until the user says it's done.
101
117
 
118
+ ### 5b. Risk review (Gate R1) — after draft, before save
119
+
120
+ Unless the roadmap will be saved as `status: draft`, add a
121
+ `## Risk Register` per
122
+ [`plan-review-gates § 1`](../../../docs/contracts/plan-review-gates.md):
123
+ read the C→R1 handoff state from step 0 if present (resolved branches
124
+ seed the risk list — never re-ask them), identify the highest product and
125
+ implementation risks, rank descending, write a mitigation per row, and
126
+ anchor every row to a phase/step of this roadmap. No material risks → the
127
+ exact honest-null grammar from the contract. Self-review suffices.
128
+ `lint_plan_risk_register` enforces this at pre-push + CI; drafts are
129
+ exempt until flipped to ready.
130
+
102
131
  ### 6. Save the file
103
132
 
104
133
  - Generate a filename from the title: kebab-case, e.g. `optimize-webhook-jobs.md`.
@@ -5,11 +5,11 @@ pack: meta
5
5
  tier: 2
6
6
  visibility: internal
7
7
  skills: [rule-compliance-audit]
8
- description: Audit rule trigger quality, simulate activation, detect overlaps, and find never-activating rules
8
+ description: Audit rule trigger quality, simulate activation, detect overlaps, find never-activating rules, and replay the router matcher over recent prompts (route:audit)
9
9
  suggestion:
10
10
  eligible: true
11
- trigger_description: "audit my rules, check rule trigger quality"
12
- trigger_context: "maintainer working on .augment/rules/ files"
11
+ trigger_description: "audit my rules, check rule trigger quality, routing audit — which rules fired"
12
+ trigger_context: "maintainer working on .augment/rules/ files or questioning whether rules route"
13
13
  workspaces:
14
14
  - agent-config-maintainer
15
15
  packs:
@@ -121,7 +121,27 @@ ALWAYS-RULE HEALTH
121
121
  {name}: {line_count} lines — {✅ healthy | ⚠️ large (>100 lines) | ⚠️ could be auto}
122
122
  ```
123
123
 
124
- ### 6. Summary and recommendations
124
+ ### 6. Session routing audit (deterministic; the `/routing-audit` surface)
125
+
126
+ Replay the router's ONE shared matcher over the recent session — read-only,
127
+ no LLM call, deterministic:
128
+
129
+ ```bash
130
+ agent-config route:audit --last 10 # matched rules per recent user prompt
131
+ agent-config route:explain "<prompt>" # deep trace for one prompt
132
+ agent-config route:audit --weekly # rolling 7-day recorder render
133
+ ```
134
+
135
+ Render the matched-vs-should-have-matched review: for each audited prompt,
136
+ the tool prints the matched rules + triggers; flag prompts where a rule you
137
+ would expect is absent (should-have-matched is YOUR judgment as reviewer —
138
+ the tool never computes it). Every output opens with the measurement-level
139
+ header: **trigger matching only — what the host actually invoked is NOT
140
+ measured** (ADR-126). Recording (`--record`) is opt-in via
141
+ `telemetry.routing_recorder.enabled` (default off) and stores prompt digests,
142
+ never prompt text.
143
+
144
+ ### 7. Summary and recommendations
125
145
 
126
146
  ```
127
147
  ═══════════════════════════════════════════════
@@ -152,7 +172,10 @@ Wait for user to pick which recommendations to apply.
152
172
  ## Rules
153
173
 
154
174
  - **Do NOT modify any files** until the user approves recommendations.
155
- - **Do NOT run any scripts** — this is a pure analysis command.
175
+ - **Do NOT run any scripts** — this is a pure analysis command. Sole
176
+ carve-out: the read-only routing CLI in step 6 (`route:explain` /
177
+ `route:audit`), which is deterministic and writes nothing (the opt-in
178
+ `--record` flag is the one gated exception).
156
179
  - **Be honest about uncertainty** — if a trigger might or might not match, say "might miss".
157
180
  - **Always-rules are expensive** — flag any that could safely be auto.
158
181
  - **Auto-rules that never activate are dead weight** — flag them clearly.
@@ -16,8 +16,9 @@ Outside the four below, no commit is allowed and no commit ask is allowed.
16
16
  ahead and commit". Single commit, not standing.
17
17
  2. **Standing instruction not yet revoked** — earlier "commit after
18
18
  every phase"; cache the instruction and commit per its terms.
19
- 3. **Commit command invoked** — `/commit` (split + confirm per commit)
20
- or `/commit:in-chunks` (auto-split, Hard Floor still applies).
19
+ 3. **Commit command invoked** — `/commit` (split; ONE plan confirm;
20
+ terse: invoking confirms) or `/commit:in-chunks` (auto-split, Hard
21
+ Floor still applies).
21
22
  4. **Roadmap authorization** — roadmap lists explicit commit steps and
22
23
  the user invoked roadmap execution; each commit matches a step.
23
24
 
@@ -57,9 +58,8 @@ four exceptions cover *whether* commits happen; the Hard Floor covers
57
58
  When **executing** a roadmap that contains commit steps:
58
59
 
59
60
  - **Non-autonomous mode** (`personal.autonomy: off`, or `auto`
60
- before opt-in) — agent may ask before each commit step. The user
61
- authorized commits by writing them into the roadmap, but retains
62
- step-level control.
61
+ before opt-in) — the one-shot pre-scan ask below, never per-step
62
+ (`commit-policy` NEVER-ask holds at every autonomy level).
63
63
  - **Autonomous mode** (`personal.autonomy: on`, or `auto` after
64
64
  opt-in) — agent does a quick pre-scan of the roadmap **before
65
65
  starting execution**. If commit steps are found, ask **once** at
@@ -9,6 +9,7 @@ before writing or reviewing code); this file is the catalog.
9
9
 
10
10
  | File | Topic |
11
11
  |---|---|
12
+ | `abstraction-thresholds.md` | Per-class extraction-threshold canon (code 2 · UI shell 3+ · stateful component ~4+state · utility-class string ≥3) — the single source every numeric threshold cites (ADR-213) |
12
13
  | `code-clarity.md` | Cross-language clarity rules — inline single-use values, carve-outs (side effects, loops, type narrowing, debugger) |
13
14
  | `component-oriented-and-oop-development.md` | Reuse-first components (FE) + OOP-where-it-reduces-complexity (backend); carve-out index; bounded by the anti-over-engineering anchors |
14
15
 
@@ -20,7 +20,7 @@ Make descriptions "pushy" — explicit about when to fire:
20
20
  - Name 2+ concrete triggers — domains, symptoms, file types, user phrasing.
21
21
  - End with: `... even if they don't explicitly ask for \`<skill-name>\`.`
22
22
  - Avoid hedges: `may help with`, `can be useful for`, `covers various`.
23
- - **Keep it ≤ 200 characters.** `scripts/skill_linter.ts` warns at
23
+ - **Keep it ≤ 200 characters.** `scripts/skill_linter.ts` errors at
24
24
  `description_too_long` above this. If the pushy tail pushes you over, cut
25
25
  adjectives, drop the second example phrasing, or collapse a list — do
26
26
  **not** drop the trigger vocabulary or the `even if ...` tail.
@@ -81,7 +81,12 @@ Never load full datasets into context. Extract what you need:
81
81
  - Do NOT retry the same approach hoping for a different result.
82
82
  - Do NOT loop through trial-and-error when one targeted inspection
83
83
  would reveal the cause.
84
- - Max 2 retries for the same approach — then stop and rethink.
84
+ - Max 2 retries for the same approach — then stop and rethink. The 2
85
+ retries plus the initial attempt ARE the three attempts of
86
+ `autonomous-execution`'s N=3 stop: the 3rd consecutive failure on the
87
+ same target escalates to stop-and-ask, then to `context-hygiene`'s
88
+ fresh-session recommendation — one ladder, not competing budgets
89
+ ([`autonomy-mechanics § Retry-budget escalation ladder`](../../execution/autonomy-mechanics.md)).
85
90
 
86
91
  ## Open files are context, not intent
87
92
 
@@ -53,7 +53,10 @@ command says "ask the user", you ask.
53
53
  or ask the user.
54
54
  - Max 3 diagnostic commands per error. Read the error, think, act.
55
55
  - One hypothesis at a time. Pick the most likely, try it. Fails →
56
- ask.
56
+ next hypothesis; failures on the same target accrue to the ONE
57
+ retry ladder (2 retries per approach → N=3 stop-and-ask, per
58
+ [`autonomy-mechanics § Retry-budget escalation ladder`](../../execution/autonomy-mechanics.md))
59
+ — never a separate one-strike cap.
57
60
 
58
61
  ### Keep intermediate output minimal
59
62