universal-dev-standards 4.2.0 → 5.0.0-beta.10
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/README.md +3 -3
- package/bin/uds.js +165 -5
- package/bundled/core/acceptance-test-driven-development.md +19 -721
- package/bundled/core/accessibility-standards.md +862 -0
- package/bundled/core/ai-agreement-standards.md +95 -0
- package/bundled/core/ai-friendly-architecture.md +2 -0
- package/bundled/core/ai-instruction-standards.md +2 -0
- package/bundled/core/anti-hallucination.md +90 -637
- package/bundled/core/behavior-driven-development.md +20 -735
- package/bundled/core/changelog-standards.md +4 -0
- package/bundled/core/checkin-standards.md +21 -4
- package/bundled/core/code-review-checklist.md +3 -0
- package/bundled/core/commit-message-guide.md +14 -3
- package/bundled/core/deployment-standards.md +296 -0
- package/bundled/core/developer-memory.md +568 -0
- package/bundled/core/documentation-structure.md +114 -18
- package/bundled/core/documentation-writing-standards.md +272 -2
- package/bundled/core/error-code-standards.md +3 -0
- package/bundled/core/forward-derivation-standards.md +134 -8
- package/bundled/core/git-workflow.md +72 -686
- package/bundled/core/guides/anti-hallucination-guide.md +517 -0
- package/bundled/core/guides/git-workflow-guide.md +954 -0
- package/bundled/core/guides/performance-guide.md +508 -0
- package/bundled/core/guides/refactoring-guide.md +608 -0
- package/bundled/core/guides/security-guide.md +485 -0
- package/bundled/core/logging-standards.md +337 -2
- package/bundled/core/performance-standards.md +231 -0
- package/bundled/core/project-context-memory.md +180 -0
- package/bundled/core/project-structure.md +315 -2
- package/bundled/core/refactoring-standards.md +81 -761
- package/bundled/core/requirement-engineering.md +39 -0
- package/bundled/core/reverse-engineering-standards.md +6 -4
- package/bundled/core/security-standards.md +244 -0
- package/bundled/core/spec-driven-development.md +20 -319
- package/bundled/core/test-completeness-dimensions.md +213 -11
- package/bundled/core/test-driven-development.md +22 -978
- package/bundled/core/testing-standards.md +222 -2903
- package/bundled/core/versioning.md +16 -55
- package/bundled/core/virtual-organization-standards.md +85 -0
- package/bundled/locales/README.md +4 -4
- package/bundled/locales/zh-CN/CHANGELOG.md +18 -18
- package/bundled/locales/zh-CN/CLAUDE.md +3 -3
- package/bundled/locales/zh-CN/MAINTENANCE.md +7 -7
- package/bundled/locales/zh-CN/README.md +2 -2
- package/bundled/locales/zh-CN/STANDARDS-MAPPING.md +1 -1
- package/bundled/locales/zh-CN/adoption/ADOPTION-GUIDE.md +3 -3
- package/bundled/locales/zh-CN/adoption/DAILY-WORKFLOW-GUIDE.md +66 -7
- package/bundled/locales/zh-CN/adoption/STATIC-DYNAMIC-GUIDE.md +22 -22
- package/bundled/locales/zh-CN/adoption/checklists/enterprise.md +5 -5
- package/bundled/locales/zh-CN/adoption/checklists/minimal.md +4 -4
- package/bundled/locales/zh-CN/adoption/checklists/recommended.md +5 -5
- package/bundled/locales/zh-CN/ai/MAINTENANCE.md +13 -13
- package/bundled/locales/zh-CN/core/ai-instruction-standards.md +1 -1
- package/bundled/locales/zh-CN/core/anti-hallucination.md +39 -3
- package/bundled/locales/zh-CN/core/checkin-standards.md +18 -5
- package/bundled/locales/zh-CN/core/commit-message-guide.md +1 -1
- package/bundled/locales/zh-CN/core/developer-memory.md +576 -0
- package/bundled/locales/zh-CN/core/documentation-structure.md +43 -5
- package/bundled/locales/zh-CN/core/documentation-writing-standards.md +146 -5
- package/bundled/locales/zh-CN/core/git-workflow.md +179 -4
- package/bundled/locales/zh-CN/core/logging-standards.md +177 -4
- package/bundled/locales/zh-CN/core/project-structure.md +117 -5
- package/bundled/locales/zh-CN/core/refactoring-standards.md +3 -3
- package/bundled/locales/zh-CN/core/reverse-engineering-standards.md +6 -6
- package/bundled/locales/zh-CN/core/spec-driven-development.md +516 -14
- package/bundled/locales/zh-CN/core/test-completeness-dimensions.md +155 -24
- package/bundled/locales/zh-CN/core/test-driven-development.md +71 -20
- package/bundled/locales/zh-CN/core/testing-standards.md +4 -4
- package/bundled/locales/zh-CN/core/versioning.md +1 -1
- package/bundled/locales/zh-CN/docs/AI-AGENT-ROADMAP.md +90 -51
- package/bundled/locales/zh-CN/docs/CHEATSHEET.md +184 -0
- package/bundled/locales/zh-CN/docs/CLI-FLOW.md +239 -0
- package/bundled/locales/zh-CN/docs/FEATURE-REFERENCE.md +320 -0
- package/bundled/locales/zh-CN/docs/OPERATION-WORKFLOW.md +43 -43
- package/bundled/locales/zh-CN/docs/STANDARDS-REFERENCE.md +440 -0
- package/bundled/locales/zh-CN/docs/USAGE-MODES-COMPARISON.md +1 -1
- package/bundled/locales/zh-CN/docs/WINDOWS-GUIDE.md +1 -1
- package/bundled/locales/zh-CN/integrations/codex/README.md +3 -3
- package/bundled/locales/zh-CN/integrations/gemini-cli/README.md +3 -3
- package/bundled/locales/zh-CN/integrations/github-copilot/README.md +5 -5
- package/bundled/locales/zh-CN/integrations/github-copilot/copilot-instructions.md +9 -9
- package/bundled/locales/zh-CN/integrations/github-copilot/skills-mapping.md +18 -6
- package/bundled/locales/zh-CN/integrations/google-antigravity/README.md +2 -2
- package/bundled/locales/zh-CN/integrations/opencode/README.md +3 -3
- package/bundled/locales/zh-CN/integrations/opencode/skills-mapping.md +22 -10
- package/bundled/locales/zh-CN/integrations/openspec/README.md +1 -1
- package/bundled/locales/zh-CN/integrations/spec-kit/AGENTS.md +3 -3
- package/bundled/locales/zh-CN/integrations/spec-kit/README.md +1 -1
- package/bundled/locales/zh-CN/options/commit-message/bilingual.md +1 -1
- package/bundled/locales/zh-CN/options/commit-message/english.md +1 -1
- package/bundled/locales/zh-CN/options/commit-message/traditional-chinese.md +1 -1
- package/bundled/locales/zh-CN/options/git-workflow/gitflow.md +1 -1
- package/bundled/locales/zh-CN/options/git-workflow/github-flow.md +1 -1
- package/bundled/locales/zh-CN/options/git-workflow/merge-commit.md +1 -1
- package/bundled/locales/zh-CN/options/git-workflow/rebase-ff.md +1 -1
- package/bundled/locales/zh-CN/options/git-workflow/squash-merge.md +1 -1
- package/bundled/locales/zh-CN/options/git-workflow/trunk-based.md +1 -1
- package/bundled/locales/zh-CN/options/project-structure/dotnet.md +1 -1
- package/bundled/locales/zh-CN/options/project-structure/go.md +1 -1
- package/bundled/locales/zh-CN/options/project-structure/java.md +1 -1
- package/bundled/locales/zh-CN/options/project-structure/nodejs.md +1 -1
- package/bundled/locales/zh-CN/options/project-structure/python.md +1 -1
- package/bundled/locales/zh-CN/options/testing/e2e-testing.md +1 -1
- package/bundled/locales/zh-CN/options/testing/integration-testing.md +1 -1
- package/bundled/locales/zh-CN/options/testing/system-testing.md +1 -1
- package/bundled/locales/zh-CN/options/testing/unit-testing.md +1 -1
- package/bundled/locales/zh-CN/skills/{claude-code/CONTRIBUTING.template.md → CONTRIBUTING.template.md} +2 -2
- package/bundled/locales/zh-CN/skills/README.md +131 -81
- package/bundled/locales/zh-CN/skills/agents/README.md +281 -0
- package/bundled/locales/zh-CN/skills/{claude-code/ai-collaboration-standards → ai-collaboration-standards}/SKILL.md +10 -10
- package/bundled/locales/zh-CN/skills/{claude-code/ai-collaboration-standards → ai-collaboration-standards}/anti-hallucination.md +8 -8
- package/bundled/locales/zh-CN/skills/{claude-code/ai-collaboration-standards → ai-collaboration-standards}/certainty-labels.md +8 -8
- package/bundled/locales/zh-CN/skills/ai-friendly-architecture/SKILL.md +221 -0
- package/bundled/locales/zh-CN/skills/ai-instruction-standards/SKILL.md +214 -0
- package/bundled/locales/zh-CN/skills/atdd-assistant/SKILL.md +71 -0
- package/bundled/locales/zh-CN/skills/atdd-assistant/acceptance-criteria-guide.md +428 -0
- package/bundled/locales/zh-CN/skills/atdd-assistant/atdd-workflow.md +484 -0
- package/bundled/locales/zh-CN/skills/atdd-assistant/guide.md +368 -0
- package/bundled/locales/zh-CN/skills/bdd-assistant/SKILL.md +68 -0
- package/bundled/locales/zh-CN/skills/bdd-assistant/bdd-workflow.md +406 -0
- package/bundled/locales/zh-CN/skills/bdd-assistant/gherkin-guide.md +454 -0
- package/bundled/locales/zh-CN/skills/bdd-assistant/guide.md +324 -0
- package/bundled/locales/zh-CN/skills/changelog-guide/SKILL.md +64 -0
- package/bundled/locales/zh-CN/skills/{claude-code/changelog-guide/SKILL.md → changelog-guide/guide.md} +6 -7
- package/bundled/locales/zh-CN/skills/checkin-assistant/SKILL.md +56 -0
- package/bundled/locales/zh-CN/skills/{claude-code/checkin-assistant/SKILL.md → checkin-assistant/guide.md} +6 -7
- package/bundled/locales/zh-CN/skills/code-review-assistant/SKILL.md +56 -0
- package/bundled/locales/zh-CN/skills/{claude-code/code-review-assistant → code-review-assistant}/checkin-checklist.md +4 -4
- package/bundled/locales/zh-CN/skills/{claude-code/code-review-assistant/SKILL.md → code-review-assistant/guide.md} +5 -6
- package/bundled/locales/zh-CN/skills/{claude-code/code-review-assistant → code-review-assistant}/review-checklist.md +4 -4
- package/bundled/locales/zh-CN/skills/{claude-code/commands → commands}/bdd.md +2 -2
- package/bundled/locales/zh-CN/skills/{claude-code/commands → commands}/methodology.md +3 -3
- package/bundled/locales/zh-CN/skills/{claude-code/commands → commands}/refactor.md +3 -3
- package/bundled/locales/zh-CN/skills/commit-standards/SKILL.md +61 -0
- package/bundled/locales/zh-CN/skills/{claude-code/commit-standards → commit-standards}/conventional-commits.md +4 -4
- package/bundled/locales/zh-CN/skills/{claude-code/commit-standards/SKILL.md → commit-standards/guide.md} +5 -6
- package/bundled/locales/zh-CN/skills/{claude-code/commit-standards → commit-standards}/language-options.md +3 -3
- package/bundled/locales/zh-CN/skills/docs-generator/SKILL.md +59 -0
- package/bundled/locales/zh-CN/skills/docs-generator/guide.md +262 -0
- package/bundled/locales/zh-CN/skills/{claude-code/documentation-guide → documentation-guide}/SKILL.md +7 -8
- package/bundled/locales/zh-CN/skills/{claude-code/documentation-guide → documentation-guide}/documentation-structure.md +4 -4
- package/bundled/locales/zh-CN/skills/{claude-code/documentation-guide → documentation-guide}/readme-template.md +3 -3
- package/bundled/locales/zh-CN/skills/{claude-code/error-code-guide → error-code-guide}/SKILL.md +6 -6
- package/bundled/locales/zh-CN/skills/forward-derivation/SKILL.md +62 -0
- package/bundled/locales/zh-CN/skills/forward-derivation/guide.md +130 -0
- package/bundled/locales/zh-CN/skills/{claude-code/git-workflow-guide → git-workflow-guide}/SKILL.md +6 -6
- package/bundled/locales/zh-CN/skills/{claude-code/git-workflow-guide → git-workflow-guide}/branch-naming.md +3 -3
- package/bundled/locales/zh-CN/skills/{claude-code/git-workflow-guide → git-workflow-guide}/git-workflow.md +4 -4
- package/bundled/locales/zh-CN/skills/{claude-code/logging-guide → logging-guide}/SKILL.md +6 -6
- package/bundled/locales/zh-CN/skills/methodology-system/SKILL.md +78 -0
- package/bundled/locales/zh-CN/skills/{claude-code/methodology-system → methodology-system}/create-methodology.md +2 -2
- package/bundled/locales/zh-CN/skills/{claude-code/methodology-system/SKILL.md → methodology-system/guide.md} +2 -2
- package/bundled/locales/zh-CN/skills/{claude-code/methodology-system → methodology-system}/runtime.md +3 -3
- package/bundled/locales/zh-CN/skills/project-discovery/SKILL.md +66 -0
- package/bundled/locales/zh-CN/skills/project-discovery/guide.md +371 -0
- package/bundled/locales/zh-CN/skills/{claude-code/project-structure-guide → project-structure-guide}/SKILL.md +4 -4
- package/bundled/locales/zh-CN/skills/{claude-code/project-structure-guide → project-structure-guide}/language-patterns.md +1 -1
- package/bundled/locales/zh-CN/skills/refactoring-assistant/SKILL.md +67 -0
- package/bundled/locales/zh-CN/skills/{claude-code/refactoring-assistant/SKILL.md → refactoring-assistant/guide.md} +7 -8
- package/bundled/locales/zh-CN/skills/release-standards/SKILL.md +64 -0
- package/bundled/locales/zh-CN/skills/{claude-code/release-standards → release-standards}/changelog-format.md +3 -3
- package/bundled/locales/zh-CN/skills/{claude-code/release-standards/SKILL.md → release-standards/guide.md} +5 -6
- package/bundled/locales/zh-CN/skills/{claude-code/release-standards → release-standards}/release-workflow.md +7 -7
- package/bundled/locales/zh-CN/skills/{claude-code/release-standards → release-standards}/semantic-versioning.md +3 -3
- package/bundled/locales/zh-CN/skills/requirement-assistant/SKILL.md +67 -0
- package/bundled/locales/zh-CN/skills/{claude-code/requirement-assistant/SKILL.md → requirement-assistant/guide.md} +4 -5
- package/bundled/locales/zh-CN/skills/{claude-code/requirement-assistant → requirement-assistant}/requirement-checklist.md +3 -3
- package/bundled/locales/zh-CN/skills/{claude-code/requirement-assistant → requirement-assistant}/requirement-writing.md +3 -3
- package/bundled/locales/zh-CN/skills/reverse-engineer/SKILL.md +67 -0
- package/bundled/locales/zh-CN/skills/{claude-code/reverse-engineer → reverse-engineer}/bdd-extraction.md +2 -2
- package/bundled/locales/zh-CN/skills/{claude-code/reverse-engineer/SKILL.md → reverse-engineer/guide.md} +17 -18
- package/bundled/locales/zh-CN/skills/{claude-code/reverse-engineer → reverse-engineer}/tdd-analysis.md +2 -2
- package/bundled/locales/zh-CN/skills/{claude-code/reverse-engineer → reverse-engineer}/workflow.md +3 -3
- package/bundled/locales/zh-CN/skills/spec-driven-dev/SKILL.md +75 -0
- package/bundled/locales/zh-CN/skills/{claude-code/spec-driven-dev/SKILL.md → spec-driven-dev/guide.md} +10 -11
- package/bundled/locales/zh-CN/skills/tdd-assistant/SKILL.md +66 -0
- package/bundled/locales/zh-CN/skills/{claude-code/tdd-assistant/SKILL.md → tdd-assistant/guide.md} +12 -16
- package/bundled/locales/zh-CN/skills/{claude-code/tdd-assistant → tdd-assistant}/language-examples.md +3 -3
- package/bundled/locales/zh-CN/skills/{claude-code/tdd-assistant → tdd-assistant}/tdd-workflow.md +3 -3
- package/bundled/locales/zh-CN/skills/test-coverage-assistant/SKILL.md +65 -0
- package/bundled/locales/zh-CN/skills/test-coverage-assistant/guide.md +284 -0
- package/bundled/locales/zh-CN/skills/{claude-code/testing-guide → testing-guide}/SKILL.md +8 -8
- package/bundled/locales/zh-CN/skills/{claude-code/testing-guide → testing-guide}/testing-pyramid.md +4 -4
- package/bundled/locales/zh-CN/skills/{cline → tools/cline}/README.md +1 -1
- package/bundled/locales/zh-CN/skills/{copilot → tools/copilot}/README.md +1 -1
- package/bundled/locales/zh-CN/skills/{copilot → tools/copilot}/copilot-instructions.md +1 -1
- package/bundled/locales/zh-CN/skills/{cursor → tools/cursor}/README.md +1 -1
- package/bundled/locales/zh-CN/skills/{windsurf → tools/windsurf}/README.md +1 -1
- package/bundled/locales/zh-TW/CHANGELOG.md +16 -16
- package/bundled/locales/zh-TW/CLAUDE.md +3 -3
- package/bundled/locales/zh-TW/MAINTENANCE.md +7 -7
- package/bundled/locales/zh-TW/README.md +13 -7
- package/bundled/locales/zh-TW/STANDARDS-MAPPING.md +1 -1
- package/bundled/locales/zh-TW/adoption/ADOPTION-GUIDE.md +4 -4
- package/bundled/locales/zh-TW/adoption/DAILY-WORKFLOW-GUIDE.md +66 -7
- package/bundled/locales/zh-TW/adoption/STATIC-DYNAMIC-GUIDE.md +22 -22
- package/bundled/locales/zh-TW/adoption/checklists/enterprise.md +5 -5
- package/bundled/locales/zh-TW/adoption/checklists/minimal.md +4 -4
- package/bundled/locales/zh-TW/adoption/checklists/recommended.md +5 -5
- package/bundled/locales/zh-TW/ai/MAINTENANCE.md +13 -13
- package/bundled/locales/zh-TW/ai/standards/anti-hallucination.ai.yaml +3 -2
- package/bundled/locales/zh-TW/ai/standards/git-workflow.ai.yaml +4 -3
- package/bundled/locales/zh-TW/ai/standards/spec-driven-development.ai.yaml +3 -3
- package/bundled/locales/zh-TW/ai/standards/testing.ai.yaml +1 -0
- package/bundled/locales/zh-TW/core/ai-instruction-standards.md +1 -1
- package/bundled/locales/zh-TW/core/anti-hallucination.md +38 -701
- package/bundled/locales/zh-TW/core/changelog-standards.md +1 -1
- package/bundled/locales/zh-TW/core/checkin-standards.md +18 -5
- package/bundled/locales/zh-TW/core/code-review-checklist.md +1 -1
- package/bundled/locales/zh-TW/core/commit-message-guide.md +1 -1
- package/bundled/locales/zh-TW/core/developer-memory.md +576 -0
- package/bundled/locales/zh-TW/core/documentation-structure.md +115 -22
- package/bundled/locales/zh-TW/core/documentation-writing-standards.md +126 -5
- package/bundled/locales/zh-TW/core/forward-derivation-standards.md +2 -2
- package/bundled/locales/zh-TW/core/git-workflow.md +38 -812
- package/bundled/locales/zh-TW/core/guides/anti-hallucination-guide.md +779 -0
- package/bundled/locales/zh-TW/core/guides/git-workflow-guide.md +1016 -0
- package/bundled/locales/zh-TW/core/guides/refactoring-guide.md +864 -0
- package/bundled/locales/zh-TW/core/guides/testing-guide.md +2280 -0
- package/bundled/locales/zh-TW/core/logging-standards.md +159 -4
- package/bundled/locales/zh-TW/core/project-structure.md +102 -9
- package/bundled/locales/zh-TW/core/refactoring-standards.md +37 -823
- package/bundled/locales/zh-TW/core/reverse-engineering-standards.md +6 -6
- package/bundled/locales/zh-TW/core/spec-driven-development.md +17 -268
- package/bundled/locales/zh-TW/core/test-completeness-dimensions.md +128 -14
- package/bundled/locales/zh-TW/core/test-driven-development.md +20 -983
- package/bundled/locales/zh-TW/core/testing-standards.md +120 -2105
- package/bundled/locales/zh-TW/core/versioning.md +13 -55
- package/bundled/locales/zh-TW/docs/AI-AGENT-ROADMAP.md +90 -51
- package/bundled/locales/zh-TW/docs/CHEATSHEET.md +184 -0
- package/bundled/locales/zh-TW/docs/CLI-FLOW.md +239 -0
- package/bundled/locales/zh-TW/docs/FEATURE-REFERENCE.md +320 -0
- package/bundled/locales/zh-TW/docs/MIGRATION-V5.md +71 -0
- package/bundled/locales/zh-TW/docs/OPERATION-WORKFLOW.md +42 -42
- package/bundled/locales/zh-TW/docs/STANDARDS-REFERENCE.md +440 -0
- package/bundled/locales/zh-TW/docs/USAGE-MODES-COMPARISON.md +1 -1
- package/bundled/locales/zh-TW/docs/WINDOWS-GUIDE.md +1 -1
- package/bundled/locales/zh-TW/integrations/claude-code/README.md +44 -0
- package/bundled/locales/zh-TW/integrations/github-copilot/copilot-instructions.md +3 -3
- package/bundled/locales/zh-TW/integrations/github-copilot/skills-mapping.md +18 -6
- package/bundled/locales/zh-TW/integrations/opencode/skills-mapping.md +22 -10
- package/bundled/locales/zh-TW/methodologies/guides/sdd-guide.md +338 -0
- package/bundled/locales/zh-TW/methodologies/guides/tdd-guide.md +1055 -0
- package/bundled/locales/zh-TW/options/commit-message/bilingual.md +1 -1
- package/bundled/locales/zh-TW/options/commit-message/english.md +1 -1
- package/bundled/locales/zh-TW/options/commit-message/traditional-chinese.md +1 -1
- package/bundled/locales/zh-TW/options/git-workflow/gitflow.md +1 -1
- package/bundled/locales/zh-TW/options/git-workflow/github-flow.md +1 -1
- package/bundled/locales/zh-TW/options/git-workflow/merge-commit.md +1 -1
- package/bundled/locales/zh-TW/options/git-workflow/rebase-ff.md +1 -1
- package/bundled/locales/zh-TW/options/git-workflow/squash-merge.md +1 -1
- package/bundled/locales/zh-TW/options/git-workflow/trunk-based.md +1 -1
- package/bundled/locales/zh-TW/options/project-structure/dotnet.md +1 -1
- package/bundled/locales/zh-TW/options/project-structure/go.md +1 -1
- package/bundled/locales/zh-TW/options/project-structure/java.md +1 -1
- package/bundled/locales/zh-TW/options/project-structure/nodejs.md +1 -1
- package/bundled/locales/zh-TW/options/project-structure/python.md +1 -1
- package/bundled/locales/zh-TW/options/testing/e2e-testing.md +1 -1
- package/bundled/locales/zh-TW/options/testing/integration-testing.md +1 -1
- package/bundled/locales/zh-TW/options/testing/system-testing.md +1 -1
- package/bundled/locales/zh-TW/options/testing/unit-testing.md +1 -1
- package/bundled/locales/zh-TW/skills/{claude-code/CONTRIBUTING.template.md → CONTRIBUTING.template.md} +2 -2
- package/bundled/locales/zh-TW/skills/README.md +131 -79
- package/bundled/locales/zh-TW/skills/agents/README.md +281 -0
- package/bundled/locales/zh-TW/skills/{claude-code/ai-collaboration-standards → ai-collaboration-standards}/SKILL.md +7 -7
- package/bundled/locales/zh-TW/skills/{claude-code/ai-collaboration-standards → ai-collaboration-standards}/anti-hallucination.md +8 -8
- package/bundled/locales/zh-TW/skills/{claude-code/ai-collaboration-standards → ai-collaboration-standards}/certainty-labels.md +8 -8
- package/bundled/locales/zh-TW/skills/ai-friendly-architecture/SKILL.md +221 -0
- package/bundled/locales/zh-TW/skills/ai-instruction-standards/SKILL.md +214 -0
- package/bundled/locales/zh-TW/skills/atdd-assistant/SKILL.md +71 -0
- package/bundled/locales/zh-TW/skills/atdd-assistant/acceptance-criteria-guide.md +428 -0
- package/bundled/locales/zh-TW/skills/atdd-assistant/atdd-workflow.md +484 -0
- package/bundled/locales/zh-TW/skills/atdd-assistant/guide.md +368 -0
- package/bundled/locales/zh-TW/skills/bdd-assistant/SKILL.md +68 -0
- package/bundled/locales/zh-TW/skills/bdd-assistant/bdd-workflow.md +406 -0
- package/bundled/locales/zh-TW/skills/bdd-assistant/gherkin-guide.md +454 -0
- package/bundled/locales/zh-TW/skills/bdd-assistant/guide.md +324 -0
- package/bundled/locales/zh-TW/skills/changelog-guide/SKILL.md +64 -0
- package/bundled/locales/zh-TW/skills/{claude-code/changelog-guide/SKILL.md → changelog-guide/guide.md} +6 -7
- package/bundled/locales/zh-TW/skills/checkin-assistant/SKILL.md +56 -0
- package/bundled/locales/zh-TW/skills/{claude-code/checkin-assistant/SKILL.md → checkin-assistant/guide.md} +6 -7
- package/bundled/locales/zh-TW/skills/code-review-assistant/SKILL.md +56 -0
- package/bundled/locales/zh-TW/skills/{claude-code/code-review-assistant → code-review-assistant}/checkin-checklist.md +4 -4
- package/bundled/locales/zh-TW/skills/{claude-code/code-review-assistant/SKILL.md → code-review-assistant/guide.md} +2 -3
- package/bundled/locales/zh-TW/skills/{claude-code/code-review-assistant → code-review-assistant}/review-checklist.md +4 -4
- package/bundled/locales/zh-TW/skills/{claude-code/commands → commands}/bdd.md +2 -2
- package/bundled/locales/zh-TW/skills/{claude-code/commands → commands}/methodology.md +3 -3
- package/bundled/locales/zh-TW/skills/{claude-code/commands → commands}/refactor.md +3 -3
- package/bundled/locales/zh-TW/skills/commit-standards/SKILL.md +61 -0
- package/bundled/locales/zh-TW/skills/{claude-code/commit-standards → commit-standards}/conventional-commits.md +4 -4
- package/bundled/locales/zh-TW/skills/{claude-code/commit-standards/SKILL.md → commit-standards/guide.md} +5 -6
- package/bundled/locales/zh-TW/skills/{claude-code/commit-standards → commit-standards}/language-options.md +3 -3
- package/bundled/locales/zh-TW/skills/docs-generator/SKILL.md +59 -0
- package/bundled/locales/zh-TW/skills/docs-generator/guide.md +262 -0
- package/bundled/locales/zh-TW/skills/{claude-code/documentation-guide → documentation-guide}/SKILL.md +7 -8
- package/bundled/locales/zh-TW/skills/{claude-code/documentation-guide → documentation-guide}/documentation-structure.md +4 -4
- package/bundled/locales/zh-TW/skills/{claude-code/documentation-guide → documentation-guide}/readme-template.md +3 -3
- package/bundled/locales/zh-TW/skills/{claude-code/error-code-guide → error-code-guide}/SKILL.md +6 -6
- package/bundled/locales/zh-TW/skills/forward-derivation/SKILL.md +62 -0
- package/bundled/locales/zh-TW/skills/{claude-code/forward-derivation/SKILL.md → forward-derivation/guide.md} +24 -19
- package/bundled/locales/zh-TW/skills/{claude-code/git-workflow-guide → git-workflow-guide}/SKILL.md +3 -3
- package/bundled/locales/zh-TW/skills/{claude-code/git-workflow-guide → git-workflow-guide}/branch-naming.md +3 -3
- package/bundled/locales/zh-TW/skills/{claude-code/git-workflow-guide → git-workflow-guide}/git-workflow.md +4 -4
- package/bundled/locales/zh-TW/skills/{claude-code/logging-guide → logging-guide}/SKILL.md +6 -6
- package/bundled/locales/zh-TW/skills/methodology-system/SKILL.md +78 -0
- package/bundled/locales/zh-TW/skills/{claude-code/methodology-system → methodology-system}/create-methodology.md +2 -2
- package/bundled/locales/zh-TW/skills/{claude-code/methodology-system/SKILL.md → methodology-system/guide.md} +2 -2
- package/bundled/locales/zh-TW/skills/{claude-code/methodology-system → methodology-system}/runtime.md +3 -3
- package/bundled/locales/zh-TW/skills/project-discovery/SKILL.md +66 -0
- package/bundled/locales/zh-TW/skills/project-discovery/guide.md +371 -0
- package/bundled/locales/zh-TW/skills/project-discovery/workflow.md +574 -0
- package/bundled/locales/zh-TW/skills/{claude-code/project-structure-guide → project-structure-guide}/SKILL.md +4 -4
- package/bundled/locales/zh-TW/skills/{claude-code/project-structure-guide → project-structure-guide}/language-patterns.md +1 -1
- package/bundled/locales/zh-TW/skills/refactoring-assistant/SKILL.md +67 -0
- package/bundled/locales/zh-TW/skills/{claude-code/refactoring-assistant/SKILL.md → refactoring-assistant/guide.md} +7 -8
- package/bundled/locales/zh-TW/skills/release-standards/SKILL.md +64 -0
- package/bundled/locales/zh-TW/skills/{claude-code/release-standards → release-standards}/changelog-format.md +3 -3
- package/bundled/locales/zh-TW/skills/{claude-code/release-standards/SKILL.md → release-standards/guide.md} +2 -3
- package/bundled/locales/zh-TW/skills/{claude-code/release-standards → release-standards}/release-workflow.md +60 -28
- package/bundled/locales/zh-TW/skills/{claude-code/release-standards → release-standards}/semantic-versioning.md +3 -3
- package/bundled/locales/zh-TW/skills/requirement-assistant/SKILL.md +67 -0
- package/bundled/locales/zh-TW/skills/{claude-code/requirement-assistant/SKILL.md → requirement-assistant/guide.md} +2 -3
- package/bundled/locales/zh-TW/skills/{claude-code/requirement-assistant → requirement-assistant}/requirement-checklist.md +3 -3
- package/bundled/locales/zh-TW/skills/{claude-code/requirement-assistant → requirement-assistant}/requirement-writing.md +3 -3
- package/bundled/locales/zh-TW/skills/reverse-engineer/SKILL.md +67 -0
- package/bundled/locales/zh-TW/skills/{claude-code/reverse-engineer → reverse-engineer}/bdd-extraction.md +2 -2
- package/bundled/locales/zh-TW/skills/{claude-code/reverse-engineer/SKILL.md → reverse-engineer/guide.md} +17 -18
- package/bundled/locales/zh-TW/skills/{claude-code/reverse-engineer → reverse-engineer}/tdd-analysis.md +2 -2
- package/bundled/locales/zh-TW/skills/{claude-code/reverse-engineer → reverse-engineer}/workflow.md +3 -3
- package/bundled/locales/zh-TW/skills/spec-driven-dev/SKILL.md +75 -0
- package/bundled/locales/zh-TW/skills/{claude-code/spec-driven-dev/SKILL.md → spec-driven-dev/guide.md} +9 -10
- package/bundled/locales/zh-TW/skills/tdd-assistant/SKILL.md +66 -0
- package/bundled/locales/zh-TW/skills/{claude-code/tdd-assistant/SKILL.md → tdd-assistant/guide.md} +9 -10
- package/bundled/locales/zh-TW/skills/{claude-code/tdd-assistant → tdd-assistant}/language-examples.md +3 -3
- package/bundled/locales/zh-TW/skills/{claude-code/tdd-assistant → tdd-assistant}/tdd-workflow.md +3 -3
- package/bundled/locales/zh-TW/skills/test-coverage-assistant/SKILL.md +65 -0
- package/bundled/locales/zh-TW/skills/{claude-code/test-coverage-assistant/SKILL.md → test-coverage-assistant/guide.md} +27 -24
- package/bundled/locales/zh-TW/skills/{claude-code/testing-guide → testing-guide}/SKILL.md +6 -6
- package/bundled/locales/zh-TW/skills/{claude-code/testing-guide → testing-guide}/testing-pyramid.md +4 -4
- package/bundled/locales/zh-TW/skills/{cline → tools/cline}/README.md +1 -1
- package/bundled/locales/zh-TW/skills/{copilot → tools/copilot}/README.md +1 -1
- package/bundled/locales/zh-TW/skills/{copilot → tools/copilot}/copilot-instructions.md +1 -1
- package/bundled/locales/zh-TW/skills/{cursor → tools/cursor}/README.md +1 -1
- package/bundled/locales/zh-TW/skills/{windsurf → tools/windsurf}/README.md +1 -1
- package/bundled/skills/INTEGRATION-GUIDE.md +210 -0
- package/bundled/skills/README.md +95 -0
- package/bundled/skills/_shared/README.md +60 -0
- package/bundled/skills/{claude-code/agents → agents}/README.md +2 -2
- package/bundled/skills/{claude-code/agents → agents}/code-architect.md +1 -1
- package/bundled/skills/{claude-code/agents → agents}/doc-writer.md +1 -1
- package/bundled/skills/{claude-code/agents → agents}/reviewer.md +1 -1
- package/bundled/skills/{claude-code/agents → agents}/spec-analyst.md +1 -1
- package/bundled/skills/{claude-code/agents → agents}/test-specialist.md +1 -1
- package/bundled/skills/{claude-code/ai-collaboration-standards → ai-collaboration-standards}/SKILL.md +28 -5
- package/bundled/skills/{claude-code/ai-collaboration-standards → ai-collaboration-standards}/anti-hallucination.md +24 -5
- package/bundled/skills/{claude-code/ai-collaboration-standards → ai-collaboration-standards}/certainty-labels.md +31 -6
- package/bundled/skills/ai-friendly-architecture/SKILL.md +216 -0
- package/bundled/skills/ai-instruction-standards/SKILL.md +209 -0
- package/bundled/skills/atdd-assistant/SKILL.md +74 -0
- package/bundled/skills/{claude-code/atdd-assistant → atdd-assistant}/acceptance-criteria-guide.md +1 -1
- package/bundled/skills/{claude-code/atdd-assistant → atdd-assistant}/atdd-workflow.md +1 -1
- package/bundled/skills/{claude-code/atdd-assistant/SKILL.md → atdd-assistant/guide.md} +11 -11
- package/bundled/skills/bdd-assistant/SKILL.md +70 -0
- package/bundled/skills/{claude-code/bdd-assistant → bdd-assistant}/bdd-workflow.md +1 -1
- package/bundled/skills/{claude-code/bdd-assistant → bdd-assistant}/gherkin-guide.md +1 -1
- package/bundled/skills/{claude-code/bdd-assistant/SKILL.md → bdd-assistant/guide.md} +11 -11
- package/bundled/skills/changelog-guide/SKILL.md +66 -0
- package/bundled/skills/{claude-code/changelog-guide/SKILL.md → changelog-guide/guide.md} +8 -6
- package/bundled/skills/checkin-assistant/SKILL.md +52 -0
- package/bundled/skills/{claude-code/checkin-assistant/SKILL.md → checkin-assistant/guide.md} +6 -6
- package/bundled/skills/code-review-assistant/SKILL.md +53 -0
- package/bundled/skills/{claude-code/code-review-assistant → code-review-assistant}/checkin-checklist.md +3 -3
- package/bundled/skills/{claude-code/code-review-assistant/SKILL.md → code-review-assistant/guide.md} +7 -5
- package/bundled/skills/{claude-code/code-review-assistant → code-review-assistant}/review-checklist.md +3 -3
- package/bundled/skills/commands/COMMAND-FAMILY-OVERVIEW.md +290 -0
- package/bundled/skills/{claude-code/commands → commands}/README.md +13 -3
- package/bundled/skills/{claude-code/commands → commands}/atdd.md +3 -3
- package/bundled/skills/{claude-code/commands → commands}/bdd.md +2 -2
- package/bundled/skills/commands/changelog.md +58 -0
- package/bundled/skills/{claude-code/commands → commands}/check.md +1 -1
- package/bundled/skills/commands/checkin.md +53 -0
- package/bundled/skills/{claude-code/commands → commands}/commit.md +3 -3
- package/bundled/skills/{claude-code/commands → commands}/config.md +1 -1
- package/bundled/skills/{claude-code/commands → commands}/coverage.md +5 -4
- package/bundled/skills/commands/derive-all.md +53 -0
- package/bundled/skills/commands/derive-atdd.md +49 -0
- package/bundled/skills/commands/derive-bdd.md +47 -0
- package/bundled/skills/commands/derive-tdd.md +48 -0
- package/bundled/skills/commands/derive.md +72 -0
- package/bundled/skills/commands/discover.md +80 -0
- package/bundled/skills/commands/docgen.md +61 -0
- package/bundled/skills/commands/docs.md +59 -0
- package/bundled/skills/commands/guide.md +44 -0
- package/bundled/skills/{claude-code/commands → commands}/init.md +2 -2
- package/bundled/skills/{claude-code/commands → commands}/methodology.md +32 -16
- package/bundled/skills/{claude-code/commands → commands}/refactor.md +2 -2
- package/bundled/skills/commands/release.md +56 -0
- package/bundled/skills/{claude-code/commands → commands}/requirement.md +3 -3
- package/bundled/skills/commands/reverse-bdd.md +47 -0
- package/bundled/skills/commands/reverse-sdd.md +51 -0
- package/bundled/skills/commands/reverse-tdd.md +51 -0
- package/bundled/skills/commands/reverse.md +63 -0
- package/bundled/skills/{claude-code/commands → commands}/review.md +3 -3
- package/bundled/skills/commands/sdd.md +135 -0
- package/bundled/skills/{claude-code/commands → commands}/tdd.md +3 -3
- package/bundled/skills/{claude-code/commands → commands}/update.md +2 -2
- package/bundled/skills/commit-standards/SKILL.md +60 -0
- package/bundled/skills/{claude-code/commit-standards → commit-standards}/conventional-commits.md +3 -3
- package/bundled/skills/{claude-code/commit-standards/SKILL.md → commit-standards/guide.md} +17 -5
- package/bundled/skills/{claude-code/commit-standards → commit-standards}/language-options.md +2 -2
- package/bundled/skills/docs-generator/SKILL.md +69 -0
- package/bundled/skills/docs-generator/guide.md +258 -0
- package/bundled/skills/{claude-code/documentation-guide → documentation-guide}/SKILL.md +7 -7
- package/bundled/skills/{claude-code/documentation-guide → documentation-guide}/documentation-structure.md +3 -3
- package/bundled/skills/{claude-code/documentation-guide → documentation-guide}/readme-template.md +2 -2
- package/bundled/skills/{claude-code/error-code-guide → error-code-guide}/SKILL.md +7 -5
- package/bundled/skills/forward-derivation/SKILL.md +61 -0
- package/bundled/skills/{claude-code/forward-derivation/SKILL.md → forward-derivation/guide.md} +44 -29
- package/bundled/skills/{claude-code/git-workflow-guide → git-workflow-guide}/SKILL.md +7 -5
- package/bundled/skills/{claude-code/git-workflow-guide → git-workflow-guide}/branch-naming.md +2 -2
- package/bundled/skills/{claude-code/git-workflow-guide → git-workflow-guide}/git-workflow.md +3 -3
- package/bundled/skills/{claude-code/logging-guide → logging-guide}/SKILL.md +7 -5
- package/bundled/skills/methodology-system/SKILL.md +75 -0
- package/bundled/skills/{claude-code/methodology-system → methodology-system}/create-methodology.md +1 -1
- package/bundled/skills/{claude-code/methodology-system/SKILL.md → methodology-system/guide.md} +51 -16
- package/bundled/skills/methodology-system/integrated-flow.md +454 -0
- package/bundled/skills/{claude-code/methodology-system → methodology-system}/runtime.md +2 -2
- package/bundled/skills/project-discovery/SKILL.md +63 -0
- package/bundled/skills/project-discovery/guide.md +367 -0
- package/bundled/skills/project-discovery/workflow.md +566 -0
- package/bundled/skills/{claude-code/project-structure-guide → project-structure-guide}/SKILL.md +14 -4
- package/bundled/skills/refactoring-assistant/SKILL.md +78 -0
- package/bundled/skills/{claude-code/refactoring-assistant/SKILL.md → refactoring-assistant/guide.md} +7 -7
- package/bundled/skills/release-standards/SKILL.md +61 -0
- package/bundled/skills/{claude-code/release-standards → release-standards}/changelog-format.md +2 -2
- package/bundled/skills/{claude-code/release-standards/SKILL.md → release-standards/guide.md} +7 -5
- package/bundled/skills/{claude-code/release-standards → release-standards}/release-workflow.md +59 -24
- package/bundled/skills/{claude-code/release-standards → release-standards}/semantic-versioning.md +2 -2
- package/bundled/skills/requirement-assistant/SKILL.md +66 -0
- package/bundled/skills/{claude-code/requirement-assistant/SKILL.md → requirement-assistant/guide.md} +14 -6
- package/bundled/skills/{claude-code/requirement-assistant → requirement-assistant}/requirement-checklist.md +2 -2
- package/bundled/skills/{claude-code/requirement-assistant → requirement-assistant}/requirement-writing.md +2 -2
- package/bundled/skills/reverse-engineer/SKILL.md +64 -0
- package/bundled/skills/{claude-code/reverse-engineer → reverse-engineer}/bdd-extraction.md +1 -1
- package/bundled/skills/{claude-code/reverse-engineer/SKILL.md → reverse-engineer/guide.md} +21 -18
- package/bundled/skills/{claude-code/reverse-engineer → reverse-engineer}/tdd-analysis.md +1 -1
- package/bundled/skills/{claude-code/reverse-engineer → reverse-engineer}/workflow.md +2 -2
- package/bundled/skills/spec-driven-dev/SKILL.md +80 -0
- package/bundled/skills/{claude-code/spec-driven-dev/SKILL.md → spec-driven-dev/guide.md} +50 -8
- package/bundled/skills/tdd-assistant/SKILL.md +65 -0
- package/bundled/skills/{claude-code/tdd-assistant/SKILL.md → tdd-assistant/guide.md} +10 -10
- package/bundled/skills/{claude-code/tdd-assistant → tdd-assistant}/language-examples.md +3 -3
- package/bundled/skills/{claude-code/tdd-assistant → tdd-assistant}/tdd-workflow.md +2 -2
- package/bundled/skills/test-coverage-assistant/SKILL.md +63 -0
- package/bundled/skills/{claude-code/test-coverage-assistant/SKILL.md → test-coverage-assistant/guide.md} +39 -24
- package/bundled/skills/{claude-code/testing-guide → testing-guide}/SKILL.md +12 -7
- package/bundled/skills/{claude-code/testing-guide → testing-guide}/testing-pyramid.md +3 -3
- package/bundled/skills/testing-guide/testing-theory.md +2291 -0
- package/bundled/skills/tools/cline/.clinerules +79 -0
- package/bundled/skills/tools/cline/README.md +50 -0
- package/bundled/skills/tools/copilot/README.md +99 -0
- package/bundled/skills/tools/copilot/copilot-instructions.md +71 -0
- package/bundled/skills/tools/cursor/.cursorrules +101 -0
- package/bundled/skills/tools/cursor/README.md +50 -0
- package/bundled/skills/tools/windsurf/.windsurfrules +76 -0
- package/bundled/skills/tools/windsurf/README.md +51 -0
- package/bundled/skills/{claude-code/workflows → workflows}/README.md +1 -1
- package/bundled/skills/workflows/release.workflow.yaml +893 -0
- package/package.json +4 -1
- package/src/commands/check.js +195 -130
- package/src/commands/config.js +1262 -0
- package/src/commands/configure.js +3 -950
- package/src/commands/fix.js +53 -0
- package/src/commands/hitl.js +19 -0
- package/src/commands/init.js +320 -1030
- package/src/commands/list.js +1 -1
- package/src/commands/simulate.js +61 -0
- package/src/commands/spec.js +288 -0
- package/src/commands/start.js +373 -0
- package/src/commands/sweep.js +142 -0
- package/src/commands/update.js +136 -19
- package/src/commands/workflow.js +265 -1
- package/src/config/ai-agent-paths.js +89 -29
- package/src/core/constants.js +7 -1
- package/src/core/manifest.js +1 -0
- package/src/flows/init-flow.js +243 -0
- package/src/hitl/checkpoint.js +80 -0
- package/src/hitl/classifier.js +54 -0
- package/src/hitl/manager.js +88 -0
- package/src/i18n/messages.js +907 -99
- package/src/index.js +1 -0
- package/src/installers/integration-installer.js +237 -0
- package/src/installers/manifest-installer.js +131 -0
- package/src/installers/skills-installer.js +286 -0
- package/src/installers/standards-installer.js +193 -0
- package/src/missions/MissionManager.js +501 -0
- package/src/prompts/init.js +228 -130
- package/src/prompts/integrations.js +13 -1
- package/src/schemas/standard.schema.json +117 -0
- package/src/utils/agents-installer.js +2 -2
- package/src/utils/config-loader.js +47 -0
- package/src/utils/config-manager.js +108 -0
- package/src/utils/config-merger.js +47 -0
- package/src/utils/github.js +22 -18
- package/src/utils/inquirer-patch.js +98 -0
- package/src/utils/integration-generator.js +392 -58
- package/src/utils/reference-sync.js +69 -19
- package/src/utils/skills-installer.js +6 -3
- package/src/utils/standard-fixer.js +141 -0
- package/src/utils/standard-validator.js +329 -0
- package/src/utils/workflow-executor.js +886 -0
- package/src/utils/workflow-state.js +404 -0
- package/src/utils/workflows-installer.js +2 -2
- package/src/vibe/auto-sweep.js +349 -0
- package/src/vibe/micro-spec.js +428 -0
- package/standards-registry.json +278 -102
- package/bundled/locales/zh-CN/skills/claude-code/README.md +0 -174
- package/bundled/locales/zh-CN/skills/claude-code/test-coverage-assistant/SKILL.md +0 -282
- package/bundled/locales/zh-TW/skills/claude-code/README.md +0 -174
- package/bundled/skills/claude-code/README.md +0 -215
- package/bundled/skills/claude-code/commands/changelog.md +0 -57
- package/bundled/skills/claude-code/commands/derive-all.md +0 -214
- package/bundled/skills/claude-code/commands/derive-atdd.md +0 -177
- package/bundled/skills/claude-code/commands/derive-bdd.md +0 -158
- package/bundled/skills/claude-code/commands/derive-tdd.md +0 -259
- package/bundled/skills/claude-code/commands/docs.md +0 -75
- package/bundled/skills/claude-code/commands/release.md +0 -50
- package/bundled/skills/claude-code/commands/reverse-bdd.md +0 -264
- package/bundled/skills/claude-code/commands/reverse-spec.md +0 -185
- package/bundled/skills/claude-code/commands/reverse-tdd.md +0 -351
- package/bundled/skills/claude-code/commands/spec.md +0 -69
- package/bundled/skills/claude-code/methodology-system/integrated-flow.md +0 -322
- /package/bundled/skills/{claude-code/CONTRIBUTING.template.md → CONTRIBUTING.template.md} +0 -0
- /package/bundled/skills/{claude-code/ai → ai}/standards/checkin.ai.yaml +0 -0
- /package/bundled/skills/{claude-code/ai → ai}/standards/commit.ai.yaml +0 -0
- /package/bundled/skills/{claude-code/ai → ai}/standards/refactoring.ai.yaml +0 -0
- /package/bundled/skills/{claude-code/ai → ai}/standards/testing.ai.yaml +0 -0
- /package/bundled/skills/{claude-code/project-structure-guide → project-structure-guide}/language-patterns.md +0 -0
- /package/bundled/skills/{claude-code/workflows → workflows}/code-review.workflow.yaml +0 -0
- /package/bundled/skills/{claude-code/workflows → workflows}/feature-dev.workflow.yaml +0 -0
- /package/bundled/skills/{claude-code/workflows → workflows}/integrated-flow.workflow.yaml +0 -0
- /package/bundled/skills/{claude-code/workflows → workflows}/large-codebase-analysis.workflow.yaml +0 -0
|
@@ -213,10 +213,10 @@ describe('Authentication', () => {
|
|
|
213
213
|
|
|
214
214
|
### 技能参考
|
|
215
215
|
|
|
216
|
-
- [反向工程技能](../../../skills/
|
|
217
|
-
- [规格驱动开发技能](../../../skills/
|
|
218
|
-
- [BDD 助手技能](../../../skills/
|
|
219
|
-
- [TDD 助手技能](../../../skills/
|
|
216
|
+
- [反向工程技能](../../../skills/reverse-engineer/SKILL.md) - 详细工作流程实作
|
|
217
|
+
- [规格驱动开发技能](../../../skills/spec-driven-dev/SKILL.md) - SDD 整合
|
|
218
|
+
- [BDD 助手技能](../../../skills/bdd-assistant/SKILL.md) - Gherkin 撰写
|
|
219
|
+
- [TDD 助手技能](../../../skills/tdd-assistant/SKILL.md) - 测试覆盖分析
|
|
220
220
|
|
|
221
221
|
---
|
|
222
222
|
|
|
@@ -224,9 +224,9 @@ describe('Authentication', () => {
|
|
|
224
224
|
|
|
225
225
|
- [反幻觉指南](anti-hallucination.md) - 基于证据的分析要求
|
|
226
226
|
- [规格驱动开发](spec-driven-development.md) - 规格工作流程
|
|
227
|
-
- [行为驱动开发](behavior-driven-development.md) - Given-When-Then 情境
|
|
227
|
+
- [行为驱动开发](../../../core/behavior-driven-development.md) - Given-When-Then 情境
|
|
228
228
|
- [测试驱动开发](test-driven-development.md) - 红-绿-重构循环
|
|
229
|
-
- [验收测试驱动开发](acceptance-test-driven-development.md) - 验收条件
|
|
229
|
+
- [验收测试驱动开发](../../../core/acceptance-test-driven-development.md) - 验收条件
|
|
230
230
|
- [程序码审查清单](code-review-checklist.md) - 审查指南
|
|
231
231
|
|
|
232
232
|
---
|
|
@@ -1,29 +1,212 @@
|
|
|
1
1
|
---
|
|
2
2
|
source: ../../../core/spec-driven-development.md
|
|
3
|
-
source_version: 1.
|
|
4
|
-
translation_version: 1.
|
|
5
|
-
last_synced: 2026-01-
|
|
3
|
+
source_version: 2.1.0
|
|
4
|
+
translation_version: 2.1.0
|
|
5
|
+
last_synced: 2026-01-26
|
|
6
6
|
status: current
|
|
7
7
|
---
|
|
8
8
|
|
|
9
9
|
# 规格驱动开发 (SDD) 标准
|
|
10
10
|
|
|
11
|
-
**版本**: 1.
|
|
12
|
-
**最后更新**: 2026-01-
|
|
13
|
-
**适用范围**:
|
|
11
|
+
**版本**: 2.1.0
|
|
12
|
+
**最后更新**: 2026-01-26
|
|
13
|
+
**适用范围**: 所有采用规格驱动开发的项目
|
|
14
|
+
**范围**: universal
|
|
14
15
|
|
|
15
|
-
> **语言**: [English](../../../core/spec-driven-development.md) | [
|
|
16
|
+
> **语言**: [English](../../../core/spec-driven-development.md) | [繁體中文](../../zh-TW/core/spec-driven-development.md)
|
|
16
17
|
|
|
17
18
|
---
|
|
18
19
|
|
|
19
20
|
## 目的
|
|
20
21
|
|
|
21
|
-
本标准定义规格驱动开发 (SDD)
|
|
22
|
+
本标准定义规格驱动开发 (SDD) 的原则与工作流程,确保变更在实施前已经过规划、记录并透过规格核准。
|
|
22
23
|
|
|
23
|
-
|
|
24
|
-
-
|
|
24
|
+
**关键效益**:
|
|
25
|
+
- 减少利益相关者与开发者之间的沟通误解
|
|
25
26
|
- 为所有变更提供清晰的审计轨迹
|
|
26
|
-
-
|
|
27
|
+
- 新团队成员更容易上手
|
|
28
|
+
|
|
29
|
+
---
|
|
30
|
+
|
|
31
|
+
## SDD 作为独立方法论
|
|
32
|
+
|
|
33
|
+
SDD (Spec-Driven Development, 2025) 是 AI 时代的方法论,区别于传统的 TDD/BDD/ATDD 家族。它源于 AI 辅助开发工具的日益普及和现代软件工程对规格优先方法的需求。
|
|
34
|
+
|
|
35
|
+
### 历史背景
|
|
36
|
+
|
|
37
|
+
| 方法论家族 | 时代 | 核心文献 | 关系 |
|
|
38
|
+
|-----------|-----|---------|------|
|
|
39
|
+
| **TDD/BDD/ATDD** | 1999-2011 | GOOS (Freeman & Pryce), Dan North, Gojko Adzic | 传统测试驱动开发家族 |
|
|
40
|
+
| **SDD (2025)** | 2025+ | Thoughtworks, GitHub spec-kit, Martin Fowler | AI 时代新兴概念,独立于传统家族 |
|
|
41
|
+
|
|
42
|
+
### 与测试方法论的关系
|
|
43
|
+
|
|
44
|
+
SDD **不是** "ATDD → BDD → TDD" 序列的一部分。相反,它通过正向推导生成测试工件,但仍然是一个独立的方法论。
|
|
45
|
+
|
|
46
|
+
| 方法论 | 起源 | 关注点 | SDD 集成 |
|
|
47
|
+
|--------|------|-------|---------|
|
|
48
|
+
| **TDD** | 1999, Kent Beck | 代码级测试 | 可在 SDD 实施阶段使用 |
|
|
49
|
+
| **BDD** | 2006, Dan North | 行为场景 | 正向推导生成 .feature 文件 |
|
|
50
|
+
| **ATDD** | 2003-2006, GOOS | 协作验收 | 可选的 AC 定义输入方法 |
|
|
51
|
+
|
|
52
|
+
### 关键区别
|
|
53
|
+
|
|
54
|
+
```
|
|
55
|
+
┌─────────────────────────────────────────────────────────────────────────────┐
|
|
56
|
+
│ 两个独立方法论系统 │
|
|
57
|
+
├─────────────────────────────────────────────────────────────────────────────┤
|
|
58
|
+
│ │
|
|
59
|
+
│ ┌─────────────────────────────────────┐ │
|
|
60
|
+
│ │ SDD (AI 时代方法论) │ │
|
|
61
|
+
│ │ │ │
|
|
62
|
+
│ │ 需求 → SPEC.md → 正向推导 → 测试 │ │
|
|
63
|
+
│ │ │ │
|
|
64
|
+
│ │ • 规格是权威来源 │ │
|
|
65
|
+
│ │ • AI 辅助代码生成 │ │
|
|
66
|
+
│ │ • 正向推导生成测试结构 │ │
|
|
67
|
+
│ └─────────────────────────────────────┘ │
|
|
68
|
+
│ │
|
|
69
|
+
│ ┌─────────────────────────────────────┐ │
|
|
70
|
+
│ │ 双循环 TDD (传统) │ │
|
|
71
|
+
│ │ │ │
|
|
72
|
+
│ │ BDD (外层循环) → TDD (内层循环) │ │
|
|
73
|
+
│ │ │ │
|
|
74
|
+
│ │ • 测试驱动设计 │ │
|
|
75
|
+
│ │ • 手动开发 │ │
|
|
76
|
+
│ │ • ATDD 是可选协作输入,不是顺序步骤 │ │
|
|
77
|
+
│ └─────────────────────────────────────┘ │
|
|
78
|
+
│ │
|
|
79
|
+
└─────────────────────────────────────────────────────────────────────────────┘
|
|
80
|
+
```
|
|
81
|
+
|
|
82
|
+
---
|
|
83
|
+
|
|
84
|
+
## SDD 成熟度级别
|
|
85
|
+
|
|
86
|
+
基于 Martin Fowler 对 SDD 工具的分析 (2025),团队可以在不同的成熟度级别运作:
|
|
87
|
+
|
|
88
|
+
| 级别 | 名称 | 描述 | 人类角色 |
|
|
89
|
+
|-------|------|------|---------|
|
|
90
|
+
| 1 | **规格优先** | 编写规格,完成后丢弃 | 编辑规格和代码 |
|
|
91
|
+
| 2 | **规格锚定** | 在整个演进过程中维护规格 | 编辑规格,AI 协助代码 |
|
|
92
|
+
| 3 | **规格即源** | 规格是唯一来源,代码自动生成 | 只编辑规格,从不接触代码 |
|
|
93
|
+
|
|
94
|
+
### 级别特征
|
|
95
|
+
|
|
96
|
+
**级别 1: 规格优先**
|
|
97
|
+
- 在实施前编写规格
|
|
98
|
+
- 规格可能在功能完成后丢弃
|
|
99
|
+
- 代码仍然是权威来源
|
|
100
|
+
- 2025 年最常见
|
|
101
|
+
|
|
102
|
+
**级别 2: 规格锚定**
|
|
103
|
+
- 在整个生命周期中维护规格
|
|
104
|
+
- 规格用于演进和维护
|
|
105
|
+
- AI 基于规格更新协助代码变更
|
|
106
|
+
- 在企业环境中日益普及
|
|
107
|
+
|
|
108
|
+
**级别 3: 规格即源**
|
|
109
|
+
- 规格是唯一的事实来源
|
|
110
|
+
- 代码标记为"已生成 - 请勿编辑"
|
|
111
|
+
- 任何变更都需要先修改规格
|
|
112
|
+
- 2025 年仍处于实验阶段
|
|
113
|
+
|
|
114
|
+
### 参考资料
|
|
115
|
+
|
|
116
|
+
- [Thoughtworks: Spec-Driven Development](https://www.thoughtworks.com/en-us/insights/blog/agile-engineering-practices/spec-driven-development-unpacking-2025-new-engineering-practices)
|
|
117
|
+
- [Martin Fowler: SDD Tools (Kiro, spec-kit, Tessl)](https://martinfowler.com/articles/exploring-gen-ai/sdd-3-tools.html)
|
|
118
|
+
- [GitHub spec-kit](https://github.com/github/spec-kit/blob/main/spec-driven.md)
|
|
119
|
+
|
|
120
|
+
---
|
|
121
|
+
|
|
122
|
+
## 常见陷阱
|
|
123
|
+
|
|
124
|
+
采用 SDD 时避免这些常见陷阱:
|
|
125
|
+
|
|
126
|
+
| 陷阱 | 问题 | 缓解措施 |
|
|
127
|
+
|------|------|---------|
|
|
128
|
+
| **过度形式化** | 像瀑布开发一样减缓反馈 | 保持迭代,使用短周期 |
|
|
129
|
+
| **规格漂移** | 规格和代码变得不同步 | 持续验证,CI/CD 中的漂移检测 |
|
|
130
|
+
| **AI 幻觉** | AI 生成不匹配规格的代码 | 强健验证,合约测试 |
|
|
131
|
+
| **规模不匹配** | 为小错误使用重型工作流 | 基于复杂性选择适当流程 |
|
|
132
|
+
| **过早优化** | 跳到规格即源 (级别 3) | 从规格优先开始,逐步演进 |
|
|
133
|
+
|
|
134
|
+
### 何时不使用完整 SDD
|
|
135
|
+
|
|
136
|
+
| 场景 | 建议 |
|
|
137
|
+
|------|------|
|
|
138
|
+
| 关键热修复 | 先修复,后记录文档 |
|
|
139
|
+
| 错别字和格式 | 直接提交,无需规格 |
|
|
140
|
+
| 探索性原型 | 跳过正式规格,快速迭代 |
|
|
141
|
+
| 小错误修复 (< 30 分钟) | 仅轻量级跟踪 |
|
|
142
|
+
|
|
143
|
+
---
|
|
144
|
+
|
|
145
|
+
## 变更评估 (SDD 前评估)
|
|
146
|
+
|
|
147
|
+
在开始 SDD 工作流程之前,评估变更的性质和范围。这可以防止过度工程化并确保变更被适当路由。
|
|
148
|
+
|
|
149
|
+
### 评估决策树
|
|
150
|
+
|
|
151
|
+
```
|
|
152
|
+
新需求/变更
|
|
153
|
+
│
|
|
154
|
+
▼
|
|
155
|
+
┌─────────────────────────────────────────────────────────┐
|
|
156
|
+
│ Q1: 这个变更的适用范围是什么? │
|
|
157
|
+
├─────────────────────────────────────────────────────────┤
|
|
158
|
+
│ A) 仅限项目特定内部使用 │
|
|
159
|
+
│ → 添加到 CLAUDE.md 或项目配置 │
|
|
160
|
+
│ → 无需核心标准 │
|
|
161
|
+
│ │
|
|
162
|
+
│ B) 可重用于其他项目的规则 │
|
|
163
|
+
│ → 创建核心标准 │
|
|
164
|
+
│ → 评估是否需要技能/命令 │
|
|
165
|
+
└─────────────────────────────────────────────────────────┘
|
|
166
|
+
│
|
|
167
|
+
▼
|
|
168
|
+
┌─────────────────────────────────────────────────────────┐
|
|
169
|
+
│ Q2: 这个功能需要 AI 交互吗? │
|
|
170
|
+
├─────────────────────────────────────────────────────────┤
|
|
171
|
+
│ A) 需要交互式工作流 │
|
|
172
|
+
│ → 创建技能 │
|
|
173
|
+
│ → 评估是否需要斜线命令 │
|
|
174
|
+
│ │
|
|
175
|
+
│ B) 静态规则/背景知识 │
|
|
176
|
+
│ → 仅核心标准 │
|
|
177
|
+
│ → 在 CLAUDE.md 中引用 │
|
|
178
|
+
└─────────────────────────────────────────────────────────┘
|
|
179
|
+
│
|
|
180
|
+
▼
|
|
181
|
+
┌─────────────────────────────────────────────────────────┐
|
|
182
|
+
│ Q3: 用户需要直接触发吗? │
|
|
183
|
+
├─────────────────────────────────────────────────────────┤
|
|
184
|
+
│ A) 需要 /command 触发 │
|
|
185
|
+
│ → 创建斜线命令 │
|
|
186
|
+
│ │
|
|
187
|
+
│ B) AI 自动应用 │
|
|
188
|
+
│ → 仅技能,无需命令 │
|
|
189
|
+
└─────────────────────────────────────────────────────────┘
|
|
190
|
+
```
|
|
191
|
+
|
|
192
|
+
### 评估结果
|
|
193
|
+
|
|
194
|
+
| 评估结果 | 要创建的工件 |
|
|
195
|
+
|----------|-------------|
|
|
196
|
+
| 仅限项目特定 | 仅更新 CLAUDE.md |
|
|
197
|
+
| 通用静态规则 | 核心标准 + CLAUDE.md 引用 |
|
|
198
|
+
| 通用交互式 | 核心标准 + 技能 |
|
|
199
|
+
| 用户触发工作流 | 核心标准 + 技能 + 命令 |
|
|
200
|
+
|
|
201
|
+
### 范围分类标签
|
|
202
|
+
|
|
203
|
+
在规格文档中使用这些标签指示范围:
|
|
204
|
+
|
|
205
|
+
| 标签 | 含义 | 示例 |
|
|
206
|
+
|------|------|------|
|
|
207
|
+
| `[范围: 项目]` | 项目特定,不用于分发 | CI/CD 配置,团队约定 |
|
|
208
|
+
| `[范围: 通用]` | 其他项目可重用 | 编码标准,测试模式 |
|
|
209
|
+
| `[范围: 工具]` | 工具/生成器,无需核心标准 | docs-generator, code-formatter |
|
|
27
210
|
|
|
28
211
|
---
|
|
29
212
|
|
|
@@ -178,6 +361,55 @@ Refs: SPEC-001
|
|
|
178
361
|
|
|
179
362
|
---
|
|
180
363
|
|
|
364
|
+
## 双向同步评估
|
|
365
|
+
|
|
366
|
+
在处理规格及其实现时,始终评估需要同步的内容。变更可以源自任何工件,并应传播到相关工件。
|
|
367
|
+
|
|
368
|
+
### 同步矩阵
|
|
369
|
+
|
|
370
|
+
| 变更来源 | 评估同步到 |
|
|
371
|
+
|----------|------------|
|
|
372
|
+
| 核心标准 | → 技能、命令、AI YAML、翻译 |
|
|
373
|
+
| 技能 | → 核心标准(如适用)、命令、翻译 |
|
|
374
|
+
| 命令 | → 技能、核心标准(如适用)、翻译 |
|
|
375
|
+
|
|
376
|
+
### 同步检查清单模板
|
|
377
|
+
|
|
378
|
+
在规格文档中包含此检查清单:
|
|
379
|
+
|
|
380
|
+
```markdown
|
|
381
|
+
## 同步检查清单
|
|
382
|
+
|
|
383
|
+
### 从核心标准开始
|
|
384
|
+
- [ ] 创建/更新相应技能?(如交互式)
|
|
385
|
+
- [ ] 创建/更新斜线命令?(如用户触发)
|
|
386
|
+
- [ ] 更新翻译?(zh-TW、zh-CN 等)
|
|
387
|
+
- [ ] 更新 AI YAML 版本?(如适用)
|
|
388
|
+
|
|
389
|
+
### 从技能开始
|
|
390
|
+
- [ ] 这个技能应该有核心标准吗?
|
|
391
|
+
- [ ] 如果是工具技能(例如 docs-generator),标记为"[范围: 工具]"
|
|
392
|
+
- [ ] 创建斜线命令?
|
|
393
|
+
- [ ] 更新翻译?
|
|
394
|
+
|
|
395
|
+
### 从命令开始
|
|
396
|
+
- [ ] 这个命令属于哪个技能?
|
|
397
|
+
- [ ] 更新技能文档?
|
|
398
|
+
- [ ] 更新翻译?
|
|
399
|
+
```
|
|
400
|
+
|
|
401
|
+
### 同步标记
|
|
402
|
+
|
|
403
|
+
在文档中使用这些标记指示同步状态:
|
|
404
|
+
|
|
405
|
+
| 标记 | 含义 |
|
|
406
|
+
|------|------|
|
|
407
|
+
| `[已同步: ✓]` | 所有相关工件已同步 |
|
|
408
|
+
| `[已同步: 待定]` | 需要同步但尚未完成 |
|
|
409
|
+
| `[已同步: 不适用]` | 无相关工件同步(例如独立工具) |
|
|
410
|
+
|
|
411
|
+
---
|
|
412
|
+
|
|
181
413
|
## 与反向工程集成
|
|
182
414
|
|
|
183
415
|
### 概述
|
|
@@ -247,12 +479,271 @@ Refs: SPEC-001
|
|
|
247
479
|
|
|
248
480
|
---
|
|
249
481
|
|
|
482
|
+
## 与正向推导集成
|
|
483
|
+
|
|
484
|
+
### 概述
|
|
485
|
+
|
|
486
|
+
规格批准后,使用[正向推导标准](../../../core/forward-derivation-standards.md)自动从验收标准生成 BDD 场景、TDD 测试骨架和 ATDD 验收测试。
|
|
487
|
+
|
|
488
|
+
### 正向推导 → SDD 流水线
|
|
489
|
+
|
|
490
|
+
```
|
|
491
|
+
┌─────────────────────────────────────────────────────────────────────────┐
|
|
492
|
+
│ 已批准规格 → 正向推导流水线 │
|
|
493
|
+
├─────────────────────────────────────────────────────────────────────────┤
|
|
494
|
+
│ │
|
|
495
|
+
│ 已批准的 SPEC-XXX.md │
|
|
496
|
+
│ │ │
|
|
497
|
+
│ ▼ │
|
|
498
|
+
│ ┌────────────────────────────────────────────────────────────┐ │
|
|
499
|
+
│ │ /derive-all specs/SPEC-XXX.md │ │
|
|
500
|
+
│ │ • 解析验收标准 │ │
|
|
501
|
+
│ │ • 转换 AC → Gherkin 场景 [已生成] │ │
|
|
502
|
+
│ │ • 生成 TDD 测试骨架 [已生成] │ │
|
|
503
|
+
│ │ • 创建 ATDD 验收表 [已生成] │ │
|
|
504
|
+
│ └────────────────────────────────────────────────────────────┘ │
|
|
505
|
+
│ │ │
|
|
506
|
+
│ ▼ │
|
|
507
|
+
│ 输出文件 │
|
|
508
|
+
│ ├── features/SPEC-XXX.feature (BDD) │
|
|
509
|
+
│ ├── tests/SPEC-XXX.test.ts (TDD) │
|
|
510
|
+
│ └── acceptance/SPEC-XXX-acceptance.md (ATDD) │
|
|
511
|
+
│ │ │
|
|
512
|
+
│ ▼ │
|
|
513
|
+
│ 人工审查 → BDD/TDD 工作流程继续 │
|
|
514
|
+
│ │
|
|
515
|
+
└─────────────────────────────────────────────────────────────────────────┘
|
|
516
|
+
```
|
|
517
|
+
|
|
518
|
+
### 何时使用正向推导
|
|
519
|
+
|
|
520
|
+
| 场景 | 方法 |
|
|
521
|
+
|------|------|
|
|
522
|
+
| 规格已批准,开始实施 | 使用 `/derive-all` 生成测试结构 |
|
|
523
|
+
| 需要快速 BDD 场景 | 使用 `/derive-bdd` 生成 Gherkin |
|
|
524
|
+
| 开始 TDD 工作流 | 使用 `/derive-tdd` 生成测试骨架 |
|
|
525
|
+
| 手动验收测试 | 使用 `/derive-atdd` 生成测试表 |
|
|
526
|
+
|
|
527
|
+
### 相关命令
|
|
528
|
+
|
|
529
|
+
| 命令 | 输入 | 输出 | 用途 |
|
|
530
|
+
|------|------|------|------|
|
|
531
|
+
| `/derive-bdd` | SPEC-XXX.md | .feature | AC → Gherkin 场景 |
|
|
532
|
+
| `/derive-tdd` | SPEC-XXX.md | .test.ts | AC → 测试骨架 |
|
|
533
|
+
| `/derive-atdd` | SPEC-XXX.md | acceptance.md | AC → 测试表 |
|
|
534
|
+
| `/derive-all` | SPEC-XXX.md | 全部以上 | 完整推导流水线 |
|
|
535
|
+
| `/derive-contracts` | SPEC-XXX.md | contract.json, schema.json | AC → 合约验证 |
|
|
536
|
+
|
|
537
|
+
---
|
|
538
|
+
|
|
539
|
+
## 验证层
|
|
540
|
+
|
|
541
|
+
SDD 需要强大的验证机制,以确保生成的代码与规格保持一致。验证层在整个开发生命周期中提供持续验证。
|
|
542
|
+
|
|
543
|
+
### 理论基础
|
|
544
|
+
|
|
545
|
+
| 理论 | 来源 | 在 SDD 中的应用 |
|
|
546
|
+
|------|------|---------------|
|
|
547
|
+
| **设计合约** | Bertrand Meyer, 1986 | AC 作为前置/后置条件 |
|
|
548
|
+
| **形式化验证** | 计算机科学 | 规格 vs 实现 |
|
|
549
|
+
| **示例规格化** | Gojko Adzic, 2011 | 可执行规格 |
|
|
550
|
+
| **合约测试** | Pact, 2013+ | 服务合约验证 |
|
|
551
|
+
|
|
552
|
+
### 验证机制
|
|
553
|
+
|
|
554
|
+
| 机制 | 目的 | 工具 |
|
|
555
|
+
|------|------|------|
|
|
556
|
+
| **合约测试** | 验证实现遵守接口保证 | Pact, Spring Cloud Contract, Specmatic |
|
|
557
|
+
| **模式验证** | 拒绝违反结构要求的负载 | JSON Schema, OpenAPI 验证器 |
|
|
558
|
+
| **漂移检测** | 检测规格与行为之间的分歧 | CI/CD 集成, Specmatic |
|
|
559
|
+
| **向后兼容性** | 将变更分类为添加/破坏 | OpenAPI 差异工具 |
|
|
560
|
+
|
|
561
|
+
### SDD 验证流程
|
|
562
|
+
|
|
563
|
+
```
|
|
564
|
+
┌─────────────────────────────────────────────────────────────────────────────┐
|
|
565
|
+
│ SDD 验证层 │
|
|
566
|
+
├─────────────────────────────────────────────────────────────────────────────┤
|
|
567
|
+
│ │
|
|
568
|
+
│ SPEC-XXX.md (已批准) │
|
|
569
|
+
│ │ │
|
|
570
|
+
│ ├──→ 正向推导 │
|
|
571
|
+
│ │ │ │
|
|
572
|
+
│ │ ├──→ 合约测试 (已生成) │
|
|
573
|
+
│ │ ├──→ 模式验证器 (已生成) │
|
|
574
|
+
│ │ ├──→ BDD 场景 (已生成) │
|
|
575
|
+
│ │ └──→ TDD 骨架 (已生成) │
|
|
576
|
+
│ │ │
|
|
577
|
+
│ └──→ 实施 (AI 辅助) │
|
|
578
|
+
│ │ │
|
|
579
|
+
│ ▼ │
|
|
580
|
+
│ ┌─────────────────────────────────────────────────────┐ │
|
|
581
|
+
│ │ 持续验证 │ │
|
|
582
|
+
│ │ ┌─────────────────────────────────────────────────┐│ │
|
|
583
|
+
│ │ │ 合约测试 ✓/✗ ││ │
|
|
584
|
+
│ │ │ 模式验证 ✓/✗ ││ │
|
|
585
|
+
│ │ │ 漂移检测 ✓/✗ ││ │
|
|
586
|
+
│ │ │ BDD 场景 ✓/✗ ││ │
|
|
587
|
+
│ │ │ TDD 单元测试 ✓/✗ ││ │
|
|
588
|
+
│ │ └─────────────────────────────────────────────────┘│ │
|
|
589
|
+
│ └─────────────────────────────────────────────────────┘ │
|
|
590
|
+
│ │ │
|
|
591
|
+
│ ▼ │
|
|
592
|
+
│ 验证报告 → 归档或迭代 │
|
|
593
|
+
│ │
|
|
594
|
+
└─────────────────────────────────────────────────────────────────────────────┘
|
|
595
|
+
```
|
|
596
|
+
|
|
597
|
+
### 生成的验证工件
|
|
598
|
+
|
|
599
|
+
| 工件 | 目的 | 验证角色 |
|
|
600
|
+
|------|------|----------|
|
|
601
|
+
| `.feature` (BDD) | 行为场景 | 验收验证 |
|
|
602
|
+
| `.test.ts` (TDD) | 单元测试骨架 | 实现验证 |
|
|
603
|
+
| `acceptance.md` (ATDD) | 验收测试表 | 业务验证 |
|
|
604
|
+
| `contract.json` | 合约定义 | 接口验证 |
|
|
605
|
+
| `schema.json` | 模式定义 | 结构验证 |
|
|
606
|
+
|
|
607
|
+
### SDD 中的 V&V
|
|
608
|
+
|
|
609
|
+
- **验证** (正确构建): 合约测试通过,模式有效,代码匹配规格
|
|
610
|
+
- **确认** (构建正确的事物): AC 已满足,利益相关者批准,业务价值已交付
|
|
611
|
+
|
|
612
|
+
### 参考资料
|
|
613
|
+
|
|
614
|
+
- [InfoQ: Spec-Driven Development - Validation Layer](https://www.infoq.com/articles/spec-driven-development/)
|
|
615
|
+
- [Microsoft: Consumer-Driven Contract Testing](https://microsoft.github.io/code-with-engineering-playbook/automated-testing/cdc-testing/)
|
|
616
|
+
- [维基百科: Formal Verification](https://en.wikipedia.org/wiki/Formal_verification)
|
|
617
|
+
- [Specmatic: AI-powered API Contract Testing](https://specmatic.io/)
|
|
618
|
+
|
|
619
|
+
---
|
|
620
|
+
|
|
621
|
+
## SDD + 测试集成模型
|
|
622
|
+
|
|
623
|
+
### 理论基础
|
|
624
|
+
|
|
625
|
+
SDD 验证基于已建立的测试理论:
|
|
626
|
+
|
|
627
|
+
```
|
|
628
|
+
设计合约 (1986) 示例规格化 (2011)
|
|
629
|
+
│ │
|
|
630
|
+
▼ ▼
|
|
631
|
+
┌───────────────────────────────────────────────────────────────┐
|
|
632
|
+
│ SDD 验证模型 │
|
|
633
|
+
│ │
|
|
634
|
+
│ 规格 (AC) ←──→ 合约测试 ←──→ 实现 │
|
|
635
|
+
│ ↑ ↑ ↓ │
|
|
636
|
+
│ 前置/后置 验证机制 运行时 │
|
|
637
|
+
│ 条件 行为 │
|
|
638
|
+
└───────────────────────────────────────────────────────────────┘
|
|
639
|
+
```
|
|
640
|
+
|
|
641
|
+
### 集成点
|
|
642
|
+
|
|
643
|
+
| SDD 阶段 | 测试集成 | 理论 |
|
|
644
|
+
|-----------|----------|------|
|
|
645
|
+
| **规格编写** | AC = 前置/后置条件 | 设计合约 |
|
|
646
|
+
| **正向推导** | 生成合约测试 | 可执行规格 |
|
|
647
|
+
| **实施** | TDD (可选) | 测试驱动开发 |
|
|
648
|
+
| **验证** | 合约测试 + 漂移检测 | 运行时验证 |
|
|
649
|
+
| **归档** | 测试结果作为证据 | 可追溯性 |
|
|
650
|
+
|
|
651
|
+
### 实用工作流程
|
|
652
|
+
|
|
653
|
+
```
|
|
654
|
+
┌─────────────────────────────────────────────────────────────────────────────┐
|
|
655
|
+
│ 实用 SDD 工作流程 │
|
|
656
|
+
├─────────────────────────────────────────────────────────────────────────────┤
|
|
657
|
+
│ │
|
|
658
|
+
│ 【输入来源】(任选其一) │
|
|
659
|
+
│ ├── 需求访谈 (最常见) │
|
|
660
|
+
│ ├── 利益相关者邮件/文档 │
|
|
661
|
+
│ ├── 产品需求文档 (PRD) │
|
|
662
|
+
│ └── ATDD 工作坊 (可选协作) │
|
|
663
|
+
│ ↓ │
|
|
664
|
+
│ 【SDD 提案编写】 │
|
|
665
|
+
│ SPEC-XXX.md 包括: │
|
|
666
|
+
│ - 摘要、动机 │
|
|
667
|
+
│ - 详细设计 │
|
|
668
|
+
│ - 验收标准 (Given-When-Then) │
|
|
669
|
+
│ - 依赖关系、风险 │
|
|
670
|
+
│ ↓ │
|
|
671
|
+
│ 【审查与批准】 │
|
|
672
|
+
│ ↓ │
|
|
673
|
+
│ 【正向推导】 │
|
|
674
|
+
│ /derive-all → .feature, .test.ts, acceptance.md, contract.json │
|
|
675
|
+
│ ↓ │
|
|
676
|
+
│ 【实施】(TDD 可选) │
|
|
677
|
+
│ ↓ │
|
|
678
|
+
│ 【验证】→ 【归档】 │
|
|
679
|
+
│ │
|
|
680
|
+
└─────────────────────────────────────────────────────────────────────────────┘
|
|
681
|
+
```
|
|
682
|
+
|
|
683
|
+
### 与传统方法的关键调整
|
|
684
|
+
|
|
685
|
+
1. **ATDD 工作坊是可选的**: 不是每个功能都需要正式工作坊
|
|
686
|
+
2. **规格是起点**: 无论输入来源如何,都转换为 SPEC-XXX.md
|
|
687
|
+
3. **Given-When-Then 嵌入**: AC 格式借鉴 BDD,但不需要正式 ATDD 流程
|
|
688
|
+
4. **正向推导填补空白**: 自动生成测试结构,弥补缺少工作坊的不足
|
|
689
|
+
|
|
690
|
+
---
|
|
691
|
+
|
|
692
|
+
## 与正向/反向工程集成
|
|
693
|
+
|
|
694
|
+
本标准与两个互补标准协同工作,形成完整的规格生态系统:
|
|
695
|
+
|
|
696
|
+
```
|
|
697
|
+
┌─────────────────────────────────────────────────────────────────────────┐
|
|
698
|
+
│ SDD 生态系统集成 │
|
|
699
|
+
├─────────────────────────────────────────────────────────────────────────┤
|
|
700
|
+
│ │
|
|
701
|
+
│ 遗留代码 新功能 │
|
|
702
|
+
│ │ │ │
|
|
703
|
+
│ ▼ ▼ │
|
|
704
|
+
│ ┌─────────────────┐ ┌─────────────────┐ │
|
|
705
|
+
│ │ 反向 │ │ SDD │ │
|
|
706
|
+
│ │ 工程 │ │ (本标准) │ │
|
|
707
|
+
│ │ 标准 │ │ │ │
|
|
708
|
+
│ └────────┬────────┘ └────────┬────────┘ │
|
|
709
|
+
│ │ │ │
|
|
710
|
+
│ │ 代码 → 规格 │ 规格优先 │
|
|
711
|
+
│ │ │ │
|
|
712
|
+
│ ▼ ▼ │
|
|
713
|
+
│ ┌─────────────────────────────────────┐ │
|
|
714
|
+
│ │ SPEC-XXX.md │ │
|
|
715
|
+
│ │ (已批准规格) │ │
|
|
716
|
+
│ └──────────────────┬──────────────────┘ │
|
|
717
|
+
│ │ │
|
|
718
|
+
│ ▼ │
|
|
719
|
+
│ ┌─────────────────────────────────────────────────────┐ │
|
|
720
|
+
│ │ 正向推导标准 │ │
|
|
721
|
+
│ │ │ │
|
|
722
|
+
│ │ 规格 → BDD (.feature) │ │
|
|
723
|
+
│ │ 规格 → TDD (.test.ts) │ │
|
|
724
|
+
│ │ 规格 → ATDD (acceptance.md) │ │
|
|
725
|
+
│ └─────────────────────────────────────────────────────┘ │
|
|
726
|
+
│ │
|
|
727
|
+
└─────────────────────────────────────────────────────────────────────────┘
|
|
728
|
+
```
|
|
729
|
+
|
|
730
|
+
**何时使用每种方法**:
|
|
731
|
+
|
|
732
|
+
| 场景 | 起点 | 使用的标准 |
|
|
733
|
+
|------|------|-----------|
|
|
734
|
+
| 新功能开发 | 不存在任何东西 | SDD → 正向推导 |
|
|
735
|
+
| 记录现有代码 | 代码存在,无规格 | 反向工程 → SDD |
|
|
736
|
+
| 向现有代码添加测试 | 规格存在 | 正向推导 |
|
|
737
|
+
| 重大重构 | 代码存在,行为不明确 | 反向工程 → SDD → 正向推导 |
|
|
738
|
+
|
|
739
|
+
---
|
|
740
|
+
|
|
250
741
|
## 相关标准
|
|
251
742
|
|
|
252
743
|
- [反向工程标准](reverse-engineering-standards.md) - 程序码转规格转换
|
|
253
744
|
- [测试驱动开发](test-driven-development.md) - TDD 工作流程与 SDD 集成
|
|
254
|
-
- [行为驱动开发](behavior-driven-development.md) - BDD 工作流程与 Given-When-Then 情境
|
|
255
|
-
- [验收测试驱动开发](acceptance-test-driven-development.md) - ATDD 工作流程与商业验收
|
|
745
|
+
- [行为驱动开发](../../../core/behavior-driven-development.md) - BDD 工作流程与 Given-When-Then 情境
|
|
746
|
+
- [验收测试驱动开发](../../../core/acceptance-test-driven-development.md) - ATDD 工作流程与商业验收
|
|
256
747
|
- [测试标准](testing-standards.md) - 测试框架与最佳实践(或使用 `/testing-guide` 技能)
|
|
257
748
|
- [测试完整性维度](test-completeness-dimensions.md) - 7 维度测试覆盖
|
|
258
749
|
- [Commit 讯息指南](../../../core/commit-message-guide.md) - Commit 讯息规范
|
|
@@ -266,8 +757,11 @@ Refs: SPEC-001
|
|
|
266
757
|
|
|
267
758
|
| 版本 | 日期 | 变更内容 |
|
|
268
759
|
|------|------|----------|
|
|
760
|
+
| 2.1.0 | 2026-01-26 | 新增:变更评估 (SDD 前评估) 章节,包含决策树、双向同步评估章节,包含同步矩阵和检查清单 |
|
|
761
|
+
| 2.0.0 | 2026-01-25 | **重大重构**: 新增 SDD 作为独立方法论章节(将 SDD 与 TDD/BDD/ATDD 家族分离)、成熟度级别(Martin Fowler 2025)、常见陷阱、包含理论基础的验证层、SDD + 测试集成模型、/derive-contracts 命令 |
|
|
762
|
+
| 1.4.0 | 2026-01-19 | 新增:与正向推导集成章节、推导命令 |
|
|
269
763
|
| 1.3.0 | 2026-01-19 | 新增:与反向工程集成章节、相关命令 |
|
|
270
|
-
| 1.2.0 | 2026-01-05 | 新增:IEEE 830-1998 和 SWEBOK v4.0 第 1
|
|
764
|
+
| 1.2.0 | 2026-01-05 | 新增:IEEE 830-1998 和 SWEBOK v4.0 第 1 章(软件需求)至参考资料 |
|
|
271
765
|
| 1.1.0 | 2025-12-24 | 新增:工作流程图、规格范本、集成指南、最佳实践、相关标准、授权 |
|
|
272
766
|
| 1.0.0 | 2025-12-23 | 初始 SDD 标准定义 |
|
|
273
767
|
|
|
@@ -281,6 +775,14 @@ Refs: SPEC-001
|
|
|
281
775
|
- [IEEE 830-1998 - 软体需求规格](https://standards.ieee.org/ieee/830/1222/) - 需求文件标准
|
|
282
776
|
- [SWEBOK v4.0 - 第 1 章:软体需求](https://www.computer.org/education/bodies-of-knowledge/software-engineering) - IEEE Computer Society
|
|
283
777
|
|
|
778
|
+
### 验证理论
|
|
779
|
+
|
|
780
|
+
- [Design by Contract - Bertrand Meyer, 1986](https://en.wikipedia.org/wiki/Design_by_contract) - 前置/后置条件理论
|
|
781
|
+
- [维基百科: Formal Verification](https://en.wikipedia.org/wiki/Formal_verification) - 形式化验证理论
|
|
782
|
+
- [Microsoft: Consumer-Driven Contract Testing](https://microsoft.github.io/code-with-engineering-playbook/automated-testing/cdc-testing/) - 合约测试框架
|
|
783
|
+
- [Specmatic: AI-powered API Contract Testing](https://specmatic.io/) - 现代合约测试工具
|
|
784
|
+
- [Gojko Adzic: Specification by Example](https://gojko.net/books/specification-by-example/) - 可执行规格 (2011)
|
|
785
|
+
|
|
284
786
|
---
|
|
285
787
|
|
|
286
788
|
## 授权
|