claudecode-omc 5.5.2 → 5.6.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 (433) hide show
  1. package/README.md +63 -0
  2. package/bundled/manifest.json +3 -2
  3. package/bundled/upstream/ecc/.omc-source/bundle.json +23 -0
  4. package/bundled/upstream/ecc/.omc-source/last-plan-apply.json +439 -0
  5. package/bundled/upstream/ecc/.omc-source/manifests/.claude-plugin/marketplace.json +47 -0
  6. package/bundled/upstream/ecc/agents/a11y-architect.md +141 -0
  7. package/bundled/upstream/ecc/agents/architect.md +211 -0
  8. package/bundled/upstream/ecc/agents/build-error-resolver.md +114 -0
  9. package/bundled/upstream/ecc/agents/chief-of-staff.md +151 -0
  10. package/bundled/upstream/ecc/agents/code-architect.md +71 -0
  11. package/bundled/upstream/ecc/agents/code-explorer.md +69 -0
  12. package/bundled/upstream/ecc/agents/code-reviewer.md +237 -0
  13. package/bundled/upstream/ecc/agents/code-simplifier.md +47 -0
  14. package/bundled/upstream/ecc/agents/comment-analyzer.md +45 -0
  15. package/bundled/upstream/ecc/agents/conversation-analyzer.md +52 -0
  16. package/bundled/upstream/ecc/agents/cpp-build-resolver.md +90 -0
  17. package/bundled/upstream/ecc/agents/cpp-reviewer.md +72 -0
  18. package/bundled/upstream/ecc/agents/csharp-reviewer.md +101 -0
  19. package/bundled/upstream/ecc/agents/dart-build-resolver.md +201 -0
  20. package/bundled/upstream/ecc/agents/database-reviewer.md +91 -0
  21. package/bundled/upstream/ecc/agents/doc-updater.md +107 -0
  22. package/bundled/upstream/ecc/agents/docs-lookup.md +68 -0
  23. package/bundled/upstream/ecc/agents/e2e-runner.md +107 -0
  24. package/bundled/upstream/ecc/agents/flutter-reviewer.md +243 -0
  25. package/bundled/upstream/ecc/agents/gan-evaluator.md +209 -0
  26. package/bundled/upstream/ecc/agents/gan-generator.md +131 -0
  27. package/bundled/upstream/ecc/agents/gan-planner.md +99 -0
  28. package/bundled/upstream/ecc/agents/go-build-resolver.md +94 -0
  29. package/bundled/upstream/ecc/agents/go-reviewer.md +76 -0
  30. package/bundled/upstream/ecc/agents/harness-optimizer.md +35 -0
  31. package/bundled/upstream/ecc/agents/healthcare-reviewer.md +83 -0
  32. package/bundled/upstream/ecc/agents/java-build-resolver.md +153 -0
  33. package/bundled/upstream/ecc/agents/java-reviewer.md +92 -0
  34. package/bundled/upstream/ecc/agents/kotlin-build-resolver.md +118 -0
  35. package/bundled/upstream/ecc/agents/kotlin-reviewer.md +159 -0
  36. package/bundled/upstream/ecc/agents/loop-operator.md +36 -0
  37. package/bundled/upstream/ecc/agents/opensource-forker.md +198 -0
  38. package/bundled/upstream/ecc/agents/opensource-packager.md +249 -0
  39. package/bundled/upstream/ecc/agents/opensource-sanitizer.md +188 -0
  40. package/bundled/upstream/ecc/agents/performance-optimizer.md +446 -0
  41. package/bundled/upstream/ecc/agents/planner.md +212 -0
  42. package/bundled/upstream/ecc/agents/pr-test-analyzer.md +45 -0
  43. package/bundled/upstream/ecc/agents/python-reviewer.md +98 -0
  44. package/bundled/upstream/ecc/agents/pytorch-build-resolver.md +120 -0
  45. package/bundled/upstream/ecc/agents/refactor-cleaner.md +85 -0
  46. package/bundled/upstream/ecc/agents/rust-build-resolver.md +148 -0
  47. package/bundled/upstream/ecc/agents/rust-reviewer.md +94 -0
  48. package/bundled/upstream/ecc/agents/security-reviewer.md +108 -0
  49. package/bundled/upstream/ecc/agents/seo-specialist.md +62 -0
  50. package/bundled/upstream/ecc/agents/silent-failure-hunter.md +50 -0
  51. package/bundled/upstream/ecc/agents/tdd-guide.md +91 -0
  52. package/bundled/upstream/ecc/agents/type-design-analyzer.md +41 -0
  53. package/bundled/upstream/ecc/agents/typescript-reviewer.md +112 -0
  54. package/bundled/upstream/ecc/commands/agent-sort.md +23 -0
  55. package/bundled/upstream/ecc/commands/aside.md +164 -0
  56. package/bundled/upstream/ecc/commands/build-fix.md +62 -0
  57. package/bundled/upstream/ecc/commands/checkpoint.md +74 -0
  58. package/bundled/upstream/ecc/commands/claw.md +23 -0
  59. package/bundled/upstream/ecc/commands/code-review.md +289 -0
  60. package/bundled/upstream/ecc/commands/context-budget.md +23 -0
  61. package/bundled/upstream/ecc/commands/cpp-build.md +173 -0
  62. package/bundled/upstream/ecc/commands/cpp-review.md +132 -0
  63. package/bundled/upstream/ecc/commands/cpp-test.md +251 -0
  64. package/bundled/upstream/ecc/commands/devfleet.md +23 -0
  65. package/bundled/upstream/ecc/commands/docs.md +23 -0
  66. package/bundled/upstream/ecc/commands/e2e.md +268 -0
  67. package/bundled/upstream/ecc/commands/eval.md +23 -0
  68. package/bundled/upstream/ecc/commands/evolve.md +178 -0
  69. package/bundled/upstream/ecc/commands/feature-dev.md +49 -0
  70. package/bundled/upstream/ecc/commands/flutter-build.md +164 -0
  71. package/bundled/upstream/ecc/commands/flutter-review.md +116 -0
  72. package/bundled/upstream/ecc/commands/flutter-test.md +144 -0
  73. package/bundled/upstream/ecc/commands/gan-build.md +99 -0
  74. package/bundled/upstream/ecc/commands/gan-design.md +35 -0
  75. package/bundled/upstream/ecc/commands/go-build.md +183 -0
  76. package/bundled/upstream/ecc/commands/go-review.md +148 -0
  77. package/bundled/upstream/ecc/commands/go-test.md +268 -0
  78. package/bundled/upstream/ecc/commands/gradle-build.md +70 -0
  79. package/bundled/upstream/ecc/commands/harness-audit.md +73 -0
  80. package/bundled/upstream/ecc/commands/hookify-configure.md +14 -0
  81. package/bundled/upstream/ecc/commands/hookify-help.md +46 -0
  82. package/bundled/upstream/ecc/commands/hookify-list.md +21 -0
  83. package/bundled/upstream/ecc/commands/hookify.md +50 -0
  84. package/bundled/upstream/ecc/commands/instinct-export.md +66 -0
  85. package/bundled/upstream/ecc/commands/instinct-import.md +114 -0
  86. package/bundled/upstream/ecc/commands/instinct-status.md +59 -0
  87. package/bundled/upstream/ecc/commands/jira.md +106 -0
  88. package/bundled/upstream/ecc/commands/kotlin-build.md +174 -0
  89. package/bundled/upstream/ecc/commands/kotlin-review.md +140 -0
  90. package/bundled/upstream/ecc/commands/kotlin-test.md +312 -0
  91. package/bundled/upstream/ecc/commands/learn-eval.md +116 -0
  92. package/bundled/upstream/ecc/commands/learn.md +70 -0
  93. package/bundled/upstream/ecc/commands/loop-start.md +32 -0
  94. package/bundled/upstream/ecc/commands/loop-status.md +24 -0
  95. package/bundled/upstream/ecc/commands/model-route.md +26 -0
  96. package/bundled/upstream/ecc/commands/multi-backend.md +158 -0
  97. package/bundled/upstream/ecc/commands/multi-execute.md +315 -0
  98. package/bundled/upstream/ecc/commands/multi-frontend.md +158 -0
  99. package/bundled/upstream/ecc/commands/multi-plan.md +268 -0
  100. package/bundled/upstream/ecc/commands/multi-workflow.md +191 -0
  101. package/bundled/upstream/ecc/commands/orchestrate.md +135 -0
  102. package/bundled/upstream/ecc/commands/plan.md +117 -0
  103. package/bundled/upstream/ecc/commands/pm2.md +272 -0
  104. package/bundled/upstream/ecc/commands/projects.md +39 -0
  105. package/bundled/upstream/ecc/commands/promote.md +41 -0
  106. package/bundled/upstream/ecc/commands/prompt-optimize.md +23 -0
  107. package/bundled/upstream/ecc/commands/prp-commit.md +112 -0
  108. package/bundled/upstream/ecc/commands/prp-implement.md +385 -0
  109. package/bundled/upstream/ecc/commands/prp-plan.md +502 -0
  110. package/bundled/upstream/ecc/commands/prp-pr.md +184 -0
  111. package/bundled/upstream/ecc/commands/prp-prd.md +447 -0
  112. package/bundled/upstream/ecc/commands/prune.md +31 -0
  113. package/bundled/upstream/ecc/commands/python-review.md +297 -0
  114. package/bundled/upstream/ecc/commands/quality-gate.md +29 -0
  115. package/bundled/upstream/ecc/commands/refactor-clean.md +80 -0
  116. package/bundled/upstream/ecc/commands/resume-session.md +156 -0
  117. package/bundled/upstream/ecc/commands/review-pr.md +37 -0
  118. package/bundled/upstream/ecc/commands/rules-distill.md +20 -0
  119. package/bundled/upstream/ecc/commands/rust-build.md +187 -0
  120. package/bundled/upstream/ecc/commands/rust-review.md +142 -0
  121. package/bundled/upstream/ecc/commands/rust-test.md +308 -0
  122. package/bundled/upstream/ecc/commands/santa-loop.md +175 -0
  123. package/bundled/upstream/ecc/commands/save-session.md +275 -0
  124. package/bundled/upstream/ecc/commands/sessions.md +339 -0
  125. package/bundled/upstream/ecc/commands/setup-pm.md +80 -0
  126. package/bundled/upstream/ecc/commands/skill-create.md +174 -0
  127. package/bundled/upstream/ecc/commands/skill-health.md +54 -0
  128. package/bundled/upstream/ecc/commands/tdd.md +231 -0
  129. package/bundled/upstream/ecc/commands/test-coverage.md +69 -0
  130. package/bundled/upstream/ecc/commands/update-codemaps.md +72 -0
  131. package/bundled/upstream/ecc/commands/update-docs.md +84 -0
  132. package/bundled/upstream/ecc/commands/verify.md +23 -0
  133. package/bundled/upstream/ecc/hooks/README.md +237 -0
  134. package/bundled/upstream/ecc/hooks/hooks.json +330 -0
  135. package/bundled/upstream/ecc/skills/accessibility/SKILL.md +146 -0
  136. package/bundled/upstream/ecc/skills/agent-eval/SKILL.md +145 -0
  137. package/bundled/upstream/ecc/skills/agent-harness-construction/SKILL.md +73 -0
  138. package/bundled/upstream/ecc/skills/agent-introspection-debugging/SKILL.md +153 -0
  139. package/bundled/upstream/ecc/skills/agent-payment-x402/SKILL.md +178 -0
  140. package/bundled/upstream/ecc/skills/agent-sort/SKILL.md +215 -0
  141. package/bundled/upstream/ecc/skills/agentic-engineering/SKILL.md +63 -0
  142. package/bundled/upstream/ecc/skills/ai-first-engineering/SKILL.md +51 -0
  143. package/bundled/upstream/ecc/skills/ai-regression-testing/SKILL.md +385 -0
  144. package/bundled/upstream/ecc/skills/android-clean-architecture/SKILL.md +339 -0
  145. package/bundled/upstream/ecc/skills/api-connector-builder/SKILL.md +120 -0
  146. package/bundled/upstream/ecc/skills/api-design/SKILL.md +523 -0
  147. package/bundled/upstream/ecc/skills/architecture-decision-records/SKILL.md +179 -0
  148. package/bundled/upstream/ecc/skills/article-writing/SKILL.md +79 -0
  149. package/bundled/upstream/ecc/skills/automation-audit-ops/SKILL.md +142 -0
  150. package/bundled/upstream/ecc/skills/autonomous-agent-harness/SKILL.md +267 -0
  151. package/bundled/upstream/ecc/skills/autonomous-loops/SKILL.md +610 -0
  152. package/bundled/upstream/ecc/skills/backend-patterns/SKILL.md +598 -0
  153. package/bundled/upstream/ecc/skills/benchmark/SKILL.md +93 -0
  154. package/bundled/upstream/ecc/skills/blueprint/SKILL.md +105 -0
  155. package/bundled/upstream/ecc/skills/brand-voice/SKILL.md +97 -0
  156. package/bundled/upstream/ecc/skills/brand-voice/references/voice-profile-schema.md +55 -0
  157. package/bundled/upstream/ecc/skills/browser-qa/SKILL.md +87 -0
  158. package/bundled/upstream/ecc/skills/bun-runtime/SKILL.md +84 -0
  159. package/bundled/upstream/ecc/skills/canary-watch/SKILL.md +99 -0
  160. package/bundled/upstream/ecc/skills/carrier-relationship-management/SKILL.md +212 -0
  161. package/bundled/upstream/ecc/skills/ck/SKILL.md +147 -0
  162. package/bundled/upstream/ecc/skills/ck/commands/forget.mjs +44 -0
  163. package/bundled/upstream/ecc/skills/ck/commands/info.mjs +24 -0
  164. package/bundled/upstream/ecc/skills/ck/commands/init.mjs +143 -0
  165. package/bundled/upstream/ecc/skills/ck/commands/list.mjs +40 -0
  166. package/bundled/upstream/ecc/skills/ck/commands/migrate.mjs +202 -0
  167. package/bundled/upstream/ecc/skills/ck/commands/resume.mjs +36 -0
  168. package/bundled/upstream/ecc/skills/ck/commands/save.mjs +210 -0
  169. package/bundled/upstream/ecc/skills/ck/commands/shared.mjs +387 -0
  170. package/bundled/upstream/ecc/skills/ck/hooks/session-start.mjs +224 -0
  171. package/bundled/upstream/ecc/skills/claude-api/SKILL.md +337 -0
  172. package/bundled/upstream/ecc/skills/claude-devfleet/SKILL.md +103 -0
  173. package/bundled/upstream/ecc/skills/click-path-audit/SKILL.md +244 -0
  174. package/bundled/upstream/ecc/skills/clickhouse-io/SKILL.md +439 -0
  175. package/bundled/upstream/ecc/skills/code-tour/SKILL.md +236 -0
  176. package/bundled/upstream/ecc/skills/codebase-onboarding/SKILL.md +233 -0
  177. package/bundled/upstream/ecc/skills/coding-standards/SKILL.md +549 -0
  178. package/bundled/upstream/ecc/skills/compose-multiplatform-patterns/SKILL.md +299 -0
  179. package/bundled/upstream/ecc/skills/configure-ecc/SKILL.md +367 -0
  180. package/bundled/upstream/ecc/skills/connections-optimizer/SKILL.md +189 -0
  181. package/bundled/upstream/ecc/skills/content-engine/SKILL.md +131 -0
  182. package/bundled/upstream/ecc/skills/content-hash-cache-pattern/SKILL.md +161 -0
  183. package/bundled/upstream/ecc/skills/context-budget/SKILL.md +135 -0
  184. package/bundled/upstream/ecc/skills/continuous-agent-loop/SKILL.md +45 -0
  185. package/bundled/upstream/ecc/skills/continuous-learning/SKILL.md +123 -0
  186. package/bundled/upstream/ecc/skills/continuous-learning/config.json +18 -0
  187. package/bundled/upstream/ecc/skills/continuous-learning/evaluate-session.sh +69 -0
  188. package/bundled/upstream/ecc/skills/continuous-learning-v2/SKILL.md +346 -0
  189. package/bundled/upstream/ecc/skills/continuous-learning-v2/agents/observer-loop.sh +282 -0
  190. package/bundled/upstream/ecc/skills/continuous-learning-v2/agents/observer.md +198 -0
  191. package/bundled/upstream/ecc/skills/continuous-learning-v2/agents/session-guardian.sh +150 -0
  192. package/bundled/upstream/ecc/skills/continuous-learning-v2/agents/start-observer.sh +244 -0
  193. package/bundled/upstream/ecc/skills/continuous-learning-v2/config.json +8 -0
  194. package/bundled/upstream/ecc/skills/continuous-learning-v2/hooks/observe.sh +460 -0
  195. package/bundled/upstream/ecc/skills/continuous-learning-v2/scripts/detect-project.sh +243 -0
  196. package/bundled/upstream/ecc/skills/continuous-learning-v2/scripts/instinct-cli.py +1426 -0
  197. package/bundled/upstream/ecc/skills/continuous-learning-v2/scripts/test_parse_instinct.py +984 -0
  198. package/bundled/upstream/ecc/skills/cost-aware-llm-pipeline/SKILL.md +183 -0
  199. package/bundled/upstream/ecc/skills/council/SKILL.md +203 -0
  200. package/bundled/upstream/ecc/skills/cpp-coding-standards/SKILL.md +723 -0
  201. package/bundled/upstream/ecc/skills/cpp-testing/SKILL.md +324 -0
  202. package/bundled/upstream/ecc/skills/crosspost/SKILL.md +111 -0
  203. package/bundled/upstream/ecc/skills/csharp-testing/SKILL.md +321 -0
  204. package/bundled/upstream/ecc/skills/customer-billing-ops/SKILL.md +140 -0
  205. package/bundled/upstream/ecc/skills/customs-trade-compliance/SKILL.md +263 -0
  206. package/bundled/upstream/ecc/skills/dart-flutter-patterns/SKILL.md +563 -0
  207. package/bundled/upstream/ecc/skills/dashboard-builder/SKILL.md +108 -0
  208. package/bundled/upstream/ecc/skills/data-scraper-agent/SKILL.md +764 -0
  209. package/bundled/upstream/ecc/skills/database-migrations/SKILL.md +429 -0
  210. package/bundled/upstream/ecc/skills/deep-research/SKILL.md +155 -0
  211. package/bundled/upstream/ecc/skills/defi-amm-security/SKILL.md +160 -0
  212. package/bundled/upstream/ecc/skills/deployment-patterns/SKILL.md +427 -0
  213. package/bundled/upstream/ecc/skills/design-system/SKILL.md +82 -0
  214. package/bundled/upstream/ecc/skills/django-patterns/SKILL.md +734 -0
  215. package/bundled/upstream/ecc/skills/django-security/SKILL.md +593 -0
  216. package/bundled/upstream/ecc/skills/django-tdd/SKILL.md +729 -0
  217. package/bundled/upstream/ecc/skills/django-verification/SKILL.md +469 -0
  218. package/bundled/upstream/ecc/skills/dmux-workflows/SKILL.md +191 -0
  219. package/bundled/upstream/ecc/skills/docker-patterns/SKILL.md +364 -0
  220. package/bundled/upstream/ecc/skills/documentation-lookup/SKILL.md +90 -0
  221. package/bundled/upstream/ecc/skills/dotnet-patterns/SKILL.md +321 -0
  222. package/bundled/upstream/ecc/skills/e2e-testing/SKILL.md +326 -0
  223. package/bundled/upstream/ecc/skills/ecc-tools-cost-audit/SKILL.md +160 -0
  224. package/bundled/upstream/ecc/skills/email-ops/SKILL.md +121 -0
  225. package/bundled/upstream/ecc/skills/energy-procurement/SKILL.md +228 -0
  226. package/bundled/upstream/ecc/skills/enterprise-agent-ops/SKILL.md +50 -0
  227. package/bundled/upstream/ecc/skills/eval-harness/SKILL.md +270 -0
  228. package/bundled/upstream/ecc/skills/evm-token-decimals/SKILL.md +130 -0
  229. package/bundled/upstream/ecc/skills/exa-search/SKILL.md +103 -0
  230. package/bundled/upstream/ecc/skills/fal-ai-media/SKILL.md +284 -0
  231. package/bundled/upstream/ecc/skills/finance-billing-ops/SKILL.md +127 -0
  232. package/bundled/upstream/ecc/skills/flutter-dart-code-review/SKILL.md +435 -0
  233. package/bundled/upstream/ecc/skills/foundation-models-on-device/SKILL.md +243 -0
  234. package/bundled/upstream/ecc/skills/frontend-design/SKILL.md +145 -0
  235. package/bundled/upstream/ecc/skills/frontend-patterns/SKILL.md +642 -0
  236. package/bundled/upstream/ecc/skills/frontend-slides/SKILL.md +184 -0
  237. package/bundled/upstream/ecc/skills/frontend-slides/STYLE_PRESETS.md +330 -0
  238. package/bundled/upstream/ecc/skills/gan-style-harness/SKILL.md +278 -0
  239. package/bundled/upstream/ecc/skills/gateguard/SKILL.md +121 -0
  240. package/bundled/upstream/ecc/skills/git-workflow/SKILL.md +715 -0
  241. package/bundled/upstream/ecc/skills/github-ops/SKILL.md +144 -0
  242. package/bundled/upstream/ecc/skills/golang-patterns/SKILL.md +674 -0
  243. package/bundled/upstream/ecc/skills/golang-testing/SKILL.md +720 -0
  244. package/bundled/upstream/ecc/skills/google-workspace-ops/SKILL.md +95 -0
  245. package/bundled/upstream/ecc/skills/healthcare-cdss-patterns/SKILL.md +245 -0
  246. package/bundled/upstream/ecc/skills/healthcare-emr-patterns/SKILL.md +159 -0
  247. package/bundled/upstream/ecc/skills/healthcare-eval-harness/SKILL.md +207 -0
  248. package/bundled/upstream/ecc/skills/healthcare-phi-compliance/SKILL.md +145 -0
  249. package/bundled/upstream/ecc/skills/hexagonal-architecture/SKILL.md +276 -0
  250. package/bundled/upstream/ecc/skills/hipaa-compliance/SKILL.md +78 -0
  251. package/bundled/upstream/ecc/skills/hookify-rules/SKILL.md +128 -0
  252. package/bundled/upstream/ecc/skills/inventory-demand-planning/SKILL.md +247 -0
  253. package/bundled/upstream/ecc/skills/investor-materials/SKILL.md +96 -0
  254. package/bundled/upstream/ecc/skills/investor-outreach/SKILL.md +91 -0
  255. package/bundled/upstream/ecc/skills/iterative-retrieval/SKILL.md +211 -0
  256. package/bundled/upstream/ecc/skills/java-coding-standards/SKILL.md +147 -0
  257. package/bundled/upstream/ecc/skills/jira-integration/SKILL.md +293 -0
  258. package/bundled/upstream/ecc/skills/jpa-patterns/SKILL.md +151 -0
  259. package/bundled/upstream/ecc/skills/knowledge-ops/SKILL.md +154 -0
  260. package/bundled/upstream/ecc/skills/kotlin-coroutines-flows/SKILL.md +284 -0
  261. package/bundled/upstream/ecc/skills/kotlin-exposed-patterns/SKILL.md +719 -0
  262. package/bundled/upstream/ecc/skills/kotlin-ktor-patterns/SKILL.md +689 -0
  263. package/bundled/upstream/ecc/skills/kotlin-patterns/SKILL.md +711 -0
  264. package/bundled/upstream/ecc/skills/kotlin-testing/SKILL.md +824 -0
  265. package/bundled/upstream/ecc/skills/laravel-patterns/SKILL.md +415 -0
  266. package/bundled/upstream/ecc/skills/laravel-plugin-discovery/SKILL.md +229 -0
  267. package/bundled/upstream/ecc/skills/laravel-security/SKILL.md +285 -0
  268. package/bundled/upstream/ecc/skills/laravel-tdd/SKILL.md +283 -0
  269. package/bundled/upstream/ecc/skills/laravel-verification/SKILL.md +179 -0
  270. package/bundled/upstream/ecc/skills/lead-intelligence/SKILL.md +321 -0
  271. package/bundled/upstream/ecc/skills/lead-intelligence/agents/enrichment-agent.md +85 -0
  272. package/bundled/upstream/ecc/skills/lead-intelligence/agents/mutual-mapper.md +75 -0
  273. package/bundled/upstream/ecc/skills/lead-intelligence/agents/outreach-drafter.md +98 -0
  274. package/bundled/upstream/ecc/skills/lead-intelligence/agents/signal-scorer.md +60 -0
  275. package/bundled/upstream/ecc/skills/liquid-glass-design/SKILL.md +279 -0
  276. package/bundled/upstream/ecc/skills/llm-trading-agent-security/SKILL.md +146 -0
  277. package/bundled/upstream/ecc/skills/logistics-exception-management/SKILL.md +222 -0
  278. package/bundled/upstream/ecc/skills/manim-video/SKILL.md +89 -0
  279. package/bundled/upstream/ecc/skills/manim-video/assets/network_graph_scene.py +52 -0
  280. package/bundled/upstream/ecc/skills/market-research/SKILL.md +75 -0
  281. package/bundled/upstream/ecc/skills/mcp-server-patterns/SKILL.md +69 -0
  282. package/bundled/upstream/ecc/skills/messages-ops/SKILL.md +104 -0
  283. package/bundled/upstream/ecc/skills/nanoclaw-repl/SKILL.md +33 -0
  284. package/bundled/upstream/ecc/skills/nestjs-patterns/SKILL.md +230 -0
  285. package/bundled/upstream/ecc/skills/nextjs-turbopack/SKILL.md +44 -0
  286. package/bundled/upstream/ecc/skills/nodejs-keccak256/SKILL.md +102 -0
  287. package/bundled/upstream/ecc/skills/nutrient-document-processing/SKILL.md +167 -0
  288. package/bundled/upstream/ecc/skills/nuxt4-patterns/SKILL.md +100 -0
  289. package/bundled/upstream/ecc/skills/openclaw-persona-forge/SKILL.md +296 -0
  290. package/bundled/upstream/ecc/skills/openclaw-persona-forge/gacha.py +224 -0
  291. package/bundled/upstream/ecc/skills/openclaw-persona-forge/gacha.sh +5 -0
  292. package/bundled/upstream/ecc/skills/openclaw-persona-forge/references/avatar-style.md +124 -0
  293. package/bundled/upstream/ecc/skills/openclaw-persona-forge/references/boundary-rules.md +53 -0
  294. package/bundled/upstream/ecc/skills/openclaw-persona-forge/references/error-handling.md +53 -0
  295. package/bundled/upstream/ecc/skills/openclaw-persona-forge/references/identity-tension.md +48 -0
  296. package/bundled/upstream/ecc/skills/openclaw-persona-forge/references/naming-system.md +39 -0
  297. package/bundled/upstream/ecc/skills/openclaw-persona-forge/references/output-template.md +166 -0
  298. package/bundled/upstream/ecc/skills/opensource-pipeline/SKILL.md +255 -0
  299. package/bundled/upstream/ecc/skills/perl-patterns/SKILL.md +504 -0
  300. package/bundled/upstream/ecc/skills/perl-security/SKILL.md +503 -0
  301. package/bundled/upstream/ecc/skills/perl-testing/SKILL.md +475 -0
  302. package/bundled/upstream/ecc/skills/plankton-code-quality/SKILL.md +236 -0
  303. package/bundled/upstream/ecc/skills/postgres-patterns/SKILL.md +147 -0
  304. package/bundled/upstream/ecc/skills/product-capability/SKILL.md +141 -0
  305. package/bundled/upstream/ecc/skills/product-lens/SKILL.md +92 -0
  306. package/bundled/upstream/ecc/skills/production-scheduling/SKILL.md +238 -0
  307. package/bundled/upstream/ecc/skills/project-flow-ops/SKILL.md +111 -0
  308. package/bundled/upstream/ecc/skills/prompt-optimizer/SKILL.md +397 -0
  309. package/bundled/upstream/ecc/skills/python-patterns/SKILL.md +750 -0
  310. package/bundled/upstream/ecc/skills/python-testing/SKILL.md +816 -0
  311. package/bundled/upstream/ecc/skills/pytorch-patterns/SKILL.md +396 -0
  312. package/bundled/upstream/ecc/skills/quality-nonconformance/SKILL.md +260 -0
  313. package/bundled/upstream/ecc/skills/ralphinho-rfc-pipeline/SKILL.md +67 -0
  314. package/bundled/upstream/ecc/skills/regex-vs-llm-structured-text/SKILL.md +220 -0
  315. package/bundled/upstream/ecc/skills/remotion-video-creation/SKILL.md +43 -0
  316. package/bundled/upstream/ecc/skills/remotion-video-creation/rules/3d.md +86 -0
  317. package/bundled/upstream/ecc/skills/remotion-video-creation/rules/animations.md +29 -0
  318. package/bundled/upstream/ecc/skills/remotion-video-creation/rules/assets/charts-bar-chart.tsx +173 -0
  319. package/bundled/upstream/ecc/skills/remotion-video-creation/rules/assets/text-animations-typewriter.tsx +100 -0
  320. package/bundled/upstream/ecc/skills/remotion-video-creation/rules/assets/text-animations-word-highlight.tsx +108 -0
  321. package/bundled/upstream/ecc/skills/remotion-video-creation/rules/assets.md +78 -0
  322. package/bundled/upstream/ecc/skills/remotion-video-creation/rules/audio.md +172 -0
  323. package/bundled/upstream/ecc/skills/remotion-video-creation/rules/calculate-metadata.md +104 -0
  324. package/bundled/upstream/ecc/skills/remotion-video-creation/rules/can-decode.md +75 -0
  325. package/bundled/upstream/ecc/skills/remotion-video-creation/rules/charts.md +58 -0
  326. package/bundled/upstream/ecc/skills/remotion-video-creation/rules/compositions.md +146 -0
  327. package/bundled/upstream/ecc/skills/remotion-video-creation/rules/display-captions.md +126 -0
  328. package/bundled/upstream/ecc/skills/remotion-video-creation/rules/extract-frames.md +229 -0
  329. package/bundled/upstream/ecc/skills/remotion-video-creation/rules/fonts.md +152 -0
  330. package/bundled/upstream/ecc/skills/remotion-video-creation/rules/get-audio-duration.md +58 -0
  331. package/bundled/upstream/ecc/skills/remotion-video-creation/rules/get-video-dimensions.md +68 -0
  332. package/bundled/upstream/ecc/skills/remotion-video-creation/rules/get-video-duration.md +58 -0
  333. package/bundled/upstream/ecc/skills/remotion-video-creation/rules/gifs.md +138 -0
  334. package/bundled/upstream/ecc/skills/remotion-video-creation/rules/images.md +130 -0
  335. package/bundled/upstream/ecc/skills/remotion-video-creation/rules/import-srt-captions.md +67 -0
  336. package/bundled/upstream/ecc/skills/remotion-video-creation/rules/lottie.md +67 -0
  337. package/bundled/upstream/ecc/skills/remotion-video-creation/rules/measuring-dom-nodes.md +34 -0
  338. package/bundled/upstream/ecc/skills/remotion-video-creation/rules/measuring-text.md +143 -0
  339. package/bundled/upstream/ecc/skills/remotion-video-creation/rules/sequencing.md +106 -0
  340. package/bundled/upstream/ecc/skills/remotion-video-creation/rules/tailwind.md +11 -0
  341. package/bundled/upstream/ecc/skills/remotion-video-creation/rules/text-animations.md +20 -0
  342. package/bundled/upstream/ecc/skills/remotion-video-creation/rules/timing.md +179 -0
  343. package/bundled/upstream/ecc/skills/remotion-video-creation/rules/transcribe-captions.md +19 -0
  344. package/bundled/upstream/ecc/skills/remotion-video-creation/rules/transitions.md +122 -0
  345. package/bundled/upstream/ecc/skills/remotion-video-creation/rules/trimming.md +52 -0
  346. package/bundled/upstream/ecc/skills/remotion-video-creation/rules/videos.md +171 -0
  347. package/bundled/upstream/ecc/skills/repo-scan/SKILL.md +78 -0
  348. package/bundled/upstream/ecc/skills/research-ops/SKILL.md +112 -0
  349. package/bundled/upstream/ecc/skills/returns-reverse-logistics/SKILL.md +240 -0
  350. package/bundled/upstream/ecc/skills/rules-distill/SKILL.md +264 -0
  351. package/bundled/upstream/ecc/skills/rules-distill/scripts/scan-rules.sh +58 -0
  352. package/bundled/upstream/ecc/skills/rules-distill/scripts/scan-skills.sh +129 -0
  353. package/bundled/upstream/ecc/skills/rust-patterns/SKILL.md +499 -0
  354. package/bundled/upstream/ecc/skills/rust-testing/SKILL.md +500 -0
  355. package/bundled/upstream/ecc/skills/safety-guard/SKILL.md +75 -0
  356. package/bundled/upstream/ecc/skills/santa-method/SKILL.md +306 -0
  357. package/bundled/upstream/ecc/skills/search-first/SKILL.md +161 -0
  358. package/bundled/upstream/ecc/skills/security-bounty-hunter/SKILL.md +99 -0
  359. package/bundled/upstream/ecc/skills/security-review/SKILL.md +495 -0
  360. package/bundled/upstream/ecc/skills/security-review/cloud-infrastructure-security.md +361 -0
  361. package/bundled/upstream/ecc/skills/security-scan/SKILL.md +165 -0
  362. package/bundled/upstream/ecc/skills/seo/SKILL.md +154 -0
  363. package/bundled/upstream/ecc/skills/skill-comply/SKILL.md +58 -0
  364. package/bundled/upstream/ecc/skills/skill-comply/fixtures/compliant_trace.jsonl +5 -0
  365. package/bundled/upstream/ecc/skills/skill-comply/fixtures/noncompliant_trace.jsonl +3 -0
  366. package/bundled/upstream/ecc/skills/skill-comply/fixtures/tdd_spec.yaml +44 -0
  367. package/bundled/upstream/ecc/skills/skill-comply/prompts/classifier.md +24 -0
  368. package/bundled/upstream/ecc/skills/skill-comply/prompts/scenario_generator.md +62 -0
  369. package/bundled/upstream/ecc/skills/skill-comply/prompts/spec_generator.md +42 -0
  370. package/bundled/upstream/ecc/skills/skill-comply/pyproject.toml +15 -0
  371. package/bundled/upstream/ecc/skills/skill-comply/scripts/__init__.py +0 -0
  372. package/bundled/upstream/ecc/skills/skill-comply/scripts/classifier.py +85 -0
  373. package/bundled/upstream/ecc/skills/skill-comply/scripts/grader.py +124 -0
  374. package/bundled/upstream/ecc/skills/skill-comply/scripts/parser.py +107 -0
  375. package/bundled/upstream/ecc/skills/skill-comply/scripts/report.py +170 -0
  376. package/bundled/upstream/ecc/skills/skill-comply/scripts/run.py +127 -0
  377. package/bundled/upstream/ecc/skills/skill-comply/scripts/runner.py +161 -0
  378. package/bundled/upstream/ecc/skills/skill-comply/scripts/scenario_generator.py +70 -0
  379. package/bundled/upstream/ecc/skills/skill-comply/scripts/spec_generator.py +72 -0
  380. package/bundled/upstream/ecc/skills/skill-comply/scripts/utils.py +13 -0
  381. package/bundled/upstream/ecc/skills/skill-comply/tests/test_grader.py +197 -0
  382. package/bundled/upstream/ecc/skills/skill-comply/tests/test_parser.py +90 -0
  383. package/bundled/upstream/ecc/skills/skill-stocktake/SKILL.md +193 -0
  384. package/bundled/upstream/ecc/skills/skill-stocktake/scripts/quick-diff.sh +87 -0
  385. package/bundled/upstream/ecc/skills/skill-stocktake/scripts/save-results.sh +56 -0
  386. package/bundled/upstream/ecc/skills/skill-stocktake/scripts/scan.sh +170 -0
  387. package/bundled/upstream/ecc/skills/social-graph-ranker/SKILL.md +154 -0
  388. package/bundled/upstream/ecc/skills/springboot-patterns/SKILL.md +314 -0
  389. package/bundled/upstream/ecc/skills/springboot-security/SKILL.md +272 -0
  390. package/bundled/upstream/ecc/skills/springboot-tdd/SKILL.md +158 -0
  391. package/bundled/upstream/ecc/skills/springboot-verification/SKILL.md +231 -0
  392. package/bundled/upstream/ecc/skills/strategic-compact/SKILL.md +131 -0
  393. package/bundled/upstream/ecc/skills/strategic-compact/suggest-compact.sh +54 -0
  394. package/bundled/upstream/ecc/skills/swift-actor-persistence/SKILL.md +143 -0
  395. package/bundled/upstream/ecc/skills/swift-concurrency-6-2/SKILL.md +216 -0
  396. package/bundled/upstream/ecc/skills/swift-protocol-di-testing/SKILL.md +190 -0
  397. package/bundled/upstream/ecc/skills/swiftui-patterns/SKILL.md +259 -0
  398. package/bundled/upstream/ecc/skills/tdd-workflow/SKILL.md +463 -0
  399. package/bundled/upstream/ecc/skills/team-builder/SKILL.md +168 -0
  400. package/bundled/upstream/ecc/skills/terminal-ops/SKILL.md +109 -0
  401. package/bundled/upstream/ecc/skills/token-budget-advisor/SKILL.md +133 -0
  402. package/bundled/upstream/ecc/skills/ui-demo/SKILL.md +465 -0
  403. package/bundled/upstream/ecc/skills/unified-notifications-ops/SKILL.md +187 -0
  404. package/bundled/upstream/ecc/skills/verification-loop/SKILL.md +126 -0
  405. package/bundled/upstream/ecc/skills/video-editing/SKILL.md +310 -0
  406. package/bundled/upstream/ecc/skills/videodb/SKILL.md +374 -0
  407. package/bundled/upstream/ecc/skills/videodb/reference/api-reference.md +550 -0
  408. package/bundled/upstream/ecc/skills/videodb/reference/capture-reference.md +407 -0
  409. package/bundled/upstream/ecc/skills/videodb/reference/capture.md +101 -0
  410. package/bundled/upstream/ecc/skills/videodb/reference/editor.md +443 -0
  411. package/bundled/upstream/ecc/skills/videodb/reference/generative.md +331 -0
  412. package/bundled/upstream/ecc/skills/videodb/reference/rtstream-reference.md +564 -0
  413. package/bundled/upstream/ecc/skills/videodb/reference/rtstream.md +65 -0
  414. package/bundled/upstream/ecc/skills/videodb/reference/search.md +230 -0
  415. package/bundled/upstream/ecc/skills/videodb/reference/streaming.md +406 -0
  416. package/bundled/upstream/ecc/skills/videodb/reference/use-cases.md +118 -0
  417. package/bundled/upstream/ecc/skills/videodb/scripts/ws_listener.py +282 -0
  418. package/bundled/upstream/ecc/skills/visa-doc-translate/README.md +86 -0
  419. package/bundled/upstream/ecc/skills/visa-doc-translate/SKILL.md +117 -0
  420. package/bundled/upstream/ecc/skills/workspace-surface-audit/SKILL.md +125 -0
  421. package/bundled/upstream/ecc/skills/x-api/SKILL.md +230 -0
  422. package/bundled/upstream/superpowers/.omc-source/last-plan-apply.json +22 -0
  423. package/package.json +3 -1
  424. package/src/catalog/source-catalog.js +391 -0
  425. package/src/cli/artifact.js +3 -2
  426. package/src/cli/doctor.js +25 -4
  427. package/src/cli/index.js +19 -0
  428. package/src/cli/plan.js +220 -0
  429. package/src/cli/setup.js +209 -12
  430. package/src/cli/source.js +110 -3
  431. package/src/config/paths.js +31 -0
  432. package/src/config/sources.js +103 -10
  433. package/src/merge/hook-merger.js +1 -0
