@hivehub/rulebook 2.0.0 → 3.0.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 (188) hide show
  1. package/README.md +779 -654
  2. package/dist/cli/commands.d.ts +22 -0
  3. package/dist/cli/commands.d.ts.map +1 -1
  4. package/dist/cli/commands.js +291 -8
  5. package/dist/cli/commands.js.map +1 -1
  6. package/dist/core/claude-mcp.d.ts +32 -0
  7. package/dist/core/claude-mcp.d.ts.map +1 -0
  8. package/dist/core/claude-mcp.js +92 -0
  9. package/dist/core/claude-mcp.js.map +1 -0
  10. package/dist/core/config-manager.d.ts.map +1 -1
  11. package/dist/core/config-manager.js +27 -6
  12. package/dist/core/config-manager.js.map +1 -1
  13. package/dist/core/generator.d.ts.map +1 -1
  14. package/dist/core/generator.js +98 -49
  15. package/dist/core/generator.js.map +1 -1
  16. package/dist/core/migrator.d.ts +13 -0
  17. package/dist/core/migrator.d.ts.map +1 -1
  18. package/dist/core/migrator.js +76 -9
  19. package/dist/core/migrator.js.map +1 -1
  20. package/dist/core/openspec-migrator.d.ts +1 -1
  21. package/dist/core/openspec-migrator.d.ts.map +1 -1
  22. package/dist/core/openspec-migrator.js +14 -7
  23. package/dist/core/openspec-migrator.js.map +1 -1
  24. package/dist/core/workflow-generator.js +297 -176
  25. package/dist/core/workflow-generator.js.map +1 -1
  26. package/dist/index.js +40 -1
  27. package/dist/index.js.map +1 -1
  28. package/dist/mcp/rulebook-server.d.ts.map +1 -1
  29. package/dist/mcp/rulebook-server.js +255 -74
  30. package/dist/mcp/rulebook-server.js.map +1 -1
  31. package/dist/memory/hnsw-index.d.ts +63 -0
  32. package/dist/memory/hnsw-index.d.ts.map +1 -0
  33. package/dist/memory/hnsw-index.js +421 -0
  34. package/dist/memory/hnsw-index.js.map +1 -0
  35. package/dist/memory/memory-cache.d.ts +33 -0
  36. package/dist/memory/memory-cache.d.ts.map +1 -0
  37. package/dist/memory/memory-cache.js +85 -0
  38. package/dist/memory/memory-cache.js.map +1 -0
  39. package/dist/memory/memory-hooks.d.ts +42 -0
  40. package/dist/memory/memory-hooks.d.ts.map +1 -0
  41. package/dist/memory/memory-hooks.js +193 -0
  42. package/dist/memory/memory-hooks.js.map +1 -0
  43. package/dist/memory/memory-manager.d.ts +55 -0
  44. package/dist/memory/memory-manager.d.ts.map +1 -0
  45. package/dist/memory/memory-manager.js +209 -0
  46. package/dist/memory/memory-manager.js.map +1 -0
  47. package/dist/memory/memory-search.d.ts +42 -0
  48. package/dist/memory/memory-search.d.ts.map +1 -0
  49. package/dist/memory/memory-search.js +166 -0
  50. package/dist/memory/memory-search.js.map +1 -0
  51. package/dist/memory/memory-store.d.ts +59 -0
  52. package/dist/memory/memory-store.d.ts.map +1 -0
  53. package/dist/memory/memory-store.js +394 -0
  54. package/dist/memory/memory-store.js.map +1 -0
  55. package/dist/memory/memory-types.d.ts +69 -0
  56. package/dist/memory/memory-types.d.ts.map +1 -0
  57. package/dist/memory/memory-types.js +7 -0
  58. package/dist/memory/memory-types.js.map +1 -0
  59. package/dist/memory/memory-vectorizer.d.ts +29 -0
  60. package/dist/memory/memory-vectorizer.d.ts.map +1 -0
  61. package/dist/memory/memory-vectorizer.js +104 -0
  62. package/dist/memory/memory-vectorizer.js.map +1 -0
  63. package/dist/types.d.ts +7 -0
  64. package/dist/types.d.ts.map +1 -1
  65. package/package.json +107 -106
  66. package/templates/cli/CLAUDE_CODE.md +114 -13
  67. package/templates/commands/rulebook-memory-save.md +48 -0
  68. package/templates/commands/rulebook-memory-search.md +47 -0
  69. package/templates/commands/rulebook-task-apply.md +2 -2
  70. package/templates/commands/rulebook-task-archive.md +2 -2
  71. package/templates/commands/rulebook-task-create.md +2 -2
  72. package/templates/commands/rulebook-task-list.md +2 -2
  73. package/templates/commands/rulebook-task-show.md +2 -2
  74. package/templates/commands/rulebook-task-validate.md +2 -2
  75. package/templates/git/CI_CD_PATTERNS.md +4 -4
  76. package/templates/git/GITHUB_ACTIONS.md +3 -3
  77. package/templates/git/GITLAB_CI.md +4 -4
  78. package/templates/git/SECRETS_MANAGEMENT.md +4 -4
  79. package/templates/hooks/COMMIT_MSG.md +4 -4
  80. package/templates/hooks/POST_CHECKOUT.md +3 -3
  81. package/templates/hooks/PREPARE_COMMIT_MSG.md +3 -3
  82. package/templates/hooks/PRE_COMMIT.md +4 -4
  83. package/templates/hooks/PRE_PUSH.md +4 -4
  84. package/templates/modules/MEMORY.md +63 -0
  85. package/templates/skills/cli/aider/SKILL.md +59 -0
  86. package/templates/skills/cli/amazon-q/SKILL.md +35 -0
  87. package/templates/skills/cli/auggie/SKILL.md +42 -0
  88. package/templates/skills/cli/claude/SKILL.md +42 -0
  89. package/templates/skills/cli/claude-code/SKILL.md +146 -0
  90. package/templates/skills/cli/cline/SKILL.md +42 -0
  91. package/templates/skills/cli/codebuddy/SKILL.md +30 -0
  92. package/templates/skills/cli/codeium/SKILL.md +30 -0
  93. package/templates/skills/cli/codex/SKILL.md +31 -0
  94. package/templates/skills/cli/continue/SKILL.md +44 -0
  95. package/templates/skills/cli/cursor-cli/SKILL.md +38 -0
  96. package/templates/skills/cli/factory/SKILL.md +28 -0
  97. package/templates/skills/cli/gemini/SKILL.md +45 -0
  98. package/templates/skills/cli/kilocode/SKILL.md +28 -0
  99. package/templates/skills/cli/opencode/SKILL.md +28 -0
  100. package/templates/skills/core/agent-automation/SKILL.md +194 -0
  101. package/templates/skills/core/dag/SKILL.md +314 -0
  102. package/templates/skills/core/documentation-rules/SKILL.md +47 -0
  103. package/templates/skills/core/quality-enforcement/SKILL.md +78 -0
  104. package/templates/skills/frameworks/angular/SKILL.md +46 -0
  105. package/templates/skills/frameworks/django/SKILL.md +93 -0
  106. package/templates/skills/frameworks/electron/SKILL.md +157 -0
  107. package/templates/skills/frameworks/flask/SKILL.md +48 -0
  108. package/templates/skills/frameworks/flutter/SKILL.md +65 -0
  109. package/templates/skills/frameworks/jquery/SKILL.md +42 -0
  110. package/templates/skills/frameworks/laravel/SKILL.md +48 -0
  111. package/templates/skills/frameworks/nestjs/SKILL.md +53 -0
  112. package/templates/skills/frameworks/nextjs/SKILL.md +137 -0
  113. package/templates/skills/frameworks/nuxt/SKILL.md +50 -0
  114. package/templates/skills/frameworks/rails/SKILL.md +76 -0
  115. package/templates/skills/frameworks/react/SKILL.md +48 -0
  116. package/templates/skills/frameworks/react-native/SKILL.md +57 -0
  117. package/templates/skills/frameworks/spring/SKILL.md +49 -0
  118. package/templates/skills/frameworks/symfony/SKILL.md +46 -0
  119. package/templates/skills/frameworks/vue/SKILL.md +46 -0
  120. package/templates/skills/frameworks/zend/SKILL.md +45 -0
  121. package/templates/skills/ides/copilot/SKILL.md +47 -0
  122. package/templates/skills/ides/cursor/SKILL.md +53 -0
  123. package/templates/skills/ides/jetbrains-ai/SKILL.md +45 -0
  124. package/templates/skills/ides/replit/SKILL.md +46 -0
  125. package/templates/skills/ides/tabnine/SKILL.md +39 -0
  126. package/templates/skills/ides/vscode/SKILL.md +50 -0
  127. package/templates/skills/ides/windsurf/SKILL.md +46 -0
  128. package/templates/skills/ides/zed/SKILL.md +42 -0
  129. package/templates/skills/languages/ada/SKILL.md +68 -0
  130. package/templates/skills/languages/c/SKILL.md +343 -0
  131. package/templates/skills/languages/cpp/SKILL.md +753 -0
  132. package/templates/skills/languages/csharp/SKILL.md +427 -0
  133. package/templates/skills/languages/dart/SKILL.md +342 -0
  134. package/templates/skills/languages/elixir/SKILL.md +464 -0
  135. package/templates/skills/languages/erlang/SKILL.md +371 -0
  136. package/templates/skills/languages/go/SKILL.md +655 -0
  137. package/templates/skills/languages/haskell/SKILL.md +187 -0
  138. package/templates/skills/languages/java/SKILL.md +617 -0
  139. package/templates/skills/languages/javascript/SKILL.md +641 -0
  140. package/templates/skills/languages/julia/SKILL.md +107 -0
  141. package/templates/skills/languages/kotlin/SKILL.md +521 -0
  142. package/templates/skills/languages/lisp/SKILL.md +110 -0
  143. package/templates/skills/languages/lua/SKILL.md +84 -0
  144. package/templates/skills/languages/objectivec/SKILL.md +100 -0
  145. package/templates/skills/languages/php/SKILL.md +426 -0
  146. package/templates/skills/languages/python/SKILL.md +692 -0
  147. package/templates/skills/languages/r/SKILL.md +360 -0
  148. package/templates/skills/languages/ruby/SKILL.md +431 -0
  149. package/templates/skills/languages/rust/SKILL.md +487 -0
  150. package/templates/skills/languages/sas/SKILL.md +83 -0
  151. package/templates/skills/languages/scala/SKILL.md +358 -0
  152. package/templates/skills/languages/solidity/SKILL.md +590 -0
  153. package/templates/skills/languages/sql/SKILL.md +147 -0
  154. package/templates/skills/languages/swift/SKILL.md +476 -0
  155. package/templates/skills/languages/zig/SKILL.md +275 -0
  156. package/templates/skills/modules/atlassian/SKILL.md +265 -0
  157. package/templates/skills/modules/context7/SKILL.md +64 -0
  158. package/templates/skills/modules/figma/SKILL.md +277 -0
  159. package/templates/skills/modules/github-mcp/SKILL.md +74 -0
  160. package/templates/skills/modules/grafana/SKILL.md +338 -0
  161. package/templates/skills/modules/memory/SKILL.md +73 -0
  162. package/templates/skills/modules/notion/SKILL.md +257 -0
  163. package/templates/skills/modules/playwright/SKILL.md +100 -0
  164. package/templates/skills/modules/rulebook-mcp/SKILL.md +166 -0
  165. package/templates/skills/modules/serena/SKILL.md +347 -0
  166. package/templates/skills/modules/supabase/SKILL.md +233 -0
  167. package/templates/skills/modules/synap/SKILL.md +79 -0
  168. package/templates/skills/modules/vectorizer/SKILL.md +73 -0
  169. package/templates/skills/services/azure-blob/SKILL.md +194 -0
  170. package/templates/skills/services/cassandra/SKILL.md +249 -0
  171. package/templates/skills/services/dynamodb/SKILL.md +318 -0
  172. package/templates/skills/services/elasticsearch/SKILL.md +357 -0
  173. package/templates/skills/services/gcs/SKILL.md +188 -0
  174. package/templates/skills/services/influxdb/SKILL.md +275 -0
  175. package/templates/skills/services/kafka/SKILL.md +351 -0
  176. package/templates/skills/services/mariadb/SKILL.md +193 -0
  177. package/templates/skills/services/memcached/SKILL.md +252 -0
  178. package/templates/skills/services/minio/SKILL.md +211 -0
  179. package/templates/skills/services/mongodb/SKILL.md +278 -0
  180. package/templates/skills/services/mysql/SKILL.md +368 -0
  181. package/templates/skills/services/neo4j/SKILL.md +257 -0
  182. package/templates/skills/services/oracle/SKILL.md +300 -0
  183. package/templates/skills/services/postgresql/SKILL.md +336 -0
  184. package/templates/skills/services/rabbitmq/SKILL.md +296 -0
  185. package/templates/skills/services/redis/SKILL.md +302 -0
  186. package/templates/skills/services/s3/SKILL.md +308 -0
  187. package/templates/skills/services/sqlite/SKILL.md +304 -0
  188. package/templates/skills/services/sqlserver/SKILL.md +304 -0
