@event4u/agent-config 1.19.0 → 1.21.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 (297) hide show
  1. package/.agent-src/commands/agent-handoff.md +14 -10
  2. package/.agent-src/commands/agents.md +1 -1
  3. package/.agent-src/commands/bug-fix.md +1 -1
  4. package/.agent-src/commands/bug-investigate.md +2 -2
  5. package/.agent-src/commands/chat-history/import.md +166 -0
  6. package/.agent-src/commands/chat-history/learn.md +178 -0
  7. package/.agent-src/commands/chat-history/show.md +17 -18
  8. package/.agent-src/commands/chat-history.md +26 -25
  9. package/.agent-src/commands/compress.md +12 -0
  10. package/.agent-src/commands/context/create.md +2 -2
  11. package/.agent-src/commands/context.md +1 -1
  12. package/.agent-src/commands/copilot-agents.md +1 -1
  13. package/.agent-src/commands/council/default.md +21 -12
  14. package/.agent-src/commands/council.md +1 -1
  15. package/.agent-src/commands/create-pr.md +28 -8
  16. package/.agent-src/commands/e2e-heal.md +1 -1
  17. package/.agent-src/commands/e2e-plan.md +1 -1
  18. package/.agent-src/commands/feature/dev.md +3 -3
  19. package/.agent-src/commands/feature.md +1 -1
  20. package/.agent-src/commands/fix/seeder.md +2 -2
  21. package/.agent-src/commands/fix.md +1 -1
  22. package/.agent-src/commands/jira-ticket.md +1 -1
  23. package/.agent-src/commands/judge.md +2 -2
  24. package/.agent-src/commands/memory.md +1 -1
  25. package/.agent-src/commands/mode.md +5 -5
  26. package/.agent-src/commands/module.md +1 -1
  27. package/.agent-src/commands/onboard.md +4 -4
  28. package/.agent-src/commands/optimize/augmentignore.md +1 -1
  29. package/.agent-src/commands/optimize-prompt.md +61 -0
  30. package/.agent-src/commands/optimize.md +1 -1
  31. package/.agent-src/commands/override.md +1 -1
  32. package/.agent-src/commands/review-changes.md +1 -1
  33. package/.agent-src/commands/review-routing.md +1 -1
  34. package/.agent-src/commands/roadmap.md +1 -1
  35. package/.agent-src/commands/set-cost-profile.md +3 -3
  36. package/.agent-src/commands/sync-agent-settings.md +2 -2
  37. package/.agent-src/commands/sync-gitignore.md +1 -1
  38. package/.agent-src/commands/tests/create.md +2 -2
  39. package/.agent-src/commands/tests.md +1 -1
  40. package/.agent-src/commands/threat-model.md +4 -4
  41. package/.agent-src/contexts/authority/commit-mechanics.md +14 -1
  42. package/.agent-src/contexts/authority/destructive-mechanics.md +14 -1
  43. package/.agent-src/contexts/authority/scope-mechanics.md +5 -0
  44. package/.agent-src/contexts/communication/rules-auto/guidelines-mechanics.md +76 -0
  45. package/.agent-src/contexts/communication/rules-auto/skill-quality-mechanics.md +76 -0
  46. package/.agent-src/contexts/communication/rules-auto/slash-command-routing-policy-mechanics.md +4 -4
  47. package/.agent-src/contexts/communication/rules-auto/think-before-action-mechanics.md +98 -0
  48. package/.agent-src/contexts/communication/rules-auto/token-efficiency-mechanics.md +93 -0
  49. package/.agent-src/contexts/communication/rules-auto/user-interaction-mechanics.md +125 -9
  50. package/.agent-src/contexts/execution/autonomy-mechanics.md +44 -0
  51. package/.agent-src/contexts/model-recommendations.md +2 -2
  52. package/.agent-src/contexts/override-system.md +1 -1
  53. package/.agent-src/personas/product-owner.md +2 -2
  54. package/.agent-src/personas/qa.md +1 -1
  55. package/.agent-src/rules/agent-authority.md +5 -6
  56. package/.agent-src/rules/agent-docs.md +11 -53
  57. package/.agent-src/rules/analysis-skill-routing.md +10 -40
  58. package/.agent-src/rules/architecture.md +6 -1
  59. package/.agent-src/rules/artifact-drafting-protocol.md +5 -0
  60. package/.agent-src/rules/artifact-engagement-recording.md +23 -59
  61. package/.agent-src/rules/ask-when-uncertain.md +24 -47
  62. package/.agent-src/rules/augment-portability.md +14 -62
  63. package/.agent-src/rules/augment-source-of-truth.md +10 -1
  64. package/.agent-src/rules/autonomous-execution.md +17 -98
  65. package/.agent-src/rules/capture-learnings.md +9 -80
  66. package/.agent-src/rules/cli-output-handling.md +12 -42
  67. package/.agent-src/rules/command-suggestion-policy.md +25 -73
  68. package/.agent-src/rules/commit-conventions.md +9 -58
  69. package/.agent-src/rules/commit-policy.md +16 -47
  70. package/.agent-src/rules/context-hygiene.md +5 -0
  71. package/.agent-src/rules/direct-answers.md +21 -42
  72. package/.agent-src/rules/docker-commands.md +11 -45
  73. package/.agent-src/rules/docs-sync.md +10 -56
  74. package/.agent-src/rules/downstream-changes.md +5 -0
  75. package/.agent-src/rules/e2e-testing.md +9 -44
  76. package/.agent-src/rules/guidelines.md +13 -75
  77. package/.agent-src/rules/improve-before-implement.md +10 -2
  78. package/.agent-src/rules/language-and-tone.md +35 -69
  79. package/.agent-src/rules/laravel-translations.md +11 -40
  80. package/.agent-src/rules/markdown-safe-codeblocks.md +4 -0
  81. package/.agent-src/rules/minimal-safe-diff.md +4 -0
  82. package/.agent-src/rules/missing-tool-handling.md +4 -0
  83. package/.agent-src/rules/model-recommendation.md +9 -61
  84. package/.agent-src/rules/no-attribution-footers.md +53 -0
  85. package/.agent-src/rules/no-cheap-questions.md +11 -27
  86. package/.agent-src/rules/no-council-references.md +76 -0
  87. package/.agent-src/rules/no-roadmap-references.md +8 -1
  88. package/.agent-src/rules/non-destructive-by-default.md +13 -43
  89. package/.agent-src/rules/onboarding-gate.md +9 -117
  90. package/.agent-src/rules/package-ci-checks.md +10 -37
  91. package/.agent-src/rules/php-coding.md +10 -55
  92. package/.agent-src/rules/preservation-guard.md +9 -0
  93. package/.agent-src/rules/review-routing-awareness.md +9 -97
  94. package/.agent-src/rules/reviewer-awareness.md +8 -83
  95. package/.agent-src/rules/roadmap-progress-sync.md +7 -170
  96. package/.agent-src/rules/role-mode-adherence.md +6 -2
  97. package/.agent-src/rules/rule-type-governance.md +8 -66
  98. package/.agent-src/rules/runtime-safety.md +5 -0
  99. package/.agent-src/rules/scope-control.md +17 -62
  100. package/.agent-src/rules/security-sensitive-stop.md +7 -1
  101. package/.agent-src/rules/size-enforcement.md +6 -1
  102. package/.agent-src/rules/skill-improvement-trigger.md +9 -49
  103. package/.agent-src/rules/skill-quality.md +7 -64
  104. package/.agent-src/rules/slash-command-routing-policy.md +11 -63
  105. package/.agent-src/rules/think-before-action.md +22 -87
  106. package/.agent-src/rules/token-efficiency.md +10 -74
  107. package/.agent-src/rules/token-optimizer-maintenance.md +68 -0
  108. package/.agent-src/rules/tool-safety.md +4 -0
  109. package/.agent-src/rules/ui-audit-gate.md +25 -61
  110. package/.agent-src/rules/upstream-proposal.md +9 -67
  111. package/.agent-src/rules/user-interaction.md +25 -95
  112. package/.agent-src/rules/verify-before-complete.md +1 -1
  113. package/.agent-src/skills/agent-docs-writing/SKILL.md +1 -1
  114. package/.agent-src/skills/ai-council/SKILL.md +69 -5
  115. package/.agent-src/skills/analysis-autonomous-mode/SKILL.md +1 -1
  116. package/.agent-src/skills/analysis-skill-router/SKILL.md +3 -3
  117. package/.agent-src/skills/artisan-commands/SKILL.md +2 -2
  118. package/.agent-src/skills/authz-review/SKILL.md +1 -1
  119. package/.agent-src/skills/aws-infrastructure/SKILL.md +5 -5
  120. package/.agent-src/skills/blast-radius-analyzer/SKILL.md +8 -8
  121. package/.agent-src/skills/bug-analyzer/SKILL.md +5 -5
  122. package/.agent-src/skills/code-refactoring/SKILL.md +4 -4
  123. package/.agent-src/skills/code-review/SKILL.md +2 -2
  124. package/.agent-src/skills/command-writing/SKILL.md +11 -0
  125. package/.agent-src/skills/composer-packages/SKILL.md +2 -2
  126. package/.agent-src/skills/context-authoring/SKILL.md +11 -0
  127. package/.agent-src/skills/context-document/SKILL.md +1 -1
  128. package/.agent-src/skills/copilot-agents-optimization/SKILL.md +23 -0
  129. package/.agent-src/skills/copilot-config/SKILL.md +1 -1
  130. package/.agent-src/skills/dcf-modeling/SKILL.md +89 -0
  131. package/.agent-src/skills/dependency-upgrade/SKILL.md +2 -2
  132. package/.agent-src/skills/devcontainer/SKILL.md +2 -2
  133. package/.agent-src/skills/developer-like-execution/SKILL.md +1 -1
  134. package/.agent-src/skills/docker/SKILL.md +1 -1
  135. package/.agent-src/skills/dto-creator/SKILL.md +1 -1
  136. package/.agent-src/skills/estimate-ticket/SKILL.md +2 -2
  137. package/.agent-src/skills/fe-design/SKILL.md +4 -4
  138. package/.agent-src/skills/feature-planning/SKILL.md +5 -5
  139. package/.agent-src/skills/funnel-analysis/SKILL.md +100 -0
  140. package/.agent-src/skills/laravel/SKILL.md +1 -1
  141. package/.agent-src/skills/laravel-notifications/SKILL.md +5 -5
  142. package/.agent-src/skills/laravel-pennant/SKILL.md +1 -1
  143. package/.agent-src/skills/laravel-pulse/SKILL.md +4 -4
  144. package/.agent-src/skills/laravel-reverb/SKILL.md +2 -2
  145. package/.agent-src/skills/laravel-scheduling/SKILL.md +1 -1
  146. package/.agent-src/skills/md-language-check/SKILL.md +1 -1
  147. package/.agent-src/skills/migration-creator/SKILL.md +7 -7
  148. package/.agent-src/skills/multi-tenancy/SKILL.md +8 -8
  149. package/.agent-src/skills/okr-tree-modeling/SKILL.md +93 -0
  150. package/.agent-src/skills/performance-analysis/SKILL.md +3 -3
  151. package/.agent-src/skills/pest-testing/SKILL.md +6 -6
  152. package/.agent-src/skills/php-service/SKILL.md +2 -2
  153. package/.agent-src/skills/project-analysis-hypothesis-driven/SKILL.md +3 -3
  154. package/.agent-src/skills/project-analysis-react/SKILL.md +1 -1
  155. package/.agent-src/skills/project-analysis-symfony/SKILL.md +1 -1
  156. package/.agent-src/skills/project-analysis-zend-laminas/SKILL.md +2 -2
  157. package/.agent-src/skills/project-analyzer/SKILL.md +4 -4
  158. package/.agent-src/skills/prompt-optimizer/SKILL.md +108 -0
  159. package/.agent-src/skills/readme-reviewer/SKILL.md +1 -1
  160. package/.agent-src/skills/rice-prioritization/SKILL.md +100 -0
  161. package/.agent-src/skills/rule-writing/SKILL.md +33 -0
  162. package/.agent-src/skills/sentry-integration/SKILL.md +1 -1
  163. package/.agent-src/skills/skill-writing/SKILL.md +14 -0
  164. package/.agent-src/skills/subagent-orchestration/SKILL.md +34 -2
  165. package/.agent-src/skills/terraform/SKILL.md +2 -2
  166. package/.agent-src/skills/terragrunt/SKILL.md +8 -8
  167. package/.agent-src/skills/test-performance/SKILL.md +5 -5
  168. package/.agent-src/skills/threat-modeling/SKILL.md +2 -2
  169. package/.agent-src/skills/token-optimizer/SKILL.md +110 -0
  170. package/.agent-src/skills/unit-economics-modeling/SKILL.md +104 -0
  171. package/.agent-src/skills/universal-project-analysis/SKILL.md +1 -1
  172. package/.agent-src/skills/using-git-worktrees/SKILL.md +1 -0
  173. package/.agent-src/templates/AGENTS.md +1 -1
  174. package/.agent-src/templates/agent-settings.md +25 -41
  175. package/.agent-src/templates/contexts/tenant-boundaries.md +2 -2
  176. package/.agent-src/templates/contexts.md +1 -1
  177. package/.agent-src/templates/copilot-instructions.md +21 -0
  178. package/.agent-src/templates/copilot-review-instructions.md +76 -0
  179. package/.agent-src/templates/features.md +1 -1
  180. package/.agent-src/templates/rule.md +127 -0
  181. package/.agent-src/templates/scripts/work_engine/hook_bootstrap.py +7 -5
  182. package/.agent-src/templates/scripts/work_engine/hooks/__init__.py +0 -4
  183. package/.agent-src/templates/scripts/work_engine/hooks/builtin/__init__.py +0 -4
  184. package/.agent-src/templates/scripts/work_engine/hooks/builtin/_chat_history_base.py +7 -51
  185. package/.agent-src/templates/scripts/work_engine/hooks/builtin/chat_history_append.py +1 -2
  186. package/.agent-src/templates/scripts/work_engine/hooks/builtin/chat_history_halt_append.py +1 -2
  187. package/.agent-src/templates/scripts/work_engine/hooks/builtin/memory_visibility.py +2 -3
  188. package/.agent-src/templates/skill.md +30 -1
  189. package/.claude-plugin/marketplace.json +11 -4
  190. package/AGENTS.md +71 -3
  191. package/CHANGELOG.md +180 -3
  192. package/README.md +24 -23
  193. package/config/agent-settings.template.yml +63 -23
  194. package/config/gitignore-block.txt +11 -4
  195. package/docs/architecture.md +84 -3
  196. package/docs/catalog.md +23 -11
  197. package/docs/contracts/adr-chat-history-split.md +10 -1
  198. package/docs/contracts/agent-memory-contract.md +1 -1
  199. package/docs/contracts/command-clusters.md +1 -1
  200. package/docs/contracts/context-paths.md +2 -1
  201. package/docs/contracts/cross-wing-handoff.md +133 -0
  202. package/docs/contracts/file-ownership-matrix.json +678 -609
  203. package/docs/contracts/hook-architecture-v1.md +8 -1
  204. package/docs/contracts/iron-law-overrides.txt +25 -0
  205. package/docs/contracts/kernel-membership.md +273 -0
  206. package/docs/contracts/load-context-schema.md +26 -11
  207. package/docs/contracts/memory-visibility-v1.md +8 -24
  208. package/docs/contracts/pilot/agent-authority.md +24 -0
  209. package/docs/contracts/pilot/direct-answers.md +70 -0
  210. package/docs/contracts/pilot/language-and-tone.md +63 -0
  211. package/docs/contracts/rule-classification.md +170 -0
  212. package/docs/contracts/rule-router.md +153 -0
  213. package/docs/customization.md +18 -7
  214. package/docs/decisions/ADR-001-kernel-swap-deferred.md +109 -0
  215. package/docs/decisions/ADR-002-kernel-bucket-overrides.md +124 -0
  216. package/docs/decisions/ADR-rule-kernel-and-router.md +122 -0
  217. package/docs/getting-started.md +19 -27
  218. package/docs/guidelines/agent-infra/ask-when-uncertain-demos.md +1 -1
  219. package/docs/guidelines/agent-infra/roadmap-progress-mechanics.md +176 -0
  220. package/docs/guidelines/agent-infra/rule-type-governance.md +73 -0
  221. package/docs/guidelines/agent-infra/size-and-scope.md +13 -2
  222. package/docs/guidelines/agent-infra/skill-quality-checklist.md +119 -0
  223. package/docs/guidelines/augment-portability-patterns.md +68 -0
  224. package/docs/guidelines/php/php-coding-patterns.md +62 -0
  225. package/docs/hook-payload-capture.md +221 -0
  226. package/docs/migrations/commands-1.15.0.md +17 -12
  227. package/docs/skills-catalog.md +5 -4
  228. package/llms.txt +4 -3
  229. package/package.json +1 -1
  230. package/scripts/_p43_bodies.py +235 -0
  231. package/scripts/_p43_compress.py +118 -0
  232. package/scripts/_p4_migrate.py +199 -0
  233. package/scripts/_pilot_council_question.py +57 -0
  234. package/scripts/_pilot_measure.py +53 -0
  235. package/scripts/agent-config +1 -1
  236. package/scripts/ai_council/_default_prices.py +4 -4
  237. package/scripts/ai_council/clients.py +1 -1
  238. package/scripts/ai_council/modes.py +3 -4
  239. package/scripts/ai_council/pricing.py +10 -9
  240. package/scripts/ai_council/session.py +107 -5
  241. package/scripts/build_linear_digest.py +3 -5
  242. package/scripts/build_rule_trigger_matrix.py +1 -9
  243. package/scripts/chat_history.py +952 -596
  244. package/scripts/check_always_budget.py +39 -6
  245. package/scripts/check_compressed_paths.py +213 -0
  246. package/scripts/check_compression.py +15 -0
  247. package/scripts/check_context_paths.py +1 -0
  248. package/scripts/check_council_layout.py +105 -0
  249. package/scripts/check_council_references.py +145 -0
  250. package/scripts/check_portability.py +2 -0
  251. package/scripts/check_references.py +14 -2
  252. package/scripts/check_token_optimizer_freshness.py +131 -0
  253. package/scripts/compile_router.py +148 -0
  254. package/scripts/compress.py +219 -11
  255. package/scripts/council_cli.py +63 -9
  256. package/scripts/council_prune.py +81 -0
  257. package/scripts/count_token_optimizer_usage.sh +54 -0
  258. package/scripts/hook_manifest.yaml +33 -0
  259. package/scripts/hooks/augment-chat-history.sh +10 -0
  260. package/scripts/hooks/cowork-dispatcher.sh +98 -0
  261. package/scripts/hooks/dispatch_hook.py +35 -0
  262. package/scripts/hooks_status.py +12 -1
  263. package/scripts/install-hooks.sh +2 -2
  264. package/scripts/install.sh +81 -2
  265. package/scripts/iron_law_sha.py +98 -0
  266. package/scripts/lint_handoffs.py +214 -0
  267. package/scripts/lint_hook_manifest.py +2 -1
  268. package/scripts/lint_load_context.py +35 -5
  269. package/scripts/measure_rule_budget.py +314 -0
  270. package/scripts/prototype_lint_contradictions.py +150 -0
  271. package/scripts/redact_hook_capture.py +148 -0
  272. package/scripts/schemas/rule.schema.json +55 -6
  273. package/scripts/schemas/skill.schema.json +5 -0
  274. package/scripts/skill_linter.py +359 -7
  275. package/scripts/smoke_path_resolution.py +93 -0
  276. package/scripts/update_prices.py +3 -3
  277. package/scripts/validate_frontmatter.py +41 -1
  278. package/.agent-src/commands/chat-history/checkpoint.md +0 -126
  279. package/.agent-src/commands/chat-history/clear.md +0 -103
  280. package/.agent-src/commands/chat-history/resume.md +0 -183
  281. package/.agent-src/contexts/communication/rules-auto/artifact-engagement-recording-mechanics.md +0 -72
  282. package/.agent-src/contexts/communication/rules-auto/augment-portability-mechanics.md +0 -79
  283. package/.agent-src/contexts/communication/rules-auto/cli-output-handling-mechanics.md +0 -87
  284. package/.agent-src/contexts/communication/rules-auto/command-suggestion-policy-mechanics.md +0 -62
  285. package/.agent-src/contexts/communication/rules-auto/docs-sync-mechanics.md +0 -78
  286. package/.agent-src/contexts/communication/rules-auto/package-ci-checks-mechanics.md +0 -85
  287. package/.agent-src/contexts/communication/rules-auto/review-routing-awareness-mechanics.md +0 -65
  288. package/.agent-src/contexts/communication/rules-auto/roadmap-progress-sync-mechanics.md +0 -78
  289. package/.agent-src/contexts/communication/rules-auto/ui-audit-gate-mechanics.md +0 -53
  290. package/.agent-src/rules/chat-history-cadence.md +0 -143
  291. package/.agent-src/rules/chat-history-ownership.md +0 -124
  292. package/.agent-src/rules/chat-history-visibility.md +0 -97
  293. package/.agent-src/templates/scripts/work_engine/hooks/builtin/chat_history_heartbeat.py +0 -50
  294. package/.agent-src/templates/scripts/work_engine/hooks/builtin/chat_history_turn_check.py +0 -49
  295. package/scripts/check_phase_coupling.py +0 -148
  296. /package/{docs → .agent-src/contexts}/contracts/artifact-engagement-flow.md +0 -0
  297. /package/{docs → .agent-src/contexts}/contracts/command-suggestion-flow.md +0 -0
