@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
@@ -0,0 +1,227 @@
1
+ # fe-design — design patterns
2
+
3
+ > Section-level entry point of the `fe-design` skill (progressive
4
+ > disclosure, 2026-08-04). Content moved VERBATIM from SKILL.md —
5
+ > load this file when the section index in SKILL.md routes here.
6
+
7
+ ## Component Architecture
8
+
9
+ ### Page structure (universal shape)
10
+
11
+ ```
12
+ Page layout
13
+ ├── Header (static)
14
+ ├── Navigation (interactive — active state)
15
+ ├── Content area
16
+ │ ├── Page heading + actions (static)
17
+ │ ├── Filters (interactive — reactive)
18
+ │ ├── Data display (interactive — table / cards)
19
+ │ └── Pagination (interactive)
20
+ └── Footer (static)
21
+ ```
22
+
23
+ The stack-specific mapping (Blade partial vs. Livewire component vs.
24
+ React island vs. Vue SFC) is the apply-step's concern, not this skill's.
25
+
26
+ ### When to use what (kind, not framework)
27
+
28
+ | Kind | When | Example |
29
+ |---|---|---|
30
+ | **Static partial** | No interactivity, server-rendered only | Header, footer, static info |
31
+ | **Reusable UI component** | Props-only, no state | Button, badge, card shell |
32
+ | **Stateful component** | Needs server interaction or local state | Forms, tables, filters |
33
+ | **Library primitive** | Standard UI from a design system | Modal, dropdown, input, toast |
34
+ | **Client-only micro-interaction** | No server roundtrip needed | Toggle, accordion, clipboard |
35
+
36
+ ### Component granularity
37
+
38
+ - **One stateful component per concern** — don't build mega-components.
39
+ - **Compose with reusable UI components** for shared shells, headers, fields.
40
+ - **Use the project's library primitives first** — never rebuild what the design system already provides (audit findings tell you which).
41
+ - **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).
42
+ - **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.
43
+
44
+ ## Form Design
45
+
46
+ ### Principles
47
+
48
+ 1. **Labels always visible** — no placeholder-only inputs
49
+ 2. **Validation on blur + submit** — immediate feedback, not on every keystroke
50
+ 3. **Error messages below the field** — red text, specific message
51
+ 4. **Required fields marked** — asterisk (*) or "(required)" label
52
+ 5. **Logical grouping** — related fields in sections with headings
53
+ 6. **Primary action prominent** — submit button stands out, cancel is secondary
54
+
55
+ ### Layout patterns
56
+
57
+ | Fields | Layout | When |
58
+ |---|---|---|
59
+ | 1–3 fields | Single column | Simple forms (login, search) |
60
+ | 4–8 fields | Two columns on desktop, single on mobile | Standard CRUD forms |
61
+ | 8+ fields | Sections with headings or tabs/steps | Complex entity forms |
62
+ | Related pairs | Side by side (first/last name, city/zip) | Logically paired fields |
63
+
64
+ ### Multi-step forms
65
+
66
+ ```
67
+ Step indicator (1 — 2 — 3)
68
+ ├── Step 1: Basic info → Next
69
+ ├── Step 2: Details → Back / Next
70
+ └── Step 3: Review + Submit → Back / Submit
71
+ ```
72
+
73
+ - Show progress indicator (step numbers or progress bar)
74
+ - Allow going back without losing data
75
+ - Validate each step before allowing next
76
+ - Show summary on final step
77
+
78
+ ## Table Design
79
+
80
+ ### Principles
81
+
82
+ 1. **Right-align numbers** — easier to compare
83
+ 2. **Left-align text** — natural reading direction
84
+ 3. **Sortable columns** — click header to sort
85
+ 4. **Sticky header** — visible when scrolling long tables
86
+ 5. **Row actions** — edit/delete as icon buttons or dropdown menu
87
+ 6. **Empty state** — helpful message when no data, not just blank
88
+
89
+ ### Responsive tables
90
+
91
+ | Screen | Strategy |
92
+ |---|---|
93
+ | Desktop (≥1024px) | Full table with all columns |
94
+ | Tablet (768–1023px) | Hide less important columns |
95
+ | Mobile (<768px) | Card layout or horizontal scroll |
96
+
97
+ ### Pagination
98
+
99
+ - Default: 25 rows per page
100
+ - Show total count: "Showing 1–25 of 142"
101
+ - Allow page size change (10, 25, 50, 100)
102
+ - Prefer server-side pagination — avoid loading the full set client-side
103
+
104
+ ## Responsive Strategy
105
+
106
+ ### Breakpoints (Tailwind reference scale)
107
+
108
+ | Prefix | Min width | Target |
109
+ |---|---|---|
110
+ | `sm:` | 640px | Large phones |
111
+ | `md:` | 768px | Tablets |
112
+ | `lg:` | 1024px | Small laptops |
113
+ | `xl:` | 1280px | Desktops |
114
+ | `2xl:` | 1536px | Large screens |
115
+
116
+ ### Mobile-first approach
117
+
118
+ 1. Design for mobile first (default styles)
119
+ 2. Add complexity at larger breakpoints
120
+ 3. Test at each breakpoint, not just desktop
121
+
122
+ ### Common patterns
123
+
124
+ | Element | Mobile | Desktop |
125
+ |---|---|---|
126
+ | Navigation | Hamburger menu | Sidebar or top nav |
127
+ | Forms | Single column | Two columns |
128
+ | Tables | Cards or scroll | Full table |
129
+ | Actions | Bottom sheet / FAB | Inline buttons |
130
+ | Filters | Collapsible panel | Sidebar or inline |
131
+
132
+ ## Accessibility (a11y)
133
+
134
+ ### Minimum requirements
135
+
136
+ - **Color contrast:** 4.5:1 for text, 3:1 for large text (WCAG AA)
137
+ - **Keyboard navigation:** All interactive elements reachable via Tab
138
+ - **Focus indicators:** Visible focus ring on all focusable elements
139
+ - **Alt text:** All meaningful images have descriptive alt text
140
+ - **ARIA labels:** Interactive elements without visible text need `aria-label`
141
+ - **Semantic HTML:** Use `<button>`, `<nav>`, `<main>`, `<form>` — not `<div>` for everything
142
+
143
+ ### Common mistakes
144
+
145
+ | Mistake | Fix |
146
+ |---|---|
147
+ | `<div onclick>` | Use `<button>` |
148
+ | Color-only status | Add icon or text alongside color |
149
+ | Missing form labels | Add `<label for="...">` |
150
+ | Auto-playing content | Provide pause/stop control |
151
+ | Tiny click targets | Min 44×44px touch target |
152
+
153
+ ## Motion — decision-tree and rationale
154
+
155
+ Before adding any animation to a UI element, run through this decision tree:
156
+
157
+ **1. Should this animate at all?**
158
+ - Used 100+ times per day (keyboard shortcut, command palette)? **No animation. Why:** animations on high-frequency interactions feel sluggish; users wait for them on every invocation. Raycast has no open/close animation by design.
159
+ - Triggered by user action with visible result (button → state change)? **Micro-feedback only (< 160ms).** Why: quick enough to feel instant, visible enough to confirm the action.
160
+ - Modal/overlay/sheet entering/exiting? **Animate. Why:** position change needs motion to maintain spatial continuity.
161
+ - Background process with no user action? **No animation.** Why: unexplained motion is disorienting.
162
+
163
+ **2. Which easing?**
164
+ - Entering (element appearing)? **ease-out** (starts fast, slows to rest). Why: the element arriving quickly signals responsiveness; the deceleration feels natural as it settles.
165
+ - Exiting (element disappearing)? **ease-in** (starts slow, accelerates out). Why: the reverse is true — fast exit signals completion.
166
+ - **Never ease-in for entering elements.** Why: ease-in delays the initial movement — the exact moment the user is watching most closely — making it feel slow even at the same total duration.
167
+ - **Never bounce or elastic easing in UI.** Why: bounce draws attention to the animation itself, not the content; it feels dated.
168
+
169
+ **3. How long?**
170
+ - Button/micro-feedback: 100–160ms. Tooltip: 100ms. Dropdown open: 150–200ms. Modal: 200–350ms. Page transition: 300–500ms. Above 500ms: almost never.
171
+ - **Never animate layout properties** (width, height, top, left, padding). Why: triggers browser layout recalculation on every frame; always solvable with `transform`.
172
+ - **Always add `@media (prefers-reduced-motion: reduce)`** — gentler animation (reduced distance/opacity), NOT display:none. Why: vestibular disorders make motion UI unusable; reducing is better than removing.
173
+
174
+ **4. What to animate?**
175
+ Animate `transform` and `opacity` only. Why: these run on the GPU compositor thread, not the main thread; they never trigger layout or paint.
176
+ `scale(0)` → `scale(1)` is wrong. Why: nothing in the real world appears from nothing. Use `scale(0.95)` + `opacity: 0` → `scale(1)` + `opacity: 1` instead.
177
+
178
+ ## UX Principles
179
+
180
+ 1. **Feedback** — Every action gets a response (toast, loading state, success message). **Why:** users interpret no feedback as failure.
181
+ 2. **Forgiveness** — Undo beats confirmation dialogs. Users click through confirmations mindlessly. **Why:** remove destructively then show undo toast; actually delete after toast expires.
182
+ 3. **Consistency** — Same patterns for same interactions across the app. **Why:** predictability reduces cognitive load; inconsistency forces users to re-learn.
183
+ 4. **Progressive disclosure** — Show basics first, details on demand. **Why:** premature complexity overwhelms; reveal information as it becomes relevant.
184
+ 5. **Loading states** — Skeleton screens preferred over spinners. **Why:** skeletons reduce perceived wait time by showing structure immediately.
185
+ 6. **Error recovery** — Clear error messages with suggested actions. **Why:** "something went wrong" gives the user nothing to do; a specific message with a next step reduces support burden.
186
+
187
+ ## Craft details — typography & imagery
188
+
189
+ - **`text-wrap: pretty` on body copy** — avoids widows/orphans without manual
190
+ breaks; cheap, no layout risk. (Display headlines: `text-wrap: balance`.)
191
+ - **Honest placeholders over weak assets** — when the real image/illustration
192
+ is missing, use a striped placeholder with a monospace size label
193
+ (`repeating-linear-gradient(45deg, #E5E5E5 0 10px, #F5F5F5 10px 20px)` +
194
+ `product shot (1200×800)`) instead of a hand-drawn SVG or stock-ish filler.
195
+ A placeholder signals "asset needed"; a weak illustration signals nobody
196
+ had the asset. Never Lorem-ipsum copy in review-bound output
197
+ (per `output-discipline`) — use short label-style skeleton copy.
198
+
199
+ ## Presenting variants
200
+
201
+ This skill produces ONE refined solution by default. **Plan the variation
202
+ decision before generating** — do not reflexively emit one generic design when
203
+ exploration was asked, nor spam options when one production answer was asked.
204
+
205
+ - **Decide whether to vary (ask only if ambiguous).** For ambiguous creative
206
+ work, decide the variation count and the axis that varies — visual direction,
207
+ UX flow, interaction model, copy, density, or brand strictness. Ask about
208
+ count + axis only when the choice changes the work materially; for a clear
209
+ implementation task, proceed with one answer. (fixture: `daf-requested-variations`.)
210
+ - **Variation floors.** When the user asks to explore, produce **two to three
211
+ meaningfully different** options along the stated axis — different *decisions*,
212
+ not the same layout recoloured. When the user asks for one production answer,
213
+ produce one; no decorative option spam. (fixtures: `daf-requested-variations`,
214
+ `daf-unwanted-variations`.)
215
+ - **Canvas / exploration contract (host-neutral).** Presenting side-by-side
216
+ concepts: give each a **stable frame label**, keep frames flat (no nested
217
+ cards), use generous spacing, and — on tools with a canvas — export-safe
218
+ coordinates so the layout survives export. Same labelled-frames shape whether
219
+ the host has a real canvas or just stacked sections.
220
+ - **Cost / UX tie-breaker.** Ask about the axis only when it changes the work
221
+ materially; otherwise choose a strong default and **document the axis used in
222
+ the handoff** ("explored along visual-direction; density held constant").
223
+
224
+ Hand off the actual variation **mechanics** — the basic→bold method and the
225
+ single-file tweak-panel (CSS custom properties + floating "Tweaks" panel +
226
+ `localStorage`) — to [`design-variations`](../design-variations/SKILL.md): this
227
+ section owns the *planning decision*, that skill owns the *execution*.
@@ -0,0 +1,75 @@
1
+ # fe-design — design read and memory
2
+
3
+ > Section-level entry point of the `fe-design` skill (progressive
4
+ > disclosure, 2026-08-04). Content moved VERBATIM from SKILL.md —
5
+ > load this file when the section index in SKILL.md routes here.
6
+
7
+ ## Cross-task design memory — read DESIGN.md / PRODUCT.md first
8
+
9
+ Before applying any heuristics from this reference, check the project root
10
+ for `DESIGN.md` and/or `PRODUCT.md` (written by `design-system-capture`):
11
+
12
+ - `DESIGN.md` present → use its captured radius/shadow/motion/spacing as
13
+ project constraints. The heuristics in this skill are **fallbacks for
14
+ gaps**, not overrides for captured decisions.
15
+ - `PRODUCT.md` present → honor its interaction patterns (empty-state approach,
16
+ mutation feedback policy, filter persistence) in any UI design that touches
17
+ those surfaces.
18
+
19
+ Flag any new decision for future capture: *"This establishes a new pattern —
20
+ suggest adding to PRODUCT.md: [pattern description]."*
21
+
22
+ ## Register — brand vs product
23
+
24
+ Before applying heuristics, determine the register (see
25
+ [`docs/guidelines/design-modes.md`](../../../../docs/guidelines/design-modes.md)):
26
+ brand mode (impression-first) vs product mode (task-first). Form-heavy, table-heavy,
27
+ and dashboard surfaces are almost always product mode — favour the standard
28
+ patterns in this skill (Form Design, Table Design) over expressive variance.
29
+ Marketing/landing surfaces are brand mode — let the Aesthetic-direction section
30
+ commit to a deliberate, distinctive direction.
31
+
32
+ ## Design Read — articulate intent before generating
33
+
34
+ When this reference is cited for a UI planning task, emit one line declaring
35
+ the design read before any heuristics are applied:
36
+
37
+ ```
38
+ Reading this as: <page-kind> for <audience>, <vibe> language, leaning <design-system>.
39
+ ```
40
+
41
+ **If context is incomplete:** state so and proceed exploratory — do NOT block.
42
+
43
+ **Anti-Default Discipline:** Before committing to any layout or component
44
+ pattern, cross-check your first impulse against
45
+ [`design-antipatterns.md`](../../../../docs/guidelines/design-antipatterns.md) —
46
+ the L1/L2 "AI landing page" layout (centered hero + 3-column grid + CTA), the
47
+ V1 side-stripe card, the T7 default-font pick, and V2 decorative glassmorphism.
48
+ If a tell was the first impulse, choose a different approach or explicitly
49
+ justify why this brief calls for it. (The full pre-proposal scan is under
50
+ *Anti-slop discipline* below.)
51
+
52
+ **Carve-out — a supplied artifact is the spec, not a first impulse.** This
53
+ discipline governs what *you* reach for. When the user hands over a finished
54
+ artifact, the choices it makes are not your impulses and the justify-or-change
55
+ burden does not apply to them: build them as given. The carve-out is scoped to
56
+ decisions the artifact actually covers — anything it leaves open (a state it
57
+ never shows, a surface it never had) is your first impulse again and gets the
58
+ full scan. See
59
+ [`design-fidelity-mechanics`](../../../../docs/guidelines/design-fidelity-mechanics.md)
60
+ § Provided-artifact precedence.
61
+
62
+ ## Aesthetic direction
63
+
64
+ Audit-pinned tokens and components always take precedence (see `existing-ui-audit`). When the audit pins an aesthetic, honor it without deviation. When the audit shows **no pinned aesthetic** — greenfield surface, marketing landing page, brand-new feature without design-system precedent — the design brief is allowed (and expected) to commit to a deliberate direction instead of defaulting to safe centered hero + 3-column features + CTA.
65
+
66
+ Typography pairings (73 curated heading/body combinations with Google
67
+ Fonts URLs + Tailwind config) and icon-system guidance (104 Phosphor
68
+ entries with import code) come grounded from
69
+ [`design-intelligence`](../design-intelligence/SKILL.md)
70
+ (`--domain typography`, `--domain icons`) — query before picking from
71
+ memory.
72
+
73
+ Pick one direction up front and let composition, typography, and color follow from it. Avoid the "neutral AI default": uniform grid, system fonts as the visible body face, purple-to-blue gradients on white, predictable spacing. A direction that fits the brand intent (editorial / brutalist / refined / playful / retro / maximal / minimal / etc.) and is consistent across the page beats hedging.
74
+
75
+ Surface the chosen direction in the design brief as a one-line statement (e.g. `aesthetic: editorial-magazine — asymmetric grid, serif display + sans body, generous gutters`). The apply step (`react-shadcn-ui` / `blade-ui` / `livewire` / `flux`) reads this line and matches typography, spacing, and motion to it; if no line is present, the apply step uses project defaults.
@@ -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
 
