agentsys 5.1.0 → 5.2.1

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 (1353) hide show
  1. package/.claude-plugin/marketplace.json +105 -42
  2. package/.claude-plugin/plugin.json +2 -2
  3. package/AGENTS.md +2 -15
  4. package/CHANGELOG.md +55 -5
  5. package/README.md +143 -45
  6. package/SECURITY.md +1 -1
  7. package/adapters/README.md +6 -6
  8. package/adapters/codex/README.md +3 -3
  9. package/adapters/codex/install.sh +2 -2
  10. package/adapters/opencode/README.md +3 -3
  11. package/adapters/opencode/install.sh +2 -2
  12. package/agent-knowledge/AGENTS.md +144 -5
  13. package/agent-knowledge/all-in-one-plus-modular-packages.md +576 -0
  14. package/agent-knowledge/cli-browser-automation-agents.md +936 -0
  15. package/agent-knowledge/github-org-project-management.md +319 -0
  16. package/agent-knowledge/github-org-structure-patterns.md +268 -0
  17. package/agent-knowledge/multi-product-org-docs.md +622 -0
  18. package/agent-knowledge/oss-org-naming-patterns.md +368 -0
  19. package/agent-knowledge/resources/all-in-one-plus-modular-packages-sources.json +310 -0
  20. package/agent-knowledge/resources/cli-browser-automation-agents-sources.json +428 -0
  21. package/agent-knowledge/resources/github-org-project-management-sources.json +239 -0
  22. package/agent-knowledge/resources/github-org-structure-patterns-sources.json +293 -0
  23. package/agent-knowledge/resources/multi-product-org-docs-sources.json +514 -0
  24. package/agent-knowledge/resources/oss-org-naming-patterns-sources.json +458 -0
  25. package/agent-knowledge/resources/skill-plugin-distribution-patterns-sources.json +290 -0
  26. package/agent-knowledge/resources/terminal-browsers-agent-automation-sources.json +758 -0
  27. package/agent-knowledge/resources/web-session-persistence-cli-agents-sources.json +528 -0
  28. package/agent-knowledge/skill-plugin-distribution-patterns.md +661 -0
  29. package/agent-knowledge/terminal-browsers-agent-automation.md +776 -0
  30. package/agent-knowledge/web-session-persistence-cli-agents.md +1352 -0
  31. package/bin/cli.js +1369 -18
  32. package/bin/dev-cli.js +15 -24
  33. package/lib/adapter-transforms.js +147 -3
  34. package/lib/cross-platform/index.js +7 -3
  35. package/lib/discovery/index.js +26 -1
  36. package/lib/index.js +2 -0
  37. package/lib/package.json +1 -1
  38. package/lib/patterns/cli-enhancers.js +11 -2
  39. package/lib/sources/policy-questions.js +76 -2
  40. package/lib/state/workflow-state.js +18 -7
  41. package/meta/skills/maintain-cross-platform/SKILL.md +1 -1
  42. package/package.json +4 -4
  43. package/scripts/bump-version.js +1 -6
  44. package/scripts/dev-install.js +1 -1
  45. package/scripts/fix-graduated-repos.js +288 -0
  46. package/scripts/graduate-plugin.js +433 -0
  47. package/scripts/preflight.js +19 -48
  48. package/scripts/scaffold.js +2 -2
  49. package/scripts/setup-hooks.js +2 -9
  50. package/scripts/stamp-version.js +3 -34
  51. package/scripts/validate-agent-skill-compliance.js +2 -0
  52. package/scripts/validate-counts.js +27 -0
  53. package/site/assets/css/design-system/base.css +151 -0
  54. package/site/assets/css/design-system/tokens.css +354 -0
  55. package/site/assets/css/tokens.css +5 -469
  56. package/site/content.json +13 -13
  57. package/site/index.html +14 -13
  58. package/site/ux-spec.md +7 -7
  59. package/adapters/codex/skills/agnix/SKILL.md +0 -137
  60. package/adapters/codex/skills/audit-project/SKILL.md +0 -333
  61. package/adapters/codex/skills/audit-project-agents/SKILL.md +0 -458
  62. package/adapters/codex/skills/audit-project-github/SKILL.md +0 -145
  63. package/adapters/codex/skills/consult/SKILL.md +0 -320
  64. package/adapters/codex/skills/debate/SKILL.md +0 -214
  65. package/adapters/codex/skills/delivery-approval/SKILL.md +0 -338
  66. package/adapters/codex/skills/deslop/SKILL.md +0 -166
  67. package/adapters/codex/skills/drift-detect/SKILL.md +0 -267
  68. package/adapters/codex/skills/enhance/SKILL.md +0 -176
  69. package/adapters/codex/skills/learn/SKILL.md +0 -187
  70. package/adapters/codex/skills/next-task/SKILL.md +0 -545
  71. package/adapters/codex/skills/perf/SKILL.md +0 -468
  72. package/adapters/codex/skills/repo-map/SKILL.md +0 -131
  73. package/adapters/codex/skills/ship/SKILL.md +0 -490
  74. package/adapters/codex/skills/ship-ci-review-loop/SKILL.md +0 -472
  75. package/adapters/codex/skills/ship-deployment/SKILL.md +0 -335
  76. package/adapters/codex/skills/ship-error-handling/SKILL.md +0 -259
  77. package/adapters/codex/skills/sync-docs/SKILL.md +0 -185
  78. package/adapters/opencode/agents/agent-enhancer.md +0 -64
  79. package/adapters/opencode/agents/agnix-agent.md +0 -55
  80. package/adapters/opencode/agents/ci-fixer.md +0 -103
  81. package/adapters/opencode/agents/ci-monitor.md +0 -126
  82. package/adapters/opencode/agents/claudemd-enhancer.md +0 -65
  83. package/adapters/opencode/agents/consult-agent.md +0 -216
  84. package/adapters/opencode/agents/cross-file-enhancer.md +0 -53
  85. package/adapters/opencode/agents/debate-orchestrator.md +0 -169
  86. package/adapters/opencode/agents/delivery-validator.md +0 -114
  87. package/adapters/opencode/agents/deslop-agent.md +0 -87
  88. package/adapters/opencode/agents/docs-enhancer.md +0 -64
  89. package/adapters/opencode/agents/exploration-agent.md +0 -142
  90. package/adapters/opencode/agents/hooks-enhancer.md +0 -65
  91. package/adapters/opencode/agents/implementation-agent.md +0 -205
  92. package/adapters/opencode/agents/learn-agent.md +0 -278
  93. package/adapters/opencode/agents/map-validator.md +0 -64
  94. package/adapters/opencode/agents/perf-analyzer.md +0 -39
  95. package/adapters/opencode/agents/perf-code-paths.md +0 -11
  96. package/adapters/opencode/agents/perf-investigation-logger.md +0 -43
  97. package/adapters/opencode/agents/perf-orchestrator.md +0 -146
  98. package/adapters/opencode/agents/perf-theory-gatherer.md +0 -17
  99. package/adapters/opencode/agents/perf-theory-tester.md +0 -42
  100. package/adapters/opencode/agents/plan-synthesizer.md +0 -228
  101. package/adapters/opencode/agents/planning-agent.md +0 -234
  102. package/adapters/opencode/agents/plugin-enhancer.md +0 -63
  103. package/adapters/opencode/agents/prompt-enhancer.md +0 -57
  104. package/adapters/opencode/agents/simple-fixer.md +0 -106
  105. package/adapters/opencode/agents/skills-enhancer.md +0 -65
  106. package/adapters/opencode/agents/sync-docs-agent.md +0 -152
  107. package/adapters/opencode/agents/task-discoverer.md +0 -79
  108. package/adapters/opencode/agents/test-coverage-checker.md +0 -143
  109. package/adapters/opencode/agents/worktree-manager.md +0 -208
  110. package/adapters/opencode/commands/agnix.md +0 -105
  111. package/adapters/opencode/commands/audit-project-agents.md +0 -124
  112. package/adapters/opencode/commands/audit-project-github.md +0 -144
  113. package/adapters/opencode/commands/audit-project.md +0 -267
  114. package/adapters/opencode/commands/consult.md +0 -328
  115. package/adapters/opencode/commands/debate.md +0 -224
  116. package/adapters/opencode/commands/delivery-approval.md +0 -211
  117. package/adapters/opencode/commands/deslop.md +0 -131
  118. package/adapters/opencode/commands/drift-detect.md +0 -172
  119. package/adapters/opencode/commands/enhance.md +0 -182
  120. package/adapters/opencode/commands/learn.md +0 -115
  121. package/adapters/opencode/commands/next-task.md +0 -392
  122. package/adapters/opencode/commands/perf.md +0 -48
  123. package/adapters/opencode/commands/repo-map.md +0 -68
  124. package/adapters/opencode/commands/ship-ci-review-loop.md +0 -333
  125. package/adapters/opencode/commands/ship-deployment.md +0 -335
  126. package/adapters/opencode/commands/ship-error-handling.md +0 -247
  127. package/adapters/opencode/commands/ship.md +0 -370
  128. package/adapters/opencode/commands/sync-docs.md +0 -107
  129. package/adapters/opencode/skills/agnix/SKILL.md +0 -138
  130. package/adapters/opencode/skills/consult/SKILL.md +0 -318
  131. package/adapters/opencode/skills/debate/SKILL.md +0 -245
  132. package/adapters/opencode/skills/deslop/SKILL.md +0 -168
  133. package/adapters/opencode/skills/discover-tasks/SKILL.md +0 -101
  134. package/adapters/opencode/skills/drift-analysis/SKILL.md +0 -278
  135. package/adapters/opencode/skills/enhance-agent-prompts/SKILL.md +0 -278
  136. package/adapters/opencode/skills/enhance-claude-memory/SKILL.md +0 -389
  137. package/adapters/opencode/skills/enhance-cross-file/SKILL.md +0 -111
  138. package/adapters/opencode/skills/enhance-docs/SKILL.md +0 -287
  139. package/adapters/opencode/skills/enhance-hooks/SKILL.md +0 -556
  140. package/adapters/opencode/skills/enhance-orchestrator/SKILL.md +0 -113
  141. package/adapters/opencode/skills/enhance-plugins/SKILL.md +0 -313
  142. package/adapters/opencode/skills/enhance-prompts/SKILL.md +0 -340
  143. package/adapters/opencode/skills/enhance-skills/SKILL.md +0 -442
  144. package/adapters/opencode/skills/learn/SKILL.md +0 -351
  145. package/adapters/opencode/skills/orchestrate-review/SKILL.md +0 -94
  146. package/adapters/opencode/skills/perf-analyzer/SKILL.md +0 -37
  147. package/adapters/opencode/skills/perf-baseline-manager/SKILL.md +0 -30
  148. package/adapters/opencode/skills/perf-benchmarker/SKILL.md +0 -48
  149. package/adapters/opencode/skills/perf-code-paths/SKILL.md +0 -32
  150. package/adapters/opencode/skills/perf-investigation-logger/SKILL.md +0 -41
  151. package/adapters/opencode/skills/perf-profiler/SKILL.md +0 -38
  152. package/adapters/opencode/skills/perf-theory-gatherer/SKILL.md +0 -35
  153. package/adapters/opencode/skills/perf-theory-tester/SKILL.md +0 -36
  154. package/adapters/opencode/skills/repo-mapping/SKILL.md +0 -85
  155. package/adapters/opencode/skills/sync-docs/SKILL.md +0 -245
  156. package/adapters/opencode/skills/validate-delivery/SKILL.md +0 -111
  157. package/plugins/agnix/.claude-plugin/plugin.json +0 -22
  158. package/plugins/agnix/agents/agnix-agent.md +0 -56
  159. package/plugins/agnix/commands/agnix.md +0 -139
  160. package/plugins/agnix/skills/agnix/SKILL.md +0 -138
  161. package/plugins/audit-project/.claude-plugin/plugin.json +0 -20
  162. package/plugins/audit-project/commands/audit-project-agents.md +0 -458
  163. package/plugins/audit-project/commands/audit-project-github.md +0 -144
  164. package/plugins/audit-project/commands/audit-project.md +0 -336
  165. package/plugins/audit-project/lib/adapter-transforms.js +0 -298
  166. package/plugins/audit-project/lib/collectors/codebase.js +0 -392
  167. package/plugins/audit-project/lib/collectors/docs-patterns.js +0 -713
  168. package/plugins/audit-project/lib/collectors/documentation.js +0 -219
  169. package/plugins/audit-project/lib/collectors/github.js +0 -330
  170. package/plugins/audit-project/lib/collectors/index.js +0 -126
  171. package/plugins/audit-project/lib/config/index.js +0 -14
  172. package/plugins/audit-project/lib/cross-platform/index.js +0 -539
  173. package/plugins/audit-project/lib/discovery/index.js +0 -352
  174. package/plugins/audit-project/lib/drift-detect/collectors.js +0 -37
  175. package/plugins/audit-project/lib/enhance/agent-analyzer.js +0 -421
  176. package/plugins/audit-project/lib/enhance/agent-patterns.js +0 -571
  177. package/plugins/audit-project/lib/enhance/auto-suppression.js +0 -622
  178. package/plugins/audit-project/lib/enhance/benchmark.js +0 -417
  179. package/plugins/audit-project/lib/enhance/cross-file-analyzer.js +0 -930
  180. package/plugins/audit-project/lib/enhance/cross-file-patterns.js +0 -370
  181. package/plugins/audit-project/lib/enhance/docs-analyzer.js +0 -325
  182. package/plugins/audit-project/lib/enhance/docs-patterns.js +0 -671
  183. package/plugins/audit-project/lib/enhance/fixer.js +0 -721
  184. package/plugins/audit-project/lib/enhance/hook-analyzer.js +0 -135
  185. package/plugins/audit-project/lib/enhance/hook-patterns.js +0 -40
  186. package/plugins/audit-project/lib/enhance/index.js +0 -127
  187. package/plugins/audit-project/lib/enhance/plugin-analyzer.js +0 -402
  188. package/plugins/audit-project/lib/enhance/plugin-patterns.js +0 -326
  189. package/plugins/audit-project/lib/enhance/projectmemory-analyzer.js +0 -551
  190. package/plugins/audit-project/lib/enhance/projectmemory-patterns.js +0 -617
  191. package/plugins/audit-project/lib/enhance/prompt-analyzer.js +0 -457
  192. package/plugins/audit-project/lib/enhance/prompt-patterns.js +0 -1484
  193. package/plugins/audit-project/lib/enhance/reporter.js +0 -1348
  194. package/plugins/audit-project/lib/enhance/security-patterns.js +0 -284
  195. package/plugins/audit-project/lib/enhance/skill-analyzer.js +0 -182
  196. package/plugins/audit-project/lib/enhance/skill-patterns.js +0 -147
  197. package/plugins/audit-project/lib/enhance/suppression.js +0 -352
  198. package/plugins/audit-project/lib/enhance/tool-patterns.js +0 -373
  199. package/plugins/audit-project/lib/index.js +0 -270
  200. package/plugins/audit-project/lib/patterns/cli-enhancers.js +0 -611
  201. package/plugins/audit-project/lib/patterns/pipeline.js +0 -948
  202. package/plugins/audit-project/lib/patterns/review-patterns.js +0 -558
  203. package/plugins/audit-project/lib/patterns/slop-analyzers.js +0 -2305
  204. package/plugins/audit-project/lib/patterns/slop-patterns.js +0 -1187
  205. package/plugins/audit-project/lib/perf/analyzer/index.js +0 -22
  206. package/plugins/audit-project/lib/perf/argument-parser.js +0 -105
  207. package/plugins/audit-project/lib/perf/baseline-comparator.js +0 -50
  208. package/plugins/audit-project/lib/perf/baseline-store.js +0 -127
  209. package/plugins/audit-project/lib/perf/benchmark-runner.js +0 -404
  210. package/plugins/audit-project/lib/perf/breaking-point-finder.js +0 -52
  211. package/plugins/audit-project/lib/perf/breaking-point-runner.js +0 -60
  212. package/plugins/audit-project/lib/perf/checkpoint.js +0 -123
  213. package/plugins/audit-project/lib/perf/code-paths.js +0 -86
  214. package/plugins/audit-project/lib/perf/consolidation.js +0 -37
  215. package/plugins/audit-project/lib/perf/constraint-runner.js +0 -71
  216. package/plugins/audit-project/lib/perf/experiment-runner.js +0 -32
  217. package/plugins/audit-project/lib/perf/index.js +0 -41
  218. package/plugins/audit-project/lib/perf/investigation-state.js +0 -874
  219. package/plugins/audit-project/lib/perf/optimization-runner.js +0 -79
  220. package/plugins/audit-project/lib/perf/profilers/go.js +0 -22
  221. package/plugins/audit-project/lib/perf/profilers/index.js +0 -46
  222. package/plugins/audit-project/lib/perf/profilers/java.js +0 -23
  223. package/plugins/audit-project/lib/perf/profilers/node.js +0 -27
  224. package/plugins/audit-project/lib/perf/profilers/python.js +0 -23
  225. package/plugins/audit-project/lib/perf/profilers/rust.js +0 -23
  226. package/plugins/audit-project/lib/perf/profiling-runner.js +0 -75
  227. package/plugins/audit-project/lib/perf/schemas.js +0 -140
  228. package/plugins/audit-project/lib/platform/detect-platform.js +0 -413
  229. package/plugins/audit-project/lib/platform/detection-configs.js +0 -93
  230. package/plugins/audit-project/lib/platform/state-dir.js +0 -132
  231. package/plugins/audit-project/lib/platform/verify-tools.js +0 -182
  232. package/plugins/audit-project/lib/repo-map/cache.js +0 -152
  233. package/plugins/audit-project/lib/repo-map/concurrency.js +0 -29
  234. package/plugins/audit-project/lib/repo-map/index.js +0 -222
  235. package/plugins/audit-project/lib/repo-map/installer.js +0 -212
  236. package/plugins/audit-project/lib/repo-map/queries/go.js +0 -27
  237. package/plugins/audit-project/lib/repo-map/queries/index.js +0 -100
  238. package/plugins/audit-project/lib/repo-map/queries/java.js +0 -38
  239. package/plugins/audit-project/lib/repo-map/queries/javascript.js +0 -55
  240. package/plugins/audit-project/lib/repo-map/queries/python.js +0 -24
  241. package/plugins/audit-project/lib/repo-map/queries/rust.js +0 -73
  242. package/plugins/audit-project/lib/repo-map/queries/typescript.js +0 -38
  243. package/plugins/audit-project/lib/repo-map/runner.js +0 -1364
  244. package/plugins/audit-project/lib/repo-map/updater.js +0 -562
  245. package/plugins/audit-project/lib/repo-map/usage-analyzer.js +0 -407
  246. package/plugins/audit-project/lib/schemas/plugin-manifest.schema.json +0 -57
  247. package/plugins/audit-project/lib/schemas/validator.js +0 -247
  248. package/plugins/audit-project/lib/sources/custom-handler.js +0 -199
  249. package/plugins/audit-project/lib/sources/policy-questions.js +0 -246
  250. package/plugins/audit-project/lib/sources/source-cache.js +0 -165
  251. package/plugins/audit-project/lib/state/workflow-state.js +0 -576
  252. package/plugins/audit-project/lib/types/agent-frontmatter.d.ts +0 -134
  253. package/plugins/audit-project/lib/types/command-frontmatter.d.ts +0 -107
  254. package/plugins/audit-project/lib/types/hook-frontmatter.d.ts +0 -115
  255. package/plugins/audit-project/lib/types/index.d.ts +0 -84
  256. package/plugins/audit-project/lib/types/plugin-manifest.d.ts +0 -102
  257. package/plugins/audit-project/lib/types/skill-frontmatter.d.ts +0 -89
  258. package/plugins/audit-project/lib/utils/atomic-write.js +0 -94
  259. package/plugins/audit-project/lib/utils/cache-manager.js +0 -159
  260. package/plugins/audit-project/lib/utils/command-parser.js +0 -0
  261. package/plugins/audit-project/lib/utils/context-optimizer.js +0 -300
  262. package/plugins/audit-project/lib/utils/deprecation.js +0 -37
  263. package/plugins/audit-project/lib/utils/shell-escape.js +0 -88
  264. package/plugins/audit-project/lib/utils/state-helpers.js +0 -61
  265. package/plugins/consult/.claude-plugin/plugin.json +0 -24
  266. package/plugins/consult/agents/consult-agent.md +0 -222
  267. package/plugins/consult/commands/consult.md +0 -325
  268. package/plugins/consult/skills/consult/SKILL.md +0 -312
  269. package/plugins/debate/.claude-plugin/plugin.json +0 -21
  270. package/plugins/debate/agents/debate-orchestrator.md +0 -175
  271. package/plugins/debate/commands/debate.md +0 -221
  272. package/plugins/debate/lib/adapter-transforms.js +0 -298
  273. package/plugins/debate/lib/collectors/codebase.js +0 -392
  274. package/plugins/debate/lib/collectors/docs-patterns.js +0 -713
  275. package/plugins/debate/lib/collectors/documentation.js +0 -219
  276. package/plugins/debate/lib/collectors/github.js +0 -330
  277. package/plugins/debate/lib/collectors/index.js +0 -126
  278. package/plugins/debate/lib/config/index.js +0 -14
  279. package/plugins/debate/lib/cross-platform/index.js +0 -539
  280. package/plugins/debate/lib/discovery/index.js +0 -352
  281. package/plugins/debate/lib/drift-detect/collectors.js +0 -37
  282. package/plugins/debate/lib/enhance/agent-analyzer.js +0 -421
  283. package/plugins/debate/lib/enhance/agent-patterns.js +0 -571
  284. package/plugins/debate/lib/enhance/auto-suppression.js +0 -622
  285. package/plugins/debate/lib/enhance/benchmark.js +0 -417
  286. package/plugins/debate/lib/enhance/cross-file-analyzer.js +0 -930
  287. package/plugins/debate/lib/enhance/cross-file-patterns.js +0 -370
  288. package/plugins/debate/lib/enhance/docs-analyzer.js +0 -325
  289. package/plugins/debate/lib/enhance/docs-patterns.js +0 -671
  290. package/plugins/debate/lib/enhance/fixer.js +0 -721
  291. package/plugins/debate/lib/enhance/hook-analyzer.js +0 -135
  292. package/plugins/debate/lib/enhance/hook-patterns.js +0 -40
  293. package/plugins/debate/lib/enhance/index.js +0 -127
  294. package/plugins/debate/lib/enhance/plugin-analyzer.js +0 -402
  295. package/plugins/debate/lib/enhance/plugin-patterns.js +0 -326
  296. package/plugins/debate/lib/enhance/projectmemory-analyzer.js +0 -551
  297. package/plugins/debate/lib/enhance/projectmemory-patterns.js +0 -617
  298. package/plugins/debate/lib/enhance/prompt-analyzer.js +0 -457
  299. package/plugins/debate/lib/enhance/prompt-patterns.js +0 -1484
  300. package/plugins/debate/lib/enhance/reporter.js +0 -1348
  301. package/plugins/debate/lib/enhance/security-patterns.js +0 -284
  302. package/plugins/debate/lib/enhance/skill-analyzer.js +0 -182
  303. package/plugins/debate/lib/enhance/skill-patterns.js +0 -147
  304. package/plugins/debate/lib/enhance/suppression.js +0 -352
  305. package/plugins/debate/lib/enhance/tool-patterns.js +0 -373
  306. package/plugins/debate/lib/index.js +0 -270
  307. package/plugins/debate/lib/patterns/cli-enhancers.js +0 -611
  308. package/plugins/debate/lib/patterns/pipeline.js +0 -948
  309. package/plugins/debate/lib/patterns/review-patterns.js +0 -558
  310. package/plugins/debate/lib/patterns/slop-analyzers.js +0 -2305
  311. package/plugins/debate/lib/patterns/slop-patterns.js +0 -1187
  312. package/plugins/debate/lib/perf/analyzer/index.js +0 -22
  313. package/plugins/debate/lib/perf/argument-parser.js +0 -105
  314. package/plugins/debate/lib/perf/baseline-comparator.js +0 -50
  315. package/plugins/debate/lib/perf/baseline-store.js +0 -127
  316. package/plugins/debate/lib/perf/benchmark-runner.js +0 -404
  317. package/plugins/debate/lib/perf/breaking-point-finder.js +0 -52
  318. package/plugins/debate/lib/perf/breaking-point-runner.js +0 -60
  319. package/plugins/debate/lib/perf/checkpoint.js +0 -123
  320. package/plugins/debate/lib/perf/code-paths.js +0 -86
  321. package/plugins/debate/lib/perf/consolidation.js +0 -37
  322. package/plugins/debate/lib/perf/constraint-runner.js +0 -71
  323. package/plugins/debate/lib/perf/experiment-runner.js +0 -32
  324. package/plugins/debate/lib/perf/index.js +0 -41
  325. package/plugins/debate/lib/perf/investigation-state.js +0 -874
  326. package/plugins/debate/lib/perf/optimization-runner.js +0 -79
  327. package/plugins/debate/lib/perf/profilers/go.js +0 -22
  328. package/plugins/debate/lib/perf/profilers/index.js +0 -46
  329. package/plugins/debate/lib/perf/profilers/java.js +0 -23
  330. package/plugins/debate/lib/perf/profilers/node.js +0 -27
  331. package/plugins/debate/lib/perf/profilers/python.js +0 -23
  332. package/plugins/debate/lib/perf/profilers/rust.js +0 -23
  333. package/plugins/debate/lib/perf/profiling-runner.js +0 -75
  334. package/plugins/debate/lib/perf/schemas.js +0 -140
  335. package/plugins/debate/lib/platform/detect-platform.js +0 -413
  336. package/plugins/debate/lib/platform/detection-configs.js +0 -93
  337. package/plugins/debate/lib/platform/state-dir.js +0 -132
  338. package/plugins/debate/lib/platform/verify-tools.js +0 -182
  339. package/plugins/debate/lib/repo-map/cache.js +0 -152
  340. package/plugins/debate/lib/repo-map/concurrency.js +0 -29
  341. package/plugins/debate/lib/repo-map/index.js +0 -222
  342. package/plugins/debate/lib/repo-map/installer.js +0 -212
  343. package/plugins/debate/lib/repo-map/queries/go.js +0 -27
  344. package/plugins/debate/lib/repo-map/queries/index.js +0 -100
  345. package/plugins/debate/lib/repo-map/queries/java.js +0 -38
  346. package/plugins/debate/lib/repo-map/queries/javascript.js +0 -55
  347. package/plugins/debate/lib/repo-map/queries/python.js +0 -24
  348. package/plugins/debate/lib/repo-map/queries/rust.js +0 -73
  349. package/plugins/debate/lib/repo-map/queries/typescript.js +0 -38
  350. package/plugins/debate/lib/repo-map/runner.js +0 -1364
  351. package/plugins/debate/lib/repo-map/updater.js +0 -562
  352. package/plugins/debate/lib/repo-map/usage-analyzer.js +0 -407
  353. package/plugins/debate/lib/schemas/plugin-manifest.schema.json +0 -57
  354. package/plugins/debate/lib/schemas/validator.js +0 -247
  355. package/plugins/debate/lib/sources/custom-handler.js +0 -199
  356. package/plugins/debate/lib/sources/policy-questions.js +0 -246
  357. package/plugins/debate/lib/sources/source-cache.js +0 -165
  358. package/plugins/debate/lib/state/workflow-state.js +0 -576
  359. package/plugins/debate/lib/types/agent-frontmatter.d.ts +0 -134
  360. package/plugins/debate/lib/types/command-frontmatter.d.ts +0 -107
  361. package/plugins/debate/lib/types/hook-frontmatter.d.ts +0 -115
  362. package/plugins/debate/lib/types/index.d.ts +0 -84
  363. package/plugins/debate/lib/types/plugin-manifest.d.ts +0 -102
  364. package/plugins/debate/lib/types/skill-frontmatter.d.ts +0 -89
  365. package/plugins/debate/lib/utils/atomic-write.js +0 -94
  366. package/plugins/debate/lib/utils/cache-manager.js +0 -159
  367. package/plugins/debate/lib/utils/command-parser.js +0 -0
  368. package/plugins/debate/lib/utils/context-optimizer.js +0 -300
  369. package/plugins/debate/lib/utils/deprecation.js +0 -37
  370. package/plugins/debate/lib/utils/shell-escape.js +0 -88
  371. package/plugins/debate/lib/utils/state-helpers.js +0 -61
  372. package/plugins/debate/skills/debate/SKILL.md +0 -264
  373. package/plugins/deslop/.claude-plugin/plugin.json +0 -20
  374. package/plugins/deslop/agents/deslop-agent.md +0 -88
  375. package/plugins/deslop/commands/deslop.md +0 -168
  376. package/plugins/deslop/lib/adapter-transforms.js +0 -298
  377. package/plugins/deslop/lib/collectors/codebase.js +0 -392
  378. package/plugins/deslop/lib/collectors/docs-patterns.js +0 -713
  379. package/plugins/deslop/lib/collectors/documentation.js +0 -219
  380. package/plugins/deslop/lib/collectors/github.js +0 -330
  381. package/plugins/deslop/lib/collectors/index.js +0 -126
  382. package/plugins/deslop/lib/config/index.js +0 -14
  383. package/plugins/deslop/lib/cross-platform/index.js +0 -539
  384. package/plugins/deslop/lib/discovery/index.js +0 -352
  385. package/plugins/deslop/lib/drift-detect/collectors.js +0 -37
  386. package/plugins/deslop/lib/enhance/agent-analyzer.js +0 -421
  387. package/plugins/deslop/lib/enhance/agent-patterns.js +0 -571
  388. package/plugins/deslop/lib/enhance/auto-suppression.js +0 -622
  389. package/plugins/deslop/lib/enhance/benchmark.js +0 -417
  390. package/plugins/deslop/lib/enhance/cross-file-analyzer.js +0 -930
  391. package/plugins/deslop/lib/enhance/cross-file-patterns.js +0 -370
  392. package/plugins/deslop/lib/enhance/docs-analyzer.js +0 -325
  393. package/plugins/deslop/lib/enhance/docs-patterns.js +0 -671
  394. package/plugins/deslop/lib/enhance/fixer.js +0 -721
  395. package/plugins/deslop/lib/enhance/hook-analyzer.js +0 -135
  396. package/plugins/deslop/lib/enhance/hook-patterns.js +0 -40
  397. package/plugins/deslop/lib/enhance/index.js +0 -127
  398. package/plugins/deslop/lib/enhance/plugin-analyzer.js +0 -402
  399. package/plugins/deslop/lib/enhance/plugin-patterns.js +0 -326
  400. package/plugins/deslop/lib/enhance/projectmemory-analyzer.js +0 -551
  401. package/plugins/deslop/lib/enhance/projectmemory-patterns.js +0 -617
  402. package/plugins/deslop/lib/enhance/prompt-analyzer.js +0 -457
  403. package/plugins/deslop/lib/enhance/prompt-patterns.js +0 -1484
  404. package/plugins/deslop/lib/enhance/reporter.js +0 -1348
  405. package/plugins/deslop/lib/enhance/security-patterns.js +0 -284
  406. package/plugins/deslop/lib/enhance/skill-analyzer.js +0 -182
  407. package/plugins/deslop/lib/enhance/skill-patterns.js +0 -147
  408. package/plugins/deslop/lib/enhance/suppression.js +0 -352
  409. package/plugins/deslop/lib/enhance/tool-patterns.js +0 -373
  410. package/plugins/deslop/lib/index.js +0 -270
  411. package/plugins/deslop/lib/patterns/cli-enhancers.js +0 -611
  412. package/plugins/deslop/lib/patterns/pipeline.js +0 -948
  413. package/plugins/deslop/lib/patterns/review-patterns.js +0 -558
  414. package/plugins/deslop/lib/patterns/slop-analyzers.js +0 -2305
  415. package/plugins/deslop/lib/patterns/slop-patterns.js +0 -1187
  416. package/plugins/deslop/lib/perf/analyzer/index.js +0 -22
  417. package/plugins/deslop/lib/perf/argument-parser.js +0 -105
  418. package/plugins/deslop/lib/perf/baseline-comparator.js +0 -50
  419. package/plugins/deslop/lib/perf/baseline-store.js +0 -127
  420. package/plugins/deslop/lib/perf/benchmark-runner.js +0 -404
  421. package/plugins/deslop/lib/perf/breaking-point-finder.js +0 -52
  422. package/plugins/deslop/lib/perf/breaking-point-runner.js +0 -60
  423. package/plugins/deslop/lib/perf/checkpoint.js +0 -123
  424. package/plugins/deslop/lib/perf/code-paths.js +0 -86
  425. package/plugins/deslop/lib/perf/consolidation.js +0 -37
  426. package/plugins/deslop/lib/perf/constraint-runner.js +0 -71
  427. package/plugins/deslop/lib/perf/experiment-runner.js +0 -32
  428. package/plugins/deslop/lib/perf/index.js +0 -41
  429. package/plugins/deslop/lib/perf/investigation-state.js +0 -874
  430. package/plugins/deslop/lib/perf/optimization-runner.js +0 -79
  431. package/plugins/deslop/lib/perf/profilers/go.js +0 -22
  432. package/plugins/deslop/lib/perf/profilers/index.js +0 -46
  433. package/plugins/deslop/lib/perf/profilers/java.js +0 -23
  434. package/plugins/deslop/lib/perf/profilers/node.js +0 -27
  435. package/plugins/deslop/lib/perf/profilers/python.js +0 -23
  436. package/plugins/deslop/lib/perf/profilers/rust.js +0 -23
  437. package/plugins/deslop/lib/perf/profiling-runner.js +0 -75
  438. package/plugins/deslop/lib/perf/schemas.js +0 -140
  439. package/plugins/deslop/lib/platform/detect-platform.js +0 -413
  440. package/plugins/deslop/lib/platform/detection-configs.js +0 -93
  441. package/plugins/deslop/lib/platform/state-dir.js +0 -132
  442. package/plugins/deslop/lib/platform/verify-tools.js +0 -182
  443. package/plugins/deslop/lib/repo-map/cache.js +0 -152
  444. package/plugins/deslop/lib/repo-map/concurrency.js +0 -29
  445. package/plugins/deslop/lib/repo-map/index.js +0 -222
  446. package/plugins/deslop/lib/repo-map/installer.js +0 -212
  447. package/plugins/deslop/lib/repo-map/queries/go.js +0 -27
  448. package/plugins/deslop/lib/repo-map/queries/index.js +0 -100
  449. package/plugins/deslop/lib/repo-map/queries/java.js +0 -38
  450. package/plugins/deslop/lib/repo-map/queries/javascript.js +0 -55
  451. package/plugins/deslop/lib/repo-map/queries/python.js +0 -24
  452. package/plugins/deslop/lib/repo-map/queries/rust.js +0 -73
  453. package/plugins/deslop/lib/repo-map/queries/typescript.js +0 -38
  454. package/plugins/deslop/lib/repo-map/runner.js +0 -1364
  455. package/plugins/deslop/lib/repo-map/updater.js +0 -562
  456. package/plugins/deslop/lib/repo-map/usage-analyzer.js +0 -407
  457. package/plugins/deslop/lib/schemas/plugin-manifest.schema.json +0 -57
  458. package/plugins/deslop/lib/schemas/validator.js +0 -247
  459. package/plugins/deslop/lib/sources/custom-handler.js +0 -199
  460. package/plugins/deslop/lib/sources/policy-questions.js +0 -246
  461. package/plugins/deslop/lib/sources/source-cache.js +0 -165
  462. package/plugins/deslop/lib/state/workflow-state.js +0 -576
  463. package/plugins/deslop/lib/types/agent-frontmatter.d.ts +0 -134
  464. package/plugins/deslop/lib/types/command-frontmatter.d.ts +0 -107
  465. package/plugins/deslop/lib/types/hook-frontmatter.d.ts +0 -115
  466. package/plugins/deslop/lib/types/index.d.ts +0 -84
  467. package/plugins/deslop/lib/types/plugin-manifest.d.ts +0 -102
  468. package/plugins/deslop/lib/types/skill-frontmatter.d.ts +0 -89
  469. package/plugins/deslop/lib/utils/atomic-write.js +0 -94
  470. package/plugins/deslop/lib/utils/cache-manager.js +0 -159
  471. package/plugins/deslop/lib/utils/command-parser.js +0 -0
  472. package/plugins/deslop/lib/utils/context-optimizer.js +0 -300
  473. package/plugins/deslop/lib/utils/deprecation.js +0 -37
  474. package/plugins/deslop/lib/utils/shell-escape.js +0 -88
  475. package/plugins/deslop/lib/utils/state-helpers.js +0 -61
  476. package/plugins/deslop/references/slop-categories.md +0 -122
  477. package/plugins/deslop/scripts/detect.js +0 -134
  478. package/plugins/deslop/skills/deslop/SKILL.md +0 -204
  479. package/plugins/drift-detect/.claude-plugin/plugin.json +0 -23
  480. package/plugins/drift-detect/agents/plan-synthesizer.md +0 -225
  481. package/plugins/drift-detect/commands/drift-detect.md +0 -269
  482. package/plugins/drift-detect/lib/adapter-transforms.js +0 -298
  483. package/plugins/drift-detect/lib/collectors/codebase.js +0 -392
  484. package/plugins/drift-detect/lib/collectors/docs-patterns.js +0 -713
  485. package/plugins/drift-detect/lib/collectors/documentation.js +0 -219
  486. package/plugins/drift-detect/lib/collectors/github.js +0 -330
  487. package/plugins/drift-detect/lib/collectors/index.js +0 -126
  488. package/plugins/drift-detect/lib/config/index.js +0 -14
  489. package/plugins/drift-detect/lib/cross-platform/index.js +0 -539
  490. package/plugins/drift-detect/lib/discovery/index.js +0 -352
  491. package/plugins/drift-detect/lib/drift-detect/collectors.js +0 -37
  492. package/plugins/drift-detect/lib/enhance/agent-analyzer.js +0 -421
  493. package/plugins/drift-detect/lib/enhance/agent-patterns.js +0 -571
  494. package/plugins/drift-detect/lib/enhance/auto-suppression.js +0 -622
  495. package/plugins/drift-detect/lib/enhance/benchmark.js +0 -417
  496. package/plugins/drift-detect/lib/enhance/cross-file-analyzer.js +0 -930
  497. package/plugins/drift-detect/lib/enhance/cross-file-patterns.js +0 -370
  498. package/plugins/drift-detect/lib/enhance/docs-analyzer.js +0 -325
  499. package/plugins/drift-detect/lib/enhance/docs-patterns.js +0 -671
  500. package/plugins/drift-detect/lib/enhance/fixer.js +0 -721
  501. package/plugins/drift-detect/lib/enhance/hook-analyzer.js +0 -135
  502. package/plugins/drift-detect/lib/enhance/hook-patterns.js +0 -40
  503. package/plugins/drift-detect/lib/enhance/index.js +0 -127
  504. package/plugins/drift-detect/lib/enhance/plugin-analyzer.js +0 -402
  505. package/plugins/drift-detect/lib/enhance/plugin-patterns.js +0 -326
  506. package/plugins/drift-detect/lib/enhance/projectmemory-analyzer.js +0 -551
  507. package/plugins/drift-detect/lib/enhance/projectmemory-patterns.js +0 -617
  508. package/plugins/drift-detect/lib/enhance/prompt-analyzer.js +0 -457
  509. package/plugins/drift-detect/lib/enhance/prompt-patterns.js +0 -1484
  510. package/plugins/drift-detect/lib/enhance/reporter.js +0 -1348
  511. package/plugins/drift-detect/lib/enhance/security-patterns.js +0 -284
  512. package/plugins/drift-detect/lib/enhance/skill-analyzer.js +0 -182
  513. package/plugins/drift-detect/lib/enhance/skill-patterns.js +0 -147
  514. package/plugins/drift-detect/lib/enhance/suppression.js +0 -352
  515. package/plugins/drift-detect/lib/enhance/tool-patterns.js +0 -373
  516. package/plugins/drift-detect/lib/index.js +0 -270
  517. package/plugins/drift-detect/lib/patterns/cli-enhancers.js +0 -611
  518. package/plugins/drift-detect/lib/patterns/pipeline.js +0 -948
  519. package/plugins/drift-detect/lib/patterns/review-patterns.js +0 -558
  520. package/plugins/drift-detect/lib/patterns/slop-analyzers.js +0 -2305
  521. package/plugins/drift-detect/lib/patterns/slop-patterns.js +0 -1187
  522. package/plugins/drift-detect/lib/perf/analyzer/index.js +0 -22
  523. package/plugins/drift-detect/lib/perf/argument-parser.js +0 -105
  524. package/plugins/drift-detect/lib/perf/baseline-comparator.js +0 -50
  525. package/plugins/drift-detect/lib/perf/baseline-store.js +0 -127
  526. package/plugins/drift-detect/lib/perf/benchmark-runner.js +0 -404
  527. package/plugins/drift-detect/lib/perf/breaking-point-finder.js +0 -52
  528. package/plugins/drift-detect/lib/perf/breaking-point-runner.js +0 -60
  529. package/plugins/drift-detect/lib/perf/checkpoint.js +0 -123
  530. package/plugins/drift-detect/lib/perf/code-paths.js +0 -86
  531. package/plugins/drift-detect/lib/perf/consolidation.js +0 -37
  532. package/plugins/drift-detect/lib/perf/constraint-runner.js +0 -71
  533. package/plugins/drift-detect/lib/perf/experiment-runner.js +0 -32
  534. package/plugins/drift-detect/lib/perf/index.js +0 -41
  535. package/plugins/drift-detect/lib/perf/investigation-state.js +0 -874
  536. package/plugins/drift-detect/lib/perf/optimization-runner.js +0 -79
  537. package/plugins/drift-detect/lib/perf/profilers/go.js +0 -22
  538. package/plugins/drift-detect/lib/perf/profilers/index.js +0 -46
  539. package/plugins/drift-detect/lib/perf/profilers/java.js +0 -23
  540. package/plugins/drift-detect/lib/perf/profilers/node.js +0 -27
  541. package/plugins/drift-detect/lib/perf/profilers/python.js +0 -23
  542. package/plugins/drift-detect/lib/perf/profilers/rust.js +0 -23
  543. package/plugins/drift-detect/lib/perf/profiling-runner.js +0 -75
  544. package/plugins/drift-detect/lib/perf/schemas.js +0 -140
  545. package/plugins/drift-detect/lib/platform/detect-platform.js +0 -413
  546. package/plugins/drift-detect/lib/platform/detection-configs.js +0 -93
  547. package/plugins/drift-detect/lib/platform/state-dir.js +0 -132
  548. package/plugins/drift-detect/lib/platform/verify-tools.js +0 -182
  549. package/plugins/drift-detect/lib/repo-map/cache.js +0 -152
  550. package/plugins/drift-detect/lib/repo-map/concurrency.js +0 -29
  551. package/plugins/drift-detect/lib/repo-map/index.js +0 -222
  552. package/plugins/drift-detect/lib/repo-map/installer.js +0 -212
  553. package/plugins/drift-detect/lib/repo-map/queries/go.js +0 -27
  554. package/plugins/drift-detect/lib/repo-map/queries/index.js +0 -100
  555. package/plugins/drift-detect/lib/repo-map/queries/java.js +0 -38
  556. package/plugins/drift-detect/lib/repo-map/queries/javascript.js +0 -55
  557. package/plugins/drift-detect/lib/repo-map/queries/python.js +0 -24
  558. package/plugins/drift-detect/lib/repo-map/queries/rust.js +0 -73
  559. package/plugins/drift-detect/lib/repo-map/queries/typescript.js +0 -38
  560. package/plugins/drift-detect/lib/repo-map/runner.js +0 -1364
  561. package/plugins/drift-detect/lib/repo-map/updater.js +0 -562
  562. package/plugins/drift-detect/lib/repo-map/usage-analyzer.js +0 -407
  563. package/plugins/drift-detect/lib/schemas/plugin-manifest.schema.json +0 -57
  564. package/plugins/drift-detect/lib/schemas/validator.js +0 -247
  565. package/plugins/drift-detect/lib/sources/custom-handler.js +0 -199
  566. package/plugins/drift-detect/lib/sources/policy-questions.js +0 -246
  567. package/plugins/drift-detect/lib/sources/source-cache.js +0 -165
  568. package/plugins/drift-detect/lib/state/workflow-state.js +0 -576
  569. package/plugins/drift-detect/lib/types/agent-frontmatter.d.ts +0 -134
  570. package/plugins/drift-detect/lib/types/command-frontmatter.d.ts +0 -107
  571. package/plugins/drift-detect/lib/types/hook-frontmatter.d.ts +0 -115
  572. package/plugins/drift-detect/lib/types/index.d.ts +0 -84
  573. package/plugins/drift-detect/lib/types/plugin-manifest.d.ts +0 -102
  574. package/plugins/drift-detect/lib/types/skill-frontmatter.d.ts +0 -89
  575. package/plugins/drift-detect/lib/utils/atomic-write.js +0 -94
  576. package/plugins/drift-detect/lib/utils/cache-manager.js +0 -159
  577. package/plugins/drift-detect/lib/utils/command-parser.js +0 -0
  578. package/plugins/drift-detect/lib/utils/context-optimizer.js +0 -300
  579. package/plugins/drift-detect/lib/utils/deprecation.js +0 -37
  580. package/plugins/drift-detect/lib/utils/shell-escape.js +0 -88
  581. package/plugins/drift-detect/lib/utils/state-helpers.js +0 -61
  582. package/plugins/drift-detect/skills/drift-analysis/SKILL.md +0 -324
  583. package/plugins/enhance/.claude-plugin/plugin.json +0 -20
  584. package/plugins/enhance/agents/agent-enhancer.md +0 -64
  585. package/plugins/enhance/agents/claudemd-enhancer.md +0 -65
  586. package/plugins/enhance/agents/cross-file-enhancer.md +0 -54
  587. package/plugins/enhance/agents/docs-enhancer.md +0 -64
  588. package/plugins/enhance/agents/hooks-enhancer.md +0 -64
  589. package/plugins/enhance/agents/plugin-enhancer.md +0 -63
  590. package/plugins/enhance/agents/prompt-enhancer.md +0 -58
  591. package/plugins/enhance/agents/skills-enhancer.md +0 -64
  592. package/plugins/enhance/commands/enhance.md +0 -178
  593. package/plugins/enhance/lib/adapter-transforms.js +0 -298
  594. package/plugins/enhance/lib/collectors/codebase.js +0 -392
  595. package/plugins/enhance/lib/collectors/docs-patterns.js +0 -713
  596. package/plugins/enhance/lib/collectors/documentation.js +0 -219
  597. package/plugins/enhance/lib/collectors/github.js +0 -330
  598. package/plugins/enhance/lib/collectors/index.js +0 -126
  599. package/plugins/enhance/lib/config/index.js +0 -14
  600. package/plugins/enhance/lib/cross-platform/index.js +0 -539
  601. package/plugins/enhance/lib/discovery/index.js +0 -352
  602. package/plugins/enhance/lib/drift-detect/collectors.js +0 -37
  603. package/plugins/enhance/lib/enhance/agent-analyzer.js +0 -421
  604. package/plugins/enhance/lib/enhance/agent-patterns.js +0 -571
  605. package/plugins/enhance/lib/enhance/auto-suppression.js +0 -622
  606. package/plugins/enhance/lib/enhance/benchmark.js +0 -417
  607. package/plugins/enhance/lib/enhance/cross-file-analyzer.js +0 -930
  608. package/plugins/enhance/lib/enhance/cross-file-patterns.js +0 -370
  609. package/plugins/enhance/lib/enhance/docs-analyzer.js +0 -325
  610. package/plugins/enhance/lib/enhance/docs-patterns.js +0 -671
  611. package/plugins/enhance/lib/enhance/fixer.js +0 -721
  612. package/plugins/enhance/lib/enhance/hook-analyzer.js +0 -135
  613. package/plugins/enhance/lib/enhance/hook-patterns.js +0 -40
  614. package/plugins/enhance/lib/enhance/index.js +0 -127
  615. package/plugins/enhance/lib/enhance/plugin-analyzer.js +0 -402
  616. package/plugins/enhance/lib/enhance/plugin-patterns.js +0 -326
  617. package/plugins/enhance/lib/enhance/projectmemory-analyzer.js +0 -551
  618. package/plugins/enhance/lib/enhance/projectmemory-patterns.js +0 -617
  619. package/plugins/enhance/lib/enhance/prompt-analyzer.js +0 -457
  620. package/plugins/enhance/lib/enhance/prompt-patterns.js +0 -1484
  621. package/plugins/enhance/lib/enhance/reporter.js +0 -1348
  622. package/plugins/enhance/lib/enhance/security-patterns.js +0 -284
  623. package/plugins/enhance/lib/enhance/skill-analyzer.js +0 -182
  624. package/plugins/enhance/lib/enhance/skill-patterns.js +0 -147
  625. package/plugins/enhance/lib/enhance/suppression.js +0 -352
  626. package/plugins/enhance/lib/enhance/tool-patterns.js +0 -373
  627. package/plugins/enhance/lib/index.js +0 -270
  628. package/plugins/enhance/lib/patterns/cli-enhancers.js +0 -611
  629. package/plugins/enhance/lib/patterns/pipeline.js +0 -948
  630. package/plugins/enhance/lib/patterns/review-patterns.js +0 -558
  631. package/plugins/enhance/lib/patterns/slop-analyzers.js +0 -2305
  632. package/plugins/enhance/lib/patterns/slop-patterns.js +0 -1187
  633. package/plugins/enhance/lib/perf/analyzer/index.js +0 -22
  634. package/plugins/enhance/lib/perf/argument-parser.js +0 -105
  635. package/plugins/enhance/lib/perf/baseline-comparator.js +0 -50
  636. package/plugins/enhance/lib/perf/baseline-store.js +0 -127
  637. package/plugins/enhance/lib/perf/benchmark-runner.js +0 -404
  638. package/plugins/enhance/lib/perf/breaking-point-finder.js +0 -52
  639. package/plugins/enhance/lib/perf/breaking-point-runner.js +0 -60
  640. package/plugins/enhance/lib/perf/checkpoint.js +0 -123
  641. package/plugins/enhance/lib/perf/code-paths.js +0 -86
  642. package/plugins/enhance/lib/perf/consolidation.js +0 -37
  643. package/plugins/enhance/lib/perf/constraint-runner.js +0 -71
  644. package/plugins/enhance/lib/perf/experiment-runner.js +0 -32
  645. package/plugins/enhance/lib/perf/index.js +0 -41
  646. package/plugins/enhance/lib/perf/investigation-state.js +0 -874
  647. package/plugins/enhance/lib/perf/optimization-runner.js +0 -79
  648. package/plugins/enhance/lib/perf/profilers/go.js +0 -22
  649. package/plugins/enhance/lib/perf/profilers/index.js +0 -46
  650. package/plugins/enhance/lib/perf/profilers/java.js +0 -23
  651. package/plugins/enhance/lib/perf/profilers/node.js +0 -27
  652. package/plugins/enhance/lib/perf/profilers/python.js +0 -23
  653. package/plugins/enhance/lib/perf/profilers/rust.js +0 -23
  654. package/plugins/enhance/lib/perf/profiling-runner.js +0 -75
  655. package/plugins/enhance/lib/perf/schemas.js +0 -140
  656. package/plugins/enhance/lib/platform/detect-platform.js +0 -413
  657. package/plugins/enhance/lib/platform/detection-configs.js +0 -93
  658. package/plugins/enhance/lib/platform/state-dir.js +0 -132
  659. package/plugins/enhance/lib/platform/verify-tools.js +0 -182
  660. package/plugins/enhance/lib/repo-map/cache.js +0 -152
  661. package/plugins/enhance/lib/repo-map/concurrency.js +0 -29
  662. package/plugins/enhance/lib/repo-map/index.js +0 -222
  663. package/plugins/enhance/lib/repo-map/installer.js +0 -212
  664. package/plugins/enhance/lib/repo-map/queries/go.js +0 -27
  665. package/plugins/enhance/lib/repo-map/queries/index.js +0 -100
  666. package/plugins/enhance/lib/repo-map/queries/java.js +0 -38
  667. package/plugins/enhance/lib/repo-map/queries/javascript.js +0 -55
  668. package/plugins/enhance/lib/repo-map/queries/python.js +0 -24
  669. package/plugins/enhance/lib/repo-map/queries/rust.js +0 -73
  670. package/plugins/enhance/lib/repo-map/queries/typescript.js +0 -38
  671. package/plugins/enhance/lib/repo-map/runner.js +0 -1364
  672. package/plugins/enhance/lib/repo-map/updater.js +0 -562
  673. package/plugins/enhance/lib/repo-map/usage-analyzer.js +0 -407
  674. package/plugins/enhance/lib/schemas/plugin-manifest.schema.json +0 -57
  675. package/plugins/enhance/lib/schemas/validator.js +0 -247
  676. package/plugins/enhance/lib/sources/custom-handler.js +0 -199
  677. package/plugins/enhance/lib/sources/policy-questions.js +0 -246
  678. package/plugins/enhance/lib/sources/source-cache.js +0 -165
  679. package/plugins/enhance/lib/state/workflow-state.js +0 -576
  680. package/plugins/enhance/lib/types/agent-frontmatter.d.ts +0 -134
  681. package/plugins/enhance/lib/types/command-frontmatter.d.ts +0 -107
  682. package/plugins/enhance/lib/types/hook-frontmatter.d.ts +0 -115
  683. package/plugins/enhance/lib/types/index.d.ts +0 -84
  684. package/plugins/enhance/lib/types/plugin-manifest.d.ts +0 -102
  685. package/plugins/enhance/lib/types/skill-frontmatter.d.ts +0 -89
  686. package/plugins/enhance/lib/utils/atomic-write.js +0 -94
  687. package/plugins/enhance/lib/utils/cache-manager.js +0 -159
  688. package/plugins/enhance/lib/utils/command-parser.js +0 -0
  689. package/plugins/enhance/lib/utils/context-optimizer.js +0 -300
  690. package/plugins/enhance/lib/utils/deprecation.js +0 -37
  691. package/plugins/enhance/lib/utils/shell-escape.js +0 -88
  692. package/plugins/enhance/lib/utils/state-helpers.js +0 -61
  693. package/plugins/enhance/skills/enhance-agent-prompts/SKILL.md +0 -277
  694. package/plugins/enhance/skills/enhance-claude-memory/SKILL.md +0 -387
  695. package/plugins/enhance/skills/enhance-cross-file/SKILL.md +0 -110
  696. package/plugins/enhance/skills/enhance-docs/SKILL.md +0 -298
  697. package/plugins/enhance/skills/enhance-hooks/SKILL.md +0 -554
  698. package/plugins/enhance/skills/enhance-orchestrator/SKILL.md +0 -255
  699. package/plugins/enhance/skills/enhance-plugins/SKILL.md +0 -319
  700. package/plugins/enhance/skills/enhance-prompts/SKILL.md +0 -340
  701. package/plugins/enhance/skills/enhance-skills/SKILL.md +0 -436
  702. package/plugins/learn/.claude-plugin/plugin.json +0 -21
  703. package/plugins/learn/agents/learn-agent.md +0 -331
  704. package/plugins/learn/commands/learn.md +0 -190
  705. package/plugins/learn/lib/adapter-transforms.js +0 -298
  706. package/plugins/learn/lib/collectors/codebase.js +0 -392
  707. package/plugins/learn/lib/collectors/docs-patterns.js +0 -713
  708. package/plugins/learn/lib/collectors/documentation.js +0 -219
  709. package/plugins/learn/lib/collectors/github.js +0 -330
  710. package/plugins/learn/lib/collectors/index.js +0 -126
  711. package/plugins/learn/lib/config/index.js +0 -14
  712. package/plugins/learn/lib/cross-platform/index.js +0 -539
  713. package/plugins/learn/lib/discovery/index.js +0 -352
  714. package/plugins/learn/lib/drift-detect/collectors.js +0 -37
  715. package/plugins/learn/lib/enhance/agent-analyzer.js +0 -421
  716. package/plugins/learn/lib/enhance/agent-patterns.js +0 -571
  717. package/plugins/learn/lib/enhance/auto-suppression.js +0 -622
  718. package/plugins/learn/lib/enhance/benchmark.js +0 -417
  719. package/plugins/learn/lib/enhance/cross-file-analyzer.js +0 -930
  720. package/plugins/learn/lib/enhance/cross-file-patterns.js +0 -370
  721. package/plugins/learn/lib/enhance/docs-analyzer.js +0 -325
  722. package/plugins/learn/lib/enhance/docs-patterns.js +0 -671
  723. package/plugins/learn/lib/enhance/fixer.js +0 -721
  724. package/plugins/learn/lib/enhance/hook-analyzer.js +0 -135
  725. package/plugins/learn/lib/enhance/hook-patterns.js +0 -40
  726. package/plugins/learn/lib/enhance/index.js +0 -127
  727. package/plugins/learn/lib/enhance/plugin-analyzer.js +0 -402
  728. package/plugins/learn/lib/enhance/plugin-patterns.js +0 -326
  729. package/plugins/learn/lib/enhance/projectmemory-analyzer.js +0 -551
  730. package/plugins/learn/lib/enhance/projectmemory-patterns.js +0 -617
  731. package/plugins/learn/lib/enhance/prompt-analyzer.js +0 -457
  732. package/plugins/learn/lib/enhance/prompt-patterns.js +0 -1484
  733. package/plugins/learn/lib/enhance/reporter.js +0 -1348
  734. package/plugins/learn/lib/enhance/security-patterns.js +0 -284
  735. package/plugins/learn/lib/enhance/skill-analyzer.js +0 -182
  736. package/plugins/learn/lib/enhance/skill-patterns.js +0 -147
  737. package/plugins/learn/lib/enhance/suppression.js +0 -352
  738. package/plugins/learn/lib/enhance/tool-patterns.js +0 -373
  739. package/plugins/learn/lib/index.js +0 -270
  740. package/plugins/learn/lib/patterns/cli-enhancers.js +0 -611
  741. package/plugins/learn/lib/patterns/pipeline.js +0 -948
  742. package/plugins/learn/lib/patterns/review-patterns.js +0 -558
  743. package/plugins/learn/lib/patterns/slop-analyzers.js +0 -2305
  744. package/plugins/learn/lib/patterns/slop-patterns.js +0 -1187
  745. package/plugins/learn/lib/perf/analyzer/index.js +0 -22
  746. package/plugins/learn/lib/perf/argument-parser.js +0 -105
  747. package/plugins/learn/lib/perf/baseline-comparator.js +0 -50
  748. package/plugins/learn/lib/perf/baseline-store.js +0 -127
  749. package/plugins/learn/lib/perf/benchmark-runner.js +0 -404
  750. package/plugins/learn/lib/perf/breaking-point-finder.js +0 -52
  751. package/plugins/learn/lib/perf/breaking-point-runner.js +0 -60
  752. package/plugins/learn/lib/perf/checkpoint.js +0 -123
  753. package/plugins/learn/lib/perf/code-paths.js +0 -86
  754. package/plugins/learn/lib/perf/consolidation.js +0 -37
  755. package/plugins/learn/lib/perf/constraint-runner.js +0 -71
  756. package/plugins/learn/lib/perf/experiment-runner.js +0 -32
  757. package/plugins/learn/lib/perf/index.js +0 -41
  758. package/plugins/learn/lib/perf/investigation-state.js +0 -874
  759. package/plugins/learn/lib/perf/optimization-runner.js +0 -79
  760. package/plugins/learn/lib/perf/profilers/go.js +0 -22
  761. package/plugins/learn/lib/perf/profilers/index.js +0 -46
  762. package/plugins/learn/lib/perf/profilers/java.js +0 -23
  763. package/plugins/learn/lib/perf/profilers/node.js +0 -27
  764. package/plugins/learn/lib/perf/profilers/python.js +0 -23
  765. package/plugins/learn/lib/perf/profilers/rust.js +0 -23
  766. package/plugins/learn/lib/perf/profiling-runner.js +0 -75
  767. package/plugins/learn/lib/perf/schemas.js +0 -140
  768. package/plugins/learn/lib/platform/detect-platform.js +0 -413
  769. package/plugins/learn/lib/platform/detection-configs.js +0 -93
  770. package/plugins/learn/lib/platform/state-dir.js +0 -132
  771. package/plugins/learn/lib/platform/verify-tools.js +0 -182
  772. package/plugins/learn/lib/repo-map/cache.js +0 -152
  773. package/plugins/learn/lib/repo-map/concurrency.js +0 -29
  774. package/plugins/learn/lib/repo-map/index.js +0 -222
  775. package/plugins/learn/lib/repo-map/installer.js +0 -212
  776. package/plugins/learn/lib/repo-map/queries/go.js +0 -27
  777. package/plugins/learn/lib/repo-map/queries/index.js +0 -100
  778. package/plugins/learn/lib/repo-map/queries/java.js +0 -38
  779. package/plugins/learn/lib/repo-map/queries/javascript.js +0 -55
  780. package/plugins/learn/lib/repo-map/queries/python.js +0 -24
  781. package/plugins/learn/lib/repo-map/queries/rust.js +0 -73
  782. package/plugins/learn/lib/repo-map/queries/typescript.js +0 -38
  783. package/plugins/learn/lib/repo-map/runner.js +0 -1364
  784. package/plugins/learn/lib/repo-map/updater.js +0 -562
  785. package/plugins/learn/lib/repo-map/usage-analyzer.js +0 -407
  786. package/plugins/learn/lib/schemas/plugin-manifest.schema.json +0 -57
  787. package/plugins/learn/lib/schemas/validator.js +0 -247
  788. package/plugins/learn/lib/sources/custom-handler.js +0 -199
  789. package/plugins/learn/lib/sources/policy-questions.js +0 -246
  790. package/plugins/learn/lib/sources/source-cache.js +0 -165
  791. package/plugins/learn/lib/state/workflow-state.js +0 -576
  792. package/plugins/learn/lib/types/agent-frontmatter.d.ts +0 -134
  793. package/plugins/learn/lib/types/command-frontmatter.d.ts +0 -107
  794. package/plugins/learn/lib/types/hook-frontmatter.d.ts +0 -115
  795. package/plugins/learn/lib/types/index.d.ts +0 -84
  796. package/plugins/learn/lib/types/plugin-manifest.d.ts +0 -102
  797. package/plugins/learn/lib/types/skill-frontmatter.d.ts +0 -89
  798. package/plugins/learn/lib/utils/atomic-write.js +0 -94
  799. package/plugins/learn/lib/utils/cache-manager.js +0 -159
  800. package/plugins/learn/lib/utils/command-parser.js +0 -0
  801. package/plugins/learn/lib/utils/context-optimizer.js +0 -300
  802. package/plugins/learn/lib/utils/deprecation.js +0 -37
  803. package/plugins/learn/lib/utils/shell-escape.js +0 -88
  804. package/plugins/learn/lib/utils/state-helpers.js +0 -61
  805. package/plugins/learn/skills/learn/SKILL.md +0 -349
  806. package/plugins/next-task/.claude-plugin/plugin.json +0 -24
  807. package/plugins/next-task/agents/ci-fixer.md +0 -259
  808. package/plugins/next-task/agents/ci-monitor.md +0 -342
  809. package/plugins/next-task/agents/delivery-validator.md +0 -115
  810. package/plugins/next-task/agents/exploration-agent.md +0 -316
  811. package/plugins/next-task/agents/implementation-agent.md +0 -465
  812. package/plugins/next-task/agents/planning-agent.md +0 -377
  813. package/plugins/next-task/agents/simple-fixer.md +0 -139
  814. package/plugins/next-task/agents/task-discoverer.md +0 -89
  815. package/plugins/next-task/agents/test-coverage-checker.md +0 -451
  816. package/plugins/next-task/agents/worktree-manager.md +0 -257
  817. package/plugins/next-task/commands/delivery-approval.md +0 -341
  818. package/plugins/next-task/commands/next-task.md +0 -547
  819. package/plugins/next-task/hooks/hooks.json +0 -14
  820. package/plugins/next-task/lib/adapter-transforms.js +0 -298
  821. package/plugins/next-task/lib/collectors/codebase.js +0 -392
  822. package/plugins/next-task/lib/collectors/docs-patterns.js +0 -713
  823. package/plugins/next-task/lib/collectors/documentation.js +0 -219
  824. package/plugins/next-task/lib/collectors/github.js +0 -330
  825. package/plugins/next-task/lib/collectors/index.js +0 -126
  826. package/plugins/next-task/lib/config/index.js +0 -14
  827. package/plugins/next-task/lib/cross-platform/index.js +0 -539
  828. package/plugins/next-task/lib/discovery/index.js +0 -352
  829. package/plugins/next-task/lib/drift-detect/collectors.js +0 -37
  830. package/plugins/next-task/lib/enhance/agent-analyzer.js +0 -421
  831. package/plugins/next-task/lib/enhance/agent-patterns.js +0 -571
  832. package/plugins/next-task/lib/enhance/auto-suppression.js +0 -622
  833. package/plugins/next-task/lib/enhance/benchmark.js +0 -417
  834. package/plugins/next-task/lib/enhance/cross-file-analyzer.js +0 -930
  835. package/plugins/next-task/lib/enhance/cross-file-patterns.js +0 -370
  836. package/plugins/next-task/lib/enhance/docs-analyzer.js +0 -325
  837. package/plugins/next-task/lib/enhance/docs-patterns.js +0 -671
  838. package/plugins/next-task/lib/enhance/fixer.js +0 -721
  839. package/plugins/next-task/lib/enhance/hook-analyzer.js +0 -135
  840. package/plugins/next-task/lib/enhance/hook-patterns.js +0 -40
  841. package/plugins/next-task/lib/enhance/index.js +0 -127
  842. package/plugins/next-task/lib/enhance/plugin-analyzer.js +0 -402
  843. package/plugins/next-task/lib/enhance/plugin-patterns.js +0 -326
  844. package/plugins/next-task/lib/enhance/projectmemory-analyzer.js +0 -551
  845. package/plugins/next-task/lib/enhance/projectmemory-patterns.js +0 -617
  846. package/plugins/next-task/lib/enhance/prompt-analyzer.js +0 -457
  847. package/plugins/next-task/lib/enhance/prompt-patterns.js +0 -1484
  848. package/plugins/next-task/lib/enhance/reporter.js +0 -1348
  849. package/plugins/next-task/lib/enhance/security-patterns.js +0 -284
  850. package/plugins/next-task/lib/enhance/skill-analyzer.js +0 -182
  851. package/plugins/next-task/lib/enhance/skill-patterns.js +0 -147
  852. package/plugins/next-task/lib/enhance/suppression.js +0 -352
  853. package/plugins/next-task/lib/enhance/tool-patterns.js +0 -373
  854. package/plugins/next-task/lib/index.js +0 -270
  855. package/plugins/next-task/lib/patterns/cli-enhancers.js +0 -611
  856. package/plugins/next-task/lib/patterns/pipeline.js +0 -948
  857. package/plugins/next-task/lib/patterns/review-patterns.js +0 -558
  858. package/plugins/next-task/lib/patterns/slop-analyzers.js +0 -2305
  859. package/plugins/next-task/lib/patterns/slop-patterns.js +0 -1187
  860. package/plugins/next-task/lib/perf/analyzer/index.js +0 -22
  861. package/plugins/next-task/lib/perf/argument-parser.js +0 -105
  862. package/plugins/next-task/lib/perf/baseline-comparator.js +0 -50
  863. package/plugins/next-task/lib/perf/baseline-store.js +0 -127
  864. package/plugins/next-task/lib/perf/benchmark-runner.js +0 -404
  865. package/plugins/next-task/lib/perf/breaking-point-finder.js +0 -52
  866. package/plugins/next-task/lib/perf/breaking-point-runner.js +0 -60
  867. package/plugins/next-task/lib/perf/checkpoint.js +0 -123
  868. package/plugins/next-task/lib/perf/code-paths.js +0 -86
  869. package/plugins/next-task/lib/perf/consolidation.js +0 -37
  870. package/plugins/next-task/lib/perf/constraint-runner.js +0 -71
  871. package/plugins/next-task/lib/perf/experiment-runner.js +0 -32
  872. package/plugins/next-task/lib/perf/index.js +0 -41
  873. package/plugins/next-task/lib/perf/investigation-state.js +0 -874
  874. package/plugins/next-task/lib/perf/optimization-runner.js +0 -79
  875. package/plugins/next-task/lib/perf/profilers/go.js +0 -22
  876. package/plugins/next-task/lib/perf/profilers/index.js +0 -46
  877. package/plugins/next-task/lib/perf/profilers/java.js +0 -23
  878. package/plugins/next-task/lib/perf/profilers/node.js +0 -27
  879. package/plugins/next-task/lib/perf/profilers/python.js +0 -23
  880. package/plugins/next-task/lib/perf/profilers/rust.js +0 -23
  881. package/plugins/next-task/lib/perf/profiling-runner.js +0 -75
  882. package/plugins/next-task/lib/perf/schemas.js +0 -140
  883. package/plugins/next-task/lib/platform/detect-platform.js +0 -413
  884. package/plugins/next-task/lib/platform/detection-configs.js +0 -93
  885. package/plugins/next-task/lib/platform/state-dir.js +0 -132
  886. package/plugins/next-task/lib/platform/verify-tools.js +0 -182
  887. package/plugins/next-task/lib/repo-map/cache.js +0 -152
  888. package/plugins/next-task/lib/repo-map/concurrency.js +0 -29
  889. package/plugins/next-task/lib/repo-map/index.js +0 -222
  890. package/plugins/next-task/lib/repo-map/installer.js +0 -212
  891. package/plugins/next-task/lib/repo-map/queries/go.js +0 -27
  892. package/plugins/next-task/lib/repo-map/queries/index.js +0 -100
  893. package/plugins/next-task/lib/repo-map/queries/java.js +0 -38
  894. package/plugins/next-task/lib/repo-map/queries/javascript.js +0 -55
  895. package/plugins/next-task/lib/repo-map/queries/python.js +0 -24
  896. package/plugins/next-task/lib/repo-map/queries/rust.js +0 -73
  897. package/plugins/next-task/lib/repo-map/queries/typescript.js +0 -38
  898. package/plugins/next-task/lib/repo-map/runner.js +0 -1364
  899. package/plugins/next-task/lib/repo-map/updater.js +0 -562
  900. package/plugins/next-task/lib/repo-map/usage-analyzer.js +0 -407
  901. package/plugins/next-task/lib/schemas/plugin-manifest.schema.json +0 -57
  902. package/plugins/next-task/lib/schemas/validator.js +0 -247
  903. package/plugins/next-task/lib/sources/custom-handler.js +0 -199
  904. package/plugins/next-task/lib/sources/policy-questions.js +0 -246
  905. package/plugins/next-task/lib/sources/source-cache.js +0 -165
  906. package/plugins/next-task/lib/state/workflow-state.js +0 -576
  907. package/plugins/next-task/lib/types/agent-frontmatter.d.ts +0 -134
  908. package/plugins/next-task/lib/types/command-frontmatter.d.ts +0 -107
  909. package/plugins/next-task/lib/types/hook-frontmatter.d.ts +0 -115
  910. package/plugins/next-task/lib/types/index.d.ts +0 -84
  911. package/plugins/next-task/lib/types/plugin-manifest.d.ts +0 -102
  912. package/plugins/next-task/lib/types/skill-frontmatter.d.ts +0 -89
  913. package/plugins/next-task/lib/utils/atomic-write.js +0 -94
  914. package/plugins/next-task/lib/utils/cache-manager.js +0 -159
  915. package/plugins/next-task/lib/utils/command-parser.js +0 -0
  916. package/plugins/next-task/lib/utils/context-optimizer.js +0 -300
  917. package/plugins/next-task/lib/utils/deprecation.js +0 -37
  918. package/plugins/next-task/lib/utils/shell-escape.js +0 -88
  919. package/plugins/next-task/lib/utils/state-helpers.js +0 -61
  920. package/plugins/next-task/skills/discover-tasks/SKILL.md +0 -191
  921. package/plugins/next-task/skills/orchestrate-review/SKILL.md +0 -239
  922. package/plugins/next-task/skills/validate-delivery/SKILL.md +0 -186
  923. package/plugins/perf/.claude-plugin/plugin.json +0 -20
  924. package/plugins/perf/agents/perf-analyzer.md +0 -43
  925. package/plugins/perf/agents/perf-code-paths.md +0 -16
  926. package/plugins/perf/agents/perf-investigation-logger.md +0 -47
  927. package/plugins/perf/agents/perf-orchestrator.md +0 -344
  928. package/plugins/perf/agents/perf-theory-gatherer.md +0 -25
  929. package/plugins/perf/agents/perf-theory-tester.md +0 -58
  930. package/plugins/perf/commands/perf.md +0 -470
  931. package/plugins/perf/hooks/checkpoint.md +0 -35
  932. package/plugins/perf/hooks/constraint-tester.md +0 -40
  933. package/plugins/perf/lib/adapter-transforms.js +0 -298
  934. package/plugins/perf/lib/collectors/codebase.js +0 -392
  935. package/plugins/perf/lib/collectors/docs-patterns.js +0 -713
  936. package/plugins/perf/lib/collectors/documentation.js +0 -219
  937. package/plugins/perf/lib/collectors/github.js +0 -330
  938. package/plugins/perf/lib/collectors/index.js +0 -126
  939. package/plugins/perf/lib/config/index.js +0 -14
  940. package/plugins/perf/lib/cross-platform/index.js +0 -539
  941. package/plugins/perf/lib/discovery/index.js +0 -352
  942. package/plugins/perf/lib/drift-detect/collectors.js +0 -37
  943. package/plugins/perf/lib/enhance/agent-analyzer.js +0 -421
  944. package/plugins/perf/lib/enhance/agent-patterns.js +0 -571
  945. package/plugins/perf/lib/enhance/auto-suppression.js +0 -622
  946. package/plugins/perf/lib/enhance/benchmark.js +0 -417
  947. package/plugins/perf/lib/enhance/cross-file-analyzer.js +0 -930
  948. package/plugins/perf/lib/enhance/cross-file-patterns.js +0 -370
  949. package/plugins/perf/lib/enhance/docs-analyzer.js +0 -325
  950. package/plugins/perf/lib/enhance/docs-patterns.js +0 -671
  951. package/plugins/perf/lib/enhance/fixer.js +0 -721
  952. package/plugins/perf/lib/enhance/hook-analyzer.js +0 -135
  953. package/plugins/perf/lib/enhance/hook-patterns.js +0 -40
  954. package/plugins/perf/lib/enhance/index.js +0 -127
  955. package/plugins/perf/lib/enhance/plugin-analyzer.js +0 -402
  956. package/plugins/perf/lib/enhance/plugin-patterns.js +0 -326
  957. package/plugins/perf/lib/enhance/projectmemory-analyzer.js +0 -551
  958. package/plugins/perf/lib/enhance/projectmemory-patterns.js +0 -617
  959. package/plugins/perf/lib/enhance/prompt-analyzer.js +0 -457
  960. package/plugins/perf/lib/enhance/prompt-patterns.js +0 -1484
  961. package/plugins/perf/lib/enhance/reporter.js +0 -1348
  962. package/plugins/perf/lib/enhance/security-patterns.js +0 -284
  963. package/plugins/perf/lib/enhance/skill-analyzer.js +0 -182
  964. package/plugins/perf/lib/enhance/skill-patterns.js +0 -147
  965. package/plugins/perf/lib/enhance/suppression.js +0 -352
  966. package/plugins/perf/lib/enhance/tool-patterns.js +0 -373
  967. package/plugins/perf/lib/index.js +0 -270
  968. package/plugins/perf/lib/patterns/cli-enhancers.js +0 -611
  969. package/plugins/perf/lib/patterns/pipeline.js +0 -948
  970. package/plugins/perf/lib/patterns/review-patterns.js +0 -558
  971. package/plugins/perf/lib/patterns/slop-analyzers.js +0 -2305
  972. package/plugins/perf/lib/patterns/slop-patterns.js +0 -1187
  973. package/plugins/perf/lib/perf/analyzer/index.js +0 -22
  974. package/plugins/perf/lib/perf/argument-parser.js +0 -105
  975. package/plugins/perf/lib/perf/baseline-comparator.js +0 -50
  976. package/plugins/perf/lib/perf/baseline-store.js +0 -127
  977. package/plugins/perf/lib/perf/benchmark-runner.js +0 -404
  978. package/plugins/perf/lib/perf/breaking-point-finder.js +0 -52
  979. package/plugins/perf/lib/perf/breaking-point-runner.js +0 -60
  980. package/plugins/perf/lib/perf/checkpoint.js +0 -123
  981. package/plugins/perf/lib/perf/code-paths.js +0 -86
  982. package/plugins/perf/lib/perf/consolidation.js +0 -37
  983. package/plugins/perf/lib/perf/constraint-runner.js +0 -71
  984. package/plugins/perf/lib/perf/experiment-runner.js +0 -32
  985. package/plugins/perf/lib/perf/index.js +0 -41
  986. package/plugins/perf/lib/perf/investigation-state.js +0 -874
  987. package/plugins/perf/lib/perf/optimization-runner.js +0 -79
  988. package/plugins/perf/lib/perf/profilers/go.js +0 -22
  989. package/plugins/perf/lib/perf/profilers/index.js +0 -46
  990. package/plugins/perf/lib/perf/profilers/java.js +0 -23
  991. package/plugins/perf/lib/perf/profilers/node.js +0 -27
  992. package/plugins/perf/lib/perf/profilers/python.js +0 -23
  993. package/plugins/perf/lib/perf/profilers/rust.js +0 -23
  994. package/plugins/perf/lib/perf/profiling-runner.js +0 -75
  995. package/plugins/perf/lib/perf/schemas.js +0 -140
  996. package/plugins/perf/lib/platform/detect-platform.js +0 -413
  997. package/plugins/perf/lib/platform/detection-configs.js +0 -93
  998. package/plugins/perf/lib/platform/state-dir.js +0 -132
  999. package/plugins/perf/lib/platform/verify-tools.js +0 -182
  1000. package/plugins/perf/lib/repo-map/cache.js +0 -152
  1001. package/plugins/perf/lib/repo-map/concurrency.js +0 -29
  1002. package/plugins/perf/lib/repo-map/index.js +0 -222
  1003. package/plugins/perf/lib/repo-map/installer.js +0 -212
  1004. package/plugins/perf/lib/repo-map/queries/go.js +0 -27
  1005. package/plugins/perf/lib/repo-map/queries/index.js +0 -100
  1006. package/plugins/perf/lib/repo-map/queries/java.js +0 -38
  1007. package/plugins/perf/lib/repo-map/queries/javascript.js +0 -55
  1008. package/plugins/perf/lib/repo-map/queries/python.js +0 -24
  1009. package/plugins/perf/lib/repo-map/queries/rust.js +0 -73
  1010. package/plugins/perf/lib/repo-map/queries/typescript.js +0 -38
  1011. package/plugins/perf/lib/repo-map/runner.js +0 -1364
  1012. package/plugins/perf/lib/repo-map/updater.js +0 -562
  1013. package/plugins/perf/lib/repo-map/usage-analyzer.js +0 -407
  1014. package/plugins/perf/lib/schemas/plugin-manifest.schema.json +0 -57
  1015. package/plugins/perf/lib/schemas/validator.js +0 -247
  1016. package/plugins/perf/lib/sources/custom-handler.js +0 -199
  1017. package/plugins/perf/lib/sources/policy-questions.js +0 -246
  1018. package/plugins/perf/lib/sources/source-cache.js +0 -165
  1019. package/plugins/perf/lib/state/workflow-state.js +0 -576
  1020. package/plugins/perf/lib/types/agent-frontmatter.d.ts +0 -134
  1021. package/plugins/perf/lib/types/command-frontmatter.d.ts +0 -107
  1022. package/plugins/perf/lib/types/hook-frontmatter.d.ts +0 -115
  1023. package/plugins/perf/lib/types/index.d.ts +0 -84
  1024. package/plugins/perf/lib/types/plugin-manifest.d.ts +0 -102
  1025. package/plugins/perf/lib/types/skill-frontmatter.d.ts +0 -89
  1026. package/plugins/perf/lib/utils/atomic-write.js +0 -94
  1027. package/plugins/perf/lib/utils/cache-manager.js +0 -159
  1028. package/plugins/perf/lib/utils/command-parser.js +0 -0
  1029. package/plugins/perf/lib/utils/context-optimizer.js +0 -300
  1030. package/plugins/perf/lib/utils/deprecation.js +0 -37
  1031. package/plugins/perf/lib/utils/shell-escape.js +0 -88
  1032. package/plugins/perf/lib/utils/state-helpers.js +0 -61
  1033. package/plugins/perf/skills/perf-analyzer/SKILL.md +0 -37
  1034. package/plugins/perf/skills/perf-baseline-manager/SKILL.md +0 -30
  1035. package/plugins/perf/skills/perf-benchmarker/SKILL.md +0 -52
  1036. package/plugins/perf/skills/perf-code-paths/SKILL.md +0 -32
  1037. package/plugins/perf/skills/perf-investigation-logger/SKILL.md +0 -41
  1038. package/plugins/perf/skills/perf-profiler/SKILL.md +0 -42
  1039. package/plugins/perf/skills/perf-theory-gatherer/SKILL.md +0 -35
  1040. package/plugins/perf/skills/perf-theory-tester/SKILL.md +0 -36
  1041. package/plugins/repo-map/.claude-plugin/plugin.json +0 -22
  1042. package/plugins/repo-map/agents/map-validator.md +0 -60
  1043. package/plugins/repo-map/commands/repo-map.md +0 -133
  1044. package/plugins/repo-map/lib/adapter-transforms.js +0 -298
  1045. package/plugins/repo-map/lib/collectors/codebase.js +0 -392
  1046. package/plugins/repo-map/lib/collectors/docs-patterns.js +0 -713
  1047. package/plugins/repo-map/lib/collectors/documentation.js +0 -219
  1048. package/plugins/repo-map/lib/collectors/github.js +0 -330
  1049. package/plugins/repo-map/lib/collectors/index.js +0 -126
  1050. package/plugins/repo-map/lib/config/index.js +0 -14
  1051. package/plugins/repo-map/lib/cross-platform/index.js +0 -539
  1052. package/plugins/repo-map/lib/discovery/index.js +0 -352
  1053. package/plugins/repo-map/lib/drift-detect/collectors.js +0 -37
  1054. package/plugins/repo-map/lib/enhance/agent-analyzer.js +0 -421
  1055. package/plugins/repo-map/lib/enhance/agent-patterns.js +0 -571
  1056. package/plugins/repo-map/lib/enhance/auto-suppression.js +0 -622
  1057. package/plugins/repo-map/lib/enhance/benchmark.js +0 -417
  1058. package/plugins/repo-map/lib/enhance/cross-file-analyzer.js +0 -930
  1059. package/plugins/repo-map/lib/enhance/cross-file-patterns.js +0 -370
  1060. package/plugins/repo-map/lib/enhance/docs-analyzer.js +0 -325
  1061. package/plugins/repo-map/lib/enhance/docs-patterns.js +0 -671
  1062. package/plugins/repo-map/lib/enhance/fixer.js +0 -721
  1063. package/plugins/repo-map/lib/enhance/hook-analyzer.js +0 -135
  1064. package/plugins/repo-map/lib/enhance/hook-patterns.js +0 -40
  1065. package/plugins/repo-map/lib/enhance/index.js +0 -127
  1066. package/plugins/repo-map/lib/enhance/plugin-analyzer.js +0 -402
  1067. package/plugins/repo-map/lib/enhance/plugin-patterns.js +0 -326
  1068. package/plugins/repo-map/lib/enhance/projectmemory-analyzer.js +0 -551
  1069. package/plugins/repo-map/lib/enhance/projectmemory-patterns.js +0 -617
  1070. package/plugins/repo-map/lib/enhance/prompt-analyzer.js +0 -457
  1071. package/plugins/repo-map/lib/enhance/prompt-patterns.js +0 -1484
  1072. package/plugins/repo-map/lib/enhance/reporter.js +0 -1348
  1073. package/plugins/repo-map/lib/enhance/security-patterns.js +0 -284
  1074. package/plugins/repo-map/lib/enhance/skill-analyzer.js +0 -182
  1075. package/plugins/repo-map/lib/enhance/skill-patterns.js +0 -147
  1076. package/plugins/repo-map/lib/enhance/suppression.js +0 -352
  1077. package/plugins/repo-map/lib/enhance/tool-patterns.js +0 -373
  1078. package/plugins/repo-map/lib/index.js +0 -270
  1079. package/plugins/repo-map/lib/patterns/cli-enhancers.js +0 -611
  1080. package/plugins/repo-map/lib/patterns/pipeline.js +0 -948
  1081. package/plugins/repo-map/lib/patterns/review-patterns.js +0 -558
  1082. package/plugins/repo-map/lib/patterns/slop-analyzers.js +0 -2305
  1083. package/plugins/repo-map/lib/patterns/slop-patterns.js +0 -1187
  1084. package/plugins/repo-map/lib/perf/analyzer/index.js +0 -22
  1085. package/plugins/repo-map/lib/perf/argument-parser.js +0 -105
  1086. package/plugins/repo-map/lib/perf/baseline-comparator.js +0 -50
  1087. package/plugins/repo-map/lib/perf/baseline-store.js +0 -127
  1088. package/plugins/repo-map/lib/perf/benchmark-runner.js +0 -404
  1089. package/plugins/repo-map/lib/perf/breaking-point-finder.js +0 -52
  1090. package/plugins/repo-map/lib/perf/breaking-point-runner.js +0 -60
  1091. package/plugins/repo-map/lib/perf/checkpoint.js +0 -123
  1092. package/plugins/repo-map/lib/perf/code-paths.js +0 -86
  1093. package/plugins/repo-map/lib/perf/consolidation.js +0 -37
  1094. package/plugins/repo-map/lib/perf/constraint-runner.js +0 -71
  1095. package/plugins/repo-map/lib/perf/experiment-runner.js +0 -32
  1096. package/plugins/repo-map/lib/perf/index.js +0 -41
  1097. package/plugins/repo-map/lib/perf/investigation-state.js +0 -874
  1098. package/plugins/repo-map/lib/perf/optimization-runner.js +0 -79
  1099. package/plugins/repo-map/lib/perf/profilers/go.js +0 -22
  1100. package/plugins/repo-map/lib/perf/profilers/index.js +0 -46
  1101. package/plugins/repo-map/lib/perf/profilers/java.js +0 -23
  1102. package/plugins/repo-map/lib/perf/profilers/node.js +0 -27
  1103. package/plugins/repo-map/lib/perf/profilers/python.js +0 -23
  1104. package/plugins/repo-map/lib/perf/profilers/rust.js +0 -23
  1105. package/plugins/repo-map/lib/perf/profiling-runner.js +0 -75
  1106. package/plugins/repo-map/lib/perf/schemas.js +0 -140
  1107. package/plugins/repo-map/lib/platform/detect-platform.js +0 -413
  1108. package/plugins/repo-map/lib/platform/detection-configs.js +0 -93
  1109. package/plugins/repo-map/lib/platform/state-dir.js +0 -132
  1110. package/plugins/repo-map/lib/platform/verify-tools.js +0 -182
  1111. package/plugins/repo-map/lib/repo-map/cache.js +0 -152
  1112. package/plugins/repo-map/lib/repo-map/concurrency.js +0 -29
  1113. package/plugins/repo-map/lib/repo-map/index.js +0 -222
  1114. package/plugins/repo-map/lib/repo-map/installer.js +0 -212
  1115. package/plugins/repo-map/lib/repo-map/queries/go.js +0 -27
  1116. package/plugins/repo-map/lib/repo-map/queries/index.js +0 -100
  1117. package/plugins/repo-map/lib/repo-map/queries/java.js +0 -38
  1118. package/plugins/repo-map/lib/repo-map/queries/javascript.js +0 -55
  1119. package/plugins/repo-map/lib/repo-map/queries/python.js +0 -24
  1120. package/plugins/repo-map/lib/repo-map/queries/rust.js +0 -73
  1121. package/plugins/repo-map/lib/repo-map/queries/typescript.js +0 -38
  1122. package/plugins/repo-map/lib/repo-map/runner.js +0 -1364
  1123. package/plugins/repo-map/lib/repo-map/updater.js +0 -562
  1124. package/plugins/repo-map/lib/repo-map/usage-analyzer.js +0 -407
  1125. package/plugins/repo-map/lib/schemas/plugin-manifest.schema.json +0 -57
  1126. package/plugins/repo-map/lib/schemas/validator.js +0 -247
  1127. package/plugins/repo-map/lib/sources/custom-handler.js +0 -199
  1128. package/plugins/repo-map/lib/sources/policy-questions.js +0 -246
  1129. package/plugins/repo-map/lib/sources/source-cache.js +0 -165
  1130. package/plugins/repo-map/lib/state/workflow-state.js +0 -576
  1131. package/plugins/repo-map/lib/types/agent-frontmatter.d.ts +0 -134
  1132. package/plugins/repo-map/lib/types/command-frontmatter.d.ts +0 -107
  1133. package/plugins/repo-map/lib/types/hook-frontmatter.d.ts +0 -115
  1134. package/plugins/repo-map/lib/types/index.d.ts +0 -84
  1135. package/plugins/repo-map/lib/types/plugin-manifest.d.ts +0 -102
  1136. package/plugins/repo-map/lib/types/skill-frontmatter.d.ts +0 -89
  1137. package/plugins/repo-map/lib/utils/atomic-write.js +0 -94
  1138. package/plugins/repo-map/lib/utils/cache-manager.js +0 -159
  1139. package/plugins/repo-map/lib/utils/command-parser.js +0 -0
  1140. package/plugins/repo-map/lib/utils/context-optimizer.js +0 -300
  1141. package/plugins/repo-map/lib/utils/deprecation.js +0 -37
  1142. package/plugins/repo-map/lib/utils/shell-escape.js +0 -88
  1143. package/plugins/repo-map/lib/utils/state-helpers.js +0 -61
  1144. package/plugins/repo-map/skills/repo-mapping/SKILL.md +0 -83
  1145. package/plugins/ship/.claude-plugin/plugin.json +0 -21
  1146. package/plugins/ship/commands/ship-ci-review-loop.md +0 -472
  1147. package/plugins/ship/commands/ship-deployment.md +0 -335
  1148. package/plugins/ship/commands/ship-error-handling.md +0 -258
  1149. package/plugins/ship/commands/ship.md +0 -492
  1150. package/plugins/ship/lib/adapter-transforms.js +0 -298
  1151. package/plugins/ship/lib/collectors/codebase.js +0 -392
  1152. package/plugins/ship/lib/collectors/docs-patterns.js +0 -713
  1153. package/plugins/ship/lib/collectors/documentation.js +0 -219
  1154. package/plugins/ship/lib/collectors/github.js +0 -330
  1155. package/plugins/ship/lib/collectors/index.js +0 -126
  1156. package/plugins/ship/lib/config/index.js +0 -14
  1157. package/plugins/ship/lib/cross-platform/index.js +0 -539
  1158. package/plugins/ship/lib/discovery/index.js +0 -352
  1159. package/plugins/ship/lib/drift-detect/collectors.js +0 -37
  1160. package/plugins/ship/lib/enhance/agent-analyzer.js +0 -421
  1161. package/plugins/ship/lib/enhance/agent-patterns.js +0 -571
  1162. package/plugins/ship/lib/enhance/auto-suppression.js +0 -622
  1163. package/plugins/ship/lib/enhance/benchmark.js +0 -417
  1164. package/plugins/ship/lib/enhance/cross-file-analyzer.js +0 -930
  1165. package/plugins/ship/lib/enhance/cross-file-patterns.js +0 -370
  1166. package/plugins/ship/lib/enhance/docs-analyzer.js +0 -325
  1167. package/plugins/ship/lib/enhance/docs-patterns.js +0 -671
  1168. package/plugins/ship/lib/enhance/fixer.js +0 -721
  1169. package/plugins/ship/lib/enhance/hook-analyzer.js +0 -135
  1170. package/plugins/ship/lib/enhance/hook-patterns.js +0 -40
  1171. package/plugins/ship/lib/enhance/index.js +0 -127
  1172. package/plugins/ship/lib/enhance/plugin-analyzer.js +0 -402
  1173. package/plugins/ship/lib/enhance/plugin-patterns.js +0 -326
  1174. package/plugins/ship/lib/enhance/projectmemory-analyzer.js +0 -551
  1175. package/plugins/ship/lib/enhance/projectmemory-patterns.js +0 -617
  1176. package/plugins/ship/lib/enhance/prompt-analyzer.js +0 -457
  1177. package/plugins/ship/lib/enhance/prompt-patterns.js +0 -1484
  1178. package/plugins/ship/lib/enhance/reporter.js +0 -1348
  1179. package/plugins/ship/lib/enhance/security-patterns.js +0 -284
  1180. package/plugins/ship/lib/enhance/skill-analyzer.js +0 -182
  1181. package/plugins/ship/lib/enhance/skill-patterns.js +0 -147
  1182. package/plugins/ship/lib/enhance/suppression.js +0 -352
  1183. package/plugins/ship/lib/enhance/tool-patterns.js +0 -373
  1184. package/plugins/ship/lib/index.js +0 -270
  1185. package/plugins/ship/lib/patterns/cli-enhancers.js +0 -611
  1186. package/plugins/ship/lib/patterns/pipeline.js +0 -948
  1187. package/plugins/ship/lib/patterns/review-patterns.js +0 -558
  1188. package/plugins/ship/lib/patterns/slop-analyzers.js +0 -2305
  1189. package/plugins/ship/lib/patterns/slop-patterns.js +0 -1187
  1190. package/plugins/ship/lib/perf/analyzer/index.js +0 -22
  1191. package/plugins/ship/lib/perf/argument-parser.js +0 -105
  1192. package/plugins/ship/lib/perf/baseline-comparator.js +0 -50
  1193. package/plugins/ship/lib/perf/baseline-store.js +0 -127
  1194. package/plugins/ship/lib/perf/benchmark-runner.js +0 -404
  1195. package/plugins/ship/lib/perf/breaking-point-finder.js +0 -52
  1196. package/plugins/ship/lib/perf/breaking-point-runner.js +0 -60
  1197. package/plugins/ship/lib/perf/checkpoint.js +0 -123
  1198. package/plugins/ship/lib/perf/code-paths.js +0 -86
  1199. package/plugins/ship/lib/perf/consolidation.js +0 -37
  1200. package/plugins/ship/lib/perf/constraint-runner.js +0 -71
  1201. package/plugins/ship/lib/perf/experiment-runner.js +0 -32
  1202. package/plugins/ship/lib/perf/index.js +0 -41
  1203. package/plugins/ship/lib/perf/investigation-state.js +0 -874
  1204. package/plugins/ship/lib/perf/optimization-runner.js +0 -79
  1205. package/plugins/ship/lib/perf/profilers/go.js +0 -22
  1206. package/plugins/ship/lib/perf/profilers/index.js +0 -46
  1207. package/plugins/ship/lib/perf/profilers/java.js +0 -23
  1208. package/plugins/ship/lib/perf/profilers/node.js +0 -27
  1209. package/plugins/ship/lib/perf/profilers/python.js +0 -23
  1210. package/plugins/ship/lib/perf/profilers/rust.js +0 -23
  1211. package/plugins/ship/lib/perf/profiling-runner.js +0 -75
  1212. package/plugins/ship/lib/perf/schemas.js +0 -140
  1213. package/plugins/ship/lib/platform/detect-platform.js +0 -413
  1214. package/plugins/ship/lib/platform/detection-configs.js +0 -93
  1215. package/plugins/ship/lib/platform/state-dir.js +0 -132
  1216. package/plugins/ship/lib/platform/verify-tools.js +0 -182
  1217. package/plugins/ship/lib/repo-map/cache.js +0 -152
  1218. package/plugins/ship/lib/repo-map/concurrency.js +0 -29
  1219. package/plugins/ship/lib/repo-map/index.js +0 -222
  1220. package/plugins/ship/lib/repo-map/installer.js +0 -212
  1221. package/plugins/ship/lib/repo-map/queries/go.js +0 -27
  1222. package/plugins/ship/lib/repo-map/queries/index.js +0 -100
  1223. package/plugins/ship/lib/repo-map/queries/java.js +0 -38
  1224. package/plugins/ship/lib/repo-map/queries/javascript.js +0 -55
  1225. package/plugins/ship/lib/repo-map/queries/python.js +0 -24
  1226. package/plugins/ship/lib/repo-map/queries/rust.js +0 -73
  1227. package/plugins/ship/lib/repo-map/queries/typescript.js +0 -38
  1228. package/plugins/ship/lib/repo-map/runner.js +0 -1364
  1229. package/plugins/ship/lib/repo-map/updater.js +0 -562
  1230. package/plugins/ship/lib/repo-map/usage-analyzer.js +0 -407
  1231. package/plugins/ship/lib/schemas/plugin-manifest.schema.json +0 -57
  1232. package/plugins/ship/lib/schemas/validator.js +0 -247
  1233. package/plugins/ship/lib/sources/custom-handler.js +0 -199
  1234. package/plugins/ship/lib/sources/policy-questions.js +0 -246
  1235. package/plugins/ship/lib/sources/source-cache.js +0 -165
  1236. package/plugins/ship/lib/state/workflow-state.js +0 -576
  1237. package/plugins/ship/lib/types/agent-frontmatter.d.ts +0 -134
  1238. package/plugins/ship/lib/types/command-frontmatter.d.ts +0 -107
  1239. package/plugins/ship/lib/types/hook-frontmatter.d.ts +0 -115
  1240. package/plugins/ship/lib/types/index.d.ts +0 -84
  1241. package/plugins/ship/lib/types/plugin-manifest.d.ts +0 -102
  1242. package/plugins/ship/lib/types/skill-frontmatter.d.ts +0 -89
  1243. package/plugins/ship/lib/utils/atomic-write.js +0 -94
  1244. package/plugins/ship/lib/utils/cache-manager.js +0 -159
  1245. package/plugins/ship/lib/utils/command-parser.js +0 -0
  1246. package/plugins/ship/lib/utils/context-optimizer.js +0 -300
  1247. package/plugins/ship/lib/utils/deprecation.js +0 -37
  1248. package/plugins/ship/lib/utils/shell-escape.js +0 -88
  1249. package/plugins/ship/lib/utils/state-helpers.js +0 -61
  1250. package/plugins/sync-docs/.claude-plugin/plugin.json +0 -20
  1251. package/plugins/sync-docs/agents/sync-docs-agent.md +0 -154
  1252. package/plugins/sync-docs/commands/sync-docs.md +0 -186
  1253. package/plugins/sync-docs/lib/adapter-transforms.js +0 -298
  1254. package/plugins/sync-docs/lib/collectors/codebase.js +0 -392
  1255. package/plugins/sync-docs/lib/collectors/docs-patterns.js +0 -713
  1256. package/plugins/sync-docs/lib/collectors/documentation.js +0 -219
  1257. package/plugins/sync-docs/lib/collectors/github.js +0 -330
  1258. package/plugins/sync-docs/lib/collectors/index.js +0 -126
  1259. package/plugins/sync-docs/lib/config/index.js +0 -14
  1260. package/plugins/sync-docs/lib/cross-platform/index.js +0 -539
  1261. package/plugins/sync-docs/lib/discovery/index.js +0 -352
  1262. package/plugins/sync-docs/lib/drift-detect/collectors.js +0 -37
  1263. package/plugins/sync-docs/lib/enhance/agent-analyzer.js +0 -421
  1264. package/plugins/sync-docs/lib/enhance/agent-patterns.js +0 -571
  1265. package/plugins/sync-docs/lib/enhance/auto-suppression.js +0 -622
  1266. package/plugins/sync-docs/lib/enhance/benchmark.js +0 -417
  1267. package/plugins/sync-docs/lib/enhance/cross-file-analyzer.js +0 -930
  1268. package/plugins/sync-docs/lib/enhance/cross-file-patterns.js +0 -370
  1269. package/plugins/sync-docs/lib/enhance/docs-analyzer.js +0 -325
  1270. package/plugins/sync-docs/lib/enhance/docs-patterns.js +0 -671
  1271. package/plugins/sync-docs/lib/enhance/fixer.js +0 -721
  1272. package/plugins/sync-docs/lib/enhance/hook-analyzer.js +0 -135
  1273. package/plugins/sync-docs/lib/enhance/hook-patterns.js +0 -40
  1274. package/plugins/sync-docs/lib/enhance/index.js +0 -127
  1275. package/plugins/sync-docs/lib/enhance/plugin-analyzer.js +0 -402
  1276. package/plugins/sync-docs/lib/enhance/plugin-patterns.js +0 -326
  1277. package/plugins/sync-docs/lib/enhance/projectmemory-analyzer.js +0 -551
  1278. package/plugins/sync-docs/lib/enhance/projectmemory-patterns.js +0 -617
  1279. package/plugins/sync-docs/lib/enhance/prompt-analyzer.js +0 -457
  1280. package/plugins/sync-docs/lib/enhance/prompt-patterns.js +0 -1484
  1281. package/plugins/sync-docs/lib/enhance/reporter.js +0 -1348
  1282. package/plugins/sync-docs/lib/enhance/security-patterns.js +0 -284
  1283. package/plugins/sync-docs/lib/enhance/skill-analyzer.js +0 -182
  1284. package/plugins/sync-docs/lib/enhance/skill-patterns.js +0 -147
  1285. package/plugins/sync-docs/lib/enhance/suppression.js +0 -352
  1286. package/plugins/sync-docs/lib/enhance/tool-patterns.js +0 -373
  1287. package/plugins/sync-docs/lib/index.js +0 -270
  1288. package/plugins/sync-docs/lib/patterns/cli-enhancers.js +0 -611
  1289. package/plugins/sync-docs/lib/patterns/pipeline.js +0 -948
  1290. package/plugins/sync-docs/lib/patterns/review-patterns.js +0 -558
  1291. package/plugins/sync-docs/lib/patterns/slop-analyzers.js +0 -2305
  1292. package/plugins/sync-docs/lib/patterns/slop-patterns.js +0 -1187
  1293. package/plugins/sync-docs/lib/perf/analyzer/index.js +0 -22
  1294. package/plugins/sync-docs/lib/perf/argument-parser.js +0 -105
  1295. package/plugins/sync-docs/lib/perf/baseline-comparator.js +0 -50
  1296. package/plugins/sync-docs/lib/perf/baseline-store.js +0 -127
  1297. package/plugins/sync-docs/lib/perf/benchmark-runner.js +0 -404
  1298. package/plugins/sync-docs/lib/perf/breaking-point-finder.js +0 -52
  1299. package/plugins/sync-docs/lib/perf/breaking-point-runner.js +0 -60
  1300. package/plugins/sync-docs/lib/perf/checkpoint.js +0 -123
  1301. package/plugins/sync-docs/lib/perf/code-paths.js +0 -86
  1302. package/plugins/sync-docs/lib/perf/consolidation.js +0 -37
  1303. package/plugins/sync-docs/lib/perf/constraint-runner.js +0 -71
  1304. package/plugins/sync-docs/lib/perf/experiment-runner.js +0 -32
  1305. package/plugins/sync-docs/lib/perf/index.js +0 -41
  1306. package/plugins/sync-docs/lib/perf/investigation-state.js +0 -874
  1307. package/plugins/sync-docs/lib/perf/optimization-runner.js +0 -79
  1308. package/plugins/sync-docs/lib/perf/profilers/go.js +0 -22
  1309. package/plugins/sync-docs/lib/perf/profilers/index.js +0 -46
  1310. package/plugins/sync-docs/lib/perf/profilers/java.js +0 -23
  1311. package/plugins/sync-docs/lib/perf/profilers/node.js +0 -27
  1312. package/plugins/sync-docs/lib/perf/profilers/python.js +0 -23
  1313. package/plugins/sync-docs/lib/perf/profilers/rust.js +0 -23
  1314. package/plugins/sync-docs/lib/perf/profiling-runner.js +0 -75
  1315. package/plugins/sync-docs/lib/perf/schemas.js +0 -140
  1316. package/plugins/sync-docs/lib/platform/detect-platform.js +0 -413
  1317. package/plugins/sync-docs/lib/platform/detection-configs.js +0 -93
  1318. package/plugins/sync-docs/lib/platform/state-dir.js +0 -132
  1319. package/plugins/sync-docs/lib/platform/verify-tools.js +0 -182
  1320. package/plugins/sync-docs/lib/repo-map/cache.js +0 -152
  1321. package/plugins/sync-docs/lib/repo-map/concurrency.js +0 -29
  1322. package/plugins/sync-docs/lib/repo-map/index.js +0 -222
  1323. package/plugins/sync-docs/lib/repo-map/installer.js +0 -212
  1324. package/plugins/sync-docs/lib/repo-map/queries/go.js +0 -27
  1325. package/plugins/sync-docs/lib/repo-map/queries/index.js +0 -100
  1326. package/plugins/sync-docs/lib/repo-map/queries/java.js +0 -38
  1327. package/plugins/sync-docs/lib/repo-map/queries/javascript.js +0 -55
  1328. package/plugins/sync-docs/lib/repo-map/queries/python.js +0 -24
  1329. package/plugins/sync-docs/lib/repo-map/queries/rust.js +0 -73
  1330. package/plugins/sync-docs/lib/repo-map/queries/typescript.js +0 -38
  1331. package/plugins/sync-docs/lib/repo-map/runner.js +0 -1364
  1332. package/plugins/sync-docs/lib/repo-map/updater.js +0 -562
  1333. package/plugins/sync-docs/lib/repo-map/usage-analyzer.js +0 -407
  1334. package/plugins/sync-docs/lib/schemas/plugin-manifest.schema.json +0 -57
  1335. package/plugins/sync-docs/lib/schemas/validator.js +0 -247
  1336. package/plugins/sync-docs/lib/sources/custom-handler.js +0 -199
  1337. package/plugins/sync-docs/lib/sources/policy-questions.js +0 -246
  1338. package/plugins/sync-docs/lib/sources/source-cache.js +0 -165
  1339. package/plugins/sync-docs/lib/state/workflow-state.js +0 -576
  1340. package/plugins/sync-docs/lib/types/agent-frontmatter.d.ts +0 -134
  1341. package/plugins/sync-docs/lib/types/command-frontmatter.d.ts +0 -107
  1342. package/plugins/sync-docs/lib/types/hook-frontmatter.d.ts +0 -115
  1343. package/plugins/sync-docs/lib/types/index.d.ts +0 -84
  1344. package/plugins/sync-docs/lib/types/plugin-manifest.d.ts +0 -102
  1345. package/plugins/sync-docs/lib/types/skill-frontmatter.d.ts +0 -89
  1346. package/plugins/sync-docs/lib/utils/atomic-write.js +0 -94
  1347. package/plugins/sync-docs/lib/utils/cache-manager.js +0 -159
  1348. package/plugins/sync-docs/lib/utils/command-parser.js +0 -0
  1349. package/plugins/sync-docs/lib/utils/context-optimizer.js +0 -300
  1350. package/plugins/sync-docs/lib/utils/deprecation.js +0 -37
  1351. package/plugins/sync-docs/lib/utils/shell-escape.js +0 -88
  1352. package/plugins/sync-docs/lib/utils/state-helpers.js +0 -61
  1353. package/plugins/sync-docs/skills/sync-docs/SKILL.md +0 -351
