@hivehub/rulebook 2.1.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 (187) hide show
  1. package/README.md +779 -661
  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 -261
  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/commands/rulebook-memory-save.md +48 -0
  67. package/templates/commands/rulebook-memory-search.md +47 -0
  68. package/templates/commands/rulebook-task-apply.md +2 -2
  69. package/templates/commands/rulebook-task-archive.md +2 -2
  70. package/templates/commands/rulebook-task-create.md +2 -2
  71. package/templates/commands/rulebook-task-list.md +2 -2
  72. package/templates/commands/rulebook-task-show.md +2 -2
  73. package/templates/commands/rulebook-task-validate.md +2 -2
  74. package/templates/git/CI_CD_PATTERNS.md +4 -4
  75. package/templates/git/GITHUB_ACTIONS.md +3 -3
  76. package/templates/git/GITLAB_CI.md +4 -4
  77. package/templates/git/SECRETS_MANAGEMENT.md +4 -4
  78. package/templates/hooks/COMMIT_MSG.md +4 -4
  79. package/templates/hooks/POST_CHECKOUT.md +3 -3
  80. package/templates/hooks/PREPARE_COMMIT_MSG.md +3 -3
  81. package/templates/hooks/PRE_COMMIT.md +4 -4
  82. package/templates/hooks/PRE_PUSH.md +4 -4
  83. package/templates/modules/MEMORY.md +63 -0
  84. package/templates/skills/cli/aider/SKILL.md +59 -0
  85. package/templates/skills/cli/amazon-q/SKILL.md +35 -0
  86. package/templates/skills/cli/auggie/SKILL.md +42 -0
  87. package/templates/skills/cli/claude/SKILL.md +42 -0
  88. package/templates/skills/cli/claude-code/SKILL.md +146 -0
  89. package/templates/skills/cli/cline/SKILL.md +42 -0
  90. package/templates/skills/cli/codebuddy/SKILL.md +30 -0
  91. package/templates/skills/cli/codeium/SKILL.md +30 -0
  92. package/templates/skills/cli/codex/SKILL.md +31 -0
  93. package/templates/skills/cli/continue/SKILL.md +44 -0
  94. package/templates/skills/cli/cursor-cli/SKILL.md +38 -0
  95. package/templates/skills/cli/factory/SKILL.md +28 -0
  96. package/templates/skills/cli/gemini/SKILL.md +45 -0
  97. package/templates/skills/cli/kilocode/SKILL.md +28 -0
  98. package/templates/skills/cli/opencode/SKILL.md +28 -0
  99. package/templates/skills/core/agent-automation/SKILL.md +194 -0
  100. package/templates/skills/core/dag/SKILL.md +314 -0
  101. package/templates/skills/core/documentation-rules/SKILL.md +47 -0
  102. package/templates/skills/core/quality-enforcement/SKILL.md +78 -0
  103. package/templates/skills/frameworks/angular/SKILL.md +46 -0
  104. package/templates/skills/frameworks/django/SKILL.md +93 -0
  105. package/templates/skills/frameworks/electron/SKILL.md +157 -0
  106. package/templates/skills/frameworks/flask/SKILL.md +48 -0
  107. package/templates/skills/frameworks/flutter/SKILL.md +65 -0
  108. package/templates/skills/frameworks/jquery/SKILL.md +42 -0
  109. package/templates/skills/frameworks/laravel/SKILL.md +48 -0
  110. package/templates/skills/frameworks/nestjs/SKILL.md +53 -0
  111. package/templates/skills/frameworks/nextjs/SKILL.md +137 -0
  112. package/templates/skills/frameworks/nuxt/SKILL.md +50 -0
  113. package/templates/skills/frameworks/rails/SKILL.md +76 -0
  114. package/templates/skills/frameworks/react/SKILL.md +48 -0
  115. package/templates/skills/frameworks/react-native/SKILL.md +57 -0
  116. package/templates/skills/frameworks/spring/SKILL.md +49 -0
  117. package/templates/skills/frameworks/symfony/SKILL.md +46 -0
  118. package/templates/skills/frameworks/vue/SKILL.md +46 -0
  119. package/templates/skills/frameworks/zend/SKILL.md +45 -0
  120. package/templates/skills/ides/copilot/SKILL.md +47 -0
  121. package/templates/skills/ides/cursor/SKILL.md +53 -0
  122. package/templates/skills/ides/jetbrains-ai/SKILL.md +45 -0
  123. package/templates/skills/ides/replit/SKILL.md +46 -0
  124. package/templates/skills/ides/tabnine/SKILL.md +39 -0
  125. package/templates/skills/ides/vscode/SKILL.md +50 -0
  126. package/templates/skills/ides/windsurf/SKILL.md +46 -0
  127. package/templates/skills/ides/zed/SKILL.md +42 -0
  128. package/templates/skills/languages/ada/SKILL.md +68 -0
  129. package/templates/skills/languages/c/SKILL.md +343 -0
  130. package/templates/skills/languages/cpp/SKILL.md +753 -0
  131. package/templates/skills/languages/csharp/SKILL.md +427 -0
  132. package/templates/skills/languages/dart/SKILL.md +342 -0
  133. package/templates/skills/languages/elixir/SKILL.md +464 -0
  134. package/templates/skills/languages/erlang/SKILL.md +371 -0
  135. package/templates/skills/languages/go/SKILL.md +655 -0
  136. package/templates/skills/languages/haskell/SKILL.md +187 -0
  137. package/templates/skills/languages/java/SKILL.md +617 -0
  138. package/templates/skills/languages/javascript/SKILL.md +641 -0
  139. package/templates/skills/languages/julia/SKILL.md +107 -0
  140. package/templates/skills/languages/kotlin/SKILL.md +521 -0
  141. package/templates/skills/languages/lisp/SKILL.md +110 -0
  142. package/templates/skills/languages/lua/SKILL.md +84 -0
  143. package/templates/skills/languages/objectivec/SKILL.md +100 -0
  144. package/templates/skills/languages/php/SKILL.md +426 -0
  145. package/templates/skills/languages/python/SKILL.md +692 -0
  146. package/templates/skills/languages/r/SKILL.md +360 -0
  147. package/templates/skills/languages/ruby/SKILL.md +431 -0
  148. package/templates/skills/languages/rust/SKILL.md +487 -0
  149. package/templates/skills/languages/sas/SKILL.md +83 -0
  150. package/templates/skills/languages/scala/SKILL.md +358 -0
  151. package/templates/skills/languages/solidity/SKILL.md +590 -0
  152. package/templates/skills/languages/sql/SKILL.md +147 -0
  153. package/templates/skills/languages/swift/SKILL.md +476 -0
  154. package/templates/skills/languages/zig/SKILL.md +275 -0
  155. package/templates/skills/modules/atlassian/SKILL.md +265 -0
  156. package/templates/skills/modules/context7/SKILL.md +64 -0
  157. package/templates/skills/modules/figma/SKILL.md +277 -0
  158. package/templates/skills/modules/github-mcp/SKILL.md +74 -0
  159. package/templates/skills/modules/grafana/SKILL.md +338 -0
  160. package/templates/skills/modules/memory/SKILL.md +73 -0
  161. package/templates/skills/modules/notion/SKILL.md +257 -0
  162. package/templates/skills/modules/playwright/SKILL.md +100 -0
  163. package/templates/skills/modules/rulebook-mcp/SKILL.md +166 -0
  164. package/templates/skills/modules/serena/SKILL.md +347 -0
  165. package/templates/skills/modules/supabase/SKILL.md +233 -0
  166. package/templates/skills/modules/synap/SKILL.md +79 -0
  167. package/templates/skills/modules/vectorizer/SKILL.md +73 -0
  168. package/templates/skills/services/azure-blob/SKILL.md +194 -0
  169. package/templates/skills/services/cassandra/SKILL.md +249 -0
  170. package/templates/skills/services/dynamodb/SKILL.md +318 -0
  171. package/templates/skills/services/elasticsearch/SKILL.md +357 -0
  172. package/templates/skills/services/gcs/SKILL.md +188 -0
  173. package/templates/skills/services/influxdb/SKILL.md +275 -0
  174. package/templates/skills/services/kafka/SKILL.md +351 -0
  175. package/templates/skills/services/mariadb/SKILL.md +193 -0
  176. package/templates/skills/services/memcached/SKILL.md +252 -0
  177. package/templates/skills/services/minio/SKILL.md +211 -0
  178. package/templates/skills/services/mongodb/SKILL.md +278 -0
  179. package/templates/skills/services/mysql/SKILL.md +368 -0
  180. package/templates/skills/services/neo4j/SKILL.md +257 -0
  181. package/templates/skills/services/oracle/SKILL.md +300 -0
  182. package/templates/skills/services/postgresql/SKILL.md +336 -0
  183. package/templates/skills/services/rabbitmq/SKILL.md +296 -0
  184. package/templates/skills/services/redis/SKILL.md +302 -0
  185. package/templates/skills/services/s3/SKILL.md +308 -0
  186. package/templates/skills/services/sqlite/SKILL.md +304 -0
  187. package/templates/skills/services/sqlserver/SKILL.md +304 -0
