claudecode-omc 5.6.5 → 5.6.6

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 (378) hide show
  1. package/.local/commands/code-review.md +416 -0
  2. package/.local/commands/pr.md +250 -0
  3. package/.local/commands/prp-pr.md +244 -0
  4. package/.local/guidelines/CLAUDE.md +47 -0
  5. package/bundled/manifest.json +4 -4
  6. package/bundled/upstream/anthropic-skills/skills/algorithmic-art/LICENSE.txt +1 -1
  7. package/bundled/upstream/anthropic-skills/skills/brand-guidelines/LICENSE.txt +1 -1
  8. package/bundled/upstream/anthropic-skills/skills/canvas-design/LICENSE.txt +1 -1
  9. package/bundled/upstream/anthropic-skills/skills/claude-api/LICENSE.txt +1 -1
  10. package/bundled/upstream/anthropic-skills/skills/claude-api/SKILL.md +120 -58
  11. package/bundled/upstream/anthropic-skills/skills/claude-api/curl/examples.md +9 -9
  12. package/bundled/upstream/anthropic-skills/skills/claude-api/curl/managed-agents.md +336 -0
  13. package/bundled/upstream/anthropic-skills/skills/claude-api/go/managed-agents/README.md +561 -0
  14. package/bundled/upstream/anthropic-skills/skills/claude-api/java/claude-api.md +2 -2
  15. package/bundled/upstream/anthropic-skills/skills/claude-api/java/managed-agents/README.md +442 -0
  16. package/bundled/upstream/anthropic-skills/skills/claude-api/php/claude-api.md +10 -10
  17. package/bundled/upstream/anthropic-skills/skills/claude-api/php/managed-agents/README.md +435 -0
  18. package/bundled/upstream/anthropic-skills/skills/claude-api/python/claude-api/README.md +16 -16
  19. package/bundled/upstream/anthropic-skills/skills/claude-api/python/claude-api/batches.md +3 -3
  20. package/bundled/upstream/anthropic-skills/skills/claude-api/python/claude-api/files-api.md +3 -3
  21. package/bundled/upstream/anthropic-skills/skills/claude-api/python/claude-api/streaming.md +7 -7
  22. package/bundled/upstream/anthropic-skills/skills/claude-api/python/claude-api/tool-use.md +19 -19
  23. package/bundled/upstream/anthropic-skills/skills/claude-api/python/managed-agents/README.md +332 -0
  24. package/bundled/upstream/anthropic-skills/skills/claude-api/ruby/claude-api.md +4 -4
  25. package/bundled/upstream/anthropic-skills/skills/claude-api/ruby/managed-agents/README.md +389 -0
  26. package/bundled/upstream/anthropic-skills/skills/claude-api/shared/agent-design.md +101 -0
  27. package/bundled/upstream/anthropic-skills/skills/claude-api/shared/error-codes.md +11 -4
  28. package/bundled/upstream/anthropic-skills/skills/claude-api/shared/live-sources.md +60 -48
  29. package/bundled/upstream/anthropic-skills/skills/claude-api/shared/managed-agents-api-reference.md +372 -0
  30. package/bundled/upstream/anthropic-skills/skills/claude-api/shared/managed-agents-client-patterns.md +209 -0
  31. package/bundled/upstream/anthropic-skills/skills/claude-api/shared/managed-agents-core.md +220 -0
  32. package/bundled/upstream/anthropic-skills/skills/claude-api/shared/managed-agents-environments.md +211 -0
  33. package/bundled/upstream/anthropic-skills/skills/claude-api/shared/managed-agents-events.md +195 -0
  34. package/bundled/upstream/anthropic-skills/skills/claude-api/shared/managed-agents-memory.md +197 -0
  35. package/bundled/upstream/anthropic-skills/skills/claude-api/shared/managed-agents-multiagent.md +99 -0
  36. package/bundled/upstream/anthropic-skills/skills/claude-api/shared/managed-agents-onboarding.md +114 -0
  37. package/bundled/upstream/anthropic-skills/skills/claude-api/shared/managed-agents-outcomes.md +106 -0
  38. package/bundled/upstream/anthropic-skills/skills/claude-api/shared/managed-agents-overview.md +67 -0
  39. package/bundled/upstream/anthropic-skills/skills/claude-api/shared/managed-agents-tools.md +315 -0
  40. package/bundled/upstream/anthropic-skills/skills/claude-api/shared/managed-agents-webhooks.md +110 -0
  41. package/bundled/upstream/anthropic-skills/skills/claude-api/shared/model-migration.md +779 -0
  42. package/bundled/upstream/anthropic-skills/skills/claude-api/shared/models.md +16 -14
  43. package/bundled/upstream/anthropic-skills/skills/claude-api/shared/prompt-caching.md +45 -2
  44. package/bundled/upstream/anthropic-skills/skills/claude-api/shared/tool-use-concepts.md +28 -6
  45. package/bundled/upstream/anthropic-skills/skills/claude-api/typescript/claude-api/README.md +15 -15
  46. package/bundled/upstream/anthropic-skills/skills/claude-api/typescript/claude-api/batches.md +2 -2
  47. package/bundled/upstream/anthropic-skills/skills/claude-api/typescript/claude-api/files-api.md +1 -1
  48. package/bundled/upstream/anthropic-skills/skills/claude-api/typescript/claude-api/streaming.md +5 -5
  49. package/bundled/upstream/anthropic-skills/skills/claude-api/typescript/claude-api/tool-use.md +15 -15
  50. package/bundled/upstream/anthropic-skills/skills/claude-api/typescript/managed-agents/README.md +359 -0
  51. package/bundled/upstream/anthropic-skills/skills/internal-comms/LICENSE.txt +1 -1
  52. package/bundled/upstream/anthropic-skills/skills/mcp-builder/LICENSE.txt +1 -1
  53. package/bundled/upstream/anthropic-skills/skills/skill-creator/LICENSE.txt +1 -1
  54. package/bundled/upstream/anthropic-skills/skills/slack-gif-creator/LICENSE.txt +1 -1
  55. package/bundled/upstream/anthropic-skills/skills/theme-factory/LICENSE.txt +1 -1
  56. package/bundled/upstream/anthropic-skills/skills/web-artifacts-builder/LICENSE.txt +1 -1
  57. package/bundled/upstream/anthropic-skills/skills/webapp-testing/LICENSE.txt +1 -1
  58. package/bundled/upstream/ecc/.omc-source/bundle.json +2 -3
  59. package/bundled/upstream/ecc/.omc-source/manifests/.claude-plugin/marketplace.json +4 -4
  60. package/bundled/upstream/ecc/agents/a11y-architect.md +10 -2
  61. package/bundled/upstream/ecc/agents/architect.md +9 -0
  62. package/bundled/upstream/ecc/agents/build-error-resolver.md +9 -0
  63. package/bundled/upstream/ecc/agents/chief-of-staff.md +9 -0
  64. package/bundled/upstream/ecc/agents/code-architect.md +9 -0
  65. package/bundled/upstream/ecc/agents/code-explorer.md +10 -1
  66. package/bundled/upstream/ecc/agents/code-reviewer.md +87 -1
  67. package/bundled/upstream/ecc/agents/code-simplifier.md +9 -0
  68. package/bundled/upstream/ecc/agents/comment-analyzer.md +10 -1
  69. package/bundled/upstream/ecc/agents/conversation-analyzer.md +9 -0
  70. package/bundled/upstream/ecc/agents/cpp-build-resolver.md +9 -0
  71. package/bundled/upstream/ecc/agents/cpp-reviewer.md +9 -0
  72. package/bundled/upstream/ecc/agents/csharp-reviewer.md +9 -0
  73. package/bundled/upstream/ecc/agents/dart-build-resolver.md +9 -0
  74. package/bundled/upstream/ecc/agents/database-reviewer.md +9 -0
  75. package/bundled/upstream/ecc/agents/django-build-resolver.md +252 -0
  76. package/bundled/upstream/ecc/agents/django-reviewer.md +169 -0
  77. package/bundled/upstream/ecc/agents/doc-updater.md +9 -0
  78. package/bundled/upstream/ecc/agents/docs-lookup.md +9 -0
  79. package/bundled/upstream/ecc/agents/e2e-runner.md +9 -0
  80. package/bundled/upstream/ecc/agents/fastapi-reviewer.md +79 -0
  81. package/bundled/upstream/ecc/agents/flutter-reviewer.md +9 -0
  82. package/bundled/upstream/ecc/agents/fsharp-reviewer.md +109 -0
  83. package/bundled/upstream/ecc/agents/gan-evaluator.md +9 -0
  84. package/bundled/upstream/ecc/agents/gan-generator.md +9 -0
  85. package/bundled/upstream/ecc/agents/gan-planner.md +9 -0
  86. package/bundled/upstream/ecc/agents/go-build-resolver.md +9 -0
  87. package/bundled/upstream/ecc/agents/go-reviewer.md +9 -0
  88. package/bundled/upstream/ecc/agents/harmonyos-app-resolver.md +182 -0
  89. package/bundled/upstream/ecc/agents/harness-optimizer.md +9 -0
  90. package/bundled/upstream/ecc/agents/healthcare-reviewer.md +9 -0
  91. package/bundled/upstream/ecc/agents/homelab-architect.md +107 -0
  92. package/bundled/upstream/ecc/agents/java-build-resolver.md +133 -11
  93. package/bundled/upstream/ecc/agents/java-reviewer.md +130 -32
  94. package/bundled/upstream/ecc/agents/kotlin-build-resolver.md +9 -0
  95. package/bundled/upstream/ecc/agents/kotlin-reviewer.md +9 -0
  96. package/bundled/upstream/ecc/agents/loop-operator.md +9 -0
  97. package/bundled/upstream/ecc/agents/mle-reviewer.md +162 -0
  98. package/bundled/upstream/ecc/agents/network-architect.md +106 -0
  99. package/bundled/upstream/ecc/agents/network-config-reviewer.md +106 -0
  100. package/bundled/upstream/ecc/agents/network-troubleshooter.md +128 -0
  101. package/bundled/upstream/ecc/agents/opensource-forker.md +9 -0
  102. package/bundled/upstream/ecc/agents/opensource-packager.md +9 -0
  103. package/bundled/upstream/ecc/agents/opensource-sanitizer.md +9 -0
  104. package/bundled/upstream/ecc/agents/performance-optimizer.md +9 -0
  105. package/bundled/upstream/ecc/agents/planner.md +9 -0
  106. package/bundled/upstream/ecc/agents/pr-test-analyzer.md +9 -0
  107. package/bundled/upstream/ecc/agents/python-reviewer.md +9 -0
  108. package/bundled/upstream/ecc/agents/pytorch-build-resolver.md +12 -3
  109. package/bundled/upstream/ecc/agents/refactor-cleaner.md +9 -0
  110. package/bundled/upstream/ecc/agents/rust-build-resolver.md +9 -0
  111. package/bundled/upstream/ecc/agents/rust-reviewer.md +9 -0
  112. package/bundled/upstream/ecc/agents/security-reviewer.md +9 -0
  113. package/bundled/upstream/ecc/agents/seo-specialist.md +10 -1
  114. package/bundled/upstream/ecc/agents/silent-failure-hunter.md +9 -0
  115. package/bundled/upstream/ecc/agents/swift-build-resolver.md +170 -0
  116. package/bundled/upstream/ecc/agents/swift-reviewer.md +116 -0
  117. package/bundled/upstream/ecc/agents/tdd-guide.md +9 -0
  118. package/bundled/upstream/ecc/agents/type-design-analyzer.md +10 -1
  119. package/bundled/upstream/ecc/agents/typescript-reviewer.md +9 -0
  120. package/bundled/upstream/ecc/commands/auto-update.md +28 -0
  121. package/bundled/upstream/ecc/commands/build-fix.md +4 -0
  122. package/bundled/upstream/ecc/commands/checkpoint.md +4 -0
  123. package/bundled/upstream/ecc/commands/code-review.md +3 -3
  124. package/bundled/upstream/ecc/commands/cost-report.md +107 -0
  125. package/bundled/upstream/ecc/commands/cpp-build.md +1 -1
  126. package/bundled/upstream/ecc/commands/cpp-test.md +1 -1
  127. package/bundled/upstream/ecc/commands/ecc-guide.md +93 -0
  128. package/bundled/upstream/ecc/commands/fastapi-review.md +39 -0
  129. package/bundled/upstream/ecc/commands/flutter-build.md +1 -1
  130. package/bundled/upstream/ecc/commands/flutter-test.md +1 -1
  131. package/bundled/upstream/ecc/commands/gan-build.md +4 -0
  132. package/bundled/upstream/ecc/commands/gan-design.md +4 -0
  133. package/bundled/upstream/ecc/commands/go-build.md +1 -1
  134. package/bundled/upstream/ecc/commands/go-test.md +1 -1
  135. package/bundled/upstream/ecc/commands/harness-audit.md +4 -0
  136. package/bundled/upstream/ecc/commands/jira.md +2 -2
  137. package/bundled/upstream/ecc/commands/kotlin-build.md +1 -1
  138. package/bundled/upstream/ecc/commands/kotlin-test.md +1 -1
  139. package/bundled/upstream/ecc/commands/learn.md +4 -0
  140. package/bundled/upstream/ecc/commands/loop-start.md +4 -0
  141. package/bundled/upstream/ecc/commands/loop-status.md +54 -1
  142. package/bundled/upstream/ecc/commands/model-route.md +4 -0
  143. package/bundled/upstream/ecc/commands/multi-backend.md +4 -0
  144. package/bundled/upstream/ecc/commands/multi-execute.md +4 -0
  145. package/bundled/upstream/ecc/commands/multi-frontend.md +4 -0
  146. package/bundled/upstream/ecc/commands/multi-plan.md +4 -0
  147. package/bundled/upstream/ecc/commands/multi-workflow.md +4 -0
  148. package/bundled/upstream/ecc/commands/plan-prd.md +160 -0
  149. package/bundled/upstream/ecc/commands/plan.md +96 -13
  150. package/bundled/upstream/ecc/commands/pm2.md +4 -0
  151. package/bundled/upstream/ecc/commands/pr.md +184 -0
  152. package/bundled/upstream/ecc/commands/project-init.md +86 -0
  153. package/bundled/upstream/ecc/commands/python-review.md +1 -1
  154. package/bundled/upstream/ecc/commands/quality-gate.md +4 -0
  155. package/bundled/upstream/ecc/commands/refactor-clean.md +4 -0
  156. package/bundled/upstream/ecc/commands/rust-build.md +1 -1
  157. package/bundled/upstream/ecc/commands/rust-test.md +1 -1
  158. package/bundled/upstream/ecc/commands/security-scan.md +92 -0
  159. package/bundled/upstream/ecc/commands/sessions.md +6 -6
  160. package/bundled/upstream/ecc/commands/skill-health.md +3 -3
  161. package/bundled/upstream/ecc/commands/test-coverage.md +4 -0
  162. package/bundled/upstream/ecc/commands/update-codemaps.md +4 -0
  163. package/bundled/upstream/ecc/commands/update-docs.md +4 -0
  164. package/bundled/upstream/ecc/skills/accessibility/SKILL.md +1 -1
  165. package/bundled/upstream/ecc/skills/agent-architecture-audit/SKILL.md +256 -0
  166. package/bundled/upstream/ecc/skills/agent-payment-x402/SKILL.md +49 -3
  167. package/bundled/upstream/ecc/skills/agentic-os/SKILL.md +387 -0
  168. package/bundled/upstream/ecc/skills/angular-developer/SKILL.md +154 -0
  169. package/bundled/upstream/ecc/skills/angular-developer/references/angular-animations.md +160 -0
  170. package/bundled/upstream/ecc/skills/angular-developer/references/angular-aria.md +410 -0
  171. package/bundled/upstream/ecc/skills/angular-developer/references/cli.md +86 -0
  172. package/bundled/upstream/ecc/skills/angular-developer/references/component-harnesses.md +59 -0
  173. package/bundled/upstream/ecc/skills/angular-developer/references/component-styling.md +91 -0
  174. package/bundled/upstream/ecc/skills/angular-developer/references/components.md +117 -0
  175. package/bundled/upstream/ecc/skills/angular-developer/references/creating-services.md +97 -0
  176. package/bundled/upstream/ecc/skills/angular-developer/references/data-resolvers.md +69 -0
  177. package/bundled/upstream/ecc/skills/angular-developer/references/define-routes.md +67 -0
  178. package/bundled/upstream/ecc/skills/angular-developer/references/defining-providers.md +72 -0
  179. package/bundled/upstream/ecc/skills/angular-developer/references/di-fundamentals.md +120 -0
  180. package/bundled/upstream/ecc/skills/angular-developer/references/e2e-testing.md +56 -0
  181. package/bundled/upstream/ecc/skills/angular-developer/references/effects.md +83 -0
  182. package/bundled/upstream/ecc/skills/angular-developer/references/hierarchical-injectors.md +43 -0
  183. package/bundled/upstream/ecc/skills/angular-developer/references/host-elements.md +80 -0
  184. package/bundled/upstream/ecc/skills/angular-developer/references/injection-context.md +63 -0
  185. package/bundled/upstream/ecc/skills/angular-developer/references/inputs.md +101 -0
  186. package/bundled/upstream/ecc/skills/angular-developer/references/linked-signal.md +59 -0
  187. package/bundled/upstream/ecc/skills/angular-developer/references/loading-strategies.md +61 -0
  188. package/bundled/upstream/ecc/skills/angular-developer/references/mcp.md +108 -0
  189. package/bundled/upstream/ecc/skills/angular-developer/references/navigate-to-routes.md +69 -0
  190. package/bundled/upstream/ecc/skills/angular-developer/references/outputs.md +86 -0
  191. package/bundled/upstream/ecc/skills/angular-developer/references/reactive-forms.md +122 -0
  192. package/bundled/upstream/ecc/skills/angular-developer/references/rendering-strategies.md +44 -0
  193. package/bundled/upstream/ecc/skills/angular-developer/references/resource.md +77 -0
  194. package/bundled/upstream/ecc/skills/angular-developer/references/route-animations.md +56 -0
  195. package/bundled/upstream/ecc/skills/angular-developer/references/route-guards.md +52 -0
  196. package/bundled/upstream/ecc/skills/angular-developer/references/router-lifecycle.md +45 -0
  197. package/bundled/upstream/ecc/skills/angular-developer/references/router-testing.md +87 -0
  198. package/bundled/upstream/ecc/skills/angular-developer/references/show-routes-with-outlets.md +68 -0
  199. package/bundled/upstream/ecc/skills/angular-developer/references/signal-forms.md +795 -0
  200. package/bundled/upstream/ecc/skills/angular-developer/references/signals-overview.md +94 -0
  201. package/bundled/upstream/ecc/skills/angular-developer/references/tailwind-css.md +69 -0
  202. package/bundled/upstream/ecc/skills/angular-developer/references/template-driven-forms.md +114 -0
  203. package/bundled/upstream/ecc/skills/angular-developer/references/testing-fundamentals.md +65 -0
  204. package/bundled/upstream/ecc/skills/autonomous-agent-harness/SKILL.md +6 -0
  205. package/bundled/upstream/ecc/skills/backend-patterns/SKILL.md +8 -45
  206. package/bundled/upstream/ecc/skills/cisco-ios-patterns/SKILL.md +163 -0
  207. package/bundled/upstream/ecc/skills/configure-ecc/SKILL.md +31 -14
  208. package/bundled/upstream/ecc/skills/continuous-learning/SKILL.md +10 -2
  209. package/bundled/upstream/ecc/skills/continuous-learning-v2/SKILL.md +19 -5
  210. package/bundled/upstream/ecc/skills/continuous-learning-v2/agents/observer-loop.sh +44 -4
  211. package/bundled/upstream/ecc/skills/continuous-learning-v2/agents/observer.md +4 -4
  212. package/bundled/upstream/ecc/skills/continuous-learning-v2/agents/start-observer.sh +5 -1
  213. package/bundled/upstream/ecc/skills/continuous-learning-v2/hooks/observe.sh +21 -5
  214. package/bundled/upstream/ecc/skills/continuous-learning-v2/scripts/detect-project.sh +58 -13
  215. package/bundled/upstream/ecc/skills/continuous-learning-v2/scripts/instinct-cli.py +97 -4
  216. package/bundled/upstream/ecc/skills/continuous-learning-v2/scripts/lib/homunculus-dir.sh +31 -0
  217. package/bundled/upstream/ecc/skills/continuous-learning-v2/scripts/migrate-homunculus.sh +62 -0
  218. package/bundled/upstream/ecc/skills/continuous-learning-v2/scripts/test_parse_instinct.py +34 -0
  219. package/bundled/upstream/ecc/skills/cost-tracking/SKILL.md +147 -0
  220. package/bundled/upstream/ecc/skills/deep-research/SKILL.md +4 -0
  221. package/bundled/upstream/ecc/skills/defi-amm-security/SKILL.md +6 -0
  222. package/bundled/upstream/ecc/skills/django-celery/SKILL.md +457 -0
  223. package/bundled/upstream/ecc/skills/ecc-guide/SKILL.md +189 -0
  224. package/bundled/upstream/ecc/skills/error-handling/SKILL.md +376 -0
  225. package/bundled/upstream/ecc/skills/exa-search/SKILL.md +4 -0
  226. package/bundled/upstream/ecc/skills/fal-ai-media/SKILL.md +4 -0
  227. package/bundled/upstream/ecc/skills/fastapi-patterns/SKILL.md +327 -0
  228. package/bundled/upstream/ecc/skills/flox-environments/SKILL.md +496 -0
  229. package/bundled/upstream/ecc/skills/frontend-design-direction/SKILL.md +92 -0
  230. package/bundled/upstream/ecc/skills/frontend-slides/animation-patterns.md +122 -0
  231. package/bundled/upstream/ecc/skills/frontend-slides/html-template.md +419 -0
  232. package/bundled/upstream/ecc/skills/frontend-slides/scripts/export-pdf.sh +418 -0
  233. package/bundled/upstream/ecc/skills/frontend-slides/scripts/extract-pptx.py +96 -0
  234. package/bundled/upstream/ecc/skills/frontend-slides/viewport-base.css +153 -0
  235. package/bundled/upstream/ecc/skills/fsharp-testing/SKILL.md +280 -0
  236. package/bundled/upstream/ecc/skills/gateguard/SKILL.md +4 -0
  237. package/bundled/upstream/ecc/skills/hermes-imports/SKILL.md +88 -0
  238. package/bundled/upstream/ecc/skills/homelab-network-readiness/SKILL.md +169 -0
  239. package/bundled/upstream/ecc/skills/homelab-network-setup/SKILL.md +129 -0
  240. package/bundled/upstream/ecc/skills/homelab-pihole-dns/SKILL.md +274 -0
  241. package/bundled/upstream/ecc/skills/homelab-vlan-segmentation/SKILL.md +311 -0
  242. package/bundled/upstream/ecc/skills/homelab-wireguard-vpn/SKILL.md +305 -0
  243. package/bundled/upstream/ecc/skills/ios-icon-gen/SKILL.md +157 -0
  244. package/bundled/upstream/ecc/skills/ios-icon-gen/scripts/generate_icons.swift +258 -0
  245. package/bundled/upstream/ecc/skills/ios-icon-gen/scripts/iconify_gen.sh +235 -0
  246. package/bundled/upstream/ecc/skills/java-coding-standards/SKILL.md +241 -5
  247. package/bundled/upstream/ecc/skills/make-interfaces-feel-better/SKILL.md +151 -0
  248. package/bundled/upstream/ecc/skills/mle-workflow/SKILL.md +346 -0
  249. package/bundled/upstream/ecc/skills/motion-advanced/SKILL.md +596 -0
  250. package/bundled/upstream/ecc/skills/motion-foundations/SKILL.md +299 -0
  251. package/bundled/upstream/ecc/skills/motion-patterns/SKILL.md +435 -0
  252. package/bundled/upstream/ecc/skills/motion-ui/SKILL.md +575 -0
  253. package/bundled/upstream/ecc/skills/mysql-patterns/SKILL.md +412 -0
  254. package/bundled/upstream/ecc/skills/netmiko-ssh-automation/SKILL.md +173 -0
  255. package/bundled/upstream/ecc/skills/network-bgp-diagnostics/SKILL.md +167 -0
  256. package/bundled/upstream/ecc/skills/network-config-validation/SKILL.md +210 -0
  257. package/bundled/upstream/ecc/skills/network-interface-health/SKILL.md +152 -0
  258. package/bundled/upstream/ecc/skills/openclaw-persona-forge/SKILL.md +1 -9
  259. package/bundled/upstream/ecc/skills/plan-orchestrate/SKILL.md +262 -0
  260. package/bundled/upstream/ecc/skills/prisma-patterns/SKILL.md +371 -0
  261. package/bundled/upstream/ecc/skills/production-audit/SKILL.md +206 -0
  262. package/bundled/upstream/ecc/skills/prompt-optimizer/SKILL.md +24 -400
  263. package/bundled/upstream/ecc/skills/quarkus-patterns/SKILL.md +722 -0
  264. package/bundled/upstream/ecc/skills/quarkus-security/SKILL.md +467 -0
  265. package/bundled/upstream/ecc/skills/quarkus-tdd/SKILL.md +811 -0
  266. package/bundled/upstream/ecc/skills/quarkus-verification/SKILL.md +479 -0
  267. package/bundled/upstream/ecc/skills/redis-patterns/SKILL.md +403 -0
  268. package/bundled/upstream/ecc/skills/scientific-db-pubmed-database/SKILL.md +175 -0
  269. package/bundled/upstream/ecc/skills/scientific-db-uspto-database/SKILL.md +177 -0
  270. package/bundled/upstream/ecc/skills/scientific-pkg-gget/SKILL.md +166 -0
  271. package/bundled/upstream/ecc/skills/scientific-thinking-literature-review/SKILL.md +192 -0
  272. package/bundled/upstream/ecc/skills/scientific-thinking-scholar-evaluation/SKILL.md +160 -0
  273. package/bundled/upstream/ecc/skills/search-first/SKILL.md +23 -2
  274. package/bundled/upstream/ecc/skills/security-review/SKILL.md +10 -2
  275. package/bundled/upstream/ecc/skills/skill-comply/scripts/runner.py +28 -3
  276. package/bundled/upstream/ecc/skills/skill-comply/tests/test_runner.py +172 -0
  277. package/bundled/upstream/ecc/skills/skill-scout/SKILL.md +140 -0
  278. package/bundled/upstream/ecc/skills/skill-stocktake/SKILL.md +1 -0
  279. package/bundled/upstream/ecc/skills/strategic-compact/SKILL.md +2 -2
  280. package/bundled/upstream/ecc/skills/tinystruct-patterns/SKILL.md +203 -0
  281. package/bundled/upstream/ecc/skills/tinystruct-patterns/references/architecture.md +90 -0
  282. package/bundled/upstream/ecc/skills/tinystruct-patterns/references/data-handling.md +60 -0
  283. package/bundled/upstream/ecc/skills/tinystruct-patterns/references/database.md +99 -0
  284. package/bundled/upstream/ecc/skills/tinystruct-patterns/references/routing.md +64 -0
  285. package/bundled/upstream/ecc/skills/tinystruct-patterns/references/system-usage.md +97 -0
  286. package/bundled/upstream/ecc/skills/tinystruct-patterns/references/testing.md +72 -0
  287. package/bundled/upstream/ecc/skills/ui-to-vue/SKILL.md +134 -0
  288. package/bundled/upstream/ecc/skills/vite-patterns/SKILL.md +449 -0
  289. package/bundled/upstream/ecc/skills/windows-desktop-e2e/SKILL.md +788 -0
  290. package/bundled/upstream/ecc/skills/x-api/SKILL.md +4 -0
  291. package/bundled/upstream/oh-my-claudecode/.omc-source/bundle.json +20 -0
  292. package/bundled/upstream/oh-my-claudecode/agents/analyst.md +2 -1
  293. package/bundled/upstream/oh-my-claudecode/agents/architect.md +2 -1
  294. package/bundled/upstream/oh-my-claudecode/agents/code-reviewer.md +26 -7
  295. package/bundled/upstream/oh-my-claudecode/agents/critic.md +2 -1
  296. package/bundled/upstream/oh-my-claudecode/agents/debugger.md +2 -1
  297. package/bundled/upstream/oh-my-claudecode/agents/designer.md +14 -1
  298. package/bundled/upstream/oh-my-claudecode/agents/document-specialist.md +1 -1
  299. package/bundled/upstream/oh-my-claudecode/agents/executor.md +2 -1
  300. package/bundled/upstream/oh-my-claudecode/agents/explore.md +2 -1
  301. package/bundled/upstream/oh-my-claudecode/agents/git-master.md +2 -1
  302. package/bundled/upstream/oh-my-claudecode/agents/planner.md +2 -1
  303. package/bundled/upstream/oh-my-claudecode/agents/qa-tester.md +2 -1
  304. package/bundled/upstream/oh-my-claudecode/agents/scientist.md +2 -1
  305. package/bundled/upstream/oh-my-claudecode/agents/security-reviewer.md +2 -1
  306. package/bundled/upstream/oh-my-claudecode/agents/test-engineer.md +2 -1
  307. package/bundled/upstream/oh-my-claudecode/agents/tracer.md +2 -1
  308. package/bundled/upstream/oh-my-claudecode/agents/verifier.md +2 -1
  309. package/bundled/upstream/oh-my-claudecode/agents/writer.md +2 -1
  310. package/bundled/upstream/oh-my-claudecode/skills/AGENTS.md +4 -3
  311. package/bundled/upstream/oh-my-claudecode/skills/ai-slop-cleaner/SKILL.md +12 -0
  312. package/bundled/upstream/oh-my-claudecode/skills/deep-dive/SKILL.md +69 -13
  313. package/bundled/upstream/oh-my-claudecode/skills/deep-interview/SKILL.md +176 -63
  314. package/bundled/upstream/oh-my-claudecode/skills/learner/SKILL.md +3 -1
  315. package/bundled/upstream/oh-my-claudecode/skills/omc-doctor/SKILL.md +22 -3
  316. package/bundled/upstream/oh-my-claudecode/skills/omc-reference/SKILL.md +1 -1
  317. package/bundled/upstream/oh-my-claudecode/skills/omc-setup/phases/01-install-claude-md.md +2 -2
  318. package/bundled/upstream/oh-my-claudecode/skills/omc-setup/phases/02-configure.md +45 -2
  319. package/bundled/upstream/oh-my-claudecode/skills/omc-setup/phases/03-integrations.md +46 -5
  320. package/bundled/upstream/oh-my-claudecode/skills/plan/SKILL.md +19 -17
  321. package/bundled/upstream/oh-my-claudecode/skills/project-session-manager/lib/config.sh +1 -1
  322. package/bundled/upstream/oh-my-claudecode/skills/project-session-manager/lib/parse.sh +1 -1
  323. package/bundled/upstream/oh-my-claudecode/skills/project-session-manager/lib/providers/azure-devops.sh +1 -1
  324. package/bundled/upstream/oh-my-claudecode/skills/project-session-manager/lib/providers/bitbucket.sh +1 -1
  325. package/bundled/upstream/oh-my-claudecode/skills/project-session-manager/lib/providers/gitea.sh +1 -1
  326. package/bundled/upstream/oh-my-claudecode/skills/project-session-manager/lib/providers/github.sh +1 -1
  327. package/bundled/upstream/oh-my-claudecode/skills/project-session-manager/lib/providers/gitlab.sh +1 -1
  328. package/bundled/upstream/oh-my-claudecode/skills/project-session-manager/lib/providers/interface.sh +1 -1
  329. package/bundled/upstream/oh-my-claudecode/skills/project-session-manager/lib/providers/jira.sh +1 -1
  330. package/bundled/upstream/oh-my-claudecode/skills/project-session-manager/lib/session.sh +1 -1
  331. package/bundled/upstream/oh-my-claudecode/skills/project-session-manager/lib/tmux.sh +1 -1
  332. package/bundled/upstream/oh-my-claudecode/skills/project-session-manager/lib/worktree.sh +1 -1
  333. package/bundled/upstream/oh-my-claudecode/skills/project-session-manager/psm.sh +1 -1
  334. package/bundled/upstream/oh-my-claudecode/skills/project-session-manager/tests/test-psm-prompt-injection.sh +1 -1
  335. package/bundled/upstream/oh-my-claudecode/skills/ralph/SKILL.md +8 -8
  336. package/bundled/upstream/oh-my-claudecode/skills/ralplan/SKILL.md +9 -5
  337. package/bundled/upstream/oh-my-claudecode/skills/skill/SKILL.md +6 -6
  338. package/bundled/upstream/oh-my-claudecode/skills/skillify/SKILL.md +19 -3
  339. package/bundled/upstream/oh-my-claudecode/skills/trace/SKILL.md +3 -1
  340. package/bundled/upstream/oh-my-claudecode/skills/ultrawork/SKILL.md +20 -7
  341. package/bundled/upstream/superpowers/.omc-source/bundle.json +21 -0
  342. package/bundled/upstream/superpowers/hooks/hooks-cursor.json +1 -1
  343. package/bundled/upstream/superpowers/skills/executing-plans/SKILL.md +1 -1
  344. package/bundled/upstream/superpowers/skills/finishing-a-development-branch/SKILL.md +93 -42
  345. package/bundled/upstream/superpowers/skills/requesting-code-review/SKILL.md +7 -9
  346. package/bundled/upstream/superpowers/skills/requesting-code-review/code-reviewer.md +107 -85
  347. package/bundled/upstream/superpowers/skills/subagent-driven-development/SKILL.md +3 -1
  348. package/bundled/upstream/superpowers/skills/subagent-driven-development/code-quality-reviewer-prompt.md +2 -3
  349. package/bundled/upstream/superpowers/skills/systematic-debugging/CREATION-LOG.md +1 -1
  350. package/bundled/upstream/superpowers/skills/systematic-debugging/root-cause-tracing.md +1 -1
  351. package/bundled/upstream/superpowers/skills/using-git-worktrees/SKILL.md +95 -98
  352. package/bundled/upstream/superpowers/skills/using-superpowers/references/codex-tools.md +7 -48
  353. package/bundled/upstream/superpowers/skills/using-superpowers/references/copilot-tools.md +1 -11
  354. package/bundled/upstream/superpowers/skills/using-superpowers/references/gemini-tools.md +21 -3
  355. package/bundled/upstream/superpowers/skills/writing-plans/SKILL.md +1 -1
  356. package/package.json +1 -1
  357. package/bundled/upstream/anthropic-skills/skills/claude-api/python/agent-sdk/README.md +0 -355
  358. package/bundled/upstream/anthropic-skills/skills/claude-api/python/agent-sdk/patterns.md +0 -359
  359. package/bundled/upstream/anthropic-skills/skills/claude-api/typescript/agent-sdk/README.md +0 -297
  360. package/bundled/upstream/anthropic-skills/skills/claude-api/typescript/agent-sdk/patterns.md +0 -209
  361. package/bundled/upstream/ecc/commands/agent-sort.md +0 -23
  362. package/bundled/upstream/ecc/commands/claw.md +0 -23
  363. package/bundled/upstream/ecc/commands/context-budget.md +0 -23
  364. package/bundled/upstream/ecc/commands/devfleet.md +0 -23
  365. package/bundled/upstream/ecc/commands/docs.md +0 -23
  366. package/bundled/upstream/ecc/commands/e2e.md +0 -268
  367. package/bundled/upstream/ecc/commands/eval.md +0 -23
  368. package/bundled/upstream/ecc/commands/orchestrate.md +0 -135
  369. package/bundled/upstream/ecc/commands/prompt-optimize.md +0 -23
  370. package/bundled/upstream/ecc/commands/rules-distill.md +0 -20
  371. package/bundled/upstream/ecc/commands/tdd.md +0 -231
  372. package/bundled/upstream/ecc/commands/verify.md +0 -23
  373. package/bundled/upstream/ecc/skills/claude-api/SKILL.md +0 -337
  374. package/bundled/upstream/ecc/skills/frontend-design/SKILL.md +0 -145
  375. package/bundled/upstream/superpowers/agents/code-reviewer.md +0 -48
  376. package/bundled/upstream/superpowers/commands/brainstorm.md +0 -5
  377. package/bundled/upstream/superpowers/commands/execute-plan.md +0 -5
  378. package/bundled/upstream/superpowers/commands/write-plan.md +0 -5