@@ -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 -->
@@ -8,7 +8,7 @@ description: Implement an approved Rulebook task and keep tasks checklist in syn
8
8
  **Guardrails**
9
9
  - Favor straightforward, minimal implementations first and add complexity only when it is requested or clearly required.
10
10
  - Keep changes tightly scoped to the requested outcome.
11
- - Refer to `/rulebook/RULEBOOK.md` for complete task management guidelines.
11
+ - Refer to `/rulebook/specs/RULEBOOK.md` for complete task management guidelines.
12
12
  - **CRITICAL**: Update `tasks.md` IMMEDIATELY after completing and testing each implementation step.
13
13
 
14
14
  **Steps**
@@ -62,6 +62,6 @@ Track these steps as TODOs and complete them one by one.
62
62
  **Reference**
63
63
  - Use `rulebook task show <task-id>` when additional context is required
64
64
  - Use `rulebook task validate <task-id>` to check format before archiving
65
- - See `/rulebook/RULEBOOK.md` for complete task management guidelines and priority order
65
+ - See `/rulebook/specs/RULEBOOK.md` for complete task management guidelines and priority order
66
66
  <!-- RULEBOOK:END -->
67
67
 
@@ -8,7 +8,7 @@ description: Archive a completed Rulebook task and apply spec deltas to main spe
8
8
  **Guardrails**
