@yandy-r/ycc-opencode 0.0.0-stage → 6.0.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/AGENTS.md +38 -0
- package/LICENSE +21 -0
- package/README.md +41 -2
- package/agents/ansible-automation-expert.md +115 -0
- package/agents/api-docs-expert.md +146 -0
- package/agents/api-documenter.md +105 -0
- package/agents/architect.md +264 -0
- package/agents/architecture-analyst.md +99 -0
- package/agents/backport-conflict-resolver.md +134 -0
- package/agents/cloudflare-architect.md +85 -0
- package/agents/cloudflare-developer.md +196 -0
- package/agents/code-architect.md +101 -0
- package/agents/code-documenter.md +114 -0
- package/agents/code-explorer.md +99 -0
- package/agents/code-finder.md +83 -0
- package/agents/code-researcher.md +102 -0
- package/agents/code-reviewer.md +268 -0
- package/agents/code-simplifier.md +77 -0
- package/agents/codebase-advisor.md +130 -0
- package/agents/db-modifier.md +235 -0
- package/agents/docs-git-committer.md +220 -0
- package/agents/documentation-writer.md +92 -0
- package/agents/feature-researcher.md +121 -0
- package/agents/feature-writer.md +89 -0
- package/agents/frontend-ui-developer.md +98 -0
- package/agents/git-cleanup.md +173 -0
- package/agents/go-api-architect.md +172 -0
- package/agents/go-expert-architect.md +147 -0
- package/agents/implementor.md +167 -0
- package/agents/library-docs-writer.md +128 -0
- package/agents/nextjs-ux-ui-expert.md +127 -0
- package/agents/nodejs-backend-architect.md +112 -0
- package/agents/nodejs-backend-developer.md +184 -0
- package/agents/planner.md +257 -0
- package/agents/pr-comment-fixer.md +284 -0
- package/agents/practices-researcher.md +80 -0
- package/agents/project-file-cleaner.md +140 -0
- package/agents/prp-researcher.md +231 -0
- package/agents/python-developer.md +171 -0
- package/agents/python-expert-architect.md +188 -0
- package/agents/readme-generator.md +100 -0
- package/agents/release-fix-applier.md +194 -0
- package/agents/releaser.md +147 -0
- package/agents/research-specialist.md +106 -0
- package/agents/reverse-proxy-architect.md +131 -0
- package/agents/review-fixer.md +264 -0
- package/agents/root-cause-analyzer.md +105 -0
- package/agents/rust-build-resolver.md +183 -0
- package/agents/rust-expert-architect.md +149 -0
- package/agents/rust-reviewer.md +126 -0
- package/agents/sql-database-developer.md +195 -0
- package/agents/systems-engineering-expert.md +203 -0
- package/agents/terraform-architect.md +109 -0
- package/agents/terraform-developer.md +229 -0
- package/agents/test-strategy-planner.md +126 -0
- package/agents/turso-database-architect.md +139 -0
- package/agents/typescript-developer.md +170 -0
- package/agents/typescript-expert-architect.md +167 -0
- package/index.js +260 -0
- package/package.json +35 -4
- package/registration.json +4384 -0
- package/shared/references/agent-native-setup.md +121 -0
- package/shared/references/branch-prep.md +31 -0
- package/shared/references/branching-model.md +162 -0
- package/shared/references/ci-monitoring.md +445 -0
- package/shared/references/forge-detection.md +162 -0
- package/shared/references/goal-pairing.md +53 -0
- package/shared/references/pr-base-and-backport.md +143 -0
- package/shared/references/review-artifact-format.md +141 -0
- package/shared/references/review-checklist.md +161 -0
- package/shared/references/review-dispatch.md +71 -0
- package/shared/references/session-state.md +159 -0
- package/shared/references/standalone-dispatch.md +298 -0
- package/shared/references/target-capability-matrix.md +325 -0
- package/shared/references/visual-mode.md +155 -0
- package/shared/references/worktree-strategy.md +310 -0
- package/shared/scripts/backport-audit.sh +283 -0
- package/shared/scripts/ci-monitor.sh +637 -0
- package/shared/scripts/lib/backport-lib.sh +47 -0
- package/shared/scripts/lib/ci-classify.sh +103 -0
- package/shared/scripts/lib/forge.sh +264 -0
- package/shared/scripts/lib/release-state-lib.sh +300 -0
- package/shared/scripts/list-worktrees.sh +178 -0
- package/shared/scripts/merge-children.sh +82 -0
- package/shared/scripts/move-plan-to-worktree.sh +231 -0
- package/shared/scripts/pr-guard.sh +283 -0
- package/shared/scripts/prepare-feature-branch.sh +326 -0
- package/shared/scripts/release-ci-monitor.sh +671 -0
- package/shared/scripts/release-state-update.sh +216 -0
- package/shared/scripts/release-state.sh +178 -0
- package/shared/scripts/report-bundle-drift.sh +343 -0
- package/shared/scripts/require-python.sh +17 -0
- package/shared/scripts/resolve-plans-dir.sh +262 -0
- package/shared/scripts/rules-pointer.sh +20 -0
- package/shared/scripts/rules_pointer.py +267 -0
- package/shared/scripts/setup-worktree.sh +288 -0
- package/shared/scripts/validate-file-paths.sh +249 -0
- package/shared/scripts/visual-egress-guard.sh +303 -0
- package/shared/scripts/visual-recap-collect.sh +247 -0
- package/shared/scripts/worktree-paths.sh +86 -0
- package/skills/backport/SKILL.md +291 -0
- package/skills/backport/scripts/cherry-pick-pr.sh +232 -0
- package/skills/backport/scripts/find-pending.sh +199 -0
- package/skills/blueprint/SKILL.md +410 -0
- package/skills/blueprint/references/bootstrap-mapping.md +87 -0
- package/skills/bundle-author/SKILL.md +119 -0
- package/skills/bundle-author/references/surface-map.md +128 -0
- package/skills/bundle-author/references/templates/agent-template.md +21 -0
- package/skills/bundle-author/references/templates/skill-template.md +36 -0
- package/skills/bundle-author/references/when-not-to-scaffold.md +85 -0
- package/skills/bundle-author/scripts/scaffold-skill.sh +156 -0
- package/skills/bundle-release/SKILL.md +188 -0
- package/skills/bundle-release/references/release-checklist.md +196 -0
- package/skills/bundle-release/references/release-notes-template.md +48 -0
- package/skills/bundle-release/references/version-policy.md +150 -0
- package/skills/bundle-release/scripts/bump-version.sh +97 -0
- package/skills/bundle-release/scripts/draft-notes.sh +222 -0
- package/skills/bundle-release/scripts/preflight.sh +164 -0
- package/skills/bundle-release/scripts/release_versions.py +361 -0
- package/skills/clean/SKILL.md +107 -0
- package/skills/clean/references/agent-prompts.md +199 -0
- package/skills/clean/references/safety-config.md +125 -0
- package/skills/clean/scripts/detect-project-type.sh +423 -0
- package/skills/clean/scripts/generate-report.sh +245 -0
- package/skills/clean/scripts/validate-safety.sh +401 -0
- package/skills/code-report/SKILL.md +375 -0
- package/skills/code-report/scripts/check-prerequisites.sh +65 -0
- package/skills/code-report/templates/report-structure.md +202 -0
- package/skills/code-review/SKILL.md +153 -0
- package/skills/code-review/references/pr-procedure.md +311 -0
- package/skills/compatibility-audit/SKILL.md +226 -0
- package/skills/compatibility-audit/references/reading-the-report.md +159 -0
- package/skills/compatibility-audit/scripts/audit-install-assumptions.sh +372 -0
- package/skills/compatibility-audit/scripts/audit-target-features.sh +558 -0
- package/skills/deep-research/SKILL.md +251 -0
- package/skills/deep-research/references/analysis-prompts.md +702 -0
- package/skills/deep-research/references/completion-summary-template.md +66 -0
- package/skills/deep-research/references/persona-analogical.md +159 -0
- package/skills/deep-research/references/persona-archaeological.md +69 -0
- package/skills/deep-research/references/persona-contrarian.md +155 -0
- package/skills/deep-research/references/persona-futurist.md +70 -0
- package/skills/deep-research/references/persona-historical.md +142 -0
- package/skills/deep-research/references/persona-journalistic.md +69 -0
- package/skills/deep-research/references/persona-negative-space.md +70 -0
- package/skills/deep-research/references/persona-systems.md +69 -0
- package/skills/deep-research/references/synthesis-template.md +569 -0
- package/skills/deep-research/references/verification-log-template.md +32 -0
- package/skills/deep-research/scripts/check-prerequisites.sh +153 -0
- package/skills/deep-research/scripts/validate-research.sh +244 -0
- package/skills/feature-research/SKILL.md +292 -0
- package/skills/feature-research/scripts/validate-research.sh +159 -0
- package/skills/feature-research/scripts/validate-spec.sh +270 -0
- package/skills/feature-research/templates/research-agents.md +569 -0
- package/skills/feature-research/templates/spec-structure.md +437 -0
- package/skills/formatters/SKILL.md +207 -0
- package/skills/formatters/references/best-practices.md +78 -0
- package/skills/formatters/references/flag-reference.md +178 -0
- package/skills/formatters/references/stack-detection.md +119 -0
- package/skills/formatters/references/templates/husky-pre-commit.tmpl +13 -0
- package/skills/formatters/references/templates/justfile-snippet.just.tmpl +31 -0
- package/skills/formatters/references/templates/lefthook.yml.tmpl +22 -0
- package/skills/formatters/references/templates/lint-autofix.yml.tmpl +94 -0
- package/skills/formatters/references/templates/lint.yml.tmpl +85 -0
- package/skills/formatters/references/templates/makefile-snippet.mk.tmpl +34 -0
- package/skills/formatters/references/templates/package-json-scripts.json.tmpl +14 -0
- package/skills/formatters/references/templates/readme-section.md.tmpl +118 -0
- package/skills/formatters/scripts/apply-aliases.sh +245 -0
- package/skills/formatters/scripts/apply-ci.sh +136 -0
- package/skills/formatters/scripts/apply-docs.sh +187 -0
- package/skills/formatters/scripts/apply-hooks.sh +261 -0
- package/skills/formatters/scripts/bundle/format.sh +15 -0
- package/skills/formatters/scripts/bundle/go-tools.sh +119 -0
- package/skills/formatters/scripts/bundle/init-formatters.sh +517 -0
- package/skills/formatters/scripts/bundle/install-shellcheck.sh +85 -0
- package/skills/formatters/scripts/bundle/lib/excludes.sh +179 -0
- package/skills/formatters/scripts/bundle/lib/modified-files.sh +222 -0
- package/skills/formatters/scripts/bundle/lib/shellcheck-resolve.sh +81 -0
- package/skills/formatters/scripts/bundle/lib/shellcheck-version.sh +5 -0
- package/skills/formatters/scripts/bundle/lint.sh +15 -0
- package/skills/formatters/scripts/bundle/style.sh +1410 -0
- package/skills/formatters/scripts/bundle/templates/biome.json +81 -0
- package/skills/formatters/scripts/bundle/templates/clippy.toml +2 -0
- package/skills/formatters/scripts/bundle/templates/markdownlint.json +14 -0
- package/skills/formatters/scripts/bundle/templates/markdownlintignore +38 -0
- package/skills/formatters/scripts/bundle/templates/prettierignore +45 -0
- package/skills/formatters/scripts/bundle/templates/prettierrc.json +11 -0
- package/skills/formatters/scripts/bundle/templates/python-pyproject.toml +80 -0
- package/skills/formatters/scripts/bundle/templates/rustfmt.toml +41 -0
- package/skills/formatters/scripts/bundle/templates/tsconfig.json +21 -0
- package/skills/formatters/scripts/profile-style.sh +264 -0
- package/skills/frontend-design/SKILL.md +151 -0
- package/skills/frontend-patterns/SKILL.md +66 -0
- package/skills/frontend-patterns/references/animation.md +21 -0
- package/skills/frontend-patterns/references/components-and-state.md +40 -0
- package/skills/frontend-patterns/references/data-and-performance.md +34 -0
- package/skills/frontend-patterns/references/forms-errors-a11y.md +35 -0
- package/skills/git-cleanup/SKILL.md +286 -0
- package/skills/git-cleanup/references/active-code-rules.md +318 -0
- package/skills/git-cleanup/references/host-detection.md +217 -0
- package/skills/git-workflow/SKILL.md +130 -0
- package/skills/git-workflow/references/ci-monitoring-phase.md +130 -0
- package/skills/git-workflow/references/commit-phases.md +247 -0
- package/skills/git-workflow/references/examples-and-troubleshooting.md +47 -0
- package/skills/git-workflow/references/goal-pairing.md +23 -0
- package/skills/git-workflow/references/pr-creation.md +269 -0
- package/skills/git-workflow/scripts/analyze-changes.sh +266 -0
- package/skills/git-workflow/scripts/create-pr.sh +464 -0
- package/skills/git-workflow/scripts/validate-commit.sh +235 -0
- package/skills/git-workflow/templates/agent-prompts.md +518 -0
- package/skills/git-workflow/templates/commit-types.md +504 -0
- package/skills/git-workflow/templates/documentation-decision.md +509 -0
- package/skills/git-workflow/templates/pr-template.md +772 -0
- package/skills/go-patterns/SKILL.md +89 -0
- package/skills/go-patterns/references/design-and-tooling.md +336 -0
- package/skills/go-patterns/references/errors-and-concurrency.md +292 -0
- package/skills/go-testing/SKILL.md +133 -0
- package/skills/go-testing/references/advanced-testing.md +349 -0
- package/skills/go-testing/references/test-structure.md +277 -0
- package/skills/hooks-workflow/SKILL.md +232 -0
- package/skills/hooks-workflow/references/support-notes.md +134 -0
- package/skills/hooks-workflow/references/templates/claude-settings.json.tmpl +13 -0
- package/skills/hooks-workflow/references/templates/codex-config-fragment.toml.tmpl +9 -0
- package/skills/hooks-workflow/references/templates/cursor-rule-fragment.mdc.tmpl +16 -0
- package/skills/hooks-workflow/scripts/build-hook-config.sh +487 -0
- package/skills/hooks-workflow/scripts/verify-hooks.sh +257 -0
- package/skills/implement-plan/SKILL.md +221 -0
- package/skills/implement-plan/references/agent-task-prompt.md +214 -0
- package/skills/implement-plan/references/output-formats.md +150 -0
- package/skills/implement-plan/references/plan-inputs.md +126 -0
- package/skills/implement-plan/scripts/check-prerequisites.sh +78 -0
- package/skills/implement-plan/scripts/parse-dependencies.sh +206 -0
- package/skills/init/SKILL.md +272 -0
- package/skills/init/references/conventional-commits.md +114 -0
- package/skills/init/references/flag-reference.md +236 -0
- package/skills/init/references/label-taxonomy.md +115 -0
- package/skills/init/references/project-profile-heuristics.md +156 -0
- package/skills/init/references/template-library.md +129 -0
- package/skills/init/scripts/count-source-files.sh +60 -0
- package/skills/init/scripts/generate-agent-catalog.sh +193 -0
- package/skills/init/scripts/generate-mcp-catalog.sh +214 -0
- package/skills/init/scripts/migrate-rules.py +459 -0
- package/skills/init/scripts/migrate-rules.sh +26 -0
- package/skills/init/scripts/profile-project.sh +453 -0
- package/skills/init/scripts/render-template.py +226 -0
- package/skills/init/scripts/render-template.sh +25 -0
- package/skills/init/scripts/rules-report.sh +31 -0
- package/skills/init/scripts/rules_file_lib.py +41 -0
- package/skills/init/templates/AGENTS.md.tmpl +38 -0
- package/skills/init/templates/CLAUDE.md.tmpl +7 -0
- package/skills/init/templates/ai-rule.md.tmpl +3 -0
- package/skills/init/templates/cursor-rule.mdc.tmpl +7 -0
- package/skills/init/templates/git/commitlint.config.cjs.tmpl +40 -0
- package/skills/init/templates/git/gitignore.tmpl +120 -0
- package/skills/init/templates/git/gitmessage.tmpl +27 -0
- package/skills/init/templates/git/install-lefthook.sh.tmpl +131 -0
- package/skills/init/templates/git/lefthook-usage.md.tmpl +101 -0
- package/skills/init/templates/git/lefthook.yml.tmpl +64 -0
- package/skills/init/templates/github/bug_report.yml.tmpl +78 -0
- package/skills/init/templates/github/config.yml.tmpl +5 -0
- package/skills/init/templates/github/copilot-instructions.md.tmpl +24 -0
- package/skills/init/templates/github/docs_request.yml.tmpl +41 -0
- package/skills/init/templates/github/feature_request.yml.tmpl +59 -0
- package/skills/init/templates/github/labels.md.tmpl +75 -0
- package/skills/init/templates/github/pull_request_template.md.tmpl +66 -0
- package/skills/init/templates/github/workflows/pr-title-autofix.yml.tmpl +101 -0
- package/skills/init/templates/github/workflows/pr-title.yml.tmpl +55 -0
- package/skills/init/templates/workspace-report.md +83 -0
- package/skills/orchestrate/SKILL.md +165 -0
- package/skills/orchestrate/references/agent-catalog.md +601 -0
- package/skills/orchestrate/references/agent-prompts.md +495 -0
- package/skills/orchestrate/references/dispatch-playbook.md +333 -0
- package/skills/orchestrate/references/task-breakdown.md +410 -0
- package/skills/orchestrate/scripts/analyze-task.sh +139 -0
- package/skills/orchestrate/scripts/summarize-results.sh +160 -0
- package/skills/orchestrate/scripts/validate-agents.sh +92 -0
- package/skills/parallel-plan/SKILL.md +124 -0
- package/skills/plan/SKILL.md +134 -0
- package/skills/plan/references/enhanced-personas.md +131 -0
- package/skills/plan/references/personas-and-merge.md +77 -0
- package/skills/plan/references/plan-validation.md +65 -0
- package/skills/plan/references/planner-prompts.md +68 -0
- package/skills/plan/references/planning-tracks.md +73 -0
- package/skills/plan-workflow/SKILL.md +406 -0
- package/skills/plan-workflow/references/checkpoint-messages.md +370 -0
- package/skills/plan-workflow/references/plan-structure.md +238 -0
- package/skills/plan-workflow/references/planning-agents.md +511 -0
- package/skills/plan-workflow/references/research-agents-optimized.md +348 -0
- package/skills/plan-workflow/references/research-agents.md +436 -0
- package/skills/plan-workflow/references/shared-structure.md +152 -0
- package/skills/plan-workflow/references/validation-agents.md +363 -0
- package/skills/plan-workflow/scripts/check-prerequisites.sh +65 -0
- package/skills/plan-workflow/scripts/check-state.sh +190 -0
- package/skills/plan-workflow/scripts/persist-or-fail.sh +135 -0
- package/skills/plan-workflow/scripts/validate-analysis-artifacts.sh +216 -0
- package/skills/plan-workflow/scripts/validate-research-artifacts.sh +225 -0
- package/skills/plan-workflow/scripts/validate-shared.sh +229 -0
- package/skills/plan-workflow/scripts/validate-workflow-plan.sh +256 -0
- package/skills/pr-autofix/SKILL.md +307 -0
- package/skills/pr-autofix/references/ci-loop.md +64 -0
- package/skills/pr-autofix/references/comment-sources.md +197 -0
- package/skills/pr-autofix/references/data-shapes.md +87 -0
- package/skills/pr-autofix/references/goal-example.md +30 -0
- package/skills/pr-autofix/references/output-templates.md +162 -0
- package/skills/pr-autofix/references/prompt-injection-safety.md +165 -0
- package/skills/pr-autofix/references/related-skills.md +11 -0
- package/skills/pr-autofix/references/severity-mapping.md +146 -0
- package/skills/pr-autofix/scripts/fetch-pr-comments.sh +364 -0
- package/skills/pr-autofix/scripts/post-summary.sh +226 -0
- package/skills/pr-autofix/scripts/resolve-thread.sh +251 -0
- package/skills/prp-commit/SKILL.md +128 -0
- package/skills/prp-implement/SKILL.md +177 -0
- package/skills/prp-implement/references/agent-task-prompt.md +36 -0
- package/skills/prp-implement/references/detection.md +49 -0
- package/skills/prp-implement/references/dry-run.md +0 -0
- package/skills/prp-implement/references/report-output.md +204 -0
- package/skills/prp-implement/references/validation-and-failures.md +118 -0
- package/skills/prp-plan/SKILL.md +323 -0
- package/skills/prp-plan/references/enhanced-researchers.md +425 -0
- package/skills/prp-plan/references/parallel-additions.md +56 -0
- package/skills/prp-plan/references/plan-template.md +264 -0
- package/skills/prp-plan/references/synthesis-map.md +25 -0
- package/skills/prp-plan/scripts/preflight-enhanced-agents.sh +111 -0
- package/skills/prp-plan/scripts/validate-prp-plan.sh +368 -0
- package/skills/prp-pr/SKILL.md +402 -0
- package/skills/prp-prd/SKILL.md +442 -0
- package/skills/prp-spec/SKILL.md +274 -0
- package/skills/python-patterns/SKILL.md +103 -0
- package/skills/python-patterns/references/core-idioms.md +304 -0
- package/skills/python-patterns/references/design-and-tooling.md +407 -0
- package/skills/python-testing/SKILL.md +114 -0
- package/skills/python-testing/references/mocking-and-integration.md +395 -0
- package/skills/python-testing/references/pytest-core.md +366 -0
- package/skills/quick-fix/SKILL.md +246 -0
- package/skills/quick-review/SKILL.md +304 -0
- package/skills/release-model/SKILL.md +231 -0
- package/skills/release-model/references/pointer-and-labels.md +83 -0
- package/skills/release-model/references/signals-and-proposal.md +68 -0
- package/skills/release-model/references/template-placeholders.md +42 -0
- package/skills/release-model/references/upgrade-and-audit.md +131 -0
- package/skills/release-model/scripts/collect-signals.sh +459 -0
- package/skills/release-model/scripts/pointer-targets.sh +29 -0
- package/skills/release-model/templates/RELEASING.md.tmpl +151 -0
- package/skills/releaser/SKILL.md +251 -0
- package/skills/releaser/references/ci-optimization-checklist.md +149 -0
- package/skills/releaser/references/ci-templates/docker-release.yml +88 -0
- package/skills/releaser/references/ci-templates/generic-release.yml +69 -0
- package/skills/releaser/references/ci-templates/go-release.yml +50 -0
- package/skills/releaser/references/ci-templates/node-release.yml +126 -0
- package/skills/releaser/references/ci-templates/python-release.yml +95 -0
- package/skills/releaser/references/ci-templates/rust-release.yml +128 -0
- package/skills/releaser/references/ci-workflow-modes.md +42 -0
- package/skills/releaser/references/goal-pairing.md +37 -0
- package/skills/releaser/references/output-templates.md +143 -0
- package/skills/releaser/references/project-type-matrix.md +144 -0
- package/skills/releaser/references/release-branches.md +138 -0
- package/skills/releaser/references/release-ci-loop.md +249 -0
- package/skills/releaser/references/release-notes-template.md +42 -0
- package/skills/releaser/references/release-preparation.md +210 -0
- package/skills/releaser/scripts/check-release-branch.sh +235 -0
- package/skills/releaser/scripts/detect-project.sh +234 -0
- package/skills/releaser/scripts/draft-changelog.sh +387 -0
- package/skills/releaser/scripts/publish-release.sh +302 -0
- package/skills/research-to-issues/SKILL.md +285 -0
- package/skills/research-to-issues/references/label-taxonomy.md +48 -0
- package/skills/research-to-issues/references/parse-deep-research.md +86 -0
- package/skills/research-to-issues/references/parse-feature-spec.md +143 -0
- package/skills/research-to-issues/references/parse-parallel-plan.md +124 -0
- package/skills/research-to-issues/references/parse-prd.md +184 -0
- package/skills/research-to-issues/references/parse-prp-plan.md +237 -0
- package/skills/research-to-issues/references/plan-display-format.md +136 -0
- package/skills/research-to-issues/scripts/validate-prerequisites.sh +312 -0
- package/skills/research-to-issues/templates/feature-issue.md +131 -0
- package/skills/research-to-issues/templates/task-issue.md +104 -0
- package/skills/research-to-issues/templates/tracking-issue.md +126 -0
- package/skills/resume-session/SKILL.md +152 -0
- package/skills/review-fix/SKILL.md +229 -0
- package/skills/review-fix/references/fix-report.md +121 -0
- package/skills/review-fix/references/fixer-dispatch.md +79 -0
- package/skills/review-fix/references/plan.md +119 -0
- package/skills/rust-patterns/SKILL.md +85 -0
- package/skills/rust-patterns/references/concurrency-unsafe-modules.md +243 -0
- package/skills/rust-patterns/references/ownership-errors-types.md +262 -0
- package/skills/rust-testing/SKILL.md +99 -0
- package/skills/rust-testing/references/advanced-testing.md +247 -0
- package/skills/rust-testing/references/unit-and-integration.md +193 -0
- package/skills/save-session/SKILL.md +159 -0
- package/skills/shared-context/SKILL.md +101 -0
- package/skills/ts-patterns/SKILL.md +159 -0
- package/skills/ts-patterns/references/async-runtimes-tooling.md +375 -0
- package/skills/ts-patterns/references/types-errors-modules.md +336 -0
- package/skills/ts-testing/SKILL.md +151 -0
- package/skills/ts-testing/references/advanced-testing.md +350 -0
- package/skills/ts-testing/references/vitest-core.md +318 -0
- package/skills/visual-plan/SKILL.md +221 -0
- package/skills/visual-plan/references/canvas.md +132 -0
- package/skills/visual-plan/references/document-quality.md +178 -0
- package/skills/visual-plan/references/exemplar.md +120 -0
- package/skills/visual-plan/references/wireframe.md +212 -0
- package/skills/visual-plan/scripts/derive-visual-dir.sh +77 -0
- package/skills/visual-recap/SKILL.md +238 -0
- package/skills/visual-recap/references/wireframe.md +237 -0
- package/skills/write-docs/SKILL.md +354 -0
- package/skills/write-docs/scripts/audit-documentation.sh +190 -0
- package/skills/write-docs/scripts/generate-doc-index.sh +125 -0
- package/skills/write-docs/scripts/verify-links.sh +81 -0
- package/skills/write-docs/templates/docs-readme.md +34 -0
- package/skills/write-docs/templates/documentation-strategy.md +91 -0
|
@@ -0,0 +1,143 @@
|
|
|
1
|
+
# PR Base, Sync Guard and Backport Prompt
|
|
2
|
+
|
|
3
|
+
## Contents
|
|
4
|
+
|
|
5
|
+
- PR base
|
|
6
|
+
- Sync-merge guard
|
|
7
|
+
- Backport prompt
|
|
8
|
+
- Checking an existing PR
|
|
9
|
+
- Missing or malformed state
|
|
10
|
+
|
|
11
|
+
How `git-workflow` (Phase 5) and `prp-pr` pick a PR's base branch, refuse sync
|
|
12
|
+
merges, and offer a backport under the release model. `code-review` uses
|
|
13
|
+
[Checking an existing PR](#checking-an-existing-pr). The rules themselves live in
|
|
14
|
+
`branching-model.md` in this directory; this file only says how skills apply them.
|
|
15
|
+
|
|
16
|
+
One helper implements all three steps so both PR skills behave the same:
|
|
17
|
+
|
|
18
|
+
```bash
|
|
19
|
+
GUARD="{{package-root}}/shared/scripts/pr-guard.sh"
|
|
20
|
+
```
|
|
21
|
+
|
|
22
|
+
| Exit | Meaning |
|
|
23
|
+
| ---- | --------------------------------------------------------------------- |
|
|
24
|
+
| 0 | Success (`sync-check`: `result=ok` or `result=skipped`) |
|
|
25
|
+
| 1 | Usage error, or a ref the check needs is missing (fetch it and retry) |
|
|
26
|
+
| 2 | `RELEASING.md` state block is malformed — stop (see below) |
|
|
27
|
+
| 3 | `sync-check` refused the PR |
|
|
28
|
+
|
|
29
|
+
Run `git fetch origin` before these steps so `origin/<base>`, `origin/<trunk>` and
|
|
30
|
+
`origin/release/*` are current.
|
|
31
|
+
|
|
32
|
+
## PR base
|
|
33
|
+
|
|
34
|
+
```bash
|
|
35
|
+
BASE=$(bash "$GUARD" base) # no explicit base
|
|
36
|
+
BASE=$(bash "$GUARD" base --base develop) # explicit base always wins
|
|
37
|
+
```
|
|
38
|
+
|
|
39
|
+
1. An explicit base (`git-workflow --base <branch>`, `prp-pr <base-branch>`) is used as is.
|
|
40
|
+
2. With `RELEASING.md`: `release-state.sh base` — the maintenance branch whose own
|
|
41
|
+
commits HEAD contains (HEAD was cut from `origin/release/X.Y`), else the state trunk.
|
|
42
|
+
A `release/X.Y` with no commits of its own yet cannot be told apart from the trunk; pass
|
|
43
|
+
the base explicitly for a release-only fix made right after the cut.
|
|
44
|
+
3. Without `RELEASING.md`: the forge default branch (`forge_default_branch`: the forge API,
|
|
45
|
+
then `origin/HEAD`, then `main`) — the same answer the skills used before the model.
|
|
46
|
+
|
|
47
|
+
Show the resolved base in the PR summary (`<head> → <base>`).
|
|
48
|
+
|
|
49
|
+
## Sync-merge guard
|
|
50
|
+
|
|
51
|
+
```bash
|
|
52
|
+
bash "$GUARD" sync-check --base "$BASE"
|
|
53
|
+
```
|
|
54
|
+
|
|
55
|
+
Skipped (`result=skipped`, exit 0) without `RELEASING.md`. Otherwise a **long-lived
|
|
56
|
+
branch** is the state `trunk` or any `release/*` branch, and the check refuses (exit 3)
|
|
57
|
+
when either holds:
|
|
58
|
+
|
|
59
|
+
- **Long-lived head:** the head branch (`git branch --show-current`) is long-lived, the
|
|
60
|
+
base is long-lived, and they differ — for example a PR from `release/0.5` into `main`.
|
|
61
|
+
- **Sync merge in the commits:** for each merge commit `M` in
|
|
62
|
+
`git rev-list --merges origin/<base>..HEAD`, with second parent `P = git rev-parse M^2`:
|
|
63
|
+
- if `git merge-base --is-ancestor P origin/<base>` succeeds, `M` only merged the base
|
|
64
|
+
back in — allowed;
|
|
65
|
+
- otherwise, if `git merge-base --is-ancestor P <tip>` succeeds for any tip in
|
|
66
|
+
`origin/<trunk>` plus `git for-each-ref --format='%(refname:short)' 'refs/remotes/origin/release/*'`
|
|
67
|
+
(the base's own tip excluded), `M` brings another long-lived branch into this PR —
|
|
68
|
+
refused.
|
|
69
|
+
|
|
70
|
+
Merging another topic branch passes. Backport PRs pass: they are cherry-picks
|
|
71
|
+
(`git cherry-pick -x`) and contain no merge commits.
|
|
72
|
+
|
|
73
|
+
On refusal, do **not** create the PR. Show the helper's `reason=` line, cite
|
|
74
|
+
`branching-model.md` ("Rules") (rule 3: never merge one long-lived
|
|
75
|
+
branch into another), and suggest the fix: rebase the topic branch onto `origin/<base>`
|
|
76
|
+
without the merge, or move a fix between the trunk and a maintenance branch with
|
|
77
|
+
`/ycc:backport`. A refusal also skips any `--ci` loop, since no PR was created.
|
|
78
|
+
|
|
79
|
+
## Backport prompt
|
|
80
|
+
|
|
81
|
+
```bash
|
|
82
|
+
bash "$GUARD" backport-label --base "$BASE" --title "$PR_TITLE" [--labels "type:bug,area:x"]
|
|
83
|
+
```
|
|
84
|
+
|
|
85
|
+
It prints `backport=0` with a `reason=` line, or `backport=1` with `branch=` and `label=`.
|
|
86
|
+
It answers `backport=1` only when all of these hold:
|
|
87
|
+
|
|
88
|
+
- `RELEASING.md` exists with `model: release-branches` and a non-empty `maintenance` list;
|
|
89
|
+
- the base is the state trunk (a PR into `release/X.Y` is already the release-only fix);
|
|
90
|
+
- the change is a fix: the PR title matches `^fix(\([^)]*\))?!?:`, a commit subject in
|
|
91
|
+
`origin/<base>..HEAD` does, or the PR carries the `type:bug` label.
|
|
92
|
+
|
|
93
|
+
`branch` is `latest_maintenance`; `label` is `backport_label` with `{X.Y}` replaced (for
|
|
94
|
+
example `backport:0.5`).
|
|
95
|
+
|
|
96
|
+
When `backport=1`, ask before creating the PR:
|
|
97
|
+
|
|
98
|
+
```
|
|
99
|
+
Backport to <branch>? (yes/no)
|
|
100
|
+
```
|
|
101
|
+
|
|
102
|
+
On **yes**, after the PR exists:
|
|
103
|
+
|
|
104
|
+
1. Add the label. GitHub: `gh pr edit <N> --add-label <label>` (or
|
|
105
|
+
`gh api -X POST repos/{owner}/{repo}/issues/<N>/labels -f 'labels[]=<label>'`, or the
|
|
106
|
+
MCP equivalent). Forgejo/Gitea: add it in the web UI. If the label does not exist on the
|
|
107
|
+
repo, say so and offer `gh label create <label> --description "Backport to <branch>"`;
|
|
108
|
+
`releaser` normally creates it with the minor release.
|
|
109
|
+
2. Tell the user: `After #<N> merges, run /ycc:backport <N> to open the <branch> PR.`
|
|
110
|
+
|
|
111
|
+
On **no**, create the PR without the label. Never run the backport before the merge.
|
|
112
|
+
|
|
113
|
+
## Checking an existing PR
|
|
114
|
+
|
|
115
|
+
`code-review` PR mode compares the PR's `baseRefName` with the base the state
|
|
116
|
+
expects for its head:
|
|
117
|
+
|
|
118
|
+
```bash
|
|
119
|
+
git fetch origin "<headRefName>" # a fork PR: git fetch origin "pull/<N>/head"
|
|
120
|
+
bash "{{package-root}}/shared/scripts/release-state.sh" get # present=0 → skip
|
|
121
|
+
EXPECTED=$(bash "{{package-root}}/shared/scripts/release-state.sh" base --head FETCH_HEAD)
|
|
122
|
+
```
|
|
123
|
+
|
|
124
|
+
When `EXPECTED` differs from `baseRefName`, report a MEDIUM finding naming both branches
|
|
125
|
+
and citing `branching-model.md` ("Where does my change go").
|
|
126
|
+
`release-state.sh base` cannot recognize a head cut from a `release/X.Y` that has no
|
|
127
|
+
commits of its own yet, so when the PR targets `release/X.Y` and `EXPECTED` is the trunk,
|
|
128
|
+
say in the finding that the base is correct if this is a release-only fix. A malformed
|
|
129
|
+
block (exit 2) skips the comparison; mention the parse error and `/ycc:release-model --audit`
|
|
130
|
+
in the review summary instead.
|
|
131
|
+
|
|
132
|
+
## Missing or malformed state
|
|
133
|
+
|
|
134
|
+
Follows `branching-model.md` ("Missing or malformed state"):
|
|
135
|
+
|
|
136
|
+
- **No `RELEASING.md`:** base = forge default branch, the guard is skipped, no backport
|
|
137
|
+
prompt. Add one line to the summary suggesting `/ycc:release-model` to record the
|
|
138
|
+
branching model.
|
|
139
|
+
- **Malformed block** (exit 2 from any subcommand): stop before creating the PR, show the
|
|
140
|
+
parse error, and point at `/ycc:release-model --audit`. Never guess a base from a broken
|
|
141
|
+
block; an explicit base does not bypass this, because the guard still reads the state.
|
|
142
|
+
- **A branch named in the state is missing on `origin`:** `base` falls back to the trunk;
|
|
143
|
+
mention the missing branch and continue.
|
|
@@ -0,0 +1,141 @@
|
|
|
1
|
+
# Review Artifact Format (Shared Reference)
|
|
2
|
+
|
|
3
|
+
## Contents
|
|
4
|
+
|
|
5
|
+
- File locations
|
|
6
|
+
- Template
|
|
7
|
+
- Quick-mode variant
|
|
8
|
+
- Finding ID rules
|
|
9
|
+
- Status field rules
|
|
10
|
+
- Required fields per finding
|
|
11
|
+
|
|
12
|
+
Canonical schema for review artifacts written to `docs/prps/reviews/`.
|
|
13
|
+
`/ycc:code-review` writes it (both modes). `/ycc:review-fix`, `/ycc:quick-fix`,
|
|
14
|
+
and `/ycc:quick-review` parse it. Do not deviate — downstream skills parse
|
|
15
|
+
these fields mechanically.
|
|
16
|
+
|
|
17
|
+
## File locations
|
|
18
|
+
|
|
19
|
+
| Mode | Path |
|
|
20
|
+
| ----- | ----------------------------------------------------- |
|
|
21
|
+
| Local | `docs/prps/reviews/local-{YYYYMMDD-HHMMSS}-review.md` |
|
|
22
|
+
| PR | `docs/prps/reviews/pr-{NUMBER}-review.md` |
|
|
23
|
+
| Quick | `docs/prps/reviews/quick-{YYYYMMDD-HHMMSS}-review.md` |
|
|
24
|
+
|
|
25
|
+
## Template
|
|
26
|
+
|
|
27
|
+
```markdown
|
|
28
|
+
# [Local Review | PR Review #<NUMBER>] — <TITLE or "Uncommitted Changes">
|
|
29
|
+
|
|
30
|
+
**Reviewed**: <ISO date>
|
|
31
|
+
**Mode**: Local | PR
|
|
32
|
+
**Author**: <author | "local">
|
|
33
|
+
**Branch**: <head> → <base>
|
|
34
|
+
**Decision**: APPROVE | REQUEST CHANGES | BLOCK | COMMENT
|
|
35
|
+
|
|
36
|
+
## Worktree Setup
|
|
37
|
+
|
|
38
|
+
<!-- Only emitted when WORKTREE_ACTIVE=true. Lists only the feature worktree; fixers run inside this path. -->
|
|
39
|
+
|
|
40
|
+
- **Parent**: <repo-root>/.opencode/worktrees/<repo>-pr-<N>/ (branch: <pr-head-branch>)
|
|
41
|
+
|
|
42
|
+
## Summary
|
|
43
|
+
|
|
44
|
+
<1-2 sentence overall assessment>
|
|
45
|
+
|
|
46
|
+
## Findings
|
|
47
|
+
|
|
48
|
+
### CRITICAL
|
|
49
|
+
|
|
50
|
+
- **[F001]** `file.ts:42` — <description>
|
|
51
|
+
- **Status**: Open
|
|
52
|
+
- **Category**: <Security | Correctness | Type Safety | Performance | Pattern Compliance | Completeness | Maintainability>
|
|
53
|
+
- **Suggested fix**: <concrete, actionable fix>
|
|
54
|
+
|
|
55
|
+
### HIGH
|
|
56
|
+
|
|
57
|
+
- **[F002]** `file.ts:73` — <description>
|
|
58
|
+
- **Status**: Open
|
|
59
|
+
- **Category**: ...
|
|
60
|
+
- **Suggested fix**: ...
|
|
61
|
+
|
|
62
|
+
### MEDIUM
|
|
63
|
+
|
|
64
|
+
- **[F003]** ...
|
|
65
|
+
- **Status**: Open
|
|
66
|
+
- ...
|
|
67
|
+
|
|
68
|
+
### LOW
|
|
69
|
+
|
|
70
|
+
- **[F004]** ...
|
|
71
|
+
- **Status**: Open
|
|
72
|
+
- ...
|
|
73
|
+
|
|
74
|
+
## Validation Results
|
|
75
|
+
|
|
76
|
+
| Check | Result |
|
|
77
|
+
| ---------- | --------------------- |
|
|
78
|
+
| Type check | Pass / Fail / Skipped |
|
|
79
|
+
| Lint | Pass / Fail / Skipped |
|
|
80
|
+
| Tests | Pass / Fail / Skipped |
|
|
81
|
+
| Build | Pass / Fail / Skipped |
|
|
82
|
+
|
|
83
|
+
## Files Reviewed
|
|
84
|
+
|
|
85
|
+
- `file1.ts` (Modified)
|
|
86
|
+
- `file2.ts` (Added)
|
|
87
|
+
- `file3.ts` (Deleted)
|
|
88
|
+
```
|
|
89
|
+
|
|
90
|
+
`## Worktree Setup` sits between `**Decision**:` and `## Summary`, and only when
|
|
91
|
+
the review ran with worktree isolation.
|
|
92
|
+
|
|
93
|
+
## Quick-mode variant
|
|
94
|
+
|
|
95
|
+
Quick reviews omit `## Validation Results` (no toolchain runs) and
|
|
96
|
+
`## Worktree Setup` (no worktree is ever created). All other sections — Header,
|
|
97
|
+
Summary, Findings (with full `[F###]`, `Status:`, `Category:`,
|
|
98
|
+
`Suggested fix:` fields per finding), Files Reviewed — are identical to the
|
|
99
|
+
standard template, so `/ycc:review-fix` parses them without special-casing.
|
|
100
|
+
|
|
101
|
+
## Finding ID rules
|
|
102
|
+
|
|
103
|
+
- Ordering: IDs are assigned ordered by severity (CRITICAL first), then by
|
|
104
|
+
file path.
|
|
105
|
+
- Sequential: IDs start at `F001` and increment by one.
|
|
106
|
+
- Stable per file: once assigned in a given review artifact, an ID is never
|
|
107
|
+
renumbered, even after a fix is applied.
|
|
108
|
+
- Per-artifact: IDs are scoped to a single review file. A fresh code-review
|
|
109
|
+
pass generates a new file with its own `F001`-restart counter.
|
|
110
|
+
- Assigned in REPORT phase: in both sequential and parallel paths, IDs are
|
|
111
|
+
assigned during the REPORT phase (Phase 3 for local, Phase 6 for PR), AFTER
|
|
112
|
+
merge and sort. Reviewer agents in parallel mode do NOT assign IDs.
|
|
113
|
+
|
|
114
|
+
## Status field rules
|
|
115
|
+
|
|
116
|
+
Every finding has a `Status` field. Valid values:
|
|
117
|
+
|
|
118
|
+
| Status | Meaning |
|
|
119
|
+
| ------ | ------------------------------------------------------------------------------------------------------------ |
|
|
120
|
+
| Open | Default on first write. Not yet processed by `/ycc:review-fix`, or below the fix skill's severity threshold. |
|
|
121
|
+
| Fixed | Successfully fixed by `/ycc:review-fix`. Set by the fix skill — code-review itself never writes this. |
|
|
122
|
+
| Failed | Attempted by `/ycc:review-fix` but the fix broke validation. Set by the fix skill. |
|
|
123
|
+
|
|
124
|
+
`/ycc:code-review` and `/ycc:quick-review` only ever write `Status: Open`. All
|
|
125
|
+
other states are set in place by `/ycc:review-fix` (or, for inline hand-offs,
|
|
126
|
+
reported by `/ycc:quick-fix` without editing any artifact).
|
|
127
|
+
|
|
128
|
+
## Required fields per finding
|
|
129
|
+
|
|
130
|
+
Every finding includes these four lines (in this order) so the artifact is
|
|
131
|
+
machine-parseable:
|
|
132
|
+
|
|
133
|
+
```
|
|
134
|
+
- **[F###]** `file:line` — <description>
|
|
135
|
+
- **Status**: <Open|Fixed|Failed>
|
|
136
|
+
- **Category**: <category>
|
|
137
|
+
- **Suggested fix**: <concrete fix>
|
|
138
|
+
```
|
|
139
|
+
|
|
140
|
+
Findings missing a `Suggested fix` line are valid but are skipped by
|
|
141
|
+
`/ycc:review-fix` (flagged for human judgment).
|
|
@@ -0,0 +1,161 @@
|
|
|
1
|
+
# Review Checklist (Shared Reference)
|
|
2
|
+
|
|
3
|
+
## Contents
|
|
4
|
+
|
|
5
|
+
- Severity Rubric
|
|
6
|
+
- Local / Quick Review — Single-Pass Checklist (Path A)
|
|
7
|
+
- PR Review — Single-Pass Checklist (Path A, 7 Categories)
|
|
8
|
+
- Parallel Reviewer Roster (Path B / Path C)
|
|
9
|
+
- Standard Findings Format (Reviewer Output)
|
|
10
|
+
- Merge Procedure (Path B / Path C)
|
|
11
|
+
|
|
12
|
+
> Canonical review checklist, severity rubric, parallel-reviewer roster, and
|
|
13
|
+
> standard findings format. Consumed by `code-review` (local + PR modes)
|
|
14
|
+
> and `quick-review`. Skills that delegate here must not duplicate the
|
|
15
|
+
> content below — reference this file instead.
|
|
16
|
+
|
|
17
|
+
---
|
|
18
|
+
|
|
19
|
+
## Severity Rubric
|
|
20
|
+
|
|
21
|
+
| Severity | Meaning | Action |
|
|
22
|
+
| ------------ | ------------------------------------------- | ----------------------- |
|
|
23
|
+
| **CRITICAL** | Security vulnerability or data loss risk | Must fix before merge |
|
|
24
|
+
| **HIGH** | Bug or logic error likely to cause issues | Should fix before merge |
|
|
25
|
+
| **MEDIUM** | Code quality issue or missing best practice | Fix recommended |
|
|
26
|
+
| **LOW** | Style nit or minor suggestion | Optional |
|
|
27
|
+
|
|
28
|
+
Findings are grouped by severity in the artifact under `### CRITICAL`,
|
|
29
|
+
`### HIGH`, `### MEDIUM`, `### LOW`, in that order.
|
|
30
|
+
|
|
31
|
+
---
|
|
32
|
+
|
|
33
|
+
## Local / Quick Review — Single-Pass Checklist (Path A)
|
|
34
|
+
|
|
35
|
+
Applied to uncommitted changes on `HEAD`. Read each changed file in full.
|
|
36
|
+
Flag only gaps that affect correctness or the stated requirements. Checklist
|
|
37
|
+
items are prompts for investigation, not automatic findings or style quotas.
|
|
38
|
+
|
|
39
|
+
**Security Issues (CRITICAL):**
|
|
40
|
+
|
|
41
|
+
- Hardcoded credentials, API keys, tokens
|
|
42
|
+
- SQL injection vulnerabilities
|
|
43
|
+
- XSS vulnerabilities
|
|
44
|
+
- Missing input validation
|
|
45
|
+
- Insecure dependencies
|
|
46
|
+
- Path traversal risks
|
|
47
|
+
|
|
48
|
+
**Code Quality (HIGH):**
|
|
49
|
+
|
|
50
|
+
- Functions > 50 lines
|
|
51
|
+
- Files > 800 lines
|
|
52
|
+
- Nesting depth > 4 levels
|
|
53
|
+
- Missing error handling
|
|
54
|
+
- `console.log` statements
|
|
55
|
+
- TODO/FIXME comments
|
|
56
|
+
- Missing JSDoc for public APIs
|
|
57
|
+
|
|
58
|
+
**Best Practices (MEDIUM):**
|
|
59
|
+
|
|
60
|
+
- Mutation patterns (use immutable instead)
|
|
61
|
+
- Emoji usage in code/comments
|
|
62
|
+
- Missing tests for new code
|
|
63
|
+
- Accessibility issues (a11y)
|
|
64
|
+
|
|
65
|
+
---
|
|
66
|
+
|
|
67
|
+
## PR Review — Single-Pass Checklist (Path A, 7 Categories)
|
|
68
|
+
|
|
69
|
+
Applied to PR head-revision file contents. Each category is independent —
|
|
70
|
+
a single finding may touch several. Flag only gaps that affect correctness or
|
|
71
|
+
the stated requirements.
|
|
72
|
+
|
|
73
|
+
| Category | What to Check |
|
|
74
|
+
| ---------------------- | ----------------------------------------------------------------------------- |
|
|
75
|
+
| **Correctness** | Logic errors, off-by-ones, null handling, edge cases, race conditions |
|
|
76
|
+
| **Type Safety** | Type mismatches, unsafe casts, `any` usage, missing generics |
|
|
77
|
+
| **Pattern Compliance** | Matches project conventions (naming, file structure, error handling, imports) |
|
|
78
|
+
| **Security** | Injection, auth gaps, secret exposure, SSRF, path traversal, XSS |
|
|
79
|
+
| **Performance** | N+1 queries, missing indexes, unbounded loops, memory leaks, large payloads |
|
|
80
|
+
| **Completeness** | Missing tests, missing error handling, incomplete migrations, missing docs |
|
|
81
|
+
| **Maintainability** | Dead code, magic numbers, deep nesting, unclear naming, missing types |
|
|
82
|
+
|
|
83
|
+
---
|
|
84
|
+
|
|
85
|
+
## Parallel Reviewer Roster (Path B / Path C)
|
|
86
|
+
|
|
87
|
+
Three standalone `code-reviewer` sub-agents use foreground native `subagent` calls with `background=false`. Read [standalone-dispatch.md](../../shared/references/standalone-dispatch.md) for the complete dispatch, result, artifact, and failure contract.
|
|
88
|
+
|
|
89
|
+
### Local / Quick Mode Roster
|
|
90
|
+
|
|
91
|
+
| Reviewer | Focus | Checklist Items |
|
|
92
|
+
| ---------------------- | --------------- | ----------------------------------------------------------------------------------------------------------------------------- |
|
|
93
|
+
| `correctness-reviewer` | Code Quality | Functions > 50 lines, files > 800 lines, nesting > 4 levels, missing error handling, `console.log`, TODO/FIXME, missing JSDoc |
|
|
94
|
+
| `security-reviewer` | Security Issues | Hardcoded credentials/keys/tokens, SQL injection, XSS, missing input validation, insecure deps, path traversal |
|
|
95
|
+
| `quality-reviewer` | Best Practices | Mutation patterns, emoji in code/comments, missing tests, accessibility (a11y) |
|
|
96
|
+
|
|
97
|
+
### PR Mode Roster
|
|
98
|
+
|
|
99
|
+
| Reviewer | Categories | What to Check |
|
|
100
|
+
| ---------------------- | -------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
|
|
101
|
+
| `correctness-reviewer` | Correctness, Type Safety, Completeness | Logic errors, off-by-ones, null handling, edge cases, race conditions, type mismatches, unsafe casts, `any` usage, missing generics, missing tests, incomplete migrations |
|
|
102
|
+
| `security-reviewer` | Security, Performance | Injection, auth gaps, secret exposure, SSRF, path traversal, XSS, N+1 queries, missing indexes, unbounded loops, memory leaks, large payloads |
|
|
103
|
+
| `quality-reviewer` | Pattern Compliance, Maintainability | Project conventions (naming, file structure, error handling, imports), dead code, magic numbers, deep nesting, unclear naming, missing types |
|
|
104
|
+
|
|
105
|
+
---
|
|
106
|
+
|
|
107
|
+
## Standard Findings Format (Reviewer Output)
|
|
108
|
+
|
|
109
|
+
Each parallel reviewer returns findings in this shape (pre-merge, before
|
|
110
|
+
finding-ID assignment):
|
|
111
|
+
|
|
112
|
+
```markdown
|
|
113
|
+
## Findings
|
|
114
|
+
|
|
115
|
+
### CRITICAL
|
|
116
|
+
|
|
117
|
+
- `file.ts:42` — [description] [category]
|
|
118
|
+
- Suggested fix: [fix]
|
|
119
|
+
|
|
120
|
+
### HIGH
|
|
121
|
+
|
|
122
|
+
- ...
|
|
123
|
+
|
|
124
|
+
### MEDIUM
|
|
125
|
+
|
|
126
|
+
- ...
|
|
127
|
+
|
|
128
|
+
### LOW
|
|
129
|
+
|
|
130
|
+
- ...
|
|
131
|
+
```
|
|
132
|
+
|
|
133
|
+
The `[category]` tag applies to PR mode; local/quick mode may omit it (the focus
|
|
134
|
+
split already implies a category).
|
|
135
|
+
|
|
136
|
+
---
|
|
137
|
+
|
|
138
|
+
## Merge Procedure (Path B / Path C)
|
|
139
|
+
|
|
140
|
+
After all 3 foreground reviewer calls return candidate reports and their scratch artifacts have been checked:
|
|
141
|
+
|
|
142
|
+
1. For any reviewer whose `subagent` return was empty, missing, or malformed,
|
|
143
|
+
treat that reviewer as a failure for that role (do not fabricate findings
|
|
144
|
+
for it). In Path B only, the scratch file at
|
|
145
|
+
`docs/prps/reviews/.review-scratch/<run-id>/<reviewer-name>.md` is the
|
|
146
|
+
calling skill's own copy of the inline returns it already received, not a
|
|
147
|
+
second source to recover from.
|
|
148
|
+
2. Combine by severity (CRITICAL first, then HIGH, MEDIUM, LOW).
|
|
149
|
+
3. De-duplicate findings at the same `file:line` (if two reviewers flagged the
|
|
150
|
+
same issue, keep the more severe one and annotate which reviewers concurred).
|
|
151
|
+
4. Sort within each severity by file path.
|
|
152
|
+
5. Attach the reviewer source to each finding (`[correctness]`, `[security]`,
|
|
153
|
+
`[quality]`) for traceability.
|
|
154
|
+
|
|
155
|
+
Pass the merged findings to the REPORT phase as if they came from a single-pass
|
|
156
|
+
review.
|
|
157
|
+
|
|
158
|
+
**Cleanup**: after a successful merge, the calling skill should remove the
|
|
159
|
+
`docs/prps/reviews/.review-scratch/<run-id>/` directory.
|
|
160
|
+
|
|
161
|
+
---
|
|
@@ -0,0 +1,71 @@
|
|
|
1
|
+
# Review Dispatch
|
|
2
|
+
|
|
3
|
+
## Contents
|
|
4
|
+
|
|
5
|
+
- Standalone dispatch
|
|
6
|
+
- Scratch backstop and cleanup
|
|
7
|
+
|
|
8
|
+
## Standalone dispatch (Path B)
|
|
9
|
+
|
|
10
|
+
Follow the spawn/return contract in
|
|
11
|
+
`{{package-root}}/shared/references/standalone-dispatch.md` for
|
|
12
|
+
how reviewers are dispatched and how their results are collected.
|
|
13
|
+
|
|
14
|
+
Dispatch 3 standalone `code-reviewer` sub-agents in parallel in a single
|
|
15
|
+
message with multiple native `subagent` calls. Use the mode-appropriate roster
|
|
16
|
+
(Local / Quick Mode Roster or PR Mode Roster) and the Standard Findings Format
|
|
17
|
+
from `{{package-root}}/shared/references/review-checklist.md`.
|
|
18
|
+
That reference defines the roster, severity rubric, findings-format directive
|
|
19
|
+
and merge procedure. Prompt contract follows below.
|
|
20
|
+
|
|
21
|
+
Run-id and scratch paths per mode:
|
|
22
|
+
|
|
23
|
+
| Mode | run-id | scratch dir |
|
|
24
|
+
| ----- | --------------------------------------------------------------------------------------------------------- | ------------------------------------------------------ |
|
|
25
|
+
| Local | `local-<TIMESTAMP>` (one canonical timestamp per invocation; reused for the Phase 3 review filename) | `docs/prps/reviews/.review-scratch/local-<TIMESTAMP>/` |
|
|
26
|
+
| PR | `pr-<NUMBER>` (PR numbers are unique; no timestamp) | `docs/prps/reviews/.review-scratch/pr-<NUMBER>/` |
|
|
27
|
+
| Quick | `quick-<TIMESTAMP>` (reused for the artifact filename if the user later selects an artifact-writing path) | `docs/prps/reviews/.review-scratch/quick-<TIMESTAMP>/` |
|
|
28
|
+
|
|
29
|
+
Each reviewer prompt includes the instruction "flag only gaps that affect correctness or the stated requirements", plus:
|
|
30
|
+
|
|
31
|
+
1. The list of changed files (mode-specific: `git diff --name-only HEAD` for
|
|
32
|
+
local/quick; PR number + head revision + changed-file list for PR), plus the
|
|
33
|
+
diff itself and any command output (validation, build, test results) the
|
|
34
|
+
reviewer needs — reviewers are read-only and cannot run commands.
|
|
35
|
+
2. Relevant context (AGENTS.md rules, PRP artifacts, PR description) — PR mode only.
|
|
36
|
+
3. Its assigned focus / categories and what to check (from the roster tables
|
|
37
|
+
in `review-checklist.md` — `{{package-root}}/shared/references/review-checklist.md`).
|
|
38
|
+
4. The severity rubric.
|
|
39
|
+
5. A directive to return findings in the **Standard Findings Format** below.
|
|
40
|
+
6. (Path B only) The spawn/return contract loaded by the caller from
|
|
41
|
+
`{{package-root}}/shared/references/standalone-dispatch.md`.
|
|
42
|
+
The reviewer is dispatched read-only (Read/Grep/Glob): it returns its
|
|
43
|
+
findings inline as the `subagent` result and never writes files or runs
|
|
44
|
+
commands. The prompt must supply the diff and any command output the
|
|
45
|
+
reviewer needs.
|
|
46
|
+
|
|
47
|
+
After all 3 native `subagent` calls return, the calling skill (not the reviewer) persists
|
|
48
|
+
each valid inline return to its scratch copy at
|
|
49
|
+
`docs/prps/reviews/.review-scratch/<run-id>/<reviewer-name>.md`, where
|
|
50
|
+
`<run-id>` is `local-<YYYYMMDD-HHMMSS>` for local mode, `pr-<NUMBER>` for PR
|
|
51
|
+
mode, `quick-<YYYYMMDD-HHMMSS>` for quick mode. An empty, missing, or malformed
|
|
52
|
+
return marks that reviewer failed (merge procedure in review-checklist.md); the
|
|
53
|
+
scratch copy is not a second recovery source. Pass the merged findings to
|
|
54
|
+
the REPORT phase (Phase 3 local / Phase 6 PR) as if they came from a
|
|
55
|
+
single-pass review. Scratch cleanup happens after the artifact write; see
|
|
56
|
+
below.
|
|
57
|
+
|
|
58
|
+
Validation commands still run sequentially in the main skill —
|
|
59
|
+
parallelization applies only to the review pass.
|
|
60
|
+
|
|
61
|
+
## Scratch backstop and cleanup
|
|
62
|
+
|
|
63
|
+
- code-review local mode: remove `docs/prps/reviews/.review-scratch/local-<TIMESTAMP>/`
|
|
64
|
+
once the review artifact has been written successfully (Phase 3).
|
|
65
|
+
- code-review PR mode: remove `docs/prps/reviews/.review-scratch/pr-<NUMBER>/`
|
|
66
|
+
once the artifact has been written and (when `WORKTREE_ACTIVE=true`)
|
|
67
|
+
committed successfully (Phase 6).
|
|
68
|
+
- quick-review: remove `docs/prps/reviews/.review-scratch/quick-<TIMESTAMP>/`
|
|
69
|
+
at the end of Phase 5 (HAND-OFF) unconditionally — including on "Discard"
|
|
70
|
+
and "Apply fixes", which never write a permanent artifact. The scratch file
|
|
71
|
+
is the one ephemeral exception to quick-review's artifact-free guarantee.
|
|
@@ -0,0 +1,159 @@
|
|
|
1
|
+
# Session State Contract
|
|
2
|
+
|
|
3
|
+
## Contents
|
|
4
|
+
|
|
5
|
+
- Store
|
|
6
|
+
- Filename
|
|
7
|
+
- Discovery (resume)
|
|
8
|
+
- Interpretation Rules
|
|
9
|
+
- File Format
|
|
10
|
+
|
|
11
|
+
Single source of truth for the session-file store, filename, discovery rules, and Markdown format shared by `/ycc:save-session` (writer) and `/ycc:resume-session` (reader).
|
|
12
|
+
|
|
13
|
+
## Store
|
|
14
|
+
|
|
15
|
+
- Canonical store: `~/.config/opencode/session-data/` — global (user home), not project-local.
|
|
16
|
+
- Legacy fallback (read-only): `~/.config/opencode/sessions/`.
|
|
17
|
+
|
|
18
|
+
## Filename
|
|
19
|
+
|
|
20
|
+
`~/.config/opencode/session-data/YYYY-MM-DD-<short-id>-session.tmp`
|
|
21
|
+
|
|
22
|
+
- Date: today's actual date (`date +%Y-%m-%d`).
|
|
23
|
+
- `<short-id>` characters: letters `a-z` / `A-Z`, digits `0-9`, hyphens `-`, underscores `_`.
|
|
24
|
+
- Recommended: lowercase letters + digits + hyphens, 8+ characters to avoid collisions (recommended, not mandatory).
|
|
25
|
+
- Valid examples: `abc123de`, `a1b2c3d4`, `frontend-worktree-1`, `ChezMoi_2`
|
|
26
|
+
- Avoid for new files: `A`, `test_id1`, `ABC123de`
|
|
27
|
+
- Full valid filename example: `2024-01-15-abc123de-session.tmp`
|
|
28
|
+
- Legacy filename `YYYY-MM-DD-session.tmp` is still valid and readable, but new session files should prefer the short-id form to avoid same-day collisions.
|
|
29
|
+
- Each session gets its own file — never append to a previous session's file.
|
|
30
|
+
|
|
31
|
+
## Discovery (resume)
|
|
32
|
+
|
|
33
|
+
- **No argument:** the most recently modified `*-session.tmp` file in `~/.config/opencode/session-data/` only. If the folder does not exist or has no matching files, report that none were found and stop.
|
|
34
|
+
- **Date argument (`YYYY-MM-DD`):** search `~/.config/opencode/session-data/` first, then the legacy `~/.config/opencode/sessions/`, for `YYYY-MM-DD-session.tmp` (legacy format) or `YYYY-MM-DD-<shortid>-session.tmp` (current format). Load the most recently modified matching variant for that date, regardless of format. This is not a global newest-across-both-stores search.
|
|
35
|
+
- **File path argument:** read that file directly (e.g., forwarded from a sub-agent). The format is the same regardless of source.
|
|
36
|
+
- If not found, report clearly and stop.
|
|
37
|
+
|
|
38
|
+
## Interpretation Rules
|
|
39
|
+
|
|
40
|
+
- Every section is written honestly; do not skip sections — write "Nothing yet" or "N/A" if a section genuinely has no content. An incomplete file is worse than an honest empty section.
|
|
41
|
+
- "What WORKED" lists only confirmed-working items, each with evidence of WHY it is known to work (test passed, ran in browser, Postman returned 200, etc.). Without evidence, the item belongs in "What Has NOT Been Tried Yet".
|
|
42
|
+
- "What Did NOT Work (and why)" is the most important section. List every failed approach with the EXACT reason ("threw X error because Y" is useful; "didn't work" is not) so the next session does not retry it.
|
|
43
|
+
- "Exact Next Step": when not known, write the fallback text shown in the template; readers treat it as "no next step defined".
|
|
44
|
+
- "Environment & Setup Notes" is the only optional section: omit it entirely when there is nothing to record. All other sections are mandatory.
|
|
45
|
+
- If saving mid-session, save what is known so far and mark in-progress items clearly.
|
|
46
|
+
|
|
47
|
+
## File Format
|
|
48
|
+
|
|
49
|
+
```markdown
|
|
50
|
+
# Session: YYYY-MM-DD
|
|
51
|
+
|
|
52
|
+
**Started:** [approximate time if known]
|
|
53
|
+
**Last Updated:** [current time]
|
|
54
|
+
**Project:** [project name or path]
|
|
55
|
+
**Topic:** [one-line summary of what this session was about]
|
|
56
|
+
|
|
57
|
+
---
|
|
58
|
+
|
|
59
|
+
## What We Are Building
|
|
60
|
+
|
|
61
|
+
[1-3 paragraphs describing the feature, bug fix, or task. Include enough
|
|
62
|
+
context that someone with zero memory of this session can understand the goal.
|
|
63
|
+
Include: what it does, why it's needed, how it fits into the larger system.]
|
|
64
|
+
|
|
65
|
+
---
|
|
66
|
+
|
|
67
|
+
## What WORKED (with evidence)
|
|
68
|
+
|
|
69
|
+
[List only things that are confirmed working. For each item include WHY you
|
|
70
|
+
know it works — test passed, ran in browser, Postman returned 200, etc.
|
|
71
|
+
Without evidence, move it to "Not Tried Yet" instead.]
|
|
72
|
+
|
|
73
|
+
- **[thing that works]** — confirmed by: [specific evidence]
|
|
74
|
+
- **[thing that works]** — confirmed by: [specific evidence]
|
|
75
|
+
|
|
76
|
+
If nothing is confirmed working yet: "Nothing confirmed working yet — all approaches still in progress or untested."
|
|
77
|
+
|
|
78
|
+
---
|
|
79
|
+
|
|
80
|
+
## What Did NOT Work (and why)
|
|
81
|
+
|
|
82
|
+
[This is the most important section. List every approach tried that failed.
|
|
83
|
+
For each failure write the EXACT reason so the next session doesn't retry it.
|
|
84
|
+
Be specific: "threw X error because Y" is useful. "didn't work" is not.]
|
|
85
|
+
|
|
86
|
+
- **[approach tried]** — failed because: [exact reason / error message]
|
|
87
|
+
- **[approach tried]** — failed because: [exact reason / error message]
|
|
88
|
+
|
|
89
|
+
If nothing failed: "No failed approaches yet."
|
|
90
|
+
|
|
91
|
+
---
|
|
92
|
+
|
|
93
|
+
## What Has NOT Been Tried Yet
|
|
94
|
+
|
|
95
|
+
[Approaches that seem promising but haven't been attempted. Ideas from the
|
|
96
|
+
conversation. Alternative solutions worth exploring. Be specific enough that
|
|
97
|
+
the next session knows exactly what to try.]
|
|
98
|
+
|
|
99
|
+
- [approach / idea]
|
|
100
|
+
- [approach / idea]
|
|
101
|
+
|
|
102
|
+
If nothing is queued: "No specific untried approaches identified."
|
|
103
|
+
|
|
104
|
+
---
|
|
105
|
+
|
|
106
|
+
## Current State of Files
|
|
107
|
+
|
|
108
|
+
[Every file touched this session. Be precise about what state each file is in.]
|
|
109
|
+
|
|
110
|
+
| File | Status | Notes |
|
|
111
|
+
| ----------------- | -------------- | -------------------------- |
|
|
112
|
+
| `path/to/file.ts` | PASS: Complete | [what it does] |
|
|
113
|
+
| `path/to/file.ts` | In Progress | [what's done, what's left] |
|
|
114
|
+
| `path/to/file.ts` | FAIL: Broken | [what's wrong] |
|
|
115
|
+
| `path/to/file.ts` | Not Started | [planned but not touched] |
|
|
116
|
+
|
|
117
|
+
If no files were touched: "No files modified this session."
|
|
118
|
+
|
|
119
|
+
---
|
|
120
|
+
|
|
121
|
+
## Decisions Made
|
|
122
|
+
|
|
123
|
+
[Architecture choices, tradeoffs accepted, approaches chosen and why.
|
|
124
|
+
These prevent the next session from relitigating settled decisions.]
|
|
125
|
+
|
|
126
|
+
- **[decision]** — reason: [why this was chosen over alternatives]
|
|
127
|
+
|
|
128
|
+
If no significant decisions: "No major decisions made this session."
|
|
129
|
+
|
|
130
|
+
---
|
|
131
|
+
|
|
132
|
+
## Blockers & Open Questions
|
|
133
|
+
|
|
134
|
+
[Anything unresolved that the next session needs to address or investigate.
|
|
135
|
+
Questions that came up but weren't answered. External dependencies waiting on.]
|
|
136
|
+
|
|
137
|
+
- [blocker / open question]
|
|
138
|
+
|
|
139
|
+
If none: "No active blockers."
|
|
140
|
+
|
|
141
|
+
---
|
|
142
|
+
|
|
143
|
+
## Exact Next Step
|
|
144
|
+
|
|
145
|
+
[If known: The single most important thing to do when resuming. Be precise
|
|
146
|
+
enough that resuming requires zero thinking about where to start.]
|
|
147
|
+
|
|
148
|
+
[If not known: "Next step not determined — review 'What Has NOT Been Tried Yet'
|
|
149
|
+
and 'Blockers' sections to decide on direction before starting."]
|
|
150
|
+
|
|
151
|
+
---
|
|
152
|
+
|
|
153
|
+
## Environment & Setup Notes
|
|
154
|
+
|
|
155
|
+
[Only fill this if relevant — commands needed to run the project, env vars
|
|
156
|
+
required, services that need to be running, etc. Skip if standard setup.]
|
|
157
|
+
|
|
158
|
+
[If none: omit this section entirely.]
|
|
159
|
+
```
|