@yandy-r/ycc-opencode 0.0.0-stage → 6.1.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (410) hide show
  1. package/AGENTS.md +39 -0
  2. package/LICENSE +21 -0
  3. package/README.md +50 -2
  4. package/agents/ansible-automation-expert.md +115 -0
  5. package/agents/api-docs-expert.md +146 -0
  6. package/agents/api-documenter.md +105 -0
  7. package/agents/architect.md +264 -0
  8. package/agents/architecture-analyst.md +99 -0
  9. package/agents/backport-conflict-resolver.md +476 -0
  10. package/agents/cloudflare-architect.md +85 -0
  11. package/agents/cloudflare-developer.md +196 -0
  12. package/agents/code-architect.md +101 -0
  13. package/agents/code-documenter.md +114 -0
  14. package/agents/code-explorer.md +99 -0
  15. package/agents/code-finder.md +83 -0
  16. package/agents/code-researcher.md +102 -0
  17. package/agents/code-reviewer.md +268 -0
  18. package/agents/code-simplifier.md +77 -0
  19. package/agents/codebase-advisor.md +130 -0
  20. package/agents/db-modifier.md +577 -0
  21. package/agents/docs-git-committer.md +220 -0
  22. package/agents/documentation-writer.md +92 -0
  23. package/agents/feature-researcher.md +121 -0
  24. package/agents/feature-writer.md +89 -0
  25. package/agents/frontend-ui-developer.md +98 -0
  26. package/agents/git-cleanup.md +174 -0
  27. package/agents/go-api-architect.md +172 -0
  28. package/agents/go-expert-architect.md +147 -0
  29. package/agents/implementor.md +167 -0
  30. package/agents/library-docs-writer.md +128 -0
  31. package/agents/nextjs-ux-ui-expert.md +127 -0
  32. package/agents/nodejs-backend-architect.md +112 -0
  33. package/agents/nodejs-backend-developer.md +184 -0
  34. package/agents/planner.md +257 -0
  35. package/agents/pr-comment-fixer.md +626 -0
  36. package/agents/practices-researcher.md +80 -0
  37. package/agents/project-file-cleaner.md +140 -0
  38. package/agents/prp-researcher.md +231 -0
  39. package/agents/python-developer.md +171 -0
  40. package/agents/python-expert-architect.md +188 -0
  41. package/agents/readme-generator.md +100 -0
  42. package/agents/release-fix-applier.md +558 -0
  43. package/agents/releaser.md +147 -0
  44. package/agents/research-specialist.md +106 -0
  45. package/agents/reverse-proxy-architect.md +131 -0
  46. package/agents/review-fixer.md +609 -0
  47. package/agents/root-cause-analyzer.md +105 -0
  48. package/agents/rust-build-resolver.md +183 -0
  49. package/agents/rust-expert-architect.md +149 -0
  50. package/agents/rust-reviewer.md +126 -0
  51. package/agents/sql-database-developer.md +195 -0
  52. package/agents/systems-engineering-expert.md +203 -0
  53. package/agents/terraform-architect.md +109 -0
  54. package/agents/terraform-developer.md +229 -0
  55. package/agents/test-strategy-planner.md +126 -0
  56. package/agents/turso-database-architect.md +139 -0
  57. package/agents/typescript-developer.md +170 -0
  58. package/agents/typescript-expert-architect.md +167 -0
  59. package/index.js +523 -0
  60. package/package.json +36 -4
  61. package/registration.json +7259 -0
  62. package/shared/references/agent-native-setup.md +121 -0
  63. package/shared/references/branch-prep.md +31 -0
  64. package/shared/references/branching-model.md +162 -0
  65. package/shared/references/ci-monitoring.md +455 -0
  66. package/shared/references/forge-detection.md +162 -0
  67. package/shared/references/goal-pairing.md +55 -0
  68. package/shared/references/pr-base-and-backport.md +143 -0
  69. package/shared/references/question-policy.md +99 -0
  70. package/shared/references/review-artifact-format.md +141 -0
  71. package/shared/references/review-checklist.md +161 -0
  72. package/shared/references/review-dispatch.md +73 -0
  73. package/shared/references/session-state.md +159 -0
  74. package/shared/references/standalone-dispatch.md +300 -0
  75. package/shared/references/target-capability-matrix.md +516 -0
  76. package/shared/references/visual-mode.md +155 -0
  77. package/shared/references/worktree-strategy.md +326 -0
  78. package/shared/scripts/backport-audit.sh +283 -0
  79. package/shared/scripts/ci-monitor.sh +637 -0
  80. package/shared/scripts/lib/backport-lib.sh +47 -0
  81. package/shared/scripts/lib/ci-classify.sh +103 -0
  82. package/shared/scripts/lib/forge.sh +264 -0
  83. package/shared/scripts/lib/release-state-lib.sh +300 -0
  84. package/shared/scripts/list-worktrees.sh +178 -0
  85. package/shared/scripts/merge-children.sh +82 -0
  86. package/shared/scripts/move-plan-to-worktree.sh +231 -0
  87. package/shared/scripts/pr-guard.sh +283 -0
  88. package/shared/scripts/prepare-feature-branch.sh +326 -0
  89. package/shared/scripts/release-ci-monitor.sh +671 -0
  90. package/shared/scripts/release-state-update.sh +216 -0
  91. package/shared/scripts/release-state.sh +178 -0
  92. package/shared/scripts/report-bundle-drift.sh +343 -0
  93. package/shared/scripts/require-python.sh +17 -0
  94. package/shared/scripts/resolve-plans-dir.sh +262 -0
  95. package/shared/scripts/rules-pointer.sh +20 -0
  96. package/shared/scripts/rules_pointer.py +267 -0
  97. package/shared/scripts/setup-worktree.sh +288 -0
  98. package/shared/scripts/validate-file-paths.sh +249 -0
  99. package/shared/scripts/visual-egress-guard.sh +303 -0
  100. package/shared/scripts/visual-recap-collect.sh +247 -0
  101. package/shared/scripts/worktree-paths.sh +91 -0
  102. package/skills/backport/SKILL.md +293 -0
  103. package/skills/backport/scripts/cherry-pick-pr.sh +232 -0
  104. package/skills/backport/scripts/find-pending.sh +199 -0
  105. package/skills/blueprint/SKILL.md +412 -0
  106. package/skills/blueprint/references/bootstrap-mapping.md +87 -0
  107. package/skills/bundle-author/SKILL.md +121 -0
  108. package/skills/bundle-author/references/surface-map.md +128 -0
  109. package/skills/bundle-author/references/templates/agent-template.md +21 -0
  110. package/skills/bundle-author/references/templates/skill-template.md +36 -0
  111. package/skills/bundle-author/references/when-not-to-scaffold.md +85 -0
  112. package/skills/bundle-author/scripts/scaffold-skill.sh +156 -0
  113. package/skills/bundle-release/SKILL.md +192 -0
  114. package/skills/bundle-release/references/release-checklist.md +196 -0
  115. package/skills/bundle-release/references/release-notes-template.md +48 -0
  116. package/skills/bundle-release/references/version-policy.md +156 -0
  117. package/skills/bundle-release/scripts/bump-version.sh +99 -0
  118. package/skills/bundle-release/scripts/draft-notes.sh +222 -0
  119. package/skills/bundle-release/scripts/preflight.sh +165 -0
  120. package/skills/bundle-release/scripts/release_versions.py +375 -0
  121. package/skills/clean/SKILL.md +109 -0
  122. package/skills/clean/references/agent-prompts.md +199 -0
  123. package/skills/clean/references/safety-config.md +125 -0
  124. package/skills/clean/scripts/detect-project-type.sh +423 -0
  125. package/skills/clean/scripts/generate-report.sh +245 -0
  126. package/skills/clean/scripts/validate-safety.sh +401 -0
  127. package/skills/code-report/SKILL.md +377 -0
  128. package/skills/code-report/scripts/check-prerequisites.sh +65 -0
  129. package/skills/code-report/templates/report-structure.md +202 -0
  130. package/skills/code-review/SKILL.md +155 -0
  131. package/skills/code-review/references/pr-procedure.md +311 -0
  132. package/skills/compatibility-audit/SKILL.md +229 -0
  133. package/skills/compatibility-audit/references/reading-the-report.md +162 -0
  134. package/skills/compatibility-audit/scripts/audit-install-assumptions.sh +431 -0
  135. package/skills/compatibility-audit/scripts/audit-target-features.sh +596 -0
  136. package/skills/deep-research/SKILL.md +251 -0
  137. package/skills/deep-research/references/analysis-prompts.md +702 -0
  138. package/skills/deep-research/references/completion-summary-template.md +66 -0
  139. package/skills/deep-research/references/persona-analogical.md +159 -0
  140. package/skills/deep-research/references/persona-archaeological.md +69 -0
  141. package/skills/deep-research/references/persona-contrarian.md +155 -0
  142. package/skills/deep-research/references/persona-futurist.md +70 -0
  143. package/skills/deep-research/references/persona-historical.md +142 -0
  144. package/skills/deep-research/references/persona-journalistic.md +69 -0
  145. package/skills/deep-research/references/persona-negative-space.md +70 -0
  146. package/skills/deep-research/references/persona-systems.md +69 -0
  147. package/skills/deep-research/references/synthesis-template.md +569 -0
  148. package/skills/deep-research/references/verification-log-template.md +32 -0
  149. package/skills/deep-research/scripts/check-prerequisites.sh +153 -0
  150. package/skills/deep-research/scripts/validate-research.sh +244 -0
  151. package/skills/feature-research/SKILL.md +294 -0
  152. package/skills/feature-research/scripts/validate-research.sh +159 -0
  153. package/skills/feature-research/scripts/validate-spec.sh +270 -0
  154. package/skills/feature-research/templates/research-agents.md +569 -0
  155. package/skills/feature-research/templates/spec-structure.md +437 -0
  156. package/skills/formatters/SKILL.md +209 -0
  157. package/skills/formatters/references/best-practices.md +78 -0
  158. package/skills/formatters/references/flag-reference.md +178 -0
  159. package/skills/formatters/references/stack-detection.md +119 -0
  160. package/skills/formatters/references/templates/husky-pre-commit.tmpl +13 -0
  161. package/skills/formatters/references/templates/justfile-snippet.just.tmpl +31 -0
  162. package/skills/formatters/references/templates/lefthook.yml.tmpl +22 -0
  163. package/skills/formatters/references/templates/lint-autofix.yml.tmpl +94 -0
  164. package/skills/formatters/references/templates/lint.yml.tmpl +85 -0
  165. package/skills/formatters/references/templates/makefile-snippet.mk.tmpl +34 -0
  166. package/skills/formatters/references/templates/package-json-scripts.json.tmpl +14 -0
  167. package/skills/formatters/references/templates/readme-section.md.tmpl +118 -0
  168. package/skills/formatters/scripts/apply-aliases.sh +245 -0
  169. package/skills/formatters/scripts/apply-ci.sh +136 -0
  170. package/skills/formatters/scripts/apply-docs.sh +187 -0
  171. package/skills/formatters/scripts/apply-hooks.sh +261 -0
  172. package/skills/formatters/scripts/bundle/format.sh +15 -0
  173. package/skills/formatters/scripts/bundle/go-tools.sh +119 -0
  174. package/skills/formatters/scripts/bundle/init-formatters.sh +517 -0
  175. package/skills/formatters/scripts/bundle/install-shellcheck.sh +85 -0
  176. package/skills/formatters/scripts/bundle/lib/excludes.sh +179 -0
  177. package/skills/formatters/scripts/bundle/lib/modified-files.sh +222 -0
  178. package/skills/formatters/scripts/bundle/lib/shellcheck-resolve.sh +81 -0
  179. package/skills/formatters/scripts/bundle/lib/shellcheck-version.sh +5 -0
  180. package/skills/formatters/scripts/bundle/lint.sh +15 -0
  181. package/skills/formatters/scripts/bundle/style.sh +1410 -0
  182. package/skills/formatters/scripts/bundle/templates/biome.json +81 -0
  183. package/skills/formatters/scripts/bundle/templates/clippy.toml +2 -0
  184. package/skills/formatters/scripts/bundle/templates/markdownlint.json +14 -0
  185. package/skills/formatters/scripts/bundle/templates/markdownlintignore +38 -0
  186. package/skills/formatters/scripts/bundle/templates/prettierignore +45 -0
  187. package/skills/formatters/scripts/bundle/templates/prettierrc.json +11 -0
  188. package/skills/formatters/scripts/bundle/templates/python-pyproject.toml +80 -0
  189. package/skills/formatters/scripts/bundle/templates/rustfmt.toml +41 -0
  190. package/skills/formatters/scripts/bundle/templates/tsconfig.json +21 -0
  191. package/skills/formatters/scripts/profile-style.sh +264 -0
  192. package/skills/frontend-design/SKILL.md +151 -0
  193. package/skills/frontend-patterns/SKILL.md +66 -0
  194. package/skills/frontend-patterns/references/animation.md +21 -0
  195. package/skills/frontend-patterns/references/components-and-state.md +40 -0
  196. package/skills/frontend-patterns/references/data-and-performance.md +34 -0
  197. package/skills/frontend-patterns/references/forms-errors-a11y.md +35 -0
  198. package/skills/git-cleanup/SKILL.md +300 -0
  199. package/skills/git-cleanup/references/active-code-rules.md +323 -0
  200. package/skills/git-cleanup/references/host-detection.md +217 -0
  201. package/skills/git-workflow/SKILL.md +132 -0
  202. package/skills/git-workflow/references/ci-monitoring-phase.md +130 -0
  203. package/skills/git-workflow/references/commit-phases.md +247 -0
  204. package/skills/git-workflow/references/examples-and-troubleshooting.md +47 -0
  205. package/skills/git-workflow/references/goal-pairing.md +23 -0
  206. package/skills/git-workflow/references/pr-creation.md +269 -0
  207. package/skills/git-workflow/scripts/analyze-changes.sh +266 -0
  208. package/skills/git-workflow/scripts/create-pr.sh +464 -0
  209. package/skills/git-workflow/scripts/validate-commit.sh +235 -0
  210. package/skills/git-workflow/templates/agent-prompts.md +518 -0
  211. package/skills/git-workflow/templates/commit-types.md +504 -0
  212. package/skills/git-workflow/templates/documentation-decision.md +509 -0
  213. package/skills/git-workflow/templates/pr-template.md +772 -0
  214. package/skills/go-patterns/SKILL.md +89 -0
  215. package/skills/go-patterns/references/design-and-tooling.md +336 -0
  216. package/skills/go-patterns/references/errors-and-concurrency.md +292 -0
  217. package/skills/go-testing/SKILL.md +133 -0
  218. package/skills/go-testing/references/advanced-testing.md +349 -0
  219. package/skills/go-testing/references/test-structure.md +277 -0
  220. package/skills/hooks-workflow/SKILL.md +232 -0
  221. package/skills/hooks-workflow/references/support-notes.md +134 -0
  222. package/skills/hooks-workflow/references/templates/claude-settings.json.tmpl +13 -0
  223. package/skills/hooks-workflow/references/templates/codex-config-fragment.toml.tmpl +9 -0
  224. package/skills/hooks-workflow/references/templates/cursor-rule-fragment.mdc.tmpl +16 -0
  225. package/skills/hooks-workflow/scripts/build-hook-config.sh +487 -0
  226. package/skills/hooks-workflow/scripts/verify-hooks.sh +257 -0
  227. package/skills/implement-plan/SKILL.md +223 -0
  228. package/skills/implement-plan/references/agent-task-prompt.md +214 -0
  229. package/skills/implement-plan/references/output-formats.md +150 -0
  230. package/skills/implement-plan/references/plan-inputs.md +126 -0
  231. package/skills/implement-plan/scripts/check-prerequisites.sh +78 -0
  232. package/skills/implement-plan/scripts/parse-dependencies.sh +206 -0
  233. package/skills/init/SKILL.md +274 -0
  234. package/skills/init/references/conventional-commits.md +114 -0
  235. package/skills/init/references/flag-reference.md +236 -0
  236. package/skills/init/references/label-taxonomy.md +115 -0
  237. package/skills/init/references/project-profile-heuristics.md +156 -0
  238. package/skills/init/references/template-library.md +129 -0
  239. package/skills/init/scripts/count-source-files.sh +60 -0
  240. package/skills/init/scripts/generate-agent-catalog.sh +193 -0
  241. package/skills/init/scripts/generate-mcp-catalog.sh +214 -0
  242. package/skills/init/scripts/migrate-rules.py +459 -0
  243. package/skills/init/scripts/migrate-rules.sh +26 -0
  244. package/skills/init/scripts/profile-project.sh +453 -0
  245. package/skills/init/scripts/render-template.py +226 -0
  246. package/skills/init/scripts/render-template.sh +25 -0
  247. package/skills/init/scripts/rules-report.sh +31 -0
  248. package/skills/init/scripts/rules_file_lib.py +41 -0
  249. package/skills/init/templates/AGENTS.md.tmpl +38 -0
  250. package/skills/init/templates/CLAUDE.md.tmpl +7 -0
  251. package/skills/init/templates/ai-rule.md.tmpl +3 -0
  252. package/skills/init/templates/cursor-rule.mdc.tmpl +7 -0
  253. package/skills/init/templates/git/commitlint.config.cjs.tmpl +40 -0
  254. package/skills/init/templates/git/gitignore.tmpl +121 -0
  255. package/skills/init/templates/git/gitmessage.tmpl +27 -0
  256. package/skills/init/templates/git/install-lefthook.sh.tmpl +131 -0
  257. package/skills/init/templates/git/lefthook-usage.md.tmpl +101 -0
  258. package/skills/init/templates/git/lefthook.yml.tmpl +64 -0
  259. package/skills/init/templates/github/bug_report.yml.tmpl +78 -0
  260. package/skills/init/templates/github/config.yml.tmpl +5 -0
  261. package/skills/init/templates/github/copilot-instructions.md.tmpl +24 -0
  262. package/skills/init/templates/github/docs_request.yml.tmpl +41 -0
  263. package/skills/init/templates/github/feature_request.yml.tmpl +59 -0
  264. package/skills/init/templates/github/labels.md.tmpl +75 -0
  265. package/skills/init/templates/github/pull_request_template.md.tmpl +66 -0
  266. package/skills/init/templates/github/workflows/pr-title-autofix.yml.tmpl +101 -0
  267. package/skills/init/templates/github/workflows/pr-title.yml.tmpl +55 -0
  268. package/skills/init/templates/workspace-report.md +83 -0
  269. package/skills/orchestrate/SKILL.md +165 -0
  270. package/skills/orchestrate/references/agent-catalog.md +601 -0
  271. package/skills/orchestrate/references/agent-prompts.md +495 -0
  272. package/skills/orchestrate/references/dispatch-playbook.md +333 -0
  273. package/skills/orchestrate/references/task-breakdown.md +410 -0
  274. package/skills/orchestrate/scripts/analyze-task.sh +139 -0
  275. package/skills/orchestrate/scripts/summarize-results.sh +160 -0
  276. package/skills/orchestrate/scripts/validate-agents.sh +92 -0
  277. package/skills/parallel-plan/SKILL.md +124 -0
  278. package/skills/plan/SKILL.md +136 -0
  279. package/skills/plan/references/enhanced-personas.md +131 -0
  280. package/skills/plan/references/personas-and-merge.md +77 -0
  281. package/skills/plan/references/plan-validation.md +65 -0
  282. package/skills/plan/references/planner-prompts.md +68 -0
  283. package/skills/plan/references/planning-tracks.md +73 -0
  284. package/skills/plan-workflow/SKILL.md +409 -0
  285. package/skills/plan-workflow/references/checkpoint-messages.md +370 -0
  286. package/skills/plan-workflow/references/plan-structure.md +238 -0
  287. package/skills/plan-workflow/references/planning-agents.md +511 -0
  288. package/skills/plan-workflow/references/research-agents-optimized.md +348 -0
  289. package/skills/plan-workflow/references/research-agents.md +436 -0
  290. package/skills/plan-workflow/references/shared-structure.md +152 -0
  291. package/skills/plan-workflow/references/validation-agents.md +363 -0
  292. package/skills/plan-workflow/scripts/check-prerequisites.sh +65 -0
  293. package/skills/plan-workflow/scripts/check-state.sh +190 -0
  294. package/skills/plan-workflow/scripts/persist-or-fail.sh +135 -0
  295. package/skills/plan-workflow/scripts/validate-analysis-artifacts.sh +216 -0
  296. package/skills/plan-workflow/scripts/validate-research-artifacts.sh +225 -0
  297. package/skills/plan-workflow/scripts/validate-shared.sh +229 -0
  298. package/skills/plan-workflow/scripts/validate-workflow-plan.sh +256 -0
  299. package/skills/pr-autofix/SKILL.md +309 -0
  300. package/skills/pr-autofix/references/ci-loop.md +64 -0
  301. package/skills/pr-autofix/references/comment-sources.md +197 -0
  302. package/skills/pr-autofix/references/data-shapes.md +87 -0
  303. package/skills/pr-autofix/references/goal-example.md +30 -0
  304. package/skills/pr-autofix/references/output-templates.md +162 -0
  305. package/skills/pr-autofix/references/prompt-injection-safety.md +165 -0
  306. package/skills/pr-autofix/references/related-skills.md +11 -0
  307. package/skills/pr-autofix/references/severity-mapping.md +146 -0
  308. package/skills/pr-autofix/scripts/fetch-pr-comments.sh +364 -0
  309. package/skills/pr-autofix/scripts/post-summary.sh +226 -0
  310. package/skills/pr-autofix/scripts/resolve-thread.sh +251 -0
  311. package/skills/prp-commit/SKILL.md +128 -0
  312. package/skills/prp-implement/SKILL.md +179 -0
  313. package/skills/prp-implement/references/agent-task-prompt.md +36 -0
  314. package/skills/prp-implement/references/detection.md +49 -0
  315. package/skills/prp-implement/references/dry-run.md +0 -0
  316. package/skills/prp-implement/references/report-output.md +204 -0
  317. package/skills/prp-implement/references/validation-and-failures.md +118 -0
  318. package/skills/prp-plan/SKILL.md +323 -0
  319. package/skills/prp-plan/references/enhanced-researchers.md +425 -0
  320. package/skills/prp-plan/references/parallel-additions.md +56 -0
  321. package/skills/prp-plan/references/plan-template.md +264 -0
  322. package/skills/prp-plan/references/synthesis-map.md +25 -0
  323. package/skills/prp-plan/scripts/validate-prp-plan.sh +368 -0
  324. package/skills/prp-pr/SKILL.md +404 -0
  325. package/skills/prp-prd/SKILL.md +444 -0
  326. package/skills/prp-spec/SKILL.md +276 -0
  327. package/skills/python-patterns/SKILL.md +103 -0
  328. package/skills/python-patterns/references/core-idioms.md +304 -0
  329. package/skills/python-patterns/references/design-and-tooling.md +407 -0
  330. package/skills/python-testing/SKILL.md +114 -0
  331. package/skills/python-testing/references/mocking-and-integration.md +395 -0
  332. package/skills/python-testing/references/pytest-core.md +366 -0
  333. package/skills/quick-fix/SKILL.md +246 -0
  334. package/skills/quick-review/SKILL.md +306 -0
  335. package/skills/release-model/SKILL.md +233 -0
  336. package/skills/release-model/references/pointer-and-labels.md +83 -0
  337. package/skills/release-model/references/signals-and-proposal.md +68 -0
  338. package/skills/release-model/references/template-placeholders.md +42 -0
  339. package/skills/release-model/references/upgrade-and-audit.md +131 -0
  340. package/skills/release-model/scripts/collect-signals.sh +459 -0
  341. package/skills/release-model/scripts/pointer-targets.sh +29 -0
  342. package/skills/release-model/templates/RELEASING.md.tmpl +151 -0
  343. package/skills/releaser/SKILL.md +253 -0
  344. package/skills/releaser/references/ci-optimization-checklist.md +149 -0
  345. package/skills/releaser/references/ci-templates/docker-release.yml +88 -0
  346. package/skills/releaser/references/ci-templates/generic-release.yml +69 -0
  347. package/skills/releaser/references/ci-templates/go-release.yml +50 -0
  348. package/skills/releaser/references/ci-templates/node-release.yml +126 -0
  349. package/skills/releaser/references/ci-templates/python-release.yml +95 -0
  350. package/skills/releaser/references/ci-templates/rust-release.yml +128 -0
  351. package/skills/releaser/references/ci-workflow-modes.md +42 -0
  352. package/skills/releaser/references/goal-pairing.md +37 -0
  353. package/skills/releaser/references/output-templates.md +143 -0
  354. package/skills/releaser/references/project-type-matrix.md +144 -0
  355. package/skills/releaser/references/release-branches.md +138 -0
  356. package/skills/releaser/references/release-ci-loop.md +249 -0
  357. package/skills/releaser/references/release-notes-template.md +42 -0
  358. package/skills/releaser/references/release-preparation.md +210 -0
  359. package/skills/releaser/scripts/check-release-branch.sh +235 -0
  360. package/skills/releaser/scripts/detect-project.sh +234 -0
  361. package/skills/releaser/scripts/draft-changelog.sh +387 -0
  362. package/skills/releaser/scripts/publish-release.sh +302 -0
  363. package/skills/research-to-issues/SKILL.md +287 -0
  364. package/skills/research-to-issues/references/label-taxonomy.md +48 -0
  365. package/skills/research-to-issues/references/parse-deep-research.md +86 -0
  366. package/skills/research-to-issues/references/parse-feature-spec.md +143 -0
  367. package/skills/research-to-issues/references/parse-parallel-plan.md +124 -0
  368. package/skills/research-to-issues/references/parse-prd.md +184 -0
  369. package/skills/research-to-issues/references/parse-prp-plan.md +237 -0
  370. package/skills/research-to-issues/references/plan-display-format.md +136 -0
  371. package/skills/research-to-issues/scripts/validate-prerequisites.sh +312 -0
  372. package/skills/research-to-issues/templates/feature-issue.md +131 -0
  373. package/skills/research-to-issues/templates/task-issue.md +104 -0
  374. package/skills/research-to-issues/templates/tracking-issue.md +126 -0
  375. package/skills/resume-session/SKILL.md +154 -0
  376. package/skills/review-fix/SKILL.md +231 -0
  377. package/skills/review-fix/references/fix-report.md +121 -0
  378. package/skills/review-fix/references/fixer-dispatch.md +79 -0
  379. package/skills/review-fix/references/plan.md +119 -0
  380. package/skills/rust-patterns/SKILL.md +85 -0
  381. package/skills/rust-patterns/references/concurrency-unsafe-modules.md +243 -0
  382. package/skills/rust-patterns/references/ownership-errors-types.md +262 -0
  383. package/skills/rust-testing/SKILL.md +99 -0
  384. package/skills/rust-testing/references/advanced-testing.md +247 -0
  385. package/skills/rust-testing/references/unit-and-integration.md +193 -0
  386. package/skills/save-session/SKILL.md +161 -0
  387. package/skills/shared-context/SKILL.md +101 -0
  388. package/skills/ts-patterns/SKILL.md +159 -0
  389. package/skills/ts-patterns/references/async-runtimes-tooling.md +375 -0
  390. package/skills/ts-patterns/references/types-errors-modules.md +336 -0
  391. package/skills/ts-testing/SKILL.md +151 -0
  392. package/skills/ts-testing/references/advanced-testing.md +350 -0
  393. package/skills/ts-testing/references/vitest-core.md +318 -0
  394. package/skills/visual-plan/SKILL.md +221 -0
  395. package/skills/visual-plan/references/canvas.md +132 -0
  396. package/skills/visual-plan/references/document-quality.md +178 -0
  397. package/skills/visual-plan/references/exemplar.md +120 -0
  398. package/skills/visual-plan/references/wireframe.md +212 -0
  399. package/skills/visual-plan/scripts/derive-visual-dir.sh +77 -0
  400. package/skills/visual-recap/SKILL.md +238 -0
  401. package/skills/visual-recap/references/wireframe.md +237 -0
  402. package/skills/write-docs/SKILL.md +354 -0
  403. package/skills/write-docs/scripts/audit-documentation.sh +190 -0
  404. package/skills/write-docs/scripts/generate-doc-index.sh +125 -0
  405. package/skills/write-docs/scripts/verify-links.sh +81 -0
  406. package/skills/write-docs/templates/docs-readme.md +34 -0
  407. package/skills/write-docs/templates/documentation-strategy.md +91 -0
  408. package/ycc-sensitive-guard/index.js +621 -0
  409. package/ycc-sensitive-guard/package.json +7 -0
  410. package/ycc-sensitive-guard/policy.json +40 -0
