@event4u/agent-config 9.16.0 → 9.17.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 (135) hide show
  1. package/.claude-plugin/marketplace.json +1 -1
  2. package/AGENTS.md +1 -1
  3. package/CHANGELOG.md +53 -0
  4. package/README.md +1 -1
  5. package/dist/agent-src/commands/agent-handoff.md +100 -48
  6. package/dist/agent-src/commands/commit.md +1 -1
  7. package/dist/agent-src/commands/condense.md +19 -64
  8. package/dist/agent-src/commands/evals/agent-handoff.json +13 -1
  9. package/dist/agent-src/commands/memory/promote.md +14 -1
  10. package/dist/agent-src/commands/mode.md +9 -5
  11. package/dist/agent-src/commands/optimize/deep.md +72 -11
  12. package/dist/agent-src/contexts/authority/commit-mechanics.md +5 -5
  13. package/dist/agent-src/contexts/communication/rules-auto/guidelines-mechanics.md +1 -0
  14. package/dist/agent-src/contexts/communication/rules-auto/skill-quality-mechanics.md +1 -1
  15. package/dist/agent-src/contexts/communication/rules-auto/think-before-action-mechanics.md +6 -1
  16. package/dist/agent-src/contexts/communication/rules-auto/token-efficiency-mechanics.md +4 -1
  17. package/dist/agent-src/contexts/execution/autonomy-mechanics.md +27 -1
  18. package/dist/agent-src/contexts/execution/roadmap-process-loop.md +5 -2
  19. package/dist/agent-src/profiles/agency.yml +3 -3
  20. package/dist/agent-src/profiles/content_creator.yml +2 -2
  21. package/dist/agent-src/profiles/developer.yml +2 -2
  22. package/dist/agent-src/profiles/finance.yml +1 -1
  23. package/dist/agent-src/profiles/founder.yml +2 -2
  24. package/dist/agent-src/profiles/ops.yml +2 -2
  25. package/dist/agent-src/rules/architecture.md +2 -2
  26. package/dist/agent-src/rules/autonomous-execution.md +1 -1
  27. package/dist/agent-src/rules/context-hygiene.md +3 -2
  28. package/dist/agent-src/rules/domain-safety-pii.md +1 -1
  29. package/dist/agent-src/rules/output-discipline.md +9 -2
  30. package/dist/agent-src/rules/token-budget-discipline.md +2 -2
  31. package/dist/agent-src/rules/user-interaction.md +3 -4
  32. package/dist/agent-src/skills/build-buy-partner/SKILL.md +1 -1
  33. package/dist/agent-src/skills/copilot-agents-optimization/SKILL.md +4 -4
  34. package/dist/agent-src/skills/copilot-config/SKILL.md +1 -1
  35. package/dist/agent-src/skills/deep-reading-analyst/SKILL.md +7 -4
  36. package/dist/agent-src/skills/description-assist/SKILL.md +1 -1
  37. package/dist/agent-src/skills/fe-design/SKILL.md +1 -1
  38. package/dist/agent-src/skills/market-entry-analysis/SKILL.md +1 -1
  39. package/dist/agent-src/skills/persona-writing/SKILL.md +2 -2
  40. package/dist/agent-src/skills/readme-reviewer/SKILL.md +2 -1
  41. package/dist/agent-src/skills/rule-writing/SKILL.md +4 -2
  42. package/dist/agent-src/skills/skill-reviewer/SKILL.md +1 -1
  43. package/dist/agent-src/skills/skill-writing/SKILL.md +2 -2
  44. package/dist/agent-src/skills/tailwind-engineer/SKILL.md +3 -1
  45. package/dist/agent-src/skills/token-optimizer/SKILL.md +2 -2
  46. package/dist/agent-src/skills/ui-component-architect/SKILL.md +6 -3
  47. package/dist/agent-src/templates/agent-settings.md +13 -15
  48. package/dist/agent-src/templates/agents/agent-project-settings.example.yml +6 -2
  49. package/dist/agent-src/templates/persona.md +2 -2
  50. package/dist/agent-src/templates/roadmaps.md +1 -1
  51. package/dist/agent-src/templates/rule.md +1 -1
  52. package/dist/agent-src/templates/skill.md +1 -1
  53. package/dist/cli/registry.js +1 -0
  54. package/dist/cli/registry.js.map +1 -1
  55. package/dist/cli-delegate/{chunk-ZXXJLL5K.js → chunk-BSLUHV2F.js} +127 -1487
  56. package/dist/cli-delegate/{chunk-H574KOUH.js → chunk-IMSXPRVH.js} +24 -1
  57. package/dist/cli-delegate/chunk-VSYT7OHO.js +1382 -0
  58. package/dist/cli-delegate/chunk-XGA2NTU4.js +3727 -0
  59. package/dist/cli-delegate/cmd_conformance.js +4 -3
  60. package/dist/cli-delegate/cmd_converge.js +3 -3
  61. package/dist/cli-delegate/cmd_doctor.js +3 -2
  62. package/dist/cli-delegate/cmd_export.js +4 -4
  63. package/dist/cli-delegate/cmd_handoff.js +3194 -0
  64. package/dist/cli-delegate/cmd_memory_get.js +35 -3754
  65. package/dist/cli-delegate/cmd_migrate.js +2 -2
  66. package/dist/cli-delegate/cmd_prune.js +4 -4
  67. package/dist/cli-delegate/cmd_settings_migrate.js +4 -4
  68. package/dist/cli-delegate/cmd_sync.js +4 -4
  69. package/dist/cli-delegate/cmd_uninstall.js +4 -4
  70. package/dist/cli-delegate/cmd_update.js +3 -3
  71. package/dist/cli-delegate/cmd_upgrade.js +3 -3
  72. package/dist/cli-delegate/cmd_validate.js +4 -4
  73. package/dist/cli-delegate/cmd_versions.js +3 -3
  74. package/dist/discovery/deprecation-report.md +1 -1
  75. package/dist/discovery/discovery-manifest.json +31 -31
  76. package/dist/discovery/discovery-manifest.json.sha256 +1 -1
  77. package/dist/discovery/discovery-manifest.summary.md +1 -1
  78. package/dist/discovery/orphan-report.md +1 -1
  79. package/dist/discovery/packs.json +2 -2
  80. package/dist/discovery/trust-report.md +1 -1
  81. package/dist/discovery/workspaces.json +2 -2
  82. package/dist/hooks/dispatch.js +602 -507
  83. package/dist/install/install.mjs +23 -0
  84. package/dist/mcp/awesome-mcp-servers.row.md +1 -1
  85. package/dist/mcp/mcp-cloudflare-catalogue.json +2 -2
  86. package/dist/mcp/registry-manifest.json +4 -4
  87. package/dist/mcp/server.json +2 -2
  88. package/dist/mcp/server.mjs +25 -3
  89. package/dist/scripts/_lib/agent_src.js +39 -6
  90. package/dist/scripts/_lib/agent_src.js.map +1 -1
  91. package/dist/server/schemas/settings.js +13 -0
  92. package/dist/server/schemas/settings.js.map +1 -1
  93. package/docs/guidelines/abstraction-thresholds.md +53 -0
  94. package/docs/guidelines/agent-infra/agent-interaction-and-decision-quality.md +1 -1
  95. package/docs/guidelines/agent-infra/asking-and-brevity-examples.md +7 -0
  96. package/docs/guidelines/agent-infra/context-hygiene-mechanics.md +2 -2
  97. package/docs/guidelines/agent-infra/minimal-safe-diff-mechanics.md +5 -3
  98. package/docs/guidelines/agent-infra/size-and-scope.md +8 -2
  99. package/docs/guidelines/component-oriented-and-oop-development.md +11 -6
  100. package/docs/guidelines/docs/readme-size-and-splitting.md +5 -2
  101. package/llms.txt +1 -0
  102. package/package.json +1 -1
  103. package/src/config/agent-settings.template.yml +22 -0
  104. package/src/config/evaluator-budgets.json +8 -11
  105. package/src/config/gate-coverage.yml +30 -0
  106. package/src/scripts/_cli/cmd_handoff.ts +405 -0
  107. package/src/scripts/_cli/handoff_generate.ts +453 -0
  108. package/src/scripts/_cli/handoff_sessions.ts +435 -0
  109. package/src/scripts/_dispatch.bash +9 -0
  110. package/src/scripts/_lib/agent_src.ts +36 -6
  111. package/src/scripts/_lib/release_material.ts +156 -0
  112. package/src/scripts/check_condensation.ts +2 -1
  113. package/src/scripts/check_finding_dispositions.ts +278 -0
  114. package/src/scripts/check_pack_size.ts +4 -3
  115. package/src/scripts/check_references.ts +1 -0
  116. package/src/scripts/check_release_highlights.ts +300 -0
  117. package/src/scripts/check_release_pr_shape.ts +4 -0
  118. package/src/scripts/check_release_surface_equality.ts +132 -0
  119. package/src/scripts/check_reply_consistency.ts +187 -138
  120. package/src/scripts/handoff_context_hook.ts +148 -0
  121. package/src/scripts/hook_manifest.yaml +17 -7
  122. package/src/scripts/hooks/concern_registry.ts +2 -0
  123. package/src/scripts/lint_abstraction_thresholds.ts +325 -0
  124. package/src/scripts/lint_framework_leakage_allowlist.json +2 -2
  125. package/src/scripts/lint_profile_personas.ts +153 -0
  126. package/src/scripts/lint_token_budget_discipline.ts +148 -0
  127. package/src/scripts/release.ts +156 -32
  128. package/src/scripts/release_drill.ts +491 -0
  129. package/src/scripts/schemas/command.schema.json +33 -0
  130. package/src/scripts/self_review_gate.ts +41 -3
  131. package/src/scripts/skill_linter.ts +3 -1
  132. package/src/scripts/smoke/router.sh +1 -1
  133. package/src/scripts/update_counts.ts +60 -12
  134. package/src/server/schemas/settings.ts +23 -0
  135. package/dist/cli-delegate/{chunk-XX6TOPD7.js → chunk-WR6GTRHJ.js} +3 -3