package/bin/cli.js CHANGED
@@ -8,10 +8,12 @@
8
8
  * Remove: npm uninstall -g agentsys && agentsys --remove
9
9
  */
10
10
 
11
- const { execSync } = require('child_process');
11
+ const { execSync, execFileSync } = require('child_process');
12
12
  const fs = require('fs');
13
13
  const path = require('path');
14
14
  const readline = require('readline');
15
+ const https = require('https');
16
+ const { createGunzip } = require('zlib');
15
17
 
16
18
  const VERSION = require('../package.json').version;
17
19
  // Use the installed npm package directory as source (no git clone needed)
@@ -20,7 +22,7 @@ const discovery = require('../lib/discovery');
20
22
  const transforms = require('../lib/adapter-transforms');
21
23
 
22
24
  // Valid tool names
23
- const VALID_TOOLS = ['claude', 'opencode', 'codex'];
25
+ const VALID_TOOLS = ['claude', 'opencode', 'codex', 'cursor'];
24
26
 
25
27
  function getInstallDir() {
26
28
  const home = process.env.HOME || process.env.USERPROFILE;
@@ -54,7 +56,7 @@ function getConfigPath(platform) {
54
56
 
55
57
  function commandExists(cmd) {
56
58
  try {
57
- execSync(`${process.platform === 'win32' ? 'where' : 'which'} ${cmd}`, { stdio: 'pipe' });
59
+ execFileSync(process.platform === 'win32' ? 'where.exe' : 'which', [cmd], { stdio: 'pipe' });
58
60
  return true;
59
61
  } catch {
60
62
  return false;
@@ -84,6 +86,9 @@ function parseArgs(args) {
84
86
  stripModels: true, // Default: strip models
85
87
  tool: null, // Single tool
86
88
  tools: [], // Multiple tools
89
+ only: [], // --only flag: selective plugin install
90
+ subcommand: null, // 'update', 'list', 'install', 'remove', 'search'
91
+ subcommandArg: null, // argument for subcommand (e.g. plugin name)
87
92
  };
88
93
 
89
94
  for (let i = 0; i < args.length; i++) {
@@ -102,6 +107,10 @@ function parseArgs(args) {
102
107
  } else if (arg === '--strip-models') {
103
108
  // Legacy flag, now default behavior
104
109
  result.stripModels = true;
110
+ } else if (arg === '--only' && args[i + 1]) {
111
+ const pluginList = args[i + 1].split(',').map(p => p.trim()).filter(Boolean);
112
+ result.only.push(...pluginList);
113
+ i++;
105
114
  } else if (arg === '--tool' && args[i + 1]) {
106
115
  const tool = args[i + 1].toLowerCase();
107
116
  if (VALID_TOOLS.includes(tool)) {
@@ -121,6 +130,20 @@ function parseArgs(args) {
121
130
  result.tools.push(tool);
122
131
  }
123
132
  i++;
133
+ } else if (['update', 'list', 'install', 'remove', 'search'].includes(arg)) {
134
+ result.subcommand = arg;
135
+ // Check for subcommand --help
136
+ if (args[i + 1] && (args[i + 1] === '--help' || args[i + 1] === '-h')) {
137
+ result.subcommandArg = '--help';
138
+ i++;
139
+ // For 'list': accept --all, --agents, --skills, --commands, --hooks, --plugins
140
+ } else if (arg === 'list' && args[i + 1] && ['--all', '--agents', '--skills', '--commands', '--hooks', '--plugins'].includes(args[i + 1])) {
141
+ result.subcommandArg = args[i + 1];
142
+ i++;
143
+ } else if (args[i + 1] && !args[i + 1].startsWith('-')) {
144
+ result.subcommandArg = args[i + 1];
145
+ i++;
146
+ }
124
147
  }
125
148
  }
126
149
 
@@ -191,6 +214,1007 @@ function installDependencies(installDir) {
191
214
  execSync('npm install --production', { cwd: installDir, stdio: 'inherit' });
192
215
  }
193
216
 
217
+ // --- External Plugin Fetching ---
218
+
219
+ function getPluginCacheDir() {
220
+ const home = process.env.HOME || process.env.USERPROFILE;
221
+ return path.join(home, '.agentsys', 'plugins');
222
+ }
223
+
224
+ function loadMarketplace() {
225
+ const marketplacePath = path.join(PACKAGE_DIR, '.claude-plugin', 'marketplace.json');
226
+ if (!fs.existsSync(marketplacePath)) {
227
+ console.error('[ERROR] marketplace.json not found at ' + marketplacePath);
228
+ process.exit(1);
229
+ }
230
+ return JSON.parse(fs.readFileSync(marketplacePath, 'utf8'));
231
+ }
232
+
233
+ /**
234
+ * Normalize marketplace plugin source entries.
235
+ *
236
+ * Supported formats:
237
+ * - string URL/path (legacy)
238
+ * - object: { source: "url", url: "..." } (current)
239
+ * - object: { source: "path", path: "..." } (local/bundled)
240
+ *
241
+ * @param {string|Object} source
242
+ * @returns {{type: 'remote'|'local', value: string}|null}
243
+ */
244
+ function resolvePluginSource(source) {
245
+ if (typeof source === 'string') {
246
+ const value = source.trim();
247
+ if (!value) return null;
248
+ if (value.startsWith('./') || value.startsWith('../')) {
249
+ return { type: 'local', value };
250
+ }
251
+ return { type: 'remote', value };
252
+ }
253
+
254
+ if (!source || typeof source !== 'object') return null;
255
+
256
+ const sourceType = typeof source.source === 'string' ? source.source.toLowerCase() : null;
257
+
258
+ if ((sourceType === 'path' || sourceType === 'local') && typeof source.path === 'string') {
259
+ return { type: 'local', value: source.path };
260
+ }
261
+
262
+ if (sourceType === 'url' && typeof source.url === 'string') {
263
+ return { type: 'remote', value: source.url };
264
+ }
265
+
266
+ // Backward/forward-compatible fallbacks
267
+ if (typeof source.path === 'string') {
268
+ return { type: 'local', value: source.path };
269
+ }
270
+ if (typeof source.url === 'string') {
271
+ return { type: 'remote', value: source.url };
272
+ }
273
+
274
+ return null;
275
+ }
276
+
277
+ /**
278
+ * Backward-compatible helper returning only the source URL/path value.
279
+ *
280
+ * @param {string|Object} source
281
+ * @returns {string|null}
282
+ */
283
+ function resolveSourceUrl(source) {
284
+ const normalized = resolvePluginSource(source);
285
+ return normalized ? normalized.value : null;
286
+ }
287
+
288
+ /**
289
+ * Resolve plugin dependencies transitively.
290
+ *
291
+ * Circular dependencies are expected and handled: the `visiting` Set tracks
292
+ * the current DFS path and short-circuits any back-edge (e.g. next-task ->
293
+ * ship -> next-task), adding the already-visited node to `resolved` and
294
+ * returning immediately so the traversal terminates without infinite recursion.
295
+ *
296
+ * @param {string[]} names - Plugin names to resolve
297
+ * @param {Object} marketplace - Parsed marketplace.json
298
+ * @returns {string[]} All required plugin names (deduplicated, topologically ordered)
299
+ */
300
+ function resolvePluginDeps(names, marketplace) {
301
+ const pluginMap = {};
302
+ for (const p of marketplace.plugins) {
303
+ pluginMap[p.name] = p;
304
+ }
305
+
306
+ // Validate requested names exist
307
+ for (const name of names) {
308
+ if (!pluginMap[name]) {
309
+ console.error(`[ERROR] Unknown plugin: ${name}. Available: ${marketplace.plugins.map(p => p.name).join(', ')}`);
310
+ process.exit(1);
311
+ }
312
+ }
313
+
314
+ const resolved = new Set();
315
+ const visiting = new Set();
316
+
317
+ function visit(name) {
318
+ if (resolved.has(name)) return;
319
+ if (visiting.has(name)) {
320
+ // Circular dep - just add it and stop recursing
321
+ resolved.add(name);
322
+ return;
323
+ }
324
+ visiting.add(name);
325
+
326
+ visiting.delete(name);
327
+ resolved.add(name);
328
+ }
329
+
330
+ for (const name of names) {
331
+ visit(name);
332
+ }
333
+
334
+ return [...resolved];
335
+ }
336
+
337
+ /**
338
+ * Download a GitHub repo tarball and extract to cache directory.
339
+ *
340
+ * @param {string} name - Plugin name
341
+ * @param {string} source - GitHub source URL (e.g. "github:agent-sh/agentsys-plugin-next-task")
342
+ * @param {string} version - Expected version string
343
+ * @returns {Promise<string>} Path to extracted plugin directory
344
+ */
345
+ async function fetchPlugin(name, source, version) {
346
+ const cacheDir = getPluginCacheDir();
347
+ const pluginDir = path.join(cacheDir, name);
348
+ const versionFile = path.join(pluginDir, '.version');
349
+
350
+ // Check cache
351
+ if (fs.existsSync(versionFile)) {
352
+ const cached = fs.readFileSync(versionFile, 'utf8').trim();
353
+ if (cached === version) {
354
+ return pluginDir;
355
+ }
356
+ }
357
+
358
+ const parsedSource = parseGitHubSource(source, version, name);
359
+ const owner = parsedSource.owner;
360
+ const repo = parsedSource.repo;
361
+
362
+ const refCandidates = parsedSource.explicitRef
363
+ ? [parsedSource.ref]
364
+ : [parsedSource.ref, version, 'main', 'master'];
365
+
366
+ let lastError = null;
367
+ for (const ref of [...new Set(refCandidates.filter(Boolean))]) {
368
+ const tarballUrl = `https://api.github.com/repos/${owner}/${repo}/tarball/${ref}`;
369
+
370
+ try {
371
+ console.log(` Fetching ${name}@${version} from ${owner}/${repo} (${ref})...`);
372
+
373
+ // Clean and recreate
374
+ if (fs.existsSync(pluginDir)) {
375
+ fs.rmSync(pluginDir, { recursive: true, force: true });
376
+ }
377
+ fs.mkdirSync(pluginDir, { recursive: true });
378
+
379
+ // Download and extract tarball
380
+ await downloadAndExtractTarball(tarballUrl, pluginDir);
381
+
382
+ // Write version marker
383
+ fs.writeFileSync(versionFile, version);
384
+ return pluginDir;
385
+ } catch (err) {
386
+ lastError = err;
387
+ const isNotFound = /HTTP 404/.test(err.message);
388
+ if (isNotFound && !parsedSource.explicitRef) {
389
+ continue;
390
+ }
391
+ throw err;
392
+ }
393
+ }
394
+
395
+ throw new Error(
396
+ `Unable to fetch ${name} from ${owner}/${repo}. Tried refs: ${[...new Set(refCandidates.filter(Boolean))].join(', ')}. Last error: ${lastError ? lastError.message : 'unknown error'}`
397
+ );
398
+ }
399
+
400
+ /**
401
+ * Parse GitHub source URL formats and normalize repo name.
402
+ *
403
+ * @param {string} source
404
+ * @param {string} version
405
+ * @param {string} [name]
406
+ * @returns {{owner: string, repo: string, ref: string, explicitRef: boolean}}
407
+ */
408
+ function parseGitHubSource(source, version, name = 'plugin') {
409
+ // Parse source formats:
410
+ // "https://github.com/owner/repo" or "https://github.com/owner/repo#ref"
411
+ // "github:owner/repo" or "github:owner/repo#ref"
412
+ const urlMatch = source.match(/github\.com\/([^/]+)\/([^/#]+)(?:#(.+))?/);
413
+ const shortMatch = !urlMatch && source.match(/^github:([^/]+)\/([^#]+)(?:#(.+))?$/);
414
+ const match = urlMatch || shortMatch;
415
+ if (!match) {
416
+ throw new Error(`Unsupported source format for ${name}: ${source}`);
417
+ }
418
+
419
+ const owner = match[1];
420
+ const repo = match[2].replace(/\.git$/, '');
421
+ const explicitRef = Boolean(match[3]);
422
+ const ref = match[3] || `v${version}`;
423
+ return { owner, repo, ref, explicitRef };
424
+ }
425
+
426
+ /**
427
+ * Download a tarball from URL and extract to dest directory.
428
+ * Strips the top-level directory from the tarball (GitHub tarballs have owner-repo-sha/).
429
+ */
430
+ function downloadAndExtractTarball(url, dest) {
431
+ return new Promise((resolve, reject) => {
432
+ const ghToken = process.env.GITHUB_TOKEN || process.env.GH_TOKEN;
433
+ const request = (reqUrl, redirectCount = 0) => {
434
+ if (redirectCount > 5) {
435
+ reject(new Error(`Too many redirects fetching tarball from ${url}`));
436
+ return;
437
+ }
438
+ const headers = {
439
+ 'User-Agent': `agentsys/${VERSION}`,
440
+ 'Accept': 'application/vnd.github+json'
441
+ };
442
+ if (ghToken) headers['Authorization'] = `Bearer ${ghToken}`;
443
+ https.get(reqUrl, { headers }, (res) => {
444
+ // Follow redirects (GitHub API returns 302 to S3)
445
+ if (res.statusCode === 301 || res.statusCode === 302) {
446
+ res.resume();
447
+ request(res.headers.location, redirectCount + 1);
448
+ return;
449
+ }
450
+
451
+ if (res.statusCode !== 200) {
452
+ res.resume();
453
+ const hint = res.statusCode === 403 ? ' (rate limited — set GITHUB_TOKEN env var)' : '';
454
+ reject(new Error(`HTTP ${res.statusCode}${hint} fetching tarball from ${reqUrl}`));
455
+ return;
456
+ }
457
+
458
+ // Use tar command to extract (available on all supported platforms)
459
+ // On Windows/MSYS2, convert backslash paths to forward slashes for tar
460
+ const tarDest = process.platform === 'win32' ? dest.replace(/\\/g, '/') : dest;
461
+ const tar = require('child_process').spawn('tar', [
462
+ 'xz', '--strip-components=1', '-C', tarDest
463
+ ], { stdio: ['pipe', 'inherit', 'pipe'] });
464
+
465
+ let stderr = '';
466
+ tar.stderr.on('data', (d) => { stderr += d; });
467
+
468
+ res.pipe(tar.stdin);
469
+
470
+ tar.on('close', (code) => {
471
+ if (code !== 0) {
472
+ reject(new Error(`tar extraction failed (code ${code}): ${stderr}`));
473
+ } else {
474
+ resolve();
475
+ }
476
+ });
477
+
478
+ tar.on('error', reject);
479
+ }).on('error', reject);
480
+ };
481
+
482
+ request(url);
483
+ });
484
+ }
485
+
486
+ /**
487
+ * Discover plugins from the external cache directory (~/.agentsys/plugins/).
488
+ * Falls back to PACKAGE_DIR/plugins/ if cache doesn't exist (bundled install).
489
+ *
490
+ * @param {string[]} [onlyPlugins] - If provided, only return these plugins
491
+ * @returns {string} The root directory to use for plugin discovery
492
+ */
493
+ function resolvePluginRoot(onlyPlugins) {
494
+ const cacheDir = getPluginCacheDir();
495
+ // If we have cached external plugins, use the cache dir
496
+ if (fs.existsSync(cacheDir)) {
497
+ const entries = fs.readdirSync(cacheDir).filter(e => {
498
+ const pluginJson = path.join(cacheDir, e, '.claude-plugin', 'plugin.json');
499
+ return fs.existsSync(pluginJson);
500
+ });
501
+ if (entries.length > 0) {
502
+ // Return a synthetic root where plugins/ is the cache dir
503
+ // We need to restructure: cache has ~/.agentsys/plugins/<name>/
504
+ // but discovery expects <root>/plugins/<name>/
505
+ // The cache dir IS the plugins dir, so root is its parent
506
+ return path.join(cacheDir, '..');
507
+ }
508
+ }
509
+ // Fallback to bundled
510
+ return PACKAGE_DIR;
511
+ }
512
+
513
+ /**
514
+ * Fetch all requested plugins (with dependency resolution) to the cache.
515
+ *
516
+ * @param {string[]} pluginNames - Plugins to fetch (empty = all)
517
+ * @param {Object} marketplace - Parsed marketplace.json
518
+ * @returns {Promise<string[]>} Names of fetched plugins
519
+ */
520
+ async function fetchExternalPlugins(pluginNames, marketplace) {
521
+ const pluginMap = {};
522
+ for (const p of marketplace.plugins) {
523
+ pluginMap[p.name] = p;
524
+ }
525
+
526
+ // Determine which plugins to fetch
527
+ let toFetch;
528
+ if (pluginNames.length > 0) {
529
+ toFetch = resolvePluginDeps(pluginNames, marketplace);
530
+ } else {
531
+ toFetch = marketplace.plugins.map(p => p.name);
532
+ }
533
+
534
+ console.log(`\nFetching ${toFetch.length} plugin(s): ${toFetch.join(', ')}\n`);
535
+
536
+ const fetched = [];
537
+ const failed = [];
538
+ for (const name of toFetch) {
539
+ const plugin = pluginMap[name];
540
+ if (!plugin) continue;
541
+
542
+ const source = resolvePluginSource(plugin.source);
543
+
544
+ // Local/bundled plugin, no external fetch needed
545
+ if (!source || source.type === 'local') {
546
+ // Bundled plugin, no fetch needed
547
+ fetched.push(name);
548
+ continue;
549
+ }
550
+
551
+ try {
552
+ await fetchPlugin(name, source.value, plugin.version);
553
+ fetched.push(name);
554
+ } catch (err) {
555
+ failed.push(name);
556
+ console.error(` [ERROR] Failed to fetch ${name}: ${err.message}`);
557
+ }
558
+ }
559
+
560
+ if (failed.length > 0) {
561
+ const missingDeps = failed.filter(f => toFetch.includes(f) && !pluginNames.includes(f));
562
+ if (missingDeps.length > 0) {
563
+ console.error(`\n [WARN] Missing dependencies: ${missingDeps.join(', ')}`);
564
+ console.error(` Some plugins may not work correctly without their dependencies.`);
565
+ }
566
+
567
+ throw new Error(`Failed to fetch ${failed.length} plugin(s): ${failed.join(', ')}`);
568
+ }
569
+
570
+ return fetched;
571
+ }
572
+
573
+ /**
574
+ * List installed plugins and their components.
575
+ * @param {string} [filter] - 'all', 'plugins', 'agents', 'skills', 'commands', 'hooks', or null (default: plugins summary)
576
+ */
577
+ function listInstalledPlugins(filter) {
578
+ const cacheDir = getPluginCacheDir();
579
+ const installed = loadInstalledJson();
580
+ const showAll = filter === 'all' || filter === '--all';
581
+ const showPlugins = !filter || filter === 'plugins' || filter === '--plugins' || showAll;
582
+ const showAgents = filter === 'agents' || filter === '--agents' || showAll;
583
+ const showSkills = filter === 'skills' || filter === '--skills' || showAll;
584
+ const showCommands = filter === 'commands' || filter === '--commands' || showAll;
585
+ const showHooks = filter === 'hooks' || filter === '--hooks' || showAll;
586
+
587
+ console.log(`\nagentsys v${VERSION}\n`);
588
+
589
+ // Gather all cached plugins
590
+ const plugins = [];
591
+ if (fs.existsSync(cacheDir)) {
592
+ const entries = fs.readdirSync(cacheDir).filter(e => {
593
+ return fs.statSync(path.join(cacheDir, e)).isDirectory();
594
+ }).sort();
595
+ for (const name of entries) {
596
+ const pluginDir = path.join(cacheDir, name);
597
+ const versionFile = path.join(pluginDir, '.version');
598
+ const ver = fs.existsSync(versionFile) ? fs.readFileSync(versionFile, 'utf8').trim() : 'unknown';
599
+ const components = loadComponents(pluginDir);
600
+ const entry = installed.plugins[name] || {};
601
+ const hooksFile = path.join(pluginDir, 'hooks', 'hooks.json');
602
+ const hasHooks = fs.existsSync(hooksFile);
603
+ plugins.push({ name, version: ver, components, entry, hasHooks, dir: pluginDir });
604
+ }
605
+ }
606
+
607
+ if (plugins.length === 0) {
608
+ console.log('No plugins installed. Run: agentsys install <plugin>\n');
609
+ return;
610
+ }
611
+
612
+ if (showPlugins && !showAll) {
613
+ // Default view: plugin summary
614
+ console.log('PLUGINS');
615
+ for (const p of plugins) {
616
+ const scope = p.entry.scope || 'full';
617
+ const scopeTag = scope === 'partial' ? '[partial]' : '[full]';
618
+ const platforms = p.entry.platforms ? p.entry.platforms.join(', ') : '';
619
+ const counts = [];
620
+ if (p.components.agents.length) counts.push(`${p.components.agents.length} agents`);
621
+ if (p.components.skills.length) counts.push(`${p.components.skills.length} skills`);
622
+ if (p.components.commands.length) counts.push(`${p.components.commands.length} cmds`);
623
+ if (p.hasHooks) counts.push('hooks');
624
+ console.log(` ${p.name.padEnd(18)} ${p.version.padEnd(10)} ${scopeTag.padEnd(10)} ${counts.join(', ')} ${platforms}`);
625
+ }
626
+ console.log();
627
+ console.log(` ${plugins.length} plugins. Use --all, --agents, --skills, --commands, --hooks for details.`);
628
+ console.log();
629
+ return;
630
+ }
631
+
632
+ if (showAll || showPlugins) {
633
+ console.log('PLUGINS');
634
+ for (const p of plugins) {
635
+ const scope = p.entry.scope || 'full';
636
+ const scopeTag = scope === 'partial' ? '[partial]' : '[full]';
637
+ console.log(` ${p.name}@${p.version} ${scopeTag}`);
638
+ }
639
+ console.log();
640
+ }
641
+
642
+ if (showAgents) {
643
+ console.log('AGENTS');
644
+ let total = 0;
645
+ for (const p of plugins) {
646
+ for (const a of p.components.agents) {
647
+ console.log(` ${p.name}:${a.name.padEnd(28)} ${(a.model || '').padEnd(8)} ${a.description || ''}`);
648
+ total++;
649
+ }
650
+ }
651
+ if (total === 0) console.log(' (none)');
652
+ console.log();
653
+ }
654
+
655
+ if (showSkills) {
656
+ console.log('SKILLS');
657
+ let total = 0;
658
+ for (const p of plugins) {
659
+ for (const s of p.components.skills) {
660
+ console.log(` ${p.name}:${s.name.padEnd(28)} ${s.description || ''}`);
661
+ total++;
662
+ }
663
+ }
664
+ if (total === 0) console.log(' (none)');
665
+ console.log();
666
+ }
667
+
668
+ if (showCommands) {
669
+ console.log('COMMANDS');
670
+ let total = 0;
671
+ for (const p of plugins) {
672
+ for (const c of p.components.commands) {
673
+ console.log(` /${c.name.padEnd(29)} ${c.description || ''}`);
674
+ total++;
675
+ }
676
+ }
677
+ if (total === 0) console.log(' (none)');
678
+ console.log();
679
+ }
680
+
681
+ if (showHooks) {
682
+ console.log('HOOKS');
683
+ let total = 0;
684
+ for (const p of plugins) {
685
+ if (p.hasHooks) {
686
+ try {
687
+ const hooks = JSON.parse(fs.readFileSync(path.join(p.dir, 'hooks', 'hooks.json'), 'utf8'));
688
+ const hookList = Array.isArray(hooks) ? hooks : (hooks.hooks || []);
689
+ for (const h of hookList) {
690
+ const event = h.event || h.matcher || 'unknown';
691
+ console.log(` ${p.name}:${String(event).padEnd(28)} ${h.description || ''}`);
692
+ total++;
693
+ }
694
+ } catch { /* skip malformed hooks */ }
695
+ }
696
+ }
697
+ if (total === 0) console.log(' (none)');
698
+ console.log();
699
+ }
700
+ }
701
+
702
+ /**
703
+ * Re-fetch all installed external plugins (update to latest versions).
704
+ */
705
+ async function updatePlugins() {
706
+ console.log(`\nagentsys v${VERSION} - Updating plugins\n`);
707
+
708
+ const marketplace = loadMarketplace();
709
+ const cacheDir = getPluginCacheDir();
710
+
711
+ if (!fs.existsSync(cacheDir)) {
712
+ console.log('No cached plugins found. Run agentsys to install first.');
713
+ return;
714
+ }
715
+
716
+ // Get currently installed external plugins
717
+ const installed = fs.readdirSync(cacheDir).filter(e => {
718
+ return fs.statSync(path.join(cacheDir, e)).isDirectory();
719
+ });
720
+
721
+ if (installed.length === 0) {
722
+ console.log('No external plugins installed.');
723
+ return;
724
+ }
725
+
726
+ // Force re-fetch by removing version files
727
+ for (const name of installed) {
728
+ const versionFile = path.join(cacheDir, name, '.version');
729
+ if (fs.existsSync(versionFile)) {
730
+ fs.unlinkSync(versionFile);
731
+ }
732
+ }
733
+
734
+ await fetchExternalPlugins(installed, marketplace);
735
+ console.log('\n[OK] Plugins updated.');
736
+ }
737
+
738
+ // --- installed.json manifest ---
739
+
740
+ function getInstalledJsonPath() {
741
+ const home = process.env.HOME || process.env.USERPROFILE;
742
+ return path.join(home, '.agentsys', 'installed.json');
743
+ }
744
+
745
+ function loadInstalledJson() {
746
+ const p = getInstalledJsonPath();
747
+ if (fs.existsSync(p)) {
748
+ try {
749
+ return JSON.parse(fs.readFileSync(p, 'utf8'));
750
+ } catch {
751
+ return { plugins: {} };
752
+ }
753
+ }
754
+ return { plugins: {} };
755
+ }
756
+
757
+ function saveInstalledJson(data) {
758
+ const p = getInstalledJsonPath();
759
+ fs.mkdirSync(path.dirname(p), { recursive: true });
760
+ fs.writeFileSync(p, JSON.stringify(data, null, 2) + '\n');
761
+ }
762
+
763
+ function recordInstall(name, version, platforms, granular) {
764
+ const data = loadInstalledJson();
765
+ const entry = {
766
+ version,
767
+ installedAt: new Date().toISOString(),
768
+ platforms,
769
+ scope: 'full'
770
+ };
771
+ if (granular && granular.scope === 'partial') {
772
+ entry.scope = 'partial';
773
+ entry.agents = granular.agents || [];
774
+ entry.skills = granular.skills || [];
775
+ entry.commands = granular.commands || [];
776
+ }
777
+ data.plugins[name] = entry;
778
+ saveInstalledJson(data);
779
+ }
780
+
781
+ function recordRemove(name) {
782
+ const data = loadInstalledJson();
783
+ delete data.plugins[name];
784
+ saveInstalledJson(data);
785
+ }
786
+
787
+ // --- Core version compatibility check ---
788
+
789
+ /**
790
+ * Simple semver range check. Supports ">=X.Y.Z" format.
791
+ * Returns true if ver satisfies the range.
792
+ */
793
+ function satisfiesRange(ver, range) {
794
+ if (!range) return true;
795
+ const parseVer = (s) => {
796
+ const m = s.match(/^(\d+)\.(\d+)\.(\d+)/);
797
+ return m ? [parseInt(m[1]), parseInt(m[2]), parseInt(m[3])] : null;
798
+ };
799
+
800
+ const greaterEq = range.match(/^>=(.+)$/);
801
+ if (greaterEq) {
802
+ const required = parseVer(greaterEq[1]);
803
+ const actual = parseVer(ver);
804
+ if (!required || !actual) return true;
805
+ for (let i = 0; i < 3; i++) {
806
+ if (actual[i] > required[i]) return true;
807
+ if (actual[i] < required[i]) return false;
808
+ }
809
+ return true; // equal
810
+ }
811
+ return true; // unknown range format, don't block
812
+ }
813
+
814
+ function checkCoreCompat(pluginEntry) {
815
+ // Core version compat check removed - field deprecated in schema
816
+ }
817
+
818
+ // --- Granular install helpers ---
819
+
820
+ /**
821
+ * Parse "plugin:component" install target format.
822
+ * @param {string} arg - e.g. "next-task:ci-fixer" or "next-task" or "next-task@1.0.0"
823
+ * @returns {{ plugin: string, component: string|null, version: string|null }}
824
+ */
825
+ function parseInstallTarget(arg) {
826
+ if (!arg || typeof arg !== 'string') {
827
+ return { plugin: null, component: null, version: null };
828
+ }
829
+
830
+ let plugin = arg;
831
+ let component = null;
832
+ let version = null;
833
+
834
+ // Check for colon (component separator) before @ (version separator)
835
+ const colonIdx = plugin.indexOf(':');
836
+ if (colonIdx > 0) {
837
+ component = plugin.slice(colonIdx + 1) || null;
838
+ plugin = plugin.slice(0, colonIdx);
839
+ }
840
+
841
+ // Check for @version on the plugin part
842
+ const atIdx = plugin.indexOf('@');
843
+ if (atIdx > 0) {
844
+ version = plugin.slice(atIdx + 1) || null;
845
+ plugin = plugin.slice(0, atIdx);
846
+ }
847
+
848
+ return { plugin: plugin || null, component, version };
849
+ }
850
+
851
+ /**
852
+ * Load components.json from a cached plugin directory.
853
+ * @param {string} pluginDir - Path to the cached plugin directory
854
+ * @returns {{ agents: Array, skills: Array, commands: Array }}
855
+ */
856
+ function loadComponents(pluginDir) {
857
+ const componentsPath = path.join(pluginDir, 'components.json');
858
+ if (fs.existsSync(componentsPath)) {
859
+ try {
860
+ const data = JSON.parse(fs.readFileSync(componentsPath, 'utf8'));
861
+ const normalize = (arr) => (arr || []).map(item =>
862
+ typeof item === 'string' ? { name: item } : item
863
+ );
864
+ return {
865
+ agents: normalize(data.agents),
866
+ skills: normalize(data.skills),
867
+ commands: normalize(data.commands)
868
+ };
869
+ } catch {
870
+ // Fall through to filesystem scan
871
+ }
872
+ }
873
+
874
+ // Fallback: scan filesystem
875
+ const components = { agents: [], skills: [], commands: [] };
876
+
877
+ const agentsDir = path.join(pluginDir, 'agents');
878
+ if (fs.existsSync(agentsDir)) {
879
+ const files = fs.readdirSync(agentsDir).filter(f => f.endsWith('.md'));
880
+ for (const f of files) {
881
+ components.agents.push({ name: f.replace(/\.md$/, ''), file: `agents/${f}` });
882
+ }
883
+ }
884
+
885
+ const skillsDir = path.join(pluginDir, 'skills');
886
+ if (fs.existsSync(skillsDir)) {
887
+ const dirs = fs.readdirSync(skillsDir, { withFileTypes: true }).filter(d => d.isDirectory());
888
+ for (const d of dirs) {
889
+ if (fs.existsSync(path.join(skillsDir, d.name, 'SKILL.md'))) {
890
+ components.skills.push({ name: d.name, dir: `skills/${d.name}` });
891
+ }
892
+ }
893
+ }
894
+
895
+ const commandsDir = path.join(pluginDir, 'commands');
896
+ if (fs.existsSync(commandsDir)) {
897
+ const files = fs.readdirSync(commandsDir).filter(f => f.endsWith('.md'));
898
+ for (const f of files) {
899
+ components.commands.push({ name: f.replace(/\.md$/, ''), file: `commands/${f}` });
900
+ }
901
+ }
902
+
903
+ return components;
904
+ }
905
+
906
+ /**
907
+ * Resolve which type a component belongs to.
908
+ * @param {{ agents: Array, skills: Array, commands: Array }} components
909
+ * @param {string} name - Component name to find
910
+ * @returns {{ type: string, name: string, file?: string, dir?: string }|null}
911
+ */
912
+ function resolveComponent(components, name) {
913
+ if (!name || !components) return null;
914
+
915
+ for (const agent of components.agents) {
916
+ if (agent.name === name) return { type: 'agent', name: agent.name, file: agent.file };
917
+ }
918
+ for (const skill of components.skills) {
919
+ if (skill.name === name) return { type: 'skill', name: skill.name, dir: skill.dir };
920
+ }
921
+ for (const cmd of components.commands) {
922
+ if (cmd.name === name) return { type: 'command', name: cmd.name, file: cmd.file };
923
+ }
924
+ return null;
925
+ }
926
+
927
+ /**
928
+ * Build a filter object from a resolved component.
929
+ * @param {{ type: string, name: string }} resolved
930
+ * @returns {{ agents: string[], skills: string[], commands: string[] }}
931
+ */
932
+ function buildFilterFromComponent(resolved) {
933
+ const filter = { agents: [], skills: [], commands: [] };
934
+ if (resolved.type === 'agent') filter.agents.push(resolved.name);
935
+ else if (resolved.type === 'skill') filter.skills.push(resolved.name);
936
+ else if (resolved.type === 'command') filter.commands.push(resolved.name);
937
+ return filter;
938
+ }
939
+
940
+ // --- Detect which platforms are installed ---
941
+
942
+ function detectInstalledPlatforms() {
943
+ const home = process.env.HOME || process.env.USERPROFILE;
944
+ const platforms = [];
945
+ if (fs.existsSync(path.join(home, '.claude'))) platforms.push('claude');
946
+ const opencodeDir = getOpenCodeConfigDir();
947
+ if (fs.existsSync(opencodeDir)) platforms.push('opencode');
948
+ if (fs.existsSync(path.join(home, '.codex'))) platforms.push('codex');
949
+ // Cursor rules are project-scoped; detect only if Cursor rules/commands/skills exist in CWD
950
+ const cursorDir = path.join(process.cwd(), '.cursor');
951
+ if (fs.existsSync(path.join(cursorDir, 'rules')) || fs.existsSync(path.join(cursorDir, 'commands')) || fs.existsSync(path.join(cursorDir, 'skills'))) platforms.push('cursor');
952
+ return platforms;
953
+ }
954
+
955
+ // --- install subcommand ---
956
+
957
+ async function installPlugin(nameWithVersion, args) {
958
+ // Parse plugin:component and name[@version]
959
+ const target = parseInstallTarget(nameWithVersion);
960
+ let name = target.plugin;
961
+ let requestedVersion = target.version;
962
+ const componentName = target.component;
963
+
964
+ // Legacy fallback: handle plain name@version (parseInstallTarget already handles this)
965
+ if (!name) {
966
+ console.error('[ERROR] Usage: agentsys install <plugin[:component][@version]>');
967
+ process.exit(1);
968
+ }
969
+
970
+ const marketplace = loadMarketplace();
971
+ const pluginMap = {};
972
+ for (const p of marketplace.plugins) {
973
+ pluginMap[p.name] = p;
974
+ }
975
+
976
+ if (!pluginMap[name]) {
977
+ console.error(`[ERROR] Unknown plugin: ${name}`);
978
+ console.error(`Available: ${marketplace.plugins.map(p => p.name).join(', ')}`);
979
+ process.exit(1);
980
+ }
981
+
982
+ const plugin = pluginMap[name];
983
+ checkCoreCompat(plugin);
984
+
985
+ // Resolve deps
986
+ const toFetch = resolvePluginDeps([name], marketplace);
987
+ console.log(`\nInstalling ${name} (+ deps: ${toFetch.filter(n => n !== name).join(', ') || 'none'})\n`);
988
+
989
+ // Fetch all
990
+ for (const depName of toFetch) {
991
+ const dep = pluginMap[depName];
992
+ if (!dep) continue;
993
+
994
+ const source = resolvePluginSource(dep.source);
995
+ if (!source || source.type === 'local') continue;
996
+
997
+ checkCoreCompat(dep);
998
+ const ver = depName === name && requestedVersion ? requestedVersion : dep.version;
999
+ try {
1000
+ await fetchPlugin(depName, source.value, ver);
1001
+ } catch (err) {
1002
+ console.error(` [ERROR] Failed to fetch ${depName}: ${err.message}`);
1003
+ }
1004
+ }
1005
+
1006
+ // Determine platforms
1007
+ let platforms;
1008
+ if (args.tool) {
1009
+ platforms = [args.tool];
1010
+ } else if (args.tools.length > 0) {
1011
+ platforms = args.tools;
1012
+ } else {
1013
+ platforms = detectInstalledPlatforms();
1014
+ if (platforms.length === 0) platforms = ['claude']; // default
1015
+ }
1016
+
1017
+ console.log(`Installing for platforms: ${platforms.join(', ')}`);
1018
+
1019
+ // Resolve component filter if a specific component was requested
1020
+ let filter = null;
1021
+ if (componentName) {
1022
+ const cacheDir = getPluginCacheDir();
1023
+ const pluginDir = path.join(cacheDir, name);
1024
+ if (!fs.existsSync(pluginDir)) {
1025
+ console.error(`[ERROR] Plugin ${name} not found in cache after fetch.`);
1026
+ process.exit(1);
1027
+ }
1028
+ const components = loadComponents(pluginDir);
1029
+ const resolved = resolveComponent(components, componentName);
1030
+ if (!resolved) {
1031
+ const allNames = [
1032
+ ...components.agents.map(a => a.name),
1033
+ ...components.skills.map(s => s.name),
1034
+ ...components.commands.map(c => c.name)
1035
+ ];
1036
+ console.error(`[ERROR] Component "${componentName}" not found in plugin ${name}.`);
1037
+ if (allNames.length > 0) {
1038
+ console.error(`Available components: ${allNames.join(', ')}`);
1039
+ }
1040
+ process.exit(1);
1041
+ }
1042
+ filter = buildFilterFromComponent(resolved);
1043
+ console.log(` Installing ${resolved.type}: ${resolved.name}`);
1044
+ }
1045
+
1046
+ // Use cache as install source
1047
+ const installDir = getInstallDir();
1048
+ const needsLocal = platforms.includes('opencode') || platforms.includes('codex') || platforms.includes('cursor');
1049
+ if (needsLocal && !fs.existsSync(path.join(installDir, 'lib'))) {
1050
+ // Need local install for transforms
1051
+ cleanOldInstallation(installDir);
1052
+ copyFromPackage(installDir);
1053
+ }
1054
+
1055
+ for (const platform of platforms) {
1056
+ if (platform === 'claude') {
1057
+ if (filter) {
1058
+ console.log(' [NOTE] Claude Code installs whole plugins (granular not supported). Installing full plugin.');
1059
+ }
1060
+ // Claude uses marketplace install
1061
+ if (commandExists('claude')) {
1062
+ try { execSync('claude plugin marketplace add agent-sh/agentsys', { stdio: 'pipe' }); } catch {}
1063
+ for (const depName of toFetch) {
1064
+ if (!/^[a-z0-9][a-z0-9-]*$/.test(depName)) continue;
1065
+ try {
1066
+ execSync(`claude plugin install ${depName}@agentsys`, { stdio: 'pipe' });
1067
+ } catch {
1068
+ try { execSync(`claude plugin update ${depName}@agentsys`, { stdio: 'pipe' }); } catch {}
1069
+ }
1070
+ }
1071
+ }
1072
+ }
1073
+ // OpenCode and Codex get handled through normal install flow with cached plugins
1074
+ }
1075
+
1076
+ if (platforms.includes('opencode') && installDir) {
1077
+ installForOpenCode(installDir, { stripModels: args.stripModels, filter });
1078
+ }
1079
+ if (platforms.includes('codex') && installDir) {
1080
+ installForCodex(installDir, { filter });
1081
+ }
1082
+ if (platforms.includes('cursor') && installDir) {
1083
+ installForCursor(installDir, { filter });
1084
+ }
1085
+
1086
+ // Record in installed.json
1087
+ for (const depName of toFetch) {
1088
+ const dep = pluginMap[depName];
1089
+ const ver = depName === name && requestedVersion ? requestedVersion : (dep ? dep.version : 'unknown');
1090
+ if (depName === name && filter) {
1091
+ recordInstall(depName, ver, platforms, {
1092
+ scope: 'partial',
1093
+ agents: filter.agents,
1094
+ skills: filter.skills,
1095
+ commands: filter.commands
1096
+ });
1097
+ } else {
1098
+ recordInstall(depName, ver, platforms);
1099
+ }
1100
+ }
1101
+
1102
+ console.log(`\n[OK] Installed ${name} successfully.`);
1103
+ }
1104
+
1105
+ // --- remove subcommand ---
1106
+
1107
+ function removePlugin(name) {
1108
+ const installed = loadInstalledJson();
1109
+
1110
+ if (!installed.plugins[name]) {
1111
+ console.error(`[ERROR] Plugin ${name} is not installed.`);
1112
+ process.exit(1);
1113
+ }
1114
+
1115
+ const platforms = installed.plugins[name].platforms || [];
1116
+
1117
+ // Remove from cache
1118
+ const cacheDir = getPluginCacheDir();
1119
+ const pluginCacheDir = path.join(cacheDir, name);
1120
+ if (fs.existsSync(pluginCacheDir)) {
1121
+ fs.rmSync(pluginCacheDir, { recursive: true, force: true });
1122
+ console.log(` Removed from cache: ${name}`);
1123
+ }
1124
+
1125
+ // Remove from platforms
1126
+ if (platforms.includes('claude') && commandExists('claude')) {
1127
+ try {
1128
+ execSync(`claude plugin uninstall ${name}@agentsys`, { stdio: 'pipe' });
1129
+ console.log(` Removed from Claude Code: ${name}`);
1130
+ } catch {}
1131
+ }
1132
+
1133
+ if (platforms.includes('opencode')) {
1134
+ const opencodeDir = getOpenCodeConfigDir();
1135
+ console.log(` [NOTE] OpenCode files may need manual cleanup in ${opencodeDir}`);
1136
+ }
1137
+
1138
+ if (platforms.includes('codex')) {
1139
+ const home = process.env.HOME || process.env.USERPROFILE;
1140
+ const skillsDir = path.join(home, '.codex', 'skills');
1141
+ console.log(` [NOTE] Codex skill files may need manual cleanup in ${skillsDir}`);
1142
+ }
1143
+
1144
+ // Update installed.json
1145
+ recordRemove(name);
1146
+ console.log(`\n[OK] Removed ${name}.`);
1147
+ }
1148
+
1149
+ // --- search subcommand ---
1150
+
1151
+ function searchPlugins(term) {
1152
+ const marketplace = loadMarketplace();
1153
+
1154
+ // Handle "plugin:" prefix to list components of a specific plugin
1155
+ if (term && term.endsWith(':')) {
1156
+ const pluginName = term.slice(0, -1);
1157
+ const cacheDir = getPluginCacheDir();
1158
+ const pluginDir = path.join(cacheDir, pluginName);
1159
+ if (!fs.existsSync(pluginDir)) {
1160
+ console.log(`Plugin "${pluginName}" is not cached. Install it first: agentsys install ${pluginName}`);
1161
+ return;
1162
+ }
1163
+ const components = loadComponents(pluginDir);
1164
+ console.log(`\nComponents of ${pluginName}:\n`);
1165
+ if (components.agents.length > 0) {
1166
+ console.log(' Agents:');
1167
+ for (const a of components.agents) {
1168
+ const desc = a.description ? ` - ${a.description}` : '';
1169
+ console.log(` ${a.name}${desc}`);
1170
+ }
1171
+ }
1172
+ if (components.skills.length > 0) {
1173
+ console.log(' Skills:');
1174
+ for (const s of components.skills) {
1175
+ const desc = s.description ? ` - ${s.description}` : '';
1176
+ console.log(` ${s.name}${desc}`);
1177
+ }
1178
+ }
1179
+ if (components.commands.length > 0) {
1180
+ console.log(' Commands:');
1181
+ for (const c of components.commands) {
1182
+ const desc = c.description ? ` - ${c.description}` : '';
1183
+ console.log(` ${c.name}${desc}`);
1184
+ }
1185
+ }
1186
+ const total = components.agents.length + components.skills.length + components.commands.length;
1187
+ console.log(`\n${total} component(s) found.`);
1188
+ return;
1189
+ }
1190
+
1191
+ let plugins = marketplace.plugins;
1192
+
1193
+ if (term) {
1194
+ const lower = term.toLowerCase();
1195
+ plugins = plugins.filter(p =>
1196
+ p.name.toLowerCase().includes(lower) ||
1197
+ (p.description && p.description.toLowerCase().includes(lower))
1198
+ );
1199
+ }
1200
+
1201
+ if (plugins.length === 0) {
1202
+ console.log(`No plugins found${term ? ` matching "${term}"` : ''}.`);
1203
+ return;
1204
+ }
1205
+
1206
+ // Print table
1207
+ const nameWidth = Math.max(14, ...plugins.map(p => p.name.length)) + 2;
1208
+ const verWidth = 10;
1209
+ console.log(`\n${'NAME'.padEnd(nameWidth)}${'VERSION'.padEnd(verWidth)}DESCRIPTION`);
1210
+ console.log(`${'─'.repeat(nameWidth)}${'─'.repeat(verWidth)}${'─'.repeat(40)}`);
1211
+ for (const p of plugins) {
1212
+ const desc = p.description ? (p.description.length > 60 ? p.description.slice(0, 57) + '...' : p.description) : '';
1213
+ console.log(`${p.name.padEnd(nameWidth)}${(p.version || '').padEnd(verWidth)}${desc}`);
1214
+ }
1215
+ console.log(`\n${plugins.length} plugin(s) found.`);
1216
+ }
1217
+
194
1218
  function installForClaude() {
195
1219
  console.log('\n[INSTALL] Installing for Claude Code...\n');
196
1220
 
@@ -198,7 +1222,7 @@ function installForClaude() {
198
1222
  console.log('[WARN] Claude Code CLI not detected.');
199
1223
  console.log(' Install it first: https://claude.ai/code\n');
200
1224
  console.log(' Then run in Claude Code:');
201
- console.log(' /plugin marketplace add avifenesh/agentsys');
1225
+ console.log(' /plugin marketplace add agent-sh/agentsys');
202
1226
  console.log(' /plugin install next-task@agentsys\n');
203
1227
  return false;
204
1228
  }
@@ -207,7 +1231,7 @@ function installForClaude() {
207
1231
  // Add GitHub marketplace
208
1232
  console.log('Adding marketplace...');
209
1233
  try {
210
- execSync('claude plugin marketplace add avifenesh/agentsys', { stdio: 'pipe' });
1234
+ execSync('claude plugin marketplace add agent-sh/agentsys', { stdio: 'pipe' });
211
1235
  } catch {
212
1236
  // May already exist
213
1237
  }
@@ -249,7 +1273,7 @@ function installForClaude() {
249
1273
  return true;
250
1274
  } catch (err) {
251
1275
  console.log('[ERROR] Auto-install failed. Manual installation:');
252
- console.log(' /plugin marketplace add avifenesh/agentsys');
1276
+ console.log(' /plugin marketplace add agent-sh/agentsys');
253
1277
  console.log(' /plugin install next-task@agentsys');
254
1278
  return false;
255
1279
  }
@@ -270,7 +1294,7 @@ function installForClaudeDevelopment() {
270
1294
  // Remove marketplace plugins first
271
1295
  console.log('Removing marketplace plugins...');
272
1296
  try {
273
- execSync('claude plugin marketplace remove avifenesh/agentsys', { stdio: 'pipe' });
1297
+ execSync('claude plugin marketplace remove agent-sh/agentsys', { stdio: 'pipe' });
274
1298
  console.log(' [OK] Removed marketplace');
275
1299
  } catch {
276
1300
  // May not exist
@@ -328,7 +1352,7 @@ function installForClaudeDevelopment() {
328
1352
 
329
1353
  function installForOpenCode(installDir, options = {}) {
330
1354
  console.log('\n[INSTALL] Installing for OpenCode...\n');
331
- const { stripModels = true } = options;
1355
+ const { stripModels = true, filter = null } = options;
332
1356
 
333
1357
  if (stripModels) {
334
1358
  console.log(' [INFO] Model specifications stripped (default). Use --no-strip to include.');
@@ -389,6 +1413,11 @@ function installForOpenCode(installDir, options = {}) {
389
1413
 
390
1414
  // Transform and copy command files
391
1415
  for (const [target, plugin, source] of commandMappings) {
1416
+ // Apply filter: skip commands not in the filter list
1417
+ if (filter && filter.commands.length > 0) {
1418
+ const cmdName = target.replace(/\.md$/, '');
1419
+ if (!filter.commands.includes(cmdName)) continue;
1420
+ }
392
1421
  const srcPath = path.join(installDir, 'plugins', plugin, 'commands', source);
393
1422
  const destPath = path.join(commandsDir, target);
394
1423
  if (fs.existsSync(srcPath)) {
@@ -420,6 +1449,11 @@ function installForOpenCode(installDir, options = {}) {
420
1449
  if (fs.existsSync(srcAgentsDir)) {
421
1450
  const agentFiles = fs.readdirSync(srcAgentsDir).filter(f => f.endsWith('.md'));
422
1451
  for (const agentFile of agentFiles) {
1452
+ // Apply filter: skip agents not in the filter list
1453
+ if (filter && filter.agents.length > 0) {
1454
+ const agentName = agentFile.replace(/\.md$/, '');
1455
+ if (!filter.agents.includes(agentName)) continue;
1456
+ }
423
1457
  const srcPath = path.join(srcAgentsDir, agentFile);
424
1458
  const destPath = path.join(agentsDir, agentFile);
425
1459
  let content = fs.readFileSync(srcPath, 'utf8');
@@ -457,6 +1491,10 @@ function installForOpenCode(installDir, options = {}) {
457
1491
  .filter(d => d.isDirectory());
458
1492
  for (const skillDir of skillDirs) {
459
1493
  const skillName = skillDir.name;
1494
+ // Apply filter: skip skills not in the filter list
1495
+ if (filter && filter.skills.length > 0) {
1496
+ if (!filter.skills.includes(skillName)) continue;
1497
+ }
460
1498
  const srcSkillPath = path.join(srcSkillsDir, skillName, 'SKILL.md');
461
1499
  if (fs.existsSync(srcSkillPath)) {
462
1500
  const destSkillDir = path.join(skillsDestDir, skillName);
@@ -480,8 +1518,9 @@ function installForOpenCode(installDir, options = {}) {
480
1518
  return true;
481
1519
  }
482
1520
 
483
- function installForCodex(installDir) {
1521
+ function installForCodex(installDir, options = {}) {
484
1522
  console.log('\n[INSTALL] Installing for Codex CLI...\n');
1523
+ const { filter = null } = options;
485
1524
 
486
1525
  const home = process.env.HOME || process.env.USERPROFILE;
487
1526
  const configDir = path.join(home, '.codex');
@@ -519,6 +1558,10 @@ function installForCodex(installDir) {
519
1558
  const skillMappings = discovery.getCodexSkillMappings(installDir);
520
1559
 
521
1560
  for (const [skillName, plugin, sourceFile, description] of skillMappings) {
1561
+ // Apply filter: skip commands/skills not in the filter list
1562
+ if (filter && filter.commands.length > 0) {
1563
+ if (!filter.commands.includes(skillName)) continue;
1564
+ }
522
1565
  if (!description) {
523
1566
  console.log(` [WARN] Skipping skill ${skillName}: missing description`);
524
1567
  continue;
@@ -555,6 +1598,101 @@ function installForCodex(installDir) {
555
1598
  return true;
556
1599
  }
557
1600
 
1601
+ function installForCursor(installDir, options = {}) {
1602
+ console.log('\n[INSTALL] Installing for Cursor...\n');
1603
+ const { filter = null } = options;
1604
+ const cwd = process.cwd();
1605
+
1606
+ // Create target directories (all project-scoped)
1607
+ const skillsDir = path.join(cwd, '.cursor', 'skills');
1608
+ const commandsDir = path.join(cwd, '.cursor', 'commands');
1609
+ const rulesDir = path.join(cwd, '.cursor', 'rules');
1610
+ fs.mkdirSync(skillsDir, { recursive: true });
1611
+ fs.mkdirSync(commandsDir, { recursive: true });
1612
+ fs.mkdirSync(rulesDir, { recursive: true });
1613
+
1614
+ // Cleanup old agentsys files from rules dir
1615
+ for (const f of fs.readdirSync(rulesDir).filter(f => f.startsWith('agentsys-') && f.endsWith('.mdc'))) {
1616
+ fs.unlinkSync(path.join(rulesDir, f));
1617
+ }
1618
+
1619
+ // Cleanup old agentsys files from commands dir (only those matching known commands)
1620
+ const commandMappingsForCleanup = discovery.getCommandMappings(installDir);
1621
+ const knownCommandFiles = new Set(commandMappingsForCleanup.map(([target]) => target));
1622
+ for (const f of fs.readdirSync(commandsDir).filter(f => f.endsWith('.md'))) {
1623
+ if (knownCommandFiles.has(f)) {
1624
+ fs.unlinkSync(path.join(commandsDir, f));
1625
+ }
1626
+ }
1627
+
1628
+ // Collect known skill names from discovery before cleanup
1629
+ const pluginDirs = discovery.discoverPlugins(installDir);
1630
+ const knownSkillNames = new Set();
1631
+ for (const pluginName of pluginDirs) {
1632
+ const srcSkillsDir = path.join(installDir, 'plugins', pluginName, 'skills');
1633
+ if (!fs.existsSync(srcSkillsDir)) continue;
1634
+ for (const d of fs.readdirSync(srcSkillsDir, { withFileTypes: true })) {
1635
+ if (d.isDirectory() && /^[a-zA-Z0-9_-]+$/.test(d.name)) knownSkillNames.add(d.name);
1636
+ }
1637
+ }
1638
+
1639
+ // Cleanup old agentsys skill dirs (only known names, preserve user-created skills)
1640
+ for (const entry of fs.readdirSync(skillsDir, { withFileTypes: true })) {
1641
+ if (entry.isDirectory() && knownSkillNames.has(entry.name)) {
1642
+ fs.rmSync(path.join(skillsDir, entry.name), { recursive: true, force: true });
1643
+ }
1644
+ }
1645
+
1646
+ // Install skills
1647
+ let skillCount = 0;
1648
+ for (const pluginName of pluginDirs) {
1649
+ const srcSkillsDir = path.join(installDir, 'plugins', pluginName, 'skills');
1650
+ if (!fs.existsSync(srcSkillsDir)) continue;
1651
+ const entries = fs.readdirSync(srcSkillsDir, { withFileTypes: true }).filter(d => d.isDirectory());
1652
+ for (const entry of entries) {
1653
+ if (!/^[a-zA-Z0-9_-]+$/.test(entry.name)) continue;
1654
+ if (filter && filter.skills && filter.skills.length > 0 && !filter.skills.includes(entry.name)) continue;
1655
+ const srcPath = path.join(srcSkillsDir, entry.name, 'SKILL.md');
1656
+ if (!fs.existsSync(srcPath)) continue;
1657
+ const destDir = path.join(skillsDir, entry.name);
1658
+ fs.mkdirSync(destDir, { recursive: true });
1659
+ let content = fs.readFileSync(srcPath, 'utf8');
1660
+ content = transforms.transformSkillForCursor(content, {
1661
+ pluginInstallPath: path.join(installDir, 'plugins', pluginName)
1662
+ });
1663
+ fs.writeFileSync(path.join(destDir, 'SKILL.md'), content);
1664
+ skillCount++;
1665
+ }
1666
+ }
1667
+
1668
+ // Install commands
1669
+ const commandMappings = discovery.getCommandMappings(installDir);
1670
+ let cmdCount = 0;
1671
+ for (const [target, plugin, source] of commandMappings) {
1672
+ if (filter && filter.commands && filter.commands.length > 0) {
1673
+ const cmdName = target.replace(/\.md$/, '');
1674
+ if (!filter.commands.includes(cmdName)) continue;
1675
+ }
1676
+ const srcPath = path.join(installDir, 'plugins', plugin, 'commands', source);
1677
+ if (!fs.existsSync(srcPath)) {
1678
+ console.log(` [WARN] Source file not found: ${srcPath}`);
1679
+ continue;
1680
+ }
1681
+ let content = fs.readFileSync(srcPath, 'utf8');
1682
+ content = transforms.transformCommandForCursor(content, {
1683
+ pluginInstallPath: path.join(installDir, 'plugins', plugin)
1684
+ });
1685
+ fs.writeFileSync(path.join(commandsDir, target), content);
1686
+ cmdCount++;
1687
+ }
1688
+
1689
+ console.log(`\n[OK] Cursor installation complete!`);
1690
+ console.log(` Skills: ${skillCount} installed to ${skillsDir}`);
1691
+ console.log(` Commands: ${cmdCount} installed to ${commandsDir}`);
1692
+ console.log(' All content is project-scoped and auto-loaded by Cursor.\n');
1693
+ return true;
1694
+ }
1695
+
558
1696
  function removeInstallation() {
559
1697
  const installDir = getInstallDir();
560
1698
 
@@ -571,6 +1709,113 @@ function removeInstallation() {
571
1709
  console.log(' - Claude: /plugin marketplace remove agentsys');
572
1710
  console.log(' - OpenCode: Remove files under ~/.config/opencode/ (commands/*.md, agents/*.md, skills/*/SKILL.md) and ~/.config/opencode/plugins/agentsys.ts');
573
1711
  console.log(' - Codex: Remove ~/.codex/skills/*/');
1712
+ console.log(' - Cursor: Remove .cursor/skills/, .cursor/commands/, and .cursor/rules/agentsys-*.mdc from your project');
1713
+ }
1714
+
1715
+ function printSubcommandHelp(subcommand) {
1716
+ const helps = {
1717
+ install: `
1718
+ agentsys install — Install plugins and components
1719
+
1720
+ Usage:
1721
+ agentsys install <plugin> Install a full plugin (all agents, skills, commands)
1722
+ agentsys install <plugin>:<component> Install a single agent, skill, or command
1723
+ agentsys install <plugin>@<version> Install a specific version
1724
+
1725
+ Examples:
1726
+ agentsys install next-task Install next-task + dependencies (deslop, ship, sync-docs)
1727
+ agentsys install next-task:ci-fixer Install just the ci-fixer agent
1728
+ agentsys install deslop:deslop Install just the deslop skill
1729
+ agentsys install enhance:enhance-docs Install just the enhance-docs skill
1730
+ agentsys install perf@1.2.0 Install perf at version 1.2.0
1731
+
1732
+ Options:
1733
+ --tool <name> Install for a specific platform (claude, opencode, codex, cursor)
1734
+ --tools <list> Install for multiple platforms (comma-separated)
1735
+
1736
+ Notes:
1737
+ - Dependencies are resolved automatically (e.g., deslop requires next-task)
1738
+ - The full plugin is cached locally; granular install only affects what gets
1739
+ copied to platform directories (OpenCode, Codex)
1740
+ - Claude Code always installs whole plugins (platform limitation)
1741
+ - Use "agentsys search <plugin>:" to list available components
1742
+ `,
1743
+ list: `
1744
+ agentsys list — List installed plugins and components
1745
+
1746
+ Usage:
1747
+ agentsys list Plugin summary (name, version, scope, counts)
1748
+ agentsys list --all Show everything (plugins, agents, skills, commands, hooks)
1749
+ agentsys list --plugins Show plugins with version and scope
1750
+ agentsys list --agents Show all agents across all installed plugins
1751
+ agentsys list --skills Show all skills across all installed plugins
1752
+ agentsys list --commands Show all commands (slash commands)
1753
+ agentsys list --hooks Show all hooks
1754
+
1755
+ Output format:
1756
+ AGENTS
1757
+ plugin:agent-name model description
1758
+ SKILLS
1759
+ plugin:skill-name description
1760
+ COMMANDS
1761
+ /command-name description
1762
+ HOOKS
1763
+ plugin:event description
1764
+
1765
+ Scope tags:
1766
+ [full] All components of the plugin are installed
1767
+ [partial] Only selected components are installed
1768
+ `,
1769
+ search: `
1770
+ agentsys search — Search available plugins and components
1771
+
1772
+ Usage:
1773
+ agentsys search List all available plugins
1774
+ agentsys search <term> Filter plugins by name or description
1775
+ agentsys search <plugin>: List all components (agents, skills, commands) of a plugin
1776
+
1777
+ Examples:
1778
+ agentsys search Show all 13 plugins
1779
+ agentsys search perf Find plugins matching "perf"
1780
+ agentsys search next-task: Show next-task's 10 agents, 3 skills, 2 commands
1781
+ agentsys search :ci-fixer Search all plugins for "ci-fixer"
1782
+
1783
+ Output:
1784
+ NAME VERSION DESCRIPTION
1785
+ next-task 1.0.0 Master workflow orchestrator
1786
+ deslop 1.0.0 Clean AI slop from code
1787
+ `,
1788
+ remove: `
1789
+ agentsys remove — Remove an installed plugin
1790
+
1791
+ Usage:
1792
+ agentsys remove <plugin> Remove plugin from cache and platform directories
1793
+
1794
+ Notes:
1795
+ - Warns if another installed plugin depends on the one being removed
1796
+ - Claude Code: runs "claude plugin uninstall <plugin>@agentsys"
1797
+ - OpenCode/Codex: notes manual cleanup may be needed
1798
+ - Updates installed.json manifest
1799
+ `,
1800
+ update: `
1801
+ agentsys update — Update installed plugins to latest versions
1802
+
1803
+ Usage:
1804
+ agentsys update Re-fetch all installed plugins from GitHub
1805
+
1806
+ Notes:
1807
+ - Clears cached versions and re-downloads latest from each plugin's GitHub repo
1808
+ - Only updates plugins already in the cache (~/.agentsys/plugins/)
1809
+ - Does not change platform installations — run "agentsys" again to re-install
1810
+ `
1811
+ };
1812
+
1813
+ const text = helps[subcommand];
1814
+ if (text) {
1815
+ console.log(text);
1816
+ } else {
1817
+ console.log(`No help available for "${subcommand}". Run: agentsys --help`);
1818
+ }
574
1819
  }
575
1820
 
576
1821
  function printHelp() {
@@ -579,19 +1824,36 @@ agentsys v${VERSION} - Workflow automation for AI coding assistants
579
1824
 
580
1825
  Usage:
581
1826
  agentsys Interactive installer (select platforms)
582
- agentsys --tool <name> Install for single tool (claude, opencode, codex)
1827
+ agentsys --tool <name> Install for single tool (claude, opencode, codex, cursor)
583
1828
  agentsys --tools <list> Install for multiple tools (comma-separated)
1829
+ agentsys --only <plugins> Install only specified plugins (comma-separated, resolves deps)
584
1830
  agentsys --development Development mode: install to ~/.claude/plugins
585
1831
  agentsys --no-strip, -ns Include model specifications (stripped by default)
586
1832
  agentsys --remove Remove local installation
587
1833
  agentsys --version, -v Show version
588
1834
  agentsys --help, -h Show this help
1835
+ agentsys install <plugin> Install a specific plugin (resolves deps)
1836
+ agentsys install <p>:<comp> Install a single agent, skill, or command
1837
+ agentsys install <p>@<ver> Install a specific version
1838
+ agentsys remove <plugin> Remove an installed plugin
1839
+ agentsys search [term] Search available plugins
1840
+ agentsys search <plugin>: List components of a plugin
1841
+ agentsys list List installed plugins (summary)
1842
+ agentsys list --all List everything (plugins, agents, skills, commands, hooks)
1843
+ agentsys list --plugins List plugins only
1844
+ agentsys list --agents List all agents across plugins
1845
+ agentsys list --skills List all skills across plugins
1846
+ agentsys list --commands List all commands across plugins
1847
+ agentsys list --hooks List all hooks across plugins
1848
+ agentsys update Re-fetch latest versions of installed plugins
589
1849
 
590
1850
  Non-Interactive Examples:
591
1851
  agentsys --tool claude # Install for Claude Code only
592
1852
  agentsys --tool opencode # Install for OpenCode only
593
1853
  agentsys --tools "claude,opencode" # Install for both
594
- agentsys --tools claude,opencode,codex # Install for all three
1854
+ agentsys --tools claude,opencode,codex,cursor # Install for all
1855
+ agentsys --only next-task # Install next-task + its dependencies
1856
+ agentsys --only "next-task,perf" # Install specific plugins + deps
595
1857
 
596
1858
  Development Mode:
597
1859
  agentsys --development # Install plugins directly to ~/.claude/plugins
@@ -609,12 +1871,13 @@ Supported Platforms:
609
1871
  claude - Claude Code (marketplace install or development mode)
610
1872
  opencode - OpenCode (local commands + native plugin)
611
1873
  codex - Codex CLI (local skills)
1874
+ cursor - Cursor (project-scoped .mdc rules)
612
1875
 
613
1876
  Install: npm install -g agentsys && agentsys
614
1877
  Update: npm update -g agentsys && agentsys
615
1878
  Remove: npm uninstall -g agentsys && agentsys --remove
616
1879
 
617
- Docs: https://github.com/avifenesh/agentsys
1880
+ Docs: https://github.com/agent-sh/agentsys
618
1881
  `);
619
1882
  }
620
1883
 
@@ -639,6 +1902,46 @@ async function main() {
639
1902
  return;
640
1903
  }
641
1904
 
1905
+ // Handle subcommand help
1906
+ if (args.subcommandArg === '--help') {
1907
+ printSubcommandHelp(args.subcommand);
1908
+ return;
1909
+ }
1910
+
1911
+ // Handle subcommands
1912
+ if (args.subcommand === 'list') {
1913
+ listInstalledPlugins(args.subcommandArg);
1914
+ return;
1915
+ }
1916
+
1917
+ if (args.subcommand === 'update') {
1918
+ await updatePlugins();
1919
+ return;
1920
+ }
1921
+
1922
+ if (args.subcommand === 'search') {
1923
+ searchPlugins(args.subcommandArg);
1924
+ return;
1925
+ }
1926
+
1927
+ if (args.subcommand === 'install') {
1928
+ if (!args.subcommandArg) {
1929
+ console.error('[ERROR] Usage: agentsys install <plugin[@version]>');
1930
+ process.exit(1);
1931
+ }
1932
+ await installPlugin(args.subcommandArg, args);
1933
+ return;
1934
+ }
1935
+
1936
+ if (args.subcommand === 'remove') {
1937
+ if (!args.subcommandArg) {
1938
+ console.error('[ERROR] Usage: agentsys remove <plugin>');
1939
+ process.exit(1);
1940
+ }
1941
+ removePlugin(args.subcommandArg);
1942
+ return;
1943
+ }
1944
+
642
1945
  // Determine which tools to install
643
1946
  let selected = [];
644
1947
 
@@ -673,7 +1976,8 @@ async function main() {
673
1976
  const options = [
674
1977
  { value: 'claude', label: 'Claude Code' },
675
1978
  { value: 'opencode', label: 'OpenCode' },
676
- { value: 'codex', label: 'Codex CLI' }
1979
+ { value: 'codex', label: 'Codex CLI' },
1980
+ { value: 'cursor', label: 'Cursor' }
677
1981
  ];
678
1982
 
679
1983
  selected = await multiSelect(
@@ -684,15 +1988,26 @@ async function main() {
684
1988
  if (selected.length === 0) {
685
1989
  console.log('\nNo platforms selected. Exiting.');
686
1990
  console.log('\nFor Claude Code, you can also install directly:');
687
- console.log(' /plugin marketplace add avifenesh/agentsys');
1991
+ console.log(' /plugin marketplace add agent-sh/agentsys');
688
1992
  process.exit(0);
689
1993
  }
690
1994
  }
691
1995
 
692
1996
  console.log(`\nInstalling for: ${selected.join(', ')}\n`);
693
1997
 
694
- // Only copy to ~/.agentsys if OpenCode or Codex selected (they need local files)
695
- const needsLocalInstall = selected.includes('opencode') || selected.includes('codex');
1998
+ // Fetch external plugins to cache
1999
+ const marketplace = loadMarketplace();
2000
+ const onlyPlugins = args.only;
2001
+ const pluginNames = onlyPlugins.length > 0 ? onlyPlugins : marketplace.plugins.map(p => p.name);
2002
+
2003
+ // Check core version compatibility
2004
+ for (const pName of pluginNames) {
2005
+ const entry = marketplace.plugins.find(p => p.name === pName);
2006
+ if (entry) checkCoreCompat(entry);
2007
+ }
2008
+
2009
+ // Only copy to ~/.agentsys if OpenCode, Codex, or Cursor selected (they need local files)
2010
+ const needsLocalInstall = selected.includes('opencode') || selected.includes('codex') || selected.includes('cursor');
696
2011
  let installDir = null;
697
2012
 
698
2013
  if (needsLocalInstall) {
@@ -702,6 +2017,8 @@ async function main() {
702
2017
  installDependencies(installDir);
703
2018
  }
704
2019
 
2020
+ await fetchExternalPlugins(pluginNames, marketplace);
2021
+
705
2022
  // Install for each platform
706
2023
  const failedPlatforms = [];
707
2024
  for (const platform of selected) {
@@ -725,6 +2042,11 @@ async function main() {
725
2042
  failedPlatforms.push('codex');
726
2043
  }
727
2044
  break;
2045
+ case 'cursor':
2046
+ if (!installForCursor(installDir)) {
2047
+ failedPlatforms.push('cursor');
2048
+ }
2049
+ break;
728
2050
  }
729
2051
  }
730
2052
 
@@ -739,7 +2061,7 @@ async function main() {
739
2061
  }
740
2062
  console.log('\nTo update: npm update -g agentsys');
741
2063
  console.log('To remove: npm uninstall -g agentsys && agentsys --remove');
742
- console.log('\nDocs: https://github.com/avifenesh/agentsys');
2064
+ console.log('\nDocs: https://github.com/agent-sh/agentsys');
743
2065
  }
744
2066
 
745
2067
  // Export for testing when required as module
@@ -750,4 +2072,33 @@ if (require.main === module) {
750
2072
  });
751
2073
  }
752
2074
 
753
- module.exports = { parseArgs, VALID_TOOLS };
2075
+ module.exports = {
2076
+ parseArgs,
2077
+ VALID_TOOLS,
2078
+ resolvePluginDeps,
2079
+ fetchPlugin,
2080
+ fetchExternalPlugins,
2081
+ resolvePluginRoot,
2082
+ loadMarketplace,
2083
+ getPluginCacheDir,
2084
+ listInstalledPlugins,
2085
+ updatePlugins,
2086
+ installPlugin,
2087
+ removePlugin,
2088
+ searchPlugins,
2089
+ loadInstalledJson,
2090
+ saveInstalledJson,
2091
+ recordInstall,
2092
+ recordRemove,
2093
+ satisfiesRange,
2094
+ checkCoreCompat,
2095
+ detectInstalledPlatforms,
2096
+ getInstalledJsonPath,
2097
+ parseInstallTarget,
2098
+ loadComponents,
2099
+ resolveComponent,
2100
+ buildFilterFromComponent,
2101
+ resolvePluginSource,
2102
+ parseGitHubSource,
2103
+ installForCursor
2104
+ };