@yandy-r/ycc-opencode 0.0.0-stage → 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 +41 -2
- 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 +35 -4
- 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,437 @@
|
|
|
1
|
+
# Feature Spec Template
|
|
2
|
+
|
|
3
|
+
This template defines the structure for `feature-spec.md` - the consolidated research document that serves as input for plan-workflow.
|
|
4
|
+
|
|
5
|
+
---
|
|
6
|
+
|
|
7
|
+
## Complete Example Format
|
|
8
|
+
|
|
9
|
+
```markdown
|
|
10
|
+
# Feature Spec: [Feature Name]
|
|
11
|
+
|
|
12
|
+
## Executive Summary
|
|
13
|
+
|
|
14
|
+
[3-5 sentence, information-dense summary covering:]
|
|
15
|
+
|
|
16
|
+
- What the feature does (functionality)
|
|
17
|
+
- Why it matters (business value)
|
|
18
|
+
- How it will be implemented (technical approach)
|
|
19
|
+
- Key integration points
|
|
20
|
+
- Primary risks or challenges
|
|
21
|
+
|
|
22
|
+
## External Dependencies
|
|
23
|
+
|
|
24
|
+
### APIs and Services
|
|
25
|
+
|
|
26
|
+
#### [Primary API Name]
|
|
27
|
+
|
|
28
|
+
- **Documentation**: [URL]
|
|
29
|
+
- **Authentication**: [Method - OAuth2, API Key, etc.]
|
|
30
|
+
- **Key Endpoints**:
|
|
31
|
+
- `GET /endpoint`: [Purpose]
|
|
32
|
+
- `POST /endpoint`: [Purpose]
|
|
33
|
+
- **Rate Limits**: [Requests per time period]
|
|
34
|
+
- **Pricing**: [Free tier limits, paid requirements]
|
|
35
|
+
|
|
36
|
+
#### [Secondary API if applicable]
|
|
37
|
+
|
|
38
|
+
[Same structure]
|
|
39
|
+
|
|
40
|
+
### Libraries and SDKs
|
|
41
|
+
|
|
42
|
+
| Library | Version | Purpose | Installation |
|
|
43
|
+
| ------- | --------- | ------------ | ----------------- |
|
|
44
|
+
| [name] | [version] | [why needed] | `install command` |
|
|
45
|
+
|
|
46
|
+
### External Documentation
|
|
47
|
+
|
|
48
|
+
- [Doc Name]([URL]): [What it covers]
|
|
49
|
+
|
|
50
|
+
## Business Requirements
|
|
51
|
+
|
|
52
|
+
### User Stories
|
|
53
|
+
|
|
54
|
+
**Primary User: [Role]**
|
|
55
|
+
|
|
56
|
+
- As a [role], I want to [action] so that [benefit]
|
|
57
|
+
- As a [role], I want to [action] so that [benefit]
|
|
58
|
+
|
|
59
|
+
**Secondary User: [Role]** (if applicable)
|
|
60
|
+
|
|
61
|
+
- As a [role], I want to [action] so that [benefit]
|
|
62
|
+
|
|
63
|
+
### Business Rules
|
|
64
|
+
|
|
65
|
+
1. **[Rule Name]**: [Specific rule description]
|
|
66
|
+
- Validation: [How to enforce]
|
|
67
|
+
- Exception: [When it doesn't apply]
|
|
68
|
+
|
|
69
|
+
2. **[Another Rule]**: [Description]
|
|
70
|
+
|
|
71
|
+
### Edge Cases
|
|
72
|
+
|
|
73
|
+
| Scenario | Expected Behavior | Notes |
|
|
74
|
+
| ---------- | ----------------- | -------------------- |
|
|
75
|
+
| [Scenario] | [Behavior] | [Additional context] |
|
|
76
|
+
|
|
77
|
+
### Success Criteria
|
|
78
|
+
|
|
79
|
+
- [ ] [Measurable criterion 1]
|
|
80
|
+
- [ ] [Measurable criterion 2]
|
|
81
|
+
- [ ] [Measurable criterion 3]
|
|
82
|
+
|
|
83
|
+
## Technical Specifications
|
|
84
|
+
|
|
85
|
+
### Architecture Overview
|
|
86
|
+
```
|
|
87
|
+
|
|
88
|
+
[ASCII diagram showing component relationships]
|
|
89
|
+
|
|
90
|
+
[Component A] ──▶ [Component B] ──▶ [External Service]
|
|
91
|
+
│ │
|
|
92
|
+
▼ ▼
|
|
93
|
+
[Database] [Cache/Queue]
|
|
94
|
+
|
|
95
|
+
````
|
|
96
|
+
|
|
97
|
+
### Data Models
|
|
98
|
+
|
|
99
|
+
#### [Entity/Table Name]
|
|
100
|
+
|
|
101
|
+
| Field | Type | Constraints | Description |
|
|
102
|
+
|-------|------|-------------|-------------|
|
|
103
|
+
| id | UUID | PK | Primary identifier |
|
|
104
|
+
| [field] | [type] | [constraints] | [description] |
|
|
105
|
+
|
|
106
|
+
**Indexes:**
|
|
107
|
+
- `idx_[name]` on ([columns]): [Purpose]
|
|
108
|
+
|
|
109
|
+
**Relationships:**
|
|
110
|
+
- [Relationship description]
|
|
111
|
+
|
|
112
|
+
#### [Another Entity if needed]
|
|
113
|
+
[Same structure]
|
|
114
|
+
|
|
115
|
+
### API Design
|
|
116
|
+
|
|
117
|
+
#### `[METHOD] /api/[path]`
|
|
118
|
+
|
|
119
|
+
**Purpose**: [What this endpoint does]
|
|
120
|
+
**Authentication**: [Required/Optional, method]
|
|
121
|
+
|
|
122
|
+
**Request:**
|
|
123
|
+
|
|
124
|
+
```json
|
|
125
|
+
{
|
|
126
|
+
"field": "type - description"
|
|
127
|
+
}
|
|
128
|
+
```
|
|
129
|
+
|
|
130
|
+
**Response (200):**
|
|
131
|
+
|
|
132
|
+
```json
|
|
133
|
+
{
|
|
134
|
+
"field": "type - description"
|
|
135
|
+
}
|
|
136
|
+
```
|
|
137
|
+
|
|
138
|
+
**Errors:**
|
|
139
|
+
|
|
140
|
+
| Status | Condition | Response |
|
|
141
|
+
| ------ | ----------- | -------------- |
|
|
142
|
+
| 400 | [Condition] | [Error format] |
|
|
143
|
+
| 401 | [Condition] | [Error format] |
|
|
144
|
+
| 404 | [Condition] | [Error format] |
|
|
145
|
+
|
|
146
|
+
### System Integration
|
|
147
|
+
|
|
148
|
+
#### Files to Create
|
|
149
|
+
|
|
150
|
+
- `/path/to/new/file.ext`: [Purpose and responsibilities]
|
|
151
|
+
|
|
152
|
+
#### Files to Modify
|
|
153
|
+
|
|
154
|
+
- `/path/to/existing.ext`: [What changes are needed]
|
|
155
|
+
|
|
156
|
+
#### Configuration
|
|
157
|
+
|
|
158
|
+
- [Config key]: [Value and purpose]
|
|
159
|
+
|
|
160
|
+
## UX Considerations
|
|
161
|
+
|
|
162
|
+
### User Workflows
|
|
163
|
+
|
|
164
|
+
#### Primary Workflow: [Name]
|
|
165
|
+
|
|
166
|
+
1. **[Step Name]**
|
|
167
|
+
- User: [Action]
|
|
168
|
+
- System: [Response/Feedback]
|
|
169
|
+
|
|
170
|
+
2. **[Step Name]**
|
|
171
|
+
- User: [Action]
|
|
172
|
+
- System: [Response/Feedback]
|
|
173
|
+
|
|
174
|
+
3. **Success State**
|
|
175
|
+
- [Final outcome and feedback]
|
|
176
|
+
|
|
177
|
+
#### Error Recovery Workflow
|
|
178
|
+
|
|
179
|
+
1. **Error Occurs**: [Condition]
|
|
180
|
+
2. **User Sees**: [Error message/UI]
|
|
181
|
+
3. **Recovery**: [User action to resolve]
|
|
182
|
+
|
|
183
|
+
### UI Patterns
|
|
184
|
+
|
|
185
|
+
| Component | Pattern | Notes |
|
|
186
|
+
| ----------- | -------------- | ---------------------- |
|
|
187
|
+
| [Component] | [Pattern name] | [Implementation notes] |
|
|
188
|
+
|
|
189
|
+
### Accessibility Requirements
|
|
190
|
+
|
|
191
|
+
- [WCAG requirement]: [Implementation approach]
|
|
192
|
+
- [WCAG requirement]: [Implementation approach]
|
|
193
|
+
|
|
194
|
+
### Performance UX
|
|
195
|
+
|
|
196
|
+
- **Loading States**: [Pattern to use]
|
|
197
|
+
- **Optimistic Updates**: [Where applicable]
|
|
198
|
+
- **Error Feedback**: [Timing and format]
|
|
199
|
+
|
|
200
|
+
## Recommendations
|
|
201
|
+
|
|
202
|
+
### Implementation Approach
|
|
203
|
+
|
|
204
|
+
**Recommended Strategy**: [Description of overall approach]
|
|
205
|
+
|
|
206
|
+
**Phasing:**
|
|
207
|
+
|
|
208
|
+
1. **Phase 1 - Foundation**: [Scope]
|
|
209
|
+
2. **Phase 2 - Core Features**: [Scope]
|
|
210
|
+
3. **Phase 3 - Polish**: [Scope]
|
|
211
|
+
|
|
212
|
+
### Technology Decisions
|
|
213
|
+
|
|
214
|
+
| Decision | Recommendation | Rationale |
|
|
215
|
+
| --------------- | -------------- | --------- |
|
|
216
|
+
| [Decision area] | [Choice] | [Why] |
|
|
217
|
+
|
|
218
|
+
### Quick Wins
|
|
219
|
+
|
|
220
|
+
- [Quick win 1]: [Low effort, immediate value]
|
|
221
|
+
- [Quick win 2]: [Low effort, immediate value]
|
|
222
|
+
|
|
223
|
+
### Future Enhancements
|
|
224
|
+
|
|
225
|
+
- [Enhancement]: [Value and when to consider]
|
|
226
|
+
|
|
227
|
+
## Risk Assessment
|
|
228
|
+
|
|
229
|
+
### Technical Risks
|
|
230
|
+
|
|
231
|
+
| Risk | Likelihood | Impact | Mitigation |
|
|
232
|
+
| ------------------ | ------------ | ------------ | ---------- |
|
|
233
|
+
| [Risk description] | High/Med/Low | High/Med/Low | [Strategy] |
|
|
234
|
+
|
|
235
|
+
### Integration Challenges
|
|
236
|
+
|
|
237
|
+
- [Challenge]: [Mitigation approach]
|
|
238
|
+
|
|
239
|
+
### Security Considerations
|
|
240
|
+
|
|
241
|
+
#### Critical — Hard Stops
|
|
242
|
+
|
|
243
|
+
| Finding | Risk | Required Mitigation |
|
|
244
|
+
|---------|------|---------------------|
|
|
245
|
+
| [Finding or "None identified"] | [Impact] | [Required action] |
|
|
246
|
+
|
|
247
|
+
#### Warnings — Must Address
|
|
248
|
+
|
|
249
|
+
| Finding | Risk | Mitigation | Alternatives |
|
|
250
|
+
|---------|------|-----------|--------------|
|
|
251
|
+
| [Finding or "None identified"] | [Impact] | [Recommended fix] | [Other options] |
|
|
252
|
+
|
|
253
|
+
#### Advisories — Best Practices
|
|
254
|
+
|
|
255
|
+
- [Advisory]: [Recommendation] (deferral justification: [when OK to skip])
|
|
256
|
+
|
|
257
|
+
## Task Breakdown Preview
|
|
258
|
+
|
|
259
|
+
### Phase 1: [Name]
|
|
260
|
+
|
|
261
|
+
**Focus**: [What this phase accomplishes]
|
|
262
|
+
**Tasks**:
|
|
263
|
+
|
|
264
|
+
- [High-level task 1]
|
|
265
|
+
- [High-level task 2]
|
|
266
|
+
**Parallelization**: [What can run concurrently]
|
|
267
|
+
|
|
268
|
+
### Phase 2: [Name]
|
|
269
|
+
|
|
270
|
+
**Focus**: [What this phase accomplishes]
|
|
271
|
+
**Dependencies**: [What must complete first]
|
|
272
|
+
**Tasks**:
|
|
273
|
+
|
|
274
|
+
- [High-level task 1]
|
|
275
|
+
- [High-level task 2]
|
|
276
|
+
|
|
277
|
+
### Phase 3: [Name]
|
|
278
|
+
|
|
279
|
+
**Focus**: [What this phase accomplishes]
|
|
280
|
+
**Tasks**:
|
|
281
|
+
|
|
282
|
+
- [High-level task 1]
|
|
283
|
+
- [High-level task 2]
|
|
284
|
+
|
|
285
|
+
## Decisions Needed
|
|
286
|
+
|
|
287
|
+
Before proceeding to implementation planning, clarify:
|
|
288
|
+
|
|
289
|
+
1. **[Decision Area]**
|
|
290
|
+
- Options: [A, B, C]
|
|
291
|
+
- Impact: [How choice affects implementation]
|
|
292
|
+
- Recommendation: [Suggested choice and why]
|
|
293
|
+
|
|
294
|
+
2. **[Another Decision]**
|
|
295
|
+
- Options: [A, B]
|
|
296
|
+
- Impact: [How choice affects implementation]
|
|
297
|
+
|
|
298
|
+
## Research References
|
|
299
|
+
|
|
300
|
+
For detailed findings, see:
|
|
301
|
+
|
|
302
|
+
- [research-external.md](./research-external.md): External API details
|
|
303
|
+
- [research-business.md](./research-business.md): Business logic analysis
|
|
304
|
+
- [research-technical.md](./research-technical.md): Technical specifications
|
|
305
|
+
- [research-ux.md](./research-ux.md): UX research
|
|
306
|
+
- [research-security.md](./research-security.md): Security analysis (severity-leveled findings)
|
|
307
|
+
- [research-practices.md](./research-practices.md): Engineering practices (modularity, reuse, KISS)
|
|
308
|
+
- [research-recommendations.md](./research-recommendations.md): Full recommendations
|
|
309
|
+
|
|
310
|
+
````
|
|
311
|
+
|
|
312
|
+
---
|
|
313
|
+
|
|
314
|
+
## Section Guidelines
|
|
315
|
+
|
|
316
|
+
### Executive Summary
|
|
317
|
+
|
|
318
|
+
The summary should answer in 3-5 sentences:
|
|
319
|
+
|
|
320
|
+
- What does this feature do?
|
|
321
|
+
- Why is it valuable?
|
|
322
|
+
- How will it be built (high-level)?
|
|
323
|
+
- What are the key challenges?
|
|
324
|
+
|
|
325
|
+
**Good Example:**
|
|
326
|
+
|
|
327
|
+
```markdown
|
|
328
|
+
## Executive Summary
|
|
329
|
+
|
|
330
|
+
This feature integrates Plex media library filtering and playlist management into the application. Users can query their Plex server using native filters (rating, genre, year) to find media, then copy selected items to a destination folder while maintaining metadata. The implementation uses the Plex API v2 with X-Plex-Token authentication, requiring a new PlexService component and database tables for tracking sync state. Primary challenges include handling large libraries efficiently and managing the async nature of Plex library scans.
|
|
331
|
+
```
|
|
332
|
+
|
|
333
|
+
**Bad Example:**
|
|
334
|
+
|
|
335
|
+
```markdown
|
|
336
|
+
## Executive Summary
|
|
337
|
+
|
|
338
|
+
This feature adds Plex integration. It will help users manage their media.
|
|
339
|
+
```
|
|
340
|
+
|
|
341
|
+
### External Dependencies
|
|
342
|
+
|
|
343
|
+
List external services with enough detail for implementation:
|
|
344
|
+
|
|
345
|
+
- Documentation URLs (must be real, working links)
|
|
346
|
+
- Authentication specifics
|
|
347
|
+
- Key endpoints with purposes
|
|
348
|
+
- Constraints that affect design
|
|
349
|
+
|
|
350
|
+
### Business Requirements
|
|
351
|
+
|
|
352
|
+
Focus on user value and business rules:
|
|
353
|
+
|
|
354
|
+
- User stories should follow the "As a... I want... so that..." format
|
|
355
|
+
- Business rules should be specific and testable
|
|
356
|
+
- Edge cases should have clear expected behaviors
|
|
357
|
+
- Success criteria should be measurable
|
|
358
|
+
|
|
359
|
+
### Technical Specifications
|
|
360
|
+
|
|
361
|
+
Provide implementation-ready details:
|
|
362
|
+
|
|
363
|
+
- Data models with actual column definitions
|
|
364
|
+
- API contracts with request/response examples
|
|
365
|
+
- Architecture diagrams showing component relationships
|
|
366
|
+
- File paths for new and modified code
|
|
367
|
+
|
|
368
|
+
### UX Considerations
|
|
369
|
+
|
|
370
|
+
Document user-facing behavior:
|
|
371
|
+
|
|
372
|
+
- Step-by-step workflows
|
|
373
|
+
- Error messages and recovery paths
|
|
374
|
+
- Loading states and feedback patterns
|
|
375
|
+
- Accessibility requirements
|
|
376
|
+
|
|
377
|
+
### Recommendations
|
|
378
|
+
|
|
379
|
+
Synthesize research into actionable guidance:
|
|
380
|
+
|
|
381
|
+
- Clear implementation recommendation
|
|
382
|
+
- Justified technology choices
|
|
383
|
+
- Risk mitigation strategies
|
|
384
|
+
- Future enhancement opportunities
|
|
385
|
+
|
|
386
|
+
### Task Breakdown Preview
|
|
387
|
+
|
|
388
|
+
Provide high-level structure for plan-workflow:
|
|
389
|
+
|
|
390
|
+
- Logical phases
|
|
391
|
+
- Task groupings
|
|
392
|
+
- Dependency relationships
|
|
393
|
+
- Parallelization opportunities
|
|
394
|
+
|
|
395
|
+
---
|
|
396
|
+
|
|
397
|
+
## Quality Checklist
|
|
398
|
+
|
|
399
|
+
Before finalizing feature-spec.md, verify:
|
|
400
|
+
|
|
401
|
+
### Content Quality
|
|
402
|
+
|
|
403
|
+
- [ ] Executive summary is information-dense (3-5 sentences)
|
|
404
|
+
- [ ] All external API URLs are valid and current
|
|
405
|
+
- [ ] Business rules are specific and testable
|
|
406
|
+
- [ ] Data models include actual field definitions
|
|
407
|
+
- [ ] API designs include request/response examples
|
|
408
|
+
- [ ] UX workflows cover happy path and errors
|
|
409
|
+
- [ ] Recommendations are actionable
|
|
410
|
+
|
|
411
|
+
### Structure Quality
|
|
412
|
+
|
|
413
|
+
- [ ] All required sections present
|
|
414
|
+
- [ ] Consistent formatting throughout
|
|
415
|
+
- [ ] Tables properly formatted
|
|
416
|
+
- [ ] Code blocks have language tags
|
|
417
|
+
- [ ] Links to research files are correct
|
|
418
|
+
|
|
419
|
+
### Completeness
|
|
420
|
+
|
|
421
|
+
- [ ] No placeholder text remains
|
|
422
|
+
- [ ] Open questions are documented
|
|
423
|
+
- [ ] Decisions needed are clearly stated
|
|
424
|
+
- [ ] Task preview aligns with scope
|
|
425
|
+
|
|
426
|
+
---
|
|
427
|
+
|
|
428
|
+
## Integration with plan-workflow
|
|
429
|
+
|
|
430
|
+
The feature-spec.md is read by plan-workflow (or can be used with shared-context) to:
|
|
431
|
+
|
|
432
|
+
1. **Inform shared.md creation** - Relevant files, patterns, tables
|
|
433
|
+
2. **Guide task breakdown** - Business rules become acceptance criteria
|
|
434
|
+
3. **Provide technical context** - Data models and APIs inform implementation
|
|
435
|
+
4. **Enable parallel planning** - Task preview suggests phase structure
|
|
436
|
+
|
|
437
|
+
Ensure feature-spec.md is comprehensive enough that planning can proceed without additional research rounds.
|
|
@@ -0,0 +1,207 @@
|
|
|
1
|
+
---
|
|
2
|
+
name: formatters
|
|
3
|
+
description: Bootstraps project linting and formatting tools. Use when installing
|
|
4
|
+
formatters, adding lint scripts, or wiring lint CI and pre-commit hooks.
|
|
5
|
+
---
|
|
6
|
+
|
|
7
|
+
# Formatters Bootstrap
|
|
8
|
+
|
|
9
|
+
Installs a best-practices lint/format environment into a target project. Does not reimplement linter dispatch — it drives the repo's own `scripts/style.sh init --copy|--sync` machinery and adds documentation, aliases, CI, and hook wiring on top.
|
|
10
|
+
|
|
11
|
+
**Operational context:** Install the self-contained scripts/style.sh bundle and per-language configs, add package.json/Makefile/justfile aliases and project docs, and optionally wire CI and pre-commit hooks. Preserve managed-manifest idempotency; --sync is the rerun path.
|
|
12
|
+
|
|
13
|
+
## Current Target Context
|
|
14
|
+
|
|
15
|
+
- **Profile detection** (complete `key=value` output, `project_root` last): !`{{package-root}}/skills/formatters/scripts/profile-style.sh`
|
|
16
|
+
|
|
17
|
+
Context injection is one scoped helper call: no `pwd`, `head`, `2>/dev/null`, or pipeline. Compound pipelines are host-permission behavior (a headless caller allowlist may reject them even when each segment is allowed), and `head -30` previously dropped profile keys. Do not widen `allowed-tools` with `head`, `find`, `wc`, or `pwd`; run each helper as a single command.
|
|
18
|
+
|
|
19
|
+
## Arguments
|
|
20
|
+
|
|
21
|
+
| Flag | Meaning | Example |
|
|
22
|
+
| -------------------------------------------------------------- | ------------------------------------------------------------------------------- | ---------------------------------------- |
|
|
23
|
+
| `--dry-run` | Preview every planned file; make no writes | `formatters --dry-run` |
|
|
24
|
+
| `--force` | Overwrite existing tool configs / aliases / docs without prompting | `formatters --force` |
|
|
25
|
+
| `--yes` | Non-interactive; keep existing files on conflict | `formatters --yes` |
|
|
26
|
+
| `--sync` | Install bundle + prune stale managed files (preferred on re-run) | `formatters --sync` |
|
|
27
|
+
| `--copy` | Install bundle without pruning (default when no manifest exists) | `formatters --copy` |
|
|
28
|
+
| `--ci` | Also emit `.github/workflows/lint.yml` and `.github/workflows/lint-autofix.yml` | `formatters --ci` |
|
|
29
|
+
| `--no-autofix` | With `--ci`: skip `lint-autofix.yml`, install the check workflow only | `formatters --ci --no-autofix` |
|
|
30
|
+
| `--hooks` | Also wire a pre-commit hook (lefthook preferred, husky if detected) | `formatters --hooks` |
|
|
31
|
+
| `--no-aliases` | Skip package.json / Makefile / justfile alias injection | `formatters --no-aliases` |
|
|
32
|
+
| `--no-docs` | Skip README section append | `formatters --no-docs` |
|
|
33
|
+
| `--target=<dir>` | Target directory (default: `$PWD`) | `formatters --target=~/projects/app` |
|
|
34
|
+
| `--profile=<lang>` | Override detection: `rust`, `ts-node`, `python`, `go`, `docs`, `mixed` | `formatters --profile=rust` |
|
|
35
|
+
| `--rust` / `--ts` / `--python` / `--go` / `--docs` / `--shell` | Enable specific stack(s); suppresses auto-detection | `formatters --rust --go` |
|
|
36
|
+
| `--all` | Install every supported stack's configs regardless of detection | `formatters --all` |
|
|
37
|
+
|
|
38
|
+
Flags are composable. See `references/flag-reference.md` for the full matrix and precedence rules. See `references/best-practices.md` for per-language tool rationale.
|
|
39
|
+
|
|
40
|
+
## Task
|
|
41
|
+
|
|
42
|
+
Execute the phases in order. Phases are short — do not add narrative prose between them.
|
|
43
|
+
|
|
44
|
+
### Phase 0 — Parse flags
|
|
45
|
+
|
|
46
|
+
Extract booleans from `$ARGUMENTS`:
|
|
47
|
+
|
|
48
|
+
- `DRY_RUN`, `FORCE`, `YES`, `CI`, `NO_AUTOFIX`, `HOOKS`, `NO_ALIASES`, `NO_DOCS`
|
|
49
|
+
- `TARGET` — value of `--target=<dir>`; default to `$PWD`
|
|
50
|
+
- `PROFILE` — value of `--profile=<lang>`; empty if unset
|
|
51
|
+
- Per-stack booleans: `RUST`, `TS`, `PYTHON`, `GO`, `DOCS`, `SHELL`; `ALL` for `--all`
|
|
52
|
+
- `SYNC_MODE` — true if `--sync` passed; `COPY_MODE` — true if `--copy` passed
|
|
53
|
+
|
|
54
|
+
Validation:
|
|
55
|
+
|
|
56
|
+
- Reject both `--sync` and `--copy` passed together.
|
|
57
|
+
- If `TARGET` does not exist as a directory, abort.
|
|
58
|
+
|
|
59
|
+
### Phase 1 — Profile
|
|
60
|
+
|
|
61
|
+
Run `{{package-root}}/skills/formatters/scripts/profile-style.sh "$TARGET"` as one command. Keep every key (including `project_root`, `docs_target`, and hook/CI keys); parse the returned text in the caller. If an applier needs `--profile-file`, save that complete text with Write rather than an outer redirect or pipeline.
|
|
62
|
+
|
|
63
|
+
Stack-flag resolution:
|
|
64
|
+
|
|
65
|
+
- If `ALL=true` → enable all per-stack flags.
|
|
66
|
+
- Else if `PROFILE` is set → force per-stack flags from the profile mapping (see `references/flag-reference.md` `--profile` table).
|
|
67
|
+
- Else if any explicit per-stack flag was passed → use only the ones passed; do NOT override with auto-detection.
|
|
68
|
+
- Else → enable each stack whose `detect_*=true` in the profile.
|
|
69
|
+
|
|
70
|
+
Mode resolution:
|
|
71
|
+
|
|
72
|
+
- If `SYNC_MODE` → use `--sync`.
|
|
73
|
+
- Else if `COPY_MODE` → use `--copy`.
|
|
74
|
+
- Else if `has_style_bundle=true` → use `--sync`.
|
|
75
|
+
- Else → use `--copy`.
|
|
76
|
+
|
|
77
|
+
### Phase 2 — Plan preview
|
|
78
|
+
|
|
79
|
+
Print a plan block listing what will happen. Format:
|
|
80
|
+
|
|
81
|
+
```
|
|
82
|
+
Target: <TARGET>
|
|
83
|
+
Mode: --sync | --copy
|
|
84
|
+
Stacks: rust, ts, python, go, docs, shell
|
|
85
|
+
Bundle install: scripts/style.sh, scripts/format.sh, scripts/lint.sh, scripts/init-formatters.sh,
|
|
86
|
+
scripts/install-shellcheck.sh, scripts/go-tools.sh, scripts/lib/*,
|
|
87
|
+
scripts/templates/* (managed bundle files)
|
|
88
|
+
Tool configs: rustfmt.toml, clippy.toml, .golangci.yml, biome.json, tsconfig.json, package.json*,
|
|
89
|
+
pyproject.toml*, .markdownlint.json, .markdownlintignore, .prettierrc, .prettierignore
|
|
90
|
+
(* stack-aware scaffold / refuses to overwrite existing)
|
|
91
|
+
Aliases: (skipped if --no-aliases) package.json / Makefile / justfile
|
|
92
|
+
Docs: (skipped if --no-docs) README.md / CONTRIBUTING.md / AGENTS.md / AGENTS.md
|
|
93
|
+
CI workflows: (only if --ci) .github/workflows/lint.yml
|
|
94
|
+
.github/workflows/lint-autofix.yml (unless --no-autofix)
|
|
95
|
+
Pre-commit hook: (only if --hooks) lefthook.yml or .husky/pre-commit
|
|
96
|
+
```
|
|
97
|
+
|
|
98
|
+
Note each item that will be skipped (existing config, manifest detected, etc.).
|
|
99
|
+
|
|
100
|
+
### Phase 3 — Dry-run / Confirm gate
|
|
101
|
+
|
|
102
|
+
- If `DRY_RUN=true` → run each sub-script with `--dry-run` to preview the writes, then STOP.
|
|
103
|
+
- Else if `YES=false` and `FORCE=false` → ask the user "Proceed with install? (yes / no)"; abort on anything other than an affirmative.
|
|
104
|
+
- Else proceed.
|
|
105
|
+
|
|
106
|
+
### Phase 4 — Install bundle + tool configs
|
|
107
|
+
|
|
108
|
+
Invoke the self-contained installer shipped inside the skill:
|
|
109
|
+
|
|
110
|
+
```
|
|
111
|
+
STYLE_SH="{{package-root}}/skills/formatters/scripts/bundle/style.sh"
|
|
112
|
+
```
|
|
113
|
+
|
|
114
|
+
Build `init_args`:
|
|
115
|
+
|
|
116
|
+
- Mode flag: `--sync` or `--copy` per Phase 1.
|
|
117
|
+
- `--target "$TARGET"`.
|
|
118
|
+
- Per-stack flags: for each enabled stack, append `--rust|--ts|--python|--go|--docs|--shell` as appropriate.
|
|
119
|
+
- Overwrite policy: `--force` if `FORCE=true`, `--yes` if `YES=true`, `--dry-run` never (dry-run is handled in Phase 3).
|
|
120
|
+
|
|
121
|
+
Run:
|
|
122
|
+
|
|
123
|
+
```
|
|
124
|
+
"$STYLE_SH" init "${init_args[@]}"
|
|
125
|
+
```
|
|
126
|
+
|
|
127
|
+
Surface its stdout. If it exits non-zero, STOP and surface the error verbatim.
|
|
128
|
+
|
|
129
|
+
### Phase 5 — Aliases, docs, CI, hooks (parallel-safe, sequential-ok)
|
|
130
|
+
|
|
131
|
+
Unless suppressed, run each applier. Each writes to a distinct file so they can run sequentially with no conflicts. For each, prefer `--force` when `FORCE=true`.
|
|
132
|
+
|
|
133
|
+
1. **Aliases** (skipped if `NO_ALIASES=true`):
|
|
134
|
+
|
|
135
|
+
```
|
|
136
|
+
{{package-root}}/skills/formatters/scripts/apply-aliases.sh --target "$TARGET" [--force]
|
|
137
|
+
```
|
|
138
|
+
|
|
139
|
+
2. **Docs** (skipped if `NO_DOCS=true`):
|
|
140
|
+
|
|
141
|
+
```
|
|
142
|
+
{{package-root}}/skills/formatters/scripts/apply-docs.sh --target "$TARGET" --profile-file "$PROFILE_FILE" [--force]
|
|
143
|
+
```
|
|
144
|
+
|
|
145
|
+
3. **CI** (only when `CI=true`):
|
|
146
|
+
|
|
147
|
+
```
|
|
148
|
+
{{package-root}}/skills/formatters/scripts/apply-ci.sh --target "$TARGET" --profile-file "$PROFILE_FILE" [--force] [--no-autofix]
|
|
149
|
+
```
|
|
150
|
+
|
|
151
|
+
Pass `--no-autofix` when `NO_AUTOFIX=true` to install only the check workflow. The check workflow runs on every PR and on pushes to the default branch and `release/**`. The autofix workflow runs on same-repo PRs to the default branch (`origin/HEAD`, falling back to `main`), applies `./scripts/style.sh format` + `lint --fix`, and pushes fixes back as `github-actions[bot]`; fork PRs are skipped because `GITHUB_TOKEN` cannot push to them.
|
|
152
|
+
|
|
153
|
+
4. **Hooks** (run when `HOOKS=true`, OR when the target already has a `lefthook.yml` / `.husky/pre-commit` — i.e., `has_lefthook=true` or `has_husky=true` in the profile):
|
|
154
|
+
|
|
155
|
+
```
|
|
156
|
+
{{package-root}}/skills/formatters/scripts/apply-hooks.sh --target "$TARGET" --profile-file "$PROFILE_FILE" [--force]
|
|
157
|
+
```
|
|
158
|
+
|
|
159
|
+
The auto-trigger keeps managed `style-lint` / `style-format` commands in sync on every `--sync` re-run without forcing first-time hook installation on users who never asked for it. `apply-hooks.sh` is idempotent: when managed commands are already present, it logs a no-op; otherwise it merges them in (lefthook) or skips if a non-empty `.husky/pre-commit` exists without `--force` (husky).
|
|
160
|
+
|
|
161
|
+
If any applier exits non-zero, report the failure and continue with the remaining ones — do not let a single applier abort the whole run.
|
|
162
|
+
|
|
163
|
+
### Phase 6 — Summary report
|
|
164
|
+
|
|
165
|
+
Produce a summary with these sections:
|
|
166
|
+
|
|
167
|
+
- **Bundle install** — lines from `style.sh init` (created, overwritten, skipped counts).
|
|
168
|
+
- **Tool configs** — per-stack: written / skipped-existing / refused-to-overwrite (for `pyproject.toml`).
|
|
169
|
+
- **Aliases** — strategy chosen (package-json / makefile / justfile) and alias keys installed.
|
|
170
|
+
- **Docs** — which file was appended or created; section name.
|
|
171
|
+
- **CI** — paths written (`lint.yml` always; `lint-autofix.yml` unless `--no-autofix`), or "not requested".
|
|
172
|
+
- **Hooks** — tool used (lefthook / husky / native), path written, or "not requested".
|
|
173
|
+
- **Next steps** — any of:
|
|
174
|
+
- `git config commit.template .gitmessage` (unrelated to this skill but often useful alongside)
|
|
175
|
+
- `lefthook install` (if `--hooks` + lefthook chosen)
|
|
176
|
+
- Review `scripts/` bundle in the first commit that adds it
|
|
177
|
+
- Re-run with `formatters --sync` after upstream bundle changes
|
|
178
|
+
- Bypass a single hook run: `git commit --no-verify`
|
|
179
|
+
|
|
180
|
+
## Important Notes
|
|
181
|
+
|
|
182
|
+
- **Source of truth is `scripts/style.sh`.** This skill is an orchestrator; it never reimplements linter dispatch. Upgrading the upstream bundle propagates to installed targets via `formatters --sync`.
|
|
183
|
+
- **Never overwrites user-authored configs silently.** `apply-aliases.sh` preserves existing `package.json` scripts unless `--force`. `style.sh init-formatters.sh` refuses to overwrite an existing `pyproject.toml`. Tool configs (prettier, biome, markdownlint, clippy, rustfmt) are skipped when present unless `--force`.
|
|
184
|
+
- **Detection is ignore-aware.** Auto-detection enumerates only project source — git-tracked and untracked-but-not-gitignored files (via `git ls-files`), or a `find` fallback in non-git dirs — and skips well-known vendored/build directories (`node_modules`, `dist`, `build`, `vendor`, `.venv`, caches, …). A stray `*.rs`/`*.py` inside `node_modules/` or a build-output tree no longer flips `detect_*` to `true`. A vendored tree that is committed **and not gitignored** is still seen as source; list it in a root `.style-excludes` file (or `STYLE_EXTRA_EXCLUDES`) to drop it from detection and linting. See `references/stack-detection.md`.
|
|
185
|
+
- **`--hooks` is opt-in.** Hooks change commit behavior repo-wide. The installer always prints the `git commit --no-verify` escape.
|
|
186
|
+
- **Re-entrancy.** Re-running the skill with `--sync` on an already-installed target is a no-op for unchanged files, and prunes managed files removed upstream. Safe to schedule periodically.
|
|
187
|
+
- **Runtime-neutral aliases.** When the target has no `package.json`, the skill installs Makefile targets instead. Node is never required downstream.
|
|
188
|
+
- **Composing with `/ycc:init`.** `/ycc:init --formatters` delegates here and passes through `--dry-run` and `--force`. Invoke this skill directly for full flag coverage (CI, hooks, per-stack overrides).
|
|
189
|
+
- For per-language tool rationale (why biome over eslint, ruff over flake8, etc.), see `references/best-practices.md`.
|
|
190
|
+
|
|
191
|
+
## Support files
|
|
192
|
+
|
|
193
|
+
Pointers below are conditional reads, not extra execution steps. Helpers consume templates automatically.
|
|
194
|
+
|
|
195
|
+
- Read `references/templates/package-json-scripts.json.tmpl`, `references/templates/makefile-snippet.mk.tmpl`, and `references/templates/justfile-snippet.just.tmpl` when inspecting alias output for package.json, Makefile, or justfile respectively.
|
|
196
|
+
- Read `references/templates/readme-section.md.tmpl` when inspecting generated documentation (`--no-docs` skips it).
|
|
197
|
+
- Read `references/templates/lint.yml.tmpl` when inspecting `--ci` check output; read `references/templates/lint-autofix.yml.tmpl` when `--ci` enables autofix (not `--no-autofix`).
|
|
198
|
+
- Read `references/templates/lefthook.yml.tmpl` when inspecting lefthook output; read `references/templates/husky-pre-commit.tmpl` when inspecting Husky output under `--hooks`.
|
|
199
|
+
- Run `scripts/bundle/style.sh` when installing/syncing the bundle in Phase 4. Read `scripts/bundle/init-formatters.sh` when inspecting its install behavior; `style.sh` runs it, do not run it separately.
|
|
200
|
+
- Read `scripts/bundle/format.sh` and `scripts/bundle/lint.sh` when inspecting installed format/lint dispatch; downstream `style.sh` runs them, do not run them separately here.
|
|
201
|
+
- Read `scripts/bundle/go-tools.sh` when inspecting Go tool setup; read `scripts/bundle/install-shellcheck.sh` when inspecting pinned ShellCheck setup. Installer/dispatcher runs them as needed; do not run them separately here.
|
|
202
|
+
- Read `scripts/bundle/lib/excludes.sh` when inspecting ignore rules and `scripts/bundle/lib/modified-files.sh` when inspecting changed-file selection. Sourceable helpers, not standalone commands.
|
|
203
|
+
- Read `scripts/bundle/lib/shellcheck-resolve.sh` when inspecting ShellCheck lookup and `scripts/bundle/lib/shellcheck-version.sh` when inspecting its pinned version. Sourceable helpers, not standalone commands.
|
|
204
|
+
- Read `scripts/bundle/templates/biome.json` and `scripts/bundle/templates/tsconfig.json` when inspecting TypeScript/JavaScript config output.
|
|
205
|
+
- Read `scripts/bundle/templates/clippy.toml` and `scripts/bundle/templates/rustfmt.toml` when inspecting Rust config output.
|
|
206
|
+
- Read `scripts/bundle/templates/python-pyproject.toml` when inspecting Python config output.
|
|
207
|
+
- Read `scripts/bundle/templates/markdownlint.json`, `scripts/bundle/templates/markdownlintignore`, `scripts/bundle/templates/prettierrc.json`, and `scripts/bundle/templates/prettierignore` when inspecting docs config output.
|