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,915 @@
|
|
|
1
|
+
# Commit Message Guide
|
|
2
|
+
|
|
3
|
+
> **Language**: English | [繁體中文](../locales/zh-TW/core/commit-message-guide.md)
|
|
4
|
+
|
|
5
|
+
**Version**: 1.2.3
|
|
6
|
+
**Last Updated**: 2025-12-24
|
|
7
|
+
**Applicability**: All projects using Git version control
|
|
8
|
+
|
|
9
|
+
---
|
|
10
|
+
|
|
11
|
+
## Purpose
|
|
12
|
+
|
|
13
|
+
Standardized commit messages improve code review efficiency, facilitate automated changelog generation, and make project history searchable and understandable.
|
|
14
|
+
|
|
15
|
+
---
|
|
16
|
+
|
|
17
|
+
## Basic Format
|
|
18
|
+
|
|
19
|
+
```
|
|
20
|
+
<type>(<scope>): <subject>
|
|
21
|
+
|
|
22
|
+
<body>
|
|
23
|
+
|
|
24
|
+
<footer>
|
|
25
|
+
```
|
|
26
|
+
|
|
27
|
+
### Components
|
|
28
|
+
|
|
29
|
+
| Component | Required | Description |
|
|
30
|
+
| ----------- | ----------- | ---------------------------------- |
|
|
31
|
+
| `type` | ✅ Yes | Type of change |
|
|
32
|
+
| `scope` | Optional | Module/component affected |
|
|
33
|
+
| `subject` | ✅ Yes | Brief description (≤72 chars) |
|
|
34
|
+
| `body` | Recommended | Detailed explanation |
|
|
35
|
+
| `footer` | Optional | Issue references, breaking changes |
|
|
36
|
+
|
|
37
|
+
---
|
|
38
|
+
|
|
39
|
+
## Type Classification
|
|
40
|
+
|
|
41
|
+
**PROJECT MUST CHOOSE ONE LANGUAGE** for types and use it consistently.
|
|
42
|
+
|
|
43
|
+
### Option A: English (International)
|
|
44
|
+
|
|
45
|
+
Use English types for international teams and maximum tool compatibility.
|
|
46
|
+
|
|
47
|
+
| Type | When to Use |
|
|
48
|
+
| ------------ | --------------------------------------------- |
|
|
49
|
+
| `feat` | New feature |
|
|
50
|
+
| `fix` | Bug fix |
|
|
51
|
+
| `refactor` | Code refactoring (no functional change) |
|
|
52
|
+
| `docs` | Documentation only |
|
|
53
|
+
| `style` | Formatting, whitespace (no code logic change) |
|
|
54
|
+
| `test` | Adding or updating tests |
|
|
55
|
+
| `perf` | Performance improvement |
|
|
56
|
+
| `build` | Build system or dependencies |
|
|
57
|
+
| `ci` | CI/CD pipeline changes |
|
|
58
|
+
| `chore` | Maintenance tasks |
|
|
59
|
+
| `revert` | Revert previous commit |
|
|
60
|
+
| `security` | Security vulnerability fix |
|
|
61
|
+
|
|
62
|
+
### Option B: Traditional Chinese (Taiwanese Teams)
|
|
63
|
+
|
|
64
|
+
Use Traditional Chinese types for local teams preferring native language commits.
|
|
65
|
+
|
|
66
|
+
| Type | When to Use | English Equivalent |
|
|
67
|
+
| ------ | -------------------- | ------------------ |
|
|
68
|
+
| `新增` | New feature | feat |
|
|
69
|
+
| `修正` | Bug fix | fix |
|
|
70
|
+
| `重構` | Refactoring | refactor |
|
|
71
|
+
| `文件` | Documentation only | docs |
|
|
72
|
+
| `樣式` | Formatting only | style |
|
|
73
|
+
| `測試` | Adding/updating tests | test |
|
|
74
|
+
| `效能` | Performance | perf |
|
|
75
|
+
| `建置` | Build system | build |
|
|
76
|
+
| `整合` | CI/CD changes | ci |
|
|
77
|
+
| `維護` | Maintenance | chore |
|
|
78
|
+
| `回退` | Revert commit | revert |
|
|
79
|
+
| `安全` | Security fix | security |
|
|
80
|
+
|
|
81
|
+
### Option C: Bilingual Mode (Recommended)
|
|
82
|
+
|
|
83
|
+
Use English `type` and `scope` for tool compatibility, with bilingual subject/body/footer.
|
|
84
|
+
|
|
85
|
+
**Format**:
|
|
86
|
+
|
|
87
|
+
```
|
|
88
|
+
<type>(<scope>): <English subject>. <Chinese subject>.
|
|
89
|
+
|
|
90
|
+
<English body>
|
|
91
|
+
|
|
92
|
+
<Chinese body>
|
|
93
|
+
|
|
94
|
+
<footer>
|
|
95
|
+
```
|
|
96
|
+
|
|
97
|
+
**Example**:
|
|
98
|
+
|
|
99
|
+
```
|
|
100
|
+
feat(auth): Add OAuth2 Google login support. 新增 OAuth2 Google 登入支援。
|
|
101
|
+
|
|
102
|
+
Implement Google OAuth2 authentication flow for user login.
|
|
103
|
+
|
|
104
|
+
- Add Google OAuth2 SDK integration
|
|
105
|
+
- Create callback endpoint for OAuth flow
|
|
106
|
+
- Store refresh tokens securely
|
|
107
|
+
|
|
108
|
+
實作 Google OAuth2 認證流程供使用者登入。
|
|
109
|
+
|
|
110
|
+
- 整合 Google OAuth2 SDK
|
|
111
|
+
- 建立 OAuth 流程回呼端點
|
|
112
|
+
- 安全儲存更新權杖
|
|
113
|
+
|
|
114
|
+
Closes #123
|
|
115
|
+
```
|
|
116
|
+
|
|
117
|
+
### Language Selection Guide
|
|
118
|
+
|
|
119
|
+
Use this guide to choose the appropriate commit message language for your project:
|
|
120
|
+
|
|
121
|
+
| Factor | English | Traditional Chinese | Bilingual |
|
|
122
|
+
|--------|---------|---------------------|-----------|
|
|
123
|
+
| **Team composition** | International/mixed | Local (Taiwan) | Mixed with local focus |
|
|
124
|
+
| **Tool compatibility** | ✅ Best | ⚠️ Limited | ✅ Good |
|
|
125
|
+
| **Changelog automation** | ✅ Full support | ⚠️ Custom config | ✅ Supported |
|
|
126
|
+
| **Onboarding** | Neutral | Easier for locals | Both benefit |
|
|
127
|
+
| **Open source** | ✅ Recommended | ❌ Not recommended | ✅ Good choice |
|
|
128
|
+
|
|
129
|
+
**Quick Selection**:
|
|
130
|
+
- **Open source project** → English (Option A)
|
|
131
|
+
- **Local team, internal project** → Traditional Chinese (Option B)
|
|
132
|
+
- **Local team with international collaboration** → Bilingual (Option C)
|
|
133
|
+
|
|
134
|
+
**Important**: Once chosen, **use consistently** across the entire project. Do not mix languages.
|
|
135
|
+
|
|
136
|
+
---
|
|
137
|
+
|
|
138
|
+
**Project Decision Point**: Document your choice in `CONTRIBUTING.md` (choose ONE):
|
|
139
|
+
|
|
140
|
+
```markdown
|
|
141
|
+
## Commit Message Language
|
|
142
|
+
|
|
143
|
+
<!-- Choose ONE of the following options: -->
|
|
144
|
+
|
|
145
|
+
<!-- Option A: English -->
|
|
146
|
+
This project uses **English** commit types (feat, fix, refactor, etc.)
|
|
147
|
+
|
|
148
|
+
<!-- Option B: Traditional Chinese -->
|
|
149
|
+
This project uses **Traditional Chinese** commit types (新增, 修正, 重構, etc.)
|
|
150
|
+
|
|
151
|
+
<!-- Option C: Bilingual Mode -->
|
|
152
|
+
This project uses **Bilingual Mode** with English types/scopes and bilingual subject/body.
|
|
153
|
+
```
|
|
154
|
+
|
|
155
|
+
---
|
|
156
|
+
|
|
157
|
+
## Scope Guidelines
|
|
158
|
+
|
|
159
|
+
Scope indicates which part of the codebase is affected. Use short, recognizable names.
|
|
160
|
+
|
|
161
|
+
### Naming Rules
|
|
162
|
+
|
|
163
|
+
1. **Use lowercase**: All scopes should be lowercase (`auth`, not `Auth`)
|
|
164
|
+
2. **Use hyphen for multi-word**: Separate words with hyphens (`user-profile`, not `userProfile`)
|
|
165
|
+
3. **Keep it short**: 1-2 words maximum
|
|
166
|
+
|
|
167
|
+
### Common Scopes
|
|
168
|
+
|
|
169
|
+
**By Layer/Module**:
|
|
170
|
+
|
|
171
|
+
- `api`: API layer
|
|
172
|
+
- `ui`: User interface
|
|
173
|
+
- `auth`: Authentication/authorization
|
|
174
|
+
- `database`: Database layer
|
|
175
|
+
- `config`: Configuration
|
|
176
|
+
- `middleware`: Middleware layer
|
|
177
|
+
|
|
178
|
+
**By Feature**:
|
|
179
|
+
|
|
180
|
+
- `login`: Login feature
|
|
181
|
+
- `payment`: Payment processing
|
|
182
|
+
- `notification`: Notifications
|
|
183
|
+
- `search`: Search functionality
|
|
184
|
+
|
|
185
|
+
**By File Type**:
|
|
186
|
+
|
|
187
|
+
- `tests`: Test files
|
|
188
|
+
- `docs`: Documentation files
|
|
189
|
+
- `build`: Build scripts
|
|
190
|
+
- `deps`: Dependencies
|
|
191
|
+
|
|
192
|
+
**Special Scopes**:
|
|
193
|
+
|
|
194
|
+
- `*`: Multiple scopes affected
|
|
195
|
+
- (no scope): Global changes
|
|
196
|
+
|
|
197
|
+
**Example Scopes for a Web API Project**:
|
|
198
|
+
|
|
199
|
+
```
|
|
200
|
+
auth, user, product, order, payment, notification,
|
|
201
|
+
database, config, middleware, api, tests, docs
|
|
202
|
+
```
|
|
203
|
+
|
|
204
|
+
---
|
|
205
|
+
|
|
206
|
+
## Subject Line
|
|
207
|
+
|
|
208
|
+
### Rules
|
|
209
|
+
|
|
210
|
+
1. **Length**: ≤72 characters (50 ideal)
|
|
211
|
+
2. **Tense**: Use imperative mood ("Add feature" not "Added feature")
|
|
212
|
+
3. **Capitalization**: First letter capitalized
|
|
213
|
+
4. **No period**: Don't end with a period (Exception: Bilingual Mode uses period as separator)
|
|
214
|
+
5. **Language**: Follow project policy (English or native language)
|
|
215
|
+
|
|
216
|
+
### Good Examples
|
|
217
|
+
|
|
218
|
+
```
|
|
219
|
+
feat(auth): Add OAuth2 Google login support
|
|
220
|
+
fix(api): Resolve memory leak in user session cache
|
|
221
|
+
refactor(database): Extract query builder to separate class
|
|
222
|
+
docs(readme): Update installation instructions for Node 20
|
|
223
|
+
test(payment): Add unit tests for refund flow
|
|
224
|
+
perf(search): Implement index for full-text search
|
|
225
|
+
build(deps): Upgrade Express to 4.18.2
|
|
226
|
+
```
|
|
227
|
+
|
|
228
|
+
### Bad Examples
|
|
229
|
+
|
|
230
|
+
```
|
|
231
|
+
❌ "fixed bug" - Too vague, no scope
|
|
232
|
+
❌ "feat(auth): added google login and fixed a bug and refactored code" - Too long, multiple concerns
|
|
233
|
+
❌ "Update stuff." - Has period, too vague
|
|
234
|
+
❌ "Added OAuth2 login feature" - Past tense instead of imperative
|
|
235
|
+
❌ "WIP" - Not descriptive
|
|
236
|
+
```
|
|
237
|
+
|
|
238
|
+
---
|
|
239
|
+
|
|
240
|
+
## Body
|
|
241
|
+
|
|
242
|
+
Use the body to explain **WHY** the change was made, not **WHAT** was changed (the code shows what).
|
|
243
|
+
|
|
244
|
+
### Structure
|
|
245
|
+
|
|
246
|
+
- Use bullet points for multiple changes
|
|
247
|
+
- Wrap lines at 72 characters
|
|
248
|
+
- Separate from subject with a blank line
|
|
249
|
+
- Provide context and rationale
|
|
250
|
+
|
|
251
|
+
### Body Template
|
|
252
|
+
|
|
253
|
+
Use contextual headers based on the change type. Common patterns:
|
|
254
|
+
|
|
255
|
+
**For features**:
|
|
256
|
+
|
|
257
|
+
```
|
|
258
|
+
Why this feature is needed:
|
|
259
|
+
What this implements:
|
|
260
|
+
Technical notes:
|
|
261
|
+
```
|
|
262
|
+
|
|
263
|
+
**For bug fixes**:
|
|
264
|
+
|
|
265
|
+
```
|
|
266
|
+
Why this occurred:
|
|
267
|
+
What this fix does:
|
|
268
|
+
Testing:
|
|
269
|
+
```
|
|
270
|
+
|
|
271
|
+
**For refactoring**:
|
|
272
|
+
|
|
273
|
+
```
|
|
274
|
+
Why this refactoring:
|
|
275
|
+
What this changes:
|
|
276
|
+
Migration:
|
|
277
|
+
```
|
|
278
|
+
|
|
279
|
+
**Generic template**:
|
|
280
|
+
|
|
281
|
+
```
|
|
282
|
+
<Subject line>
|
|
283
|
+
|
|
284
|
+
<Blank line>
|
|
285
|
+
|
|
286
|
+
Why:
|
|
287
|
+
- Reason 1
|
|
288
|
+
- Reason 2
|
|
289
|
+
|
|
290
|
+
What:
|
|
291
|
+
- Change 1
|
|
292
|
+
- Change 2
|
|
293
|
+
|
|
294
|
+
Notes:
|
|
295
|
+
- Context or considerations
|
|
296
|
+
```
|
|
297
|
+
|
|
298
|
+
### Examples
|
|
299
|
+
|
|
300
|
+
#### Example 1: Feature with Context
|
|
301
|
+
|
|
302
|
+
```
|
|
303
|
+
feat(payment): Add support for PayPal payment method
|
|
304
|
+
|
|
305
|
+
Why this change is needed:
|
|
306
|
+
- Customer survey shows 40% prefer PayPal
|
|
307
|
+
- Competitor analysis indicates missing payment option
|
|
308
|
+
- Q4 goal to increase payment method diversity
|
|
309
|
+
|
|
310
|
+
What this change does:
|
|
311
|
+
- Integrate PayPal SDK v2.0
|
|
312
|
+
- Add PayPal button to checkout page
|
|
313
|
+
- Implement webhook for payment confirmation
|
|
314
|
+
- Update payment history to show PayPal transactions
|
|
315
|
+
|
|
316
|
+
Technical notes:
|
|
317
|
+
- Used sandbox environment for testing
|
|
318
|
+
- Webhook signature validation implemented for security
|
|
319
|
+
```
|
|
320
|
+
|
|
321
|
+
#### Example 2: Bug Fix with Root Cause
|
|
322
|
+
|
|
323
|
+
```
|
|
324
|
+
fix(api): Resolve race condition in concurrent user updates
|
|
325
|
+
|
|
326
|
+
Why this occurred:
|
|
327
|
+
- Two simultaneous PUT requests to /users/:id could overwrite each other
|
|
328
|
+
- No optimistic locking or transaction isolation implemented
|
|
329
|
+
- Last write wins, causing data loss
|
|
330
|
+
|
|
331
|
+
What this fix does:
|
|
332
|
+
- Add version field to User model
|
|
333
|
+
- Implement optimistic locking check
|
|
334
|
+
- Return 409 Conflict if version mismatch
|
|
335
|
+
- Update API documentation with retry guidance
|
|
336
|
+
|
|
337
|
+
Testing:
|
|
338
|
+
- Added concurrent update test scenarios
|
|
339
|
+
- Verified with load test (100 concurrent updates)
|
|
340
|
+
```
|
|
341
|
+
|
|
342
|
+
---
|
|
343
|
+
|
|
344
|
+
## Footer
|
|
345
|
+
|
|
346
|
+
### Issue References
|
|
347
|
+
|
|
348
|
+
Link commits to issue tracker:
|
|
349
|
+
|
|
350
|
+
```
|
|
351
|
+
Closes #123
|
|
352
|
+
Fixes #456
|
|
353
|
+
Resolves #789
|
|
354
|
+
Refs #101, #102
|
|
355
|
+
See also #999
|
|
356
|
+
```
|
|
357
|
+
|
|
358
|
+
**Supported Keywords** (GitHub, GitLab, Bitbucket):
|
|
359
|
+
|
|
360
|
+
- `Closes`, `Fixes`, `Resolves`: Automatically closes the issue
|
|
361
|
+
- `Refs`, `References`, `See also`: Links without closing
|
|
362
|
+
|
|
363
|
+
---
|
|
364
|
+
|
|
365
|
+
### Breaking Changes
|
|
366
|
+
|
|
367
|
+
**CRITICAL**: Always document breaking changes in footer.
|
|
368
|
+
|
|
369
|
+
**Format**:
|
|
370
|
+
|
|
371
|
+
```
|
|
372
|
+
BREAKING CHANGE: <description>
|
|
373
|
+
|
|
374
|
+
Migration guide:
|
|
375
|
+
- Step 1
|
|
376
|
+
- Step 2
|
|
377
|
+
```
|
|
378
|
+
|
|
379
|
+
**Example**:
|
|
380
|
+
|
|
381
|
+
```
|
|
382
|
+
feat(api): Change user endpoint response format
|
|
383
|
+
|
|
384
|
+
- Flatten nested user object structure
|
|
385
|
+
- Remove deprecated `legacy_id` field
|
|
386
|
+
- Add `created_at` and `updated_at` timestamps
|
|
387
|
+
|
|
388
|
+
BREAKING CHANGE: User API response format changed
|
|
389
|
+
|
|
390
|
+
Old format:
|
|
391
|
+
```json
|
|
392
|
+
{
|
|
393
|
+
"data": {
|
|
394
|
+
"user": {
|
|
395
|
+
"id": 123,
|
|
396
|
+
"name": "John",
|
|
397
|
+
"legacy_id": 456
|
|
398
|
+
}
|
|
399
|
+
}
|
|
400
|
+
}
|
|
401
|
+
```
|
|
402
|
+
|
|
403
|
+
New format:
|
|
404
|
+
|
|
405
|
+
```json
|
|
406
|
+
{
|
|
407
|
+
"id": 123,
|
|
408
|
+
"name": "John",
|
|
409
|
+
"created_at": "2025-11-12T10:00:00Z",
|
|
410
|
+
"updated_at": "2025-11-12T10:00:00Z"
|
|
411
|
+
}
|
|
412
|
+
```
|
|
413
|
+
|
|
414
|
+
Migration guide:
|
|
415
|
+
|
|
416
|
+
- Update API clients to remove `.data` wrapper
|
|
417
|
+
- Remove references to `legacy_id` field
|
|
418
|
+
- Use `created_at` instead of `createdAt` (snake_case)
|
|
419
|
+
|
|
420
|
+
Closes #234
|
|
421
|
+
|
|
422
|
+
```
|
|
423
|
+
|
|
424
|
+
---
|
|
425
|
+
|
|
426
|
+
## Complete Examples
|
|
427
|
+
|
|
428
|
+
### Example 1: Simple Fix (English)
|
|
429
|
+
|
|
430
|
+
```
|
|
431
|
+
|
|
432
|
+
fix(auth): Correct JWT expiration time calculation
|
|
433
|
+
|
|
434
|
+
The token was expiring 1 hour early due to timezone offset not being accounted for. Now using UTC time consistently.
|
|
435
|
+
|
|
436
|
+
Fixes #445
|
|
437
|
+
|
|
438
|
+
```
|
|
439
|
+
|
|
440
|
+
---
|
|
441
|
+
|
|
442
|
+
### Example 2: Feature with Multiple Parts (English)
|
|
443
|
+
|
|
444
|
+
```
|
|
445
|
+
|
|
446
|
+
feat(export): Add CSV export functionality for user data
|
|
447
|
+
|
|
448
|
+
Why this feature is needed:
|
|
449
|
+
|
|
450
|
+
- Admins need to export user lists for compliance audits
|
|
451
|
+
- Manual copy-paste from UI is error-prone
|
|
452
|
+
- Requested by legal and compliance teams
|
|
453
|
+
|
|
454
|
+
What this implements:
|
|
455
|
+
|
|
456
|
+
- New `/api/users/export` endpoint
|
|
457
|
+
- CSV generation using csv-writer library
|
|
458
|
+
- Streaming response to handle large datasets
|
|
459
|
+
- Date range filtering options
|
|
460
|
+
- Column selection (PII vs non-PII fields)
|
|
461
|
+
|
|
462
|
+
Technical notes:
|
|
463
|
+
|
|
464
|
+
- Streaming prevents memory issues with 100k+ users
|
|
465
|
+
- Export limited to admin role only
|
|
466
|
+
- PII fields require additional permission flag
|
|
467
|
+
- Rate limited to prevent abuse
|
|
468
|
+
|
|
469
|
+
Closes #567
|
|
470
|
+
Refs #234 (related compliance requirement)
|
|
471
|
+
|
|
472
|
+
```
|
|
473
|
+
|
|
474
|
+
---
|
|
475
|
+
|
|
476
|
+
### Example 3: Bilingual Mode - Simple Fix
|
|
477
|
+
|
|
478
|
+
```
|
|
479
|
+
|
|
480
|
+
fix(auth): Correct JWT expiration time calculation. 修正 JWT 過期時間計算。
|
|
481
|
+
|
|
482
|
+
The token was expiring 1 hour early due to timezone offset not being accounted for. Now using UTC time consistently.
|
|
483
|
+
|
|
484
|
+
權杖因未考慮時區偏移而提早 1 小時過期。現已統一使用 UTC 時間。
|
|
485
|
+
|
|
486
|
+
Fixes #445
|
|
487
|
+
|
|
488
|
+
```
|
|
489
|
+
|
|
490
|
+
---
|
|
491
|
+
|
|
492
|
+
### Example 4: Bilingual Mode - Feature
|
|
493
|
+
|
|
494
|
+
```
|
|
495
|
+
|
|
496
|
+
feat(export): Add CSV export functionality for user data. 新增使用者資料 CSV 匯出功能。
|
|
497
|
+
|
|
498
|
+
Why this feature is needed:
|
|
499
|
+
|
|
500
|
+
- Admins need to export user lists for compliance audits
|
|
501
|
+
- Manual copy-paste from UI is error-prone
|
|
502
|
+
- Requested by legal and compliance teams
|
|
503
|
+
|
|
504
|
+
What this implements:
|
|
505
|
+
|
|
506
|
+
- New `/api/users/export` endpoint
|
|
507
|
+
- CSV generation using csv-writer library
|
|
508
|
+
- Streaming response to handle large datasets
|
|
509
|
+
- Date range filtering options
|
|
510
|
+
|
|
511
|
+
Technical notes:
|
|
512
|
+
|
|
513
|
+
- Streaming prevents memory issues with 100k+ users
|
|
514
|
+
- Export limited to admin role only
|
|
515
|
+
|
|
516
|
+
為何需要此功能:
|
|
517
|
+
|
|
518
|
+
- 管理員需匯出使用者清單以進行合規稽核
|
|
519
|
+
- 從 UI 手動複製貼上容易出錯
|
|
520
|
+
- 法務與合規團隊要求此功能
|
|
521
|
+
|
|
522
|
+
此變更實作內容:
|
|
523
|
+
|
|
524
|
+
- 新增 `/api/users/export` 端點
|
|
525
|
+
- 使用 csv-writer 函式庫生成 CSV
|
|
526
|
+
- 串流回應以處理大型資料集
|
|
527
|
+
- 日期範圍篩選選項
|
|
528
|
+
|
|
529
|
+
技術備註:
|
|
530
|
+
|
|
531
|
+
- 串流處理可避免 10 萬筆以上使用者的記憶體問題
|
|
532
|
+
- 匯出功能僅限管理員角色使用
|
|
533
|
+
|
|
534
|
+
Closes #567
|
|
535
|
+
Refs #234
|
|
536
|
+
|
|
537
|
+
```
|
|
538
|
+
|
|
539
|
+
---
|
|
540
|
+
|
|
541
|
+
### Example 5: Bilingual Mode - Bug Fix with Root Cause
|
|
542
|
+
|
|
543
|
+
```
|
|
544
|
+
|
|
545
|
+
fix(api): Resolve race condition in concurrent user updates. 解決並發使用者更新的競爭條件。
|
|
546
|
+
|
|
547
|
+
Why this occurred:
|
|
548
|
+
|
|
549
|
+
- Two simultaneous PUT requests to /users/:id could overwrite each other
|
|
550
|
+
- No optimistic locking implemented
|
|
551
|
+
|
|
552
|
+
What this fix does:
|
|
553
|
+
|
|
554
|
+
- Add version field to User model
|
|
555
|
+
- Implement optimistic locking check
|
|
556
|
+
- Return 409 Conflict if version mismatch
|
|
557
|
+
|
|
558
|
+
Testing:
|
|
559
|
+
|
|
560
|
+
- Added concurrent update test scenarios
|
|
561
|
+
- Verified with load test (100 concurrent updates)
|
|
562
|
+
|
|
563
|
+
問題發生原因:
|
|
564
|
+
|
|
565
|
+
- 兩個同時發送至 /users/:id 的 PUT 請求可能互相覆蓋
|
|
566
|
+
- 未實作樂觀鎖定機制
|
|
567
|
+
|
|
568
|
+
修正內容:
|
|
569
|
+
|
|
570
|
+
- 新增版本欄位至 User 模型
|
|
571
|
+
- 實作樂觀鎖定檢查
|
|
572
|
+
- 版本不符時回傳 409 Conflict
|
|
573
|
+
|
|
574
|
+
測試:
|
|
575
|
+
|
|
576
|
+
- 新增並發更新測試情境
|
|
577
|
+
- 以負載測試驗證(100 個並發更新)
|
|
578
|
+
|
|
579
|
+
Fixes #789
|
|
580
|
+
|
|
581
|
+
```
|
|
582
|
+
|
|
583
|
+
---
|
|
584
|
+
|
|
585
|
+
### Example 6: Refactoring with Breaking Change (English)
|
|
586
|
+
|
|
587
|
+
```
|
|
588
|
+
|
|
589
|
+
refactor(database): Migrate from MySQL to PostgreSQL
|
|
590
|
+
|
|
591
|
+
Why this refactoring:
|
|
592
|
+
|
|
593
|
+
- PostgreSQL offers better JSON support for our use case
|
|
594
|
+
- Need advanced indexing features for full-text search
|
|
595
|
+
- Licensing considerations for cloud deployment
|
|
596
|
+
|
|
597
|
+
What this changes:
|
|
598
|
+
|
|
599
|
+
- Update database driver from mysql2 to pg
|
|
600
|
+
- Convert MySQL-specific queries to PostgreSQL syntax
|
|
601
|
+
- Update connection pooling configuration
|
|
602
|
+
- Migrate schema using migration scripts
|
|
603
|
+
- Update ORM configurations
|
|
604
|
+
|
|
605
|
+
Migration:
|
|
606
|
+
|
|
607
|
+
- Run `npm run db:backup` before upgrading
|
|
608
|
+
- Run `npm run db:migrate` to apply schema changes
|
|
609
|
+
- Update environment variables (see .env.example)
|
|
610
|
+
|
|
611
|
+
BREAKING CHANGE: Database engine changed from MySQL to PostgreSQL
|
|
612
|
+
|
|
613
|
+
Migration guide:
|
|
614
|
+
|
|
615
|
+
1. Backup existing MySQL database
|
|
616
|
+
2. Install PostgreSQL 15+
|
|
617
|
+
3. Update .env:
|
|
618
|
+
- DATABASE_URL=postgresql://... (was mysql://...)
|
|
619
|
+
- Remove MYSQL_* variables
|
|
620
|
+
4. Run migration: npm run db:migrate
|
|
621
|
+
5. Verify data integrity: npm run db:verify
|
|
622
|
+
|
|
623
|
+
Estimated downtime: 2-4 hours for production migration
|
|
624
|
+
|
|
625
|
+
Closes #890
|
|
626
|
+
|
|
627
|
+
```
|
|
628
|
+
|
|
629
|
+
---
|
|
630
|
+
|
|
631
|
+
### Example 7: Bilingual Mode - Breaking Change
|
|
632
|
+
|
|
633
|
+
```
|
|
634
|
+
|
|
635
|
+
refactor(database): Migrate from MySQL to PostgreSQL. 從 MySQL 遷移至 PostgreSQL。
|
|
636
|
+
|
|
637
|
+
Why this refactoring:
|
|
638
|
+
|
|
639
|
+
- PostgreSQL offers better JSON support for our use case
|
|
640
|
+
- Need advanced indexing features for full-text search
|
|
641
|
+
|
|
642
|
+
What this changes:
|
|
643
|
+
|
|
644
|
+
- Update database driver from mysql2 to pg
|
|
645
|
+
- Convert MySQL-specific queries to PostgreSQL syntax
|
|
646
|
+
- Update connection pooling configuration
|
|
647
|
+
|
|
648
|
+
BREAKING CHANGE: Database engine changed from MySQL to PostgreSQL
|
|
649
|
+
|
|
650
|
+
Migration guide:
|
|
651
|
+
|
|
652
|
+
1. Backup existing MySQL database
|
|
653
|
+
2. Install PostgreSQL 15+
|
|
654
|
+
3. Update .env: DATABASE_URL=postgresql://...
|
|
655
|
+
4. Run migration: npm run db:migrate
|
|
656
|
+
5. Verify data integrity: npm run db:verify
|
|
657
|
+
|
|
658
|
+
Estimated downtime: 2-4 hours
|
|
659
|
+
|
|
660
|
+
重構原因:
|
|
661
|
+
|
|
662
|
+
- PostgreSQL 提供更佳的 JSON 支援以符合我們的使用情境
|
|
663
|
+
- 需要進階索引功能支援全文檢索
|
|
664
|
+
|
|
665
|
+
變更內容:
|
|
666
|
+
|
|
667
|
+
- 更新資料庫驅動從 mysql2 至 pg
|
|
668
|
+
- 將 MySQL 專用查詢轉換為 PostgreSQL 語法
|
|
669
|
+
- 更新連線池設定
|
|
670
|
+
|
|
671
|
+
破壞性變更: 資料庫引擎從 MySQL 變更為 PostgreSQL
|
|
672
|
+
|
|
673
|
+
遷移指南:
|
|
674
|
+
|
|
675
|
+
1. 備份現有 MySQL 資料庫
|
|
676
|
+
2. 安裝 PostgreSQL 15+
|
|
677
|
+
3. 更新 .env 設定: DATABASE_URL=postgresql://...
|
|
678
|
+
4. 執行遷移腳本: npm run db:migrate
|
|
679
|
+
5. 驗證資料完整性: npm run db:verify
|
|
680
|
+
|
|
681
|
+
預估停機時間: 2-4 小時
|
|
682
|
+
|
|
683
|
+
Closes #890
|
|
684
|
+
|
|
685
|
+
```
|
|
686
|
+
|
|
687
|
+
---
|
|
688
|
+
|
|
689
|
+
## Anti-Patterns
|
|
690
|
+
|
|
691
|
+
### ❌ Anti-Pattern 1: Vague Messages
|
|
692
|
+
|
|
693
|
+
```
|
|
694
|
+
|
|
695
|
+
fix: bug fix
|
|
696
|
+
refactor: code improvements
|
|
697
|
+
update: changes
|
|
698
|
+
|
|
699
|
+
```
|
|
700
|
+
|
|
701
|
+
**Problem**: No context, impossible to understand without reading code.
|
|
702
|
+
|
|
703
|
+
**✅ Fix**:
|
|
704
|
+
```
|
|
705
|
+
|
|
706
|
+
fix(login): Prevent duplicate session creation on rapid clicks
|
|
707
|
+
refactor(utils): Extract email validation regex to constants
|
|
708
|
+
feat(profile): Add avatar upload with image compression
|
|
709
|
+
|
|
710
|
+
```
|
|
711
|
+
|
|
712
|
+
---
|
|
713
|
+
|
|
714
|
+
### ❌ Anti-Pattern 2: Mixing Multiple Concerns
|
|
715
|
+
|
|
716
|
+
```
|
|
717
|
+
|
|
718
|
+
feat: add login, fix bugs, refactor database, update docs
|
|
719
|
+
|
|
720
|
+
```
|
|
721
|
+
|
|
722
|
+
**Problem**: Should be separate commits for reviewability and revertability.
|
|
723
|
+
|
|
724
|
+
**✅ Fix**: Split into separate commits:
|
|
725
|
+
```
|
|
726
|
+
|
|
727
|
+
feat(auth): Add OAuth2 login support
|
|
728
|
+
fix(api): Resolve null pointer in user lookup
|
|
729
|
+
refactor(database): Extract connection pool to separate module
|
|
730
|
+
docs(api): Update authentication endpoint documentation
|
|
731
|
+
|
|
732
|
+
```
|
|
733
|
+
|
|
734
|
+
---
|
|
735
|
+
|
|
736
|
+
### ❌ Anti-Pattern 3: Commit Message as Code Comments
|
|
737
|
+
|
|
738
|
+
```
|
|
739
|
+
|
|
740
|
+
fix: change line 45 from getUserById to getUserByEmail because the function was renamed
|
|
741
|
+
|
|
742
|
+
```
|
|
743
|
+
|
|
744
|
+
**Problem**: Too focused on implementation details instead of purpose.
|
|
745
|
+
|
|
746
|
+
**✅ Fix**:
|
|
747
|
+
```
|
|
748
|
+
|
|
749
|
+
fix(api): Use correct user lookup method in password reset
|
|
750
|
+
|
|
751
|
+
The password reset flow was calling getUserById with an email parameter,
|
|
752
|
+
causing lookups to fail. Now correctly calls getUserByEmail.
|
|
753
|
+
|
|
754
|
+
Fixes #789
|
|
755
|
+
|
|
756
|
+
```
|
|
757
|
+
|
|
758
|
+
---
|
|
759
|
+
|
|
760
|
+
### ❌ Anti-Pattern 4: No Body for Complex Changes
|
|
761
|
+
|
|
762
|
+
```
|
|
763
|
+
|
|
764
|
+
refactor(database): migrate to PostgreSQL
|
|
765
|
+
|
|
766
|
+
```
|
|
767
|
+
|
|
768
|
+
**Problem**: Breaking change with no migration guide or context.
|
|
769
|
+
|
|
770
|
+
**✅ Fix**: Add body with context and migration guide (see Example 6 above).
|
|
771
|
+
|
|
772
|
+
---
|
|
773
|
+
|
|
774
|
+
## Automation and Tooling
|
|
775
|
+
|
|
776
|
+
### Commit Message Linters
|
|
777
|
+
|
|
778
|
+
**commitlint** (Node.js):
|
|
779
|
+
```bash
|
|
780
|
+
npm install --save-dev @commitlint/{cli,config-conventional}
|
|
781
|
+
|
|
782
|
+
# .commitlintrc.js
|
|
783
|
+
module.exports = {
|
|
784
|
+
extends: ['@commitlint/config-conventional']
|
|
785
|
+
};
|
|
786
|
+
```
|
|
787
|
+
|
|
788
|
+
**Git Hook** (enforce on commit):
|
|
789
|
+
|
|
790
|
+
```bash
|
|
791
|
+
# .git/hooks/commit-msg
|
|
792
|
+
#!/bin/sh
|
|
793
|
+
npx commitlint --edit $1
|
|
794
|
+
```
|
|
795
|
+
|
|
796
|
+
---
|
|
797
|
+
|
|
798
|
+
### Changelog Generation
|
|
799
|
+
|
|
800
|
+
**standard-version** (Node.js):
|
|
801
|
+
|
|
802
|
+
```bash
|
|
803
|
+
npm install --save-dev standard-version
|
|
804
|
+
|
|
805
|
+
# package.json
|
|
806
|
+
{
|
|
807
|
+
"scripts": {
|
|
808
|
+
"release": "standard-version"
|
|
809
|
+
}
|
|
810
|
+
}
|
|
811
|
+
|
|
812
|
+
# Generates CHANGELOG.md from commits
|
|
813
|
+
npm run release
|
|
814
|
+
```
|
|
815
|
+
|
|
816
|
+
**git-chglog** (Go):
|
|
817
|
+
|
|
818
|
+
```bash
|
|
819
|
+
git-chglog --output CHANGELOG.md
|
|
820
|
+
```
|
|
821
|
+
|
|
822
|
+
---
|
|
823
|
+
|
|
824
|
+
## Project Configuration Template
|
|
825
|
+
|
|
826
|
+
Add to `CONTRIBUTING.md`:
|
|
827
|
+
|
|
828
|
+
```markdown
|
|
829
|
+
## Commit Message Format
|
|
830
|
+
|
|
831
|
+
### Type Language
|
|
832
|
+
This project uses **[English / Traditional Chinese / Bilingual]** commit types.
|
|
833
|
+
|
|
834
|
+
### Allowed Types
|
|
835
|
+
- feat: New features
|
|
836
|
+
- fix: Bug fixes
|
|
837
|
+
- refactor: Code refactoring
|
|
838
|
+
- docs: Documentation
|
|
839
|
+
- test: Tests
|
|
840
|
+
- perf: Performance improvements
|
|
841
|
+
- build: Build system
|
|
842
|
+
- ci: CI/CD changes
|
|
843
|
+
- chore: Maintenance
|
|
844
|
+
- security: Security fixes
|
|
845
|
+
|
|
846
|
+
### Allowed Scopes
|
|
847
|
+
- auth: Authentication module
|
|
848
|
+
- api: API layer
|
|
849
|
+
- ui: User interface
|
|
850
|
+
- database: Database layer
|
|
851
|
+
- [add your project-specific scopes]
|
|
852
|
+
|
|
853
|
+
### Subject Language
|
|
854
|
+
Commit subject lines should be in **[English/繁體中文/Bilingual]**.
|
|
855
|
+
|
|
856
|
+
### Examples
|
|
857
|
+
|
|
858
|
+
**English**:
|
|
859
|
+
```
|
|
860
|
+
|
|
861
|
+
feat(auth): Add OAuth2 support
|
|
862
|
+
fix(api): Resolve memory leak
|
|
863
|
+
|
|
864
|
+
```
|
|
865
|
+
|
|
866
|
+
**Bilingual Mode** (English first, Chinese follows):
|
|
867
|
+
```
|
|
868
|
+
|
|
869
|
+
feat(auth): Add OAuth2 support. 新增 OAuth2 支援。
|
|
870
|
+
|
|
871
|
+
Implement OAuth2 authentication flow.
|
|
872
|
+
|
|
873
|
+
實作 OAuth2 認證流程。
|
|
874
|
+
|
|
875
|
+
Closes #123
|
|
876
|
+
|
|
877
|
+
```
|
|
878
|
+
|
|
879
|
+
```
|
|
880
|
+
|
|
881
|
+
---
|
|
882
|
+
|
|
883
|
+
## Related Standards
|
|
884
|
+
|
|
885
|
+
- [Git Workflow Standards](git-workflow.md)
|
|
886
|
+
- [Code Check-in Standards](checkin-standards.md)
|
|
887
|
+
- [Changelog Standards](changelog-standards.md)
|
|
888
|
+
- [Versioning Standard](versioning.md)
|
|
889
|
+
|
|
890
|
+
---
|
|
891
|
+
|
|
892
|
+
## Version History
|
|
893
|
+
|
|
894
|
+
| Version | Date | Changes |
|
|
895
|
+
| ------- | ---------- | ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
|
|
896
|
+
| 1.2.3 | 2025-12-24 | Added: Related Standards section |
|
|
897
|
+
| 1.2.2 | 2025-12-16 | Added: Language selection guide with decision matrix and quick selection tips |
|
|
898
|
+
| 1.2.1 | 2025-12-09 | Improve Option A/B/C format consistency: unify title style, add description text |
|
|
899
|
+
| 1.2.0 | 2025-12-05 | Fix Option B type mapping (chore→維護); Add security type; Add scope naming rules; Clarify bilingual period exception; Improve templates |
|
|
900
|
+
| 1.1.0 | 2025-12-05 | Add Bilingual Mode (Option C) with examples |
|
|
901
|
+
| 1.0.0 | 2025-11-12 | Initial guide published |
|
|
902
|
+
|
|
903
|
+
---
|
|
904
|
+
|
|
905
|
+
## References
|
|
906
|
+
|
|
907
|
+
- [Conventional Commits](https://www.conventionalcommits.org/)
|
|
908
|
+
- [Angular Commit Guidelines](https://github.com/angular/angular/blob/main/CONTRIBUTING.md#commit)
|
|
909
|
+
- [Semantic Versioning](https://semver.org/)
|
|
910
|
+
|
|
911
|
+
---
|
|
912
|
+
|
|
913
|
+
## License
|
|
914
|
+
|
|
915
|
+
This guide is released under [CC BY 4.0](https://creativecommons.org/licenses/by/4.0/).
|