@@ -266,6 +266,16 @@ Every roadmap ends in exactly one of four states:
266
266
 
267
267
  After the last step of a roadmap is done, check completion status:
268
268
 
269
+ 0. **Completion review (Gate R2)** — last open item done → findings BEFORE
270
+ fixes, before any archival decision:
271
+ - `dispatch_r2_reviewer` builds the reviewer input; a **fresh subagent
272
+ without the implementation context** writes
273
+ `agents/evidence/reviews/<slug>.findings.md`.
274
+ - Work findings in priority order — each ends `fixed` / `accepted-risk` /
275
+ `deferred`. No code surface → explicit skip, never silent.
276
+ - Grammar, scope-hash binding, escape hatch:
277
+ [`plan-review-gates § 2`](../../../docs/contracts/plan-review-gates.md).
278
+
269
279
  1. **Scan the file** for all checkbox markers: `- [x]`, `- [ ]`, `- [~]`, `- [-]`.
270
280
  2. **Classify:**
271
281
  - `[x]` = completed
@@ -52,7 +52,10 @@ Authoring or materially rewriting a roadmap must go through
52
52
  Understand → Research → Draft per the
53
53
  [`artifact-drafting-protocol`](../../rules/artifact-drafting-protocol.md)
54
54
  rule. Inspect existing roadmaps under `agents/roadmaps/` for overlap
