universal-dev-standards 5.16.0 → 6.0.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/bin/uds.js +13 -135
- package/bundled/ai/standards/acceptance-criteria-traceability.ai.yaml +13 -4
- package/bundled/ai/standards/accessibility-standards.ai.yaml +1 -1
- package/bundled/ai/standards/ai-response-navigation.ai.yaml +15 -2
- package/bundled/ai/standards/api-design-standards.ai.yaml +27 -4
- package/bundled/ai/standards/behavior-snapshot.ai.yaml +86 -9
- package/bundled/ai/standards/checkin-standards.ai.yaml +2 -2
- package/bundled/ai/standards/code-review.ai.yaml +2 -2
- package/bundled/ai/standards/context-aware-loading.ai.yaml +3 -3
- package/bundled/ai/standards/data-migration-testing.ai.yaml +79 -3
- package/bundled/ai/standards/deprecation-standards.ai.yaml +10 -2
- package/bundled/ai/standards/developer-memory.ai.yaml +4 -3
- package/bundled/ai/standards/flow-based-testing.ai.yaml +2 -2
- package/bundled/ai/standards/forward-derivation-standards.ai.yaml +26 -2
- package/bundled/ai/standards/full-coverage-testing.ai.yaml +34 -2
- package/bundled/ai/standards/git-worktree.ai.yaml +3 -3
- package/bundled/ai/standards/logging.ai.yaml +97 -3
- package/bundled/ai/standards/mock-boundary.ai.yaml +48 -2
- package/bundled/ai/standards/model-provenance.ai.yaml +297 -0
- package/bundled/ai/standards/model-selection.ai.yaml +11 -2
- package/bundled/ai/standards/observability-standards.ai.yaml +10 -0
- package/bundled/ai/standards/performance-standards.ai.yaml +46 -1
- package/bundled/ai/standards/pii-classification.ai.yaml +15 -1
- package/bundled/ai/standards/pipeline-security-gates.ai.yaml +10 -0
- package/bundled/ai/standards/privacy-standards.ai.yaml +2 -2
- package/bundled/ai/standards/project-context-memory.ai.yaml +2 -2
- package/bundled/ai/standards/refactoring-standards.ai.yaml +68 -3
- package/bundled/ai/standards/resource-cost-boundary.ai.yaml +279 -0
- package/bundled/ai/standards/reverse-engineering-standards.ai.yaml +55 -2
- package/bundled/ai/standards/security-testing.ai.yaml +13 -2
- package/bundled/ai/standards/skill-standard-alignment-check.ai.yaml +37 -2
- package/bundled/ai/standards/user-journey-testing.ai.yaml +107 -0
- package/bundled/ai/standards/verification-oracle.ai.yaml +278 -0
- package/bundled/ai/standards/versioning.ai.yaml +32 -38
- package/bundled/core/acceptance-criteria-traceability.md +15 -5
- package/bundled/core/accessibility-standards.md +8 -4
- package/bundled/core/ai-friendly-architecture.md +1 -1
- package/bundled/core/ai-response-navigation.md +31 -3
- package/bundled/core/anti-sycophancy-prompting.md +1 -1
- package/bundled/core/api-design-standards.md +92 -7
- package/bundled/core/audit-trail.md +119 -0
- package/bundled/core/behavior-snapshot.md +94 -7
- package/bundled/core/browser-compatibility-standards.md +15 -2
- package/bundled/core/checkin-standards.md +9 -2
- package/bundled/core/code-review-checklist.md +10 -2
- package/bundled/core/container-image-standards.md +97 -0
- package/bundled/core/context-aware-loading.md +2 -2
- package/bundled/core/cost-budget-test.md +1 -1
- package/bundled/core/cross-flow-regression.md +3 -2
- package/bundled/core/data-contract.md +104 -0
- package/bundled/core/data-migration-testing.md +90 -0
- package/bundled/core/data-pipeline.md +113 -0
- package/bundled/core/deprecation-standards.md +16 -2
- package/bundled/core/developer-memory.md +13 -8
- package/bundled/core/documentation-writing-standards.md +1 -1
- package/bundled/core/error-code-standards.md +4 -3
- package/bundled/core/flaky-test-management.md +1 -1
- package/bundled/core/flow-based-testing.md +3 -3
- package/bundled/core/forward-derivation-standards.md +33 -5
- package/bundled/core/full-coverage-testing.md +72 -0
- package/bundled/core/git-worktree.md +4 -4
- package/bundled/core/guides/performance-guide.md +1 -1
- package/bundled/core/guides/security-guide.md +1 -1
- package/bundled/core/health-check-standards.md +2 -2
- package/bundled/core/iac-design-principles.md +97 -0
- package/bundled/core/incident-response.md +119 -0
- package/bundled/core/license-compliance.md +2 -0
- package/bundled/core/logging-standards.md +78 -2
- package/bundled/core/mock-boundary.md +54 -2
- package/bundled/core/model-provenance.md +181 -0
- package/bundled/core/model-selection.md +27 -2
- package/bundled/core/packaging-standards.md +1 -0
- package/bundled/core/performance-standards.md +96 -2
- package/bundled/core/pii-classification.md +148 -0
- package/bundled/core/pipeline-security-gates.md +22 -2
- package/bundled/core/postmortem-standards.md +2 -0
- package/bundled/core/prd-standards.md +91 -0
- package/bundled/core/privacy-standards.md +14 -3
- package/bundled/core/product-metrics-standards.md +100 -0
- package/bundled/core/project-context-memory.md +8 -2
- package/bundled/core/prompt-regression.md +1 -1
- package/bundled/core/refactoring-standards.md +44 -3
- package/bundled/core/replay-test.md +1 -1
- package/bundled/core/resource-cost-boundary.md +180 -0
- package/bundled/core/reverse-engineering-standards.md +66 -2
- package/bundled/core/runbook.md +113 -0
- package/bundled/core/schema-evolution.md +105 -0
- package/bundled/core/secret-management-standards.md +110 -0
- package/bundled/core/security-testing.md +26 -2
- package/bundled/core/self-review-protocol.md +2 -2
- package/bundled/core/skill-standard-alignment-check.md +53 -0
- package/bundled/core/slo-sli.md +109 -0
- package/bundled/core/smoke-test.md +1 -1
- package/bundled/core/spec-driven-development.md +21 -3
- package/bundled/core/tech-debt-standards.md +1 -1
- package/bundled/core/test-data-standards.md +2 -2
- package/bundled/core/user-journey-testing.md +102 -0
- package/bundled/core/user-story-mapping.md +96 -0
- package/bundled/core/verification-oracle.md +167 -0
- package/bundled/core/versioning.md +133 -109
- package/bundled/locales/COVERAGE.md +84 -73
- package/bundled/locales/zh-CN/CHANGELOG.md +81 -6
- package/bundled/locales/zh-CN/CLAUDE.md +1 -1
- package/bundled/locales/zh-CN/README.md +22 -9
- package/bundled/locales/zh-CN/SECURITY.md +1 -1
- package/bundled/locales/zh-CN/adoption/DAILY-WORKFLOW-GUIDE.md +2 -2
- package/bundled/locales/zh-CN/core/acceptance-criteria-traceability.md +4 -6
- package/bundled/locales/zh-CN/core/accessibility-standards.md +1 -1
- package/bundled/locales/zh-CN/core/adversarial-test.md +226 -0
- package/bundled/locales/zh-CN/core/agent-behavior-discipline.md +187 -0
- package/bundled/locales/zh-CN/core/ai-response-navigation.md +32 -6
- package/bundled/locales/zh-CN/core/anti-sycophancy-prompting.md +1 -1
- package/bundled/locales/zh-CN/core/api-design-standards.md +1 -1
- package/bundled/locales/zh-CN/core/behavior-snapshot.md +335 -0
- package/bundled/locales/zh-CN/core/browser-compatibility-standards.md +229 -0
- package/bundled/locales/zh-CN/core/cd-deployment-strategies.md +135 -0
- package/bundled/locales/zh-CN/core/chaos-injection-tests.md +130 -0
- package/bundled/locales/zh-CN/core/checkin-standards.md +1 -1
- package/bundled/locales/zh-CN/core/code-review-checklist.md +1 -1
- package/bundled/locales/zh-CN/core/container-security.md +535 -0
- package/bundled/locales/zh-CN/core/context-aware-loading.md +1 -1
- package/bundled/locales/zh-CN/core/contract-testing-standards.md +191 -0
- package/bundled/locales/zh-CN/core/cost-budget-test.md +86 -0
- package/bundled/locales/zh-CN/core/cross-flow-regression.md +199 -0
- package/bundled/locales/zh-CN/core/data-migration-testing.md +217 -0
- package/bundled/locales/zh-CN/core/deployment-standards.md +328 -9
- package/bundled/locales/zh-CN/core/deprecation-standards.md +1 -1
- package/bundled/locales/zh-CN/core/developer-memory.md +2 -2
- package/bundled/locales/zh-CN/core/disaster-recovery-drill.md +87 -0
- package/bundled/locales/zh-CN/core/documentation-structure.md +1 -1
- package/bundled/locales/zh-CN/core/documentation-writing-standards.md +1 -1
- package/bundled/locales/zh-CN/core/error-code-standards.md +2 -2
- package/bundled/locales/zh-CN/core/feature-manifest-standard.md +222 -0
- package/bundled/locales/zh-CN/core/flaky-test-management.md +87 -0
- package/bundled/locales/zh-CN/core/flow-based-testing.md +284 -0
- package/bundled/locales/zh-CN/core/forward-derivation-standards.md +3 -4
- package/bundled/locales/zh-CN/core/full-coverage-testing.md +197 -0
- package/bundled/locales/zh-CN/core/git-worktree.md +1 -1
- package/bundled/locales/zh-CN/core/governance-layer.md +160 -0
- package/bundled/locales/zh-CN/core/guides/performance-guide.md +515 -0
- package/bundled/locales/zh-CN/core/guides/security-guide.md +494 -0
- package/bundled/locales/zh-CN/core/knowledge-graph-memory.md +128 -0
- package/bundled/locales/zh-CN/core/license-compliance.md +129 -0
- package/bundled/locales/zh-CN/core/llm-output-validation.md +192 -0
- package/bundled/locales/zh-CN/core/logging-standards.md +130 -8
- package/bundled/locales/zh-CN/core/mock-boundary.md +109 -0
- package/bundled/locales/zh-CN/core/model-selection.md +28 -5
- package/bundled/locales/zh-CN/core/mutation-testing.md +106 -0
- package/bundled/locales/zh-CN/core/no-cicd-deployment.md +219 -0
- package/bundled/locales/zh-CN/core/packaging-standards.md +76 -5
- package/bundled/locales/zh-CN/core/pipeline-security-gates.md +126 -0
- package/bundled/locales/zh-CN/core/policy-as-code-testing.md +203 -0
- package/bundled/locales/zh-CN/core/privacy-standards.md +1 -1
- package/bundled/locales/zh-CN/core/project-context-memory.md +1 -1
- package/bundled/locales/zh-CN/core/prompt-regression.md +88 -0
- package/bundled/locales/zh-CN/core/property-based-testing.md +87 -0
- package/bundled/locales/zh-CN/core/release-quality-manifest.md +207 -0
- package/bundled/locales/zh-CN/core/release-readiness-gate.md +193 -0
- package/bundled/locales/zh-CN/core/replay-test.md +102 -0
- package/bundled/locales/zh-CN/core/reverse-engineering-standards.md +46 -1
- package/bundled/locales/zh-CN/core/rollback-standards.md +120 -0
- package/bundled/locales/zh-CN/core/sast-advanced.md +309 -0
- package/bundled/locales/zh-CN/core/secure-op.md +328 -0
- package/bundled/locales/zh-CN/core/security-testing.md +96 -0
- package/bundled/locales/zh-CN/core/self-review-protocol.md +167 -0
- package/bundled/locales/zh-CN/core/server-ops-security.md +507 -0
- package/bundled/locales/zh-CN/core/smoke-test.md +79 -0
- package/bundled/locales/zh-CN/core/spec-driven-development.md +55 -5
- package/bundled/locales/zh-CN/core/supply-chain-attestation.md +131 -0
- package/bundled/locales/zh-CN/core/versioning.md +1 -1
- package/bundled/locales/zh-CN/docs/CHEATSHEET.md +31 -6
- package/bundled/locales/zh-CN/docs/FEATURE-REFERENCE.md +61 -34
- package/bundled/locales/zh-CN/docs/MIGRATION-v6.md +88 -0
- package/bundled/locales/zh-CN/docs/USAGE-MODES-COMPARISON.md +2 -2
- package/bundled/locales/zh-CN/docs/USER-MANUAL.md +14 -14
- package/bundled/locales/zh-CN/docs/specs/system/memory-adoption-strategy.md +105 -0
- package/bundled/locales/zh-CN/docs/user/FAQ.md +132 -0
- package/bundled/locales/zh-CN/docs/user/GETTING-STARTED.md +144 -0
- package/bundled/locales/zh-CN/docs/user/GLOSSARY.md +178 -0
- package/bundled/locales/zh-CN/docs/user/README.md +70 -0
- package/bundled/locales/zh-CN/docs/user/TROUBLESHOOTING.md +190 -0
- package/bundled/locales/zh-CN/integrations/github-copilot/COPILOT-CHAT-REFERENCE.md +1 -1
- package/bundled/locales/zh-CN/integrations/github-copilot/README.md +1 -1
- package/bundled/locales/zh-CN/integrations/github-copilot/skills-mapping.md +3 -3
- package/bundled/locales/zh-CN/integrations/opencode/skills-mapping.md +3 -3
- package/bundled/locales/zh-CN/methodologies/guides/sdd-guide.md +836 -0
- package/bundled/locales/zh-CN/options/changelog/auto-generated.md +166 -0
- package/bundled/locales/zh-CN/options/changelog/keep-a-changelog.md +140 -0
- package/bundled/locales/zh-CN/options/code-review/automated-review.md +214 -0
- package/bundled/locales/zh-CN/options/code-review/pair-programming.md +166 -0
- package/bundled/locales/zh-CN/options/code-review/pr-review.md +167 -0
- package/bundled/locales/zh-CN/options/documentation/api-docs.md +191 -0
- package/bundled/locales/zh-CN/options/documentation/markdown-docs.md +150 -0
- package/bundled/locales/zh-CN/options/documentation/wiki-style.md +131 -0
- package/bundled/locales/zh-CN/options/project-structure/kotlin.md +144 -0
- package/bundled/locales/zh-CN/options/project-structure/php.md +168 -0
- package/bundled/locales/zh-CN/options/project-structure/ruby.md +156 -0
- package/bundled/locales/zh-CN/options/project-structure/rust.md +136 -0
- package/bundled/locales/zh-CN/options/project-structure/swift.md +165 -0
- package/bundled/locales/zh-CN/options/testing/contract-testing.md +237 -0
- package/bundled/locales/zh-CN/options/testing/industry-pyramid.md +200 -0
- package/bundled/locales/zh-CN/options/testing/istqb-framework.md +144 -0
- package/bundled/locales/zh-CN/options/testing/performance-testing.md +251 -0
- package/bundled/locales/zh-CN/options/testing/security-testing.md +192 -0
- package/bundled/locales/zh-CN/skills/README.md +89 -126
- package/bundled/locales/zh-CN/skills/ac-coverage/SKILL.md +5 -7
- package/bundled/locales/zh-CN/skills/adr-assistant/SKILL.md +1 -1
- package/bundled/locales/zh-CN/skills/agents/code-architect.md +263 -0
- package/bundled/locales/zh-CN/skills/agents/doc-writer.md +410 -0
- package/bundled/locales/zh-CN/skills/agents/reviewer.md +357 -0
- package/bundled/locales/zh-CN/skills/agents/spec-analyst.md +410 -0
- package/bundled/locales/zh-CN/skills/agents/test-specialist.md +368 -0
- package/bundled/locales/zh-CN/skills/ai-collaboration-standards/SKILL.md +2 -2
- package/bundled/locales/zh-CN/skills/ai-friendly-architecture/SKILL.md +2 -2
- package/bundled/locales/zh-CN/skills/ai-instruction-standards/SKILL.md +1 -1
- package/bundled/locales/zh-CN/skills/atdd-assistant/acceptance-criteria-guide.md +1 -1
- package/bundled/locales/zh-CN/skills/atdd-assistant/atdd-workflow.md +3 -4
- package/bundled/locales/zh-CN/skills/audit-assistant/SKILL.md +2 -2
- package/bundled/locales/zh-CN/skills/bdd-assistant/guide.md +1 -2
- package/bundled/locales/zh-CN/skills/brainstorm-assistant/SKILL.md +109 -13
- package/bundled/locales/zh-CN/skills/brainstorm-assistant/guide.md +30 -8
- package/bundled/locales/zh-CN/skills/checkin-assistant/SKILL.md +1 -1
- package/bundled/locales/zh-CN/skills/ci-cd-assistant/SKILL.md +50 -0
- package/bundled/locales/zh-CN/skills/code-review-assistant/SKILL.md +5 -5
- package/bundled/locales/zh-CN/skills/commands/ac-coverage.md +1 -1
- package/bundled/locales/zh-CN/skills/commands/atdd.md +3 -3
- package/bundled/locales/zh-CN/skills/commands/bdd.md +2 -2
- package/bundled/locales/zh-CN/skills/commands/brainstorm.md +26 -17
- package/bundled/locales/zh-CN/skills/commands/{review.md → code-review.md} +4 -4
- package/bundled/locales/zh-CN/skills/commands/derive-all.md +1 -1
- package/bundled/locales/zh-CN/skills/commands/derive-atdd.md +1 -1
- package/bundled/locales/zh-CN/skills/commands/derive-bdd.md +2 -3
- package/bundled/locales/zh-CN/skills/commands/derive-tdd.md +1 -1
- package/bundled/locales/zh-CN/skills/commands/derive.md +1 -1
- package/bundled/locales/zh-CN/skills/commands/dev-workflow.md +2 -2
- package/bundled/locales/zh-CN/skills/commands/methodology.md +4 -4
- package/bundled/locales/zh-CN/skills/commands/pr.md +1 -1
- package/bundled/locales/zh-CN/skills/commands/tdd.md +1 -1
- package/bundled/locales/zh-CN/skills/commit-standards/SKILL.md +1 -1
- package/bundled/locales/zh-CN/skills/contract-test-assistant/SKILL.md +1 -1
- package/bundled/locales/zh-CN/skills/dev-methodology/SKILL.md +1 -1
- package/bundled/locales/zh-CN/skills/dev-methodology/create-methodology.md +456 -0
- package/bundled/locales/zh-CN/skills/dev-methodology/guide.md +6 -6
- package/bundled/locales/zh-CN/skills/dev-methodology/runtime.md +296 -0
- package/bundled/locales/zh-CN/skills/dev-workflow-guide/SKILL.md +5 -5
- package/bundled/locales/zh-CN/skills/docs-generator/SKILL.md +1 -1
- package/bundled/locales/zh-CN/skills/e2e-assistant/SKILL.md +1 -1
- package/bundled/locales/zh-CN/skills/incident-response-assistant/SKILL.md +2 -2
- package/bundled/locales/zh-CN/skills/journey-test-assistant/SKILL.md +1 -1
- package/bundled/locales/zh-CN/skills/logging-guide/SKILL.md +146 -142
- package/bundled/locales/zh-CN/skills/migration-assistant/SKILL.md +1 -1
- package/bundled/locales/zh-CN/skills/observability-assistant/guide.md +1 -1
- package/bundled/locales/zh-CN/skills/pr-automation-assistant/SKILL.md +1 -1
- package/bundled/locales/zh-CN/skills/project-discovery/guide.md +2 -2
- package/bundled/locales/zh-CN/skills/reverse-engineer/SKILL.md +1 -1
- package/bundled/locales/zh-CN/skills/runbook-assistant/guide.md +1 -1
- package/bundled/locales/zh-CN/skills/security-assistant/SKILL.md +1 -1
- package/bundled/locales/zh-CN/skills/skill-builder/SKILL.md +3 -3
- package/bundled/locales/zh-CN/skills/slo-assistant/guide.md +1 -1
- package/bundled/locales/zh-CN/skills/spec-derivation/SKILL.md +1 -1
- package/bundled/locales/zh-CN/skills/spec-derivation/guide.md +8 -9
- package/bundled/locales/zh-CN/skills/spec-driven-dev/SKILL.md +2 -2
- package/bundled/locales/zh-CN/skills/sweep/SKILL.md +1 -1
- package/bundled/locales/zh-CN/skills/tdd-assistant/SKILL.md +1 -1
- package/bundled/locales/zh-CN/skills/testing-guide/SKILL.md +2 -2
- package/bundled/locales/zh-CN/skills/testing-guide/testing-theory.md +2298 -0
- package/bundled/locales/zh-CN/skills/workflows/README.md +451 -0
- package/bundled/locales/zh-TW/CHANGELOG.md +81 -6
- package/bundled/locales/zh-TW/CLAUDE.md +1 -1
- package/bundled/locales/zh-TW/MAINTENANCE.md +25 -2
- package/bundled/locales/zh-TW/README.md +22 -9
- package/bundled/locales/zh-TW/SECURITY.md +1 -1
- package/bundled/locales/zh-TW/adoption/DAILY-WORKFLOW-GUIDE.md +2 -2
- package/bundled/locales/zh-TW/ai/standards/versioning.ai.yaml +8 -48
- package/bundled/locales/zh-TW/core/acceptance-criteria-traceability.md +4 -6
- package/bundled/locales/zh-TW/core/accessibility-standards.md +1 -1
- package/bundled/locales/zh-TW/core/adversarial-test.md +226 -0
- package/bundled/locales/zh-TW/core/agent-behavior-discipline.md +187 -0
- package/bundled/locales/zh-TW/core/ai-response-navigation.md +32 -6
- package/bundled/locales/zh-TW/core/anti-sycophancy-prompting.md +1 -1
- package/bundled/locales/zh-TW/core/api-design-standards.md +91 -9
- package/bundled/locales/zh-TW/core/audit-trail.md +110 -0
- package/bundled/locales/zh-TW/core/behavior-snapshot.md +335 -0
- package/bundled/locales/zh-TW/core/browser-compatibility-standards.md +1 -0
- package/bundled/locales/zh-TW/core/cd-deployment-strategies.md +135 -0
- package/bundled/locales/zh-TW/core/chaos-injection-tests.md +130 -0
- package/bundled/locales/zh-TW/core/checkin-standards.md +1 -1
- package/bundled/locales/zh-TW/core/code-review-checklist.md +1 -1
- package/bundled/locales/zh-TW/core/container-image-standards.md +93 -0
- package/bundled/locales/zh-TW/core/container-security.md +535 -0
- package/bundled/locales/zh-TW/core/cost-budget-test.md +86 -0
- package/bundled/locales/zh-TW/core/cross-flow-regression.md +1 -0
- package/bundled/locales/zh-TW/core/data-contract.md +101 -0
- package/bundled/locales/zh-TW/core/data-migration-testing.md +217 -0
- package/bundled/locales/zh-TW/core/data-pipeline.md +105 -0
- package/bundled/locales/zh-TW/core/deployment-standards.md +363 -25
- package/bundled/locales/zh-TW/core/deprecation-standards.md +17 -4
- package/bundled/locales/zh-TW/core/developer-memory.md +2 -2
- package/bundled/locales/zh-TW/core/disaster-recovery-drill.md +87 -0
- package/bundled/locales/zh-TW/core/documentation-writing-standards.md +1 -1
- package/bundled/locales/zh-TW/core/error-code-standards.md +2 -2
- package/bundled/locales/zh-TW/core/feature-manifest-standard.md +222 -0
- package/bundled/locales/zh-TW/core/flaky-test-management.md +87 -0
- package/bundled/locales/zh-TW/core/flow-based-testing.md +284 -0
- package/bundled/locales/zh-TW/core/forward-derivation-standards.md +3 -4
- package/bundled/locales/zh-TW/core/full-coverage-testing.md +250 -0
- package/bundled/locales/zh-TW/core/git-worktree.md +1 -1
- package/bundled/locales/zh-TW/core/guides/performance-guide.md +515 -0
- package/bundled/locales/zh-TW/core/guides/security-guide.md +494 -0
- package/bundled/locales/zh-TW/core/iac-design-principles.md +90 -0
- package/bundled/locales/zh-TW/core/incident-response.md +111 -0
- package/bundled/locales/zh-TW/core/license-compliance.md +129 -0
- package/bundled/locales/zh-TW/core/llm-output-validation.md +192 -0
- package/bundled/locales/zh-TW/core/logging-standards.md +208 -4
- package/bundled/locales/zh-TW/core/mock-boundary.md +161 -0
- package/bundled/locales/zh-TW/core/model-provenance.md +173 -0
- package/bundled/locales/zh-TW/core/model-selection.md +28 -5
- package/bundled/locales/zh-TW/core/mutation-testing.md +106 -0
- package/bundled/locales/zh-TW/core/no-cicd-deployment.md +219 -0
- package/bundled/locales/zh-TW/core/packaging-standards.md +76 -5
- package/bundled/locales/zh-TW/core/performance-standards.md +84 -5
- package/bundled/locales/zh-TW/core/pii-classification.md +102 -0
- package/bundled/locales/zh-TW/core/pipeline-security-gates.md +126 -0
- package/bundled/locales/zh-TW/core/policy-as-code-testing.md +203 -0
- package/bundled/locales/zh-TW/core/prd-standards.md +88 -0
- package/bundled/locales/zh-TW/core/privacy-standards.md +1 -1
- package/bundled/locales/zh-TW/core/product-metrics-standards.md +96 -0
- package/bundled/locales/zh-TW/core/project-context-memory.md +1 -1
- package/bundled/locales/zh-TW/core/prompt-regression.md +88 -0
- package/bundled/locales/zh-TW/core/property-based-testing.md +87 -0
- package/bundled/locales/zh-TW/core/refactoring-standards.md +43 -6
- package/bundled/locales/zh-TW/core/release-quality-manifest.md +207 -0
- package/bundled/locales/zh-TW/core/replay-test.md +102 -0
- package/bundled/locales/zh-TW/core/resource-cost-boundary.md +175 -0
- package/bundled/locales/zh-TW/core/reverse-engineering-standards.md +64 -5
- package/bundled/locales/zh-TW/core/rollback-standards.md +120 -0
- package/bundled/locales/zh-TW/core/runbook.md +110 -0
- package/bundled/locales/zh-TW/core/sast-advanced.md +309 -0
- package/bundled/locales/zh-TW/core/schema-evolution.md +98 -0
- package/bundled/locales/zh-TW/core/secret-management-standards.md +101 -0
- package/bundled/locales/zh-TW/core/secure-op.md +328 -0
- package/bundled/locales/zh-TW/core/security-testing.md +96 -0
- package/bundled/locales/zh-TW/core/self-review-protocol.md +2 -2
- package/bundled/locales/zh-TW/core/server-ops-security.md +507 -0
- package/bundled/locales/zh-TW/core/slo-sli.md +108 -0
- package/bundled/locales/zh-TW/core/smoke-test.md +79 -0
- package/bundled/locales/zh-TW/core/spec-driven-development.md +39 -13
- package/bundled/locales/zh-TW/core/supply-chain-attestation.md +131 -0
- package/bundled/locales/zh-TW/core/user-journey-testing.md +111 -0
- package/bundled/locales/zh-TW/core/user-story-mapping.md +94 -0
- package/bundled/locales/zh-TW/core/verification-oracle.md +159 -0
- package/bundled/locales/zh-TW/core/versioning.md +112 -112
- package/bundled/locales/zh-TW/docs/CHEATSHEET.md +31 -6
- package/bundled/locales/zh-TW/docs/DEV-WORKFLOW-MAPPING.md +6 -6
- package/bundled/locales/zh-TW/docs/FEATURE-REFERENCE.md +61 -34
- package/bundled/locales/zh-TW/docs/MIGRATION-v6.md +88 -0
- package/bundled/locales/zh-TW/docs/USAGE-MODES-COMPARISON.md +2 -2
- package/bundled/locales/zh-TW/docs/USER-MANUAL.md +14 -14
- package/bundled/locales/zh-TW/docs/specs/system/memory-adoption-strategy.md +105 -0
- package/bundled/locales/zh-TW/docs/user/FAQ.md +132 -0
- package/bundled/locales/zh-TW/docs/user/GETTING-STARTED.md +144 -0
- package/bundled/locales/zh-TW/docs/user/GLOSSARY.md +178 -0
- package/bundled/locales/zh-TW/docs/user/README.md +70 -0
- package/bundled/locales/zh-TW/docs/user/TROUBLESHOOTING.md +190 -0
- package/bundled/locales/zh-TW/integrations/github-copilot/COPILOT-CHAT-REFERENCE.md +1 -1
- package/bundled/locales/zh-TW/integrations/github-copilot/README.md +1 -1
- package/bundled/locales/zh-TW/integrations/github-copilot/skills-mapping.md +3 -3
- package/bundled/locales/zh-TW/integrations/opencode/skills-mapping.md +3 -3
- package/bundled/locales/zh-TW/methodologies/guides/sdd-guide.md +523 -26
- package/bundled/locales/zh-TW/options/changelog/auto-generated.md +166 -0
- package/bundled/locales/zh-TW/options/changelog/keep-a-changelog.md +140 -0
- package/bundled/locales/zh-TW/options/code-review/automated-review.md +214 -0
- package/bundled/locales/zh-TW/options/code-review/pair-programming.md +166 -0
- package/bundled/locales/zh-TW/options/code-review/pr-review.md +167 -0
- package/bundled/locales/zh-TW/options/documentation/api-docs.md +191 -0
- package/bundled/locales/zh-TW/options/documentation/markdown-docs.md +150 -0
- package/bundled/locales/zh-TW/options/documentation/wiki-style.md +131 -0
- package/bundled/locales/zh-TW/options/project-structure/kotlin.md +144 -0
- package/bundled/locales/zh-TW/options/project-structure/php.md +168 -0
- package/bundled/locales/zh-TW/options/project-structure/ruby.md +156 -0
- package/bundled/locales/zh-TW/options/project-structure/rust.md +136 -0
- package/bundled/locales/zh-TW/options/project-structure/swift.md +165 -0
- package/bundled/locales/zh-TW/options/testing/contract-testing.md +237 -0
- package/bundled/locales/zh-TW/options/testing/industry-pyramid.md +200 -0
- package/bundled/locales/zh-TW/options/testing/istqb-framework.md +144 -0
- package/bundled/locales/zh-TW/options/testing/performance-testing.md +251 -0
- package/bundled/locales/zh-TW/options/testing/security-testing.md +192 -0
- package/bundled/locales/zh-TW/skills/README.md +91 -128
- package/bundled/locales/zh-TW/skills/ac-coverage/SKILL.md +4 -6
- package/bundled/locales/zh-TW/skills/adr-assistant/SKILL.md +1 -1
- package/bundled/locales/zh-TW/skills/agents/code-architect.md +263 -0
- package/bundled/locales/zh-TW/skills/agents/doc-writer.md +410 -0
- package/bundled/locales/zh-TW/skills/agents/reviewer.md +357 -0
- package/bundled/locales/zh-TW/skills/agents/spec-analyst.md +410 -0
- package/bundled/locales/zh-TW/skills/agents/test-specialist.md +368 -0
- package/bundled/locales/zh-TW/skills/ai-collaboration-standards/SKILL.md +2 -2
- package/bundled/locales/zh-TW/skills/ai-friendly-architecture/SKILL.md +2 -2
- package/bundled/locales/zh-TW/skills/ai-instruction-standards/SKILL.md +1 -1
- package/bundled/locales/zh-TW/skills/atdd-assistant/SKILL.md +2 -0
- package/bundled/locales/zh-TW/skills/atdd-assistant/acceptance-criteria-guide.md +1 -1
- package/bundled/locales/zh-TW/skills/atdd-assistant/atdd-workflow.md +3 -4
- package/bundled/locales/zh-TW/skills/audit-assistant/SKILL.md +2 -2
- package/bundled/locales/zh-TW/skills/bdd-assistant/SKILL.md +2 -0
- package/bundled/locales/zh-TW/skills/bdd-assistant/guide.md +1 -2
- package/bundled/locales/zh-TW/skills/brainstorm-assistant/SKILL.md +110 -14
- package/bundled/locales/zh-TW/skills/brainstorm-assistant/guide.md +31 -7
- package/bundled/locales/zh-TW/skills/checkin-assistant/SKILL.md +3 -1
- package/bundled/locales/zh-TW/skills/ci-cd-assistant/SKILL.md +50 -0
- package/bundled/locales/zh-TW/skills/code-review-assistant/SKILL.md +7 -5
- package/bundled/locales/zh-TW/skills/commands/ac-coverage.md +1 -1
- package/bundled/locales/zh-TW/skills/commands/atdd.md +3 -3
- package/bundled/locales/zh-TW/skills/commands/bdd.md +2 -2
- package/bundled/locales/zh-TW/skills/commands/brainstorm.md +26 -17
- package/bundled/locales/zh-TW/skills/commands/{review.md → code-review.md} +5 -5
- package/bundled/locales/zh-TW/skills/commands/derive-all.md +1 -1
- package/bundled/locales/zh-TW/skills/commands/derive-atdd.md +1 -1
- package/bundled/locales/zh-TW/skills/commands/derive-bdd.md +2 -3
- package/bundled/locales/zh-TW/skills/commands/derive-tdd.md +1 -1
- package/bundled/locales/zh-TW/skills/commands/derive.md +1 -1
- package/bundled/locales/zh-TW/skills/commands/dev-workflow.md +2 -2
- package/bundled/locales/zh-TW/skills/commands/methodology.md +4 -4
- package/bundled/locales/zh-TW/skills/commands/pr.md +1 -1
- package/bundled/locales/zh-TW/skills/commands/tdd.md +1 -1
- package/bundled/locales/zh-TW/skills/commit-standards/SKILL.md +1 -1
- package/bundled/locales/zh-TW/skills/contract-test-assistant/SKILL.md +1 -1
- package/bundled/locales/zh-TW/skills/dev-methodology/create-methodology.md +456 -0
- package/bundled/locales/zh-TW/skills/dev-methodology/guide.md +5 -5
- package/bundled/locales/zh-TW/skills/dev-methodology/runtime.md +296 -0
- package/bundled/locales/zh-TW/skills/dev-workflow-guide/SKILL.md +5 -5
- package/bundled/locales/zh-TW/skills/docs-generator/SKILL.md +1 -1
- package/bundled/locales/zh-TW/skills/e2e-assistant/SKILL.md +1 -1
- package/bundled/locales/zh-TW/skills/incident-response-assistant/SKILL.md +2 -2
- package/bundled/locales/zh-TW/skills/logging-guide/SKILL.md +29 -27
- package/bundled/locales/zh-TW/skills/migration-assistant/SKILL.md +1 -1
- package/bundled/locales/zh-TW/skills/pr-automation-assistant/SKILL.md +3 -1
- package/bundled/locales/zh-TW/skills/project-discovery/guide.md +2 -2
- package/bundled/locales/zh-TW/skills/reverse-engineer/SKILL.md +1 -1
- package/bundled/locales/zh-TW/skills/security-assistant/SKILL.md +1 -1
- package/bundled/locales/zh-TW/skills/spec-derivation/guide.md +7 -8
- package/bundled/locales/zh-TW/skills/spec-driven-dev/SKILL.md +2 -2
- package/bundled/locales/zh-TW/skills/sweep/SKILL.md +1 -1
- package/bundled/locales/zh-TW/skills/tdd-assistant/SKILL.md +3 -1
- package/bundled/locales/zh-TW/skills/testing-guide/SKILL.md +2 -2
- package/bundled/locales/zh-TW/skills/testing-guide/testing-theory.md +2298 -0
- package/bundled/locales/zh-TW/skills/workflows/README.md +451 -0
- package/bundled/skills/README.md +1 -1
- package/bundled/skills/ac-coverage/SKILL.md +17 -7
- package/bundled/skills/adr-assistant/SKILL.md +1 -1
- package/bundled/skills/agents/code-architect.md +1 -1
- package/bundled/skills/agents/doc-writer.md +1 -1
- package/bundled/skills/agents/reviewer.md +2 -2
- package/bundled/skills/agents/spec-analyst.md +1 -1
- package/bundled/skills/agents/test-specialist.md +1 -1
- package/bundled/skills/ai-collaboration-standards/SKILL.md +2 -2
- package/bundled/skills/ai-friendly-architecture/SKILL.md +2 -2
- package/bundled/skills/ai-instruction-standards/SKILL.md +1 -1
- package/bundled/skills/atdd-assistant/SKILL.md +7 -0
- package/bundled/skills/atdd-assistant/acceptance-criteria-guide.md +1 -1
- package/bundled/skills/atdd-assistant/atdd-workflow.md +6 -8
- package/bundled/skills/audit-assistant/SKILL.md +2 -2
- package/bundled/skills/bdd-assistant/SKILL.md +7 -0
- package/bundled/skills/bdd-assistant/guide.md +1 -2
- package/bundled/skills/brainstorm-assistant/SKILL.md +133 -11
- package/bundled/skills/brainstorm-assistant/guide.md +33 -5
- package/bundled/skills/checkin-assistant/SKILL.md +8 -1
- package/bundled/skills/ci-cd-assistant/SKILL.md +57 -0
- package/bundled/skills/code-review-assistant/SKILL.md +15 -8
- package/bundled/skills/commands/COMMAND-FAMILY-OVERVIEW.md +2 -2
- package/bundled/skills/commands/COMMAND-INDEX.json +3 -3
- package/bundled/skills/commands/README.md +2 -2
- package/bundled/skills/commands/ac-coverage.md +1 -1
- package/bundled/skills/commands/atdd.md +2 -2
- package/bundled/skills/commands/bdd.md +2 -2
- package/bundled/skills/commands/brainstorm.md +25 -14
- package/bundled/skills/commands/{review.md → code-review.md} +6 -6
- package/bundled/skills/commands/derive-all.md +1 -1
- package/bundled/skills/commands/derive-atdd.md +1 -1
- package/bundled/skills/commands/derive-bdd.md +2 -3
- package/bundled/skills/commands/derive-tdd.md +1 -1
- package/bundled/skills/commands/derive.md +1 -1
- package/bundled/skills/commands/dev-workflow.md +1 -1
- package/bundled/skills/commands/journey-test.md +45 -0
- package/bundled/skills/commands/methodology.md +4 -4
- package/bundled/skills/commands/pr.md +1 -1
- package/bundled/skills/commands/skill-builder.md +42 -0
- package/bundled/skills/commands/tdd.md +1 -1
- package/bundled/skills/dev-methodology/create-methodology.md +1 -1
- package/bundled/skills/dev-methodology/guide.md +1 -1
- package/bundled/skills/dev-methodology/runtime.md +1 -1
- package/bundled/skills/dev-workflow-guide/SKILL.md +3 -3
- package/bundled/skills/dev-workflow-guide/workflow-phases.md +3 -3
- package/bundled/skills/docs-generator/SKILL.md +3 -3
- package/bundled/skills/incident-response-assistant/SKILL.md +2 -2
- package/bundled/skills/logging-guide/SKILL.md +38 -2
- package/bundled/skills/migration-assistant/SKILL.md +226 -0
- package/bundled/skills/observability-assistant/SKILL.md +74 -0
- package/bundled/skills/pr-automation-assistant/SKILL.md +5 -1
- package/bundled/skills/project-discovery/guide.md +2 -2
- package/bundled/skills/push/SKILL.md +1 -1
- package/bundled/skills/release-standards/SKILL.md +19 -5
- package/bundled/skills/security-assistant/SKILL.md +1 -1
- package/bundled/skills/skill-builder/SKILL.md +1 -1
- package/bundled/skills/spec-derivation/guide.md +3 -4
- package/bundled/skills/spec-driven-dev/SKILL.md +27 -0
- package/bundled/skills/sweep/SKILL.md +1 -1
- package/bundled/skills/tdd-assistant/SKILL.md +8 -1
- package/bundled/skills/testing-guide/SKILL.md +1 -1
- package/bundled/skills/testing-guide/testing-theory.md +1 -1
- package/bundled/skills/workflows/README.md +2 -2
- package/package.json +3 -3
- package/src/commands/audit.js +30 -9
- package/src/commands/config.js +33 -2
- package/src/commands/hitl.js +14 -1
- package/src/commands/init.js +110 -58
- package/src/commands/quickstart.js +1 -2
- package/src/commands/release.js +51 -6
- package/src/commands/run-intent.js +9 -0
- package/src/commands/spec-split.js +27 -2
- package/src/commands/update.js +22 -6
- package/src/config/ai-agent-paths.js +3 -1
- package/src/i18n/messages.js +3 -102
- package/src/missions/MissionManager.js +44 -12
- package/src/utils/build-manifest.js +35 -3
- package/src/utils/friction-detector.js +71 -22
- package/src/utils/health-checker.js +29 -2
- package/src/utils/transaction.js +111 -0
- package/src/utils/version-promote.js +16 -0
- package/standards-registry.json +58 -146
- package/bundled/ai/standards/agent-communication-protocol.ai.yaml +0 -42
- package/bundled/ai/standards/agent-dispatch.ai.yaml +0 -42
- package/bundled/ai/standards/branch-completion.ai.yaml +0 -44
- package/bundled/ai/standards/change-batching-standards.ai.yaml +0 -44
- package/bundled/ai/standards/execution-history.ai.yaml +0 -42
- package/bundled/ai/standards/pipeline-integration-standards.ai.yaml +0 -42
- package/bundled/ai/standards/workflow-enforcement.ai.yaml +0 -44
- package/bundled/ai/standards/workflow-state-protocol.ai.yaml +0 -43
- package/src/commands/flow.js +0 -260
- package/src/commands/start.js +0 -372
- package/src/commands/sweep.js +0 -151
- package/src/commands/workflow.js +0 -681
|
@@ -1,8 +1,9 @@
|
|
|
1
1
|
---
|
|
2
|
-
source:
|
|
2
|
+
source: ../../../../methodologies/guides/sdd-guide.md
|
|
3
3
|
source_version: 2.1.0
|
|
4
4
|
translation_version: 2.1.0
|
|
5
|
-
last_synced: 2026-
|
|
5
|
+
last_synced: 2026-06-10
|
|
6
|
+
source_hash: 972eba45ce66
|
|
6
7
|
status: current
|
|
7
8
|
---
|
|
8
9
|
|
|
@@ -13,7 +14,7 @@ status: current
|
|
|
13
14
|
**適用範圍**: 所有採用規格驅動開發的專案
|
|
14
15
|
**範圍**: universal
|
|
15
16
|
|
|
16
|
-
> **語言**: [English](../../../../
|
|
17
|
+
> **語言**: [English](../../../../methodologies/guides/sdd-guide.md) | [繁體中文](../../methodologies/guides/sdd-guide.md)
|
|
17
18
|
|
|
18
19
|
---
|
|
19
20
|
|
|
@@ -28,6 +29,223 @@ status: current
|
|
|
28
29
|
|
|
29
30
|
---
|
|
30
31
|
|
|
32
|
+
## SDD 作為獨立方法論
|
|
33
|
+
|
|
34
|
+
SDD(規格驅動開發,2025)是 AI 時代的方法論,有別於傳統的 TDD/BDD/ATDD 家族。它源於 AI 輔助開發工具的廣泛採用,以及現代軟體工程對「規格優先」方法的需求。
|
|
35
|
+
|
|
36
|
+
### 歷史背景
|
|
37
|
+
|
|
38
|
+
| 方法論家族 | 時代 | 核心文獻 | 關係 |
|
|
39
|
+
|-----------|------|----------|------|
|
|
40
|
+
| **TDD/BDD/ATDD** | 1999-2011 | GOOS(Freeman & Pryce)、Dan North、Gojko Adzic | 傳統測試驅動開發家族 |
|
|
41
|
+
| **SDD (2025)** | 2025+ | Thoughtworks、GitHub spec-kit、Martin Fowler | AI 時代新興概念,與傳統家族獨立 |
|
|
42
|
+
|
|
43
|
+
### 與測試方法論的關係
|
|
44
|
+
|
|
45
|
+
SDD **不屬於** "ATDD → BDD → TDD" 序列。它透過正向推演生成測試產出物,但仍是獨立方法論。
|
|
46
|
+
|
|
47
|
+
| 方法論 | 起源 | 焦點 | SDD 整合方式 |
|
|
48
|
+
|--------|------|------|-------------|
|
|
49
|
+
| **TDD** | 1999,Kent Beck | 程式碼層級測試 | 可用於 SDD 實作階段 |
|
|
50
|
+
| **BDD** | 2006,Dan North | 行為情境 | 正向推演生成 .feature 檔案 |
|
|
51
|
+
| **ATDD** | 2003-2006,GOOS | 協作驗收 | 可選的 AC 定義輸入方式 |
|
|
52
|
+
|
|
53
|
+
### 關鍵區別
|
|
54
|
+
|
|
55
|
+
```
|
|
56
|
+
┌─────────────────────────────────────────────────────────────────────────────┐
|
|
57
|
+
│ 兩套獨立方法論系統 │
|
|
58
|
+
├─────────────────────────────────────────────────────────────────────────────┤
|
|
59
|
+
│ │
|
|
60
|
+
│ ┌─────────────────────────────────────┐ │
|
|
61
|
+
│ │ SDD(AI 時代方法論) │ │
|
|
62
|
+
│ │ │ │
|
|
63
|
+
│ │ 需求 → SPEC.md → 正向推演 → 測試 │ │
|
|
64
|
+
│ │ │ │
|
|
65
|
+
│ │ • 規格是權威來源 │ │
|
|
66
|
+
│ │ • AI 輔助程式碼生成 │ │
|
|
67
|
+
│ │ • 正向推演生成測試結構 │ │
|
|
68
|
+
│ └─────────────────────────────────────┘ │
|
|
69
|
+
│ │
|
|
70
|
+
│ ┌─────────────────────────────────────┐ │
|
|
71
|
+
│ │ 雙迴圈 TDD(傳統) │ │
|
|
72
|
+
│ │ │ │
|
|
73
|
+
│ │ BDD(外迴圈)→ TDD(內迴圈) │ │
|
|
74
|
+
│ │ │ │
|
|
75
|
+
│ │ • 測試驅動設計 │ │
|
|
76
|
+
│ │ • 手動開發 │ │
|
|
77
|
+
│ │ • ATDD 是可選的協作輸入, │ │
|
|
78
|
+
│ │ 而非循序步驟 │ │
|
|
79
|
+
│ └─────────────────────────────────────┘ │
|
|
80
|
+
│ │
|
|
81
|
+
└─────────────────────────────────────────────────────────────────────────────┘
|
|
82
|
+
```
|
|
83
|
+
|
|
84
|
+
---
|
|
85
|
+
|
|
86
|
+
## SDD 成熟度等級
|
|
87
|
+
|
|
88
|
+
根據 Martin Fowler 對 SDD 工具的分析(2025),團隊可在不同成熟度等級運作:
|
|
89
|
+
|
|
90
|
+
| 等級 | 名稱 | 說明 | 人類角色 |
|
|
91
|
+
|------|------|------|---------|
|
|
92
|
+
| 1 | **規格優先** | 先寫規格,完成後丟棄 | 編輯規格與程式碼 |
|
|
93
|
+
| 2 | **規格錨定** | 在整個演進過程維護規格 | 編輯規格,AI 輔助程式碼 |
|
|
94
|
+
| 3 | **規格即來源** | 規格是唯一來源,程式碼自動生成 | 只編輯規格,絕不碰程式碼 |
|
|
95
|
+
|
|
96
|
+
### 等級特性
|
|
97
|
+
|
|
98
|
+
**等級 1:規格優先**
|
|
99
|
+
- 在實作前撰寫規格
|
|
100
|
+
- 功能完成後可丟棄規格
|
|
101
|
+
- 程式碼仍是權威來源
|
|
102
|
+
- 2025 年最常見
|
|
103
|
+
|
|
104
|
+
**等級 2:規格錨定**
|
|
105
|
+
- 在整個生命週期維護規格
|
|
106
|
+
- 規格用於演進與維護
|
|
107
|
+
- AI 根據規格更新協助程式碼變更
|
|
108
|
+
- 在企業環境中逐步採用
|
|
109
|
+
|
|
110
|
+
**等級 3:規格即來源**
|
|
111
|
+
- 規格是唯一的真實來源
|
|
112
|
+
- 程式碼標注 "GENERATED - DO NOT EDIT"
|
|
113
|
+
- 任何變更都需先修改規格
|
|
114
|
+
- 2025 年仍在實驗階段
|
|
115
|
+
|
|
116
|
+
### 參考資料
|
|
117
|
+
|
|
118
|
+
- [Thoughtworks: Spec-Driven Development](https://www.thoughtworks.com/en-us/insights/blog/agile-engineering-practices/spec-driven-development-unpacking-2025-new-engineering-practices)
|
|
119
|
+
- [Martin Fowler: SDD Tools (Kiro, spec-kit, Tessl)](https://martinfowler.com/articles/exploring-gen-ai/sdd-3-tools.html)
|
|
120
|
+
- [GitHub spec-kit](https://github.com/github/spec-kit/blob/main/spec-driven.md)
|
|
121
|
+
|
|
122
|
+
---
|
|
123
|
+
|
|
124
|
+
## 常見陷阱
|
|
125
|
+
|
|
126
|
+
採用 SDD 時應避免以下常見陷阱:
|
|
127
|
+
|
|
128
|
+
| 陷阱 | 問題 | 緩解措施 |
|
|
129
|
+
|------|------|---------|
|
|
130
|
+
| **過度形式化** | 像瀑布開發一樣拖慢回饋速度 | 保持迭代,使用短週期 |
|
|
131
|
+
| **規格漂移** | 規格與程式碼不同步 | 持續驗證,在 CI/CD 中做漂移偵測 |
|
|
132
|
+
| **AI 幻覺** | AI 生成的程式碼與規格不符 | 強健的驗證、契約測試 |
|
|
133
|
+
| **尺寸不符** | 對小 bug 使用重量級流程 | 根據複雜度選擇合適流程 |
|
|
134
|
+
| **過早優化** | 跳躍至規格即來源(等級 3) | 從規格優先開始,逐步演進 |
|
|
135
|
+
|
|
136
|
+
### 何時不使用完整 SDD
|
|
137
|
+
|
|
138
|
+
| 情境 | 建議 |
|
|
139
|
+
|------|------|
|
|
140
|
+
| 關鍵熱修復 | 先修復,後補文件 |
|
|
141
|
+
| 錯字與格式 | 直接 commit,不需規格 |
|
|
142
|
+
| 探索性原型 | 跳過正式規格,快速迭代 |
|
|
143
|
+
| 瑣碎 bug 修復(錯字層級、無共用程式碼) | 僅輕量追蹤 |
|
|
144
|
+
| 易回歸 bug 修復(共用程式碼 / 遷移 / 曾破壞路徑) | 使用下方的 Bugfix 規格模板 |
|
|
145
|
+
|
|
146
|
+
---
|
|
147
|
+
|
|
148
|
+
## 變更評估(SDD 前置評估)
|
|
149
|
+
|
|
150
|
+
開始 SDD 工作流程前,先評估變更的性質與範圍。這能防止過度工程化,確保變更被正確路由。
|
|
151
|
+
|
|
152
|
+
### 評估決策樹
|
|
153
|
+
|
|
154
|
+
```
|
|
155
|
+
新需求/變更
|
|
156
|
+
│
|
|
157
|
+
▼
|
|
158
|
+
┌─────────────────────────────────────────────────────────┐
|
|
159
|
+
│ Q1: 這個變更的適用範圍是什麼? │
|
|
160
|
+
│ What is the scope of this change? │
|
|
161
|
+
├─────────────────────────────────────────────────────────┤
|
|
162
|
+
│ A) 僅限專案內部使用 │
|
|
163
|
+
│ → 加入 CLAUDE.md 或專案設定 │
|
|
164
|
+
│ → 不需要核心標準 │
|
|
165
|
+
│ │
|
|
166
|
+
│ B) 可被其他專案複用的規則 │
|
|
167
|
+
│ → 建立核心標準 │
|
|
168
|
+
│ → 評估是否需要 Skill/Command │
|
|
169
|
+
└─────────────────────────────────────────────────────────┘
|
|
170
|
+
│
|
|
171
|
+
▼
|
|
172
|
+
┌─────────────────────────────────────────────────────────┐
|
|
173
|
+
│ Q2: 這個功能需要 AI 互動嗎? │
|
|
174
|
+
│ Does this feature require AI interaction? │
|
|
175
|
+
├─────────────────────────────────────────────────────────┤
|
|
176
|
+
│ A) 需要互動式工作流程 │
|
|
177
|
+
│ → 建立 Skill │
|
|
178
|
+
│ → 評估是否需要 Slash Command │
|
|
179
|
+
│ │
|
|
180
|
+
│ B) 靜態規則 / 背景知識 │
|
|
181
|
+
│ → 僅建核心標準 │
|
|
182
|
+
│ → 在 CLAUDE.md 中引用 │
|
|
183
|
+
└─────────────────────────────────────────────────────────┘
|
|
184
|
+
│
|
|
185
|
+
▼
|
|
186
|
+
┌─────────────────────────────────────────────────────────┐
|
|
187
|
+
│ Q3: 使用者需要直接觸發嗎? │
|
|
188
|
+
│ Does the user need to trigger this directly? │
|
|
189
|
+
├─────────────────────────────────────────────────────────┤
|
|
190
|
+
│ A) 需要 /command 觸發 │
|
|
191
|
+
│ → 建立 Slash Command │
|
|
192
|
+
│ │
|
|
193
|
+
│ B) AI 自動套用 │
|
|
194
|
+
│ → 僅建 Skill,不需要 Command │
|
|
195
|
+
└─────────────────────────────────────────────────────────┘
|
|
196
|
+
```
|
|
197
|
+
|
|
198
|
+
### 評估結果
|
|
199
|
+
|
|
200
|
+
| 評估結果 | 需建立的產出物 |
|
|
201
|
+
|---------|-------------|
|
|
202
|
+
| 僅限專案 | 僅更新 CLAUDE.md |
|
|
203
|
+
| 通用靜態規則 | 核心標準 + CLAUDE.md 引用 |
|
|
204
|
+
| 通用互動式 | 核心標準 + Skill |
|
|
205
|
+
| 使用者觸發工作流程 | 核心標準 + Skill + Command |
|
|
206
|
+
|
|
207
|
+
### 範圍分類標籤
|
|
208
|
+
|
|
209
|
+
在規格文件中使用以下標籤標示範圍:
|
|
210
|
+
|
|
211
|
+
| 標籤 | 含義 | 範例 |
|
|
212
|
+
|------|------|------|
|
|
213
|
+
| `[Scope: Project]` | 專案專用,不對外發布 | CI/CD 設定、團隊慣例 |
|
|
214
|
+
| `[Scope: Universal]` | 可被其他專案複用 | 編碼標準、測試模式 |
|
|
215
|
+
| `[Scope: Utility]` | 工具/生成器,不需核心標準 | docs-generator、code-formatter |
|
|
216
|
+
|
|
217
|
+
---
|
|
218
|
+
|
|
219
|
+
## Bugfix 規格模板(易回歸修復)
|
|
220
|
+
|
|
221
|
+
> XSPEC-264。不是每個 bug 都需要規格——**瑣碎** bug 保持輕量即可。但**易回歸**的修復
|
|
222
|
+
>(觸及共用程式碼、遷移或曾被修復又破壞的路徑)值得一份輕量的
|
|
223
|
+
> `<BUG-ID>.bugfix.md`——比功能規格便宜得多,比盲目修補安全得多。
|
|
224
|
+
|
|
225
|
+
```markdown
|
|
226
|
+
# <BUG-ID>: <簡短標題>
|
|
227
|
+
|
|
228
|
+
## Current behavior(當前行為)
|
|
229
|
+
現在發生的事(缺陷) + 重現步驟。
|
|
230
|
+
|
|
231
|
+
## Expected behavior(預期行為)
|
|
232
|
+
應該發生的事。
|
|
233
|
+
|
|
234
|
+
## Unchanged behavior(不變行為)
|
|
235
|
+
明確列出**不應改變**的內容——回歸防護範圍。
|
|
236
|
+
|
|
237
|
+
## Root cause(根本原因)
|
|
238
|
+
連結系統性除錯分析(5 個為什麼 / 二分法)。
|
|
239
|
+
|
|
240
|
+
## Regression test(回歸測試)
|
|
241
|
+
修復前失敗、修復後通過的測試——並且斷言「不變行為」仍然成立。
|
|
242
|
+
將此測試視為 AC(acceptance-criteria-traceability: `@AC <BUG-ID>`)。
|
|
243
|
+
```
|
|
244
|
+
|
|
245
|
+
**使用時機**(參見上方變更評估表):瑣碎 → 輕量;易回歸 → 使用此模板。`Unchanged behavior`(不變行為)+ `Regression test`(回歸測試)兩節,正是 UDS 自身的遷移/重構回歸(XSPEC-199/200/201)屢屢缺少的。設計上保持輕量;不要把瑣碎 bug 升級。
|
|
246
|
+
|
|
247
|
+
---
|
|
248
|
+
|
|
31
249
|
## SDD 工作流程
|
|
32
250
|
|
|
33
251
|
```
|
|
@@ -45,12 +263,61 @@ status: current
|
|
|
45
263
|
|
|
46
264
|
| 階段 | 說明 | 產出物 |
|
|
47
265
|
|------|------|--------|
|
|
48
|
-
| **討論** |
|
|
266
|
+
| **討論** | 釐清灰色地帶、鎖定範圍、建立 read_first 清單 | 範圍定義、規範參考 |
|
|
49
267
|
| **提案** | 定義變更內容與原因 | `proposal.md` |
|
|
50
268
|
| **審查** | 利害關係人核准 | 審查意見、核准紀錄 |
|
|
51
269
|
| **實作** | 執行已核准的規格 | 程式碼、測試、文件 |
|
|
52
|
-
| **驗證** |
|
|
53
|
-
| **歸檔** | 關閉並歸檔規格 |
|
|
270
|
+
| **驗證** | 確認實作符合規格(最多 3 次迭代) | 測試結果、追蹤矩陣 |
|
|
271
|
+
| **歸檔** | 關閉並歸檔規格 | 已歸檔規格及 commits/PRs 連結 |
|
|
272
|
+
|
|
273
|
+
---
|
|
274
|
+
|
|
275
|
+
## 雙向同步評估
|
|
276
|
+
|
|
277
|
+
處理規格及其實作時,始終評估哪些內容需要同步。變更可能來自任何產出物,並應傳播至相關產出物。
|
|
278
|
+
|
|
279
|
+
### 同步矩陣
|
|
280
|
+
|
|
281
|
+
| 變更來源 | 需評估同步至 |
|
|
282
|
+
|---------|------------|
|
|
283
|
+
| 核心標準 | → Skills、Commands、AI YAML、翻譯 |
|
|
284
|
+
| Skill | → 核心標準(如適用)、Commands、翻譯 |
|
|
285
|
+
| Command | → Skill、核心標準(如適用)、翻譯 |
|
|
286
|
+
|
|
287
|
+
### 同步檢查清單範本
|
|
288
|
+
|
|
289
|
+
在規格文件中加入此檢查清單:
|
|
290
|
+
|
|
291
|
+
```markdown
|
|
292
|
+
## Sync Checklist(同步檢查清單)
|
|
293
|
+
|
|
294
|
+
### 從核心標準出發
|
|
295
|
+
- [ ] 建立/更新對應的 Skill?(若需互動)
|
|
296
|
+
- [ ] 建立/更新 Slash Command?(若需使用者觸發)
|
|
297
|
+
- [ ] 更新翻譯?(zh-TW、zh-CN 等)
|
|
298
|
+
- [ ] 更新 AI YAML 版本?(如適用)
|
|
299
|
+
|
|
300
|
+
### 從 Skill 出發
|
|
301
|
+
- [ ] 此 Skill 應有核心標準嗎?
|
|
302
|
+
- [ ] 若為工具 Skill(如 docs-generator),標記為 "[Scope: Utility]"?
|
|
303
|
+
- [ ] 建立 Slash Command?
|
|
304
|
+
- [ ] 更新翻譯?
|
|
305
|
+
|
|
306
|
+
### 從 Command 出發
|
|
307
|
+
- [ ] 此 Command 屬於哪個 Skill?
|
|
308
|
+
- [ ] 更新 Skill 文件?
|
|
309
|
+
- [ ] 更新翻譯?
|
|
310
|
+
```
|
|
311
|
+
|
|
312
|
+
### 同步標記
|
|
313
|
+
|
|
314
|
+
在文件中使用以下標記表示同步狀態:
|
|
315
|
+
|
|
316
|
+
| 標記 | 含義 |
|
|
317
|
+
|------|------|
|
|
318
|
+
| `[Synced: ✓]` | 所有相關產出物已同步 |
|
|
319
|
+
| `[Synced: Pending]` | 需要同步但尚未完成 |
|
|
320
|
+
| `[Synced: N/A]` | 沒有需要同步的相關產出物(如獨立工具) |
|
|
54
321
|
|
|
55
322
|
---
|
|
56
323
|
|
|
@@ -58,7 +325,7 @@ status: current
|
|
|
58
325
|
|
|
59
326
|
### 1. SDD 工具命令優先
|
|
60
327
|
|
|
61
|
-
**規則**: 當專案整合了 SDD 工具(如 OpenSpec
|
|
328
|
+
**規則**: 當專案整合了 SDD 工具(如 OpenSpec、Spec Kit 等)且該工具提供特定命令(例如 `/openspec` 或 `/spec` 等斜線命令)時,AI 助手**必須優先使用這些命令**,而非直接手動編輯檔案。
|
|
62
329
|
|
|
63
330
|
**理由**:
|
|
64
331
|
- **一致性**: 工具確保規格結構遵循嚴格的架構。
|
|
@@ -75,7 +342,7 @@ status: current
|
|
|
75
342
|
**規則**: SDD 是一種方法論,不綁定於單一工具。雖然 OpenSpec 是常見的實作,但本標準適用於任何 SDD 工具(例如 Spec Kit)。
|
|
76
343
|
|
|
77
344
|
**指引**:
|
|
78
|
-
- **通用流程**: 討論
|
|
345
|
+
- **通用流程**: 討論 → 提案 → 審查 → 實作 → 驗證 → 歸檔。
|
|
79
346
|
- **工具適應**: 適應工作區中啟用之 SDD 工具的特定命令與模式。
|
|
80
347
|
|
|
81
348
|
---
|
|
@@ -224,11 +491,11 @@ Refs: SPEC-001
|
|
|
224
491
|
|
|
225
492
|
當規格透過反向工程生成時:
|
|
226
493
|
|
|
227
|
-
1.
|
|
228
|
-
2.
|
|
229
|
-
3.
|
|
230
|
-
4.
|
|
231
|
-
5.
|
|
494
|
+
1. **標記狀態**: 在元資料中包含 `Status: Draft (Reverse-Engineered)`
|
|
495
|
+
2. **填寫未知**: 所有 `[Unknown]` 區塊必須由人類在核准前填寫
|
|
496
|
+
3. **驗證推論**: 所有 `[Inferred]` 項目必須經過審查和確認
|
|
497
|
+
4. **標準審查**: 在實作前遵循正常 SDD 審查流程
|
|
498
|
+
5. **來源引用**: 維護 file:line 參考以確保可追溯性
|
|
232
499
|
|
|
233
500
|
### 何時使用反向工程
|
|
234
501
|
|
|
@@ -249,6 +516,216 @@ Refs: SPEC-001
|
|
|
249
516
|
|
|
250
517
|
---
|
|
251
518
|
|
|
519
|
+
## 與正向推演整合
|
|
520
|
+
|
|
521
|
+
### 概述
|
|
522
|
+
|
|
523
|
+
規格核准後,使用[正向推演標準](../../core/forward-derivation-standards.md)從驗收條件自動生成 BDD 情境、TDD 測試骨架和 ATDD 驗收測試。
|
|
524
|
+
|
|
525
|
+
### 正向推演 → SDD 流水線
|
|
526
|
+
|
|
527
|
+
```
|
|
528
|
+
┌─────────────────────────────────────────────────────────────────────────┐
|
|
529
|
+
│ 已核准規格 → 正向推演流水線 │
|
|
530
|
+
├─────────────────────────────────────────────────────────────────────────┤
|
|
531
|
+
│ │
|
|
532
|
+
│ APPROVED SPEC-XXX.md │
|
|
533
|
+
│ │ │
|
|
534
|
+
│ ▼ │
|
|
535
|
+
│ ┌────────────────────────────────────────────────────────────┐ │
|
|
536
|
+
│ │ /derive-all specs/SPEC-XXX.md │ │
|
|
537
|
+
│ │ • 解析驗收條件 │ │
|
|
538
|
+
│ │ • 轉換 AC → Gherkin 情境 [已生成] │ │
|
|
539
|
+
│ │ • 生成 TDD 測試骨架 [已生成] │ │
|
|
540
|
+
│ │ • 建立 ATDD 驗收表格 [已生成] │ │
|
|
541
|
+
│ └────────────────────────────────────────────────────────────┘ │
|
|
542
|
+
│ │ │
|
|
543
|
+
│ ▼ │
|
|
544
|
+
│ 輸出檔案 │
|
|
545
|
+
│ ├── features/SPEC-XXX.feature(BDD) │
|
|
546
|
+
│ ├── tests/SPEC-XXX.test.ts(TDD) │
|
|
547
|
+
│ └── acceptance/SPEC-XXX-acceptance.md(ATDD) │
|
|
548
|
+
│ │ │
|
|
549
|
+
│ ▼ │
|
|
550
|
+
│ 人類審查 → BDD/TDD 工作流程繼續 │
|
|
551
|
+
│ │
|
|
552
|
+
└─────────────────────────────────────────────────────────────────────────┘
|
|
553
|
+
```
|
|
554
|
+
|
|
555
|
+
### 何時使用正向推演
|
|
556
|
+
|
|
557
|
+
| 情境 | 做法 |
|
|
558
|
+
|------|------|
|
|
559
|
+
| 規格已核准,開始實作 | 用 `/derive-all` 生成測試結構 |
|
|
560
|
+
| 快速需要 BDD 情境 | 用 `/derive-bdd` 生成 Gherkin |
|
|
561
|
+
| 開始 TDD 工作流程 | 用 `/derive-tdd` 生成測試骨架 |
|
|
562
|
+
| 手動驗收測試 | 用 `/derive-atdd` 生成測試表格 |
|
|
563
|
+
|
|
564
|
+
### 相關命令
|
|
565
|
+
|
|
566
|
+
| 命令 | 輸入 | 輸出 | 用途 |
|
|
567
|
+
|------|------|------|------|
|
|
568
|
+
| `/derive-bdd` | SPEC-XXX.md | .feature | AC → Gherkin 情境 |
|
|
569
|
+
| `/derive-tdd` | SPEC-XXX.md | .test.ts | AC → 測試骨架 |
|
|
570
|
+
| `/derive-atdd` | SPEC-XXX.md | acceptance.md | AC → 測試表格 |
|
|
571
|
+
| `/derive-all` | SPEC-XXX.md | 以上全部 | 完整推演流水線 |
|
|
572
|
+
| `/derive-contracts` | SPEC-XXX.md | contract.json, schema.json | AC → 契約驗證 |
|
|
573
|
+
|
|
574
|
+
---
|
|
575
|
+
|
|
576
|
+
## 驗證層
|
|
577
|
+
|
|
578
|
+
SDD 需要強健的驗證機制,確保生成的程式碼與規格一致。驗證層在整個開發生命週期提供持續驗證。
|
|
579
|
+
|
|
580
|
+
### 理論基礎
|
|
581
|
+
|
|
582
|
+
| 理論 | 來源 | 在 SDD 中的應用 |
|
|
583
|
+
|------|------|---------------|
|
|
584
|
+
| **契約式設計** | Bertrand Meyer, 1986 | AC 作為前後置條件 |
|
|
585
|
+
| **正式驗證** | 電腦科學 | 規格 vs 實作 |
|
|
586
|
+
| **規格即範例** | Gojko Adzic, 2011 | 可執行規格 |
|
|
587
|
+
| **契約測試** | Pact, 2013+ | 服務契約驗證 |
|
|
588
|
+
|
|
589
|
+
### 驗證機制
|
|
590
|
+
|
|
591
|
+
| 機制 | 用途 | 工具 |
|
|
592
|
+
|------|------|------|
|
|
593
|
+
| **契約測試** | 驗證實作是否遵守介面保證 | Pact、Spring Cloud Contract、Specmatic |
|
|
594
|
+
| **Schema 驗證** | 拒絕違反結構要求的 payload | JSON Schema、OpenAPI 驗證器 |
|
|
595
|
+
| **漂移偵測** | 偵測規格與行為的偏離 | CI/CD 整合、Specmatic |
|
|
596
|
+
| **向後相容性** | 將變更分類為新增/破壞性 | OpenAPI diff 工具 |
|
|
597
|
+
|
|
598
|
+
### SDD 驗證流程
|
|
599
|
+
|
|
600
|
+
```
|
|
601
|
+
┌─────────────────────────────────────────────────────────────────────────────┐
|
|
602
|
+
│ SDD 驗證層 │
|
|
603
|
+
├─────────────────────────────────────────────────────────────────────────────┤
|
|
604
|
+
│ │
|
|
605
|
+
│ SPEC-XXX.md(已核准) │
|
|
606
|
+
│ │ │
|
|
607
|
+
│ ├──→ 正向推演 │
|
|
608
|
+
│ │ │ │
|
|
609
|
+
│ │ ├──→ 契約測試(已生成) │
|
|
610
|
+
│ │ ├──→ Schema 驗證器(已生成) │
|
|
611
|
+
│ │ ├──→ BDD 情境(已生成) │
|
|
612
|
+
│ │ └──→ TDD 骨架(已生成) │
|
|
613
|
+
│ │ │
|
|
614
|
+
│ └──→ 實作(AI 輔助) │
|
|
615
|
+
│ │ │
|
|
616
|
+
│ ▼ │
|
|
617
|
+
│ ┌─────────────────────────────────────────────────────┐ │
|
|
618
|
+
│ │ 持續驗證 │ │
|
|
619
|
+
│ │ ┌─────────────────────────────────────────────────┐│ │
|
|
620
|
+
│ │ │ 契約測試 ✓/✗ ││ │
|
|
621
|
+
│ │ │ Schema 驗證 ✓/✗ ││ │
|
|
622
|
+
│ │ │ 漂移偵測 ✓/✗ ││ │
|
|
623
|
+
│ │ │ BDD 情境 ✓/✗ ││ │
|
|
624
|
+
│ │ │ TDD 單元測試 ✓/✗ ││ │
|
|
625
|
+
│ │ └─────────────────────────────────────────────────┘│ │
|
|
626
|
+
│ └─────────────────────────────────────────────────────┘ │
|
|
627
|
+
│ │ │
|
|
628
|
+
│ ▼ │
|
|
629
|
+
│ 驗證報告 → 歸檔或迭代 │
|
|
630
|
+
│ │
|
|
631
|
+
└─────────────────────────────────────────────────────────────────────────────┘
|
|
632
|
+
```
|
|
633
|
+
|
|
634
|
+
### 生成的驗證產出物
|
|
635
|
+
|
|
636
|
+
| 產出物 | 用途 | 驗證角色 |
|
|
637
|
+
|--------|------|---------|
|
|
638
|
+
| `.feature`(BDD) | 行為情境 | 驗收驗證 |
|
|
639
|
+
| `.test.ts`(TDD) | 單元測試骨架 | 實作驗證 |
|
|
640
|
+
| `acceptance.md`(ATDD) | 驗收測試表格 | 商業驗證 |
|
|
641
|
+
| `contract.json` | 契約定義 | 介面驗證 |
|
|
642
|
+
| `schema.json` | Schema 定義 | 結構驗證 |
|
|
643
|
+
|
|
644
|
+
### SDD 中的 V&V
|
|
645
|
+
|
|
646
|
+
- **驗證(Verification)**(正確地建造):契約測試通過、schema 有效、程式碼符合規格
|
|
647
|
+
- **確認(Validation)**(建造正確的東西):AC 達成、利害關係人核准、商業價值交付
|
|
648
|
+
|
|
649
|
+
### 參考資料
|
|
650
|
+
|
|
651
|
+
- [InfoQ: Spec-Driven Development - Validation Layer](https://www.infoq.com/articles/spec-driven-development/)
|
|
652
|
+
- [Microsoft: Consumer-Driven Contract Testing](https://microsoft.github.io/code-with-engineering-playbook/automated-testing/cdc-testing/)
|
|
653
|
+
- [Wikipedia: Formal Verification](https://en.wikipedia.org/wiki/Formal_verification)
|
|
654
|
+
- [Specmatic: AI-powered API Contract Testing](https://specmatic.io/)
|
|
655
|
+
|
|
656
|
+
---
|
|
657
|
+
|
|
658
|
+
## SDD + 測試整合模型
|
|
659
|
+
|
|
660
|
+
### 理論基礎
|
|
661
|
+
|
|
662
|
+
SDD 驗證植基於成熟的測試理論:
|
|
663
|
+
|
|
664
|
+
```
|
|
665
|
+
契約式設計(1986) 規格即範例(2011)
|
|
666
|
+
│ │
|
|
667
|
+
▼ ▼
|
|
668
|
+
┌───────────────────────────────────────────────────────────────┐
|
|
669
|
+
│ SDD 驗證模型 │
|
|
670
|
+
│ │
|
|
671
|
+
│ 規格(AC) ←──→ 契約測試 ←──→ 實作 │
|
|
672
|
+
│ ↑ ↑ ↓ │
|
|
673
|
+
│ 前後置 驗證 執行時 │
|
|
674
|
+
│ 條件 機制 行為 │
|
|
675
|
+
└───────────────────────────────────────────────────────────────┘
|
|
676
|
+
```
|
|
677
|
+
|
|
678
|
+
### 整合點
|
|
679
|
+
|
|
680
|
+
| SDD 階段 | 測試整合 | 理論 |
|
|
681
|
+
|---------|---------|------|
|
|
682
|
+
| **規格撰寫** | AC = 前後置條件 | 契約式設計 |
|
|
683
|
+
| **正向推演** | 生成契約測試 | 可執行規格 |
|
|
684
|
+
| **實作** | TDD(可選) | 測試驅動開發 |
|
|
685
|
+
| **驗證** | 契約測試 + 漂移偵測 | 執行時驗證 |
|
|
686
|
+
| **歸檔** | 測試結果作為證據 | 可追溯性 |
|
|
687
|
+
|
|
688
|
+
### 實務工作流程
|
|
689
|
+
|
|
690
|
+
```
|
|
691
|
+
┌─────────────────────────────────────────────────────────────────────────────┐
|
|
692
|
+
│ 實務 SDD 工作流程 │
|
|
693
|
+
├─────────────────────────────────────────────────────────────────────────────┤
|
|
694
|
+
│ │
|
|
695
|
+
│ 【輸入來源】(以下任一) │
|
|
696
|
+
│ ├── 需求訪談(最常見) │
|
|
697
|
+
│ ├── 利害關係人郵件/文件 │
|
|
698
|
+
│ ├── 產品需求文件(PRD) │
|
|
699
|
+
│ └── ATDD 工作坊(可選協作) │
|
|
700
|
+
│ ↓ │
|
|
701
|
+
│ 【SDD 提案撰寫】 │
|
|
702
|
+
│ SPEC-XXX.md 包含: │
|
|
703
|
+
│ - 摘要、動機 │
|
|
704
|
+
│ - 詳細設計 │
|
|
705
|
+
│ - 驗收條件(Given-When-Then) │
|
|
706
|
+
│ - 相依性、風險 │
|
|
707
|
+
│ ↓ │
|
|
708
|
+
│ 【審查與核准】 │
|
|
709
|
+
│ ↓ │
|
|
710
|
+
│ 【正向推演】 │
|
|
711
|
+
│ /derive-all → .feature, .test.ts, acceptance.md, contract.json │
|
|
712
|
+
│ ↓ │
|
|
713
|
+
│ 【實作】(TDD 可選) │
|
|
714
|
+
│ ↓ │
|
|
715
|
+
│ 【驗證】→ 【歸檔】 │
|
|
716
|
+
│ │
|
|
717
|
+
└─────────────────────────────────────────────────────────────────────────────┘
|
|
718
|
+
```
|
|
719
|
+
|
|
720
|
+
### 與傳統方法的主要調整
|
|
721
|
+
|
|
722
|
+
1. **ATDD 工作坊是可選的**: 不是每個功能都需要正式工作坊
|
|
723
|
+
2. **規格是起點**: 無論輸入來源為何,均轉換為 SPEC-XXX.md
|
|
724
|
+
3. **Given-When-Then 已內嵌**: AC 格式借鑒 BDD,但不要求正式的 ATDD 流程
|
|
725
|
+
4. **正向推演填補缺口**: 自動生成測試結構,彌補無工作坊的不足
|
|
726
|
+
|
|
727
|
+
---
|
|
728
|
+
|
|
252
729
|
## 與正向/反向工程的整合
|
|
253
730
|
|
|
254
731
|
本標準與兩個互補標準共同組成完整的規格生態系統:
|
|
@@ -299,17 +776,17 @@ Refs: SPEC-001
|
|
|
299
776
|
|
|
300
777
|
## 相關標準
|
|
301
778
|
|
|
302
|
-
- [正向推演標準](../../core/forward-derivation-standards.md)
|
|
303
|
-
- [反向工程標準](../../core/reverse-engineering-standards.md)
|
|
304
|
-
- [測試驅動開發](../../core/test-driven-development.md)
|
|
305
|
-
- [行為驅動開發](
|
|
306
|
-
- [驗收測試驅動開發](
|
|
307
|
-
- [測試標準](../../core/testing-standards.md)
|
|
308
|
-
- [測試完整性維度](../../core/test-completeness-dimensions.md)
|
|
309
|
-
- [Commit 訊息指南](../../core/commit-message-guide.md)
|
|
310
|
-
- [程式碼簽入標準](../../core/checkin-standards.md)
|
|
311
|
-
- [程式碼審查清單](../../core/code-review-checklist.md)
|
|
312
|
-
- [文件結構標準](../../core/documentation-structure.md)
|
|
779
|
+
- [正向推演標準](../../core/forward-derivation-standards.md) — 規格轉測試轉換(規格 → BDD/TDD/ATDD)
|
|
780
|
+
- [反向工程標準](../../core/reverse-engineering-standards.md) — 程式碼轉規格轉換(程式碼 → 規格)
|
|
781
|
+
- [測試驅動開發](../../core/test-driven-development.md) — TDD 工作流程與 SDD 整合
|
|
782
|
+
- [行為驅動開發](../../core/behavior-driven-development.md) — BDD 工作流程與 Given-When-Then 情境
|
|
783
|
+
- [驗收測試驅動開發](../../core/acceptance-test-driven-development.md) — ATDD 工作流程與商業驗收
|
|
784
|
+
- [測試標準](../../core/testing-standards.md) — 測試框架與最佳實踐(或使用 `/testing-guide` 技能)
|
|
785
|
+
- [測試完整性維度](../../core/test-completeness-dimensions.md) — 8 維度測試覆蓋
|
|
786
|
+
- [Commit 訊息指南](../../core/commit-message-guide.md) — Commit 訊息規範
|
|
787
|
+
- [程式碼簽入標準](../../core/checkin-standards.md) — 程式碼簽入標準
|
|
788
|
+
- [程式碼審查清單](../../core/code-review-checklist.md) — 程式碼審查清單
|
|
789
|
+
- [文件結構標準](../../core/documentation-structure.md) — 文件結構標準
|
|
313
790
|
|
|
314
791
|
---
|
|
315
792
|
|
|
@@ -317,6 +794,9 @@ Refs: SPEC-001
|
|
|
317
794
|
|
|
318
795
|
| 版本 | 日期 | 變更內容 |
|
|
319
796
|
|------|------|----------|
|
|
797
|
+
| 2.1.0 | 2026-01-26 | 新增:變更評估(SDD 前置評估)章節含決策樹、雙向同步評估章節含同步矩陣與檢查清單 |
|
|
798
|
+
| 2.0.0 | 2026-01-25 | **重大重構**:新增「SDD 作為獨立方法論」章節(將 SDD 與 TDD/BDD/ATDD 家族分離)、成熟度等級(Martin Fowler 2025)、常見陷阱、含理論基礎的驗證層、SDD + 測試整合模型、/derive-contracts 命令 |
|
|
799
|
+
| 1.4.0 | 2026-01-19 | 新增:與正向推演整合章節、derive 命令 |
|
|
320
800
|
| 1.3.0 | 2026-01-19 | 新增:與反向工程整合章節、相關命令 |
|
|
321
801
|
| 1.2.0 | 2026-01-05 | 新增:IEEE 830-1998 和 SWEBOK v4.0 第 1 章(軟體需求)至參考資料 |
|
|
322
802
|
| 1.1.0 | 2025-12-24 | 新增:工作流程圖、規格範本、整合指南、最佳實踐、相關標準、授權 |
|
|
@@ -326,11 +806,28 @@ Refs: SPEC-001
|
|
|
326
806
|
|
|
327
807
|
## 參考資料
|
|
328
808
|
|
|
809
|
+
### SDD(2025 AI 時代)
|
|
810
|
+
|
|
811
|
+
- [Thoughtworks: Spec-Driven Development](https://www.thoughtworks.com/en-us/insights/blog/agile-engineering-practices/spec-driven-development-unpacking-2025-new-engineering-practices)
|
|
812
|
+
- [Martin Fowler: SDD Tools (Kiro, spec-kit, Tessl)](https://martinfowler.com/articles/exploring-gen-ai/sdd-3-tools.html)
|
|
813
|
+
- [GitHub spec-kit](https://github.com/github/spec-kit/blob/main/spec-driven.md)
|
|
814
|
+
- [InfoQ: Spec-Driven Development](https://www.infoq.com/articles/spec-driven-development/)
|
|
815
|
+
|
|
816
|
+
### 傳統需求工程
|
|
817
|
+
|
|
329
818
|
- [OpenSpec Documentation](https://github.com/openspec)
|
|
330
819
|
- [Design Documents Best Practices](https://www.industrialempathy.com/posts/design-docs-at-google/)
|
|
331
820
|
- [ADR (Architecture Decision Records)](https://adr.github.io/)
|
|
332
|
-
- [IEEE 830-1998
|
|
333
|
-
- [SWEBOK v4.0
|
|
821
|
+
- [IEEE 830-1998 — 軟體需求規格](https://standards.ieee.org/ieee/830/1222/) — 需求文件標準
|
|
822
|
+
- [SWEBOK v4.0 — 第 1 章:軟體需求](https://www.computer.org/education/bodies-of-knowledge/software-engineering) — IEEE Computer Society
|
|
823
|
+
|
|
824
|
+
### 驗證理論
|
|
825
|
+
|
|
826
|
+
- [Design by Contract — Bertrand Meyer, 1986](https://en.wikipedia.org/wiki/Design_by_contract) — 前後置條件理論
|
|
827
|
+
- [Wikipedia: Formal Verification](https://en.wikipedia.org/wiki/Formal_verification) — 正式驗證理論
|
|
828
|
+
- [Microsoft: Consumer-Driven Contract Testing](https://microsoft.github.io/code-with-engineering-playbook/automated-testing/cdc-testing/) — 契約測試框架
|
|
829
|
+
- [Specmatic: AI-powered API Contract Testing](https://specmatic.io/) — 現代契約測試工具
|
|
830
|
+
- [Gojko Adzic: Specification by Example](https://gojko.net/books/specification-by-example/) — 可執行規格(2011)
|
|
334
831
|
|
|
335
832
|
---
|
|
336
833
|
|