@@ -1,10 +1,18 @@
1
1
  ---
2
2
  name: continuous-learning
3
- description: Automatically extract reusable patterns from Claude Code sessions and save them as learned skills for future use.
3
+ description: "[DEPRECATED - use continuous-learning-v2] Legacy v1 stop-hook skill extractor. v2 is a strict superset with instinct-based, project-scoped, hook-reliable learning. Do not invoke v1; route continuous learning, session learning, and pattern extraction requests to continuous-learning-v2."
4
4
  origin: ECC
5
5
  ---
6
6
 
7
- # Continuous Learning Skill
7
+ # Continuous Learning Skill - DEPRECATED
8
+
9
+ > **DEPRECATED 2026-04-28.** Use `continuous-learning-v2` instead. v2 is a strict superset: stop-hook observation becomes PreToolUse/PostToolUse observation, full skills become atomic instincts with confidence scoring, and global-only storage becomes project-scoped plus global promotion.
10
+ >
11
+ > This file is kept for archival reference and backward compatibility with existing installs.
12
+
13
+ ---
14
+
15
+ ## Original v1 Documentation (archival)
8
16
 
9
17
  Automatically evaluates Claude Code sessions on end to extract reusable patterns that can be saved as learned skills.
10
18
 
@@ -26,7 +26,7 @@ An advanced learning system that turns your Claude Code sessions into reusable k
26
26
 