@@ -0,0 +1,197 @@
1
+ """Tests for grader module — compliance scoring with LLM classification."""
2
+
3
+ from pathlib import Path
4
+ from unittest.mock import patch
5
+
6
+ import pytest
7
+
8
+ from scripts.grader import ComplianceResult, StepResult, grade
9
+ from scripts.parser import ComplianceSpec, Detector, ObservationEvent, Step, parse_spec, parse_trace
10
+
11
+ FIXTURES = Path(__file__).parent.parent / "fixtures"
12
+
13
+
14
+ @pytest.fixture
15
+ def tdd_spec():
16
+ return parse_spec(FIXTURES / "tdd_spec.yaml")
17
+
18
+
19
+ @pytest.fixture
20
+ def compliant_trace():
21
+ return parse_trace(FIXTURES / "compliant_trace.jsonl")
22
+
23
+
24
+ @pytest.fixture
25
+ def noncompliant_trace():
26
+ return parse_trace(FIXTURES / "noncompliant_trace.jsonl")
27
+
28
+
29
+ def _mock_compliant_classification(spec, trace, model="haiku"): # noqa: ARG001
30
+ """Simulate LLM correctly classifying a compliant trace."""
31
+ return {
32
+ "write_test": [0],
33
+ "run_test_red": [1],
34
+ "write_impl": [2],
35
+ "run_test_green": [3],
36
+ "refactor": [4],
37
+ }
38
+
39
+
40
+ def _mock_noncompliant_classification(spec, trace, model="haiku"):
41
+ """Simulate LLM classifying a noncompliant trace (impl before test)."""
42
+ return {
43
+ "write_impl": [0], # src/fib.py written first
44
+ "write_test": [1], # test written second
45
+ "run_test_green": [2], # only a passing test run
46
+ }
47
+
48
+
49
+ def _mock_empty_classification(spec, trace, model="haiku"):
50
+ return {}
51
+
52
+
53
+ class TestGradeCompliant:
54
+ @patch("scripts.grader.classify_events", side_effect=_mock_compliant_classification)
55
+ def test_returns_compliance_result(self, mock_cls, tdd_spec, compliant_trace) -> None:
56
+ result = grade(tdd_spec, compliant_trace)
57
+ assert isinstance(result, ComplianceResult)
58
+
59
+ @patch("scripts.grader.classify_events", side_effect=_mock_compliant_classification)
60
+ def test_full_compliance(self, mock_cls, tdd_spec, compliant_trace) -> None:
61
+ result = grade(tdd_spec, compliant_trace)
62
+ assert result.compliance_rate == 1.0
63
+
64
+ @patch("scripts.grader.classify_events", side_effect=_mock_compliant_classification)
65
+ def test_all_required_steps_detected(self, mock_cls, tdd_spec, compliant_trace) -> None:
66
+ result = grade(tdd_spec, compliant_trace)
67
+ required_results = [s for s in result.steps if s.step_id in
68
+ ("write_test", "run_test_red", "write_impl", "run_test_green")]
69
+ assert all(s.detected for s in required_results)
70
+
71
+ @patch("scripts.grader.classify_events", side_effect=_mock_compliant_classification)
72
+ def test_optional_step_detected(self, mock_cls, tdd_spec, compliant_trace) -> None:
73
+ result = grade(tdd_spec, compliant_trace)
74
+ refactor = next(s for s in result.steps if s.step_id == "refactor")
75
+ assert refactor.detected is True
76
+
77
+ @patch("scripts.grader.classify_events", side_effect=_mock_compliant_classification)
78
+ def test_no_hook_promotion_recommended(self, mock_cls, tdd_spec, compliant_trace) -> None:
79
+ result = grade(tdd_spec, compliant_trace)
80
+ assert result.recommend_hook_promotion is False
81
+
82
+ @patch("scripts.grader.classify_events", side_effect=_mock_compliant_classification)
83
+ def test_step_evidence_not_empty(self, mock_cls, tdd_spec, compliant_trace) -> None:
84
+ result = grade(tdd_spec, compliant_trace)
85
+ for step in result.steps:
86
+ if step.detected:
87
+ assert len(step.evidence) > 0
88
+
89
+
90
+ class TestGradeNoncompliant:
91
+ @patch("scripts.grader.classify_events", side_effect=_mock_noncompliant_classification)
92
+ def test_low_compliance(self, mock_cls, tdd_spec, noncompliant_trace) -> None:
93
+ result = grade(tdd_spec, noncompliant_trace)
94
+ assert result.compliance_rate < 1.0
95
+
96
+ @patch("scripts.grader.classify_events", side_effect=_mock_noncompliant_classification)
97
+ def test_write_test_fails_ordering(self, mock_cls, tdd_spec, noncompliant_trace) -> None:
98
+ """write_test has before_step=write_impl, but test is written AFTER impl."""
99
+ result = grade(tdd_spec, noncompliant_trace)
100
+ write_test = next(s for s in result.steps if s.step_id == "write_test")
101
+ assert write_test.detected is False
102
+
103
+ @patch("scripts.grader.classify_events", side_effect=_mock_noncompliant_classification)
104
+ def test_run_test_red_not_detected(self, mock_cls, tdd_spec, noncompliant_trace) -> None:
105
+ result = grade(tdd_spec, noncompliant_trace)
106
+ run_red = next(s for s in result.steps if s.step_id == "run_test_red")
107
+ assert run_red.detected is False
108
+
109
+ @patch("scripts.grader.classify_events", side_effect=_mock_noncompliant_classification)
110
+ def test_hook_promotion_recommended(self, mock_cls, tdd_spec, noncompliant_trace) -> None:
111
+ result = grade(tdd_spec, noncompliant_trace)
112
+ assert result.recommend_hook_promotion is True
113
+
114
+ @patch("scripts.grader.classify_events", side_effect=_mock_noncompliant_classification)
115
+ def test_failure_reasons_present(self, mock_cls, tdd_spec, noncompliant_trace) -> None:
116
+ result = grade(tdd_spec, noncompliant_trace)
117
+ failed_steps = [s for s in result.steps if not s.detected and s.step_id != "refactor"]
118
+ for step in failed_steps:
119
+ assert step.failure_reason is not None
120
+
121
+
122
+ class TestGradeEdgeCases:
123
+ @patch("scripts.grader.classify_events", side_effect=_mock_empty_classification)
124
+ def test_empty_trace(self, mock_cls, tdd_spec) -> None:
125
+ result = grade(tdd_spec, [])
126
+ assert result.compliance_rate == 0.0
127
+ assert result.recommend_hook_promotion is True
128
+
129
+ @patch("scripts.grader.classify_events", side_effect=_mock_compliant_classification)
130
+ def test_compliance_rate_is_ratio_of_required_only(self, mock_cls, tdd_spec, compliant_trace) -> None:
131
+ result = grade(tdd_spec, compliant_trace)
132
+ assert result.compliance_rate == 1.0
133
+
134
+ @patch("scripts.grader.classify_events", side_effect=_mock_compliant_classification)
135
+ def test_spec_id_in_result(self, mock_cls, tdd_spec, compliant_trace) -> None:
136
+ result = grade(tdd_spec, compliant_trace)
137
+ assert result.spec_id == "tdd-workflow"
138
+
139
+ @patch("scripts.grader.classify_events")
140
+ def test_after_step_can_reference_later_declared_spec_step(self, mock_cls) -> None:
141
+ spec = ComplianceSpec(
142
+ id="out-of-order-after-step",
143
+ name="Out of order after_step",
144
+ source_rule="rules/common/testing.md",
145
+ version="1.0",
146
+ steps=(
147
+ Step(
148
+ id="step_a",
149
+ description="Occurs after step_b even though it is declared first",
150
+ required=True,
151
+ detector=Detector(
152
+ description="Event A",
153
+ after_step="step_b",
154
+ ),
155
+ ),
156
+ Step(
157
+ id="step_b",
158
+ description="Reference step declared later",
159
+ required=True,
160
+ detector=Detector(
161
+ description="Event B",
162
+ ),
163
+ ),
164
+ ),
165
+ threshold_promote_to_hook=0.5,
166
+ )
167
+ trace = [
168
+ ObservationEvent(
169
+ timestamp="2026-03-20T10:00:01Z",
170
+ event="tool_complete",
171
+ tool="Write",
172
+ session="sess-order",
173
+ input='{"file_path":"src/b.py"}',
174
+ output="step b",
175
+ ),
176
+ ObservationEvent(
177
+ timestamp="2026-03-20T10:00:02Z",
178
+ event="tool_complete",
179
+ tool="Write",
180
+ session="sess-order",
181
+ input='{"file_path":"src/a.py"}',
182
+ output="step a",
183
+ ),
184
+ ]
185
+ mock_cls.return_value = {
186
+ "step_a": [1],
187
+ "step_b": [0],
188
+ }
189
+
190
+ result = grade(spec, trace)
191
+
192
+ step_a = next(step for step in result.steps if step.step_id == "step_a")
193
+ step_b = next(step for step in result.steps if step.step_id == "step_b")
194
+ assert step_a.detected is True
195
+ assert step_a.failure_reason is None
196
+ assert step_b.detected is True
197
+ assert result.compliance_rate == 1.0
@@ -0,0 +1,90 @@
1
+ """Tests for parser module — JSONL trace and YAML spec parsing."""
2
+
3
+ from pathlib import Path
4
+
5
+ import pytest
6
+
7
+ from scripts.parser import (
8
+ ComplianceSpec,
9
+ Detector,
10
+ ObservationEvent,
11
+ Step,
12
+ parse_spec,
13
+ parse_trace,
14
+ )
15
+
16
+ FIXTURES = Path(__file__).parent.parent / "fixtures"
17
+
18
+
19
+ class TestParseTrace:
20
+ def test_parses_compliant_trace(self) -> None:
21
+ events = parse_trace(FIXTURES / "compliant_trace.jsonl")
22
+ assert len(events) == 5
23
+ assert all(isinstance(e, ObservationEvent) for e in events)
24
+
25
+ def test_events_sorted_by_timestamp(self) -> None:
26
+ events = parse_trace(FIXTURES / "compliant_trace.jsonl")
27
+ timestamps = [e.timestamp for e in events]
28
+ assert timestamps == sorted(timestamps)
29
+
30
+ def test_event_fields(self) -> None:
31
+ events = parse_trace(FIXTURES / "compliant_trace.jsonl")
32
+ first = events[0]
33
+ assert first.tool == "Write"
34
+ assert first.session == "sess-001"
35
+ assert "test_fib.py" in first.input
36
+ assert first.output == "File created"
37
+
38
+ def test_parses_noncompliant_trace(self) -> None:
39
+ events = parse_trace(FIXTURES / "noncompliant_trace.jsonl")
40
+ assert len(events) == 3
41
+ assert "src/fib.py" in events[0].input
42
+
43
+ def test_empty_file_returns_empty_list(self, tmp_path: Path) -> None:
44
+ empty = tmp_path / "empty.jsonl"
45
+ empty.write_text("")
46
+ events = parse_trace(empty)
47
+ assert events == []
48
+
49
+ def test_nonexistent_file_raises(self) -> None:
50
+ with pytest.raises(FileNotFoundError):
51
+ parse_trace(Path("/nonexistent/trace.jsonl"))
52
+
53
+
54
+ class TestParseSpec:
55
+ def test_parses_tdd_spec(self) -> None:
56
+ spec = parse_spec(FIXTURES / "tdd_spec.yaml")
57
+ assert isinstance(spec, ComplianceSpec)
58
+ assert spec.id == "tdd-workflow"
59
+ assert len(spec.steps) == 5
60
+
61
+ def test_step_fields(self) -> None:
62
+ spec = parse_spec(FIXTURES / "tdd_spec.yaml")
63
+ first = spec.steps[0]
64
+ assert isinstance(first, Step)
65
+ assert first.id == "write_test"
66
+ assert first.required is True
67
+ assert isinstance(first.detector, Detector)
68
+ assert "test file" in first.detector.description
69
+ assert first.detector.before_step == "write_impl"
70
+
71
+ def test_optional_detector_fields(self) -> None:
72
+ spec = parse_spec(FIXTURES / "tdd_spec.yaml")
73
+ write_test = spec.steps[0]
74
+ assert write_test.detector.after_step is None
75
+
76
+ run_test_red = spec.steps[1]
77
+ assert run_test_red.detector.after_step == "write_test"
78
+ assert run_test_red.detector.before_step == "write_impl"
79
+
80
+ def test_scoring_threshold(self) -> None:
81
+ spec = parse_spec(FIXTURES / "tdd_spec.yaml")
82
+ assert spec.threshold_promote_to_hook == 0.6
83
+
84
+ def test_required_vs_optional_steps(self) -> None:
85
+ spec = parse_spec(FIXTURES / "tdd_spec.yaml")
86
+ required = [s for s in spec.steps if s.required]
87
+ optional = [s for s in spec.steps if not s.required]
88
+ assert len(required) == 4
89
+ assert len(optional) == 1
90
+ assert optional[0].id == "refactor"
@@ -0,0 +1,193 @@
1
+ ---
2
+ description: "Use when auditing Claude skills and commands for quality. Supports Quick Scan (changed skills only) and Full Stocktake modes with sequential subagent batch evaluation."
3
+ origin: ECC
4
+ ---
5
+
6
+ # skill-stocktake
7
+
8
+ Slash command (`/skill-stocktake`) that audits all Claude skills and commands using a quality checklist + AI holistic judgment. Supports two modes: Quick Scan for recently changed skills, and Full Stocktake for a complete review.
9
+
10
+ ## Scope
11
+
12
+ The command targets the following paths **relative to the directory where it is invoked**:
13
+
14
+ | Path | Description |
15
+ |------|-------------|
16
+ | `~/.claude/skills/` | Global skills (all projects) |
17
+ | `{cwd}/.claude/skills/` | Project-level skills (if the directory exists) |
18
+
19
+ **At the start of Phase 1, the command explicitly lists which paths were found and scanned.**
20
+
21
+ ### Targeting a specific project
22
+
23
+ To include project-level skills, run from that project's root directory:
24
+
25
+ ```bash
26
+ cd ~/path/to/my-project
27
+ /skill-stocktake
28
+ ```
29
+
30
+ If the project has no `.claude/skills/` directory, only global skills and commands are evaluated.
31
+
32
+ ## Modes
33
+
34
+ | Mode | Trigger | Duration |
35
+ |------|---------|---------|
36
+ | Quick Scan | `results.json` exists (default) | 5–10 min |
37
+ | Full Stocktake | `results.json` absent, or `/skill-stocktake full` | 20–30 min |
38
+
39
+ **Results cache:** `~/.claude/skills/skill-stocktake/results.json`
40
+
41
+ ## Quick Scan Flow
42
+
43
+ Re-evaluate only skills that have changed since the last run (5–10 min).
44
+
45
+ 1. Read `~/.claude/skills/skill-stocktake/results.json`
46
+ 2. Run: `bash ~/.claude/skills/skill-stocktake/scripts/quick-diff.sh \
47
+ ~/.claude/skills/skill-stocktake/results.json`
48
+ (Project dir is auto-detected from `$PWD/.claude/skills`; pass it explicitly only if needed)
49
+ 3. If output is `[]`: report "No changes since last run." and stop
50
+ 4. Re-evaluate only those changed files using the same Phase 2 criteria
51
+ 5. Carry forward unchanged skills from previous results
52
+ 6. Output only the diff
53
+ 7. Run: `bash ~/.claude/skills/skill-stocktake/scripts/save-results.sh \
54
+ ~/.claude/skills/skill-stocktake/results.json <<< "$EVAL_RESULTS"`
55
+
56
+ ## Full Stocktake Flow
57
+
58
+ ### Phase 1 — Inventory
59
+
60
+ Run: `bash ~/.claude/skills/skill-stocktake/scripts/scan.sh`
61
+
62
+ The script enumerates skill files, extracts frontmatter, and collects UTC mtimes.
63
+ Project dir is auto-detected from `$PWD/.claude/skills`; pass it explicitly only if needed.
64
+ Present the scan summary and inventory table from the script output:
65
+
66
+ ```
67
+ Scanning:
68
+ ✓ ~/.claude/skills/ (17 files)
69
+ ✗ {cwd}/.claude/skills/ (not found — global skills only)
70
+ ```
71
+
72
+ | Skill | 7d use | 30d use | Description |
73
+ |-------|--------|---------|-------------|
74
+
75
+ ### Phase 2 — Quality Evaluation
76
+
77
+ Launch an Agent tool subagent (**general-purpose agent**) with the full inventory and checklist:
78
+
79
+ ```text
80
+ Agent(
81
+ subagent_type="general-purpose",
82
+ prompt="
83
+ Evaluate the following skill inventory against the checklist.
84
+
85
+ [INVENTORY]
86
+
87
+ [CHECKLIST]
88
+
89
+ Return JSON for each skill:
90
+ { \"verdict\": \"Keep\"|\"Improve\"|\"Update\"|\"Retire\"|\"Merge into [X]\", \"reason\": \"...\" }
91
+ "
92
+ )
93
+ ```
94
+
95
+ The subagent reads each skill, applies the checklist, and returns per-skill JSON:
96
+
97
+ `{ "verdict": "Keep"|"Improve"|"Update"|"Retire"|"Merge into [X]", "reason": "..." }`
98
+
99
+ **Chunk guidance:** Process ~20 skills per subagent invocation to keep context manageable. Save intermediate results to `results.json` (`status: "in_progress"`) after each chunk.
100
+
101
+ After all skills are evaluated: set `status: "completed"`, proceed to Phase 3.
102
+
103
+ **Resume detection:** If `status: "in_progress"` is found on startup, resume from the first unevaluated skill.
104
+
105
+ Each skill is evaluated against this checklist:
106
+
107
+ ```
108
+ - [ ] Content overlap with other skills checked
109
+ - [ ] Overlap with MEMORY.md / CLAUDE.md checked
110
+ - [ ] Freshness of technical references verified (use WebSearch if tool names / CLI flags / APIs are present)
111
+ - [ ] Usage frequency considered
112
+ ```
113
+
114
+ Verdict criteria:
115
+
116
+ | Verdict | Meaning |
117
+ |---------|---------|
118
+ | Keep | Useful and current |
119
+ | Improve | Worth keeping, but specific improvements needed |
120
+ | Update | Referenced technology is outdated (verify with WebSearch) |
121
+ | Retire | Low quality, stale, or cost-asymmetric |
122
+ | Merge into [X] | Substantial overlap with another skill; name the merge target |
123
+
124
+ Evaluation is **holistic AI judgment** — not a numeric rubric. Guiding dimensions:
125
+ - **Actionability**: code examples, commands, or steps that let you act immediately
126
+ - **Scope fit**: name, trigger, and content are aligned; not too broad or narrow
127
+ - **Uniqueness**: value not replaceable by MEMORY.md / CLAUDE.md / another skill
128
+ - **Currency**: technical references work in the current environment
129
+
130
+ **Reason quality requirements** — the `reason` field must be self-contained and decision-enabling:
131
+ - Do NOT write "unchanged" alone — always restate the core evidence
132
+ - For **Retire**: state (1) what specific defect was found, (2) what covers the same need instead
133
+ - Bad: `"Superseded"`
134
+ - Good: `"disable-model-invocation: true already set; superseded by continuous-learning-v2 which covers all the same patterns plus confidence scoring. No unique content remains."`
135
+ - For **Merge**: name the target and describe what content to integrate
136
+ - Bad: `"Overlaps with X"`
137
+ - Good: `"42-line thin content; Step 4 of chatlog-to-article already covers the same workflow. Integrate the 'article angle' tip as a note in that skill."`
138
+ - For **Improve**: describe the specific change needed (what section, what action, target size if relevant)
139
+ - Bad: `"Too long"`
140
+ - Good: `"276 lines; Section 'Framework Comparison' (L80–140) duplicates ai-era-architecture-principles; delete it to reach ~150 lines."`
141
+ - For **Keep** (mtime-only change in Quick Scan): restate the original verdict rationale, do not write "unchanged"
142
+ - Bad: `"Unchanged"`
143
+ - Good: `"mtime updated but content unchanged. Unique Python reference explicitly imported by rules/python/; no overlap found."`
144
+
145
+ ### Phase 3 — Summary Table
146
+
147
+ | Skill | 7d use | Verdict | Reason |
148
+ |-------|--------|---------|--------|
149
+
150
+ ### Phase 4 — Consolidation
151
+
152
+ 1. **Retire / Merge**: present detailed justification per file before confirming with user:
153
+ - What specific problem was found (overlap, staleness, broken references, etc.)
154
+ - What alternative covers the same functionality (for Retire: which existing skill/rule; for Merge: the target file and what content to integrate)
155
+ - Impact of removal (any dependent skills, MEMORY.md references, or workflows affected)
156
+ 2. **Improve**: present specific improvement suggestions with rationale:
157
+ - What to change and why (e.g., "trim 430→200 lines because sections X/Y duplicate python-patterns")
158
+ - User decides whether to act
159
+ 3. **Update**: present updated content with sources checked
160
+ 4. Check MEMORY.md line count; propose compression if >100 lines
161
+
162
+ ## Results File Schema
163
+
164
+ `~/.claude/skills/skill-stocktake/results.json`:
165
+
166
+ **`evaluated_at`**: Must be set to the actual UTC time of evaluation completion.
167
+ Obtain via Bash: `date -u +%Y-%m-%dT%H:%M:%SZ`. Never use a date-only approximation like `T00:00:00Z`.
168
+
169
+ ```json
170
+ {
171
+ "evaluated_at": "2026-02-21T10:00:00Z",
172
+ "mode": "full",
173
+ "batch_progress": {
174
+ "total": 80,
175
+ "evaluated": 80,
176
+ "status": "completed"
177
+ },
178
+ "skills": {
179
+ "skill-name": {
180
+ "path": "~/.claude/skills/skill-name/SKILL.md",
181
+ "verdict": "Keep",
182
+ "reason": "Concrete, actionable, unique value for X workflow",
183
+ "mtime": "2026-01-15T08:30:00Z"
184
+ }
185
+ }
186
+ }
187
+ ```
188
+
189
+ ## Notes
190
+
191
+ - Evaluation is blind: the same checklist applies to all skills regardless of origin (ECC, self-authored, auto-extracted)
192
+ - Archive / delete operations always require explicit user confirmation
193
+ - No verdict branching by skill origin
@@ -0,0 +1,87 @@
1
+ #!/usr/bin/env bash
2
+ # quick-diff.sh — compare skill file mtimes against results.json evaluated_at
3
+ # Usage: quick-diff.sh RESULTS_JSON [CWD_SKILLS_DIR]
4
+ # Output: JSON array of changed/new files to stdout (empty [] if no changes)
5
+ #
6
+ # When CWD_SKILLS_DIR is omitted, defaults to $PWD/.claude/skills so the
7
+ # script always picks up project-level skills without relying on the caller.
8
+ #
9
+ # Environment:
10
+ # SKILL_STOCKTAKE_GLOBAL_DIR Override ~/.claude/skills (for testing only;
11
+ # do not set in production — intended for bats tests)
12
+ # SKILL_STOCKTAKE_PROJECT_DIR Override project dir detection (for testing only)
13
+
14
+ set -euo pipefail
15
+
16
+ RESULTS_JSON="${1:-}"
17
+ CWD_SKILLS_DIR="${SKILL_STOCKTAKE_PROJECT_DIR:-${2:-$PWD/.claude/skills}}"
18
+ GLOBAL_DIR="${SKILL_STOCKTAKE_GLOBAL_DIR:-$HOME/.claude/skills}"
19
+
20
+ if [[ -z "$RESULTS_JSON" || ! -f "$RESULTS_JSON" ]]; then
21
+ echo "Error: RESULTS_JSON not found: ${RESULTS_JSON:-<empty>}" >&2
22
+ exit 1
23
+ fi
24
+
25
+ # Validate CWD_SKILLS_DIR looks like a .claude/skills path (defense-in-depth).
26
+ # Only warn when the path exists — a nonexistent path poses no traversal risk.
27
+ if [[ -n "$CWD_SKILLS_DIR" && -d "$CWD_SKILLS_DIR" && "$CWD_SKILLS_DIR" != */.claude/skills* ]]; then
28
+ echo "Warning: CWD_SKILLS_DIR does not look like a .claude/skills path: $CWD_SKILLS_DIR" >&2
29
+ fi
30
+
31
+ evaluated_at=$(jq -r '.evaluated_at' "$RESULTS_JSON")
32
+
33
+ # Fail fast on a missing or malformed evaluated_at rather than producing
34
+ # unpredictable results from ISO 8601 string comparison against "null".
35
+ if [[ ! "$evaluated_at" =~ ^[0-9]{4}-[0-9]{2}-[0-9]{2}T[0-9]{2}:[0-9]{2}:[0-9]{2}Z$ ]]; then
36
+ echo "Error: invalid or missing evaluated_at in $RESULTS_JSON: $evaluated_at" >&2
37
+ exit 1
38
+ fi
39
+
40
+ # Pre-extract known paths from results.json once (O(1) lookup per file instead of O(n*m))
41
+ known_paths=$(jq -r '.skills[].path' "$RESULTS_JSON" 2>/dev/null)
42
+
43
+ tmpdir=$(mktemp -d)
44
+ # Use a function to avoid embedding $tmpdir in a quoted string (prevents injection
45
+ # if TMPDIR were crafted to contain shell metacharacters).
46
+ _cleanup() { rm -rf "$tmpdir"; }
47
+ trap _cleanup EXIT
48
+
49
+ # Shared counter across process_dir calls — intentionally NOT local
50
+ i=0
51
+
52
+ process_dir() {
53
+ local dir="$1"
54
+ while IFS= read -r file; do
55
+ local mtime dp is_new
56
+ mtime=$(date -u -r "$file" +%Y-%m-%dT%H:%M:%SZ)
57
+ dp="${file/#$HOME/~}"
58
+
59
+ # Check if this file is known to results.json (exact whole-line match to
60
+ # avoid substring false-positives, e.g. "python-patterns" matching "python-patterns-v2").
61
+ if echo "$known_paths" | grep -qxF "$dp"; then
62
+ is_new="false"
63
+ # Known file: only emit if mtime changed (ISO 8601 string comparison is safe)
64
+ [[ "$mtime" > "$evaluated_at" ]] || continue
65
+ else
66
+ is_new="true"
67
+ # New file: always emit regardless of mtime
68
+ fi
69
+
70
+ jq -n \
71
+ --arg path "$dp" \
72
+ --arg mtime "$mtime" \
73
+ --argjson is_new "$is_new" \
74
+ '{path:$path,mtime:$mtime,is_new:$is_new}' \
75
+ > "$tmpdir/$i.json"
76
+ i=$((i+1))
77
+ done < <(find "$dir" -name "*.md" -type f 2>/dev/null | sort)
78
+ }
79
+
80
+ [[ -d "$GLOBAL_DIR" ]] && process_dir "$GLOBAL_DIR"
81
+ [[ -n "$CWD_SKILLS_DIR" && -d "$CWD_SKILLS_DIR" ]] && process_dir "$CWD_SKILLS_DIR"
82
+
83
+ if [[ $i -eq 0 ]]; then
84
+ echo "[]"
85
+ else
86
+ jq -s '.' "$tmpdir"/*.json
87
+ fi
@@ -0,0 +1,56 @@
1
+ #!/usr/bin/env bash
2
+ # save-results.sh — merge evaluated skills into results.json with correct UTC timestamp
3
+ # Usage: save-results.sh RESULTS_JSON <<< "$EVAL_JSON"
4
+ #
5
+ # stdin format:
6
+ # { "skills": {...}, "mode"?: "full"|"quick", "batch_progress"?: {...} }
7
+ #
8
+ # Always sets evaluated_at to current UTC time via `date -u`.
9
+ # Merges stdin .skills into existing results.json (new entries override old).
10
+ # Optionally updates .mode and .batch_progress if present in stdin.
11
+
12
+ set -euo pipefail
13
+
14
+ RESULTS_JSON="${1:-}"
15
+
16
+ if [[ -z "$RESULTS_JSON" ]]; then
17
+ echo "Error: RESULTS_JSON argument required" >&2
18
+ echo "Usage: save-results.sh RESULTS_JSON <<< \"\$EVAL_JSON\"" >&2
19
+ exit 1
20
+ fi
21
+
22
+ EVALUATED_AT=$(date -u +%Y-%m-%dT%H:%M:%SZ)
23
+
24
+ # Read eval results from stdin and validate JSON before touching the results file
25
+ input_json=$(cat)
26
+ if ! echo "$input_json" | jq empty 2>/dev/null; then
27
+ echo "Error: stdin is not valid JSON" >&2
28
+ exit 1
29
+ fi
30
+
31
+ if [[ ! -f "$RESULTS_JSON" ]]; then
32
+ # Bootstrap: create new results.json from stdin JSON + current UTC timestamp
33
+ echo "$input_json" | jq --arg ea "$EVALUATED_AT" \
34
+ '. + { evaluated_at: $ea }' > "$RESULTS_JSON"
35
+ exit 0
36
+ fi
37
+
38
+ # Merge: new .skills override existing ones; old skills not in input_json are kept.
39
+ # Optionally update .mode and .batch_progress if provided.
40
+ #
41
+ # Use mktemp for a collision-safe temp file (concurrent runs on the same RESULTS_JSON
42
+ # would race on a predictable ".tmp" suffix; random suffix prevents silent overwrites).
43
+ tmp=$(mktemp "${RESULTS_JSON}.XXXXXX")
44
+ trap 'rm -f "$tmp"' EXIT
45
+
46
+ jq -s \
47
+ --arg ea "$EVALUATED_AT" \
48
+ '.[0] as $existing | .[1] as $new |
49
+ $existing |
50
+ .evaluated_at = $ea |
51
+ .skills = ($existing.skills + ($new.skills // {})) |
52
+ if ($new | has("mode")) then .mode = $new.mode else . end |
53
+ if ($new | has("batch_progress")) then .batch_progress = $new.batch_progress else . end' \
54
+ "$RESULTS_JSON" <(echo "$input_json") > "$tmp"
55
+
56
+ mv "$tmp" "$RESULTS_JSON"