@codemieai/code 0.0.44 → 0.0.46

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 (408) hide show
  1. package/dist/agents/core/BaseAgentAdapter.d.ts +9 -1
  2. package/dist/agents/core/BaseAgentAdapter.d.ts.map +1 -1
  3. package/dist/agents/core/BaseAgentAdapter.js +31 -3
  4. package/dist/agents/core/BaseAgentAdapter.js.map +1 -1
  5. package/dist/agents/core/metrics/types.d.ts +0 -6
  6. package/dist/agents/core/metrics/types.d.ts.map +1 -1
  7. package/dist/agents/core/session/BaseSessionAdapter.d.ts +0 -6
  8. package/dist/agents/core/session/BaseSessionAdapter.d.ts.map +1 -1
  9. package/dist/agents/core/types.d.ts +83 -0
  10. package/dist/agents/core/types.d.ts.map +1 -1
  11. package/dist/agents/plugins/claude/claude.plugin-installer.d.ts +0 -11
  12. package/dist/agents/plugins/claude/claude.plugin-installer.d.ts.map +1 -1
  13. package/dist/agents/plugins/claude/claude.plugin-installer.js +0 -32
  14. package/dist/agents/plugins/claude/claude.plugin-installer.js.map +1 -1
  15. package/dist/agents/plugins/claude/claude.plugin.d.ts.map +1 -1
  16. package/dist/agents/plugins/claude/claude.plugin.js +10 -1
  17. package/dist/agents/plugins/claude/claude.plugin.js.map +1 -1
  18. package/dist/agents/plugins/claude/claude.session.d.ts.map +1 -1
  19. package/dist/agents/plugins/claude/claude.session.js +1 -28
  20. package/dist/agents/plugins/claude/claude.session.js.map +1 -1
  21. package/dist/agents/plugins/claude/plugin/.claude-plugin/plugin.json +1 -1
  22. package/dist/agents/plugins/claude/plugin/README.md +1 -14
  23. package/dist/agents/plugins/claude/plugin/hooks/hooks.json +10 -5
  24. package/dist/agents/plugins/claude/plugin/skills/claude-setup-audit/SKILL.md +206 -0
  25. package/dist/agents/plugins/claude/plugin/skills/claude-setup-audit/examples/bad-agent.md +45 -0
  26. package/dist/agents/plugins/claude/plugin/skills/claude-setup-audit/examples/bad-claude-md-snippet.md +40 -0
  27. package/dist/agents/plugins/claude/plugin/skills/claude-setup-audit/examples/bad-command.md +30 -0
  28. package/dist/agents/plugins/claude/plugin/skills/claude-setup-audit/examples/bad-hooks.json +23 -0
  29. package/dist/agents/plugins/claude/plugin/skills/claude-setup-audit/examples/bad-skill.md +48 -0
  30. package/dist/agents/plugins/claude/plugin/skills/claude-setup-audit/examples/good-agent.md +145 -0
  31. package/dist/agents/plugins/claude/plugin/skills/claude-setup-audit/examples/good-claude-md-snippet.md +126 -0
  32. package/dist/agents/plugins/claude/plugin/skills/claude-setup-audit/examples/good-command.md +170 -0
  33. package/dist/agents/plugins/claude/plugin/skills/claude-setup-audit/examples/good-hooks.json +46 -0
  34. package/dist/agents/plugins/claude/plugin/skills/claude-setup-audit/examples/good-skill.md +144 -0
  35. package/dist/agents/plugins/claude/plugin/skills/claude-setup-audit/examples/sample-report.md +223 -0
  36. package/dist/agents/plugins/claude/plugin/skills/claude-setup-audit/references/best-practices.md +510 -0
  37. package/dist/agents/plugins/claude/plugin/skills/claude-setup-audit/references/component-checklists.md +413 -0
  38. package/dist/agents/plugins/claude/plugin/skills/claude-setup-audit/scripts/scan-repo.sh +162 -0
  39. package/dist/agents/plugins/claude/session/processors/claude.conversations-processor.d.ts.map +1 -1
  40. package/dist/agents/plugins/claude/session/processors/claude.conversations-processor.js +3 -78
  41. package/dist/agents/plugins/claude/session/processors/claude.conversations-processor.js.map +1 -1
  42. package/dist/agents/plugins/claude/session/processors/claude.metrics-processor.d.ts.map +1 -1
  43. package/dist/agents/plugins/claude/session/processors/claude.metrics-processor.js +7 -16
  44. package/dist/agents/plugins/claude/session/processors/claude.metrics-processor.js.map +1 -1
  45. package/dist/agents/plugins/claude/sounds-installer.d.ts +1 -1
  46. package/dist/agents/plugins/claude/sounds-installer.d.ts.map +1 -1
  47. package/dist/agents/plugins/claude/sounds-installer.js +1 -4
  48. package/dist/agents/plugins/claude/sounds-installer.js.map +1 -1
  49. package/dist/agents/plugins/codemie-code.plugin.d.ts +1 -4
  50. package/dist/agents/plugins/codemie-code.plugin.d.ts.map +1 -1
  51. package/dist/agents/plugins/codemie-code.plugin.js +26 -81
  52. package/dist/agents/plugins/codemie-code.plugin.js.map +1 -1
  53. package/dist/agents/plugins/gemini/gemini.plugin.d.ts.map +1 -1
  54. package/dist/agents/plugins/gemini/gemini.plugin.js +10 -0
  55. package/dist/agents/plugins/gemini/gemini.plugin.js.map +1 -1
  56. package/dist/agents/plugins/gemini/gemini.session-adapter.d.ts +1 -8
  57. package/dist/agents/plugins/gemini/gemini.session-adapter.d.ts.map +1 -1
  58. package/dist/agents/plugins/gemini/gemini.session-adapter.js +2 -30
  59. package/dist/agents/plugins/gemini/gemini.session-adapter.js.map +1 -1
  60. package/dist/agents/plugins/gemini/session/processors/gemini.conversations-processor.d.ts.map +1 -1
  61. package/dist/agents/plugins/gemini/session/processors/gemini.conversations-processor.js +2 -8
  62. package/dist/agents/plugins/gemini/session/processors/gemini.conversations-processor.js.map +1 -1
  63. package/dist/agents/plugins/gemini/session/processors/gemini.metrics-processor.d.ts.map +1 -1
  64. package/dist/agents/plugins/gemini/session/processors/gemini.metrics-processor.js +0 -7
  65. package/dist/agents/plugins/gemini/session/processors/gemini.metrics-processor.js.map +1 -1
  66. package/dist/agents/plugins/opencode/index.d.ts +1 -1
  67. package/dist/agents/plugins/opencode/index.d.ts.map +1 -1
  68. package/dist/agents/plugins/opencode/index.js.map +1 -1
  69. package/dist/agents/plugins/opencode/opencode-message-types.d.ts +2 -22
  70. package/dist/agents/plugins/opencode/opencode-message-types.d.ts.map +1 -1
  71. package/dist/agents/plugins/opencode/opencode-message-types.js.map +1 -1
  72. package/dist/agents/plugins/opencode/opencode.session.d.ts.map +1 -1
  73. package/dist/agents/plugins/opencode/opencode.session.js +5 -30
  74. package/dist/agents/plugins/opencode/opencode.session.js.map +1 -1
  75. package/dist/agents/plugins/opencode/opencode.sqlite-reader.d.ts.map +1 -1
  76. package/dist/agents/plugins/opencode/opencode.sqlite-reader.js +0 -2
  77. package/dist/agents/plugins/opencode/opencode.sqlite-reader.js.map +1 -1
  78. package/dist/agents/plugins/opencode/session/processors/opencode.metrics-processor.d.ts +0 -8
  79. package/dist/agents/plugins/opencode/session/processors/opencode.metrics-processor.d.ts.map +1 -1
  80. package/dist/agents/plugins/opencode/session/processors/opencode.metrics-processor.js +8 -97
  81. package/dist/agents/plugins/opencode/session/processors/opencode.metrics-processor.js.map +1 -1
  82. package/dist/cli/commands/analytics/aggregator.d.ts +0 -8
  83. package/dist/cli/commands/analytics/aggregator.d.ts.map +1 -1
  84. package/dist/cli/commands/analytics/aggregator.js +5 -100
  85. package/dist/cli/commands/analytics/aggregator.js.map +1 -1
  86. package/dist/cli/commands/analytics/data-loader.d.ts +0 -7
  87. package/dist/cli/commands/analytics/data-loader.d.ts.map +1 -1
  88. package/dist/cli/commands/analytics/data-loader.js +3 -10
  89. package/dist/cli/commands/analytics/data-loader.js.map +1 -1
  90. package/dist/cli/commands/analytics/exporter.d.ts.map +1 -1
  91. package/dist/cli/commands/analytics/exporter.js +0 -12
  92. package/dist/cli/commands/analytics/exporter.js.map +1 -1
  93. package/dist/cli/commands/analytics/formatter.d.ts.map +1 -1
  94. package/dist/cli/commands/analytics/formatter.js +0 -9
  95. package/dist/cli/commands/analytics/formatter.js.map +1 -1
  96. package/dist/cli/commands/analytics/types.d.ts +0 -17
  97. package/dist/cli/commands/analytics/types.d.ts.map +1 -1
  98. package/dist/cli/commands/assistants/chat/historyLoader.d.ts +22 -0
  99. package/dist/cli/commands/assistants/chat/historyLoader.d.ts.map +1 -0
  100. package/dist/cli/commands/assistants/chat/historyLoader.js +80 -0
  101. package/dist/cli/commands/assistants/chat/historyLoader.js.map +1 -0
  102. package/dist/cli/commands/assistants/{chat.d.ts → chat/index.d.ts} +1 -1
  103. package/dist/cli/commands/assistants/chat/index.d.ts.map +1 -0
  104. package/dist/cli/commands/assistants/{chat.js → chat/index.js} +54 -45
  105. package/dist/cli/commands/assistants/chat/index.js.map +1 -0
  106. package/dist/cli/commands/assistants/chat/types.d.ts +27 -0
  107. package/dist/cli/commands/assistants/chat/types.d.ts.map +1 -0
  108. package/dist/cli/commands/assistants/chat/types.js +5 -0
  109. package/dist/cli/commands/assistants/chat/types.js.map +1 -0
  110. package/dist/cli/commands/assistants/chat/utils.d.ts +12 -0
  111. package/dist/cli/commands/assistants/chat/utils.d.ts.map +1 -0
  112. package/dist/cli/commands/assistants/chat/utils.js +24 -0
  113. package/dist/cli/commands/assistants/chat/utils.js.map +1 -0
  114. package/dist/cli/commands/assistants/constants.d.ts +1 -0
  115. package/dist/cli/commands/assistants/constants.d.ts.map +1 -1
  116. package/dist/cli/commands/assistants/constants.js.map +1 -1
  117. package/dist/cli/commands/assistants/index.js +2 -2
  118. package/dist/cli/commands/assistants/index.js.map +1 -1
  119. package/dist/cli/commands/assistants/setup/generators/claude-agent-generator.js +1 -1
  120. package/dist/cli/commands/assistants/setup/generators/claude-skill-generator.js +1 -1
  121. package/dist/cli/commands/assistants/setup/index.js +4 -4
  122. package/dist/cli/commands/assistants/setup/index.js.map +1 -1
  123. package/dist/cli/commands/assistants/setup/selection/index.d.ts +1 -1
  124. package/dist/cli/commands/assistants/setup/selection/index.d.ts.map +1 -1
  125. package/dist/cli/commands/assistants/setup/selection/index.js +5 -3
  126. package/dist/cli/commands/assistants/setup/selection/index.js.map +1 -1
  127. package/dist/cli/commands/assistants/setup/selection/interactive-prompt.d.ts.map +1 -1
  128. package/dist/cli/commands/assistants/setup/selection/interactive-prompt.js +7 -1
  129. package/dist/cli/commands/assistants/setup/selection/interactive-prompt.js.map +1 -1
  130. package/dist/cli/commands/assistants/setup/selection/types.d.ts +2 -0
  131. package/dist/cli/commands/assistants/setup/selection/types.d.ts.map +1 -1
  132. package/dist/cli/commands/assistants/setup/selection/ui.d.ts.map +1 -1
  133. package/dist/cli/commands/assistants/setup/selection/ui.js +15 -4
  134. package/dist/cli/commands/assistants/setup/selection/ui.js.map +1 -1
  135. package/dist/cli/commands/hook.d.ts.map +1 -1
  136. package/dist/cli/commands/hook.js +22 -6
  137. package/dist/cli/commands/hook.js.map +1 -1
  138. package/dist/cli/commands/plugin.d.ts +16 -0
  139. package/dist/cli/commands/plugin.d.ts.map +1 -0
  140. package/dist/cli/commands/plugin.js +210 -0
  141. package/dist/cli/commands/plugin.js.map +1 -0
  142. package/dist/cli/commands/setup.js +1 -1
  143. package/dist/cli/commands/skill.d.ts.map +1 -1
  144. package/dist/cli/commands/skill.js +3 -1
  145. package/dist/cli/commands/skill.js.map +1 -1
  146. package/dist/cli/commands/sound.d.ts +3 -0
  147. package/dist/cli/commands/sound.d.ts.map +1 -0
  148. package/dist/cli/commands/sound.js +87 -0
  149. package/dist/cli/commands/sound.js.map +1 -0
  150. package/dist/cli/commands/test-metrics.js +3 -5
  151. package/dist/cli/commands/test-metrics.js.map +1 -1
  152. package/dist/cli/index.js +4 -0
  153. package/dist/cli/index.js.map +1 -1
  154. package/dist/env/types.d.ts +8 -0
  155. package/dist/env/types.d.ts.map +1 -1
  156. package/dist/env/types.js.map +1 -1
  157. package/dist/plugins/core/index.d.ts +13 -0
  158. package/dist/plugins/core/index.d.ts.map +1 -0
  159. package/dist/plugins/core/index.js +15 -0
  160. package/dist/plugins/core/index.js.map +1 -0
  161. package/dist/plugins/core/manifest-parser.d.ts +28 -0
  162. package/dist/plugins/core/manifest-parser.d.ts.map +1 -0
  163. package/dist/plugins/core/manifest-parser.js +137 -0
  164. package/dist/plugins/core/manifest-parser.js.map +1 -0
  165. package/dist/plugins/core/plugin-cache.d.ts +65 -0
  166. package/dist/plugins/core/plugin-cache.d.ts.map +1 -0
  167. package/dist/plugins/core/plugin-cache.js +170 -0
  168. package/dist/plugins/core/plugin-cache.js.map +1 -0
  169. package/dist/plugins/core/plugin-loader.d.ts +21 -0
  170. package/dist/plugins/core/plugin-loader.d.ts.map +1 -0
  171. package/dist/plugins/core/plugin-loader.js +55 -0
  172. package/dist/plugins/core/plugin-loader.js.map +1 -0
  173. package/dist/plugins/core/plugin-resolver.d.ts +33 -0
  174. package/dist/plugins/core/plugin-resolver.d.ts.map +1 -0
  175. package/dist/plugins/core/plugin-resolver.js +118 -0
  176. package/dist/plugins/core/plugin-resolver.js.map +1 -0
  177. package/dist/plugins/core/types.d.ts +183 -0
  178. package/dist/plugins/core/types.d.ts.map +1 -0
  179. package/dist/plugins/core/types.js +22 -0
  180. package/dist/plugins/core/types.js.map +1 -0
  181. package/dist/plugins/loaders/agents-loader.d.ts +19 -0
  182. package/dist/plugins/loaders/agents-loader.d.ts.map +1 -0
  183. package/dist/plugins/loaders/agents-loader.js +92 -0
  184. package/dist/plugins/loaders/agents-loader.js.map +1 -0
  185. package/dist/plugins/loaders/hooks-loader.d.ts +27 -0
  186. package/dist/plugins/loaders/hooks-loader.d.ts.map +1 -0
  187. package/dist/plugins/loaders/hooks-loader.js +94 -0
  188. package/dist/plugins/loaders/hooks-loader.js.map +1 -0
  189. package/dist/plugins/loaders/mcp-loader.d.ts +24 -0
  190. package/dist/plugins/loaders/mcp-loader.d.ts.map +1 -0
  191. package/dist/plugins/loaders/mcp-loader.js +86 -0
  192. package/dist/plugins/loaders/mcp-loader.js.map +1 -0
  193. package/dist/plugins/loaders/skills-loader.d.ts +30 -0
  194. package/dist/plugins/loaders/skills-loader.d.ts.map +1 -0
  195. package/dist/plugins/loaders/skills-loader.js +167 -0
  196. package/dist/plugins/loaders/skills-loader.js.map +1 -0
  197. package/dist/providers/plugins/bedrock/bedrock.template.js +1 -1
  198. package/dist/providers/plugins/jwt/jwt.setup-steps.js +1 -1
  199. package/dist/providers/plugins/jwt/jwt.template.js +1 -1
  200. package/dist/providers/plugins/litellm/litellm.template.js +1 -1
  201. package/dist/providers/plugins/sso/proxy/plugins/header-injection.plugin.js +10 -0
  202. package/dist/providers/plugins/sso/proxy/plugins/header-injection.plugin.js.map +1 -1
  203. package/dist/providers/plugins/sso/proxy/proxy-types.d.ts +3 -0
  204. package/dist/providers/plugins/sso/proxy/proxy-types.d.ts.map +1 -1
  205. package/dist/providers/plugins/sso/session/SessionSyncer.d.ts.map +1 -1
  206. package/dist/providers/plugins/sso/session/SessionSyncer.js +2 -3
  207. package/dist/providers/plugins/sso/session/SessionSyncer.js.map +1 -1
  208. package/dist/providers/plugins/sso/session/processors/conversations/apiClient.d.ts +21 -0
  209. package/dist/providers/plugins/sso/session/processors/conversations/apiClient.d.ts.map +1 -0
  210. package/dist/providers/plugins/sso/session/processors/conversations/apiClient.js +159 -0
  211. package/dist/providers/plugins/sso/session/processors/conversations/apiClient.js.map +1 -0
  212. package/dist/providers/plugins/sso/session/processors/conversations/constants.d.ts +24 -0
  213. package/dist/providers/plugins/sso/session/processors/conversations/constants.d.ts.map +1 -0
  214. package/dist/providers/plugins/sso/session/processors/conversations/constants.js +36 -0
  215. package/dist/providers/plugins/sso/session/processors/conversations/constants.js.map +1 -0
  216. package/dist/providers/plugins/sso/session/processors/conversations/syncProcessor.d.ts +19 -0
  217. package/dist/providers/plugins/sso/session/processors/conversations/syncProcessor.d.ts.map +1 -0
  218. package/dist/providers/plugins/sso/session/processors/conversations/{conversation-sync-processor.js → syncProcessor.js} +48 -33
  219. package/dist/providers/plugins/sso/session/processors/conversations/syncProcessor.js.map +1 -0
  220. package/dist/providers/plugins/sso/session/processors/conversations/{conversation-types.d.ts → types.d.ts} +14 -2
  221. package/dist/providers/plugins/sso/session/processors/conversations/types.d.ts.map +1 -0
  222. package/dist/providers/plugins/sso/session/processors/conversations/types.js +14 -0
  223. package/dist/providers/plugins/sso/session/processors/conversations/types.js.map +1 -0
  224. package/dist/providers/plugins/sso/session/processors/metrics/metrics-aggregator.d.ts.map +1 -1
  225. package/dist/providers/plugins/sso/session/processors/metrics/metrics-aggregator.js +16 -17
  226. package/dist/providers/plugins/sso/session/processors/metrics/metrics-aggregator.js.map +1 -1
  227. package/dist/providers/plugins/sso/session/processors/metrics/metrics-api-client.d.ts +6 -5
  228. package/dist/providers/plugins/sso/session/processors/metrics/metrics-api-client.d.ts.map +1 -1
  229. package/dist/providers/plugins/sso/session/processors/metrics/metrics-api-client.js +40 -39
  230. package/dist/providers/plugins/sso/session/processors/metrics/metrics-api-client.js.map +1 -1
  231. package/dist/providers/plugins/sso/session/processors/metrics/metrics-sync-processor.d.ts.map +1 -1
  232. package/dist/providers/plugins/sso/session/processors/metrics/metrics-sync-processor.js +2 -6
  233. package/dist/providers/plugins/sso/session/processors/metrics/metrics-sync-processor.js.map +1 -1
  234. package/dist/providers/plugins/sso/session/processors/metrics/metrics-types.d.ts +74 -31
  235. package/dist/providers/plugins/sso/session/processors/metrics/metrics-types.d.ts.map +1 -1
  236. package/dist/providers/plugins/sso/sso.template.js +1 -1
  237. package/dist/{agents/codemie-code/skills → skills}/core/SkillDiscovery.d.ts +10 -0
  238. package/dist/skills/core/SkillDiscovery.d.ts.map +1 -0
  239. package/dist/{agents/codemie-code/skills → skills}/core/SkillDiscovery.js +64 -7
  240. package/dist/skills/core/SkillDiscovery.js.map +1 -0
  241. package/dist/skills/core/SkillManager.d.ts.map +1 -0
  242. package/dist/{agents/codemie-code/skills → skills}/core/SkillManager.js +15 -10
  243. package/dist/skills/core/SkillManager.js.map +1 -0
  244. package/dist/{agents/codemie-code/skills → skills}/core/types.d.ts +3 -25
  245. package/dist/skills/core/types.d.ts.map +1 -0
  246. package/dist/skills/core/types.js.map +1 -0
  247. package/dist/{agents/codemie-code/skills → skills}/index.d.ts +3 -3
  248. package/dist/skills/index.d.ts.map +1 -0
  249. package/dist/{agents/codemie-code/skills → skills}/index.js +2 -2
  250. package/dist/skills/index.js.map +1 -0
  251. package/dist/skills/sync/SkillSync.d.ts.map +1 -0
  252. package/dist/{agents/codemie-code/skills → skills}/sync/SkillSync.js +5 -3
  253. package/dist/skills/sync/SkillSync.js.map +1 -0
  254. package/dist/{agents/codemie-code/skills → skills}/utils/content-loader.d.ts +2 -12
  255. package/dist/skills/utils/content-loader.d.ts.map +1 -0
  256. package/dist/{agents/codemie-code/skills → skills}/utils/content-loader.js +3 -8
  257. package/dist/skills/utils/content-loader.js.map +1 -0
  258. package/dist/skills/utils/pattern-matcher.d.ts.map +1 -0
  259. package/dist/skills/utils/pattern-matcher.js.map +1 -0
  260. package/dist/utils/extensions-scan.d.ts +27 -0
  261. package/dist/utils/extensions-scan.d.ts.map +1 -0
  262. package/dist/utils/extensions-scan.js +182 -0
  263. package/dist/utils/extensions-scan.js.map +1 -0
  264. package/dist/utils/frontmatter.d.ts.map +1 -0
  265. package/dist/utils/frontmatter.js.map +1 -0
  266. package/package.json +1 -1
  267. package/dist/agents/codemie-code/agent.d.ts +0 -129
  268. package/dist/agents/codemie-code/agent.d.ts.map +0 -1
  269. package/dist/agents/codemie-code/agent.js +0 -1106
  270. package/dist/agents/codemie-code/agent.js.map +0 -1
  271. package/dist/agents/codemie-code/config.d.ts +0 -40
  272. package/dist/agents/codemie-code/config.d.ts.map +0 -1
  273. package/dist/agents/codemie-code/config.js +0 -293
  274. package/dist/agents/codemie-code/config.js.map +0 -1
  275. package/dist/agents/codemie-code/filters.d.ts +0 -91
  276. package/dist/agents/codemie-code/filters.d.ts.map +0 -1
  277. package/dist/agents/codemie-code/filters.js +0 -328
  278. package/dist/agents/codemie-code/filters.js.map +0 -1
  279. package/dist/agents/codemie-code/index.d.ts +0 -93
  280. package/dist/agents/codemie-code/index.d.ts.map +0 -1
  281. package/dist/agents/codemie-code/index.js +0 -359
  282. package/dist/agents/codemie-code/index.js.map +0 -1
  283. package/dist/agents/codemie-code/modes/contextAwarePlanning.d.ts +0 -87
  284. package/dist/agents/codemie-code/modes/contextAwarePlanning.d.ts.map +0 -1
  285. package/dist/agents/codemie-code/modes/contextAwarePlanning.js +0 -957
  286. package/dist/agents/codemie-code/modes/contextAwarePlanning.js.map +0 -1
  287. package/dist/agents/codemie-code/modes/planMode.d.ts +0 -116
  288. package/dist/agents/codemie-code/modes/planMode.d.ts.map +0 -1
  289. package/dist/agents/codemie-code/modes/planMode.js +0 -537
  290. package/dist/agents/codemie-code/modes/planMode.js.map +0 -1
  291. package/dist/agents/codemie-code/prompts.d.ts +0 -47
  292. package/dist/agents/codemie-code/prompts.d.ts.map +0 -1
  293. package/dist/agents/codemie-code/prompts.js +0 -207
  294. package/dist/agents/codemie-code/prompts.js.map +0 -1
  295. package/dist/agents/codemie-code/skills/core/SkillDiscovery.d.ts.map +0 -1
  296. package/dist/agents/codemie-code/skills/core/SkillDiscovery.js.map +0 -1
  297. package/dist/agents/codemie-code/skills/core/SkillManager.d.ts.map +0 -1
  298. package/dist/agents/codemie-code/skills/core/SkillManager.js.map +0 -1
  299. package/dist/agents/codemie-code/skills/core/types.d.ts.map +0 -1
  300. package/dist/agents/codemie-code/skills/core/types.js.map +0 -1
  301. package/dist/agents/codemie-code/skills/index.d.ts.map +0 -1
  302. package/dist/agents/codemie-code/skills/index.js.map +0 -1
  303. package/dist/agents/codemie-code/skills/sync/SkillSync.d.ts.map +0 -1
  304. package/dist/agents/codemie-code/skills/sync/SkillSync.js.map +0 -1
  305. package/dist/agents/codemie-code/skills/utils/content-loader.d.ts.map +0 -1
  306. package/dist/agents/codemie-code/skills/utils/content-loader.js.map +0 -1
  307. package/dist/agents/codemie-code/skills/utils/frontmatter.d.ts.map +0 -1
  308. package/dist/agents/codemie-code/skills/utils/frontmatter.js.map +0 -1
  309. package/dist/agents/codemie-code/skills/utils/pattern-matcher.d.ts.map +0 -1
  310. package/dist/agents/codemie-code/skills/utils/pattern-matcher.js.map +0 -1
  311. package/dist/agents/codemie-code/storage/todoStorage.d.ts +0 -78
  312. package/dist/agents/codemie-code/storage/todoStorage.d.ts.map +0 -1
  313. package/dist/agents/codemie-code/storage/todoStorage.js +0 -225
  314. package/dist/agents/codemie-code/storage/todoStorage.js.map +0 -1
  315. package/dist/agents/codemie-code/tokenUtils.d.ts +0 -108
  316. package/dist/agents/codemie-code/tokenUtils.d.ts.map +0 -1
  317. package/dist/agents/codemie-code/tokenUtils.js +0 -220
  318. package/dist/agents/codemie-code/tokenUtils.js.map +0 -1
  319. package/dist/agents/codemie-code/toolMetadata.d.ts +0 -15
  320. package/dist/agents/codemie-code/toolMetadata.d.ts.map +0 -1
  321. package/dist/agents/codemie-code/toolMetadata.js +0 -316
  322. package/dist/agents/codemie-code/toolMetadata.js.map +0 -1
  323. package/dist/agents/codemie-code/tools/assistant-invocation.d.ts +0 -47
  324. package/dist/agents/codemie-code/tools/assistant-invocation.d.ts.map +0 -1
  325. package/dist/agents/codemie-code/tools/assistant-invocation.js +0 -129
  326. package/dist/agents/codemie-code/tools/assistant-invocation.js.map +0 -1
  327. package/dist/agents/codemie-code/tools/index.d.ts +0 -111
  328. package/dist/agents/codemie-code/tools/index.d.ts.map +0 -1
  329. package/dist/agents/codemie-code/tools/index.js +0 -424
  330. package/dist/agents/codemie-code/tools/index.js.map +0 -1
  331. package/dist/agents/codemie-code/tools/planning.d.ts +0 -54
  332. package/dist/agents/codemie-code/tools/planning.d.ts.map +0 -1
  333. package/dist/agents/codemie-code/tools/planning.js +0 -226
  334. package/dist/agents/codemie-code/tools/planning.js.map +0 -1
  335. package/dist/agents/codemie-code/types.d.ts +0 -459
  336. package/dist/agents/codemie-code/types.d.ts.map +0 -1
  337. package/dist/agents/codemie-code/types.js +0 -59
  338. package/dist/agents/codemie-code/types.js.map +0 -1
  339. package/dist/agents/codemie-code/ui/autocomplete.d.ts +0 -98
  340. package/dist/agents/codemie-code/ui/autocomplete.d.ts.map +0 -1
  341. package/dist/agents/codemie-code/ui/autocomplete.js +0 -145
  342. package/dist/agents/codemie-code/ui/autocomplete.js.map +0 -1
  343. package/dist/agents/codemie-code/ui/keyHandlers.d.ts +0 -112
  344. package/dist/agents/codemie-code/ui/keyHandlers.d.ts.map +0 -1
  345. package/dist/agents/codemie-code/ui/keyHandlers.js +0 -415
  346. package/dist/agents/codemie-code/ui/keyHandlers.js.map +0 -1
  347. package/dist/agents/codemie-code/ui/mentions.d.ts +0 -86
  348. package/dist/agents/codemie-code/ui/mentions.d.ts.map +0 -1
  349. package/dist/agents/codemie-code/ui/mentions.js +0 -122
  350. package/dist/agents/codemie-code/ui/mentions.js.map +0 -1
  351. package/dist/agents/codemie-code/ui/progressTracker.d.ts +0 -125
  352. package/dist/agents/codemie-code/ui/progressTracker.d.ts.map +0 -1
  353. package/dist/agents/codemie-code/ui/progressTracker.js +0 -343
  354. package/dist/agents/codemie-code/ui/progressTracker.js.map +0 -1
  355. package/dist/agents/codemie-code/ui/terminalCodes.d.ts +0 -38
  356. package/dist/agents/codemie-code/ui/terminalCodes.d.ts.map +0 -1
  357. package/dist/agents/codemie-code/ui/terminalCodes.js +0 -42
  358. package/dist/agents/codemie-code/ui/terminalCodes.js.map +0 -1
  359. package/dist/agents/codemie-code/ui/todoPanel.d.ts +0 -112
  360. package/dist/agents/codemie-code/ui/todoPanel.d.ts.map +0 -1
  361. package/dist/agents/codemie-code/ui/todoPanel.js +0 -321
  362. package/dist/agents/codemie-code/ui/todoPanel.js.map +0 -1
  363. package/dist/agents/codemie-code/ui.d.ts +0 -180
  364. package/dist/agents/codemie-code/ui.d.ts.map +0 -1
  365. package/dist/agents/codemie-code/ui.js +0 -1345
  366. package/dist/agents/codemie-code/ui.js.map +0 -1
  367. package/dist/agents/codemie-code/utils/progressionEnforcer.d.ts +0 -87
  368. package/dist/agents/codemie-code/utils/progressionEnforcer.d.ts.map +0 -1
  369. package/dist/agents/codemie-code/utils/progressionEnforcer.js +0 -293
  370. package/dist/agents/codemie-code/utils/progressionEnforcer.js.map +0 -1
  371. package/dist/agents/codemie-code/utils/todoParser.d.ts +0 -41
  372. package/dist/agents/codemie-code/utils/todoParser.d.ts.map +0 -1
  373. package/dist/agents/codemie-code/utils/todoParser.js +0 -305
  374. package/dist/agents/codemie-code/utils/todoParser.js.map +0 -1
  375. package/dist/agents/codemie-code/utils/todoValidator.d.ts +0 -65
  376. package/dist/agents/codemie-code/utils/todoValidator.d.ts.map +0 -1
  377. package/dist/agents/codemie-code/utils/todoValidator.js +0 -249
  378. package/dist/agents/codemie-code/utils/todoValidator.js.map +0 -1
  379. package/dist/agents/codemie-code/validators/planValidator.d.ts +0 -94
  380. package/dist/agents/codemie-code/validators/planValidator.d.ts.map +0 -1
  381. package/dist/agents/codemie-code/validators/planValidator.js +0 -281
  382. package/dist/agents/codemie-code/validators/planValidator.js.map +0 -1
  383. package/dist/agents/plugins/claude/plugin/hooks/hooks.windows.json +0 -98
  384. package/dist/agents/plugins/claude/plugin/sounds/play-random-sound.ps1 +0 -112
  385. package/dist/agents/plugins/claude/plugin/sounds/play-random-sound.sh +0 -58
  386. package/dist/agents/plugins/gemini/session/utils/token-aggregator.d.ts +0 -26
  387. package/dist/agents/plugins/gemini/session/utils/token-aggregator.d.ts.map +0 -1
  388. package/dist/agents/plugins/gemini/session/utils/token-aggregator.js +0 -38
  389. package/dist/agents/plugins/gemini/session/utils/token-aggregator.js.map +0 -1
  390. package/dist/cli/commands/assistants/chat.d.ts.map +0 -1
  391. package/dist/cli/commands/assistants/chat.js.map +0 -1
  392. package/dist/providers/plugins/sso/session/processors/conversations/conversation-api-client.d.ts +0 -26
  393. package/dist/providers/plugins/sso/session/processors/conversations/conversation-api-client.d.ts.map +0 -1
  394. package/dist/providers/plugins/sso/session/processors/conversations/conversation-api-client.js +0 -146
  395. package/dist/providers/plugins/sso/session/processors/conversations/conversation-api-client.js.map +0 -1
  396. package/dist/providers/plugins/sso/session/processors/conversations/conversation-sync-processor.d.ts +0 -22
  397. package/dist/providers/plugins/sso/session/processors/conversations/conversation-sync-processor.d.ts.map +0 -1
  398. package/dist/providers/plugins/sso/session/processors/conversations/conversation-sync-processor.js.map +0 -1
  399. package/dist/providers/plugins/sso/session/processors/conversations/conversation-types.d.ts.map +0 -1
  400. package/dist/providers/plugins/sso/session/processors/conversations/conversation-types.js +0 -7
  401. package/dist/providers/plugins/sso/session/processors/conversations/conversation-types.js.map +0 -1
  402. /package/dist/{agents/codemie-code/skills → skills}/core/SkillManager.d.ts +0 -0
  403. /package/dist/{agents/codemie-code/skills → skills}/core/types.js +0 -0
  404. /package/dist/{agents/codemie-code/skills → skills}/sync/SkillSync.d.ts +0 -0
  405. /package/dist/{agents/codemie-code/skills → skills}/utils/pattern-matcher.d.ts +0 -0
  406. /package/dist/{agents/codemie-code/skills → skills}/utils/pattern-matcher.js +0 -0
  407. /package/dist/{agents/codemie-code/skills/utils → utils}/frontmatter.d.ts +0 -0
  408. /package/dist/{agents/codemie-code/skills/utils → utils}/frontmatter.js +0 -0
