opencode-agent-kit 1.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 (361) hide show
  1. package/README.md +796 -0
  2. package/bin/commands/init.mjs +221 -0
  3. package/bin/init.mjs +21 -0
  4. package/package.json +22 -0
  5. package/template/.opencode/agent-docs/backend/README.md +0 -0
  6. package/template/.opencode/agent-docs/backend/node/BACKEND_PATTERNS.md +82 -0
  7. package/template/.opencode/agent-docs/backend/node/BACKEND_QUICK_START.md +49 -0
  8. package/template/.opencode/agent-docs/frontend/next/README.md +0 -0
  9. package/template/.opencode/agent-docs/frontend/nuxt/API_PATTERNS.md +807 -0
  10. package/template/.opencode/agent-docs/frontend/nuxt/CHEATSHEET.md +676 -0
  11. package/template/.opencode/agent-docs/frontend/nuxt/COMPLETION_REPORT.md +613 -0
  12. package/template/.opencode/agent-docs/frontend/nuxt/EXAMPLES.md +956 -0
  13. package/template/.opencode/agent-docs/frontend/nuxt/INDEX.md +596 -0
  14. package/template/.opencode/agent-docs/frontend/nuxt/MCP_GUIDE.md +881 -0
  15. package/template/.opencode/agent-docs/frontend/nuxt/MENTOR_CURRICULUM_30_DAYS.md +256 -0
  16. package/template/.opencode/agent-docs/frontend/nuxt/MENTOR_CURRICULUM_CHECKLIST.md +156 -0
  17. package/template/.opencode/agent-docs/frontend/nuxt/MENTOR_WEEKLY_ASSIGNMENTS.md +191 -0
  18. package/template/.opencode/agent-docs/frontend/nuxt/QUICK_START.md +509 -0
  19. package/template/.opencode/agent-docs/frontend/nuxt/README.md +506 -0
  20. package/template/.opencode/agent-docs/frontend/nuxt/README_AGENTS.md +140 -0
  21. package/template/.opencode/agent-docs/frontend/nuxt/README_DOCS.md +65 -0
  22. package/template/.opencode/agent-docs/frontend/nuxt/SUMMARY.md +474 -0
  23. package/template/.opencode/agent-docs/frontend/nuxt/TEAM_OPERATING_GUIDE.md +54 -0
  24. package/template/.opencode/agent-docs/frontend/nuxt/TESTING_GUIDE.md +904 -0
  25. package/template/.opencode/agent-docs/frontend/nuxt/WORKFLOWS.md +758 -0
  26. package/template/.opencode/agent-docs/frontend/react/API_PATTERNS.md +187 -0
  27. package/template/.opencode/agent-docs/frontend/react/CHEATSHEET.md +87 -0
  28. package/template/.opencode/agent-docs/frontend/react/INDEX.md +45 -0
  29. package/template/.opencode/agent-docs/frontend/react/QUICK_START.md +43 -0
  30. package/template/.opencode/agent-docs/frontend/react/README.md +159 -0
  31. package/template/.opencode/agent-docs/frontend/vue/README.md +0 -0
  32. package/template/.opencode/agent-docs/mobile/android/README.md +45 -0
  33. package/template/.opencode/agent-docs/mobile/flutter/README.md +44 -0
  34. package/template/.opencode/agents/android-developer.md +418 -0
  35. package/template/.opencode/agents/code-igniter-3-fullstack.md +345 -0
  36. package/template/.opencode/agents/code-reviewer.md +517 -0
  37. package/template/.opencode/agents/database-specialist.md +455 -0
  38. package/template/.opencode/agents/devops-specialist.md +562 -0
  39. package/template/.opencode/agents/flutter-developer.md +556 -0
  40. package/template/.opencode/agents/it-leader.md +911 -0
  41. package/template/.opencode/agents/laravel-advanced.md +691 -0
  42. package/template/.opencode/agents/node-backend-developer.md +343 -0
  43. package/template/.opencode/agents/nuxt-frontend-developer-mentor.md +402 -0
  44. package/template/.opencode/agents/nuxt-frontend-developer.md +1573 -0
  45. package/template/.opencode/agents/react-frontend-developer.md +1017 -0
  46. package/template/.opencode/agents/seo-specialist.md +681 -0
  47. package/template/.opencode/agents/ui-ux-designer.md +783 -0
  48. package/template/.opencode/commands/android-build/command.md +25 -0
  49. package/template/.opencode/commands/android-test/command.md +23 -0
  50. package/template/.opencode/commands/build-fix.md +29 -0
  51. package/template/.opencode/commands/checkpoint.md +74 -0
  52. package/template/.opencode/commands/code-review.md +40 -0
  53. package/template/.opencode/commands/e2e.md +363 -0
  54. package/template/.opencode/commands/eval.md +120 -0
  55. package/template/.opencode/commands/evolve.md +193 -0
  56. package/template/.opencode/commands/flutter-build/command.md +25 -0
  57. package/template/.opencode/commands/flutter-test/command.md +24 -0
  58. package/template/.opencode/commands/go-build.md +183 -0
  59. package/template/.opencode/commands/go-review.md +148 -0
  60. package/template/.opencode/commands/go-test.md +268 -0
  61. package/template/.opencode/commands/gpc-release/command.md +30 -0
  62. package/template/.opencode/commands/instinct-export.md +91 -0
  63. package/template/.opencode/commands/instinct-import.md +142 -0
  64. package/template/.opencode/commands/instinct-status.md +86 -0
  65. package/template/.opencode/commands/learn.md +70 -0
  66. package/template/.opencode/commands/multi-backend.md +158 -0
  67. package/template/.opencode/commands/multi-execute.md +310 -0
  68. package/template/.opencode/commands/multi-frontend.md +158 -0
  69. package/template/.opencode/commands/multi-plan.md +261 -0
  70. package/template/.opencode/commands/multi-workflow.md +183 -0
  71. package/template/.opencode/commands/orchestrate.md +172 -0
  72. package/template/.opencode/commands/plan.md +113 -0
  73. package/template/.opencode/commands/pm2.md +271 -0
  74. package/template/.opencode/commands/python-review.md +297 -0
  75. package/template/.opencode/commands/refactor-clean.md +28 -0
  76. package/template/.opencode/commands/sessions.md +305 -0
  77. package/template/.opencode/commands/setup-pm.md +80 -0
  78. package/template/.opencode/commands/skill-create.md +174 -0
  79. package/template/.opencode/commands/tdd.md +326 -0
  80. package/template/.opencode/commands/test-coverage.md +27 -0
  81. package/template/.opencode/commands/update-codemaps.md +17 -0
  82. package/template/.opencode/commands/update-docs.md +31 -0
  83. package/template/.opencode/commands/verify.md +59 -0
  84. package/template/.opencode/config.example.json +309 -0
  85. package/template/.opencode/config.json +341 -0
  86. package/template/.opencode/contexts/dev.md +20 -0
  87. package/template/.opencode/contexts/research.md +26 -0
  88. package/template/.opencode/contexts/review.md +22 -0
  89. package/template/.opencode/hooks/hooks.json +169 -0
  90. package/template/.opencode/instructions/INSTRUCTIONS.md +388 -0
  91. package/template/.opencode/package.json +5 -0
  92. package/template/.opencode/rules/README.md +82 -0
  93. package/template/.opencode/rules/android/gradle.md +62 -0
  94. package/template/.opencode/rules/android/testing.md +27 -0
  95. package/template/.opencode/rules/common/agents.md +49 -0
  96. package/template/.opencode/rules/common/coding-style.md +48 -0
  97. package/template/.opencode/rules/common/git-workflow.md +45 -0
  98. package/template/.opencode/rules/common/hooks.md +30 -0
  99. package/template/.opencode/rules/common/patterns.md +31 -0
  100. package/template/.opencode/rules/common/performance.md +55 -0
  101. package/template/.opencode/rules/common/security.md +29 -0
  102. package/template/.opencode/rules/common/testing.md +29 -0
  103. package/template/.opencode/rules/flutter/state-management.md +57 -0
  104. package/template/.opencode/rules/flutter/testing.md +42 -0
  105. package/template/.opencode/rules/golang/coding-style.md +26 -0
  106. package/template/.opencode/rules/golang/hooks.md +11 -0
  107. package/template/.opencode/rules/golang/patterns.md +39 -0
  108. package/template/.opencode/rules/golang/security.md +28 -0
  109. package/template/.opencode/rules/golang/testing.md +25 -0
  110. package/template/.opencode/rules/mobile/performance.md +36 -0
  111. package/template/.opencode/rules/python/coding-style.md +37 -0
  112. package/template/.opencode/rules/python/hooks.md +14 -0
  113. package/template/.opencode/rules/python/patterns.md +34 -0
  114. package/template/.opencode/rules/python/security.md +25 -0
  115. package/template/.opencode/rules/python/testing.md +33 -0
  116. package/template/.opencode/rules/typescript/coding-style.md +58 -0
  117. package/template/.opencode/rules/typescript/hooks.md +15 -0
  118. package/template/.opencode/rules/typescript/patterns.md +45 -0
  119. package/template/.opencode/rules/typescript/security.md +21 -0
  120. package/template/.opencode/rules/typescript/testing.md +11 -0
  121. package/template/.opencode/skills/api-documentation/SKILL.md +188 -0
  122. package/template/.opencode/skills/backend-patterns/SKILL.md +587 -0
  123. package/template/.opencode/skills/building-components/SKILL.md +37 -0
  124. package/template/.opencode/skills/building-components/references/accessibility.mdx +819 -0
  125. package/template/.opencode/skills/building-components/references/as-child.mdx +324 -0
  126. package/template/.opencode/skills/building-components/references/composition.mdx +239 -0
  127. package/template/.opencode/skills/building-components/references/data-attributes.mdx +413 -0
  128. package/template/.opencode/skills/building-components/references/definitions.mdx +258 -0
  129. package/template/.opencode/skills/building-components/references/design-tokens.mdx +57 -0
  130. package/template/.opencode/skills/building-components/references/docs.mdx +155 -0
  131. package/template/.opencode/skills/building-components/references/marketplaces.mdx +144 -0
  132. package/template/.opencode/skills/building-components/references/npm.mdx +166 -0
  133. package/template/.opencode/skills/building-components/references/polymorphism.mdx +583 -0
  134. package/template/.opencode/skills/building-components/references/principles.mdx +61 -0
  135. package/template/.opencode/skills/building-components/references/registry.mdx +169 -0
  136. package/template/.opencode/skills/building-components/references/state.mdx +99 -0
  137. package/template/.opencode/skills/building-components/references/styling.mdx +286 -0
  138. package/template/.opencode/skills/building-components/references/types.mdx +191 -0
  139. package/template/.opencode/skills/clickhouse-io/SKILL.md +429 -0
  140. package/template/.opencode/skills/coding-standards/SKILL.md +520 -0
  141. package/template/.opencode/skills/configure-ecc/SKILL.md +298 -0
  142. package/template/.opencode/skills/continuous-learning/SKILL.md +110 -0
  143. package/template/.opencode/skills/continuous-learning/config.json +18 -0
  144. package/template/.opencode/skills/continuous-learning/evaluate-session.sh +60 -0
  145. package/template/.opencode/skills/continuous-learning-v2/SKILL.md +284 -0
  146. package/template/.opencode/skills/continuous-learning-v2/agents/observer.md +137 -0
  147. package/template/.opencode/skills/continuous-learning-v2/agents/start-observer.sh +134 -0
  148. package/template/.opencode/skills/continuous-learning-v2/config.json +41 -0
  149. package/template/.opencode/skills/continuous-learning-v2/hooks/observe.sh +153 -0
  150. package/template/.opencode/skills/continuous-learning-v2/scripts/instinct-cli.py +489 -0
  151. package/template/.opencode/skills/continuous-learning-v2/scripts/test_parse_instinct.py +82 -0
  152. package/template/.opencode/skills/dart-add-unit-test/SKILL.md +122 -0
  153. package/template/.opencode/skills/dart-build-cli-app/SKILL.md +185 -0
  154. package/template/.opencode/skills/dart-collect-coverage/SKILL.md +141 -0
  155. package/template/.opencode/skills/dart-fix-runtime-errors/SKILL.md +166 -0
  156. package/template/.opencode/skills/dart-generate-test-mocks/SKILL.md +155 -0
  157. package/template/.opencode/skills/dart-migrate-to-checks-package/SKILL.md +126 -0
  158. package/template/.opencode/skills/dart-resolve-package-conflicts/SKILL.md +116 -0
  159. package/template/.opencode/skills/dart-run-static-analysis/SKILL.md +104 -0
  160. package/template/.opencode/skills/dart-use-pattern-matching/SKILL.md +146 -0
  161. package/template/.opencode/skills/django-patterns/SKILL.md +733 -0
  162. package/template/.opencode/skills/django-security/SKILL.md +592 -0
  163. package/template/.opencode/skills/django-tdd/SKILL.md +728 -0
  164. package/template/.opencode/skills/django-verification/SKILL.md +460 -0
  165. package/template/.opencode/skills/eval-harness/SKILL.md +227 -0
  166. package/template/.opencode/skills/firebase-basics/SKILL.md +103 -0
  167. package/template/.opencode/skills/firebase-basics/references/additional-skills.md +113 -0
  168. package/template/.opencode/skills/firebase-basics/references/cli-usage.md +31 -0
  169. package/template/.opencode/skills/firebase-basics/references/client-library-usage.md +45 -0
  170. package/template/.opencode/skills/firebase-basics/references/core-concepts.md +61 -0
  171. package/template/.opencode/skills/firebase-basics/references/iac-usage.md +40 -0
  172. package/template/.opencode/skills/firebase-basics/references/iam-security.md +74 -0
  173. package/template/.opencode/skills/firebase-basics/references/mcp-usage.md +63 -0
  174. package/template/.opencode/skills/flutter/SKILL.md +292 -0
  175. package/template/.opencode/skills/flutter-add-integration-test/SKILL.md +163 -0
  176. package/template/.opencode/skills/flutter-add-widget-preview/SKILL.md +145 -0
  177. package/template/.opencode/skills/flutter-add-widget-test/SKILL.md +154 -0
  178. package/template/.opencode/skills/flutter-apply-architecture-best-practices/SKILL.md +162 -0
  179. package/template/.opencode/skills/flutter-build-responsive-layout/SKILL.md +139 -0
  180. package/template/.opencode/skills/flutter-fix-layout-issues/SKILL.md +130 -0
  181. package/template/.opencode/skills/flutter-implement-json-serialization/SKILL.md +153 -0
  182. package/template/.opencode/skills/flutter-setup-declarative-routing/SKILL.md +255 -0
  183. package/template/.opencode/skills/flutter-setup-localization/SKILL.md +210 -0
  184. package/template/.opencode/skills/flutter-use-http-package/SKILL.md +174 -0
  185. package/template/.opencode/skills/frontend-design/SKILL.md +89 -0
  186. package/template/.opencode/skills/frontend-patterns/SKILL.md +631 -0
  187. package/template/.opencode/skills/golang-patterns/SKILL.md +673 -0
  188. package/template/.opencode/skills/golang-testing/SKILL.md +719 -0
  189. package/template/.opencode/skills/impeccable/SKILL.md +165 -0
  190. package/template/.opencode/skills/impeccable/agents/impeccable-asset-producer.md +101 -0
  191. package/template/.opencode/skills/impeccable/reference/adapt.md +190 -0
  192. package/template/.opencode/skills/impeccable/reference/animate.md +175 -0
  193. package/template/.opencode/skills/impeccable/reference/audit.md +133 -0
  194. package/template/.opencode/skills/impeccable/reference/bolder.md +113 -0
  195. package/template/.opencode/skills/impeccable/reference/brand.md +118 -0
  196. package/template/.opencode/skills/impeccable/reference/clarify.md +174 -0
  197. package/template/.opencode/skills/impeccable/reference/codex.md +105 -0
  198. package/template/.opencode/skills/impeccable/reference/cognitive-load.md +106 -0
  199. package/template/.opencode/skills/impeccable/reference/color-and-contrast.md +105 -0
  200. package/template/.opencode/skills/impeccable/reference/colorize.md +154 -0
  201. package/template/.opencode/skills/impeccable/reference/craft.md +123 -0
  202. package/template/.opencode/skills/impeccable/reference/critique.md +273 -0
  203. package/template/.opencode/skills/impeccable/reference/delight.md +302 -0
  204. package/template/.opencode/skills/impeccable/reference/distill.md +111 -0
  205. package/template/.opencode/skills/impeccable/reference/document.md +427 -0
  206. package/template/.opencode/skills/impeccable/reference/extract.md +69 -0
  207. package/template/.opencode/skills/impeccable/reference/harden.md +347 -0
  208. package/template/.opencode/skills/impeccable/reference/heuristics-scoring.md +234 -0
  209. package/template/.opencode/skills/impeccable/reference/interaction-design.md +195 -0
  210. package/template/.opencode/skills/impeccable/reference/layout.md +141 -0
  211. package/template/.opencode/skills/impeccable/reference/live.md +622 -0
  212. package/template/.opencode/skills/impeccable/reference/motion-design.md +109 -0
  213. package/template/.opencode/skills/impeccable/reference/onboard.md +234 -0
  214. package/template/.opencode/skills/impeccable/reference/optimize.md +258 -0
  215. package/template/.opencode/skills/impeccable/reference/overdrive.md +130 -0
  216. package/template/.opencode/skills/impeccable/reference/personas.md +179 -0
  217. package/template/.opencode/skills/impeccable/reference/polish.md +242 -0
  218. package/template/.opencode/skills/impeccable/reference/product.md +62 -0
  219. package/template/.opencode/skills/impeccable/reference/quieter.md +99 -0
  220. package/template/.opencode/skills/impeccable/reference/responsive-design.md +114 -0
  221. package/template/.opencode/skills/impeccable/reference/shape.md +165 -0
  222. package/template/.opencode/skills/impeccable/reference/spatial-design.md +100 -0
  223. package/template/.opencode/skills/impeccable/reference/teach.md +156 -0
  224. package/template/.opencode/skills/impeccable/reference/typeset.md +124 -0
  225. package/template/.opencode/skills/impeccable/reference/typography.md +159 -0
  226. package/template/.opencode/skills/impeccable/reference/ux-writing.md +107 -0
  227. package/template/.opencode/skills/impeccable/scripts/cleanup-deprecated.mjs +284 -0
  228. package/template/.opencode/skills/impeccable/scripts/command-metadata.json +94 -0
  229. package/template/.opencode/skills/impeccable/scripts/critique-storage.mjs +242 -0
  230. package/template/.opencode/skills/impeccable/scripts/design-parser.mjs +820 -0
  231. package/template/.opencode/skills/impeccable/scripts/detect-csp.mjs +198 -0
  232. package/template/.opencode/skills/impeccable/scripts/detect.mjs +21 -0
  233. package/template/.opencode/skills/impeccable/scripts/impeccable-paths.mjs +110 -0
  234. package/template/.opencode/skills/impeccable/scripts/is-generated.mjs +69 -0
  235. package/template/.opencode/skills/impeccable/scripts/live-accept.mjs +595 -0
  236. package/template/.opencode/skills/impeccable/scripts/live-browser-session.js +123 -0
  237. package/template/.opencode/skills/impeccable/scripts/live-browser.js +4860 -0
  238. package/template/.opencode/skills/impeccable/scripts/live-complete.mjs +75 -0
  239. package/template/.opencode/skills/impeccable/scripts/live-completion.mjs +18 -0
  240. package/template/.opencode/skills/impeccable/scripts/live-inject.mjs +446 -0
  241. package/template/.opencode/skills/impeccable/scripts/live-poll.mjs +200 -0
  242. package/template/.opencode/skills/impeccable/scripts/live-resume.mjs +48 -0
  243. package/template/.opencode/skills/impeccable/scripts/live-server.mjs +838 -0
  244. package/template/.opencode/skills/impeccable/scripts/live-session-store.mjs +254 -0
  245. package/template/.opencode/skills/impeccable/scripts/live-status.mjs +47 -0
  246. package/template/.opencode/skills/impeccable/scripts/live-wrap.mjs +632 -0
  247. package/template/.opencode/skills/impeccable/scripts/live.mjs +247 -0
  248. package/template/.opencode/skills/impeccable/scripts/load-context.mjs +141 -0
  249. package/template/.opencode/skills/impeccable/scripts/modern-screenshot.umd.js +14 -0
  250. package/template/.opencode/skills/impeccable/scripts/pin.mjs +214 -0
  251. package/template/.opencode/skills/iterative-retrieval/SKILL.md +202 -0
  252. package/template/.opencode/skills/java-coding-standards/SKILL.md +138 -0
  253. package/template/.opencode/skills/jetpack-compose/.skillfish.json +10 -0
  254. package/template/.opencode/skills/jetpack-compose/SKILL.md +420 -0
  255. package/template/.opencode/skills/jpa-patterns/SKILL.md +141 -0
  256. package/template/.opencode/skills/nutrient-document-processing/SKILL.md +165 -0
  257. package/template/.opencode/skills/nuxt-ui/SKILL.md +334 -0
  258. package/template/.opencode/skills/nuxt-ui/references/components.md +377 -0
  259. package/template/.opencode/skills/nuxt-ui/references/composables.md +127 -0
  260. package/template/.opencode/skills/nuxt-ui/references/layouts/chat.md +266 -0
  261. package/template/.opencode/skills/nuxt-ui/references/layouts/dashboard.md +220 -0
  262. package/template/.opencode/skills/nuxt-ui/references/layouts/docs.md +141 -0
  263. package/template/.opencode/skills/nuxt-ui/references/layouts/editor.md +168 -0
  264. package/template/.opencode/skills/nuxt-ui/references/layouts/page.md +260 -0
  265. package/template/.opencode/skills/nuxt-ui/references/theming.md +427 -0
  266. package/template/.opencode/skills/postgres-patterns/SKILL.md +146 -0
  267. package/template/.opencode/skills/project-guidelines-example/SKILL.md +345 -0
  268. package/template/.opencode/skills/python-patterns/SKILL.md +749 -0
  269. package/template/.opencode/skills/python-testing/SKILL.md +815 -0
  270. package/template/.opencode/skills/security-review/SKILL.md +494 -0
  271. package/template/.opencode/skills/security-review/cloud-infrastructure-security.md +361 -0
  272. package/template/.opencode/skills/shadcn-ui/README.md +248 -0
  273. package/template/.opencode/skills/shadcn-ui/SKILL.md +326 -0
  274. package/template/.opencode/skills/shadcn-ui/examples/auth-layout.tsx +177 -0
  275. package/template/.opencode/skills/shadcn-ui/examples/data-table.tsx +313 -0
  276. package/template/.opencode/skills/shadcn-ui/examples/form-pattern.tsx +177 -0
  277. package/template/.opencode/skills/shadcn-ui/resources/component-catalog.md +481 -0
  278. package/template/.opencode/skills/shadcn-ui/resources/customization-guide.md +516 -0
  279. package/template/.opencode/skills/shadcn-ui/resources/migration-guide.md +463 -0
  280. package/template/.opencode/skills/shadcn-ui/resources/setup-guide.md +412 -0
  281. package/template/.opencode/skills/shadcn-ui/scripts/verify-setup.sh +134 -0
  282. package/template/.opencode/skills/springboot-patterns/SKILL.md +304 -0
  283. package/template/.opencode/skills/springboot-security/SKILL.md +119 -0
  284. package/template/.opencode/skills/springboot-tdd/SKILL.md +157 -0
  285. package/template/.opencode/skills/springboot-verification/SKILL.md +100 -0
  286. package/template/.opencode/skills/strategic-compact/SKILL.md +63 -0
  287. package/template/.opencode/skills/strategic-compact/suggest-compact.sh +52 -0
  288. package/template/.opencode/skills/tdd-workflow/SKILL.md +409 -0
  289. package/template/.opencode/skills/vercel-composition-patterns/AGENTS.md +946 -0
  290. package/template/.opencode/skills/vercel-composition-patterns/SKILL.md +89 -0
  291. package/template/.opencode/skills/vercel-composition-patterns/rules/architecture-avoid-boolean-props.md +100 -0
  292. package/template/.opencode/skills/vercel-composition-patterns/rules/architecture-compound-components.md +112 -0
  293. package/template/.opencode/skills/vercel-composition-patterns/rules/patterns-children-over-render-props.md +87 -0
  294. package/template/.opencode/skills/vercel-composition-patterns/rules/patterns-explicit-variants.md +100 -0
  295. package/template/.opencode/skills/vercel-composition-patterns/rules/react19-no-forwardref.md +42 -0
  296. package/template/.opencode/skills/vercel-composition-patterns/rules/state-context-interface.md +191 -0
  297. package/template/.opencode/skills/vercel-composition-patterns/rules/state-decouple-implementation.md +113 -0
  298. package/template/.opencode/skills/vercel-composition-patterns/rules/state-lift-state.md +125 -0
  299. package/template/.opencode/skills/vercel-react-best-practices/AGENTS.md +2934 -0
  300. package/template/.opencode/skills/vercel-react-best-practices/SKILL.md +136 -0
  301. package/template/.opencode/skills/vercel-react-best-practices/rules/advanced-event-handler-refs.md +55 -0
  302. package/template/.opencode/skills/vercel-react-best-practices/rules/advanced-init-once.md +42 -0
  303. package/template/.opencode/skills/vercel-react-best-practices/rules/advanced-use-latest.md +39 -0
  304. package/template/.opencode/skills/vercel-react-best-practices/rules/async-api-routes.md +38 -0
  305. package/template/.opencode/skills/vercel-react-best-practices/rules/async-defer-await.md +80 -0
  306. package/template/.opencode/skills/vercel-react-best-practices/rules/async-dependencies.md +51 -0
  307. package/template/.opencode/skills/vercel-react-best-practices/rules/async-parallel.md +28 -0
  308. package/template/.opencode/skills/vercel-react-best-practices/rules/async-suspense-boundaries.md +99 -0
  309. package/template/.opencode/skills/vercel-react-best-practices/rules/bundle-barrel-imports.md +59 -0
  310. package/template/.opencode/skills/vercel-react-best-practices/rules/bundle-conditional.md +31 -0
  311. package/template/.opencode/skills/vercel-react-best-practices/rules/bundle-defer-third-party.md +49 -0
  312. package/template/.opencode/skills/vercel-react-best-practices/rules/bundle-dynamic-imports.md +35 -0
  313. package/template/.opencode/skills/vercel-react-best-practices/rules/bundle-preload.md +50 -0
  314. package/template/.opencode/skills/vercel-react-best-practices/rules/client-event-listeners.md +74 -0
  315. package/template/.opencode/skills/vercel-react-best-practices/rules/client-localstorage-schema.md +71 -0
  316. package/template/.opencode/skills/vercel-react-best-practices/rules/client-passive-event-listeners.md +48 -0
  317. package/template/.opencode/skills/vercel-react-best-practices/rules/client-swr-dedup.md +56 -0
  318. package/template/.opencode/skills/vercel-react-best-practices/rules/js-batch-dom-css.md +107 -0
  319. package/template/.opencode/skills/vercel-react-best-practices/rules/js-cache-function-results.md +80 -0
  320. package/template/.opencode/skills/vercel-react-best-practices/rules/js-cache-property-access.md +28 -0
  321. package/template/.opencode/skills/vercel-react-best-practices/rules/js-cache-storage.md +70 -0
  322. package/template/.opencode/skills/vercel-react-best-practices/rules/js-combine-iterations.md +32 -0
  323. package/template/.opencode/skills/vercel-react-best-practices/rules/js-early-exit.md +50 -0
  324. package/template/.opencode/skills/vercel-react-best-practices/rules/js-hoist-regexp.md +45 -0
  325. package/template/.opencode/skills/vercel-react-best-practices/rules/js-index-maps.md +37 -0
  326. package/template/.opencode/skills/vercel-react-best-practices/rules/js-length-check-first.md +49 -0
  327. package/template/.opencode/skills/vercel-react-best-practices/rules/js-min-max-loop.md +82 -0
  328. package/template/.opencode/skills/vercel-react-best-practices/rules/js-set-map-lookups.md +24 -0
  329. package/template/.opencode/skills/vercel-react-best-practices/rules/js-tosorted-immutable.md +57 -0
  330. package/template/.opencode/skills/vercel-react-best-practices/rules/rendering-activity.md +26 -0
  331. package/template/.opencode/skills/vercel-react-best-practices/rules/rendering-animate-svg-wrapper.md +47 -0
  332. package/template/.opencode/skills/vercel-react-best-practices/rules/rendering-conditional-render.md +40 -0
  333. package/template/.opencode/skills/vercel-react-best-practices/rules/rendering-content-visibility.md +38 -0
  334. package/template/.opencode/skills/vercel-react-best-practices/rules/rendering-hoist-jsx.md +46 -0
  335. package/template/.opencode/skills/vercel-react-best-practices/rules/rendering-hydration-no-flicker.md +82 -0
  336. package/template/.opencode/skills/vercel-react-best-practices/rules/rendering-hydration-suppress-warning.md +30 -0
  337. package/template/.opencode/skills/vercel-react-best-practices/rules/rendering-svg-precision.md +28 -0
  338. package/template/.opencode/skills/vercel-react-best-practices/rules/rendering-usetransition-loading.md +75 -0
  339. package/template/.opencode/skills/vercel-react-best-practices/rules/rerender-defer-reads.md +39 -0
  340. package/template/.opencode/skills/vercel-react-best-practices/rules/rerender-dependencies.md +45 -0
  341. package/template/.opencode/skills/vercel-react-best-practices/rules/rerender-derived-state-no-effect.md +40 -0
  342. package/template/.opencode/skills/vercel-react-best-practices/rules/rerender-derived-state.md +29 -0
  343. package/template/.opencode/skills/vercel-react-best-practices/rules/rerender-functional-setstate.md +74 -0
  344. package/template/.opencode/skills/vercel-react-best-practices/rules/rerender-lazy-state-init.md +58 -0
  345. package/template/.opencode/skills/vercel-react-best-practices/rules/rerender-memo-with-default-value.md +38 -0
  346. package/template/.opencode/skills/vercel-react-best-practices/rules/rerender-memo.md +44 -0
  347. package/template/.opencode/skills/vercel-react-best-practices/rules/rerender-move-effect-to-event.md +45 -0
  348. package/template/.opencode/skills/vercel-react-best-practices/rules/rerender-simple-expression-in-memo.md +35 -0
  349. package/template/.opencode/skills/vercel-react-best-practices/rules/rerender-transitions.md +40 -0
  350. package/template/.opencode/skills/vercel-react-best-practices/rules/rerender-use-ref-transient-values.md +73 -0
  351. package/template/.opencode/skills/vercel-react-best-practices/rules/server-after-nonblocking.md +73 -0
  352. package/template/.opencode/skills/vercel-react-best-practices/rules/server-auth-actions.md +96 -0
  353. package/template/.opencode/skills/vercel-react-best-practices/rules/server-cache-lru.md +41 -0
  354. package/template/.opencode/skills/vercel-react-best-practices/rules/server-cache-react.md +76 -0
  355. package/template/.opencode/skills/vercel-react-best-practices/rules/server-dedup-props.md +65 -0
  356. package/template/.opencode/skills/vercel-react-best-practices/rules/server-parallel-fetching.md +83 -0
  357. package/template/.opencode/skills/vercel-react-best-practices/rules/server-serialization.md +38 -0
  358. package/template/.opencode/skills/verification-loop/SKILL.md +120 -0
  359. package/template/.opencode/skills/web-design-guidelines/SKILL.md +39 -0
  360. package/template/AGENTS.md +32 -0
  361. package/template/opencode.json +354 -0