55
- or supersession before opening a new one.
55
+ or supersession before opening a new one. **Gate C first** — "write a
56
+ plan/roadmap" is a gated surface, so run
57
+ [`plan-confidence-gate`](../../contexts/execution/plan-confidence-gate.md)
58
+ before drafting (95%-conditions, marker, interview-or-degrade, C→R1 handoff).
56
59
 
57
60
  ### 1. Read the canonical template first
58
61
 
@@ -180,6 +183,14 @@ breakdown. Full shape: [`templates/roadmaps.md` rule 20](../../agent-src/templat
180
183
  Omit the section entirely when the roadmap has no such gate; run the
181
184
  § 4c gate-test before adding one.
182
185
 
186
+ ### 5c. Risk review (Gate R1) — after draft, before save
187
+
188
+ - Ready (non-draft) plan → `## Risk Register` before save, self-review; seed
189
+ from a fresh C→R1 handoff state (never re-ask a resolved branch).
190
+ - Product AND implementation risks ranked descending, one mitigation per row,
191
+ each anchored to a phase/step here; none → exact honest-null grammar.
192
+ - Schema, staleness, grandfather, drafts-exempt: [`plan-review-gates § 1`](../../../docs/contracts/plan-review-gates.md).
193
+
183
194
  ### 6. Step-marker semantics — pick `[~]` (defer) vs `[-]` (cancel) honestly
184
195
 
185
196
  When authoring (and especially when rewriting a roadmap mid-flight),
@@ -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):
@@ -75,7 +75,9 @@ manually. Reviewer should read intent in one pass.
75
75
 