@@ -20,7 +20,7 @@ and Laravel Echo client setup, see the [websocket](../websocket/SKILL.md) skill.
20
20
  ## Procedure: Set up Reverb
21
21
 
22
22
  1. **Install** — `php artisan install:broadcasting` or manual setup (see below).
23
- 2. **Configure** — Set environment variables for Reverb host, port, app credentials.
23
+ 2. **Configure** — Set env variables for Reverb host, port, app credentials.
24
24
  3. **Start server** — `php artisan reverb:start`.
25
25
  4. **Connect client** — Configure Laravel Echo with Reverb credentials.
26
26
  5. **Verify** — Confirm WebSocket connection in browser console, test event delivery.
@@ -194,7 +194,7 @@ location /app {
194
194
  ## Gotcha
195
195
 
196
196
  - Reverb requires a persistent process — it's not compatible with serverless deployments.
197
- - The model forgets to configure the `REVERB_HOST` and `REVERB_PORT` environment variables.
197
+ - The model forgets to configure the `REVERB_HOST` and `REVERB_PORT` env variables.
198
198
  - WebSocket connections bypass middleware — don't rely on session auth for channel authorization.
199
199
 
200
200
  ## Do NOT
@@ -164,4 +164,4 @@ Schedule::command('reports:weekly')->weeklyOn(1, '07:00');
164
164
  - Do NOT add multiple cron entries — use Laravel's scheduler for everything.
165
165
  - Do NOT schedule heavy work directly — dispatch a queued job instead.
166
166
  - Do NOT forget `withoutOverlapping()` for tasks that may run longer than their interval.
167
- - Do NOT hardcode times — use environment-based config when schedules vary per environment.
167
+ - Do NOT hardcode times — use environment-based config when schedules vary per env.
@@ -32,7 +32,7 @@ Do NOT use when:
32
32
 
33
33
  - Editing project content outside the trees listed above (READMEs of
34
34
  consumer projects, application docs that follow a different policy)
35
- - Reviewing chat history files (`.agent-chat-history` is JSONL, not `.md`)
35
+ - Reviewing chat history files (`agents/.agent-chat-history` is JSONL, not `.md`)
36
36
  - Inspecting non-`.md` files — the checker rejects them with a warning
37
37
 
38
38
  ## Procedure
@@ -26,9 +26,9 @@ Use this skill when the user asks to create a database migration, add a column,
26
26
 
27
27
  ## Laravel projects
28
28
 
29
- ### Multi-database architecture
29
+ ### Multi-DB architecture
30
30
 
31
- Some projects use multiple database connections. Check `config/database.php` for connections.
31
+ Some projects use multiple DB connections. Check `config/database.php` for connections.
32
32
 
33
33
  | Check | How |
34
34
  |---|---|
@@ -36,9 +36,9 @@ Some projects use multiple database connections. Check `config/database.php` for
36
36
  | Migration directories | `database/migrations/` (default), check for additional directories |
37
37
  | Custom migrate commands | `php artisan list migrate` — look for project-specific commands |
38
38
 
39
- **Always determine which database the table belongs to before creating a migration.**
39
+ **Always determine which DB the table belongs to before creating a migration.**
40
40
 
41
- ### API database migration
41
+ ### API DB migration
42
42
 
43
43
  ```bash
44
44
  php artisan make:migration create_example_table
@@ -72,13 +72,13 @@ return new class extends Migration {
72
72
  };
73
73
  ```
74
74
 
75
- ### Customer database migration
75
+ ### Customer DB migration
76
76
 
77
77
  ```bash
78
78
  php artisan make:migration:customer AddWeatherColumn --table=cl_lv_weather
79
79
  ```
80
80
 
81
- Customer database tables use the `cl_` prefix (e.g. `cl_user`, `cl_lv_weather`).
81
+ Customer DB tables use the `cl_` prefix (e.g. `cl_user`, `cl_lv_weather`).
82
82
 
83
83
  ### Adding a column (with explicit connection)
84
84
 
@@ -152,7 +152,7 @@ Focus on the "Database migrations" attack questions: Can this destroy data? Is r
152
152
 
153
153
  ## Auto-trigger keywords
154
154
 
155
- - database migration
155
+ - DB migration
156
156
  - create migration
157
157
  - table prefix
158
158
  - column naming
@@ -8,11 +8,11 @@ source: package
8
8
 
9
9
  ## When to use
10
10
 
11
- Use this skill when working with tenant-specific data, customer database connections, or any code that touches the dual-database architecture.
11
+ Use this skill when working with tenant-specific data, customer database connections, or any code that touches the dual-DB architecture.
12
12
 
13
13
 
14
14
  Do NOT use when:
15
- - Single-database applications
15
+ - Single-DB applications
16
16
  - Frontend-only changes
17
17
 
18
18
  ## Procedure: Work with multi-tenancy
@@ -32,7 +32,7 @@ Request → Identify Tenant (JWT / subdomain / API key)
32
32
  → All tenant queries use tenant connection
33
33
  ```
34
34
 
35
- ### Dual-database pattern
35
+ ### Dual-DB pattern
36
36
 
37
37
  | Connection type | Purpose | Scope |
38
38
  |---|---|---|
@@ -53,7 +53,7 @@ Search the codebase for the service responsible for tenant switching. Typical re
53
53
  1. Store tenant context (e.g., in Laravel Context or a singleton)
54
54
  2. Load tenant configuration
55
55
  3. Set monitoring context (tenant ID, name, domain)
56
- 4. Reconfigure the database connection with tenant credentials
56
+ 4. Reconfigure the DB connection with tenant credentials
57
57
  5. Bind tenant-specific services via the container
58
58
 
59
59
  ## Model conventions
@@ -89,7 +89,7 @@ Check the project for the actual connection names and namespace conventions.
89
89
  ## Testing with tenants
90
90
 
91
91
  - Tests use dedicated tenant seeders (check `agents/docs/` for seeder conventions).
92
- - The testing database may consolidate multiple connections into a single DB for simplicity.
92
+ - The testing DB may consolidate multiple connections into a single DB for simplicity.
93
93
  - Use `RefreshDatabase` or manual seeding — never assume a specific tenant state from previous tests.
94
94
 
95
95
  ## Common pitfalls
@@ -111,19 +111,19 @@ Check the project for the actual connection names and namespace conventions.
111
111
 
112
112
  - multi-tenant
113
113
  - tenant isolation
114
- - customer database
114
+ - customer DB
115
115
  - FQDN routing
116
116
 
117
117
  ## Gotcha
118
118
 
119
- - Always verify which database connection is active before running queries — cross-tenant data leaks are critical bugs.
119
+ - Always verify which DB connection is active before running queries — cross-tenant data leaks are critical bugs.
120
120
  - The model forgets to switch back to the main connection after tenant operations.
121
121
  - Queue jobs serialize the connection state — ensure the tenant context is restored when the job runs.
122
122
  - Don't use `DB::connection()` directly — use the tenant switching helpers.
123
123
 
124
124
  ## Do NOT
125
125
 
126
- - Do NOT hardcode database names — always use connection names.
126
+ - Do NOT hardcode DB names — always use connection names.
127
127
  - Do NOT assume `customer_database` is available in service providers or early boot.
128
128
  - Do NOT access tenant data in global middleware that runs before customer identification.
129
129
  - Do NOT store tenant DB credentials in code — they come from the `customer_databases` table.
@@ -0,0 +1,93 @@
1
+ ---
2
+ name: okr-tree-modeling
3
+ description: "Use when decomposing a company objective into team OKRs, auditing a draft OKR tree, or stress-testing an existing one for measurability and laddering."
4
+ status: active
5
+ tier: senior
6
+ source: package
7
+ ---
8
+
9
+ # okr-tree-modeling
10
+
11
+ ## When to use
12
+
13
+ - A leadership team wrote a quarterly objective and needs three measurable KRs that actually move it.
14
+ - A draft OKR tree needs review for orphan KRs, vanity metrics, or KRs that ladder to two parents.
15
+ - A team-level OKR set needs to be checked against the company objective it claims to serve.
16
+
17
+ Do NOT use for ranking competing initiatives within one OKR — that's prioritization, not decomposition (route elsewhere — see Related Skills).
18
+
19
+ ## Procedure
20
+
21
+ ### Step 0: Inspect
22
+
23
+ 1. Identify the cognition cluster. OKR-as-strategy lives near the CEO/COO; OKR-as-PM-tool lives near the head of product. The decomposition mechanic is the same; the ladder-up target differs.
24
+ 2. Confirm timeframe (quarter / half / year) — KR cadence depends on it.
25
+
26
+ ### Step 1: Lock the parent objective
27
+
28
+ 1. Restate the parent in one sentence with **a verb of change** (grow, reduce, ship, win) and an outcome — not an output.
29
+ 2. Bad: "Improve onboarding." Good: "Reduce time-to-first-value for new accounts to under 7 days."
30
+ 3. If the parent has no verb of change or no outcome, the tree is built on sand. Stop and rewrite the parent.
31
+
32
+ ### Step 2: Decompose into 3 KRs
33
+
34
+ 1. Each KR must satisfy four tests: (a) measurable end-state, (b) the team owns the lever, (c) achievable iff the parent is achieved, (d) failing it should be visibly bad.
35
+ 2. Three is the floor and the ceiling. One KR makes the objective brittle; five dilutes ownership.
36
+ 3. Anti-pattern: "ship X feature" as a KR. Shipping is an output. The KR is what changes when the feature lands.
37
+
38
+ ### Step 3: Cascade to team-level
39
+
40
+ 1. For each company KR, define 2–3 team-level KRs that, taken together, achieve the parent KR — not duplicate it.
41
+ 2. Anti-pattern: copy-paste the parent KR with a smaller number ("60% of company KR is 30% for our team"). Real cascades change shape — input metrics for some teams, leading indicators for others.
42
+ 3. Mark each team KR as **trailing** (lagging outcome — revenue, retention) or **leading** (input the team controls — activation rate, response time). A tree that is all-trailing is unactionable.
43
+
44
+ ### Step 4: Cadence + check-ins
45
+
46
+ 1. Weekly check-in: leading KRs only. Trailing KRs are reviewed monthly.
47
+ 2. End of period: confidence score (0.0–1.0) per KR, written 3× across the period to surface drift.
48
+
49
+ ### Step 5: Validate
50
+
51
+ 1. Walk the tree top-down: does every leaf KR ladder cleanly to exactly one parent KR?
52
+ 2. Walk it bottom-up: if every team hits 0.7 confidence, does the company objective land?
53
+ 3. Count vanity metrics — KRs that move but don't matter. If more than zero, rewrite.
54
+
55
+ ## Gotcha
56
+
57
+ - "100% of teams adopt X" is a participation metric, not an outcome KR. The model loves to write these.
58
+ - A KR owned by two teams is owned by no team. Single accountability is non-negotiable.
59
+ - Stretch goals that nobody believes are achievable produce sandbagging on the OKR after, not stretch.
60
+ - "Customer happiness" + NPS is a sentiment proxy, not an outcome metric. Tie KRs to behavior (renewal, expansion, usage), not feeling.
61
+
62
+ ## Do NOT
63
+
64
+ - Do NOT write more than 3 KRs per objective — focus is the entire point.
65
+ - Do NOT use "achieve $X revenue" as a KR for a team that doesn't own pricing or pipeline; that's setting them up to fail blameably.
66
+ - Do NOT cascade by simple percentage allocation — different teams contribute different mechanisms, not different fractions.
67
+
68
+ ## Related Skills
69
+
70
+ **WHEN to use this**
71
+
72
+ - The ask is decomposition of an objective into measurable KRs.
73
+ - A draft OKR tree needs structural review (cascade integrity, leading/trailing balance).
74
+
75
+ **WHEN NOT to use this**
76
+
77
+ - Prioritization of competing features inside one KR — route to [`rice-prioritization`](../rice-prioritization/SKILL.md).
78
+ - Conversion-rate diagnosis on a funnel KR — route to [`funnel-analysis`](../funnel-analysis/SKILL.md).
79
+ - Valuation-impact modeling of strategic objectives — route to [`dcf-modeling`](../dcf-modeling/SKILL.md).
80
+
81
+ ## When the agent should load this
82
+
83
+ - "Help me write OKRs for next quarter."
84
+ - "Review this OKR tree — does it ladder up?"
85
+ - "What KRs would actually move our retention objective?"
86
+ - "Are these team OKRs measurable?"
87
+ - "We have 8 KRs per team — too many?"
88
+
89
+ ## Output
90
+
91
+ 1. **`okr-tree.md`** — markdown tree: company objective → 3 company KRs → 2–3 team KRs each. Each leaf carries owner, measure, target, trailing/leading tag, check-in cadence.
92
+ 2. **`cascade-audit.md`** — orphans (KRs with no parent), oversubscribed parents (KR with >3 children), vanity metrics flagged with a one-line replacement suggestion.
93
+ 3. **`confidence-template.md`** — empty 3-column table (start / mid / end) per KR, ready for the period's confidence updates.
@@ -80,7 +80,7 @@ Focus on code paths with high execution frequency or large data volumes:
80
80
  - Missing CDN for static assets
81
81
  - Missing response caching for read-heavy endpoints
82
82
  - Database connection pooling and limits
83
- - Queue worker concurrency vs database connection limits
83
+ - Queue worker concurrency vs DB connection limits
84
84
 
85
85
  ## Output format
86
86
 
@@ -101,12 +101,12 @@ For each bottleneck:
101
101
  - **performance** — complementary: performance is about writing fast code, this is about finding slow code
102
102
  - **test-performance** — for test suite speed specifically
103
103
  - **bug-analyzer** — some performance issues are actually bugs (N+1, infinite loops)
104
- - **database** — for deep DB optimization guidance
104
+ - **DB** — for deep DB optimization guidance
105
105
 
106
106
  ## Gotcha
107
107
 
108
108
  - Don't present raw numbers without context — "200ms" means nothing without knowing the baseline.
109
- - The model tends to focus on code-level optimization when the bottleneck is a database query.
109
+ - The model tends to focus on code-level optimization when the bottleneck is a DB query.
110
110
  - Profiling in development differs from production — different data volumes, different query plans.
111
111
 
112
112
  ## Do NOT
@@ -53,9 +53,9 @@ For bug fixes and new features, prefer test-driven development:
53
53
 
54
54
  ### Why test-first matters
55
55
 
56
- Tests written **after** implementation pass immediately. Passing immediately proves nothing:
56
+ Tests written **after** impl pass immediately. Passing immediately proves nothing:
57
57
  - The test might test the wrong thing.
58
- - The test might test implementation, not behavior.
58
+ - The test might test impl, not behavior.
59
59
  - You never saw it catch the bug — so you don't know if it would.
60
60
 
61
61
  ### Bug fix TDD
@@ -120,7 +120,7 @@ The test proves the fix works AND prevents regression.
120
120
  - For JSON APIs, assert:
121
121
  - exact relevant fields
122
122
  - error structure when applicable
123
- - database state after the request
123
+ - DB state after the request
124
124
  - Do not only assert `200` — verify meaningful behavior.
125
125
 
126
126
  ## Validation tests
@@ -258,7 +258,7 @@ When reviewing or auditing existing tests, check for these anti-patterns:
258
258
 
259
259
  - Do not test private methods directly.
260
260
  - Do not over-mock Laravel internals.
261
- - Do not assert implementation details when behavior assertions are enough.
261
+ - Do not assert impl details when behavior assertions are enough.
262
262
  - Do not write brittle tests tied to formatting or irrelevant response noise.
263
263
  - Do not create giant tests that cover many behaviors at once.
264
264
  - Do not skip authorization or validation coverage for important endpoints.
@@ -285,7 +285,7 @@ When generating Pest tests:
285
285
  - Don't use `readonly` or `final` on Pest test helper classes — it breaks mocking.
286
286
  - Don't add `use` statements for global classes (`Exception`, `DateTimeImmutable`) in Pest files — they're auto-imported.
287
287
  - The model forgets `$this->travel(5)->seconds()` for time-dependent tests — never rely on `now()` differing between lines.
288
- - Parallel tests share the database — don't assume column values are null unless you explicitly set them.
288
+ - Parallel tests share the DB — don't assume column values are null unless you explicitly set them.
289
289
 
290
290
  ## Do NOT
291
291
 
@@ -297,7 +297,7 @@ When generating Pest tests:
297
297
  When generating new tests, focus on:
298
298
  - **Business logic**: calculations, status transitions, validation rules, data transformations
299
299
  - **Edge cases**: null, empty string, zero, negative numbers, boundary values, max length
300
- - **Error paths**: invalid input, missing dependencies, exception handling
300
+ - **Error paths**: invalid input, missing deps, exception handling
301
301
  - **Different code branches**: if/else, early returns, fallback behavior
302
302
 
303
303
  What NOT to test:
@@ -38,7 +38,7 @@ Do NOT use when:
38
38
  1. Location: `app/Services/{Domain}/` or `app/Modules/{Module}/App/Services/`.
39
39
  2. `declare(strict_types=1)`, proper namespace.
40
40
  3. Constructor inject dependencies (repositories, other services).
41
- 4. Max 4 constructor dependencies — if more, split the service.
41
+ 4. Max 4 constructor deps — if more, split the service.
42
42
 
43
43
  ### Step 2: Implement methods
44
44
 
@@ -69,7 +69,7 @@ public function __invoke(
69
69
 
70
70
  - Run PHPStan on the service — must pass at level 9.
71
71
  - Verify single responsibility: service does one thing, no mixed concerns.
72
- - Confirm all dependencies are constructor-injected (no `app()` or facades in service).
72
+ - Confirm all deps are constructor-injected (no `app()` or facades in service).
73
73
  - Run affected tests — must pass.
74
74
 
75
75
  ## Output format
@@ -11,7 +11,7 @@ source: package
11
11
  Use this skill when:
12
12
 
13
13
  * There is a concrete issue to explain
14
- * Multiple root causes are plausible
14
+ * Multiple root are plausible
15
15
  * The system spans several layers
16
16
  * A shallow single-explanation answer would be risky
17
17
  * `universal-project-analysis` or `bug-analyzer` routes here
@@ -27,7 +27,7 @@ Do NOT use when:
27
27
  * Never stop at the first plausible explanation
28
28
  * Code, docs, and evidence beat intuition
29
29
  * Rejected hypotheses matter
30
- * Multiple interacting causes are common
30
+ * Multiple interacting are common
31
31
  * Uncertainty must be marked explicitly
32
32
 
33
33
  ## Procedure
@@ -89,7 +89,7 @@ Ask:
89
89
 
90
90
  * does this fully explain the behavior?
91
91
  * what remains unexplained?
92
- * could multiple causes interact?
92
+ * could multiple interact?
93
93
  * does contradictory evidence exist?
94
94
 
95
95
  If anything major remains unexplained: continue analysis, do not present a final conclusion yet.
@@ -107,7 +107,7 @@ Check:
107
107
  ## Gotcha
108
108
 
109
109
  * React bugs often come from stale state, not broken logic.
110
- * Missing dependencies in hooks are one of the most common root causes.
110
+ * Missing deps in hooks are one of the most common root causes.
111
111
  * Overusing memoization can make code harder to reason about without solving real problems.
112
112
 
113
113
  ## Do NOT
@@ -34,7 +34,7 @@ Do NOT use when:
34
34
  ### 1. Confirm Symfony version and app shape
35
35
 
36
36
  Check: `composer.lock`, `composer.json`, Symfony packages/components, PHP version, environment config structure.
37
- Validate: Symfony version is explicit, major bundles/components are identified, environment-specific config layout is known.
37
+ Validate: Symfony version is explicit, major bundles/components are identified, env-specific config layout is known.
38
38
 
39
39
  ### 2. Analyze kernel and container boot
40
40
 
@@ -44,7 +44,7 @@ Check:
44
44
 
45
45
  * merge order surprises
46
46
  * missing overrides
47
- * environment config mismatches
47
+ * env config mismatches
48
48
  * heavy bootstrap logic
49
49
 
50
50
  ### 3. Analyze ServiceManager behavior
@@ -96,7 +96,7 @@ Check:
96
96
  ## Gotcha
97
97
 
98
98
  * Many Zend/Laminas issues are caused by config order and service resolution, not controller code.
99
- * Shared services and legacy migration remnants can create cross-request or environment-specific bugs.
99
+ * Shared services and legacy migration remnants can create cross-request or env-specific bugs.
100
100
  * Old project behavior may depend on historical bootstrap side effects that are easy to miss.
101
101
 
102
102
  ## Do NOT
@@ -233,7 +233,7 @@ Each module gets its own file in `agents/analysis/modules/`. Format:
233
233
  ### Phase 3: Data layer
234
234
 
235
235
  - List all models with their connections, tables, and key relationships
236
- - Map database schema: tables, foreign keys, indexes
236
+ - Map DB schema: tables, foreign keys, indexes
237
237
  - Document multi-tenant split (which tables in which DB)
238
238
  - **Output:** `agents/analysis/models/api-database.md`, `customer-database.md`
239
239
 
@@ -242,7 +242,7 @@ Each module gets its own file in `agents/analysis/modules/`. Format:
242
242
  - Identify domains from models, services, routes, and directory structure
243
243
  - For each domain: map models → services → controllers → jobs → events
244
244
  - Document business rules and data flows
245
- - Document inter-domain dependencies
245
+ - Document inter-domain deps
246
246
  - **Output:** `agents/analysis/domains/{domain}.md` (one per domain)
247
247
 
248
248
  ### Phase 5: API surface
@@ -254,7 +254,7 @@ Each module gets its own file in `agents/analysis/modules/`. Format:
254
254
 
255
255
  ### Phase 6: Service map
256
256
 
257
- - List all services with purpose, key methods, and dependencies
257
+ - List all services with purpose, key methods, and deps
258
258
  - Map service → repository → model relationships
259
259
  - Identify God services (too many responsibilities)
260
260
  - **Output:** `agents/analysis/services/service-map.md`
@@ -315,7 +315,7 @@ Each module gets its own file in `agents/analysis/modules/`. Format:
315
315
  ## Output format
316
316
 
317
317
  1. Structured analysis document in agents/analysis/
318
- 2. Tech stack inventory with versions and dependencies
318
+ 2. Tech stack inventory with versions and deps
319
319
  3. Architecture diagram or module map
320
320
 
321
321
  ## Auto-trigger keywords
@@ -0,0 +1,108 @@
1
+ ---
2
+ name: prompt-optimizer
3
+ description: "Use when the user wants a prompt optimized for ChatGPT, Claude, Gemini, or another AI — 'make this prompt better', 'optimize for ChatGPT', 'rewrite my prompt' — even without saying 'optimize'."
4
+ source: package
5
+ ---
6
+
7
+ # prompt-optimizer
8
+
9
+ > Persona: **Lyra** — a master-level prompt-optimization specialist. Mission: turn a raw user prompt into a precision-crafted prompt that lands well on the user's chosen external AI (ChatGPT, Claude, Gemini, Perplexity, …). Sibling of [`refine-prompt`](../refine-prompt/SKILL.md) which is engine-inbound; this skill is engine-outbound (the polished prompt is text the user will paste elsewhere).
10
+
11
+ ## When to use
12
+
13
+ - The user pastes a rough prompt and asks for it to be optimized, rewritten, sharpened, or "made better".
14
+ - The user mentions a target AI (ChatGPT, Claude, Gemini, Perplexity, Copilot) and wants their prompt tuned for it.
15
+ - The user invokes [`/optimize-prompt`](../../commands/optimize-prompt.md).
16
+ - The user describes a goal ("I need a marketing-email prompt for ChatGPT") and the deliverable is a prompt, not the email itself.
17
+
18
+ ## When NOT to use (near-misses)
19
+
20
+ | Phrasing | Route to |
21
+ |---|---|
22
+ | "refine this ticket / prompt for the engine" | [`refine-prompt`](../refine-prompt/SKILL.md) |
23
+ | "make this skill description pushier" | [`description-assist`](../description-assist/SKILL.md) |
24
+ | "write the marketing email itself" | direct execution — the user wants the artifact, not a prompt |
25
+ | "review my code / commit" | [`review-changes`](../../commands/review-changes.md) and friends |
26
+
27
+ ## The 4-D Methodology
28
+
29
+ 1. **Deconstruct** — extract core intent, key entities, output shape, constraints; map what's provided vs missing.
30
+ 2. **Diagnose** — audit clarity gaps, ambiguity, missing specificity, missing structure; flag unstated assumptions.
31
+ 3. **Develop** — pick techniques by request type:
32
+ - *Creative* → multi-perspective + tone anchoring
33
+ - *Technical* → constraint-based + precision focus
34
+ - *Educational* → few-shot examples + clear structure
35
+ - *Complex* → chain-of-thought + systematic framing
36
+ - Assign an AI role/expertise; layer context; add logical structure.
37
+ 4. **Deliver** — output the optimized prompt + a short "what changed" + (DETAIL only) techniques applied + one pro-tip.
38
+
39
+ ## Modes — BASIC vs DETAIL
40
+
41
+ **Auto-detect on first turn:**
42
+
43
+ | Signal | Mode |
44
+ |---|---|
45
+ | User wrote "BASIC" or "DETAIL" verbatim | honor it |
46
+ | One-line ask, common task (resume help, casual email, summary) | BASIC |
47
+ | Multi-paragraph context, professional/technical scope, named audience, named tone | DETAIL |
48
+ | Target AI not named AND request implies platform-sensitive output | DETAIL |
49
+ | **Tiebreaker** — both BASIC and DETAIL signals fire | DETAIL (safer default) |
50
+
51
+ **BASIC** — apply core 4-D fixes silently, return optimized prompt + 3-bullet "what changed". No questions.
52
+
53
+ **DETAIL** — gather missing context **one question per turn** (Iron Law from `ask-when-uncertain`). Stop asking once Deconstruct + Diagnose are clean. Then deliver.
54
+
55
+ **Always inform mode + override**: first reply names the chosen mode and offers the other in one numbered-options block. Re-pick is silent on subsequent turns.
56
+
57
+ ## Procedure
58
+
59
+ ### 1. Receive input
60
+
61
+ Capture: (a) the rough prompt, (b) target AI if named, (c) explicit BASIC/DETAIL marker if present. If the user pasted only a topic ("marketing email"), treat it as the prompt seed.
62
+
63
+ ### 2. Auto-detect mode + announce
64
+
65
+ Apply the table above. State: *"Running in BASIC — say `DETAIL` to switch."* (or vice-versa). Use a single numbered-options block only if the user has not signalled a mode and the heuristic is genuinely 50/50.
66
+
67
+ ### 3. Inspect + Diagnose (Deconstruct)
68
+
69
+ Identify each slot in the rough prompt: intent · entities · output shape · constraints · target AI · tone · audience. List every missing slot. Check for ambiguity, unstated assumptions, and contradictory requirements.
70
+
71
+ ### 4a. BASIC path
72
+
73
+ Fill missing slots with safe defaults (general audience, neutral tone, the named AI or "any modern LLM"). Skip to step 5.
74
+
75
+ ### 4b. DETAIL path
76
+
77
+ Ask **one** question for the highest-leverage missing slot. Order: target AI → output shape → audience → tone → constraints. Stop asking once the prompt would land cleanly. Never batch. Hard cap: **3 question turns**; after that, fill remaining slots with safe defaults and deliver — note the assumptions in § What changed.
78
+
79
+ ### 5. Develop
80
+
81
+ Pick techniques per request type (see § 4-D step 3). Assign role ("You are a senior X…"), layer context, add structure (numbered steps, bullet headers, output format spec, length cap), and inject specificity (concrete numbers, named formats, explicit success criteria — replace "good", "professional", "high-quality" with measurable criteria).
82
+
83
+ ### 6. Deliver
84
+
85
+ Format per § Output format. Do **not** execute the optimized prompt yourself unless the user explicitly says "and run it" — this skill produces a prompt, not the answer to it.
86
+
87
+ ## Output format
88
+
89
+ 1. **Optimized prompt** — fenced code block, ready to copy. Top line names the target AI if known.
90
+ 2. **What changed** — 3-5 bullets, each ≤ 12 words.
91
+ 3. **Techniques applied** *(DETAIL only)* — bullet list naming the techniques (e.g. "few-shot", "chain-of-thought", "role assignment").
92
+ 4. **Pro tip** — one sentence, platform-specific when target AI is known (e.g. "Claude responds well to XML tags"; "ChatGPT honors length caps in the system message").
93
+
94
+ ## Gotcha
95
+
96
+ - The model tends to **execute** the rough prompt instead of optimizing it — when the user pastes "write a marketing email", treat the whole line as the *seed*, not the *task*. Confirm by asking "optimize this prompt, or write the email?" if genuinely ambiguous.
97
+ - The model tends to ask **multiple** clarifying questions in DETAIL mode — Iron Law is one per turn. Pick the highest-leverage missing slot and stop.
98
+ - The model tends to invent platform tips that aren't true — only emit a pro-tip when the technique is well-known for the named AI; otherwise omit the section.
99
+ - The model tends to over-engineer BASIC mode — for a one-line ask, the optimized prompt should still be short. No 800-word system prompts for "help with my resume".
100
+ - Don't drift into German welcome text. The optimized prompt mirrors the user's source-language preference; the skill's own scaffolding stays English (per `language-and-tone` for `.md`).
101
+ - The model tends to **mix languages** in the optimized prompt when the user wrote in German but named an English-speaking target audience — pick one language for the whole optimized prompt body (default: source-language of the rough prompt unless the user explicitly named the target audience's language).
102
+
103
+ ## Do NOT
104
+
105
+ - Do NOT execute the optimized prompt and return its answer unless the user explicitly asks for both.
106
+ - Do NOT ask more than one clarifying question per turn (`ask-when-uncertain` Iron Law).
107
+ - Do NOT add an "I'm Lyra" preamble on every turn — the welcome belongs to the command entry point, not every reply.
108
+ - Do NOT modify project files — this skill is conversational, no file writes, no commits.
@@ -54,7 +54,7 @@ Inspect truth-defining files:
54
54
  - Config files, tests, existing docs
55
55
 
56
56
  Verify: install steps exist, commands work, features are implemented,
57
- dependencies are real.
57
+ deps are real.
58
58
 
59
59
  ### 3. Validate installation and setup
60
60
 
@@ -0,0 +1,100 @@
1
+ ---
2
+ name: rice-prioritization
3
+ description: "Use when ranking competing initiatives for a roadmap, breaking a tie between two features, or auditing a backlog for hidden low-value work via Reach × Impact × Confidence ÷ Effort."
4
+ status: active
5
+ tier: senior
6
+ source: package
7
+ ---
8
+
9
+ # rice-prioritization
10
+
11
+ ## When to use
12
+
13
+ - A backlog has more candidates than capacity for the next quarter and someone has to pick.
14
+ - A PM and an engineering lead disagree on what ships first and need a shared framework.
15
+ - A draft roadmap reads like a wish list — no transparency on **why** these and not those.
16
+
17
+ Do NOT use for valuation, OKR decomposition, or funnel-stage diagnosis (see Related Skills).
18
+
19
+ ## Procedure
20
+
21
+ ### Step 0: Inspect
22
+
23
+ 1. Confirm there are at least 5 candidates. RICE on 2 items is theatre; just argue the merits.
24
+ 2. Confirm there is a shared definition of the **target user** for "Reach" — RICE breaks if two scorers count different populations.
25
+
26
+ ### Step 1: Score Reach
27
+
28
+ 1. Reach = number of users / events / requests **per fixed time window** (per quarter is the default).
29
+ 2. Use absolute counts pulled from analytics or product DB, not percentages — percentages hide tiny denominators.
30
+ 3. If the data isn't there, write the query you'd run and say so. Do not invent numbers.
31
+
32
+ ### Step 2: Score Impact
33
+
34
+ 1. Use the canonical 5-point scale: 0.25 (minimal) · 0.5 (low) · 1 (medium) · 2 (high) · 3 (massive).
35
+ 2. Anchor each level with a concrete past shipped feature ("medium = like the search filter we shipped Q2"). Without anchors, scorers drift.
36
+ 3. Impact is **per affected user**, not aggregate. Aggregate is what RICE produces, not what you input.
37
+
38
+ ### Step 3: Score Confidence
39
+
40
+ 1. Confidence is a **percentage** — 100 / 80 / 50 / "low and we should not score this yet".
41
+ 2. Anything below 50 means: stop, do a spike or a research week, then re-score. RICE does not rescue ignorance.
42
+ 3. Confidence multiplies — it is the model's discount for unknown unknowns.
43
+
44
+ ### Step 4: Score Effort
45
+
46
+ 1. Effort = person-months for the smallest viable shippable slice. Not the fantasy version.
47
+ 2. Engineering owns this number. PMs scoring effort is the most common process failure.
48
+ 3. Effort < 0.5 person-months almost always means scope is underestimated — surface and ask.
49
+
50
+ ### Step 5: Compute and rank
51
+
52
+ 1. RICE = `(Reach × Impact × Confidence) / Effort`.
53
+ 2. Rank descending. The score is the artefact, not the answer — read the top 5 with a critical eye.
54
+ 3. Anti-pattern: treating RICE rank as a contract. It is a structured argument, not a verdict.
55
+
56
+ ### Step 6: Audit the bottom
57
+
58
+ 1. Look at the bottom quartile. If a strategic must-have lives there, the model has a calibration error — usually Reach or Impact.
59
+ 2. Look at the top item. If it is obviously absurd (e.g. one ad-hoc admin tool above a strategic platform play), the input scoring is uncalibrated.
60
+
61
+ ## Gotcha
62
+
63
+ - Reach in percentages hides "this feature affects 100% of … 12 users."
64
+ - Impact inflation: every PM thinks every feature is a 2 or 3. Force at least 30% of items to score 0.5 or below.
65
+ - Confidence is the only multiplier that punishes uncertainty — do not let it default to 80 for everything.
66
+ - Effort discrepancy between PM and engineering on the same row is itself the signal — investigate, do not average.
67
+
68
+ ## Do NOT
69
+
70
+ - Do NOT rank fewer than 5 candidates with RICE — overhead exceeds value.
71
+ - Do NOT mix strategic bets and BAU tickets in the same RICE table; their effort scales differ by 10×.
72
+ - Do NOT ship a roadmap that is exactly the RICE-sorted top-N — you need at least one strategic outlier with a written rationale.
73
+
74
+ ## Related Skills
75
+
76
+ **WHEN to use this**
77
+
78
+ - Ranking is the actual question.
79
+ - The team needs a shared, auditable scoring frame.
80
+
81
+ **WHEN NOT to use this**
82
+
83
+ - Decomposing an objective into KRs — route to [`okr-tree-modeling`](../okr-tree-modeling/SKILL.md).
84
+ - Diagnosing why a funnel stage drops — route to [`funnel-analysis`](../funnel-analysis/SKILL.md).
85
+ - Modelling whether an investment is worth its capital cost — route to [`dcf-modeling`](../dcf-modeling/SKILL.md).
86
+ - CAC / LTV / payback questions — route to [`unit-economics-modeling`](../unit-economics-modeling/SKILL.md).
87
+
88
+ ## When the agent should load this
89
+
90
+ - "Help me prioritize the backlog for Q3."
91
+ - "RICE-score these features."
92
+ - "Why is X above Y on the roadmap?"
93
+ - "We have 30 ideas and 6 engineers — what ships?"
94
+ - "Audit our roadmap for low-value work."
95
+
96
+ ## Output
97
+
98
+ 1. **`rice-table.md`** — markdown table: Item · Reach · Impact · Confidence · Effort · RICE · Owner · Notes. Sorted descending by RICE.
99
+ 2. **`calibration-notes.md`** — one paragraph per anchor (what "Impact = 2" means with a named past feature) plus a list of items with confidence < 50 marked for spike-first.
100
+ 3. **`top-5-critique.md`** — one paragraph per top-5 item: is the rank defensible, and what would change it.