27
27
  | Feature | v2.0 | v2.1 |
28
28
  |---------|------|------|
29
- | Storage | Global (~/.claude/homunculus/) | Project-scoped (projects/<hash>/) |
29
+ | Storage | Global (`~/.claude/homunculus/`) | Project-scoped (`${XDG_DATA_HOME:-~/.local/share}/ecc-homunculus/projects/<hash>/`) |
30
30
  | Scope | All instincts apply everywhere | Project-scoped + global |
31
31
  | Detection | None | git remote URL / repo path |
32
32
  | Promotion | N/A | Project → global when seen in 2+ projects |
@@ -132,7 +132,21 @@ The system automatically detects your current project:
132
132
  3. **`git rev-parse --show-toplevel`** -- fallback using repo path (machine-specific)
133
133
  4. **Global fallback** -- if no project is detected, instincts go to global scope
134
134
 
135
- Each project gets a 12-character hash ID (e.g., `a1b2c3d4e5f6`). A registry file at `~/.claude/homunculus/projects.json` maps IDs to human-readable names.
135
+ Each project gets a 12-character hash ID (e.g., `a1b2c3d4e5f6`). A registry file at `${XDG_DATA_HOME:-~/.local/share}/ecc-homunculus/projects.json` maps IDs to human-readable names.
136
+
137
+ ### Data Directory
138
+
139
+ Continuous-learning-v2 stores observer data outside `~/.claude` so Claude Code's sensitive-path guard does not block background instinct writes:
140
+
141
+ 1. `CLV2_HOMUNCULUS_DIR` when set to an absolute path
142
+ 2. `$XDG_DATA_HOME/ecc-homunculus`
143
+ 3. `$HOME/.local/share/ecc-homunculus`
144
+
145
+ Existing users with data at `~/.claude/homunculus` can migrate once:
146
+
147
+ ```bash
148
+ bash skills/continuous-learning-v2/scripts/migrate-homunculus.sh
149
+ ```
136
150
 
