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,536 @@
|
|
|
1
|
+
# Test Completeness Dimensions
|
|
2
|
+
|
|
3
|
+
**Version**: 1.0.0
|
|
4
|
+
**Last Updated**: 2025-12-24
|
|
5
|
+
**Applicability**: All software projects with testing requirements
|
|
6
|
+
|
|
7
|
+
[English](.) | [繁體中文](../locales/zh-TW/core/test-completeness-dimensions.md)
|
|
8
|
+
|
|
9
|
+
---
|
|
10
|
+
|
|
11
|
+
## Purpose
|
|
12
|
+
|
|
13
|
+
This document defines a systematic framework for evaluating test completeness. It provides developers with a checklist to ensure comprehensive test coverage across multiple dimensions.
|
|
14
|
+
|
|
15
|
+
---
|
|
16
|
+
|
|
17
|
+
## The Seven Dimensions
|
|
18
|
+
|
|
19
|
+
A complete test suite should cover these 7 dimensions for each feature:
|
|
20
|
+
|
|
21
|
+
```
|
|
22
|
+
┌─────────────────────────────────────────────────────────────┐
|
|
23
|
+
│ Test Completeness = 7 Dimensions │
|
|
24
|
+
├─────────────────────────────────────────────────────────────┤
|
|
25
|
+
│ 1. Happy Path Normal expected behavior │
|
|
26
|
+
│ 2. Boundary Min/max values, limits │
|
|
27
|
+
│ 3. Error Handling Invalid input, exceptions │
|
|
28
|
+
│ 4. Authorization Role-based access control │
|
|
29
|
+
│ 5. State Changes Before/after verification │
|
|
30
|
+
│ 6. Validation Format, business rules │
|
|
31
|
+
│ 7. Integration Real query verification │
|
|
32
|
+
└─────────────────────────────────────────────────────────────┘
|
|
33
|
+
```
|
|
34
|
+
|
|
35
|
+
---
|
|
36
|
+
|
|
37
|
+
## Dimension Details
|
|
38
|
+
|
|
39
|
+
### 1. Happy Path
|
|
40
|
+
|
|
41
|
+
Test the normal, expected flow with valid inputs.
|
|
42
|
+
|
|
43
|
+
**What to test**:
|
|
44
|
+
- Valid input produces expected output
|
|
45
|
+
- Success status codes/responses
|
|
46
|
+
- Data is correctly created/modified
|
|
47
|
+
- Side effects occur as expected
|
|
48
|
+
|
|
49
|
+
**Example**:
|
|
50
|
+
```csharp
|
|
51
|
+
[Fact]
|
|
52
|
+
public async Task CreateUser_WithValidData_ReturnsSuccess()
|
|
53
|
+
{
|
|
54
|
+
// Arrange
|
|
55
|
+
var request = new CreateUserRequest
|
|
56
|
+
{
|
|
57
|
+
Username = "newuser",
|
|
58
|
+
Email = "user@example.com",
|
|
59
|
+
Password = "SecurePass123!"
|
|
60
|
+
};
|
|
61
|
+
|
|
62
|
+
// Act
|
|
63
|
+
var result = await _service.CreateUserAsync(request);
|
|
64
|
+
|
|
65
|
+
// Assert
|
|
66
|
+
result.Success.Should().BeTrue();
|
|
67
|
+
result.Data.Username.Should().Be("newuser");
|
|
68
|
+
}
|
|
69
|
+
```
|
|
70
|
+
|
|
71
|
+
---
|
|
72
|
+
|
|
73
|
+
### 2. Boundary Conditions
|
|
74
|
+
|
|
75
|
+
Test values at the edges of valid ranges.
|
|
76
|
+
|
|
77
|
+
**What to test**:
|
|
78
|
+
- Minimum valid values
|
|
79
|
+
- Maximum valid values
|
|
80
|
+
- Just below minimum (invalid)
|
|
81
|
+
- Just above maximum (invalid)
|
|
82
|
+
- Empty collections vs. single item vs. many items
|
|
83
|
+
|
|
84
|
+
**Example**:
|
|
85
|
+
```csharp
|
|
86
|
+
[Theory]
|
|
87
|
+
[InlineData(0, false)] // Below minimum
|
|
88
|
+
[InlineData(1, true)] // Minimum valid
|
|
89
|
+
[InlineData(100, true)] // Maximum valid
|
|
90
|
+
[InlineData(101, false)] // Above maximum
|
|
91
|
+
public void ValidateQuantity_BoundaryValues_ReturnsExpected(
|
|
92
|
+
int quantity, bool expected)
|
|
93
|
+
{
|
|
94
|
+
var result = _validator.IsValidQuantity(quantity);
|
|
95
|
+
result.Should().Be(expected);
|
|
96
|
+
}
|
|
97
|
+
|
|
98
|
+
[Fact]
|
|
99
|
+
public async Task BatchProcess_ExceedingLimit_ReturnsError()
|
|
100
|
+
{
|
|
101
|
+
// Arrange - Create 1001 items (limit is 1000)
|
|
102
|
+
var items = Enumerable.Range(1, 1001)
|
|
103
|
+
.Select(i => new Item { Id = i })
|
|
104
|
+
.ToList();
|
|
105
|
+
|
|
106
|
+
// Act
|
|
107
|
+
var result = await _service.ProcessBatchAsync(items);
|
|
108
|
+
|
|
109
|
+
// Assert
|
|
110
|
+
result.Success.Should().BeFalse();
|
|
111
|
+
result.ErrorCode.Should().Be("LIMIT_EXCEEDED");
|
|
112
|
+
}
|
|
113
|
+
```
|
|
114
|
+
|
|
115
|
+
---
|
|
116
|
+
|
|
117
|
+
### 3. Error Handling
|
|
118
|
+
|
|
119
|
+
Test how the system handles invalid inputs and exceptional conditions.
|
|
120
|
+
|
|
121
|
+
**What to test**:
|
|
122
|
+
- Invalid input formats
|
|
123
|
+
- Missing required fields
|
|
124
|
+
- Duplicate data conflicts
|
|
125
|
+
- Resource not found
|
|
126
|
+
- External service failures
|
|
127
|
+
|
|
128
|
+
**Example**:
|
|
129
|
+
```csharp
|
|
130
|
+
[Fact]
|
|
131
|
+
public async Task CreateUser_DuplicateEmail_ReturnsConflict()
|
|
132
|
+
{
|
|
133
|
+
// Arrange
|
|
134
|
+
var request = new CreateUserRequest
|
|
135
|
+
{
|
|
136
|
+
Email = "existing@example.com" // Already exists
|
|
137
|
+
};
|
|
138
|
+
|
|
139
|
+
// Act
|
|
140
|
+
var result = await _service.CreateUserAsync(request);
|
|
141
|
+
|
|
142
|
+
// Assert
|
|
143
|
+
result.Success.Should().BeFalse();
|
|
144
|
+
result.ErrorCode.Should().Be("DUPLICATE_EMAIL");
|
|
145
|
+
}
|
|
146
|
+
|
|
147
|
+
[Fact]
|
|
148
|
+
public async Task GetUser_NotFound_ReturnsNotFoundError()
|
|
149
|
+
{
|
|
150
|
+
// Arrange
|
|
151
|
+
var nonExistentId = 99999;
|
|
152
|
+
|
|
153
|
+
// Act
|
|
154
|
+
var result = await _service.GetUserAsync(nonExistentId);
|
|
155
|
+
|
|
156
|
+
// Assert
|
|
157
|
+
result.Should().BeNull();
|
|
158
|
+
}
|
|
159
|
+
|
|
160
|
+
[Fact]
|
|
161
|
+
public async Task CreateUser_MissingRequiredFields_ReturnsValidationError()
|
|
162
|
+
{
|
|
163
|
+
// Arrange
|
|
164
|
+
var request = new CreateUserRequest
|
|
165
|
+
{
|
|
166
|
+
Username = "", // Required but empty
|
|
167
|
+
Email = null // Required but null
|
|
168
|
+
};
|
|
169
|
+
|
|
170
|
+
// Act
|
|
171
|
+
var result = await _service.CreateUserAsync(request);
|
|
172
|
+
|
|
173
|
+
// Assert
|
|
174
|
+
result.Success.Should().BeFalse();
|
|
175
|
+
result.ErrorCode.Should().Be("VALIDATION_ERROR");
|
|
176
|
+
}
|
|
177
|
+
```
|
|
178
|
+
|
|
179
|
+
---
|
|
180
|
+
|
|
181
|
+
### 4. Authorization
|
|
182
|
+
|
|
183
|
+
Test role-based access control for each operation.
|
|
184
|
+
|
|
185
|
+
**What to test**:
|
|
186
|
+
- Each role's permitted operations
|
|
187
|
+
- Each role's denied operations
|
|
188
|
+
- Unauthenticated access
|
|
189
|
+
- Cross-tenant/cross-user data access
|
|
190
|
+
|
|
191
|
+
**Authorization Test Matrix**:
|
|
192
|
+
|
|
193
|
+
Create a matrix for each feature:
|
|
194
|
+
|
|
195
|
+
| Operation | Admin | Manager | Member | Guest |
|
|
196
|
+
|-----------|-------|---------|--------|-------|
|
|
197
|
+
| Create | ✅ | ✅ | ❌ | ❌ |
|
|
198
|
+
| Read All | ✅ | ⚠️ Scoped | ❌ | ❌ |
|
|
199
|
+
| Update | ✅ | ⚠️ Own dept | ❌ | ❌ |
|
|
200
|
+
| Delete | ✅ | ❌ | ❌ | ❌ |
|
|
201
|
+
|
|
202
|
+
Each cell should have a corresponding test case.
|
|
203
|
+
|
|
204
|
+
**Example**:
|
|
205
|
+
```csharp
|
|
206
|
+
[Fact]
|
|
207
|
+
public async Task DeleteUser_AsAdmin_Succeeds()
|
|
208
|
+
{
|
|
209
|
+
// Arrange
|
|
210
|
+
var adminContext = CreateContext(role: "Admin");
|
|
211
|
+
|
|
212
|
+
// Act
|
|
213
|
+
var result = await _service.DeleteUserAsync(userId, adminContext);
|
|
214
|
+
|
|
215
|
+
// Assert
|
|
216
|
+
result.Success.Should().BeTrue();
|
|
217
|
+
}
|
|
218
|
+
|
|
219
|
+
[Fact]
|
|
220
|
+
public async Task DeleteUser_AsMember_ReturnsForbidden()
|
|
221
|
+
{
|
|
222
|
+
// Arrange
|
|
223
|
+
var memberContext = CreateContext(role: "Member");
|
|
224
|
+
|
|
225
|
+
// Act
|
|
226
|
+
var result = await _service.DeleteUserAsync(userId, memberContext);
|
|
227
|
+
|
|
228
|
+
// Assert
|
|
229
|
+
result.Success.Should().BeFalse();
|
|
230
|
+
result.ErrorCode.Should().Be("FORBIDDEN");
|
|
231
|
+
}
|
|
232
|
+
|
|
233
|
+
[Fact]
|
|
234
|
+
public async Task GetUsers_AsManager_ReturnsOnlyDepartmentMembers()
|
|
235
|
+
{
|
|
236
|
+
// Arrange
|
|
237
|
+
var managerContext = CreateContext(role: "Manager", deptId: 5);
|
|
238
|
+
|
|
239
|
+
// Act
|
|
240
|
+
var result = await _service.GetUsersAsync(managerContext);
|
|
241
|
+
|
|
242
|
+
// Assert
|
|
243
|
+
result.Data.Should().AllSatisfy(u => u.DeptId.Should().Be(5));
|
|
244
|
+
}
|
|
245
|
+
```
|
|
246
|
+
|
|
247
|
+
---
|
|
248
|
+
|
|
249
|
+
### 5. State Changes
|
|
250
|
+
|
|
251
|
+
Verify that operations correctly modify system state.
|
|
252
|
+
|
|
253
|
+
**What to test**:
|
|
254
|
+
- State before operation
|
|
255
|
+
- State after operation
|
|
256
|
+
- State transitions (enabled → disabled, pending → approved)
|
|
257
|
+
- Idempotency (repeating operation has same result)
|
|
258
|
+
|
|
259
|
+
**Example**:
|
|
260
|
+
```csharp
|
|
261
|
+
[Fact]
|
|
262
|
+
public async Task DisableUser_UpdatesStateCorrectly()
|
|
263
|
+
{
|
|
264
|
+
// Arrange
|
|
265
|
+
var user = await CreateEnabledUser();
|
|
266
|
+
user.IsEnabled.Should().BeTrue(); // Verify initial state
|
|
267
|
+
|
|
268
|
+
// Act
|
|
269
|
+
await _service.DisableUserAsync(user.Id);
|
|
270
|
+
|
|
271
|
+
// Assert
|
|
272
|
+
var updatedUser = await _repository.GetByIdAsync(user.Id);
|
|
273
|
+
updatedUser.IsEnabled.Should().BeFalse(); // Verify final state
|
|
274
|
+
updatedUser.DisabledAt.Should().BeCloseTo(DateTime.UtcNow, TimeSpan.FromSeconds(5));
|
|
275
|
+
}
|
|
276
|
+
|
|
277
|
+
[Fact]
|
|
278
|
+
public async Task EnableUser_FromDisabledState_UpdatesStateCorrectly()
|
|
279
|
+
{
|
|
280
|
+
// Arrange
|
|
281
|
+
var user = await CreateDisabledUser();
|
|
282
|
+
user.IsEnabled.Should().BeFalse(); // Verify initial state
|
|
283
|
+
|
|
284
|
+
// Act
|
|
285
|
+
await _service.EnableUserAsync(user.Id);
|
|
286
|
+
|
|
287
|
+
// Assert
|
|
288
|
+
var updatedUser = await _repository.GetByIdAsync(user.Id);
|
|
289
|
+
updatedUser.IsEnabled.Should().BeTrue();
|
|
290
|
+
}
|
|
291
|
+
```
|
|
292
|
+
|
|
293
|
+
---
|
|
294
|
+
|
|
295
|
+
### 6. Validation Logic
|
|
296
|
+
|
|
297
|
+
Test business rules and format validation.
|
|
298
|
+
|
|
299
|
+
**What to test**:
|
|
300
|
+
- Format validation (email, phone, etc.)
|
|
301
|
+
- Business rule validation
|
|
302
|
+
- Cross-field validation
|
|
303
|
+
- Domain-specific constraints
|
|
304
|
+
|
|
305
|
+
**Example**:
|
|
306
|
+
```csharp
|
|
307
|
+
[Theory]
|
|
308
|
+
[InlineData("user@example.com", true)]
|
|
309
|
+
[InlineData("invalid-email", false)]
|
|
310
|
+
[InlineData("", false)]
|
|
311
|
+
[InlineData(null, false)]
|
|
312
|
+
public void ValidateEmail_VariousFormats_ReturnsExpected(
|
|
313
|
+
string email, bool expected)
|
|
314
|
+
{
|
|
315
|
+
var result = _validator.IsValidEmail(email);
|
|
316
|
+
result.Should().Be(expected);
|
|
317
|
+
}
|
|
318
|
+
|
|
319
|
+
[Fact]
|
|
320
|
+
public async Task CreateUser_InvalidUsernameFormat_ReturnsValidationError()
|
|
321
|
+
{
|
|
322
|
+
// Arrange - Username contains special characters
|
|
323
|
+
var request = new CreateUserRequest
|
|
324
|
+
{
|
|
325
|
+
Username = "invalid@user!", // Only alphanumeric allowed
|
|
326
|
+
Email = "valid@example.com"
|
|
327
|
+
};
|
|
328
|
+
|
|
329
|
+
// Act
|
|
330
|
+
var result = await _service.CreateUserAsync(request);
|
|
331
|
+
|
|
332
|
+
// Assert
|
|
333
|
+
result.Success.Should().BeFalse();
|
|
334
|
+
result.Errors.Should().Contain(e => e.Field == "Username");
|
|
335
|
+
}
|
|
336
|
+
|
|
337
|
+
[Fact]
|
|
338
|
+
public async Task CreateOrder_QuantityExceedsStock_ReturnsBusinessRuleError()
|
|
339
|
+
{
|
|
340
|
+
// Arrange
|
|
341
|
+
var product = await CreateProduct(stockQuantity: 10);
|
|
342
|
+
var request = new CreateOrderRequest
|
|
343
|
+
{
|
|
344
|
+
ProductId = product.Id,
|
|
345
|
+
Quantity = 15 // Exceeds available stock
|
|
346
|
+
};
|
|
347
|
+
|
|
348
|
+
// Act
|
|
349
|
+
var result = await _service.CreateOrderAsync(request);
|
|
350
|
+
|
|
351
|
+
// Assert
|
|
352
|
+
result.Success.Should().BeFalse();
|
|
353
|
+
result.ErrorCode.Should().Be("INSUFFICIENT_STOCK");
|
|
354
|
+
}
|
|
355
|
+
```
|
|
356
|
+
|
|
357
|
+
---
|
|
358
|
+
|
|
359
|
+
### 7. Integration Verification
|
|
360
|
+
|
|
361
|
+
Verify actual database queries and external integrations work correctly.
|
|
362
|
+
|
|
363
|
+
**When Required**:
|
|
364
|
+
|
|
365
|
+
As per [Testing Standards](testing-standards.md) (or `/testing-guide` skill), if your unit test uses wildcard matchers (`It.IsAny<>`, `any()`, `Arg.Any<>`) for query parameters, you MUST have integration tests.
|
|
366
|
+
|
|
367
|
+
**What to test**:
|
|
368
|
+
- Query predicates return correct data
|
|
369
|
+
- Entity relationships are correctly loaded
|
|
370
|
+
- Pagination works correctly
|
|
371
|
+
- Sorting and filtering work correctly
|
|
372
|
+
|
|
373
|
+
**Example**:
|
|
374
|
+
```csharp
|
|
375
|
+
// Unit test - cannot verify query logic
|
|
376
|
+
[Fact]
|
|
377
|
+
public async Task GetActiveUsers_MockedRepository_ReturnsUsers()
|
|
378
|
+
{
|
|
379
|
+
// ⚠️ This test uses It.IsAny<> - needs integration test!
|
|
380
|
+
_repoMock.Setup(r => r.FindAsync(It.IsAny<Expression<Func<User, bool>>>()))
|
|
381
|
+
.ReturnsAsync(users);
|
|
382
|
+
|
|
383
|
+
var result = await _service.GetActiveUsersAsync();
|
|
384
|
+
result.Should().NotBeEmpty();
|
|
385
|
+
}
|
|
386
|
+
|
|
387
|
+
// ✅ Integration test - verifies actual query
|
|
388
|
+
[Fact]
|
|
389
|
+
public async Task GetActiveUsers_RealDatabase_ReturnsOnlyActiveUsers()
|
|
390
|
+
{
|
|
391
|
+
// Arrange - Seed database with mixed data
|
|
392
|
+
await SeedUsers(
|
|
393
|
+
new User { Name = "Active1", IsActive = true },
|
|
394
|
+
new User { Name = "Active2", IsActive = true },
|
|
395
|
+
new User { Name = "Inactive", IsActive = false }
|
|
396
|
+
);
|
|
397
|
+
|
|
398
|
+
// Act
|
|
399
|
+
var result = await _service.GetActiveUsersAsync();
|
|
400
|
+
|
|
401
|
+
// Assert
|
|
402
|
+
result.Should().HaveCount(2);
|
|
403
|
+
result.Should().AllSatisfy(u => u.IsActive.Should().BeTrue());
|
|
404
|
+
result.Should().NotContain(u => u.Name == "Inactive");
|
|
405
|
+
}
|
|
406
|
+
```
|
|
407
|
+
|
|
408
|
+
---
|
|
409
|
+
|
|
410
|
+
## Test Case Design Checklist
|
|
411
|
+
|
|
412
|
+
Use this checklist for each feature to ensure completeness:
|
|
413
|
+
|
|
414
|
+
```
|
|
415
|
+
Feature: ___________________
|
|
416
|
+
|
|
417
|
+
□ Happy Path
|
|
418
|
+
□ Valid input produces expected success
|
|
419
|
+
□ Correct data is returned/created
|
|
420
|
+
□ Side effects occur as expected
|
|
421
|
+
|
|
422
|
+
□ Boundary Conditions
|
|
423
|
+
□ Minimum valid value
|
|
424
|
+
□ Maximum valid value
|
|
425
|
+
□ Empty collection
|
|
426
|
+
□ Single item collection
|
|
427
|
+
□ Large collection (if applicable)
|
|
428
|
+
|
|
429
|
+
□ Error Handling
|
|
430
|
+
□ Invalid input format
|
|
431
|
+
□ Missing required fields
|
|
432
|
+
□ Duplicate/conflict scenarios
|
|
433
|
+
□ Not found scenarios
|
|
434
|
+
□ External service failure (if applicable)
|
|
435
|
+
|
|
436
|
+
□ Authorization
|
|
437
|
+
□ Each permitted role tested
|
|
438
|
+
□ Each denied role tested
|
|
439
|
+
□ Unauthenticated access tested
|
|
440
|
+
□ Cross-boundary access tested
|
|
441
|
+
|
|
442
|
+
□ State Changes
|
|
443
|
+
□ Initial state verified
|
|
444
|
+
□ Final state verified
|
|
445
|
+
□ All valid state transitions tested
|
|
446
|
+
|
|
447
|
+
□ Validation
|
|
448
|
+
□ Format validation (email, phone, etc.)
|
|
449
|
+
□ Business rule validation
|
|
450
|
+
□ Cross-field validation
|
|
451
|
+
|
|
452
|
+
□ Integration (if UT uses wildcards)
|
|
453
|
+
□ Query predicates verified
|
|
454
|
+
□ Entity relationships verified
|
|
455
|
+
□ Pagination verified
|
|
456
|
+
□ Sorting/filtering verified
|
|
457
|
+
```
|
|
458
|
+
|
|
459
|
+
---
|
|
460
|
+
|
|
461
|
+
## Error Code Coverage Matrix
|
|
462
|
+
|
|
463
|
+
For APIs with defined error codes, ensure each code has a test:
|
|
464
|
+
|
|
465
|
+
| Code | Meaning | Test Scenario |
|
|
466
|
+
|------|---------|---------------|
|
|
467
|
+
| 200 | Success | Happy path test |
|
|
468
|
+
| 400 | Bad Request | Invalid format, missing fields |
|
|
469
|
+
| 401 | Unauthorized | Invalid/missing token |
|
|
470
|
+
| 403 | Forbidden | Valid token, insufficient permissions |
|
|
471
|
+
| 404 | Not Found | Non-existent resource |
|
|
472
|
+
| 409 | Conflict | Duplicate data |
|
|
473
|
+
| 422 | Unprocessable | Business rule violation |
|
|
474
|
+
| 500 | Server Error | Exception handling |
|
|
475
|
+
|
|
476
|
+
---
|
|
477
|
+
|
|
478
|
+
## When to Apply Each Dimension
|
|
479
|
+
|
|
480
|
+
Not all dimensions apply to every feature. Use this guide:
|
|
481
|
+
|
|
482
|
+
| Feature Type | Required Dimensions |
|
|
483
|
+
|--------------|---------------------|
|
|
484
|
+
| CRUD API | 1, 2, 3, 4, 6, 7 |
|
|
485
|
+
| Query/Search | 1, 2, 3, 4, 7 |
|
|
486
|
+
| State Machine | 1, 3, 4, 5, 6 |
|
|
487
|
+
| Validation | 1, 2, 3, 6 |
|
|
488
|
+
| Background Job | 1, 3, 5 |
|
|
489
|
+
| External Integration | 1, 3, 7 |
|
|
490
|
+
|
|
491
|
+
---
|
|
492
|
+
|
|
493
|
+
## Anti-Patterns
|
|
494
|
+
|
|
495
|
+
Avoid these common mistakes:
|
|
496
|
+
|
|
497
|
+
```
|
|
498
|
+
❌ Testing only happy path
|
|
499
|
+
|
|
500
|
+
❌ Missing authorization tests for multi-role systems
|
|
501
|
+
|
|
502
|
+
❌ Not verifying state changes
|
|
503
|
+
|
|
504
|
+
❌ Using wildcards in UT without corresponding IT
|
|
505
|
+
|
|
506
|
+
❌ Same values for ID and business identifier in test data
|
|
507
|
+
|
|
508
|
+
❌ Testing implementation details instead of behavior
|
|
509
|
+
```
|
|
510
|
+
|
|
511
|
+
---
|
|
512
|
+
|
|
513
|
+
## Related Standards
|
|
514
|
+
|
|
515
|
+
- [Test-Driven Development](test-driven-development.md) - TDD/BDD/ATDD methodology
|
|
516
|
+
- [Testing Standards](testing-standards.md) - Core testing standards (or use `/testing-guide` skill)
|
|
517
|
+
- [Code Review Checklist](code-review-checklist.md) - Review test completeness
|
|
518
|
+
- [Check-in Standards](checkin-standards.md) - Pre-commit test requirements
|
|
519
|
+
|
|
520
|
+
---
|
|
521
|
+
|
|
522
|
+
## Version History
|
|
523
|
+
|
|
524
|
+
| Version | Date | Changes |
|
|
525
|
+
|---------|------|---------|
|
|
526
|
+
| 1.0.0 | 2025-12-24 | Initial release with 7 dimensions framework |
|
|
527
|
+
|
|
528
|
+
---
|
|
529
|
+
|
|
530
|
+
## License
|
|
531
|
+
|
|
532
|
+
This standard is released under [CC BY 4.0](https://creativecommons.org/licenses/by/4.0/).
|
|
533
|
+
|
|
534
|
+
---
|
|
535
|
+
|
|
536
|
+
**Maintainer**: Development Team
|