@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.
Files changed (410) hide show
  1. package/AGENTS.md +39 -0
  2. package/LICENSE +21 -0
  3. package/README.md +50 -2
  4. package/agents/ansible-automation-expert.md +115 -0
  5. package/agents/api-docs-expert.md +146 -0
  6. package/agents/api-documenter.md +105 -0
  7. package/agents/architect.md +264 -0
  8. package/agents/architecture-analyst.md +99 -0
  9. package/agents/backport-conflict-resolver.md +476 -0
  10. package/agents/cloudflare-architect.md +85 -0
  11. package/agents/cloudflare-developer.md +196 -0
  12. package/agents/code-architect.md +101 -0
  13. package/agents/code-documenter.md +114 -0
  14. package/agents/code-explorer.md +99 -0
  15. package/agents/code-finder.md +83 -0
  16. package/agents/code-researcher.md +102 -0
  17. package/agents/code-reviewer.md +268 -0
  18. package/agents/code-simplifier.md +77 -0
  19. package/agents/codebase-advisor.md +130 -0
  20. package/agents/db-modifier.md +577 -0
  21. package/agents/docs-git-committer.md +220 -0
  22. package/agents/documentation-writer.md +92 -0
  23. package/agents/feature-researcher.md +121 -0
  24. package/agents/feature-writer.md +89 -0
  25. package/agents/frontend-ui-developer.md +98 -0
  26. package/agents/git-cleanup.md +174 -0
  27. package/agents/go-api-architect.md +172 -0
  28. package/agents/go-expert-architect.md +147 -0
  29. package/agents/implementor.md +167 -0
  30. package/agents/library-docs-writer.md +128 -0
  31. package/agents/nextjs-ux-ui-expert.md +127 -0
  32. package/agents/nodejs-backend-architect.md +112 -0
  33. package/agents/nodejs-backend-developer.md +184 -0
  34. package/agents/planner.md +257 -0
  35. package/agents/pr-comment-fixer.md +626 -0
  36. package/agents/practices-researcher.md +80 -0
  37. package/agents/project-file-cleaner.md +140 -0
  38. package/agents/prp-researcher.md +231 -0
  39. package/agents/python-developer.md +171 -0
  40. package/agents/python-expert-architect.md +188 -0
  41. package/agents/readme-generator.md +100 -0
  42. package/agents/release-fix-applier.md +558 -0
  43. package/agents/releaser.md +147 -0
  44. package/agents/research-specialist.md +106 -0
  45. package/agents/reverse-proxy-architect.md +131 -0
  46. package/agents/review-fixer.md +609 -0
  47. package/agents/root-cause-analyzer.md +105 -0
  48. package/agents/rust-build-resolver.md +183 -0
  49. package/agents/rust-expert-architect.md +149 -0
  50. package/agents/rust-reviewer.md +126 -0
  51. package/agents/sql-database-developer.md +195 -0
  52. package/agents/systems-engineering-expert.md +203 -0
  53. package/agents/terraform-architect.md +109 -0
  54. package/agents/terraform-developer.md +229 -0
  55. package/agents/test-strategy-planner.md +126 -0
  56. package/agents/turso-database-architect.md +139 -0
  57. package/agents/typescript-developer.md +170 -0
  58. package/agents/typescript-expert-architect.md +167 -0
  59. package/index.js +523 -0
  60. package/package.json +36 -4
  61. package/registration.json +7259 -0
  62. package/shared/references/agent-native-setup.md +121 -0
  63. package/shared/references/branch-prep.md +31 -0
  64. package/shared/references/branching-model.md +162 -0
  65. package/shared/references/ci-monitoring.md +455 -0
  66. package/shared/references/forge-detection.md +162 -0
  67. package/shared/references/goal-pairing.md +55 -0
  68. package/shared/references/pr-base-and-backport.md +143 -0
  69. package/shared/references/question-policy.md +99 -0
  70. package/shared/references/review-artifact-format.md +141 -0
  71. package/shared/references/review-checklist.md +161 -0
  72. package/shared/references/review-dispatch.md +73 -0
  73. package/shared/references/session-state.md +159 -0
  74. package/shared/references/standalone-dispatch.md +300 -0
  75. package/shared/references/target-capability-matrix.md +516 -0
  76. package/shared/references/visual-mode.md +155 -0
  77. package/shared/references/worktree-strategy.md +326 -0
  78. package/shared/scripts/backport-audit.sh +283 -0
  79. package/shared/scripts/ci-monitor.sh +637 -0
  80. package/shared/scripts/lib/backport-lib.sh +47 -0
  81. package/shared/scripts/lib/ci-classify.sh +103 -0
  82. package/shared/scripts/lib/forge.sh +264 -0
  83. package/shared/scripts/lib/release-state-lib.sh +300 -0
  84. package/shared/scripts/list-worktrees.sh +178 -0
  85. package/shared/scripts/merge-children.sh +82 -0
  86. package/shared/scripts/move-plan-to-worktree.sh +231 -0
  87. package/shared/scripts/pr-guard.sh +283 -0
  88. package/shared/scripts/prepare-feature-branch.sh +326 -0
  89. package/shared/scripts/release-ci-monitor.sh +671 -0
  90. package/shared/scripts/release-state-update.sh +216 -0
  91. package/shared/scripts/release-state.sh +178 -0
  92. package/shared/scripts/report-bundle-drift.sh +343 -0
  93. package/shared/scripts/require-python.sh +17 -0
  94. package/shared/scripts/resolve-plans-dir.sh +262 -0
  95. package/shared/scripts/rules-pointer.sh +20 -0
  96. package/shared/scripts/rules_pointer.py +267 -0
  97. package/shared/scripts/setup-worktree.sh +288 -0
  98. package/shared/scripts/validate-file-paths.sh +249 -0
  99. package/shared/scripts/visual-egress-guard.sh +303 -0
  100. package/shared/scripts/visual-recap-collect.sh +247 -0
  101. package/shared/scripts/worktree-paths.sh +91 -0
  102. package/skills/backport/SKILL.md +293 -0
  103. package/skills/backport/scripts/cherry-pick-pr.sh +232 -0
  104. package/skills/backport/scripts/find-pending.sh +199 -0
  105. package/skills/blueprint/SKILL.md +412 -0
  106. package/skills/blueprint/references/bootstrap-mapping.md +87 -0
  107. package/skills/bundle-author/SKILL.md +121 -0
  108. package/skills/bundle-author/references/surface-map.md +128 -0
  109. package/skills/bundle-author/references/templates/agent-template.md +21 -0
  110. package/skills/bundle-author/references/templates/skill-template.md +36 -0
  111. package/skills/bundle-author/references/when-not-to-scaffold.md +85 -0
  112. package/skills/bundle-author/scripts/scaffold-skill.sh +156 -0
  113. package/skills/bundle-release/SKILL.md +192 -0
  114. package/skills/bundle-release/references/release-checklist.md +196 -0
  115. package/skills/bundle-release/references/release-notes-template.md +48 -0
  116. package/skills/bundle-release/references/version-policy.md +156 -0
  117. package/skills/bundle-release/scripts/bump-version.sh +99 -0
  118. package/skills/bundle-release/scripts/draft-notes.sh +222 -0
  119. package/skills/bundle-release/scripts/preflight.sh +165 -0
  120. package/skills/bundle-release/scripts/release_versions.py +375 -0
  121. package/skills/clean/SKILL.md +109 -0
  122. package/skills/clean/references/agent-prompts.md +199 -0
  123. package/skills/clean/references/safety-config.md +125 -0
  124. package/skills/clean/scripts/detect-project-type.sh +423 -0
  125. package/skills/clean/scripts/generate-report.sh +245 -0
  126. package/skills/clean/scripts/validate-safety.sh +401 -0
  127. package/skills/code-report/SKILL.md +377 -0
  128. package/skills/code-report/scripts/check-prerequisites.sh +65 -0
  129. package/skills/code-report/templates/report-structure.md +202 -0
  130. package/skills/code-review/SKILL.md +155 -0
  131. package/skills/code-review/references/pr-procedure.md +311 -0
  132. package/skills/compatibility-audit/SKILL.md +229 -0
  133. package/skills/compatibility-audit/references/reading-the-report.md +162 -0
  134. package/skills/compatibility-audit/scripts/audit-install-assumptions.sh +431 -0
  135. package/skills/compatibility-audit/scripts/audit-target-features.sh +596 -0
  136. package/skills/deep-research/SKILL.md +251 -0
  137. package/skills/deep-research/references/analysis-prompts.md +702 -0
  138. package/skills/deep-research/references/completion-summary-template.md +66 -0
  139. package/skills/deep-research/references/persona-analogical.md +159 -0
  140. package/skills/deep-research/references/persona-archaeological.md +69 -0
  141. package/skills/deep-research/references/persona-contrarian.md +155 -0
  142. package/skills/deep-research/references/persona-futurist.md +70 -0
  143. package/skills/deep-research/references/persona-historical.md +142 -0
  144. package/skills/deep-research/references/persona-journalistic.md +69 -0
  145. package/skills/deep-research/references/persona-negative-space.md +70 -0
  146. package/skills/deep-research/references/persona-systems.md +69 -0
  147. package/skills/deep-research/references/synthesis-template.md +569 -0
  148. package/skills/deep-research/references/verification-log-template.md +32 -0
  149. package/skills/deep-research/scripts/check-prerequisites.sh +153 -0
  150. package/skills/deep-research/scripts/validate-research.sh +244 -0
  151. package/skills/feature-research/SKILL.md +294 -0
  152. package/skills/feature-research/scripts/validate-research.sh +159 -0
  153. package/skills/feature-research/scripts/validate-spec.sh +270 -0
  154. package/skills/feature-research/templates/research-agents.md +569 -0
  155. package/skills/feature-research/templates/spec-structure.md +437 -0
  156. package/skills/formatters/SKILL.md +209 -0
  157. package/skills/formatters/references/best-practices.md +78 -0
  158. package/skills/formatters/references/flag-reference.md +178 -0
  159. package/skills/formatters/references/stack-detection.md +119 -0
  160. package/skills/formatters/references/templates/husky-pre-commit.tmpl +13 -0
  161. package/skills/formatters/references/templates/justfile-snippet.just.tmpl +31 -0
  162. package/skills/formatters/references/templates/lefthook.yml.tmpl +22 -0
  163. package/skills/formatters/references/templates/lint-autofix.yml.tmpl +94 -0
  164. package/skills/formatters/references/templates/lint.yml.tmpl +85 -0
  165. package/skills/formatters/references/templates/makefile-snippet.mk.tmpl +34 -0
  166. package/skills/formatters/references/templates/package-json-scripts.json.tmpl +14 -0
  167. package/skills/formatters/references/templates/readme-section.md.tmpl +118 -0
  168. package/skills/formatters/scripts/apply-aliases.sh +245 -0
  169. package/skills/formatters/scripts/apply-ci.sh +136 -0
  170. package/skills/formatters/scripts/apply-docs.sh +187 -0
  171. package/skills/formatters/scripts/apply-hooks.sh +261 -0
  172. package/skills/formatters/scripts/bundle/format.sh +15 -0
  173. package/skills/formatters/scripts/bundle/go-tools.sh +119 -0
  174. package/skills/formatters/scripts/bundle/init-formatters.sh +517 -0
  175. package/skills/formatters/scripts/bundle/install-shellcheck.sh +85 -0
  176. package/skills/formatters/scripts/bundle/lib/excludes.sh +179 -0
  177. package/skills/formatters/scripts/bundle/lib/modified-files.sh +222 -0
  178. package/skills/formatters/scripts/bundle/lib/shellcheck-resolve.sh +81 -0
  179. package/skills/formatters/scripts/bundle/lib/shellcheck-version.sh +5 -0
  180. package/skills/formatters/scripts/bundle/lint.sh +15 -0
  181. package/skills/formatters/scripts/bundle/style.sh +1410 -0
  182. package/skills/formatters/scripts/bundle/templates/biome.json +81 -0
  183. package/skills/formatters/scripts/bundle/templates/clippy.toml +2 -0
  184. package/skills/formatters/scripts/bundle/templates/markdownlint.json +14 -0
  185. package/skills/formatters/scripts/bundle/templates/markdownlintignore +38 -0
  186. package/skills/formatters/scripts/bundle/templates/prettierignore +45 -0
  187. package/skills/formatters/scripts/bundle/templates/prettierrc.json +11 -0
  188. package/skills/formatters/scripts/bundle/templates/python-pyproject.toml +80 -0
  189. package/skills/formatters/scripts/bundle/templates/rustfmt.toml +41 -0
  190. package/skills/formatters/scripts/bundle/templates/tsconfig.json +21 -0
  191. package/skills/formatters/scripts/profile-style.sh +264 -0
  192. package/skills/frontend-design/SKILL.md +151 -0
  193. package/skills/frontend-patterns/SKILL.md +66 -0
  194. package/skills/frontend-patterns/references/animation.md +21 -0
  195. package/skills/frontend-patterns/references/components-and-state.md +40 -0
  196. package/skills/frontend-patterns/references/data-and-performance.md +34 -0
  197. package/skills/frontend-patterns/references/forms-errors-a11y.md +35 -0
  198. package/skills/git-cleanup/SKILL.md +300 -0
  199. package/skills/git-cleanup/references/active-code-rules.md +323 -0
  200. package/skills/git-cleanup/references/host-detection.md +217 -0
  201. package/skills/git-workflow/SKILL.md +132 -0
  202. package/skills/git-workflow/references/ci-monitoring-phase.md +130 -0
  203. package/skills/git-workflow/references/commit-phases.md +247 -0
  204. package/skills/git-workflow/references/examples-and-troubleshooting.md +47 -0
  205. package/skills/git-workflow/references/goal-pairing.md +23 -0
  206. package/skills/git-workflow/references/pr-creation.md +269 -0
  207. package/skills/git-workflow/scripts/analyze-changes.sh +266 -0
  208. package/skills/git-workflow/scripts/create-pr.sh +464 -0
  209. package/skills/git-workflow/scripts/validate-commit.sh +235 -0
  210. package/skills/git-workflow/templates/agent-prompts.md +518 -0
  211. package/skills/git-workflow/templates/commit-types.md +504 -0
  212. package/skills/git-workflow/templates/documentation-decision.md +509 -0
  213. package/skills/git-workflow/templates/pr-template.md +772 -0
  214. package/skills/go-patterns/SKILL.md +89 -0
  215. package/skills/go-patterns/references/design-and-tooling.md +336 -0
  216. package/skills/go-patterns/references/errors-and-concurrency.md +292 -0
  217. package/skills/go-testing/SKILL.md +133 -0
  218. package/skills/go-testing/references/advanced-testing.md +349 -0
  219. package/skills/go-testing/references/test-structure.md +277 -0
  220. package/skills/hooks-workflow/SKILL.md +232 -0
  221. package/skills/hooks-workflow/references/support-notes.md +134 -0
  222. package/skills/hooks-workflow/references/templates/claude-settings.json.tmpl +13 -0
  223. package/skills/hooks-workflow/references/templates/codex-config-fragment.toml.tmpl +9 -0
  224. package/skills/hooks-workflow/references/templates/cursor-rule-fragment.mdc.tmpl +16 -0
  225. package/skills/hooks-workflow/scripts/build-hook-config.sh +487 -0
  226. package/skills/hooks-workflow/scripts/verify-hooks.sh +257 -0
  227. package/skills/implement-plan/SKILL.md +223 -0
  228. package/skills/implement-plan/references/agent-task-prompt.md +214 -0
  229. package/skills/implement-plan/references/output-formats.md +150 -0
  230. package/skills/implement-plan/references/plan-inputs.md +126 -0
  231. package/skills/implement-plan/scripts/check-prerequisites.sh +78 -0
  232. package/skills/implement-plan/scripts/parse-dependencies.sh +206 -0
  233. package/skills/init/SKILL.md +274 -0
  234. package/skills/init/references/conventional-commits.md +114 -0
  235. package/skills/init/references/flag-reference.md +236 -0
  236. package/skills/init/references/label-taxonomy.md +115 -0
  237. package/skills/init/references/project-profile-heuristics.md +156 -0
  238. package/skills/init/references/template-library.md +129 -0
  239. package/skills/init/scripts/count-source-files.sh +60 -0
  240. package/skills/init/scripts/generate-agent-catalog.sh +193 -0
  241. package/skills/init/scripts/generate-mcp-catalog.sh +214 -0
  242. package/skills/init/scripts/migrate-rules.py +459 -0
  243. package/skills/init/scripts/migrate-rules.sh +26 -0
  244. package/skills/init/scripts/profile-project.sh +453 -0
  245. package/skills/init/scripts/render-template.py +226 -0
  246. package/skills/init/scripts/render-template.sh +25 -0
  247. package/skills/init/scripts/rules-report.sh +31 -0
  248. package/skills/init/scripts/rules_file_lib.py +41 -0
  249. package/skills/init/templates/AGENTS.md.tmpl +38 -0
  250. package/skills/init/templates/CLAUDE.md.tmpl +7 -0
  251. package/skills/init/templates/ai-rule.md.tmpl +3 -0
  252. package/skills/init/templates/cursor-rule.mdc.tmpl +7 -0
  253. package/skills/init/templates/git/commitlint.config.cjs.tmpl +40 -0
  254. package/skills/init/templates/git/gitignore.tmpl +121 -0
  255. package/skills/init/templates/git/gitmessage.tmpl +27 -0
  256. package/skills/init/templates/git/install-lefthook.sh.tmpl +131 -0
  257. package/skills/init/templates/git/lefthook-usage.md.tmpl +101 -0
  258. package/skills/init/templates/git/lefthook.yml.tmpl +64 -0
  259. package/skills/init/templates/github/bug_report.yml.tmpl +78 -0
  260. package/skills/init/templates/github/config.yml.tmpl +5 -0
  261. package/skills/init/templates/github/copilot-instructions.md.tmpl +24 -0
  262. package/skills/init/templates/github/docs_request.yml.tmpl +41 -0
  263. package/skills/init/templates/github/feature_request.yml.tmpl +59 -0
  264. package/skills/init/templates/github/labels.md.tmpl +75 -0
  265. package/skills/init/templates/github/pull_request_template.md.tmpl +66 -0
  266. package/skills/init/templates/github/workflows/pr-title-autofix.yml.tmpl +101 -0
  267. package/skills/init/templates/github/workflows/pr-title.yml.tmpl +55 -0
  268. package/skills/init/templates/workspace-report.md +83 -0
  269. package/skills/orchestrate/SKILL.md +165 -0
  270. package/skills/orchestrate/references/agent-catalog.md +601 -0
  271. package/skills/orchestrate/references/agent-prompts.md +495 -0
  272. package/skills/orchestrate/references/dispatch-playbook.md +333 -0
  273. package/skills/orchestrate/references/task-breakdown.md +410 -0
  274. package/skills/orchestrate/scripts/analyze-task.sh +139 -0
  275. package/skills/orchestrate/scripts/summarize-results.sh +160 -0
  276. package/skills/orchestrate/scripts/validate-agents.sh +92 -0
  277. package/skills/parallel-plan/SKILL.md +124 -0
  278. package/skills/plan/SKILL.md +136 -0
  279. package/skills/plan/references/enhanced-personas.md +131 -0
  280. package/skills/plan/references/personas-and-merge.md +77 -0
  281. package/skills/plan/references/plan-validation.md +65 -0
  282. package/skills/plan/references/planner-prompts.md +68 -0
  283. package/skills/plan/references/planning-tracks.md +73 -0
  284. package/skills/plan-workflow/SKILL.md +409 -0
  285. package/skills/plan-workflow/references/checkpoint-messages.md +370 -0
  286. package/skills/plan-workflow/references/plan-structure.md +238 -0
  287. package/skills/plan-workflow/references/planning-agents.md +511 -0
  288. package/skills/plan-workflow/references/research-agents-optimized.md +348 -0
  289. package/skills/plan-workflow/references/research-agents.md +436 -0
  290. package/skills/plan-workflow/references/shared-structure.md +152 -0
  291. package/skills/plan-workflow/references/validation-agents.md +363 -0
  292. package/skills/plan-workflow/scripts/check-prerequisites.sh +65 -0
  293. package/skills/plan-workflow/scripts/check-state.sh +190 -0
  294. package/skills/plan-workflow/scripts/persist-or-fail.sh +135 -0
  295. package/skills/plan-workflow/scripts/validate-analysis-artifacts.sh +216 -0
  296. package/skills/plan-workflow/scripts/validate-research-artifacts.sh +225 -0
  297. package/skills/plan-workflow/scripts/validate-shared.sh +229 -0
  298. package/skills/plan-workflow/scripts/validate-workflow-plan.sh +256 -0
  299. package/skills/pr-autofix/SKILL.md +309 -0
  300. package/skills/pr-autofix/references/ci-loop.md +64 -0
  301. package/skills/pr-autofix/references/comment-sources.md +197 -0
  302. package/skills/pr-autofix/references/data-shapes.md +87 -0
  303. package/skills/pr-autofix/references/goal-example.md +30 -0
  304. package/skills/pr-autofix/references/output-templates.md +162 -0
  305. package/skills/pr-autofix/references/prompt-injection-safety.md +165 -0
  306. package/skills/pr-autofix/references/related-skills.md +11 -0
  307. package/skills/pr-autofix/references/severity-mapping.md +146 -0
  308. package/skills/pr-autofix/scripts/fetch-pr-comments.sh +364 -0
  309. package/skills/pr-autofix/scripts/post-summary.sh +226 -0
  310. package/skills/pr-autofix/scripts/resolve-thread.sh +251 -0
  311. package/skills/prp-commit/SKILL.md +128 -0
  312. package/skills/prp-implement/SKILL.md +179 -0
  313. package/skills/prp-implement/references/agent-task-prompt.md +36 -0
  314. package/skills/prp-implement/references/detection.md +49 -0
  315. package/skills/prp-implement/references/dry-run.md +0 -0
  316. package/skills/prp-implement/references/report-output.md +204 -0
  317. package/skills/prp-implement/references/validation-and-failures.md +118 -0
  318. package/skills/prp-plan/SKILL.md +323 -0
  319. package/skills/prp-plan/references/enhanced-researchers.md +425 -0
  320. package/skills/prp-plan/references/parallel-additions.md +56 -0
  321. package/skills/prp-plan/references/plan-template.md +264 -0
  322. package/skills/prp-plan/references/synthesis-map.md +25 -0
  323. package/skills/prp-plan/scripts/validate-prp-plan.sh +368 -0
  324. package/skills/prp-pr/SKILL.md +404 -0
  325. package/skills/prp-prd/SKILL.md +444 -0
  326. package/skills/prp-spec/SKILL.md +276 -0
  327. package/skills/python-patterns/SKILL.md +103 -0
  328. package/skills/python-patterns/references/core-idioms.md +304 -0
  329. package/skills/python-patterns/references/design-and-tooling.md +407 -0
  330. package/skills/python-testing/SKILL.md +114 -0
  331. package/skills/python-testing/references/mocking-and-integration.md +395 -0
  332. package/skills/python-testing/references/pytest-core.md +366 -0
  333. package/skills/quick-fix/SKILL.md +246 -0
  334. package/skills/quick-review/SKILL.md +306 -0
  335. package/skills/release-model/SKILL.md +233 -0
  336. package/skills/release-model/references/pointer-and-labels.md +83 -0
  337. package/skills/release-model/references/signals-and-proposal.md +68 -0
  338. package/skills/release-model/references/template-placeholders.md +42 -0
  339. package/skills/release-model/references/upgrade-and-audit.md +131 -0
  340. package/skills/release-model/scripts/collect-signals.sh +459 -0
  341. package/skills/release-model/scripts/pointer-targets.sh +29 -0
  342. package/skills/release-model/templates/RELEASING.md.tmpl +151 -0
  343. package/skills/releaser/SKILL.md +253 -0
  344. package/skills/releaser/references/ci-optimization-checklist.md +149 -0
  345. package/skills/releaser/references/ci-templates/docker-release.yml +88 -0
  346. package/skills/releaser/references/ci-templates/generic-release.yml +69 -0
  347. package/skills/releaser/references/ci-templates/go-release.yml +50 -0
  348. package/skills/releaser/references/ci-templates/node-release.yml +126 -0
  349. package/skills/releaser/references/ci-templates/python-release.yml +95 -0
  350. package/skills/releaser/references/ci-templates/rust-release.yml +128 -0
  351. package/skills/releaser/references/ci-workflow-modes.md +42 -0
  352. package/skills/releaser/references/goal-pairing.md +37 -0
  353. package/skills/releaser/references/output-templates.md +143 -0
  354. package/skills/releaser/references/project-type-matrix.md +144 -0
  355. package/skills/releaser/references/release-branches.md +138 -0
  356. package/skills/releaser/references/release-ci-loop.md +249 -0
  357. package/skills/releaser/references/release-notes-template.md +42 -0
  358. package/skills/releaser/references/release-preparation.md +210 -0
  359. package/skills/releaser/scripts/check-release-branch.sh +235 -0
  360. package/skills/releaser/scripts/detect-project.sh +234 -0
  361. package/skills/releaser/scripts/draft-changelog.sh +387 -0
  362. package/skills/releaser/scripts/publish-release.sh +302 -0
  363. package/skills/research-to-issues/SKILL.md +287 -0
  364. package/skills/research-to-issues/references/label-taxonomy.md +48 -0
  365. package/skills/research-to-issues/references/parse-deep-research.md +86 -0
  366. package/skills/research-to-issues/references/parse-feature-spec.md +143 -0
  367. package/skills/research-to-issues/references/parse-parallel-plan.md +124 -0
  368. package/skills/research-to-issues/references/parse-prd.md +184 -0
  369. package/skills/research-to-issues/references/parse-prp-plan.md +237 -0
  370. package/skills/research-to-issues/references/plan-display-format.md +136 -0
  371. package/skills/research-to-issues/scripts/validate-prerequisites.sh +312 -0
  372. package/skills/research-to-issues/templates/feature-issue.md +131 -0
  373. package/skills/research-to-issues/templates/task-issue.md +104 -0
  374. package/skills/research-to-issues/templates/tracking-issue.md +126 -0
  375. package/skills/resume-session/SKILL.md +154 -0
  376. package/skills/review-fix/SKILL.md +231 -0
  377. package/skills/review-fix/references/fix-report.md +121 -0
  378. package/skills/review-fix/references/fixer-dispatch.md +79 -0
  379. package/skills/review-fix/references/plan.md +119 -0
  380. package/skills/rust-patterns/SKILL.md +85 -0
  381. package/skills/rust-patterns/references/concurrency-unsafe-modules.md +243 -0
  382. package/skills/rust-patterns/references/ownership-errors-types.md +262 -0
  383. package/skills/rust-testing/SKILL.md +99 -0
  384. package/skills/rust-testing/references/advanced-testing.md +247 -0
  385. package/skills/rust-testing/references/unit-and-integration.md +193 -0
  386. package/skills/save-session/SKILL.md +161 -0
  387. package/skills/shared-context/SKILL.md +101 -0
  388. package/skills/ts-patterns/SKILL.md +159 -0
  389. package/skills/ts-patterns/references/async-runtimes-tooling.md +375 -0
  390. package/skills/ts-patterns/references/types-errors-modules.md +336 -0
  391. package/skills/ts-testing/SKILL.md +151 -0
  392. package/skills/ts-testing/references/advanced-testing.md +350 -0
  393. package/skills/ts-testing/references/vitest-core.md +318 -0
  394. package/skills/visual-plan/SKILL.md +221 -0
  395. package/skills/visual-plan/references/canvas.md +132 -0
  396. package/skills/visual-plan/references/document-quality.md +178 -0
  397. package/skills/visual-plan/references/exemplar.md +120 -0
  398. package/skills/visual-plan/references/wireframe.md +212 -0
  399. package/skills/visual-plan/scripts/derive-visual-dir.sh +77 -0
  400. package/skills/visual-recap/SKILL.md +238 -0
  401. package/skills/visual-recap/references/wireframe.md +237 -0
  402. package/skills/write-docs/SKILL.md +354 -0
  403. package/skills/write-docs/scripts/audit-documentation.sh +190 -0
  404. package/skills/write-docs/scripts/generate-doc-index.sh +125 -0
  405. package/skills/write-docs/scripts/verify-links.sh +81 -0
  406. package/skills/write-docs/templates/docs-readme.md +34 -0
  407. package/skills/write-docs/templates/documentation-strategy.md +91 -0
  408. package/ycc-sensitive-guard/index.js +621 -0
  409. package/ycc-sensitive-guard/package.json +7 -0
  410. package/ycc-sensitive-guard/policy.json +40 -0