137
151
  ## Quick Start
138
152
 
@@ -173,7 +187,7 @@ The system creates directories automatically on first use, but you can also crea
173
187
 
174
188
  ```bash
175
189
  # Global directories
176
- mkdir -p ~/.claude/homunculus/{instincts/{personal,inherited},evolved/{agents,skills,commands},projects}
190
+ mkdir -p "${XDG_DATA_HOME:-$HOME/.local/share}/ecc-homunculus"/{instincts/{personal,inherited},evolved/{agents,skills,commands},projects}
177
191
 
178
192
  # Project directories are auto-created when the hook first runs in a git repo
179
193
  ```
@@ -226,7 +240,7 @@ Other behavior (observation capture, instinct thresholds, project scoping, promo
226
240
  ## File Structure
227
241
 
228
242
  ```
229
- ~/.claude/homunculus/
243
+ ${XDG_DATA_HOME:-~/.local/share}/ecc-homunculus/
230
244
  +-- identity.json # Your profile, technical level
231
245
  +-- projects.json # Registry: project hash -> name/path/remote
232
246
  +-- observations.jsonl # Global observations (fallback)
@@ -322,7 +336,7 @@ Hooks fire **100% of the time**, deterministically. This means:
322
336
  ## Backward Compatibility
323
337
 
324
338
  v2.1 is fully compatible with v2.0 and v1:
325
- - Existing global instincts in `~/.claude/homunculus/instincts/` still work as global instincts
339
+ - Existing global instincts can be migrated from `~/.claude/homunculus/instincts/` with `scripts/migrate-homunculus.sh`
326
340
  - Existing `~/.claude/skills/learned/` skills from v1 still work
327
341
  - Stop hook still runs (but now also feeds into v2)
328
342
  - Gradual migration: run both in parallel
@@ -10,6 +10,7 @@ unset CLAUDECODE
10
10
 
11
11
  SLEEP_PID=""
12
12
  USR1_FIRED=0
13
+ PENDING_ANALYSIS=0
13
14
  ANALYZING=0
14
15
  LAST_ANALYSIS_EPOCH=0
15
16
  # Minimum seconds between analyses (prevents rapid re-triggering)
@@ -83,6 +84,28 @@ exit_if_idle_without_sessions() {
83
84
  fi
84
85
  }
85
86
 
87
+ wait_for_claude_analysis() {
88
+ local child_pid="$1"
89
+ local wait_status=0
90
+
91
+ while true; do
92
+ wait "$child_pid"
93
+ wait_status=$?
94
+
95
+ if [ "$wait_status" -eq 0 ]; then
96
+ return 0
97
+ fi
98
+
99
+ # SIGUSR1 can interrupt wait while the Claude child is still running.
100
+ # Re-wait in that case so a signal is not logged as a false child failure.
101
+ if kill -0 "$child_pid" 2>/dev/null; then
102
+ continue
103
+ fi
104
+
105
+ return "$wait_status"
106
+ done
107
+ }
108
+
86
109
  analyze_observations() {
87
110
  if [ ! -f "$OBSERVATIONS_FILE" ]; then
88
111
  return
@@ -217,7 +240,7 @@ PROMPT
217
240
  ) &
218
241
  watchdog_pid=$!
219
242
 
220
- wait "$claude_pid"
243
+ wait_for_claude_analysis "$claude_pid"
221
244
  exit_code=$?
222
245
  kill "$watchdog_pid" 2>/dev/null || true
223
246
  rm -f "$analysis_file"
@@ -236,14 +259,17 @@ PROMPT
236
259
  on_usr1() {
237
260
  [ -n "$SLEEP_PID" ] && kill "$SLEEP_PID" 2>/dev/null
238
261
  SLEEP_PID=""
239
- USR1_FIRED=1
240
262
 
241
- # Re-entrancy guard: skip if analysis is already running (#521)
263
+ # Re-entrancy guard: defer the nudge so the main loop runs a follow-up
264
+ # analysis immediately after the current analysis finishes.
242
265
  if [ "$ANALYZING" -eq 1 ]; then
243
- echo "[$(date)] Analysis already in progress, skipping signal" >> "$LOG_FILE"
266
+ PENDING_ANALYSIS=1
267
+ echo "[$(date)] Analysis already in progress, deferring signal" >> "$LOG_FILE"
244
268
  return
245
269
  fi
246
270
 
271
+ USR1_FIRED=1
272
+
247
273
  # Cooldown: skip if last analysis was too recent (#521)
248
274
  now_epoch=$(date +%s)
249
275
  elapsed=$(( now_epoch - LAST_ANALYSIS_EPOCH ))
@@ -268,6 +294,17 @@ SCRIPT_DIR="$(cd "$(dirname "$0")" && pwd)"
268
294
 
269
295
  while true; do
270
296
  exit_if_idle_without_sessions
297
+
298
+ if [ "$PENDING_ANALYSIS" -eq 1 ]; then
299
+ PENDING_ANALYSIS=0
300
+ USR1_FIRED=0
301
+ ANALYZING=1
302
+ analyze_observations
303
+ LAST_ANALYSIS_EPOCH=$(date +%s)
304
+ ANALYZING=0
305
+ continue
306
+ fi
307
+
271
308
  sleep "$OBSERVER_INTERVAL_SECONDS" &
272
309
  SLEEP_PID=$!
273
310
  wait "$SLEEP_PID" 2>/dev/null
@@ -277,6 +314,9 @@ while true; do
277
314
  if [ "$USR1_FIRED" -eq 1 ]; then
278
315
  USR1_FIRED=0
279
316
  else
317
+ ANALYZING=1
280
318
  analyze_observations
319
+ LAST_ANALYSIS_EPOCH=$(date +%s)
320
+ ANALYZING=0
281
321
  fi
282
322
  done
@@ -17,8 +17,8 @@ A background agent that analyzes observations from Claude Code sessions to detec
17
17
  ## Input
18
18
 
19
19
  Reads observations from the **project-scoped** observations file:
20
- - Project: `~/.claude/homunculus/projects/<project-hash>/observations.jsonl`
21
- - Global fallback: `~/.claude/homunculus/observations.jsonl`
20
+ - Project: `${XDG_DATA_HOME:-~/.local/share}/ecc-homunculus/projects/<project-hash>/observations.jsonl`
21
+ - Global fallback: `${XDG_DATA_HOME:-~/.local/share}/ecc-homunculus/observations.jsonl`
22
22
 
23
23
  ```jsonl
24
24
  {"timestamp":"2025-01-22T10:30:00Z","event":"tool_start","session":"abc123","tool":"Edit","input":"...","project_id":"a1b2c3d4e5f6","project_name":"my-react-app"}
@@ -66,8 +66,8 @@ When certain tools are consistently preferred:
66
66
  ## Output
67
67
 
68
68
  Creates/updates instincts in the **project-scoped** instincts directory:
69
- - Project: `~/.claude/homunculus/projects/<project-hash>/instincts/personal/`
70
- - Global: `~/.claude/homunculus/instincts/personal/` (for universal patterns)
69
+ - Project: `${XDG_DATA_HOME:-~/.local/share}/ecc-homunculus/projects/<project-hash>/instincts/personal/`
70
+ - Global: `${XDG_DATA_HOME:-~/.local/share}/ecc-homunculus/instincts/personal/` (for universal patterns)
71
71
 
72
72
  ### Project-Scoped Instinct (default)
73
73
 
@@ -35,9 +35,13 @@ PYTHON_CMD="${CLV2_PYTHON_CMD:-}"
35
35
  # Configuration
36
36
  # ─────────────────────────────────────────────
37
37
 
38
- CONFIG_DIR="${HOME}/.claude/homunculus"
38
+ # shellcheck disable=SC1091
39
+ . "${SKILL_ROOT}/scripts/lib/homunculus-dir.sh"
40
+ CONFIG_DIR="$(_ecc_resolve_homunculus_dir)"
39
41
  if [ -n "${CLV2_CONFIG:-}" ]; then
40
42
  CONFIG_FILE="$CLV2_CONFIG"
43
+ elif [ -f "${CONFIG_DIR}/config.json" ]; then
44
+ CONFIG_FILE="${CONFIG_DIR}/config.json"
41
45
  else
42
46
  CONFIG_FILE="${SKILL_ROOT}/config.json"
43
47
  fi
@@ -12,8 +12,20 @@
12
12
 
13
13
  set -e
14
14
 
15
- # Hook phase from CLI argument: "pre" (PreToolUse) or "post" (PostToolUse)
16
- HOOK_PHASE="${1:-post}"
15
+ # Hook phase from CLI argument: "pre" (PreToolUse) or "post" (PostToolUse).
16
+ # Manual settings.json installs can call this script without the plugin
17
+ # wrapper's positional phase argument, but Claude Code still exposes the hook
18
+ # event name in CLAUDE_HOOK_EVENT_NAME. Fall back to that env var before
19
+ # defaulting to post so manually registered PreToolUse hooks are recorded as
20
+ # tool_start instead of being silently misclassified as tool_complete.
21
+ HOOK_PHASE="${1:-}"
22
+ if [ -z "$HOOK_PHASE" ]; then
23
+ case "${CLAUDE_HOOK_EVENT_NAME:-}" in
24
+ PreToolUse|pretooluse|pre_tool_use|pre) HOOK_PHASE="pre" ;;
25
+ PostToolUse|posttooluse|post_tool_use|post) HOOK_PHASE="post" ;;
26
+ *) HOOK_PHASE="post" ;;
27
+ esac
28
+ fi
17
29
 
