@hivehub/rulebook 5.5.2 → 5.7.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 (325) hide show
  1. package/.claude/commands/rulebook-learn-capture.md +41 -48
  2. package/.claude/commands/rulebook-learn-list.md +13 -13
  3. package/README.md +332 -394
  4. package/dist/cli/commands/context-intelligence.d.ts +0 -1
  5. package/dist/cli/commands/context-intelligence.d.ts.map +1 -1
  6. package/dist/cli/commands/context-intelligence.js +12 -33
  7. package/dist/cli/commands/context-intelligence.js.map +1 -1
  8. package/dist/cli/commands/index.d.ts +4 -7
  9. package/dist/cli/commands/index.d.ts.map +1 -1
  10. package/dist/cli/commands/index.js +4 -7
  11. package/dist/cli/commands/index.js.map +1 -1
  12. package/dist/cli/commands/init.d.ts.map +1 -1
  13. package/dist/cli/commands/init.js +40 -81
  14. package/dist/cli/commands/init.js.map +1 -1
  15. package/dist/cli/commands/mcp.d.ts +0 -1
  16. package/dist/cli/commands/mcp.d.ts.map +1 -1
  17. package/dist/cli/commands/mcp.js +1 -7
  18. package/dist/cli/commands/mcp.js.map +1 -1
  19. package/dist/cli/commands/memory.d.ts +7 -1
  20. package/dist/cli/commands/memory.d.ts.map +1 -1
  21. package/dist/cli/commands/memory.js +51 -57
  22. package/dist/cli/commands/memory.js.map +1 -1
  23. package/dist/cli/commands/misc.d.ts +1 -15
  24. package/dist/cli/commands/misc.d.ts.map +1 -1
  25. package/dist/cli/commands/misc.js +36 -215
  26. package/dist/cli/commands/misc.js.map +1 -1
  27. package/dist/cli/commands/plans.d.ts +0 -6
  28. package/dist/cli/commands/plans.d.ts.map +1 -1
  29. package/dist/cli/commands/plans.js +9 -77
  30. package/dist/cli/commands/plans.js.map +1 -1
  31. package/dist/cli/commands/skills.js +6 -6
  32. package/dist/cli/commands/skills.js.map +1 -1
  33. package/dist/cli/commands/task.js +4 -4
  34. package/dist/cli/commands/task.js.map +1 -1
  35. package/dist/cli/commands/update.d.ts.map +1 -1
  36. package/dist/cli/commands/update.js +122 -52
  37. package/dist/cli/commands/update.js.map +1 -1
  38. package/dist/cli/prompts.d.ts.map +1 -1
  39. package/dist/cli/prompts.js +1 -78
  40. package/dist/cli/prompts.js.map +1 -1
  41. package/dist/core/claude/claude-mcp.d.ts +59 -0
  42. package/dist/core/claude/claude-mcp.d.ts.map +1 -0
  43. package/dist/core/claude/claude-mcp.js +220 -0
  44. package/dist/core/claude/claude-mcp.js.map +1 -0
  45. package/dist/core/claude/claude-md-generator.d.ts +52 -0
  46. package/dist/core/claude/claude-md-generator.d.ts.map +1 -0
  47. package/dist/core/claude/claude-md-generator.js +104 -0
  48. package/dist/core/claude/claude-md-generator.js.map +1 -0
  49. package/dist/core/claude/claude-settings-manager.d.ts +44 -0
  50. package/dist/core/claude/claude-settings-manager.d.ts.map +1 -0
  51. package/dist/core/claude/claude-settings-manager.js +194 -0
  52. package/dist/core/claude/claude-settings-manager.js.map +1 -0
  53. package/dist/core/console/cli-bridge.d.ts +113 -0
  54. package/dist/core/console/cli-bridge.d.ts.map +1 -0
  55. package/dist/core/console/cli-bridge.js +1094 -0
  56. package/dist/core/console/cli-bridge.js.map +1 -0
  57. package/dist/core/detect/detector.d.ts +35 -0
  58. package/dist/core/detect/detector.d.ts.map +1 -0
  59. package/dist/core/detect/detector.js +541 -0
  60. package/dist/core/detect/detector.js.map +1 -0
  61. package/dist/core/docs/docs-generator.d.ts +9 -0
  62. package/dist/core/docs/docs-generator.d.ts.map +1 -0
  63. package/dist/core/docs/docs-generator.js +531 -0
  64. package/dist/core/docs/docs-generator.js.map +1 -0
  65. package/dist/core/docs/mcp-reference-generator.d.ts +13 -0
  66. package/dist/core/docs/mcp-reference-generator.d.ts.map +1 -0
  67. package/dist/core/docs/mcp-reference-generator.js +66 -0
  68. package/dist/core/docs/mcp-reference-generator.js.map +1 -0
  69. package/dist/core/generators/generator.d.ts +54 -0
  70. package/dist/core/generators/generator.d.ts.map +1 -0
  71. package/dist/core/generators/generator.js +1041 -0
  72. package/dist/core/generators/generator.js.map +1 -0
  73. package/dist/core/generators/gitignore-generator.d.ts +13 -0
  74. package/dist/core/generators/gitignore-generator.d.ts.map +1 -0
  75. package/dist/core/generators/gitignore-generator.js +307 -0
  76. package/dist/core/generators/gitignore-generator.js.map +1 -0
  77. package/dist/core/generators/minimal-scaffolder.d.ts +8 -0
  78. package/dist/core/generators/minimal-scaffolder.d.ts.map +1 -0
  79. package/dist/core/generators/minimal-scaffolder.js +51 -0
  80. package/dist/core/generators/minimal-scaffolder.js.map +1 -0
  81. package/dist/core/generators/rules-generator.d.ts +73 -0
  82. package/dist/core/generators/rules-generator.d.ts.map +1 -0
  83. package/dist/core/generators/rules-generator.js +202 -0
  84. package/dist/core/generators/rules-generator.js.map +1 -0
  85. package/dist/core/generators/workflow-generator.d.ts +15 -0
  86. package/dist/core/generators/workflow-generator.d.ts.map +1 -0
  87. package/dist/core/generators/workflow-generator.js +390 -0
  88. package/dist/core/generators/workflow-generator.js.map +1 -0
  89. package/dist/core/ide/multi-tool-generator.d.ts +59 -0
  90. package/dist/core/ide/multi-tool-generator.d.ts.map +1 -0
  91. package/dist/core/ide/multi-tool-generator.js +157 -0
  92. package/dist/core/ide/multi-tool-generator.js.map +1 -0
  93. package/dist/core/ide/opencode-generator.d.ts +72 -0
  94. package/dist/core/ide/opencode-generator.d.ts.map +1 -0
  95. package/dist/core/ide/opencode-generator.js +450 -0
  96. package/dist/core/ide/opencode-generator.js.map +1 -0
  97. package/dist/core/merger.d.ts +1 -1
  98. package/dist/core/merger.d.ts.map +1 -1
  99. package/dist/core/merger.js +5 -5
  100. package/dist/core/merger.js.map +1 -1
  101. package/dist/core/migrator.d.ts +0 -1
  102. package/dist/core/migrator.d.ts.map +1 -1
  103. package/dist/core/migrator.js +4 -29
  104. package/dist/core/migrator.js.map +1 -1
  105. package/dist/core/quality/coverage-checker.d.ts +14 -0
  106. package/dist/core/quality/coverage-checker.d.ts.map +1 -0
  107. package/dist/core/quality/coverage-checker.js +176 -0
  108. package/dist/core/quality/coverage-checker.js.map +1 -0
  109. package/dist/core/quality/dependency-checker.d.ts +21 -0
  110. package/dist/core/quality/dependency-checker.d.ts.map +1 -0
  111. package/dist/core/quality/dependency-checker.js +247 -0
  112. package/dist/core/quality/dependency-checker.js.map +1 -0
  113. package/dist/core/quality/doctor.d.ts +19 -0
  114. package/dist/core/quality/doctor.d.ts.map +1 -0
  115. package/dist/core/quality/doctor.js +163 -0
  116. package/dist/core/quality/doctor.js.map +1 -0
  117. package/dist/core/quality/validator.d.ts +21 -0
  118. package/dist/core/quality/validator.d.ts.map +1 -0
  119. package/dist/core/quality/validator.js +177 -0
  120. package/dist/core/quality/validator.js.map +1 -0
  121. package/dist/core/skills/skills-manager.d.ts +126 -0
  122. package/dist/core/skills/skills-manager.d.ts.map +1 -0
  123. package/dist/core/skills/skills-manager.js +630 -0
  124. package/dist/core/skills/skills-manager.js.map +1 -0
  125. package/dist/core/state/config-manager.d.ts +86 -0
  126. package/dist/core/state/config-manager.d.ts.map +1 -0
  127. package/dist/core/state/config-manager.js +562 -0
  128. package/dist/core/state/config-manager.js.map +1 -0
  129. package/dist/core/state/override-manager.d.ts +23 -0
  130. package/dist/core/state/override-manager.d.ts.map +1 -0
  131. package/dist/core/state/override-manager.js +82 -0
  132. package/dist/core/state/override-manager.js.map +1 -0
  133. package/dist/core/state/state-writer.d.ts +34 -0
  134. package/dist/core/state/state-writer.d.ts.map +1 -0
  135. package/dist/core/state/state-writer.js +78 -0
  136. package/dist/core/state/state-writer.js.map +1 -0
  137. package/dist/core/state/version-bumper.d.ts +19 -0
  138. package/dist/core/state/version-bumper.d.ts.map +1 -0
  139. package/dist/core/state/version-bumper.js +180 -0
  140. package/dist/core/state/version-bumper.js.map +1 -0
  141. package/dist/core/tasks/decision-manager.d.ts +25 -0
  142. package/dist/core/tasks/decision-manager.d.ts.map +1 -0
  143. package/dist/core/tasks/decision-manager.js +183 -0
  144. package/dist/core/tasks/decision-manager.js.map +1 -0
  145. package/dist/core/tasks/knowledge-manager.d.ts +24 -0
  146. package/dist/core/tasks/knowledge-manager.d.ts.map +1 -0
  147. package/dist/core/tasks/knowledge-manager.js +173 -0
  148. package/dist/core/tasks/knowledge-manager.js.map +1 -0
  149. package/dist/core/tasks/learn-manager.d.ts +27 -0
  150. package/dist/core/tasks/learn-manager.d.ts.map +1 -0
  151. package/dist/core/tasks/learn-manager.js +121 -0
  152. package/dist/core/tasks/learn-manager.js.map +1 -0
  153. package/dist/core/tasks/plans-manager.d.ts +46 -0
  154. package/dist/core/tasks/plans-manager.d.ts.map +1 -0
  155. package/dist/core/tasks/plans-manager.js +158 -0
  156. package/dist/core/tasks/plans-manager.js.map +1 -0
  157. package/dist/core/tasks/task-manager.d.ts +127 -0
  158. package/dist/core/tasks/task-manager.d.ts.map +1 -0
  159. package/dist/core/tasks/task-manager.js +607 -0
  160. package/dist/core/tasks/task-manager.js.map +1 -0
  161. package/dist/core/workspace/project-worker.d.ts +6 -6
  162. package/dist/core/workspace/project-worker.d.ts.map +1 -1
  163. package/dist/core/workspace/project-worker.js +6 -6
  164. package/dist/core/workspace/project-worker.js.map +1 -1
  165. package/dist/index.d.ts +1 -1
  166. package/dist/index.d.ts.map +1 -1
  167. package/dist/index.js +19 -176
  168. package/dist/index.js.map +1 -1
  169. package/dist/mcp/rulebook-server.d.ts.map +1 -1
  170. package/dist/mcp/rulebook-server.js +16 -960
  171. package/dist/mcp/rulebook-server.js.map +1 -1
  172. package/dist/memory/file-search.d.ts +43 -0
  173. package/dist/memory/file-search.d.ts.map +1 -0
  174. package/dist/memory/file-search.js +228 -0
  175. package/dist/memory/file-search.js.map +1 -0
  176. package/dist/memory/file-store.d.ts +99 -0
  177. package/dist/memory/file-store.d.ts.map +1 -0
  178. package/dist/memory/file-store.js +615 -0
  179. package/dist/memory/file-store.js.map +1 -0
  180. package/dist/memory/legacy-migrator.d.ts +27 -0
  181. package/dist/memory/legacy-migrator.d.ts.map +1 -0
  182. package/dist/memory/legacy-migrator.js +185 -0
  183. package/dist/memory/legacy-migrator.js.map +1 -0
  184. package/dist/memory/memory-manager.d.ts +25 -24
  185. package/dist/memory/memory-manager.d.ts.map +1 -1
  186. package/dist/memory/memory-manager.js +97 -140
  187. package/dist/memory/memory-manager.js.map +1 -1
  188. package/dist/memory/memory-types.d.ts +1 -1
  189. package/dist/memory/memory-types.d.ts.map +1 -1
  190. package/dist/types.d.ts +8 -119
  191. package/dist/types.d.ts.map +1 -1
  192. package/package.json +1 -6
  193. package/templates/agents/context-intelligence.md +50 -52
  194. package/templates/cli/OPENCODE.md +85 -18
  195. package/templates/commands/rulebook-learn-capture.md +41 -48
  196. package/templates/commands/rulebook-learn-list.md +13 -13
  197. package/templates/core/AGENTS_LEAN.md +0 -14
  198. package/templates/hooks/check-context-and-handoff.sh +8 -10
  199. package/templates/hooks/enforce-pre-tool.sh +70 -0
  200. package/templates/hooks/terse-mode-tracker.sh +146 -143
  201. package/templates/ides/OPENCODE.md +63 -0
  202. package/templates/skills/cli/opencode/SKILL.md +82 -28
  203. package/.claude/commands/ralph-config.md +0 -112
  204. package/.claude/commands/ralph-history.md +0 -110
  205. package/.claude/commands/ralph-init.md +0 -72
  206. package/.claude/commands/ralph-pause-resume.md +0 -105
  207. package/.claude/commands/ralph-run.md +0 -101
  208. package/.claude/commands/ralph-status.md +0 -76
  209. package/templates/core/RALPH.md +0 -471
  210. package/templates/frameworks/ANGULAR.md +0 -36
  211. package/templates/frameworks/DJANGO.md +0 -83
  212. package/templates/frameworks/ELECTRON.md +0 -147
  213. package/templates/frameworks/FLASK.md +0 -38
  214. package/templates/frameworks/FLUTTER.md +0 -55
  215. package/templates/frameworks/JQUERY.md +0 -32
  216. package/templates/frameworks/LARAVEL.md +0 -38
  217. package/templates/frameworks/NESTJS.md +0 -43
  218. package/templates/frameworks/NEXTJS.md +0 -127
  219. package/templates/frameworks/NUXT.md +0 -40
  220. package/templates/frameworks/RAILS.md +0 -66
  221. package/templates/frameworks/REACT.md +0 -38
  222. package/templates/frameworks/REACT_NATIVE.md +0 -47
  223. package/templates/frameworks/SPRING.md +0 -39
  224. package/templates/frameworks/SYMFONY.md +0 -36
  225. package/templates/frameworks/VUE.md +0 -36
  226. package/templates/frameworks/ZEND.md +0 -35
  227. package/templates/hooks/enforce-mcp-for-tasks.sh +0 -31
  228. package/templates/hooks/enforce-no-deferred.sh +0 -21
  229. package/templates/hooks/enforce-no-shortcuts.sh +0 -31
  230. package/templates/ides/COPILOT.md +0 -37
  231. package/templates/ides/CURSOR.md +0 -43
  232. package/templates/ides/JETBRAINS_AI.md +0 -35
  233. package/templates/ides/REPLIT.md +0 -36
  234. package/templates/ides/TABNINE.md +0 -29
  235. package/templates/ides/VSCODE.md +0 -40
  236. package/templates/ides/WINDSURF.md +0 -36
  237. package/templates/ides/ZED.md +0 -32
  238. package/templates/ides/cursor-mdc/go.mdc +0 -24
  239. package/templates/ides/cursor-mdc/python.mdc +0 -24
  240. package/templates/ides/cursor-mdc/quality.mdc +0 -25
  241. package/templates/ides/cursor-mdc/ralph.mdc +0 -39
  242. package/templates/ides/cursor-mdc/rulebook.mdc +0 -38
  243. package/templates/ides/cursor-mdc/rust.mdc +0 -24
  244. package/templates/ides/cursor-mdc/typescript.mdc +0 -25
  245. package/templates/ralph/ralph-history.bat +0 -4
  246. package/templates/ralph/ralph-history.sh +0 -5
  247. package/templates/ralph/ralph-init.bat +0 -5
  248. package/templates/ralph/ralph-init.sh +0 -5
  249. package/templates/ralph/ralph-pause.bat +0 -5
  250. package/templates/ralph/ralph-pause.sh +0 -5
  251. package/templates/ralph/ralph-run.bat +0 -5
  252. package/templates/ralph/ralph-run.sh +0 -5
  253. package/templates/ralph/ralph-status.bat +0 -4
  254. package/templates/ralph/ralph-status.sh +0 -5
  255. package/templates/services/AZURE_BLOB.md +0 -184
  256. package/templates/services/CASSANDRA.md +0 -239
  257. package/templates/services/DATADOG.md +0 -26
  258. package/templates/services/DOCKER.md +0 -124
  259. package/templates/services/DOCKER_COMPOSE.md +0 -168
  260. package/templates/services/DYNAMODB.md +0 -308
  261. package/templates/services/ELASTICSEARCH.md +0 -347
  262. package/templates/services/GCS.md +0 -178
  263. package/templates/services/HELM.md +0 -194
  264. package/templates/services/INFLUXDB.md +0 -265
  265. package/templates/services/KAFKA.md +0 -341
  266. package/templates/services/KUBERNETES.md +0 -208
  267. package/templates/services/MARIADB.md +0 -183
  268. package/templates/services/MEMCACHED.md +0 -242
  269. package/templates/services/MINIO.md +0 -201
  270. package/templates/services/MONGODB.md +0 -268
  271. package/templates/services/MYSQL.md +0 -358
  272. package/templates/services/NEO4J.md +0 -247
  273. package/templates/services/OPENTELEMETRY.md +0 -25
  274. package/templates/services/ORACLE.md +0 -290
  275. package/templates/services/PINO.md +0 -24
  276. package/templates/services/POSTGRESQL.md +0 -326
  277. package/templates/services/PROMETHEUS.md +0 -33
  278. package/templates/services/RABBITMQ.md +0 -286
  279. package/templates/services/REDIS.md +0 -292
  280. package/templates/services/S3.md +0 -298
  281. package/templates/services/SENTRY.md +0 -23
  282. package/templates/services/SQLITE.md +0 -294
  283. package/templates/services/SQLSERVER.md +0 -294
  284. package/templates/services/WINSTON.md +0 -30
  285. package/templates/skills/frameworks/angular/SKILL.md +0 -46
  286. package/templates/skills/frameworks/django/SKILL.md +0 -93
  287. package/templates/skills/frameworks/electron/SKILL.md +0 -157
  288. package/templates/skills/frameworks/flask/SKILL.md +0 -48
  289. package/templates/skills/frameworks/flutter/SKILL.md +0 -65
  290. package/templates/skills/frameworks/jquery/SKILL.md +0 -42
  291. package/templates/skills/frameworks/laravel/SKILL.md +0 -48
  292. package/templates/skills/frameworks/nestjs/SKILL.md +0 -53
  293. package/templates/skills/frameworks/nextjs/SKILL.md +0 -137
  294. package/templates/skills/frameworks/nuxt/SKILL.md +0 -50
  295. package/templates/skills/frameworks/rails/SKILL.md +0 -76
  296. package/templates/skills/frameworks/react/SKILL.md +0 -48
  297. package/templates/skills/frameworks/react-native/SKILL.md +0 -57
  298. package/templates/skills/frameworks/spring/SKILL.md +0 -49
  299. package/templates/skills/frameworks/symfony/SKILL.md +0 -46
  300. package/templates/skills/frameworks/vue/SKILL.md +0 -46
  301. package/templates/skills/frameworks/zend/SKILL.md +0 -45
  302. package/templates/skills/services/azure-blob/SKILL.md +0 -194
  303. package/templates/skills/services/cassandra/SKILL.md +0 -249
  304. package/templates/skills/services/dynamodb/SKILL.md +0 -318
  305. package/templates/skills/services/elasticsearch/SKILL.md +0 -357
  306. package/templates/skills/services/gcs/SKILL.md +0 -188
  307. package/templates/skills/services/influxdb/SKILL.md +0 -275
  308. package/templates/skills/services/kafka/SKILL.md +0 -351
  309. package/templates/skills/services/mariadb/SKILL.md +0 -193
  310. package/templates/skills/services/memcached/SKILL.md +0 -252
  311. package/templates/skills/services/minio/SKILL.md +0 -211
  312. package/templates/skills/services/mongodb/SKILL.md +0 -278
  313. package/templates/skills/services/mysql/SKILL.md +0 -368
  314. package/templates/skills/services/neo4j/SKILL.md +0 -257
  315. package/templates/skills/services/oracle/SKILL.md +0 -300
  316. package/templates/skills/services/postgresql/SKILL.md +0 -336
  317. package/templates/skills/services/rabbitmq/SKILL.md +0 -296
  318. package/templates/skills/services/redis/SKILL.md +0 -302
  319. package/templates/skills/services/s3/SKILL.md +0 -308
  320. package/templates/skills/services/sqlite/SKILL.md +0 -304
  321. package/templates/skills/services/sqlserver/SKILL.md +0 -304
  322. package/templates/skills/workflows/ralph/SETUP.md +0 -228
  323. package/templates/skills/workflows/ralph/SKILL.md +0 -309
  324. package/templates/skills/workflows/ralph/install.sh +0 -87
  325. package/templates/skills/workflows/ralph/manifest.json +0 -158
