@hivehub/rulebook 5.4.1 → 5.5.1

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 (418) hide show
  1. package/.claude/commands/analysis.md +35 -35
  2. package/.claude/commands/continue.md +33 -33
  3. package/.claude/commands/ralph-config.md +112 -112
  4. package/.claude/commands/ralph-history.md +110 -110
  5. package/.claude/commands/ralph-init.md +72 -72
  6. package/.claude/commands/ralph-pause-resume.md +105 -105
  7. package/.claude/commands/ralph-run.md +101 -101
  8. package/.claude/commands/ralph-status.md +76 -76
  9. package/.claude/commands/rulebook-decision-create.md +55 -55
  10. package/.claude/commands/rulebook-decision-list.md +15 -15
  11. package/.claude/commands/rulebook-knowledge-add.md +41 -41
  12. package/.claude/commands/rulebook-knowledge-list.md +15 -15
  13. package/.claude/commands/rulebook-learn-capture.md +48 -48
  14. package/.claude/commands/rulebook-learn-list.md +13 -13
  15. package/.claude/commands/rulebook-memory-save.md +48 -48
  16. package/.claude/commands/rulebook-memory-search.md +47 -47
  17. package/.claude/commands/rulebook-task-apply.md +67 -67
  18. package/.claude/commands/rulebook-task-archive.md +94 -94
  19. package/.claude/commands/rulebook-task-create.md +93 -93
  20. package/.claude/commands/rulebook-task-list.md +42 -42
  21. package/.claude/commands/rulebook-task-show.md +52 -52
  22. package/.claude/commands/rulebook-task-validate.md +53 -53
  23. package/.claude-plugin/marketplace.json +28 -28
  24. package/.claude-plugin/plugin.json +8 -8
  25. package/README.md +394 -393
  26. package/dist/core/generator.d.ts +1 -1
  27. package/dist/core/generator.d.ts.map +1 -1
  28. package/dist/core/generator.js +1 -0
  29. package/dist/core/generator.js.map +1 -1
  30. package/dist/hooks/terse-activate.d.ts +59 -0
  31. package/dist/hooks/terse-activate.d.ts.map +1 -0
  32. package/dist/hooks/terse-activate.js +149 -0
  33. package/dist/hooks/terse-activate.js.map +1 -0
  34. package/dist/hooks/terse-config.d.ts +51 -0
  35. package/dist/hooks/terse-config.d.ts.map +1 -0
  36. package/dist/hooks/terse-config.js +130 -0
  37. package/dist/hooks/terse-config.js.map +1 -0
  38. package/dist/hooks/terse-mode-tracker.d.ts +78 -0
  39. package/dist/hooks/terse-mode-tracker.d.ts.map +1 -0
  40. package/dist/hooks/terse-mode-tracker.js +213 -0
  41. package/dist/hooks/terse-mode-tracker.js.map +1 -0
  42. package/dist/index.js +0 -0
  43. package/dist/mcp/rulebook-server.js +0 -0
  44. package/package.json +21 -22
  45. package/templates/agents/accessibility-reviewer.md +43 -43
  46. package/templates/agents/api-designer.md +42 -42
  47. package/templates/agents/architect.md +51 -51
  48. package/templates/agents/build-engineer.md +36 -36
  49. package/templates/agents/code-reviewer.md +47 -47
  50. package/templates/agents/compiler/codegen-debugger.md +34 -34
  51. package/templates/agents/compiler/stdlib-engineer.md +28 -28
  52. package/templates/agents/compiler/test-coverage-guardian.md +31 -31
  53. package/templates/agents/context-intelligence.md +52 -52
  54. package/templates/agents/database-architect.md +41 -41
  55. package/templates/agents/devops-engineer.md +42 -42
  56. package/templates/agents/docs-writer.md +38 -38
  57. package/templates/agents/game-engine/cpp-core-expert.md +35 -35
  58. package/templates/agents/game-engine/render-engineer.md +22 -22
  59. package/templates/agents/game-engine/shader-engineer.md +38 -38
  60. package/templates/agents/game-engine/systems-integration.md +43 -43
  61. package/templates/agents/generic/code-reviewer.md +41 -41
  62. package/templates/agents/generic/docs-writer.md +25 -25
  63. package/templates/agents/generic/project-manager.md +36 -36
  64. package/templates/agents/generic/researcher.md +34 -34
  65. package/templates/agents/generic/test-engineer.md +41 -41
  66. package/templates/agents/i18n-engineer.md +42 -42
  67. package/templates/agents/implementer.md +42 -42
  68. package/templates/agents/migration-engineer.md +42 -42
  69. package/templates/agents/mobile/platform-specialist.md +22 -22
  70. package/templates/agents/mobile/ui-engineer.md +22 -22
  71. package/templates/agents/performance-engineer.md +49 -49
  72. package/templates/agents/refactoring-agent.md +41 -41
  73. package/templates/agents/researcher.md +38 -38
  74. package/templates/agents/security-reviewer.md +40 -40
  75. package/templates/agents/team-lead.md +37 -37
  76. package/templates/agents/tester.md +48 -48
  77. package/templates/agents/ux-reviewer.md +43 -43
  78. package/templates/agents/web-app/api-designer.md +22 -22
  79. package/templates/agents/web-app/backend-engineer.md +30 -30
  80. package/templates/agents/web-app/database-engineer.md +22 -22
  81. package/templates/agents/web-app/frontend-engineer.md +29 -29
  82. package/templates/agents/web-app/security-reviewer.md +32 -32
  83. package/templates/ci/rulebook-review.yml +26 -26
  84. package/templates/cli/AIDER.md +49 -49
  85. package/templates/cli/AMAZON_Q.md +25 -25
  86. package/templates/cli/AUGGIE.md +32 -32
  87. package/templates/cli/CLAUDE.md +117 -117
  88. package/templates/cli/CLINE.md +99 -99
  89. package/templates/cli/CODEBUDDY.md +20 -20
  90. package/templates/cli/CODEIUM.md +20 -20
  91. package/templates/cli/CODEX.md +21 -21
  92. package/templates/cli/CONTINUE.md +34 -34
  93. package/templates/cli/CURSOR_CLI.md +62 -62
  94. package/templates/cli/FACTORY.md +18 -18
  95. package/templates/cli/GEMINI.md +35 -35
  96. package/templates/cli/KILOCODE.md +18 -18
  97. package/templates/cli/OPENCODE.md +18 -18
  98. package/templates/cli/_GENERIC_TEMPLATE.md +29 -29
  99. package/templates/commands/rulebook-decision-create.md +55 -55
  100. package/templates/commands/rulebook-decision-list.md +15 -15
  101. package/templates/commands/rulebook-knowledge-add.md +41 -41
  102. package/templates/commands/rulebook-knowledge-list.md +15 -15
  103. package/templates/commands/rulebook-learn-capture.md +48 -48
  104. package/templates/commands/rulebook-learn-list.md +13 -13
  105. package/templates/commands/rulebook-memory-save.md +48 -48
  106. package/templates/commands/rulebook-memory-search.md +47 -47
  107. package/templates/commands/rulebook-task-apply.md +67 -67
  108. package/templates/commands/rulebook-task-archive.md +94 -94
  109. package/templates/commands/rulebook-task-create.md +93 -93
  110. package/templates/commands/rulebook-task-list.md +42 -42
  111. package/templates/commands/rulebook-task-show.md +52 -52
  112. package/templates/commands/rulebook-task-validate.md +53 -53
  113. package/templates/compact-context/_default.md +23 -23
  114. package/templates/compact-context/cpp.md +26 -26
  115. package/templates/compact-context/go.md +26 -26
  116. package/templates/compact-context/python.md +26 -26
  117. package/templates/compact-context/rust.md +28 -28
  118. package/templates/compact-context/typescript.md +29 -29
  119. package/templates/core/AGENTS_LEAN.md +26 -1
  120. package/templates/core/AGENTS_OVERRIDE.md +16 -16
  121. package/templates/core/AGENT_AUTOMATION.md +296 -296
  122. package/templates/core/CLAUDE_MD_v2.md +90 -71
  123. package/templates/core/DAG.md +304 -304
  124. package/templates/core/DECISIONS.md +38 -38
  125. package/templates/core/DOCUMENTATION_RULES.md +36 -36
  126. package/templates/core/KNOWLEDGE.md +49 -49
  127. package/templates/core/MULTI_AGENT.md +74 -74
  128. package/templates/core/PLANS.md +28 -28
  129. package/templates/core/QUALITY_ENFORCEMENT.md +68 -68
  130. package/templates/core/RALPH.md +471 -471
  131. package/templates/core/RULEBOOK.md +1947 -1947
  132. package/templates/core/TIER1_PROHIBITIONS.md +154 -154
  133. package/templates/core/TOKEN_OPTIMIZATION.md +49 -49
  134. package/templates/frameworks/ANGULAR.md +36 -36
  135. package/templates/frameworks/DJANGO.md +83 -83
  136. package/templates/frameworks/ELECTRON.md +147 -147
  137. package/templates/frameworks/FLASK.md +38 -38
  138. package/templates/frameworks/FLUTTER.md +55 -55
  139. package/templates/frameworks/JQUERY.md +32 -32
  140. package/templates/frameworks/LARAVEL.md +38 -38
  141. package/templates/frameworks/NESTJS.md +43 -43
  142. package/templates/frameworks/NEXTJS.md +127 -127
  143. package/templates/frameworks/NUXT.md +40 -40
  144. package/templates/frameworks/RAILS.md +66 -66
  145. package/templates/frameworks/REACT.md +38 -38
  146. package/templates/frameworks/REACT_NATIVE.md +47 -47
  147. package/templates/frameworks/SPRING.md +39 -39
  148. package/templates/frameworks/SYMFONY.md +36 -36
  149. package/templates/frameworks/VUE.md +36 -36
  150. package/templates/frameworks/ZEND.md +35 -35
  151. package/templates/git/CI_CD_PATTERNS.md +661 -661
  152. package/templates/git/GITHUB_ACTIONS.md +728 -728
  153. package/templates/git/GITLAB_CI.md +730 -730
  154. package/templates/git/GIT_WORKFLOW.md +1192 -1192
  155. package/templates/git/SECRETS_MANAGEMENT.md +585 -585
  156. package/templates/hooks/COMMIT_MSG.md +530 -530
  157. package/templates/hooks/POST_CHECKOUT.md +546 -546
  158. package/templates/hooks/PREPARE_COMMIT_MSG.md +619 -619
  159. package/templates/hooks/PRE_COMMIT.md +414 -414
  160. package/templates/hooks/PRE_PUSH.md +601 -601
  161. package/templates/hooks/check-context-and-handoff.ps1 +58 -58
  162. package/templates/hooks/check-context-and-handoff.sh +76 -76
  163. package/templates/hooks/enforce-team-for-background-agents.ps1 +63 -63
  164. package/templates/hooks/enforce-team-for-background-agents.sh +55 -55
  165. package/templates/hooks/on-compact-reinject.sh +34 -34
  166. package/templates/hooks/resume-from-handoff.ps1 +40 -40
  167. package/templates/hooks/resume-from-handoff.sh +61 -61
  168. package/templates/hooks/terse-activate.ps1 +143 -143
  169. package/templates/hooks/terse-activate.sh +197 -197
  170. package/templates/hooks/terse-mode-tracker.ps1 +153 -153
  171. package/templates/hooks/terse-mode-tracker.sh +187 -187
  172. package/templates/ides/CONTINUE_RULES.md +16 -16
  173. package/templates/ides/COPILOT.md +37 -37
  174. package/templates/ides/COPILOT_INSTRUCTIONS.md +23 -23
  175. package/templates/ides/CURSOR.md +43 -43
  176. package/templates/ides/GEMINI_RULES.md +17 -17
  177. package/templates/ides/JETBRAINS_AI.md +35 -35
  178. package/templates/ides/REPLIT.md +36 -36
  179. package/templates/ides/TABNINE.md +29 -29
  180. package/templates/ides/VSCODE.md +40 -40
  181. package/templates/ides/WINDSURF.md +36 -36
  182. package/templates/ides/WINDSURF_RULES.md +14 -14
  183. package/templates/ides/ZED.md +32 -32
  184. package/templates/ides/cursor-mdc/go.mdc +24 -24
  185. package/templates/ides/cursor-mdc/python.mdc +24 -24
  186. package/templates/ides/cursor-mdc/quality.mdc +25 -25
  187. package/templates/ides/cursor-mdc/ralph.mdc +39 -39
  188. package/templates/ides/cursor-mdc/rulebook.mdc +38 -38
  189. package/templates/ides/cursor-mdc/rust.mdc +24 -24
  190. package/templates/ides/cursor-mdc/typescript.mdc +25 -25
  191. package/templates/languages/C.md +333 -333
  192. package/templates/languages/CPP.md +743 -743
  193. package/templates/languages/CSHARP.md +417 -417
  194. package/templates/languages/ELIXIR.md +454 -454
  195. package/templates/languages/ERLANG.md +361 -361
  196. package/templates/languages/GO.md +645 -645
  197. package/templates/languages/HASKELL.md +177 -177
  198. package/templates/languages/JAVA.md +607 -607
  199. package/templates/languages/JAVASCRIPT.md +631 -631
  200. package/templates/languages/JULIA.md +97 -97
  201. package/templates/languages/KOTLIN.md +511 -511
  202. package/templates/languages/LISP.md +100 -100
  203. package/templates/languages/LUA.md +74 -74
  204. package/templates/languages/OBJECTIVEC.md +90 -90
  205. package/templates/languages/PHP.md +416 -416
  206. package/templates/languages/PYTHON.md +682 -682
  207. package/templates/languages/RUBY.md +421 -421
  208. package/templates/languages/RUST.md +477 -477
  209. package/templates/languages/SAS.md +73 -73
  210. package/templates/languages/SCALA.md +348 -348
  211. package/templates/languages/SOLIDITY.md +580 -580
  212. package/templates/languages/SQL.md +137 -137
  213. package/templates/languages/SWIFT.md +466 -466
  214. package/templates/languages/TYPESCRIPT.md +591 -591
  215. package/templates/languages/ZIG.md +265 -265
  216. package/templates/modules/ATLASSIAN.md +255 -255
  217. package/templates/modules/CONTEXT7.md +54 -54
  218. package/templates/modules/FIGMA.md +267 -267
  219. package/templates/modules/GITHUB_MCP.md +64 -64
  220. package/templates/modules/GRAFANA.md +328 -328
  221. package/templates/modules/MEMORY.md +126 -126
  222. package/templates/modules/NOTION.md +247 -247
  223. package/templates/modules/PLAYWRIGHT.md +90 -90
  224. package/templates/modules/RULEBOOK_MCP.md +208 -208
  225. package/templates/modules/SERENA.md +337 -337
  226. package/templates/modules/SUPABASE.md +223 -223
  227. package/templates/modules/SYNAP.md +69 -69
  228. package/templates/modules/VECTORIZER.md +63 -63
  229. package/templates/modules/sequential-thinking.md +42 -42
  230. package/templates/ralph/ralph-history.bat +4 -4
  231. package/templates/ralph/ralph-history.sh +5 -5
  232. package/templates/ralph/ralph-init.bat +5 -5
  233. package/templates/ralph/ralph-init.sh +5 -5
  234. package/templates/ralph/ralph-pause.bat +5 -5
  235. package/templates/ralph/ralph-pause.sh +5 -5
  236. package/templates/ralph/ralph-run.bat +5 -5
  237. package/templates/ralph/ralph-run.sh +5 -5
  238. package/templates/ralph/ralph-status.bat +4 -4
  239. package/templates/ralph/ralph-status.sh +5 -5
  240. package/templates/rules/consult-analysis-before-implementing.md +23 -23
  241. package/templates/rules/cpp.md +46 -46
  242. package/templates/rules/csharp.md +44 -44
  243. package/templates/rules/diagnostic-first.md +39 -39
  244. package/templates/rules/fail-twice-escalate.md +46 -46
  245. package/templates/rules/follow-task-sequence.md +36 -36
  246. package/templates/rules/git-safety.md +29 -29
  247. package/templates/rules/go.md +40 -40
  248. package/templates/rules/incremental-implementation.md +56 -56
  249. package/templates/rules/incremental-tests.md +29 -29
  250. package/templates/rules/java.md +43 -43
  251. package/templates/rules/javascript.md +39 -39
  252. package/templates/rules/knowledge-base-usage.md +41 -41
  253. package/templates/rules/multi-agent-teams.md +75 -75
  254. package/templates/rules/no-deferred.md +31 -31
  255. package/templates/rules/no-shortcuts.md +30 -30
  256. package/templates/rules/python.md +43 -43
  257. package/templates/rules/research-first.md +30 -30
  258. package/templates/rules/respect-handoff-trigger.md +41 -41
  259. package/templates/rules/rust.md +40 -40
  260. package/templates/rules/sequential-editing.md +21 -21
  261. package/templates/rules/session-workflow.md +24 -24
  262. package/templates/rules/task-decomposition.md +32 -32
  263. package/templates/rules/typescript.md +40 -40
  264. package/templates/services/AZURE_BLOB.md +184 -184
  265. package/templates/services/CASSANDRA.md +239 -239
  266. package/templates/services/DATADOG.md +26 -26
  267. package/templates/services/DOCKER.md +124 -124
  268. package/templates/services/DOCKER_COMPOSE.md +168 -168
  269. package/templates/services/DYNAMODB.md +308 -308
  270. package/templates/services/ELASTICSEARCH.md +347 -347
  271. package/templates/services/GCS.md +178 -178
  272. package/templates/services/HELM.md +194 -194
  273. package/templates/services/INFLUXDB.md +265 -265
  274. package/templates/services/KAFKA.md +341 -341
  275. package/templates/services/KUBERNETES.md +208 -208
  276. package/templates/services/MARIADB.md +183 -183
  277. package/templates/services/MEMCACHED.md +242 -242
  278. package/templates/services/MINIO.md +201 -201
  279. package/templates/services/MONGODB.md +268 -268
  280. package/templates/services/MYSQL.md +358 -358
  281. package/templates/services/NEO4J.md +247 -247
  282. package/templates/services/OPENTELEMETRY.md +25 -25
  283. package/templates/services/ORACLE.md +290 -290
  284. package/templates/services/PINO.md +24 -24
  285. package/templates/services/POSTGRESQL.md +326 -326
  286. package/templates/services/PROMETHEUS.md +33 -33
  287. package/templates/services/RABBITMQ.md +286 -286
  288. package/templates/services/REDIS.md +292 -292
  289. package/templates/services/S3.md +298 -298
  290. package/templates/services/SENTRY.md +23 -23
  291. package/templates/services/SQLITE.md +294 -294
  292. package/templates/services/SQLSERVER.md +294 -294
  293. package/templates/services/WINSTON.md +30 -30
  294. package/templates/skills/cli/aider/SKILL.md +59 -59
  295. package/templates/skills/cli/amazon-q/SKILL.md +35 -35
  296. package/templates/skills/cli/auggie/SKILL.md +42 -42
  297. package/templates/skills/cli/claude/SKILL.md +42 -42
  298. package/templates/skills/cli/cline/SKILL.md +42 -42
  299. package/templates/skills/cli/codebuddy/SKILL.md +30 -30
  300. package/templates/skills/cli/codeium/SKILL.md +30 -30
  301. package/templates/skills/cli/codex/SKILL.md +31 -31
  302. package/templates/skills/cli/continue/SKILL.md +44 -44
  303. package/templates/skills/cli/cursor-cli/SKILL.md +38 -38
  304. package/templates/skills/cli/factory/SKILL.md +28 -28
  305. package/templates/skills/cli/gemini/SKILL.md +45 -45
  306. package/templates/skills/cli/kilocode/SKILL.md +28 -28
  307. package/templates/skills/cli/opencode/SKILL.md +28 -28
  308. package/templates/skills/core/agent-automation/SKILL.md +194 -194
  309. package/templates/skills/core/dag/SKILL.md +314 -314
  310. package/templates/skills/core/documentation-rules/SKILL.md +46 -46
  311. package/templates/skills/core/karpathy-guidelines/SKILL.md +93 -0
  312. package/templates/skills/core/quality-enforcement/SKILL.md +78 -78
  313. package/templates/skills/core/rulebook/SKILL.md +176 -176
  314. package/templates/skills/core/rulebook-terse/SKILL.md +116 -116
  315. package/templates/skills/core/rulebook-terse-commit/SKILL.md +96 -96
  316. package/templates/skills/core/rulebook-terse-review/SKILL.md +112 -112
  317. package/templates/skills/dev/accessibility/SKILL.md +17 -17
  318. package/templates/skills/dev/analysis/SKILL.md +19 -19
  319. package/templates/skills/dev/api-design/SKILL.md +15 -15
  320. package/templates/skills/dev/architect/SKILL.md +17 -17
  321. package/templates/skills/dev/build-fix/SKILL.md +17 -17
  322. package/templates/skills/dev/db-design/SKILL.md +15 -15
  323. package/templates/skills/dev/debug/SKILL.md +16 -16
  324. package/templates/skills/dev/deploy/SKILL.md +17 -17
  325. package/templates/skills/dev/docs/SKILL.md +17 -17
  326. package/templates/skills/dev/handoff/SKILL.md +27 -27
  327. package/templates/skills/dev/migrate/SKILL.md +15 -15
  328. package/templates/skills/dev/perf/SKILL.md +17 -17
  329. package/templates/skills/dev/refactor/SKILL.md +17 -17
  330. package/templates/skills/dev/research/SKILL.md +14 -14
  331. package/templates/skills/dev/review/SKILL.md +18 -18
  332. package/templates/skills/dev/security-audit/SKILL.md +17 -17
  333. package/templates/skills/frameworks/angular/SKILL.md +46 -46
  334. package/templates/skills/frameworks/django/SKILL.md +93 -93
  335. package/templates/skills/frameworks/electron/SKILL.md +157 -157
  336. package/templates/skills/frameworks/flask/SKILL.md +48 -48
  337. package/templates/skills/frameworks/flutter/SKILL.md +65 -65
  338. package/templates/skills/frameworks/jquery/SKILL.md +42 -42
  339. package/templates/skills/frameworks/laravel/SKILL.md +48 -48
  340. package/templates/skills/frameworks/nestjs/SKILL.md +53 -53
  341. package/templates/skills/frameworks/nextjs/SKILL.md +137 -137
  342. package/templates/skills/frameworks/nuxt/SKILL.md +50 -50
  343. package/templates/skills/frameworks/rails/SKILL.md +76 -76
  344. package/templates/skills/frameworks/react/SKILL.md +48 -48
  345. package/templates/skills/frameworks/react-native/SKILL.md +57 -57
  346. package/templates/skills/frameworks/spring/SKILL.md +49 -49
  347. package/templates/skills/frameworks/symfony/SKILL.md +46 -46
  348. package/templates/skills/frameworks/vue/SKILL.md +46 -46
  349. package/templates/skills/frameworks/zend/SKILL.md +45 -45
  350. package/templates/skills/ides/copilot/SKILL.md +47 -47
  351. package/templates/skills/ides/cursor/SKILL.md +53 -53
  352. package/templates/skills/ides/jetbrains-ai/SKILL.md +45 -45
  353. package/templates/skills/ides/replit/SKILL.md +46 -46
  354. package/templates/skills/ides/tabnine/SKILL.md +39 -39
  355. package/templates/skills/ides/vscode/SKILL.md +50 -50
  356. package/templates/skills/ides/windsurf/SKILL.md +46 -46
  357. package/templates/skills/ides/zed/SKILL.md +42 -42
  358. package/templates/skills/languages/c/SKILL.md +343 -343
  359. package/templates/skills/languages/cpp/SKILL.md +753 -753
  360. package/templates/skills/languages/csharp/SKILL.md +427 -427
  361. package/templates/skills/languages/elixir/SKILL.md +464 -464
  362. package/templates/skills/languages/erlang/SKILL.md +371 -371
  363. package/templates/skills/languages/go/SKILL.md +655 -655
  364. package/templates/skills/languages/haskell/SKILL.md +187 -187
  365. package/templates/skills/languages/java/SKILL.md +617 -617
  366. package/templates/skills/languages/javascript/SKILL.md +641 -641
  367. package/templates/skills/languages/julia/SKILL.md +107 -107
  368. package/templates/skills/languages/kotlin/SKILL.md +521 -521
  369. package/templates/skills/languages/lisp/SKILL.md +110 -110
  370. package/templates/skills/languages/lua/SKILL.md +84 -84
  371. package/templates/skills/languages/objectivec/SKILL.md +100 -100
  372. package/templates/skills/languages/php/SKILL.md +426 -426
  373. package/templates/skills/languages/python/SKILL.md +692 -692
  374. package/templates/skills/languages/ruby/SKILL.md +431 -431
  375. package/templates/skills/languages/rust/SKILL.md +487 -487
  376. package/templates/skills/languages/sas/SKILL.md +83 -83
  377. package/templates/skills/languages/scala/SKILL.md +358 -358
  378. package/templates/skills/languages/solidity/SKILL.md +590 -590
  379. package/templates/skills/languages/sql/SKILL.md +147 -147
  380. package/templates/skills/languages/swift/SKILL.md +476 -476
  381. package/templates/skills/languages/typescript/SKILL.md +302 -302
  382. package/templates/skills/languages/zig/SKILL.md +275 -275
  383. package/templates/skills/modules/atlassian/SKILL.md +265 -265
  384. package/templates/skills/modules/context7/SKILL.md +64 -64
  385. package/templates/skills/modules/figma/SKILL.md +277 -277
  386. package/templates/skills/modules/github-mcp/SKILL.md +74 -74
  387. package/templates/skills/modules/grafana/SKILL.md +338 -338
  388. package/templates/skills/modules/memory/SKILL.md +73 -73
  389. package/templates/skills/modules/notion/SKILL.md +257 -257
  390. package/templates/skills/modules/playwright/SKILL.md +100 -100
  391. package/templates/skills/modules/rulebook-mcp/SKILL.md +166 -166
  392. package/templates/skills/modules/serena/SKILL.md +347 -347
  393. package/templates/skills/modules/supabase/SKILL.md +233 -233
  394. package/templates/skills/modules/synap/SKILL.md +79 -79
  395. package/templates/skills/modules/vectorizer/SKILL.md +73 -73
  396. package/templates/skills/services/azure-blob/SKILL.md +194 -194
  397. package/templates/skills/services/cassandra/SKILL.md +249 -249
  398. package/templates/skills/services/dynamodb/SKILL.md +318 -318
  399. package/templates/skills/services/elasticsearch/SKILL.md +357 -357
  400. package/templates/skills/services/gcs/SKILL.md +188 -188
  401. package/templates/skills/services/influxdb/SKILL.md +275 -275
  402. package/templates/skills/services/kafka/SKILL.md +351 -351
  403. package/templates/skills/services/mariadb/SKILL.md +193 -193
  404. package/templates/skills/services/memcached/SKILL.md +252 -252
  405. package/templates/skills/services/minio/SKILL.md +211 -211
  406. package/templates/skills/services/mongodb/SKILL.md +278 -278
  407. package/templates/skills/services/mysql/SKILL.md +368 -368
  408. package/templates/skills/services/neo4j/SKILL.md +257 -257
  409. package/templates/skills/services/oracle/SKILL.md +300 -300
  410. package/templates/skills/services/postgresql/SKILL.md +336 -336
  411. package/templates/skills/services/rabbitmq/SKILL.md +296 -296
  412. package/templates/skills/services/redis/SKILL.md +302 -302
  413. package/templates/skills/services/s3/SKILL.md +308 -308
  414. package/templates/skills/services/sqlite/SKILL.md +304 -304
  415. package/templates/skills/services/sqlserver/SKILL.md +304 -304
  416. package/templates/skills/workflows/ralph/SKILL.md +309 -309
  417. package/templates/skills/workflows/ralph/install.sh +87 -87
  418. package/templates/skills/workflows/ralph/manifest.json +158 -158
