@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,272 @@
|
|
|
1
|
+
---
|
|
2
|
+
name: init
|
|
3
|
+
description: Initializes project AI-agent docs and workspace conventions. Use when
|
|
4
|
+
generating agent rules docs, adding GitHub templates, or bootstrapping project rules.
|
|
5
|
+
---
|
|
6
|
+
|
|
7
|
+
# opencode Workspace Initialization
|
|
8
|
+
|
|
9
|
+
Profiles the project, authors the canonical tool-neutral `AGENTS.md` rules file (with a compatibility `@AGENTS.md`-importing `CLAUDE.md` shim and optional Claude-only notes), and optionally emits GitHub issue templates and git convention files — all flag-driven, non-destructive by default.
|
|
10
|
+
|
|
11
|
+
## Current Project Context
|
|
12
|
+
|
|
13
|
+
- **Profile detection** (complete `key=value` output, `project_root` first): !`{{package-root}}/skills/init/scripts/profile-project.sh`
|
|
14
|
+
|
|
15
|
+
Context injection is deliberately one scoped helper call: no `pwd`, `ls | head`, `2>/dev/null`, or other shell pipeline/redirect. Some hosts reject compound pipelines as a whole even when each segment is allowed, and `head` truncated the profile (dropping keys such as `has_releasing_md`). Do not widen `allowed-tools` with `find`, `head`, `wc`, or `pwd`.
|
|
16
|
+
|
|
17
|
+
### Headless / permissions
|
|
18
|
+
|
|
19
|
+
- `allowed-tools` grants only the scoped `scripts/*.sh` helpers plus a few simple read/copy commands. Compound shell pipelines (`a | b`, `a && b`, redirection tricks) are **host-permission behavior**: this skill does not control them, and a caller allowlist that permits each segment may still reject the whole pipeline. Never rely on them.
|
|
20
|
+
- Every step below has a pipeline-free supported path: `profile-project.sh` (full profile), `count-source-files.sh` (capped count), `render-template.sh`, `migrate-rules.sh`, `rules-report.sh`. Run each as one command.
|
|
21
|
+
- All helpers require Python 3.11+ and fail up front with a readable message (no partial output) on an older `python3`.
|
|
22
|
+
|
|
23
|
+
## Arguments
|
|
24
|
+
|
|
25
|
+
| Flag | Meaning | Example |
|
|
26
|
+
| --------------------------- | --------------------------------------------------------------------------------------------- | ------------------------------------------- |
|
|
27
|
+
| `--dry-run` | Preview every planned file; make no writes | `/ycc:init --dry-run` |
|
|
28
|
+
| `--docs-only` | Skip MCP/agent selection; emit the rules files only | `/ycc:init --docs-only` |
|
|
29
|
+
| `--templates` | Also emit `.github/` issue forms, PR template, labels | `/ycc:init --templates` |
|
|
30
|
+
| `--git` | Also emit `.gitignore`, `.gitmessage`, commitlint (JS/TS), and the lefthook bundle | `/ycc:init --git` |
|
|
31
|
+
| `--vendor-neutral` | Also emit `.ai/rules/project.md` pointer to `AGENTS.md` | `/ycc:init --vendor-neutral` |
|
|
32
|
+
| `--formatters` | Also bootstrap lint/format via `formatters` (scripts, configs, aliases, docs) | `/ycc:init --formatters` |
|
|
33
|
+
| `--release-model[=<model>]` | Run `release-model` without asking when `RELEASING.md` is missing | `/ycc:init --release-model=trunk-only` |
|
|
34
|
+
| `--no-release-model` | Never offer `release-model` | `/ycc:init --no-release-model` |
|
|
35
|
+
| `--migrate-rules` | Move an existing long `CLAUDE.md` into `AGENTS.md` (dry-run diff first) | `/ycc:init --migrate-rules` |
|
|
36
|
+
| `--allow-non-git` | With `--migrate-rules`: permit non-git or git-ignored rules files (timestamped backups first) | `/ycc:init --migrate-rules --allow-non-git` |
|
|
37
|
+
| `--no-claude-md` | Skip the `@AGENTS.md` `CLAUDE.md` shim (needs Claude Code 2.1.277+) | `/ycc:init --no-claude-md` |
|
|
38
|
+
| `--update` | Structured refresh of existing artifacts (merge/migrate, never clobber) | `/ycc:init --update` |
|
|
39
|
+
| `--force` | Overwrite existing files without prompting | `/ycc:init --force` |
|
|
40
|
+
| `--profile=<lang>` | Override detected language (`rust`, `ts-node`, `python`, `go`, `mixed`, `empty`) | `/ycc:init --profile=rust` |
|
|
41
|
+
|
|
42
|
+
Flags are composable. See `references/flag-reference.md` for the full matrix.
|
|
43
|
+
|
|
44
|
+
## Task
|
|
45
|
+
|
|
46
|
+
Execute the following phases in order. Phases are short — do not add narrative prose between steps.
|
|
47
|
+
|
|
48
|
+
### Phase 0 — Parse flags
|
|
49
|
+
|
|
50
|
+
Extract mode booleans from `$ARGUMENTS`:
|
|
51
|
+
|
|
52
|
+
- `DRY_RUN` — true if `--dry-run` present
|
|
53
|
+
- `DOCS_ONLY` — true if `--docs-only` present
|
|
54
|
+
- `TEMPLATES` — true if `--templates` present
|
|
55
|
+
- `GIT` — true if `--git` present
|
|
56
|
+
- `VENDOR_NEUTRAL` — true if `--vendor-neutral` present
|
|
57
|
+
- `FORMATTERS` — true if `--formatters` present
|
|
58
|
+
- `RELEASE_MODEL` — true if `--release-model` or `--release-model=<model>` present
|
|
59
|
+
- `RELEASE_MODEL_VALUE` — `<model>` from `--release-model=<model>`, else empty. Must be `trunk-only` or `release-branches`; any other value is an error before any phase runs.
|
|
60
|
+
- `NO_RELEASE_MODEL` — true if `--no-release-model` present. Combining it with `--release-model` is an error before any phase runs.
|
|
61
|
+
- `ALLOW_NON_GIT` — true if `--allow-non-git` present (only meaningful with `--migrate-rules`).
|
|
62
|
+
- `NO_CLAUDE_MD` — true if `--no-claude-md` present.
|
|
63
|
+
- `MIGRATE_RULES` — true if `--migrate-rules` present. Runs only the rules migration (Phase 5.7); combine with `--dry-run` for the preview without a prompt.
|
|
64
|
+
- `UPDATE` — true if `--update` present
|
|
65
|
+
- `FORCE` — true if `--force` present
|
|
66
|
+
- `PROFILE` — value of `--profile=<lang>` if provided, else empty
|
|
67
|
+
|
|
68
|
+
Defaults: all booleans off; no profile override. `--update` and `--force` are mutually reinforcing: `--update` controls merge/migrate behavior, `--force` controls conflict resolution. Without either, existing files are preserved with a diff-and-ask prompt.
|
|
69
|
+
|
|
70
|
+
### Phase 1 — Profile
|
|
71
|
+
|
|
72
|
+
1. Run `{{package-root}}/skills/init/scripts/profile-project.sh` once, with no pipeline, `head`, or `2>/dev/null`, and parse the complete `key=value` output into variables (the Current Project Context above already holds the same output; re-run only after it changes). See `references/project-profile-heuristics.md` for the key list.
|
|
73
|
+
2. If `PROFILE` flag is set, override `primary_language` with that value.
|
|
74
|
+
3. If `is_empty=true` OR `primary_language=unknown`: ask the user conversationally for project name, purpose, and primary language. Set `project_name`, `project_purpose`, and `primary_language` from their answers.
|
|
75
|
+
4. If `UPDATE=false` AND at least two of `has_claude_md`, `has_agents_md`, `has_cursor_rules`, `has_issue_templates`, `has_gitmessage`, `has_gitignore` are true: warn the user "Existing doc/workflow files detected — consider re-running with `--update` for structured refresh, or `--force` to overwrite. Continuing with default skip-on-conflict behavior."
|
|
76
|
+
5. Surface the resolved profile summary to the user and wait for confirmation before writing anything — except when `DRY_RUN=true`, which proceeds directly to preview.
|
|
77
|
+
|
|
78
|
+
If `MIGRATE_RULES=true`, jump directly to Phase 5.7 after profiling; skip all other rendering, release-model, and formatter phases. Migration ignores `--force`.
|
|
79
|
+
|
|
80
|
+
### Phase 2 — Optional deep analysis
|
|
81
|
+
|
|
82
|
+
Skip this phase when `DOCS_ONLY=true`.
|
|
83
|
+
|
|
84
|
+
Otherwise, estimate source file count with the single scoped helper (no pipeline; walk errors stay visible, output is capped at 51 files):
|
|
85
|
+
|
|
86
|
+
```bash
|
|
87
|
+
{{package-root}}/skills/init/scripts/count-source-files.sh --repo .
|
|
88
|
+
```
|
|
89
|
+
|
|
90
|
+
It prints `count=<n>`, `capped=true|false`, `cap=50`. If `capped=true` (i.e., >50 files), dispatch `@codebase-research-analyst` with a prompt requesting:
|
|
91
|
+
|
|
92
|
+
- Key architectural patterns and conventions to encode in `AGENTS.md`
|
|
93
|
+
- Critical commands (test, lint, build, deploy) to embed
|
|
94
|
+
- Project-specific MUST/MUST NOT rules worth adding
|
|
95
|
+
|
|
96
|
+
Feed the agent's output into the `AGENTS.md` rendering in Phase 3 (conventions and commands only; keep the file well under 100 lines).
|
|
97
|
+
|
|
98
|
+
### Phase 3 — Render templates
|
|
99
|
+
|
|
100
|
+
Load each applicable `.tmpl` file from `{{package-root}}/skills/init/templates/`. Substitute all `{{PLACEHOLDER}}` variables using profile values from Phase 1 (and Phase 2 if run). For language-conditional blocks (`{{#IF_RUST}}...{{/IF_RUST}}` etc.), include only the block matching `primary_language`. Leave `{{#IF_RELEASE_MODEL}}...{{/IF_RELEASE_MODEL}}` blocks (in `AGENTS.md.tmpl` and `github/labels.md.tmpl`) unresolved — Phase 5 (dry run) or Phase 5.5 resolves them. Render all files in memory — do NOT write yet. `scripts/render-template.sh --template <bundled-template> [--profile -]` (profile on stdin; needs Bash 3.2+ and Python 3) renders a template without writing (a thin wrapper over `scripts/render-template.py`). It only reads templates under the skill's own `templates/` directory. A command that `profile-project.sh` reports as `unknown` renders as `# not detected` inside fenced shell blocks, and any template that would put it into YAML (`run:`) or a checklist guards it with `IF_*_CMD` / `IF_NO_*_CMD` blocks instead (lefthook `pre-push` is omitted, with a comment, when no test command is detected). If `profile-project.sh` warns that `jq` is missing, say so in the Phase 1 summary: JS/TS commands could not be detected and will render as `# not detected`. Mixed-language profiles keep the language blocks of every component language in `secondary_languages`.
|
|
101
|
+
|
|
102
|
+
Rendering map:
|
|
103
|
+
|
|
104
|
+
| Condition | Source template | Target path |
|
|
105
|
+
| -------------------------------------------------------------- | -------------------------------------------- | -------------------------------------------- |
|
|
106
|
+
| Always | `AGENTS.md.tmpl` | `AGENTS.md` (canonical, ≤80 template lines) |
|
|
107
|
+
| Unless `NO_CLAUDE_MD=true` (see below) | `CLAUDE.md.tmpl` | `CLAUDE.md` (`@AGENTS.md` + short section) |
|
|
108
|
+
| Path-scoped rules exist (see below) | `cursor-rule.mdc.tmpl` | `.cursor/rules/<scope>.mdc` |
|
|
109
|
+
| `VENDOR_NEUTRAL=true` | `ai-rule.md.tmpl` | `.ai/rules/project.md` (pointer) |
|
|
110
|
+
| `TEMPLATES=true` | `github/bug_report.yml.tmpl` | `.github/ISSUE_TEMPLATE/bug_report.yml` |
|
|
111
|
+
| `TEMPLATES=true` | `github/feature_request.yml.tmpl` | `.github/ISSUE_TEMPLATE/feature_request.yml` |
|
|
112
|
+
| `TEMPLATES=true` | `github/docs_request.yml.tmpl` | `.github/ISSUE_TEMPLATE/docs_request.yml` |
|
|
113
|
+
| `TEMPLATES=true` | `github/config.yml.tmpl` | `.github/ISSUE_TEMPLATE/config.yml` |
|
|
114
|
+
| `TEMPLATES=true` | `github/pull_request_template.md.tmpl` | `.github/pull_request_template.md` |
|
|
115
|
+
| `TEMPLATES=true` | `github/labels.md.tmpl` | `.github/labels.md` |
|
|
116
|
+
| `TEMPLATES=true` | `github/copilot-instructions.md.tmpl` | `.github/copilot-instructions.md` |
|
|
117
|
+
| `TEMPLATES=true` | `github/workflows/pr-title.yml.tmpl` | `.github/workflows/pr-title.yml` |
|
|
118
|
+
| `TEMPLATES=true` | `github/workflows/pr-title-autofix.yml.tmpl` | `.github/workflows/pr-title-autofix.yml` |
|
|
119
|
+
| `GIT=true` | `git/gitignore.tmpl` | `.gitignore` |
|
|
120
|
+
| `GIT=true` | `git/gitmessage.tmpl` | `.gitmessage` |
|
|
121
|
+
| `GIT=true` | `git/lefthook.yml.tmpl` | `lefthook.yml` |
|
|
122
|
+
| `GIT=true` | `git/install-lefthook.sh.tmpl` | `scripts/install-lefthook.sh` |
|
|
123
|
+
| `GIT=true` | `git/lefthook-usage.md.tmpl` | `docs/lefthook-usage.md` |
|
|
124
|
+
| `GIT=true` AND `primary_language` in `{typescript,javascript}` | `git/commitlint.config.cjs.tmpl` | `commitlint.config.cjs` |
|
|
125
|
+
|
|
126
|
+
**Rules-file shape**: `AGENTS.md` is the single canonical rules file (detected commands, project conventions, MUST / MUST NOT, a one-line Conventional Commits rule, links) — no commit-types table, no stack table, no generic SHOULDs. `CLAUDE.md` is always rendered as the `@AGENTS.md` shim (plus a short `## Claude-only notes` section, ≤15 lines total, when Phase 2 or the user supplied Claude-specific content), because Claude Code reads `CLAUDE.md`, not `AGENTS.md`, in versions before 2.1.277; newer versions fall back to `AGENTS.md` when no `CLAUDE.md` exists, so omitting the shim is version-dependent. Skip the shim only with `--no-claude-md` or an explicit user choice, and then state the 2.1.277+ requirement in the Phase 7 report. Emit `.cursor/rules/*.mdc` only for path-scoped rules (`alwaysApply: false`, real `globs`); recent Cursor versions read a root `AGENTS.md` when available (verify for your version), so never emit an always-apply copy of the project rules; offer `--vendor-neutral` or a path-scoped rule if the user's Cursor does not. `copilot-instructions.md` points at `AGENTS.md` but does not rely on Copilot following the link: it also carries the detected commands and three repo-neutral essentials (no secrets, Conventional Commits, issue link).
|
|
127
|
+
|
|
128
|
+
**Language-block selection**: for every template except `gitignore.tmpl`, include only the block matching `primary_language`. For `gitignore.tmpl`, include every block whose language appears in `primary_language` or `secondary_languages` (comma-separated) so mixed-stack repos get every applicable section. For `gitignore.tmpl`, `javascript` is treated as `typescript` for `{{#IF_TS}}` activation; `terraform` activates `{{#IF_TERRAFORM}}`.
|
|
129
|
+
|
|
130
|
+
Fill `PROJECT_CONVENTIONS` with verified project-specific architecture/naming constraints from existing docs, Phase 2, or the user; if none are known, use "No additional project-specific conventions detected." Never stamp generic language conventions or assumed tools. Use `--keep IF_CLAUDE_ONLY --set CLAUDE_ONLY_NOTES=...` for the optional Claude-only notes.
|
|
131
|
+
|
|
132
|
+
See `references/template-library.md` for placeholder definitions.
|
|
133
|
+
|
|
134
|
+
### Phase 4 — MCP/agent selection
|
|
135
|
+
|
|
136
|
+
Skip this phase when `DOCS_ONLY=true`.
|
|
137
|
+
|
|
138
|
+
Run the catalog generators:
|
|
139
|
+
|
|
140
|
+
```bash
|
|
141
|
+
{{package-root}}/skills/init/scripts/generate-mcp-catalog.sh
|
|
142
|
+
{{package-root}}/skills/init/scripts/generate-agent-catalog.sh
|
|
143
|
+
```
|
|
144
|
+
|
|
145
|
+
Present all available options as checkboxes organized by category. Pre-check items that align with the detected profile (language, infrastructure, workflow). Let the user freely adjust the selection before proceeding.
|
|
146
|
+
|
|
147
|
+
### Phase 5 — Dry-run check
|
|
148
|
+
|
|
149
|
+
If `DRY_RUN=true`:
|
|
150
|
+
|
|
151
|
+
- Print a listing of every planned file with a preview snippet (first ~15 lines each). Resolve `IF_RELEASE_MODEL` blocks as kept when `has_releasing_md=true` or `RELEASE_MODEL=true`, else drop them.
|
|
152
|
+
- Print planned rules-file line counts (see Phase 7) so oversize output is visible before any write.
|
|
153
|
+
- Show the planned `.mcp.json` content.
|
|
154
|
+
- List agent files that would be copied.
|
|
155
|
+
- Print the release-model step Phase 5.5 would take: "skip (RELEASING.md exists)", "skip (--no-release-model)", "would run `release-model` [--model <value> --yes]", or "would offer `release-model`".
|
|
156
|
+
- STOP — make no writes.
|
|
157
|
+
|
|
158
|
+
### Phase 5.5 — Release model
|
|
159
|
+
|
|
160
|
+
Decide whether to create `RELEASING.md` (the project's branching and release rules — see `{{package-root}}/shared/references/branching-model.md`), then resolve the `IF_RELEASE_MODEL` blocks.
|
|
161
|
+
|
|
162
|
+
1. **Choose the action** (first match wins):
|
|
163
|
+
- `has_releasing_md=true` → skip. The project already has a release model; init reads only its presence (`/ycc:release-model --audit` validates it).
|
|
164
|
+
- `NO_RELEASE_MODEL=true` → skip.
|
|
165
|
+
- `RELEASE_MODEL=true` → run without asking.
|
|
166
|
+
- `DOCS_ONLY=true` (and no `--release-model`) → skip; `--docs-only` stays limited to the rules files.
|
|
167
|
+
- Otherwise → ask: "This project has no `RELEASING.md`. Run `release-model` to choose a branching and release model (trunk-only or release branches) and write one?" Default: yes. A missing `RELEASING.md` never blocks init — "no" continues normally.
|
|
168
|
+
2. **Run** the `release-model` skill when chosen. With `RELEASE_MODEL_VALUE` set, pass `--model <value> --yes`: the model was decided upstream (for example by `blueprint`), so the proposal is accepted without questions. Otherwise run it without arguments so it can propose a model from the repo's signals and confirm with the user.
|
|
169
|
+
3. **Resolve** every `IF_RELEASE_MODEL` block rendered in Phase 3: keep the block contents when `RELEASING.md` now exists at the project root, else drop the block. This covers "exists already" and "created in this run", and drops the pointer if `release-model` was declined or failed.
|
|
170
|
+
4. If `release-model` errors, record the failure for the Phase 7 summary and continue — do not abort init.
|
|
171
|
+
|
|
172
|
+
### Phase 5.7 — Rules migration (when `MIGRATE_RULES=true`)
|
|
173
|
+
|
|
174
|
+
Runs instead of Phases 2–6.5 (profile only), for repos that already have a long `CLAUDE.md`. Never silently rewrites it.
|
|
175
|
+
|
|
176
|
+
1. Run `{{package-root}}/skills/init/scripts/migrate-rules.sh --repo . --dry-run` (a Bash 3.2 entrypoint for `scripts/migrate-rules.py`, which shares the `@AGENTS.md` import parser in `_shared/scripts/rules_pointer.py` (via `scripts/rules_file_lib.py`) with release-model's `pointer-targets.sh`) and show the full output: the move diff for `AGENTS.md` and `CLAUDE.md`, new line counts, and the **content-loss list** (the full text of any replaced legacy pointer `AGENTS.md`, sections skipped as duplicates, and merge conflicts). Nothing is written.
|
|
177
|
+
2. With `DRY_RUN=true`, stop here.
|
|
178
|
+
3. Otherwise ask once: "Apply this migration?" The script refuses outside the git root, over uncommitted changes, or for git-ignored/symlinked rules files; `--allow-non-git` is the explicit opt-in for those cases. Every apply first copies both files to a timestamped backup directory (printed in the output) and writes via temp file + atomic rename, restoring from the backup if the pair cannot be completed. Routing is heading-based and shown per section: only exact Claude runtime headings stay in `CLAUDE.md`; everything else moves to `AGENTS.md`, and headings that merely mention Claude are routed to `AGENTS.md` and listed as ambiguous for review. On yes, run the same command with `--yes` instead of `--dry-run`. On no, stop; nothing changed.
|
|
179
|
+
4. Content moves to `AGENTS.md`; only exact Claude runtime headings remain after `@AGENTS.md`. Nothing is deleted (a replaced legacy pointer's full text is printed), ambiguous headings are reported, and no duplicate H1/headings are created. Report the new line counts per Phase 7.
|
|
180
|
+
|
|
181
|
+
### Phase 6 — Apply
|
|
182
|
+
|
|
183
|
+
For each rendered file from Phase 3, apply the resolution rule below. Never silently clobber user content.
|
|
184
|
+
|
|
185
|
+
**Target does not exist** → write the rendered file.
|
|
186
|
+
|
|
187
|
+
**Existing rules safeguard (before all resolution rules)** → never rewrite an existing non-importing `CLAUDE.md` or a legacy pointer `AGENTS.md`, even with `--force`; offer `--migrate-rules`. Skip rendering new rules files that would conflict with that existing canonical layout.
|
|
188
|
+
|
|
189
|
+
**Target exists AND `FORCE=true`** → overwrite other artifacts and log the path.
|
|
190
|
+
|
|
191
|
+
**Target exists AND `UPDATE=true`** → structured refresh per artifact type:
|
|
192
|
+
|
|
193
|
+
| Artifact | Update behavior |
|
|
194
|
+
| --------------------------------------------------------- | --------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
|
|
195
|
+
| `AGENTS.md` (canonical or custom) | Parse existing `##`-level headings. Append only the template sections that are missing; preserve existing content verbatim. Report the appended section list. |
|
|
196
|
+
| `AGENTS.md` (legacy pointer, `agents_md_is_pointer=true`) | Offer `--migrate-rules` (the pointer names `CLAUDE.md`, so the real rules are there). Without it, leave the file untouched. |
|
|
197
|
+
| `CLAUDE.md` (already `@AGENTS.md`) | Leave untouched. |
|
|
198
|
+
| `CLAUDE.md` (long, no `@AGENTS.md`) | Never rewrite. Print the line count and offer `--migrate-rules` (dry-run diff first). Without it, leave the file and `AGENTS.md` as they are. |
|
|
199
|
+
| `.cursor/rules/<scope>.mdc` | Overwrite body content; preserve any non-standard frontmatter keys the user added beyond `description`, `globs`, `alwaysApply`. |
|
|
200
|
+
| `.cursor/rules/project.mdc` (legacy always-apply copy) | Leave as is; advise removing it once `AGENTS.md` is canonical (Cursor reads `AGENTS.md` when available; verify your version). |
|
|
201
|
+
| `.cursorrules` (legacy, `has_legacy_cursorrules=true`) | Offer `--migrate-rules`-style review: show its content, fold project-specific lines into `AGENTS.md`, and advise deleting `.cursorrules` (do not delete automatically). |
|
|
202
|
+
| `.ai/rules/project.md` | Overwrite the pointer body. |
|
|
203
|
+
| `.github/ISSUE_TEMPLATE/*.yml` | Per template: if missing → create; if present → show diff and default to skip (issue forms are often customized). `--update --force` overwrites. |
|
|
204
|
+
| `.github/pull_request_template.md` | Show diff; default skip. `--update --force` overwrites. |
|
|
205
|
+
| `.github/labels.md` | Always overwrite (reference doc, safe to refresh). |
|
|
206
|
+
| `.github/copilot-instructions.md` | Show diff; default skip (users customise agent-facing rules). `--update --force` overwrites. |
|
|
207
|
+
| `.github/workflows/pr-title.yml` | Show diff; default skip (users may customise the Conventional Commits type list or branch filters). `--update --force` overwrites. |
|
|
208
|
+
| `.github/workflows/pr-title-autofix.yml` | Show diff; default skip (users may tune the placeholder regex, the type-normalization pass, or the draft-toggle behaviour). `--update --force` overwrites. |
|
|
209
|
+
| `.gitignore` | Show diff; default skip (users curate this file heavily). `--update --force` overwrites. When `has_gitignore=true` at Phase 1, warn the user the file already exists. |
|
|
210
|
+
| `.gitmessage` | Show diff; default skip. `--update --force` overwrites (usually safe — it is a reference template). |
|
|
211
|
+
| `commitlint.config.cjs` | If present → show diff and default skip with a warning ("commitlint rules are often project-customized"). `--update --force` overwrites. |
|
|
212
|
+
| `lefthook.yml` | Show diff; default skip (users often extend the config with project-specific commands). `--update --force` overwrites. When `has_lefthook_config=true` at Phase 1, warn the user the file already exists. |
|
|
213
|
+
| `scripts/install-lefthook.sh` | Always overwrite (managed bootstrap tooling; tracks upstream improvements). |
|
|
214
|
+
| `docs/lefthook-usage.md` | Always overwrite (managed reference doc). |
|
|
215
|
+
|
|
216
|
+
**Target exists AND `UPDATE=false` AND `FORCE=false`** → show a unified diff, then prompt the user with three choices: overwrite, merge (only meaningful for `AGENTS.md`), or skip. Default choice: skip.
|
|
217
|
+
|
|
218
|
+
Then apply MCP/agent selections from Phase 4 (skipped when `DOCS_ONLY=true`):
|
|
219
|
+
|
|
220
|
+
```bash
|
|
221
|
+
${HOME}/.config/opencode/mcp-library/generate-mcp-config.sh <selected-mcps>
|
|
222
|
+
```
|
|
223
|
+
|
|
224
|
+
Create `.claude/agents/` if needed; copy selected agent files from `{{package-root}}/agents/`.
|
|
225
|
+
|
|
226
|
+
### Phase 6.5 — Formatter bootstrap (when `FORMATTERS=true`)
|
|
227
|
+
|
|
228
|
+
When `FORMATTERS=true`, invoke the `formatters` skill to bootstrap the lint/format environment. Pass through `--dry-run` and `--force`; let the skill handle its own flag defaults for everything else (stack detection, sync vs copy, aliases, docs). Do NOT duplicate formatter logic here — the formatters skill owns every decision about scripts, tool configs, aliases, and docs.
|
|
229
|
+
|
|
230
|
+
If `DRY_RUN=true`, invoke `formatters --dry-run` and merge its preview output into the Phase 7 summary. Otherwise invoke `formatters` normally.
|
|
231
|
+
|
|
232
|
+
If the formatters skill exits with an error, record the failure in the Phase 7 summary and continue — do not let a formatter error abort the overall init run.
|
|
233
|
+
|
|
234
|
+
### Phase 7 — Summary report
|
|
235
|
+
|
|
236
|
+
Produce a summary using `{{package-root}}/skills/init/templates/workspace-report.md` as the base. Extend it with these sections appended after the existing MCP/agents tables:
|
|
237
|
+
|
|
238
|
+
**Docs emitted** — list each path written, or "skipped: user chose keep". State explicitly when the user opted out of the CLAUDE.md shim (requires Claude Code 2.1.277+ for native AGENTS.md fallback).
|
|
239
|
+
|
|
240
|
+
**Rules files** — one line per rules file that exists after the run (`AGENTS.md`, `CLAUDE.md`, `.github/copilot-instructions.md`, `.cursor/rules/*.mdc`) with its line count, e.g. `AGENTS.md: 31 lines`. Mark any file over 200 lines `⚠ over 200 lines — long rules files lose adherence; trim or run --migrate-rules`. Run `{{package-root}}/skills/init/scripts/rules-report.sh` to produce these lines; do not estimate.
|
|
241
|
+
|
|
242
|
+
**GitHub templates emitted** — list each `.github/` path written (omit section if `TEMPLATES=false`).
|
|
243
|
+
|
|
244
|
+
**Git conventions emitted** — list each git artifact path written (omit section if `GIT=false`).
|
|
245
|
+
|
|
246
|
+
**Release model** — the Phase 5.5 outcome: `RELEASING.md` created (with the chosen model), already present, skipped (and why), declined, or failed (with the error).
|
|
247
|
+
|
|
248
|
+
**Next steps** — suggest:
|
|
249
|
+
|
|
250
|
+
- `git config commit.template .gitmessage` (if `GIT=true`)
|
|
251
|
+
- Review the generated `.gitignore` — confirm language sections match the stack and add project-specific entries (secrets files, generated assets, local scratch dirs). Rust libraries should un-comment the `Cargo.lock` ignore line (if `GIT=true`).
|
|
252
|
+
- `bash scripts/install-lefthook.sh` to install the `lefthook` binary and activate the hooks defined in `lefthook.yml` (if `GIT=true`). Re-runnable on every checkout; safe to rerun.
|
|
253
|
+
- For JS/TS projects: run `{{PACKAGE_MANAGER}} install` (devDependencies `@commitlint/cli` + `@commitlint/config-conventional` must be installed for the `commit-msg` hook to work).
|
|
254
|
+
- Review `.github/labels.md` and run the `gh label create` commands listed there (if `TEMPLATES=true`). Under the release-branches model, create one `backport:X.Y` label per maintenance branch.
|
|
255
|
+
- Review `RELEASING.md` and commit it with the rest of the init output (if Phase 5.5 created it). If the offer was declined, `/ycc:release-model` can create it later.
|
|
256
|
+
- Review `.github/copilot-instructions.md` — it is a short pointer to `AGENTS.md` plus the detected commands; keep it that way (if `TEMPLATES=true`).
|
|
257
|
+
- Enable the PR title check as a required status: **Settings → Branches → Branch protection rules**, add `Validate Conventional Commit PR title` (the job name from `.github/workflows/pr-title.yml`) to the required checks. Without this, the workflow runs but isn't enforced (if `TEMPLATES=true`).
|
|
258
|
+
- `.github/workflows/pr-title-autofix.yml` runs alongside the validator and (1) strips placeholder prefixes (`[WIP]`, `Draft:`, `Initial plan`) from PR titles server-side, then (2) normalizes a leading Conventional Commit type that was written without a colon or with capitalization (e.g. `Refactor X` → `refactor: X`, `Feat(auth): X` → `feat(auth): X`). Runs because GitHub Copilot's coding-agent token often lacks `pull_requests:write` and cannot self-correct. Do **not** add this workflow to required checks — it is an auto-correcting side effect, not a gate (if `TEMPLATES=true`).
|
|
259
|
+
- Open `AGENTS.md` to review and refine the generated project rules (it is the canonical file; add only what is specific to this project).
|
|
260
|
+
- If `has_legacy_cursorrules=true`: fold any project-specific lines of `.cursorrules` into `AGENTS.md`, then delete it (init never deletes it).
|
|
261
|
+
|
|
262
|
+
## Important Notes
|
|
263
|
+
|
|
264
|
+
- Default behavior never destroys existing files; always diff-and-ask before overwriting.
|
|
265
|
+
- `--update` enables structured merge/migrate semantics and is the recommended flag when re-running `init` in a project that already has docs/templates.
|
|
266
|
+
- `--force` is opt-in and always logs every path it overwrote. `--update --force` applies merge semantics but overwrites on conflict instead of skipping.
|
|
267
|
+
- No new agents are registered. `codebase-research-analyst` is called only once, conditionally, for large existing repos (>50 source files) when `--docs-only` is not set.
|
|
268
|
+
- The MCP and agent selection flow is preserved unchanged behind `--docs-only`.
|
|
269
|
+
- A missing `RELEASING.md` never blocks init. Phase 5.5 only offers `release-model`; `--release-model` runs it and `--no-release-model` silences the offer.
|
|
270
|
+
- For the full flag matrix with composability examples, see `references/flag-reference.md`.
|
|
271
|
+
- Read `references/conventional-commits.md` only when the user asks for the full commit-type reference; the generated `AGENTS.md` carries a one-line rule, not the types table. Read `references/label-taxonomy.md` when rendering
|
|
272
|
+
`.github/labels.md` (`--templates`).
|
|
@@ -0,0 +1,114 @@
|
|
|
1
|
+
# Conventional Commits
|
|
2
|
+
|
|
3
|
+
## Contents
|
|
4
|
+
|
|
5
|
+
- Commit Types
|
|
6
|
+
- Scope Syntax
|
|
7
|
+
- Breaking Change Syntax
|
|
8
|
+
- Body and Footer Rules
|
|
9
|
+
- Internal Docs Convention
|
|
10
|
+
- Examples
|
|
11
|
+
|
|
12
|
+
Condensed Conventional Commits 1.0.0 spec. The generated `AGENTS.md` carries a one-line rule (not the types table); read this when a maintainer asks for the full reference.
|
|
13
|
+
|
|
14
|
+
---
|
|
15
|
+
|
|
16
|
+
## Commit Types
|
|
17
|
+
|
|
18
|
+
| Type | Purpose | Semver bump (release tooling) |
|
|
19
|
+
| ---------- | ----------------------------------------------- | ----------------------------- |
|
|
20
|
+
| `feat` | New user-facing feature | **minor** |
|
|
21
|
+
| `fix` | Bug fix | **patch** |
|
|
22
|
+
| `docs` | Documentation only | none |
|
|
23
|
+
| `refactor` | Code change that is neither a fix nor a feature | none |
|
|
24
|
+
| `perf` | Performance improvement | none (patch if policy-set) |
|
|
25
|
+
| `test` | Adding or correcting tests | none |
|
|
26
|
+
| `build` | Build system or external dependency changes | none |
|
|
27
|
+
| `ci` | CI/CD configuration changes | none |
|
|
28
|
+
| `chore` | Maintenance tasks (tooling, housekeeping) | none |
|
|
29
|
+
| `style` | Formatting, whitespace — no logic change | none |
|
|
30
|
+
| `revert` | Reverts a previous commit | patch (if reverting a fix) |
|
|
31
|
+
|
|
32
|
+
---
|
|
33
|
+
|
|
34
|
+
## Scope Syntax
|
|
35
|
+
|
|
36
|
+
```
|
|
37
|
+
feat(parser): add JSON streaming support
|
|
38
|
+
fix(api): handle null response from upstream
|
|
39
|
+
```
|
|
40
|
+
|
|
41
|
+
Scope is optional, lowercase, parenthesised, and describes the subsystem touched.
|
|
42
|
+
|
|
43
|
+
---
|
|
44
|
+
|
|
45
|
+
## Breaking Change Syntax
|
|
46
|
+
|
|
47
|
+
Two equivalent forms — use either (or both for belt-and-suspenders):
|
|
48
|
+
|
|
49
|
+
**Inline `!` (preferred for visibility):**
|
|
50
|
+
|
|
51
|
+
```
|
|
52
|
+
feat!: remove deprecated /v1 API endpoints
|
|
53
|
+
```
|
|
54
|
+
|
|
55
|
+
**Footer `BREAKING CHANGE:` (spec-compliant, required to be uppercase):**
|
|
56
|
+
|
|
57
|
+
```
|
|
58
|
+
feat(auth): migrate to OAuth 2.1
|
|
59
|
+
|
|
60
|
+
BREAKING CHANGE: cookie-based sessions removed; all clients must use bearer tokens.
|
|
61
|
+
```
|
|
62
|
+
|
|
63
|
+
Both forms trigger a **major** version bump in release tooling.
|
|
64
|
+
|
|
65
|
+
---
|
|
66
|
+
|
|
67
|
+
## Body and Footer Rules
|
|
68
|
+
|
|
69
|
+
- Blank line separates subject from body.
|
|
70
|
+
- Body is free-form; explain the _why_, not the _what_.
|
|
71
|
+
- Footers follow `Token: value` syntax (`BREAKING CHANGE`, `Closes`, `Co-authored-by`).
|
|
72
|
+
- `BREAKING CHANGE` footer MUST be uppercase — `breaking change` is not spec-compliant.
|
|
73
|
+
|
|
74
|
+
---
|
|
75
|
+
|
|
76
|
+
## Internal Docs Convention
|
|
77
|
+
|
|
78
|
+
Use `docs(internal): …` for documentation commits that should be excluded from release notes
|
|
79
|
+
(design docs, ADRs, internal how-tos). Release tooling is typically configured to skip the
|
|
80
|
+
`internal` scope.
|
|
81
|
+
|
|
82
|
+
---
|
|
83
|
+
|
|
84
|
+
## Examples
|
|
85
|
+
|
|
86
|
+
```
|
|
87
|
+
# simple feature
|
|
88
|
+
feat: add dark mode toggle
|
|
89
|
+
|
|
90
|
+
# fix with scope
|
|
91
|
+
fix(auth): prevent session fixation on login
|
|
92
|
+
|
|
93
|
+
# breaking change (! form)
|
|
94
|
+
feat!: drop support for Node 16
|
|
95
|
+
|
|
96
|
+
# breaking change (footer form)
|
|
97
|
+
feat(config): switch to TOML format
|
|
98
|
+
|
|
99
|
+
BREAKING CHANGE: YAML config files are no longer supported; migrate to config.toml.
|
|
100
|
+
|
|
101
|
+
# multi-line body
|
|
102
|
+
refactor(storage): replace SQLite with PostgreSQL
|
|
103
|
+
|
|
104
|
+
SQLite could not handle concurrent writes under load.
|
|
105
|
+
|
|
106
|
+
Closes #142
|
|
107
|
+
|
|
108
|
+
# revert
|
|
109
|
+
revert: feat(api): add rate limiting
|
|
110
|
+
|
|
111
|
+
Reverts commit abc1234. Rate limiting caused false positives for mobile clients.
|
|
112
|
+
```
|
|
113
|
+
|
|
114
|
+
---
|
|
@@ -0,0 +1,236 @@
|
|
|
1
|
+
# Flag Reference
|
|
2
|
+
|
|
3
|
+
## Contents
|
|
4
|
+
|
|
5
|
+
- Flag Matrix
|
|
6
|
+
- Per-Flag Examples
|
|
7
|
+
- Composition Rules
|
|
8
|
+
|
|
9
|
+
Detailed reference for every flag accepted by `init`. See also `SKILL.md` for the live phase logic.
|
|
10
|
+
|
|
11
|
+
---
|
|
12
|
+
|
|
13
|
+
## Flag Matrix
|
|
14
|
+
|
|
15
|
+
| Flag | Default | Affects phases | Writes to | Example |
|
|
16
|
+
| --------------------------- | ----------- | -------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ------------------------------------------ |
|
|
17
|
+
| `--dry-run` | off | 5 (halt) | nothing | `init --dry-run` |
|
|
18
|
+
| `--docs-only` | off | 2, 4 (skip) | `AGENTS.md`, optional `CLAUDE.md` | `init --docs-only` |
|
|
19
|
+
| `--templates` | off | 3 (extend) | `.github/ISSUE_TEMPLATE/`, `.github/pull_request_template.md`, `.github/labels.md`, `.github/copilot-instructions.md`, `.github/workflows/pr-title.yml`, `.github/workflows/pr-title-autofix.yml` | `init --templates` |
|
|
20
|
+
| `--git` | off | 3 (extend) | `.gitignore`, `.gitmessage`, `commitlint.config.cjs` (JS/TS only), `lefthook.yml`, `scripts/install-lefthook.sh`, `docs/lefthook-usage.md` | `init --git` |
|
|
21
|
+
| `--vendor-neutral` | off | 3 (extend) | `.ai/rules/project.md` (pointer to `AGENTS.md`) | `init --vendor-neutral` |
|
|
22
|
+
| `--formatters` | off | 6.5 (delegate) | (delegates to `formatters` — see its flag matrix) | `init --formatters` |
|
|
23
|
+
| `--release-model[=<model>]` | off (offer) | 5.5 (delegate) | `RELEASING.md` (via `release-model`) | `init --release-model=trunk-only` |
|
|
24
|
+
| `--no-release-model` | off | 5.5 (skip) | nothing | `init --no-release-model` |
|
|
25
|
+
| `--migrate-rules` | off | 5.7 (migrate) | `AGENTS.md` (moved content), `CLAUDE.md` (pointer) — preview only with `--dry-run` | `init --migrate-rules --dry-run` |
|
|
26
|
+
| `--allow-non-git` | off | 5.7 | timestamped backups of the rules files before migrating outside git | `init --migrate-rules --allow-non-git` |
|
|
27
|
+
| `--no-claude-md` | off | 3 | skips the `@AGENTS.md` CLAUDE.md shim (needs Claude Code 2.1.277+) | `init --no-claude-md` |
|
|
28
|
+
| `--update` | off | 6 (merge) | existing targets only | `init --update` |
|
|
29
|
+
| `--force` | off | 6 (overwrite) | all target files | `init --force` |
|
|
30
|
+
| `--profile=<name>` | auto-detect | 1 (skip) | (drives template variables) | `init --profile=rust` |
|
|
31
|
+
|
|
32
|
+
### `--profile` accepted values
|
|
33
|
+
|
|
34
|
+
| Value | Skips detection? | Effect |
|
|
35
|
+
| --------- | ---------------- | ------------------------------------------------------------------- |
|
|
36
|
+
| `rust` | yes | Sets `PRIMARY_LANG=rust`, `BUILD_CMD=cargo build` |
|
|
37
|
+
| `ts-node` | yes | Sets `PRIMARY_LANG=typescript`, `PACKAGE_MANAGER=npm/pnpm/yarn/bun` |
|
|
38
|
+
| `python` | yes | Sets `PRIMARY_LANG=python` |
|
|
39
|
+
| `go` | yes | Sets `PRIMARY_LANG=go`, `BUILD_CMD=go build ./...` |
|
|
40
|
+
| `mixed` | yes | Sets primary + secondary from manifest count |
|
|
41
|
+
| `empty` | yes | Triggers name/purpose/language prompts |
|
|
42
|
+
|
|
43
|
+
---
|
|
44
|
+
|
|
45
|
+
## Per-Flag Examples
|
|
46
|
+
|
|
47
|
+
### `--dry-run`
|
|
48
|
+
|
|
49
|
+
Preview everything without writing a single file. Combines with any other flag.
|
|
50
|
+
|
|
51
|
+
```
|
|
52
|
+
/ycc:init --dry-run
|
|
53
|
+
/ycc:init --dry-run --templates --git
|
|
54
|
+
```
|
|
55
|
+
|
|
56
|
+
Output: a table of planned files with their rendered content previewed inline.
|
|
57
|
+
|
|
58
|
+
### `--docs-only`
|
|
59
|
+
|
|
60
|
+
Emit canonical `AGENTS.md` and optional Claude-only/path-scoped files; skip MCP/agent selection (phase 4) and profiler agent dispatch (phase 2).
|
|
61
|
+
|
|
62
|
+
```
|
|
63
|
+
/ycc:init --docs-only
|
|
64
|
+
/ycc:init --docs-only --profile=go
|
|
65
|
+
```
|
|
66
|
+
|
|
67
|
+
### `--templates`
|
|
68
|
+
|
|
69
|
+
Adds the full GitHub templates bundle. Extends the default run or combines with `--docs-only`:
|
|
70
|
+
|
|
71
|
+
- `.github/ISSUE_TEMPLATE/bug_report.yml`, `feature_request.yml`,
|
|
72
|
+
`docs_request.yml`, `config.yml` — YAML issue forms
|
|
73
|
+
- `.github/pull_request_template.md` — PR template with a required-check
|
|
74
|
+
preamble pointing at the PR-title workflow and copilot instructions
|
|
75
|
+
- `.github/labels.md` — reference list of the project's label taxonomy
|
|
76
|
+
(`gh label create` commands included)
|
|
77
|
+
- `.github/copilot-instructions.md` — a short pointer to `AGENTS.md` plus the
|
|
78
|
+
detected commands (test / lint / build), for GitHub Copilot's coding agent
|
|
79
|
+
- `.github/workflows/pr-title.yml` — required GitHub Actions check that
|
|
80
|
+
validates PR titles as Conventional Commits and rejects placeholder
|
|
81
|
+
prefixes (`[WIP]`, `Draft:`, `Initial plan`) that agents often open PRs
|
|
82
|
+
with. Enable as a required status check in branch protection — see the
|
|
83
|
+
`--templates` next-step emitted at end of `init`.
|
|
84
|
+
- `.github/workflows/pr-title-autofix.yml` — runs alongside the validator
|
|
85
|
+
in two passes, server-side using the repo's `GITHUB_TOKEN`: (1) strips
|
|
86
|
+
placeholder prefixes and toggles the PR to draft; (2) normalizes a
|
|
87
|
+
leading Conventional Commit type that was written without a colon or
|
|
88
|
+
with capitalization (e.g. `Refactor X` → `refactor: X`,
|
|
89
|
+
`Feat(auth): X` → `feat(auth): X`). Exists because GitHub Copilot's
|
|
90
|
+
coding-agent token typically lacks `pull_requests:write` and cannot
|
|
91
|
+
fix its own title after the instructions file has been ignored. Not a
|
|
92
|
+
required check — it is an auto-correcting side effect.
|
|
93
|
+
|
|
94
|
+
```
|
|
95
|
+
/ycc:init --templates
|
|
96
|
+
/ycc:init --docs-only --templates
|
|
97
|
+
```
|
|
98
|
+
|
|
99
|
+
### `--git`
|
|
100
|
+
|
|
101
|
+
Adds the full git-conventions bundle:
|
|
102
|
+
|
|
103
|
+
- `.gitignore` (always) — best-practices universal entries (OS, editors, env
|
|
104
|
+
files, secrets, agent scratch) **plus** language-specific blocks activated
|
|
105
|
+
by `primary_language` and any `secondary_languages` (rust, go, python,
|
|
106
|
+
node/ts, terraform). Respects `--profile=<lang>` override.
|
|
107
|
+
- `.gitmessage` (always) — Conventional Commits template. Wire with
|
|
108
|
+
`git config commit.template .gitmessage`.
|
|
109
|
+
- `commitlint.config.cjs` (JS/TS ecosystems only) — enforced via the
|
|
110
|
+
lefthook `commit-msg` hook below.
|
|
111
|
+
- `lefthook.yml` (always) — git hook manager config with stack-specific
|
|
112
|
+
pre-commit lint/format commands (staged scope), a `pre-push` test stage,
|
|
113
|
+
and a commitlint `commit-msg` stage on JS/TS projects.
|
|
114
|
+
- `scripts/install-lefthook.sh` (always) — idempotent, cross-platform
|
|
115
|
+
bootstrap. Installs the `lefthook` binary and runs `lefthook install`.
|
|
116
|
+
- `docs/lefthook-usage.md` (always) — reference doc explaining what the
|
|
117
|
+
hooks do, how to extend them, how to bypass, and how they skip in CI.
|
|
118
|
+
|
|
119
|
+
```
|
|
120
|
+
/ycc:init --git
|
|
121
|
+
/ycc:init --git --profile=ts-node
|
|
122
|
+
```
|
|
123
|
+
|
|
124
|
+
### `--vendor-neutral`
|
|
125
|
+
|
|
126
|
+
Add `.ai/rules/project.md` — a one-line pointer to the canonical `AGENTS.md` for vendor-neutral tooling.
|
|
127
|
+
|
|
128
|
+
```
|
|
129
|
+
/ycc:init --vendor-neutral
|
|
130
|
+
```
|
|
131
|
+
|
|
132
|
+
### `--release-model[=<model>]` / `--no-release-model`
|
|
133
|
+
|
|
134
|
+
Phase 5.5 handles projects without a repo-root `RELEASING.md` (profile key
|
|
135
|
+
`has_releasing_md=false`). By default it **offers** to run `release-model`, which
|
|
136
|
+
chooses a branching and release model and writes `RELEASING.md`. When the file already
|
|
137
|
+
exists, nothing runs.
|
|
138
|
+
|
|
139
|
+
- `--release-model` — run `release-model` without asking. It proposes a model from the
|
|
140
|
+
repo's signals and confirms with you.
|
|
141
|
+
- `--release-model=<model>` — `<model>` is `trunk-only` or `release-branches`. Runs
|
|
142
|
+
`release-model --model <model> --yes`, accepting the proposal without questions.
|
|
143
|
+
`blueprint` emits this form from its `release_model` bootstrap key.
|
|
144
|
+
- `--no-release-model` — never offer. Conflicts with `--release-model` (error).
|
|
145
|
+
- `--docs-only` skips the offer unless `--release-model` is also passed.
|
|
146
|
+
- `--dry-run` only reports what Phase 5.5 would do.
|
|
147
|
+
|
|
148
|
+
When `RELEASING.md` exists after Phase 5.5 (already present or just created), the
|
|
149
|
+
rendered `AGENTS.md` gains a `## Branching & releases` pointer section and
|
|
150
|
+
`.github/labels.md` (with `--templates`) gains the `backport:X.Y` label family. Both come
|
|
151
|
+
from `{{#IF_RELEASE_MODEL}}` blocks — see `template-library.md`.
|
|
152
|
+
|
|
153
|
+
```
|
|
154
|
+
/ycc:init --release-model
|
|
155
|
+
/ycc:init --templates --release-model=release-branches
|
|
156
|
+
/ycc:init --no-release-model
|
|
157
|
+
```
|
|
158
|
+
|
|
159
|
+
### `--migrate-rules`
|
|
160
|
+
|
|
161
|
+
Rules-only migration: profile, show the full unified diff and content-loss list, then ask
|
|
162
|
+
for approval. `--dry-run` changes nothing; `--force` never bypasses the migration prompt.
|
|
163
|
+
The helper must run at the git root, refuses dirty, git-ignored or symlinked rules files
|
|
164
|
+
(`--allow-non-git` opts in, with timestamped backups), and writes both files atomically.
|
|
165
|
+
Routing is by heading: exact Claude runtime headings stay in `CLAUDE.md` after
|
|
166
|
+
`@AGENTS.md`; everything else moves to `AGENTS.md`. Headings that merely mention Claude are
|
|
167
|
+
routed to `AGENTS.md` and listed as ambiguous. An existing `AGENTS.md` is merged, not
|
|
168
|
+
replaced, unless it is the short legacy pointer (its full text is shown). Review the
|
|
169
|
+
per-section routing, content-loss list and diff before approving.
|
|
170
|
+
|
|
171
|
+
```text
|
|
172
|
+
/ycc:init --migrate-rules --dry-run
|
|
173
|
+
/ycc:init --migrate-rules
|
|
174
|
+
```
|
|
175
|
+
|
|
176
|
+
### `--update`
|
|
177
|
+
|
|
178
|
+
Structured refresh of existing artifacts. Never clobbers user content — merges instead.
|
|
179
|
+
|
|
180
|
+
- `AGENTS.md`: append template sections that are missing; preserve everything else verbatim. A legacy pointer-style `AGENTS.md` (short, names `CLAUDE.md`) triggers the `--migrate-rules` offer instead.
|
|
181
|
+
- `CLAUDE.md`: never rewritten by `--update`. A long one triggers the `--migrate-rules` offer; an `@AGENTS.md` one is left as is.
|
|
182
|
+
- `.cursorrules` (legacy): fold project-specific lines into `AGENTS.md`; leaves the old file for you to delete.
|
|
183
|
+
- `.github/ISSUE_TEMPLATE/*.yml`: create missing templates; skip existing ones with a diff (pair with `--force` to overwrite).
|
|
184
|
+
- `.github/labels.md`, `docs/lefthook-usage.md`, `scripts/install-lefthook.sh`: always overwritten (managed reference docs / tooling).
|
|
185
|
+
- `commitlint.config.cjs`: diff + skip by default (often customized). Pair with `--force` to overwrite.
|
|
186
|
+
- `lefthook.yml`: diff + skip by default (users often extend the config). Pair with `--force` to overwrite.
|
|
187
|
+
- `.gitignore`: diff + skip by default (heavily customized per-project). Pair with `--force` to overwrite.
|
|
188
|
+
|
|
189
|
+
```
|
|
190
|
+
/ycc:init --update
|
|
191
|
+
/ycc:init --update --docs-only
|
|
192
|
+
/ycc:init --update --force --templates
|
|
193
|
+
```
|
|
194
|
+
|
|
195
|
+
### `--force`
|
|
196
|
+
|
|
197
|
+
Overwrite existing files without prompting. Default behavior diffs and asks; never silently clobbers. Compose with `--update` to bias merges toward overwrite on conflict.
|
|
198
|
+
|
|
199
|
+
```
|
|
200
|
+
/ycc:init --force --docs-only
|
|
201
|
+
/ycc:init --update --force
|
|
202
|
+
```
|
|
203
|
+
|
|
204
|
+
### `--profile=<name>`
|
|
205
|
+
|
|
206
|
+
Pre-set the project profile, bypassing `profile-project.sh` detection entirely.
|
|
207
|
+
|
|
208
|
+
```
|
|
209
|
+
/ycc:init --profile=python --templates --git
|
|
210
|
+
```
|
|
211
|
+
|
|
212
|
+
---
|
|
213
|
+
|
|
214
|
+
## Composition Rules
|
|
215
|
+
|
|
216
|
+
Flags are independent and composable. Any combination is valid:
|
|
217
|
+
|
|
218
|
+
- `--dry-run` is always safe — it suppresses all writes regardless of other flags.
|
|
219
|
+
- `--docs-only` narrows scope; adding `--templates` or `--git` extends it back out.
|
|
220
|
+
- `--force` applies to every output flag in the same invocation.
|
|
221
|
+
- `--profile=` and detection are mutually exclusive; `--profile=` wins.
|
|
222
|
+
- `--release-model` and `--no-release-model` are mutually exclusive (error).
|
|
223
|
+
- Unrecognised flags are reported as errors before any phase runs.
|
|
224
|
+
|
|
225
|
+
### Common combinations
|
|
226
|
+
|
|
227
|
+
| Combination | Result |
|
|
228
|
+
| -------------------------------------- | ------------------------------------------------------------------------- |
|
|
229
|
+
| `--docs-only --templates --git` | Full doc/workflow bundle, no MCP/agent touch |
|
|
230
|
+
| `--dry-run --templates` | Preview only the template output |
|
|
231
|
+
| `--force --profile=python --templates` | Apply Python doc set + GitHub forms, overwrite freely |
|
|
232
|
+
| `--docs-only --vendor-neutral` | Canonical rules + `.ai/rules/project.md` pointer, skip MCP |
|
|
233
|
+
| `--update` | Refresh existing rules files in place; skip untouched files |
|
|
234
|
+
| `--update --force --templates` | Refresh everything aggressively — merge semantics + overwrite on conflict |
|
|
235
|
+
|
|
236
|
+
---
|