9
9
  - Favor straightforward, minimal implementations first and add complexity only when it is requested or clearly required.
10
10
  - Keep changes tightly scoped to the requested outcome.
11
- - Refer to `/rulebook/RULEBOOK.md` for complete task management guidelines.
11
+ - Refer to `/rulebook/specs/RULEBOOK.md` for complete task management guidelines.
12
12
 
13
13
  **Steps**
14
14
  1. **Verify Task Completion**:
@@ -65,6 +65,6 @@ description: Archive a completed Rulebook task and apply spec deltas to main spe
65
65
  **Reference**
66
66
  - Use `rulebook task list --archived` to see archived tasks
67
67
  - Use `rulebook task show <task-id>` to view task details
68
- - See `/rulebook/RULEBOOK.md` for complete task management guidelines
68
+ - See `/rulebook/specs/RULEBOOK.md` for complete task management guidelines
69
69
  <!-- RULEBOOK:END -->
70
70
 
@@ -8,7 +8,7 @@ description: Create a new Rulebook task following OpenSpec-compatible format wit
8
8
  **Guardrails**
9
9
  - Favor straightforward, minimal implementations first and add complexity only when it is requested or clearly required.
10
10
  - Keep changes tightly scoped to the requested outcome.
11
- - Refer to `/rulebook/RULEBOOK.md` for complete task management guidelines and format requirements.
11
+ - Refer to `/rulebook/specs/RULEBOOK.md` for complete task management guidelines and format requirements.
12
12
  - **CRITICAL**: Context7 MCP is REQUIRED for task creation to ensure correct OpenSpec-compatible format.
