@hivehub/rulebook 3.0.0 → 3.2.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 (566) hide show
  1. package/.claude/commands/ralph-config.md +112 -0
  2. package/.claude/commands/ralph-history.md +110 -0
  3. package/.claude/commands/ralph-init.md +72 -0
  4. package/.claude/commands/ralph-pause-resume.md +105 -0
  5. package/.claude/commands/ralph-run.md +101 -0
  6. package/.claude/commands/ralph-status.md +76 -0
  7. package/.claude/commands/rulebook-memory-save.md +48 -0
  8. package/.claude/commands/rulebook-memory-search.md +47 -0
  9. package/.claude/commands/rulebook-task-apply.md +67 -0
  10. package/.claude/commands/rulebook-task-archive.md +70 -0
  11. package/.claude/commands/rulebook-task-create.md +93 -0
  12. package/.claude/commands/rulebook-task-list.md +42 -0
  13. package/.claude/commands/rulebook-task-show.md +52 -0
  14. package/.claude/commands/rulebook-task-validate.md +53 -0
  15. package/.claude-plugin/marketplace.json +29 -0
  16. package/.claude-plugin/plugin.json +8 -0
  17. package/LICENSE +0 -0
  18. package/README.md +67 -5
  19. package/dist/agents/claude-code.d.ts +0 -0
  20. package/dist/agents/claude-code.d.ts.map +0 -0
  21. package/dist/agents/claude-code.js +0 -0
  22. package/dist/agents/claude-code.js.map +0 -0
  23. package/dist/agents/cursor-agent.d.ts +0 -0
  24. package/dist/agents/cursor-agent.d.ts.map +0 -0
  25. package/dist/agents/cursor-agent.js +0 -0
  26. package/dist/agents/cursor-agent.js.map +0 -0
  27. package/dist/agents/gemini-cli.d.ts +0 -0
  28. package/dist/agents/gemini-cli.d.ts.map +0 -0
  29. package/dist/agents/gemini-cli.js +0 -0
  30. package/dist/agents/gemini-cli.js.map +0 -0
  31. package/dist/agents/ralph-parser.d.ts +52 -0
  32. package/dist/agents/ralph-parser.d.ts.map +1 -0
  33. package/dist/agents/ralph-parser.js +223 -0
  34. package/dist/agents/ralph-parser.js.map +1 -0
  35. package/dist/cli/commands.d.ts +13 -0
  36. package/dist/cli/commands.d.ts.map +1 -1
  37. package/dist/cli/commands.js +385 -21
  38. package/dist/cli/commands.js.map +1 -1
  39. package/dist/cli/docs-prompts.d.ts +0 -0
  40. package/dist/cli/docs-prompts.d.ts.map +0 -0
  41. package/dist/cli/docs-prompts.js +0 -0
  42. package/dist/cli/docs-prompts.js.map +0 -0
  43. package/dist/cli/prompts.d.ts +0 -0
  44. package/dist/cli/prompts.d.ts.map +0 -0
  45. package/dist/cli/prompts.js +0 -0
  46. package/dist/cli/prompts.js.map +0 -0
  47. package/dist/core/agent-manager.d.ts +0 -0
  48. package/dist/core/agent-manager.d.ts.map +0 -0
  49. package/dist/core/agent-manager.js +0 -0
  50. package/dist/core/agent-manager.js.map +0 -0
  51. package/dist/core/auto-fixer.d.ts +0 -0
  52. package/dist/core/auto-fixer.d.ts.map +0 -0
  53. package/dist/core/auto-fixer.js +0 -0
  54. package/dist/core/auto-fixer.js.map +0 -0
  55. package/dist/core/changelog-generator.d.ts +0 -0
  56. package/dist/core/changelog-generator.d.ts.map +0 -0
  57. package/dist/core/changelog-generator.js +0 -0
  58. package/dist/core/changelog-generator.js.map +0 -0
  59. package/dist/core/claude-mcp.d.ts +0 -0
  60. package/dist/core/claude-mcp.d.ts.map +0 -0
  61. package/dist/core/claude-mcp.js +0 -0
  62. package/dist/core/claude-mcp.js.map +0 -0
  63. package/dist/core/cli-bridge.d.ts +0 -0
  64. package/dist/core/cli-bridge.d.ts.map +0 -0
  65. package/dist/core/cli-bridge.js +0 -0
  66. package/dist/core/cli-bridge.js.map +0 -0
  67. package/dist/core/config-manager.d.ts +13 -2
  68. package/dist/core/config-manager.d.ts.map +1 -1
  69. package/dist/core/config-manager.js +185 -7
  70. package/dist/core/config-manager.js.map +1 -1
  71. package/dist/core/coverage-checker.d.ts +0 -0
  72. package/dist/core/coverage-checker.d.ts.map +0 -0
  73. package/dist/core/coverage-checker.js +0 -0
  74. package/dist/core/coverage-checker.js.map +0 -0
  75. package/dist/core/custom-templates.d.ts +0 -0
  76. package/dist/core/custom-templates.d.ts.map +0 -0
  77. package/dist/core/custom-templates.js +0 -0
  78. package/dist/core/custom-templates.js.map +0 -0
  79. package/dist/core/dependency-checker.d.ts +0 -0
  80. package/dist/core/dependency-checker.d.ts.map +0 -0
  81. package/dist/core/dependency-checker.js +0 -0
  82. package/dist/core/dependency-checker.js.map +0 -0
  83. package/dist/core/detector.d.ts +0 -0
  84. package/dist/core/detector.d.ts.map +0 -0
  85. package/dist/core/detector.js +0 -0
  86. package/dist/core/detector.js.map +0 -0
  87. package/dist/core/docs-generator.d.ts +0 -0
  88. package/dist/core/docs-generator.d.ts.map +0 -0
  89. package/dist/core/docs-generator.js +0 -0
  90. package/dist/core/docs-generator.js.map +0 -0
  91. package/dist/core/generator.d.ts +0 -0
  92. package/dist/core/generator.d.ts.map +1 -1
  93. package/dist/core/generator.js +128 -45
  94. package/dist/core/generator.js.map +1 -1
  95. package/dist/core/gitignore-generator.d.ts +0 -0
  96. package/dist/core/gitignore-generator.d.ts.map +0 -0
  97. package/dist/core/gitignore-generator.js +0 -0
  98. package/dist/core/gitignore-generator.js.map +0 -0
  99. package/dist/core/health-scorer.d.ts +0 -0
  100. package/dist/core/health-scorer.d.ts.map +0 -0
  101. package/dist/core/health-scorer.js +0 -0
  102. package/dist/core/health-scorer.js.map +0 -0
  103. package/dist/core/iteration-tracker.d.ts +57 -0
  104. package/dist/core/iteration-tracker.d.ts.map +1 -0
  105. package/dist/core/iteration-tracker.js +209 -0
  106. package/dist/core/iteration-tracker.js.map +1 -0
  107. package/dist/core/logger.d.ts +0 -0
  108. package/dist/core/logger.d.ts.map +0 -0
  109. package/dist/core/logger.js +0 -0
  110. package/dist/core/logger.js.map +0 -0
  111. package/dist/core/merger.d.ts +0 -0
  112. package/dist/core/merger.d.ts.map +0 -0
  113. package/dist/core/merger.js +0 -0
  114. package/dist/core/merger.js.map +0 -0
  115. package/dist/core/migrator.d.ts +0 -0
  116. package/dist/core/migrator.d.ts.map +0 -0
  117. package/dist/core/migrator.js +0 -0
  118. package/dist/core/migrator.js.map +0 -0
  119. package/dist/core/minimal-scaffolder.d.ts +0 -0
  120. package/dist/core/minimal-scaffolder.d.ts.map +0 -0
  121. package/dist/core/minimal-scaffolder.js +0 -0
  122. package/dist/core/minimal-scaffolder.js.map +0 -0
  123. package/dist/core/modern-console.d.ts +0 -0
  124. package/dist/core/modern-console.d.ts.map +0 -0
  125. package/dist/core/modern-console.js +0 -0
  126. package/dist/core/modern-console.js.map +0 -0
  127. package/dist/core/openspec-manager.d.ts +0 -0
  128. package/dist/core/openspec-manager.d.ts.map +0 -0
  129. package/dist/core/openspec-manager.js +0 -0
  130. package/dist/core/openspec-manager.js.map +0 -0
  131. package/dist/core/openspec-migrator.d.ts +0 -0
  132. package/dist/core/openspec-migrator.d.ts.map +0 -0
  133. package/dist/core/openspec-migrator.js +0 -0
  134. package/dist/core/openspec-migrator.js.map +0 -0
  135. package/dist/core/prd-generator.d.ts +36 -0
  136. package/dist/core/prd-generator.d.ts.map +1 -0
  137. package/dist/core/prd-generator.js +137 -0
  138. package/dist/core/prd-generator.js.map +1 -0
  139. package/dist/core/ralph-manager.d.ts +75 -0
  140. package/dist/core/ralph-manager.d.ts.map +1 -0
  141. package/dist/core/ralph-manager.js +274 -0
  142. package/dist/core/ralph-manager.js.map +1 -0
  143. package/dist/core/skills-manager.d.ts +0 -0
  144. package/dist/core/skills-manager.d.ts.map +0 -0
  145. package/dist/core/skills-manager.js +0 -0
  146. package/dist/core/skills-manager.js.map +0 -0
  147. package/dist/core/task-manager.d.ts +0 -0
  148. package/dist/core/task-manager.d.ts.map +0 -0
  149. package/dist/core/task-manager.js +0 -0
  150. package/dist/core/task-manager.js.map +0 -0
  151. package/dist/core/test-task-manager.d.ts +0 -0
  152. package/dist/core/test-task-manager.d.ts.map +0 -0
  153. package/dist/core/test-task-manager.js +0 -0
  154. package/dist/core/test-task-manager.js.map +0 -0
  155. package/dist/core/validator.d.ts +0 -0
  156. package/dist/core/validator.d.ts.map +0 -0
  157. package/dist/core/validator.js +0 -0
  158. package/dist/core/validator.js.map +0 -0
  159. package/dist/core/version-bumper.d.ts +0 -0
  160. package/dist/core/version-bumper.d.ts.map +0 -0
  161. package/dist/core/version-bumper.js +0 -0
  162. package/dist/core/version-bumper.js.map +0 -0
  163. package/dist/core/watcher.d.ts +0 -0
  164. package/dist/core/watcher.d.ts.map +0 -0
  165. package/dist/core/watcher.js +0 -0
  166. package/dist/core/watcher.js.map +0 -0
  167. package/dist/core/workflow-generator.d.ts +0 -0
  168. package/dist/core/workflow-generator.d.ts.map +0 -0
  169. package/dist/core/workflow-generator.js +297 -297
  170. package/dist/core/workflow-generator.js.map +0 -0
  171. package/dist/index.d.ts +0 -0
  172. package/dist/index.d.ts.map +0 -0
  173. package/dist/index.js +46 -1
  174. package/dist/index.js.map +1 -1
  175. package/dist/mcp/rulebook-server.d.ts +0 -0
  176. package/dist/mcp/rulebook-server.d.ts.map +1 -1
  177. package/dist/mcp/rulebook-server.js +263 -18
  178. package/dist/mcp/rulebook-server.js.map +1 -1
  179. package/dist/memory/hnsw-index.d.ts +0 -0
  180. package/dist/memory/hnsw-index.d.ts.map +1 -1
  181. package/dist/memory/hnsw-index.js +0 -0
  182. package/dist/memory/hnsw-index.js.map +1 -1
  183. package/dist/memory/memory-cache.d.ts +0 -0
  184. package/dist/memory/memory-cache.d.ts.map +1 -1
  185. package/dist/memory/memory-cache.js +0 -0
  186. package/dist/memory/memory-cache.js.map +1 -1
  187. package/dist/memory/memory-hooks.d.ts +6 -0
  188. package/dist/memory/memory-hooks.d.ts.map +1 -1
  189. package/dist/memory/memory-hooks.js +70 -15
  190. package/dist/memory/memory-hooks.js.map +1 -1
  191. package/dist/memory/memory-manager.d.ts +1 -0
  192. package/dist/memory/memory-manager.d.ts.map +1 -1
  193. package/dist/memory/memory-manager.js +9 -7
  194. package/dist/memory/memory-manager.js.map +1 -1
  195. package/dist/memory/memory-search.d.ts +0 -0
  196. package/dist/memory/memory-search.d.ts.map +1 -1
  197. package/dist/memory/memory-search.js +3 -8
  198. package/dist/memory/memory-search.js.map +1 -1
  199. package/dist/memory/memory-store.d.ts +0 -0
  200. package/dist/memory/memory-store.d.ts.map +1 -1
  201. package/dist/memory/memory-store.js +68 -71
  202. package/dist/memory/memory-store.js.map +1 -1
  203. package/dist/memory/memory-types.d.ts +1 -0
  204. package/dist/memory/memory-types.d.ts.map +1 -1
  205. package/dist/memory/memory-types.js +0 -0
  206. package/dist/memory/memory-types.js.map +0 -0
  207. package/dist/memory/memory-vectorizer.d.ts +0 -0
  208. package/dist/memory/memory-vectorizer.d.ts.map +1 -1
  209. package/dist/memory/memory-vectorizer.js +108 -13
  210. package/dist/memory/memory-vectorizer.js.map +1 -1
  211. package/dist/types.d.ts +70 -0
  212. package/dist/types.d.ts.map +1 -1
  213. package/dist/types.js +0 -0
  214. package/dist/types.js.map +0 -0
  215. package/dist/utils/file-system.d.ts +0 -0
  216. package/dist/utils/file-system.d.ts.map +0 -0
  217. package/dist/utils/file-system.js +0 -0
  218. package/dist/utils/file-system.js.map +0 -0
  219. package/dist/utils/git-hooks.d.ts +0 -0
  220. package/dist/utils/git-hooks.d.ts.map +0 -0
  221. package/dist/utils/git-hooks.js +0 -0
  222. package/dist/utils/git-hooks.js.map +0 -0
  223. package/dist/utils/rulesignore.d.ts +0 -0
  224. package/dist/utils/rulesignore.d.ts.map +0 -0
  225. package/dist/utils/rulesignore.js +0 -0
  226. package/dist/utils/rulesignore.js.map +0 -0
  227. package/package.json +108 -107
  228. package/templates/cli/AIDER.md +0 -0
  229. package/templates/cli/AMAZON_Q.md +0 -0
  230. package/templates/cli/AUGGIE.md +0 -0
  231. package/templates/cli/CLAUDE.md +85 -0
  232. package/templates/cli/CLAUDE_CODE.md +0 -0
  233. package/templates/cli/CLINE.md +69 -2
  234. package/templates/cli/CODEBUDDY.md +0 -0
  235. package/templates/cli/CODEIUM.md +0 -0
  236. package/templates/cli/CODEX.md +0 -0
  237. package/templates/cli/CONTINUE.md +0 -0
  238. package/templates/cli/CURSOR_CLI.md +37 -3
  239. package/templates/cli/FACTORY.md +0 -0
  240. package/templates/cli/GEMINI.md +0 -0
  241. package/templates/cli/KILOCODE.md +0 -0
  242. package/templates/cli/OPENCODE.md +0 -0
  243. package/templates/cli/_GENERIC_TEMPLATE.md +0 -0
  244. package/templates/cli/gemini-extension.json +0 -0
  245. package/templates/commands/rulebook-memory-save.md +0 -0
  246. package/templates/commands/rulebook-memory-search.md +0 -0
  247. package/templates/commands/rulebook-task-apply.md +0 -0
  248. package/templates/commands/rulebook-task-archive.md +0 -0
  249. package/templates/commands/rulebook-task-create.md +0 -0
  250. package/templates/commands/rulebook-task-list.md +0 -0
  251. package/templates/commands/rulebook-task-show.md +0 -0
  252. package/templates/commands/rulebook-task-validate.md +0 -0
  253. package/templates/core/AGENT_AUTOMATION.md +142 -38
  254. package/templates/core/DAG.md +0 -0
  255. package/templates/core/DOCUMENTATION_RULES.md +0 -0
  256. package/templates/core/QUALITY_ENFORCEMENT.md +0 -0
  257. package/templates/core/RALPH.md +430 -0
  258. package/templates/core/RULEBOOK.md +20 -1
  259. package/templates/frameworks/ANGULAR.md +0 -0
  260. package/templates/frameworks/DJANGO.md +0 -0
  261. package/templates/frameworks/ELECTRON.md +0 -0
  262. package/templates/frameworks/FLASK.md +0 -0
  263. package/templates/frameworks/FLUTTER.md +0 -0
  264. package/templates/frameworks/JQUERY.md +0 -0
  265. package/templates/frameworks/LARAVEL.md +0 -0
  266. package/templates/frameworks/NESTJS.md +0 -0
  267. package/templates/frameworks/NEXTJS.md +0 -0
  268. package/templates/frameworks/NUXT.md +0 -0
  269. package/templates/frameworks/RAILS.md +0 -0
  270. package/templates/frameworks/REACT.md +0 -0
  271. package/templates/frameworks/REACT_NATIVE.md +0 -0
  272. package/templates/frameworks/SPRING.md +0 -0
  273. package/templates/frameworks/SYMFONY.md +0 -0
  274. package/templates/frameworks/VUE.md +0 -0
  275. package/templates/frameworks/ZEND.md +0 -0
  276. package/templates/git/CI_CD_PATTERNS.md +0 -0
  277. package/templates/git/GITHUB_ACTIONS.md +0 -0
  278. package/templates/git/GITLAB_CI.md +0 -0
  279. package/templates/git/GIT_WORKFLOW.md +0 -0
  280. package/templates/git/SECRETS_MANAGEMENT.md +0 -0
  281. package/templates/hooks/COMMIT_MSG.md +0 -0
  282. package/templates/hooks/POST_CHECKOUT.md +0 -0
  283. package/templates/hooks/PREPARE_COMMIT_MSG.md +0 -0
  284. package/templates/hooks/PRE_COMMIT.md +0 -0
  285. package/templates/hooks/PRE_PUSH.md +0 -0
  286. package/templates/hooks/csharp-pre-commit.sh +0 -0
  287. package/templates/hooks/csharp-pre-push.sh +0 -0
  288. package/templates/hooks/dart-pre-commit.sh +0 -0
  289. package/templates/hooks/dart-pre-push.sh +0 -0
  290. package/templates/hooks/elixir-pre-commit.sh +0 -0
  291. package/templates/hooks/elixir-pre-push.sh +0 -0
  292. package/templates/hooks/erlang-pre-commit.sh +0 -0
  293. package/templates/hooks/erlang-pre-push.sh +0 -0
  294. package/templates/hooks/go-pre-commit.sh +0 -0
  295. package/templates/hooks/go-pre-push.sh +0 -0
  296. package/templates/hooks/haskell-pre-commit.sh +0 -0
  297. package/templates/hooks/haskell-pre-push.sh +0 -0
  298. package/templates/hooks/java-pre-commit.sh +0 -0
  299. package/templates/hooks/java-pre-push.sh +0 -0
  300. package/templates/hooks/kotlin-pre-commit.sh +0 -0
  301. package/templates/hooks/kotlin-pre-push.sh +0 -0
  302. package/templates/hooks/php-pre-commit.sh +0 -0
  303. package/templates/hooks/php-pre-push.sh +0 -0
  304. package/templates/hooks/python-pre-commit.sh +0 -0
  305. package/templates/hooks/python-pre-push.sh +0 -0
  306. package/templates/hooks/ruby-pre-commit.sh +0 -0
  307. package/templates/hooks/ruby-pre-push.sh +0 -0
  308. package/templates/hooks/rust-pre-commit.sh +0 -0
  309. package/templates/hooks/rust-pre-push.sh +0 -0
  310. package/templates/hooks/scala-pre-commit.sh +0 -0
  311. package/templates/hooks/scala-pre-push.sh +0 -0
  312. package/templates/hooks/swift-pre-commit.sh +0 -0
  313. package/templates/hooks/swift-pre-push.sh +0 -0
  314. package/templates/hooks/typescript-pre-commit.sh +0 -0
  315. package/templates/hooks/typescript-pre-push.sh +0 -0
  316. package/templates/ides/COPILOT.md +0 -0
  317. package/templates/ides/CURSOR.md +0 -0
  318. package/templates/ides/JETBRAINS_AI.md +0 -0
  319. package/templates/ides/REPLIT.md +0 -0
  320. package/templates/ides/TABNINE.md +0 -0
  321. package/templates/ides/VSCODE.md +0 -0
  322. package/templates/ides/WINDSURF.md +0 -0
  323. package/templates/ides/ZED.md +0 -0
  324. package/templates/languages/ADA.md +0 -0
  325. package/templates/languages/C.md +0 -0
  326. package/templates/languages/CPP.md +0 -0
  327. package/templates/languages/CSHARP.md +0 -0
  328. package/templates/languages/DART.md +0 -0
  329. package/templates/languages/ELIXIR.md +0 -0
  330. package/templates/languages/ERLANG.md +0 -0
  331. package/templates/languages/GO.md +0 -0
  332. package/templates/languages/HASKELL.md +0 -0
  333. package/templates/languages/JAVA.md +0 -0
  334. package/templates/languages/JAVASCRIPT.md +0 -0
  335. package/templates/languages/JULIA.md +0 -0
  336. package/templates/languages/KOTLIN.md +0 -0
  337. package/templates/languages/LISP.md +0 -0
  338. package/templates/languages/LUA.md +0 -0
  339. package/templates/languages/OBJECTIVEC.md +0 -0
  340. package/templates/languages/PHP.md +0 -0
  341. package/templates/languages/PYTHON.md +0 -0
  342. package/templates/languages/R.md +0 -0
  343. package/templates/languages/RUBY.md +0 -0
  344. package/templates/languages/RUST.md +0 -0
  345. package/templates/languages/SAS.md +0 -0
  346. package/templates/languages/SCALA.md +0 -0
  347. package/templates/languages/SOLIDITY.md +0 -0
  348. package/templates/languages/SQL.md +0 -0
  349. package/templates/languages/SWIFT.md +0 -0
  350. package/templates/languages/TYPESCRIPT.md +0 -0
  351. package/templates/languages/ZIG.md +0 -0
  352. package/templates/modules/ATLASSIAN.md +0 -0
  353. package/templates/modules/CONTEXT7.md +0 -0
  354. package/templates/modules/FIGMA.md +0 -0
  355. package/templates/modules/GITHUB_MCP.md +0 -0
  356. package/templates/modules/GRAFANA.md +0 -0
  357. package/templates/modules/MEMORY.md +74 -11
  358. package/templates/modules/NOTION.md +0 -0
  359. package/templates/modules/PLAYWRIGHT.md +0 -0
  360. package/templates/modules/RULEBOOK_MCP.md +0 -0
  361. package/templates/modules/SERENA.md +0 -0
  362. package/templates/modules/SUPABASE.md +0 -0
  363. package/templates/modules/SYNAP.md +0 -0
  364. package/templates/modules/VECTORIZER.md +0 -0
  365. package/templates/services/AZURE_BLOB.md +0 -0
  366. package/templates/services/CASSANDRA.md +0 -0
  367. package/templates/services/DYNAMODB.md +0 -0
  368. package/templates/services/ELASTICSEARCH.md +0 -0
  369. package/templates/services/GCS.md +0 -0
  370. package/templates/services/INFLUXDB.md +0 -0
  371. package/templates/services/KAFKA.md +0 -0
  372. package/templates/services/MARIADB.md +0 -0
  373. package/templates/services/MEMCACHED.md +0 -0
  374. package/templates/services/MINIO.md +0 -0
  375. package/templates/services/MONGODB.md +0 -0
  376. package/templates/services/MYSQL.md +0 -0
  377. package/templates/services/NEO4J.md +0 -0
  378. package/templates/services/ORACLE.md +0 -0
  379. package/templates/services/POSTGRESQL.md +0 -0
  380. package/templates/services/RABBITMQ.md +0 -0
  381. package/templates/services/REDIS.md +0 -0
  382. package/templates/services/S3.md +0 -0
  383. package/templates/services/SQLITE.md +0 -0
  384. package/templates/services/SQLSERVER.md +0 -0
  385. package/templates/skills/cli/aider/SKILL.md +0 -0
  386. package/templates/skills/cli/amazon-q/SKILL.md +0 -0
  387. package/templates/skills/cli/auggie/SKILL.md +0 -0
  388. package/templates/skills/cli/claude/SKILL.md +0 -0
  389. package/templates/skills/cli/claude-code/SKILL.md +0 -0
  390. package/templates/skills/cli/cline/SKILL.md +0 -0
  391. package/templates/skills/cli/codebuddy/SKILL.md +0 -0
  392. package/templates/skills/cli/codeium/SKILL.md +0 -0
  393. package/templates/skills/cli/codex/SKILL.md +0 -0
  394. package/templates/skills/cli/continue/SKILL.md +0 -0
  395. package/templates/skills/cli/cursor-cli/SKILL.md +0 -0
  396. package/templates/skills/cli/factory/SKILL.md +0 -0
  397. package/templates/skills/cli/gemini/SKILL.md +0 -0
  398. package/templates/skills/cli/kilocode/SKILL.md +0 -0
  399. package/templates/skills/cli/opencode/SKILL.md +0 -0
  400. package/templates/skills/core/agent-automation/SKILL.md +0 -0
  401. package/templates/skills/core/dag/SKILL.md +0 -0
  402. package/templates/skills/core/documentation-rules/SKILL.md +0 -0
  403. package/templates/skills/core/quality-enforcement/SKILL.md +0 -0
  404. package/templates/skills/core/rulebook/SKILL.md +0 -0
  405. package/templates/skills/frameworks/angular/SKILL.md +0 -0
  406. package/templates/skills/frameworks/django/SKILL.md +0 -0
  407. package/templates/skills/frameworks/electron/SKILL.md +0 -0
  408. package/templates/skills/frameworks/flask/SKILL.md +0 -0
  409. package/templates/skills/frameworks/flutter/SKILL.md +0 -0
  410. package/templates/skills/frameworks/jquery/SKILL.md +0 -0
  411. package/templates/skills/frameworks/laravel/SKILL.md +0 -0
  412. package/templates/skills/frameworks/nestjs/SKILL.md +0 -0
  413. package/templates/skills/frameworks/nextjs/SKILL.md +0 -0
  414. package/templates/skills/frameworks/nuxt/SKILL.md +0 -0
  415. package/templates/skills/frameworks/rails/SKILL.md +0 -0
  416. package/templates/skills/frameworks/react/SKILL.md +0 -0
  417. package/templates/skills/frameworks/react-native/SKILL.md +0 -0
  418. package/templates/skills/frameworks/spring/SKILL.md +0 -0
  419. package/templates/skills/frameworks/symfony/SKILL.md +0 -0
  420. package/templates/skills/frameworks/vue/SKILL.md +0 -0
  421. package/templates/skills/frameworks/zend/SKILL.md +0 -0
  422. package/templates/skills/ides/copilot/SKILL.md +0 -0
  423. package/templates/skills/ides/cursor/SKILL.md +0 -0
  424. package/templates/skills/ides/jetbrains-ai/SKILL.md +0 -0
  425. package/templates/skills/ides/replit/SKILL.md +0 -0
  426. package/templates/skills/ides/tabnine/SKILL.md +0 -0
  427. package/templates/skills/ides/vscode/SKILL.md +0 -0
  428. package/templates/skills/ides/windsurf/SKILL.md +0 -0
  429. package/templates/skills/ides/zed/SKILL.md +0 -0
  430. package/templates/skills/languages/ada/SKILL.md +0 -0
  431. package/templates/skills/languages/c/SKILL.md +0 -0
  432. package/templates/skills/languages/cpp/SKILL.md +0 -0
  433. package/templates/skills/languages/csharp/SKILL.md +0 -0
  434. package/templates/skills/languages/dart/SKILL.md +0 -0
  435. package/templates/skills/languages/elixir/SKILL.md +0 -0
  436. package/templates/skills/languages/erlang/SKILL.md +0 -0
  437. package/templates/skills/languages/go/SKILL.md +0 -0
  438. package/templates/skills/languages/haskell/SKILL.md +0 -0
  439. package/templates/skills/languages/java/SKILL.md +0 -0
  440. package/templates/skills/languages/javascript/SKILL.md +0 -0
  441. package/templates/skills/languages/julia/SKILL.md +0 -0
  442. package/templates/skills/languages/kotlin/SKILL.md +0 -0
  443. package/templates/skills/languages/lisp/SKILL.md +0 -0
  444. package/templates/skills/languages/lua/SKILL.md +0 -0
  445. package/templates/skills/languages/objectivec/SKILL.md +0 -0
  446. package/templates/skills/languages/php/SKILL.md +0 -0
  447. package/templates/skills/languages/python/SKILL.md +0 -0
  448. package/templates/skills/languages/r/SKILL.md +0 -0
  449. package/templates/skills/languages/ruby/SKILL.md +0 -0
  450. package/templates/skills/languages/rust/SKILL.md +0 -0
  451. package/templates/skills/languages/sas/SKILL.md +0 -0
  452. package/templates/skills/languages/scala/SKILL.md +0 -0
  453. package/templates/skills/languages/solidity/SKILL.md +0 -0
  454. package/templates/skills/languages/sql/SKILL.md +0 -0
  455. package/templates/skills/languages/swift/SKILL.md +0 -0
  456. package/templates/skills/languages/typescript/SKILL.md +0 -0
  457. package/templates/skills/languages/zig/SKILL.md +0 -0
  458. package/templates/skills/modules/atlassian/SKILL.md +0 -0
  459. package/templates/skills/modules/context7/SKILL.md +0 -0
  460. package/templates/skills/modules/figma/SKILL.md +0 -0
  461. package/templates/skills/modules/github-mcp/SKILL.md +0 -0
  462. package/templates/skills/modules/grafana/SKILL.md +0 -0
  463. package/templates/skills/modules/memory/SKILL.md +0 -0
  464. package/templates/skills/modules/notion/SKILL.md +0 -0
  465. package/templates/skills/modules/playwright/SKILL.md +0 -0
  466. package/templates/skills/modules/rulebook-mcp/SKILL.md +0 -0
  467. package/templates/skills/modules/serena/SKILL.md +0 -0
  468. package/templates/skills/modules/supabase/SKILL.md +0 -0
  469. package/templates/skills/modules/synap/SKILL.md +0 -0
  470. package/templates/skills/modules/vectorizer/SKILL.md +0 -0
  471. package/templates/skills/services/azure-blob/SKILL.md +0 -0
  472. package/templates/skills/services/cassandra/SKILL.md +0 -0
  473. package/templates/skills/services/dynamodb/SKILL.md +0 -0
  474. package/templates/skills/services/elasticsearch/SKILL.md +0 -0
  475. package/templates/skills/services/gcs/SKILL.md +0 -0
  476. package/templates/skills/services/influxdb/SKILL.md +0 -0
  477. package/templates/skills/services/kafka/SKILL.md +0 -0
  478. package/templates/skills/services/mariadb/SKILL.md +0 -0
  479. package/templates/skills/services/memcached/SKILL.md +0 -0
  480. package/templates/skills/services/minio/SKILL.md +0 -0
  481. package/templates/skills/services/mongodb/SKILL.md +0 -0
  482. package/templates/skills/services/mysql/SKILL.md +0 -0
  483. package/templates/skills/services/neo4j/SKILL.md +0 -0
  484. package/templates/skills/services/oracle/SKILL.md +0 -0
  485. package/templates/skills/services/postgresql/SKILL.md +0 -0
  486. package/templates/skills/services/rabbitmq/SKILL.md +0 -0
  487. package/templates/skills/services/redis/SKILL.md +0 -0
  488. package/templates/skills/services/s3/SKILL.md +0 -0
  489. package/templates/skills/services/sqlite/SKILL.md +0 -0
  490. package/templates/skills/services/sqlserver/SKILL.md +0 -0
  491. package/templates/skills/workflows/ralph/SETUP.md +228 -0
  492. package/templates/skills/workflows/ralph/SKILL.md +309 -0
  493. package/templates/skills/workflows/ralph/install.sh +87 -0
  494. package/templates/skills/workflows/ralph/manifest.json +158 -0
  495. package/templates/workflows/codespell.yml +0 -0
  496. package/templates/workflows/cpp-lint.yml +0 -0
  497. package/templates/workflows/cpp-publish.yml +0 -0
  498. package/templates/workflows/cpp-test.yml +0 -0
  499. package/templates/workflows/dotnet-lint.yml +0 -0
  500. package/templates/workflows/dotnet-publish.yml +0 -0
  501. package/templates/workflows/dotnet-test.yml +0 -0
  502. package/templates/workflows/elixir-lint.yml +0 -0
  503. package/templates/workflows/elixir-publish.yml +0 -0
  504. package/templates/workflows/elixir-test.yml +0 -0
  505. package/templates/workflows/erlang-lint.yml +0 -0
  506. package/templates/workflows/erlang-test.yml +0 -0
  507. package/templates/workflows/go-lint.yml +0 -0
  508. package/templates/workflows/go-publish.yml +0 -0
  509. package/templates/workflows/go-test.yml +0 -0
  510. package/templates/workflows/java-lint.yml +0 -0
  511. package/templates/workflows/java-publish.yml +0 -0
  512. package/templates/workflows/java-test.yml +0 -0
  513. package/templates/workflows/kotlin-lint.yml +0 -0
  514. package/templates/workflows/kotlin-publish.yml +0 -0
  515. package/templates/workflows/kotlin-test.yml +0 -0
  516. package/templates/workflows/php-lint.yml +0 -0
  517. package/templates/workflows/php-publish.yml +0 -0
  518. package/templates/workflows/php-test.yml +0 -0
  519. package/templates/workflows/python-lint.yml +0 -0
  520. package/templates/workflows/python-publish.yml +0 -0
  521. package/templates/workflows/python-test.yml +0 -0
  522. package/templates/workflows/rust-lint.yml +0 -0
  523. package/templates/workflows/rust-publish.yml +0 -0
  524. package/templates/workflows/rust-test.yml +0 -0
  525. package/templates/workflows/solidity-lint.yml +0 -0
  526. package/templates/workflows/solidity-test.yml +0 -0
  527. package/templates/workflows/swift-lint.yml +0 -0
  528. package/templates/workflows/swift-publish.yml +0 -0
  529. package/templates/workflows/swift-test.yml +0 -0
  530. package/templates/workflows/typescript-lint.yml +0 -0
  531. package/templates/workflows/typescript-publish.yml +0 -0
  532. package/templates/workflows/typescript-test.yml +0 -0
  533. package/templates/workflows/zig-lint.yml +0 -0
  534. package/templates/workflows/zig-test.yml +0 -0
  535. package/dist/core/modern-console-new.d.ts +0 -81
  536. package/dist/core/modern-console-new.d.ts.map +0 -1
  537. package/dist/core/modern-console-new.js +0 -340
  538. package/dist/core/modern-console-new.js.map +0 -1
  539. package/dist/mcp/handlers/archive-task.d.ts +0 -17
  540. package/dist/mcp/handlers/archive-task.d.ts.map +0 -1
  541. package/dist/mcp/handlers/archive-task.js +0 -36
  542. package/dist/mcp/handlers/archive-task.js.map +0 -1
  543. package/dist/mcp/handlers/create-task.d.ts +0 -17
  544. package/dist/mcp/handlers/create-task.d.ts.map +0 -1
  545. package/dist/mcp/handlers/create-task.js +0 -56
  546. package/dist/mcp/handlers/create-task.js.map +0 -1
  547. package/dist/mcp/handlers/list-tasks.d.ts +0 -22
  548. package/dist/mcp/handlers/list-tasks.d.ts.map +0 -1
  549. package/dist/mcp/handlers/list-tasks.js +0 -42
  550. package/dist/mcp/handlers/list-tasks.js.map +0 -1
  551. package/dist/mcp/handlers/show-task.d.ts +0 -25
  552. package/dist/mcp/handlers/show-task.d.ts.map +0 -1
  553. package/dist/mcp/handlers/show-task.js +0 -43
  554. package/dist/mcp/handlers/show-task.js.map +0 -1
  555. package/dist/mcp/handlers/update-task.d.ts +0 -17
  556. package/dist/mcp/handlers/update-task.d.ts.map +0 -1
  557. package/dist/mcp/handlers/update-task.js +0 -35
  558. package/dist/mcp/handlers/update-task.js.map +0 -1
  559. package/dist/mcp/handlers/validate-task.d.ts +0 -15
  560. package/dist/mcp/handlers/validate-task.d.ts.map +0 -1
  561. package/dist/mcp/handlers/validate-task.js +0 -27
  562. package/dist/mcp/handlers/validate-task.js.map +0 -1
  563. package/dist/mcp/rulebook-config.d.ts +0 -22
  564. package/dist/mcp/rulebook-config.d.ts.map +0 -1
  565. package/dist/mcp/rulebook-config.js +0 -65
  566. package/dist/mcp/rulebook-config.js.map +0 -1