76
76
  ### 4. Extract only when duplicated ≥ 3 times
77
77
 
78
- The first two repetitions are noise; the third is a pattern.
78
+ The first two repetitions of a **utility-class string** are noise; the third
79
+ is a pattern (the utility-class row of the per-class canon,
80
+ [`abstraction-thresholds`](../../../docs/guidelines/abstraction-thresholds.md)).
79
81
  Extract via:
80
82
 
81
83
  | Mechanism | When |
@@ -62,7 +62,7 @@ INTENT
62
62
  │
63
63
  ├── Near context limit, work not finished
64
64
  │ → cite [agent-handoff](../../domains/meta/agent-handoff/command.md)
65
- │ (structured handoff envelope; resume in fresh chat)
65
+ │ (session picker + generated handoff; auto-seeds the fresh chat)
66
66
  │
67
67
  ├── Cost-aware decision (model pick, budget, stop-criterion)
68
68
  │ → cite /cost:report (when shipped) — until then, fall back to
@@ -82,7 +82,7 @@ INTENT
82
82
  | `cli-output-handling` | `src/rules/cli-output-handling.md` | `verbose`, `tail`, `grep`, `CLI` | Wrap-tail-grep contract for any verbose command |
83
83
  | `rtk-output-filtering` | `src/skills/rtk-output-filtering/SKILL.md` | `rtk`, `verbose`, `filter`, `wrap` | Project-local rtk filters; wrapper command |