@@ -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
 
@@ -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
 
@@ -14,7 +14,10 @@ relevant. Detection logic lives in [`autonomy-detection.md`](autonomy-detection.
14
14
 
15
15
  The value is read once on the first turn (per
16
16
  [`layered-settings`](../../../docs/guidelines/agent-infra/layered-settings.md#section-aware-merge-rules))
17
- and cached. Missing key → treat as `on`.
17
+ and cached. Missing key → treat as `auto` (fail-closed — same behavior
18
+ as the shipped template default; absence of a key never grants the most
19
+ permissive mode). The one exception is the explicit cloud carve-out
20
+ below, where the whole settings file is absent by construction.
18
21
 
19
22
  ## Cloud platforms — settings degrade to `on`
20
23
 
@@ -129,6 +132,29 @@ knob. The per-dimension uncertainty score (see
129
132
  [`notes-first-reasoning`](../../rules/notes-first-reasoning.md)) feeds this
130
133
  decision. Engage per [`rdp-gate`](rdp-gate.md).
131
134
 
135
+ ## Retry-budget escalation ladder — 2, 3, and the fresh session are ONE ladder
136
+
137
+ The suite states three retry numbers; they are **stages of one escalation
138
+ ladder on the same failing target**, not competing budgets:
139
+
140
+ 1. **Attempt 1 fails → up to 2 retries of the same approach**
141
+ ([`think-before-action`](../../rules/think-before-action.md) "MAX 2
142
+ RETRIES PER APPROACH") — the soft, agent-side stage: rethink between
143
+ attempts, switch approach when the same signature repeats
144
+ ([`context-hygiene`](../../rules/context-hygiene.md) "same failure
145
+ signature twice → pivot").
146
+ 2. **The 3rd consecutive failed attempt on the target trips N=3**
147
+ (this file, above): 2 retries + the initial attempt ARE the three
148
+ attempts N=3 counts. Terminal action: STOP, surface the attempts,
149
+ ask the user.
150
+ 3. **Repeated N=3 cycles on the same task** escalate to
151
+ [`context-hygiene`](../../rules/context-hygiene.md)'s 3-Failure Rule:
152
+ state dump + recommend a fresh session.
153
+
154
+ No artifact may mint a fourth budget or a stricter one-strike cap for the
155
+ same subject; per-tool loop caps (`token-efficiency` >2 same-tool calls)
156
+ are a different subject (tool-call repetition, not fix attempts).
157
+
132
158
  **Concrete diminishing-returns stop-signal.** "Marginal evidence drops" is
133
159
  otherwise fuzzy; operationalize it so it is checkable, not vibes: when **two
134
160
  consecutive investigative probes** (a read, a grep, a query) yield **no new
@@ -127,8 +127,11 @@ only: lines matching `commit:` / `git commit` / `Commit phase`.
127
127
  Cache the answer for the whole run; do **not** re-ask per step.
128
128
  Hard-Floor diffs (bulk deletions, infra) still trigger the
129
129
  per-commit gate from [`commit-mechanics`](../authority/commit-mechanics.md).
130
- - **Commit steps present, non-autonomous** → ask before each commit
131
- step inside the loop.
130
+ - **Commit steps present, non-autonomous** → same one-shot pre-scan
131
+ ask as above, before the run starts; never per step
132
+ (per [`commit-mechanics`](../authority/commit-mechanics.md) —
133
+ `commit-policy` § NEVER ask about committing holds regardless of
134
+ autonomy).
132
135
 
133
136
  ## 4. Resolve cadences — read once, cache for the run
134
137
 
@@ -17,9 +17,9 @@ profile:
17
17
  defaults:
18
18
  preset_id: strict
19
19
  personas:
20
- - reviewer
21
- - product-strategist
22
- - editor
20
+ - qa
21
+ - product-owner
22
+ - tech-writer
23
23
  skills_hint:
24
24
  - doc-coauthoring
25
25
  - decision-record
@@ -12,8 +12,8 @@ profile:
12
12
  defaults:
13
13
  preset_id: balanced
14
14
  personas:
15
- - editor
16
- - brand-voice
15
+ - tech-writer
16
+ - brand-strategist
17
17
  skills_hint:
18
18
  - voice-and-tone-design
19
19
  - messaging-architecture
@@ -13,8 +13,8 @@ profile:
13
13
  defaults:
14
14
  preset_id: balanced
15
15
  personas:
16
- - reviewer
17
- - security
16
+ - qa
17
+ - security-engineer
18
18
  skills_hint:
19
19
  - developer-like-execution
20
20
  - verify-completion-evidence
@@ -15,7 +15,7 @@ profile:
15
15
  preset_id: strict
16
16
  personas:
17
17
  - finance-partner
18
- - reviewer
18
+ - qa
19
19
  skills_hint:
20
20
  - dcf-modeling
21
21
  - forecasting
@@ -16,8 +16,8 @@ profile:
16
16
  defaults:
17
17
  preset_id: fast
18
18
  personas:
19
- - product-strategist
20
- - reviewer
19
+ - strategist
20
+ - qa
21
21
  skills_hint:
22
22
  - refine-prompt
23
23
  - rice-prioritization
@@ -16,8 +16,8 @@ profile:
16
16
  defaults:
17
17
  preset_id: strict
18
18
  personas:
19
- - reviewer
20
- - security
19
+ - qa
20
+ - security-engineer
21
21
  skills_hint:
22
22
  - incident-commander
23
23
  - dashboard-design
@@ -31,7 +31,7 @@ Fires on new files, classes, controllers, modules, or any structural decision ab
31
31
  - **Business logic lives in services / use-cases** — calculations, orchestration, cross-aggregate validation.
32
32
  - **Domain models stay behavior-rich but I/O-free** — no HTTP, no DB transactions in the model; only domain rules, relationships, derived properties.
33
33
  - Always check the existing directory structure before creating new files.
34
- - Respect existing patterns — apply modern standards to **new** code only.
34
+ - Respect existing patterns — apply modern standards to **new** code only. Stale idioms in *existing* code you touch are governed by the [`active-remediation`](active-remediation.md) ladder (fix-now / note + ask), not by this line.
35
35
 
36
36
  → Laravel-specific patterns (FormRequest, single-action `__invoke`, Eloquent scopes): see [`laravel`](../skills/laravel/SKILL.md), [`laravel-validation`](../skills/laravel-validation/SKILL.md).
37
37
  → Symfony: see [`symfony-workflow`](../skills/symfony-workflow/SKILL.md).
@@ -40,7 +40,7 @@ Fires on new files, classes, controllers, modules, or any structural decision ab
40
40
  ## Reusable components + object-oriented design
41
41
 
42
42
  - **Think in reusable units** — decompose UI into composable components; reuse the project's primitives / shared abstractions before building; extract a new unit only when the same shape repeats (audit existing first, per [`ui-audit-gate`](ui-audit-gate.md)).
43
- - **Object-oriented where it reduces complexity** — in an object-oriented / class-based codebase, encapsulation, single responsibility, composition over inheritance, behavior-rich domain objects, and design patterns *where they earn their place* are the high-priority default — never speculative abstraction, and never imposed on a functional / pipeline codebase (detect + defer to its paradigm). Bounded by [`minimal-safe-diff`](minimal-safe-diff.md) + [`senior-engineering-discipline`](senior-engineering-discipline.md), which **win on conflict**: a reviewer should be able to name the concrete duplication or second axis of change the abstraction removes (rule of thumb: two real repetitions before you extract).
43
+ - **Object-oriented where it reduces complexity** — in an object-oriented / class-based codebase, encapsulation, single responsibility, composition over inheritance, behavior-rich domain objects, and design patterns *where they earn their place* are the high-priority default — never speculative abstraction, and never imposed on a functional / pipeline codebase (detect + defer to its paradigm). Bounded by [`minimal-safe-diff`](minimal-safe-diff.md) + [`senior-engineering-discipline`](senior-engineering-discipline.md), which **win on conflict**: a reviewer should be able to name the concrete duplication or second axis of change the abstraction removes (rule of thumb: two real repetitions before you extract a **code-level** abstraction; UI classes carry deliberately higher bars — per-class canon: [`abstraction-thresholds`](../docs/guidelines/abstraction-thresholds.md)).
44
44
 
45
45
  Full standard — split FE / backend, with the stack carve-out index and the anti-over-engineering deference: [`component-oriented-and-oop-development`](../docs/guidelines/component-oriented-and-oop-development.md).
46
46
 
@@ -25,7 +25,7 @@ The universal safety floor (production-branch merges, deploys, pushes, prod data
25
25
 
26
26
  ## Setting — `personal.autonomy`
27
27
 
28
- Three values: `on` (suppress trivial questions), `off` (ask trivial questions too), `auto` (default — same as `off` until the user opts in via a standing autonomy directive). Read once on the first turn and cache. Missing key → treat as `on`. Full table, semantics, and cloud behavior: [`contexts/execution/autonomy-mechanics.md`](../contexts/execution/autonomy-mechanics.md).
28
+ Three values: `on` (suppress trivial questions), `off` (ask trivial questions too), `auto` (default — same as `off` until the user opts in via a standing autonomy directive). Read once on the first turn and cache. Missing key → treat as `auto` (fail-closed, same as the shipped default; only the explicit cloud carve-out — no settings file at all — degrades to `on`). Full table, semantics, and cloud behavior: [`contexts/execution/autonomy-mechanics.md`](../contexts/execution/autonomy-mechanics.md).
29
29
 
30
30
  ## Opt-in detection — match by intent, not exact string
31
31
 
@@ -18,7 +18,7 @@ enforced_by:
18
18
 
19
19
  > **Enforced by:** [`scripts/context_hygiene_hook.ts`](../../scripts/context_hygiene_hook.ts)
20
20
  > on Augment + Claude Code (`PostToolUse`). The hook maintains
21
- > `agents/runtime/state/context-hygiene.json` (turn count, loop signal,
21
+ > `agents/state/context-hygiene.json` (tool-call count, loop signal,
22
22
  > freshness milestones at 20/40/60); the prose below is the spec the
23
23
  > hook implements and the agent-side fallback.
24
24
 
@@ -30,7 +30,8 @@ Monitor for **context decay** — long conversations degrade quality and waste t
30
30
  re-reading files already in context · 15+ completed tasks and a new unrelated
31
31
  topic · branch changed since start · ~24 hours passed.
32
32
 
33
- **Repeat** at multiples: messages 20/40/60, tasks 15/30/45.
33
+ **Repeat** at multiples: messages 20/40/60, tasks 15/30/45 (the task
34
+ 15/30/45 ladder is agent-side only — the hook tracks no task counter).
34
35
  **ONLY at exact thresholds.** Between: silence. Suggestion template
35
36
  (token-cost estimate + numbered options): the mechanics guideline below.
36
37
 
@@ -127,7 +127,7 @@ k-anonymity rule of thumb: combinations of {birth date, ZIP/postal code, gender}
127
127
  | Internal analyst, BYO-device, cloud analytics | Pseudonymized + aggregated only |
128
128
  | External partner, signed DPA | Pseudonymized + minimum-necessary columns |
129
129
  | External partner, no DPA | Refuse; require DPA first |
130
- | Public dataset | Aggregated, k-anonymity ≥ 5, no quasi-identifier combos |
130
+ | Public dataset | Aggregated, k-anonymity ≥ 5 as the release floor, no quasi-identifier combos — a stricter bar (k ≥ 50) applies before *classifying* a metric as anonymous, per [`data-handling-judgment`](../skills/data-handling-judgment/SKILL.md) |
131
131
 
132
132
  ## Surface 4 — Legal privilege markers (legal pack)
133
133
 
@@ -42,8 +42,15 @@ in a broken state:
42
42
  | `[Your component here]` / `<YourComponentName>` | Use the actual component name or write the component |
43
43
  | `Lorem ipsum` / `dolor sit amet` in UI output intended for review | Use realistic placeholder content or ask for content |
44
44
 
45
- The banned patterns above are also detected by `lint_output_slop.ts` (see
46
- `src/scripts/lint_output_slop.ts`) — violations cause a CI exit-code-2.
45
+ A subset of the banned patterns is detected by `lint_output_slop.ts` (see
46
+ `src/scripts/lint_output_slop.ts`) — Lorem-ipsum filler, bracket placeholders,
47
+ `// rest of component` / `// ... (unchanged)`-style implementation
48
+ placeholders, "for brevity" in code, standalone Unicode `…` lines, and
49
+ `// TODO … implement` stubs — violations cause a CI exit-code-2. Three rows
50
+ are NOT linter-detected (`/* similar pattern */`, `// rest follows same
51
+ pattern`, ASCII `...`), and the linter scans only the suite's authored
52
+ markdown (`src/skills/`, `src/rules/`, `docs/guidelines/`) as a backstop; for
53
+ generated output the ban itself is model-carried.
47
54
 
48
55
  ## On budget overflow — PAUSED protocol
49
56
 
@@ -50,8 +50,8 @@ A skill claiming `rich` MUST satisfy ALL three:
50
50
  carry a `load_context` pointer instead.
51
51
 
52
52
  3. **≤ 15 % of the suite's skills may claim `rich`** — the CI linter counts
53
- rich-tagged skills and hard-fails if the ratio is exceeded. With ~230 skills, the
54
- cap is ~35. Do not claim `rich` for convenience; claim it only for
53
+ rich-tagged skills and hard-fails if the ratio is exceeded. With ~290 skills
54
+ (288 as-of 2026-08), the cap is ~43. Do not claim `rich` for convenience; claim it only for
55
55
  irreducible-complexity skills.
56
56
 
57
57
  ## Telegraph-speak amendment
@@ -46,12 +46,11 @@ Mechanical backstop:
46
46
  (non-zero exit on any rule below). Self-scan is the primary gate;
47
47
  the script is the deterministic safety net.
48
48
 
49
- ## Question pacing — simple vs complex
49
+ ## Question pacing — one decision point per turn
50
50
 
51
- - **Simple, binary, or independent questions** may be grouped into a single reply with numbered options.
52
- - **Complex, dependent, or branching questions** must be asked **one at a time** — one question per turn — so each answer informs the next.
51
+ [`ask-when-uncertain`](ask-when-uncertain.md)'s Iron Law is canonical: **one question per turn**. What counts as "one question" is **one decision point** — a single numbered-options block is ONE question even when its options span multiple dimensions (a depth-and-framework matrix answered with a single number is one decision). Multiple separate asks in one reply, or a block whose answer would need a structured reply (`1a, 2b`), violate the kernel rule's self-check.
53
52
 
54
- If in doubt, prefer one question at a time over a long batched prompt.
53
+ If in doubt, split into serial turns — never a long batched prompt.
55
54
 
56
55
  ## Mechanics — rationale, failure modes, format details, examples
57
56
 
@@ -70,7 +70,7 @@ Integration cost is the most under-counted number. For each option:
70
70
  2. **Buy** — vendor integration (weeks to first value) + ongoing change-management cost + lock-in (cost to switch off).
71
71
  3. **Partner** — boundary management + divergence cost (what happens when partner changes their roadmap?).
72
72
 
73
- A buy decision with 2-week integration is rare; budget 4–8 weeks for non-trivial integrations and 3–6 months for enterprise-grade ones.
73
+ A buy decision with 2-week integration is rare; industry-typical ranges (public integration benchmarks — not a prediction of your timeline, per `direct-answers` § no duration estimates) run 4–8 weeks for non-trivial integrations and 3–6 months for enterprise-grade ones.
74
74
 
75
75
  ### Step 3: Inversion — name the failure mode for each option
76
76
 
@@ -47,7 +47,7 @@ Only after this analysis, proceed with optimization.
47
47
  |---|---|
48
48
  | **Audience** | Augment Agent, other AI agents |
49
49
  | **Can read `.augment/`?** | ✅ Yes — can follow references |
50
- | **Line budget** | Max 1000, ideal ≤ 500 |
50
+ | **Size budget** | ≤ 3,000 chars (package root; consumer template ≤ 2,500) — enforced by `lint_agents_md.ts`; see `size-and-scope.md` |
51
51
  | **Purpose** | Project-specific setup, Docker, testing, quality tools |
52
52
 
53
53
  **What belongs here:**
@@ -73,7 +73,7 @@ Only after this analysis, proceed with optimization.
73
73
  |---|---|
74
74
  | **Audience** | GitHub Copilot (Code Review bot + Chat) |
75
75
  | **Can read `.augment/`?** | ❌ Code Review cannot, ✅ Chat can |
76
- | **Line budget** | Max 1000, ideal ≤ 500 |
76
+ | **Line budget** | < 150 lines (ideal < 60); Copilot Code Review reads only the first 4,000 chars |
77
77
  | **Purpose** | Coding standards, review rules, architecture constraints |
78
78
 
79
79
  **What belongs here:**
@@ -127,8 +127,8 @@ both. Instead, reference with a table:
127
127
 
128
128
  | File | 🟢 Good | 🟡 Warning | 🔴 Over budget |
129
129
  |---|---|---|---|
130
- | `AGENTS.md` | ≤ 500 | 501–800 | > 1000 |
131
- | `copilot-instructions.md` | ≤ 500 | 501–800 | > 1000 |
130
+ | `AGENTS.md` | ≤ 2,800 chars | 2,801–3,000 chars | > 3,000 chars — `lint_agents_md.ts` fails (consumer template: warn 2,300 / fail 2,500) |
131
+ | `copilot-instructions.md` | < 60 lines | 60–150 lines | > 150 lines, or key rules past the 4,000-char Copilot read window |
132
132
 
133
133
  ### Reduction strategies (when over budget)
134
134
 
@@ -197,7 +197,7 @@ Copilot and Augment complement each other:
197
197
 
198
198
  - copilot-instructions.md is for GitHub Copilot, NOT for Augment — don't mix audiences.
199
199
  - Don't duplicate .augment/ content into copilot-instructions.md — it bloats the file and causes drift.
200
- - Copilot reads the ENTIRE instructions file on every request — keep it under 500 lines.
200
+ - Keep copilot-instructions.md under 150 lines (per `size-and-scope.md`) — Copilot Code Review reads only the first 4,000 characters, so put the highest-priority rules up top.
201
201
 
202
202
  ## Do NOT
203
203
 
@@ -49,11 +49,14 @@ Every framework module is a project-local guideline under `docs/guidelines/agent
49
49
 
50
50
  ### Step 1: Initialize Analysis
51
51
 
52
- Ask the user three things in **one** message (not three turns), per `ask-when-uncertain` Iron Law (one question per turn — these three are bundled into a single numbered-options block):
52
+ Open with ONE decision point (per `ask-when-uncertain` — a single numbered-options block answerable with a single number is one question; never three separate asks):
53
53
 
54
- 1. **Goal** — problem-solving · learning · writing · decision-making · curiosity.
55
- 2. **Depth** — L1 Quick (15 min) · L2 Standard (30 min) · L3 Deep (60 min) · L4 Research (120 min+).
56
- 3. **Framework override** — defaults are auto-suggested by content type (table below); user may name specific frameworks.
54
+ 1. **Standard read** — L2 depth, auto-selected frameworks (default).
55
+ 2. **Quick skim** — L1 depth, auto-selected frameworks.
56
+ 3. **Deep dive** — L3/L4 depth, auto-selected frameworks.
57
+ 4. **Custom** — name your goal (problem-solving · learning · writing · decision-making · curiosity), depth level, and/or specific frameworks in your reply.
58
+
59
+ Depth levels are scope descriptors, not wall-clock promises (per `direct-answers` — no duration estimates): L1 skim · L2 standard · L3 deep · L4 exhaustive-research.
57
60
 
58
61
  If the user does not answer, default to L2 Standard with auto-selected frameworks.
59
62
 
@@ -52,7 +52,7 @@ Normative source: [`skill-quality`](../../rules/skill-quality.md) § *Descriptio
52
52
 
53
53
  | Check | Pass when… |
54
54
  |---|---|
55
- | **Length** | ≤ 200 characters (soft cap; linter warns `description_too_long`) |
55
+ | **Length** | ≤ 200 characters (hard cap; linter errors `description_too_long`) |
56
56
  | **Trigger prefix** | Starts with "Use when …" or equivalent trigger phrasing |
57
57
  | **Trigger classes** | Names ≥ 2 of: domain, symptom, user phrasing, tool, file type |
58
58
  | **Undertrigger tail** | Ends with "… even if the user doesn't say `{name}`" or equivalent |
@@ -107,7 +107,7 @@ React island vs. Vue SFC) is the apply-step's concern, not this skill's.
107
107
  - **One stateful component per concern** — don't build mega-components.
108
108
  - **Compose with reusable UI components** for shared shells, headers, fields.
109
109
  - **Use the project's library primitives first** — never rebuild what the design system already provides (audit findings tell you which).
110
- - **Extract when used 3+ times** — DRY applies to UI too.
110
+ - **Extract a props-only UI shell when used 3+ times** — DRY applies to UI too; stateful components carry a higher bar (~4 + real state) — per-class canon: [`abstraction-thresholds`](../../../docs/guidelines/abstraction-thresholds.md).
111
111
  - **Component workshop when the project is large enough** — for a real, growing shared-component library, isolate and document each reusable component in a component workshop so it stays discoverable and reused, not re-invented; skip it for a small surface of one-offs. Tool-specific setup is a carve-out (Storybook et al.) — see the implementation skill (e.g. [`react-shadcn-ui`](../react-shadcn-ui/SKILL.md) § Component workshop), never a generic mandate.
112
112
 
113
113
  ## Form Design
@@ -144,7 +144,7 @@ Horizontal SaaS, US-only, mid-market, considering EU expansion.
144
144
 
145
145
  - Step 0 — axis = geo (EU). Defer segment (stay mid-market) and vertical (stay horizontal).
146
146
  - Step 1 — candidate beachheads: DACH, Nordics, UK, Benelux. Scored: UK wins on constraint-favour (English-language sales motion translates, common-law contract familiarity), reference-reachability (5 mid-market UK customers reachable via existing channels), regulatory delta (UK-GDPR ≈ EU-GDPR floor with thinner data-residency requirement), expansion path (UK → Benelux → DACH).
147
- - Step 2 — Sales motion: existing AE motion translates to UK. Product delta: data-residency in EU (12 weeks). Operating cost: UK Ltd entity, VAT registration ≈ 3 months.
147
+ - Step 2 — Sales motion: existing AE motion translates to UK. Product delta: data-residency in EU (industry-typical ~12 weeks, illustrative). Operating cost: UK Ltd entity, VAT registration (industry-typical ≈ 3 months, illustrative — not a prediction).
148
148
  - Step 3 — failure mode: "incumbent's UK channel partnerships locked us out of mid-market." Mitigation: direct-AE motion + content-led pipeline.
149
149
  - Step 4 — sequence: UK (beachhead) → Benelux (same motion, thin regulatory delta) → DACH (German-speaking sales hire required, larger TAM).
150
150
  - Step 5 — emit entry plan + compose P3 for UK-vs-incumbents positioning.
@@ -107,8 +107,8 @@ A single Markdown file at `src/agent-src/personas/{id}.md`:
107
107
  3. `## Unique questions` — 4–7 decidable questions
108
108
  4. `## Output expectations` — verdict format, severity vocabulary
109
109
 
110
- Length: ≤ 80 lines for a tier-core persona; longer signals the focus
111
- is too broad.
110
+ Length: ≤ 120 lines for a tier-core persona (specialists ≤ 100; wings
111
+ 3–4: ≤ 140); longer signals the focus is too broad.
112
112
 
113
113
  ## Gotchas
114
114
 
@@ -132,7 +132,8 @@ Size checks:
132
132
  - **< 150 lines** — healthy
133
133
  - **150–300 lines** — expect a Table of Contents; flag if missing
134
134
  - **300–500 lines** — flag as overloaded; deep content should be in `/docs/`
135
- - **> 500 lines** — flag as broken entry point; hard split required
135
+ - **> 500 lines** — flag as broken entry point; split strongly recommended
136
+ - The enforced lint limit is **750 lines** (`lint_readme_size.ts` fails above it); the 150/300/500 bands are editorial
136
137
 
137
138
  Structure checks:
138
139
 
@@ -66,7 +66,9 @@ don't need it, it is `auto`.
66
66
  ### 2. Write a trigger-style description
67
67
 
68
68
  The `description` field **is** the trigger. Describe **when** the rule
69
- applies, not **what** it contains. Soft cap: **200 characters**.
69
+ applies, not **what** it contains. Hard cap: **200 characters** (the
70
+ linter errors `description_too_long` above it); the rule schema
71
+ (`rule.schema.json`) additionally sets `maxLength: 190`.
70
72
 
71
73
  ```yaml
72
74
  # Bad — describes content, won't match reliably:
@@ -185,7 +187,7 @@ diffing the full lint output. See
185
187
  ```yaml
186
188
  ---
187
189
  type: "auto" # or "always"
188
- description: "Trigger-shaped sentence — domain + symptoms — soft cap 200 chars"
190
+ description: "Trigger-shaped sentence — domain + symptoms — schema max 190 chars"
189
191
  alwaysApply: false # true only if type: always
190
192
  source: package # or project for consumer-local rules
191
193
  load_context: # logical names only — `contexts/<area>/<file>.md`
@@ -90,7 +90,7 @@ The highest-signal content in a skill. Documents failure patterns.
90
90
 
91
91
  Skill exceeds size limits (see `docs/guidelines/agent-infra/size-and-scope.md`).
92
92
 
93
- **Check:** Review at >300 lines. Strongly consider split at >1200 words / >1500 words.
93
+ **Check:** Review at >400 lines. Strongly consider split at >1200 words / >1500 words.
94
94
  **Fix:** Extract reference tables, templates, and examples into separate files
95
95
  in the skill folder, or split by responsibility.
96
96
 
@@ -158,8 +158,8 @@ generic descriptions cause **undertriggering**. Normative source:
158
158
 
159
159
  Three rules: name 2+ triggers (domains, symptoms, user phrasing), end with
160
160
  `... even if they don't explicitly ask for \`<skill-name>\`.`, and stay
161
- **≤ 200 characters** (`skill_linter.ts` warns `description_too_long` above
162
- that). When trimming to fit, drop adjectives or the second example phrasing
161
+ **≤ 200 characters** (`skill_linter.ts` errors `description_too_long` above
162
+ that — a hard cap). When trimming to fit, drop adjectives or the second example phrasing
163
163
  before you drop a trigger class or the `even if ...` tail.
164
164
 
165
165
  Canonical before/after (2026-04-21 audit baseline):