@@ -0,0 +1,375 @@
1
+ #!/usr/bin/env python3
2
+ """Discover, verify, and bump ycc product version fields in lockstep.
3
+
4
+ Used by ``preflight.sh`` (``check``) and ``bump-version.sh`` (``bump``).
5
+
6
+ Discovery requires manifests selected by ``ycc/settings/packages.json``, with a
7
+ bounded scan for unmodeled surfaces. The repository is never scanned recursively,
8
+ so ``ycc/mods``, root dev metadata, ``node_modules`` and worktrees cannot participate.
9
+
10
+ Canonical version: ``ycc/.claude-plugin/plugin.json`` ``.version`` (required).
11
+
12
+ Bumped (hand-edited sources):
13
+ - ``ycc/.claude-plugin/plugin.json``
14
+ - ``.claude-plugin/marketplace.json``: ``metadata.version`` and every
15
+ ``plugins[].version`` that exists
16
+ - ``ycc/package.json`` when it already carries a ``version``
17
+
18
+ Checked only (regenerated by ``./scripts/sync.sh``, never hand-bumped): the
19
+ marketplaces ``.agents/plugins/marketplace.json``,
20
+ ``.cursor-plugin/marketplace.json`` and ``.omp-plugin/marketplace.json``, plus plugin
21
+ and package manifests under ``.codex-plugin/`` and ``.cursor-plugin/`` (the directory
22
+ and its direct child directories), plus ``packages/<package>`` and
23
+ ``packages/<runtime>/<package>`` plugin/package manifests (same bounded manifest
24
+ filenames). An included native OMP package must have ``.omp-plugin/plugin.json``,
25
+ ``.claude-plugin/plugin.json`` and ``package.json`` under ``packages/omp/<package>``.
26
+
27
+ Included native manifests must exist and have a version. Unmodeled optional files
28
+ and versionless marketplace entries never gain a field.
29
+ """
30
+
31
+ from __future__ import annotations
32
+
33
+ import json
34
+ import os
35
+ import sys
36
+ import tempfile
37
+ from dataclasses import dataclass, field
38
+ from pathlib import Path
39
+ from typing import Any
40
+
41
+ PLUGIN_REL = "ycc/.claude-plugin/plugin.json"
42
+ SOURCE_MARKETPLACE_REL = ".claude-plugin/marketplace.json"
43
+ OPTIONAL_MARKETPLACES = (
44
+ ".agents/plugins/marketplace.json",
45
+ ".cursor-plugin/marketplace.json",
46
+ ".omp-plugin/marketplace.json",
47
+ )
48
+ MANIFEST_SUBDIRS = (".claude-plugin", ".codex-plugin", ".cursor-plugin")
49
+ OMP_MANIFEST_SUBDIRS = (".omp-plugin", ".claude-plugin")
50
+ EXCLUDED_NAME = "ycc-mods"
51
+ EXCLUDED_SOURCE_PREFIX = "ycc/mods"
52
+ PACKAGE_RUNTIMES = ("claude", "codex", "cursor", "opencode", "agents", "omp")
53
+ MODEL_REL = "ycc/settings/packages.json"
54
+ Key = str | int
55
+
56
+
57
+ class ReleaseError(Exception):
58
+ """A discovery, parse, or write problem attributable to one or more files."""
59
+
60
+
61
+ @dataclass(frozen=True)
62
+ class VersionField:
63
+ rel: str
64
+ label: str
65
+ keys: tuple[Key, ...]
66
+ value: str
67
+
68
+
69
+ @dataclass
70
+ class Surface:
71
+ rel: str
72
+ data: Any
73
+ fields: list[VersionField] = field(default_factory=list)
74
+ mutable: bool = True
75
+
76
+
77
+ def _load(root: Path, rel: str) -> Any:
78
+ path = root / rel
79
+ try:
80
+ resolved = path.resolve(strict=True)
81
+ resolved.relative_to(root.resolve())
82
+ except FileNotFoundError as exc:
83
+ raise ReleaseError(f"{rel}: file not found") from exc
84
+ except (OSError, ValueError) as exc:
85
+ raise ReleaseError(f"{rel}: unreadable or resolves outside repository") from exc
86
+ try:
87
+ return json.loads(resolved.read_text(encoding="utf-8"))
88
+ except (OSError, UnicodeDecodeError, json.JSONDecodeError) as exc:
89
+ raise ReleaseError(f"{rel}: invalid JSON: {exc}") from exc
90
+
91
+
92
+ def _version_field(rel: str, container: Any, keys: tuple[Key, ...], label: str) -> list[VersionField]:
93
+ """Return a one-item list when ``container`` has a version; error if not a string."""
94
+ if not isinstance(container, dict):
95
+ raise ReleaseError(f"{rel}: {label.rsplit('.version', 1)[0] or 'root'}: expected object")
96
+ if "version" not in container:
97
+ return []
98
+ value = container["version"]
99
+ if not isinstance(value, str) or not value.strip():
100
+ raise ReleaseError(f"{rel}: {label}: expected non-empty string, got {value!r}")
101
+ return [VersionField(rel, label, keys, value)]
102
+
103
+
104
+ def _is_excluded_entry(entry: dict[str, Any]) -> bool:
105
+ if entry.get("name") == EXCLUDED_NAME:
106
+ return True
107
+ source = entry.get("source")
108
+ if isinstance(source, dict):
109
+ source = source.get("path")
110
+ if isinstance(source, str):
111
+ source = source.removeprefix("./").rstrip("/")
112
+ return source == EXCLUDED_SOURCE_PREFIX or source.startswith(EXCLUDED_SOURCE_PREFIX + "/")
113
+ return False
114
+
115
+
116
+ def _marketplace_surface(root: Path, rel: str, required: bool, mutable: bool) -> Surface:
117
+ data = _load(root, rel)
118
+ surface = Surface(rel, data, mutable=mutable)
119
+ if not isinstance(data, dict):
120
+ raise ReleaseError(f"{rel}: expected a JSON object")
121
+ if "metadata" in data:
122
+ surface.fields += _version_field(rel, data["metadata"], ("metadata", "version"), "metadata.version")
123
+ plugins = data.get("plugins")
124
+ if not isinstance(plugins, list) or (required and not plugins):
125
+ raise ReleaseError(f"{rel}: plugins: expected {'non-empty ' if required else ''}array")
126
+ for index, entry in enumerate(plugins):
127
+ label = f"plugins[{index}].version"
128
+ if not isinstance(entry, dict):
129
+ raise ReleaseError(f"{rel}: plugins[{index}]: expected object")
130
+ if _is_excluded_entry(entry):
131
+ continue
132
+ surface.fields += _version_field(rel, entry, ("plugins", index, "version"), label)
133
+ return surface
134
+
135
+
136
+ def _manifest_surface(root: Path, rel: str, mutable: bool, required: bool = False) -> Surface | None:
137
+ if not required and not (root / rel).is_file():
138
+ return None
139
+ data = _load(root, rel)
140
+ if not isinstance(data, dict):
141
+ raise ReleaseError(f"{rel}: expected a JSON object")
142
+ if not required and data.get("name") == EXCLUDED_NAME:
143
+ return None
144
+ return Surface(rel, data, _version_field(rel, data, ("version",), "version"), mutable)
145
+
146
+
147
+ def _child_dirs(root: Path, rel: str) -> list[str]:
148
+ base = root / rel
149
+ if not base.is_dir():
150
+ return []
151
+ return [f"{rel}/{p.name}" for p in sorted(base.iterdir()) if p.is_dir() and p.name != EXCLUDED_NAME]
152
+
153
+
154
+ def _manifest_rels(root: Path, directory: str) -> list[str]:
155
+ rels = [f"{directory}/{sub}/plugin.json" for sub in MANIFEST_SUBDIRS]
156
+ return [r for r in rels + [f"{directory}/package.json"] if (root / r).is_file()]
157
+
158
+
159
+ def _model_manifests(root: Path) -> list[tuple[str, str, bool, bool]]:
160
+ """Return (model label, manifest, included, required) without external imports."""
161
+ data = _load(root, MODEL_REL)
162
+ if not isinstance(data, dict) or not isinstance(data.get("packages"), dict):
163
+ raise ReleaseError(f"{MODEL_REL}: expected packages object")
164
+ if data.get("version_source") != PLUGIN_REL:
165
+ raise ReleaseError(f"{MODEL_REL}: version_source must be {PLUGIN_REL}")
166
+ manifests: list[tuple[str, str, bool, bool]] = []
167
+ for key, package in data["packages"].items():
168
+ label = f"packages.{key}"
169
+ if (
170
+ not isinstance(key, str)
171
+ or not key
172
+ or key in {".", ".."}
173
+ or ("/" in key and not (key.startswith("@") and key.count("/") == 1))
174
+ or "\\" in key
175
+ ):
176
+ raise ReleaseError(f"{MODEL_REL}: {label}: invalid package key")
177
+ if not isinstance(package, dict) or not isinstance(package.get("runtimes"), dict):
178
+ raise ReleaseError(f"{MODEL_REL}: {label}: expected runtimes object")
179
+ for runtime, entry in package["runtimes"].items():
180
+ label = f"packages.{key}.runtimes.{runtime}"
181
+ if runtime not in PACKAGE_RUNTIMES or not isinstance(entry, dict):
182
+ raise ReleaseError(f"{MODEL_REL}: {label}: expected known runtime object")
183
+ status, mechanism = entry.get("status"), entry.get("mechanism")
184
+ if status not in ("included", "deferred", "excluded"):
185
+ raise ReleaseError(f"{MODEL_REL}: {label}: invalid status {status!r}")
186
+ if mechanism not in ("native", "npm", "file-copy"):
187
+ raise ReleaseError(f"{MODEL_REL}: {label}: invalid mechanism {mechanism!r}")
188
+ if mechanism == "file-copy":
189
+ continue
190
+ required = True
191
+ if runtime == "omp" and mechanism == "native" and "/" not in key:
192
+ # scripts/generate_omp_packages.py: OMP reads the version from these, in this
193
+ # package root; the catalog entry is checked through OPTIONAL_MARKETPLACES.
194
+ base = f"packages/{runtime}/{key}"
195
+ for rel in (*(f"{base}/{sub}/plugin.json" for sub in OMP_MANIFEST_SUBDIRS), f"{base}/package.json"):
196
+ manifests.append((label, rel, status == "included", required))
197
+ continue
198
+ if mechanism == "native" and runtime in PACKAGE_RUNTIMES[:3] and "/" not in key:
199
+ subdir = MANIFEST_SUBDIRS[PACKAGE_RUNTIMES.index(runtime)]
200
+ if runtime == "claude" and key == "ycc":
201
+ rel = PLUGIN_REL
202
+ else:
203
+ base = f"{subdir}/{key}" if runtime == "codex" else f"packages/{runtime}/{key}"
204
+ rel = f"{base}/{subdir}/plugin.json"
205
+ elif runtime == "opencode" and mechanism == "npm":
206
+ name = key.rsplit("/", 1)[-1]
207
+ if name in {".", ".."} or not name:
208
+ raise ReleaseError(f"{MODEL_REL}: {label}: invalid npm package key")
209
+ rel = f"packages/{runtime}/{name}/package.json"
210
+ else:
211
+ raise ReleaseError(f"{MODEL_REL}: {label}: unsupported {mechanism} manifest")
212
+ manifests.append((label, rel, status == "included", required))
213
+ return manifests
214
+
215
+
216
+ def _included_manifest(root: Path, label: str, rel: str, required: bool) -> Surface | None:
217
+ try:
218
+ surface = _manifest_surface(root, rel, rel == PLUGIN_REL, required)
219
+ if surface is not None and not surface.fields:
220
+ raise ReleaseError(f"{rel}: version: expected non-empty string")
221
+ return surface
222
+ except ReleaseError as exc:
223
+ raise ReleaseError(f"{label}: {exc}") from exc
224
+
225
+
226
+ def discover(root: Path) -> list[Surface]:
227
+ """Return every surface; raise ReleaseError listing all file problems."""
228
+ surfaces: list[Surface] = []
229
+ errors: list[str] = []
230
+ seen: set[str] = set()
231
+ suppressed: set[str] = set()
232
+
233
+ def add(builder: Any, *args: Any) -> None:
234
+ try:
235
+ result = builder(root, *args)
236
+ except ReleaseError as exc:
237
+ errors.append(str(exc))
238
+ return
239
+ if result is not None:
240
+ if result.rel in seen:
241
+ return
242
+ seen.add(result.rel)
243
+ surfaces.append(result)
244
+
245
+ try:
246
+ modeled = _model_manifests(root)
247
+ except ReleaseError as exc:
248
+ errors.append(str(exc))
249
+ modeled = []
250
+ for label, rel, included, required in modeled:
251
+ if included:
252
+ add(_included_manifest, label, rel, required)
253
+ else:
254
+ suppressed.add(rel)
255
+ add(_manifest_surface, PLUGIN_REL, True, True)
256
+ add(_marketplace_surface, SOURCE_MARKETPLACE_REL, True, True)
257
+ for rel in OPTIONAL_MARKETPLACES:
258
+ if (root / rel).is_file():
259
+ # Regenerated by scripts/sync.sh (e.g. generate_codex_plugin.py);
260
+ # check parity but never bump them.
261
+ add(_marketplace_surface, rel, False, False)
262
+ add(_manifest_surface, "ycc/package.json", True)
263
+ package_dirs = _child_dirs(root, "packages")
264
+ # Support both packages/<package> and packages/<runtime>/<package> layouts.
265
+ for runtime in PACKAGE_RUNTIMES:
266
+ package_dirs += _child_dirs(root, f"packages/{runtime}")
267
+ for package_dir in sorted(set(package_dirs)):
268
+ for rel in _manifest_rels(root, package_dir):
269
+ if rel not in suppressed:
270
+ add(_manifest_surface, rel, False)
271
+ generated_dirs: list[str] = []
272
+ for base in (".codex-plugin", ".cursor-plugin"):
273
+ if (root / base).is_dir():
274
+ generated_dirs += [base] + _child_dirs(root, base)
275
+ for directory in generated_dirs:
276
+ for rel in _manifest_rels(root, directory):
277
+ if rel not in suppressed:
278
+ add(_manifest_surface, rel, False)
279
+ if errors:
280
+ raise ReleaseError("\n".join(errors))
281
+ return surfaces
282
+
283
+
284
+ def _canonical(surfaces: list[Surface]) -> str:
285
+ for surface in surfaces:
286
+ if surface.rel == PLUGIN_REL:
287
+ if not surface.fields:
288
+ raise ReleaseError(f"{PLUGIN_REL}: version: required but missing")
289
+ return surface.fields[0].value
290
+ raise ReleaseError(f"{PLUGIN_REL}: file not found")
291
+
292
+
293
+ def check(root: Path) -> int:
294
+ try:
295
+ surfaces = discover(root)
296
+ expected = _canonical(surfaces)
297
+ except ReleaseError as exc:
298
+ print(str(exc), file=sys.stderr)
299
+ return 1
300
+ bad = [f for s in surfaces for f in s.fields if f.value != expected]
301
+ for item in bad:
302
+ print(f" {item.rel} {item.label} = {item.value} (expected {expected})", file=sys.stderr)
303
+ if bad:
304
+ return 1
305
+ print(expected)
306
+ return 0
307
+
308
+
309
+ def _set(data: Any, keys: tuple[Key, ...], value: str) -> None:
310
+ for key in keys[:-1]:
311
+ data = data[key]
312
+ data[keys[-1]] = value
313
+
314
+
315
+ def _serialize(data: Any) -> bytes:
316
+ return (json.dumps(data, indent=2, ensure_ascii=False) + "\n").encode("utf-8")
317
+
318
+
319
+ def _replace(path: Path, payload: bytes) -> None:
320
+ fd, tmp_name = tempfile.mkstemp(dir=path.parent, prefix=f".{path.name}.")
321
+ tmp = Path(tmp_name)
322
+ try:
323
+ with os.fdopen(fd, "wb") as handle:
324
+ handle.write(payload)
325
+ tmp.chmod(path.stat().st_mode & 0o7777)
326
+ os.replace(tmp, path)
327
+ except BaseException:
328
+ tmp.unlink(missing_ok=True)
329
+ raise
330
+
331
+
332
+ def bump(root: Path, new_version: str) -> int:
333
+ try:
334
+ surfaces = discover(root)
335
+ _canonical(surfaces)
336
+ except ReleaseError as exc:
337
+ print(str(exc), file=sys.stderr)
338
+ return 1
339
+ plans: list[tuple[Path, bytes, bytes]] = []
340
+ for surface in (s for s in surfaces if s.mutable):
341
+ changed = [f for f in surface.fields if f.value != new_version]
342
+ if not changed:
343
+ continue
344
+ path = root / surface.rel
345
+ for item in changed:
346
+ _set(surface.data, item.keys, new_version)
347
+ print(f"{item.rel} {item.label}: {item.value} -> {new_version}")
348
+ plans.append((path, path.read_bytes(), _serialize(surface.data)))
349
+ written: list[tuple[Path, bytes]] = []
350
+ try:
351
+ for path, original, payload in plans:
352
+ _replace(path, payload)
353
+ written.append((path, original))
354
+ except OSError as exc:
355
+ for path, original in written:
356
+ try:
357
+ _replace(path, original)
358
+ except OSError:
359
+ print(f"rollback failed for {path}", file=sys.stderr)
360
+ print(f"write failed: {exc}", file=sys.stderr)
361
+ return 1
362
+ return 0
363
+
364
+
365
+ def main(argv: list[str]) -> int:
366
+ if len(argv) == 3 and argv[1] == "check":
367
+ return check(Path(argv[2]))
368
+ if len(argv) == 4 and argv[1] == "bump":
369
+ return bump(Path(argv[2]), argv[3])
370
+ print("usage: release_versions.py check <root> | bump <root> <version>", file=sys.stderr)
371
+ return 2
372
+
373
+
374
+ if __name__ == "__main__":
375
+ sys.exit(main(sys.argv))
@@ -0,0 +1,109 @@
1
+ ---
2
+ name: clean
3
+ description: Removes unnecessary project-directory files with approval. Use when deleting
4
+ build artifacts, finding unused files, or clearing temporary files.
5
+ metadata:
6
+ opencode/autoinvoke: 'false'
7
+ ---
8
+
9
+ # Project File Cleaner
10
+
11
+ Orchestrate 6 parallel cleanup agents to analyze and remove unnecessary files from project directories with comprehensive safety measures and user confirmation checkpoints.
12
+
13
+ ## Arguments
14
+
15
+ Parse `$ARGUMENTS` for:
16
+
17
+ - **target-directory**: First non-flag argument (default: `.`)
18
+ - **--dry-run**: Preview only, no changes
19
+ - **--report-only**: Generate report without deletions
20
+ - **--safe-mode**: Extra confirmation per category
21
+
22
+ **Questions:** class `confirm-destructive` (both deletion prompts); headless (no question tool or chat turn): behave as `--report-only`. See `{{package-root}}/shared/references/question-policy.md`.
23
+
24
+ ### Deprecated: `--include-git`
25
+
26
+ If `$ARGUMENTS` contains `--include-git`: ignore the flag, keep every other argument unchanged, and display this notice exactly once, before Phase 0 (including before any `--dry-run` stop):
27
+
28
+ > `--include-git` is deprecated and ignored. This skill cleans project-directory files only — it performs no Git audit and no Git cleanup. For branches, worktrees, remotes, stashes, tags, PRs, or issues, run `/ycc:git-cleanup` separately. Never invoked automatically on your behalf.
29
+
30
+ Never auto-chain `/ycc:git-cleanup`, and never treat `--include-git` as consent to run it.
31
+
32
+ ### Scope and Git-only requests
33
+
34
+ This skill cleans files present in the project directory only. It never audits or changes Git refs, history, or submodules, and `.git` metadata stays protected.
35
+
36
+ If the request concerns only Git resources, STOP before Phase 0 and deploy no agents. Route branches, worktrees, remotes, stashes, tags, PRs, or issues to `/ycc:git-cleanup`; say history rewriting and submodule cleanup are out of scope for both skills.
37
+
38
+ ## Phase 0: Setup
39
+
40
+ 1. **Validate target directory** exists
41
+ 2. **Detect project type** using: `{{package-root}}/skills/clean/scripts/detect-project-type.sh "$TARGET_DIR"`
42
+ 3. **Read safety configuration** from `{{package-root}}/skills/clean/references/safety-config.md`
43
+ 4. **Create working directory**: `$TARGET_DIR/.cleanup-analysis/findings/`
44
+ 5. **Initialize progress tracking** with the task tools for all phases
45
+ 6. **If --dry-run**: Display analysis plan and **STOP**
46
+
47
+ ## Phase 1: Parallel Agent Deployment
48
+
49
+ Read agent prompts from `{{package-root}}/skills/clean/references/agent-prompts.md`.
50
+
51
+ Deploy all 6 agents in a **SINGLE message** with **MULTIPLE parallel subagent invocations** using subagent type `project-file-cleaner`:
52
+
53
+ | Agent | Findings File (orchestrator-written) |
54
+ | ---------- | ------------------------------------ |
55
+ | Code Files | `findings/code-files.md` |
56
+ | Binaries | `findings/binaries.md` |
57
+ | Assets | `findings/assets.md` |
58
+ | Docs | `findings/documentation.md` |
59
+ | Config | `findings/config.md` |
60
+ | Docker | `findings/docker.md` |
61
+
62
+ Substitute `{{TARGET_DIR}}` and `{{PROJECT_TYPE}}` in each prompt. Each agent receives: target directory, project type, safety configuration, and specific search patterns. Agents are read-only: they return findings inline in the Common Output Format; they never write files or run commands.
63
+
64
+ **Persistence (orchestrator-owned)**: as each native `subagent` call returns, write its returned findings verbatim to that agent's findings file under `$TARGET_DIR/.cleanup-analysis/findings/` using the exact file names and Common Output Format above — `generate-report.sh` parses those paths and headings. An empty, missing, or malformed return is a failed agent: STOP before Phase 2, report the failed category, and retry or request user intervention. Never treat missing output as zero findings or reuse files from a previous run. Proceed only after all six valid returns from this run have been persisted; verify each file exists and matches the Common Output Format. A valid zero-findings response still includes the required headings and summary.
65
+
66
+ ## Phase 2: Findings Consolidation
67
+
68
+ After all agents complete:
69
+
70
+ 1. Read all findings files
71
+ 2. Deduplicate across agents
72
+ 3. Calculate space savings: `du -h "$filepath"` for each file
73
+ 4. Categorize by risk level (low/medium/high)
74
+
75
+ ## Phase 3: Report Generation and User Review
76
+
77
+ 1. Run: `{{package-root}}/skills/clean/scripts/generate-report.sh "$TARGET_DIR"`
78
+ 2. Run safety validation: `{{package-root}}/skills/clean/scripts/validate-safety.sh "$TARGET_DIR/.cleanup-analysis/cleanup-report.md"`
79
+ 3. Fix any violations before proceeding
80
+ 4. **If --report-only**: Display report summary and **STOP**
81
+ 5. Present findings to user with ask the user (show report / summary / proceed / cancel)
82
+ 6. **If --safe-mode**: Ask confirmation per category
83
+
84
+ ## Phase 4: Safe Execution
85
+
86
+ 1. Create backup list at `$TARGET_DIR/.cleanup-analysis/removal-list.txt`
87
+ 2. Final confirmation with ask the user before any deletions
88
+ 3. Execute removal, tracking success/failure counts
89
+ 4. Handle errors gracefully (continue on single file failure)
90
+
91
+ ## Phase 5: Verification
92
+
93
+ 1. Verify files removed, no broken symlinks, project integrity
94
+ 2. Calculate actual space recovered
95
+ 3. Generate final summary with results, analysis file locations, and next steps
96
+
97
+ ---
98
+
99
+ ## Quality Standards
100
+
101
+ Each cleanup agent must: focus on specific category, execute 10+ diverse searches, include file sizes, check against safety config, flag uncertain cases for review. Each finding must include: full path, size, category, justification, risk level, confidence level.
102
+
103
+ ## Important Notes
104
+
105
+ - Act as orchestrator - coordinate cleanup agents, don't analyze files directly
106
+ - Deploy all 6 agents in parallel (single message with 6 Agent calls)
107
+ - Safety first - always validate before deletion
108
+ - User confirmation required before any destructive operations
109
+ - Preserve all cleanup reports and removal lists
@@ -0,0 +1,199 @@
1
+ # Cleanup Agent Prompts
2
+
3
+ ## Contents
4
+
5
+ - Agent Configuration Table
6
+ - Code Files Agent Prompt
7
+ - Binaries Agent Prompt
8
+ - Assets Agent Prompt
9
+ - Documentation Agent Prompt
10
+ - Configuration Agent Prompt
11
+ - Docker/Container Agent Prompt
12
+ - Common Output Format
13
+
14
+ Detailed prompts for each of the 6 parallel cleanup agents. Each agent focuses on a specific category and follows strict safety protocols.
15
+
16
+ ---
17
+
18
+ ## Agent Configuration Table
19
+
20
+ | Agent | Focus Area | Findings File (orchestrator-written) |
21
+ | ---------------- | ------------------------------------ | ------------------------------------ |
22
+ | Code Files | Old code, temp files, orphaned files | `findings/code-files.md` |
23
+ | Binaries | Compiled binaries, build artifacts | `findings/binaries.md` |
24
+ | Assets | Unused images, media, duplicates | `findings/assets.md` |
25
+ | Documentation | Outdated docs, drafts, duplicates | `findings/documentation.md` |
26
+ | Config | Unused config, env files, locks | `findings/config.md` |
27
+ | Docker/Container | Docker artifacts, volume mounts | `findings/docker.md` |
28
+
29
+ All agents use subagent type `project-file-cleaner`.
30
+
31
+ ---
32
+
33
+ ## Code Files Agent Prompt
34
+
35
+ ```
36
+ You are a specialized code cleanup agent analyzing {{TARGET_DIR}} for unnecessary code files.
37
+
38
+ Project Type: {{PROJECT_TYPE}}
39
+
40
+ Search for:
41
+ 1. Backup/old versions: *.old, *.bak, *.backup, *_old.*, *.orig, *.save, files ending with ~, .v1/.v2 suffixes, directories named "old", "backup", "archive", "deprecated"
42
+ 2. Temporary files: *.tmp, *.temp, *.swp, *.swo, .#*, *~, *.pyc, *.pyo, __pycache__/, *.class, *.o, *.obj
43
+ 3. Orphaned files: Test files for removed features, implementation files without imports/references, files in directories that don't match project structure
44
+ 4. Dead code files: Entirely commented out files, superseded files
45
+
46
+ Safety - NEVER analyze: .git/, node_modules/, .venv/, venv/, vendor/, dist/, build/, .claude/, logs/
47
+ Safety - NEVER flag: README.md, LICENSE, .gitignore, package.json, go.mod, Cargo.toml, requirements.txt, Dockerfile
48
+
49
+ Output each file as:
50
+ ### [File Path]
51
+ - **Size**: [size]
52
+ - **Last Modified**: [date]
53
+ - **Reason**: [justification]
54
+ - **Risk Level**: [low/medium/high]
55
+ - **Confidence**: [high/medium/low]
56
+
57
+ Return your findings inline as your final response, in the Common Output Format (title, Generated/Target Directory/Project Type, ## Findings with one ### entry per file, ## Summary with Total Files Found / Total Size / risk counts, ## Recommended Actions). You are read-only: do not write files or run commands. The orchestrator persists your response to the findings file.
58
+ ```
59
+
60
+ ---
61
+
62
+ ## Binaries Agent Prompt
63
+
64
+ ```
65
+ You are a specialized binaries cleanup agent analyzing {{TARGET_DIR}} for unnecessary compiled files.
66
+
67
+ Project Type: {{PROJECT_TYPE}}
68
+
69
+ Search for:
70
+ 1. Compiled binaries: Executable files without source, .exe, .dll, .so, .dylib, .a, .lib
71
+ 2. Build artifacts: *.o, *.obj, *.pyc, __pycache__/, *.class, .tsbuildinfo, *.wasm outside dist/
72
+ 3. Debug files: *.pdb, *.dSYM/, core.*, *.map files outside dist/
73
+ 4. Package artifacts: *.tar.gz, *.zip in build/, .egg, .whl in root, .deb, .rpm in root
74
+
75
+ Project-specific: Docker=binaries shouldn't be in repo; Node.js=.node outside node_modules suspicious; Go=executables matching project name in root; Python=all .pyc removable
76
+
77
+ Safety - Protected: .git/, node_modules/, .venv/, vendor/, .claude/
78
+
79
+ Return your findings inline as your final response, in the Common Output Format (title, Generated/Target Directory/Project Type, ## Findings with one ### entry per file, ## Summary with Total Files Found / Total Size / risk counts, ## Recommended Actions). You are read-only: do not write files or run commands. The orchestrator persists your response to the findings file.
80
+ ```
81
+
82
+ ---
83
+
84
+ ## Assets Agent Prompt
85
+
86
+ ```
87
+ You are a specialized assets cleanup agent analyzing {{TARGET_DIR}} for unnecessary media files.
88
+
89
+ Project Type: {{PROJECT_TYPE}}
90
+
91
+ Search for:
92
+ 1. Duplicates: Same name different dirs, numbered suffixes (image-1.png, image-copy.png), same size different locations, multiple versions (logo.png, logo-old.png)
93
+ 2. Unused assets: Images/media not referenced in code, CSS backgrounds not used, media not linked in HTML/Markdown
94
+ 3. Oversized: Images >5MB, uncompressed video, raw audio (.wav) without .mp3, source files (.psd, .ai, .sketch) in production
95
+ 4. Placeholders: Files named sample/placeholder/demo/test, lorem ipsum images, stock photo watermarks
96
+
97
+ File types: .jpg, .jpeg, .png, .gif, .webp, .svg, .ico, .bmp, .psd, .ai, .mp4, .avi, .mov, .mp3, .wav, .ogg, .pdf, fonts not in CSS
98
+
99
+ Safety - Protected: .git/, node_modules/, favicon files, logos in use, assets in package.json
100
+
101
+ Return your findings inline as your final response, in the Common Output Format (title, Generated/Target Directory/Project Type, ## Findings with one ### entry per file, ## Summary with Total Files Found / Total Size / risk counts, ## Recommended Actions). You are read-only: do not write files or run commands. The orchestrator persists your response to the findings file.
102
+ ```
103
+
104
+ ---
105
+
106
+ ## Documentation Agent Prompt
107
+
108
+ ```
109
+ You are a specialized documentation cleanup agent analyzing {{TARGET_DIR}} for outdated docs.
110
+
111
+ Project Type: {{PROJECT_TYPE}}
112
+
113
+ Search for:
114
+ 1. Outdated docs: READMEs describing removed features, API docs for removed endpoints, installation guides for deprecated methods
115
+ 2. Duplicate docs: Multiple READMEs saying same thing, same content in .md and .txt, wiki exports duplicating in-repo docs
116
+ 3. Drafts: Files named draft/WIP/TODO/scratch, [DRAFT]/[WIP] in title, incomplete documents, meeting notes >6 months old
117
+ 4. Auto-generated for removed code: JSDoc/Godoc for deleted functions, API docs from removed code
118
+ 5. Redundant: CHANGELOG migrated to GitHub Releases, local copies of library docs
119
+
120
+ File types: .md, .markdown, .txt, .rtf, .html docs, .pdf guides, .adoc, .rst, .org
121
+
122
+ Safety - Protected: README.md (root), LICENSE, CONTRIBUTING.md, CODE_OF_CONDUCT.md, CHANGELOG.md, docs/index.md, .github/, .claude/
123
+
124
+ Return your findings inline as your final response, in the Common Output Format (title, Generated/Target Directory/Project Type, ## Findings with one ### entry per file, ## Summary with Total Files Found / Total Size / risk counts, ## Recommended Actions). You are read-only: do not write files or run commands. The orchestrator persists your response to the findings file.
125
+ ```
126
+
127
+ ---
128
+
129
+ ## Configuration Agent Prompt
130
+
131
+ ```
132
+ You are a specialized config cleanup agent analyzing {{TARGET_DIR}} for unnecessary configs.
133
+
134
+ Project Type: {{PROJECT_TYPE}}
135
+
136
+ Search for:
137
+ 1. Unused tool configs: .eslintrc without eslint dependency, .babelrc without babel, webpack.config.js without webpack, jest.config.js without jest
138
+ 2. Duplicate configs: Multiple formats (.eslintrc.js + .eslintrc.json), old and new versions, backup configs
139
+ 3. Environment files (SECURITY): .env (not .env.example), .env.local, *.secret, credentials.json, auth.json - flag for security review
140
+ 4. Lock file conflicts: package-lock.json + yarn.lock + pnpm-lock.yaml simultaneously
141
+ 5. Obsolete: Configs for deprecated tools, IDE configs for unused IDEs
142
+
143
+ Safety - NEVER flag: .gitignore, .editorconfig, .nvmrc, tsconfig.json, package.json, go.mod, Cargo.toml
144
+ Safety - Flag [SECURITY] for: .env files, files with tokens/keys/passwords, database connection strings
145
+
146
+ Return your findings inline as your final response, in the Common Output Format (title, Generated/Target Directory/Project Type, ## Findings with one ### entry per file, ## Summary with Total Files Found / Total Size / risk counts, ## Recommended Actions). You are read-only: do not write files or run commands. The orchestrator persists your response to the findings file.
147
+ ```
148
+
149
+ ---
150
+
151
+ ## Docker/Container Agent Prompt
152
+
153
+ ```
154
+ You are a specialized Docker cleanup agent analyzing {{TARGET_DIR}} for unnecessary Docker files.
155
+
156
+ Project Type: {{PROJECT_TYPE}}
157
+
158
+ Search for:
159
+ 1. Backup Docker files: Dockerfile.old, docker-compose.backup.yml, numbered versions (Dockerfile.v1)
160
+ 2. Override files: docker-compose.override.yml (if not gitignored), docker-compose.local.yml
161
+ 3. Volume mount artifacts: Database files (.db, .sqlite) in root, container log files, cache dirs from containerized apps
162
+ 4. Container build artifacts: .dockerignore.backup, old build contexts, temporary Dockerfiles, build logs
163
+ 5. Registry artifacts: Exported images (.tar, .tar.gz in root), registry auth files outside .docker/
164
+
165
+ Safety - Protected: Dockerfile (main), docker-compose.yml (main), .dockerignore, docker/ directory
166
+ Safety - Flag [SECURITY] for: Dockerfiles with hardcoded secrets, compose with plaintext passwords
167
+
168
+ Return your findings inline as your final response, in the Common Output Format (title, Generated/Target Directory/Project Type, ## Findings with one ### entry per file, ## Summary with Total Files Found / Total Size / risk counts, ## Recommended Actions). You are read-only: do not write files or run commands. The orchestrator persists your response to the findings file.
169
+ ```
170
+
171
+ ---
172
+
173
+ ## Common Output Format
174
+
175
+ All agents return findings inline using this format; the orchestrator writes each response verbatim to the agent's findings file:
176
+
177
+ ```markdown
178
+ # [Category] Cleanup Analysis
179
+
180
+ **Generated**: [timestamp]
181
+ **Target Directory**: {{TARGET_DIR}}
182
+ **Project Type**: {{PROJECT_TYPE}}
183
+
184
+ ## Findings
185
+
186
+ [Individual file entries]
187
+
188
+ ## Summary
189
+
190
+ - **Total Files Found**: [count]
191
+ - **Total Size**: [size]
192
+ - **Low Risk**: [count] files
193
+ - **Medium Risk**: [count] files
194
+ - **High Risk**: [count] files
195
+
196
+ ## Recommended Actions
197
+
198
+ [Agent-specific recommendations]
199
+ ```