@@ -0,0 +1,112 @@
1
+ ---
2
+ name: /ralph-config
3
+ id: ralph-config
4
+ category: Ralph
5
+ description: Configure Ralph autonomous loop settings and parameters.
6
+ ---
7
+ <!-- RALPH:START -->
8
+ **Overview**
9
+ Manage Ralph's configuration including max iterations, AI tool selection, and other loop parameters. Configuration is stored in `.rulebook/ralph/config.json`.
10
+
11
+ **Guardrails**
12
+ - Configuration applies to future iterations only
13
+ - Changing config mid-loop may not affect current iteration
14
+ - Save configuration changes before resuming loop
15
+ - Common settings: max_iterations, ai_tool, branch_name
16
+
17
+ **Configuration Options**
18
+
19
+ ### Max Iterations
20
+ Maximum number of iterations Ralph will run before stopping.
21
+ ```bash
22
+ rulebook ralph config set max_iterations 20
23
+ ```
24
+ - Recommended: 5-20 for most projects
25
+ - Higher values allow more complex tasks to complete
26
+ - Lower values quick validation runs
27
+
28
+ ### AI Tool
29
+ Which AI tool to use for solving tasks (claude, cursor, gemini).
30
+ ```bash
31
+ rulebook ralph config set ai_tool claude
32
+ ```
33
+ - `claude` (recommended): Best for complex reasoning
34
+ - `cursor`: Fast iteration if you have Cursor CLI
35
+ - `gemini`: Alternative option for diversity
36
+ - Note: Tool must be installed and available on CLI
37
+
38
+ ### Branch Name
39
+ Git branch Ralph works on for this loop.
40
+ ```bash
41
+ rulebook ralph config set branch_name ralph/my-feature
42
+ ```
43
+ - Automatically set during init
44
+ - Change if working on different feature
45
+ - Ralph commits to this branch
46
+
47
+ ### Project Name
48
+ Project name for documentation and tracking.
49
+ ```bash
50
+ rulebook ralph config set project_name my-project
51
+ ```
52
+
53
+ **Steps**
54
+
55
+ 1. **View Current Configuration**:
56
+ ```bash
57
+ rulebook ralph config show
58
+ ```
59
+ Displays all current settings
60
+
61
+ 2. **Update a Setting**:
62
+ ```bash
63
+ rulebook ralph config set <key> <value>
64
+ ```
65
+ Example:
66
+ ```bash
67
+ rulebook ralph config set max_iterations 15
68
+ rulebook ralph config set ai_tool cursor
69
+ ```
70
+
71
+ 3. **Reset to Defaults**:
72
+ ```bash
73
+ rulebook ralph config reset
74
+ ```
75
+ Resets to default values from init
76
+
77
+ 4. **Verify Changes**:
78
+ ```bash
79
+ rulebook ralph status
80
+ ```
81
+ Shows updated config in status output
82
+
83
+ **Configuration File**
84
+ Location: `.rulebook/ralph/config.json`
85
+
86
+ Example structure:
87
+ ```json
88
+ {
89
+ "enabled": true,
90
+ "max_iterations": 10,
91
+ "current_iteration": 0,
92
+ "ai_tool": "claude",
93
+ "project_name": "my-project",
94
+ "branch_name": "ralph/my-project",
95
+ "paused": false
96
+ }
97
+ ```
98
+
99
+ **Workflow**
100
+ 1. Initialize Ralph: `rulebook ralph init` (sets initial config)
101
+ 2. Review config: `rulebook ralph config show`
102
+ 3. Adjust as needed: `rulebook ralph config set <key> <value>`
103
+ 4. Start loop: `rulebook ralph run`
104
+ 5. Monitor with: `rulebook ralph status`
105
+
106
+ **Troubleshooting**
107
+ - **Config file missing**: Run `rulebook ralph init` again
108
+ - **Settings not updating**: Ensure you're using correct key name
109
+ - **Changes not taking effect**: Pause loop, update config, then resume
110
+ - **Invalid ai_tool**: Check tool is installed (e.g., `claude --version`)
111
+
112
+ <!-- RALPH:END -->
@@ -0,0 +1,110 @@
1
+ ---
2
+ name: /ralph-history
3
+ id: ralph-history
4
+ category: Ralph
5
+ description: View past Ralph iterations, quality check results, and learnings.
6
+ ---
7
+ <!-- RALPH:START -->
8
+ **Overview**
9
+ Review detailed records of all Ralph iterations, including:
10
+ - Task completion status
11
+ - Quality gate results (type-check, lint, tests, coverage)
12
+ - Execution time and performance metrics
13
+ - Errors encountered and learnings discovered
14
+ - Git commits associated with each iteration
15
+
16
+ **Guardrails**
17
+ - History is automatically recorded by Ralph during execution
18
+ - Read-only view - use to analyze and debug past iterations
19
+ - Useful for identifying patterns in failures or learning opportunities
20
+ - Each iteration is stored separately for audit trail
21
+
22
+ **Steps**
23
+ 1. **View All Iterations**:
24
+ ```bash
25
+ rulebook ralph history
26
+ ```
27
+ Shows summary of all iterations with status and task info
28
+
29
+ 2. **View Latest Iterations**:
30
+ ```bash
31
+ rulebook ralph history --limit 5
32
+ ```
33
+ Shows most recent N iterations (useful for large iteration counts)
34
+
35
+ 3. **View Specific Iteration**:
36
+ ```bash
37
+ rulebook ralph history --iteration 3
38
+ ```
39
+ Shows detailed information for iteration 3
40
+
41
+ 4. **Export History**:
42
+ ```bash
43
+ rulebook ralph history --export history.json
44
+ ```
45
+ Exports full iteration history for analysis
46
+
47
+ **Iteration Record Fields**
48
+ Each iteration record contains:
49
+ - **Metadata**:
50
+ - Iteration number
51
+ - Timestamp
52
+ - Task ID and title
53
+ - AI tool used
54
+ - Execution time (ms)
55
+ - Status: success / partial / failed
56
+
57
+ - **Quality Checks**:
58
+ - type-check: TypeScript compilation result
59
+ - lint: ESLint check result
60
+ - tests: Test suite result
61
+ - coverage_met: Coverage threshold result
62
+
63
+ - **Output**:
64
+ - output_summary: Summary of what was done
65
+ - learnings: Insights discovered during iteration
66
+ - errors: Any errors encountered
67
+
68
+ - **Git**:
69
+ - git_commit: Commit hash if changes were committed
70
+ - branch: Branch used for this iteration
71
+
72
+ **Analyzing History**
73
+ 1. **Success Rate**:
74
+ ```bash
75
+ # Successful iterations / total iterations
76
+ # Shows loop health and AI tool effectiveness
77
+ ```
78
+
79
+ 2. **Quality Gate Patterns**:
80
+ - Check which gates fail most often
81
+ - Identify systematic issues (e.g., always failing lint)
82
+ - Plan improvements based on failure patterns
83
+
84
+ 3. **Learnings Extraction**:
85
+ - Ralph records lessons learned from each iteration
86
+ - Use these to improve task definitions or AI prompts
87
+ - Share with team for knowledge base
88
+
89
+ 4. **Performance Metrics**:
90
+ - Track execution time per iteration
91
+ - Identify slow tasks or AI tools
92
+ - Optimize based on trends
93
+
94
+ **Location**
95
+ - Iteration records stored in: `.rulebook/ralph/history/`
96
+ - Each file named: `iteration-<N>.json`
97
+ - Full history also available in: `.rulebook/ralph/history-all.json`
98
+
99
+ **Using History for Debugging**
100
+ 1. **Failed iteration**: Check error field for root cause
101
+ 2. **Partial success**: Review which quality gates failed
102
+ 3. **Slow iteration**: Check execution_time_ms
103
+ 4. **Pattern analysis**: Compare multiple iterations for trends
104
+
105
+ **Next Steps**
106
+ - After reviewing history, fix issues and retry: `rulebook ralph run`
107
+ - Save learnings to persistent memory: `rulebook memory save "learning from iteration" ...`
108
+ - Update PRD based on discoveries from history analysis
109
+
110
+ <!-- RALPH:END -->
@@ -0,0 +1,72 @@
1
+ ---
2
+ name: /ralph-init
3
+ id: ralph-init
4
+ category: Ralph
5
+ description: Initialize Ralph autonomous loop for AI-driven task completion in a project.
6
+ ---
7
+ <!-- RALPH:START -->
8
+ **Overview**
9
+ Ralph is an autonomous AI loop that iteratively solves tasks from a PRD (Product Requirements Document). It runs your AI tool (Claude, Cursor, Gemini) in a continuous loop, tracks iterations, and learns from execution results.
10
+
11
+ **Guardrails**
12
+ - Always initialize Ralph before running iterations
13
+ - Use `rulebook ralph status` to check initialization and loop state
14
+ - Set appropriate max iterations (5-20 recommended for most projects)
15
+ - Keep the AI tool consistent across iterations for learning continuity
16
+
17
+ **Prerequisites**
18
+ - Project must be initialized with `rulebook init`
19
+ - Git repository must be set up with a remote origin
20
+ - Current branch will be used as the base for Ralph work
21
+
22
+ **Steps**
23
+ 1. **Initialize Ralph**:
24
+ ```bash
25
+ rulebook ralph init
26
+ ```
27
+
28
+ 2. **Interactive Setup**:
29
+ - Select max iterations (number of attempts to complete tasks)
30
+ - Choose AI tool: `claude` (recommended), `cursor`, or `gemini`
31
+ - Creates `.rulebook/ralph/` directory with configuration and PRD
32
+
33
+ 3. **Verify Initialization**:
34
+ ```bash
35
+ rulebook ralph status
36
+ ```
37
+ Should show:
38
+ - `enabled: true`
39
+ - `current_iteration: 0`
40
+ - `max_iterations: <your choice>`
41
+ - `ai_tool: <your choice>`
42
+
43
+ 4. **Review Generated PRD**:
44
+ - View `.rulebook/ralph/prd.json` for generated user stories
45
+ - Each story has: `id`, `title`, `description`, `acceptanceCriteria`, `priority`, `passes`, `notes`
46
+ - `passes: false` indicates pending stories
47
+
48
+ 5. **Optional: Customize PRD**:
49
+ - Edit user stories directly in `prd.json`
50
+ - Adjust priorities, add acceptance criteria, refine descriptions
51
+ - Ralph will track which stories are completed (`passes: true`)
52
+
53
+ **Output**
54
+ Ralph creates:
55
+ - `.rulebook/ralph/prd.json` - The product requirements document
56
+ - `.rulebook/ralph/config.json` - Loop configuration (max_iterations, ai_tool)
57
+ - `.rulebook/ralph/history/` - Directory for iteration records
58
+
59
+ **Next Steps**
60
+ After initialization, use:
61
+ - `rulebook ralph run` - Start the autonomous loop
62
+ - `rulebook ralph pause` - Pause ongoing iterations
63
+ - `rulebook ralph resume` - Resume paused loop
64
+ - `rulebook ralph status` - Check current state
65
+ - `rulebook ralph history` - View past iterations
66
+
67
+ **Troubleshooting**
68
+ - **Init hangs**: Check git remote is properly configured (`git remote -v`)
69
+ - **PRD not generated**: Ensure project has valid task/context for Ralph to work with
70
+ - **Configuration lost**: Check `.rulebook/ralph/config.json` exists
71
+
72
+ <!-- RALPH:END -->
@@ -0,0 +1,105 @@
1
+ ---
2
+ name: /ralph-pause-resume
3
+ id: ralph-pause-resume
4
+ category: Ralph
5
+ description: Pause and resume Ralph autonomous loop for manual intervention or debugging.
6
+ ---
7
+ <!-- RALPH:START -->
8
+ **Overview**
9
+ Control Ralph's iteration loop by pausing and resuming execution:
10
+ - **Pause**: Stop after current iteration completes, allows manual inspection or fixes
11
+ - **Resume**: Continue from where paused, picking up with next incomplete story
12
+
13
+ **Guardrails**
14
+ - Pause completes current iteration before stopping (safe operation)
15
+ - Loop can only be resumed from paused state
16
+ - Use pause when: debugging failures, making manual fixes, investigating quality issues
17
+ - Keep pause duration short - long pauses may lose AI context
18
+
19
+ **Steps**
20
+
21
+ ### Pausing the Loop
22
+
23
+ 1. **Pause Ralph**:
24
+ ```bash
25
+ rulebook ralph pause
26
+ ```
27
+ - Completes current iteration
28
+ - Stops before next iteration starts
29
+ - Preserves all progress and iteration records
30
+
31
+ 2. **Verify Paused State**:
32
+ ```bash
33
+ rulebook ralph status
34
+ ```
35
+ Should show: `Paused: true`
36
+
37
+ 3. **Investigate Issues** (while paused):
38
+ - Review latest iteration: `rulebook ralph history --iteration <N>`
39
+ - Check quality gate failures: `rulebook ralph show <story-id>`
40
+ - Review error logs and learnings
41
+ - Make manual fixes to code if needed
42
+
43
+ ### Resuming the Loop
44
+
45
+ 1. **Resume Ralph**:
46
+ ```bash
47
+ rulebook ralph resume
48
+ ```
49
+ - Continues from where paused
50
+ - Picks up with next incomplete story
51
+ - Maintains iteration count and progress
52
+
53
+ 2. **Verify Running State**:
54
+ ```bash
55
+ rulebook ralph status
56
+ ```
57
+ Should show: `Paused: false`
58
+
59
+ 3. **Monitor Resumed Iterations**:
60
+ ```bash
61
+ rulebook ralph history --limit 3
62
+ ```
63
+ Check latest iterations to ensure resumption succeeded
64
+
65
+ **Common Workflows**
66
+
67
+ ### Debugging Quality Gate Failures
68
+ 1. Loop running, tests fail in iteration 5
69
+ 2. `rulebook ralph pause` - stops after iteration 5
70
+ 3. Analyze: `rulebook ralph history --iteration 5`
71
+ 4. Identify test failure root cause
72
+ 5. Make manual code fixes
73
+ 6. `rulebook ralph resume` - continues from iteration 6
74
+
75
+ ### Making Manual Adjustments
76
+ 1. Pause loop: `rulebook ralph pause`
77
+ 2. Manually edit code based on iteration learnings
78
+ 3. Update PRD: `vi .rulebook/ralph/prd.json`
79
+ 4. Resume: `rulebook ralph resume` - continues with updated PRD
80
+
81
+ ### Inspecting AI Tool Output
82
+ 1. Pause: `rulebook ralph pause`
83
+ 2. Check `rulebook ralph history --iteration <N>` for AI output
84
+ 3. Review learnings and errors from iteration
85
+ 4. Resume: `rulebook ralph resume`
86
+
87
+ **Pause vs Stopping**
88
+ - **Pause** (`ralph pause`): Loop continues later with resume
89
+ - **Stop** (Ctrl+C during run): Stops immediately, may interrupt current iteration
90
+ - Use pause for graceful, resumable stops
91
+ - Use Ctrl+C only for emergency stops
92
+
93
+ **State Preservation**
94
+ When paused:
95
+ - Current iteration status saved
96
+ - User story states preserved
97
+ - Learnings and errors recorded
98
+ - Loop progress not lost
99
+
100
+ **Edge Cases**
101
+ - **Can't pause if not running**: Check with `ralph status`
102
+ - **Can't resume if not paused**: Call `ralph run` instead
103
+ - **Resuming after long pause**: Ralph retains context up to max iterations allowed
104
+
105
+ <!-- RALPH:END -->
@@ -0,0 +1,101 @@
1
+ ---
2
+ name: /ralph-run
3
+ id: ralph-run
4
+ category: Ralph
5
+ description: Start Ralph autonomous loop to iteratively complete tasks from the PRD.
6
+ ---
7
+ <!-- RALPH:START -->
8
+ **Overview**
9
+ Ralph runs your configured AI tool in a continuous loop, solving user stories from the PRD one at a time. Each iteration:
10
+ 1. Picks the next incomplete user story
11
+ 2. Invokes your AI tool (Claude, Cursor, or Gemini) to solve it
12
+ 3. Parses the output for quality checks and completion status
13
+ 4. Records the iteration results
14
+ 5. Marks the story as complete if all quality gates pass
15
+ 6. Moves to the next story or stops if max iterations reached
16
+
17
+ **Guardrails**
18
+ - Ralph must be initialized first with `rulebook ralph init`
19
+ - Quality gates MUST pass: type-check, lint, tests, coverage
20
+ - Failed iterations are recorded but don't auto-mark stories complete
21
+ - Monitor logs and iteration history for quality issues
22
+
23
+ **Prerequisites**
24
+ - Ralph initialized with `rulebook ralph init`
25
+ - All quality gate tools installed: TypeScript, ESLint, test framework, coverage reporter
26
+ - `.rulebook/ralph/prd.json` exists with user stories
27
+
28
+ **Steps**
29
+ 1. **Start the Loop**:
30
+ ```bash
31
+ rulebook ralph run
32
+ ```
33
+ Ralph will:
34
+ - Load configuration and PRD
35
+ - Find first incomplete story (`passes: false`)
36
+ - Invoke your AI tool
37
+ - Parse output for task completion and quality checks
38
+
39
+ 2. **Monitor Execution**:
40
+ - Watch the console for iteration progress
41
+ - Each iteration shows: story ID, title, execution time, quality gate results
42
+ - Ralph will pause on quality gate failures for review
43
+
44
+ 3. **Review Iteration Results**:
45
+ ```bash
46
+ rulebook ralph history
47
+ ```
48
+ Shows:
49
+ - Iteration number
50
+ - Task ID and title
51
+ - Success/partial/failed status
52
+ - Quality check results (type-check, lint, tests, coverage)
53
+ - Execution time
54
+ - Errors and learnings
55
+
56
+ 4. **Check Status**:
57
+ ```bash
58
+ rulebook ralph status
59
+ ```
60
+ Shows:
61
+ - Current iteration count
62
+ - Pending user stories count
63
+ - Completion percentage
64
+ - Paused state (if paused)
65
+
66
+ **Iteration Lifecycle**
67
+ 1. **Iteration Start**: Ralph picks next incomplete story
68
+ 2. **AI Tool Execution**: Runs your configured tool (Claude/Cursor/Gemini)
69
+ 3. **Output Parsing**: Extracts quality checks, errors, completion indicators
70
+ 4. **Quality Gates**:
71
+ - type-check ✓ - TypeScript compilation succeeds
72
+ - lint ✓ - ESLint passes without errors
73
+ - tests ✓ - All test suites pass
74
+ - coverage ✓ - Coverage meets thresholds
75
+ 5. **Story Completion**: If all gates pass, marks `passes: true`
76
+ 6. **Next Iteration**: Moves to next story or completes loop
77
+
78
+ **Quality Gate Failures**
79
+ If gates fail:
80
+ - Status recorded as `partial` or `failed`
81
+ - Story remains `passes: false` for retry
82
+ - Error details saved in iteration history
83
+ - Manual review and fixes may be needed before retry
84
+
85
+ **Pausing and Resuming**
86
+ - `rulebook ralph pause` - Pause after current iteration
87
+ - `rulebook ralph resume` - Continue from where paused
88
+ - Useful for investigating failures or making manual adjustments
89
+
90
+ **Iteration Records**
91
+ Each iteration is recorded in:
92
+ - `.rulebook/ralph/history/iteration-<N>.json` with full details
93
+ - Includes: task details, quality checks, errors, learnings, git commit
94
+
95
+ **Troubleshooting**
96
+ - **Loop stops early**: Check quality gate failures in latest iteration
97
+ - **AI tool not found**: Ensure `rulebook ralph config set ai-tool <tool>` is set correctly
98
+ - **Infinite loops**: Use `rulebook ralph pause` and check loop configuration
99
+ - **Context loss**: Ralph tracks context loss and reports it in iteration metadata
100
+
101
+ <!-- RALPH:END -->
@@ -0,0 +1,76 @@
1
+ ---
2
+ name: /ralph-status
3
+ id: ralph-status
4
+ category: Ralph
5
+ description: Check the status of Ralph autonomous loop and view task completion statistics.
6
+ ---
7
+ <!-- RALPH:START -->
8
+ **Overview**
9
+ View the current state of Ralph's autonomous loop, including:
10
+ - Loop enabled/disabled status
11
+ - Current iteration count and max iterations
12
+ - Paused/running state
13
+ - User story completion statistics
14
+ - Overall project progress
15
+
16
+ **Guardrails**
17
+ - Status shows real-time state from `.rulebook/ralph/config.json` and `prd.json`
18
+ - Use status regularly to monitor loop health
19
+ - Paused state prevents iterations from continuing (must resume to continue)
20
+
21
+ **Steps**
22
+ 1. **Check Ralph Status**:
23
+ ```bash
24
+ rulebook ralph status
25
+ ```
26
+
27
+ 2. **Interpret Output**:
28
+ ```
29
+ Ralph Status:
30
+ ├─ Enabled: true
31
+ ├─ Current Iteration: 3
32
+ ├─ Max Iterations: 10
33
+ ├─ AI Tool: claude
34
+ ├─ Paused: false
35
+ ├─ Task Statistics:
36
+ │ ├─ Total Stories: 5
37
+ │ ├─ Completed: 2
38
+ │ ├─ Pending: 3
39
+ │ └─ Completion: 40%
40
+ └─ Branch: ralph/my-project
41
+ ```
42
+
43
+ 3. **Status Fields**:
44
+ - **Enabled**: Whether Ralph loop is active
45
+ - **Current Iteration**: Which iteration loop is on (0 = not started)
46
+ - **Max Iterations**: Total iterations allowed before stopping
47
+ - **AI Tool**: Which AI tool is being used (claude, cursor, gemini)
48
+ - **Paused**: Whether loop is paused (must resume to continue)
49
+ - **Task Statistics**: User story completion breakdown
50
+ - **Branch**: Git branch Ralph is working on
51
+
52
+ 4. **Check Completion**:
53
+ ```bash
54
+ # View detailed task statistics
55
+ rulebook ralph status --detailed
56
+ ```
57
+ Shows individual user story status and completion breakdown
58
+
59
+ **Common Patterns**
60
+ - **Just initialized**: `Current Iteration: 0`, `Pending: <all stories>`
61
+ - **In progress**: `Current Iteration: N` increasing, `Pending` decreasing
62
+ - **Complete**: `Current Iteration` matches total completed stories, `Pending: 0`
63
+ - **Paused**: `Paused: true`, resume with `rulebook ralph resume`
64
+
65
+ **Next Steps**
66
+ - If loop not started: `rulebook ralph run`
67
+ - If paused: `rulebook ralph resume`
68
+ - To view iterations: `rulebook ralph history`
69
+ - To view story details: `rulebook ralph show <story-id>` (if available)
70
+
71
+ **Troubleshooting**
72
+ - **Status shows disabled**: Run `rulebook ralph init` to enable
73
+ - **Iteration count stuck**: Check if loop is paused or if max iterations reached
74
+ - **Statistics don't match**: Check `.rulebook/ralph/prd.json` for consistency
75
+
76
+ <!-- RALPH:END -->
@@ -0,0 +1,48 @@
1
+ ---
2
+ name: /rulebook-memory-save
3
+ id: rulebook-memory-save
4
+ category: Rulebook
5
+ description: Save a new persistent memory for context across AI sessions.
6
+ ---
7
+ <!-- RULEBOOK:START -->
8
+ **Guardrails**
9
+ - Use the MCP memory tools when available (preferred over CLI commands).
10
+ - Choose the correct memory type for accurate classification and search.
11
+ - Keep titles concise and content descriptive.
12
+ - Use tags for better discoverability.
13
+
14
+ **Steps**
15
+ 1. **Save a memory** using the MCP tool or CLI:
16
+ ```
17
+ # Via MCP (preferred)
18
+ rulebook_memory_save({
19
+ type: "feature",
20
+ title: "Short descriptive title",
21
+ content: "Detailed description of what happened, why, and context",
22
+ tags: ["relevant", "tags"]
23
+ })
24
+
25
+ # Via CLI
26
+ rulebook memory save "content text" --type feature --title "Title" --tags tag1,tag2
27
+ ```
28
+
29
+ 2. **Choose the right type**:
30
+ - `bugfix` - Fixed a bug or resolved an error
31
+ - `feature` - Added new functionality
32
+ - `refactor` - Restructured code without changing behavior
33
+ - `decision` - Made an architecture or design choice (protected from eviction)
34
+ - `discovery` - Found something important about the codebase
35
+ - `change` - General code modification
36
+ - `observation` - Noted something worth remembering
37
+
38
+ 3. **Verify** the memory was saved:
39
+ ```
40
+ rulebook_memory_search({ query: "your title keywords" })
41
+ ```
42
+
43
+ **Best Practices**
44
+ - Save decisions early - they are protected from cache eviction
45
+ - Include "why" in content, not just "what"
46
+ - Use consistent tags across related memories
47
+ - Content within `<private>...</private>` tags will be automatically redacted
48
+ <!-- RULEBOOK:END -->
@@ -0,0 +1,47 @@
1
+ ---
2
+ name: /rulebook-memory-search
3
+ id: rulebook-memory-search
4
+ category: Rulebook
5
+ description: Search persistent memories using hybrid BM25+vector search for context across sessions.
6
+ ---
7
+ <!-- RULEBOOK:START -->
8
+ **Guardrails**
9
+ - Use the MCP memory tools when available (preferred over CLI commands).
10
+ - The memory system uses 3-layer search: Layer 1 (compact search), Layer 2 (timeline), Layer 3 (full details).
11
+ - Always start with a broad search, then narrow down with timeline and full details.
12
+
13
+ **Steps**
14
+ 1. **Search memories** using the MCP tool or CLI:
15
+ ```
16
+ # Via MCP (preferred)
17
+ rulebook_memory_search({ query: "search terms", mode: "hybrid", limit: 20 })
18
+
19
+ # Via CLI
20
+ rulebook memory search "search terms" --mode hybrid --limit 20
21
+ ```
22
+ Modes: `hybrid` (default, best results), `bm25` (keyword only), `vector` (semantic only).
23
+
24
+ 2. **Get timeline context** around a relevant result:
25
+ ```
26
+ rulebook_memory_timeline({ memoryId: "<id>", window: 5 })
27
+ ```
28
+
29
+ 3. **Get full details** for specific memories:
30
+ ```
31
+ rulebook_memory_get({ ids: ["<id1>", "<id2>"] })
32
+ ```
33
+
34
+ **Memory Types**
35
+ - `bugfix` - Bug fixes and error resolutions
36
+ - `feature` - New features and capabilities
37
+ - `refactor` - Code restructuring
38
+ - `decision` - Architecture/design decisions (protected from eviction)
39
+ - `discovery` - Findings about codebase or tools
40
+ - `change` - General code changes
41
+ - `observation` - General observations
42
+
43
+ **Reference**
44
+ - Use `rulebook memory stats` to check database health
45
+ - Decisions are never evicted during cleanup
46
+ - Privacy: content within `<private>...</private>` tags is automatically redacted
47
+ <!-- RULEBOOK:END -->