@@ -0,0 +1,68 @@
1
+ # Planner Prompts and Output Shape
2
+
3
+ ## Contents
4
+
5
+ - Sequential prompt (`PARALLEL_MODE=false` — default)
6
+ - Parallel prompt (`PARALLEL_MODE=true`)
7
+
8
+ Mention `@planner` or invoke it via the native `subagent` tool. In the prompt, include:
9
+
10
+ - The user's original request (verbatim)
11
+ - Any file paths or context they referenced
12
+ - A note that the agent should follow its Plan Format and end with `**WAITING FOR CONFIRMATION**: Proceed with this plan? (yes / no / modify)`
13
+ - **If `PARALLEL_MODE=true`**: append the parallel output directives (see below)
14
+
15
+ ### Sequential prompt (`PARALLEL_MODE=false` — default)
16
+
17
+ ```
18
+ The user asked: "<user's request>"
19
+
20
+ Related context they pointed to: <files, URLs, or "none">
21
+
22
+ Produce a full implementation plan following your Plan Format. Use the
23
+ Read/Grep/Glob tools to analyze the codebase and include concrete file
24
+ paths. End with your standard confirmation prompt.
25
+ ```
26
+
27
+ ### Parallel prompt (`PARALLEL_MODE=true`)
28
+
29
+ Append these directives to the sequential prompt:
30
+
31
+ ```
32
+ PARALLEL OUTPUT MODE:
33
+
34
+ In addition to your standard Plan Format, shape the output for parallel
35
+ execution:
36
+
37
+ 1. **Use hierarchical step IDs** — Number steps as `1.1`, `1.2`, `2.1`,
38
+ `2.2`, etc. where the first digit is the batch and the second is the
39
+ task within the batch.
40
+
41
+ 2. **Populate the Dependencies field on every step** — Use the hierarchical
42
+ IDs (e.g., `Depends on [1.1, 1.2]` or `Depends on [none]`). Never leave
43
+ the field as "None / Requires step X" — always use the explicit format.
44
+
45
+ 3. **Add a `## Batches` section immediately after `## Architecture Changes`
46
+ and before `## Implementation Steps`**. Format:
47
+
48
+ ## Batches
49
+
50
+ Steps grouped by dependency for parallel execution. Steps within the
51
+ same batch run concurrently; batches run in order.
52
+
53
+ | Batch | Steps | Depends On | Parallel Width |
54
+ | ----- | ------------- | ---------- | -------------- |
55
+ | B1 | 1.1, 1.2, 1.3 | — | 3 |
56
+ | B2 | 2.1 | B1 | 1 |
57
+ | B3 | 3.1, 3.2 | B2 | 2 |
58
+
59
+ - **Total steps**: N
60
+ - **Total batches**: M
61
+ - **Max parallel width**: X
62
+
63
+ 4. Batch construction follows standalone-dispatch section 9; append its planner batch directives when parallel output is requested.
64
+
65
+ 5. Still end with `**WAITING FOR CONFIRMATION**: Proceed with this plan? (yes / no / modify)`
66
+ ```
67
+
68
+ When WORKTREE_MODE=true, append standalone-dispatch section 8's planner annotation directive; omit it for --no-worktree.
@@ -0,0 +1,73 @@
1
+ # Planning Tracks and Implementation Handoff
2
+
3
+ ## Contents
4
+
5
+ - Integration with ycc
6
+ - Executing a Parallel Plan
7
+ - Comparison with other ycc planning tracks
8
+ - Which `--parallel` should I use?
9
+ - When to use `--enhanced`
10
+ - When to use `--no-worktree`
11
+
12
+ ## Integration with ycc
13
+
14
+ After planning, depending on what the user approves:
15
+
16
+ - Use `/ycc:prp-implement` if they want rigorous per-task validation loops (requires a PRP-format plan file — consider running `/ycc:prp-plan` first if you want that workflow)
17
+ - Use `/ycc:implement-plan` if the work was structured via `/ycc:parallel-plan`
18
+ - Use `/ycc:code-review` to review completed implementation
19
+ - Use `/ycc:git-workflow --commit` or `/ycc:prp-commit` to commit
20
+
21
+ ### Executing a Parallel Plan
22
+
23
+ If the plan was produced with `--parallel` (has a `Batches` section and `Depends on` annotations), after the user confirms you have two options for parallel execution:
24
+
25
+ **Option 1 — In-conversation parallel execution (lightweight)**
26
+
27
+ Before dispatching any `implementor` agents, prepare the feature branch so agents do not commit on `main`:
28
+
29
+ - **`WORKTREE_MODE=true` (default)** — the plan already names the parent worktree at `<repo-root>/.opencode/worktrees/<repo>-<feature>/` (branch `feat/<feature>`). Run `setup-worktree.sh parent <repo> <feature>` once, then dispatch agents with `Working directory: <parent path>`.
30
+ - **`WORKTREE_MODE=false` (`--no-worktree`)** — derive `FEATURE_SLUG` from the user's request using the team-name sanitization (lowercase, non-`[a-z0-9-]` → `-`, collapse runs, truncate to 20 chars, fallback `untitled`), then run `prepare-feature-branch.sh`; it is idempotent on `feat/${FEATURE_SLUG}`, exits 1 on unrelated dirty tree, exits 2 on a different feature branch (`--allow-existing-feature-branch` after confirmation) or, when RELEASING.md exists, on `release/*` (`--allow-release-branch` only for a release-only fix). See `{{package-root}}/shared/references/branch-prep.md`. Do not skip this step.
31
+
32
+ Then run standalone-dispatch sections 9–10: batches sequentially, one implementor per step in a single message; run type-check and unit tests between batches; on failure stop and ask the user.
33
+
34
+ This keeps everything in the current conversation — no file artifact needed.
35
+
36
+ For unattended loop-to-completion of a parallel plan, hand off to `/ycc:implement-plan` and pair it with the `/goal` session directive — see that skill's `## /goal pairing` section for the recommended done condition (`ALL_BATCHES_DONE`, `FILES_CHANGED_NONEMPTY`, `LINT_PASS`) and the transcript-output contract.
37
+
38
+ **Option 2 — Save to file and hand off (rigorous)**
39
+
40
+ Write the plan to `docs/prps/plans/{name}.plan.md` (adapting it to the PRP plan template if needed: add `Patterns to Mirror`, `Files to Change`, `Validation Commands`, etc.), then run `/ycc:prp-implement --parallel docs/prps/plans/{name}.plan.md` for the full 5-level validation pipeline.
41
+
42
+ Use Option 1 for small features and quick iterations. Use Option 2 when the user wants an implementation report, per-task validation logs, and the plan archived for audit.
43
+
44
+ ## Comparison with other ycc planning tracks
45
+
46
+ | Track | When to use |
47
+ | ---------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
48
+ | `/ycc:plan` (this one) | Quick conversational plan via `planner` agent. No artifact file. Add `--parallel` to shape the output for parallel execution (no research fan-out). Add `--enhanced` to widen to 5 personas (security + UX), dispatched as standalone parallel sub-agents by default. |
49
+ | `/ycc:prp-plan` | Artifact-producing plan with codebase pattern extraction. Single-pass. Add `--parallel` for 3-researcher fan-out + batched plan. Add `--enhanced` for the full 7-researcher fan-out. |
50
+ | `/ycc:prp-prd` | Interactive PRD first, then prp-plan. Problem-first hypothesis workflow. |
51
+ | `/ycc:plan-workflow` | Heavyweight parallel-agent planning. Multi-task features. Artifact output. |
52
+ | `/ycc:parallel-plan` | Lower-level component of `/ycc:plan-workflow` for dependency-aware plans. |
53
+
54
+ ### Which `--parallel` should I use?
55
+
56
+ - **`/ycc:plan --parallel`** — You want a quick parallel-capable plan without creating an artifact file. Planner does its own research. Best for small/medium features.
57
+ - **`/ycc:prp-plan --parallel`** — You want research fan-out (3 parallel researchers covering 8 categories) plus a full artifact file with patterns to mirror and validation commands. Best for medium/large features where you want a rigorous, auditable plan.
58
+ - **`/ycc:plan-workflow`** — You want heavyweight team orchestration with shared context and multi-phase validation. Best for very large features spanning many tasks.
59
+
60
+ ### When to use `--enhanced`
61
+
62
+
63
+ - **`/ycc:plan --enhanced <request>`** — Fans out 5 standalone parallel sub-agents (Path C). Works in every bundle. Best for medium-complexity features where a 3-persona plan would miss security or UX considerations and you don't need the team coordination overhead.
64
+ - **`/ycc:plan --enhanced --parallel <request>`** — 5-persona plan formatted for parallel execution (Batches section, `Depends on` annotations).
65
+ - **`/ycc:plan --enhanced --dry-run <request>`** — Print the 5-persona roster without spawning anyone. Useful to confirm the team shape before paying the dispatch cost.
66
+ - **`/ycc:prp-plan --enhanced <request>`** — The heavier sibling: 7 researchers, artifact-producing. Use when you want the enhanced perspectives _and_ a saved plan file, not just an in-conversation plan.
67
+
68
+ ### When to use `--no-worktree`
69
+
70
+ Worktree annotations are emitted by default. Pass `--no-worktree` to suppress the `## Worktree Setup` section and all per-task `**Worktree**:` annotations when you do not intend to use git worktree isolation:
71
+
72
+ - **`/ycc:plan --parallel <request>`** — Parallel-capable plan with full worktree annotations (default). Hand off to `/ycc:prp-implement` for isolated execution.
73
+ - **`/ycc:plan --no-worktree --parallel <request>`** — Parallel-capable plan without worktree annotations. Use when worktree isolation is not desired.
@@ -0,0 +1,409 @@
1
+ ---
2
+ name: plan-workflow
3
+ description: Use when validating existing research docs before planning, running a
4
+ research-to-plan workflow, or producing shared.md and parallel-plan.md. Researches
5
+ and validates plans with checkpoints.
6
+ ---
7
+
8
+ # Unified Planning Workflow
9
+
10
+ > **OpenCode V2 compatibility:** `--team` is unsupported. If it is supplied, abort before setup or dispatch and ask the caller to rerun without it. This target uses native standalone `subagent` calls only.
11
+
12
+
13
+ Flow: Research → Checkpoint → Analysis → Plan Generation → Validation → optional `--visual`.
14
+
15
+ ## Dispatch lifecycle (applies to every agent-spawning step below)
16
+
17
+ Read `{{package-root}}/shared/references/standalone-dispatch.md` for standalone dispatch.
18
+
19
+ ## Critical gates (read first)
20
+
21
+ 1. **Mutual exclusion — abort before any write**: if both `--research-only` and `--plan-only` are present, print and **STOP** (no directory creation, no file writes):
22
+
23
+ ```
24
+ Error: --research-only and --plan-only are mutually exclusive
25
+ Usage: /ycc:plan-workflow [--research-only | --plan-only] [--no-checkpoint] [--optimized] [--dry-run] [--no-worktree] [--visual] [feature-name]
26
+ ```
27
+
28
+ 2. **Feature name required**: kebab-case (lowercase, hyphens), no other special characters. If missing or invalid, abort with the matching error block from `references/checkpoint-messages.md` ("Error Messages": Missing Feature Name / Invalid Feature Name).
29
+ 4. **Dry-run writes nothing**: handled before the prereq gate, overwrite prompt, any `mkdir`, write, dispatch, or rendering. Never prompts for input. It prints the preview and then **STOP**s.
30
+
31
+
32
+ 5. **`--plan-only` prerequisite gate (before any `mkdir` or write)**: `scripts/check-prerequisites.sh` must exit 0. On failure, print its output plus `run /ycc:shared-context <feature> or /ycc:plan-workflow <feature> --research-only first`, then **STOP**. Never fall back to running research inline under `--plan-only`.
33
+ 6. **`--optimized --plan-only` restriction**: the five unified analysis files must already exist (prior `--optimized` full run); there is no Phase 5 to regenerate them. If any is missing, **STOP** with: `--optimized --plan-only needs a prior --optimized full run. Run /ycc:plan-workflow <feature> --optimized first.` Enforced at Step 4B, re-checked by the Phase 7 PRE-CHECK.
34
+ 7. **Pre-generation gate (Step 22, cannot be skipped)**: `scripts/persist-or-fail.sh` must exit 0 before plan generation. On `MISSING_FILES`/`ACTION_REQUIRED`, re-dispatch the failing agent to write the missing file(s) and re-run until exit 0. The orchestrator must never write agent output files itself from captured summaries — that bypasses the contract (root cause of the May 2026 reproducer with 3 of 5 unified files missing).
35
+ 8. **Validator flags**: `validate-research-artifacts.sh` (Step 11), `validate-analysis-artifacts.sh` (Step 21), and `persist-or-fail.sh` (Step 22) must be invoked with `--optimized` whenever `--optimized` was passed; without it they look for the standard file sets and fail wrongly.
36
+ 9. **Validation-fail fix loop**: message the failing sub-agent (team mode) or re-dispatch the failing sub-agent via `subagent` (standalone). Wait, re-validate until pass. Never synthesize the missing file.
37
+ 11. **Terminal STOP points**: dry-run preview (Step 4A), missing prereq (Step 4B), research-only stop (Step 15A), checkpoint "Stop here" (Step 16), `--optimized --plan-only` missing artifacts. At each, stop all writes and dispatch.
38
+
39
+ ## Arguments
40
+
41
+ Parse flags first, then the feature name (first non-flag argument, required; directory name in `${PLANS_DIR}/`).
42
+
43
+ - **--research-only**: stop after research (creates shared.md only).
44
+ - **--plan-only**: skip research, use existing shared.md. Skips Phases 1–4, NOT Phase 5 (Analysis).
45
+ - **--no-checkpoint**: no pause between research and planning.
46
+ - **--optimized**: 7-agent unified deployment (default: 10-agent standard).
47
+ - **--worktree**: legacy no-op (worktree annotations are the default; safe to omit).
48
+ - **--no-worktree**: opt out of worktree annotations in the generated `parallel-plan.md`. No effect with `--research-only` (no plan file). Honored with `--plan-only`.
49
+ - **--visual**: render the finished plan as an Agent-Native visual artifact (MDX) via `visual-plan`; local files by default, hosted link requires `--share`.
50
+
51
+ If no feature name is provided, abort with the full usage instructions from `references/checkpoint-messages.md` — read when the feature name is missing ("Usage Instructions" section).
52
+
53
+ **Questions:** class `checkpoint` (Step 16 research review): headless (no question tool or chat turn), continue to planning and report the skipped checkpoint in the summary. Class `confirm-destructive` (Step 4C overwrite choice): headless, overwrite nothing; stop with `rerun with --no-checkpoint` to regenerate. See `{{package-root}}/shared/references/question-policy.md`.
54
+
55
+ ## Visual mode
56
+
57
+ See `{{package-root}}/shared/references/visual-mode.md` for the canonical `--visual` contract. `--visual` is a terminal decorator step, orthogonal to `--optimized` and `--no-worktree`; it runs once at the very end. With `VISUAL_MODE=true` and no `--dry-run`, after the final phase invoke `visual-plan <absolute-plan-path>` where the path is the **actual written plan** at `${feature_dir}/parallel-plan.md` (resolved in Phase 0) — never a hardcoded `docs/prps/plans` path; `visual-plan` derives its `visual/` output directory from it. With `--dry-run`, short-circuit: print `visual generation would run` and do not invoke `visual-plan`. `--research-only` produces no plan file, so `--visual` does not run.
58
+
59
+ ## Phase 0: Initialize
60
+
61
+ ### Step 1: Parse Arguments
62
+
63
+
64
+ ```bash
65
+ # Default ON; pass --no-worktree to opt out. --worktree accepted as legacy no-op.
66
+ WORKTREE_MODE=true
67
+ case " $ARGUMENTS " in
68
+ *" --no-worktree "*) WORKTREE_MODE=false ;;
69
+ esac
70
+ ARGUMENTS="${ARGUMENTS//--no-worktree/}"
71
+ ARGUMENTS="${ARGUMENTS//--worktree/}" # legacy no-op
72
+
73
+ VISUAL_MODE=false
74
+ case " $ARGUMENTS " in
75
+ *" --visual "*) VISUAL_MODE=true ;;
76
+ esac
77
+ ARGUMENTS="${ARGUMENTS//--visual/}"
78
+ ```
79
+
80
+ Apply critical gates 1–3. **feature-name** = first non-flag argument.
81
+
82
+ ### Step 2: Resolve Plans Directory
83
+
84
+ ```bash
85
+ source {{package-root}}/shared/scripts/resolve-plans-dir.sh
86
+ feature_dir="$(get_feature_plan_dir "[feature-name]")"
87
+ ```
88
+
89
+ Handles monorepo detection, `.plans-config` files, and git root resolution automatically. See "Monorepo Support" below.
90
+
91
+ ### Step 3: Run State Detection
92
+
93
+ ```bash
94
+ {{package-root}}/skills/plan-workflow/scripts/check-state.sh [feature-name]
95
+ ```
96
+
97
+ Reports whether `${feature_dir}/` exists, `shared.md`, `parallel-plan.md`, and any research files.
98
+
99
+ ### Step 4: Determine Execution Mode
100
+
101
+ | State | --plan-only | --research-only | Action |
102
+ | -------------------- | ----------- | --------------- | --------------------------------------------------------------------------------------------------- |
103
+ | No shared.md | No | No | Full workflow from Phase 1 |
104
+ | No shared.md | No | Yes | Full workflow from Phase 1, stop at Step 15A (research-only stop) |
105
+ | No shared.md | Yes | No | Fail fast in Step 4B — never fall back to research |
106
+ | Has shared.md | Yes | No | Skip to Phase 5 (Analysis) |
107
+ | Has shared.md | No | Yes | Regenerate only if overwrite chosen in Step 4C, then stop at Step 15A; else STOP and reuse existing |
108
+ | Has shared.md | No | No | Full workflow from Phase 1 (shared.md regenerates only if overwrite chosen in Step 4C) |
109
+ | Has parallel-plan.md | Any | Any | Warn about overwrite (Step 4C) |
110
+
111
+ "Planning" = Phase 8 (Plan Generation); "Analysis" = Phase 5.
112
+
113
+ ### Step 4A: Dry-Run Preview (when `--dry-run`, before anything else)
114
+
115
+ Read `references/checkpoint-messages.md` — read when previewing a dry run. Display its "Dry Run Output" section with values substituted (`{{FEATURE_NAME}}`, `{{FEATURE_DIR}}`, dispatch mode, execution mode), then **STOP** (gate 4). If `--plan-only` is also set and `check-state.sh` shows no `shared.md`, state in the preview that a real run would fail fast at Step 4B (missing prerequisite) and **STOP**.
116
+
117
+ ### Step 4B: Plan-Only Prerequisite Gate (when `--plan-only`, before any write)
118
+
119
+ Run `scripts/check-prerequisites.sh "[feature-name]"` per gate 5. Then, for `--optimized --plan-only`, verify the five unified files exist before any write or dispatch (gate 6): `analysis-architecture.md`, `analysis-patterns.md`, `analysis-integration.md`, `analysis-docs.md`, `analysis-tasks.md`.
120
+
121
+ ### Step 4C: Overwrite Choice (when shared.md or parallel-plan.md exists)
122
+
123
+ - **Interactive (checkpoint enabled)**: surface the matching warning from `references/checkpoint-messages.md` ("Existing State Warnings") and let the user choose regenerate vs reuse/stop.
124
+ - **Non-interactive (`--no-checkpoint`)**: default is **regenerate (overwrite)** so pipelines stay non-blocking; passing the flag is the explicit opt-in. State the choice when proceeding (e.g. "shared.md exists — regenerating (non-interactive default)").
125
+ - **Headless (no question tool or chat turn), checkpoint enabled**: do not overwrite. Print the existing paths and `rerun with --no-checkpoint` to regenerate, then **STOP** without writes or dispatch.
126
+ - **Research-only reuse**: report the existing `shared.md` path, state that no files were changed, print `/ycc:parallel-plan <feature>` as the next step, and **STOP** without dispatching agents.
127
+
128
+ ### Step 5: Create Directory
129
+
130
+ Only when `--dry-run` is not set: `mkdir -p "${feature_dir}"` if missing.
131
+
132
+ ## Phase 1: Research Stage (unless --plan-only)
133
+
134
+ ### Step 8: Read Research Prompts
135
+
136
+ - Standard mode: read `{{package-root}}/skills/plan-workflow/references/research-agents.md` — read when spawning Phase 1 research agents in standard mode.
137
+ - Optimized mode: read `{{package-root}}/skills/plan-workflow/references/research-agents-optimized.md` — read when `--optimized` replaces the 4 researchers with 5 unified analysts.
138
+
139
+ Substitute `{{FEATURE_NAME}}` (feature directory name) and `{{FEATURE_DIR}}` (`${feature_dir}`, resolved in Step 2).
140
+
141
+ ### Step 10: Spawn Research Agents (standard mode)
142
+
143
+ Read `references/research-agents.md`. **CRITICAL**: Deploy all 4 research agents in a **SINGLE message** with **MULTIPLE native `subagent` calls**. Every call sets `background=false`, uses the configured agent model, and follows the shared result policy below.
144
+
145
+ | Name | Subagent Type | Output File | Model | Focus |
146
+ | ------------------------- | --------------------------- | -------------------------- | ------ | ---------------------------------------- |
147
+ | `architecture-researcher` | `codebase-research-analyst` | `research-architecture.md` | configured | System structure, components, data flow |
148
+ | `patterns-researcher` | `codebase-research-analyst` | `research-patterns.md` | configured | Existing patterns, conventions, examples |
149
+ | `integration-researcher` | `codebase-research-analyst` | `research-integration.md` | configured | APIs, databases, external systems |
150
+ | `docs-researcher` | `codebase-research-analyst` | `research-docs.md` | configured | Relevant documentation files |
151
+
152
+
153
+
154
+
155
+ ## Phase 2: Validate Research Artifacts
156
+
157
+ ### Step 11: Validate Research Artifacts
158
+
159
+ If a child report is empty or contentless, record its `sessionID`, inspect the declared artifact or working-tree edits, preserve valid work, and make at most one retry before reporting the child result incomplete. An artifact can preserve work but does not prove a child response. Follow `{{package-root}}/shared/references/standalone-dispatch.md`.
160
+
161
+ ```bash
162
+ # Standard mode (4-file research-*.md set):
163
+ {{package-root}}/skills/plan-workflow/scripts/validate-research-artifacts.sh "${feature_dir}"
164
+
165
+ # Optimized mode (5-file unified analysis-*.md set):
166
+ {{package-root}}/skills/plan-workflow/scripts/validate-research-artifacts.sh "${feature_dir}" --optimized
167
+ ```
168
+
169
+ Append `--optimized` whenever the flag was passed (gate 8). On failure, apply the fix loop (gate 9). Do not proceed to shared.md synthesis until validation passes.
170
+
171
+ ## Phase 3: Consolidate Research
172
+
173
+ ### Step 13: Read Research Results
174
+
175
+ After validation passes, read the input set for the active mode:
176
+
177
+ - **Standard (4 files)**: `${feature_dir}/research-architecture.md`, `research-patterns.md`, `research-integration.md`, `research-docs.md`.
178
+ - **Optimized (5 unified files; no `research-*.md` exist)**: `${feature_dir}/analysis-architecture.md`, `analysis-patterns.md`, `analysis-integration.md`, `analysis-docs.md`, `analysis-tasks.md`.
179
+
180
+ ### Step 14: Generate shared.md
181
+
182
+ Read `{{package-root}}/skills/plan-workflow/references/shared-structure.md` — read when writing `shared.md`. Create `${feature_dir}/shared.md` following the template exactly.
183
+
184
+ ### Step 15: Validate shared.md
185
+
186
+ ```bash
187
+ {{package-root}}/skills/plan-workflow/scripts/validate-shared.sh "${feature_dir}/shared.md"
188
+ ```
189
+
190
+ Fix any errors before proceeding.
191
+
192
+ ### Step 15A: Research-Only Stop (if `--research-only`)
193
+
194
+ Once `shared.md` exists and `validate-shared.sh` passed: skip Phases 4–9.5 entirely. Then:
195
+
196
+ 1. Standalone research needs no teardown; proceed directly to the research-only summary.
197
+
198
+
199
+ 2. Print the research-only summary: use "Research Complete Summary" from `references/checkpoint-messages.md` — read when emitting the research-only summary (standard or optimized variant), listing the artifacts this run created (standard: `research-*.md` ×4 + `shared.md`; optimized: the five unified `analysis-*.md` + `shared.md`) plus dispatch mode.
200
+ 3. Next step line: `/ycc:parallel-plan <feature>` or `/ycc:plan-workflow <feature> --plan-only`.
201
+ 4. **STOP** — no further writes or dispatch.
202
+
203
+ ## Phase 4: Checkpoint (unless --no-checkpoint or --research-only)
204
+
205
+ ### Step 16: Pause for User Review
206
+
207
+ Use **ask the user**. Question: "Research complete for [feature-name]. Review the shared context before planning?" Options:
208
+
209
+ 1. **Continue to planning** — proceed to Phase 5.
210
+ 2. **Review shared.md first** — display `${feature_dir}/shared.md`, then re-prompt with the same question.
211
+ 3. **Stop here** — display the research-phase completion summary and end the workflow. **STOP** — do not proceed to planning.
212
+
213
+
214
+
215
+ Format from `references/checkpoint-messages.md` — read when prompting at the checkpoint ("Checkpoint Question (Phase 2)").
216
+
217
+ ## Phase 5: Analysis Stage (unless --research-only or --optimized)
218
+
219
+ This phase must run in standard mode, including under `--plan-only` (which skips Research, not Analysis): it produces the `analysis-*.md` files Phase 8 requires.
220
+
221
+ ### Step 18: Read Analysis Prompts
222
+
223
+ Read `{{package-root}}/skills/plan-workflow/references/planning-agents.md` — read when spawning Phase 5 analysis agents (standard mode). Same variables: `{{FEATURE_NAME}}`, `{{FEATURE_DIR}}`.
224
+
225
+ ### Step 20: Spawn Analysis Agents
226
+
227
+ **CRITICAL**: Deploy all 3 analysis agents in a **SINGLE message** with **MULTIPLE native `subagent` calls**. Every call sets `background=false`, uses the configured agent model, and follows the shared result policy below.
228
+
229
+
230
+ | Name | Subagent Type | Output File | Model | Focus |
231
+ | --------------------- | --------------------------- | --------------------- | ------ | ---------------------- |
232
+ | `context-synthesizer` | `codebase-research-analyst` | `analysis-context.md` | configured | Condense planning docs |
233
+ | `code-analyzer` | `codebase-research-analyst` | `analysis-code.md` | configured | Extract code patterns |
234
+ | `task-structurer` | `codebase-research-analyst` | `analysis-tasks.md` | configured | Suggest task breakdown |
235
+
236
+
237
+
238
+
239
+ ## Phase 6: Validate and Persist Analysis Artifacts
240
+
241
+ ### Step 21: First Validation Check
242
+
243
+ If a child report is empty or contentless, record its `sessionID`, inspect the declared artifact or working-tree edits, preserve valid work, and make at most one retry before reporting the child result incomplete. An artifact can preserve work but does not prove a child response. Follow `{{package-root}}/shared/references/standalone-dispatch.md`.
244
+
245
+ ```bash
246
+ # Standard mode (3-file set: analysis-context, analysis-code, analysis-tasks):
247
+ {{package-root}}/skills/plan-workflow/scripts/validate-analysis-artifacts.sh "${feature_dir}"
248
+
249
+ # Optimized mode (5-file unified set):
250
+ {{package-root}}/skills/plan-workflow/scripts/validate-analysis-artifacts.sh "${feature_dir}" --optimized
251
+ ```
252
+
253
+ Pass → Step 22. Fail → fix loop (gate 9), re-validate.
254
+
255
+ ### Step 22: Pre-Generation Gate (cannot be skipped)
256
+
257
+ ```bash
258
+ # Standard mode:
259
+ {{package-root}}/skills/plan-workflow/scripts/persist-or-fail.sh "${feature_dir}"
260
+
261
+ # Optimized mode:
262
+ {{package-root}}/skills/plan-workflow/scripts/persist-or-fail.sh "${feature_dir}" --optimized
263
+ ```
264
+
265
+ Exit 0 → Phase 7. Exit 1 → prints `MISSING_FILES` and `ACTION_REQUIRED`; re-dispatch the failing agent, re-run until exit 0 (gate 7). In optimized mode the `MISSING_FILES` set is the 5 unified files.
266
+
267
+ ## Phase 7: Read Analysis Results
268
+
269
+ **PRE-CHECK — branch on execution mode**:
270
+
271
+ - **Standard**: if `analysis-context.md`, `analysis-code.md`, or `analysis-tasks.md` is missing in `${feature_dir}/`, Phase 5 was skipped in error — go back and run Phase 5 now.
272
+ - **Optimized**: the five unified files must exist (produced by Phase 1 unified agents, gated by Step 22). If any is missing, **STOP** with the gate-6 message. Optimized mode has no Phase 5 to regenerate them.
273
+
274
+ ### Step 24: Read Analysis Results
275
+
276
+ - **Standard (3 files)**: `${feature_dir}/analysis-context.md`, `analysis-code.md`, `analysis-tasks.md`.
277
+ - **Optimized (5 unified files)**: `${feature_dir}/analysis-architecture.md`, `analysis-patterns.md`, `analysis-integration.md`, `analysis-docs.md`, `analysis-tasks.md`.
278
+
279
+ ## Phase 8: Plan Generation
280
+
281
+ ### Step 25: Read Plan Template
282
+
283
+ Read `{{package-root}}/skills/plan-workflow/references/plan-structure.md` — read when generating `parallel-plan.md`.
284
+
285
+ ### Step 26: Generate parallel-plan.md
286
+
287
+ Create `${feature_dir}/parallel-plan.md` following the template exactly. Required sections: Title & Overview (3-4 information-dense sentences); Critically Relevant Files and Documentation; Implementation Plan with Phases and Tasks; Advice section.
288
+
289
+
290
+ ### Step 27: Plan Structure Check (deferred)
291
+
292
+ Structural validation (`validate-workflow-plan.sh`) runs **once**, on the final artifact, in Step 31A — after validation-agent fixes. Do not run it against the pre-validation draft.
293
+
294
+ ## Phase 9: Validation Stage
295
+
296
+ ### Step 28: Read Validation Prompts
297
+
298
+ Read `{{package-root}}/skills/plan-workflow/references/validation-agents.md` — read when spawning Phase 9 validators (standard or optimized).
299
+
300
+ ### Step 30: Spawn Validation Agents
301
+
302
+ **Standard mode** — 3 agents:
303
+
304
+ | Name / Sub-agent role | Subagent Type | Model | Focus |
305
+ | ------------------------ | --------------------------- | ------ | --------------------------------------- |
306
+ | `path-validator` | `explore` | configured | Verify all referenced files exist |
307
+ | `dependency-validator` | `explore` | configured | Check for circular/invalid dependencies |
308
+ | `completeness-validator` | `codebase-research-analyst` | configured | Ensure tasks are actionable |
309
+
310
+ **Optimized mode** — 2 agents:
311
+
312
+ | Name / Sub-agent role | Subagent Type | Model | Focus |
313
+ | ------------------------ | --------------------------- | ------ | ------------------------------- |
314
+ | `path-dep-validator` | `explore` | configured | Verify paths + dependency graph |
315
+ | `completeness-validator` | `codebase-research-analyst` | configured | Task quality + completeness |
316
+
317
+ **CRITICAL**: Deploy all validation agents (3 in standard, 2 in optimized) in a **SINGLE message** with **MULTIPLE native `subagent` calls**. Every call sets `background=false`, uses the configured agent model, and follows the shared result policy below.
318
+
319
+
320
+ ### Step 31: Review and Fix Issues
321
+
322
+ - **Path A (standalone, default)**: review each `subagent` return value for validator findings.
323
+
324
+ Fix issues: correct invalid file paths, resolve circular dependencies, add missing details to incomplete tasks.
325
+
326
+ ### Step 31A: Validate Final Plan Structure
327
+
328
+ After all fixes, run once on the final artifact (before visual/completion):
329
+
330
+ ```bash
331
+ {{package-root}}/skills/plan-workflow/scripts/validate-workflow-plan.sh "${feature_dir}/parallel-plan.md"
332
+ ```
333
+
334
+ Fix any structural errors it reports (missing `### Phase` is an error); do not proceed until it exits 0.
335
+
336
+ ## Phase 9.5: Visual Mode (if --visual)
337
+
338
+ Runs only after the plan is written (Phase 8) and validated (Phases 8–9). It never re-orders, re-runs, or substitutes for any earlier phase. See `{{package-root}}/shared/references/visual-mode.md`.
339
+
340
+ ### Step 32.5: Render Visual Artifact
341
+
342
+ - `--dry-run` set: print `visual generation would run` and **STOP** this phase (§2.1 short-circuit — no visual artifacts).
343
+ - `--research-only` used: no plan file was generated; skip this phase.
344
+ - Otherwise invoke `visual-plan` on the **actual written plan path** (feature-dir plan resolved in Phase 0, not a hardcoded `docs/prps/plans` path):
345
+
346
+ ```
347
+ visual-plan "${feature_dir}/parallel-plan.md"
348
+ ```
349
+
350
+ `visual-plan` derives its `visual/` output directory from the supplied plan path and prints the resulting link (hosted URL, localhost preview, or `local files only`). Surface that link in the Phase 10 summary; do not re-derive the path yourself; do not edit the plan file.
351
+
352
+ ## Phase 10: Summary
353
+
354
+ ### Step 34: Display Completion Summary
355
+
356
+ Skipped when `RESEARCH_ONLY=true` (workflow ended at Step 15A) or the user stopped at the checkpoint. Otherwise use the "Full Workflow Complete Summary" block in `references/checkpoint-messages.md` — read when emitting the final summary. List only files this run actually created (`--plan-only`: omit Research Phase files; `--research-only` never reaches here).
357
+
358
+ ## Optimized Mode
359
+
360
+ With `--optimized`, deploy 5 unified agents instead of separate research (4) + analysis (3), skipping Phase 5 entirely:
361
+
362
+ | Unified Agent | Combines | Output | Model |
363
+ | --------------------- | ----------------------------------- | -------------------------- | ------ |
364
+ | `arch-analyst` | Arch Research + Context Synthesizer | `analysis-architecture.md` | configured |
365
+ | `pattern-analyst` | Pattern Research + Code Analyzer | `analysis-patterns.md` | configured |
366
+ | `integration-analyst` | Integration Research | `analysis-integration.md` | configured |
367
+ | `docs-analyst` | Doc Research | `analysis-docs.md` | configured |
368
+ | `task-planner` | Task Structure Agent | `analysis-tasks.md` | configured |
369
+
370
+
371
+ - **Path A (standalone, default)**: spawn all 5 unified agents in one parallel batch; every native `subagent` call sets `background=false` and inherits the configured agent model.
372
+
373
+ ## Quality Standards
374
+
375
+ - **shared.md**: clear information-dense overview (3-4 sentences); all file paths verified to exist; brief useful descriptions; patterns linked to example files; documentation marked with required reading topics.
376
+ - **parallel-plan.md**: information-dense overview (3-4 sentences); complete critically-relevant file list; tasks in logical phases; at least one independent task per phase; advice section; no circular dependencies; all file paths verified.
377
+ - **Each task**: clear descriptive title; explicit dependencies; "READ THESE BEFORE TASK" section; Files to Create list (if any); Files to Modify list; concise actionable instructions.
378
+
379
+ ## Output Contract
380
+
381
+ All files are written to `${feature_dir}/` (resolved via `resolve-plans-dir.sh`).
382
+
383
+ | File | Producer | Required Before |
384
+ | -------------------------- | ----------------------- | --------------------------- |
385
+ | `research-architecture.md` | architecture-researcher | shared.md synthesis |
386
+ | `research-patterns.md` | patterns-researcher | shared.md synthesis |
387
+ | `research-integration.md` | integration-researcher | shared.md synthesis |
388
+ | `research-docs.md` | docs-researcher | shared.md synthesis |
389
+ | `shared.md` | Team lead (this skill) | Analysis phase |
390
+ | `analysis-context.md` | context-synthesizer | parallel-plan.md generation |
391
+ | `analysis-code.md` | code-analyzer | parallel-plan.md generation |
392
+ | `analysis-tasks.md` | task-structurer | parallel-plan.md generation |
393
+ | `parallel-plan.md` | Team lead (this skill) | Skill completion |
394
+
395
+ Contract rules:
396
+
397
+ 1. Each agent writes its own output file using the Write tool.
398
+ 2. Team mode: each sub-agent shares key findings with relevant sub-agents via `re-dispatch the affected sub-agent with the needed guidance`. Standalone: inter-agent sharing is unavailable — each sub-agent works independently.
399
+ 3. The orchestrator runs `validate-research-artifacts.sh` before generating shared.md (Step 11), `validate-analysis-artifacts.sh` after analysis agents complete (Step 21), and `persist-or-fail.sh` as the mandatory pre-generation gate (Step 22).
400
+ 4. On validation failure, message the failing sub-agent (team) or re-dispatch the sub-agent (standalone) — gate 9.
401
+ 5. No file may be skipped or deferred — `persist-or-fail.sh` must exit 0 before plan generation.
402
+
403
+ ## Monorepo Support
404
+
405
+ Plans default to the git repository root `docs/plans/`, regardless of the subdirectory the skill runs from; `resolve-plans-dir.sh` handles detection. A `.plans-config` file customizes it — repo root (`plans_dir: docs/plans`) for centralized plans, or package-level (`plans_dir: docs/plans` + `scope: local`) for local plans.
406
+
407
+ ## Notes
408
+
409
+ - You are the planning orchestrator — coordinate all phases; choose dispatch mode from `$ARGUMENTS`; spawn each stage in parallel in a single message; pass the model parameters from the tables above; validate with scripts after agents complete; read condensed analysis, not raw files; multiple validation passes ensure quality.