@yandy-r/ycc-opencode 0.0.0-bootstrap.0 → 6.0.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/AGENTS.md +38 -0
- package/LICENSE +21 -0
- package/README.md +42 -0
- package/agents/ansible-automation-expert.md +115 -0
- package/agents/api-docs-expert.md +146 -0
- package/agents/api-documenter.md +105 -0
- package/agents/architect.md +264 -0
- package/agents/architecture-analyst.md +99 -0
- package/agents/backport-conflict-resolver.md +134 -0
- package/agents/cloudflare-architect.md +85 -0
- package/agents/cloudflare-developer.md +196 -0
- package/agents/code-architect.md +101 -0
- package/agents/code-documenter.md +114 -0
- package/agents/code-explorer.md +99 -0
- package/agents/code-finder.md +83 -0
- package/agents/code-researcher.md +102 -0
- package/agents/code-reviewer.md +268 -0
- package/agents/code-simplifier.md +77 -0
- package/agents/codebase-advisor.md +130 -0
- package/agents/db-modifier.md +235 -0
- package/agents/docs-git-committer.md +220 -0
- package/agents/documentation-writer.md +92 -0
- package/agents/feature-researcher.md +121 -0
- package/agents/feature-writer.md +89 -0
- package/agents/frontend-ui-developer.md +98 -0
- package/agents/git-cleanup.md +173 -0
- package/agents/go-api-architect.md +172 -0
- package/agents/go-expert-architect.md +147 -0
- package/agents/implementor.md +167 -0
- package/agents/library-docs-writer.md +128 -0
- package/agents/nextjs-ux-ui-expert.md +127 -0
- package/agents/nodejs-backend-architect.md +112 -0
- package/agents/nodejs-backend-developer.md +184 -0
- package/agents/planner.md +257 -0
- package/agents/pr-comment-fixer.md +284 -0
- package/agents/practices-researcher.md +80 -0
- package/agents/project-file-cleaner.md +140 -0
- package/agents/prp-researcher.md +231 -0
- package/agents/python-developer.md +171 -0
- package/agents/python-expert-architect.md +188 -0
- package/agents/readme-generator.md +100 -0
- package/agents/release-fix-applier.md +194 -0
- package/agents/releaser.md +147 -0
- package/agents/research-specialist.md +106 -0
- package/agents/reverse-proxy-architect.md +131 -0
- package/agents/review-fixer.md +264 -0
- package/agents/root-cause-analyzer.md +105 -0
- package/agents/rust-build-resolver.md +183 -0
- package/agents/rust-expert-architect.md +149 -0
- package/agents/rust-reviewer.md +126 -0
- package/agents/sql-database-developer.md +195 -0
- package/agents/systems-engineering-expert.md +203 -0
- package/agents/terraform-architect.md +109 -0
- package/agents/terraform-developer.md +229 -0
- package/agents/test-strategy-planner.md +126 -0
- package/agents/turso-database-architect.md +139 -0
- package/agents/typescript-developer.md +170 -0
- package/agents/typescript-expert-architect.md +167 -0
- package/index.js +260 -0
- package/package.json +33 -7
- package/registration.json +4384 -0
- package/shared/references/agent-native-setup.md +121 -0
- package/shared/references/branch-prep.md +31 -0
- package/shared/references/branching-model.md +162 -0
- package/shared/references/ci-monitoring.md +445 -0
- package/shared/references/forge-detection.md +162 -0
- package/shared/references/goal-pairing.md +53 -0
- package/shared/references/pr-base-and-backport.md +143 -0
- package/shared/references/review-artifact-format.md +141 -0
- package/shared/references/review-checklist.md +161 -0
- package/shared/references/review-dispatch.md +71 -0
- package/shared/references/session-state.md +159 -0
- package/shared/references/standalone-dispatch.md +298 -0
- package/shared/references/target-capability-matrix.md +325 -0
- package/shared/references/visual-mode.md +155 -0
- package/shared/references/worktree-strategy.md +310 -0
- package/shared/scripts/backport-audit.sh +283 -0
- package/shared/scripts/ci-monitor.sh +637 -0
- package/shared/scripts/lib/backport-lib.sh +47 -0
- package/shared/scripts/lib/ci-classify.sh +103 -0
- package/shared/scripts/lib/forge.sh +264 -0
- package/shared/scripts/lib/release-state-lib.sh +300 -0
- package/shared/scripts/list-worktrees.sh +178 -0
- package/shared/scripts/merge-children.sh +82 -0
- package/shared/scripts/move-plan-to-worktree.sh +231 -0
- package/shared/scripts/pr-guard.sh +283 -0
- package/shared/scripts/prepare-feature-branch.sh +326 -0
- package/shared/scripts/release-ci-monitor.sh +671 -0
- package/shared/scripts/release-state-update.sh +216 -0
- package/shared/scripts/release-state.sh +178 -0
- package/shared/scripts/report-bundle-drift.sh +343 -0
- package/shared/scripts/require-python.sh +17 -0
- package/shared/scripts/resolve-plans-dir.sh +262 -0
- package/shared/scripts/rules-pointer.sh +20 -0
- package/shared/scripts/rules_pointer.py +267 -0
- package/shared/scripts/setup-worktree.sh +288 -0
- package/shared/scripts/validate-file-paths.sh +249 -0
- package/shared/scripts/visual-egress-guard.sh +303 -0
- package/shared/scripts/visual-recap-collect.sh +247 -0
- package/shared/scripts/worktree-paths.sh +86 -0
- package/skills/backport/SKILL.md +291 -0
- package/skills/backport/scripts/cherry-pick-pr.sh +232 -0
- package/skills/backport/scripts/find-pending.sh +199 -0
- package/skills/blueprint/SKILL.md +410 -0
- package/skills/blueprint/references/bootstrap-mapping.md +87 -0
- package/skills/bundle-author/SKILL.md +119 -0
- package/skills/bundle-author/references/surface-map.md +128 -0
- package/skills/bundle-author/references/templates/agent-template.md +21 -0
- package/skills/bundle-author/references/templates/skill-template.md +36 -0
- package/skills/bundle-author/references/when-not-to-scaffold.md +85 -0
- package/skills/bundle-author/scripts/scaffold-skill.sh +156 -0
- package/skills/bundle-release/SKILL.md +188 -0
- package/skills/bundle-release/references/release-checklist.md +196 -0
- package/skills/bundle-release/references/release-notes-template.md +48 -0
- package/skills/bundle-release/references/version-policy.md +150 -0
- package/skills/bundle-release/scripts/bump-version.sh +97 -0
- package/skills/bundle-release/scripts/draft-notes.sh +222 -0
- package/skills/bundle-release/scripts/preflight.sh +164 -0
- package/skills/bundle-release/scripts/release_versions.py +361 -0
- package/skills/clean/SKILL.md +107 -0
- package/skills/clean/references/agent-prompts.md +199 -0
- package/skills/clean/references/safety-config.md +125 -0
- package/skills/clean/scripts/detect-project-type.sh +423 -0
- package/skills/clean/scripts/generate-report.sh +245 -0
- package/skills/clean/scripts/validate-safety.sh +401 -0
- package/skills/code-report/SKILL.md +375 -0
- package/skills/code-report/scripts/check-prerequisites.sh +65 -0
- package/skills/code-report/templates/report-structure.md +202 -0
- package/skills/code-review/SKILL.md +153 -0
- package/skills/code-review/references/pr-procedure.md +311 -0
- package/skills/compatibility-audit/SKILL.md +226 -0
- package/skills/compatibility-audit/references/reading-the-report.md +159 -0
- package/skills/compatibility-audit/scripts/audit-install-assumptions.sh +372 -0
- package/skills/compatibility-audit/scripts/audit-target-features.sh +558 -0
- package/skills/deep-research/SKILL.md +251 -0
- package/skills/deep-research/references/analysis-prompts.md +702 -0
- package/skills/deep-research/references/completion-summary-template.md +66 -0
- package/skills/deep-research/references/persona-analogical.md +159 -0
- package/skills/deep-research/references/persona-archaeological.md +69 -0
- package/skills/deep-research/references/persona-contrarian.md +155 -0
- package/skills/deep-research/references/persona-futurist.md +70 -0
- package/skills/deep-research/references/persona-historical.md +142 -0
- package/skills/deep-research/references/persona-journalistic.md +69 -0
- package/skills/deep-research/references/persona-negative-space.md +70 -0
- package/skills/deep-research/references/persona-systems.md +69 -0
- package/skills/deep-research/references/synthesis-template.md +569 -0
- package/skills/deep-research/references/verification-log-template.md +32 -0
- package/skills/deep-research/scripts/check-prerequisites.sh +153 -0
- package/skills/deep-research/scripts/validate-research.sh +244 -0
- package/skills/feature-research/SKILL.md +292 -0
- package/skills/feature-research/scripts/validate-research.sh +159 -0
- package/skills/feature-research/scripts/validate-spec.sh +270 -0
- package/skills/feature-research/templates/research-agents.md +569 -0
- package/skills/feature-research/templates/spec-structure.md +437 -0
- package/skills/formatters/SKILL.md +207 -0
- package/skills/formatters/references/best-practices.md +78 -0
- package/skills/formatters/references/flag-reference.md +178 -0
- package/skills/formatters/references/stack-detection.md +119 -0
- package/skills/formatters/references/templates/husky-pre-commit.tmpl +13 -0
- package/skills/formatters/references/templates/justfile-snippet.just.tmpl +31 -0
- package/skills/formatters/references/templates/lefthook.yml.tmpl +22 -0
- package/skills/formatters/references/templates/lint-autofix.yml.tmpl +94 -0
- package/skills/formatters/references/templates/lint.yml.tmpl +85 -0
- package/skills/formatters/references/templates/makefile-snippet.mk.tmpl +34 -0
- package/skills/formatters/references/templates/package-json-scripts.json.tmpl +14 -0
- package/skills/formatters/references/templates/readme-section.md.tmpl +118 -0
- package/skills/formatters/scripts/apply-aliases.sh +245 -0
- package/skills/formatters/scripts/apply-ci.sh +136 -0
- package/skills/formatters/scripts/apply-docs.sh +187 -0
- package/skills/formatters/scripts/apply-hooks.sh +261 -0
- package/skills/formatters/scripts/bundle/format.sh +15 -0
- package/skills/formatters/scripts/bundle/go-tools.sh +119 -0
- package/skills/formatters/scripts/bundle/init-formatters.sh +517 -0
- package/skills/formatters/scripts/bundle/install-shellcheck.sh +85 -0
- package/skills/formatters/scripts/bundle/lib/excludes.sh +179 -0
- package/skills/formatters/scripts/bundle/lib/modified-files.sh +222 -0
- package/skills/formatters/scripts/bundle/lib/shellcheck-resolve.sh +81 -0
- package/skills/formatters/scripts/bundle/lib/shellcheck-version.sh +5 -0
- package/skills/formatters/scripts/bundle/lint.sh +15 -0
- package/skills/formatters/scripts/bundle/style.sh +1410 -0
- package/skills/formatters/scripts/bundle/templates/biome.json +81 -0
- package/skills/formatters/scripts/bundle/templates/clippy.toml +2 -0
- package/skills/formatters/scripts/bundle/templates/markdownlint.json +14 -0
- package/skills/formatters/scripts/bundle/templates/markdownlintignore +38 -0
- package/skills/formatters/scripts/bundle/templates/prettierignore +45 -0
- package/skills/formatters/scripts/bundle/templates/prettierrc.json +11 -0
- package/skills/formatters/scripts/bundle/templates/python-pyproject.toml +80 -0
- package/skills/formatters/scripts/bundle/templates/rustfmt.toml +41 -0
- package/skills/formatters/scripts/bundle/templates/tsconfig.json +21 -0
- package/skills/formatters/scripts/profile-style.sh +264 -0
- package/skills/frontend-design/SKILL.md +151 -0
- package/skills/frontend-patterns/SKILL.md +66 -0
- package/skills/frontend-patterns/references/animation.md +21 -0
- package/skills/frontend-patterns/references/components-and-state.md +40 -0
- package/skills/frontend-patterns/references/data-and-performance.md +34 -0
- package/skills/frontend-patterns/references/forms-errors-a11y.md +35 -0
- package/skills/git-cleanup/SKILL.md +286 -0
- package/skills/git-cleanup/references/active-code-rules.md +318 -0
- package/skills/git-cleanup/references/host-detection.md +217 -0
- package/skills/git-workflow/SKILL.md +130 -0
- package/skills/git-workflow/references/ci-monitoring-phase.md +130 -0
- package/skills/git-workflow/references/commit-phases.md +247 -0
- package/skills/git-workflow/references/examples-and-troubleshooting.md +47 -0
- package/skills/git-workflow/references/goal-pairing.md +23 -0
- package/skills/git-workflow/references/pr-creation.md +269 -0
- package/skills/git-workflow/scripts/analyze-changes.sh +266 -0
- package/skills/git-workflow/scripts/create-pr.sh +464 -0
- package/skills/git-workflow/scripts/validate-commit.sh +235 -0
- package/skills/git-workflow/templates/agent-prompts.md +518 -0
- package/skills/git-workflow/templates/commit-types.md +504 -0
- package/skills/git-workflow/templates/documentation-decision.md +509 -0
- package/skills/git-workflow/templates/pr-template.md +772 -0
- package/skills/go-patterns/SKILL.md +89 -0
- package/skills/go-patterns/references/design-and-tooling.md +336 -0
- package/skills/go-patterns/references/errors-and-concurrency.md +292 -0
- package/skills/go-testing/SKILL.md +133 -0
- package/skills/go-testing/references/advanced-testing.md +349 -0
- package/skills/go-testing/references/test-structure.md +277 -0
- package/skills/hooks-workflow/SKILL.md +232 -0
- package/skills/hooks-workflow/references/support-notes.md +134 -0
- package/skills/hooks-workflow/references/templates/claude-settings.json.tmpl +13 -0
- package/skills/hooks-workflow/references/templates/codex-config-fragment.toml.tmpl +9 -0
- package/skills/hooks-workflow/references/templates/cursor-rule-fragment.mdc.tmpl +16 -0
- package/skills/hooks-workflow/scripts/build-hook-config.sh +487 -0
- package/skills/hooks-workflow/scripts/verify-hooks.sh +257 -0
- package/skills/implement-plan/SKILL.md +221 -0
- package/skills/implement-plan/references/agent-task-prompt.md +214 -0
- package/skills/implement-plan/references/output-formats.md +150 -0
- package/skills/implement-plan/references/plan-inputs.md +126 -0
- package/skills/implement-plan/scripts/check-prerequisites.sh +78 -0
- package/skills/implement-plan/scripts/parse-dependencies.sh +206 -0
- package/skills/init/SKILL.md +272 -0
- package/skills/init/references/conventional-commits.md +114 -0
- package/skills/init/references/flag-reference.md +236 -0
- package/skills/init/references/label-taxonomy.md +115 -0
- package/skills/init/references/project-profile-heuristics.md +156 -0
- package/skills/init/references/template-library.md +129 -0
- package/skills/init/scripts/count-source-files.sh +60 -0
- package/skills/init/scripts/generate-agent-catalog.sh +193 -0
- package/skills/init/scripts/generate-mcp-catalog.sh +214 -0
- package/skills/init/scripts/migrate-rules.py +459 -0
- package/skills/init/scripts/migrate-rules.sh +26 -0
- package/skills/init/scripts/profile-project.sh +453 -0
- package/skills/init/scripts/render-template.py +226 -0
- package/skills/init/scripts/render-template.sh +25 -0
- package/skills/init/scripts/rules-report.sh +31 -0
- package/skills/init/scripts/rules_file_lib.py +41 -0
- package/skills/init/templates/AGENTS.md.tmpl +38 -0
- package/skills/init/templates/CLAUDE.md.tmpl +7 -0
- package/skills/init/templates/ai-rule.md.tmpl +3 -0
- package/skills/init/templates/cursor-rule.mdc.tmpl +7 -0
- package/skills/init/templates/git/commitlint.config.cjs.tmpl +40 -0
- package/skills/init/templates/git/gitignore.tmpl +120 -0
- package/skills/init/templates/git/gitmessage.tmpl +27 -0
- package/skills/init/templates/git/install-lefthook.sh.tmpl +131 -0
- package/skills/init/templates/git/lefthook-usage.md.tmpl +101 -0
- package/skills/init/templates/git/lefthook.yml.tmpl +64 -0
- package/skills/init/templates/github/bug_report.yml.tmpl +78 -0
- package/skills/init/templates/github/config.yml.tmpl +5 -0
- package/skills/init/templates/github/copilot-instructions.md.tmpl +24 -0
- package/skills/init/templates/github/docs_request.yml.tmpl +41 -0
- package/skills/init/templates/github/feature_request.yml.tmpl +59 -0
- package/skills/init/templates/github/labels.md.tmpl +75 -0
- package/skills/init/templates/github/pull_request_template.md.tmpl +66 -0
- package/skills/init/templates/github/workflows/pr-title-autofix.yml.tmpl +101 -0
- package/skills/init/templates/github/workflows/pr-title.yml.tmpl +55 -0
- package/skills/init/templates/workspace-report.md +83 -0
- package/skills/orchestrate/SKILL.md +165 -0
- package/skills/orchestrate/references/agent-catalog.md +601 -0
- package/skills/orchestrate/references/agent-prompts.md +495 -0
- package/skills/orchestrate/references/dispatch-playbook.md +333 -0
- package/skills/orchestrate/references/task-breakdown.md +410 -0
- package/skills/orchestrate/scripts/analyze-task.sh +139 -0
- package/skills/orchestrate/scripts/summarize-results.sh +160 -0
- package/skills/orchestrate/scripts/validate-agents.sh +92 -0
- package/skills/parallel-plan/SKILL.md +124 -0
- package/skills/plan/SKILL.md +134 -0
- package/skills/plan/references/enhanced-personas.md +131 -0
- package/skills/plan/references/personas-and-merge.md +77 -0
- package/skills/plan/references/plan-validation.md +65 -0
- package/skills/plan/references/planner-prompts.md +68 -0
- package/skills/plan/references/planning-tracks.md +73 -0
- package/skills/plan-workflow/SKILL.md +406 -0
- package/skills/plan-workflow/references/checkpoint-messages.md +370 -0
- package/skills/plan-workflow/references/plan-structure.md +238 -0
- package/skills/plan-workflow/references/planning-agents.md +511 -0
- package/skills/plan-workflow/references/research-agents-optimized.md +348 -0
- package/skills/plan-workflow/references/research-agents.md +436 -0
- package/skills/plan-workflow/references/shared-structure.md +152 -0
- package/skills/plan-workflow/references/validation-agents.md +363 -0
- package/skills/plan-workflow/scripts/check-prerequisites.sh +65 -0
- package/skills/plan-workflow/scripts/check-state.sh +190 -0
- package/skills/plan-workflow/scripts/persist-or-fail.sh +135 -0
- package/skills/plan-workflow/scripts/validate-analysis-artifacts.sh +216 -0
- package/skills/plan-workflow/scripts/validate-research-artifacts.sh +225 -0
- package/skills/plan-workflow/scripts/validate-shared.sh +229 -0
- package/skills/plan-workflow/scripts/validate-workflow-plan.sh +256 -0
- package/skills/pr-autofix/SKILL.md +307 -0
- package/skills/pr-autofix/references/ci-loop.md +64 -0
- package/skills/pr-autofix/references/comment-sources.md +197 -0
- package/skills/pr-autofix/references/data-shapes.md +87 -0
- package/skills/pr-autofix/references/goal-example.md +30 -0
- package/skills/pr-autofix/references/output-templates.md +162 -0
- package/skills/pr-autofix/references/prompt-injection-safety.md +165 -0
- package/skills/pr-autofix/references/related-skills.md +11 -0
- package/skills/pr-autofix/references/severity-mapping.md +146 -0
- package/skills/pr-autofix/scripts/fetch-pr-comments.sh +364 -0
- package/skills/pr-autofix/scripts/post-summary.sh +226 -0
- package/skills/pr-autofix/scripts/resolve-thread.sh +251 -0
- package/skills/prp-commit/SKILL.md +128 -0
- package/skills/prp-implement/SKILL.md +177 -0
- package/skills/prp-implement/references/agent-task-prompt.md +36 -0
- package/skills/prp-implement/references/detection.md +49 -0
- package/skills/prp-implement/references/dry-run.md +0 -0
- package/skills/prp-implement/references/report-output.md +204 -0
- package/skills/prp-implement/references/validation-and-failures.md +118 -0
- package/skills/prp-plan/SKILL.md +323 -0
- package/skills/prp-plan/references/enhanced-researchers.md +425 -0
- package/skills/prp-plan/references/parallel-additions.md +56 -0
- package/skills/prp-plan/references/plan-template.md +264 -0
- package/skills/prp-plan/references/synthesis-map.md +25 -0
- package/skills/prp-plan/scripts/preflight-enhanced-agents.sh +111 -0
- package/skills/prp-plan/scripts/validate-prp-plan.sh +368 -0
- package/skills/prp-pr/SKILL.md +402 -0
- package/skills/prp-prd/SKILL.md +442 -0
- package/skills/prp-spec/SKILL.md +274 -0
- package/skills/python-patterns/SKILL.md +103 -0
- package/skills/python-patterns/references/core-idioms.md +304 -0
- package/skills/python-patterns/references/design-and-tooling.md +407 -0
- package/skills/python-testing/SKILL.md +114 -0
- package/skills/python-testing/references/mocking-and-integration.md +395 -0
- package/skills/python-testing/references/pytest-core.md +366 -0
- package/skills/quick-fix/SKILL.md +246 -0
- package/skills/quick-review/SKILL.md +304 -0
- package/skills/release-model/SKILL.md +231 -0
- package/skills/release-model/references/pointer-and-labels.md +83 -0
- package/skills/release-model/references/signals-and-proposal.md +68 -0
- package/skills/release-model/references/template-placeholders.md +42 -0
- package/skills/release-model/references/upgrade-and-audit.md +131 -0
- package/skills/release-model/scripts/collect-signals.sh +459 -0
- package/skills/release-model/scripts/pointer-targets.sh +29 -0
- package/skills/release-model/templates/RELEASING.md.tmpl +151 -0
- package/skills/releaser/SKILL.md +251 -0
- package/skills/releaser/references/ci-optimization-checklist.md +149 -0
- package/skills/releaser/references/ci-templates/docker-release.yml +88 -0
- package/skills/releaser/references/ci-templates/generic-release.yml +69 -0
- package/skills/releaser/references/ci-templates/go-release.yml +50 -0
- package/skills/releaser/references/ci-templates/node-release.yml +126 -0
- package/skills/releaser/references/ci-templates/python-release.yml +95 -0
- package/skills/releaser/references/ci-templates/rust-release.yml +128 -0
- package/skills/releaser/references/ci-workflow-modes.md +42 -0
- package/skills/releaser/references/goal-pairing.md +37 -0
- package/skills/releaser/references/output-templates.md +143 -0
- package/skills/releaser/references/project-type-matrix.md +144 -0
- package/skills/releaser/references/release-branches.md +138 -0
- package/skills/releaser/references/release-ci-loop.md +249 -0
- package/skills/releaser/references/release-notes-template.md +42 -0
- package/skills/releaser/references/release-preparation.md +210 -0
- package/skills/releaser/scripts/check-release-branch.sh +235 -0
- package/skills/releaser/scripts/detect-project.sh +234 -0
- package/skills/releaser/scripts/draft-changelog.sh +387 -0
- package/skills/releaser/scripts/publish-release.sh +302 -0
- package/skills/research-to-issues/SKILL.md +285 -0
- package/skills/research-to-issues/references/label-taxonomy.md +48 -0
- package/skills/research-to-issues/references/parse-deep-research.md +86 -0
- package/skills/research-to-issues/references/parse-feature-spec.md +143 -0
- package/skills/research-to-issues/references/parse-parallel-plan.md +124 -0
- package/skills/research-to-issues/references/parse-prd.md +184 -0
- package/skills/research-to-issues/references/parse-prp-plan.md +237 -0
- package/skills/research-to-issues/references/plan-display-format.md +136 -0
- package/skills/research-to-issues/scripts/validate-prerequisites.sh +312 -0
- package/skills/research-to-issues/templates/feature-issue.md +131 -0
- package/skills/research-to-issues/templates/task-issue.md +104 -0
- package/skills/research-to-issues/templates/tracking-issue.md +126 -0
- package/skills/resume-session/SKILL.md +152 -0
- package/skills/review-fix/SKILL.md +229 -0
- package/skills/review-fix/references/fix-report.md +121 -0
- package/skills/review-fix/references/fixer-dispatch.md +79 -0
- package/skills/review-fix/references/plan.md +119 -0
- package/skills/rust-patterns/SKILL.md +85 -0
- package/skills/rust-patterns/references/concurrency-unsafe-modules.md +243 -0
- package/skills/rust-patterns/references/ownership-errors-types.md +262 -0
- package/skills/rust-testing/SKILL.md +99 -0
- package/skills/rust-testing/references/advanced-testing.md +247 -0
- package/skills/rust-testing/references/unit-and-integration.md +193 -0
- package/skills/save-session/SKILL.md +159 -0
- package/skills/shared-context/SKILL.md +101 -0
- package/skills/ts-patterns/SKILL.md +159 -0
- package/skills/ts-patterns/references/async-runtimes-tooling.md +375 -0
- package/skills/ts-patterns/references/types-errors-modules.md +336 -0
- package/skills/ts-testing/SKILL.md +151 -0
- package/skills/ts-testing/references/advanced-testing.md +350 -0
- package/skills/ts-testing/references/vitest-core.md +318 -0
- package/skills/visual-plan/SKILL.md +221 -0
- package/skills/visual-plan/references/canvas.md +132 -0
- package/skills/visual-plan/references/document-quality.md +178 -0
- package/skills/visual-plan/references/exemplar.md +120 -0
- package/skills/visual-plan/references/wireframe.md +212 -0
- package/skills/visual-plan/scripts/derive-visual-dir.sh +77 -0
- package/skills/visual-recap/SKILL.md +238 -0
- package/skills/visual-recap/references/wireframe.md +237 -0
- package/skills/write-docs/SKILL.md +354 -0
- package/skills/write-docs/scripts/audit-documentation.sh +190 -0
- package/skills/write-docs/scripts/generate-doc-index.sh +125 -0
- package/skills/write-docs/scripts/verify-links.sh +81 -0
- package/skills/write-docs/templates/docs-readme.md +34 -0
- package/skills/write-docs/templates/documentation-strategy.md +91 -0
|
@@ -0,0 +1,277 @@
|
|
|
1
|
+
# Go Testing Patterns: Test Structure
|
|
2
|
+
|
|
3
|
+
## Contents
|
|
4
|
+
|
|
5
|
+
- TDD Workflow for Go
|
|
6
|
+
- Table-Driven Tests
|
|
7
|
+
- Subtests and Sub-benchmarks
|
|
8
|
+
- Test Helpers
|
|
9
|
+
|
|
10
|
+
## TDD Workflow for Go
|
|
11
|
+
|
|
12
|
+
### The RED-GREEN-REFACTOR Cycle
|
|
13
|
+
|
|
14
|
+
```
|
|
15
|
+
RED → Write a failing test first
|
|
16
|
+
GREEN → Write minimal code to pass the test
|
|
17
|
+
REFACTOR → Improve code while keeping tests green
|
|
18
|
+
REPEAT → Continue with next requirement
|
|
19
|
+
```
|
|
20
|
+
|
|
21
|
+
### Step-by-Step TDD in Go
|
|
22
|
+
|
|
23
|
+
```go
|
|
24
|
+
// Step 1: Define the interface/signature
|
|
25
|
+
// calculator.go
|
|
26
|
+
package calculator
|
|
27
|
+
|
|
28
|
+
func Add(a, b int) int {
|
|
29
|
+
panic("not implemented") // Placeholder
|
|
30
|
+
}
|
|
31
|
+
|
|
32
|
+
// Step 2: Write failing test (RED)
|
|
33
|
+
// calculator_test.go
|
|
34
|
+
package calculator
|
|
35
|
+
|
|
36
|
+
import "testing"
|
|
37
|
+
|
|
38
|
+
func TestAdd(t *testing.T) {
|
|
39
|
+
got := Add(2, 3)
|
|
40
|
+
want := 5
|
|
41
|
+
if got != want {
|
|
42
|
+
t.Errorf("Add(2, 3) = %d; want %d", got, want)
|
|
43
|
+
}
|
|
44
|
+
}
|
|
45
|
+
|
|
46
|
+
// Step 3: Run test - verify FAIL
|
|
47
|
+
// $ go test
|
|
48
|
+
// --- FAIL: TestAdd (0.00s)
|
|
49
|
+
// panic: not implemented
|
|
50
|
+
|
|
51
|
+
// Step 4: Implement minimal code (GREEN)
|
|
52
|
+
func Add(a, b int) int {
|
|
53
|
+
return a + b
|
|
54
|
+
}
|
|
55
|
+
|
|
56
|
+
// Step 5: Run test - verify PASS
|
|
57
|
+
// $ go test
|
|
58
|
+
// PASS
|
|
59
|
+
|
|
60
|
+
// Step 6: Refactor if needed, verify tests still pass
|
|
61
|
+
```
|
|
62
|
+
|
|
63
|
+
## Table-Driven Tests
|
|
64
|
+
|
|
65
|
+
The standard pattern for Go tests. Enables comprehensive coverage with minimal code.
|
|
66
|
+
|
|
67
|
+
```go
|
|
68
|
+
func TestAdd(t *testing.T) {
|
|
69
|
+
tests := []struct {
|
|
70
|
+
name string
|
|
71
|
+
a, b int
|
|
72
|
+
expected int
|
|
73
|
+
}{
|
|
74
|
+
{"positive numbers", 2, 3, 5},
|
|
75
|
+
{"negative numbers", -1, -2, -3},
|
|
76
|
+
{"zero values", 0, 0, 0},
|
|
77
|
+
{"mixed signs", -1, 1, 0},
|
|
78
|
+
{"large numbers", 1000000, 2000000, 3000000},
|
|
79
|
+
}
|
|
80
|
+
|
|
81
|
+
for _, tt := range tests {
|
|
82
|
+
t.Run(tt.name, func(t *testing.T) {
|
|
83
|
+
got := Add(tt.a, tt.b)
|
|
84
|
+
if got != tt.expected {
|
|
85
|
+
t.Errorf("Add(%d, %d) = %d; want %d",
|
|
86
|
+
tt.a, tt.b, got, tt.expected)
|
|
87
|
+
}
|
|
88
|
+
})
|
|
89
|
+
}
|
|
90
|
+
}
|
|
91
|
+
```
|
|
92
|
+
|
|
93
|
+
### Table-Driven Tests with Error Cases
|
|
94
|
+
|
|
95
|
+
```go
|
|
96
|
+
func TestParseConfig(t *testing.T) {
|
|
97
|
+
tests := []struct {
|
|
98
|
+
name string
|
|
99
|
+
input string
|
|
100
|
+
want *Config
|
|
101
|
+
wantErr bool
|
|
102
|
+
}{
|
|
103
|
+
{
|
|
104
|
+
name: "valid config",
|
|
105
|
+
input: `{"host": "localhost", "port": 8080}`,
|
|
106
|
+
want: &Config{Host: "localhost", Port: 8080},
|
|
107
|
+
},
|
|
108
|
+
{
|
|
109
|
+
name: "invalid JSON",
|
|
110
|
+
input: `{invalid}`,
|
|
111
|
+
wantErr: true,
|
|
112
|
+
},
|
|
113
|
+
{
|
|
114
|
+
name: "empty input",
|
|
115
|
+
input: "",
|
|
116
|
+
wantErr: true,
|
|
117
|
+
},
|
|
118
|
+
{
|
|
119
|
+
name: "minimal config",
|
|
120
|
+
input: `{}`,
|
|
121
|
+
want: &Config{}, // Zero value config
|
|
122
|
+
},
|
|
123
|
+
}
|
|
124
|
+
|
|
125
|
+
for _, tt := range tests {
|
|
126
|
+
t.Run(tt.name, func(t *testing.T) {
|
|
127
|
+
got, err := ParseConfig(tt.input)
|
|
128
|
+
|
|
129
|
+
if tt.wantErr {
|
|
130
|
+
if err == nil {
|
|
131
|
+
t.Error("expected error, got nil")
|
|
132
|
+
}
|
|
133
|
+
return
|
|
134
|
+
}
|
|
135
|
+
|
|
136
|
+
if err != nil {
|
|
137
|
+
t.Fatalf("unexpected error: %v", err)
|
|
138
|
+
}
|
|
139
|
+
|
|
140
|
+
if !reflect.DeepEqual(got, tt.want) {
|
|
141
|
+
t.Errorf("got %+v; want %+v", got, tt.want)
|
|
142
|
+
}
|
|
143
|
+
})
|
|
144
|
+
}
|
|
145
|
+
}
|
|
146
|
+
```
|
|
147
|
+
|
|
148
|
+
## Subtests and Sub-benchmarks
|
|
149
|
+
|
|
150
|
+
### Organizing Related Tests
|
|
151
|
+
|
|
152
|
+
```go
|
|
153
|
+
func TestUser(t *testing.T) {
|
|
154
|
+
// Setup shared by all subtests
|
|
155
|
+
db := setupTestDB(t)
|
|
156
|
+
|
|
157
|
+
t.Run("Create", func(t *testing.T) {
|
|
158
|
+
user := &User{Name: "Alice"}
|
|
159
|
+
err := db.CreateUser(user)
|
|
160
|
+
if err != nil {
|
|
161
|
+
t.Fatalf("CreateUser failed: %v", err)
|
|
162
|
+
}
|
|
163
|
+
if user.ID == "" {
|
|
164
|
+
t.Error("expected user ID to be set")
|
|
165
|
+
}
|
|
166
|
+
})
|
|
167
|
+
|
|
168
|
+
t.Run("Get", func(t *testing.T) {
|
|
169
|
+
user, err := db.GetUser("alice-id")
|
|
170
|
+
if err != nil {
|
|
171
|
+
t.Fatalf("GetUser failed: %v", err)
|
|
172
|
+
}
|
|
173
|
+
if user.Name != "Alice" {
|
|
174
|
+
t.Errorf("got name %q; want %q", user.Name, "Alice")
|
|
175
|
+
}
|
|
176
|
+
})
|
|
177
|
+
|
|
178
|
+
t.Run("Update", func(t *testing.T) {
|
|
179
|
+
// ...
|
|
180
|
+
})
|
|
181
|
+
|
|
182
|
+
t.Run("Delete", func(t *testing.T) {
|
|
183
|
+
// ...
|
|
184
|
+
})
|
|
185
|
+
}
|
|
186
|
+
```
|
|
187
|
+
|
|
188
|
+
### Parallel Subtests
|
|
189
|
+
|
|
190
|
+
```go
|
|
191
|
+
func TestParallel(t *testing.T) {
|
|
192
|
+
tests := []struct {
|
|
193
|
+
name string
|
|
194
|
+
input string
|
|
195
|
+
}{
|
|
196
|
+
{"case1", "input1"},
|
|
197
|
+
{"case2", "input2"},
|
|
198
|
+
{"case3", "input3"},
|
|
199
|
+
}
|
|
200
|
+
|
|
201
|
+
for _, tt := range tests {
|
|
202
|
+
tt := tt // Capture range variable
|
|
203
|
+
t.Run(tt.name, func(t *testing.T) {
|
|
204
|
+
t.Parallel() // Run subtests in parallel
|
|
205
|
+
result := Process(tt.input)
|
|
206
|
+
// assertions...
|
|
207
|
+
_ = result
|
|
208
|
+
})
|
|
209
|
+
}
|
|
210
|
+
}
|
|
211
|
+
```
|
|
212
|
+
|
|
213
|
+
## Test Helpers
|
|
214
|
+
|
|
215
|
+
### Helper Functions
|
|
216
|
+
|
|
217
|
+
```go
|
|
218
|
+
func setupTestDB(t *testing.T) *sql.DB {
|
|
219
|
+
t.Helper() // Marks this as a helper function
|
|
220
|
+
|
|
221
|
+
db, err := sql.Open("sqlite3", ":memory:")
|
|
222
|
+
if err != nil {
|
|
223
|
+
t.Fatalf("failed to open database: %v", err)
|
|
224
|
+
}
|
|
225
|
+
|
|
226
|
+
// Cleanup when test finishes
|
|
227
|
+
t.Cleanup(func() {
|
|
228
|
+
db.Close()
|
|
229
|
+
})
|
|
230
|
+
|
|
231
|
+
// Run migrations
|
|
232
|
+
if _, err := db.Exec(schema); err != nil {
|
|
233
|
+
t.Fatalf("failed to create schema: %v", err)
|
|
234
|
+
}
|
|
235
|
+
|
|
236
|
+
return db
|
|
237
|
+
}
|
|
238
|
+
|
|
239
|
+
func assertNoError(t *testing.T, err error) {
|
|
240
|
+
t.Helper()
|
|
241
|
+
if err != nil {
|
|
242
|
+
t.Fatalf("unexpected error: %v", err)
|
|
243
|
+
}
|
|
244
|
+
}
|
|
245
|
+
|
|
246
|
+
func assertEqual[T comparable](t *testing.T, got, want T) {
|
|
247
|
+
t.Helper()
|
|
248
|
+
if got != want {
|
|
249
|
+
t.Errorf("got %v; want %v", got, want)
|
|
250
|
+
}
|
|
251
|
+
}
|
|
252
|
+
```
|
|
253
|
+
|
|
254
|
+
### Temporary Files and Directories
|
|
255
|
+
|
|
256
|
+
```go
|
|
257
|
+
func TestFileProcessing(t *testing.T) {
|
|
258
|
+
// Create temp directory - automatically cleaned up
|
|
259
|
+
tmpDir := t.TempDir()
|
|
260
|
+
|
|
261
|
+
// Create test file
|
|
262
|
+
testFile := filepath.Join(tmpDir, "test.txt")
|
|
263
|
+
err := os.WriteFile(testFile, []byte("test content"), 0644)
|
|
264
|
+
if err != nil {
|
|
265
|
+
t.Fatalf("failed to create test file: %v", err)
|
|
266
|
+
}
|
|
267
|
+
|
|
268
|
+
// Run test
|
|
269
|
+
result, err := ProcessFile(testFile)
|
|
270
|
+
if err != nil {
|
|
271
|
+
t.Fatalf("ProcessFile failed: %v", err)
|
|
272
|
+
}
|
|
273
|
+
|
|
274
|
+
// Assert...
|
|
275
|
+
_ = result
|
|
276
|
+
}
|
|
277
|
+
```
|
|
@@ -0,0 +1,232 @@
|
|
|
1
|
+
---
|
|
2
|
+
name: hooks-workflow
|
|
3
|
+
description: Generates hook configuration from language rules. Use when configuring
|
|
4
|
+
Claude hooks, translating rule hook guidance, or verifying existing hook config.
|
|
5
|
+
metadata:
|
|
6
|
+
opencode/autoinvoke: 'false'
|
|
7
|
+
---
|
|
8
|
+
|
|
9
|
+
# hooks-workflow
|
|
10
|
+
|
|
11
|
+
This skill turns existing rule-file hook guidance into real, target-appropriate
|
|
12
|
+
hook configuration. It reads `ycc/rules/<language>/hooks.md` (plus
|
|
13
|
+
`ycc/rules/common/hooks.md` when present), resolves which hook events the
|
|
14
|
+
requested target actually supports by consulting the capability matrix, and
|
|
15
|
+
invokes `build-hook-config.sh` to emit the correct artifact. Explicit
|
|
16
|
+
per-target boundaries are enforced at every step: Claude receives a concrete
|
|
17
|
+
JSON `hooks` settings fragment, Cursor receives a rule-embedded `.mdc` advisory
|
|
18
|
+
where the matrix shows partial support, and Codex always receives an
|
|
19
|
+
advisory-only `config.toml` fragment. The skill never claims parity across
|
|
20
|
+
targets and never fabricates config for a target the matrix marks as
|
|
21
|
+
unsupported.
|
|
22
|
+
|
|
23
|
+
## When to use
|
|
24
|
+
|
|
25
|
+
- You want a real `hooks` block in `~/.config/opencode/settings.json` generated from
|
|
26
|
+
the project's existing rule guidance.
|
|
27
|
+
- You want to know which hook events are supported on Cursor or Codex before
|
|
28
|
+
spending time writing config.
|
|
29
|
+
- You want to verify that previously emitted hook config is still parseable and
|
|
30
|
+
that any referenced command binaries are present.
|
|
31
|
+
- You want a dry-run preview of what the skill would emit without writing any
|
|
32
|
+
files.
|
|
33
|
+
- You want an advisory-only Codex fragment that documents hook intent even
|
|
34
|
+
though Codex hooks are not yet in GA.
|
|
35
|
+
|
|
36
|
+
## Arguments
|
|
37
|
+
|
|
38
|
+
Parse `$ARGUMENTS` for:
|
|
39
|
+
|
|
40
|
+
- **language** (required, first positional) — the rules subdirectory name, e.g.
|
|
41
|
+
`python`, `typescript`, `go`. The skill resolves this to
|
|
42
|
+
`ycc/rules/<language>/hooks.md`. Use `Glob` on `ycc/rules/*/` to list valid
|
|
43
|
+
values; abort with the full list if the provided value does not match.
|
|
44
|
+
- **--target** (default `claude`) — one of `claude`, `cursor`, or `codex`.
|
|
45
|
+
Determines which output format is produced and which matrix cells are checked.
|
|
46
|
+
- **--event** (default `all`) — one of `PreToolUse`, `PostToolUse`, `Stop`, or
|
|
47
|
+
`all`. Restricts which hook events are included in the emitted config.
|
|
48
|
+
Passing `all` includes every event the matrix marks as supported or partial
|
|
49
|
+
for the resolved target.
|
|
50
|
+
- **--out** (default varies by target) — explicit output path. Defaults:
|
|
51
|
+
Claude → `~/.config/opencode/settings-hooks-fragment.json`;
|
|
52
|
+
Cursor → `ycc/rules/<language>/hooks-cursor.mdc`;
|
|
53
|
+
Codex → `ycc/rules/<language>/hooks-codex.toml`.
|
|
54
|
+
- **--dry-run** — print the full plan and the would-be output, write nothing,
|
|
55
|
+
and stop before invoking any scripts.
|
|
56
|
+
- **--verify** — after writing the output file, invoke `verify-hooks.sh` to
|
|
57
|
+
run parse-only checks and probe referenced command binaries.
|
|
58
|
+
- **--force** — required when writing Codex output to disk. Without this flag,
|
|
59
|
+
Codex output is printed to stdout only. Has no effect on Claude or Cursor
|
|
60
|
+
targets.
|
|
61
|
+
|
|
62
|
+
## Phases
|
|
63
|
+
|
|
64
|
+
### Phase 0: Reload the capability matrix
|
|
65
|
+
|
|
66
|
+
Read `{{package-root}}/shared/references/target-capability-matrix.md`
|
|
67
|
+
in full. Hold the parsed table in context for all subsequent matrix lookups.
|
|
68
|
+
Do not use stale or cached matrix data from a previous run.
|
|
69
|
+
|
|
70
|
+
### Phase 1: Resolve language and source rules files
|
|
71
|
+
|
|
72
|
+
Use `Glob` to list all directories matching `ycc/rules/*/`. Extract the
|
|
73
|
+
directory name (the trailing path segment) from each match to build the valid
|
|
74
|
+
language list.
|
|
75
|
+
|
|
76
|
+
If the provided `<language>` is not in that list, STOP and emit:
|
|
77
|
+
|
|
78
|
+
```
|
|
79
|
+
Unknown language "<language>". Valid values: <sorted list of discovered names>.
|
|
80
|
+
```
|
|
81
|
+
|
|
82
|
+
Resolved sources (read both if they exist; skip silently if absent):
|
|
83
|
+
|
|
84
|
+
1. `ycc/rules/<language>/hooks.md` — language-specific hook recommendations
|
|
85
|
+
2. `ycc/rules/common/hooks.md` — cross-language hook recommendations
|
|
86
|
+
|
|
87
|
+
If neither file exists, STOP and emit:
|
|
88
|
+
|
|
89
|
+
```
|
|
90
|
+
No hooks.md found under ycc/rules/<language>/ or ycc/rules/common/.
|
|
91
|
+
Nothing to generate.
|
|
92
|
+
```
|
|
93
|
+
|
|
94
|
+
### Phase 2: Resolve target and check matrix support
|
|
95
|
+
|
|
96
|
+
For each event in the resolved `--event` set, look up the `HOOKS.<event>` row
|
|
97
|
+
and the `--target` column in the matrix loaded in Phase 0.
|
|
98
|
+
|
|
99
|
+
Cell verdicts:
|
|
100
|
+
|
|
101
|
+
- `supported` — proceed normally.
|
|
102
|
+
- `partial` — proceed but prefix the output block with the relevant Notes entry
|
|
103
|
+
from the matrix, verbatim.
|
|
104
|
+
- `unsupported` — STOP for that event and emit:
|
|
105
|
+
|
|
106
|
+
```
|
|
107
|
+
HOOKS.<event> is not supported on target <target>.
|
|
108
|
+
Matrix row: | HOOKS.<event> | <claude cell> | <cursor cell> | <codex cell> |
|
|
109
|
+
<If a different target supports it, note: "HOOKS.<event> is supported on <other target>.">
|
|
110
|
+
```
|
|
111
|
+
|
|
112
|
+
If `--event all` was passed and every event is `unsupported` for the chosen
|
|
113
|
+
target, STOP entirely after emitting the unsupported messages for all events.
|
|
114
|
+
|
|
115
|
+
### Phase 3: Parse hook recommendations
|
|
116
|
+
|
|
117
|
+
Read the resolved source file(s) from Phase 1. Extract each hook
|
|
118
|
+
recommendation: the triggering event, the matcher pattern or tool name (if
|
|
119
|
+
any), and the command to run. Use `Grep` if needed to locate the structured
|
|
120
|
+
sections within the file.
|
|
121
|
+
|
|
122
|
+
If a source file exists but contains no parseable hook recommendations, note
|
|
123
|
+
this in the output and continue (there may still be advisory content worth
|
|
124
|
+
emitting).
|
|
125
|
+
|
|
126
|
+
### Phase 4: Invoke build-hook-config.sh
|
|
127
|
+
|
|
128
|
+
The builder requires canonical `ycc/rules/*/hooks.md` sources, the compatibility
|
|
129
|
+
matrix, and hook templates. It discovers a source checkout or accepts
|
|
130
|
+
`--repo-root=/path/to/checkout`; installed bundles do not contain these sources.
|
|
131
|
+
|
|
132
|
+
Run:
|
|
133
|
+
|
|
134
|
+
```
|
|
135
|
+
{{package-root}}/skills/hooks-workflow/scripts/build-hook-config.sh \
|
|
136
|
+
--language=<language> \
|
|
137
|
+
--target=<target> \
|
|
138
|
+
--event=<event> \
|
|
139
|
+
--out=<path> \
|
|
140
|
+
[--force]
|
|
141
|
+
```
|
|
142
|
+
|
|
143
|
+
Output format by target:
|
|
144
|
+
|
|
145
|
+
- **Claude** — a JSON fragment containing only the `hooks` key, suitable for
|
|
146
|
+
merging into `~/.config/opencode/settings.json`. Example structure:
|
|
147
|
+
|
|
148
|
+
```json
|
|
149
|
+
{
|
|
150
|
+
"hooks": {
|
|
151
|
+
"PreToolUse": [...],
|
|
152
|
+
"PostToolUse": [...],
|
|
153
|
+
"Stop": [...]
|
|
154
|
+
}
|
|
155
|
+
}
|
|
156
|
+
```
|
|
157
|
+
|
|
158
|
+
- **Cursor** — a `.mdc` rule-embedded fragment where the matrix shows `partial`
|
|
159
|
+
support. Where an event is `unsupported`, the script emits an advisory-only
|
|
160
|
+
marker comment instead of executable config.
|
|
161
|
+
- **Codex** — always an advisory-only `config.toml` fragment. The script MUST
|
|
162
|
+
prefix the entire output with:
|
|
163
|
+
|
|
164
|
+
```
|
|
165
|
+
# Advisory only — Codex hooks are under development; verify support in the installed CLI.
|
|
166
|
+
```
|
|
167
|
+
|
|
168
|
+
Codex output is printed to stdout unless `--force` was passed. If `--force`
|
|
169
|
+
is absent and `--out` resolves to a file path, STOP before writing and emit:
|
|
170
|
+
|
|
171
|
+
```
|
|
172
|
+
Codex output requires --force to write to disk. Re-run with --force to
|
|
173
|
+
confirm. Output printed to stdout:
|
|
174
|
+
<content>
|
|
175
|
+
```
|
|
176
|
+
|
|
177
|
+
If `build-hook-config.sh` exits non-zero, surface the full stderr output and
|
|
178
|
+
STOP.
|
|
179
|
+
|
|
180
|
+
### Phase 5: Verify (conditional)
|
|
181
|
+
|
|
182
|
+
If `--verify` was passed, run:
|
|
183
|
+
|
|
184
|
+
```
|
|
185
|
+
{{package-root}}/skills/hooks-workflow/scripts/verify-hooks.sh \
|
|
186
|
+
--file <resolved-out-path> \
|
|
187
|
+
--target <target>
|
|
188
|
+
```
|
|
189
|
+
|
|
190
|
+
This script performs parse-only checks on the emitted file and probes each
|
|
191
|
+
hook command binary with `--help` or `--version`. It never executes a hook
|
|
192
|
+
body. Surface the full stdout and stderr from the script. If it exits non-zero,
|
|
193
|
+
report the failure without rolling back the written file.
|
|
194
|
+
|
|
195
|
+
### Phase 6: Emit produced paths and matrix justification
|
|
196
|
+
|
|
197
|
+
After all phases complete, always emit:
|
|
198
|
+
|
|
199
|
+
1. The absolute path(s) of the file(s) written (or "no file written" if
|
|
200
|
+
`--dry-run` or Codex without `--force`).
|
|
201
|
+
2. The matrix row(s) that justified the decision, quoted verbatim from the
|
|
202
|
+
matrix table. For example:
|
|
203
|
+
|
|
204
|
+
```
|
|
205
|
+
Matrix justification:
|
|
206
|
+
| HOOKS.PreToolUse | supported | partial | unsupported |
|
|
207
|
+
```
|
|
208
|
+
|
|
209
|
+
## Anti-parity stance
|
|
210
|
+
|
|
211
|
+
This skill refuses to fabricate config for an unsupported target. If the matrix
|
|
212
|
+
cell is `unsupported`, the skill stops for that event and reports exactly what
|
|
213
|
+
the matrix says. There is no fallback, no silent downgrade, and no invented
|
|
214
|
+
config.
|
|
215
|
+
|
|
216
|
+
Dry-run mode (`--dry-run`) always emits the advisory text — including any
|
|
217
|
+
unsupported notices derived from the matrix — and stops before writing any
|
|
218
|
+
file. A dry run that encounters an `unsupported` cell is informational, not an
|
|
219
|
+
error; it shows what would have been blocked.
|
|
220
|
+
|
|
221
|
+
## Notes
|
|
222
|
+
|
|
223
|
+
- For per-target capability explanations and known limitations, see
|
|
224
|
+
`{{package-root}}/skills/hooks-workflow/references/support-notes.md`.
|
|
225
|
+
- Run `scripts/build-hook-config.sh` when rendering hook config (Step 2); the script reads
|
|
226
|
+
the three per-target templates internally. Read a template only when inspecting its output:
|
|
227
|
+
`references/templates/claude-settings.json.tmpl` (Claude target),
|
|
228
|
+
`references/templates/codex-config-fragment.toml.tmpl` (Codex target), and
|
|
229
|
+
`references/templates/cursor-rule-fragment.mdc.tmpl` (Cursor target).
|
|
230
|
+
- The authoritative capability verdicts live in
|
|
231
|
+
`{{package-root}}/shared/references/target-capability-matrix.md`.
|
|
232
|
+
Do not override matrix verdicts locally.
|
|
@@ -0,0 +1,134 @@
|
|
|
1
|
+
# hooks-workflow: per-target support notes
|
|
2
|
+
|
|
3
|
+
## Contents
|
|
4
|
+
|
|
5
|
+
- Overview
|
|
6
|
+
- Claude Code
|
|
7
|
+
- Cursor
|
|
8
|
+
- Codex
|
|
9
|
+
- Why we refuse to fabricate unsupported config
|
|
10
|
+
- Template placeholders
|
|
11
|
+
- How to update this doc
|
|
12
|
+
|
|
13
|
+
## Overview
|
|
14
|
+
|
|
15
|
+
This document records the per-target hook maturity for the three deployment targets
|
|
16
|
+
supported by the `ycc` bundle: Claude Code, Cursor, and Codex. The verdicts here are
|
|
17
|
+
derived from the authoritative source at
|
|
18
|
+
`ycc/skills/_shared/references/target-capability-matrix.md`; this file provides the
|
|
19
|
+
prose rationale and link context that the matrix table cannot. The core stance is that
|
|
20
|
+
the `hooks-workflow` skill refuses to fabricate config for an unsupported target.
|
|
21
|
+
Cross-platform hook parity does not exist, and this document explains why rather than
|
|
22
|
+
papering over the gaps.
|
|
23
|
+
|
|
24
|
+
## Claude Code
|
|
25
|
+
|
|
26
|
+
Hook support on Claude Code is production-grade and is the primary target for this skill.
|
|
27
|
+
|
|
28
|
+
- **PreToolUse**
|
|
29
|
+
- Status: supported
|
|
30
|
+
- Documentation: Anthropic hooks guide — <https://docs.anthropic.com/en/docs/claude-code/hooks-guide>
|
|
31
|
+
- Config location: `~/.claude/settings.json` (global) or `.claude/settings.json` in the
|
|
32
|
+
repo root (project-local). Project-local settings take precedence when both exist.
|
|
33
|
+
- Execution model: Claude Code invokes the hook command as a subprocess with the tool
|
|
34
|
+
invocation JSON serialized to stdin. The hook may exit non-zero to block the tool call.
|
|
35
|
+
|
|
36
|
+
- **PostToolUse**
|
|
37
|
+
- Status: supported
|
|
38
|
+
- Documentation: see PreToolUse link above; the same hooks guide covers all event types.
|
|
39
|
+
- Config location: same as PreToolUse — `~/.claude/settings.json` or `.claude/settings.json`.
|
|
40
|
+
- Execution model: Claude Code invokes the hook command after the tool returns. The hook
|
|
41
|
+
receives the tool result on stdin. A non-zero exit does not roll back the tool result but
|
|
42
|
+
is surfaced as a warning.
|
|
43
|
+
|
|
44
|
+
- **Stop**
|
|
45
|
+
- Status: supported
|
|
46
|
+
- Documentation: see PreToolUse link above.
|
|
47
|
+
- Config location: same as above.
|
|
48
|
+
- Execution model: Claude Code invokes the Stop hook when the model signals it has finished
|
|
49
|
+
a turn. The hook command receives a JSON summary on stdin. A non-zero exit causes Claude
|
|
50
|
+
Code to surface the error before terminating the turn.
|
|
51
|
+
|
|
52
|
+
## Cursor
|
|
53
|
+
|
|
54
|
+
Status: **partial**
|
|
55
|
+
|
|
56
|
+
Cursor does not run hooks natively. There is no execution surface equivalent to Claude
|
|
57
|
+
Code's `~/.claude/settings.json` hooks runner. The `hooks-workflow` skill therefore
|
|
58
|
+
cannot produce executable hook config for a Cursor target. Instead, the skill emits
|
|
59
|
+
`.mdc` rule fragments that embed advisory text describing what the hook would do if
|
|
60
|
+
Cursor had native hook support. These fragments are written to
|
|
61
|
+
`ycc/rules/<language>/hooks-cursor.mdc` and are intended as reference documentation for
|
|
62
|
+
Cursor users, not as runtime configuration.
|
|
63
|
+
|
|
64
|
+
The `partial` status for all three hook events reflects the fact that the advisory
|
|
65
|
+
fragments are useful documentation artifacts even though they are not executed. See the
|
|
66
|
+
matrix notes for each event at
|
|
67
|
+
`ycc/skills/_shared/references/target-capability-matrix.md`.
|
|
68
|
+
|
|
69
|
+
## Codex
|
|
70
|
+
|
|
71
|
+
Status: **unsupported**
|
|
72
|
+
|
|
73
|
+
The OpenAI Codex config reference documents `features.codex_hooks` as under development.
|
|
74
|
+
As of the April 2026 research audit, no primary source confirms that Codex hook execution
|
|
75
|
+
is in general availability. The contradiction between "hooks are referenced in the config
|
|
76
|
+
docs" and "no GA announcement exists" was logged at
|
|
77
|
+
`research/plugin-additions/evidence/verification-log.md` under the "Hook adoption timing"
|
|
78
|
+
contradiction entry. The resolution adopted there — and enforced by this skill — is to
|
|
79
|
+
treat Codex hooks as `unsupported` pending a verified GA announcement.
|
|
80
|
+
|
|
81
|
+
The `hooks-workflow` skill emits advisory-only TOML fragments for Codex targets to
|
|
82
|
+
document hook intent for future use. These fragments are printed to stdout by default
|
|
83
|
+
and require `--force` to write to disk. Writing them to disk signals deliberate intent
|
|
84
|
+
and acknowledges that the fragments are not executable today.
|
|
85
|
+
|
|
86
|
+
## Why we refuse to fabricate unsupported config
|
|
87
|
+
|
|
88
|
+
Emitting configuration that a target cannot execute creates a false sense of security.
|
|
89
|
+
A developer who finds a `[hooks.PreToolUse]` block in their Codex config may believe
|
|
90
|
+
the hook is running when it is not. Silent failures are harder to debug than explicit
|
|
91
|
+
refusals. The `hooks-workflow` skill adopts a fail-loud stance: if the matrix marks a
|
|
92
|
+
target as `unsupported` for a given event, the skill stops and says so rather than
|
|
93
|
+
emitting config that will be silently ignored.
|
|
94
|
+
|
|
95
|
+
Advisory-only output (Cursor `.mdc` fragments and Codex TOML fragments) is acceptable
|
|
96
|
+
because it carries a mandatory leading comment that makes the non-executable nature
|
|
97
|
+
unambiguous. Removing or suppressing that comment is not supported.
|
|
98
|
+
|
|
99
|
+
## Template placeholders
|
|
100
|
+
|
|
101
|
+
The three output templates under `ycc/skills/hooks-workflow/references/templates/` share
|
|
102
|
+
a common placeholder set. Build scripts substitute these values at generation time.
|
|
103
|
+
|
|
104
|
+
- `{{LANGUAGE}}` — the language slug passed as the first positional argument to the
|
|
105
|
+
skill, e.g. `python`, `typescript`, `go`. Resolves to the `ycc/rules/<language>/`
|
|
106
|
+
directory name.
|
|
107
|
+
|
|
108
|
+
- `{{EVENT}}` — the hook event name, one of `PreToolUse`, `PostToolUse`, or `Stop`.
|
|
109
|
+
Matches the key used in the Claude Code `settings.json` hooks object and in the
|
|
110
|
+
capability matrix row prefix.
|
|
111
|
+
|
|
112
|
+
- `{{COMMAND}}` — the shell command string extracted from the resolved rules file. This
|
|
113
|
+
is the literal command that will be passed to `build-hook-config.sh` and written into
|
|
114
|
+
the emitted artifact. For Cursor and Codex targets, this command is advisory; it is
|
|
115
|
+
not executed by the target runtime.
|
|
116
|
+
|
|
117
|
+
- `{{MATCHER}}` — the Claude Code tool matcher string (e.g. a tool name like `Bash` or
|
|
118
|
+
a glob pattern). May be an empty string for events that do not scope to a specific
|
|
119
|
+
tool. On Cursor and Codex targets, the matcher is written as a comment only.
|
|
120
|
+
|
|
121
|
+
## How to update this doc
|
|
122
|
+
|
|
123
|
+
Before editing capability verdicts here, update the matrix first:
|
|
124
|
+
|
|
125
|
+
1. Revise the relevant cell in
|
|
126
|
+
`ycc/skills/_shared/references/target-capability-matrix.md`.
|
|
127
|
+
2. Update the corresponding Notes entry in the same file.
|
|
128
|
+
3. Update the prose section in this document to reflect the new verdict and its
|
|
129
|
+
rationale.
|
|
130
|
+
4. Re-run the compatibility audit via `ycc:compatibility-audit` to confirm no
|
|
131
|
+
downstream assertions are broken.
|
|
132
|
+
|
|
133
|
+
Do not change the status labels in this document without first changing the matrix. The
|
|
134
|
+
matrix is the parser-facing source of truth; this file is the human-readable companion.
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
{
|
|
2
|
+
"_note": "generator template — do not hand-edit. See ../../../../skills/hooks-workflow/references/support-notes.md.",
|
|
3
|
+
"hooks": {
|
|
4
|
+
"{{EVENT}}": [
|
|
5
|
+
{
|
|
6
|
+
"matcher": "{{MATCHER}}",
|
|
7
|
+
"hooks": [
|
|
8
|
+
{ "type": "command", "command": "{{COMMAND}}" }
|
|
9
|
+
]
|
|
10
|
+
}
|
|
11
|
+
]
|
|
12
|
+
}
|
|
13
|
+
}
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
# Advisory only — Codex hooks are under development; verify support in the installed CLI.
|
|
2
|
+
# See research/plugin-additions/evidence/verification-log.md for sourcing.
|
|
3
|
+
# Generator template — do not hand-edit. See ../../../../skills/hooks-workflow/references/support-notes.md.
|
|
4
|
+
|
|
5
|
+
[hooks.{{EVENT}}]
|
|
6
|
+
matcher = "{{MATCHER}}"
|
|
7
|
+
command = "{{COMMAND}}"
|
|
8
|
+
language = "{{LANGUAGE}}"
|
|
9
|
+
advisory = true
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
---
|
|
2
|
+
description: Advisory hooks recommendations for {{LANGUAGE}}
|
|
3
|
+
tags: [hooks, ycc, advisory]
|
|
4
|
+
---
|
|
5
|
+
|
|
6
|
+
<!-- hooks-workflow: advisory — Cursor does not execute hooks natively. -->
|
|
7
|
+
<!-- Event: {{EVENT}} -->
|
|
8
|
+
<!-- Matcher: {{MATCHER}} -->
|
|
9
|
+
|
|
10
|
+
## Recommended command
|
|
11
|
+
|
|
12
|
+
```
|
|
13
|
+
{{COMMAND}}
|
|
14
|
+
```
|
|
15
|
+
|
|
16
|
+
See `../../../../skills/hooks-workflow/references/support-notes.md` for the full matrix.
|