18
30
  # ─────────────────────────────────────────────
19
31
  # Read stdin first (before project detection)
@@ -115,7 +127,9 @@ fi
115
127
  # Sourcing detect-project.sh creates project-scoped directories and updates
116
128
  # projects.json, so automated sessions must return before that point.
117
129
 
118
- CONFIG_DIR="${HOME}/.claude/homunculus"
130
+ # shellcheck disable=SC1091
131
+ . "$(dirname "$0")/../scripts/lib/homunculus-dir.sh"
132
+ CONFIG_DIR="$(_ecc_resolve_homunculus_dir)"
119
133
 
120
134
  # Skip if disabled (check both default and CLV2_CONFIG-derived locations)
121
135
  if [ -f "$CONFIG_DIR/disabled" ]; then
@@ -344,10 +358,12 @@ if [ -f "${CONFIG_DIR}/disabled" ]; then
344
358
  OBSERVER_ENABLED=false
345
359
  else
346
360
  OBSERVER_ENABLED=false
347
- CONFIG_FILE="${SKILL_ROOT}/config.json"
348
- # Allow CLV2_CONFIG override
349
361
  if [ -n "${CLV2_CONFIG:-}" ]; then
350
362
  CONFIG_FILE="$CLV2_CONFIG"
363
+ elif [ -f "${CONFIG_DIR}/config.json" ]; then
364
+ CONFIG_FILE="${CONFIG_DIR}/config.json"
365
+ else
366
+ CONFIG_FILE="${SKILL_ROOT}/config.json"
351
367
  fi