@@ -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 -->
@@ -0,0 +1,146 @@
1
+ ---
2
+ name: "Claude Code"
3
+ description: "Tool: Anthropic Claude Code CLI (`npm install -g @anthropic-ai/claude-code`)"
4
+ version: "1.0.0"
5
+ category: "cli"
6
+ author: "Rulebook"
7
+ tags: ["cli", "cli-tool"]
8
+ dependencies: []
9
+ conflicts: []
10
+ ---
11
+ <!-- CLAUDE_CODE:START -->
12
+ # Claude Code CLI Rules
13
+
14
+ **Tool**: Anthropic Claude Code CLI (`npm install -g @anthropic-ai/claude-code`)
15
+
16
+ ## Quick Start
17
+
18
+ ```bash
19
+ export ANTHROPIC_API_KEY=your_key
20
+ claude --model claude-sonnet-4-20250514
21
+ ```
22
+
23
+ ## Essential Usage
24
+
25
+ ```bash
26
+ # Always read AGENTS.md and CLAUDE.md first
27
+ claude "Read AGENTS.md and CLAUDE.md, then implement [feature] with tests"
28
+
29
+ # Key flags:
30
+ --model claude-sonnet-4-20250514 # Model selection (default: sonnet)
31
+ --dangerously-skip-permissions # Skip permission prompts (use with caution)
32
+ --verbose # Debug mode
33
+ ```
34
+
35
+ ## ⚠️ CRITICAL: File Editing Rules
36
+
37
+ **MANDATORY**: When editing multiple files, Claude Code MUST edit files **SEQUENTIALLY**, one at a time.
38
+
39
+ ### Why Sequential Editing is Required
40
+
41
+ Claude Code's Edit tool uses exact string matching for replacements. When multiple files are edited in parallel:
42
+ - The tool may fail to find the exact string in some files
43
+ - Race conditions can cause partial or corrupted edits
44
+ - Error recovery becomes impossible
45
+
46
+ ### Correct File Editing Pattern
47
+
48
+ ```
49
+ ✅ CORRECT (Sequential):
50
+ 1. Edit file A → Wait for confirmation
51
+ 2. Edit file B → Wait for confirmation
52
+ 3. Edit file C → Wait for confirmation
53
+
54
+ ❌ WRONG (Parallel):
55
+ 1. Edit files A, B, C simultaneously → Failures likely
56
+ ```
57
+
58
+ ### Implementation Rules
59
+
60
+ 1. **NEVER call multiple Edit tools in parallel** for different files
61
+ 2. **ALWAYS wait for each edit to complete** before starting the next
62
+ 3. **Verify each edit succeeded** before proceeding
63
+ 4. **If an edit fails**, retry that specific edit before moving on
64
+
65
+ ## ⚠️ CRITICAL: Test Implementation Rules
66
+
67
+ **MANDATORY**: When implementing tests, Claude Code MUST write **complete, production-quality tests**.
68
+
69
+ ### Forbidden Test Patterns
70
+
71
+ ```typescript
72
+ // ❌ NEVER do this - placeholder tests
73
+ it('should work', () => {
74
+ expect(true).toBe(true);
75
+ });
76
+
77
+ // ❌ NEVER do this - skipped tests
78
+ it.skip('should handle edge case', () => {});
79
+
80
+ // ❌ NEVER do this - incomplete assertions
81
+ it('should return data', () => {
82
+ const result = getData();
83
+ expect(result).toBeDefined(); // Too weak!
84
+ });
85
+
86
+ // ❌ NEVER do this - "simplify" by removing test cases
87
+ // Original had 10 test cases, don't reduce to 3
88
+ ```
89
+
90
+ ### Required Test Patterns
91
+
92
+ ```typescript
93
+ // ✅ CORRECT - complete test with proper assertions
94
+ it('should return user data with correct structure', () => {
95
+ const result = getUserById(1);
96
+ expect(result).toEqual({
97
+ id: 1,
98
+ name: 'John Doe',
99
+ email: 'john@example.com',
100
+ createdAt: expect.any(Date),
101
+ });
102
+ });
103
+
104
+ // ✅ CORRECT - test edge cases and error paths
105
+ it('should throw NotFoundError when user does not exist', () => {
106
+ expect(() => getUserById(999)).toThrow(NotFoundError);
107
+ });
108
+
109
+ // ✅ CORRECT - test all branches
110
+ describe('validateEmail', () => {
111
+ it('should return true for valid email', () => {...});
112
+ it('should return false for missing @', () => {...});
113
+ it('should return false for missing domain', () => {...});
114
+ it('should return false for empty string', () => {...});
115
+ });
116
+ ```
117
+
118
+ ### Test Implementation Rules
119
+
120
+ 1. **NEVER simplify tests** - Implement the full, complete test as originally designed
121
+ 2. **NEVER skip test cases** - Every test case in the spec must be implemented
122
+ 3. **NEVER use placeholder assertions** - Each assertion must verify actual behavior
123
+ 4. **ALWAYS test error paths** - Exceptions, edge cases, and failure modes
124
+ 5. **ALWAYS maintain coverage** - Tests must achieve the project's coverage threshold
125
+
126
+ ## Workflow
127
+
128
+ 1. **Always read AGENTS.md and CLAUDE.md first** for project standards
129
+ 2. **Plan file changes before editing** - List all files that need modification
130
+ 3. **Edit files sequentially** - One file at a time, verify each edit
131
+ 4. **Write complete tests** - No placeholders, no simplifications
132
+ 5. **Run quality checks**: `npm run lint && npm test`
133
+ 6. **Verify coverage threshold** is met before committing
134
+
135
+ ## Quality Gates
136
+
137
+ Before completing any task:
138
+ - [ ] All files edited successfully (sequential editing)
139
+ - [ ] All tests implemented completely (no placeholders)
140
+ - [ ] Linting passes with zero warnings
141
+ - [ ] All tests pass (100% pass rate)
142
+ - [ ] Coverage threshold met (check AGENTS.md for threshold)
143
+
144
+ **Critical**: Reference AGENTS.md and CLAUDE.md in prompts for consistent code generation.
145
+
146
+ <!-- CLAUDE_CODE:END -->
@@ -0,0 +1,42 @@
1
+ ---
2
+ name: "Cline"
3
+ description: "Tool: VS Code extension with autonomous mode"
4
+ version: "1.0.0"
5
+ category: "cli"
6
+ author: "Rulebook"
7
+ tags: ["cli", "cli-tool"]
8
+ dependencies: []
9
+ conflicts: []
10
+ ---
11
+ <!-- CLINE:START -->
12
+ # Cline CLI Rules
13
+
14
+ **Tool**: VS Code extension with autonomous mode
15
+
16
+ ## Quick Start
17
+
18
+ Install Cline extension in VS Code or use CLI mode.
19
+
20
+ ## Usage
21
+
22
+ ```bash
23
+ # In prompts, always reference standards:
24
+ "Follow @AGENTS.md. Implement [feature] with tests first (95%+ coverage)."
25
+
26
+ # Cline will:
27
+ - Read AGENTS.md
28
+ - Write tests
29
+ - Implement feature
30
+ - Run quality checks
31
+ ```
32
+
33
+ ## Workflow
34
+
35
+ 1. Keep AGENTS.md open in workspace
36
+ 2. Request features with "Follow @AGENTS.md" prefix
37
+ 3. Review proposed changes before approval
38
+ 4. Verify tests pass after implementation
39
+
40
+ **Critical**: Reference @AGENTS.md in every prompt for consistent output.
41
+
42
+ <!-- CLINE:END -->
@@ -0,0 +1,30 @@
1
+ ---
2
+ name: "Codebuddy"
3
+ description: "Tool: Intelligent pair programming assistant"
4
+ version: "1.0.0"
5
+ category: "cli"
6
+ author: "Rulebook"
7
+ tags: ["cli", "cli-tool"]
8
+ dependencies: []
9
+ conflicts: []
10
+ ---
11
+ <!-- CODEBUDDY:START -->
12
+ # CodeBuddy Code Rules
13
+
14
+ **Tool**: Intelligent pair programming assistant
15
+
16
+ ## Usage
17
+
18
+ Reference AGENTS.md in all requests:
19
+ ```
20
+ "Follow @AGENTS.md standards. Implement [feature] with tests first."
21
+ ```
22
+
23
+ ## Workflow
24
+
25
+ 1. Include AGENTS.md in context
26
+ 2. Request features with standards reference
27
+ 3. Review code
28
+ 4. Run `npm run lint && npm test`
29
+
30
+ <!-- CODEBUDDY:END -->