@@ -0,0 +1,78 @@
1
+ /**
2
+ * Claude Code UserPromptSubmit hook for rulebook-terse.
3
+ *
4
+ * Runs on every user message. Three responsibilities:
5
+ *
6
+ * 1. **Mode switching.** Parses slash commands (`/rulebook-terse`,
7
+ * `/rulebook-terse brief|terse|ultra|off`, `/rulebook-terse-commit`,
8
+ * `/rulebook-terse-review`) and natural-language activation
9
+ * phrases ("be terse", "less tokens please", "terse mode",
10
+ * "activate rulebook-terse"). Writes the resolved mode to the
11
+ * flag file via `safeWriteFlag`.
12
+ *
13
+ * 2. **Mode deactivation.** Recognizes "normal mode", "stop terse",
14
+ * "disable terse", etc. Deletes the flag file.
15
+ *
16
+ * 3. **Per-turn reinforcement.** When the flag is set to a persistent
17
+ * mode (brief / terse / ultra), emits a short ~45 token attention
18
+ * anchor as `hookSpecificOutput.additionalContext` JSON. The
19
+ * SessionStart hook supplied the full rules once; this reminder
20
+ * keeps the register in the model's attention when other plugins
21
+ * inject competing instructions mid-conversation.
22
+ *
23
+ * Independent modes (commit / review) do not get the anchor —
24
+ * they have their own skill files that fully own the behavior
25
+ * during the single turn they're invoked.
26
+ *
27
+ * Silent-fails on every filesystem error. A broken hook must NEVER
28
+ * prevent a user message from reaching the model.
29
+ */
30
+ import { type TerseMode } from './safe-flag-io.js';
31
+ /**
32
+ * Result of parsing a user prompt. `null` means no mode change is
33
+ * implied by the prompt.
34
+ */
35
+ export type ParsedIntent = {
36
+ kind: 'set';
37
+ mode: TerseMode;
38
+ } | {
39
+ kind: 'off';
40
+ } | null;
41
+ /**
42
+ * Parse a user prompt for an intent to activate, switch, or disable
43
+ * rulebook-terse. Slash commands take priority over natural language;
44
+ * natural-language deactivation takes priority over activation when
45
+ * both appear in the same prompt.
46
+ *
47
+ * `defaultMode` is used for plain `/rulebook-terse` (no argument).
48
+ */
49
+ export declare function parseIntent(prompt: string, defaultMode: TerseMode): ParsedIntent;
50
+ /**
51
+ * Build the per-turn attention-anchor JSON emitted when a persistent
52
+ * mode is active. Format matches Claude Code's `hookSpecificOutput`
53
+ * contract for UserPromptSubmit hooks.
54
+ */
55
+ export declare function buildAttentionAnchor(mode: TerseMode): string;
56
+ /**
57
+ * Core hook logic, pure and testable. Given an input object and
58
+ * options, returns the string (if any) that should be emitted to
59
+ * stdout, and performs the flag-file side effects.
60
+ */
61
+ export declare function runHook(input: {
62
+ prompt?: string;
63
+ cwd?: string;
64
+ }, options?: {
65
+ projectRoot?: string;
66
+ env?: NodeJS.ProcessEnv;
67
+ }): string | null;
68
+ /**
69
+ * CLI entry. Reads JSON from stdin, invokes `runHook`, emits any
70
+ * returned string to stdout. Always exits 0.
71
+ */
72
+ export declare function main(options?: {
73
+ stdin?: NodeJS.ReadableStream;
74
+ stdout?: NodeJS.WriteStream;
75
+ projectRoot?: string;
76
+ env?: NodeJS.ProcessEnv;
77
+ }): Promise<void>;
78
+ //# sourceMappingURL=terse-mode-tracker.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"terse-mode-tracker.d.ts","sourceRoot":"","sources":["../../src/hooks/terse-mode-tracker.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;;GA4BG;AAIH,OAAO,EAA2B,KAAK,SAAS,EAAE,MAAM,mBAAmB,CAAC;AA+B5E;;;GAGG;AACH,MAAM,MAAM,YAAY,GACpB;IAAE,IAAI,EAAE,KAAK,CAAC;IAAC,IAAI,EAAE,SAAS,CAAA;CAAE,GAChC;IAAE,IAAI,EAAE,KAAK,CAAA;CAAE,GACf,IAAI,CAAC;AAET;;;;;;;GAOG;AACH,wBAAgB,WAAW,CAAC,MAAM,EAAE,MAAM,EAAE,WAAW,EAAE,SAAS,GAAG,YAAY,CA6ChF;AAED;;;;GAIG;AACH,wBAAgB,oBAAoB,CAAC,IAAI,EAAE,SAAS,GAAG,MAAM,CAa5D;AAcD;;;;GAIG;AACH,wBAAgB,OAAO,CACrB,KAAK,EAAE;IAAE,MAAM,CAAC,EAAE,MAAM,CAAC;IAAC,GAAG,CAAC,EAAE,MAAM,CAAA;CAAE,EACxC,OAAO,GAAE;IACP,WAAW,CAAC,EAAE,MAAM,CAAC;IACrB,GAAG,CAAC,EAAE,MAAM,CAAC,UAAU,CAAC;CACpB,GACL,MAAM,GAAG,IAAI,CA6Cf;AAED;;;GAGG;AACH,wBAAsB,IAAI,CACxB,OAAO,GAAE;IACP,KAAK,CAAC,EAAE,MAAM,CAAC,cAAc,CAAC;IAC9B,MAAM,CAAC,EAAE,MAAM,CAAC,WAAW,CAAC;IAC5B,WAAW,CAAC,EAAE,MAAM,CAAC;IACrB,GAAG,CAAC,EAAE,MAAM,CAAC,UAAU,CAAC;CACpB,GACL,OAAO,CAAC,IAAI,CAAC,CAkBf"}
@@ -0,0 +1,213 @@
1
+ /**
2
+ * Claude Code UserPromptSubmit hook for rulebook-terse.
3
+ *
4
+ * Runs on every user message. Three responsibilities:
5
+ *
6
+ * 1. **Mode switching.** Parses slash commands (`/rulebook-terse`,
7
+ * `/rulebook-terse brief|terse|ultra|off`, `/rulebook-terse-commit`,
8
+ * `/rulebook-terse-review`) and natural-language activation
9
+ * phrases ("be terse", "less tokens please", "terse mode",
10
+ * "activate rulebook-terse"). Writes the resolved mode to the
11
+ * flag file via `safeWriteFlag`.
12
+ *
13
+ * 2. **Mode deactivation.** Recognizes "normal mode", "stop terse",
14
+ * "disable terse", etc. Deletes the flag file.
15
+ *
16
+ * 3. **Per-turn reinforcement.** When the flag is set to a persistent
17
+ * mode (brief / terse / ultra), emits a short ~45 token attention
18
+ * anchor as `hookSpecificOutput.additionalContext` JSON. The
19
+ * SessionStart hook supplied the full rules once; this reminder
20
+ * keeps the register in the model's attention when other plugins
21
+ * inject competing instructions mid-conversation.
22
+ *
23
+ * Independent modes (commit / review) do not get the anchor —
24
+ * they have their own skill files that fully own the behavior
25
+ * during the single turn they're invoked.
26
+ *
27
+ * Silent-fails on every filesystem error. A broken hook must NEVER
28
+ * prevent a user message from reaching the model.
29
+ */
30
+ import { unlinkSync } from 'node:fs';
31
+ import { fileURLToPath } from 'node:url';
32
+ import { readFlag, safeWriteFlag } from './safe-flag-io.js';
33
+ import { getDefaultMode, getFlagPath } from './terse-config.js';
34
+ /**
35
+ * Modes whose behavior is fully handled by their own sub-skill file
36
+ * and do NOT get a per-turn attention anchor.
37
+ */
38
+ const INDEPENDENT_MODES = new Set(['commit', 'review']);
39
+ /**
40
+ * Natural-language activation patterns. Matched case-insensitively.
41
+ * Both orderings are accepted ("activate caveman" and "caveman mode").
42
+ */
43
+ const ACTIVATION_PATTERNS = [
44
+ /\b(activate|enable|turn\s+on|start)\b.*\brulebook[-\s]?terse\b/i,
45
+ /\brulebook[-\s]?terse\b.*\b(mode|activate|enable|turn\s+on|start)\b/i,
46
+ /\bbe\s+terse\b/i,
47
+ /\bterse\s+mode\b/i,
48
+ /\bless\s+tokens?\s*(please)?\b/i,
49
+ ];
50
+ /**
51
+ * Natural-language deactivation patterns.
52
+ */
53
+ const DEACTIVATION_PATTERNS = [
54
+ /\b(stop|disable|turn\s+off|deactivate)\b.*\brulebook[-\s]?terse\b/i,
55
+ /\brulebook[-\s]?terse\b.*\b(stop|disable|turn\s+off|deactivate)\b/i,
56
+ /\b(stop|disable)\s+terse\b/i,
57
+ /\bnormal\s+mode\b/i,
58
+ ];
59
+ /**
60
+ * Parse a user prompt for an intent to activate, switch, or disable
61
+ * rulebook-terse. Slash commands take priority over natural language;
62
+ * natural-language deactivation takes priority over activation when
63
+ * both appear in the same prompt.
64
+ *
65
+ * `defaultMode` is used for plain `/rulebook-terse` (no argument).
66
+ */
67
+ export function parseIntent(prompt, defaultMode) {
68
+ const trimmed = prompt.trim();
69
+ const lower = trimmed.toLowerCase();
70
+ // Slash commands — highest priority, exact surface.
71
+ if (lower.startsWith('/rulebook-terse')) {
72
+ const parts = lower.split(/\s+/);
73
+ const cmd = parts[0];
74
+ const arg = parts[1] ?? '';
75
+ if (cmd === '/rulebook-terse-commit') {
76
+ return { kind: 'set', mode: 'commit' };
77
+ }
78
+ if (cmd === '/rulebook-terse-review') {
79
+ return { kind: 'set', mode: 'review' };
80
+ }
81
+ if (cmd === '/rulebook-terse') {
82
+ switch (arg) {
83
+ case 'off':
84
+ return { kind: 'off' };
85
+ case 'brief':
86
+ case 'terse':
87
+ case 'ultra':
88
+ case 'commit':
89
+ case 'review':
90
+ return { kind: 'set', mode: arg };
91
+ case '':
92
+ return { kind: 'set', mode: defaultMode };
93
+ default:
94
+ return null; // Unknown subcommand — leave mode unchanged.
95
+ }
96
+ }
97
+ }
98
+ // Natural-language deactivation first — "stop terse" should win over
99
+ // a stray "terse" that happens to also match activation.
100
+ if (DEACTIVATION_PATTERNS.some((re) => re.test(trimmed))) {
101
+ return { kind: 'off' };
102
+ }
103
+ if (ACTIVATION_PATTERNS.some((re) => re.test(trimmed))) {
104
+ return { kind: 'set', mode: defaultMode };
105
+ }
106
+ return null;
107
+ }
108
+ /**
109
+ * Build the per-turn attention-anchor JSON emitted when a persistent
110
+ * mode is active. Format matches Claude Code's `hookSpecificOutput`
111
+ * contract for UserPromptSubmit hooks.
112
+ */
113
+ export function buildAttentionAnchor(mode) {
114
+ const text = `RULEBOOK-TERSE ACTIVE (${mode}). ` +
115
+ `Drop filler/hedging/pleasantries. ` +
116
+ (mode === 'brief' ? 'Keep articles and full sentences.' : 'Fragments OK.') +
117
+ ` Code/tests/commits/security: write full. Quality-gate failures + destructive ops: write full.`;
118
+ return JSON.stringify({
119
+ hookSpecificOutput: {
120
+ hookEventName: 'UserPromptSubmit',
121
+ additionalContext: text,
122
+ },
123
+ });
124
+ }
125
+ /**
126
+ * Read an entire JSON object from a readable stream. Claude Code
127
+ * passes hook input as `{ prompt, cwd, ... }` on stdin.
128
+ */
129
+ async function readAllStdin(stream) {
130
+ const chunks = [];
131
+ for await (const chunk of stream) {
132
+ chunks.push(typeof chunk === 'string' ? Buffer.from(chunk) : chunk);
133
+ }
134
+ return Buffer.concat(chunks).toString('utf8');
135
+ }
136
+ /**
137
+ * Core hook logic, pure and testable. Given an input object and
138
+ * options, returns the string (if any) that should be emitted to
139
+ * stdout, and performs the flag-file side effects.
140
+ */
141
+ export function runHook(input, options = {}) {
142
+ try {
143
+ const prompt = input.prompt ?? '';
144
+ const projectRoot = options.projectRoot ?? input.cwd ?? process.cwd();
145
+ const env = options.env ?? process.env;
146
+ const flagPath = getFlagPath(projectRoot);
147
+ // Resolve default-mode fresh each turn so env changes take effect.
148
+ const defaultMode = getDefaultMode({ env, projectRoot, tier: env.RULEBOOK_AGENT_TIER });
149
+ const intent = parseIntent(prompt, defaultMode);
150
+ if (intent?.kind === 'off') {
151
+ try {
152
+ unlinkSync(flagPath);
153
+ }
154
+ catch {
155
+ /* flag already absent — fine */
156
+ }
157
+ return null;
158
+ }
159
+ if (intent?.kind === 'set') {
160
+ if (intent.mode === 'off') {
161
+ try {
162
+ unlinkSync(flagPath);
163
+ }
164
+ catch {
165
+ /* fine */
166
+ }
167
+ return null;
168
+ }
169
+ safeWriteFlag(flagPath, intent.mode);
170
+ }
171
+ // Read whatever mode is now persisted (may be set by this turn or
172
+ // a previous one) and emit the attention anchor for persistent
173
+ // modes only.
174
+ const currentMode = readFlag(flagPath);
175
+ if (currentMode && currentMode !== 'off' && !INDEPENDENT_MODES.has(currentMode)) {
176
+ return buildAttentionAnchor(currentMode);
177
+ }
178
+ return null;
179
+ }
180
+ catch {
181
+ return null;
182
+ }
183
+ }
184
+ /**
185
+ * CLI entry. Reads JSON from stdin, invokes `runHook`, emits any
186
+ * returned string to stdout. Always exits 0.
187
+ */
188
+ export async function main(options = {}) {
189
+ try {
190
+ const stdin = options.stdin ?? process.stdin;
191
+ const stdout = options.stdout ?? process.stdout;
192
+ const raw = await readAllStdin(stdin);
193
+ let input = {};
194
+ try {
195
+ input = JSON.parse(raw);
196
+ }
197
+ catch {
198
+ /* Non-JSON input — treat as empty. Hook still no-ops gracefully. */
199
+ }
200
+ const out = runHook(input, { projectRoot: options.projectRoot, env: options.env });
201
+ if (out !== null)
202
+ stdout.write(out);
203
+ }
204
+ catch {
205
+ /* silent fail */
206
+ }
207
+ }
208
+ // CLI guard — only auto-run when invoked as the entry script.
209
+ const __filename = fileURLToPath(import.meta.url);
210
+ if (process.argv[1] === __filename) {
211
+ void main();
212
+ }
213
+ //# sourceMappingURL=terse-mode-tracker.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"terse-mode-tracker.js","sourceRoot":"","sources":["../../src/hooks/terse-mode-tracker.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;;GA4BG;AAEH,OAAO,EAAE,UAAU,EAAE,MAAM,SAAS,CAAC;AACrC,OAAO,EAAE,aAAa,EAAE,MAAM,UAAU,CAAC;AACzC,OAAO,EAAE,QAAQ,EAAE,aAAa,EAAkB,MAAM,mBAAmB,CAAC;AAC5E,OAAO,EAAE,cAAc,EAAE,WAAW,EAAE,MAAM,mBAAmB,CAAC;AAEhE;;;GAGG;AACH,MAAM,iBAAiB,GAA2B,IAAI,GAAG,CAAC,CAAC,QAAQ,EAAE,QAAQ,CAAC,CAAC,CAAC;AAEhF;;;GAGG;AACH,MAAM,mBAAmB,GAAsB;IAC7C,iEAAiE;IACjE,sEAAsE;IACtE,iBAAiB;IACjB,mBAAmB;IACnB,iCAAiC;CAClC,CAAC;AAEF;;GAEG;AACH,MAAM,qBAAqB,GAAsB;IAC/C,oEAAoE;IACpE,oEAAoE;IACpE,6BAA6B;IAC7B,oBAAoB;CACrB,CAAC;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AAG,CAAC,WAAW,CAAC,EAAE,CAAC;YAChF,OAAO,oBAAoB,CAAC,WAAW,CAAC,CAAC;QAC3C,CAAC;QAED,OAAO,IAAI,CAAC;IACd,CAAC;IAAC,MAAM,CAAC;QACP,OAAO,IAAI,CAAC;IACd,CAAC;AACH,CAAC;AAED;;;GAGG;AACH,MAAM,CAAC,KAAK,UAAU,IAAI,CACxB,UAKI,EAAE;IAEN,IAAI,CAAC;QACH,MAAM,KAAK,GAAG,OAAO,CAAC,KAAK,IAAI,OAAO,CAAC,KAAK,CAAC;QAC7C,MAAM,MAAM,GAAG,OAAO,CAAC,MAAM,IAAI,OAAO,CAAC,MAAM,CAAC;QAEhD,MAAM,GAAG,GAAG,MAAM,YAAY,CAAC,KAAK,CAAC,CAAC;QACtC,IAAI,KAAK,GAAsC,EAAE,CAAC;QAClD,IAAI,CAAC;YACH,KAAK,GAAG,IAAI,CAAC,KAAK,CAAC,GAAG,CAAC,CAAC;QAC1B,CAAC;QAAC,MAAM,CAAC;YACP,oEAAoE;QACtE,CAAC;QAED,MAAM,GAAG,GAAG,OAAO,CAAC,KAAK,EAAE,EAAE,WAAW,EAAE,OAAO,CAAC,WAAW,EAAE,GAAG,EAAE,OAAO,CAAC,GAAG,EAAE,CAAC,CAAC;QACnF,IAAI,GAAG,KAAK,IAAI;YAAE,MAAM,CAAC,KAAK,CAAC,GAAG,CAAC,CAAC;IACtC,CAAC;IAAC,MAAM,CAAC;QACP,iBAAiB;IACnB,CAAC;AACH,CAAC;AAED,8DAA8D;AAC9D,MAAM,UAAU,GAAG,aAAa,CAAC,MAAM,CAAC,IAAI,CAAC,GAAG,CAAC,CAAC;AAClD,IAAI,OAAO,CAAC,IAAI,CAAC,CAAC,CAAC,KAAK,UAAU,EAAE,CAAC;IACnC,KAAK,IAAI,EAAE,CAAC;AACd,CAAC"}
package/dist/index.js CHANGED
File without changes
File without changes
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@hivehub/rulebook",
3
- "version": "5.4.1",
3
+ "version": "5.5.1",
4
4
  "description": "Tool-agnostic AI development framework. Standardize projects across Claude Code, Cursor, Gemini, Codex, Windsurf, Copilot with automated templates, quality gates, persistent memory, and framework detection for 28 languages, 17 frameworks, 13 MCP modules, and 20 services",