352
368
  # Use effective config path for both existence check and reading
353
369
  EFFECTIVE_CONFIG="$CONFIG_FILE"
@@ -19,7 +19,9 @@
19
19
  # 3. git repo root path (fallback, machine-specific)
20
20
  # 4. "global" (no project context detected)
21
21
 
22
- _CLV2_HOMUNCULUS_DIR="${HOME}/.claude/homunculus"
22
+ # shellcheck disable=SC1091
23
+ . "$(dirname "${BASH_SOURCE[0]}")/lib/homunculus-dir.sh"
24
+ _CLV2_HOMUNCULUS_DIR="$(_ecc_resolve_homunculus_dir)"
23
25
  _CLV2_PROJECTS_DIR="${_CLV2_HOMUNCULUS_DIR}/projects"
24
26
  _CLV2_REGISTRY_FILE="${_CLV2_HOMUNCULUS_DIR}/projects.json"
25
27
 
@@ -49,6 +51,30 @@ export CLV2_PYTHON_CMD
49
51
  CLV2_OBSERVER_PROMPT_PATTERN='Can you confirm|requires permission|Awaiting (user confirmation|confirmation|approval|permission)|confirm I should proceed|once granted access|grant.*access'
50
52
  export CLV2_OBSERVER_PROMPT_PATTERN
51
53
 