13
13
  - Identify any vague or ambiguous details and ask the necessary follow-up questions before editing files.
14
14
 
@@ -77,7 +77,7 @@ description: Create a new Rulebook task following OpenSpec-compatible format wit
77
77
  - Delta headers: Use ADDED/MODIFIED/REMOVED/RENAMED ✅
78
78
 
79
79
  **Reference**
80
- - See `/rulebook/RULEBOOK.md` for complete task management guidelines
80
+ - See `/rulebook/specs/RULEBOOK.md` for complete task management guidelines
81
81
  - Use `rulebook task show <task-id>` to view task details
82
82
  - Use `rulebook task list` to see all tasks
83
83
  - Search existing requirements with `rg -n "Requirement:|Scenario:" rulebook/tasks` before writing new ones
@@ -8,7 +8,7 @@ description: List all Rulebook tasks (active and optionally archived).
8
8
  **Guardrails**
9
9
  - Favor straightforward, minimal implementations first and add complexity only when it is requested or clearly required.
10
10
  - Keep changes tightly scoped to the requested outcome.
11
- - Refer to `/rulebook/RULEBOOK.md` for complete task management guidelines.
11
+ - Refer to `/rulebook/specs/RULEBOOK.md` for complete task management guidelines.
12
12
 
13
13
  **Steps**
14
14
  1. **List Active Tasks**:
@@ -37,6 +37,6 @@ description: List all Rulebook tasks (active and optionally archived).
37
37
  **Reference**
38
38
  - Use `rulebook task show <task-id>` to view task details
39
39
  - Use `rulebook task validate <task-id>` to check task format
40
- - See `/rulebook/RULEBOOK.md` for complete task management guidelines
40
+ - See `/rulebook/specs/RULEBOOK.md` for complete task management guidelines
41
41
  <!-- RULEBOOK:END -->
42
42
 
@@ -8,7 +8,7 @@ description: Show detailed information about a specific Rulebook task.
8
8
  **Guardrails**
9
9
  - Favor straightforward, minimal implementations first and add complexity only when it is requested or clearly required.