@@ -0,0 +1,510 @@
1
+ # Best Practices Reference
2
+
3
+ Rationale, anti-patterns, and quick-fix guidance for each component type.
4
+
5
+ ---
6
+
7
+ ## Skill Types
8
+
9
+ ### Codemie-Delegating Skills: Reduced Rubric Applies
10
+
11
+ **What they are**: Thin wrapper skills that route a user request to a Codemie AI assistant via API (`codemie assistants chat <uuid>`). They do not execute local tool calls, have no step-by-step workflow, and do not control output format — the backend assistant handles all of that.
12
+
13
+ **Detection**:
14
+ ```bash
15
+ grep -i "codemie.*assistant\|codemie.*chat\|assistants chat" SKILL.md
16
+ ```
17
+
18
+ **What to skip** (do NOT penalise for these — they are architecturally N/A):
19
+ - `allowed-tools` — no local tool execution happens
20
+ - Methodology / workflow section — delegation is the entire process
21
+ - Output format section — determined by the assistant
22
+ - Examples section — invocation differs from standard skills
23
+ - Checklists — no process steps to enumerate
24
+
25
+ **What still matters** (always assessed):
26
+ - Identity: name convention, description quality (users still need to find and trigger it)
27
+ - Technical hygiene: especially **no hardcoded UUIDs** (see below)
28
+ - Design: single responsibility, clear triggers, token budget
29
+
30
+ ---
31
+
32
+ ## Skills
33
+
34
+ ### ✅ Description: Third-person with specific trigger phrases
35
+
36
+ **Why it matters**: The `description` field is the only signal Claude uses to decide whether to load a skill. Vague descriptions cause the skill to never load (misses) or load on unrelated tasks (false positives). Specific trigger phrases make the skill predictable.
37
+
38
+ ```yaml
39
+ # ✅ Good — third person, specific phrases
40
+ description: This skill should be used when the user asks to "commit changes",
41
+ "create a conventional commit", "stage and commit", or wants to write a commit
42
+ message following the conventional commits standard.
43
+
44
+ # ❌ Bad — vague, wrong person, no triggers
45
+ description: Use this skill for git operations and commits.
46
+ ```
47
+
48
+ ### ✅ `allowed-tools`: Always specify explicitly
49
+
50
+ **Why it matters**: Without `allowed-tools`, Claude defaults to its full toolset. Explicit restrictions enforce least-privilege and prevent a documentation skill from accidentally running shell commands.
51
+
52
+ ```yaml
53
+ # ✅ Good
54
+ allowed-tools: [Read, Grep, Glob]
55
+
56
+ # ❌ Bad — missing entirely (defaults to unconstrained)
57
+ # (no allowed-tools field in frontmatter)
58
+ ```
59
+
60
+ ### ✅ Keep SKILL.md lean — move details to `references/`
61
+
62
+ **Why it matters**: SKILL.md loads into context every time the skill triggers. A 6,000-token SKILL.md consumes substantial context even when 80% of the content isn't relevant to the current task. Lean SKILL.md + on-demand references = efficient context use.
63
+
64
+ **Target**: SKILL.md body 1,500–2,000 words. Move detailed docs to `references/`.
65
+
66
+ ### ✅ Single focused purpose
67
+
68
+ **Why it matters**: Multi-purpose skills have ambiguous trigger conditions ("does this trigger for commits OR for PRs?") and are harder to maintain (fixing a commit bug might break the PR flow).
69
+
70
+ ```
71
+ # ✅ Good
72
+ name: commit-helper # one responsibility: commits
73
+ name: pr-creator # one responsibility: pull requests
74
+
75
+ # ❌ Bad — three concerns in one
76
+ name: git-workflow-helper # commits + PRs + branch management
77
+ ```
78
+
79
+ ### ✅ Include actionable checklists (`- [ ]`)
80
+
81
+ **Why it matters**: Checklists make the skill's criteria explicit and verifiable. They give the executing Claude instance something to tick off, reducing missed steps.
82
+
83
+ ---
84
+
85
+ ## Agents
86
+
87
+ ### ✅ Always specify `model:`
88
+
89
+ **Why it matters**: Without a model, Claude selects the default. The default may be over-powered (costly for simple classification) or under-powered (Haiku for complex reasoning). Explicit model choice is an intentional architectural decision.
90
+
91
+ ```yaml
92
+ # ✅ Good — match model to task complexity
93
+ model: claude-haiku-4-5-20251001 # fast lookups, classification
94
+ model: claude-sonnet-4-6 # balanced reasoning, most tasks
95
+ model: claude-opus-4-6 # complex analysis, architecture
96
+ model: inherit # intentionally use calling context's model
97
+
98
+ # ❌ Bad — no model
99
+ # (no model: field)
100
+ ```
101
+
102
+ **`model: inherit` is valid**: It means the agent deliberately adopts the model of whoever invokes it. This is a legitimate architectural choice (e.g., when agents are invoked from other agents and should match capability). Do **not** penalise `model: inherit` — penalise only a missing `model:` field entirely.
103
+
104
+ ### ✅ Justify powerful tools inline
105
+
106
+ **Why it matters**: Bash is the most powerful and risky tool, but Write, Edit, WebFetch, and WebSearch also have significant side effects. An agent with an 8-tool list gives no signal about why each tool is needed. Justification creates an audit trail and forces minimum-privilege thinking.
107
+
108
+ **Rule**: Any tool from `[Bash, Write, Edit, WebFetch, WebSearch]` in a tool list of 4+ tools should be accompanied by an inline comment within 3 lines of the `tools:` declaration.
109
+
110
+ ```yaml
111
+ # ✅ Good — comment immediately after tools line
112
+ tools: [Read, Grep, Bash]
113
+ # Bash required for: git diff, git log to inspect changed files
114
+
115
+ # ✅ Also good — comment on same line (if format allows)
116
+ tools: [Glob, Grep, Read, WebFetch, TodoWrite, WebSearch, Edit, Write, Bash]
117
+ # Bash: run tests/scripts; Edit/Write: create spec files; WebFetch/WebSearch: look up API docs
118
+
119
+ # ❌ Bad — no justification for Bash (or any powerful tool)
120
+ tools: [Read, Grep, Glob, Bash, Write, WebFetch]
121
+ # (nothing explaining why Bash, Write, or WebFetch are needed)
122
+ ```
123
+
124
+ **Partial credit**: A comment that says "for running commands" or "for file operations" is better than nothing but too vague — partial credit applies.
125
+
126
+ ### ✅ Description: Third-person with trigger phrases and negative cases
127
+
128
+ **Why it matters**: The description determines when the agent auto-loads. Three failure modes exist:
129
+ 1. **Second-person user-directed** ("Use this agent when **you** need to…") — places the user as subject; awkward in agent routing context
130
+ 2. **Object-directed but no negatives** ("Use this agent when the user requests…") — acceptable but incomplete
131
+ 3. **Third-person with positives AND negatives** — ideal; routes correctly and prevents over-invocation
132
+
133
+ ```yaml
134
+ # ✅ Best — third person, positive triggers, negative cases
135
+ description: |-
136
+ This agent should be invoked when code needs to be reviewed for quality or security.
137
+ Invoke after completing a feature, bug fix, or refactor.
138
+ Do NOT invoke for: architecture decisions, test writing, or deployment tasks.
139
+
140
+ # ⚠️ Acceptable — object-directed, missing negative cases
141
+ description: |-
142
+ Use this agent when the user requests a code review.
143
+ Focuses on Git-tracked changes only.
144
+
145
+ # ❌ Bad — user-directed second person, vague
146
+ description: Use this agent when you need to review code.
147
+ ```
148
+
149
+ **Scoring**: Full pass → third-person with negatives; partial → "Use this agent when the user…" with triggers; lower partial → "Use this agent when you…" with triggers.
150
+
151
+ ### ✅ Include anti-hallucination guardrails
152
+
153
+ **Why it matters**: Without explicit instructions, agents confidently state incorrect information (wrong version numbers, invented API signatures, fabricated statistics). Guardrails reduce this significantly.
154
+
155
+ ```markdown
156
+ # ✅ Good — explicit guardrails
157
+ ## Source Verification
158
+ - Cite documentation or tool output when stating facts
159
+ - State "I don't have verified info on..." when uncertain
160
+ - Never invent: statistics, version numbers, API signatures, error messages
161
+
162
+ # ❌ Bad — no accuracy guidance at all
163
+ ```
164
+
165
+ ### ✅ Define scope with negative cases ("When NOT to use")
166
+
167
+ **Why it matters**: Without negative cases, agents are invoked for everything related to their domain. A "code-reviewer" agent without negative cases might be invoked to review architecture decisions — which is a separate concern.
168
+
169
+ ```markdown
170
+ # ✅ Good
171
+ ## Scope
172
+ **DO NOT use this agent for**: architecture decisions, test writing, deployment.
173
+ Use `solution-architect` agent for architecture. Use `test-writer` for tests.
174
+ ```
175
+
176
+ ### ✅ "You are…" role statement
177
+
178
+ **Why it matters**: Role statements calibrate the agent's persona, expertise level, and decision-making style. Without one, behavior is generic and inconsistent across tasks.
179
+
180
+ ```markdown
181
+ # ✅ Good
182
+ You are a senior security engineer with expertise in OWASP Top 10 and secure
183
+ code review. Your job is to identify real vulnerabilities, not style issues.
184
+
185
+ # ❌ Bad — no role
186
+ # (starts directly with instructions, no persona)
187
+ ```
188
+
189
+ ---
190
+
191
+ ## CLAUDE.md
192
+
193
+ ### ✅ Keep CLAUDE.md short — ≤400 non-code words
194
+
195
+ **Why it matters**: Claude reads CLAUDE.md at the start of every session. Bloated files cause rules to get lost — Claude may miss instructions buried in long prose. The official guidance: *"For each line, ask: 'Would removing this cause Claude to make mistakes?' If not, cut it."*
196
+
197
+ **Target**: ≤400 words of non-code text. Use code blocks freely (they're scanned, not parsed as prose).
198
+
199
+ ```markdown
200
+ # ✅ Good — lean, verb-first, essential only
201
+ ## Code Style
202
+ - ES modules only (import/export), never require()
203
+ - .js extension on all imports
204
+ - Throw specific error classes from src/utils/errors.ts
205
+
206
+ ## Workflow
207
+ - Run `npm run lint` after any TypeScript change
208
+ - NEVER commit to main directly — use feature branches
209
+
210
+ # ❌ Bad — bloated with obvious or redundant content
211
+ ## Code Style
212
+ TypeScript is a strongly typed superset of JavaScript that helps catch errors.
213
+ You should write clean code that follows best practices. Variable names should
214
+ be meaningful and descriptive. Use camelCase for variables and PascalCase for
215
+ classes, which is the standard TypeScript convention...
216
+ ```
217
+
218
+ **Pruning test**: If Claude already follows a rule without being told, delete it. If the rule is about standard language conventions (camelCase, etc.), delete it. If it's project-specific and non-obvious, keep it.
219
+
220
+ ### ✅ Use `@import` to delegate detail
221
+
222
+ **Why it matters**: `@path/to/file` tells Claude to load that file into context when relevant. This keeps CLAUDE.md lean while making detailed guides available on demand — same progressive disclosure principle as skills.
223
+
224
+ ```markdown
225
+ # ✅ Good — delegates without embedding
226
+ See @README.md for project overview.
227
+
228
+ # Git workflow
229
+ @docs/git-instructions.md
230
+
231
+ # Architecture decisions
232
+ @.codemie/guides/architecture/architecture.md
233
+
234
+ # ❌ Bad — all detail copy-pasted into CLAUDE.md
235
+ ## Architecture (500 words of inline architecture prose...)
236
+ ```
237
+
238
+ **When to use `@import`**: Any time CLAUDE.md references a file ("see the architecture guide"), replace the pointer with an actual `@path` reference.
239
+
240
+ ### ✅ Choose one knowledge organisation pattern — and use it consistently
241
+
242
+ **Why it matters**: There are two valid ways to organise deep project knowledge for Claude. Both work well. Using both at once creates confusion about where knowledge lives.
243
+
244
+ ---
245
+
246
+ **Pattern A: Single CLAUDE.md + Guide Files**
247
+
248
+ One lean root CLAUDE.md acts as an index with path references; all detail lives in separate guide files that Claude reads on demand.
249
+
250
+ ```
251
+ # ✅ Good — Pattern A
252
+ ./CLAUDE.md ← lean index, references guides by path
253
+ ./.codemie/guides/architecture.md ← architecture detail
254
+ ./.codemie/guides/testing.md ← testing patterns
255
+ ./docs/git-instructions.md ← git workflow
256
+ ```
257
+
258
+ CLAUDE.md should reference these guides by actual path so Claude loads them when needed:
259
+ ```markdown
260
+ # Architecture
261
+ See .codemie/guides/architecture/architecture.md for layer patterns.
262
+
263
+ # Testing
264
+ See .codemie/guides/testing/testing-patterns.md for Vitest patterns.
265
+ ```
266
+
267
+ **Best for**: Projects with rich domain knowledge (many guides), or teams wanting a single source of truth with CLAUDE.md as a navigator.
268
+
269
+ ---
270
+
271
+ **Pattern B: Hierarchical CLAUDE.md**
272
+
273
+ Multiple CLAUDE.md files at different directory depths, each scoped to its level. Claude automatically loads parent-directory CLAUDE.md files when working in subdirectories.
274
+
275
+ ```
276
+ # ✅ Good — Pattern B
277
+ ./CLAUDE.md ← project-wide: Node 20+, git workflow, ESLint
278
+ ./packages/api/CLAUDE.md ← api-only: Express patterns, OpenAPI conventions
279
+ ./packages/frontend/CLAUDE.md ← frontend-only: React, CSS modules, Vite
280
+
281
+ # ❌ Bad — Pattern B with duplication
282
+ ./CLAUDE.md ← has Node.js conventions
283
+ ./packages/api/CLAUDE.md ← repeats the same Node.js conventions
284
+ ```
285
+
286
+ **Best for**: Monorepos where different packages have genuinely different tech stacks or conventions.
287
+
288
+ ---
289
+
290
+ **Detection commands** (run both to identify which pattern is in use):
291
+ ```bash
292
+ # Find all CLAUDE.md files
293
+ find . -name "CLAUDE.md" -o -name "CLAUDE.local.md" | grep -v node_modules | sort
294
+
295
+ # Find guide directories (Pattern A signal)
296
+ find . -type d \( -name 'guides' -o -name '.codemie' \) | grep -v node_modules
297
+
298
+ # Check git tracking
299
+ git ls-files CLAUDE.md
300
+
301
+ # Check CLAUDE.local.md is gitignored
302
+ grep CLAUDE.local.md .gitignore
303
+ ```
304
+
305
+ ### ✅ Use MANDATORY / NEVER / ALWAYS with trigger conditions
306
+
307
+ **Why it matters**: Vague guidance ("try to follow…", "consider using…") is deprioritized when Claude is making decisions. Explicit directives with trigger conditions are followed consistently.
308
+
309
+ ```markdown
310
+ # ✅ Good — directive + trigger + rationale
311
+ 🚨 MANDATORY: When user says "commit", NEVER use `git commit --no-verify`.
312
+ If a hook fails, fix the underlying issue first.
313
+
314
+ # ❌ Bad — vague
315
+ Try to avoid skipping git hooks when possible.
316
+ ```
317
+
318
+ ### ✅ Include a keyword/trigger table
319
+
320
+ **Why it matters**: CLAUDE.md is read on every task. A task classifier table lets Claude quickly identify which rules apply to the current task, rather than re-reading everything every time.
321
+
322
+ ```markdown
323
+ # ✅ Good
324
+ | Keyword | Load Guide / Rule |
325
+ |---------|------------------|
326
+ | "commit", "push" | Follow Git Policy |
327
+ | "test", "spec" | Follow Testing Policy (write tests ONLY if asked) |
328
+ | TypeScript | Use strict mode, .js imports |
329
+ ```
330
+
331
+ ### ✅ Show ✅/❌ examples for critical rules
332
+
333
+ **Why it matters**: Abstract rules ("use meaningful variable names") are interpreted differently. Concrete examples remove ambiguity.
334
+
335
+ ```markdown
336
+ # ✅ Good
337
+ ## Import Style
338
+ ✅ `import { foo } from './utils.js'`
339
+ ❌ `import { foo } from './utils'` ← missing .js extension
340
+ ❌ `const { foo } = require('./utils')` ← no CommonJS
341
+ ```
342
+
343
+ ### ✅ Never contradict yourself
344
+
345
+ **Anti-pattern to avoid**: Having `Always use npm` in one section and `Use pnpm for dependencies` in another. Claude will pick one inconsistently, and behavior becomes unpredictable.
346
+
347
+ **Prevention**: Search CLAUDE.md for tool names and compare all mentions before writing a new rule.
348
+
349
+ ---
350
+
351
+ ## Commands
352
+
353
+ ### ✅ `argument-hint` is mandatory when using `$ARGUMENTS`
354
+
355
+ **Why it matters**: Without `argument-hint`, the slash-complete UI shows no hint. Users don't know what to type and the command appears broken.
356
+
357
+ ```yaml
358
+ # ✅ Good
359
+ argument-hint: "<ticket-id> [--dry-run] [--priority high|medium|low]"
360
+
361
+ # ❌ Bad — uses $ARGUMENTS but no hint
362
+ # (no argument-hint field, $ARGUMENTS appears in body)
363
+ ```
364
+
365
+ ### ✅ Phase-based workflow for auditability
366
+
367
+ **Why it matters**: Numbered phases make command execution auditable ("it failed in Phase 3"). Users understand progress and can debug failures.
368
+
369
+ ```markdown
370
+ # ✅ Good
371
+ ## Phase 1: Validate Input
372
+ ## Phase 2: Generate Content
373
+ ## Phase 3: Confirm and Execute
374
+
375
+ # ❌ Bad — flat instructions
376
+ Run git status. Then commit. Then push.
377
+ ```
378
+
379
+ ### ✅ Always handle the failure path
380
+
381
+ **Why it matters**: Commands that don't handle failures leave users stranded with no error context and no path forward.
382
+
383
+ ```markdown
384
+ # ✅ Good
385
+ ## Error Handling
386
+ | Error | Action |
387
+ |-------|--------|
388
+ | API unreachable | Save draft to ./draft.md, print error |
389
+ | Invalid input | Show usage hint, exit cleanly |
390
+
391
+ # ❌ Bad — no failure cases mentioned at all
392
+ ```
393
+
394
+ ---
395
+
396
+ ## Hooks
397
+
398
+ ### ✅ Scope matchers to specific tools
399
+
400
+ **Why it matters**: A wildcard matcher (`.*`) runs on every tool use, adding latency to every action Claude takes. Overly broad hooks also create unexpected side effects.
401
+
402
+ ```json
403
+ // ✅ Good — targets specific tool
404
+ {"matcher": "Bash", "hooks": [...]}
405
+ {"matcher": "Write|Edit", "hooks": [...]}
406
+
407
+ // ❌ Bad — matches everything
408
+ {"matcher": ".*", "hooks": [...]}
409
+ {"matcher": "", "hooks": [...]}
410
+ ```
411
+
412
+ ### ✅ Scripts must handle failures explicitly
413
+
414
+ **Why it matters**: A hook script that crashes without a clean exit blocks the tool use it's attached to. Users see cryptic failures with no context.
415
+
416
+ ```bash
417
+ #!/usr/bin/env bash
418
+ # ✅ Good
419
+ set -e
420
+ trap 'echo "Hook failed on line $LINENO" >&2' ERR
421
+
422
+ # ❌ Bad — no error handling
423
+ curl https://api.example.com/log -d "$CLAUDE_TOOL_INPUT"
424
+ ```
425
+
426
+ ### ✅ Never hardcode credentials in hook commands
427
+
428
+ **Why it matters**: `settings.json` is often committed to version control. Hardcoded tokens in hooks become exposed credentials in git history.
429
+
430
+ ```json
431
+ // ✅ Good — env var reference
432
+ "command": "bash -c 'curl $API_URL -H \"Authorization: Bearer $MY_TOKEN\"'"
433
+
434
+ // ❌ Bad — literal token in config
435
+ "command": "bash -c 'curl https://api.example.com -H \"Authorization: Bearer sk-abc123\"'"
436
+ ```
437
+
438
+ ---
439
+
440
+ ## MCP Config
441
+
442
+ ### ✅ Use env var references for all credentials
443
+
444
+ **Why it matters**: `.mcp.json` is often committed to repositories and shared across teams. Literal credentials become a security incident.
445
+
446
+ ```json
447
+ // ✅ Good
448
+ "env": {
449
+ "API_KEY": "${MY_SERVICE_API_KEY}",
450
+ "DATABASE_URL": "${DATABASE_URL}"
451
+ }
452
+
453
+ // ❌ Bad
454
+ "env": {
455
+ "API_KEY": "sk-prod-abc123",
456
+ "DATABASE_URL": "postgres://user:pass@prod-host/db"
457
+ }
458
+ ```
459
+
460
+ ### ✅ Document required env vars
461
+
462
+ **Why it matters**: New team members cloning the repo can't use your MCP servers if they don't know which env vars to configure. This creates a "works on my machine" problem.
463
+
464
+ **Do this**: Add a `.env.example` file or a `## MCP Configuration` section to `CLAUDE.md` listing:
465
+ - Server name
466
+ - Required env var name
467
+ - Where to get the value
468
+ - Example value format (not real value)
469
+
470
+ ### ✅ Use descriptive server names
471
+
472
+ **Why it matters**: `server1`, `mcp`, `test` give no information about what the server does. Descriptive names help Claude and team members understand the ecosystem at a glance.
473
+
474
+ ```json
475
+ // ✅ Good
476
+ "mcpServers": {
477
+ "jira": {...},
478
+ "github": {...},
479
+ "postgres-analytics": {...}
480
+ }
481
+
482
+ // ❌ Bad
483
+ "mcpServers": {
484
+ "server1": {...},
485
+ "mcp": {...},
486
+ "test": {...}
487
+ }
488
+ ```
489
+
490
+ ---
491
+
492
+ ## Common Anti-Patterns Quick Reference
493
+
494
+ | Anti-Pattern | Component | Impact | Fix |
495
+ |--------------|-----------|--------|-----|
496
+ | Second-person in skill description ("Use this skill when you…") | Skill | Poor triggering | Rewrite as third-person: "This skill should be used when…" |
497
+ | User-directed agent description ("Use this agent when you need to…") | Agent | Awkward routing | Use "Use this agent when the user requests…" or full third-person |
498
+ | No negative cases in agent description | Agent | Over-invocation | Add "Do NOT invoke for: X, Y, Z" |
499
+ | Missing `model:` field | Agent | Unpredictable cost/quality | Add explicit model; `model: inherit` is valid if intentional |
500
+ | Powerful tools (Bash/Write/Edit) with no inline comment | Agent | Security risk, no audit trail | Add `# <Tool> required for: [reason]` within 3 lines of `tools:` |
501
+ | Wall of text CLAUDE.md | CLAUDE.md | Rules ignored | Add H2 sections + tables |
502
+ | No `argument-hint` | Command | Poor UX | Add `argument-hint: "<description>"` |
503
+ | `.*` matcher in hook | Hook | Latency + side effects | Scope to specific tool name |
504
+ | Hardcoded token in `.mcp.json` | MCP | Security incident | Use `${ENV_VAR_NAME}` pattern |
505
+ | Multi-purpose skill ("does X AND Y AND Z") | Skill | Ambiguous triggers | Split into separate skills |
506
+ | Vague guidance ("be careful") | CLAUDE.md | Rules ignored | Replace with explicit directives |
507
+ | No usage examples in agent | Agent | Unpredictable invocation | Add `## Examples` with 3+ invocation cases |
508
+ | "You are…" role statement missing or buried | Agent | Weak persona calibration | Add "You are a [role]…" as first line of body |
509
+ | No anti-hallucination section | Agent | Accuracy issues | Add "Source Verification" section OR "FIRST STEP: Read [guide]" |
510
+ | Agent references no guides or other components | Agent | Poor grounding | Reference project guides or related skills/agents |