54
+ _clv2_normalize_remote_url() {
55
+ local url="$1"
56
+ [ -z "$url" ] && return 0
57
+
58
+ local is_network=0
59
+ case "$url" in
60
+ file://*) is_network=0 ;;
61
+ *://*) is_network=1 ;;
62
+ *@*:*) is_network=1 ;;
63
+ *) is_network=0 ;;
64
+ esac
65
+
66
+ url=$(printf '%s' "$url" | sed -E 's|://[^@]+@|://|')
67
+ url=$(printf '%s' "$url" | sed -E 's|^[A-Za-z][A-Za-z0-9+.-]*://||')
68
+ url=$(printf '%s' "$url" | sed -E 's|^[^@/:]+@([^:/]+):|\1/|')
69
+ url=$(printf '%s' "$url" | sed -E 's|\.git/?$||; s|/+$||')
70
+
71
+ if [ "$is_network" = "1" ]; then
72
+ printf '%s' "$url" | tr '[:upper:]' '[:lower:]'
73
+ else
74
+ printf '%s' "$url"
75
+ fi
76
+ }
77
+
52
78
  _clv2_detect_project() {
53
79
  local project_root=""
54
80
  local project_name=""
@@ -94,15 +120,20 @@ _clv2_detect_project() {
94
120
  fi
95
121
  fi
96
122
 
97
- # Compute hash from the original remote URL (legacy, for backward compatibility)
98
- local legacy_hash_input="${remote_url:-$project_root}"
123
+ local raw_remote_url="$remote_url"
99
124
 
100
125
  # Strip embedded credentials from remote URL (e.g., https://ghp_xxxx@github.com/...)
101
126
  if [ -n "$remote_url" ]; then
102
127
  remote_url=$(printf '%s' "$remote_url" | sed -E 's|://[^@]+@|://|')
103
128
  fi
104
129
 
105
- local hash_input="${remote_url:-$project_root}"
130
+ local legacy_hash_input="${remote_url:-$project_root}"
131
+ local normalized_remote=""
132
+ if [ -n "$remote_url" ]; then
133
+ normalized_remote=$(_clv2_normalize_remote_url "$remote_url")
134
+ fi
135
+
136
+ local hash_input="${normalized_remote:-${remote_url:-$project_root}}"
106
137
  # Prefer Python for consistent SHA256 behavior across shells/platforms.
107
138
  # Pass the value via env var and encode as UTF-8 inside Python so the hash
108
139
  # is locale-independent (shells vary between UTF-8 / CP932 / CP1252, which
@@ -122,19 +153,33 @@ print(hashlib.sha256(s.encode("utf-8")).hexdigest()[:12])
122
153
  echo "fallback")
123
154
  fi
124
155
 
125
- # Backward compatibility: if credentials were stripped and the hash changed,
126
- # check if a project dir exists under the legacy hash and reuse it
127
- if [ "$legacy_hash_input" != "$hash_input" ] && [ -n "$_CLV2_PYTHON_CMD" ]; then
128
- local legacy_id=""
129
- legacy_id=$(_CLV2_HASH_INPUT="$legacy_hash_input" "$_CLV2_PYTHON_CMD" -c '
156
+ # Backward compatibility: migrate a single legacy project directory from
157
+ # credential-stripped or raw remote hashes to the normalized remote hash.
158
+ if [ -n "$_CLV2_PYTHON_CMD" ] && [ ! -d "${_CLV2_PROJECTS_DIR}/${project_id}" ]; then
159
+ local legacy_inputs=()
160
+ [ -n "$legacy_hash_input" ] && [ "$legacy_hash_input" != "$hash_input" ] \
161
+ && legacy_inputs+=("$legacy_hash_input")
162
+ [ -n "$raw_remote_url" ] && [ "$raw_remote_url" != "$hash_input" ] \
163
+ && [ "$raw_remote_url" != "$legacy_hash_input" ] \
164
+ && legacy_inputs+=("$raw_remote_url")
165
+
166
+ local legacy_input legacy_id
167
+ for legacy_input in "${legacy_inputs[@]}"; do
168
+ legacy_id=$(_CLV2_HASH_INPUT="$legacy_input" "$_CLV2_PYTHON_CMD" -c '
130
169
  import os, hashlib
131
170
  s = os.environ["_CLV2_HASH_INPUT"]
132
171
  print(hashlib.sha256(s.encode("utf-8")).hexdigest()[:12])
133
172
  ' 2>/dev/null)
134
- if [ -n "$legacy_id" ] && [ -d "${_CLV2_PROJECTS_DIR}/${legacy_id}" ] && [ ! -d "${_CLV2_PROJECTS_DIR}/${project_id}" ]; then
135
- # Migrate legacy directory to new hash
136
- mv "${_CLV2_PROJECTS_DIR}/${legacy_id}" "${_CLV2_PROJECTS_DIR}/${project_id}" 2>/dev/null || project_id="$legacy_id"
137
- fi
173
+ if [ -n "$legacy_id" ] && [ "$legacy_id" != "$project_id" ] \
174
+ && [ -d "${_CLV2_PROJECTS_DIR}/${legacy_id}" ]; then
175
+ if mv "${_CLV2_PROJECTS_DIR}/${legacy_id}" "${_CLV2_PROJECTS_DIR}/${project_id}" 2>/dev/null; then
176
+ break
177
+ else
178
+ project_id="$legacy_id"
179
+ break
180
+ fi
181
+ fi
182
+ done
138
183
  fi
139
184
 
140
185
  # Export results
@@ -28,6 +28,13 @@ from datetime import datetime, timedelta, timezone
28
28
  from collections import defaultdict
29
29
  from typing import Optional
30
30
 
31
+ if sys.platform == "win32":
32
+ try:
33
+ sys.stdout.reconfigure(encoding="utf-8")
34
+ sys.stderr.reconfigure(encoding="utf-8")
35
+ except Exception:
36
+ pass
37
+
31
38
  try:
32
39
  import fcntl
33
40
  _HAS_FCNTL = True
@@ -38,7 +45,69 @@ except ImportError:
38
45
  # Configuration
39
46
  # ─────────────────────────────────────────────
40
47
 
41
- HOMUNCULUS_DIR = Path.home() / ".claude" / "homunculus"
48
+ def _resolve_homunculus_dir() -> Path:
49
+ override = os.environ.get("CLV2_HOMUNCULUS_DIR")
50
+ if override:
51
+ if Path(override).is_absolute():
52
+ return Path(override)
53
+ print(f"[ecc] CLV2_HOMUNCULUS_DIR={override!r} is not absolute; ignoring", file=sys.stderr)
54
+
55
+ xdg = os.environ.get("XDG_DATA_HOME")
56
+ if xdg:
57
+ if Path(xdg).is_absolute():
58
+ return Path(xdg) / "ecc-homunculus"
59
+ print(f"[ecc] XDG_DATA_HOME={xdg!r} is not absolute; ignoring", file=sys.stderr)
60
+
61
+ return Path.home() / ".local" / "share" / "ecc-homunculus"
62
+
63
+
64
+ def _strip_remote_credentials(remote_url: str) -> str:
65
+ return re.sub(r"://[^@]+@", "://", remote_url or "")
66
+
67
+
68
+ def _normalize_remote_url(remote_url: str) -> str:
69
+ if not remote_url:
70
+ return ""
71
+
72
+ is_network = (
73
+ not remote_url.startswith("file://")
74
+ and ("://" in remote_url or re.match(r"^[^@/:]+@[^:/]+:", remote_url) is not None)
75
+ )
76
+ normalized = _strip_remote_credentials(remote_url)
77
+ normalized = re.sub(r"^[A-Za-z][A-Za-z0-9+.-]*://", "", normalized)
78
+ normalized = re.sub(r"^[^@/:]+@([^:/]+):", r"\1/", normalized)
79
+ normalized = re.sub(r"\.git/?$", "", normalized)
80
+ normalized = re.sub(r"/+$", "", normalized)
81
+
82
+ return normalized.lower() if is_network else normalized
83
+
84
+
85
+ def _stream_can_encode(text: str, stream=None) -> bool:
86
+ stream = stream or sys.stdout
87
+ encoding = getattr(stream, "encoding", None) or sys.getdefaultencoding()
88
+ try:
89
+ text.encode(encoding)
90
+ except (LookupError, UnicodeEncodeError):
91
+ return False
92
+ return True
93
+
94
+
95
+ def _confidence_bar(confidence, stream=None) -> str:
96
+ try:
97
+ filled = int(float(confidence) * 10)
98
+ except (TypeError, ValueError):
99
+ filled = 5
100
+ filled = max(0, min(10, filled))
101
+
102
+ full, empty = ("\u2588", "\u2591") if _stream_can_encode("\u2588\u2591", stream) else ("#", ".")
103
+ return full * filled + empty * (10 - filled)
104
+
105
+
106
+ def _project_hash(value: str) -> str:
107
+ return hashlib.sha256(value.encode("utf-8")).hexdigest()[:12]
108
+
109
+
110
+ HOMUNCULUS_DIR = _resolve_homunculus_dir()
42
111
  PROJECTS_DIR = HOMUNCULUS_DIR / "projects"
43
112
  REGISTRY_FILE = HOMUNCULUS_DIR / "projects.json"
44
113
 
@@ -177,11 +246,35 @@ def detect_project() -> dict:
177
246
  except (subprocess.TimeoutExpired, FileNotFoundError):
178
247
  pass
179
248
 
180
- hash_source = remote_url if remote_url else project_root
181
- project_id = hashlib.sha256(hash_source.encode()).hexdigest()[:12]
249
+ raw_remote_url = remote_url
250
+ if remote_url:
251
+ remote_url = _strip_remote_credentials(remote_url)
252
+
253
+ legacy_hash_source = remote_url if remote_url else project_root
254
+ normalized_remote = _normalize_remote_url(remote_url) if remote_url else ""
255
+ hash_source = normalized_remote if normalized_remote else legacy_hash_source
256
+ project_id = _project_hash(hash_source)
182
257
 
183
258
  project_dir = PROJECTS_DIR / project_id
184
259
 
260
+ if not project_dir.exists():
261
+ legacy_sources = []
262
+ if legacy_hash_source and legacy_hash_source != hash_source:
263
+ legacy_sources.append(legacy_hash_source)
264
+ if raw_remote_url and raw_remote_url not in {hash_source, legacy_hash_source}:
265
+ legacy_sources.append(raw_remote_url)
266
+
267
+ for legacy_source in legacy_sources:
268
+ legacy_id = _project_hash(legacy_source)
269
+ legacy_dir = PROJECTS_DIR / legacy_id
270
+ if legacy_id != project_id and legacy_dir.exists():
271
+ try:
272
+ legacy_dir.rename(project_dir)
273
+ except OSError:
274
+ project_id = legacy_id
275
+ project_dir = legacy_dir
276
+ break
277
+
185
278
  # Ensure project directory structure
186
279
  for d in [
187
280
  project_dir / "instincts" / "personal",
@@ -478,7 +571,7 @@ def _print_instincts_by_domain(instincts: list[dict]) -> None:
478
571
 
479
572
  for inst in sorted(domain_instincts, key=lambda x: -x.get('confidence', 0.5)):
480
573
  conf = inst.get('confidence', 0.5)
481
- conf_bar = '\u2588' * int(conf * 10) + '\u2591' * (10 - int(conf * 10))
574
+ conf_bar = _confidence_bar(conf)
482
575
  trigger = inst.get('trigger', 'unknown trigger')
483
576
  scope_tag = f"[{inst.get('scope', '?')}]"
484
577
 
@@ -0,0 +1,31 @@
1
+ #!/usr/bin/env bash
2
+ # Shared continuous-learning-v2 data-directory resolver.
3
+ #
4
+ # Resolution precedence:
5
+ # 1. CLV2_HOMUNCULUS_DIR, when absolute
6
+ # 2. XDG_DATA_HOME/ecc-homunculus, when XDG_DATA_HOME is absolute
7
+ # 3. HOME/.local/share/ecc-homunculus
8
+
9
+ _ecc_resolve_homunculus_dir() {
10
+ if [ -n "${CLV2_HOMUNCULUS_DIR:-}" ]; then
11
+ case "$CLV2_HOMUNCULUS_DIR" in
12
+ /*) printf '%s\n' "$CLV2_HOMUNCULUS_DIR"; return 0 ;;
13
+ *) printf '[ecc] CLV2_HOMUNCULUS_DIR=%s is not absolute; ignoring\n' "$CLV2_HOMUNCULUS_DIR" >&2 ;;
14
+ esac
15
+ fi
16
+
17
+ if [ -n "${XDG_DATA_HOME:-}" ]; then
18
+ case "$XDG_DATA_HOME" in
19
+ /*) printf '%s/ecc-homunculus\n' "$XDG_DATA_HOME"; return 0 ;;
20
+ *) printf '[ecc] XDG_DATA_HOME=%s is not absolute; ignoring\n' "$XDG_DATA_HOME" >&2 ;;
21
+ esac
22
+ fi
23
+
24
+ case "${HOME:-}" in
25
+ /*) printf '%s/.local/share/ecc-homunculus\n' "$HOME" ;;
26
+ *)
27
+ printf '[ecc] HOME=%s is not absolute; cannot resolve homunculus dir\n' "${HOME:-}" >&2
28
+ return 1
29
+ ;;
30
+ esac
31
+ }
@@ -0,0 +1,62 @@
1
+ #!/usr/bin/env bash
2
+ # One-shot migration from the legacy Claude config tree into the
3
+ # continuous-learning-v2 data directory.
4
+ set -euo pipefail
5
+
6
+ OLD="${HOME}/.claude/homunculus"
7
+
8
+ # shellcheck disable=SC1091
9
+ . "$(dirname "$0")/lib/homunculus-dir.sh"
10
+ NEW="$(_ecc_resolve_homunculus_dir)"
11
+
12
+ if [ "$NEW" = "$OLD" ]; then
13
+ echo "Resolved destination equals source ($OLD); nothing to migrate."
14
+ exit 0
15
+ fi
16
+
17
+ if [ ! -d "$OLD" ]; then
18
+ echo "Nothing to migrate (no $OLD)."
19
+ exit 0
20
+ fi
21
+
22
+ if command -v pgrep >/dev/null 2>&1; then
23
+ if pgrep -f "${HOME}.*observer-loop\\.sh" >/dev/null 2>&1; then
24
+ echo "Refusing to migrate: observer-loop.sh is running." >&2
25
+ echo "Exit all Claude Code sessions, then re-run." >&2
26
+ exit 1
27
+ fi
28
+ else
29
+ echo "Warning: pgrep not available; skipping running-observer check." >&2
30
+ fi
31
+
32
+ mkdir -p "$(dirname "$NEW")"
33
+
34
+ if [ ! -d "$NEW" ]; then
35
+ mv "$OLD" "$NEW"
36
+ echo "Moved $OLD -> $NEW"
37
+ elif [ -z "$(ls -A "$NEW" 2>/dev/null || true)" ]; then
38
+ rmdir "$NEW"
39
+ mv "$OLD" "$NEW"
40
+ echo "Moved $OLD -> $NEW (replaced empty destination)"
41
+ else
42
+ old_count="$(find "$OLD" -type f 2>/dev/null | wc -l | tr -d ' ')"
43
+ new_count="$(find "$NEW" -type f 2>/dev/null | wc -l | tr -d ' ')"
44
+ echo "Refusing to migrate: both paths exist with content." >&2
45
+ echo " Old: $OLD ($old_count files)" >&2
46
+ echo " New: $NEW ($new_count files)" >&2
47
+ echo "Resolve manually, then re-run." >&2
48
+ exit 1
49
+ fi
50
+
51
+ settings="${HOME}/.claude/settings.json"
52
+ if [ -f "$settings" ] && grep -q '"CLV2_CONFIG"' "$settings" 2>/dev/null; then
53
+ if grep -q '\.claude/homunculus' "$settings" 2>/dev/null; then
54
+ cat >&2 <<WARN
55
+
56
+ Advisory: ~/.claude/settings.json still sets CLV2_CONFIG under the old path.
57
+ Update it to: ${NEW}/config.json
58
+ (Not editing settings.json automatically.)
59
+
60
+ WARN
61
+ fi
62
+ fi
@@ -45,6 +45,7 @@ _find_cross_project_instincts = _mod._find_cross_project_instincts
45
45
  load_registry = _mod.load_registry
46
46
  _validate_instinct_id = _mod._validate_instinct_id
47
47
  _update_registry = _mod._update_registry
48
+ _confidence_bar = _mod._confidence_bar
48
49
 
49
50
 
50
51
  # ─────────────────────────────────────────────
@@ -642,6 +643,39 @@ def test_cmd_status_with_instincts(patch_globals, monkeypatch, capsys):
642
643
  assert "GLOBAL" in out
643
644
 
644
645
 
646
+ def test_confidence_bar_uses_unicode_when_supported():
647
+ """Confidence bars should retain block glyphs on UTF-8 streams."""
648
+ stream = SimpleNamespace(encoding="utf-8")
649
+ assert _confidence_bar(0.8, stream=stream) == "\u2588" * 8 + "\u2591" * 2
650
+
651
+
652
+ def test_confidence_bar_uses_ascii_when_stream_rejects_block_glyphs():
653
+ """Windows cp1252 streams cannot encode block glyphs."""
654
+ stream = SimpleNamespace(encoding="cp1252")
655
+ assert _confidence_bar(0.8, stream=stream) == "########.."
656
+
657
+
658
+ def test_print_instincts_by_domain_is_cp1252_safe(monkeypatch):
659
+ """Status rendering should not crash on Windows cp1252 stdout."""
660
+ raw = io.BytesIO()
661
+ stream = io.TextIOWrapper(raw, encoding="cp1252")
662
+ monkeypatch.setattr(_mod.sys, "stdout", stream)
663
+
664
+ _mod._print_instincts_by_domain([{
665
+ "id": "windows-safe",
666
+ "trigger": "when stdout uses cp1252",
667
+ "confidence": 0.8,
668
+ "domain": "platform",
669
+ "scope": "project",
670
+ }])
671
+
672
+ stream.flush()
673
+ out = raw.getvalue().decode("cp1252")
674
+ assert "########.." in out
675
+ assert "\u2588" not in out
676
+ assert "\u2591" not in out
677
+
678
+
645
679
  def test_cmd_status_returns_int(patch_globals, monkeypatch):
646
680
  """cmd_status should always return an int."""
647
681
  tree = patch_globals