10
10
  - Keep changes tightly scoped to the requested outcome.
11
- - Refer to `/rulebook/RULEBOOK.md` for complete task management guidelines.
11
+ - Refer to `/rulebook/specs/RULEBOOK.md` for complete task management guidelines.
12
12
 
13
13
  **Steps**
14
14
  1. **Show Task Details**:
@@ -47,6 +47,6 @@ description: Show detailed information about a specific Rulebook task.
47
47
  **Reference**
48
48
  - Use `rulebook task list` to see all tasks
49
49
  - Use `rulebook task validate <task-id>` to check task format
50
- - See `/rulebook/RULEBOOK.md` for complete task management guidelines
50
+ - See `/rulebook/specs/RULEBOOK.md` for complete task management guidelines
51
51
  <!-- RULEBOOK:END -->
52
52
 
@@ -8,7 +8,7 @@ description: Validate Rulebook task format against OpenSpec-compatible requireme
8
8
  **Guardrails**
9
9
  - Favor straightforward, minimal implementations first and add complexity only when it is requested or clearly required.
10
10
  - Keep changes tightly scoped to the requested outcome.
11
- - Refer to `/rulebook/RULEBOOK.md` for complete task management guidelines and format requirements.
11
+ - Refer to `/rulebook/specs/RULEBOOK.md` for complete task management guidelines and format requirements.
12
12
 
13
13
  **Steps**
14
14
  1. **Validate Task Format**:
@@ -46,7 +46,7 @@ description: Validate Rulebook task format against OpenSpec-compatible requireme
46
46
  - ❌ `## New Requirements` → ✅ `## ADDED Requirements`
47
47
 
48
48
  **Reference**
49
- - See `/rulebook/RULEBOOK.md` for complete format requirements
49
+ - See `/rulebook/specs/RULEBOOK.md` for complete format requirements
50
50
  - Use Context7 MCP to get official OpenSpec format documentation
51
51
  - Use `rulebook task show <task-id>` to view task details
52
52
  <!-- RULEBOOK:END -->
@@ -655,7 +655,7 @@ npx @hivehub/rulebook workflows
655
655
 
656
656
  ## Related Templates
657
657
 
658
- - See `/rulebook/GITHUB_ACTIONS.md` for GitHub Actions specifics
659
- - See `/rulebook/GITLAB_CI.md` for GitLab CI specifics
660
- - See `/rulebook/SECRETS_MANAGEMENT.md` for secrets handling
661
- - See `/rulebook/QUALITY_ENFORCEMENT.md` for quality standards
658
+ - See `/rulebook/specs/GITHUB_ACTIONS.md` for GitHub Actions specifics
659
+ - See `/rulebook/specs/GITLAB_CI.md` for GitLab CI specifics
660
+ - See `/rulebook/specs/SECRETS_MANAGEMENT.md` for secrets handling
661
+ - See `/rulebook/specs/QUALITY_ENFORCEMENT.md` for quality standards
@@ -722,7 +722,7 @@ npx @hivehub/rulebook workflows
722
722
 
723
723
  ## Related Templates
724
724
 
725
- - See `/rulebook/CI_CD_PATTERNS.md` for common CI/CD patterns
726
- - See `/rulebook/SECRETS_MANAGEMENT.md` for secrets handling
727
- - See `/rulebook/QUALITY_ENFORCEMENT.md` for quality gates
725
+ - See `/rulebook/specs/CI_CD_PATTERNS.md` for common CI/CD patterns
726
+ - See `/rulebook/specs/SECRETS_MANAGEMENT.md` for secrets handling
727
+ - See `/rulebook/specs/QUALITY_ENFORCEMENT.md` for quality gates
728
728
  - See language-specific templates for test/build commands
@@ -724,7 +724,7 @@ npx @hivehub/rulebook workflows
724
724
 
725
725
  ## Related Templates
726
726
 
727
- - See `/rulebook/GITHUB_ACTIONS.md` for GitHub Actions comparison
728
- - See `/rulebook/CI_CD_PATTERNS.md` for general CI/CD patterns
729
- - See `/rulebook/SECRETS_MANAGEMENT.md` for secrets handling
730
- - See `/rulebook/QUALITY_ENFORCEMENT.md` for quality gates
727
+ - See `/rulebook/specs/GITHUB_ACTIONS.md` for GitHub Actions comparison
728
+ - See `/rulebook/specs/CI_CD_PATTERNS.md` for general CI/CD patterns
729
+ - See `/rulebook/specs/SECRETS_MANAGEMENT.md` for secrets handling
730
+ - See `/rulebook/specs/QUALITY_ENFORCEMENT.md` for quality gates
@@ -579,7 +579,7 @@ AWS_SECRET_ACCESS_KEY=your-secret-key
579
579
 
