universal-dev-standards 3.5.1-beta.1 → 3.5.1-beta.11
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/bin/uds.js +2 -0
- package/bundled/core/ai-instruction-standards.md +205 -0
- package/bundled/core/anti-hallucination.md +684 -0
- package/bundled/core/changelog-standards.md +556 -0
- package/bundled/core/checkin-standards.md +935 -0
- package/bundled/core/code-review-checklist.md +684 -0
- package/bundled/core/commit-message-guide.md +915 -0
- package/bundled/core/documentation-structure.md +1117 -0
- package/bundled/core/documentation-writing-standards.md +487 -0
- package/bundled/core/error-code-standards.md +382 -0
- package/bundled/core/git-workflow.md +859 -0
- package/bundled/core/logging-standards.md +323 -0
- package/bundled/core/project-structure.md +354 -0
- package/bundled/core/refactoring-standards.md +636 -0
- package/bundled/core/spec-driven-development.md +207 -0
- package/bundled/core/test-completeness-dimensions.md +536 -0
- package/bundled/core/test-driven-development.md +995 -0
- package/bundled/core/testing-standards.md +3061 -0
- package/bundled/core/versioning.md +902 -0
- package/bundled/locales/README.md +88 -0
- package/bundled/locales/zh-CN/CHANGELOG.md +705 -0
- package/bundled/locales/zh-CN/CLAUDE.md +213 -0
- package/bundled/locales/zh-CN/MAINTENANCE.md +689 -0
- package/bundled/locales/zh-CN/README.md +707 -0
- package/bundled/locales/zh-CN/STANDARDS-MAPPING.md +177 -0
- package/bundled/locales/zh-CN/adoption/ADOPTION-GUIDE.md +392 -0
- package/bundled/locales/zh-CN/adoption/STATIC-DYNAMIC-GUIDE.md +302 -0
- package/bundled/locales/zh-CN/adoption/checklists/enterprise.md +332 -0
- package/bundled/locales/zh-CN/adoption/checklists/minimal.md +141 -0
- package/bundled/locales/zh-CN/adoption/checklists/recommended.md +272 -0
- package/bundled/locales/zh-CN/ai/MAINTENANCE.md +739 -0
- package/bundled/locales/zh-CN/ai/options/changelog/auto-generated.ai.yaml +76 -0
- package/bundled/locales/zh-CN/ai/options/changelog/keep-a-changelog.ai.yaml +99 -0
- package/bundled/locales/zh-CN/ai/options/code-review/automated-review.ai.yaml +120 -0
- package/bundled/locales/zh-CN/ai/options/code-review/pair-programming.ai.yaml +109 -0
- package/bundled/locales/zh-CN/ai/options/code-review/pr-review.ai.yaml +104 -0
- package/bundled/locales/zh-CN/ai/options/commit-message/bilingual.ai.yaml +105 -0
- package/bundled/locales/zh-CN/ai/options/commit-message/english.ai.yaml +79 -0
- package/bundled/locales/zh-CN/ai/options/commit-message/traditional-chinese.ai.yaml +100 -0
- package/bundled/locales/zh-CN/ai/options/documentation/api-docs.ai.yaml +140 -0
- package/bundled/locales/zh-CN/ai/options/documentation/markdown-docs.ai.yaml +89 -0
- package/bundled/locales/zh-CN/ai/options/documentation/wiki-style.ai.yaml +119 -0
- package/bundled/locales/zh-CN/ai/options/git-workflow/gitflow.ai.yaml +133 -0
- package/bundled/locales/zh-CN/ai/options/git-workflow/github-flow.ai.yaml +73 -0
- package/bundled/locales/zh-CN/ai/options/git-workflow/merge-commit.ai.yaml +88 -0
- package/bundled/locales/zh-CN/ai/options/git-workflow/rebase-ff.ai.yaml +113 -0
- package/bundled/locales/zh-CN/ai/options/git-workflow/squash-merge.ai.yaml +85 -0
- package/bundled/locales/zh-CN/ai/options/git-workflow/trunk-based.ai.yaml +117 -0
- package/bundled/locales/zh-CN/ai/options/project-structure/dotnet.ai.yaml +108 -0
- package/bundled/locales/zh-CN/ai/options/project-structure/go.ai.yaml +115 -0
- package/bundled/locales/zh-CN/ai/options/project-structure/java.ai.yaml +113 -0
- package/bundled/locales/zh-CN/ai/options/project-structure/kotlin.ai.yaml +123 -0
- package/bundled/locales/zh-CN/ai/options/project-structure/nodejs.ai.yaml +101 -0
- package/bundled/locales/zh-CN/ai/options/project-structure/php.ai.yaml +147 -0
- package/bundled/locales/zh-CN/ai/options/project-structure/python.ai.yaml +116 -0
- package/bundled/locales/zh-CN/ai/options/project-structure/ruby.ai.yaml +140 -0
- package/bundled/locales/zh-CN/ai/options/project-structure/rust.ai.yaml +117 -0
- package/bundled/locales/zh-CN/ai/options/project-structure/swift.ai.yaml +143 -0
- package/bundled/locales/zh-CN/ai/options/testing/contract-testing.ai.yaml +254 -0
- package/bundled/locales/zh-CN/ai/options/testing/e2e-testing.ai.yaml +116 -0
- package/bundled/locales/zh-CN/ai/options/testing/industry-pyramid.ai.yaml +144 -0
- package/bundled/locales/zh-CN/ai/options/testing/integration-testing.ai.yaml +90 -0
- package/bundled/locales/zh-CN/ai/options/testing/istqb-framework.ai.yaml +108 -0
- package/bundled/locales/zh-CN/ai/options/testing/performance-testing.ai.yaml +272 -0
- package/bundled/locales/zh-CN/ai/options/testing/security-testing.ai.yaml +160 -0
- package/bundled/locales/zh-CN/ai/options/testing/system-testing.ai.yaml +101 -0
- package/bundled/locales/zh-CN/ai/options/testing/unit-testing.ai.yaml +82 -0
- package/bundled/locales/zh-CN/ai/standards/anti-hallucination.ai.yaml +145 -0
- package/bundled/locales/zh-CN/ai/standards/changelog.ai.yaml +146 -0
- package/bundled/locales/zh-CN/ai/standards/checkin-standards.ai.yaml +170 -0
- package/bundled/locales/zh-CN/ai/standards/code-review.ai.yaml +148 -0
- package/bundled/locales/zh-CN/ai/standards/commit-message.ai.yaml +175 -0
- package/bundled/locales/zh-CN/ai/standards/documentation-structure.ai.yaml +124 -0
- package/bundled/locales/zh-CN/ai/standards/documentation-writing-standards.ai.yaml +190 -0
- package/bundled/locales/zh-CN/ai/standards/error-codes.ai.yaml +139 -0
- package/bundled/locales/zh-CN/ai/standards/git-workflow.ai.yaml +95 -0
- package/bundled/locales/zh-CN/ai/standards/logging.ai.yaml +128 -0
- package/bundled/locales/zh-CN/ai/standards/project-structure.ai.yaml +134 -0
- package/bundled/locales/zh-CN/ai/standards/spec-driven-development.ai.yaml +169 -0
- package/bundled/locales/zh-CN/ai/standards/test-completeness-dimensions.ai.yaml +220 -0
- package/bundled/locales/zh-CN/ai/standards/testing.ai.yaml +137 -0
- package/bundled/locales/zh-CN/ai/standards/versioning.ai.yaml +211 -0
- package/bundled/locales/zh-CN/core/ai-instruction-standards.md +213 -0
- package/bundled/locales/zh-CN/core/anti-hallucination.md +691 -0
- package/bundled/locales/zh-CN/core/changelog-standards.md +147 -0
- package/bundled/locales/zh-CN/core/checkin-standards.md +943 -0
- package/bundled/locales/zh-CN/core/code-review-guide.md +693 -0
- package/bundled/locales/zh-CN/core/commit-message-guide.md +129 -0
- package/bundled/locales/zh-CN/core/documentation-structure.md +173 -0
- package/bundled/locales/zh-CN/core/documentation-writing-standards.md +495 -0
- package/bundled/locales/zh-CN/core/error-code-standards.md +180 -0
- package/bundled/locales/zh-CN/core/git-workflow.md +193 -0
- package/bundled/locales/zh-CN/core/logging-standards.md +174 -0
- package/bundled/locales/zh-CN/core/project-structure.md +184 -0
- package/bundled/locales/zh-CN/core/refactoring-standards.md +642 -0
- package/bundled/locales/zh-CN/core/spec-driven-development.md +215 -0
- package/bundled/locales/zh-CN/core/test-completeness-dimensions.md +544 -0
- package/bundled/locales/zh-CN/core/test-driven-development.md +1002 -0
- package/bundled/locales/zh-CN/core/testing-standards.md +170 -0
- package/bundled/locales/zh-CN/core/versioning.md +177 -0
- package/bundled/locales/zh-CN/docs/AI-AGENT-ROADMAP.md +303 -0
- package/bundled/locales/zh-CN/docs/CLI-INIT-OPTIONS.md +990 -0
- package/bundled/locales/zh-CN/docs/OPERATION-WORKFLOW.md +1064 -0
- package/bundled/locales/zh-CN/docs/USAGE-MODES-COMPARISON.md +333 -0
- package/bundled/locales/zh-CN/docs/WINDOWS-GUIDE.md +215 -0
- package/bundled/locales/zh-CN/integrations/codex/AGENTS.md +115 -0
- package/bundled/locales/zh-CN/integrations/codex/README.md +67 -0
- package/bundled/locales/zh-CN/integrations/gemini-cli/GEMINI.md +102 -0
- package/bundled/locales/zh-CN/integrations/gemini-cli/README.md +140 -0
- package/bundled/locales/zh-CN/integrations/github-copilot/COPILOT-CHAT-REFERENCE.md +269 -0
- package/bundled/locales/zh-CN/integrations/github-copilot/README.md +167 -0
- package/bundled/locales/zh-CN/integrations/github-copilot/copilot-instructions.md +263 -0
- package/bundled/locales/zh-CN/integrations/github-copilot/skills-mapping.md +192 -0
- package/bundled/locales/zh-CN/integrations/google-antigravity/INSTRUCTIONS.md +61 -0
- package/bundled/locales/zh-CN/integrations/google-antigravity/README.md +84 -0
- package/bundled/locales/zh-CN/integrations/opencode/AGENTS.md +111 -0
- package/bundled/locales/zh-CN/integrations/opencode/README.md +176 -0
- package/bundled/locales/zh-CN/integrations/opencode/skills-mapping.md +396 -0
- package/bundled/locales/zh-CN/integrations/openspec/AGENTS.md +301 -0
- package/bundled/locales/zh-CN/integrations/openspec/README.md +43 -0
- package/bundled/locales/zh-CN/integrations/spec-kit/AGENTS.md +184 -0
- package/bundled/locales/zh-CN/integrations/spec-kit/README.md +43 -0
- package/bundled/locales/zh-CN/options/commit-message/bilingual.md +161 -0
- package/bundled/locales/zh-CN/options/commit-message/english.md +137 -0
- package/bundled/locales/zh-CN/options/commit-message/traditional-chinese.md +162 -0
- package/bundled/locales/zh-CN/options/git-workflow/gitflow.md +147 -0
- package/bundled/locales/zh-CN/options/git-workflow/github-flow.md +124 -0
- package/bundled/locales/zh-CN/options/git-workflow/merge-commit.md +124 -0
- package/bundled/locales/zh-CN/options/git-workflow/rebase-ff.md +160 -0
- package/bundled/locales/zh-CN/options/git-workflow/squash-merge.md +117 -0
- package/bundled/locales/zh-CN/options/git-workflow/trunk-based.md +125 -0
- package/bundled/locales/zh-CN/options/project-structure/dotnet.md +183 -0
- package/bundled/locales/zh-CN/options/project-structure/go.md +226 -0
- package/bundled/locales/zh-CN/options/project-structure/java.md +213 -0
- package/bundled/locales/zh-CN/options/project-structure/nodejs.md +185 -0
- package/bundled/locales/zh-CN/options/project-structure/python.md +229 -0
- package/bundled/locales/zh-CN/options/testing/e2e-testing.md +207 -0
- package/bundled/locales/zh-CN/options/testing/integration-testing.md +230 -0
- package/bundled/locales/zh-CN/options/testing/system-testing.md +183 -0
- package/bundled/locales/zh-CN/options/testing/unit-testing.md +165 -0
- package/bundled/locales/zh-CN/skills/INTEGRATION-GUIDE.md +218 -0
- package/bundled/locales/zh-CN/skills/README.md +134 -0
- package/bundled/locales/zh-CN/skills/_shared/README.md +68 -0
- package/bundled/locales/zh-CN/skills/claude-code/CONTRIBUTING.template.md +151 -0
- package/bundled/locales/zh-CN/skills/claude-code/README.md +174 -0
- package/bundled/locales/zh-CN/skills/claude-code/ai-collaboration-standards/SKILL.md +175 -0
- package/bundled/locales/zh-CN/skills/claude-code/ai-collaboration-standards/anti-hallucination.md +223 -0
- package/bundled/locales/zh-CN/skills/claude-code/ai-collaboration-standards/certainty-labels.md +132 -0
- package/bundled/locales/zh-CN/skills/claude-code/changelog-guide/SKILL.md +237 -0
- package/bundled/locales/zh-CN/skills/claude-code/checkin-assistant/SKILL.md +407 -0
- package/bundled/locales/zh-CN/skills/claude-code/code-review-assistant/SKILL.md +154 -0
- package/bundled/locales/zh-CN/skills/claude-code/code-review-assistant/checkin-checklist.md +257 -0
- package/bundled/locales/zh-CN/skills/claude-code/code-review-assistant/review-checklist.md +246 -0
- package/bundled/locales/zh-CN/skills/claude-code/commands/bdd.md +142 -0
- package/bundled/locales/zh-CN/skills/claude-code/commands/methodology.md +274 -0
- package/bundled/locales/zh-CN/skills/claude-code/commit-standards/SKILL.md +191 -0
- package/bundled/locales/zh-CN/skills/claude-code/commit-standards/conventional-commits.md +264 -0
- package/bundled/locales/zh-CN/skills/claude-code/commit-standards/language-options.md +172 -0
- package/bundled/locales/zh-CN/skills/claude-code/documentation-guide/SKILL.md +421 -0
- package/bundled/locales/zh-CN/skills/claude-code/documentation-guide/documentation-structure.md +357 -0
- package/bundled/locales/zh-CN/skills/claude-code/documentation-guide/readme-template.md +412 -0
- package/bundled/locales/zh-CN/skills/claude-code/error-code-guide/SKILL.md +269 -0
- package/bundled/locales/zh-CN/skills/claude-code/git-workflow-guide/SKILL.md +218 -0
- package/bundled/locales/zh-CN/skills/claude-code/git-workflow-guide/branch-naming.md +220 -0
- package/bundled/locales/zh-CN/skills/claude-code/git-workflow-guide/git-workflow.md +321 -0
- package/bundled/locales/zh-CN/skills/claude-code/logging-guide/SKILL.md +285 -0
- package/bundled/locales/zh-CN/skills/claude-code/methodology-system/SKILL.md +131 -0
- package/bundled/locales/zh-CN/skills/claude-code/methodology-system/create-methodology.md +350 -0
- package/bundled/locales/zh-CN/skills/claude-code/methodology-system/runtime.md +279 -0
- package/bundled/locales/zh-CN/skills/claude-code/project-structure-guide/SKILL.md +143 -0
- package/bundled/locales/zh-CN/skills/claude-code/project-structure-guide/language-patterns.md +271 -0
- package/bundled/locales/zh-CN/skills/claude-code/refactoring-assistant/SKILL.md +162 -0
- package/bundled/locales/zh-CN/skills/claude-code/release-standards/SKILL.md +191 -0
- package/bundled/locales/zh-CN/skills/claude-code/release-standards/changelog-format.md +247 -0
- package/bundled/locales/zh-CN/skills/claude-code/release-standards/release-workflow.md +345 -0
- package/bundled/locales/zh-CN/skills/claude-code/release-standards/semantic-versioning.md +250 -0
- package/bundled/locales/zh-CN/skills/claude-code/requirement-assistant/SKILL.md +227 -0
- package/bundled/locales/zh-CN/skills/claude-code/requirement-assistant/requirement-checklist.md +325 -0
- package/bundled/locales/zh-CN/skills/claude-code/requirement-assistant/requirement-writing.md +399 -0
- package/bundled/locales/zh-CN/skills/claude-code/spec-driven-dev/SKILL.md +243 -0
- package/bundled/locales/zh-CN/skills/claude-code/tdd-assistant/SKILL.md +332 -0
- package/bundled/locales/zh-CN/skills/claude-code/tdd-assistant/language-examples.md +639 -0
- package/bundled/locales/zh-CN/skills/claude-code/tdd-assistant/tdd-workflow.md +486 -0
- package/bundled/locales/zh-CN/skills/claude-code/test-coverage-assistant/SKILL.md +282 -0
- package/bundled/locales/zh-CN/skills/claude-code/testing-guide/SKILL.md +234 -0
- package/bundled/locales/zh-CN/skills/claude-code/testing-guide/testing-pyramid.md +448 -0
- package/bundled/locales/zh-CN/skills/cline/README.md +58 -0
- package/bundled/locales/zh-CN/skills/copilot/README.md +61 -0
- package/bundled/locales/zh-CN/skills/copilot/copilot-instructions.md +79 -0
- package/bundled/locales/zh-CN/skills/cursor/README.md +58 -0
- package/bundled/locales/zh-CN/skills/windsurf/README.md +59 -0
- package/bundled/locales/zh-TW/CHANGELOG.md +707 -0
- package/bundled/locales/zh-TW/CLAUDE.md +213 -0
- package/bundled/locales/zh-TW/MAINTENANCE.md +683 -0
- package/bundled/locales/zh-TW/README.md +687 -0
- package/bundled/locales/zh-TW/STANDARDS-MAPPING.md +177 -0
- package/bundled/locales/zh-TW/adoption/ADOPTION-GUIDE.md +392 -0
- package/bundled/locales/zh-TW/adoption/STATIC-DYNAMIC-GUIDE.md +299 -0
- package/bundled/locales/zh-TW/adoption/checklists/enterprise.md +332 -0
- package/bundled/locales/zh-TW/adoption/checklists/minimal.md +141 -0
- package/bundled/locales/zh-TW/adoption/checklists/recommended.md +272 -0
- package/bundled/locales/zh-TW/ai/MAINTENANCE.md +754 -0
- package/bundled/locales/zh-TW/ai/options/changelog/auto-generated.ai.yaml +76 -0
- package/bundled/locales/zh-TW/ai/options/changelog/keep-a-changelog.ai.yaml +99 -0
- package/bundled/locales/zh-TW/ai/options/code-review/automated-review.ai.yaml +120 -0
- package/bundled/locales/zh-TW/ai/options/code-review/pair-programming.ai.yaml +109 -0
- package/bundled/locales/zh-TW/ai/options/code-review/pr-review.ai.yaml +104 -0
- package/bundled/locales/zh-TW/ai/options/commit-message/bilingual.ai.yaml +105 -0
- package/bundled/locales/zh-TW/ai/options/commit-message/english.ai.yaml +79 -0
- package/bundled/locales/zh-TW/ai/options/commit-message/traditional-chinese.ai.yaml +100 -0
- package/bundled/locales/zh-TW/ai/options/documentation/api-docs.ai.yaml +140 -0
- package/bundled/locales/zh-TW/ai/options/documentation/markdown-docs.ai.yaml +89 -0
- package/bundled/locales/zh-TW/ai/options/documentation/wiki-style.ai.yaml +119 -0
- package/bundled/locales/zh-TW/ai/options/git-workflow/gitflow.ai.yaml +133 -0
- package/bundled/locales/zh-TW/ai/options/git-workflow/github-flow.ai.yaml +73 -0
- package/bundled/locales/zh-TW/ai/options/git-workflow/merge-commit.ai.yaml +88 -0
- package/bundled/locales/zh-TW/ai/options/git-workflow/rebase-ff.ai.yaml +113 -0
- package/bundled/locales/zh-TW/ai/options/git-workflow/squash-merge.ai.yaml +85 -0
- package/bundled/locales/zh-TW/ai/options/git-workflow/trunk-based.ai.yaml +117 -0
- package/bundled/locales/zh-TW/ai/options/project-structure/dotnet.ai.yaml +108 -0
- package/bundled/locales/zh-TW/ai/options/project-structure/go.ai.yaml +115 -0
- package/bundled/locales/zh-TW/ai/options/project-structure/java.ai.yaml +113 -0
- package/bundled/locales/zh-TW/ai/options/project-structure/kotlin.ai.yaml +123 -0
- package/bundled/locales/zh-TW/ai/options/project-structure/nodejs.ai.yaml +101 -0
- package/bundled/locales/zh-TW/ai/options/project-structure/php.ai.yaml +147 -0
- package/bundled/locales/zh-TW/ai/options/project-structure/python.ai.yaml +116 -0
- package/bundled/locales/zh-TW/ai/options/project-structure/ruby.ai.yaml +140 -0
- package/bundled/locales/zh-TW/ai/options/project-structure/rust.ai.yaml +117 -0
- package/bundled/locales/zh-TW/ai/options/project-structure/swift.ai.yaml +143 -0
- package/bundled/locales/zh-TW/ai/options/testing/contract-testing.ai.yaml +254 -0
- package/bundled/locales/zh-TW/ai/options/testing/e2e-testing.ai.yaml +116 -0
- package/bundled/locales/zh-TW/ai/options/testing/industry-pyramid.ai.yaml +144 -0
- package/bundled/locales/zh-TW/ai/options/testing/integration-testing.ai.yaml +90 -0
- package/bundled/locales/zh-TW/ai/options/testing/istqb-framework.ai.yaml +108 -0
- package/bundled/locales/zh-TW/ai/options/testing/performance-testing.ai.yaml +272 -0
- package/bundled/locales/zh-TW/ai/options/testing/security-testing.ai.yaml +160 -0
- package/bundled/locales/zh-TW/ai/options/testing/system-testing.ai.yaml +101 -0
- package/bundled/locales/zh-TW/ai/options/testing/unit-testing.ai.yaml +82 -0
- package/bundled/locales/zh-TW/ai/standards/anti-hallucination.ai.yaml +145 -0
- package/bundled/locales/zh-TW/ai/standards/changelog.ai.yaml +146 -0
- package/bundled/locales/zh-TW/ai/standards/checkin-standards.ai.yaml +170 -0
- package/bundled/locales/zh-TW/ai/standards/code-review.ai.yaml +148 -0
- package/bundled/locales/zh-TW/ai/standards/commit-message.ai.yaml +175 -0
- package/bundled/locales/zh-TW/ai/standards/documentation-structure.ai.yaml +124 -0
- package/bundled/locales/zh-TW/ai/standards/documentation-writing-standards.ai.yaml +190 -0
- package/bundled/locales/zh-TW/ai/standards/error-codes.ai.yaml +139 -0
- package/bundled/locales/zh-TW/ai/standards/git-workflow.ai.yaml +95 -0
- package/bundled/locales/zh-TW/ai/standards/logging.ai.yaml +128 -0
- package/bundled/locales/zh-TW/ai/standards/project-structure.ai.yaml +134 -0
- package/bundled/locales/zh-TW/ai/standards/spec-driven-development.ai.yaml +169 -0
- package/bundled/locales/zh-TW/ai/standards/test-completeness-dimensions.ai.yaml +220 -0
- package/bundled/locales/zh-TW/ai/standards/testing.ai.yaml +137 -0
- package/bundled/locales/zh-TW/ai/standards/versioning.ai.yaml +211 -0
- package/bundled/locales/zh-TW/core/ai-instruction-standards.md +213 -0
- package/bundled/locales/zh-TW/core/anti-hallucination.md +691 -0
- package/bundled/locales/zh-TW/core/changelog-standards.md +564 -0
- package/bundled/locales/zh-TW/core/checkin-standards.md +943 -0
- package/bundled/locales/zh-TW/core/code-review-checklist.md +693 -0
- package/bundled/locales/zh-TW/core/commit-message-guide.md +809 -0
- package/bundled/locales/zh-TW/core/documentation-structure.md +1125 -0
- package/bundled/locales/zh-TW/core/documentation-writing-standards.md +495 -0
- package/bundled/locales/zh-TW/core/error-code-standards.md +384 -0
- package/bundled/locales/zh-TW/core/git-workflow.md +860 -0
- package/bundled/locales/zh-TW/core/logging-standards.md +325 -0
- package/bundled/locales/zh-TW/core/project-structure.md +362 -0
- package/bundled/locales/zh-TW/core/refactoring-standards.md +642 -0
- package/bundled/locales/zh-TW/core/spec-driven-development.md +215 -0
- package/bundled/locales/zh-TW/core/test-completeness-dimensions.md +544 -0
- package/bundled/locales/zh-TW/core/test-driven-development.md +1004 -0
- package/bundled/locales/zh-TW/core/testing-standards.md +2158 -0
- package/bundled/locales/zh-TW/core/versioning.md +909 -0
- package/bundled/locales/zh-TW/docs/AI-AGENT-ROADMAP.md +303 -0
- package/bundled/locales/zh-TW/docs/CLI-INIT-OPTIONS.md +990 -0
- package/bundled/locales/zh-TW/docs/OPERATION-WORKFLOW.md +1064 -0
- package/bundled/locales/zh-TW/docs/USAGE-MODES-COMPARISON.md +333 -0
- package/bundled/locales/zh-TW/docs/WINDOWS-GUIDE.md +215 -0
- package/bundled/locales/zh-TW/integrations/codex/AGENTS.md +115 -0
- package/bundled/locales/zh-TW/integrations/codex/README.md +113 -0
- package/bundled/locales/zh-TW/integrations/gemini-cli/GEMINI.md +102 -0
- package/bundled/locales/zh-TW/integrations/gemini-cli/README.md +140 -0
- package/bundled/locales/zh-TW/integrations/github-copilot/COPILOT-CHAT-REFERENCE.md +269 -0
- package/bundled/locales/zh-TW/integrations/github-copilot/README.md +167 -0
- package/bundled/locales/zh-TW/integrations/github-copilot/copilot-instructions.md +263 -0
- package/bundled/locales/zh-TW/integrations/github-copilot/skills-mapping.md +192 -0
- package/bundled/locales/zh-TW/integrations/google-antigravity/INSTRUCTIONS.md +61 -0
- package/bundled/locales/zh-TW/integrations/google-antigravity/README.md +84 -0
- package/bundled/locales/zh-TW/integrations/opencode/AGENTS.md +111 -0
- package/bundled/locales/zh-TW/integrations/opencode/README.md +176 -0
- package/bundled/locales/zh-TW/integrations/opencode/skills-mapping.md +396 -0
- package/bundled/locales/zh-TW/integrations/openspec/AGENTS.md +301 -0
- package/bundled/locales/zh-TW/integrations/openspec/README.md +43 -0
- package/bundled/locales/zh-TW/integrations/spec-kit/AGENTS.md +184 -0
- package/bundled/locales/zh-TW/integrations/spec-kit/README.md +43 -0
- package/bundled/locales/zh-TW/options/commit-message/bilingual.md +161 -0
- package/bundled/locales/zh-TW/options/commit-message/english.md +137 -0
- package/bundled/locales/zh-TW/options/commit-message/traditional-chinese.md +162 -0
- package/bundled/locales/zh-TW/options/git-workflow/gitflow.md +147 -0
- package/bundled/locales/zh-TW/options/git-workflow/github-flow.md +124 -0
- package/bundled/locales/zh-TW/options/git-workflow/merge-commit.md +124 -0
- package/bundled/locales/zh-TW/options/git-workflow/rebase-ff.md +160 -0
- package/bundled/locales/zh-TW/options/git-workflow/squash-merge.md +117 -0
- package/bundled/locales/zh-TW/options/git-workflow/trunk-based.md +125 -0
- package/bundled/locales/zh-TW/options/project-structure/dotnet.md +183 -0
- package/bundled/locales/zh-TW/options/project-structure/go.md +226 -0
- package/bundled/locales/zh-TW/options/project-structure/java.md +213 -0
- package/bundled/locales/zh-TW/options/project-structure/nodejs.md +185 -0
- package/bundled/locales/zh-TW/options/project-structure/python.md +229 -0
- package/bundled/locales/zh-TW/options/testing/e2e-testing.md +207 -0
- package/bundled/locales/zh-TW/options/testing/integration-testing.md +230 -0
- package/bundled/locales/zh-TW/options/testing/system-testing.md +183 -0
- package/bundled/locales/zh-TW/options/testing/unit-testing.md +165 -0
- package/bundled/locales/zh-TW/skills/INTEGRATION-GUIDE.md +218 -0
- package/bundled/locales/zh-TW/skills/README.md +132 -0
- package/bundled/locales/zh-TW/skills/_shared/README.md +68 -0
- package/bundled/locales/zh-TW/skills/claude-code/CONTRIBUTING.template.md +151 -0
- package/bundled/locales/zh-TW/skills/claude-code/README.md +174 -0
- package/bundled/locales/zh-TW/skills/claude-code/ai-collaboration-standards/SKILL.md +175 -0
- package/bundled/locales/zh-TW/skills/claude-code/ai-collaboration-standards/anti-hallucination.md +223 -0
- package/bundled/locales/zh-TW/skills/claude-code/ai-collaboration-standards/certainty-labels.md +132 -0
- package/bundled/locales/zh-TW/skills/claude-code/changelog-guide/SKILL.md +237 -0
- package/bundled/locales/zh-TW/skills/claude-code/checkin-assistant/SKILL.md +407 -0
- package/bundled/locales/zh-TW/skills/claude-code/code-review-assistant/SKILL.md +154 -0
- package/bundled/locales/zh-TW/skills/claude-code/code-review-assistant/checkin-checklist.md +257 -0
- package/bundled/locales/zh-TW/skills/claude-code/code-review-assistant/review-checklist.md +246 -0
- package/bundled/locales/zh-TW/skills/claude-code/commands/bdd.md +142 -0
- package/bundled/locales/zh-TW/skills/claude-code/commands/methodology.md +274 -0
- package/bundled/locales/zh-TW/skills/claude-code/commit-standards/SKILL.md +191 -0
- package/bundled/locales/zh-TW/skills/claude-code/commit-standards/conventional-commits.md +264 -0
- package/bundled/locales/zh-TW/skills/claude-code/commit-standards/language-options.md +172 -0
- package/bundled/locales/zh-TW/skills/claude-code/documentation-guide/SKILL.md +421 -0
- package/bundled/locales/zh-TW/skills/claude-code/documentation-guide/documentation-structure.md +357 -0
- package/bundled/locales/zh-TW/skills/claude-code/documentation-guide/readme-template.md +412 -0
- package/bundled/locales/zh-TW/skills/claude-code/error-code-guide/SKILL.md +269 -0
- package/bundled/locales/zh-TW/skills/claude-code/git-workflow-guide/SKILL.md +218 -0
- package/bundled/locales/zh-TW/skills/claude-code/git-workflow-guide/branch-naming.md +220 -0
- package/bundled/locales/zh-TW/skills/claude-code/git-workflow-guide/git-workflow.md +321 -0
- package/bundled/locales/zh-TW/skills/claude-code/logging-guide/SKILL.md +285 -0
- package/bundled/locales/zh-TW/skills/claude-code/methodology-system/SKILL.md +131 -0
- package/bundled/locales/zh-TW/skills/claude-code/methodology-system/create-methodology.md +350 -0
- package/bundled/locales/zh-TW/skills/claude-code/methodology-system/runtime.md +279 -0
- package/bundled/locales/zh-TW/skills/claude-code/project-structure-guide/SKILL.md +143 -0
- package/bundled/locales/zh-TW/skills/claude-code/project-structure-guide/language-patterns.md +271 -0
- package/bundled/locales/zh-TW/skills/claude-code/refactoring-assistant/SKILL.md +162 -0
- package/bundled/locales/zh-TW/skills/claude-code/release-standards/SKILL.md +191 -0
- package/bundled/locales/zh-TW/skills/claude-code/release-standards/changelog-format.md +247 -0
- package/bundled/locales/zh-TW/skills/claude-code/release-standards/release-workflow.md +345 -0
- package/bundled/locales/zh-TW/skills/claude-code/release-standards/semantic-versioning.md +250 -0
- package/bundled/locales/zh-TW/skills/claude-code/requirement-assistant/SKILL.md +227 -0
- package/bundled/locales/zh-TW/skills/claude-code/requirement-assistant/requirement-checklist.md +325 -0
- package/bundled/locales/zh-TW/skills/claude-code/requirement-assistant/requirement-writing.md +399 -0
- package/bundled/locales/zh-TW/skills/claude-code/spec-driven-dev/SKILL.md +243 -0
- package/bundled/locales/zh-TW/skills/claude-code/tdd-assistant/SKILL.md +332 -0
- package/bundled/locales/zh-TW/skills/claude-code/tdd-assistant/language-examples.md +639 -0
- package/bundled/locales/zh-TW/skills/claude-code/tdd-assistant/tdd-workflow.md +486 -0
- package/bundled/locales/zh-TW/skills/claude-code/test-coverage-assistant/SKILL.md +282 -0
- package/bundled/locales/zh-TW/skills/claude-code/testing-guide/SKILL.md +234 -0
- package/bundled/locales/zh-TW/skills/claude-code/testing-guide/testing-pyramid.md +448 -0
- package/bundled/locales/zh-TW/skills/cline/README.md +58 -0
- package/bundled/locales/zh-TW/skills/copilot/README.md +61 -0
- package/bundled/locales/zh-TW/skills/copilot/copilot-instructions.md +79 -0
- package/bundled/locales/zh-TW/skills/cursor/README.md +58 -0
- package/bundled/locales/zh-TW/skills/windsurf/README.md +59 -0
- package/bundled/skills/claude-code/CONTRIBUTING.template.md +141 -0
- package/bundled/skills/claude-code/README.md +196 -0
- package/bundled/skills/claude-code/ai/standards/checkin.ai.yaml +21 -0
- package/bundled/skills/claude-code/ai/standards/commit.ai.yaml +20 -0
- package/bundled/skills/claude-code/ai/standards/refactoring.ai.yaml +34 -0
- package/bundled/skills/claude-code/ai/standards/testing.ai.yaml +41 -0
- package/bundled/skills/claude-code/ai-collaboration-standards/SKILL.md +175 -0
- package/bundled/skills/claude-code/ai-collaboration-standards/anti-hallucination.md +215 -0
- package/bundled/skills/claude-code/ai-collaboration-standards/certainty-labels.md +124 -0
- package/bundled/skills/claude-code/changelog-guide/SKILL.md +232 -0
- package/bundled/skills/claude-code/checkin-assistant/SKILL.md +402 -0
- package/bundled/skills/claude-code/code-review-assistant/SKILL.md +220 -0
- package/bundled/skills/claude-code/code-review-assistant/checkin-checklist.md +249 -0
- package/bundled/skills/claude-code/code-review-assistant/review-checklist.md +238 -0
- package/bundled/skills/claude-code/commands/README.md +78 -0
- package/bundled/skills/claude-code/commands/bdd.md +142 -0
- package/bundled/skills/claude-code/commands/changelog.md +57 -0
- package/bundled/skills/claude-code/commands/check.md +91 -0
- package/bundled/skills/claude-code/commands/commit.md +48 -0
- package/bundled/skills/claude-code/commands/config.md +97 -0
- package/bundled/skills/claude-code/commands/coverage.md +58 -0
- package/bundled/skills/claude-code/commands/docs.md +75 -0
- package/bundled/skills/claude-code/commands/init.md +88 -0
- package/bundled/skills/claude-code/commands/methodology.md +268 -0
- package/bundled/skills/claude-code/commands/release.md +50 -0
- package/bundled/skills/claude-code/commands/requirement.md +54 -0
- package/bundled/skills/claude-code/commands/review.md +50 -0
- package/bundled/skills/claude-code/commands/spec.md +69 -0
- package/bundled/skills/claude-code/commands/tdd.md +86 -0
- package/bundled/skills/claude-code/commands/update.md +122 -0
- package/bundled/skills/claude-code/commit-standards/SKILL.md +249 -0
- package/bundled/skills/claude-code/commit-standards/conventional-commits.md +256 -0
- package/bundled/skills/claude-code/commit-standards/language-options.md +164 -0
- package/bundled/skills/claude-code/documentation-guide/SKILL.md +416 -0
- package/bundled/skills/claude-code/documentation-guide/documentation-structure.md +349 -0
- package/bundled/skills/claude-code/documentation-guide/readme-template.md +404 -0
- package/bundled/skills/claude-code/error-code-guide/SKILL.md +264 -0
- package/bundled/skills/claude-code/git-workflow-guide/SKILL.md +226 -0
- package/bundled/skills/claude-code/git-workflow-guide/branch-naming.md +212 -0
- package/bundled/skills/claude-code/git-workflow-guide/git-workflow.md +313 -0
- package/bundled/skills/claude-code/logging-guide/SKILL.md +280 -0
- package/bundled/skills/claude-code/methodology-system/SKILL.md +215 -0
- package/bundled/skills/claude-code/methodology-system/create-methodology.md +450 -0
- package/bundled/skills/claude-code/methodology-system/runtime.md +271 -0
- package/bundled/skills/claude-code/project-structure-guide/SKILL.md +143 -0
- package/bundled/skills/claude-code/project-structure-guide/language-patterns.md +263 -0
- package/bundled/skills/claude-code/refactoring-assistant/SKILL.md +205 -0
- package/bundled/skills/claude-code/release-standards/SKILL.md +191 -0
- package/bundled/skills/claude-code/release-standards/changelog-format.md +239 -0
- package/bundled/skills/claude-code/release-standards/release-workflow.md +337 -0
- package/bundled/skills/claude-code/release-standards/semantic-versioning.md +242 -0
- package/bundled/skills/claude-code/requirement-assistant/SKILL.md +222 -0
- package/bundled/skills/claude-code/requirement-assistant/requirement-checklist.md +317 -0
- package/bundled/skills/claude-code/requirement-assistant/requirement-writing.md +391 -0
- package/bundled/skills/claude-code/spec-driven-dev/SKILL.md +238 -0
- package/bundled/skills/claude-code/tdd-assistant/SKILL.md +384 -0
- package/bundled/skills/claude-code/tdd-assistant/language-examples.md +1276 -0
- package/bundled/skills/claude-code/tdd-assistant/tdd-workflow.md +659 -0
- package/bundled/skills/claude-code/test-coverage-assistant/SKILL.md +277 -0
- package/bundled/skills/claude-code/testing-guide/SKILL.md +317 -0
- package/bundled/skills/claude-code/testing-guide/testing-pyramid.md +440 -0
- package/package.json +4 -2
- package/src/commands/check.js +38 -6
- package/src/commands/init.js +20 -6
- package/src/commands/list.js +7 -2
- package/src/commands/skills.js +0 -2
- package/src/commands/update.js +271 -0
- package/src/i18n/messages.js +161 -11
- package/src/utils/copier.js +63 -10
- package/src/utils/skills-installer.js +47 -11
- package/standards-registry.json +6 -3
|
@@ -0,0 +1,396 @@
|
|
|
1
|
+
---
|
|
2
|
+
source: ../../../../integrations/opencode/skills-mapping.md
|
|
3
|
+
source_version: 1.4.0
|
|
4
|
+
translation_version: 1.4.0
|
|
5
|
+
last_synced: 2026-01-13
|
|
6
|
+
status: current
|
|
7
|
+
---
|
|
8
|
+
|
|
9
|
+
# Skills 移植指南
|
|
10
|
+
|
|
11
|
+
本文档将 Claude Code 技能对应到 OpenCode 的等效实现方式。
|
|
12
|
+
|
|
13
|
+
---
|
|
14
|
+
|
|
15
|
+
## 概述
|
|
16
|
+
|
|
17
|
+
Claude Code 提供 18 个技能和 16 个斜线命令。OpenCode 原生支持技能,且**完全兼容** Claude Code 技能格式。
|
|
18
|
+
|
|
19
|
+
### 关键优势:原生兼容
|
|
20
|
+
|
|
21
|
+
OpenCode 按以下顺序搜索技能:
|
|
22
|
+
1. `.opencode/skill/<name>/SKILL.md`(项目本地)
|
|
23
|
+
2. `~/.config/opencode/skill/<name>/SKILL.md`(全局)
|
|
24
|
+
3. **`.claude/skills/<name>/SKILL.md`**(Claude 兼容 ✅)
|
|
25
|
+
|
|
26
|
+
这意味着所有 UDS Claude Code 技能无需修改即可在 OpenCode 中使用。
|
|
27
|
+
|
|
28
|
+
---
|
|
29
|
+
|
|
30
|
+
## 技能对照表
|
|
31
|
+
|
|
32
|
+
| Claude Code 技能 | OpenCode 实现方式 | 状态 |
|
|
33
|
+
|-----------------|-------------------|------|
|
|
34
|
+
| **ai-collaboration-standards** | AGENTS.md 第 2 节 | ✅ 完整 |
|
|
35
|
+
| **commit-standards** | AGENTS.md 第 3 节 + 技能 | ✅ 完整 |
|
|
36
|
+
| **code-review-assistant** | AGENTS.md 第 4 节 + 技能 | ✅ 完整 |
|
|
37
|
+
| **tdd-assistant** | 技能(自动加载) | ✅ 完整 |
|
|
38
|
+
| **test-coverage-assistant** | 技能(自动加载) | ✅ 完整 |
|
|
39
|
+
| **checkin-assistant** | AGENTS.md 第 5 节 + 技能 | ✅ 完整 |
|
|
40
|
+
| **requirement-assistant** | 技能(自动加载) | ✅ 完整 |
|
|
41
|
+
| **spec-driven-dev** | AGENTS.md 第 1 节 + 技能 | ✅ 完整 |
|
|
42
|
+
| **testing-guide** | 技能(自动加载) | ✅ 完整 |
|
|
43
|
+
| **release-standards** | 技能(自动加载) | ✅ 完整 |
|
|
44
|
+
| **changelog-guide** | 技能(自动加载) | ✅ 完整 |
|
|
45
|
+
| **git-workflow-guide** | 技能(自动加载) | ✅ 完整 |
|
|
46
|
+
| **documentation-guide** | 技能(自动加载) | ✅ 完整 |
|
|
47
|
+
| **methodology-system** | 技能(自动加载) | ✅ 完整 |
|
|
48
|
+
| **refactoring-assistant** | 技能(自动加载) | ✅ 完整 |
|
|
49
|
+
| **error-code-guide** | 技能(自动加载) | ✅ 完整 |
|
|
50
|
+
| **project-structure-guide** | 技能(自动加载) | ✅ 完整 |
|
|
51
|
+
| **logging-guide** | 技能(自动加载) | ✅ 完整 |
|
|
52
|
+
|
|
53
|
+
### 状态说明
|
|
54
|
+
|
|
55
|
+
| 状态 | 含义 |
|
|
56
|
+
|------|------|
|
|
57
|
+
| ✅ 完整 | 技能在 OpenCode 中完全相同 |
|
|
58
|
+
| ⚠️ 部分 | 部分功能有差异 |
|
|
59
|
+
| ❌ 无 | 无法复制 |
|
|
60
|
+
|
|
61
|
+
---
|
|
62
|
+
|
|
63
|
+
## 斜线命令对照
|
|
64
|
+
|
|
65
|
+
OpenCode 支持与 Claude Code 相同的技能调用语法:
|
|
66
|
+
|
|
67
|
+
| Claude Code | OpenCode | 备注 |
|
|
68
|
+
|-------------|----------|------|
|
|
69
|
+
| `/commit` | `/commit` 或 `skill("commit-standards")` | 相同 |
|
|
70
|
+
| `/review` | `/review` 或 `skill("code-review-assistant")` | 相同 |
|
|
71
|
+
| `/tdd` | `/tdd` 或 `skill("tdd-assistant")` | 相同 |
|
|
72
|
+
| `/coverage` | `/coverage` 或 `skill("test-coverage-assistant")` | 相同 |
|
|
73
|
+
| `/requirement` | `/requirement` 或 `skill("requirement-assistant")` | 相同 |
|
|
74
|
+
| `/check` | `/check` 或 `skill("checkin-assistant")` | 相同 |
|
|
75
|
+
| `/release` | `/release` 或 `skill("release-standards")` | 相同 |
|
|
76
|
+
| `/changelog` | `/changelog` 或 `skill("changelog-guide")` | 相同 |
|
|
77
|
+
| `/docs` | `/docs` 或 `skill("documentation-guide")` | 相同 |
|
|
78
|
+
| `/spec` | `/spec` 或 `skill("spec-driven-dev")` | 相同 |
|
|
79
|
+
| `/methodology` | `/methodology` 或 `skill("methodology-system")` | 相同 |
|
|
80
|
+
| `/bdd` | 通过 `/methodology` 或 `/tdd` | 相同功能 |
|
|
81
|
+
| `/config` | `/config` 或 `skill("project-structure-guide")` | 相同 |
|
|
82
|
+
| `/init` | `/init`(内置) | OpenCode 原生 |
|
|
83
|
+
| `/update` | 手动或通过 CLI | 使用 `uds update` |
|
|
84
|
+
|
|
85
|
+
---
|
|
86
|
+
|
|
87
|
+
## 安装方法
|
|
88
|
+
|
|
89
|
+
### 方法一:使用 UDS CLI(推荐)
|
|
90
|
+
|
|
91
|
+
为 Claude Code 和 OpenCode 获取技能的最简单方式:
|
|
92
|
+
|
|
93
|
+
```bash
|
|
94
|
+
# 全局安装 UDS CLI
|
|
95
|
+
npm install -g universal-dev-standards
|
|
96
|
+
|
|
97
|
+
# 初始化项目 - 选择 OpenCode 作为 AI 工具
|
|
98
|
+
uds init
|
|
99
|
+
|
|
100
|
+
# 技能会安装到 .claude/skills/
|
|
101
|
+
# OpenCode 会自动检测此路径 ✅
|
|
102
|
+
```
|
|
103
|
+
|
|
104
|
+
**v3.5.0 新功能**:OpenCode 现在在 CLI 中被视为 skills 兼容工具。
|
|
105
|
+
当只选择 OpenCode(或 Claude Code)时,将自动提供带有 skills 的精简安装。
|
|
106
|
+
|
|
107
|
+
```bash
|
|
108
|
+
# 验证安装状态和 skills 兼容性
|
|
109
|
+
uds check
|
|
110
|
+
```
|
|
111
|
+
|
|
112
|
+
### 方法二:从 GitHub 克隆
|
|
113
|
+
|
|
114
|
+
```bash
|
|
115
|
+
# 克隆仓库
|
|
116
|
+
git clone https://github.com/AsiaOstrich/universal-dev-standards.git /tmp/uds
|
|
117
|
+
|
|
118
|
+
# 复制技能到 OpenCode 目录
|
|
119
|
+
cp -r /tmp/uds/skills/claude-code/* ~/.config/opencode/skill/
|
|
120
|
+
|
|
121
|
+
# 或复制到项目级别
|
|
122
|
+
cp -r /tmp/uds/skills/claude-code/* .opencode/skill/
|
|
123
|
+
|
|
124
|
+
# 清理
|
|
125
|
+
rm -rf /tmp/uds
|
|
126
|
+
```
|
|
127
|
+
|
|
128
|
+
### 方法三:通过 Claude Code Plugin(若已安装)
|
|
129
|
+
|
|
130
|
+
如果您已通过 Claude Code Plugin Marketplace 安装 UDS:
|
|
131
|
+
|
|
132
|
+
```bash
|
|
133
|
+
# 检查技能安装位置
|
|
134
|
+
uds skills
|
|
135
|
+
|
|
136
|
+
# 从 Claude 技能路径复制到 OpenCode
|
|
137
|
+
cp -r .claude/skills/* ~/.config/opencode/skill/
|
|
138
|
+
|
|
139
|
+
# 或复制特定技能
|
|
140
|
+
cp -r .claude/skills/commit-standards ~/.config/opencode/skill/
|
|
141
|
+
```
|
|
142
|
+
|
|
143
|
+
### 方法四:直接下载
|
|
144
|
+
|
|
145
|
+
```bash
|
|
146
|
+
# 直接下载特定技能
|
|
147
|
+
mkdir -p .opencode/skill/commit-standards
|
|
148
|
+
curl -o .opencode/skill/commit-standards/SKILL.md \
|
|
149
|
+
https://raw.githubusercontent.com/AsiaOstrich/universal-dev-standards/main/skills/claude-code/commit-standards/SKILL.md
|
|
150
|
+
```
|
|
151
|
+
|
|
152
|
+
### 方法五:使用 Claude 路径(零配置)
|
|
153
|
+
|
|
154
|
+
如果您已通过 `uds init` 安装 Claude Code 技能:
|
|
155
|
+
|
|
156
|
+
```bash
|
|
157
|
+
# OpenCode 会自动检测 .claude/skills/
|
|
158
|
+
# 无需任何操作!
|
|
159
|
+
```
|
|
160
|
+
|
|
161
|
+
### 方法六:社区 Marketplace
|
|
162
|
+
|
|
163
|
+
OpenCode 没有像 Claude Code 那样的官方 marketplace,但有几个社区驱动的选项:
|
|
164
|
+
|
|
165
|
+
**[n-skills](https://github.com/numman-ali/n-skills)** - 精选 marketplace:
|
|
166
|
+
- 支持 Claude Code、Cursor、Windsurf、Cline、OpenCode 和 Codex
|
|
167
|
+
- 只收录高质量、有实际价值的技能
|
|
168
|
+
|
|
169
|
+
**[claude-plugins.dev](https://claude-plugins.dev/skills)** - 自动索引发现:
|
|
170
|
+
- 自动索引 GitHub 上所有公开的 Agent Skills
|
|
171
|
+
- 支持 Claude、Cursor、OpenCode、Codex 等 AI 编码助手
|
|
172
|
+
|
|
173
|
+
**[agentskills.io](https://agentskills.io)** - 开放标准:
|
|
174
|
+
- Anthropic 于 2024 年 12 月发布的 Agent Skills 规范
|
|
175
|
+
- 已被 OpenCode、Codex、Cursor 等多种工具采用
|
|
176
|
+
|
|
177
|
+
---
|
|
178
|
+
|
|
179
|
+
## 功能比较
|
|
180
|
+
|
|
181
|
+
### 相同功能
|
|
182
|
+
|
|
183
|
+
| 功能 | Claude Code | OpenCode |
|
|
184
|
+
|------|-------------|----------|
|
|
185
|
+
| 技能格式 | YAML frontmatter + Markdown | ✅ 相同 |
|
|
186
|
+
| 技能搜索路径 | `.claude/skills/` | ✅ + `.opencode/skill/` |
|
|
187
|
+
| 斜线命令 | `/commit`、`/review` 等 | ✅ 相同 |
|
|
188
|
+
| 自动触发 | 基于关键字 | ✅ 相同 |
|
|
189
|
+
| 技能权限 | 按技能设置 | ✅ 相同 |
|
|
190
|
+
|
|
191
|
+
### OpenCode 优势
|
|
192
|
+
|
|
193
|
+
| 功能 | Claude Code | OpenCode |
|
|
194
|
+
|------|-------------|----------|
|
|
195
|
+
| 内置 agents | ❌ 无 | ✅ `build`、`plan`、`general`、`explore` |
|
|
196
|
+
| Agent 定义 | ❌ 非原生 | ✅ Markdown 文件 |
|
|
197
|
+
| Glob 模式 | ❌ 不支持 | ✅ `instructions: ["**/*.md"]` |
|
|
198
|
+
| Subagent 调用 | ❌ 非原生 | ✅ `@agent-name` |
|
|
199
|
+
| 多 LLM 提供者 | ❌ 仅 Claude | ✅ Claude、OpenAI、Google、本地 |
|
|
200
|
+
|
|
201
|
+
### Claude Code 优势
|
|
202
|
+
|
|
203
|
+
| 功能 | Claude Code | OpenCode |
|
|
204
|
+
|------|-------------|----------|
|
|
205
|
+
| MCP 集成 | ✅ 完整 | ⚠️ 有限 |
|
|
206
|
+
| 子目录规则 | ✅ 每文件夹 CLAUDE.md | ❌ 单一 AGENTS.md |
|
|
207
|
+
| 工具生态系 | ✅ Anthropic 工具 | ⚠️ 社区工具 |
|
|
208
|
+
|
|
209
|
+
---
|
|
210
|
+
|
|
211
|
+
## 跨工具兼容性
|
|
212
|
+
|
|
213
|
+
### Skills 路径参考
|
|
214
|
+
|
|
215
|
+
[Agent Skills 规范](https://agentskills.io/specification) **未指定标准安装路径**,各工具自行实现探索机制。
|
|
216
|
+
|
|
217
|
+
#### 路径对照表
|
|
218
|
+
|
|
219
|
+
| AI Agent | 项目路径 | 用户路径 | Claude 兼容 |
|
|
220
|
+
|----------|---------|---------|-------------|
|
|
221
|
+
| Claude Code | `.claude/skills/` | `~/.claude/skills/` | ✅ 原生 |
|
|
222
|
+
| OpenCode | `.opencode/skill/`<br>`.claude/skills/` | `~/.config/opencode/skill/` | ✅ 支持 |
|
|
223
|
+
| Cursor | `.cursor/skills/`<br>`.claude/skills/` | `~/.cursor/skills/`<br>`~/.claude/skills/` | ✅ 支持 |
|
|
224
|
+
| OpenAI Codex | `.codex/skills/` | `~/.codex/skills/` | ❌ 独立 |
|
|
225
|
+
| GitHub Copilot | `.github/skills/`<br>`.claude/skills/` (legacy) | `~/.copilot/skills/`<br>`~/.claude/skills/` (legacy) | ✅ 支持 |
|
|
226
|
+
| Windsurf | `.windsurf/skills/` | `~/.codeium/windsurf/skills/` | ❌ 独立 |
|
|
227
|
+
| Cline | `.cline/skills/` | `~/.cline/skills/` | ❌ 独立 |
|
|
228
|
+
|
|
229
|
+
#### 为何选择 `.claude/skills/`?
|
|
230
|
+
|
|
231
|
+
UDS 将技能安装到 `.claude/skills/` 的原因:
|
|
232
|
+
|
|
233
|
+
1. **最广泛兼容**:多数工具支持此路径(Cursor、Copilot、OpenCode)
|
|
234
|
+
2. **事实标准**:Claude Code 是 Agent Skills 概念的发起者
|
|
235
|
+
3. **单次安装**:一次安装即可跨多个工具使用
|
|
236
|
+
|
|
237
|
+
#### 未来考量
|
|
238
|
+
|
|
239
|
+
- GitHub Copilot 建议使用 `.github/skills/`(将 `.claude/` 标记为 legacy)
|
|
240
|
+
- 中立路径如 `.agent-skills/` 可能成为未来标准
|
|
241
|
+
- UDS 将在社区达成共识时进行调整
|
|
242
|
+
|
|
243
|
+
#### 跨工具安装
|
|
244
|
+
|
|
245
|
+
对于不读取 `.claude/skills/` 的工具:
|
|
246
|
+
|
|
247
|
+
| 工具 | 解决方案 |
|
|
248
|
+
|------|----------|
|
|
249
|
+
| OpenAI Codex | `cp -r .claude/skills/* ~/.codex/skills/` |
|
|
250
|
+
| Windsurf | `cp -r .claude/skills/* .windsurf/skills/` |
|
|
251
|
+
| Cline | `cp -r .claude/skills/* .cline/skills/` |
|
|
252
|
+
|
|
253
|
+
---
|
|
254
|
+
|
|
255
|
+
## 技能专用自定义 Agents
|
|
256
|
+
|
|
257
|
+
OpenCode 允许为特定技能创建专门的 agent:
|
|
258
|
+
|
|
259
|
+
### 代码审查 Agent
|
|
260
|
+
|
|
261
|
+
```markdown
|
|
262
|
+
<!-- .opencode/agent/reviewer.md -->
|
|
263
|
+
---
|
|
264
|
+
description: 依据 UDS 代码审查清单进行审查
|
|
265
|
+
mode: subagent
|
|
266
|
+
temperature: 0.3
|
|
267
|
+
tools:
|
|
268
|
+
write: false
|
|
269
|
+
edit: false
|
|
270
|
+
bash: false
|
|
271
|
+
---
|
|
272
|
+
|
|
273
|
+
# 代码审查 Agent
|
|
274
|
+
|
|
275
|
+
您是代码审查专家。请遵循以下指南:
|
|
276
|
+
|
|
277
|
+
1. 使用 code-review-assistant 技能
|
|
278
|
+
2. 应用 core/code-review-checklist.md 的审查清单
|
|
279
|
+
3. 使用注释前缀:❗ BLOCKING、⚠️ IMPORTANT、💡 SUGGESTION、❓ QUESTION
|
|
280
|
+
4. 检查所有 10 个审查类别
|
|
281
|
+
|
|
282
|
+
调用方式:@reviewer
|
|
283
|
+
```
|
|
284
|
+
|
|
285
|
+
### TDD 教练 Agent
|
|
286
|
+
|
|
287
|
+
```markdown
|
|
288
|
+
<!-- .opencode/agent/tdd-coach.md -->
|
|
289
|
+
---
|
|
290
|
+
description: 引导 TDD 工作流程(红-绿-重构)
|
|
291
|
+
mode: subagent
|
|
292
|
+
temperature: 0.5
|
|
293
|
+
---
|
|
294
|
+
|
|
295
|
+
# TDD 教练 Agent
|
|
296
|
+
|
|
297
|
+
您是 TDD 教练。协助开发者:
|
|
298
|
+
|
|
299
|
+
1. 红色阶段:编写失败的测试
|
|
300
|
+
2. 绿色阶段:最少代码通过测试
|
|
301
|
+
3. 重构阶段:保持绿色下清理代码
|
|
302
|
+
|
|
303
|
+
始终使用 tdd-assistant 技能。
|
|
304
|
+
|
|
305
|
+
调用方式:@tdd-coach
|
|
306
|
+
```
|
|
307
|
+
|
|
308
|
+
---
|
|
309
|
+
|
|
310
|
+
## 技能配置
|
|
311
|
+
|
|
312
|
+
### 权限控制
|
|
313
|
+
|
|
314
|
+
```json
|
|
315
|
+
// opencode.json
|
|
316
|
+
{
|
|
317
|
+
"permission": {
|
|
318
|
+
"skill": {
|
|
319
|
+
"*": "allow",
|
|
320
|
+
"methodology-system": "ask",
|
|
321
|
+
"release-standards": "ask"
|
|
322
|
+
}
|
|
323
|
+
}
|
|
324
|
+
}
|
|
325
|
+
```
|
|
326
|
+
|
|
327
|
+
### 停用特定技能
|
|
328
|
+
|
|
329
|
+
```json
|
|
330
|
+
// opencode.json
|
|
331
|
+
{
|
|
332
|
+
"permission": {
|
|
333
|
+
"skill": {
|
|
334
|
+
"methodology-system": "deny"
|
|
335
|
+
}
|
|
336
|
+
}
|
|
337
|
+
}
|
|
338
|
+
```
|
|
339
|
+
|
|
340
|
+
---
|
|
341
|
+
|
|
342
|
+
## 验证清单
|
|
343
|
+
|
|
344
|
+
设置技能后:
|
|
345
|
+
|
|
346
|
+
```
|
|
347
|
+
□ 运行 `opencode` 并输入 `/commit` 测试技能加载
|
|
348
|
+
□ 验证技能自动完成功能(输入 `/` 查看可用项目)
|
|
349
|
+
□ 使用 `@agent-name` 测试自定义 agents
|
|
350
|
+
□ 确认 AGENTS.md 已加载(使用 `/show rules` 查看)
|
|
351
|
+
□ 确认 glob 模式工作(若在 opencode.json 中使用)
|
|
352
|
+
```
|
|
353
|
+
|
|
354
|
+
---
|
|
355
|
+
|
|
356
|
+
## 疑难排解
|
|
357
|
+
|
|
358
|
+
### 技能未加载
|
|
359
|
+
|
|
360
|
+
1. **检查文件名称**:必须是 `SKILL.md`(全大写)
|
|
361
|
+
2. **验证 frontmatter**:需要 `name` 和 `description`
|
|
362
|
+
3. **检查路径**:应为 `.opencode/skill/<name>/SKILL.md`
|
|
363
|
+
4. **查看权限**:检查 `opencode.json` 技能权限
|
|
364
|
+
|
|
365
|
+
### 斜线命令无效
|
|
366
|
+
|
|
367
|
+
1. **验证技能存在**:检查技能目录
|
|
368
|
+
2. **检查名称对应**:斜线命令使用技能的 `name` 字段
|
|
369
|
+
3. **尝试完整语法**:使用 `skill("skill-name")` 而非 `/skill-name`
|
|
370
|
+
|
|
371
|
+
---
|
|
372
|
+
|
|
373
|
+
## 相关资源
|
|
374
|
+
|
|
375
|
+
- [AGENTS.md](../../../../integrations/opencode/AGENTS.md) - 核心规则文件
|
|
376
|
+
- [opencode.json](../../../../integrations/opencode/opencode.json) - 配置示例
|
|
377
|
+
- [Claude Code Skills](../../../../skills/claude-code/) - 原始技能
|
|
378
|
+
- [GitHub Copilot 技能对照](../github-copilot/skills-mapping.md) - Copilot 等效版本
|
|
379
|
+
|
|
380
|
+
---
|
|
381
|
+
|
|
382
|
+
## 版本历史
|
|
383
|
+
|
|
384
|
+
| 版本 | 日期 | 变更 |
|
|
385
|
+
|------|------|------|
|
|
386
|
+
| 1.4.0 | 2026-01-13 | 新增跨工具兼容性章节与路径对照表 |
|
|
387
|
+
| 1.3.0 | 2026-01-13 | 新增社区 marketplace 章节(n-skills、claude-plugins.dev、agentskills.io) |
|
|
388
|
+
| 1.2.0 | 2026-01-13 | 更新 CLI 方法;OpenCode 现在在 UDS CLI 中支持 skills |
|
|
389
|
+
| 1.1.0 | 2026-01-13 | 修正安装方法;移除错误的 npm 路径 |
|
|
390
|
+
| 1.0.0 | 2026-01-13 | 初始版本 |
|
|
391
|
+
|
|
392
|
+
---
|
|
393
|
+
|
|
394
|
+
## 许可证
|
|
395
|
+
|
|
396
|
+
本文档以 [CC BY 4.0](https://creativecommons.org/licenses/by/4.0/) 许可发布。
|
|
@@ -0,0 +1,301 @@
|
|
|
1
|
+
---
|
|
2
|
+
source: ../../../../integrations/openspec/AGENTS.md
|
|
3
|
+
source_version: 1.0.0
|
|
4
|
+
translation_version: 1.0.0
|
|
5
|
+
last_synced: 2026-01-13
|
|
6
|
+
status: current
|
|
7
|
+
---
|
|
8
|
+
|
|
9
|
+
# OpenSpec 指令
|
|
10
|
+
|
|
11
|
+
使用 OpenSpec 进行规格驱动开发的 AI 编码助手指令。
|
|
12
|
+
|
|
13
|
+
## 快速检查清单
|
|
14
|
+
|
|
15
|
+
- 搜索现有工作:`openspec spec list --long`、`openspec list`(仅使用 `rg` 进行全文搜索)
|
|
16
|
+
- 决定范围:新功能 vs 修改现有功能
|
|
17
|
+
- 选择唯一的 `change-id`:kebab-case,动词开头(`add-`、`update-`、`remove-`、`refactor-`)
|
|
18
|
+
- 创建骨架:`proposal.md`、`tasks.md`、`design.md`(仅在需要时),以及每个受影响功能的差异规格
|
|
19
|
+
- 撰写差异:使用 `## ADDED|MODIFIED|REMOVED|RENAMED Requirements`;每个需求至少包含一个 `#### Scenario:`
|
|
20
|
+
- 验证:`openspec validate [change-id] --strict` 并修复问题
|
|
21
|
+
- 请求核准:在提案核准前不要开始实现
|
|
22
|
+
|
|
23
|
+
## 三阶段工作流程
|
|
24
|
+
|
|
25
|
+
### 阶段 1:创建变更
|
|
26
|
+
在需要以下情况时创建提案:
|
|
27
|
+
- 新增功能或特性
|
|
28
|
+
- 进行破坏性变更(API、schema)
|
|
29
|
+
- 变更架构或模式
|
|
30
|
+
- 性能优化(改变行为)
|
|
31
|
+
- 更新安全模式
|
|
32
|
+
|
|
33
|
+
触发条件(示例):
|
|
34
|
+
- 「帮我创建变更提案」
|
|
35
|
+
- 「帮我规划变更」
|
|
36
|
+
- 「帮我创建提案」
|
|
37
|
+
- 「我想创建规格提案」
|
|
38
|
+
- 「我想创建规格」
|
|
39
|
+
|
|
40
|
+
可跳过提案的情况:
|
|
41
|
+
- 错误修复(恢复预期行为)
|
|
42
|
+
- 错字、格式、注释
|
|
43
|
+
- 依赖更新(非破坏性)
|
|
44
|
+
- 配置变更
|
|
45
|
+
- 现有行为的测试
|
|
46
|
+
|
|
47
|
+
**工作流程**
|
|
48
|
+
1. 审查 `openspec/project.md`、`openspec list` 和 `openspec list --specs` 以了解当前上下文。
|
|
49
|
+
2. 选择唯一的动词开头 `change-id`,在 `openspec/changes/<id>/` 下创建 `proposal.md`、`tasks.md`、可选的 `design.md` 和规格差异。
|
|
50
|
+
3. 使用 `## ADDED|MODIFIED|REMOVED Requirements` 草拟规格差异,每个需求至少有一个 `#### Scenario:`。
|
|
51
|
+
4. 执行 `openspec validate <id> --strict` 并在分享提案前解决所有问题。
|
|
52
|
+
|
|
53
|
+
### 阶段 2:实现变更
|
|
54
|
+
将这些步骤作为待办事项追踪,逐一完成。
|
|
55
|
+
1. **阅读 proposal.md** - 了解正在构建什么
|
|
56
|
+
2. **阅读 design.md**(如存在)- 审查技术决策
|
|
57
|
+
3. **阅读 tasks.md** - 获取实现检查清单
|
|
58
|
+
4. **依序实现任务** - 按顺序完成
|
|
59
|
+
5. **确认完成** - 确保 `tasks.md` 中每个项目完成后才更新状态
|
|
60
|
+
6. **更新检查清单** - 所有工作完成后,将每个任务设为 `- [x]` 以反映实际状态
|
|
61
|
+
7. **核准关卡** - 在提案审查和核准前不要开始实现
|
|
62
|
+
|
|
63
|
+
### 阶段 3:归档变更
|
|
64
|
+
部署后,创建单独的 PR:
|
|
65
|
+
- 将 `changes/[name]/` 移至 `changes/archive/YYYY-MM-DD-[name]/`
|
|
66
|
+
- 如功能有变更则更新 `specs/`
|
|
67
|
+
- 对于纯工具类变更使用 `openspec archive <change-id> --skip-specs --yes`(始终明确传递 change ID)
|
|
68
|
+
- 执行 `openspec validate --strict` 确认归档的变更通过检查
|
|
69
|
+
|
|
70
|
+
## 任何任务之前
|
|
71
|
+
|
|
72
|
+
**上下文检查清单:**
|
|
73
|
+
- [ ] 阅读 `specs/[capability]/spec.md` 中的相关规格
|
|
74
|
+
- [ ] 检查 `changes/` 中是否有冲突的待处理变更
|
|
75
|
+
- [ ] 阅读 `openspec/project.md` 了解惯例
|
|
76
|
+
- [ ] 执行 `openspec list` 查看活跃变更
|
|
77
|
+
- [ ] 执行 `openspec list --specs` 查看现有功能
|
|
78
|
+
|
|
79
|
+
**创建规格前:**
|
|
80
|
+
- 始终检查功能是否已存在
|
|
81
|
+
- 优先修改现有规格而非创建重复项
|
|
82
|
+
- 使用 `openspec show [spec]` 审查当前状态
|
|
83
|
+
- 如请求模糊,在创建骨架前询问 1-2 个澄清问题
|
|
84
|
+
|
|
85
|
+
### 搜索指引
|
|
86
|
+
- 列举规格:`openspec spec list --long`(或 `--json` 用于脚本)
|
|
87
|
+
- 列举变更:`openspec list`(或 `openspec change list --json` - 已弃用但可用)
|
|
88
|
+
- 显示详情:
|
|
89
|
+
- 规格:`openspec show <spec-id> --type spec`(使用 `--json` 进行过滤)
|
|
90
|
+
- 变更:`openspec show <change-id> --json --deltas-only`
|
|
91
|
+
- 全文搜索(使用 ripgrep):`rg -n "Requirement:|Scenario:" openspec/specs`
|
|
92
|
+
|
|
93
|
+
## 快速开始
|
|
94
|
+
|
|
95
|
+
### CLI 指令
|
|
96
|
+
|
|
97
|
+
```bash
|
|
98
|
+
# 基本指令
|
|
99
|
+
openspec list # 列出活跃变更
|
|
100
|
+
openspec list --specs # 列出规格
|
|
101
|
+
openspec show [item] # 显示变更或规格
|
|
102
|
+
openspec validate [item] # 验证变更或规格
|
|
103
|
+
openspec archive <change-id> [--yes|-y] # 部署后归档(添加 --yes 用于非交互执行)
|
|
104
|
+
|
|
105
|
+
# 项目管理
|
|
106
|
+
openspec init [path] # 初始化 OpenSpec
|
|
107
|
+
openspec update [path] # 更新指令文件
|
|
108
|
+
|
|
109
|
+
# 交互模式
|
|
110
|
+
openspec show # 提示选择
|
|
111
|
+
openspec validate # 批量验证模式
|
|
112
|
+
|
|
113
|
+
# 调试
|
|
114
|
+
openspec show [change] --json --deltas-only
|
|
115
|
+
openspec validate [change] --strict
|
|
116
|
+
```
|
|
117
|
+
|
|
118
|
+
### 指令标志
|
|
119
|
+
|
|
120
|
+
- `--json` - 机器可读输出
|
|
121
|
+
- `--type change|spec` - 区分项目
|
|
122
|
+
- `--strict` - 全面验证
|
|
123
|
+
- `--no-interactive` - 禁用提示
|
|
124
|
+
- `--skip-specs` - 归档时不更新规格
|
|
125
|
+
- `--yes`/`-y` - 跳过确认提示(非交互归档)
|
|
126
|
+
|
|
127
|
+
## 目录结构
|
|
128
|
+
|
|
129
|
+
```
|
|
130
|
+
openspec/
|
|
131
|
+
├── project.md # 项目惯例
|
|
132
|
+
├── specs/ # 当前真相 - 已构建的内容
|
|
133
|
+
│ └── [capability]/ # 单一聚焦功能
|
|
134
|
+
│ ├── spec.md # 需求和场景
|
|
135
|
+
│ └── design.md # 技术模式
|
|
136
|
+
├── changes/ # 提案 - 应该变更的内容
|
|
137
|
+
│ ├── [change-name]/
|
|
138
|
+
│ │ ├── proposal.md # 为何、什么、影响
|
|
139
|
+
│ │ ├── tasks.md # 实现检查清单
|
|
140
|
+
│ │ ├── design.md # 技术决策(可选;见标准)
|
|
141
|
+
│ │ └── specs/ # 差异变更
|
|
142
|
+
│ │ └── [capability]/
|
|
143
|
+
│ │ └── spec.md # ADDED/MODIFIED/REMOVED
|
|
144
|
+
│ └── archive/ # 已完成变更
|
|
145
|
+
```
|
|
146
|
+
|
|
147
|
+
## 创建变更提案
|
|
148
|
+
|
|
149
|
+
### 决策树
|
|
150
|
+
|
|
151
|
+
```
|
|
152
|
+
新请求?
|
|
153
|
+
├─ 恢复规格行为的错误修复? → 直接修复
|
|
154
|
+
├─ 错字/格式/注释? → 直接修复
|
|
155
|
+
├─ 新功能/特性? → 创建提案
|
|
156
|
+
├─ 破坏性变更? → 创建提案
|
|
157
|
+
├─ 架构变更? → 创建提案
|
|
158
|
+
└─ 不确定? → 创建提案(较安全)
|
|
159
|
+
```
|
|
160
|
+
|
|
161
|
+
### 提案结构
|
|
162
|
+
|
|
163
|
+
1. **创建目录:** `changes/[change-id]/`(kebab-case,动词开头,唯一)
|
|
164
|
+
|
|
165
|
+
2. **撰写 proposal.md:**
|
|
166
|
+
```markdown
|
|
167
|
+
# 变更:[变更简述]
|
|
168
|
+
|
|
169
|
+
## 为何
|
|
170
|
+
[1-2 句说明问题/机会]
|
|
171
|
+
|
|
172
|
+
## 变更内容
|
|
173
|
+
- [变更项目列表]
|
|
174
|
+
- [以 **BREAKING** 标记破坏性变更]
|
|
175
|
+
|
|
176
|
+
## 影响
|
|
177
|
+
- 受影响规格:[列出功能]
|
|
178
|
+
- 受影响代码:[关键文件/系统]
|
|
179
|
+
```
|
|
180
|
+
|
|
181
|
+
3. **创建规格差异:** `specs/[capability]/spec.md`
|
|
182
|
+
```markdown
|
|
183
|
+
## ADDED Requirements
|
|
184
|
+
### Requirement: 新功能
|
|
185
|
+
系统应提供...
|
|
186
|
+
|
|
187
|
+
#### Scenario: 成功案例
|
|
188
|
+
- **WHEN** 用户执行动作
|
|
189
|
+
- **THEN** 预期结果
|
|
190
|
+
|
|
191
|
+
## MODIFIED Requirements
|
|
192
|
+
### Requirement: 现有功能
|
|
193
|
+
[完整的修改后需求]
|
|
194
|
+
|
|
195
|
+
## REMOVED Requirements
|
|
196
|
+
### Requirement: 旧功能
|
|
197
|
+
**原因**:[移除原因]
|
|
198
|
+
**迁移**:[如何处理]
|
|
199
|
+
```
|
|
200
|
+
如果多个功能受影响,在 `changes/[change-id]/specs/<capability>/spec.md` 下创建多个差异文件——每个功能一个。
|
|
201
|
+
|
|
202
|
+
4. **创建 tasks.md:**
|
|
203
|
+
```markdown
|
|
204
|
+
## 1. 实现
|
|
205
|
+
- [ ] 1.1 创建数据库 schema
|
|
206
|
+
- [ ] 1.2 实现 API 端点
|
|
207
|
+
- [ ] 1.3 添加前端组件
|
|
208
|
+
- [ ] 1.4 编写测试
|
|
209
|
+
```
|
|
210
|
+
|
|
211
|
+
5. **在需要时创建 design.md:**
|
|
212
|
+
如符合以下任一条件则创建 `design.md`;否则省略:
|
|
213
|
+
- 跨模块变更(多个服务/模块)或新架构模式
|
|
214
|
+
- 新外部依赖或重大数据模型变更
|
|
215
|
+
- 安全、性能或迁移复杂度
|
|
216
|
+
- 在编码前需要技术决策来消除歧义
|
|
217
|
+
|
|
218
|
+
## 规格文件格式
|
|
219
|
+
|
|
220
|
+
### 重要:场景格式
|
|
221
|
+
|
|
222
|
+
**正确**(使用 #### 标题):
|
|
223
|
+
```markdown
|
|
224
|
+
#### Scenario: 用户登录成功
|
|
225
|
+
- **WHEN** 提供有效凭证
|
|
226
|
+
- **THEN** 返回 JWT token
|
|
227
|
+
```
|
|
228
|
+
|
|
229
|
+
**错误**(不要使用项目符号或粗体):
|
|
230
|
+
```markdown
|
|
231
|
+
- **Scenario: 用户登录** ❌
|
|
232
|
+
**Scenario**: 用户登录 ❌
|
|
233
|
+
### Scenario: 用户登录 ❌
|
|
234
|
+
```
|
|
235
|
+
|
|
236
|
+
每个需求必须至少有一个场景。
|
|
237
|
+
|
|
238
|
+
### 需求用语
|
|
239
|
+
- 使用 SHALL/MUST 表示规范性需求(除非刻意为非规范性,否则避免 should/may)
|
|
240
|
+
|
|
241
|
+
### 差异操作
|
|
242
|
+
|
|
243
|
+
- `## ADDED Requirements` - 新功能
|
|
244
|
+
- `## MODIFIED Requirements` - 行为变更
|
|
245
|
+
- `## REMOVED Requirements` - 弃用功能
|
|
246
|
+
- `## RENAMED Requirements` - 名称变更
|
|
247
|
+
|
|
248
|
+
标题以 `trim(header)` 匹配 - 忽略空白。
|
|
249
|
+
|
|
250
|
+
## 最佳实践
|
|
251
|
+
|
|
252
|
+
### 简单优先
|
|
253
|
+
- 默认为 <100 行新代码
|
|
254
|
+
- 单文件实现直到证明不足
|
|
255
|
+
- 无明确理由不使用框架
|
|
256
|
+
- 选择无聊、经过验证的模式
|
|
257
|
+
|
|
258
|
+
### 复杂度触发条件
|
|
259
|
+
仅在以下情况增加复杂度:
|
|
260
|
+
- 性能数据显示当前解决方案过慢
|
|
261
|
+
- 具体的规模需求(>1000 用户、>100MB 数据)
|
|
262
|
+
- 需要抽象的多个已验证用例
|
|
263
|
+
|
|
264
|
+
### 清晰引用
|
|
265
|
+
- 使用 `file.ts:42` 格式标示代码位置
|
|
266
|
+
- 以 `specs/auth/spec.md` 格式引用规格
|
|
267
|
+
- 链接相关变更和 PR
|
|
268
|
+
|
|
269
|
+
### 功能命名
|
|
270
|
+
- 使用动词-名词:`user-auth`、`payment-capture`
|
|
271
|
+
- 每个功能单一目的
|
|
272
|
+
- 10 分钟可理解规则
|
|
273
|
+
- 如描述需要「和」则拆分
|
|
274
|
+
|
|
275
|
+
### 变更 ID 命名
|
|
276
|
+
- 使用 kebab-case,简短且描述性:`add-two-factor-auth`
|
|
277
|
+
- 优先使用动词开头前缀:`add-`、`update-`、`remove-`、`refactor-`
|
|
278
|
+
- 确保唯一性;若已被使用,附加 `-2`、`-3` 等
|
|
279
|
+
|
|
280
|
+
## 快速参考
|
|
281
|
+
|
|
282
|
+
### 阶段指示
|
|
283
|
+
- `changes/` - 提议,尚未构建
|
|
284
|
+
- `specs/` - 已构建和部署
|
|
285
|
+
- `archive/` - 已完成变更
|
|
286
|
+
|
|
287
|
+
### 文件用途
|
|
288
|
+
- `proposal.md` - 为何和什么
|
|
289
|
+
- `tasks.md` - 实现步骤
|
|
290
|
+
- `design.md` - 技术决策
|
|
291
|
+
- `spec.md` - 需求和行为
|
|
292
|
+
|
|
293
|
+
### CLI 基本指令
|
|
294
|
+
```bash
|
|
295
|
+
openspec list # 正在进行什么?
|
|
296
|
+
openspec show [item] # 查看详情
|
|
297
|
+
openspec validate --strict # 是否正确?
|
|
298
|
+
openspec archive <change-id> [--yes|-y] # 标记完成(添加 --yes 用于自动化)
|
|
299
|
+
```
|
|
300
|
+
|
|
301
|
+
记住:规格是真相。变更是提案。保持同步。
|