84
84
  | `token-efficiency` | `src/rules/token-efficiency.md` | `redirect`, `verbose`, `concise`, `tool` | Batch + parallelize tool calls; brevity floor |
85
- | `agent-handoff` | `src/domains/meta/agent-handoff/command.md` | `handoff`, `fresh`, `chat`, `context` | Context envelope for fresh-chat continuation |
85
+ | `agent-handoff` | `src/domains/meta/agent-handoff/command.md` | `handoff`, `fresh`, `chat`, `context`, `resume`, `session` | Session picker + generated handoff auto-seeding the next session |
86
86
  | `direct-answers` | `src/rules/direct-answers.md` | `brevity`, `flattery`, `severity`, `tiered` | Iron-Law brevity floor (kernel) |
87
87
  | `markitdown` | upstream: github.com/microsoft/markitdown | `PDF`, `DOCX`, `HTML`, `convert` | Document → markdown converter (authoritative-link only) |
88
88
  | `/cost:report` | TBD — an internal roadmap (local-only) § P1.2` | `cost`, `model spend`, `budget` | Per-session cost telemetry (planned) |
@@ -44,9 +44,12 @@ Do NOT use when:
44
44
 
45
45
  ## Componentization threshold — ≥4 repeats AND real state
46
46
 
47
- Extract a component only when an element **repeats ~4× or more AND carries real
48
- props/state**. One or two repeats, or a repeat with no varying props, is not a
49
- component — inline it. A long single-file body is **normal**, not a smell;
47
+ Extract a **stateful component** only when an element **repeats ~4× or more AND
48
+ carries real props/state** (the stateful-component bar of the per-class canon,
49
+ [`abstraction-thresholds`](../../../docs/guidelines/abstraction-thresholds.md) —
50
+ it does not lower the code-level two-repetition bar). One or two repeats, or a
51
+ repeat with no varying props, is not a component — inline it (a props-only
52
+ shell earns extraction at 3+ uses). A long single-file body is **normal**, not a smell;
50
53
  premature extraction (a "component" used once, or a pure-markup fragment split
51
54
  for tidiness) adds indirection without reuse and is the more common mistake
52
55
  than under-splitting. Meet BOTH conditions before you extract.
@@ -558,10 +558,10 @@ the canonical narrative lives in
558
558
 
559
559
  | Key path | Values | Default | Description |
560
560
  |---|---|---|---|
561
- | `rule_loading_tier` | `minimal`, `balanced`, `full`, `custom` | `minimal` | Selects which agent surfaces are active. See [Cost profiles](#cost-profiles). |
561
+ | `rule_loading_tier` | `minimal`, `balanced`, `full`, `custom` | `balanced` | Selects which agent surfaces are active. See [Cost profiles](#cost-profiles). |
562
562
  | `personal.ide` | `code`, `phpstorm`, `cursor` | _(empty)_ | CLI command to open files in the IDE |
563
563
  | `personal.open_edited_files` | `true`, `false` | `false` | Auto-open edited files in the IDE after edits |
564
- | `personal.user_name` | first name | _(empty)_ | User's first name, used to address the user personally. Captured by `/onboard`. |
564
+ | `personal.canary_name` | first name | _(empty)_ | Per-project OVERRIDE of the name the agent addresses the user with (session-canary). The name itself lives user-globally: `identity.name` in the wizard's `settings/.agent-user.yml`, fallback `personal.canary_name` in the user-global settings. See `rules/session-canary.md`. |
565
565
  | `personal.rtk_installed` | `true`, `false` | `false` | Whether rtk (Rust Token Killer) is installed. Detected and set by `/onboard`. |
566
566
  | `personal.minimal_output` | `true`, `false` | `true` | When `true`: short bullet points during work, concise summary at end. When `false`: verbose explanations. |
567
567
  | `personal.play_by_play` | `true`, `false` | `false` | When `true`: share intermediate findings during investigation. When `false`: work silently, report only the conclusion. |
@@ -578,13 +578,11 @@ the canonical narrative lives in
578
578
  | `chat_history.max_size_kb` | integer | per profile | Max file size before overflow handling. Defaults: `minimal`→`128`, `balanced`→`256`, `full`→`512`. |
579
579
  | `chat_history.on_overflow` | `rotate`, `condense` | per profile | On overflow: `rotate` drops oldest entries; `condense` marks the file for summarization on the next turn. Defaults: `minimal`/`balanced`→`rotate`, `full`→`condense`. |
580
580
  | `chat_history.text_limits.{user,agent,tool,phase}` | integer (chars) | `user=0`, `agent=5000`, `tool=200`, `phase=200` | Per-entry-type text-length cap. `0` = verbatim, no slice. `N > 0` = collapse whitespace, slice to N chars, append `" … [+K chars]"` so the log self-reports truncation. Defaults match `DEFAULT_TEXT_LIMITS` in `scripts/chat_history.ts`. |
581
- | `hooks.enabled` | `true`, `false` | `false` | Master switch for the work-engine hook layer. When `false` (default) the registry stays empty and golden replay is byte-stable. See [`agents/settings/contexts/work-engine-hooks.md`](../../../agents/settings/contexts/work-engine-hooks.md). |
582
- | `hooks.trace` | `true`, `false` | `false` | Emit per-event trace lines on stderr. Useful for debugging; off by default because it is noisy. |
583
- | `hooks.halt_surface_audit` | `true`, `false` | `true` | Defense-in-depth check that every halt surfaced by the dispatcher carries the expected shape. Cheap. |
584
- | `hooks.state_shape_validation` | `true`, `false` | `true` | Re-run the state schema validator on `AFTER_LOAD` and `BEFORE_SAVE`. Cheap, catches drift. |
585
- | `hooks.directive_set_guard` | `true`, `false` | `true` | Verify the dispatcher-resolved directive set matches the input envelope intent. Cheap, catches routing drift. |
586
- | `hooks.chat_history.enabled` | `true`, `false` | `true` | Register the chat-history hooks (`append` on `after_step`, `halt_append` on `on_halt`). Gated by **both** this flag AND `chat_history.enabled`; either off → no chat-history hook registers. Schema v4: every entry self-identifies via a 16-char session fingerprint, no ownership/sidecar layer. |
587
- | `hooks.chat_history.script` | path | `scripts/chat_history.ts` | Override path to the chat-history CLI. Set only when the script lives outside the standard location. |
581
+ | `hooks.concern_budget.{max_per_event,tier1_concerns,hard_fail}` | integer / list / `true`,`false` | `8` / `[]` / `false` | Concern budget gate for the hook dispatcher (`lint_hook_concern_budget`): caps concerns per (platform, event) cell, restricts `fail_closed: true` to the `tier1_concerns` allowlist, and `hard_fail: false` keeps the gate warn-only. |
582
+ | `hooks.injection_scan.enabled` | `true`, `false` | `false` | PostToolUse prompt-injection scanner: scans tool output for injection signatures and warns in context (exit 2) — never blocks. |
583
+ | `hooks.rtk_wrap.enabled` | `true`, `false` | `false` | PreToolUse RTK-wrap nudge: when `rtk` is on PATH, warns (exit 2, never blocks) to re-run a verbose CLI command wrapped with rtk. |
584
+ | `hooks.design_slop.enabled` | `true`, `false` | `false` | PreToolUse anti-slop nudge: runs the `lint_design_slop` registry against about-to-be-written UI content and warns (exit 2, never blocks) on P0/P1 aesthetic tells. |
585
+ | `hooks.code_graph.enabled` | `true`, `false` | `false` | PreToolUse code-graph nudge (deprecated — honest null 2026-07-28): when a code-graph index exists, warns once per session to query the graph before grep. Requires manually installing the ABI-locked parser pair. |
588
586
  | `pipelines.skill_improvement` | `true`, `false` | `true` | When `true`: propose learning capture after meaningful tasks. When `false`: silent. Included in every profile except `custom`. |
589
587
  | `roadmap.skip_pre_run_gate` | `true`, `false` | `true` | When `true` (default): `/roadmap:process-step\|phase\|full` skips the interactive pre-run summary and starts the loop immediately — the resolved roadmap, cadence, and council are surfaced inline so an unwanted pick can still be aborted. When `false`: the loop shows the pre-run summary with numbered options (Go / Different roadmap / Different scope / Toggle council / Abort) and waits. The gate is always shown — regardless of this flag — when the roadmap is ambiguous (multiple active, none named) or a scope / cadence conflict has no sensible default. |
590
588
  | `roadmap.quality_cadence` | `end_of_roadmap`, `per_phase`, `per_step` | `end_of_roadmap` | When `/roadmap:process-step|phase|full` runs the project's quality pipeline — only relevant when `quality.local_auto_run` is `true`; when it is `false` (the default) local pipeline runs are suppressed at every cadence and remote CI is the gate. Default skips per-step / per-phase runs and gates only the final archival. `per_phase` runs once after every phase; `per_step` is the legacy verbose mode. Step checkboxes and the dashboard are always updated regardless. |
@@ -594,9 +592,9 @@ the canonical narrative lives in
594
592
  | `subagents.judge_model` | model alias or empty | _(empty)_ | Model for judge subagents. Empty = one tier above implementer (opus if sonnet, sonnet if haiku). |
595
593
  | `subagents.max_parallel` | integer | `3` | Maximum parallel subagent invocations. `1` serializes. |
596
594
  | `worktrees.mode` | `off`, `on`, `ask` | `ask` | Controls autonomous `git worktree` usage. `off` = skill refuses unless the user explicitly asks for a worktree that turn (then it runs); `subagent-orchestration` mode 6 falls back to mode 3. `on` = standing permission (skill skips the per-creation ask; ignore-check and clean-baseline gates still apply). `ask` = status quo — `scope-control` permission gate runs every time. |
597
- | `roles.default_role` | `""`, `developer`, `reviewer`, `tester`, `po`, `incident`, `planner` | _(empty)_ | Role the agent defaults to at the start of a session. See [`role-contracts`](../docs/guidelines/agent-infra/role-contracts.md). |
595
+ | `roles.default_role` | `""`, `developer`, `reviewer`, `tester`, `po`, `incident`, `planner` | _(empty)_ | Role the agent defaults to at the start of a session. Lives in the PROJECT settings (`agent-project-settings.example.yml` § roles), not in the personal template. See [`role-contracts`](../docs/guidelines/agent-infra/role-contracts.md). |
598
596
  | `roles.active_role` | same as `default_role` | _(empty)_ | Role currently active; set by `/mode <name>`, cleared by `/mode none`. Enables the `role-mode-adherence` rule. |
599
- | `personas.override` | list of persona ids | `[]` | Developer-local override of the team default lens cast. Empty = inherit `personas.default` from `.agent-project-settings.yml`. See [`layered-settings`](../docs/guidelines/agent-infra/layered-settings.md). |
597
+ | `personas.override` | list of persona ids | `[]` | Developer-local override of the team default lens cast (not in the shipped personal template — add the block when needed). Empty = inherit `personas.default` from `.agent-project-settings.yml`. See [`layered-settings`](../docs/guidelines/agent-infra/layered-settings.md). |
600
598
  | `personas.ignore` | list of persona ids | `[]` | Persona ids dropped from the default cast locally. Ignored personas stay invokable via `--personas=<id>`. |
601
599
  | `onboarding.onboarded` | `true`, `false` | `false` | Whether `/onboard` has run on this project. The `onboarding-gate` rule prompts for `/onboard` when this is `false`. Missing entirely = legacy project, treated as onboarded. |
602
600
  | `commands.suggestion.enabled` | `true`, `false` | `true` | Master switch for the command-suggestion layer. `false` = the layer is silent; explicit `/commands` still work. See `rules/command-suggestion-policy.md`. |
@@ -615,8 +613,8 @@ the canonical narrative lives in
615
613
  | `verbosity.offer_council_in_delivery` | `true`, `false` | `false` | Offer "run AI Council on this?" inside delivery commands (`/feature-plan`, `/review-changes`, `/roadmap-create`). Council commands themselves are unaffected. |
616
614
  | `verbosity.post_action_reports` | `off`, `minimal`, `full` | `minimal` | Multi-line status / summary blocks after a successful action. `off` = no report; `minimal` = one-line confirmation; `full` = bullet list. |
617
615
  | `verbosity.intent_announcements` | `true`, `false` | `false` | Intent announcements ("Let me check…", "Now I will…", "Found it") in skill bodies. `false` = act and emit the result. |
618
- | `telegraph.speak_scope` | `off`, `prose_only`, `aggressive` | `prose_only` | How widely telegraph-speak grammar applies in chat. `off` = no telegraph grammar; `prose_only` = telegraph in body prose, numbered options + Iron-Law-literal blocks stay full prose; `aggressive` = telegraph everywhere except Iron-Law literals. Compile-time toggle (`telegraph.speak`) lands in Phase 8. |
619
- | `telemetry.artifact_engagement.enabled` | `true`, `false` | `false` | Master switch for the artefact engagement log. Default-off; zero file IO and zero token cost when `false`. Maintainer-targeted; consumers leave it off. |
616
+ | `telegraph.speak_scope` | `off`, `prose_only`, `aggressive` | `off` | How widely telegraph-speak grammar applies in chat. `off` = no telegraph grammar; `prose_only` = telegraph in body prose, numbered options + Iron-Law-literal blocks stay full prose; `aggressive` = telegraph everywhere except Iron-Law literals. The compile-time toggle `telegraph.speak` ships as `false` (dormant) — the projector gates the rule on `speak`, never on `speak_scope`. |
617
+ | `telemetry.artifact_engagement.enabled` | `true`, `false` | `false` | Master switch for the artefact engagement log. Not in the shipped template — a missing `telemetry:` section means disabled (the recording rule no-ops). Default-off; zero file IO and zero token cost when `false`. Maintainer-targeted; consumers leave it off. |
620
618
  | `telemetry.artifact_engagement.granularity` | `task`, `phase-step`, `tool-call` | `task` | Boundary at which events are recorded. `tool-call` is expensive — opt-in only. |
621
619
  | `telemetry.artifact_engagement.record.consulted` | `true`, `false` | `true` | When `true`: record artefacts loaded into context. |
622
620
  | `telemetry.artifact_engagement.record.applied` | `true`, `false` | `true` | When `true`: record artefacts cited or driving a decision. |
@@ -666,8 +664,8 @@ The `rule_loading_tier` setting selects which agent surfaces are active. See
666
664
 
667
665
  | Profile | Description |
668
666
  |---|---|
669
- | `minimal` | Rules, skills, and commands only. **Includes the learning loop.** Default. |
670
- | `balanced` | `minimal` + Runtime dispatcher for skills that declare a shell command. |
667
+ | `minimal` | Rules, skills, and commands only. **Includes the learning loop.** |
668
+ | `balanced` | `minimal` + Runtime dispatcher for skills that declare a shell command. Default. |
671
669
  | `full` | `balanced` + Tool adapters (GitHub / Jira, read-only, opt-in). |
672
670
  | `custom` | Ignore profile — every matrix value must be set explicitly. |
673
671
 
@@ -39,7 +39,7 @@ schema_version: 1
39
39
  # CI guard: a release bump of `package.json` must update this value
40
40
  # in lockstep — see scripts/check_template_pin_drift.ts (road-to-
41
41
  # portable-runtime-and-update-check P3.3).
42
- agent_config_version: "9.16.0"
42
+ agent_config_version: "9.18.0"
43
43
 
44
44
  # --- Project identity ---
45
45
  project:
@@ -156,7 +156,11 @@ review_routing:
156
156
  # Leave empty to fall back to inferred mode switching.
157
157
  roles:
158
158
  # One of: developer, reviewer, tester, po, incident, planner.
159
- default: ""
159
+ # Key names match what role-mode-adherence and /mode read/write.
160
+ default_role: ""
161
+
162
+ # Set by /mode at runtime; empty = rule inert (no guessed mode).
163
+ active_role: ""
160
164
 
161
165
  # If set, the agent refuses work outside the default contract
162
166
  # until the user explicitly switches modes with `/mode <name>`.
@@ -14,7 +14,7 @@
14
14
  4. Pass the Unique-Questions heuristic — ≥ 3 questions that no other
15
15
  persona asks verbatim. If you cannot write three unique questions,
16
16
  the persona is redundant; drop it.
17
- 5. Stay within the size budget: **Core ≤ 120 lines, Specialist ≤ 80 lines**.
17
+ 5. Stay within the size budget: **Core ≤ 120 lines, Specialist ≤ 100 lines** (wings 3–4: ≤ 140).
18
18
  6. Run `task sync` and `task ci` before commit.
19
19
 
20
20
  ## Template
@@ -88,7 +88,7 @@ Before considering a persona complete:
88
88
 
89
89
  - [ ] **Unique Questions heuristic** — ≥ 3 questions that no other
90
90
  persona asks verbatim. The linter enforces this.
91
- - [ ] **Size budget** — Core ≤ 120 lines, Specialist ≤ 80 lines.
91
+ - [ ] **Size budget** — Core ≤ 120 lines, Specialist ≤ 100 lines (wings 3–4: ≤ 140).
92
92
  - [ ] **Portability** — no project names, domains, stacks, teams.
93
93
  - [ ] **English only** — all content in English.
94
94
  - [ ] **One sentence description** — ≤ 160 chars, starts with a voice
@@ -6,7 +6,7 @@ Templates for roadmap files stored in `agents/roadmaps/` or `{module_root}/{Modu
6
6
 
7
7
  ## Rules for Roadmaps
8
8
 
9
- 1. **Be precise and concise.** Aim for 500–1000 lines max. If larger, split into multiple files.
9
+ 1. **Be precise and concise.** Lightweight default: ≤ 600 lines (see rule 15). Only a declared `complexity: structural` roadmap may exceed that, capped at 1000 lines — if larger, split into multiple files.
10
10
  2. **Checkboxes are mandatory, not decorative.** Every active roadmap MUST contain at least one `- [ ]` per non-intro phase. Decision tables, ICE matrices, and block-sequencing tables capture the *why*; checkboxes capture the *what to do next*. A roadmap without checkboxes is invisible to `agents/roadmaps-progress.md` — the dashboard cannot count it, the next reader thinks no work is planned. Enforced by [`roadmap-progress-sync`](../rules/roadmap-progress-sync.md) Iron Law #2.
11
11
  - **Glyph semantics:** `[ ]` open · `[x]` done · `[~]` **deferred** (planned for later — blocks silent archive per `roadmap-progress-sync` Iron Law 3) · `[-]` **cancelled** (won't do — explicit drop). Pick `[~]` vs `[-]` honestly; the former carries follow-up-roadmap obligations, the latter does not. Optional inline annotations: `<!-- deferred: reason -->` / `<!-- cancelled: reason -->` on the same line.
12
12
  - **Status is binary: `ready` (default) or `draft`.** New roadmaps are created **ready** unless the user explicitly says draft — `ready` is implicit and need not be written. Drafts declare it via frontmatter at the top of the file (`---\nstatus: draft\n---`) and are hidden from the dashboard until the flag is removed or flipped to `ready`. Use `draft` while the roadmap is still being authored, while waiting for upstream decisions, as a capture-only synthesis that has not been promoted to executable phases, or as a follow-up roadmap (see rule 17 below) that is not yet ready to surface. There are no other status values; legacy banners like `**Status: directional**` are removed.
@@ -239,6 +239,18 @@ Templates for roadmap files stored in `agents/roadmaps/` or `{module_root}/{Modu
239
239
  full CI pipeline — per `roadmap-ci-steps-policy` a `verify:` must not
240
240
  be a full-suite gate.
241
241
 
242
+ 24. **Ready roadmaps carry a `## Risk Register` (Gate R1).** Every
243
+ ready (non-draft) roadmap ends with a schema-valid Risk Register —
244
+ marker line (`<!-- risk-review: v1 | reviewed: YYYY-MM-DD |
245
+ reviewer: <id> -->`), ranked rows (most → least risky), a
246
+ `Mitigation` and an in-document `Anchored under` reference per row.
247
+ No material risks → the **exact** honest-null grammar; a bare "no
248
+ risks" sentence fails. Schema, staleness rule, and the grandfather
249
+ clause for pre-gate roadmaps:
250
+ [`plan-review-gates § 1`](../../docs/contracts/plan-review-gates.md).
251
+ `status: draft` roadmaps are exempt until flipped to ready. Enforced
252
+ by `lint_plan_risk_register` at pre-push + CI.
253
+
242
254
  ---
243
255
 
244
256
  ## Quality Gates (remote CI by default)