@@ -1,65 +0,0 @@
1
- ---
2
- name: "Flutter"
3
- description: "Language: Dart"
4
- version: "1.0.0"
5
- category: "frameworks"
6
- author: "Rulebook"
7
- tags: ["frameworks", "framework"]
8
- dependencies: []
9
- conflicts: []
10
- ---
11
- <!-- FLUTTER:START -->
12
- # Flutter Framework Rules
13
-
14
- **Language**: Dart
15
- **Version**: Flutter 3.10+
16
-
17
- ## Setup
18
-
19
- ```yaml
20
- # pubspec.yaml
21
- dependencies:
22
- flutter:
23
- sdk: flutter
24
- cupertino_icons: ^1.0.2
25
-
26
- dev_dependencies:
27
- flutter_test:
28
- sdk: flutter
29
- flutter_lints: ^2.0.0
30
- ```
31
-
32
- ## Quality Gates
33
-
34
- ```bash
35
- dart format --set-exit-if-changed .
36
- dart analyze --fatal-infos
37
- flutter test
38
- flutter build apk --release # Test build
39
- ```
40
-
41
- ## Best Practices
42
-
43
- ✅ Use StatelessWidget when possible
44
- ✅ Implement proper state management (Provider, Riverpod, Bloc)
45
- ✅ Use const constructors
46
- ✅ Optimize widget rebuilds
47
- ✅ Test on multiple devices
48
-
49
- ❌ Don't use `print()` in production
50
- ❌ Don't skip null safety
51
- ❌ Don't ignore platform differences
52
-
53
- ## Project Structure
54
-
55
- ```
56
- lib/
57
- ├── main.dart
58
- ├── models/
59
- ├── screens/
60
- ├── widgets/
61
- └── services/
62
- ```
63
-
64
- <!-- FLUTTER:END -->
65
-
@@ -1,42 +0,0 @@
1
- ---
2
- name: "jQuery"
3
- description: "Language: JavaScript"
4
- version: "1.0.0"
5
- category: "frameworks"
6
- author: "Rulebook"
7
- tags: ["frameworks", "framework"]
8
- dependencies: []
9
- conflicts: []
10
- ---
11
- <!-- JQUERY:START -->
12
- # jQuery Framework Rules
13
-
14
- **Language**: JavaScript
15
- **Version**: jQuery 3.x+
16
-
17
- ## Setup
18
-
19
- ```html
20
- <script src="https://code.jquery.com/jquery-3.7.1.min.js"></script>
21
- ```
22
-
23
- ## Best Practices
24
-
25
- ✅ Use modern JS alongside jQuery
26
- ✅ Minimize DOM manipulation
27
- ✅ Cache jQuery selectors
28
- ✅ Use event delegation
29
-
30
- ❌ Don't use jQuery for everything
31
- ❌ Don't pollute global scope
32
- ❌ Don't skip CSP headers
33
-
34
- ## Quality Gates
35
-
36
- ```bash
37
- eslint src/**/*.js
38
- jest
39
- ```
40
-
41
- <!-- JQUERY:END -->
42
-
@@ -1,48 +0,0 @@
1
- ---
2
- name: "Laravel"
3
- description: "Laravel services must respect these conventions and quality checks."
4
- version: "1.0.0"
5
- category: "frameworks"
6
- author: "Rulebook"
7
- tags: ["frameworks", "framework"]
8
- dependencies: []
9
- conflicts: []
10
- ---
11
- <!-- LARAVEL:START -->
12
- # Laravel Framework Rules
13
-
14
- **CRITICAL**: Laravel services must respect these conventions and quality checks.
15
-
16
- ## Quality Commands
17
- - Static analysis: `./vendor/bin/pint --test`
18
- - Lint style: `./vendor/bin/phpcs --standard=PSR12 app/`
19
- - Unit tests: `php artisan test`
20
- - Feature tests: `php artisan test --testsuite=Feature`
21
- - Coverage: ensure `php artisan test --coverage` ≥ 80%
22
-
23
- ## Project Structure
24
- - Keep HTTP controllers in `app/Http/Controllers`
25
- - Use form requests for validation in `app/Http/Requests`
26
- - Organize business logic in `app/Services`
27
- - Leverage repositories for data persistence where appropriate
28
- - Store queued jobs in `app/Jobs`
29
-
30
- ## Implementation Guidelines
31
- - Use migrations for every schema change (`php artisan make:migration`)
32
- - Keep Eloquent models lean; move heavy logic into services
33
- - Cache configuration after deployment (`php artisan config:cache`)
34
- - Register scheduled tasks in `app/Console/Kernel.php`
35
- - Ensure `app/Providers` registers new bindings/events
36
-
37
- ## Composer Hygiene
38
- ```bash
39
- composer install --no-dev --prefer-dist
40
- composer dump-autoload
41
- ```
42
-
43
- ## Additional Checks
44
- - Sync `.env.example` whenever new variables are introduced
45
- - Document API changes in `/docs/laravel-api.md`
46
- - Generate API resources via `php artisan make:resource`
47
-
48
- <!-- LARAVEL:END -->
@@ -1,53 +0,0 @@
1
- ---
2
- name: "NestJS"
3
- description: "Align all NestJS services, modules, and controllers with these conventions."
4
- version: "1.0.0"
5
- category: "frameworks"
6
- author: "Rulebook"
7
- tags: ["frameworks", "framework"]
8
- dependencies: []
9
- conflicts: []
10
- ---
11
- <!-- NESTJS:START -->
12
- # NestJS Framework Rules
13
-
14
- **CRITICAL**: Align all NestJS services, modules, and controllers with these conventions.
15
-
16
- ## Project Structure
17
- - Maintain feature-first modules under `src/<feature>/`
18
- - Keep global providers in `src/common/`
19
- - Register new modules in `AppModule` and ensure dependency injection consistency
20
- - Prefer `@nestjs/config` for environment configuration
21
-
22
- ## Quality Gates
23
- - Lint: `npm run lint`
24
- - Unit tests: `npm run test`
25
- - e2e tests: `npm run test:e2e`
26
- - Build validation: `npm run build`
27
- - Coverage threshold: **80%+** for service and controller layers
28
-
29
- ## Implementation Guidelines
30
- - Use DTOs with `class-validator` and `class-transformer`
31
- - Encapsulate database access in providers (avoid direct repository use in controllers)
32
- - Document routes with `@nestjs/swagger` when OpenAPI is enabled
33
- - Keep asynchronous logic wrapped with `try/catch` and map errors to HTTP exceptions
34
-
35
- ## Scripts to Run Before Commit
36
- ```bash
37
- npm run lint
38
- npm run test
39
- npm run test:e2e
40
- npm run build
41
- ```
42
-
43
- ## Additional Checks
44
- - Ensure Circular Dependency detection is clean (`npm run lint -- --max-warnings=0`)
45
- - Synchronize `.env.example` with actual required variables
46
- - Maintain aligned versions for Nest core packages (`@nestjs/*`)
47
-
48
- ## Documentation
49
- - Update `/docs/architecture.md` with new modules and providers
50
- - Keep OpenAPI spec regenerated via `npm run swagger:generate`
51
- - Log breaking changes in `CHANGELOG.md`
52
-
53
- <!-- NESTJS:END -->
@@ -1,137 +0,0 @@
1
- ---
2
- name: "Next.js"
3
- description: "Language: TypeScript, JavaScript"
4
- version: "1.0.0"
5
- category: "frameworks"
6
- author: "Rulebook"
7
- tags: ["frameworks", "framework"]
8
- dependencies: []
9
- conflicts: []
10
- ---
11
- <!-- NEXTJS:START -->
12
- # Next.js Framework Rules
13
-
14
- **Language**: TypeScript, JavaScript
15
- **Version**: Next.js 14+ (App Router)
16
-
17
- ## Setup & Configuration
18
-
19
- ```typescript
20
- // next.config.ts
21
- import type { NextConfig } from 'next'
22
-
23
- const nextConfig: NextConfig = {
24
- reactStrictMode: true,
25
- images: {
26
- domains: ['your-domain.com'],
27
- },
28
- env: {
29
- CUSTOM_KEY: process.env.CUSTOM_KEY,
30
- },
31
- }
32
-
33
- export default nextConfig
34
- ```
35
-
36
- ## Quality Gates
37
-
38
- ```bash
39
- # Type check
40
- npm run type-check # or: tsc --noEmit
41
-
42
- # Lint
43
- npm run lint # Next.js ESLint
44
-
45
- # Format
46
- npx prettier --check "**/*.{ts,tsx}"
47
-
48
- # Tests
49
- npm test # Vitest or Jest
50
-
51
- # Build
52
- npm run build # Must succeed
53
-
54
- # Check bundle size
55
- npm run build && npx @next/bundle-analyzer
56
- ```
57
-
58
- ## Best Practices
59
-
60
- ✅ **DO:**
61
- - Use App Router (app/) for new projects
62
- - Implement Server Components by default
63
- - Use Client Components ('use client') only when needed
64
- - Optimize images with next/image
65
- - Use dynamic imports for code splitting
66
- - Implement proper metadata/SEO
67
- - Use Server Actions for mutations
68
- - Enable React Strict Mode
69
-
70
- ❌ **DON'T:**
71
- - Use getServerSideProps/getStaticProps in App Router
72
- - Fetch on client when server fetch is better
73
- - Skip image optimization
74
- - Ignore bundle size
75
- - Use 'use client' everywhere
76
- - Hardcode API URLs
77
- - Skip error boundaries
78
-
79
- ## Project Structure (App Router)
80
-
81
- ```
82
- app/
83
- ├── layout.tsx # Root layout
84
- ├── page.tsx # Home page
85
- ├── (routes)/
86
- │ ├── dashboard/
87
- │ │ ├── layout.tsx
88
- │ │ └── page.tsx
89
- │ └── api/
90
- │ └── users/
91
- │ └── route.ts
92
- ├── components/
93
- ├── lib/
94
- └── types/
95
- ```
96
-
97
- ## Server vs Client Components
98
-
99
- ```typescript
100
- // Server Component (default)
101
- async function ServerComponent() {
102
- const data = await fetch('https://api.example.com/data')
103
- return <div>{data}</div>
104
- }
105
-
106
- // Client Component
107
- 'use client'
108
- import { useState } from 'react'
109
-
110
- function ClientComponent() {
111
- const [count, setCount] = useState(0)
112
- return <button onClick={() => setCount(count + 1)}>{count}</button>
113
- }
114
- ```
115
-
116
- ## Route Handlers (API Routes)
117
-
118
- ```typescript
119
- // app/api/users/route.ts
120
- import { NextRequest, NextResponse } from 'next/server'
121
-
122
- export async function GET(request: NextRequest) {
123
- const searchParams = request.nextUrl.searchParams
124
- const id = searchParams.get('id')
125
-
126
- return NextResponse.json({ id })
127
- }
128
-
129
- export async function POST(request: NextRequest) {
130
- const body = await request.json()
131
- // Handle POST
132
- return NextResponse.json({ success: true })
133
- }
134
- ```
135
-
136
- <!-- NEXTJS:END -->
137
-
@@ -1,50 +0,0 @@
1
- ---
2
- name: "Nuxt"
3
- description: "Nuxt 3 applications must keep these standards to ensure SSR quality."
4
- version: "1.0.0"
5
- category: "frameworks"
6
- author: "Rulebook"
7
- tags: ["frameworks", "framework"]
8
- dependencies: []
9
- conflicts: []
10
- ---
11
- <!-- NUXT:START -->
12
- # Nuxt Framework Rules
13
-
14
- **CRITICAL**: Nuxt 3 applications must keep these standards to ensure SSR quality.
15
-
16
- ## Quality Commands
17
- - Lint: `npm run lint`
18
- - Type check: `npm run type-check`
19
- - Unit tests: `npm run test`
20
- - Build for production: `npm run build`
21
- - Generate static output (if applicable): `npm run generate`
22
-
23
- ## Project Structure
24
- - Define routes with file-based routing under `pages/`
25
- - Keep server API handlers within `server/api/`
26
- - Organize composables in `composables/`
27
- - Place reusable UI components in `components/`
28
- - Store state via Pinia modules in `stores/`
29
-
30
- ## Implementation Guidelines
31
- - Use runtime config via `useRuntimeConfig()` for secrets
32
- - SSR-safe operations only inside `onServerPrefetch`/server routes
33
- - Prefer `definePageMeta` to control page-level features
34
- - Maintain i18n messages in `/locales`
35
- - Cache heavy computations with Nitro storage if needed
36
-
37
- ## Pre-Commit Commands
38
- ```bash
39
- npm run lint
40
- npm run type-check
41
- npm run test
42
- npm run build
43
- ```
44
-
45
- ## Documentation
46
- - Keep `/docs/nuxt-architecture.md` current with route layout and middleware
47
- - Document server API contracts in `/docs/api.md`
48
- - Capture deployment steps (SSR vs static) in `/docs/deployment.md`
49
-
50
- <!-- NUXT:END -->
@@ -1,76 +0,0 @@
1
- ---
2
- name: "Rails"
3
- description: "Language: Ruby"
4
- version: "1.0.0"
5
- category: "frameworks"
6
- author: "Rulebook"
7
- tags: ["frameworks", "framework"]
8
- dependencies: []
9
- conflicts: []
10
- ---
11
- <!-- RAILS:START -->
12
- # Ruby on Rails Framework Rules
13
-
14
- **Language**: Ruby
15
- **Version**: Rails 7.0+
16
-
17
- ## Setup & Configuration
18
-
19
- ```ruby
20
- # config/database.yml
21
- production:
22
- url: <%= ENV['DATABASE_URL'] %>
23
-
24
- # config/environments/production.rb
25
- config.force_ssl = true
26
- config.log_level = :info
27
- ```
28
-
29
- ## Quality Gates
30
-
31
- ```bash
32
- # Code quality
33
- bundle exec rubocop # Lint
34
- bundle exec brakeman # Security scan
35
-
36
- # Tests
37
- bundle exec rspec # Run tests
38
- bundle exec rspec --format documentation # Verbose
39
-
40
- # Type check (optional)
41
- bundle exec steep check # Static typing
42
- ```
43
-
44
- ## Best Practices
45
-
46
- ✅ **DO:**
47
- - Use strong parameters
48
- - Implement authentication (Devise/custom)
49
- - Use ActiveRecord callbacks sparingly
50
- - Write RSpec/Minitest tests
51
- - Use database migrations
52
- - Enable CSRF protection
53
-
54
- ❌ **DON'T:**
55
- - Skip validations in models
56
- - Use `params` without permit
57
- - Store secrets in code
58
- - Skip database indexes
59
- - Ignore N+1 queries
60
-
61
- ## Project Structure
62
-
63
- ```
64
- app/
65
- ├── controllers/
66
- ├── models/
67
- ├── views/
68
- ├── jobs/
69
- └── mailers/
70
- config/
71
- db/
72
- spec/
73
- ```
74
-
75
- <!-- RAILS:END -->
76
-
@@ -1,48 +0,0 @@
1
- ---
2
- name: "React"
3
- description: "React applications must comply with these quality bars."
4
- version: "1.0.0"
5
- category: "frameworks"
6
- author: "Rulebook"
7
- tags: ["frameworks", "framework"]
8
- dependencies: []
9
- conflicts: []
10
- ---
11
- <!-- REACT:START -->
12
- # React Framework Rules
13
-
14
- **CRITICAL**: React applications must comply with these quality bars.
15
-
16
- ## Quality Commands
17
- - Lint & type check: `npm run lint` + `npm run type-check`
18
- - Unit/integration tests: `npm run test -- --watch=false`
19
- - Build: `npm run build`
20
- - Bundle analysis (optional): `npm run analyze`
21
-
22
- ## Project Structure
23
- - Group features under `src/features/<name>/`
24
- - Maintain shared UI primitives in `src/components`
25
- - Keep hooks in `src/hooks`
26
- - Centralize state management in `src/state` (Redux/Zustand/Recoil)
27
-
28
- ## Implementation Guidelines
29
- - Use TypeScript everywhere (no implicit `any`)
30
- - Prefer functional components with hooks
31
- - Co-locate component tests as `<Component>.test.tsx`
32
- - Use React Query/SWR for server state, keep caches invalidated on mutations
33
- - Wrap new pages with error boundaries and suspense where needed
34
-
35
- ## Pre-Commit Checklist
36
- ```bash
37
- npm run lint
38
- npm run type-check
39
- npm run test -- --watch=false
40
- npm run build
41
- ```
42
-
43
- ## Documentation
44
- - Update `/docs/react-architecture.md` when routes or global providers change
45
- - Record reusable components in Storybook or `/docs/ui-components.md`
46
- - Capture performance regressions in `/docs/performance.md`
47
-
48
- <!-- REACT:END -->
@@ -1,57 +0,0 @@
1
- ---
2
- name: "React Native"
3
- description: "Language: JavaScript, TypeScript"
4
- version: "1.0.0"
5
- category: "frameworks"
6
- author: "Rulebook"
7
- tags: ["frameworks", "framework"]
8
- dependencies: []
9
- conflicts: []
10
- ---
11
- <!-- REACT_NATIVE:START -->
12
- # React Native Framework Rules
13
-
14
- **Language**: JavaScript, TypeScript
15
- **Version**: React Native 0.72+
16
-
17
- ## Setup
18
-
19
- ```bash
20
- npx react-native init MyApp --template react-native-template-typescript
21
- ```
22
-
23
- ## Quality Gates
24
-
25
- ```bash
26
- npm run lint
27
- npm run type-check
28
- npm test
29
- npm run android # Test build
30
- npm run ios # Test build
31
- ```
32
-
33
- ## Best Practices
34
-
35
- ✅ Use TypeScript
36
- ✅ Implement proper navigation (React Navigation)
37
- ✅ Use platform-specific code when needed
38
- ✅ Optimize images and assets
39
- ✅ Test on both iOS and Android
40
-
41
- ❌ Don't hardcode dimensions
42
- ❌ Don't skip accessibility
43
- ❌ Don't ignore memory leaks
44
-
45
- ## Project Structure
46
-
47
- ```
48
- src/
49
- ├── components/
50
- ├── screens/
51
- ├── navigation/
52
- ├── services/
53
- └── utils/
54
- ```
55
-
56
- <!-- REACT_NATIVE:END -->
57
-
@@ -1,49 +0,0 @@
1
- ---
2
- name: "Spring"
3
- description: "Every Spring service must satisfy these quality gates before merge."
4
- version: "1.0.0"
5
- category: "frameworks"
6
- author: "Rulebook"
7
- tags: ["frameworks", "framework"]
8
- dependencies: []
9
- conflicts: []
10
- ---
11
- <!-- SPRING:START -->
12
- # Spring Boot Framework Rules
13
-
14
- **CRITICAL**: Every Spring service must satisfy these quality gates before merge.
15
-
16
- ## Build & Quality Commands
17
- - Lint/format: `./gradlew checkstyleMain` or `mvn verify`
18
- - Unit tests: `./gradlew test` or `mvn test`
19
- - Integration tests: `./gradlew integrationTest` (if module exists)
20
- - Static analysis: `./gradlew jacocoTestReport` to ensure 80%+ coverage
21
-
22
- ## Project Structure
23
- - Keep domain logic in `src/main/java/.../service`
24
- - Expose REST controllers in `controller` packages
25
- - Isolate configuration classes under `config`
26
- - Share DTOs via `dto` package and map with MapStruct where applicable
27
-
28
- ## Implementation Guidelines
29
- - Manage configuration with `application.yml` profiles (dev/test/prod)
30
- - Prefer constructor injection, avoid `@Autowired` field injection
31
- - Wrap transactional operations with `@Transactional`
32
- - Use `ResponseEntity` for explicit HTTP semantics
33
- - Validate inputs using `javax.validation` annotations and `@Valid`
34
-
35
- ## Build Matrix
36
- ```bash
37
- # Gradle
38
- ./gradlew clean check
39
-
40
- # Maven
41
- mvn -B clean verify
42
- ```
43
-
44
- ## Additional Checks
45
- - Ensure `application.yml` contains defaults for new properties
46
- - Update Flyway/Liquibase migrations when schema changes
47
- - Keep `README` and `/docs/architecture.md` synced with new services
48
-
49
- <!-- SPRING:END -->
@@ -1,46 +0,0 @@
1
- ---
2
- name: "Symfony"
3
- description: "Language: PHP"
4
- version: "1.0.0"
5
- category: "frameworks"
6
- author: "Rulebook"
7
- tags: ["frameworks", "framework"]
8
- dependencies: []
9
- conflicts: []
10
- ---
11
- <!-- SYMFONY:START -->
12
- # Symfony Framework Rules
13
-
14
- **Language**: PHP
15
- **Version**: Symfony 6.0+ or 7.0+
16
-
17
- ## Setup
18
-
19
- ```yaml
20
- # config/packages/framework.yaml
21
- framework:
22
- secret: '%env(APP_SECRET)%'
23
- csrf_protection: true
24
- ```
25
-
26
- ## Quality Gates
27
-
28
- ```bash
29
- php bin/console lint:twig templates/
30
- php bin/console lint:yaml config/
31
- vendor/bin/phpstan analyze src tests
32
- vendor/bin/phpunit
33
- ```
34
-
35
- ## Best Practices
36
-
37
- ✅ Use dependency injection
38
- ✅ Follow PSR standards
39
- ✅ Use Doctrine ORM
40
- ✅ Implement security voters
41
-
42
- ❌ Don't bypass security
43
- ❌ Don't hardcode routes
44
-
45
- <!-- SYMFONY:END -->
46
-