5
5
  "type": "module",
6
6
  "main": "dist/index.js",
@@ -8,25 +8,6 @@
8
8
  "rulebook": "./dist/index.js",
9
9
  "rulebook-mcp": "./dist/mcp/rulebook-server.js"
10
10
  },
11
- "scripts": {
12
- "build": "tsc",
13
- "dev": "tsx src/index.ts",
14
- "test": "vitest run --no-watch",
15
- "test:watch": "vitest",
16
- "test:coverage": "vitest run --coverage --no-watch",
17
- "test:agent": "node scripts/test-agent-simple.mjs",
18
- "test:agent:quick": "node scripts/test-agent-simple.mjs",
19
- "test:agent:full": "node scripts/test-agent-manager.js all",
20
- "test:agent:comprehensive": "npx vitest run tests/agent-manager-comprehensive.test.ts",
21
- "setup:mcp": "node scripts/setup-mcp-config.js",
22
- "lint": "npx eslint src/**/*.ts --quiet",
23
- "lint:fix": "npx eslint src/**/*.ts --fix --quiet",
24
- "format": "npx prettier --write \"src/**/*.ts\" \"tests/**/*.ts\"",
25
- "type-check": "tsc --noEmit",
26
- "prepublishOnly": "npm run build",
27
- "publish:wsl": "export BROWSER=wslview && npm publish",
28
- "mcp-server": "node dist/mcp/rulebook-server.js"
29
- },
30
11
  "keywords": [
31
12
  "ai",
32
13
  "automation",
@@ -111,5 +92,23 @@
111
92
  "bugs": {
112
93
  "url": "https://github.com/hivellm/rulebook/issues"
113
94
  },
114
- "homepage": "https://github.com/hivellm/rulebook#readme"
115
- }
95
+ "homepage": "https://github.com/hivellm/rulebook#readme",
96
+ "scripts": {
97
+ "build": "tsc",
98
+ "dev": "tsx src/index.ts",
99
+ "test": "vitest run --no-watch",
100
+ "test:watch": "vitest",
101
+ "test:coverage": "vitest run --coverage --no-watch",
102
+ "test:agent": "node scripts/test-agent-simple.mjs",
103
+ "test:agent:quick": "node scripts/test-agent-simple.mjs",
104
+ "test:agent:full": "node scripts/test-agent-manager.js all",
105
+ "test:agent:comprehensive": "npx vitest run tests/agent-manager-comprehensive.test.ts",
106
+ "setup:mcp": "node scripts/setup-mcp-config.js",
107
+ "lint": "npx eslint src/**/*.ts --quiet",
108
+ "lint:fix": "npx eslint src/**/*.ts --fix --quiet",
109
+ "format": "npx prettier --write \"src/**/*.ts\" \"tests/**/*.ts\"",
110
+ "type-check": "tsc --noEmit",
111
+ "publish:wsl": "export BROWSER=wslview && npm publish",
112
+ "mcp-server": "node dist/mcp/rulebook-server.js"
113
+ }
114
+ }
@@ -1,43 +1,43 @@
1
- ---
2
- name: accessibility-reviewer
3
- model: haiku
4
- description: Reviews WCAG compliance, ARIA, semantic HTML, and screen reader compatibility. Use for accessibility audits.
5
- tools: Read, Glob, Grep, Bash
6
- disallowedTools: Write, Edit
7
- maxTurns: 15
8
- ---
9
-
10
- ## Responsibilities
11
-
12
- - Audit UI components against WCAG 2.1 AA criteria
13
- - Verify correct ARIA roles, properties, and states on interactive elements
14
- - Ensure semantic HTML structure with logical heading hierarchy
15
- - Validate keyboard navigation: focus order, visible focus indicators, no focus traps
16
- - Review color contrast ratios for text and meaningful graphics
17
-
18
- ## Workflow
19
-
20
- 1. Run automated scan with axe-core or Lighthouse; capture violations list
21
- 2. Manually test keyboard-only navigation through all interactive flows
22
- 3. Check heading hierarchy (`h1`→`h2`→`h3`) for logical document structure
23
- 4. Verify all images have descriptive `alt` text; decorative images use `alt=""`
24
- 5. Test with a screen reader (NVDA, VoiceOver) on primary user flows
25
- 6. Validate color contrast: 4.5:1 for normal text, 3:1 for large text and UI components
26
- 7. Confirm form inputs have associated `<label>` or `aria-labelledby`
27
- 8. Document each finding with WCAG criterion, severity, and remediation steps
28
-
29
- ## Standards
30
-
31
- - Target: WCAG 2.1 Level AA compliance minimum
32
- - Severity levels: Critical (blocks access), Major (impedes access), Minor (best practice)
33
- - Interactive elements: must have accessible name, role, and state
34
- - Motion: respect `prefers-reduced-motion` media query
35
- - Timeouts: warn user 20 seconds before expiry; allow extension
36
-
37
- ## Rules
38
-
39
- - Automated tools find ~30% of issues; manual testing is mandatory
40
- - `aria-label` must not duplicate visible text unless disambiguation is needed
41
- - Never use `tabindex` values greater than 0
42
- - Color must not be the sole means of conveying information
43
- - Every finding must cite the specific WCAG success criterion
1
+ ---
2
+ name: accessibility-reviewer
3
+ model: haiku
4
+ description: Reviews WCAG compliance, ARIA, semantic HTML, and screen reader compatibility. Use for accessibility audits.
5
+ tools: Read, Glob, Grep, Bash
6
+ disallowedTools: Write, Edit
7
+ maxTurns: 15
8
+ ---
9
+
10
+ ## Responsibilities
11
+
12
+ - Audit UI components against WCAG 2.1 AA criteria
13
+ - Verify correct ARIA roles, properties, and states on interactive elements
14
+ - Ensure semantic HTML structure with logical heading hierarchy
15
+ - Validate keyboard navigation: focus order, visible focus indicators, no focus traps
16
+ - Review color contrast ratios for text and meaningful graphics
17
+
18
+ ## Workflow
19
+
20
+ 1. Run automated scan with axe-core or Lighthouse; capture violations list
21
+ 2. Manually test keyboard-only navigation through all interactive flows
22
+ 3. Check heading hierarchy (`h1`→`h2`→`h3`) for logical document structure
23
+ 4. Verify all images have descriptive `alt` text; decorative images use `alt=""`
24
+ 5. Test with a screen reader (NVDA, VoiceOver) on primary user flows
25
+ 6. Validate color contrast: 4.5:1 for normal text, 3:1 for large text and UI components
26
+ 7. Confirm form inputs have associated `<label>` or `aria-labelledby`
27
+ 8. Document each finding with WCAG criterion, severity, and remediation steps
28
+
29
+ ## Standards
30
+
31
+ - Target: WCAG 2.1 Level AA compliance minimum
32
+ - Severity levels: Critical (blocks access), Major (impedes access), Minor (best practice)
33
+ - Interactive elements: must have accessible name, role, and state
34
+ - Motion: respect `prefers-reduced-motion` media query
35
+ - Timeouts: warn user 20 seconds before expiry; allow extension
36
+
37
+ ## Rules
38
+
39
+ - Automated tools find ~30% of issues; manual testing is mandatory
40
+ - `aria-label` must not duplicate visible text unless disambiguation is needed
41
+ - Never use `tabindex` values greater than 0
42
+ - Color must not be the sole means of conveying information
43
+ - Every finding must cite the specific WCAG success criterion
@@ -1,42 +1,42 @@
1
- ---
2
- name: api-designer
3
- model: sonnet
4
- description: Designs REST/GraphQL APIs, writes OpenAPI specs, and reviews endpoint consistency. Use when designing or reviewing APIs.
5
- tools: Read, Glob, Grep, Edit, Write
6
- maxTurns: 20
7
- ---
8
-
9
- ## Responsibilities
10
-
11
- - Design REST or GraphQL APIs following industry conventions
12
- - Produce OpenAPI 3.1 specifications with complete request/response schemas
13
- - Define versioning strategy and deprecation lifecycle
14
- - Specify authentication, authorization, and rate-limiting policies
15
- - Review existing endpoints for consistency, naming, and error response structure
16
-
17
- ## Workflow
18
-
19
- 1. Gather resource requirements and identify domain entities and relationships
20
- 2. Define URL structure, HTTP methods, and status codes for each resource
21
- 3. Write OpenAPI 3.1 spec with request bodies, response schemas, and error models
22
- 4. Define pagination strategy (cursor-based preferred over offset for large datasets)
23
- 5. Specify rate limiting tiers: per-user, per-IP, and per-endpoint limits
24
- 6. Document authentication flows (OAuth2, API keys, JWT) with example headers
25
- 7. Review for consistency: naming, casing, error shape, and HTTP semantics
26
- 8. Produce changelog entry for any breaking change with migration guide
27
-
28
- ## Standards
29
-
30
- - Resource names: plural nouns in kebab-case (`/user-profiles`, not `/getUsers`)
31
- - HTTP status codes used semantically: 200, 201, 204, 400, 401, 403, 404, 409, 422, 429, 500
32
- - Error response shape: `{ "error": { "code": string, "message": string, "details"?: object } }`
33
- - Versioning: URL path prefix (`/v1/`) for REST; `@deprecated` directive for GraphQL
34
- - All endpoints require explicit auth policy documented in the OpenAPI spec
35
-
36
- ## Rules
37
-
38
- - Breaking changes require a new API version; never modify existing versioned contracts
39
- - All input fields must be validated and documented with constraints in the spec
40
- - Sensitive data must never appear in URL path or query parameters
41
- - Pagination must be present on all list endpoints returning more than 20 items
42
- - Rate limit headers (`X-RateLimit-*`) must be returned on every response
1
+ ---
2
+ name: api-designer
3
+ model: sonnet
4
+ description: Designs REST/GraphQL APIs, writes OpenAPI specs, and reviews endpoint consistency. Use when designing or reviewing APIs.
5
+ tools: Read, Glob, Grep, Edit, Write
6
+ maxTurns: 20
7
+ ---
8
+
9
+ ## Responsibilities
10
+
11
+ - Design REST or GraphQL APIs following industry conventions
12
+ - Produce OpenAPI 3.1 specifications with complete request/response schemas
13
+ - Define versioning strategy and deprecation lifecycle
14
+ - Specify authentication, authorization, and rate-limiting policies
15
+ - Review existing endpoints for consistency, naming, and error response structure
16
+
17
+ ## Workflow
18
+
19
+ 1. Gather resource requirements and identify domain entities and relationships
20
+ 2. Define URL structure, HTTP methods, and status codes for each resource
21
+ 3. Write OpenAPI 3.1 spec with request bodies, response schemas, and error models
22
+ 4. Define pagination strategy (cursor-based preferred over offset for large datasets)
23
+ 5. Specify rate limiting tiers: per-user, per-IP, and per-endpoint limits
24
+ 6. Document authentication flows (OAuth2, API keys, JWT) with example headers
25
+ 7. Review for consistency: naming, casing, error shape, and HTTP semantics
26
+ 8. Produce changelog entry for any breaking change with migration guide
27
+
28
+ ## Standards
29
+
30
+ - Resource names: plural nouns in kebab-case (`/user-profiles`, not `/getUsers`)
31
+ - HTTP status codes used semantically: 200, 201, 204, 400, 401, 403, 404, 409, 422, 429, 500
32
+ - Error response shape: `{ "error": { "code": string, "message": string, "details"?: object } }`
33
+ - Versioning: URL path prefix (`/v1/`) for REST; `@deprecated` directive for GraphQL
34
+ - All endpoints require explicit auth policy documented in the OpenAPI spec
35
+
36
+ ## Rules
37
+
38
+ - Breaking changes require a new API version; never modify existing versioned contracts
39
+ - All input fields must be validated and documented with constraints in the spec
40
+ - Sensitive data must never appear in URL path or query parameters
41
+ - Pagination must be present on all list endpoints returning more than 20 items
42
+ - Rate limit headers (`X-RateLimit-*`) must be returned on every response
@@ -1,51 +1,51 @@
1
- ---
2
- name: architect
3
- model: opus
4
- description: Makes system architecture decisions, writes ADRs, and analyzes scalability. Use for architectural design and tech debt analysis.
5
- tools: Read, Glob, Grep, Bash, Write
6
- maxTurns: 25
7
- ---
8
-
9
- ## Responsibilities
10
-
11
- - Define system boundaries, service decomposition, and integration contracts
12
- - Select architectural patterns appropriate to scale, team size, and operational constraints
13
- - Evaluate build-vs-buy decisions with explicit trade-off documentation
14
- - Identify and quantify technical debt; produce a prioritized remediation roadmap
15
- - Review proposed designs for {{language}} projects for consistency, coupling, and extensibility
16
-
17
- ## Workflow
18
-
19
- 1. Gather requirements: functional needs, non-functional targets (SLOs), team constraints, budget
20
- 2. Identify quality attributes in tension: consistency vs. availability, simplicity vs. flexibility
21
- 3. Enumerate candidate architectural patterns; evaluate each against the quality attributes
22
- 4. Select recommended pattern; document rejected alternatives with explicit reasoning
23
- 5. Define service boundaries, data ownership, and synchronous vs. asynchronous communication
24
- 6. Produce Architecture Decision Record (ADR) for each significant structural choice
25
- 7. Review for anti-patterns: distributed monolith, chatty interfaces, shared mutable state
26
- 8. Deliver a roadmap distinguishing immediate structural needs from long-term evolution
27
-
28
- ## Output Format
29
-
30
- Each architectural recommendation must include:
31
- - **Context**: problem being solved and constraints
32
- - **Decision**: chosen approach
33
- - **Rationale**: why this approach over alternatives
34
- - **Trade-offs**: what is given up
35
- - **Consequences**: operational and development implications
36
- - **Review Date**: when to revisit the decision
37
-
38
- ## Standards
39
-
40
- - ADRs stored in `docs/decisions/` as numbered markdown files (`0001-use-event-sourcing.md`)
41
- - Diagrams use C4 model levels: Context, Container, Component (avoid class-level architecture diagrams)
42
- - Service contracts versioned and documented before implementation begins
43
- - Technical debt items tracked with: description, impact, effort estimate, and owner
44
-
45
- ## Rules
46
-
47
- - Architectural decisions must be reversible where possible; flag irreversible choices explicitly
48
- - Never prescribe technology for its novelty; justify every tool choice against requirements
49
- - Scalability claims must be backed by capacity calculations, not assumptions
50
- - Cross-cutting concerns (auth, logging, tracing) decided at architecture level, not left to individual services
51
- - All ADRs require a stated trade-off; ADRs without acknowledged trade-offs are incomplete
1
+ ---
2
+ name: architect
3
+ model: opus
4
+ description: Makes system architecture decisions, writes ADRs, and analyzes scalability. Use for architectural design and tech debt analysis.
5
+ tools: Read, Glob, Grep, Bash, Write
6
+ maxTurns: 25
7
+ ---
8
+
9
+ ## Responsibilities
10
+
11
+ - Define system boundaries, service decomposition, and integration contracts
12
+ - Select architectural patterns appropriate to scale, team size, and operational constraints
13
+ - Evaluate build-vs-buy decisions with explicit trade-off documentation
14
+ - Identify and quantify technical debt; produce a prioritized remediation roadmap
15
+ - Review proposed designs for {{language}} projects for consistency, coupling, and extensibility
16
+
17
+ ## Workflow
18
+
19
+ 1. Gather requirements: functional needs, non-functional targets (SLOs), team constraints, budget
20
+ 2. Identify quality attributes in tension: consistency vs. availability, simplicity vs. flexibility
21
+ 3. Enumerate candidate architectural patterns; evaluate each against the quality attributes
22
+ 4. Select recommended pattern; document rejected alternatives with explicit reasoning
23
+ 5. Define service boundaries, data ownership, and synchronous vs. asynchronous communication
24
+ 6. Produce Architecture Decision Record (ADR) for each significant structural choice
25
+ 7. Review for anti-patterns: distributed monolith, chatty interfaces, shared mutable state
26
+ 8. Deliver a roadmap distinguishing immediate structural needs from long-term evolution
27
+
28
+ ## Output Format
29
+
30
+ Each architectural recommendation must include:
31
+ - **Context**: problem being solved and constraints
32
+ - **Decision**: chosen approach
33
+ - **Rationale**: why this approach over alternatives
34
+ - **Trade-offs**: what is given up
35
+ - **Consequences**: operational and development implications
36
+ - **Review Date**: when to revisit the decision
37
+
38
+ ## Standards
39
+
40
+ - ADRs stored in `docs/decisions/` as numbered markdown files (`0001-use-event-sourcing.md`)
41
+ - Diagrams use C4 model levels: Context, Container, Component (avoid class-level architecture diagrams)
42
+ - Service contracts versioned and documented before implementation begins
43
+ - Technical debt items tracked with: description, impact, effort estimate, and owner
44
+
45
+ ## Rules
46
+
47
+ - Architectural decisions must be reversible where possible; flag irreversible choices explicitly
48
+ - Never prescribe technology for its novelty; justify every tool choice against requirements
49
+ - Scalability claims must be backed by capacity calculations, not assumptions
50
+ - Cross-cutting concerns (auth, logging, tracing) decided at architecture level, not left to individual services
51
+ - All ADRs require a stated trade-off; ADRs without acknowledged trade-offs are incomplete