@@ -0,0 +1,298 @@
1
+ ---
2
+ name: configure-ecc
3
+ description: Interactive installer for Everything Claude Code — guides users through selecting and installing skills and rules to user-level or project-level directories, verifies paths, and optionally optimizes installed files.
4
+ ---
5
+
6
+ # Configure Everything Claude Code (ECC)
7
+
8
+ An interactive, step-by-step installation wizard for the Everything Claude Code project. Uses `AskUserQuestion` to guide users through selective installation of skills and rules, then verifies correctness and offers optimization.
9
+
10
+ ## When to Activate
11
+
12
+ - User says "configure ecc", "install ecc", "setup everything claude code", or similar
13
+ - User wants to selectively install skills or rules from this project
14
+ - User wants to verify or fix an existing ECC installation
15
+ - User wants to optimize installed skills or rules for their project
16
+
17
+ ## Prerequisites
18
+
19
+ This skill must be accessible to Claude Code before activation. Two ways to bootstrap:
20
+ 1. **Via Plugin**: `/plugin install everything-claude-code` — the plugin loads this skill automatically
21
+ 2. **Manual**: Copy only this skill to `~/.claude/skills/configure-ecc/SKILL.md`, then activate by saying "configure ecc"
22
+
23
+ ---
24
+
25
+ ## Step 0: Clone ECC Repository
26
+
27
+ Before any installation, clone the latest ECC source to `/tmp`:
28
+
29
+ ```bash
30
+ rm -rf /tmp/everything-claude-code
31
+ git clone https://github.com/affaan-m/everything-claude-code.git /tmp/everything-claude-code
32
+ ```
33
+
34
+ Set `ECC_ROOT=/tmp/everything-claude-code` as the source for all subsequent copy operations.
35
+
36
+ If the clone fails (network issues, etc.), use `AskUserQuestion` to ask the user to provide a local path to an existing ECC clone.
37
+
38
+ ---
39
+
40
+ ## Step 1: Choose Installation Level
41
+
42
+ Use `AskUserQuestion` to ask the user where to install:
43
+
44
+ ```
45
+ Question: "Where should ECC components be installed?"
46
+ Options:
47
+ - "User-level (~/.claude/)" — "Applies to all your Claude Code projects"
48
+ - "Project-level (.claude/)" — "Applies only to the current project"
49
+ - "Both" — "Common/shared items user-level, project-specific items project-level"
50
+ ```
51
+
52
+ Store the choice as `INSTALL_LEVEL`. Set the target directory:
53
+ - User-level: `TARGET=~/.claude`
54
+ - Project-level: `TARGET=.claude` (relative to current project root)
55
+ - Both: `TARGET_USER=~/.claude`, `TARGET_PROJECT=.claude`
56
+
57
+ Create the target directories if they don't exist:
58
+ ```bash
59
+ mkdir -p $TARGET/skills $TARGET/rules
60
+ ```
61
+
62
+ ---
63
+
64
+ ## Step 2: Select & Install Skills
65
+
66
+ ### 2a: Choose Skill Categories
67
+
68
+ There are 27 skills organized into 4 categories. Use `AskUserQuestion` with `multiSelect: true`:
69
+
70
+ ```
71
+ Question: "Which skill categories do you want to install?"
72
+ Options:
73
+ - "Framework & Language" — "Django, Spring Boot, Go, Python, Java, Frontend, Backend patterns"
74
+ - "Database" — "PostgreSQL, ClickHouse, JPA/Hibernate patterns"
75
+ - "Workflow & Quality" — "TDD, verification, learning, security review, compaction"
76
+ - "All skills" — "Install every available skill"
77
+ ```
78
+
79
+ ### 2b: Confirm Individual Skills
80
+
81
+ For each selected category, print the full list of skills below and ask the user to confirm or deselect specific ones. If the list exceeds 4 items, print the list as text and use `AskUserQuestion` with an "Install all listed" option plus "Other" for the user to paste specific names.
82
+
83
+ **Category: Framework & Language (16 skills)**
84
+
85
+ | Skill | Description |
86
+ |-------|-------------|
87
+ | `backend-patterns` | Backend architecture, API design, server-side best practices for Node.js/Express/Next.js |
88
+ | `coding-standards` | Universal coding standards for TypeScript, JavaScript, React, Node.js |
89
+ | `django-patterns` | Django architecture, REST API with DRF, ORM, caching, signals, middleware |
90
+ | `django-security` | Django security: auth, CSRF, SQL injection, XSS prevention |
91
+ | `django-tdd` | Django testing with pytest-django, factory_boy, mocking, coverage |
92
+ | `django-verification` | Django verification loop: migrations, linting, tests, security scans |
93
+ | `frontend-patterns` | React, Next.js, state management, performance, UI patterns |
94
+ | `golang-patterns` | Idiomatic Go patterns, conventions for robust Go applications |
95
+ | `golang-testing` | Go testing: table-driven tests, subtests, benchmarks, fuzzing |
96
+ | `java-coding-standards` | Java coding standards for Spring Boot: naming, immutability, Optional, streams |
97
+ | `python-patterns` | Pythonic idioms, PEP 8, type hints, best practices |
98
+ | `python-testing` | Python testing with pytest, TDD, fixtures, mocking, parametrization |
99
+ | `springboot-patterns` | Spring Boot architecture, REST API, layered services, caching, async |
100
+ | `springboot-security` | Spring Security: authn/authz, validation, CSRF, secrets, rate limiting |
101
+ | `springboot-tdd` | Spring Boot TDD with JUnit 5, Mockito, MockMvc, Testcontainers |
102
+ | `springboot-verification` | Spring Boot verification: build, static analysis, tests, security scans |
103
+
104
+ **Category: Database (3 skills)**
105
+
106
+ | Skill | Description |
107
+ |-------|-------------|
108
+ | `clickhouse-io` | ClickHouse patterns, query optimization, analytics, data engineering |
109
+ | `jpa-patterns` | JPA/Hibernate entity design, relationships, query optimization, transactions |
110
+ | `postgres-patterns` | PostgreSQL query optimization, schema design, indexing, security |
111
+
112
+ **Category: Workflow & Quality (8 skills)**
113
+
114
+ | Skill | Description |
115
+ |-------|-------------|
116
+ | `continuous-learning` | Auto-extract reusable patterns from sessions as learned skills |
117
+ | `continuous-learning-v2` | Instinct-based learning with confidence scoring, evolves into skills/commands/agents |
118
+ | `eval-harness` | Formal evaluation framework for eval-driven development (EDD) |
119
+ | `iterative-retrieval` | Progressive context refinement for subagent context problem |
120
+ | `security-review` | Security checklist: auth, input, secrets, API, payment features |
121
+ | `strategic-compact` | Suggests manual context compaction at logical intervals |
122
+ | `tdd-workflow` | Enforces TDD with 80%+ coverage: unit, integration, E2E |
123
+ | `verification-loop` | Verification and quality loop patterns |
124
+
125
+ **Standalone**
126
+
127
+ | Skill | Description |
128
+ |-------|-------------|
129
+ | `project-guidelines-example` | Template for creating project-specific skills |
130
+
131
+ ### 2c: Execute Installation
132
+
133
+ For each selected skill, copy the entire skill directory:
134
+ ```bash
135
+ cp -r $ECC_ROOT/skills/<skill-name> $TARGET/skills/
136
+ ```
137
+
138
+ Note: `continuous-learning` and `continuous-learning-v2` have extra files (config.json, hooks, scripts) — ensure the entire directory is copied, not just SKILL.md.
139
+
140
+ ---
141
+
142
+ ## Step 3: Select & Install Rules
143
+
144
+ Use `AskUserQuestion` with `multiSelect: true`:
145
+
146
+ ```
147
+ Question: "Which rule sets do you want to install?"
148
+ Options:
149
+ - "Common rules (Recommended)" — "Language-agnostic principles: coding style, git workflow, testing, security, etc. (8 files)"
150
+ - "TypeScript/JavaScript" — "TS/JS patterns, hooks, testing with Playwright (5 files)"
151
+ - "Python" — "Python patterns, pytest, black/ruff formatting (5 files)"
152
+ - "Go" — "Go patterns, table-driven tests, gofmt/staticcheck (5 files)"
153
+ ```
154
+
155
+ Execute installation:
156
+ ```bash
157
+ # Common rules (flat copy into rules/)
158
+ cp -r $ECC_ROOT/rules/common/* $TARGET/rules/
159
+
160
+ # Language-specific rules (flat copy into rules/)
161
+ cp -r $ECC_ROOT/rules/typescript/* $TARGET/rules/ # if selected
162
+ cp -r $ECC_ROOT/rules/python/* $TARGET/rules/ # if selected
163
+ cp -r $ECC_ROOT/rules/golang/* $TARGET/rules/ # if selected
164
+ ```
165
+
166
+ **Important**: If the user selects any language-specific rules but NOT common rules, warn them:
167
+ > "Language-specific rules extend the common rules. Installing without common rules may result in incomplete coverage. Install common rules too?"
168
+
169
+ ---
170
+
171
+ ## Step 4: Post-Installation Verification
172
+
173
+ After installation, perform these automated checks:
174
+
175
+ ### 4a: Verify File Existence
176
+
177
+ List all installed files and confirm they exist at the target location:
178
+ ```bash
179
+ ls -la $TARGET/skills/
180
+ ls -la $TARGET/rules/
181
+ ```
182
+
183
+ ### 4b: Check Path References
184
+
185
+ Scan all installed `.md` files for path references:
186
+ ```bash
187
+ grep -rn "~/.claude/" $TARGET/skills/ $TARGET/rules/
188
+ grep -rn "../common/" $TARGET/rules/
189
+ grep -rn "skills/" $TARGET/skills/
190
+ ```
191
+
192
+ **For project-level installs**, flag any references to `~/.claude/` paths:
193
+ - If a skill references `~/.claude/settings.json` — this is usually fine (settings are always user-level)
194
+ - If a skill references `~/.claude/skills/` or `~/.claude/rules/` — this may be broken if installed only at project level
195
+ - If a skill references another skill by name — check that the referenced skill was also installed
196
+
197
+ ### 4c: Check Cross-References Between Skills
198
+
199
+ Some skills reference others. Verify these dependencies:
200
+ - `django-tdd` may reference `django-patterns`
201
+ - `springboot-tdd` may reference `springboot-patterns`
202
+ - `continuous-learning-v2` references `~/.claude/homunculus/` directory
203
+ - `python-testing` may reference `python-patterns`
204
+ - `golang-testing` may reference `golang-patterns`
205
+ - Language-specific rules reference `common/` counterparts
206
+
207
+ ### 4d: Report Issues
208
+
209
+ For each issue found, report:
210
+ 1. **File**: The file containing the problematic reference
211
+ 2. **Line**: The line number
212
+ 3. **Issue**: What's wrong (e.g., "references ~/.claude/skills/python-patterns but python-patterns was not installed")
213
+ 4. **Suggested fix**: What to do (e.g., "install python-patterns skill" or "update path to .claude/skills/")
214
+
215
+ ---
216
+
217
+ ## Step 5: Optimize Installed Files (Optional)
218
+
219
+ Use `AskUserQuestion`:
220
+
221
+ ```
222
+ Question: "Would you like to optimize the installed files for your project?"
223
+ Options:
224
+ - "Optimize skills" — "Remove irrelevant sections, adjust paths, tailor to your tech stack"
225
+ - "Optimize rules" — "Adjust coverage targets, add project-specific patterns, customize tool configs"
226
+ - "Optimize both" — "Full optimization of all installed files"
227
+ - "Skip" — "Keep everything as-is"
228
+ ```
229
+
230
+ ### If optimizing skills:
231
+ 1. Read each installed SKILL.md
232
+ 2. Ask the user what their project's tech stack is (if not already known)
233
+ 3. For each skill, suggest removals of irrelevant sections
234
+ 4. Edit the SKILL.md files in-place at the installation target (NOT the source repo)
235
+ 5. Fix any path issues found in Step 4
236
+
237
+ ### If optimizing rules:
238
+ 1. Read each installed rule .md file
239
+ 2. Ask the user about their preferences:
240
+ - Test coverage target (default 80%)
241
+ - Preferred formatting tools
242
+ - Git workflow conventions
243
+ - Security requirements
244
+ 3. Edit the rule files in-place at the installation target
245
+
246
+ **Critical**: Only modify files in the installation target (`$TARGET/`), NEVER modify files in the source ECC repository (`$ECC_ROOT/`).
247
+
248
+ ---
249
+
250
+ ## Step 6: Installation Summary
251
+
252
+ Clean up the cloned repository from `/tmp`:
253
+
254
+ ```bash
255
+ rm -rf /tmp/everything-claude-code
256
+ ```
257
+
258
+ Then print a summary report:
259
+
260
+ ```
261
+ ## ECC Installation Complete
262
+
263
+ ### Installation Target
264
+ - Level: [user-level / project-level / both]
265
+ - Path: [target path]
266
+
267
+ ### Skills Installed ([count])
268
+ - skill-1, skill-2, skill-3, ...
269
+
270
+ ### Rules Installed ([count])
271
+ - common (8 files)
272
+ - typescript (5 files)
273
+ - ...
274
+
275
+ ### Verification Results
276
+ - [count] issues found, [count] fixed
277
+ - [list any remaining issues]
278
+
279
+ ### Optimizations Applied
280
+ - [list changes made, or "None"]
281
+ ```
282
+
283
+ ---
284
+
285
+ ## Troubleshooting
286
+
287
+ ### "Skills not being picked up by Claude Code"
288
+ - Verify the skill directory contains a `SKILL.md` file (not just loose .md files)
289
+ - For user-level: check `~/.claude/skills/<skill-name>/SKILL.md` exists
290
+ - For project-level: check `.claude/skills/<skill-name>/SKILL.md` exists
291
+
292
+ ### "Rules not working"
293
+ - Rules are flat files, not in subdirectories: `$TARGET/rules/coding-style.md` (correct) vs `$TARGET/rules/common/coding-style.md` (incorrect for flat install)
294
+ - Restart Claude Code after installing rules
295
+
296
+ ### "Path reference errors after project-level install"
297
+ - Some skills assume `~/.claude/` paths. Run Step 4 verification to find and fix these.
298
+ - For `continuous-learning-v2`, the `~/.claude/homunculus/` directory is always user-level — this is expected and not an error.
@@ -0,0 +1,110 @@
1
+ ---
2
+ name: continuous-learning
3
+ description: Automatically extract reusable patterns from Claude Code sessions and save them as learned skills for future use.
4
+ ---
5
+
6
+ # Continuous Learning Skill
7
+
8
+ Automatically evaluates Claude Code sessions on end to extract reusable patterns that can be saved as learned skills.
9
+
10
+ ## How It Works
11
+
12
+ This skill runs as a **Stop hook** at the end of each session:
13
+
14
+ 1. **Session Evaluation**: Checks if session has enough messages (default: 10+)
15
+ 2. **Pattern Detection**: Identifies extractable patterns from the session
16
+ 3. **Skill Extraction**: Saves useful patterns to `~/.claude/skills/learned/`
17
+
18
+ ## Configuration
19
+
20
+ Edit `config.json` to customize:
21
+
22
+ ```json
23
+ {
24
+ "min_session_length": 10,
25
+ "extraction_threshold": "medium",
26
+ "auto_approve": false,
27
+ "learned_skills_path": "~/.claude/skills/learned/",
28
+ "patterns_to_detect": [
29
+ "error_resolution",
30
+ "user_corrections",
31
+ "workarounds",
32
+ "debugging_techniques",
33
+ "project_specific"
34
+ ],
35
+ "ignore_patterns": [
36
+ "simple_typos",
37
+ "one_time_fixes",
38
+ "external_api_issues"
39
+ ]
40
+ }
41
+ ```
42
+
43
+ ## Pattern Types
44
+
45
+ | Pattern | Description |
46
+ |---------|-------------|
47
+ | `error_resolution` | How specific errors were resolved |
48
+ | `user_corrections` | Patterns from user corrections |
49
+ | `workarounds` | Solutions to framework/library quirks |
50
+ | `debugging_techniques` | Effective debugging approaches |
51
+ | `project_specific` | Project-specific conventions |
52
+
53
+ ## Hook Setup
54
+
55
+ Add to your `~/.claude/settings.json`:
56
+
57
+ ```json
58
+ {
59
+ "hooks": {
60
+ "Stop": [{
61
+ "matcher": "*",
62
+ "hooks": [{
63
+ "type": "command",
64
+ "command": "~/.claude/skills/continuous-learning/evaluate-session.sh"
65
+ }]
66
+ }]
67
+ }
68
+ }
69
+ ```
70
+
71
+ ## Why Stop Hook?
72
+
73
+ - **Lightweight**: Runs once at session end
74
+ - **Non-blocking**: Doesn't add latency to every message
75
+ - **Complete context**: Has access to full session transcript
76
+
77
+ ## Related
78
+
79
+ - [The Longform Guide](https://x.com/affaanmustafa/status/2014040193557471352) - Section on continuous learning
80
+ - `/learn` command - Manual pattern extraction mid-session
81
+
82
+ ---
83
+
84
+ ## Comparison Notes (Research: Jan 2025)
85
+
86
+ ### vs Homunculus (github.com/humanplane/homunculus)
87
+
88
+ Homunculus v2 takes a more sophisticated approach:
89
+
90
+ | Feature | Our Approach | Homunculus v2 |
91
+ |---------|--------------|---------------|
92
+ | Observation | Stop hook (end of session) | PreToolUse/PostToolUse hooks (100% reliable) |
93
+ | Analysis | Main context | Background agent (Haiku) |
94
+ | Granularity | Full skills | Atomic "instincts" |
95
+ | Confidence | None | 0.3-0.9 weighted |
96
+ | Evolution | Direct to skill | Instincts → cluster → skill/command/agent |
97
+ | Sharing | None | Export/import instincts |
98
+
99
+ **Key insight from homunculus:**
100
+ > "v1 relied on skills to observe. Skills are probabilistic—they fire ~50-80% of the time. v2 uses hooks for observation (100% reliable) and instincts as the atomic unit of learned behavior."
101
+
102
+ ### Potential v2 Enhancements
103
+
104
+ 1. **Instinct-based learning** - Smaller, atomic behaviors with confidence scoring
105
+ 2. **Background observer** - Haiku agent analyzing in parallel
106
+ 3. **Confidence decay** - Instincts lose confidence if contradicted
107
+ 4. **Domain tagging** - code-style, testing, git, debugging, etc.
108
+ 5. **Evolution path** - Cluster related instincts into skills/commands
109
+
110
+ See: `/Users/affoon/Documents/tasks/12-continuous-learning-v2.md` for full spec.
@@ -0,0 +1,18 @@
1
+ {
2
+ "min_session_length": 10,
3
+ "extraction_threshold": "medium",
4
+ "auto_approve": false,
5
+ "learned_skills_path": "~/.claude/skills/learned/",
6
+ "patterns_to_detect": [
7
+ "error_resolution",
8
+ "user_corrections",
9
+ "workarounds",
10
+ "debugging_techniques",
11
+ "project_specific"
12
+ ],
13
+ "ignore_patterns": [
14
+ "simple_typos",
15
+ "one_time_fixes",
16
+ "external_api_issues"
17
+ ]
18
+ }
@@ -0,0 +1,60 @@
1
+ #!/bin/bash
2
+ # Continuous Learning - Session Evaluator
3
+ # Runs on Stop hook to extract reusable patterns from Claude Code sessions
4
+ #
5
+ # Why Stop hook instead of UserPromptSubmit:
6
+ # - Stop runs once at session end (lightweight)
7
+ # - UserPromptSubmit runs every message (heavy, adds latency)
8
+ #
9
+ # Hook config (in ~/.claude/settings.json):
10
+ # {
11
+ # "hooks": {
12
+ # "Stop": [{
13
+ # "matcher": "*",
14
+ # "hooks": [{
15
+ # "type": "command",
16
+ # "command": "~/.claude/skills/continuous-learning/evaluate-session.sh"
17
+ # }]
18
+ # }]
19
+ # }
20
+ # }
21
+ #
22
+ # Patterns to detect: error_resolution, debugging_techniques, workarounds, project_specific
23
+ # Patterns to ignore: simple_typos, one_time_fixes, external_api_issues
24
+ # Extracted skills saved to: ~/.claude/skills/learned/
25
+
26
+ set -e
27
+
28
+ SCRIPT_DIR="$(cd "$(dirname "${BASH_SOURCE[0]}")" && pwd)"
29
+ CONFIG_FILE="$SCRIPT_DIR/config.json"
30
+ LEARNED_SKILLS_PATH="${HOME}/.claude/skills/learned"
31
+ MIN_SESSION_LENGTH=10
32
+
33
+ # Load config if exists
34
+ if [ -f "$CONFIG_FILE" ]; then
35
+ MIN_SESSION_LENGTH=$(jq -r '.min_session_length // 10' "$CONFIG_FILE")
36
+ LEARNED_SKILLS_PATH=$(jq -r '.learned_skills_path // "~/.claude/skills/learned/"' "$CONFIG_FILE" | sed "s|~|$HOME|")
37
+ fi
38
+
39
+ # Ensure learned skills directory exists
40
+ mkdir -p "$LEARNED_SKILLS_PATH"
41
+
42
+ # Get transcript path from environment (set by Claude Code)
43
+ transcript_path="${CLAUDE_TRANSCRIPT_PATH:-}"
44
+
45
+ if [ -z "$transcript_path" ] || [ ! -f "$transcript_path" ]; then
46
+ exit 0
47
+ fi
48
+
49
+ # Count messages in session
50
+ message_count=$(grep -c '"type":"user"' "$transcript_path" 2>/dev/null || echo "0")
51
+
52
+ # Skip short sessions
53
+ if [ "$message_count" -lt "$MIN_SESSION_LENGTH" ]; then
54
+ echo "[ContinuousLearning] Session too short ($message_count messages), skipping" >&2
55
+ exit 0
56
+ fi
57
+
58
+ # Signal to Claude that session should be evaluated for extractable patterns
59
+ echo "[ContinuousLearning] Session has $message_count messages - evaluate for extractable patterns" >&2
60
+ echo "[ContinuousLearning] Save learned skills to: $LEARNED_SKILLS_PATH" >&2