@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,155 @@
|
|
|
1
|
+
# Visual Mode — Canonical Reference
|
|
2
|
+
|
|
3
|
+
## Contents
|
|
4
|
+
|
|
5
|
+
- 0. Default Behavior
|
|
6
|
+
- 1. Timing — runs AFTER write AND validation
|
|
7
|
+
- 2. Composition with other flags
|
|
8
|
+
- 3. Hand-off to `visual-plan`
|
|
9
|
+
- 4. `/ycc:plan --visual` special case — force a write FIRST
|
|
10
|
+
- 5. NAMING_CONVENTION
|
|
11
|
+
|
|
12
|
+
Used by `prp-plan`, `plan`, `parallel-plan`, and `plan-workflow`
|
|
13
|
+
to expose a uniform `--visual` decorator. This file documents the **single
|
|
14
|
+
`--visual` contract** shared by all four planning skills: when it runs, how it
|
|
15
|
+
composes with other flags, how `--dry-run` short-circuits it, and the hand-off
|
|
16
|
+
to `visual-plan`. Individual skills own their own flag plumbing and the path
|
|
17
|
+
where they write a plan; the shared **invariant** lives here.
|
|
18
|
+
|
|
19
|
+
`--visual` is a **terminal decorator step**, not a dispatch mode. It does not
|
|
20
|
+
change how a plan is researched, dispatched, or written — it only runs once,
|
|
21
|
+
**after** the plan exists and has been validated, to produce a visual rendering
|
|
22
|
+
of that plan.
|
|
23
|
+
|
|
24
|
+
See `worktree-strategy.md` in this directory for where plan artifacts live
|
|
25
|
+
|
|
26
|
+
---
|
|
27
|
+
|
|
28
|
+
## 0. Default Behavior
|
|
29
|
+
|
|
30
|
+
`--visual` is **off by default** on all four planning skills. When omitted, the
|
|
31
|
+
skill behaves exactly as it does today and writes no visual output.
|
|
32
|
+
|
|
33
|
+
| Skill | Writes a plan artifact by default? | `--visual` target |
|
|
34
|
+
| ------------------- | ------------------------------------ | ----------------------------------------- |
|
|
35
|
+
| `prp-plan` | yes — `docs/prps/plans/*.plan.md` | the written plan file |
|
|
36
|
+
| `parallel-plan` | yes — feature-dir `parallel-plan.md` | the written plan file |
|
|
37
|
+
| `plan-workflow` | yes — feature-dir `parallel-plan.md` | the written plan file |
|
|
38
|
+
| `plan` | **no** — plan kept in-chat | a plan file `--visual` is forced to write |
|
|
39
|
+
|
|
40
|
+
The plan path differs per skill (and `plan` writes none by default). The
|
|
41
|
+
contract therefore never hardcodes `docs/prps/plans`; it passes whatever
|
|
42
|
+
absolute plan path the skill produced to `visual-plan` and lets that skill
|
|
43
|
+
derive its output directory. See §3 (hand-off) and §4 (`plan` special case).
|
|
44
|
+
|
|
45
|
+
---
|
|
46
|
+
|
|
47
|
+
## 1. Timing — runs AFTER write AND validation
|
|
48
|
+
|
|
49
|
+
`--visual` is the **last** step of a planning run. The order is fixed:
|
|
50
|
+
|
|
51
|
+
1. Research / dispatch / plan generation (unchanged by `--visual`).
|
|
52
|
+
2. Write the plan artifact to its skill-specific path.
|
|
53
|
+
3. **Validate** the plan per the skill's existing rules.
|
|
54
|
+
4. **Only then** run the `--visual` decorator step.
|
|
55
|
+
|
|
56
|
+
If steps 1–3 do not complete (research aborts, write fails, or validation
|
|
57
|
+
fails), the `--visual` step does **not** run. There is nothing valid to
|
|
58
|
+
visualize, so the skill reports the upstream failure and stops.
|
|
59
|
+
|
|
60
|
+
`--visual` never re-orders, re-runs, or substitutes for any earlier phase.
|
|
61
|
+
|
|
62
|
+
---
|
|
63
|
+
|
|
64
|
+
## 2. Composition with other flags
|
|
65
|
+
|
|
66
|
+
`--visual` is **orthogonal** to and **composes with** the dispatch/runtime
|
|
67
|
+
flags. It is applied once, at the end, regardless of which of these are present:
|
|
68
|
+
|
|
69
|
+
| Flag | Interaction with `--visual` |
|
|
70
|
+
| --------------- | ------------------------------------------------------------------------------------------------ |
|
|
71
|
+
| `--parallel` | Independent. Parallel dispatch finishes, plan is written + validated, then `--visual` runs once. |
|
|
72
|
+
| `--enhanced` | Independent. Enhancement affects plan content; `--visual` renders the enhanced result. |
|
|
73
|
+
| `--no-worktree` | Independent. Worktree opt-out does not affect whether or how `--visual` runs. |
|
|
74
|
+
| `--dry-run` | **Short-circuits** `--visual` (see §2.1). |
|
|
75
|
+
|
|
76
|
+
Because `--visual` is a terminal decorator, `--parallel --visual` means: finish standalone planning, write and validate the plan, then run the single `--visual` step.
|
|
77
|
+
|
|
78
|
+
### 2.1 `--dry-run` short-circuit
|
|
79
|
+
|
|
80
|
+
When `--dry-run` is present, `--visual` is **short-circuited**: the skill prints
|
|
81
|
+
|
|
82
|
+
```
|
|
83
|
+
visual generation would run
|
|
84
|
+
```
|
|
85
|
+
|
|
86
|
+
and does **not** generate anything and does **not** invoke `visual-plan`.
|
|
87
|
+
`--dry-run` always wins over `--visual`; no visual artifacts, directories, or
|
|
88
|
+
links are produced in a dry run.
|
|
89
|
+
|
|
90
|
+
---
|
|
91
|
+
|
|
92
|
+
## 3. Hand-off to `visual-plan`
|
|
93
|
+
|
|
94
|
+
When `--visual` runs for real (not `--dry-run`), the planning skill invokes:
|
|
95
|
+
|
|
96
|
+
```
|
|
97
|
+
visual-plan <absolute-plan-path>
|
|
98
|
+
```
|
|
99
|
+
|
|
100
|
+
passing the **absolute path** of the plan file it wrote and validated.
|
|
101
|
+
|
|
102
|
+
Contract for `visual-plan`:
|
|
103
|
+
|
|
104
|
+
- **Accept ANY plan path.** It must not assume `docs/prps/plans` or any other
|
|
105
|
+
fixed location. The plan path is supplied by the caller and may live anywhere
|
|
106
|
+
(e.g. `docs/prps/plans/<name>.plan.md`, a feature-dir `parallel-plan.md`, or a
|
|
107
|
+
forced-write file from `plan`).
|
|
108
|
+
- **Derive `visual/` relative to the given plan path.** The output directory is
|
|
109
|
+
a `visual/` sibling of the plan file — i.e. `<dirname of plan>/visual/` —
|
|
110
|
+
computed from the path it was handed, never hardcoded.
|
|
111
|
+
- **Print the resulting link to stdout.** Exactly one of:
|
|
112
|
+
- a hosted shareable URL, or
|
|
113
|
+
- a localhost preview `http://127.0.0.1:PORT/...`, or
|
|
114
|
+
- `local files only` when no server/host is available.
|
|
115
|
+
- **NEVER re-run research or dispatch.** It only consumes an existing plan.
|
|
116
|
+
- **NEVER edit the plan file.** It reads the plan and writes only into the
|
|
117
|
+
derived `visual/` directory; the plan artifact is left byte-for-byte intact.
|
|
118
|
+
|
|
119
|
+
The planning skill surfaces whatever link `visual-plan` prints; it does not
|
|
120
|
+
re-derive the path itself.
|
|
121
|
+
|
|
122
|
+
---
|
|
123
|
+
|
|
124
|
+
## 4. `/ycc:plan --visual` special case — force a write FIRST
|
|
125
|
+
|
|
126
|
+
`plan` writes **no** artifact by default (the plan stays in-chat). There is
|
|
127
|
+
therefore nothing on disk to visualize. When `--visual` is passed to
|
|
128
|
+
`plan`:
|
|
129
|
+
|
|
130
|
+
1. `plan` **MUST force a plan-file write first**, producing an absolute plan
|
|
131
|
+
path on disk (this write happens even though it would normally be skipped).
|
|
132
|
+
2. That forced write is then validated like any other plan.
|
|
133
|
+
3. Only after a valid file exists does `plan` hand the absolute path to
|
|
134
|
+
`visual-plan <absolute-plan-path>`.
|
|
135
|
+
|
|
136
|
+
Without the forced write there is no input for `visual-plan`, so the
|
|
137
|
+
force-write rule is mandatory — not optional — for `plan --visual`. Under
|
|
138
|
+
`--dry-run` this is moot: the §2.1 short-circuit applies and `plan` prints
|
|
139
|
+
`visual generation would run` without forcing any write.
|
|
140
|
+
|
|
141
|
+
---
|
|
142
|
+
|
|
143
|
+
## 5. NAMING_CONVENTION
|
|
144
|
+
|
|
145
|
+
In-body references to skill assets use the plugin-root variable, e.g.:
|
|
146
|
+
|
|
147
|
+
- `{{package-root}}/skills/visual-plan/SKILL.md`
|
|
148
|
+
- `{{package-root}}/skills/plan/SKILL.md`
|
|
149
|
+
- `{{package-root}}/skills/prp-plan/SKILL.md`
|
|
150
|
+
- `{{package-root}}/skills/parallel-plan/SKILL.md`
|
|
151
|
+
- `{{package-root}}/skills/plan-workflow/SKILL.md`
|
|
152
|
+
|
|
153
|
+
The hand-off is always expressed as the skill invocation
|
|
154
|
+
`visual-plan <absolute-plan-path>`, with `<absolute-plan-path>` resolved by
|
|
155
|
+
the calling skill to a real, absolute path on disk.
|
|
@@ -0,0 +1,310 @@
|
|
|
1
|
+
# Worktree Strategy — Canonical Reference
|
|
2
|
+
|
|
3
|
+
## Contents
|
|
4
|
+
|
|
5
|
+
- 0. Default Behavior
|
|
6
|
+
- 1. Single feature worktree
|
|
7
|
+
- 2. Plan annotation format
|
|
8
|
+
- 3. Lifecycle (high level)
|
|
9
|
+
- 4. Per-Target Dispatch Matrix
|
|
10
|
+
- 5. End-of-Run Cleanup
|
|
11
|
+
- 7. Plan-artifact handoff
|
|
12
|
+
- 8. Native harness integration
|
|
13
|
+
|
|
14
|
+
Used by `plan`, `prp-plan`, `parallel-plan`, `plan-workflow`,
|
|
15
|
+
`prp-implement`, `orchestrate`, and `implement-plan` for default
|
|
16
|
+
worktree isolation. Also used by `code-review` and `review-fix` — with
|
|
17
|
+
one twist: `code-review` in PR mode checks out an **existing** PR head branch
|
|
18
|
+
(see `--base-ref` below) instead of creating a new `feat/<feature>` branch from
|
|
19
|
+
`HEAD`.
|
|
20
|
+
|
|
21
|
+
This file documents the **single feature worktree** contract: naming scheme,
|
|
22
|
+
plan annotation format, per-target dispatch matrix, and cleanup. There is
|
|
23
|
+
**one** worktree per feature / issue / task-level run — not one child worktree
|
|
24
|
+
per parallel task, and not per-severity fan-out. Individual skills own flag
|
|
25
|
+
plumbing and per-phase behavior; the shared **invariant** lives here.
|
|
26
|
+
|
|
27
|
+
**Migration note (GitHub #79 / #80):** Older skills and plan artifacts may still
|
|
28
|
+
describe a parent/child model, `**Children**` lists, per-task `**Worktree**:`,
|
|
29
|
+
or `merge-children.sh` fan-in. That model is **deprecated** for the shared
|
|
30
|
+
contract. `setup-worktree.sh child` and `merge-children.sh` are **compatibility
|
|
31
|
+
shims** (see shared scripts) until all executors are updated. New planners and
|
|
32
|
+
executors should follow **only** the single-worktree contract below.
|
|
33
|
+
|
|
34
|
+
and how a single worktree pairs with parallel sub-agent dispatch.
|
|
35
|
+
|
|
36
|
+
---
|
|
37
|
+
|
|
38
|
+
## 0. Default Behavior
|
|
39
|
+
|
|
40
|
+
Worktree isolation is **on by default** for all nine worktree-aware skills:
|
|
41
|
+
|
|
42
|
+
| Skill | Default | Opt out with |
|
|
43
|
+
| --------------------------- | ------------------------------ | --------------- |
|
|
44
|
+
| `code-review` (PR mode) | worktree on | `--no-worktree` |
|
|
45
|
+
| `review-fix` | worktree on | `--no-worktree` |
|
|
46
|
+
| `plan` | annotations emitted | `--no-worktree` |
|
|
47
|
+
| `prp-plan` | annotations emitted | `--no-worktree` |
|
|
48
|
+
| `parallel-plan` | annotations emitted | `--no-worktree` |
|
|
49
|
+
| `plan-workflow` | annotations emitted | `--no-worktree` |
|
|
50
|
+
| `prp-implement` | worktree on (auto-detect) | `--no-worktree` |
|
|
51
|
+
| `implement-plan` | worktree on (auto-detect) | `--no-worktree` |
|
|
52
|
+
| `orchestrate` | worktree on for parallel tasks | `--no-worktree` |
|
|
53
|
+
|
|
54
|
+
The legacy `--worktree` flag remains accepted on every skill as a silent no-op
|
|
55
|
+
(it now matches the default). Existing pipelines and documentation that pass
|
|
56
|
+
`--worktree` continue to work without modification.
|
|
57
|
+
|
|
58
|
+
**Auto-detect (executors)** — `prp-implement`, `implement-plan`, and
|
|
59
|
+
`orchestrate` first look for a `## Worktree Setup` section in the plan and
|
|
60
|
+
honor its annotations when present. When the plan has no annotations, the
|
|
61
|
+
fallback is now **on** (was off). `--no-worktree` overrides both the plan
|
|
62
|
+
annotations and the default.
|
|
63
|
+
|
|
64
|
+
**Artifact location for `code-review`** — In PR mode the review artifact is
|
|
65
|
+
written _into the active worktree_ at
|
|
66
|
+
`<worktree>/docs/prps/reviews/pr-<N>-review.md`, then committed and pushed to
|
|
67
|
+
the PR's head branch. See the `code-review` skill (`SKILL.md`) for
|
|
68
|
+
the full lifecycle (draft→ready promotion, artifact commit+push, post-review
|
|
69
|
+
worktree removal, opt-outs `--keep-draft` and `--keep-worktree`).
|
|
70
|
+
|
|
71
|
+
`review-fix` follows: it discovers the artifact in the active worktree's
|
|
72
|
+
`docs/prps/reviews/` first, then falls back to the main repo for in-flight
|
|
73
|
+
artifacts written under the previous contract.
|
|
74
|
+
|
|
75
|
+
---
|
|
76
|
+
|
|
77
|
+
## 1. Single feature worktree
|
|
78
|
+
|
|
79
|
+
Every worktree-enabled run uses **exactly one** git worktree for isolated work
|
|
80
|
+
(unless the user opts out with `--no-worktree`).
|
|
81
|
+
|
|
82
|
+
### Feature worktree
|
|
83
|
+
|
|
84
|
+
| Property | Value |
|
|
85
|
+
| ---------- | --------------------------------------------------------------------- |
|
|
86
|
+
| Path | `<repo-root>/<worktree-root>/<repo>-<feature>/` |
|
|
87
|
+
| Branch | `feat/<feature>` (default) or `<base-ref>` (see below) |
|
|
88
|
+
| Created | Once, before the first batch or task (via `setup-worktree.sh parent`) |
|
|
89
|
+
| Lifetime | Survives to end of run; used for the final PR |
|
|
90
|
+
| Removed by | User (never auto-removed by the skill) |
|
|
91
|
+
|
|
92
|
+
All tasks — parallel and sequential — share this **one** worktree. Parallel
|
|
93
|
+
sub-agents or sub-agents do **not** get separate worktree paths; they use the
|
|
94
|
+
same path with coordination rules in their prompt (`Working directory: <path>`)
|
|
95
|
+
so concurrent writers do not corrupt the tree (e.g. file-level batching, no
|
|
96
|
+
two agents on the same file, or serial execution for conflicting edits — see
|
|
97
|
+
per-skill rules).
|
|
98
|
+
|
|
99
|
+
|
|
100
|
+
### Worktree root per runtime (YAN-1111)
|
|
101
|
+
|
|
102
|
+
Each runtime keeps its skill-managed worktrees inside the repository, under a
|
|
103
|
+
root named for that runtime. Each worktree keeps the name
|
|
104
|
+
`<repo>-<branch-or-feature>/`.
|
|
105
|
+
|
|
106
|
+
| Bundle | Worktree root | How the default is set |
|
|
107
|
+
| ----------- | ------------------------------------- | ----------------------------------------- |
|
|
108
|
+
| Claude Code | `<repo-root>/.claude/worktrees/` | source default (`worktree-paths.sh`) |
|
|
109
|
+
| opencode | `<repo-root>/.opencode/worktrees/` | generator rewrite (`.opencode`) |
|
|
110
|
+
| Codex | `<repo-root>/.codex/worktrees/` | generator rewrite (`.codex`) |
|
|
111
|
+
| Cursor | `<repo-root>/.cursor/worktrees/` | generator rewrite (`.cursor`) |
|
|
112
|
+
| `agents` | runtime-selected, `.agents/` fallback | `worktree-paths.sh` detection (see below) |
|
|
113
|
+
|
|
114
|
+
`YCC_WORKTREE_ROOT` remains the explicit override for every runtime; relative
|
|
115
|
+
override values are resolved against the active repo root. **Migration
|
|
116
|
+
(YAN-1111):** worktrees created under the retired roots (`~/.claude-worktrees/`,
|
|
117
|
+
`<repo-root>/.config/opencode/worktrees/`) are neither migrated nor removed —
|
|
118
|
+
only new worktrees use the per-runtime roots.
|
|
119
|
+
|
|
120
|
+
#### Native harness worktree placement (verified)
|
|
121
|
+
|
|
122
|
+
Each runtime's own worktree feature places worktrees as follows; ycc-managed
|
|
123
|
+
worktrees follow the table above via the scripts, not via these defaults,
|
|
124
|
+
except where noted:
|
|
125
|
+
|
|
126
|
+
- **Claude Code**: repo-local placement is provided by the `WorktreeCreate`
|
|
127
|
+
hook (`ycc/settings/hooks/worktree-create.sh`), which defaults to
|
|
128
|
+
`<repo-root>/.claude/worktrees` and honors `YCC_WORKTREE_ROOT`. Without the
|
|
129
|
+
hook, Claude Code creates worktrees with `git worktree add` under its
|
|
130
|
+
default location and copies gitignored files per `.worktreeinclude`.
|
|
131
|
+
- **opencode**: the built-in worktree tools (`opencode.worktree_create` /
|
|
132
|
+
`worktree_list`) manage their own worktrees; their placement is not
|
|
133
|
+
configurable through ycc. ycc's `.opencode/worktrees` root applies to
|
|
134
|
+
skill-managed worktrees only. (Verified against the installed opencode v2
|
|
135
|
+
tool surface; no repo-local placement option found.)
|
|
136
|
+
- **Codex**: no worktree placement option was found in the installed
|
|
137
|
+
codex-cli 0.161.0 `--help` surface. This does not establish the Codex app's
|
|
138
|
+
native placement or configurability (not verified here). ycc's
|
|
139
|
+
`.codex/worktrees` root applies to skill-managed worktrees only; no native
|
|
140
|
+
Codex setting is changed.
|
|
141
|
+
- **Cursor**: Cursor-managed worktrees live under `~/.cursor/worktrees/`
|
|
142
|
+
(documented at cursor.com/docs/cli/reference/parameters, `-w/--worktree`),
|
|
143
|
+
not repo-locally; no repo-local placement option is documented. ycc's
|
|
144
|
+
`.cursor/worktrees` root applies to skill-managed worktrees only.
|
|
145
|
+
- **`agents` bundle**: no fixed runtime. `worktree-paths.sh` picks the root
|
|
146
|
+
from verified single-runtime markers: `OPENCODE=1` (opencode), `CLAUDECODE=1`
|
|
147
|
+
(Claude Code), non-empty `CODEX_THREAD_ID` (Codex). Zero or multiple
|
|
148
|
+
markers — including nested agents — fall back to
|
|
149
|
+
`<repo-root>/.agents/worktrees/`. Deliberately **not** used (not evidence of
|
|
150
|
+
the active runtime): installed binaries, `CLAUDE_CODE_*` credentials,
|
|
151
|
+
`~/.cursor/` presence, `AI_AGENT` (multi-agent generic), and generic
|
|
152
|
+
sandbox markers like `CODEX_SANDBOX`/`CODEX_SANDBOX_NETWORK_DISABLED`
|
|
153
|
+
(sandbox state, not runtime identity).
|
|
154
|
+
|
|
155
|
+
#### Checking out an existing branch (`--base-ref`)
|
|
156
|
+
|
|
157
|
+
By default the feature worktree is placed on a new `feat/<feature>` branch
|
|
158
|
+
created from `HEAD`. Skills that need to isolate an **existing** branch (e.g.,
|
|
159
|
+
`code-review` checking out a PR head) pass `--base-ref`:
|
|
160
|
+
|
|
161
|
+
```bash
|
|
162
|
+
# Default — new branch from HEAD
|
|
163
|
+
setup-worktree.sh parent <repo> <feature-slug>
|
|
164
|
+
|
|
165
|
+
# Check out an existing branch directly
|
|
166
|
+
setup-worktree.sh parent <repo> <feature-slug> --base-ref <branch>
|
|
167
|
+
```
|
|
168
|
+
|
|
169
|
+
When `--base-ref` is supplied:
|
|
170
|
+
|
|
171
|
+
- No new branch is created. The worktree is placed directly on `<branch>`.
|
|
172
|
+
- If `<branch>` does not resolve locally, the script runs
|
|
173
|
+
`git fetch origin <branch>:<branch>` once and retries.
|
|
174
|
+
- The idempotency check expects the worktree to be on `<branch>`, not on
|
|
175
|
+
`feat/<feature-slug>`.
|
|
176
|
+
- The worktree cannot coexist with the same branch already checked out in the
|
|
177
|
+
main repo. Switch away from `<branch>` in the main repo first, or pick a
|
|
178
|
+
different base ref.
|
|
179
|
+
|
|
180
|
+
---
|
|
181
|
+
|
|
182
|
+
## 2. Plan annotation format
|
|
183
|
+
|
|
184
|
+
Planners that support worktree output emit a top-level `## Worktree Setup`
|
|
185
|
+
section. Implementors use it to resolve the single path and feature slug. No
|
|
186
|
+
per-task or per-parallel child paths are **required** by the new contract.
|
|
187
|
+
|
|
188
|
+
### Top-level `## Worktree Setup` section
|
|
189
|
+
|
|
190
|
+
Placed at the top of the plan, after frontmatter and before the first batch or step.
|
|
191
|
+
|
|
192
|
+
**Current contract (single worktree only):**
|
|
193
|
+
|
|
194
|
+
```markdown
|
|
195
|
+
## Worktree Setup
|
|
196
|
+
|
|
197
|
+
- **Parent**: <repo-root>/<worktree-root>/<repo>-<feature>/ (branch: feat/<feature>)
|
|
198
|
+
```
|
|
199
|
+
|
|
200
|
+
`<worktree-root>` is the creating runtime's root from the per-runtime table
|
|
201
|
+
above. The `**Parent**:` line names the one feature worktree path. Do **not**
|
|
202
|
+
add a `**Children**:` list in new plans; parallel work happens **inside** this
|
|
203
|
+
path.
|
|
204
|
+
|
|
205
|
+
### Legacy fields (back-compat, not part of the new contract)
|
|
206
|
+
|
|
207
|
+
Older plans may still include:
|
|
208
|
+
|
|
209
|
+
- A `**Children**:` bullet list (per parallel task)
|
|
210
|
+
- A per-task line: `- **Worktree**: <path> ...` inside a task block
|
|
211
|
+
|
|
212
|
+
Parsers that support legacy plans may read these for migration or display, but
|
|
213
|
+
the shared **default** is: **one** worktree, no fan-in merge, no
|
|
214
|
+
`setup-worktree.sh child` in the new workflow path.
|
|
215
|
+
|
|
216
|
+
### Review / PR review artifacts
|
|
217
|
+
|
|
218
|
+
For `code-review` + `review-fix`, the `## Worktree Setup` block should list
|
|
219
|
+
only the feature worktree (same `**Parent**:` form). The PR head branch is
|
|
220
|
+
expressed via `--base-ref` when creating that worktree — not by spawning extra
|
|
221
|
+
per-severity worktrees. Legacy artifacts that listed severity-keyed “children”
|
|
222
|
+
are deprecated; prefer a single `**Parent**:` only.
|
|
223
|
+
|
|
224
|
+
### Sequential vs parallel tasks
|
|
225
|
+
|
|
226
|
+
With the single worktree model, all tasks run against the same path. Planners
|
|
227
|
+
need not emit per-task `**Worktree**:` lines for new work.
|
|
228
|
+
|
|
229
|
+
---
|
|
230
|
+
|
|
231
|
+
## 3. Lifecycle (high level)
|
|
232
|
+
|
|
233
|
+
1. **Once:** `setup-worktree.sh parent <repo> <feature-slug>` (optional `--base-ref` for existing branches).
|
|
234
|
+
2. **Per batch / task:** run work in the feature worktree; dispatch parallel agents
|
|
235
|
+
with `Working directory: <feature-worktree-path>` (or equivalent target-specific isolation) — **all share the same path**.
|
|
236
|
+
3. **No** `setup-worktree.sh child` and **no** `merge-children.sh` in the new contract.
|
|
237
|
+
(Legacy calls may still exist in older skill text; shims are non-destructive — see script headers.)
|
|
238
|
+
4. **Validate** between batches as the skill requires.
|
|
239
|
+
5. On **merge conflicts** or validation failure, handle in the feature worktree
|
|
240
|
+
per skill policy (pause, user resolve, etc.).
|
|
241
|
+
|
|
242
|
+
---
|
|
243
|
+
|
|
244
|
+
## 4. Per-Target Dispatch Matrix
|
|
245
|
+
|
|
246
|
+
| Capability profile | Primary mechanism | Fallback |
|
|
247
|
+
| --------------------------- | ------------------------------------------------------------------------------------ | ----------------------- |
|
|
248
|
+
| Tool-side agent isolation | Pre-create one feature worktree, then dispatch agents with `Working directory:` only | Bash `git worktree add` |
|
|
249
|
+
| Bash-only agent runtimes | Bash `git worktree add` via prompt | same |
|
|
250
|
+
| Docs-only / manual runtimes | Docs-only (emit commands; no auto-create) | User runs manually |
|
|
251
|
+
|
|
252
|
+
Parallel sub-agents all target the **same** feature worktree path in prompts.
|
|
253
|
+
See `target-capability-matrix.md` in this directory for the full
|
|
254
|
+
per-target table.
|
|
255
|
+
|
|
256
|
+
---
|
|
257
|
+
|
|
258
|
+
## 5. End-of-Run Cleanup
|
|
259
|
+
|
|
260
|
+
The feature worktree remains at `<repo-root>/<worktree-root>/<repo>-<feature>/` after the
|
|
261
|
+
run completes. Skills do not auto-remove it.
|
|
262
|
+
|
|
263
|
+
`list-worktrees.sh` can report the path, branch, and manual cleanup:
|
|
264
|
+
|
|
265
|
+
```bash
|
|
266
|
+
git worktree remove <repo-root>/<worktree-root>/<repo>-<feature>/
|
|
267
|
+
# If you created feat/<feature> and it is fully merged:
|
|
268
|
+
git branch -d feat/<feature>
|
|
269
|
+
```
|
|
270
|
+
|
|
271
|
+
---
|
|
272
|
+
|
|
273
|
+
## 7. Plan-artifact handoff
|
|
274
|
+
|
|
275
|
+
Plan files (and their companion artifacts) are **pre-commit** at the moment the
|
|
276
|
+
implementor is invoked. They live in the main checkout because the planner ran
|
|
277
|
+
before the worktree existed. The implementor **moves** them into the feature
|
|
278
|
+
worktree exactly once, immediately after `setup-worktree.sh parent`.
|
|
279
|
+
|
|
280
|
+
**Never** `cp`, `rsync`, or "sync" plan files. Copying leaves an untracked file
|
|
281
|
+
behind in the main checkout, and from the user's perspective the canonical
|
|
282
|
+
location of the plan becomes ambiguous.
|
|
283
|
+
|
|
284
|
+
Artifacts covered by the always-move rule:
|
|
285
|
+
|
|
286
|
+
- `docs/prps/plans/<name>.plan.md` (from `prp-plan`)
|
|
287
|
+
- `docs/plans/<feature>/parallel-plan.md` (from `parallel-plan` / `plan-workflow`)
|
|
288
|
+
- `docs/plans/<feature>/shared.md` (from `plan-workflow`)
|
|
289
|
+
- Any companion research artifact emitted in the same `docs/plans/<feature>/`
|
|
290
|
+
directory before commit
|
|
291
|
+
|
|
292
|
+
The canonical implementation is
|
|
293
|
+
[`_shared/scripts/move-plan-to-worktree.sh`](../scripts/move-plan-to-worktree.sh).
|
|
294
|
+
Skills that consume plan artifacts in worktree mode **must** call it. They
|
|
295
|
+
**must not** perform ad-hoc `cp` / `mv` / `rsync` logic of their own. The script
|
|
296
|
+
is idempotent (re-running is safe), echoes the new in-worktree plan path on
|
|
297
|
+
stdout, and never copies — only moves.
|
|
298
|
+
|
|
299
|
+
After the move, the implementor archives the plan inside the worktree at the
|
|
300
|
+
end of the run (`<plan-dir>/completed/<plan>`), keeping main untouched.
|
|
301
|
+
|
|
302
|
+
---
|
|
303
|
+
|
|
304
|
+
## 8. Native harness integration
|
|
305
|
+
|
|
306
|
+
For the single-worktree contract described here, executors pre-create the
|
|
307
|
+
feature worktree once with `setup-worktree.sh` and dispatch agents against that
|
|
308
|
+
existing path via `Working directory:`. Do not use native per-agent isolation
|
|
309
|
+
for task fan-out: it can create distinct harness worktrees for every agent.
|
|
310
|
+
See the native-placement evidence in section 1 for runtime-specific behavior.
|