@yandy-r/ycc-opencode 0.0.0-stage → 6.1.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/AGENTS.md +39 -0
- package/LICENSE +21 -0
- package/README.md +50 -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 +476 -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 +577 -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 +174 -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 +626 -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 +558 -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 +609 -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 +523 -0
- package/package.json +36 -4
- package/registration.json +7259 -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 +455 -0
- package/shared/references/forge-detection.md +162 -0
- package/shared/references/goal-pairing.md +55 -0
- package/shared/references/pr-base-and-backport.md +143 -0
- package/shared/references/question-policy.md +99 -0
- package/shared/references/review-artifact-format.md +141 -0
- package/shared/references/review-checklist.md +161 -0
- package/shared/references/review-dispatch.md +73 -0
- package/shared/references/session-state.md +159 -0
- package/shared/references/standalone-dispatch.md +300 -0
- package/shared/references/target-capability-matrix.md +516 -0
- package/shared/references/visual-mode.md +155 -0
- package/shared/references/worktree-strategy.md +326 -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 +91 -0
- package/skills/backport/SKILL.md +293 -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 +412 -0
- package/skills/blueprint/references/bootstrap-mapping.md +87 -0
- package/skills/bundle-author/SKILL.md +121 -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 +192 -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 +156 -0
- package/skills/bundle-release/scripts/bump-version.sh +99 -0
- package/skills/bundle-release/scripts/draft-notes.sh +222 -0
- package/skills/bundle-release/scripts/preflight.sh +165 -0
- package/skills/bundle-release/scripts/release_versions.py +375 -0
- package/skills/clean/SKILL.md +109 -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 +377 -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 +155 -0
- package/skills/code-review/references/pr-procedure.md +311 -0
- package/skills/compatibility-audit/SKILL.md +229 -0
- package/skills/compatibility-audit/references/reading-the-report.md +162 -0
- package/skills/compatibility-audit/scripts/audit-install-assumptions.sh +431 -0
- package/skills/compatibility-audit/scripts/audit-target-features.sh +596 -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 +294 -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 +209 -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 +300 -0
- package/skills/git-cleanup/references/active-code-rules.md +323 -0
- package/skills/git-cleanup/references/host-detection.md +217 -0
- package/skills/git-workflow/SKILL.md +132 -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 +223 -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 +274 -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 +121 -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 +136 -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 +409 -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 +309 -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 +179 -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/validate-prp-plan.sh +368 -0
- package/skills/prp-pr/SKILL.md +404 -0
- package/skills/prp-prd/SKILL.md +444 -0
- package/skills/prp-spec/SKILL.md +276 -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 +306 -0
- package/skills/release-model/SKILL.md +233 -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 +253 -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 +287 -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 +154 -0
- package/skills/review-fix/SKILL.md +231 -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 +161 -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
- package/ycc-sensitive-guard/index.js +621 -0
- package/ycc-sensitive-guard/package.json +7 -0
- package/ycc-sensitive-guard/policy.json +40 -0
|
@@ -0,0 +1,159 @@
|
|
|
1
|
+
# Session State Contract
|
|
2
|
+
|
|
3
|
+
## Contents
|
|
4
|
+
|
|
5
|
+
- Store
|
|
6
|
+
- Filename
|
|
7
|
+
- Discovery (resume)
|
|
8
|
+
- Interpretation Rules
|
|
9
|
+
- File Format
|
|
10
|
+
|
|
11
|
+
Single source of truth for the session-file store, filename, discovery rules, and Markdown format shared by `/ycc:save-session` (writer) and `/ycc:resume-session` (reader).
|
|
12
|
+
|
|
13
|
+
## Store
|
|
14
|
+
|
|
15
|
+
- Canonical store: `~/.config/opencode/session-data/` — global (user home), not project-local.
|
|
16
|
+
- Legacy fallback (read-only): `~/.config/opencode/sessions/`.
|
|
17
|
+
|
|
18
|
+
## Filename
|
|
19
|
+
|
|
20
|
+
`~/.config/opencode/session-data/YYYY-MM-DD-<short-id>-session.tmp`
|
|
21
|
+
|
|
22
|
+
- Date: today's actual date (`date +%Y-%m-%d`).
|
|
23
|
+
- `<short-id>` characters: letters `a-z` / `A-Z`, digits `0-9`, hyphens `-`, underscores `_`.
|
|
24
|
+
- Recommended: lowercase letters + digits + hyphens, 8+ characters to avoid collisions (recommended, not mandatory).
|
|
25
|
+
- Valid examples: `abc123de`, `a1b2c3d4`, `frontend-worktree-1`, `ChezMoi_2`
|
|
26
|
+
- Avoid for new files: `A`, `test_id1`, `ABC123de`
|
|
27
|
+
- Full valid filename example: `2024-01-15-abc123de-session.tmp`
|
|
28
|
+
- Legacy filename `YYYY-MM-DD-session.tmp` is still valid and readable, but new session files should prefer the short-id form to avoid same-day collisions.
|
|
29
|
+
- Each session gets its own file — never append to a previous session's file.
|
|
30
|
+
|
|
31
|
+
## Discovery (resume)
|
|
32
|
+
|
|
33
|
+
- **No argument:** the most recently modified `*-session.tmp` file in `~/.config/opencode/session-data/` only. If the folder does not exist or has no matching files, report that none were found and stop.
|
|
34
|
+
- **Date argument (`YYYY-MM-DD`):** search `~/.config/opencode/session-data/` first, then the legacy `~/.config/opencode/sessions/`, for `YYYY-MM-DD-session.tmp` (legacy format) or `YYYY-MM-DD-<shortid>-session.tmp` (current format). Load the most recently modified matching variant for that date, regardless of format. This is not a global newest-across-both-stores search.
|
|
35
|
+
- **File path argument:** read that file directly (e.g., forwarded from a sub-agent). The format is the same regardless of source.
|
|
36
|
+
- If not found, report clearly and stop.
|
|
37
|
+
|
|
38
|
+
## Interpretation Rules
|
|
39
|
+
|
|
40
|
+
- Every section is written honestly; do not skip sections — write "Nothing yet" or "N/A" if a section genuinely has no content. An incomplete file is worse than an honest empty section.
|
|
41
|
+
- "What WORKED" lists only confirmed-working items, each with evidence of WHY it is known to work (test passed, ran in browser, Postman returned 200, etc.). Without evidence, the item belongs in "What Has NOT Been Tried Yet".
|
|
42
|
+
- "What Did NOT Work (and why)" is the most important section. List every failed approach with the EXACT reason ("threw X error because Y" is useful; "didn't work" is not) so the next session does not retry it.
|
|
43
|
+
- "Exact Next Step": when not known, write the fallback text shown in the template; readers treat it as "no next step defined".
|
|
44
|
+
- "Environment & Setup Notes" is the only optional section: omit it entirely when there is nothing to record. All other sections are mandatory.
|
|
45
|
+
- If saving mid-session, save what is known so far and mark in-progress items clearly.
|
|
46
|
+
|
|
47
|
+
## File Format
|
|
48
|
+
|
|
49
|
+
```markdown
|
|
50
|
+
# Session: YYYY-MM-DD
|
|
51
|
+
|
|
52
|
+
**Started:** [approximate time if known]
|
|
53
|
+
**Last Updated:** [current time]
|
|
54
|
+
**Project:** [project name or path]
|
|
55
|
+
**Topic:** [one-line summary of what this session was about]
|
|
56
|
+
|
|
57
|
+
---
|
|
58
|
+
|
|
59
|
+
## What We Are Building
|
|
60
|
+
|
|
61
|
+
[1-3 paragraphs describing the feature, bug fix, or task. Include enough
|
|
62
|
+
context that someone with zero memory of this session can understand the goal.
|
|
63
|
+
Include: what it does, why it's needed, how it fits into the larger system.]
|
|
64
|
+
|
|
65
|
+
---
|
|
66
|
+
|
|
67
|
+
## What WORKED (with evidence)
|
|
68
|
+
|
|
69
|
+
[List only things that are confirmed working. For each item include WHY you
|
|
70
|
+
know it works — test passed, ran in browser, Postman returned 200, etc.
|
|
71
|
+
Without evidence, move it to "Not Tried Yet" instead.]
|
|
72
|
+
|
|
73
|
+
- **[thing that works]** — confirmed by: [specific evidence]
|
|
74
|
+
- **[thing that works]** — confirmed by: [specific evidence]
|
|
75
|
+
|
|
76
|
+
If nothing is confirmed working yet: "Nothing confirmed working yet — all approaches still in progress or untested."
|
|
77
|
+
|
|
78
|
+
---
|
|
79
|
+
|
|
80
|
+
## What Did NOT Work (and why)
|
|
81
|
+
|
|
82
|
+
[This is the most important section. List every approach tried that failed.
|
|
83
|
+
For each failure write the EXACT reason so the next session doesn't retry it.
|
|
84
|
+
Be specific: "threw X error because Y" is useful. "didn't work" is not.]
|
|
85
|
+
|
|
86
|
+
- **[approach tried]** — failed because: [exact reason / error message]
|
|
87
|
+
- **[approach tried]** — failed because: [exact reason / error message]
|
|
88
|
+
|
|
89
|
+
If nothing failed: "No failed approaches yet."
|
|
90
|
+
|
|
91
|
+
---
|
|
92
|
+
|
|
93
|
+
## What Has NOT Been Tried Yet
|
|
94
|
+
|
|
95
|
+
[Approaches that seem promising but haven't been attempted. Ideas from the
|
|
96
|
+
conversation. Alternative solutions worth exploring. Be specific enough that
|
|
97
|
+
the next session knows exactly what to try.]
|
|
98
|
+
|
|
99
|
+
- [approach / idea]
|
|
100
|
+
- [approach / idea]
|
|
101
|
+
|
|
102
|
+
If nothing is queued: "No specific untried approaches identified."
|
|
103
|
+
|
|
104
|
+
---
|
|
105
|
+
|
|
106
|
+
## Current State of Files
|
|
107
|
+
|
|
108
|
+
[Every file touched this session. Be precise about what state each file is in.]
|
|
109
|
+
|
|
110
|
+
| File | Status | Notes |
|
|
111
|
+
| ----------------- | -------------- | -------------------------- |
|
|
112
|
+
| `path/to/file.ts` | PASS: Complete | [what it does] |
|
|
113
|
+
| `path/to/file.ts` | In Progress | [what's done, what's left] |
|
|
114
|
+
| `path/to/file.ts` | FAIL: Broken | [what's wrong] |
|
|
115
|
+
| `path/to/file.ts` | Not Started | [planned but not touched] |
|
|
116
|
+
|
|
117
|
+
If no files were touched: "No files modified this session."
|
|
118
|
+
|
|
119
|
+
---
|
|
120
|
+
|
|
121
|
+
## Decisions Made
|
|
122
|
+
|
|
123
|
+
[Architecture choices, tradeoffs accepted, approaches chosen and why.
|
|
124
|
+
These prevent the next session from relitigating settled decisions.]
|
|
125
|
+
|
|
126
|
+
- **[decision]** — reason: [why this was chosen over alternatives]
|
|
127
|
+
|
|
128
|
+
If no significant decisions: "No major decisions made this session."
|
|
129
|
+
|
|
130
|
+
---
|
|
131
|
+
|
|
132
|
+
## Blockers & Open Questions
|
|
133
|
+
|
|
134
|
+
[Anything unresolved that the next session needs to address or investigate.
|
|
135
|
+
Questions that came up but weren't answered. External dependencies waiting on.]
|
|
136
|
+
|
|
137
|
+
- [blocker / open question]
|
|
138
|
+
|
|
139
|
+
If none: "No active blockers."
|
|
140
|
+
|
|
141
|
+
---
|
|
142
|
+
|
|
143
|
+
## Exact Next Step
|
|
144
|
+
|
|
145
|
+
[If known: The single most important thing to do when resuming. Be precise
|
|
146
|
+
enough that resuming requires zero thinking about where to start.]
|
|
147
|
+
|
|
148
|
+
[If not known: "Next step not determined — review 'What Has NOT Been Tried Yet'
|
|
149
|
+
and 'Blockers' sections to decide on direction before starting."]
|
|
150
|
+
|
|
151
|
+
---
|
|
152
|
+
|
|
153
|
+
## Environment & Setup Notes
|
|
154
|
+
|
|
155
|
+
[Only fill this if relevant — commands needed to run the project, env vars
|
|
156
|
+
required, services that need to be running, etc. Skip if standard setup.]
|
|
157
|
+
|
|
158
|
+
[If none: omit this section entirely.]
|
|
159
|
+
```
|
|
@@ -0,0 +1,300 @@
|
|
|
1
|
+
# Standalone Dispatch — OpenCode V2 `subagent` Contract
|
|
2
|
+
|
|
3
|
+
This is the generated OpenCode V2 contract for standalone child-agent work. It uses
|
|
4
|
+
the host's native vocabulary directly. OpenCode V2 does not expose Claude Code's
|
|
5
|
+
agent-team tools, and `--team` workflows must abort before dispatch.
|
|
6
|
+
|
|
7
|
+
## 1. Native call shape
|
|
8
|
+
|
|
9
|
+
A new child session uses all required fields and omits `sessionID`:
|
|
10
|
+
|
|
11
|
+
```text
|
|
12
|
+
subagent(agent="<agent>", description="<short title>",
|
|
13
|
+
prompt="<complete task prompt>", background=false)
|
|
14
|
+
```
|
|
15
|
+
|
|
16
|
+
The fields mean:
|
|
17
|
+
|
|
18
|
+
- `agent`: the configured subagent ID.
|
|
19
|
+
- `description`: a short title for the child session.
|
|
20
|
+
- `prompt`: the complete task, context, ownership boundary, working directory, output
|
|
21
|
+
contract, and artifact paths. A new child starts with fresh context.
|
|
22
|
+
- `background`: set it explicitly on every call. Never depend on a host or plugin
|
|
23
|
+
default.
|
|
24
|
+
|
|
25
|
+
Only configured agents with `mode: subagent` or `mode: all` can be dispatched. The
|
|
26
|
+
default nesting depth is one, so a child normally cannot launch another child.
|
|
27
|
+
|
|
28
|
+
Independent calls may be issued in one parallel tool batch. Keep file ownership
|
|
29
|
+
disjoint when children share a working tree.
|
|
30
|
+
|
|
31
|
+
## 2. Foreground dispatch
|
|
32
|
+
|
|
33
|
+
Use foreground dispatch when the next step depends on the child's report:
|
|
34
|
+
|
|
35
|
+
```text
|
|
36
|
+
subagent(agent="<agent>", description="<short title>",
|
|
37
|
+
prompt="<complete task prompt>", background=false)
|
|
38
|
+
```
|
|
39
|
+
|
|
40
|
+
The call waits for the child run and returns its response. Treat the response as a
|
|
41
|
+
candidate report, not proof that the requested work exists. Before accepting it:
|
|
42
|
+
|
|
43
|
+
1. Require nonempty report text in the requested format.
|
|
44
|
+
2. Validate every declared file, artifact, or working-tree change independently.
|
|
45
|
+
3. Run the required focused checks for the work.
|
|
46
|
+
4. Treat a host `succeeded` or `completed` lifecycle state only as evidence that the
|
|
47
|
+
child run terminated; it does not verify the deliverables.
|
|
48
|
+
|
|
49
|
+
## 3. Background dispatch
|
|
50
|
+
|
|
51
|
+
Use background dispatch only when useful independent work remains or the workflow
|
|
52
|
+
explicitly supports deferred result retrieval:
|
|
53
|
+
|
|
54
|
+
```text
|
|
55
|
+
subagent(agent="<agent>", description="<short title>",
|
|
56
|
+
prompt="<complete task prompt>", background=true)
|
|
57
|
+
```
|
|
58
|
+
|
|
59
|
+
The initial return is an acknowledgement containing a child `sessionID`, not the final
|
|
60
|
+
report. Record that ID immediately. Continue only non-overlapping work. If there is
|
|
61
|
+
nothing productive to do, end the turn so the native terminal notification can be
|
|
62
|
+
delivered.
|
|
63
|
+
|
|
64
|
+
Do not use shell sleeps or tight status loops. After a terminal notification, a host
|
|
65
|
+
plugin may advertise read-only lifecycle and result tools:
|
|
66
|
+
|
|
67
|
+
```text
|
|
68
|
+
task_status(sessionID="<child session ID>")
|
|
69
|
+
task_result(sessionID="<child session ID>")
|
|
70
|
+
```
|
|
71
|
+
|
|
72
|
+
Use `task_status` for one bounded inspection when the notification is ambiguous. Use
|
|
73
|
+
`task_result` to retrieve verified terminal report text. If either reports
|
|
74
|
+
`running`, `pending`, or `running (unconfirmed)`, stop checking and wait for the next
|
|
75
|
+
native notification. Do not loop.
|
|
76
|
+
|
|
77
|
+
These `task_*` tools are plugin extensions, not guaranteed OpenCode built-ins. When
|
|
78
|
+
they are absent, use foreground dispatch for work whose report is required. Never
|
|
79
|
+
invent a result-retrieval tool.
|
|
80
|
+
|
|
81
|
+
## 4. Resume is not result retrieval
|
|
82
|
+
|
|
83
|
+
Continue an existing child conversation only when more work or clarification is
|
|
84
|
+
required:
|
|
85
|
+
|
|
86
|
+
```text
|
|
87
|
+
subagent(agent="<agent>", description="<follow-up title>",
|
|
88
|
+
prompt="<new follow-up instruction>",
|
|
89
|
+
sessionID="<existing child session ID>", background=false)
|
|
90
|
+
```
|
|
91
|
+
|
|
92
|
+
Passing `sessionID` resumes the child and may run tools or change files again. Never
|
|
93
|
+
call `subagent` with `sessionID` merely to fetch a prior report. Use `task_result` when
|
|
94
|
+
it is advertised, or report that native result retrieval is unavailable.
|
|
95
|
+
|
|
96
|
+
## 5. Deliverable verification
|
|
97
|
+
|
|
98
|
+
The parent owns final verification. A child report and host lifecycle state are two
|
|
99
|
+
separate signals:
|
|
100
|
+
|
|
101
|
+
| Signal | What it proves |
|
|
102
|
+
| -------------------------- | ----------------------------------------------------- |
|
|
103
|
+
| `succeeded` / `completed` | The host observed a terminal child run. |
|
|
104
|
+
| Nonempty structured report | The child described an outcome in the required shape. |
|
|
105
|
+
| Required files or diff | The requested on-disk work exists. |
|
|
106
|
+
| Focused checks | The produced work satisfies the requested validation. |
|
|
107
|
+
|
|
108
|
+
Do not mark parent work complete until every required signal for that task is present.
|
|
109
|
+
For code-writing children, inspect the working tree and validate the files they owned.
|
|
110
|
+
For research or review children, read the declared artifact as well as the report.
|
|
111
|
+
|
|
112
|
+
## 6. Contentless and failed outcomes
|
|
113
|
+
|
|
114
|
+
A contentless completion is incomplete even when the host reports success. Handle it
|
|
115
|
+
in this order:
|
|
116
|
+
|
|
117
|
+
1. Record and report the child `sessionID`.
|
|
118
|
+
2. Inspect the working tree and every declared artifact before retrying; the child may
|
|
119
|
+
have made edits without returning a report.
|
|
120
|
+
3. Preserve valid existing edits and avoid duplicate work.
|
|
121
|
+
4. Retry at most once with the same child only when a follow-up report is safe, or with
|
|
122
|
+
a new child when the original session cannot continue. State which form of one retry
|
|
123
|
+
you chose.
|
|
124
|
+
5. If the retry is also contentless, report the task as incomplete. Do not synthesize a
|
|
125
|
+
success report.
|
|
126
|
+
|
|
127
|
+
Treat explicit `failed`, `error`, `interrupted`, or `cancelled` outcomes as failures.
|
|
128
|
+
Surface the child ID and available error text. Continue only work that is independent
|
|
129
|
+
of the failed deliverable.
|
|
130
|
+
|
|
131
|
+
## 7. Artifact backstop
|
|
132
|
+
|
|
133
|
+
Content-producing children should write their result to a declared artifact path and
|
|
134
|
+
return the same material in their report. Code-writing children use their owned diff as
|
|
135
|
+
the artifact and finish with the required machine-readable status line.
|
|
136
|
+
|
|
137
|
+
When report text is missing:
|
|
138
|
+
|
|
139
|
+
1. Read the artifact or inspect the owned diff.
|
|
140
|
+
2. Validate it before using it.
|
|
141
|
+
3. Still report the missing child report as incomplete; an artifact can preserve useful
|
|
142
|
+
work but does not turn a contentless run into a verified child response.
|
|
143
|
+
|
|
144
|
+
## 8. Worktree and Branch Preparation
|
|
145
|
+
|
|
146
|
+
Single source for plan, plan-workflow, prp-plan (annotation directive) and the executors
|
|
147
|
+
`implement-plan`, `prp-implement`, `orchestrate`. Applies to standalone runs.
|
|
148
|
+
|
|
149
|
+
### 8.1 How worktree mode is decided
|
|
150
|
+
|
|
151
|
+
1. `--no-worktree` present: `WORKTREE_MODE=false`. Forced off regardless of plan annotations;
|
|
152
|
+
no feature worktree; work on the prepared `feat/<slug>` branch in the current checkout.
|
|
153
|
+
2. Plan contains `## Worktree Setup`: `WORKTREE_MODE=true`. Annotations are the source of truth.
|
|
154
|
+
3. Neither: `WORKTREE_MODE=true` (default). Derive the single path below.
|
|
155
|
+
|
|
156
|
+
`--worktree` is a silent legacy no-op; combining it with `--no-worktree` is an error where the
|
|
157
|
+
skill says so. When the plan has `## Worktree Setup`, read `WT_PARENT_PATH` from its
|
|
158
|
+
`**Parent**:` line and `WT_FEATURE_SLUG` as the segment after `<repo>-`. Set
|
|
159
|
+
`WORKTREE_ACTIVE=true` if annotations exist or `WORKTREE_MODE=true`; false for `--no-worktree`.
|
|
160
|
+
|
|
161
|
+
Default-on deduction (no annotations):
|
|
162
|
+
|
|
163
|
+
- `WT_REPO_NAME` = basename of `git rev-parse --show-toplevel`
|
|
164
|
+
- `WT_FEATURE_SLUG` per skill: `implement-plan` uses the raw feature-name argument;
|
|
165
|
+
`prp-implement` sanitizes the plan basename (cap 40); `orchestrate` sanitizes the task
|
|
166
|
+
description (cap 20); `plan` confirmed execution uses the team sanitization (cap 20,
|
|
167
|
+
fallback `untitled`). Shared sanitizer: lowercase, `[^a-z0-9-]` to `-`, collapse runs, trim
|
|
168
|
+
- `FEATURE_BRANCH` = `feat/${WT_FEATURE_SLUG}`
|
|
169
|
+
- `WT_PARENT_PATH` = `<repo-root>/.opencode/worktrees/${WT_REPO_NAME}-${WT_FEATURE_SLUG}/`
|
|
170
|
+
|
|
171
|
+
### 8.2 Prepare (before any implementor dispatch)
|
|
172
|
+
|
|
173
|
+
Set `REPO_ROOT=$(git rev-parse --show-toplevel)`. Inspect `git status --porcelain`: expected pre-commit plan artifacts may be dirty;
|
|
174
|
+
unrelated dirty files: stop and ask user to stash, commit or clean. Then:
|
|
175
|
+
|
|
176
|
+
```bash
|
|
177
|
+
FEATURE_BRANCH=$(bash {{package-root}}/shared/scripts/prepare-feature-branch.sh "${WT_FEATURE_SLUG}")
|
|
178
|
+
```
|
|
179
|
+
|
|
180
|
+
Do not skip it. Narrative-only branch instructions let agents commit to `main`. Contract:
|
|
181
|
+
`branch-prep.md`. When `WORKTREE_ACTIVE=true`, once before the first batch (idempotent; adopts
|
|
182
|
+
the prepared branch; echoes path, store as `WT_PARENT_PATH`):
|
|
183
|
+
|
|
184
|
+
```bash
|
|
185
|
+
WT_PARENT_PATH=$(bash {{package-root}}/shared/scripts/setup-worktree.sh parent "${WT_REPO_NAME}" "${WT_FEATURE_SLUG}")
|
|
186
|
+
```
|
|
187
|
+
|
|
188
|
+
Then move plan artifacts once (never `cp`, `rsync` or sync; never move back); companions such as
|
|
189
|
+
`shared.md` ride as extra arguments. Use `$PLAN_PATH` for every later reference; run later
|
|
190
|
+
validation/reports/archive inside `$WT_PARENT_PATH`:
|
|
191
|
+
|
|
192
|
+
```bash
|
|
193
|
+
PLAN_PATH=$(bash {{package-root}}/shared/scripts/move-plan-to-worktree.sh "<plan-path>" "$WT_PARENT_PATH" ["<companion>" ...])
|
|
194
|
+
```
|
|
195
|
+
|
|
196
|
+
`WORKTREE_ACTIVE=false`: skip worktree setup and the move; keep original plan path and run in
|
|
197
|
+
the prepared current checkout.
|
|
198
|
+
|
|
199
|
+
### 8.3 Agent prompt lines
|
|
200
|
+
|
|
201
|
+
Active worktree, every agent prompt (parallel and sequential):
|
|
202
|
+
|
|
203
|
+
```
|
|
204
|
+
Working directory: ${WT_PARENT_PATH}
|
|
205
|
+
All parallel agents in this batch share this path; batching guarantees no two agents touch the same file.
|
|
206
|
+
```
|
|
207
|
+
|
|
208
|
+
`--no-worktree`:
|
|
209
|
+
|
|
210
|
+
```
|
|
211
|
+
Working directory: ${REPO_ROOT}
|
|
212
|
+
All parallel agents in this batch share the current feature branch; batching guarantees no two agents touch the same file.
|
|
213
|
+
```
|
|
214
|
+
|
|
215
|
+
Treat that directory as repo root for Read/Write/Edit/Bash. Never pass `isolation: "worktree"` or
|
|
216
|
+
`subagent(isolation: "worktree", background=false)`; it creates separate harness worktrees. Codex/opencode: prompt line is
|
|
217
|
+
sufficient. Cursor: warn and print the manual `git worktree add` command.
|
|
218
|
+
|
|
219
|
+
### 8.4 Planner annotation directive (default WORKTREE_MODE=true; omit for --no-worktree)
|
|
220
|
+
|
|
221
|
+
Append to planner and persona prompts:
|
|
222
|
+
|
|
223
|
+
```
|
|
224
|
+
WORKTREE MODE:
|
|
225
|
+
|
|
226
|
+
The plan consumer will run all tasks in a single shared git worktree.
|
|
227
|
+
In your emitted plan:
|
|
228
|
+
|
|
229
|
+
1. Add a top-level `## Worktree Setup` section BEFORE the Batches summary
|
|
230
|
+
(or before Implementation Steps when there is no Batches section):
|
|
231
|
+
|
|
232
|
+
## Worktree Setup
|
|
233
|
+
|
|
234
|
+
- **Parent**: <repo-root>/.opencode/worktrees/<repo>-<feature>/ (branch: feat/<feature>)
|
|
235
|
+
|
|
236
|
+
Substitute the concrete `<repo>` and `<feature>` values; keep `<repo-root>/.opencode/worktrees/`
|
|
237
|
+
as this runtime's worktree root. All tasks - parallel and sequential - share this one path.
|
|
238
|
+
Do NOT add a `**Children**:` list and do NOT add per-task `**Worktree**:` annotations.
|
|
239
|
+
```
|
|
240
|
+
|
|
241
|
+
## 9. Dependency Resolution and Batching
|
|
242
|
+
|
|
243
|
+
### 9.1 Graph and batches
|
|
244
|
+
|
|
245
|
+
Build the graph from `Depends on [...]` annotations. Tasks with `Depends on [none]` form batch 1.
|
|
246
|
+
A task joins the earliest batch whose dependencies are all in prior batches. Two tasks touching the
|
|
247
|
+
same file never share a batch. Cross-cutting shared types/config get a dedicated early batch.
|
|
248
|
+
Prefer wide-shallow graphs over narrow-deep chains. Dispatch each batch as one message;
|
|
249
|
+
wait for the whole batch before the next.
|
|
250
|
+
|
|
251
|
+
### 9.2 Planner output directives (parallel plans)
|
|
252
|
+
|
|
253
|
+
When a planner is asked for parallel output, append:
|
|
254
|
+
|
|
255
|
+
```
|
|
256
|
+
PARALLEL OUTPUT MODE:
|
|
257
|
+
|
|
258
|
+
Shape the output for parallel execution:
|
|
259
|
+
1. Number steps hierarchically (1.1, 1.2, 2.1); first digit is batch.
|
|
260
|
+
2. Populate Dependencies on every step with explicit IDs (`Depends on [1.1, 1.2]` or `Depends on [none]`).
|
|
261
|
+
3. Add `## Batches` after `## Architecture Changes` and before `## Implementation Steps`:
|
|
262
|
+
|
|
263
|
+
| Batch | Steps | Depends On | Parallel Width |
|
|
264
|
+
| ----- | ------------- | ---------- | -------------- |
|
|
265
|
+
| B1 | 1.1, 1.2, 1.3 | - | 3 |
|
|
266
|
+
|
|
267
|
+
- **Total steps**: N
|
|
268
|
+
- **Total batches**: M
|
|
269
|
+
- **Max parallel width**: X
|
|
270
|
+
4. Apply the batch construction rules from section 9.1.
|
|
271
|
+
```
|
|
272
|
+
|
|
273
|
+
### 9.3 Between batches and failures
|
|
274
|
+
|
|
275
|
+
Run the skill's own validation inside the execution tree (worktree path or prepared checkout).
|
|
276
|
+
After each batch update todos and print the skill's verbatim `[done] Batch BN: K tasks — complete` marker (em dash; transcript loops match the marker).
|
|
277
|
+
Do not auto-retry a failed batch (usually file conflict or hidden dependency) and do not skip it;
|
|
278
|
+
later batches may depend on it. Preserve completed work; ask the user (fix/resume, switch to
|
|
279
|
+
sequential, abort) per the `failure-recovery` class in `question-policy.md` in this directory.
|
|
280
|
+
Standalone partial failure: continue only independent tasks.
|
|
281
|
+
|
|
282
|
+
## 10. Executing a Confirmed Plan
|
|
283
|
+
|
|
284
|
+
After a user confirms an in-conversation parallel plan: run section 8 (worktree: plan names parent
|
|
285
|
+
`<repo-root>/.opencode/worktrees/<repo>-<feature>/`; run `setup-worktree.sh parent` once, dispatch with
|
|
286
|
+
`Working directory: <parent path>`; `--no-worktree`: derive the slug with the team-name sanitization
|
|
287
|
+
rules (lowercase, non `[a-z0-9-]` to `-`, collapse, cap 20, fallback `untitled`) and run
|
|
288
|
+
`prepare-feature-branch.sh`). The helper is idempotent, exits 1 on unrelated dirty tree, exits 2 on
|
|
289
|
+
a different feature branch (`--allow-existing-feature-branch` after confirmation) or on `release/*`
|
|
290
|
+
when `RELEASING.md` exists (`--allow-release-branch` for release-only fixes). Do not skip.
|
|
291
|
+
Then process section 9 batches with one `implementor` `subagent` per step in one message; run the
|
|
292
|
+
project type-check and unit-test commands between batches; on failure stop and ask the user
|
|
293
|
+
(`failure-recovery` class in `question-policy.md`).
|
|
294
|
+
|
|
295
|
+
## 11. Unsupported team mode
|
|
296
|
+
|
|
297
|
+
OpenCode V2 standalone dispatch has no team-name argument, shared team roster, or Claude Code
|
|
298
|
+
team lifecycle. If a workflow receives `--team`, abort with a compatibility message and
|
|
299
|
+
instruct the caller to rerun the default standalone mode. Never translate team identity
|
|
300
|
+
into `sessionID`; a child-session resume ID is a different concept.
|