580
580
  ## Related Templates
581
581
 
582
- - See `/rulebook/GITHUB_ACTIONS.md` for GitHub Actions secrets
583
- - See `/rulebook/GITLAB_CI.md` for GitLab CI secrets
584
- - See `/rulebook/CI_CD_PATTERNS.md` for deployment patterns
585
- - See `/rulebook/GIT.md` for .gitignore patterns
582
+ - See `/rulebook/specs/GITHUB_ACTIONS.md` for GitHub Actions secrets
583
+ - See `/rulebook/specs/GITLAB_CI.md` for GitLab CI secrets
584
+ - See `/rulebook/specs/CI_CD_PATTERNS.md` for deployment patterns
585
+ - See `/rulebook/specs/GIT.md` for .gitignore patterns
@@ -524,7 +524,7 @@ npx @hivehub/rulebook init
524
524
 
525
525
  ## Related Templates
526
526
 
527
- - See `/rulebook/PRE_COMMIT.md` for quality checks before commit
528
- - See `/rulebook/PREPARE_COMMIT_MSG.md` for auto-generating commit messages
529
- - See `/rulebook/GIT.md` for git workflow and commit conventions
530
- - See `/rulebook/DOCUMENTATION_RULES.md` for changelog generation from commits
527
+ - See `/rulebook/specs/PRE_COMMIT.md` for quality checks before commit
528
+ - See `/rulebook/specs/PREPARE_COMMIT_MSG.md` for auto-generating commit messages
529
+ - See `/rulebook/specs/GIT.md` for git workflow and commit conventions
530
+ - See `/rulebook/specs/DOCUMENTATION_RULES.md` for changelog generation from commits
@@ -540,7 +540,7 @@ npx @hivehub/rulebook init
540
540
 
541
541
  ## Related Templates
542
542
 
543
- - See `/rulebook/PRE_COMMIT.md` for pre-commit quality checks
544
- - See `/rulebook/PRE_PUSH.md` for pre-push validation
545
- - See `/rulebook/GIT.md` for git workflow
543
+ - See `/rulebook/specs/PRE_COMMIT.md` for pre-commit quality checks
544
+ - See `/rulebook/specs/PRE_PUSH.md` for pre-push validation
545
+ - See `/rulebook/specs/GIT.md` for git workflow
546
546
  - See language-specific templates for dependency management commands
@@ -614,6 +614,6 @@ npx @hivehub/rulebook init
614
614
 
615
615
  ## Related Templates
616
616
 
617
- - See `/rulebook/COMMIT_MSG.md` for commit message validation
618
- - See `/rulebook/GIT.md` for git workflow and branch naming
619
- - See `/rulebook/PRE_COMMIT.md` for pre-commit checks
617
+ - See `/rulebook/specs/COMMIT_MSG.md` for commit message validation
618
+ - See `/rulebook/specs/GIT.md` for git workflow and branch naming
619
+ - See `/rulebook/specs/PRE_COMMIT.md` for pre-commit checks
@@ -407,8 +407,8 @@ Hook configuration in `.rulebook`:
407
407
 
408
408
  ## Related Templates
409
409
 
410
- - See `/rulebook/PRE_PUSH.md` for build and test checks before push
411
- - See `/rulebook/COMMIT_MSG.md` for commit message validation
412
- - See `/rulebook/QUALITY_ENFORCEMENT.md` for quality standards
413
- - See `/rulebook/GIT.md` for git workflow and commit conventions
410
+ - See `/rulebook/specs/PRE_PUSH.md` for build and test checks before push
411
+ - See `/rulebook/specs/COMMIT_MSG.md` for commit message validation
412
+ - See `/rulebook/specs/QUALITY_ENFORCEMENT.md` for quality standards
413
+ - See `/rulebook/specs/GIT.md` for git workflow and commit conventions
414
414
  - See language-specific templates for language-specific quality commands
@@ -594,8 +594,8 @@ Hook configuration in `.rulebook`:
594
594
 
595
595
  ## Related Templates
596
596
 
597
- - See `/rulebook/PRE_COMMIT.md` for fast quality checks before commit
598
- - See `/rulebook/QUALITY_ENFORCEMENT.md` for quality standards
599
- - See `/rulebook/GIT.md` for git workflow and conventions
600
- - See `/rulebook/GITHUB_ACTIONS.md` for CI/CD integration
597
+ - See `/rulebook/specs/PRE_COMMIT.md` for fast quality checks before commit
598
+ - See `/rulebook/specs/QUALITY_ENFORCEMENT.md` for quality standards
599
+ - See `/rulebook/specs/GIT.md` for git workflow and conventions
600
+ - See `/rulebook/specs/GITHUB_ACTIONS.md` for CI/CD integration
601
601
  - See language-specific templates for test commands and coverage tools
