@yandy-r/ycc-opencode 0.0.0-bootstrap.0 → 6.0.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/AGENTS.md +38 -0
- package/LICENSE +21 -0
- package/README.md +42 -0
- package/agents/ansible-automation-expert.md +115 -0
- package/agents/api-docs-expert.md +146 -0
- package/agents/api-documenter.md +105 -0
- package/agents/architect.md +264 -0
- package/agents/architecture-analyst.md +99 -0
- package/agents/backport-conflict-resolver.md +134 -0
- package/agents/cloudflare-architect.md +85 -0
- package/agents/cloudflare-developer.md +196 -0
- package/agents/code-architect.md +101 -0
- package/agents/code-documenter.md +114 -0
- package/agents/code-explorer.md +99 -0
- package/agents/code-finder.md +83 -0
- package/agents/code-researcher.md +102 -0
- package/agents/code-reviewer.md +268 -0
- package/agents/code-simplifier.md +77 -0
- package/agents/codebase-advisor.md +130 -0
- package/agents/db-modifier.md +235 -0
- package/agents/docs-git-committer.md +220 -0
- package/agents/documentation-writer.md +92 -0
- package/agents/feature-researcher.md +121 -0
- package/agents/feature-writer.md +89 -0
- package/agents/frontend-ui-developer.md +98 -0
- package/agents/git-cleanup.md +173 -0
- package/agents/go-api-architect.md +172 -0
- package/agents/go-expert-architect.md +147 -0
- package/agents/implementor.md +167 -0
- package/agents/library-docs-writer.md +128 -0
- package/agents/nextjs-ux-ui-expert.md +127 -0
- package/agents/nodejs-backend-architect.md +112 -0
- package/agents/nodejs-backend-developer.md +184 -0
- package/agents/planner.md +257 -0
- package/agents/pr-comment-fixer.md +284 -0
- package/agents/practices-researcher.md +80 -0
- package/agents/project-file-cleaner.md +140 -0
- package/agents/prp-researcher.md +231 -0
- package/agents/python-developer.md +171 -0
- package/agents/python-expert-architect.md +188 -0
- package/agents/readme-generator.md +100 -0
- package/agents/release-fix-applier.md +194 -0
- package/agents/releaser.md +147 -0
- package/agents/research-specialist.md +106 -0
- package/agents/reverse-proxy-architect.md +131 -0
- package/agents/review-fixer.md +264 -0
- package/agents/root-cause-analyzer.md +105 -0
- package/agents/rust-build-resolver.md +183 -0
- package/agents/rust-expert-architect.md +149 -0
- package/agents/rust-reviewer.md +126 -0
- package/agents/sql-database-developer.md +195 -0
- package/agents/systems-engineering-expert.md +203 -0
- package/agents/terraform-architect.md +109 -0
- package/agents/terraform-developer.md +229 -0
- package/agents/test-strategy-planner.md +126 -0
- package/agents/turso-database-architect.md +139 -0
- package/agents/typescript-developer.md +170 -0
- package/agents/typescript-expert-architect.md +167 -0
- package/index.js +260 -0
- package/package.json +33 -7
- package/registration.json +4384 -0
- package/shared/references/agent-native-setup.md +121 -0
- package/shared/references/branch-prep.md +31 -0
- package/shared/references/branching-model.md +162 -0
- package/shared/references/ci-monitoring.md +445 -0
- package/shared/references/forge-detection.md +162 -0
- package/shared/references/goal-pairing.md +53 -0
- package/shared/references/pr-base-and-backport.md +143 -0
- package/shared/references/review-artifact-format.md +141 -0
- package/shared/references/review-checklist.md +161 -0
- package/shared/references/review-dispatch.md +71 -0
- package/shared/references/session-state.md +159 -0
- package/shared/references/standalone-dispatch.md +298 -0
- package/shared/references/target-capability-matrix.md +325 -0
- package/shared/references/visual-mode.md +155 -0
- package/shared/references/worktree-strategy.md +310 -0
- package/shared/scripts/backport-audit.sh +283 -0
- package/shared/scripts/ci-monitor.sh +637 -0
- package/shared/scripts/lib/backport-lib.sh +47 -0
- package/shared/scripts/lib/ci-classify.sh +103 -0
- package/shared/scripts/lib/forge.sh +264 -0
- package/shared/scripts/lib/release-state-lib.sh +300 -0
- package/shared/scripts/list-worktrees.sh +178 -0
- package/shared/scripts/merge-children.sh +82 -0
- package/shared/scripts/move-plan-to-worktree.sh +231 -0
- package/shared/scripts/pr-guard.sh +283 -0
- package/shared/scripts/prepare-feature-branch.sh +326 -0
- package/shared/scripts/release-ci-monitor.sh +671 -0
- package/shared/scripts/release-state-update.sh +216 -0
- package/shared/scripts/release-state.sh +178 -0
- package/shared/scripts/report-bundle-drift.sh +343 -0
- package/shared/scripts/require-python.sh +17 -0
- package/shared/scripts/resolve-plans-dir.sh +262 -0
- package/shared/scripts/rules-pointer.sh +20 -0
- package/shared/scripts/rules_pointer.py +267 -0
- package/shared/scripts/setup-worktree.sh +288 -0
- package/shared/scripts/validate-file-paths.sh +249 -0
- package/shared/scripts/visual-egress-guard.sh +303 -0
- package/shared/scripts/visual-recap-collect.sh +247 -0
- package/shared/scripts/worktree-paths.sh +86 -0
- package/skills/backport/SKILL.md +291 -0
- package/skills/backport/scripts/cherry-pick-pr.sh +232 -0
- package/skills/backport/scripts/find-pending.sh +199 -0
- package/skills/blueprint/SKILL.md +410 -0
- package/skills/blueprint/references/bootstrap-mapping.md +87 -0
- package/skills/bundle-author/SKILL.md +119 -0
- package/skills/bundle-author/references/surface-map.md +128 -0
- package/skills/bundle-author/references/templates/agent-template.md +21 -0
- package/skills/bundle-author/references/templates/skill-template.md +36 -0
- package/skills/bundle-author/references/when-not-to-scaffold.md +85 -0
- package/skills/bundle-author/scripts/scaffold-skill.sh +156 -0
- package/skills/bundle-release/SKILL.md +188 -0
- package/skills/bundle-release/references/release-checklist.md +196 -0
- package/skills/bundle-release/references/release-notes-template.md +48 -0
- package/skills/bundle-release/references/version-policy.md +150 -0
- package/skills/bundle-release/scripts/bump-version.sh +97 -0
- package/skills/bundle-release/scripts/draft-notes.sh +222 -0
- package/skills/bundle-release/scripts/preflight.sh +164 -0
- package/skills/bundle-release/scripts/release_versions.py +361 -0
- package/skills/clean/SKILL.md +107 -0
- package/skills/clean/references/agent-prompts.md +199 -0
- package/skills/clean/references/safety-config.md +125 -0
- package/skills/clean/scripts/detect-project-type.sh +423 -0
- package/skills/clean/scripts/generate-report.sh +245 -0
- package/skills/clean/scripts/validate-safety.sh +401 -0
- package/skills/code-report/SKILL.md +375 -0
- package/skills/code-report/scripts/check-prerequisites.sh +65 -0
- package/skills/code-report/templates/report-structure.md +202 -0
- package/skills/code-review/SKILL.md +153 -0
- package/skills/code-review/references/pr-procedure.md +311 -0
- package/skills/compatibility-audit/SKILL.md +226 -0
- package/skills/compatibility-audit/references/reading-the-report.md +159 -0
- package/skills/compatibility-audit/scripts/audit-install-assumptions.sh +372 -0
- package/skills/compatibility-audit/scripts/audit-target-features.sh +558 -0
- package/skills/deep-research/SKILL.md +251 -0
- package/skills/deep-research/references/analysis-prompts.md +702 -0
- package/skills/deep-research/references/completion-summary-template.md +66 -0
- package/skills/deep-research/references/persona-analogical.md +159 -0
- package/skills/deep-research/references/persona-archaeological.md +69 -0
- package/skills/deep-research/references/persona-contrarian.md +155 -0
- package/skills/deep-research/references/persona-futurist.md +70 -0
- package/skills/deep-research/references/persona-historical.md +142 -0
- package/skills/deep-research/references/persona-journalistic.md +69 -0
- package/skills/deep-research/references/persona-negative-space.md +70 -0
- package/skills/deep-research/references/persona-systems.md +69 -0
- package/skills/deep-research/references/synthesis-template.md +569 -0
- package/skills/deep-research/references/verification-log-template.md +32 -0
- package/skills/deep-research/scripts/check-prerequisites.sh +153 -0
- package/skills/deep-research/scripts/validate-research.sh +244 -0
- package/skills/feature-research/SKILL.md +292 -0
- package/skills/feature-research/scripts/validate-research.sh +159 -0
- package/skills/feature-research/scripts/validate-spec.sh +270 -0
- package/skills/feature-research/templates/research-agents.md +569 -0
- package/skills/feature-research/templates/spec-structure.md +437 -0
- package/skills/formatters/SKILL.md +207 -0
- package/skills/formatters/references/best-practices.md +78 -0
- package/skills/formatters/references/flag-reference.md +178 -0
- package/skills/formatters/references/stack-detection.md +119 -0
- package/skills/formatters/references/templates/husky-pre-commit.tmpl +13 -0
- package/skills/formatters/references/templates/justfile-snippet.just.tmpl +31 -0
- package/skills/formatters/references/templates/lefthook.yml.tmpl +22 -0
- package/skills/formatters/references/templates/lint-autofix.yml.tmpl +94 -0
- package/skills/formatters/references/templates/lint.yml.tmpl +85 -0
- package/skills/formatters/references/templates/makefile-snippet.mk.tmpl +34 -0
- package/skills/formatters/references/templates/package-json-scripts.json.tmpl +14 -0
- package/skills/formatters/references/templates/readme-section.md.tmpl +118 -0
- package/skills/formatters/scripts/apply-aliases.sh +245 -0
- package/skills/formatters/scripts/apply-ci.sh +136 -0
- package/skills/formatters/scripts/apply-docs.sh +187 -0
- package/skills/formatters/scripts/apply-hooks.sh +261 -0
- package/skills/formatters/scripts/bundle/format.sh +15 -0
- package/skills/formatters/scripts/bundle/go-tools.sh +119 -0
- package/skills/formatters/scripts/bundle/init-formatters.sh +517 -0
- package/skills/formatters/scripts/bundle/install-shellcheck.sh +85 -0
- package/skills/formatters/scripts/bundle/lib/excludes.sh +179 -0
- package/skills/formatters/scripts/bundle/lib/modified-files.sh +222 -0
- package/skills/formatters/scripts/bundle/lib/shellcheck-resolve.sh +81 -0
- package/skills/formatters/scripts/bundle/lib/shellcheck-version.sh +5 -0
- package/skills/formatters/scripts/bundle/lint.sh +15 -0
- package/skills/formatters/scripts/bundle/style.sh +1410 -0
- package/skills/formatters/scripts/bundle/templates/biome.json +81 -0
- package/skills/formatters/scripts/bundle/templates/clippy.toml +2 -0
- package/skills/formatters/scripts/bundle/templates/markdownlint.json +14 -0
- package/skills/formatters/scripts/bundle/templates/markdownlintignore +38 -0
- package/skills/formatters/scripts/bundle/templates/prettierignore +45 -0
- package/skills/formatters/scripts/bundle/templates/prettierrc.json +11 -0
- package/skills/formatters/scripts/bundle/templates/python-pyproject.toml +80 -0
- package/skills/formatters/scripts/bundle/templates/rustfmt.toml +41 -0
- package/skills/formatters/scripts/bundle/templates/tsconfig.json +21 -0
- package/skills/formatters/scripts/profile-style.sh +264 -0
- package/skills/frontend-design/SKILL.md +151 -0
- package/skills/frontend-patterns/SKILL.md +66 -0
- package/skills/frontend-patterns/references/animation.md +21 -0
- package/skills/frontend-patterns/references/components-and-state.md +40 -0
- package/skills/frontend-patterns/references/data-and-performance.md +34 -0
- package/skills/frontend-patterns/references/forms-errors-a11y.md +35 -0
- package/skills/git-cleanup/SKILL.md +286 -0
- package/skills/git-cleanup/references/active-code-rules.md +318 -0
- package/skills/git-cleanup/references/host-detection.md +217 -0
- package/skills/git-workflow/SKILL.md +130 -0
- package/skills/git-workflow/references/ci-monitoring-phase.md +130 -0
- package/skills/git-workflow/references/commit-phases.md +247 -0
- package/skills/git-workflow/references/examples-and-troubleshooting.md +47 -0
- package/skills/git-workflow/references/goal-pairing.md +23 -0
- package/skills/git-workflow/references/pr-creation.md +269 -0
- package/skills/git-workflow/scripts/analyze-changes.sh +266 -0
- package/skills/git-workflow/scripts/create-pr.sh +464 -0
- package/skills/git-workflow/scripts/validate-commit.sh +235 -0
- package/skills/git-workflow/templates/agent-prompts.md +518 -0
- package/skills/git-workflow/templates/commit-types.md +504 -0
- package/skills/git-workflow/templates/documentation-decision.md +509 -0
- package/skills/git-workflow/templates/pr-template.md +772 -0
- package/skills/go-patterns/SKILL.md +89 -0
- package/skills/go-patterns/references/design-and-tooling.md +336 -0
- package/skills/go-patterns/references/errors-and-concurrency.md +292 -0
- package/skills/go-testing/SKILL.md +133 -0
- package/skills/go-testing/references/advanced-testing.md +349 -0
- package/skills/go-testing/references/test-structure.md +277 -0
- package/skills/hooks-workflow/SKILL.md +232 -0
- package/skills/hooks-workflow/references/support-notes.md +134 -0
- package/skills/hooks-workflow/references/templates/claude-settings.json.tmpl +13 -0
- package/skills/hooks-workflow/references/templates/codex-config-fragment.toml.tmpl +9 -0
- package/skills/hooks-workflow/references/templates/cursor-rule-fragment.mdc.tmpl +16 -0
- package/skills/hooks-workflow/scripts/build-hook-config.sh +487 -0
- package/skills/hooks-workflow/scripts/verify-hooks.sh +257 -0
- package/skills/implement-plan/SKILL.md +221 -0
- package/skills/implement-plan/references/agent-task-prompt.md +214 -0
- package/skills/implement-plan/references/output-formats.md +150 -0
- package/skills/implement-plan/references/plan-inputs.md +126 -0
- package/skills/implement-plan/scripts/check-prerequisites.sh +78 -0
- package/skills/implement-plan/scripts/parse-dependencies.sh +206 -0
- package/skills/init/SKILL.md +272 -0
- package/skills/init/references/conventional-commits.md +114 -0
- package/skills/init/references/flag-reference.md +236 -0
- package/skills/init/references/label-taxonomy.md +115 -0
- package/skills/init/references/project-profile-heuristics.md +156 -0
- package/skills/init/references/template-library.md +129 -0
- package/skills/init/scripts/count-source-files.sh +60 -0
- package/skills/init/scripts/generate-agent-catalog.sh +193 -0
- package/skills/init/scripts/generate-mcp-catalog.sh +214 -0
- package/skills/init/scripts/migrate-rules.py +459 -0
- package/skills/init/scripts/migrate-rules.sh +26 -0
- package/skills/init/scripts/profile-project.sh +453 -0
- package/skills/init/scripts/render-template.py +226 -0
- package/skills/init/scripts/render-template.sh +25 -0
- package/skills/init/scripts/rules-report.sh +31 -0
- package/skills/init/scripts/rules_file_lib.py +41 -0
- package/skills/init/templates/AGENTS.md.tmpl +38 -0
- package/skills/init/templates/CLAUDE.md.tmpl +7 -0
- package/skills/init/templates/ai-rule.md.tmpl +3 -0
- package/skills/init/templates/cursor-rule.mdc.tmpl +7 -0
- package/skills/init/templates/git/commitlint.config.cjs.tmpl +40 -0
- package/skills/init/templates/git/gitignore.tmpl +120 -0
- package/skills/init/templates/git/gitmessage.tmpl +27 -0
- package/skills/init/templates/git/install-lefthook.sh.tmpl +131 -0
- package/skills/init/templates/git/lefthook-usage.md.tmpl +101 -0
- package/skills/init/templates/git/lefthook.yml.tmpl +64 -0
- package/skills/init/templates/github/bug_report.yml.tmpl +78 -0
- package/skills/init/templates/github/config.yml.tmpl +5 -0
- package/skills/init/templates/github/copilot-instructions.md.tmpl +24 -0
- package/skills/init/templates/github/docs_request.yml.tmpl +41 -0
- package/skills/init/templates/github/feature_request.yml.tmpl +59 -0
- package/skills/init/templates/github/labels.md.tmpl +75 -0
- package/skills/init/templates/github/pull_request_template.md.tmpl +66 -0
- package/skills/init/templates/github/workflows/pr-title-autofix.yml.tmpl +101 -0
- package/skills/init/templates/github/workflows/pr-title.yml.tmpl +55 -0
- package/skills/init/templates/workspace-report.md +83 -0
- package/skills/orchestrate/SKILL.md +165 -0
- package/skills/orchestrate/references/agent-catalog.md +601 -0
- package/skills/orchestrate/references/agent-prompts.md +495 -0
- package/skills/orchestrate/references/dispatch-playbook.md +333 -0
- package/skills/orchestrate/references/task-breakdown.md +410 -0
- package/skills/orchestrate/scripts/analyze-task.sh +139 -0
- package/skills/orchestrate/scripts/summarize-results.sh +160 -0
- package/skills/orchestrate/scripts/validate-agents.sh +92 -0
- package/skills/parallel-plan/SKILL.md +124 -0
- package/skills/plan/SKILL.md +134 -0
- package/skills/plan/references/enhanced-personas.md +131 -0
- package/skills/plan/references/personas-and-merge.md +77 -0
- package/skills/plan/references/plan-validation.md +65 -0
- package/skills/plan/references/planner-prompts.md +68 -0
- package/skills/plan/references/planning-tracks.md +73 -0
- package/skills/plan-workflow/SKILL.md +406 -0
- package/skills/plan-workflow/references/checkpoint-messages.md +370 -0
- package/skills/plan-workflow/references/plan-structure.md +238 -0
- package/skills/plan-workflow/references/planning-agents.md +511 -0
- package/skills/plan-workflow/references/research-agents-optimized.md +348 -0
- package/skills/plan-workflow/references/research-agents.md +436 -0
- package/skills/plan-workflow/references/shared-structure.md +152 -0
- package/skills/plan-workflow/references/validation-agents.md +363 -0
- package/skills/plan-workflow/scripts/check-prerequisites.sh +65 -0
- package/skills/plan-workflow/scripts/check-state.sh +190 -0
- package/skills/plan-workflow/scripts/persist-or-fail.sh +135 -0
- package/skills/plan-workflow/scripts/validate-analysis-artifacts.sh +216 -0
- package/skills/plan-workflow/scripts/validate-research-artifacts.sh +225 -0
- package/skills/plan-workflow/scripts/validate-shared.sh +229 -0
- package/skills/plan-workflow/scripts/validate-workflow-plan.sh +256 -0
- package/skills/pr-autofix/SKILL.md +307 -0
- package/skills/pr-autofix/references/ci-loop.md +64 -0
- package/skills/pr-autofix/references/comment-sources.md +197 -0
- package/skills/pr-autofix/references/data-shapes.md +87 -0
- package/skills/pr-autofix/references/goal-example.md +30 -0
- package/skills/pr-autofix/references/output-templates.md +162 -0
- package/skills/pr-autofix/references/prompt-injection-safety.md +165 -0
- package/skills/pr-autofix/references/related-skills.md +11 -0
- package/skills/pr-autofix/references/severity-mapping.md +146 -0
- package/skills/pr-autofix/scripts/fetch-pr-comments.sh +364 -0
- package/skills/pr-autofix/scripts/post-summary.sh +226 -0
- package/skills/pr-autofix/scripts/resolve-thread.sh +251 -0
- package/skills/prp-commit/SKILL.md +128 -0
- package/skills/prp-implement/SKILL.md +177 -0
- package/skills/prp-implement/references/agent-task-prompt.md +36 -0
- package/skills/prp-implement/references/detection.md +49 -0
- package/skills/prp-implement/references/dry-run.md +0 -0
- package/skills/prp-implement/references/report-output.md +204 -0
- package/skills/prp-implement/references/validation-and-failures.md +118 -0
- package/skills/prp-plan/SKILL.md +323 -0
- package/skills/prp-plan/references/enhanced-researchers.md +425 -0
- package/skills/prp-plan/references/parallel-additions.md +56 -0
- package/skills/prp-plan/references/plan-template.md +264 -0
- package/skills/prp-plan/references/synthesis-map.md +25 -0
- package/skills/prp-plan/scripts/preflight-enhanced-agents.sh +111 -0
- package/skills/prp-plan/scripts/validate-prp-plan.sh +368 -0
- package/skills/prp-pr/SKILL.md +402 -0
- package/skills/prp-prd/SKILL.md +442 -0
- package/skills/prp-spec/SKILL.md +274 -0
- package/skills/python-patterns/SKILL.md +103 -0
- package/skills/python-patterns/references/core-idioms.md +304 -0
- package/skills/python-patterns/references/design-and-tooling.md +407 -0
- package/skills/python-testing/SKILL.md +114 -0
- package/skills/python-testing/references/mocking-and-integration.md +395 -0
- package/skills/python-testing/references/pytest-core.md +366 -0
- package/skills/quick-fix/SKILL.md +246 -0
- package/skills/quick-review/SKILL.md +304 -0
- package/skills/release-model/SKILL.md +231 -0
- package/skills/release-model/references/pointer-and-labels.md +83 -0
- package/skills/release-model/references/signals-and-proposal.md +68 -0
- package/skills/release-model/references/template-placeholders.md +42 -0
- package/skills/release-model/references/upgrade-and-audit.md +131 -0
- package/skills/release-model/scripts/collect-signals.sh +459 -0
- package/skills/release-model/scripts/pointer-targets.sh +29 -0
- package/skills/release-model/templates/RELEASING.md.tmpl +151 -0
- package/skills/releaser/SKILL.md +251 -0
- package/skills/releaser/references/ci-optimization-checklist.md +149 -0
- package/skills/releaser/references/ci-templates/docker-release.yml +88 -0
- package/skills/releaser/references/ci-templates/generic-release.yml +69 -0
- package/skills/releaser/references/ci-templates/go-release.yml +50 -0
- package/skills/releaser/references/ci-templates/node-release.yml +126 -0
- package/skills/releaser/references/ci-templates/python-release.yml +95 -0
- package/skills/releaser/references/ci-templates/rust-release.yml +128 -0
- package/skills/releaser/references/ci-workflow-modes.md +42 -0
- package/skills/releaser/references/goal-pairing.md +37 -0
- package/skills/releaser/references/output-templates.md +143 -0
- package/skills/releaser/references/project-type-matrix.md +144 -0
- package/skills/releaser/references/release-branches.md +138 -0
- package/skills/releaser/references/release-ci-loop.md +249 -0
- package/skills/releaser/references/release-notes-template.md +42 -0
- package/skills/releaser/references/release-preparation.md +210 -0
- package/skills/releaser/scripts/check-release-branch.sh +235 -0
- package/skills/releaser/scripts/detect-project.sh +234 -0
- package/skills/releaser/scripts/draft-changelog.sh +387 -0
- package/skills/releaser/scripts/publish-release.sh +302 -0
- package/skills/research-to-issues/SKILL.md +285 -0
- package/skills/research-to-issues/references/label-taxonomy.md +48 -0
- package/skills/research-to-issues/references/parse-deep-research.md +86 -0
- package/skills/research-to-issues/references/parse-feature-spec.md +143 -0
- package/skills/research-to-issues/references/parse-parallel-plan.md +124 -0
- package/skills/research-to-issues/references/parse-prd.md +184 -0
- package/skills/research-to-issues/references/parse-prp-plan.md +237 -0
- package/skills/research-to-issues/references/plan-display-format.md +136 -0
- package/skills/research-to-issues/scripts/validate-prerequisites.sh +312 -0
- package/skills/research-to-issues/templates/feature-issue.md +131 -0
- package/skills/research-to-issues/templates/task-issue.md +104 -0
- package/skills/research-to-issues/templates/tracking-issue.md +126 -0
- package/skills/resume-session/SKILL.md +152 -0
- package/skills/review-fix/SKILL.md +229 -0
- package/skills/review-fix/references/fix-report.md +121 -0
- package/skills/review-fix/references/fixer-dispatch.md +79 -0
- package/skills/review-fix/references/plan.md +119 -0
- package/skills/rust-patterns/SKILL.md +85 -0
- package/skills/rust-patterns/references/concurrency-unsafe-modules.md +243 -0
- package/skills/rust-patterns/references/ownership-errors-types.md +262 -0
- package/skills/rust-testing/SKILL.md +99 -0
- package/skills/rust-testing/references/advanced-testing.md +247 -0
- package/skills/rust-testing/references/unit-and-integration.md +193 -0
- package/skills/save-session/SKILL.md +159 -0
- package/skills/shared-context/SKILL.md +101 -0
- package/skills/ts-patterns/SKILL.md +159 -0
- package/skills/ts-patterns/references/async-runtimes-tooling.md +375 -0
- package/skills/ts-patterns/references/types-errors-modules.md +336 -0
- package/skills/ts-testing/SKILL.md +151 -0
- package/skills/ts-testing/references/advanced-testing.md +350 -0
- package/skills/ts-testing/references/vitest-core.md +318 -0
- package/skills/visual-plan/SKILL.md +221 -0
- package/skills/visual-plan/references/canvas.md +132 -0
- package/skills/visual-plan/references/document-quality.md +178 -0
- package/skills/visual-plan/references/exemplar.md +120 -0
- package/skills/visual-plan/references/wireframe.md +212 -0
- package/skills/visual-plan/scripts/derive-visual-dir.sh +77 -0
- package/skills/visual-recap/SKILL.md +238 -0
- package/skills/visual-recap/references/wireframe.md +237 -0
- package/skills/write-docs/SKILL.md +354 -0
- package/skills/write-docs/scripts/audit-documentation.sh +190 -0
- package/skills/write-docs/scripts/generate-doc-index.sh +125 -0
- package/skills/write-docs/scripts/verify-links.sh +81 -0
- package/skills/write-docs/templates/docs-readme.md +34 -0
- package/skills/write-docs/templates/documentation-strategy.md +91 -0
|
@@ -0,0 +1,361 @@
|
|
|
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`` and
|
|
20
|
+
``.cursor-plugin/marketplace.json``, plus plugin and package manifests under
|
|
21
|
+
``.codex-plugin/`` and ``.cursor-plugin/`` (the directory and its direct child
|
|
22
|
+
directories), plus ``packages/<package>`` and ``packages/<runtime>/<package>``
|
|
23
|
+
plugin/package manifests (same bounded manifest filenames).
|
|
24
|
+
|
|
25
|
+
Included native manifests must exist and have a version. Unmodeled optional files
|
|
26
|
+
and versionless marketplace entries never gain a field.
|
|
27
|
+
"""
|
|
28
|
+
|
|
29
|
+
from __future__ import annotations
|
|
30
|
+
|
|
31
|
+
import json
|
|
32
|
+
import os
|
|
33
|
+
import sys
|
|
34
|
+
import tempfile
|
|
35
|
+
from dataclasses import dataclass, field
|
|
36
|
+
from pathlib import Path
|
|
37
|
+
from typing import Any
|
|
38
|
+
|
|
39
|
+
PLUGIN_REL = "ycc/.claude-plugin/plugin.json"
|
|
40
|
+
SOURCE_MARKETPLACE_REL = ".claude-plugin/marketplace.json"
|
|
41
|
+
OPTIONAL_MARKETPLACES = (".agents/plugins/marketplace.json", ".cursor-plugin/marketplace.json")
|
|
42
|
+
MANIFEST_SUBDIRS = (".claude-plugin", ".codex-plugin", ".cursor-plugin")
|
|
43
|
+
EXCLUDED_NAME = "ycc-mods"
|
|
44
|
+
EXCLUDED_SOURCE_PREFIX = "ycc/mods"
|
|
45
|
+
PACKAGE_RUNTIMES = ("claude", "codex", "cursor", "opencode", "agents")
|
|
46
|
+
MODEL_REL = "ycc/settings/packages.json"
|
|
47
|
+
Key = str | int
|
|
48
|
+
|
|
49
|
+
|
|
50
|
+
class ReleaseError(Exception):
|
|
51
|
+
"""A discovery, parse, or write problem attributable to one or more files."""
|
|
52
|
+
|
|
53
|
+
|
|
54
|
+
@dataclass(frozen=True)
|
|
55
|
+
class VersionField:
|
|
56
|
+
rel: str
|
|
57
|
+
label: str
|
|
58
|
+
keys: tuple[Key, ...]
|
|
59
|
+
value: str
|
|
60
|
+
|
|
61
|
+
|
|
62
|
+
@dataclass
|
|
63
|
+
class Surface:
|
|
64
|
+
rel: str
|
|
65
|
+
data: Any
|
|
66
|
+
fields: list[VersionField] = field(default_factory=list)
|
|
67
|
+
mutable: bool = True
|
|
68
|
+
|
|
69
|
+
|
|
70
|
+
def _load(root: Path, rel: str) -> Any:
|
|
71
|
+
path = root / rel
|
|
72
|
+
try:
|
|
73
|
+
resolved = path.resolve(strict=True)
|
|
74
|
+
resolved.relative_to(root.resolve())
|
|
75
|
+
except FileNotFoundError as exc:
|
|
76
|
+
raise ReleaseError(f"{rel}: file not found") from exc
|
|
77
|
+
except (OSError, ValueError) as exc:
|
|
78
|
+
raise ReleaseError(f"{rel}: unreadable or resolves outside repository") from exc
|
|
79
|
+
try:
|
|
80
|
+
return json.loads(resolved.read_text(encoding="utf-8"))
|
|
81
|
+
except (OSError, UnicodeDecodeError, json.JSONDecodeError) as exc:
|
|
82
|
+
raise ReleaseError(f"{rel}: invalid JSON: {exc}") from exc
|
|
83
|
+
|
|
84
|
+
|
|
85
|
+
def _version_field(rel: str, container: Any, keys: tuple[Key, ...], label: str) -> list[VersionField]:
|
|
86
|
+
"""Return a one-item list when ``container`` has a version; error if not a string."""
|
|
87
|
+
if not isinstance(container, dict):
|
|
88
|
+
raise ReleaseError(f"{rel}: {label.rsplit('.version', 1)[0] or 'root'}: expected object")
|
|
89
|
+
if "version" not in container:
|
|
90
|
+
return []
|
|
91
|
+
value = container["version"]
|
|
92
|
+
if not isinstance(value, str) or not value.strip():
|
|
93
|
+
raise ReleaseError(f"{rel}: {label}: expected non-empty string, got {value!r}")
|
|
94
|
+
return [VersionField(rel, label, keys, value)]
|
|
95
|
+
|
|
96
|
+
|
|
97
|
+
def _is_excluded_entry(entry: dict[str, Any]) -> bool:
|
|
98
|
+
if entry.get("name") == EXCLUDED_NAME:
|
|
99
|
+
return True
|
|
100
|
+
source = entry.get("source")
|
|
101
|
+
if isinstance(source, dict):
|
|
102
|
+
source = source.get("path")
|
|
103
|
+
if isinstance(source, str):
|
|
104
|
+
source = source.removeprefix("./").rstrip("/")
|
|
105
|
+
return source == EXCLUDED_SOURCE_PREFIX or source.startswith(EXCLUDED_SOURCE_PREFIX + "/")
|
|
106
|
+
return False
|
|
107
|
+
|
|
108
|
+
|
|
109
|
+
def _marketplace_surface(root: Path, rel: str, required: bool, mutable: bool) -> Surface:
|
|
110
|
+
data = _load(root, rel)
|
|
111
|
+
surface = Surface(rel, data, mutable=mutable)
|
|
112
|
+
if not isinstance(data, dict):
|
|
113
|
+
raise ReleaseError(f"{rel}: expected a JSON object")
|
|
114
|
+
if "metadata" in data:
|
|
115
|
+
surface.fields += _version_field(rel, data["metadata"], ("metadata", "version"), "metadata.version")
|
|
116
|
+
plugins = data.get("plugins")
|
|
117
|
+
if not isinstance(plugins, list) or (required and not plugins):
|
|
118
|
+
raise ReleaseError(f"{rel}: plugins: expected {'non-empty ' if required else ''}array")
|
|
119
|
+
for index, entry in enumerate(plugins):
|
|
120
|
+
label = f"plugins[{index}].version"
|
|
121
|
+
if not isinstance(entry, dict):
|
|
122
|
+
raise ReleaseError(f"{rel}: plugins[{index}]: expected object")
|
|
123
|
+
if _is_excluded_entry(entry):
|
|
124
|
+
continue
|
|
125
|
+
surface.fields += _version_field(rel, entry, ("plugins", index, "version"), label)
|
|
126
|
+
return surface
|
|
127
|
+
|
|
128
|
+
|
|
129
|
+
def _manifest_surface(root: Path, rel: str, mutable: bool, required: bool = False) -> Surface | None:
|
|
130
|
+
if not required and not (root / rel).is_file():
|
|
131
|
+
return None
|
|
132
|
+
data = _load(root, rel)
|
|
133
|
+
if not isinstance(data, dict):
|
|
134
|
+
raise ReleaseError(f"{rel}: expected a JSON object")
|
|
135
|
+
if not required and data.get("name") == EXCLUDED_NAME:
|
|
136
|
+
return None
|
|
137
|
+
return Surface(rel, data, _version_field(rel, data, ("version",), "version"), mutable)
|
|
138
|
+
|
|
139
|
+
|
|
140
|
+
def _child_dirs(root: Path, rel: str) -> list[str]:
|
|
141
|
+
base = root / rel
|
|
142
|
+
if not base.is_dir():
|
|
143
|
+
return []
|
|
144
|
+
return [f"{rel}/{p.name}" for p in sorted(base.iterdir()) if p.is_dir() and p.name != EXCLUDED_NAME]
|
|
145
|
+
|
|
146
|
+
|
|
147
|
+
def _manifest_rels(root: Path, directory: str) -> list[str]:
|
|
148
|
+
rels = [f"{directory}/{sub}/plugin.json" for sub in MANIFEST_SUBDIRS]
|
|
149
|
+
return [r for r in rels + [f"{directory}/package.json"] if (root / r).is_file()]
|
|
150
|
+
|
|
151
|
+
|
|
152
|
+
def _model_manifests(root: Path) -> list[tuple[str, str, bool, bool]]:
|
|
153
|
+
"""Return (model label, manifest, included, required) without external imports."""
|
|
154
|
+
data = _load(root, MODEL_REL)
|
|
155
|
+
if not isinstance(data, dict) or not isinstance(data.get("packages"), dict):
|
|
156
|
+
raise ReleaseError(f"{MODEL_REL}: expected packages object")
|
|
157
|
+
if data.get("version_source") != PLUGIN_REL:
|
|
158
|
+
raise ReleaseError(f"{MODEL_REL}: version_source must be {PLUGIN_REL}")
|
|
159
|
+
manifests: list[tuple[str, str, bool, bool]] = []
|
|
160
|
+
for key, package in data["packages"].items():
|
|
161
|
+
label = f"packages.{key}"
|
|
162
|
+
if (
|
|
163
|
+
not isinstance(key, str)
|
|
164
|
+
or not key
|
|
165
|
+
or key in {".", ".."}
|
|
166
|
+
or ("/" in key and not (key.startswith("@") and key.count("/") == 1))
|
|
167
|
+
or "\\" in key
|
|
168
|
+
):
|
|
169
|
+
raise ReleaseError(f"{MODEL_REL}: {label}: invalid package key")
|
|
170
|
+
if not isinstance(package, dict) or not isinstance(package.get("runtimes"), dict):
|
|
171
|
+
raise ReleaseError(f"{MODEL_REL}: {label}: expected runtimes object")
|
|
172
|
+
for runtime, entry in package["runtimes"].items():
|
|
173
|
+
label = f"packages.{key}.runtimes.{runtime}"
|
|
174
|
+
if runtime not in PACKAGE_RUNTIMES or not isinstance(entry, dict):
|
|
175
|
+
raise ReleaseError(f"{MODEL_REL}: {label}: expected known runtime object")
|
|
176
|
+
status, mechanism = entry.get("status"), entry.get("mechanism")
|
|
177
|
+
if status not in ("included", "deferred", "excluded"):
|
|
178
|
+
raise ReleaseError(f"{MODEL_REL}: {label}: invalid status {status!r}")
|
|
179
|
+
if mechanism not in ("native", "npm", "file-copy"):
|
|
180
|
+
raise ReleaseError(f"{MODEL_REL}: {label}: invalid mechanism {mechanism!r}")
|
|
181
|
+
if mechanism == "file-copy":
|
|
182
|
+
continue
|
|
183
|
+
required = True
|
|
184
|
+
if mechanism == "native" and runtime in PACKAGE_RUNTIMES[:3] and "/" not in key:
|
|
185
|
+
subdir = MANIFEST_SUBDIRS[PACKAGE_RUNTIMES.index(runtime)]
|
|
186
|
+
if runtime == "claude" and key == "ycc":
|
|
187
|
+
rel = PLUGIN_REL
|
|
188
|
+
else:
|
|
189
|
+
base = f"{subdir}/{key}" if runtime == "codex" else f"packages/{runtime}/{key}"
|
|
190
|
+
rel = f"{base}/{subdir}/plugin.json"
|
|
191
|
+
elif runtime == "opencode" and mechanism == "npm":
|
|
192
|
+
name = key.rsplit("/", 1)[-1]
|
|
193
|
+
if name in {".", ".."} or not name:
|
|
194
|
+
raise ReleaseError(f"{MODEL_REL}: {label}: invalid npm package key")
|
|
195
|
+
rel = f"packages/{runtime}/{name}/package.json"
|
|
196
|
+
else:
|
|
197
|
+
raise ReleaseError(f"{MODEL_REL}: {label}: unsupported {mechanism} manifest")
|
|
198
|
+
manifests.append((label, rel, status == "included", required))
|
|
199
|
+
return manifests
|
|
200
|
+
|
|
201
|
+
|
|
202
|
+
def _included_manifest(root: Path, label: str, rel: str, required: bool) -> Surface | None:
|
|
203
|
+
try:
|
|
204
|
+
surface = _manifest_surface(root, rel, rel == PLUGIN_REL, required)
|
|
205
|
+
if surface is not None and not surface.fields:
|
|
206
|
+
raise ReleaseError(f"{rel}: version: expected non-empty string")
|
|
207
|
+
return surface
|
|
208
|
+
except ReleaseError as exc:
|
|
209
|
+
raise ReleaseError(f"{label}: {exc}") from exc
|
|
210
|
+
|
|
211
|
+
|
|
212
|
+
def discover(root: Path) -> list[Surface]:
|
|
213
|
+
"""Return every surface; raise ReleaseError listing all file problems."""
|
|
214
|
+
surfaces: list[Surface] = []
|
|
215
|
+
errors: list[str] = []
|
|
216
|
+
seen: set[str] = set()
|
|
217
|
+
suppressed: set[str] = set()
|
|
218
|
+
|
|
219
|
+
def add(builder: Any, *args: Any) -> None:
|
|
220
|
+
try:
|
|
221
|
+
result = builder(root, *args)
|
|
222
|
+
except ReleaseError as exc:
|
|
223
|
+
errors.append(str(exc))
|
|
224
|
+
return
|
|
225
|
+
if result is not None:
|
|
226
|
+
if result.rel in seen:
|
|
227
|
+
return
|
|
228
|
+
seen.add(result.rel)
|
|
229
|
+
surfaces.append(result)
|
|
230
|
+
|
|
231
|
+
try:
|
|
232
|
+
modeled = _model_manifests(root)
|
|
233
|
+
except ReleaseError as exc:
|
|
234
|
+
errors.append(str(exc))
|
|
235
|
+
modeled = []
|
|
236
|
+
for label, rel, included, required in modeled:
|
|
237
|
+
if included:
|
|
238
|
+
add(_included_manifest, label, rel, required)
|
|
239
|
+
else:
|
|
240
|
+
suppressed.add(rel)
|
|
241
|
+
add(_manifest_surface, PLUGIN_REL, True, True)
|
|
242
|
+
add(_marketplace_surface, SOURCE_MARKETPLACE_REL, True, True)
|
|
243
|
+
for rel in OPTIONAL_MARKETPLACES:
|
|
244
|
+
if (root / rel).is_file():
|
|
245
|
+
# Regenerated by scripts/sync.sh (e.g. generate_codex_plugin.py);
|
|
246
|
+
# check parity but never bump them.
|
|
247
|
+
add(_marketplace_surface, rel, False, False)
|
|
248
|
+
add(_manifest_surface, "ycc/package.json", True)
|
|
249
|
+
package_dirs = _child_dirs(root, "packages")
|
|
250
|
+
# Support both packages/<package> and packages/<runtime>/<package> layouts.
|
|
251
|
+
for runtime in PACKAGE_RUNTIMES:
|
|
252
|
+
package_dirs += _child_dirs(root, f"packages/{runtime}")
|
|
253
|
+
for package_dir in sorted(set(package_dirs)):
|
|
254
|
+
for rel in _manifest_rels(root, package_dir):
|
|
255
|
+
if rel not in suppressed:
|
|
256
|
+
add(_manifest_surface, rel, False)
|
|
257
|
+
generated_dirs: list[str] = []
|
|
258
|
+
for base in (".codex-plugin", ".cursor-plugin"):
|
|
259
|
+
if (root / base).is_dir():
|
|
260
|
+
generated_dirs += [base] + _child_dirs(root, base)
|
|
261
|
+
for directory in generated_dirs:
|
|
262
|
+
for rel in _manifest_rels(root, directory):
|
|
263
|
+
if rel not in suppressed:
|
|
264
|
+
add(_manifest_surface, rel, False)
|
|
265
|
+
if errors:
|
|
266
|
+
raise ReleaseError("\n".join(errors))
|
|
267
|
+
return surfaces
|
|
268
|
+
|
|
269
|
+
|
|
270
|
+
def _canonical(surfaces: list[Surface]) -> str:
|
|
271
|
+
for surface in surfaces:
|
|
272
|
+
if surface.rel == PLUGIN_REL:
|
|
273
|
+
if not surface.fields:
|
|
274
|
+
raise ReleaseError(f"{PLUGIN_REL}: version: required but missing")
|
|
275
|
+
return surface.fields[0].value
|
|
276
|
+
raise ReleaseError(f"{PLUGIN_REL}: file not found")
|
|
277
|
+
|
|
278
|
+
|
|
279
|
+
def check(root: Path) -> int:
|
|
280
|
+
try:
|
|
281
|
+
surfaces = discover(root)
|
|
282
|
+
expected = _canonical(surfaces)
|
|
283
|
+
except ReleaseError as exc:
|
|
284
|
+
print(str(exc), file=sys.stderr)
|
|
285
|
+
return 1
|
|
286
|
+
bad = [f for s in surfaces for f in s.fields if f.value != expected]
|
|
287
|
+
for item in bad:
|
|
288
|
+
print(f" {item.rel} {item.label} = {item.value} (expected {expected})", file=sys.stderr)
|
|
289
|
+
if bad:
|
|
290
|
+
return 1
|
|
291
|
+
print(expected)
|
|
292
|
+
return 0
|
|
293
|
+
|
|
294
|
+
|
|
295
|
+
def _set(data: Any, keys: tuple[Key, ...], value: str) -> None:
|
|
296
|
+
for key in keys[:-1]:
|
|
297
|
+
data = data[key]
|
|
298
|
+
data[keys[-1]] = value
|
|
299
|
+
|
|
300
|
+
|
|
301
|
+
def _serialize(data: Any) -> bytes:
|
|
302
|
+
return (json.dumps(data, indent=2, ensure_ascii=False) + "\n").encode("utf-8")
|
|
303
|
+
|
|
304
|
+
|
|
305
|
+
def _replace(path: Path, payload: bytes) -> None:
|
|
306
|
+
fd, tmp_name = tempfile.mkstemp(dir=path.parent, prefix=f".{path.name}.")
|
|
307
|
+
tmp = Path(tmp_name)
|
|
308
|
+
try:
|
|
309
|
+
with os.fdopen(fd, "wb") as handle:
|
|
310
|
+
handle.write(payload)
|
|
311
|
+
tmp.chmod(path.stat().st_mode & 0o7777)
|
|
312
|
+
os.replace(tmp, path)
|
|
313
|
+
except BaseException:
|
|
314
|
+
tmp.unlink(missing_ok=True)
|
|
315
|
+
raise
|
|
316
|
+
|
|
317
|
+
|
|
318
|
+
def bump(root: Path, new_version: str) -> int:
|
|
319
|
+
try:
|
|
320
|
+
surfaces = discover(root)
|
|
321
|
+
_canonical(surfaces)
|
|
322
|
+
except ReleaseError as exc:
|
|
323
|
+
print(str(exc), file=sys.stderr)
|
|
324
|
+
return 1
|
|
325
|
+
plans: list[tuple[Path, bytes, bytes]] = []
|
|
326
|
+
for surface in (s for s in surfaces if s.mutable):
|
|
327
|
+
changed = [f for f in surface.fields if f.value != new_version]
|
|
328
|
+
if not changed:
|
|
329
|
+
continue
|
|
330
|
+
path = root / surface.rel
|
|
331
|
+
for item in changed:
|
|
332
|
+
_set(surface.data, item.keys, new_version)
|
|
333
|
+
print(f"{item.rel} {item.label}: {item.value} -> {new_version}")
|
|
334
|
+
plans.append((path, path.read_bytes(), _serialize(surface.data)))
|
|
335
|
+
written: list[tuple[Path, bytes]] = []
|
|
336
|
+
try:
|
|
337
|
+
for path, original, payload in plans:
|
|
338
|
+
_replace(path, payload)
|
|
339
|
+
written.append((path, original))
|
|
340
|
+
except OSError as exc:
|
|
341
|
+
for path, original in written:
|
|
342
|
+
try:
|
|
343
|
+
_replace(path, original)
|
|
344
|
+
except OSError:
|
|
345
|
+
print(f"rollback failed for {path}", file=sys.stderr)
|
|
346
|
+
print(f"write failed: {exc}", file=sys.stderr)
|
|
347
|
+
return 1
|
|
348
|
+
return 0
|
|
349
|
+
|
|
350
|
+
|
|
351
|
+
def main(argv: list[str]) -> int:
|
|
352
|
+
if len(argv) == 3 and argv[1] == "check":
|
|
353
|
+
return check(Path(argv[2]))
|
|
354
|
+
if len(argv) == 4 and argv[1] == "bump":
|
|
355
|
+
return bump(Path(argv[2]), argv[3])
|
|
356
|
+
print("usage: release_versions.py check <root> | bump <root> <version>", file=sys.stderr)
|
|
357
|
+
return 2
|
|
358
|
+
|
|
359
|
+
|
|
360
|
+
if __name__ == "__main__":
|
|
361
|
+
sys.exit(main(sys.argv))
|
|
@@ -0,0 +1,107 @@
|
|
|
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
|
+
### Deprecated: `--include-git`
|
|
23
|
+
|
|
24
|
+
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):
|
|
25
|
+
|
|
26
|
+
> `--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.
|
|
27
|
+
|
|
28
|
+
Never auto-chain `/ycc:git-cleanup`, and never treat `--include-git` as consent to run it.
|
|
29
|
+
|
|
30
|
+
### Scope and Git-only requests
|
|
31
|
+
|
|
32
|
+
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.
|
|
33
|
+
|
|
34
|
+
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.
|
|
35
|
+
|
|
36
|
+
## Phase 0: Setup
|
|
37
|
+
|
|
38
|
+
1. **Validate target directory** exists
|
|
39
|
+
2. **Detect project type** using: `{{package-root}}/skills/clean/scripts/detect-project-type.sh "$TARGET_DIR"`
|
|
40
|
+
3. **Read safety configuration** from `{{package-root}}/skills/clean/references/safety-config.md`
|
|
41
|
+
4. **Create working directory**: `$TARGET_DIR/.cleanup-analysis/findings/`
|
|
42
|
+
5. **Initialize progress tracking** with the task tools for all phases
|
|
43
|
+
6. **If --dry-run**: Display analysis plan and **STOP**
|
|
44
|
+
|
|
45
|
+
## Phase 1: Parallel Agent Deployment
|
|
46
|
+
|
|
47
|
+
Read agent prompts from `{{package-root}}/skills/clean/references/agent-prompts.md`.
|
|
48
|
+
|
|
49
|
+
Deploy all 6 agents in a **SINGLE message** with **MULTIPLE parallel subagent invocations** using subagent type `project-file-cleaner`:
|
|
50
|
+
|
|
51
|
+
| Agent | Findings File (orchestrator-written) |
|
|
52
|
+
| ---------- | ------------------------------------ |
|
|
53
|
+
| Code Files | `findings/code-files.md` |
|
|
54
|
+
| Binaries | `findings/binaries.md` |
|
|
55
|
+
| Assets | `findings/assets.md` |
|
|
56
|
+
| Docs | `findings/documentation.md` |
|
|
57
|
+
| Config | `findings/config.md` |
|
|
58
|
+
| Docker | `findings/docker.md` |
|
|
59
|
+
|
|
60
|
+
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.
|
|
61
|
+
|
|
62
|
+
**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.
|
|
63
|
+
|
|
64
|
+
## Phase 2: Findings Consolidation
|
|
65
|
+
|
|
66
|
+
After all agents complete:
|
|
67
|
+
|
|
68
|
+
1. Read all findings files
|
|
69
|
+
2. Deduplicate across agents
|
|
70
|
+
3. Calculate space savings: `du -h "$filepath"` for each file
|
|
71
|
+
4. Categorize by risk level (low/medium/high)
|
|
72
|
+
|
|
73
|
+
## Phase 3: Report Generation and User Review
|
|
74
|
+
|
|
75
|
+
1. Run: `{{package-root}}/skills/clean/scripts/generate-report.sh "$TARGET_DIR"`
|
|
76
|
+
2. Run safety validation: `{{package-root}}/skills/clean/scripts/validate-safety.sh "$TARGET_DIR/.cleanup-analysis/cleanup-report.md"`
|
|
77
|
+
3. Fix any violations before proceeding
|
|
78
|
+
4. **If --report-only**: Display report summary and **STOP**
|
|
79
|
+
5. Present findings to user with ask the user (show report / summary / proceed / cancel)
|
|
80
|
+
6. **If --safe-mode**: Ask confirmation per category
|
|
81
|
+
|
|
82
|
+
## Phase 4: Safe Execution
|
|
83
|
+
|
|
84
|
+
1. Create backup list at `$TARGET_DIR/.cleanup-analysis/removal-list.txt`
|
|
85
|
+
2. Final confirmation with ask the user before any deletions
|
|
86
|
+
3. Execute removal, tracking success/failure counts
|
|
87
|
+
4. Handle errors gracefully (continue on single file failure)
|
|
88
|
+
|
|
89
|
+
## Phase 5: Verification
|
|
90
|
+
|
|
91
|
+
1. Verify files removed, no broken symlinks, project integrity
|
|
92
|
+
2. Calculate actual space recovered
|
|
93
|
+
3. Generate final summary with results, analysis file locations, and next steps
|
|
94
|
+
|
|
95
|
+
---
|
|
96
|
+
|
|
97
|
+
## Quality Standards
|
|
98
|
+
|
|
99
|
+
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.
|
|
100
|
+
|
|
101
|
+
## Important Notes
|
|
102
|
+
|
|
103
|
+
- Act as orchestrator - coordinate cleanup agents, don't analyze files directly
|
|
104
|
+
- Deploy all 6 agents in parallel (single message with 6 Agent calls)
|
|
105
|
+
- Safety first - always validate before deletion
|
|
106
|
+
- User confirmation required before any destructive operations
|
|
107
|
+
- 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
|
+
```
|