@yandy-r/ycc-opencode 0.0.0-bootstrap.0 → 6.0.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/AGENTS.md +38 -0
- package/LICENSE +21 -0
- package/README.md +42 -0
- package/agents/ansible-automation-expert.md +115 -0
- package/agents/api-docs-expert.md +146 -0
- package/agents/api-documenter.md +105 -0
- package/agents/architect.md +264 -0
- package/agents/architecture-analyst.md +99 -0
- package/agents/backport-conflict-resolver.md +134 -0
- package/agents/cloudflare-architect.md +85 -0
- package/agents/cloudflare-developer.md +196 -0
- package/agents/code-architect.md +101 -0
- package/agents/code-documenter.md +114 -0
- package/agents/code-explorer.md +99 -0
- package/agents/code-finder.md +83 -0
- package/agents/code-researcher.md +102 -0
- package/agents/code-reviewer.md +268 -0
- package/agents/code-simplifier.md +77 -0
- package/agents/codebase-advisor.md +130 -0
- package/agents/db-modifier.md +235 -0
- package/agents/docs-git-committer.md +220 -0
- package/agents/documentation-writer.md +92 -0
- package/agents/feature-researcher.md +121 -0
- package/agents/feature-writer.md +89 -0
- package/agents/frontend-ui-developer.md +98 -0
- package/agents/git-cleanup.md +173 -0
- package/agents/go-api-architect.md +172 -0
- package/agents/go-expert-architect.md +147 -0
- package/agents/implementor.md +167 -0
- package/agents/library-docs-writer.md +128 -0
- package/agents/nextjs-ux-ui-expert.md +127 -0
- package/agents/nodejs-backend-architect.md +112 -0
- package/agents/nodejs-backend-developer.md +184 -0
- package/agents/planner.md +257 -0
- package/agents/pr-comment-fixer.md +284 -0
- package/agents/practices-researcher.md +80 -0
- package/agents/project-file-cleaner.md +140 -0
- package/agents/prp-researcher.md +231 -0
- package/agents/python-developer.md +171 -0
- package/agents/python-expert-architect.md +188 -0
- package/agents/readme-generator.md +100 -0
- package/agents/release-fix-applier.md +194 -0
- package/agents/releaser.md +147 -0
- package/agents/research-specialist.md +106 -0
- package/agents/reverse-proxy-architect.md +131 -0
- package/agents/review-fixer.md +264 -0
- package/agents/root-cause-analyzer.md +105 -0
- package/agents/rust-build-resolver.md +183 -0
- package/agents/rust-expert-architect.md +149 -0
- package/agents/rust-reviewer.md +126 -0
- package/agents/sql-database-developer.md +195 -0
- package/agents/systems-engineering-expert.md +203 -0
- package/agents/terraform-architect.md +109 -0
- package/agents/terraform-developer.md +229 -0
- package/agents/test-strategy-planner.md +126 -0
- package/agents/turso-database-architect.md +139 -0
- package/agents/typescript-developer.md +170 -0
- package/agents/typescript-expert-architect.md +167 -0
- package/index.js +260 -0
- package/package.json +33 -7
- package/registration.json +4384 -0
- package/shared/references/agent-native-setup.md +121 -0
- package/shared/references/branch-prep.md +31 -0
- package/shared/references/branching-model.md +162 -0
- package/shared/references/ci-monitoring.md +445 -0
- package/shared/references/forge-detection.md +162 -0
- package/shared/references/goal-pairing.md +53 -0
- package/shared/references/pr-base-and-backport.md +143 -0
- package/shared/references/review-artifact-format.md +141 -0
- package/shared/references/review-checklist.md +161 -0
- package/shared/references/review-dispatch.md +71 -0
- package/shared/references/session-state.md +159 -0
- package/shared/references/standalone-dispatch.md +298 -0
- package/shared/references/target-capability-matrix.md +325 -0
- package/shared/references/visual-mode.md +155 -0
- package/shared/references/worktree-strategy.md +310 -0
- package/shared/scripts/backport-audit.sh +283 -0
- package/shared/scripts/ci-monitor.sh +637 -0
- package/shared/scripts/lib/backport-lib.sh +47 -0
- package/shared/scripts/lib/ci-classify.sh +103 -0
- package/shared/scripts/lib/forge.sh +264 -0
- package/shared/scripts/lib/release-state-lib.sh +300 -0
- package/shared/scripts/list-worktrees.sh +178 -0
- package/shared/scripts/merge-children.sh +82 -0
- package/shared/scripts/move-plan-to-worktree.sh +231 -0
- package/shared/scripts/pr-guard.sh +283 -0
- package/shared/scripts/prepare-feature-branch.sh +326 -0
- package/shared/scripts/release-ci-monitor.sh +671 -0
- package/shared/scripts/release-state-update.sh +216 -0
- package/shared/scripts/release-state.sh +178 -0
- package/shared/scripts/report-bundle-drift.sh +343 -0
- package/shared/scripts/require-python.sh +17 -0
- package/shared/scripts/resolve-plans-dir.sh +262 -0
- package/shared/scripts/rules-pointer.sh +20 -0
- package/shared/scripts/rules_pointer.py +267 -0
- package/shared/scripts/setup-worktree.sh +288 -0
- package/shared/scripts/validate-file-paths.sh +249 -0
- package/shared/scripts/visual-egress-guard.sh +303 -0
- package/shared/scripts/visual-recap-collect.sh +247 -0
- package/shared/scripts/worktree-paths.sh +86 -0
- package/skills/backport/SKILL.md +291 -0
- package/skills/backport/scripts/cherry-pick-pr.sh +232 -0
- package/skills/backport/scripts/find-pending.sh +199 -0
- package/skills/blueprint/SKILL.md +410 -0
- package/skills/blueprint/references/bootstrap-mapping.md +87 -0
- package/skills/bundle-author/SKILL.md +119 -0
- package/skills/bundle-author/references/surface-map.md +128 -0
- package/skills/bundle-author/references/templates/agent-template.md +21 -0
- package/skills/bundle-author/references/templates/skill-template.md +36 -0
- package/skills/bundle-author/references/when-not-to-scaffold.md +85 -0
- package/skills/bundle-author/scripts/scaffold-skill.sh +156 -0
- package/skills/bundle-release/SKILL.md +188 -0
- package/skills/bundle-release/references/release-checklist.md +196 -0
- package/skills/bundle-release/references/release-notes-template.md +48 -0
- package/skills/bundle-release/references/version-policy.md +150 -0
- package/skills/bundle-release/scripts/bump-version.sh +97 -0
- package/skills/bundle-release/scripts/draft-notes.sh +222 -0
- package/skills/bundle-release/scripts/preflight.sh +164 -0
- package/skills/bundle-release/scripts/release_versions.py +361 -0
- package/skills/clean/SKILL.md +107 -0
- package/skills/clean/references/agent-prompts.md +199 -0
- package/skills/clean/references/safety-config.md +125 -0
- package/skills/clean/scripts/detect-project-type.sh +423 -0
- package/skills/clean/scripts/generate-report.sh +245 -0
- package/skills/clean/scripts/validate-safety.sh +401 -0
- package/skills/code-report/SKILL.md +375 -0
- package/skills/code-report/scripts/check-prerequisites.sh +65 -0
- package/skills/code-report/templates/report-structure.md +202 -0
- package/skills/code-review/SKILL.md +153 -0
- package/skills/code-review/references/pr-procedure.md +311 -0
- package/skills/compatibility-audit/SKILL.md +226 -0
- package/skills/compatibility-audit/references/reading-the-report.md +159 -0
- package/skills/compatibility-audit/scripts/audit-install-assumptions.sh +372 -0
- package/skills/compatibility-audit/scripts/audit-target-features.sh +558 -0
- package/skills/deep-research/SKILL.md +251 -0
- package/skills/deep-research/references/analysis-prompts.md +702 -0
- package/skills/deep-research/references/completion-summary-template.md +66 -0
- package/skills/deep-research/references/persona-analogical.md +159 -0
- package/skills/deep-research/references/persona-archaeological.md +69 -0
- package/skills/deep-research/references/persona-contrarian.md +155 -0
- package/skills/deep-research/references/persona-futurist.md +70 -0
- package/skills/deep-research/references/persona-historical.md +142 -0
- package/skills/deep-research/references/persona-journalistic.md +69 -0
- package/skills/deep-research/references/persona-negative-space.md +70 -0
- package/skills/deep-research/references/persona-systems.md +69 -0
- package/skills/deep-research/references/synthesis-template.md +569 -0
- package/skills/deep-research/references/verification-log-template.md +32 -0
- package/skills/deep-research/scripts/check-prerequisites.sh +153 -0
- package/skills/deep-research/scripts/validate-research.sh +244 -0
- package/skills/feature-research/SKILL.md +292 -0
- package/skills/feature-research/scripts/validate-research.sh +159 -0
- package/skills/feature-research/scripts/validate-spec.sh +270 -0
- package/skills/feature-research/templates/research-agents.md +569 -0
- package/skills/feature-research/templates/spec-structure.md +437 -0
- package/skills/formatters/SKILL.md +207 -0
- package/skills/formatters/references/best-practices.md +78 -0
- package/skills/formatters/references/flag-reference.md +178 -0
- package/skills/formatters/references/stack-detection.md +119 -0
- package/skills/formatters/references/templates/husky-pre-commit.tmpl +13 -0
- package/skills/formatters/references/templates/justfile-snippet.just.tmpl +31 -0
- package/skills/formatters/references/templates/lefthook.yml.tmpl +22 -0
- package/skills/formatters/references/templates/lint-autofix.yml.tmpl +94 -0
- package/skills/formatters/references/templates/lint.yml.tmpl +85 -0
- package/skills/formatters/references/templates/makefile-snippet.mk.tmpl +34 -0
- package/skills/formatters/references/templates/package-json-scripts.json.tmpl +14 -0
- package/skills/formatters/references/templates/readme-section.md.tmpl +118 -0
- package/skills/formatters/scripts/apply-aliases.sh +245 -0
- package/skills/formatters/scripts/apply-ci.sh +136 -0
- package/skills/formatters/scripts/apply-docs.sh +187 -0
- package/skills/formatters/scripts/apply-hooks.sh +261 -0
- package/skills/formatters/scripts/bundle/format.sh +15 -0
- package/skills/formatters/scripts/bundle/go-tools.sh +119 -0
- package/skills/formatters/scripts/bundle/init-formatters.sh +517 -0
- package/skills/formatters/scripts/bundle/install-shellcheck.sh +85 -0
- package/skills/formatters/scripts/bundle/lib/excludes.sh +179 -0
- package/skills/formatters/scripts/bundle/lib/modified-files.sh +222 -0
- package/skills/formatters/scripts/bundle/lib/shellcheck-resolve.sh +81 -0
- package/skills/formatters/scripts/bundle/lib/shellcheck-version.sh +5 -0
- package/skills/formatters/scripts/bundle/lint.sh +15 -0
- package/skills/formatters/scripts/bundle/style.sh +1410 -0
- package/skills/formatters/scripts/bundle/templates/biome.json +81 -0
- package/skills/formatters/scripts/bundle/templates/clippy.toml +2 -0
- package/skills/formatters/scripts/bundle/templates/markdownlint.json +14 -0
- package/skills/formatters/scripts/bundle/templates/markdownlintignore +38 -0
- package/skills/formatters/scripts/bundle/templates/prettierignore +45 -0
- package/skills/formatters/scripts/bundle/templates/prettierrc.json +11 -0
- package/skills/formatters/scripts/bundle/templates/python-pyproject.toml +80 -0
- package/skills/formatters/scripts/bundle/templates/rustfmt.toml +41 -0
- package/skills/formatters/scripts/bundle/templates/tsconfig.json +21 -0
- package/skills/formatters/scripts/profile-style.sh +264 -0
- package/skills/frontend-design/SKILL.md +151 -0
- package/skills/frontend-patterns/SKILL.md +66 -0
- package/skills/frontend-patterns/references/animation.md +21 -0
- package/skills/frontend-patterns/references/components-and-state.md +40 -0
- package/skills/frontend-patterns/references/data-and-performance.md +34 -0
- package/skills/frontend-patterns/references/forms-errors-a11y.md +35 -0
- package/skills/git-cleanup/SKILL.md +286 -0
- package/skills/git-cleanup/references/active-code-rules.md +318 -0
- package/skills/git-cleanup/references/host-detection.md +217 -0
- package/skills/git-workflow/SKILL.md +130 -0
- package/skills/git-workflow/references/ci-monitoring-phase.md +130 -0
- package/skills/git-workflow/references/commit-phases.md +247 -0
- package/skills/git-workflow/references/examples-and-troubleshooting.md +47 -0
- package/skills/git-workflow/references/goal-pairing.md +23 -0
- package/skills/git-workflow/references/pr-creation.md +269 -0
- package/skills/git-workflow/scripts/analyze-changes.sh +266 -0
- package/skills/git-workflow/scripts/create-pr.sh +464 -0
- package/skills/git-workflow/scripts/validate-commit.sh +235 -0
- package/skills/git-workflow/templates/agent-prompts.md +518 -0
- package/skills/git-workflow/templates/commit-types.md +504 -0
- package/skills/git-workflow/templates/documentation-decision.md +509 -0
- package/skills/git-workflow/templates/pr-template.md +772 -0
- package/skills/go-patterns/SKILL.md +89 -0
- package/skills/go-patterns/references/design-and-tooling.md +336 -0
- package/skills/go-patterns/references/errors-and-concurrency.md +292 -0
- package/skills/go-testing/SKILL.md +133 -0
- package/skills/go-testing/references/advanced-testing.md +349 -0
- package/skills/go-testing/references/test-structure.md +277 -0
- package/skills/hooks-workflow/SKILL.md +232 -0
- package/skills/hooks-workflow/references/support-notes.md +134 -0
- package/skills/hooks-workflow/references/templates/claude-settings.json.tmpl +13 -0
- package/skills/hooks-workflow/references/templates/codex-config-fragment.toml.tmpl +9 -0
- package/skills/hooks-workflow/references/templates/cursor-rule-fragment.mdc.tmpl +16 -0
- package/skills/hooks-workflow/scripts/build-hook-config.sh +487 -0
- package/skills/hooks-workflow/scripts/verify-hooks.sh +257 -0
- package/skills/implement-plan/SKILL.md +221 -0
- package/skills/implement-plan/references/agent-task-prompt.md +214 -0
- package/skills/implement-plan/references/output-formats.md +150 -0
- package/skills/implement-plan/references/plan-inputs.md +126 -0
- package/skills/implement-plan/scripts/check-prerequisites.sh +78 -0
- package/skills/implement-plan/scripts/parse-dependencies.sh +206 -0
- package/skills/init/SKILL.md +272 -0
- package/skills/init/references/conventional-commits.md +114 -0
- package/skills/init/references/flag-reference.md +236 -0
- package/skills/init/references/label-taxonomy.md +115 -0
- package/skills/init/references/project-profile-heuristics.md +156 -0
- package/skills/init/references/template-library.md +129 -0
- package/skills/init/scripts/count-source-files.sh +60 -0
- package/skills/init/scripts/generate-agent-catalog.sh +193 -0
- package/skills/init/scripts/generate-mcp-catalog.sh +214 -0
- package/skills/init/scripts/migrate-rules.py +459 -0
- package/skills/init/scripts/migrate-rules.sh +26 -0
- package/skills/init/scripts/profile-project.sh +453 -0
- package/skills/init/scripts/render-template.py +226 -0
- package/skills/init/scripts/render-template.sh +25 -0
- package/skills/init/scripts/rules-report.sh +31 -0
- package/skills/init/scripts/rules_file_lib.py +41 -0
- package/skills/init/templates/AGENTS.md.tmpl +38 -0
- package/skills/init/templates/CLAUDE.md.tmpl +7 -0
- package/skills/init/templates/ai-rule.md.tmpl +3 -0
- package/skills/init/templates/cursor-rule.mdc.tmpl +7 -0
- package/skills/init/templates/git/commitlint.config.cjs.tmpl +40 -0
- package/skills/init/templates/git/gitignore.tmpl +120 -0
- package/skills/init/templates/git/gitmessage.tmpl +27 -0
- package/skills/init/templates/git/install-lefthook.sh.tmpl +131 -0
- package/skills/init/templates/git/lefthook-usage.md.tmpl +101 -0
- package/skills/init/templates/git/lefthook.yml.tmpl +64 -0
- package/skills/init/templates/github/bug_report.yml.tmpl +78 -0
- package/skills/init/templates/github/config.yml.tmpl +5 -0
- package/skills/init/templates/github/copilot-instructions.md.tmpl +24 -0
- package/skills/init/templates/github/docs_request.yml.tmpl +41 -0
- package/skills/init/templates/github/feature_request.yml.tmpl +59 -0
- package/skills/init/templates/github/labels.md.tmpl +75 -0
- package/skills/init/templates/github/pull_request_template.md.tmpl +66 -0
- package/skills/init/templates/github/workflows/pr-title-autofix.yml.tmpl +101 -0
- package/skills/init/templates/github/workflows/pr-title.yml.tmpl +55 -0
- package/skills/init/templates/workspace-report.md +83 -0
- package/skills/orchestrate/SKILL.md +165 -0
- package/skills/orchestrate/references/agent-catalog.md +601 -0
- package/skills/orchestrate/references/agent-prompts.md +495 -0
- package/skills/orchestrate/references/dispatch-playbook.md +333 -0
- package/skills/orchestrate/references/task-breakdown.md +410 -0
- package/skills/orchestrate/scripts/analyze-task.sh +139 -0
- package/skills/orchestrate/scripts/summarize-results.sh +160 -0
- package/skills/orchestrate/scripts/validate-agents.sh +92 -0
- package/skills/parallel-plan/SKILL.md +124 -0
- package/skills/plan/SKILL.md +134 -0
- package/skills/plan/references/enhanced-personas.md +131 -0
- package/skills/plan/references/personas-and-merge.md +77 -0
- package/skills/plan/references/plan-validation.md +65 -0
- package/skills/plan/references/planner-prompts.md +68 -0
- package/skills/plan/references/planning-tracks.md +73 -0
- package/skills/plan-workflow/SKILL.md +406 -0
- package/skills/plan-workflow/references/checkpoint-messages.md +370 -0
- package/skills/plan-workflow/references/plan-structure.md +238 -0
- package/skills/plan-workflow/references/planning-agents.md +511 -0
- package/skills/plan-workflow/references/research-agents-optimized.md +348 -0
- package/skills/plan-workflow/references/research-agents.md +436 -0
- package/skills/plan-workflow/references/shared-structure.md +152 -0
- package/skills/plan-workflow/references/validation-agents.md +363 -0
- package/skills/plan-workflow/scripts/check-prerequisites.sh +65 -0
- package/skills/plan-workflow/scripts/check-state.sh +190 -0
- package/skills/plan-workflow/scripts/persist-or-fail.sh +135 -0
- package/skills/plan-workflow/scripts/validate-analysis-artifacts.sh +216 -0
- package/skills/plan-workflow/scripts/validate-research-artifacts.sh +225 -0
- package/skills/plan-workflow/scripts/validate-shared.sh +229 -0
- package/skills/plan-workflow/scripts/validate-workflow-plan.sh +256 -0
- package/skills/pr-autofix/SKILL.md +307 -0
- package/skills/pr-autofix/references/ci-loop.md +64 -0
- package/skills/pr-autofix/references/comment-sources.md +197 -0
- package/skills/pr-autofix/references/data-shapes.md +87 -0
- package/skills/pr-autofix/references/goal-example.md +30 -0
- package/skills/pr-autofix/references/output-templates.md +162 -0
- package/skills/pr-autofix/references/prompt-injection-safety.md +165 -0
- package/skills/pr-autofix/references/related-skills.md +11 -0
- package/skills/pr-autofix/references/severity-mapping.md +146 -0
- package/skills/pr-autofix/scripts/fetch-pr-comments.sh +364 -0
- package/skills/pr-autofix/scripts/post-summary.sh +226 -0
- package/skills/pr-autofix/scripts/resolve-thread.sh +251 -0
- package/skills/prp-commit/SKILL.md +128 -0
- package/skills/prp-implement/SKILL.md +177 -0
- package/skills/prp-implement/references/agent-task-prompt.md +36 -0
- package/skills/prp-implement/references/detection.md +49 -0
- package/skills/prp-implement/references/dry-run.md +0 -0
- package/skills/prp-implement/references/report-output.md +204 -0
- package/skills/prp-implement/references/validation-and-failures.md +118 -0
- package/skills/prp-plan/SKILL.md +323 -0
- package/skills/prp-plan/references/enhanced-researchers.md +425 -0
- package/skills/prp-plan/references/parallel-additions.md +56 -0
- package/skills/prp-plan/references/plan-template.md +264 -0
- package/skills/prp-plan/references/synthesis-map.md +25 -0
- package/skills/prp-plan/scripts/preflight-enhanced-agents.sh +111 -0
- package/skills/prp-plan/scripts/validate-prp-plan.sh +368 -0
- package/skills/prp-pr/SKILL.md +402 -0
- package/skills/prp-prd/SKILL.md +442 -0
- package/skills/prp-spec/SKILL.md +274 -0
- package/skills/python-patterns/SKILL.md +103 -0
- package/skills/python-patterns/references/core-idioms.md +304 -0
- package/skills/python-patterns/references/design-and-tooling.md +407 -0
- package/skills/python-testing/SKILL.md +114 -0
- package/skills/python-testing/references/mocking-and-integration.md +395 -0
- package/skills/python-testing/references/pytest-core.md +366 -0
- package/skills/quick-fix/SKILL.md +246 -0
- package/skills/quick-review/SKILL.md +304 -0
- package/skills/release-model/SKILL.md +231 -0
- package/skills/release-model/references/pointer-and-labels.md +83 -0
- package/skills/release-model/references/signals-and-proposal.md +68 -0
- package/skills/release-model/references/template-placeholders.md +42 -0
- package/skills/release-model/references/upgrade-and-audit.md +131 -0
- package/skills/release-model/scripts/collect-signals.sh +459 -0
- package/skills/release-model/scripts/pointer-targets.sh +29 -0
- package/skills/release-model/templates/RELEASING.md.tmpl +151 -0
- package/skills/releaser/SKILL.md +251 -0
- package/skills/releaser/references/ci-optimization-checklist.md +149 -0
- package/skills/releaser/references/ci-templates/docker-release.yml +88 -0
- package/skills/releaser/references/ci-templates/generic-release.yml +69 -0
- package/skills/releaser/references/ci-templates/go-release.yml +50 -0
- package/skills/releaser/references/ci-templates/node-release.yml +126 -0
- package/skills/releaser/references/ci-templates/python-release.yml +95 -0
- package/skills/releaser/references/ci-templates/rust-release.yml +128 -0
- package/skills/releaser/references/ci-workflow-modes.md +42 -0
- package/skills/releaser/references/goal-pairing.md +37 -0
- package/skills/releaser/references/output-templates.md +143 -0
- package/skills/releaser/references/project-type-matrix.md +144 -0
- package/skills/releaser/references/release-branches.md +138 -0
- package/skills/releaser/references/release-ci-loop.md +249 -0
- package/skills/releaser/references/release-notes-template.md +42 -0
- package/skills/releaser/references/release-preparation.md +210 -0
- package/skills/releaser/scripts/check-release-branch.sh +235 -0
- package/skills/releaser/scripts/detect-project.sh +234 -0
- package/skills/releaser/scripts/draft-changelog.sh +387 -0
- package/skills/releaser/scripts/publish-release.sh +302 -0
- package/skills/research-to-issues/SKILL.md +285 -0
- package/skills/research-to-issues/references/label-taxonomy.md +48 -0
- package/skills/research-to-issues/references/parse-deep-research.md +86 -0
- package/skills/research-to-issues/references/parse-feature-spec.md +143 -0
- package/skills/research-to-issues/references/parse-parallel-plan.md +124 -0
- package/skills/research-to-issues/references/parse-prd.md +184 -0
- package/skills/research-to-issues/references/parse-prp-plan.md +237 -0
- package/skills/research-to-issues/references/plan-display-format.md +136 -0
- package/skills/research-to-issues/scripts/validate-prerequisites.sh +312 -0
- package/skills/research-to-issues/templates/feature-issue.md +131 -0
- package/skills/research-to-issues/templates/task-issue.md +104 -0
- package/skills/research-to-issues/templates/tracking-issue.md +126 -0
- package/skills/resume-session/SKILL.md +152 -0
- package/skills/review-fix/SKILL.md +229 -0
- package/skills/review-fix/references/fix-report.md +121 -0
- package/skills/review-fix/references/fixer-dispatch.md +79 -0
- package/skills/review-fix/references/plan.md +119 -0
- package/skills/rust-patterns/SKILL.md +85 -0
- package/skills/rust-patterns/references/concurrency-unsafe-modules.md +243 -0
- package/skills/rust-patterns/references/ownership-errors-types.md +262 -0
- package/skills/rust-testing/SKILL.md +99 -0
- package/skills/rust-testing/references/advanced-testing.md +247 -0
- package/skills/rust-testing/references/unit-and-integration.md +193 -0
- package/skills/save-session/SKILL.md +159 -0
- package/skills/shared-context/SKILL.md +101 -0
- package/skills/ts-patterns/SKILL.md +159 -0
- package/skills/ts-patterns/references/async-runtimes-tooling.md +375 -0
- package/skills/ts-patterns/references/types-errors-modules.md +336 -0
- package/skills/ts-testing/SKILL.md +151 -0
- package/skills/ts-testing/references/advanced-testing.md +350 -0
- package/skills/ts-testing/references/vitest-core.md +318 -0
- package/skills/visual-plan/SKILL.md +221 -0
- package/skills/visual-plan/references/canvas.md +132 -0
- package/skills/visual-plan/references/document-quality.md +178 -0
- package/skills/visual-plan/references/exemplar.md +120 -0
- package/skills/visual-plan/references/wireframe.md +212 -0
- package/skills/visual-plan/scripts/derive-visual-dir.sh +77 -0
- package/skills/visual-recap/SKILL.md +238 -0
- package/skills/visual-recap/references/wireframe.md +237 -0
- package/skills/write-docs/SKILL.md +354 -0
- package/skills/write-docs/scripts/audit-documentation.sh +190 -0
- package/skills/write-docs/scripts/generate-doc-index.sh +125 -0
- package/skills/write-docs/scripts/verify-links.sh +81 -0
- package/skills/write-docs/templates/docs-readme.md +34 -0
- package/skills/write-docs/templates/documentation-strategy.md +91 -0
|
@@ -0,0 +1,150 @@
|
|
|
1
|
+
# Parallel Plan Output Formats
|
|
2
|
+
|
|
3
|
+
## Contents
|
|
4
|
+
|
|
5
|
+
- Dry-run formats
|
|
6
|
+
- Completion summary
|
|
7
|
+
- Goal pairing
|
|
8
|
+
|
|
9
|
+
## Dry-run formats
|
|
10
|
+
|
|
11
|
+
If `--dry-run` is present:
|
|
12
|
+
|
|
13
|
+
|
|
14
|
+
```markdown
|
|
15
|
+
# Dry Run: Implementation Plan for [feature-name]
|
|
16
|
+
|
|
17
|
+
## Execution Batches
|
|
18
|
+
|
|
19
|
+
### Batch 1 (Independent Tasks)
|
|
20
|
+
|
|
21
|
+
- Task 1.1: [Title]
|
|
22
|
+
- Task 1.3: [Title]
|
|
23
|
+
- Task 2.2: [Title]
|
|
24
|
+
|
|
25
|
+
### Batch 2 (After Batch 1)
|
|
26
|
+
|
|
27
|
+
- Task 1.2: [Title] (depends on 1.1)
|
|
28
|
+
- Task 2.1: [Title] (depends on 1.1, 1.2)
|
|
29
|
+
|
|
30
|
+
### Batch 3 (After Batch 2)
|
|
31
|
+
|
|
32
|
+
- Task 2.3: [Title] (depends on 2.1, 2.2)
|
|
33
|
+
- Task 3.1: [Title] (depends on 2.1)
|
|
34
|
+
|
|
35
|
+
## Summary
|
|
36
|
+
|
|
37
|
+
- Total Tasks: [count]
|
|
38
|
+
- Total Batches: [count]
|
|
39
|
+
- Max Parallelism: [largest batch size]
|
|
40
|
+
|
|
41
|
+
## Next Steps
|
|
42
|
+
|
|
43
|
+
Remove --dry-run flag to execute the plan.
|
|
44
|
+
```
|
|
45
|
+
|
|
46
|
+
## Completion summary
|
|
47
|
+
|
|
48
|
+
Provide completion summary:
|
|
49
|
+
|
|
50
|
+
```markdown
|
|
51
|
+
# Implementation Complete
|
|
52
|
+
|
|
53
|
+
## Feature
|
|
54
|
+
|
|
55
|
+
[feature-name]
|
|
56
|
+
|
|
57
|
+
## Execution Mode
|
|
58
|
+
|
|
59
|
+
[Standalone sub-agents]
|
|
60
|
+
|
|
61
|
+
## Execution Summary
|
|
62
|
+
|
|
63
|
+
- **Total Tasks**: [count]
|
|
64
|
+
- **Completed**: [count]
|
|
65
|
+
- **Failed**: [count]
|
|
66
|
+
- **Batches Executed**: [count]
|
|
67
|
+
|
|
68
|
+
## Files Changed
|
|
69
|
+
|
|
70
|
+
### Created
|
|
71
|
+
|
|
72
|
+
- /path/to/new/file.ext
|
|
73
|
+
- /path/to/another/file.ext
|
|
74
|
+
|
|
75
|
+
### Modified
|
|
76
|
+
|
|
77
|
+
- /path/to/existing/file.ext
|
|
78
|
+
- /path/to/another/existing/file.ext
|
|
79
|
+
|
|
80
|
+
## Task Results
|
|
81
|
+
|
|
82
|
+
### Batch 1
|
|
83
|
+
|
|
84
|
+
- [x] Task 1.1: [Title] - Success
|
|
85
|
+
- [x] Task 1.3: [Title] - Success
|
|
86
|
+
|
|
87
|
+
### Batch 2
|
|
88
|
+
|
|
89
|
+
- [x] Task 1.2: [Title] - Success
|
|
90
|
+
- [x] Task 2.1: [Title] - Success
|
|
91
|
+
|
|
92
|
+
## Issues Encountered
|
|
93
|
+
|
|
94
|
+
[List any problems or warnings]
|
|
95
|
+
|
|
96
|
+
## Worktree Status ← include this section only when WORKTREE_ACTIVE=true
|
|
97
|
+
|
|
98
|
+
[Output of list-worktrees.sh]
|
|
99
|
+
|
|
100
|
+
> The parent worktree at `<repo-root>/.opencode/worktrees/[repo]-[feature]/` survives for inspection
|
|
101
|
+
> and PR creation. When you are done, run:
|
|
102
|
+
>
|
|
103
|
+
> git worktree remove <repo-root>/.opencode/worktrees/[repo]-[feature]/
|
|
104
|
+
> git branch -d feat/[feature]
|
|
105
|
+
|
|
106
|
+
## Next Steps
|
|
107
|
+
|
|
108
|
+
1. Review the changes in your editor
|
|
109
|
+
2. Run tests to verify functionality
|
|
110
|
+
3. Commit the changes when satisfied
|
|
111
|
+
4. **Optional**: Generate implementation report:
|
|
112
|
+
|
|
113
|
+
/ycc:code-report [feature-name]
|
|
114
|
+
|
|
115
|
+
## Goal Signals (machine-readable — printed verbatim for /goal)
|
|
116
|
+
|
|
117
|
+
ALL_BATCHES_DONE: PASS
|
|
118
|
+
FILES_CHANGED_NONEMPTY: PASS
|
|
119
|
+
LINT_PASS: PASS
|
|
120
|
+
```
|
|
121
|
+
|
|
122
|
+
Print every signal verbatim as the last lines of the completion summary. Use `PASS` only
|
|
123
|
+
when the matching criterion in `## Success Criteria` is met; otherwise `FAIL` (for example
|
|
124
|
+
`FILES_CHANGED_NONEMPTY: FAIL` when the "Files Changed" section enumerated no files).
|
|
125
|
+
|
|
126
|
+
## Goal pairing
|
|
127
|
+
|
|
128
|
+
Pair this skill with the `/goal` session directive to loop the batch executor to completion
|
|
129
|
+
without re-prompting between batches or after the lint pass. Supply an explicit done
|
|
130
|
+
condition that references the Phase 4 Step 10 Goal Signals block rather than file paths.
|
|
131
|
+
|
|
132
|
+
Recommended condition template:
|
|
133
|
+
|
|
134
|
+
```
|
|
135
|
+
/goal Execute the parallel plan at docs/plans/<feature>/parallel-plan.md using the
|
|
136
|
+
implement-plan workflow, continuing through every batch and the Phase 4 lint pass
|
|
137
|
+
without returning control to me. Done when the transcript shows the Phase 4
|
|
138
|
+
"# Implementation Complete" output followed by all three Goal Signals printed verbatim —
|
|
139
|
+
ALL_BATCHES_DONE: PASS, FILES_CHANGED_NONEMPTY: PASS, LINT_PASS: PASS. If any signal prints
|
|
140
|
+
FAIL, keep fixing and re-running until all three are PASS. Stop after 25 turns if not
|
|
141
|
+
achieved.
|
|
142
|
+
```
|
|
143
|
+
|
|
144
|
+
The transcript-output contract and shared caveats (worktree cwd, interactive failure
|
|
145
|
+
prompts, platform availability) live in the shared reference — read it before relying on a
|
|
146
|
+
`/goal` loop:
|
|
147
|
+
|
|
148
|
+
```
|
|
149
|
+
{{package-root}}/shared/references/goal-pairing.md
|
|
150
|
+
```
|
|
@@ -0,0 +1,126 @@
|
|
|
1
|
+
# Parallel Plan Inputs
|
|
2
|
+
|
|
3
|
+
## Contents
|
|
4
|
+
|
|
5
|
+
- Usage block
|
|
6
|
+
- Task parser output
|
|
7
|
+
- Dependency graph
|
|
8
|
+
- Task list format
|
|
9
|
+
- Monorepo Support
|
|
10
|
+
|
|
11
|
+
## Usage block
|
|
12
|
+
|
|
13
|
+
Print when no feature name remains after stripping flags:
|
|
14
|
+
|
|
15
|
+
```
|
|
16
|
+
Usage: /ycc:implement-plan [--dry-run] [--worktree] [--no-worktree] <feature-name>
|
|
17
|
+
|
|
18
|
+
Examples:
|
|
19
|
+
/ycc:implement-plan user-authentication
|
|
20
|
+
# default: create/reuse one feature worktree on feat/user-authentication
|
|
21
|
+
|
|
22
|
+
# agent-team dispatch (worktree still on by default)
|
|
23
|
+
|
|
24
|
+
/ycc:implement-plan --dry-run payment-integration
|
|
25
|
+
|
|
26
|
+
/ycc:implement-plan --no-worktree my-feature
|
|
27
|
+
# opt out of worktree isolation; create/use feat/my-feature in the current checkout
|
|
28
|
+
|
|
29
|
+
# agent-team dispatch on the current-checkout feature branch
|
|
30
|
+
```
|
|
31
|
+
|
|
32
|
+
## Task parser output
|
|
33
|
+
|
|
34
|
+
`parse-dependencies.sh` emits optional header lines followed by per-task rows.
|
|
35
|
+
|
|
36
|
+
Header lines (only when the plan has a `## Worktree Setup` section):
|
|
37
|
+
|
|
38
|
+
- `WT_PARENT_PATH=<path>` — parent worktree path
|
|
39
|
+
- `WT_FEATURE_SLUG=<slug>` — the `<repo>-<feature>` directory suffix; split on `-` to get the feature component
|
|
40
|
+
|
|
41
|
+
Per-task rows (`TASK_ID|TASK_TITLE|DEPENDENCIES`):
|
|
42
|
+
|
|
43
|
+
- **Task ID**: e.g., 1.1, 2.3, 3.1 (or T0, T1, T2)
|
|
44
|
+
- **Task Title**: descriptive name
|
|
45
|
+
- **Dependencies**: list from `Depends on [...]` or `- **Dependencies**: ...`
|
|
46
|
+
- **Files to Read**: from "READ THESE BEFORE TASK" (parsed from the plan markdown directly)
|
|
47
|
+
- **Files to Create**: from "Files to Create"
|
|
48
|
+
- **Files to Modify**: from "Files to Modify"
|
|
49
|
+
- **Instructions**: implementation details
|
|
50
|
+
|
|
51
|
+
## Dependency graph
|
|
52
|
+
|
|
53
|
+
```
|
|
54
|
+
Independent Tasks (Depends on [none]):
|
|
55
|
+
- Task 1.1
|
|
56
|
+
- Task 1.3
|
|
57
|
+
- Task 2.2
|
|
58
|
+
|
|
59
|
+
Dependent Tasks:
|
|
60
|
+
- Task 1.2 → depends on [1.1]
|
|
61
|
+
- Task 2.1 → depends on [1.1, 1.2]
|
|
62
|
+
- Task 2.3 → depends on [2.1, 2.2]
|
|
63
|
+
- Task 3.1 → depends on [2.1]
|
|
64
|
+
```
|
|
65
|
+
|
|
66
|
+
Keep this graph available for both Path A (ordering) and Path B (`addBlockedBy` wiring).
|
|
67
|
+
|
|
68
|
+
## Task list format
|
|
69
|
+
|
|
70
|
+
Register one item per task with `track the task`:
|
|
71
|
+
|
|
72
|
+
- `subject`: "[Task ID] [Task Title]"
|
|
73
|
+
- `description`: full task specification, including dependency labels
|
|
74
|
+
- Capture each returned task ID (do not assign your own tool ID).
|
|
75
|
+
- Wire dependencies with `update the todo tracker(taskId="<returned-id>", addBlockedBy=["<dependency-id>"])`.
|
|
76
|
+
- Set status via `update the todo tracker`; inspect progress with `the todo tracker` or `the task details`.
|
|
77
|
+
|
|
78
|
+
```
|
|
79
|
+
track the task: subject="1.1 Create user model", description="<full spec>; depends on none"
|
|
80
|
+
track the task: subject="1.2 Add validation", description="<full spec>; depends on 1.1"
|
|
81
|
+
update the todo tracker: taskId="<1.2 returned ID>", addBlockedBy=["<1.1 returned ID>"]
|
|
82
|
+
```
|
|
83
|
+
|
|
84
|
+
## Monorepo Support
|
|
85
|
+
|
|
86
|
+
The skill detects and uses the correct plans directory in monorepo setups.
|
|
87
|
+
|
|
88
|
+
Default behavior:
|
|
89
|
+
|
|
90
|
+
- Plans are read from the git repository root in `docs/plans/`.
|
|
91
|
+
- Running the skill from any subdirectory (e.g., `packages/app1/`) still reads plans from the root.
|
|
92
|
+
|
|
93
|
+
Configuration — create a `.plans-config` file:
|
|
94
|
+
|
|
95
|
+
Repository root (centralized plans):
|
|
96
|
+
|
|
97
|
+
```yaml
|
|
98
|
+
# .plans-config at repo root
|
|
99
|
+
plans_dir: docs/plans
|
|
100
|
+
```
|
|
101
|
+
|
|
102
|
+
Package-level plans (optional):
|
|
103
|
+
|
|
104
|
+
```yaml
|
|
105
|
+
# .plans-config in packages/app1/
|
|
106
|
+
plans_dir: docs/plans
|
|
107
|
+
scope: local
|
|
108
|
+
```
|
|
109
|
+
|
|
110
|
+
With `scope: local`, plans are read from the local `docs/plans/` instead of the root.
|
|
111
|
+
|
|
112
|
+
Example monorepo structure:
|
|
113
|
+
|
|
114
|
+
```
|
|
115
|
+
monorepo/
|
|
116
|
+
.plans-config # plans_dir: docs/plans
|
|
117
|
+
docs/plans/ # Centralized plans (default)
|
|
118
|
+
feature-a/
|
|
119
|
+
shared.md
|
|
120
|
+
parallel-plan.md # Read by this skill
|
|
121
|
+
packages/
|
|
122
|
+
app1/
|
|
123
|
+
app2/
|
|
124
|
+
```
|
|
125
|
+
|
|
126
|
+
Running `/ycc:implement-plan feature-a` from anywhere executes `monorepo/docs/plans/feature-a/parallel-plan.md`.
|
|
@@ -0,0 +1,78 @@
|
|
|
1
|
+
#!/usr/bin/env bash
|
|
2
|
+
# Check that required planning documents exist for implementation
|
|
3
|
+
# Usage: check-prerequisites.sh <feature-name>
|
|
4
|
+
#
|
|
5
|
+
# Supports monorepo configurations via .plans-config file.
|
|
6
|
+
# See resolve-plans-dir.sh for configuration options.
|
|
7
|
+
|
|
8
|
+
set -euo pipefail
|
|
9
|
+
|
|
10
|
+
FEATURE_NAME="${1:-}"
|
|
11
|
+
|
|
12
|
+
# Source the shared resolver to get PLANS_DIR
|
|
13
|
+
SCRIPT_DIR="$(cd "$(dirname "${BASH_SOURCE[0]}")" && pwd)"
|
|
14
|
+
SHARED_DIR="${SCRIPT_DIR}/../../../shared/scripts"
|
|
15
|
+
|
|
16
|
+
if [[ -f "${SHARED_DIR}/resolve-plans-dir.sh" ]]; then
|
|
17
|
+
# shellcheck source=../../../shared/scripts/resolve-plans-dir.sh
|
|
18
|
+
source "${SHARED_DIR}/resolve-plans-dir.sh"
|
|
19
|
+
else
|
|
20
|
+
# Fallback if shared resolver not found
|
|
21
|
+
echo "WARNING: resolve-plans-dir.sh not found, using default path" >&2
|
|
22
|
+
PLANS_DIR="docs/plans"
|
|
23
|
+
fi
|
|
24
|
+
|
|
25
|
+
PLAN_DIR="${PLANS_DIR}/${FEATURE_NAME}"
|
|
26
|
+
|
|
27
|
+
if [[ -z "$FEATURE_NAME" ]]; then
|
|
28
|
+
echo "ERROR: Feature name required"
|
|
29
|
+
echo "Usage: check-prerequisites.sh <feature-name>"
|
|
30
|
+
exit 1
|
|
31
|
+
fi
|
|
32
|
+
|
|
33
|
+
if [[ ! -d "$PLAN_DIR" ]]; then
|
|
34
|
+
echo "ERROR: Plan directory not found: $PLAN_DIR"
|
|
35
|
+
echo ""
|
|
36
|
+
echo "Create the planning documents first:"
|
|
37
|
+
echo " 1. Run /shared-context ${FEATURE_NAME}"
|
|
38
|
+
echo " 2. Run /parallel-plan ${FEATURE_NAME}"
|
|
39
|
+
exit 1
|
|
40
|
+
fi
|
|
41
|
+
|
|
42
|
+
if [[ ! -f "${PLAN_DIR}/parallel-plan.md" ]]; then
|
|
43
|
+
echo "ERROR: ${PLAN_DIR}/parallel-plan.md not found"
|
|
44
|
+
echo ""
|
|
45
|
+
echo "The implementation requires a parallel plan to be created first."
|
|
46
|
+
echo "Run: /parallel-plan ${FEATURE_NAME}"
|
|
47
|
+
echo ""
|
|
48
|
+
echo "This will create parallel-plan.md with detailed implementation tasks."
|
|
49
|
+
exit 1
|
|
50
|
+
fi
|
|
51
|
+
|
|
52
|
+
if [[ ! -f "${PLAN_DIR}/shared.md" ]]; then
|
|
53
|
+
echo "WARNING: ${PLAN_DIR}/shared.md not found"
|
|
54
|
+
echo "The shared context document is recommended for implementation."
|
|
55
|
+
echo "Consider running /shared-context ${FEATURE_NAME} first."
|
|
56
|
+
echo ""
|
|
57
|
+
fi
|
|
58
|
+
|
|
59
|
+
echo "Prerequisites satisfied"
|
|
60
|
+
echo " Found: ${PLAN_DIR}/parallel-plan.md"
|
|
61
|
+
|
|
62
|
+
if [[ -f "${PLAN_DIR}/shared.md" ]]; then
|
|
63
|
+
echo " Found: ${PLAN_DIR}/shared.md"
|
|
64
|
+
fi
|
|
65
|
+
|
|
66
|
+
# Count tasks in the plan
|
|
67
|
+
TASK_COUNT=$(grep -c "^#### Task" "${PLAN_DIR}/parallel-plan.md" 2>/dev/null || echo "0")
|
|
68
|
+
echo " Tasks in plan: ${TASK_COUNT}"
|
|
69
|
+
|
|
70
|
+
# Count phases
|
|
71
|
+
PHASE_COUNT=$(grep -cE "^### (Phase|Batch)" "${PLAN_DIR}/parallel-plan.md" 2>/dev/null || echo "0")
|
|
72
|
+
echo " Phases/Batches in plan: ${PHASE_COUNT}"
|
|
73
|
+
|
|
74
|
+
# Count independent tasks
|
|
75
|
+
INDEPENDENT_COUNT=$(grep -cE "(Depends on \[none\]|\*\*Dependencies\*\*: *[Nn]one)" "${PLAN_DIR}/parallel-plan.md" 2>/dev/null || echo "0")
|
|
76
|
+
echo " Independent tasks: ${INDEPENDENT_COUNT}"
|
|
77
|
+
|
|
78
|
+
exit 0
|
|
@@ -0,0 +1,206 @@
|
|
|
1
|
+
#!/usr/bin/env bash
|
|
2
|
+
# Parse parallel-plan.md and extract task dependencies.
|
|
3
|
+
# Usage: parse-dependencies.sh <path-to-parallel-plan.md>
|
|
4
|
+
#
|
|
5
|
+
# Output format (one task per line):
|
|
6
|
+
# TASK_ID|TASK_TITLE|DEPENDENCIES
|
|
7
|
+
#
|
|
8
|
+
# Under the single-worktree contract (GitHub #79 Phase 2), per-task
|
|
9
|
+
# **Worktree**: annotations are no longer emitted by planners. The fourth
|
|
10
|
+
# pipe field (WORKTREE_PATH) has been removed.
|
|
11
|
+
#
|
|
12
|
+
# Additionally, two header lines are emitted BEFORE the task rows when a
|
|
13
|
+
# "## Worktree Setup" section is detected in the plan (only **Parent** is required
|
|
14
|
+
# for the single-worktree contract; a **Children** list is not required):
|
|
15
|
+
# WT_PARENT_PATH=<path>
|
|
16
|
+
# WT_FEATURE_SLUG=<slug>
|
|
17
|
+
#
|
|
18
|
+
# When no "## Worktree Setup" section is present, neither header line is emitted
|
|
19
|
+
# (back-compat: the output is identical to the pre-worktree format).
|
|
20
|
+
#
|
|
21
|
+
# Supports two task ID formats:
|
|
22
|
+
# Format A (decimal): #### Task 1.1: Title Depends on [none]
|
|
23
|
+
# Format B (T-prefix): #### Task T0: Title
|
|
24
|
+
# - **Dependencies**: None
|
|
25
|
+
#
|
|
26
|
+
# Examples (no ## Worktree Setup section):
|
|
27
|
+
# 1.1|Create user model|none
|
|
28
|
+
# T0|Create user model|none
|
|
29
|
+
# T1|Add validation|T0
|
|
30
|
+
# 2.1|Setup routes|1.1,1.2
|
|
31
|
+
#
|
|
32
|
+
# Examples (with ## Worktree Setup section):
|
|
33
|
+
# WT_PARENT_PATH=<repo-root>/.opencode/worktrees/myrepo-my-feature/
|
|
34
|
+
# WT_FEATURE_SLUG=myrepo-my-feature
|
|
35
|
+
# 1.1|Create user model|none
|
|
36
|
+
# 1.2|Add validation|none
|
|
37
|
+
#
|
|
38
|
+
# Supports monorepo configurations via .plans-config file.
|
|
39
|
+
# See resolve-plans-dir.sh for configuration options.
|
|
40
|
+
|
|
41
|
+
set -euo pipefail
|
|
42
|
+
|
|
43
|
+
PLAN_FILE="${1:-}"
|
|
44
|
+
|
|
45
|
+
# Source the shared resolver for consistency
|
|
46
|
+
SCRIPT_DIR="$(cd "$(dirname "${BASH_SOURCE[0]}")" && pwd)"
|
|
47
|
+
SHARED_DIR="${SCRIPT_DIR}/../../../shared/scripts"
|
|
48
|
+
|
|
49
|
+
if [[ -f "${SHARED_DIR}/resolve-plans-dir.sh" ]]; then
|
|
50
|
+
# shellcheck source=../../../shared/scripts/resolve-plans-dir.sh
|
|
51
|
+
source "${SHARED_DIR}/resolve-plans-dir.sh" 2>/dev/null || true
|
|
52
|
+
fi
|
|
53
|
+
|
|
54
|
+
if [[ -z "$PLAN_FILE" ]]; then
|
|
55
|
+
echo "Usage: parse-dependencies.sh <path-to-parallel-plan.md>" >&2
|
|
56
|
+
exit 1
|
|
57
|
+
fi
|
|
58
|
+
|
|
59
|
+
if [[ ! -f "$PLAN_FILE" ]]; then
|
|
60
|
+
echo "ERROR: File not found: $PLAN_FILE" >&2
|
|
61
|
+
exit 1
|
|
62
|
+
fi
|
|
63
|
+
|
|
64
|
+
# ─────────────────────────────────────────────────────────────────────────────
|
|
65
|
+
# Pass 1 — Extract optional ## Worktree Setup header (parent path + slug).
|
|
66
|
+
# Emits WT_PARENT_PATH= and WT_FEATURE_SLUG= lines when the section is present.
|
|
67
|
+
# ─────────────────────────────────────────────────────────────────────────────
|
|
68
|
+
awk '
|
|
69
|
+
/^## Worktree Setup/ { in_wt_setup = 1; next }
|
|
70
|
+
# Stop at the next ## heading
|
|
71
|
+
in_wt_setup && /^## / { in_wt_setup = 0; next }
|
|
72
|
+
# Match: - **Parent**: <repo-root>/.opencode/worktrees/<repo>-<feature>/ (branch: ...)
|
|
73
|
+
in_wt_setup && /^\- \*\*Parent\*\*:/ {
|
|
74
|
+
line = $0
|
|
75
|
+
sub(/.*\*\*Parent\*\*: */, "", line)
|
|
76
|
+
# Strip trailing " (branch: ...)" annotation if present
|
|
77
|
+
sub(/ *(branch:.*|\(branch:.*)?$/, "", line)
|
|
78
|
+
gsub(/^[[:space:]]+|[[:space:]]+$/, "", line)
|
|
79
|
+
parent_path = line
|
|
80
|
+
# Derive feature slug from the last path component, stripping trailing slash
|
|
81
|
+
slug = parent_path
|
|
82
|
+
gsub(/\/$/, "", slug)
|
|
83
|
+
n = split(slug, parts, "/")
|
|
84
|
+
slug = parts[n]
|
|
85
|
+
# Strip leading "<repo>-" prefix: everything up to and including the first "-"
|
|
86
|
+
# The convention is <repo>-<feature>; we want just <feature>.
|
|
87
|
+
# Use the last component directly as the slug — callers can derive repo separately.
|
|
88
|
+
print "WT_PARENT_PATH=" parent_path
|
|
89
|
+
print "WT_FEATURE_SLUG=" slug
|
|
90
|
+
found = 1
|
|
91
|
+
}
|
|
92
|
+
' "$PLAN_FILE"
|
|
93
|
+
|
|
94
|
+
# ─────────────────────────────────────────────────────────────────────────────
|
|
95
|
+
# Pass 2 — Extract tasks and their dependencies using a state machine.
|
|
96
|
+
# Handles both inline deps (Format A) and multi-line deps (Format B).
|
|
97
|
+
#
|
|
98
|
+
# State machine:
|
|
99
|
+
# - On task header: flush any pending task, start new pending task
|
|
100
|
+
# - On dependency line: attach deps to pending task, flush
|
|
101
|
+
# - On EOF: flush any remaining pending task
|
|
102
|
+
# ─────────────────────────────────────────────────────────────────────────────
|
|
103
|
+
awk '
|
|
104
|
+
function flush_pending() {
|
|
105
|
+
if (pending_id != "") {
|
|
106
|
+
# Normalize "None" -> "none" (case-insensitive)
|
|
107
|
+
if (tolower(pending_deps) == "none" || pending_deps == "") {
|
|
108
|
+
pending_deps = "none"
|
|
109
|
+
}
|
|
110
|
+
gsub(/, */, ",", pending_deps)
|
|
111
|
+
gsub(/ /, "", pending_deps)
|
|
112
|
+
print pending_id "|" pending_title "|" pending_deps
|
|
113
|
+
pending_id = ""
|
|
114
|
+
pending_title = ""
|
|
115
|
+
pending_deps = ""
|
|
116
|
+
}
|
|
117
|
+
}
|
|
118
|
+
|
|
119
|
+
BEGIN {
|
|
120
|
+
pending_id = ""
|
|
121
|
+
pending_title = ""
|
|
122
|
+
pending_deps = ""
|
|
123
|
+
}
|
|
124
|
+
|
|
125
|
+
/^#### Task ([0-9]+\.[0-9]+|T[0-9]+):/ {
|
|
126
|
+
# Flush any previous pending task (had no inline or multi-line deps)
|
|
127
|
+
flush_pending()
|
|
128
|
+
|
|
129
|
+
line = $0
|
|
130
|
+
|
|
131
|
+
# Extract task ID
|
|
132
|
+
task_id = line
|
|
133
|
+
task_pos = index(task_id, "Task ")
|
|
134
|
+
if (task_pos > 0) {
|
|
135
|
+
task_id = substr(task_id, task_pos + 5)
|
|
136
|
+
colon_pos = index(task_id, ":")
|
|
137
|
+
if (colon_pos > 0) {
|
|
138
|
+
task_id = substr(task_id, 1, colon_pos - 1)
|
|
139
|
+
}
|
|
140
|
+
}
|
|
141
|
+
gsub(/[[:space:]]/, "", task_id)
|
|
142
|
+
|
|
143
|
+
# Extract title (between "Task ID: " and either "Depends on" or end of line)
|
|
144
|
+
title = line
|
|
145
|
+
sub(".*Task " task_id ": *", "", title)
|
|
146
|
+
gsub(/ Depends on.*/, "", title)
|
|
147
|
+
# Trim whitespace
|
|
148
|
+
gsub(/^[[:space:]]+|[[:space:]]+$/, "", title)
|
|
149
|
+
|
|
150
|
+
# Check for inline dependencies (Format A)
|
|
151
|
+
deps = "none"
|
|
152
|
+
depends_pos = index(line, "Depends on [")
|
|
153
|
+
if (depends_pos > 0) {
|
|
154
|
+
deps = substr(line, depends_pos + 12)
|
|
155
|
+
bracket_pos = index(deps, "]")
|
|
156
|
+
if (bracket_pos > 0) {
|
|
157
|
+
deps = substr(deps, 1, bracket_pos - 1)
|
|
158
|
+
}
|
|
159
|
+
if (deps == "") deps = "none"
|
|
160
|
+
# Inline deps found — flush immediately via next task header or EOF
|
|
161
|
+
gsub(/, */, ",", deps)
|
|
162
|
+
if (tolower(deps) == "none") deps = "none"
|
|
163
|
+
pending_id = task_id
|
|
164
|
+
pending_title = title
|
|
165
|
+
pending_deps = deps
|
|
166
|
+
next
|
|
167
|
+
}
|
|
168
|
+
|
|
169
|
+
# No inline deps — store as pending for multi-line resolution
|
|
170
|
+
pending_id = task_id
|
|
171
|
+
pending_title = title
|
|
172
|
+
pending_deps = ""
|
|
173
|
+
next
|
|
174
|
+
}
|
|
175
|
+
|
|
176
|
+
# Multi-line dependency pattern: - **Dependencies**: T0, T1
|
|
177
|
+
pending_id != "" && /^- \*\*Dependencies\*\*:/ {
|
|
178
|
+
dep_line = $0
|
|
179
|
+
sub(/.*\*\*Dependencies\*\*: */, "", dep_line)
|
|
180
|
+
gsub(/^[[:space:]]+|[[:space:]]+$/, "", dep_line)
|
|
181
|
+
pending_deps = dep_line
|
|
182
|
+
# Flush now — deps are the last field in the new contract
|
|
183
|
+
flush_pending()
|
|
184
|
+
next
|
|
185
|
+
}
|
|
186
|
+
|
|
187
|
+
# Next task header will flush the previous pending — but if a task with
|
|
188
|
+
# multi-line deps has no following header we flush in flush_pending() at EOF.
|
|
189
|
+
# Also flush when we see a new top-level heading that is NOT a task header.
|
|
190
|
+
/^## / || /^### / {
|
|
191
|
+
flush_pending()
|
|
192
|
+
next
|
|
193
|
+
}
|
|
194
|
+
|
|
195
|
+
END {
|
|
196
|
+
flush_pending()
|
|
197
|
+
}
|
|
198
|
+
' "$PLAN_FILE" | while IFS='|' read -r task_id title deps; do
|
|
199
|
+
task_id=$(echo "$task_id" | tr -d ' ')
|
|
200
|
+
title=$(echo "$title" | sed 's/^[[:space:]]*//;s/[[:space:]]*$//')
|
|
201
|
+
deps=$(echo "$deps" | tr -d ' ')
|
|
202
|
+
|
|
203
|
+
if [[ -n "$task_id" && "$task_id" =~ ^([0-9]+\.[0-9]+|T[0-9]+)$ ]]; then
|
|
204
|
+
echo "${task_id}|${title}|${deps}"
|
|
205
|
+
fi
|
|
206
|
+
done
|