@@ -0,0 +1,63 @@
1
+ <!-- MEMORY:START -->
2
+ ## Persistent Memory System
3
+
4
+ The rulebook memory system provides persistent context across AI sessions using hybrid search (BM25 keyword + HNSW vector) with zero native dependencies.
5
+
6
+ ### 3-Layer Search Pattern (Token-Efficient)
7
+
8
+ **Layer 1 — Compact Search**: Get brief results to scan relevance.
9
+ ```
10
+ rulebook_memory_search({ query: "authentication bug", mode: "hybrid", limit: 10 })
11
+ → Returns: { id, title, type, score, matchType, createdAt } per result (~50 tokens each)
12
+ ```
13
+
14
+ **Layer 2 — Timeline**: Get chronological context around a memory.
15
+ ```
16
+ rulebook_memory_timeline({ memoryId: "abc-123", window: 5 })
17
+ → Returns: 5 memories before + anchor + 5 memories after (~200 tokens each)
18
+ ```
19
+
20
+ **Layer 3 — Full Details**: Get complete content only for selected memories.
21
+ ```
22
+ rulebook_memory_get({ ids: ["abc-123", "def-456"] })
23
+ → Returns: Full memory objects with content (~500-1000 tokens each)
24
+ ```
25
+
26
+ ### Memory Types
27
+
28
+ - **bugfix**: Bug fixes, error resolutions
29
+ - **feature**: New features, additions
30
+ - **refactor**: Code restructuring
31
+ - **decision**: Architectural decisions (protected from eviction)
32
+ - **discovery**: Insights and learnings
33
+ - **change**: Updates and modifications
34
+ - **observation**: General observations
35
+
36
+ ### CLI Commands
37
+
38
+ ```bash
39
+ rulebook memory search "authentication bug" # Hybrid search
40
+ rulebook memory save "Decided to use sql.js" --type decision --title "DB Choice"
41
+ rulebook memory list --limit 10 # Recent memories
42
+ rulebook memory stats # Database statistics
43
+ rulebook memory cleanup --force # Force eviction
44
+ rulebook memory export --format json # Export all memories
45
+ ```
46
+
47
+ ### Configuration (.rulebook)
48
+
49
+ ```json
50
+ {
51
+ "memory": {
52
+ "enabled": true,
53
+ "dbPath": ".rulebook-memory/memory.db",
54
+ "maxSizeBytes": 524288000,
55
+ "vectorDimensions": 256
56
+ }
57
+ }
58
+ ```
59
+
60
+ ### Privacy
61
+
62
+ Content between `<private>` and `</private>` tags is automatically stripped before storage.
63
+ <!-- MEMORY:END -->
@@ -0,0 +1,59 @@
1
+ ---
2
+ name: "Aider"
3
+ description: "Tool: AI pair programming in terminal (`pip install aider-chat`)"
4
+ version: "1.0.0"
5
+ category: "cli"
6
+ author: "Rulebook"
7
+ tags: ["cli", "cli-tool"]
8
+ dependencies: []
9
+ conflicts: []
10
+ ---
11
+ <!-- AIDER:START -->
12
+ # Aider CLI Rules
13
+
14
+ **Tool**: AI pair programming in terminal (`pip install aider-chat`)
15
+
16
+ ## Quick Start
17
+
18
+ ```bash
19
+ # Always include AGENTS.md
20
+ aider AGENTS.md src/feature.ts tests/feature.test.ts
21
+
22
+ # In chat:
23
+ "Follow AGENTS.md standards. Implement [feature] with tests first."
24
+ ```
25
+
26
+ ## Essential Commands
27
+
28
+ ```bash
29
+ /add file.ts # Add files to context
30
+ /drop file.ts # Remove from context
31
+ /run npm test # Run command
32
+ /commit "message" # Commit changes
33
+ /undo # Undo last change
34
+ /diff # Review changes
35
+ ```
36
+
37
+ ## Configuration (.aider.conf.yml)
38
+
39
+ ```yaml
40
+ model: gpt-4
41
+ read: [AGENTS.md]
42
+ lint: true
43
+ lint-cmd: "npm run lint"
44
+ test-cmd: "npm test"
45
+ auto-commits: true
46
+ commit-prompt: true
47
+ ```
48
+
49
+ ## Workflow
50
+
51
+ 1. Start session with `aider AGENTS.md [files]`
52
+ 2. Request: "Follow AGENTS.md. Implement [feature] with tests first (95%+ coverage)"
53
+ 3. Review diffs with `/diff`
54
+ 4. Test with `/run npm test`
55
+ 5. Commit with `/commit "feat: description"`
56
+
57
+ **Critical**: Always reference AGENTS.md in your requests for consistent standards.
58
+
59
+ <!-- AIDER:END -->
@@ -0,0 +1,35 @@
1
+ ---
2
+ name: "Amazon Q"
3
+ description: "Tool: AWS-focused AI assistant with security scanning"
4
+ version: "1.0.0"
5
+ category: "cli"
6
+ author: "Rulebook"
7
+ tags: ["cli", "cli-tool"]
8
+ dependencies: []
9
+ conflicts: []
10
+ ---
11
+ <!-- AMAZON_Q:START -->
12
+ # Amazon Q Developer Rules
13
+
14
+ **Tool**: AWS-focused AI assistant with security scanning
15
+
16
+ ## Quick Start
17
+
18
+ Available in AWS IDE Toolkit or via AWS Console.
19
+
20
+ ## Usage
21
+
22
+ ```
23
+ "Follow @AGENTS.md standards. Implement [feature] with tests (95%+ coverage)."
24
+ ```
25
+
26
+ ## Workflow
27
+
28
+ 1. Reference AGENTS.md in prompts
29
+ 2. Leverage Q's security scanning for vulnerabilities
30
+ 3. Review generated code
31
+ 4. Run quality checks
32
+
33
+ **Critical**: Q excels at AWS/security - combine with AGENTS.md standards.
34
+
35
+ <!-- AMAZON_Q:END -->
@@ -0,0 +1,42 @@
1
+ ---
2
+ name: "Auggie"
3
+ description: "Tool: TDD mode and intelligent refactoring"
4
+ version: "1.0.0"
5
+ category: "cli"
6
+ author: "Rulebook"
7
+ tags: ["cli", "cli-tool"]
8
+ dependencies: []
9
+ conflicts: []
10
+ ---
11
+ <!-- AUGGIE:START -->
12
+ # Auggie (Augment CLI) Rules
13
+
14
+ **Tool**: TDD mode and intelligent refactoring
15
+
16
+ ## Quick Start
17
+
18
+ ```bash
19
+ npm install -g augment-cli
20
+ augment --tdd
21
+ ```
22
+
23
+ ## Usage
24
+
25
+ ```bash
26
+ # TDD mode with AGENTS.md:
27
+ augment --tdd --context AGENTS.md
28
+
29
+ # In prompts:
30
+ "Follow @AGENTS.md. Write tests for [feature], then implement."
31
+ ```
32
+
33
+ ## Workflow
34
+
35
+ 1. Use `--tdd` flag for test-first development
36
+ 2. Include `--context AGENTS.md`
37
+ 3. Auggie writes tests, then implementation
38
+ 4. Review and verify coverage
39
+
40
+ **Critical**: TDD mode aligns perfectly with AGENTS.md test-first approach.
41
+
42
+ <!-- AUGGIE:END -->
@@ -0,0 +1,42 @@
1
+ ---
2
+ name: "Claude"
3
+ description: "Tool: Anthropic Claude API with 200K context window"
4
+ version: "1.0.0"
5
+ category: "cli"
6
+ author: "Rulebook"
7
+ tags: ["cli", "cli-tool"]
8
+ dependencies: []
9
+ conflicts: []
10
+ ---
11
+ <!-- CLAUDE:START -->
12
+ # Claude API/CLI Rules
13
+
14
+ **Tool**: Anthropic Claude API with 200K context window
15
+
16
+ ## Quick Start
17
+
18
+ ```bash
19
+ export ANTHROPIC_API_KEY=your_key
20
+ # Use via API or compatible CLIs
21
+ ```
22
+
23
+ ## Usage
24
+
25
+ In API requests or CLI prompts, include:
26
+ ```
27
+ "Follow these project standards from AGENTS.md:
28
+ [paste relevant AGENTS.md sections]
29
+
30
+ Implement [feature] with tests first (95%+ coverage)."
31
+ ```
32
+
33
+ ## Workflow
34
+
35
+ 1. Include AGENTS.md content in system prompt or context
36
+ 2. Request features with standards reference
37
+ 3. Review generated code
38
+ 4. Run quality checks
39
+
40
+ **Critical**: Claude has 200K context - paste full AGENTS.md for best results.
41
+
42
+ <!-- CLAUDE:END -->