universal-dev-standards 5.0.0-rc.8 → 5.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 +5 -3
- package/bundled/ai/standards/acceptance-criteria-traceability.ai.yaml +178 -0
- package/bundled/ai/standards/agent-dispatch.ai.yaml +69 -0
- package/bundled/ai/standards/ai-command-behavior.ai.yaml +45 -0
- package/bundled/ai/standards/api-design-standards.ai.yaml +192 -0
- package/bundled/ai/standards/branch-completion.ai.yaml +82 -0
- package/bundled/ai/standards/change-batching-standards.ai.yaml +195 -0
- package/bundled/ai/standards/database-standards.ai.yaml +220 -0
- package/bundled/ai/standards/error-codes.ai.yaml +37 -2
- package/bundled/ai/standards/git-worktree.ai.yaml +77 -0
- package/bundled/ai/standards/logging.ai.yaml +21 -2
- package/bundled/ai/standards/model-selection.ai.yaml +81 -0
- package/bundled/ai/standards/pipeline-integration-standards.ai.yaml +184 -0
- package/bundled/ai/standards/systematic-debugging.ai.yaml +73 -0
- package/bundled/ai/standards/verification-evidence.ai.yaml +84 -0
- package/bundled/ai/standards/workflow-enforcement.ai.yaml +253 -0
- package/bundled/core/acceptance-criteria-traceability.md +293 -0
- package/bundled/core/agent-dispatch.md +149 -0
- package/bundled/core/ai-command-behavior.md +239 -0
- package/bundled/core/api-design-standards.md +938 -0
- package/bundled/core/branch-completion.md +158 -0
- package/bundled/core/change-batching-standards.md +257 -0
- package/bundled/core/checkin-standards.md +43 -6
- package/bundled/core/database-standards.md +828 -0
- package/bundled/core/error-code-standards.md +228 -2
- package/bundled/core/forward-derivation-standards.md +54 -2
- package/bundled/core/git-worktree.md +131 -0
- package/bundled/core/model-selection.md +153 -0
- package/bundled/core/pipeline-integration-standards.md +230 -0
- package/bundled/core/systematic-debugging.md +156 -0
- package/bundled/core/testing-standards.md +49 -39
- package/bundled/core/verification-evidence.md +172 -0
- package/bundled/core/workflow-enforcement.md +132 -0
- package/bundled/locales/zh-CN/CLAUDE.md +2 -2
- package/bundled/locales/zh-CN/README.md +4 -4
- package/bundled/locales/zh-CN/SECURITY.md +92 -0
- package/bundled/locales/zh-CN/core/acceptance-criteria-traceability.md +301 -0
- package/bundled/locales/zh-CN/core/acceptance-test-driven-development.md +47 -0
- package/bundled/locales/zh-CN/core/accessibility-standards.md +124 -0
- package/bundled/locales/zh-CN/core/agent-dispatch.md +113 -0
- package/bundled/locales/zh-CN/core/ai-agreement-standards.md +103 -0
- package/bundled/locales/zh-CN/core/ai-command-behavior.md +247 -0
- package/bundled/locales/zh-CN/core/api-design-standards.md +946 -0
- package/bundled/locales/zh-CN/core/behavior-driven-development.md +48 -0
- package/bundled/locales/zh-CN/core/branch-completion.md +112 -0
- package/bundled/locales/zh-CN/core/change-batching-standards.md +265 -0
- package/bundled/locales/zh-CN/core/checkin-standards.md +43 -5
- package/bundled/locales/zh-CN/core/context-aware-loading.md +106 -0
- package/bundled/locales/zh-CN/core/database-standards.md +836 -0
- package/bundled/locales/zh-CN/core/deployment-standards.md +80 -0
- package/bundled/locales/zh-CN/core/error-code-standards.md +2 -2
- package/bundled/locales/zh-CN/core/forward-derivation-standards.md +493 -0
- package/bundled/locales/zh-CN/core/git-worktree.md +101 -0
- package/bundled/locales/zh-CN/core/model-selection.md +112 -0
- package/bundled/locales/zh-CN/core/performance-standards.md +104 -0
- package/bundled/locales/zh-CN/core/pipeline-integration-standards.md +238 -0
- package/bundled/locales/zh-CN/core/project-context-memory.md +124 -0
- package/bundled/locales/zh-CN/core/requirement-engineering.md +49 -0
- package/bundled/locales/zh-CN/core/security-standards.md +100 -0
- package/bundled/locales/zh-CN/core/systematic-debugging.md +106 -0
- package/bundled/locales/zh-CN/core/test-governance.md +116 -0
- package/bundled/locales/zh-CN/core/testing-standards.md +392 -156
- package/bundled/locales/zh-CN/core/verification-evidence.md +118 -0
- package/bundled/locales/zh-CN/core/virtual-organization-standards.md +104 -0
- package/bundled/locales/zh-CN/core/workflow-enforcement.md +132 -0
- package/bundled/locales/zh-CN/docs/CHEATSHEET.md +27 -1
- package/bundled/locales/zh-CN/docs/CLI-INIT-OPTIONS.md +9 -1
- package/bundled/locales/zh-CN/docs/FEATURE-REFERENCE.md +37 -9
- package/bundled/locales/zh-CN/docs/USER-MANUAL.md +652 -0
- package/bundled/locales/zh-CN/integrations/github-copilot/copilot-instructions.md +1 -1
- package/bundled/locales/zh-CN/integrations/openspec/AGENTS.md +29 -4
- package/bundled/locales/zh-CN/integrations/spec-kit/AGENTS.md +143 -72
- package/bundled/locales/zh-CN/skills/ac-coverage-assistant/SKILL.md +126 -0
- package/bundled/locales/zh-CN/skills/api-design-assistant/SKILL.md +100 -0
- package/bundled/locales/zh-CN/skills/brainstorm-assistant/SKILL.md +119 -0
- package/bundled/locales/zh-CN/skills/ci-cd-assistant/SKILL.md +82 -0
- package/bundled/locales/zh-CN/skills/commands/ac-coverage.md +97 -0
- package/bundled/locales/zh-CN/skills/commands/api-design.md +94 -0
- package/bundled/locales/zh-CN/skills/commands/atdd.md +163 -0
- package/bundled/locales/zh-CN/skills/commands/audit.md +77 -0
- package/bundled/locales/zh-CN/skills/commands/bdd.md +1 -1
- package/bundled/locales/zh-CN/skills/commands/brainstorm.md +87 -0
- package/bundled/locales/zh-CN/skills/commands/changelog.md +63 -0
- package/bundled/locales/zh-CN/skills/commands/check.md +219 -0
- package/bundled/locales/zh-CN/skills/commands/checkin.md +61 -0
- package/bundled/locales/zh-CN/skills/commands/ci-cd.md +77 -0
- package/bundled/locales/zh-CN/skills/commands/commit.md +81 -0
- package/bundled/locales/zh-CN/skills/commands/config.md +207 -0
- package/bundled/locales/zh-CN/skills/commands/coverage.md +74 -0
- package/bundled/locales/zh-CN/skills/commands/database.md +78 -0
- package/bundled/locales/zh-CN/skills/commands/derive-all.md +58 -0
- package/bundled/locales/zh-CN/skills/commands/derive-atdd.md +54 -0
- package/bundled/locales/zh-CN/skills/commands/derive-bdd.md +53 -0
- package/bundled/locales/zh-CN/skills/commands/derive-tdd.md +54 -0
- package/bundled/locales/zh-CN/skills/commands/derive.md +78 -0
- package/bundled/locales/zh-CN/skills/commands/dev-workflow.md +119 -0
- package/bundled/locales/zh-CN/skills/commands/discover.md +86 -0
- package/bundled/locales/zh-CN/skills/commands/docgen.md +67 -0
- package/bundled/locales/zh-CN/skills/commands/docs.md +65 -0
- package/bundled/locales/zh-CN/skills/commands/durable.md +87 -0
- package/bundled/locales/zh-CN/skills/commands/guide.md +52 -0
- package/bundled/locales/zh-CN/skills/commands/incident.md +92 -0
- package/bundled/locales/zh-CN/skills/commands/init.md +272 -0
- package/bundled/locales/zh-CN/skills/commands/methodology.md +1 -1
- package/bundled/locales/zh-CN/skills/commands/metrics.md +73 -0
- package/bundled/locales/zh-CN/skills/commands/migrate.md +92 -0
- package/bundled/locales/zh-CN/skills/commands/pr.md +80 -0
- package/bundled/locales/zh-CN/skills/commands/refactor.md +1 -1
- package/bundled/locales/zh-CN/skills/commands/release.md +62 -0
- package/bundled/locales/zh-CN/skills/commands/requirement.md +54 -0
- package/bundled/locales/zh-CN/skills/commands/reverse-bdd.md +47 -0
- package/bundled/locales/zh-CN/skills/commands/reverse-sdd.md +51 -0
- package/bundled/locales/zh-CN/skills/commands/reverse-tdd.md +51 -0
- package/bundled/locales/zh-CN/skills/commands/reverse.md +63 -0
- package/bundled/locales/zh-CN/skills/commands/review.md +50 -0
- package/bundled/locales/zh-CN/skills/commands/scan.md +76 -0
- package/bundled/locales/zh-CN/skills/commands/sdd-retro.md +40 -0
- package/bundled/locales/zh-CN/skills/commands/sdd.md +379 -0
- package/bundled/locales/zh-CN/skills/commands/security.md +75 -0
- package/bundled/locales/zh-CN/skills/commands/tdd.md +111 -0
- package/bundled/locales/zh-CN/skills/commands/update.md +337 -0
- package/bundled/locales/zh-CN/skills/commit-standards/SKILL.md +1 -2
- package/bundled/locales/zh-CN/skills/database-assistant/SKILL.md +97 -0
- package/bundled/locales/zh-CN/skills/dev-workflow-guide/SKILL.md +145 -0
- package/bundled/locales/zh-CN/skills/durable-execution-assistant/SKILL.md +84 -0
- package/bundled/locales/zh-CN/skills/incident-response-assistant/SKILL.md +107 -0
- package/bundled/locales/zh-CN/skills/metrics-dashboard-assistant/SKILL.md +67 -0
- package/bundled/locales/zh-CN/skills/migration-assistant/SKILL.md +77 -0
- package/bundled/locales/zh-CN/skills/pr-automation-assistant/SKILL.md +90 -0
- package/bundled/locales/zh-CN/skills/security-assistant/SKILL.md +79 -0
- package/bundled/locales/zh-CN/skills/security-scan-assistant/SKILL.md +72 -0
- package/bundled/locales/zh-CN/skills/spec-driven-dev/SKILL.md +73 -10
- package/bundled/locales/zh-CN/skills/spec-driven-dev/guide.md +267 -122
- package/bundled/locales/zh-TW/CLAUDE.md +2 -2
- package/bundled/locales/zh-TW/README.md +4 -4
- package/bundled/locales/zh-TW/SECURITY.md +92 -0
- package/bundled/locales/zh-TW/core/acceptance-criteria-traceability.md +301 -0
- package/bundled/locales/zh-TW/core/acceptance-test-driven-development.md +47 -0
- package/bundled/locales/zh-TW/core/accessibility-standards.md +84 -0
- package/bundled/locales/zh-TW/core/agent-dispatch.md +89 -0
- package/bundled/locales/zh-TW/core/ai-agreement-standards.md +87 -0
- package/bundled/locales/zh-TW/core/ai-command-behavior.md +247 -0
- package/bundled/locales/zh-TW/core/api-design-standards.md +946 -0
- package/bundled/locales/zh-TW/core/behavior-driven-development.md +63 -0
- package/bundled/locales/zh-TW/core/branch-completion.md +76 -0
- package/bundled/locales/zh-TW/core/change-batching-standards.md +265 -0
- package/bundled/locales/zh-TW/core/checkin-standards.md +39 -5
- package/bundled/locales/zh-TW/core/context-aware-loading.md +86 -0
- package/bundled/locales/zh-TW/core/database-standards.md +836 -0
- package/bundled/locales/zh-TW/core/deployment-standards.md +66 -0
- package/bundled/locales/zh-TW/core/error-code-standards.md +230 -4
- package/bundled/locales/zh-TW/core/forward-derivation-standards.md +62 -2
- package/bundled/locales/zh-TW/core/git-worktree.md +104 -0
- package/bundled/locales/zh-TW/core/model-selection.md +83 -0
- package/bundled/locales/zh-TW/core/performance-standards.md +84 -0
- package/bundled/locales/zh-TW/core/pipeline-integration-standards.md +238 -0
- package/bundled/locales/zh-TW/core/project-context-memory.md +79 -0
- package/bundled/locales/zh-TW/core/requirement-engineering.md +79 -0
- package/bundled/locales/zh-TW/core/security-standards.md +74 -0
- package/bundled/locales/zh-TW/core/systematic-debugging.md +95 -0
- package/bundled/locales/zh-TW/core/test-governance.md +88 -0
- package/bundled/locales/zh-TW/core/testing-standards.md +309 -86
- package/bundled/locales/zh-TW/core/verification-evidence.md +94 -0
- package/bundled/locales/zh-TW/core/virtual-organization-standards.md +88 -0
- package/bundled/locales/zh-TW/core/workflow-enforcement.md +132 -0
- package/bundled/locales/zh-TW/docs/CHEATSHEET.md +27 -1
- package/bundled/locales/zh-TW/docs/CLI-INIT-OPTIONS.md +9 -1
- package/bundled/locales/zh-TW/docs/FEATURE-REFERENCE.md +37 -9
- package/bundled/locales/zh-TW/docs/USER-MANUAL.md +652 -0
- package/bundled/locales/zh-TW/integrations/github-copilot/copilot-instructions.md +1 -1
- package/bundled/locales/zh-TW/integrations/openspec/AGENTS.md +29 -4
- package/bundled/locales/zh-TW/integrations/spec-kit/AGENTS.md +142 -71
- package/bundled/locales/zh-TW/skills/ac-coverage-assistant/SKILL.md +127 -0
- package/bundled/locales/zh-TW/skills/ai-friendly-architecture/SKILL.md +1 -4
- package/bundled/locales/zh-TW/skills/ai-instruction-standards/SKILL.md +1 -4
- package/bundled/locales/zh-TW/skills/api-design-assistant/SKILL.md +97 -0
- package/bundled/locales/zh-TW/skills/atdd-assistant/SKILL.md +1 -4
- package/bundled/locales/zh-TW/skills/audit-assistant/SKILL.md +1 -4
- package/bundled/locales/zh-TW/skills/bdd-assistant/SKILL.md +1 -4
- package/bundled/locales/zh-TW/skills/brainstorm-assistant/SKILL.md +1 -4
- package/bundled/locales/zh-TW/skills/changelog-guide/SKILL.md +1 -4
- package/bundled/locales/zh-TW/skills/checkin-assistant/SKILL.md +1 -4
- package/bundled/locales/zh-TW/skills/ci-cd-assistant/SKILL.md +79 -0
- package/bundled/locales/zh-TW/skills/code-review-assistant/SKILL.md +1 -4
- package/bundled/locales/zh-TW/skills/commands/ac-coverage.md +95 -0
- package/bundled/locales/zh-TW/skills/commands/api-design.md +92 -0
- package/bundled/locales/zh-TW/skills/commands/atdd.md +167 -0
- package/bundled/locales/zh-TW/skills/commands/audit.md +75 -0
- package/bundled/locales/zh-TW/skills/commands/bdd.md +1 -1
- package/bundled/locales/zh-TW/skills/commands/brainstorm.md +91 -0
- package/bundled/locales/zh-TW/skills/commands/changelog.md +67 -0
- package/bundled/locales/zh-TW/skills/commands/check.md +223 -0
- package/bundled/locales/zh-TW/skills/commands/checkin.md +65 -0
- package/bundled/locales/zh-TW/skills/commands/ci-cd.md +75 -0
- package/bundled/locales/zh-TW/skills/commands/commit.md +85 -0
- package/bundled/locales/zh-TW/skills/commands/config.md +211 -0
- package/bundled/locales/zh-TW/skills/commands/coverage.md +78 -0
- package/bundled/locales/zh-TW/skills/commands/database.md +76 -0
- package/bundled/locales/zh-TW/skills/commands/derive-all.md +62 -0
- package/bundled/locales/zh-TW/skills/commands/derive-atdd.md +58 -0
- package/bundled/locales/zh-TW/skills/commands/derive-bdd.md +54 -0
- package/bundled/locales/zh-TW/skills/commands/derive-tdd.md +55 -0
- package/bundled/locales/zh-TW/skills/commands/derive.md +79 -0
- package/bundled/locales/zh-TW/skills/commands/dev-workflow.md +120 -0
- package/bundled/locales/zh-TW/skills/commands/discover.md +87 -0
- package/bundled/locales/zh-TW/skills/commands/docgen.md +68 -0
- package/bundled/locales/zh-TW/skills/commands/docs.md +66 -0
- package/bundled/locales/zh-TW/skills/commands/durable.md +85 -0
- package/bundled/locales/zh-TW/skills/commands/guide.md +51 -0
- package/bundled/locales/zh-TW/skills/commands/incident.md +90 -0
- package/bundled/locales/zh-TW/skills/commands/init.md +273 -0
- package/bundled/locales/zh-TW/skills/commands/methodology.md +1 -1
- package/bundled/locales/zh-TW/skills/commands/metrics.md +71 -0
- package/bundled/locales/zh-TW/skills/commands/migrate.md +90 -0
- package/bundled/locales/zh-TW/skills/commands/pr.md +78 -0
- package/bundled/locales/zh-TW/skills/commands/refactor.md +1 -1
- package/bundled/locales/zh-TW/skills/commands/release.md +63 -0
- package/bundled/locales/zh-TW/skills/commands/requirement.md +61 -0
- package/bundled/locales/zh-TW/skills/commands/reverse-bdd.md +54 -0
- package/bundled/locales/zh-TW/skills/commands/reverse-sdd.md +58 -0
- package/bundled/locales/zh-TW/skills/commands/reverse-tdd.md +58 -0
- package/bundled/locales/zh-TW/skills/commands/reverse.md +70 -0
- package/bundled/locales/zh-TW/skills/commands/review.md +57 -0
- package/bundled/locales/zh-TW/skills/commands/scan.md +74 -0
- package/bundled/locales/zh-TW/skills/commands/sdd-retro.md +47 -0
- package/bundled/locales/zh-TW/skills/commands/sdd.md +362 -0
- package/bundled/locales/zh-TW/skills/commands/security.md +73 -0
- package/bundled/locales/zh-TW/skills/commands/tdd.md +115 -0
- package/bundled/locales/zh-TW/skills/commands/update.md +326 -0
- package/bundled/locales/zh-TW/skills/commit-standards/SKILL.md +2 -6
- package/bundled/locales/zh-TW/skills/database-assistant/SKILL.md +94 -0
- package/bundled/locales/zh-TW/skills/dev-workflow-guide/SKILL.md +140 -0
- package/bundled/locales/zh-TW/skills/docs-generator/SKILL.md +1 -4
- package/bundled/locales/zh-TW/skills/documentation-guide/SKILL.md +1 -4
- package/bundled/locales/zh-TW/skills/durable-execution-assistant/SKILL.md +81 -0
- package/bundled/locales/zh-TW/skills/error-code-guide/SKILL.md +1 -4
- package/bundled/locales/zh-TW/skills/forward-derivation/SKILL.md +1 -4
- package/bundled/locales/zh-TW/skills/git-workflow-guide/SKILL.md +1 -4
- package/bundled/locales/zh-TW/skills/incident-response-assistant/SKILL.md +104 -0
- package/bundled/locales/zh-TW/skills/logging-guide/SKILL.md +1 -4
- package/bundled/locales/zh-TW/skills/methodology-system/SKILL.md +1 -4
- package/bundled/locales/zh-TW/skills/metrics-dashboard-assistant/SKILL.md +64 -0
- package/bundled/locales/zh-TW/skills/migration-assistant/SKILL.md +74 -0
- package/bundled/locales/zh-TW/skills/pr-automation-assistant/SKILL.md +87 -0
- package/bundled/locales/zh-TW/skills/project-discovery/SKILL.md +1 -4
- package/bundled/locales/zh-TW/skills/refactoring-assistant/SKILL.md +1 -4
- package/bundled/locales/zh-TW/skills/release-standards/SKILL.md +1 -4
- package/bundled/locales/zh-TW/skills/requirement-assistant/SKILL.md +1 -4
- package/bundled/locales/zh-TW/skills/reverse-engineer/SKILL.md +1 -4
- package/bundled/locales/zh-TW/skills/security-assistant/SKILL.md +76 -0
- package/bundled/locales/zh-TW/skills/security-scan-assistant/SKILL.md +69 -0
- package/bundled/locales/zh-TW/skills/spec-driven-dev/SKILL.md +74 -14
- package/bundled/locales/zh-TW/skills/spec-driven-dev/guide.md +243 -98
- package/bundled/locales/zh-TW/skills/tdd-assistant/SKILL.md +1 -4
- package/bundled/locales/zh-TW/skills/test-coverage-assistant/SKILL.md +1 -4
- package/bundled/locales/zh-TW/skills/testing-guide/SKILL.md +1 -5
- package/bundled/skills/README.md +11 -0
- package/bundled/skills/ac-coverage-assistant/SKILL.md +127 -0
- package/bundled/skills/ai-collaboration-standards/SKILL.md +10 -0
- package/bundled/skills/ai-friendly-architecture/SKILL.md +10 -0
- package/bundled/skills/ai-instruction-standards/SKILL.md +10 -0
- package/bundled/skills/api-design-assistant/SKILL.md +119 -0
- package/bundled/skills/atdd-assistant/SKILL.md +7 -0
- package/bundled/skills/bdd-assistant/SKILL.md +7 -0
- package/bundled/skills/brainstorm-assistant/SKILL.md +7 -0
- package/bundled/skills/checkin-assistant/SKILL.md +7 -0
- package/bundled/skills/ci-cd-assistant/SKILL.md +97 -0
- package/bundled/skills/code-review-assistant/SKILL.md +7 -0
- package/bundled/skills/commands/README.md +70 -0
- package/bundled/skills/commands/ac-coverage.md +135 -0
- package/bundled/skills/commands/api-design.md +86 -0
- package/bundled/skills/commands/atdd.md +69 -0
- package/bundled/skills/commands/audit.md +69 -0
- package/bundled/skills/commands/bdd.md +101 -0
- package/bundled/skills/commands/brainstorm.md +45 -0
- package/bundled/skills/commands/changelog.md +34 -0
- package/bundled/skills/commands/check.md +52 -1
- package/bundled/skills/commands/checkin.md +46 -0
- package/bundled/skills/commands/ci-cd.md +69 -0
- package/bundled/skills/commands/commit.md +79 -0
- package/bundled/skills/commands/config.md +48 -0
- package/bundled/skills/commands/coverage.md +53 -0
- package/bundled/skills/commands/database.md +70 -0
- package/bundled/skills/commands/derive-all.md +40 -0
- package/bundled/skills/commands/derive-atdd.md +33 -0
- package/bundled/skills/commands/derive-bdd.md +39 -0
- package/bundled/skills/commands/derive-tdd.md +40 -0
- package/bundled/skills/commands/derive.md +47 -0
- package/bundled/skills/commands/dev-workflow.md +104 -7
- package/bundled/skills/commands/discover.md +39 -0
- package/bundled/skills/commands/docgen.md +35 -0
- package/bundled/skills/commands/docs.md +40 -0
- package/bundled/skills/commands/durable.md +79 -0
- package/bundled/skills/commands/incident.md +84 -0
- package/bundled/skills/commands/init.md +55 -0
- package/bundled/skills/commands/methodology.md +72 -0
- package/bundled/skills/commands/metrics.md +65 -0
- package/bundled/skills/commands/migrate.md +84 -0
- package/bundled/skills/commands/pr.md +72 -0
- package/bundled/skills/commands/refactor.md +51 -0
- package/bundled/skills/commands/release.md +60 -0
- package/bundled/skills/commands/requirement.md +38 -0
- package/bundled/skills/commands/reverse-bdd.md +34 -0
- package/bundled/skills/commands/reverse-sdd.md +42 -0
- package/bundled/skills/commands/reverse-tdd.md +40 -0
- package/bundled/skills/commands/reverse.md +41 -0
- package/bundled/skills/commands/review.md +39 -0
- package/bundled/skills/commands/scan.md +68 -0
- package/bundled/skills/commands/sdd-retro.md +48 -0
- package/bundled/skills/commands/sdd.md +220 -0
- package/bundled/skills/commands/security.md +67 -0
- package/bundled/skills/commands/tdd.md +101 -0
- package/bundled/skills/commands/update.md +61 -0
- package/bundled/skills/commit-standards/SKILL.md +8 -2
- package/bundled/skills/database-assistant/SKILL.md +118 -0
- package/bundled/skills/dev-workflow-guide/SKILL.md +53 -7
- package/bundled/skills/dev-workflow-guide/workflow-phases.md +24 -0
- package/bundled/skills/durable-execution-assistant/SKILL.md +116 -0
- package/bundled/skills/forward-derivation/SKILL.md +7 -0
- package/bundled/skills/incident-response-assistant/SKILL.md +132 -0
- package/bundled/skills/methodology-system/SKILL.md +24 -2
- package/bundled/skills/metrics-dashboard-assistant/SKILL.md +109 -0
- package/bundled/skills/migration-assistant/SKILL.md +119 -0
- package/bundled/skills/pr-automation-assistant/SKILL.md +114 -0
- package/bundled/skills/project-discovery/SKILL.md +7 -0
- package/bundled/skills/refactoring-assistant/SKILL.md +7 -0
- package/bundled/skills/release-standards/SKILL.md +7 -0
- package/bundled/skills/requirement-assistant/SKILL.md +7 -0
- package/bundled/skills/reverse-engineer/SKILL.md +7 -0
- package/bundled/skills/security-assistant/SKILL.md +105 -0
- package/bundled/skills/security-scan-assistant/SKILL.md +96 -0
- package/bundled/skills/spec-driven-dev/SKILL.md +84 -4
- package/bundled/skills/spec-driven-dev/guide.md +156 -22
- package/bundled/skills/tdd-assistant/SKILL.md +7 -0
- package/bundled/skills/test-coverage-assistant/SKILL.md +11 -0
- package/bundled/skills/testing-guide/SKILL.md +23 -0
- package/package.json +1 -1
- package/src/commands/check.js +154 -8
- package/src/commands/config.js +231 -104
- package/src/commands/init.js +23 -3
- package/src/commands/update.js +250 -25
- package/src/config/ai-agent-paths.js +16 -0
- package/src/config/workflow-definitions.js +184 -0
- package/src/core/constants.js +6 -0
- package/src/flows/init-flow.js +23 -6
- package/src/i18n/messages.js +51 -3
- package/src/installers/integration-installer.js +67 -2
- package/src/installers/manifest-installer.js +1 -0
- package/src/installers/standards-installer.js +3 -2
- package/src/prompts/init.js +50 -3
- package/src/reconciler/manifest-migrator.js +2 -2
- package/src/reconciler/plan-executor.js +11 -0
- package/src/utils/integration-generator.js +327 -14
- package/src/utils/workflow-gate.js +292 -0
- package/standards-registry.json +160 -5
|
@@ -0,0 +1,652 @@
|
|
|
1
|
+
---
|
|
2
|
+
source: docs/USER-MANUAL.md
|
|
3
|
+
source_version: 1.0.0
|
|
4
|
+
translation_version: 1.0.0
|
|
5
|
+
status: current
|
|
6
|
+
---
|
|
7
|
+
|
|
8
|
+
# 用户手册
|
|
9
|
+
|
|
10
|
+
**Version**: 1.0.0
|
|
11
|
+
**Last Updated**: 2026-03-24
|
|
12
|
+
|
|
13
|
+
> **Language**: [English](../../../docs/USER-MANUAL.md) | [繁體中文](../../zh-TW/docs/USER-MANUAL.md) | 简体中文
|
|
14
|
+
|
|
15
|
+
本手册引导软件开发者从安装到日常高效使用 Universal Development Standards (UDS)。
|
|
16
|
+
|
|
17
|
+
---
|
|
18
|
+
|
|
19
|
+
## 目录
|
|
20
|
+
|
|
21
|
+
- [什么是 UDS?](#什么是-uds)
|
|
22
|
+
- [为什么要用 UDS?](#为什么要用-uds)
|
|
23
|
+
- [架构](#架构)
|
|
24
|
+
- [安装](#安装)
|
|
25
|
+
- [安装后验证](#安装后验证)
|
|
26
|
+
- [你的第一个指令:/discover](#你的第一个指令discover)
|
|
27
|
+
- [日常开发流程地图](#日常开发流程地图)
|
|
28
|
+
- [工作流程 A:规格驱动开发 (SDD)](#工作流程-a规格驱动开发-sdd)
|
|
29
|
+
- [工作流程 B:TDD 红绿重构](#工作流程-btdd-红绿重构)
|
|
30
|
+
- [选择正确的工作流程](#选择正确的工作流程)
|
|
31
|
+
- [Legacy Code 策略](#legacy-code-策略)
|
|
32
|
+
- [质量指令](#质量指令)
|
|
33
|
+
- [所有 Slash Commands 参考](#所有-slash-commands-参考)
|
|
34
|
+
- [渐进式导入策略](#渐进式导入策略)
|
|
35
|
+
- [UDS 的一天](#uds-的一天)
|
|
36
|
+
- [支持的 AI 工具](#支持的-ai-工具)
|
|
37
|
+
- [常见问题](#常见问题)
|
|
38
|
+
- [下一步与资源](#下一步与资源)
|
|
39
|
+
|
|
40
|
+
---
|
|
41
|
+
|
|
42
|
+
## 什么是 UDS?
|
|
43
|
+
|
|
44
|
+
Universal Development Standards 是一套为 AI 时代设计的**语言无关、框架无关**开发标准框架。它提供一组统一的标准、技能和指令,适用于任何技术栈。
|
|
45
|
+
|
|
46
|
+
| 类别 | 数量 | 说明 |
|
|
47
|
+
|------|------|------|
|
|
48
|
+
| **Core Standards** | 48 | 通用开发准则(Markdown) |
|
|
49
|
+
| **AI Skills** | 40 | 交互式技能(YAML) |
|
|
50
|
+
| **Slash Commands** | 30 | 日常开发快速操作指令 |
|
|
51
|
+
| **CLI Commands** | 6 | 命令行工具 |
|
|
52
|
+
|
|
53
|
+
**三大特性:**
|
|
54
|
+
|
|
55
|
+
1. **语言无关** — JavaScript、Python、Go、Rust、Java 等任何语言都适用
|
|
56
|
+
2. **框架无关** — React、Vue、Spring、Django 等任何框架都适用
|
|
57
|
+
3. **AI 原生** — 专为 AI 辅助开发工作流程设计
|
|
58
|
+
|
|
59
|
+
---
|
|
60
|
+
|
|
61
|
+
## 为什么要用 UDS?
|
|
62
|
+
|
|
63
|
+
| 问题 | UDS 解决方案 |
|
|
64
|
+
|------|-------------|
|
|
65
|
+
| 团队 commit message 格式不一致 | 通过 `/commit` 标准化 Conventional Commits |
|
|
66
|
+
| Code review 漏看关键问题 | 通过 `/review` 执行 8 维度系统性审查 |
|
|
67
|
+
| AI 工具给出不一致的建议 | 统一标准让 AI 工具读取并遵循 |
|
|
68
|
+
| 新人加入团队需要数周上手 | 清晰的标准和引导式工作流程 |
|
|
69
|
+
| 测试覆盖率期望不明确 | 测试金字塔定义明确比例(70/20/7/3) |
|
|
70
|
+
| 开发流程不清楚 | 两套方法论系统(SDD 和双回圈 TDD) |
|
|
71
|
+
|
|
72
|
+
### 设计哲学
|
|
73
|
+
|
|
74
|
+
**"碰一点,保护一点"** — 你不需要一次导入全部 48 个标准。UDS 专为渐进式导入设计:
|
|
75
|
+
|
|
76
|
+
- 先只用 `/commit` — 零成本,立即见效
|
|
77
|
+
- 接着加入 `/review` — 在合并前捕捉问题
|
|
78
|
+
- 团队适应后,逐步引入 `/tdd` 和 `/sdd`
|
|
79
|
+
|
|
80
|
+
> **Boy Scout Rule**:让代码比你找到它时更好。每次碰到代码,顺手加一点保护(测试、文档)。
|
|
81
|
+
|
|
82
|
+
---
|
|
83
|
+
|
|
84
|
+
## 架构
|
|
85
|
+
|
|
86
|
+
UDS 采用**双层执行模型**:
|
|
87
|
+
|
|
88
|
+
```
|
|
89
|
+
AI Agent / 开发者
|
|
90
|
+
|
|
|
91
|
+
┌─────┴─────┐
|
|
92
|
+
| |
|
|
93
|
+
Skills Layer Standards Layer
|
|
94
|
+
(.ai.yaml) (.md)
|
|
95
|
+
| |
|
|
96
|
+
省 Token 完整理论
|
|
97
|
+
交互式向导 工具配置
|
|
98
|
+
日常开发用 深度参考用
|
|
99
|
+
```
|
|
100
|
+
|
|
101
|
+
| 方面 | Skills(执行层) | Standards(知识层) |
|
|
102
|
+
|------|-----------------|-------------------|
|
|
103
|
+
| 格式 | YAML 优化 | 完整 Markdown |
|
|
104
|
+
| 用途 | 高速交互查询 | 深度理解与依据 |
|
|
105
|
+
| Token 用量 | 最少(AI 友好) | 详尽(参考用) |
|
|
106
|
+
| 使用时机 | 日常开发任务 | 学习概念、深度审查 |
|
|
107
|
+
|
|
108
|
+
实际使用中,AI 工具会自动加载 Skills 层。只有当你想了解某条规则的「为什么」时,才需要阅读 Standards 层。
|
|
109
|
+
|
|
110
|
+
---
|
|
111
|
+
|
|
112
|
+
## 安装
|
|
113
|
+
|
|
114
|
+
### 方法一:全局安装(推荐)
|
|
115
|
+
|
|
116
|
+
```bash
|
|
117
|
+
npm install -g universal-dev-standards
|
|
118
|
+
cd your-project
|
|
119
|
+
uds init
|
|
120
|
+
```
|
|
121
|
+
|
|
122
|
+
### 方法二:免安装
|
|
123
|
+
|
|
124
|
+
```bash
|
|
125
|
+
npx universal-dev-standards init
|
|
126
|
+
```
|
|
127
|
+
|
|
128
|
+
### `uds init` 做了什么
|
|
129
|
+
|
|
130
|
+
交互式初始化会:
|
|
131
|
+
|
|
132
|
+
1. **检测**你的项目类型(Node.js、Python 等)
|
|
133
|
+
2. **询问**你使用的 AI 工具(Claude Code、Cursor 等)
|
|
134
|
+
3. **安装**标准到 `.standards/` 目录
|
|
135
|
+
4. **配置**你的 AI 工具配置文件(CLAUDE.md、.cursorrules 等)
|
|
136
|
+
|
|
137
|
+
---
|
|
138
|
+
|
|
139
|
+
## 安装后验证
|
|
140
|
+
|
|
141
|
+
运行 `uds init` 后,你的项目会多出这些文件:
|
|
142
|
+
|
|
143
|
+
```
|
|
144
|
+
your-project/
|
|
145
|
+
├── .standards/ # 48 个 AI 标准(.ai.yaml 文件)
|
|
146
|
+
│ ├── testing.ai.yaml
|
|
147
|
+
│ ├── commit-message.ai.yaml
|
|
148
|
+
│ ├── code-review.ai.yaml
|
|
149
|
+
│ └── ...
|
|
150
|
+
├── CLAUDE.md # Claude Code 配置(若选择)
|
|
151
|
+
├── .cursorrules # Cursor 配置(若选择)
|
|
152
|
+
└── ...你原有的文件完全不动
|
|
153
|
+
```
|
|
154
|
+
|
|
155
|
+
**验证安装:**
|
|
156
|
+
|
|
157
|
+
```bash
|
|
158
|
+
uds check # 检查采用状态和文件完整性
|
|
159
|
+
uds skills # 列出已安装技能
|
|
160
|
+
```
|
|
161
|
+
|
|
162
|
+
---
|
|
163
|
+
|
|
164
|
+
## 你的第一个指令:/discover
|
|
165
|
+
|
|
166
|
+
在修改现有代码库之前,先用 `/discover` 评估健康度:
|
|
167
|
+
|
|
168
|
+
```bash
|
|
169
|
+
/discover # 全项目健康度评估
|
|
170
|
+
/discover auth # 聚焦认证模块评估
|
|
171
|
+
/discover payments # 评估新增支付功能的风险
|
|
172
|
+
```
|
|
173
|
+
|
|
174
|
+
### 输出示例
|
|
175
|
+
|
|
176
|
+
```
|
|
177
|
+
Project Health Report
|
|
178
|
+
=====================
|
|
179
|
+
Overall Score: 7.2 / 10
|
|
180
|
+
|
|
181
|
+
| 维度 | 分数 | 状态 | 关键发现 |
|
|
182
|
+
|-----------------|-------|---------|------------------------|
|
|
183
|
+
| Architecture | 8/10 | Good | 模块边界清晰 |
|
|
184
|
+
| Dependencies | 6/10 | Warning | 5 个过时, 1 个严重 |
|
|
185
|
+
| Test Coverage | 7/10 | Fair | 72% 行覆盖率 |
|
|
186
|
+
| Security | 8/10 | Good | 无严重漏洞 |
|
|
187
|
+
| Technical Debt | 6/10 | Warning | 23 个 TODO, 3 个热点 |
|
|
188
|
+
|
|
189
|
+
Verdict: CONDITIONAL
|
|
190
|
+
Recommendations:
|
|
191
|
+
1. [HIGH] 更新 lodash 以修复 CVE-2024-XXXX
|
|
192
|
+
2. [MED] 为 src/payments/ 新增测试(0% 覆盖率)
|
|
193
|
+
3. [LOW] 清理 src/utils/ 中的 TODO 积压
|
|
194
|
+
```
|
|
195
|
+
|
|
196
|
+
### 评估维度
|
|
197
|
+
|
|
198
|
+
| 维度 | 检查项目 |
|
|
199
|
+
|------|---------|
|
|
200
|
+
| **Architecture** | 模块结构、依赖图、入口点 |
|
|
201
|
+
| **Dependencies** | 过时包、已知漏洞、许可证风险 |
|
|
202
|
+
| **Test Coverage** | 现有测试套件、覆盖率缺口、测试质量 |
|
|
203
|
+
| **Security** | npm audit 发现、硬编码密钥、暴露端点 |
|
|
204
|
+
| **Technical Debt** | TODO 标记、代码重复、复杂度热点 |
|
|
205
|
+
|
|
206
|
+
---
|
|
207
|
+
|
|
208
|
+
## 日常开发流程地图
|
|
209
|
+
|
|
210
|
+
用这个决策树选择正确的工作流程:
|
|
211
|
+
|
|
212
|
+
```
|
|
213
|
+
第一次接触这个 Codebase?
|
|
214
|
+
│
|
|
215
|
+
├─ 是 → /discover(先评估)
|
|
216
|
+
│
|
|
217
|
+
└─ 否(已熟悉)
|
|
218
|
+
│
|
|
219
|
+
├─ 全新功能?
|
|
220
|
+
│ └─ 是 → SDD 流程:/sdd → /derive-all → 实现
|
|
221
|
+
│
|
|
222
|
+
├─ Bug 修复?
|
|
223
|
+
│ └─ 是 → 写失败测试 → 修复 → /commit
|
|
224
|
+
│
|
|
225
|
+
├─ 修改现有代码?
|
|
226
|
+
│ ├─ 有测试? → 直接 /tdd 循环
|
|
227
|
+
│ └─ 没测试? → 先写 characterization test
|
|
228
|
+
│
|
|
229
|
+
└─ 纯重构?
|
|
230
|
+
└─ 确保测试覆盖 → 重构 → 测试通过
|
|
231
|
+
```
|
|
232
|
+
|
|
233
|
+
> **关键原则**:选对工作流程,而非记住所有指令。
|
|
234
|
+
|
|
235
|
+
---
|
|
236
|
+
|
|
237
|
+
## 工作流程 A:规格驱动开发 (SDD)
|
|
238
|
+
|
|
239
|
+
SDD 针对**新功能**和 **AI 辅助开发**进行优化。核心理念:**规格先行,代码随后**。
|
|
240
|
+
|
|
241
|
+
### 五大阶段
|
|
242
|
+
|
|
243
|
+
```
|
|
244
|
+
Phase 1 Phase 2 Phase 3 推演 Phase 4 Phase 5
|
|
245
|
+
创建规格 → 审查规格 → 批准规格 → 生成测试 → 实现 → 验证
|
|
246
|
+
/sdd /sdd review /sdd approve /derive-all /sdd implement /sdd verify
|
|
247
|
+
```
|
|
248
|
+
|
|
249
|
+
| 阶段 | 指令 | 输入 | 输出 |
|
|
250
|
+
|------|------|------|------|
|
|
251
|
+
| 1. 创建 | `/sdd user-auth` | 需求描述 | `SPEC-001.md` |
|
|
252
|
+
| 2. 审查 | `/sdd review` | SPEC 文件 | 审查意见 |
|
|
253
|
+
| 3. 批准 | `/sdd approve` | SPEC 文件 | 状态更新 |
|
|
254
|
+
| 推演 | `/derive-all` | SPEC 文件 | `.feature` + `.test.ts` |
|
|
255
|
+
| 4. 实现 | `/sdd implement` | SPEC 文件 | 进度追踪 |
|
|
256
|
+
| 5. 验证 | `/sdd verify` | SPEC 文件 | 验证报告 |
|
|
257
|
+
|
|
258
|
+
### 示例:新增双因素认证
|
|
259
|
+
|
|
260
|
+
**步骤 1 — 创建规格:**
|
|
261
|
+
|
|
262
|
+
```bash
|
|
263
|
+
/sdd two-factor-authentication
|
|
264
|
+
```
|
|
265
|
+
|
|
266
|
+
AI 会引导你定义:
|
|
267
|
+
- **用户故事**:作为用户,我希望启用 2FA 以提高账户安全性
|
|
268
|
+
- **验收条件(AC)**:
|
|
269
|
+
- AC-1: 用户可以生成 TOTP 密钥
|
|
270
|
+
- AC-2: 用户可以扫描 QR Code
|
|
271
|
+
- AC-3: 系统验证 6 位数 OTP
|
|
272
|
+
- AC-4: 提供备份代码
|
|
273
|
+
|
|
274
|
+
输出:`docs/specs/SPEC-001.md`
|
|
275
|
+
|
|
276
|
+
**步骤 2 — 从批准的规格推演测试:**
|
|
277
|
+
|
|
278
|
+
```bash
|
|
279
|
+
/derive-all docs/specs/SPEC-001.md
|
|
280
|
+
```
|
|
281
|
+
|
|
282
|
+
自动生成:
|
|
283
|
+
|
|
284
|
+
**BDD 场景(.feature):**
|
|
285
|
+
```gherkin
|
|
286
|
+
@SPEC-001 @AC-1
|
|
287
|
+
Scenario: 用户生成 TOTP 密钥
|
|
288
|
+
Given 用户已登录
|
|
289
|
+
When 用户启用双因素认证
|
|
290
|
+
Then 系统应生成 TOTP 密钥
|
|
291
|
+
And 显示 QR Code 供扫描
|
|
292
|
+
```
|
|
293
|
+
|
|
294
|
+
**TDD 测试骨架(.test.ts):**
|
|
295
|
+
```typescript
|
|
296
|
+
describe('SPEC-001: 双因素认证', () => {
|
|
297
|
+
describe('AC-1: 生成 TOTP 密钥', () => {
|
|
298
|
+
it('should generate valid TOTP secret when user enables 2FA', () => {
|
|
299
|
+
// Arrange - [TODO]
|
|
300
|
+
// Act - [TODO]
|
|
301
|
+
// Assert - [TODO]
|
|
302
|
+
});
|
|
303
|
+
});
|
|
304
|
+
});
|
|
305
|
+
```
|
|
306
|
+
|
|
307
|
+
> 每个验收条件 1:1 对应一组测试 — 规格就是测试的蓝图。
|
|
308
|
+
|
|
309
|
+
---
|
|
310
|
+
|
|
311
|
+
## 工作流程 B:TDD 红绿重构
|
|
312
|
+
|
|
313
|
+
TDD 最适合 **Bug 修复**、**小功能**和**修改现有代码**。
|
|
314
|
+
|
|
315
|
+
### 三大阶段
|
|
316
|
+
|
|
317
|
+
```
|
|
318
|
+
┌──────────────────────────────────┐
|
|
319
|
+
│ │
|
|
320
|
+
│ RED GREEN REFACTOR│
|
|
321
|
+
│ /tdd red /tdd green /tdd refactor
|
|
322
|
+
│ │ │ │ │
|
|
323
|
+
│ v v v │
|
|
324
|
+
│ 写失败测试 最少代码 改善质量 │
|
|
325
|
+
│ │ │ │ │
|
|
326
|
+
│ └───────────┴───────────┘ │
|
|
327
|
+
│ 重复循环 │
|
|
328
|
+
└──────────────────────────────────┘
|
|
329
|
+
```
|
|
330
|
+
|
|
331
|
+
| 阶段 | 指令 | 规则 |
|
|
332
|
+
|------|------|------|
|
|
333
|
+
| RED | `/tdd red` | 只写测试,不写实现。测试必须失败。 |
|
|
334
|
+
| GREEN | `/tdd green` | 写最少代码让测试通过。不多不少。 |
|
|
335
|
+
| REFACTOR | `/tdd refactor` | 改善代码质量。测试必须持续通过。 |
|
|
336
|
+
|
|
337
|
+
### 示例:实现 `isValidEmail()`
|
|
338
|
+
|
|
339
|
+
**步骤 1:`/tdd red` — 写失败测试**
|
|
340
|
+
|
|
341
|
+
```javascript
|
|
342
|
+
// tests/email.test.js
|
|
343
|
+
test('should return true for valid email', () => {
|
|
344
|
+
expect(isValidEmail('user@example.com')).toBe(true);
|
|
345
|
+
});
|
|
346
|
+
|
|
347
|
+
test('should return false for invalid email', () => {
|
|
348
|
+
expect(isValidEmail('not-an-email')).toBe(false);
|
|
349
|
+
});
|
|
350
|
+
```
|
|
351
|
+
|
|
352
|
+
**步骤 2:`/tdd green` — 最少实现**
|
|
353
|
+
|
|
354
|
+
```javascript
|
|
355
|
+
function isValidEmail(email) {
|
|
356
|
+
return /^[^\s@]+@[^\s@]+\.[^\s@]+$/.test(email);
|
|
357
|
+
}
|
|
358
|
+
```
|
|
359
|
+
|
|
360
|
+
**步骤 3:`/tdd refactor` — 改善质量**
|
|
361
|
+
|
|
362
|
+
```javascript
|
|
363
|
+
const EMAIL_REGEX = /^[^\s@]+@[^\s@]+\.[^\s@]+$/;
|
|
364
|
+
|
|
365
|
+
function isValidEmail(email) {
|
|
366
|
+
return typeof email === 'string' && EMAIL_REGEX.test(email);
|
|
367
|
+
}
|
|
368
|
+
```
|
|
369
|
+
|
|
370
|
+
---
|
|
371
|
+
|
|
372
|
+
## 选择正确的工作流程
|
|
373
|
+
|
|
374
|
+
| 场景 | 推荐工作流程 |
|
|
375
|
+
|------|-------------|
|
|
376
|
+
| 全新项目 + AI 辅助 | `/sdd` → `/derive-all` → 实现 |
|
|
377
|
+
| 全新功能(明确需求) | `/sdd` → `/derive-all` → 实现 |
|
|
378
|
+
| Legacy 系统修改 | `/bdd` → `/tdd` 循环 |
|
|
379
|
+
| 快速原型 | 直接 `/tdd` |
|
|
380
|
+
| 复杂业务逻辑 | `/bdd discovery` → `/tdd` |
|
|
381
|
+
| Bug 修复 | 写失败测试 → 修复 → `/commit` |
|
|
382
|
+
| 模糊构想,需要探索 | `/brainstorm` → `/requirement` → `/sdd` |
|
|
383
|
+
| 多方利益相关者需对齐 | `/atdd` → `/sdd` 或 `/bdd` |
|
|
384
|
+
|
|
385
|
+
> **简单记法**:新东西用 SDD,改旧的用 TDD,不确定就先 `/discover`。
|
|
386
|
+
|
|
387
|
+
---
|
|
388
|
+
|
|
389
|
+
## Legacy Code 策略
|
|
390
|
+
|
|
391
|
+
### 三步安全修改法
|
|
392
|
+
|
|
393
|
+
```
|
|
394
|
+
Step 1: 写 Characterization Test(记录现有行为)
|
|
395
|
+
↓
|
|
396
|
+
Step 2: /tdd 循环加入新行为
|
|
397
|
+
↓
|
|
398
|
+
Step 3: 逐步重构
|
|
399
|
+
```
|
|
400
|
+
|
|
401
|
+
### 什么是 Characterization Test?
|
|
402
|
+
|
|
403
|
+
一种记录代码*当前行为*的测试 — 不管对错。它是你在修改前的安全网。
|
|
404
|
+
|
|
405
|
+
```javascript
|
|
406
|
+
// 记录当前行为,即使是 bug
|
|
407
|
+
test('characterization: login validates email format', () => {
|
|
408
|
+
const result = login('invalid-email', 'password');
|
|
409
|
+
// 观察:当前代码接受无效 email(这是 bug)
|
|
410
|
+
expect(result.success).toBe(true); // 记录现状
|
|
411
|
+
});
|
|
412
|
+
```
|
|
413
|
+
|
|
414
|
+
### 反向工程指令
|
|
415
|
+
|
|
416
|
+
用于较大规模的 Legacy Code 理解:
|
|
417
|
+
|
|
418
|
+
```bash
|
|
419
|
+
/reverse spec # 将现有代码反向工程为规格
|
|
420
|
+
/reverse-bdd # 转换为 BDD 场景
|
|
421
|
+
/reverse-tdd # 分析 BDD-TDD 覆盖差距
|
|
422
|
+
```
|
|
423
|
+
|
|
424
|
+
> **关键原则**:先保护再修改。不要在没有测试的情况下改 Legacy Code。
|
|
425
|
+
|
|
426
|
+
---
|
|
427
|
+
|
|
428
|
+
## 质量指令
|
|
429
|
+
|
|
430
|
+
### `/commit` — 标准化提交
|
|
431
|
+
|
|
432
|
+
完成代码后,用 `/commit` 生成格式规范的 commit message:
|
|
433
|
+
|
|
434
|
+
```bash
|
|
435
|
+
/commit # 自动分析 staged changes
|
|
436
|
+
/commit 修正登录验证逻辑 # 附上描述
|
|
437
|
+
```
|
|
438
|
+
|
|
439
|
+
**生成格式:**
|
|
440
|
+
|
|
441
|
+
```
|
|
442
|
+
feat(auth): 新增双因素认证支持
|
|
443
|
+
|
|
444
|
+
实现 TOTP 密钥生成、QR Code 显示和 OTP 验证。
|
|
445
|
+
用户可在账户设置中启用 2FA,并获取备份代码。
|
|
446
|
+
|
|
447
|
+
Refs: SPEC-001
|
|
448
|
+
```
|
|
449
|
+
|
|
450
|
+
**Commit 类型:**
|
|
451
|
+
|
|
452
|
+
| Type | 用途 | 示例 |
|
|
453
|
+
|------|------|------|
|
|
454
|
+
| `feat` | 新功能 | `feat(auth): 新增 2FA` |
|
|
455
|
+
| `fix` | 修 Bug | `fix(login): 修正密码验证` |
|
|
456
|
+
| `refactor` | 重构 | `refactor(utils): 提取共用函数` |
|
|
457
|
+
| `docs` | 文档 | `docs(api): 更新 API 文档` |
|
|
458
|
+
| `test` | 测试 | `test(auth): 新增登录测试` |
|
|
459
|
+
| `chore` | 维护 | `chore(deps): 更新依赖包` |
|
|
460
|
+
|
|
461
|
+
### `/review` — 代码审查
|
|
462
|
+
|
|
463
|
+
提交前,用 `/review` 进行系统性审查:
|
|
464
|
+
|
|
465
|
+
```bash
|
|
466
|
+
/review # 审查当前分支所有变更
|
|
467
|
+
/review src/auth.js # 审查特定文件
|
|
468
|
+
/review feature/login # 审查特定分支
|
|
469
|
+
```
|
|
470
|
+
|
|
471
|
+
**8 个审查维度:**
|
|
472
|
+
|
|
473
|
+
| # | 维度 | 检查重点 |
|
|
474
|
+
|---|------|---------|
|
|
475
|
+
| 1 | Functionality | 功能是否正确? |
|
|
476
|
+
| 2 | Design | 架构是否合理? |
|
|
477
|
+
| 3 | Quality | 代码是否干净? |
|
|
478
|
+
| 4 | Readability | 是否容易理解? |
|
|
479
|
+
| 5 | Tests | 测试覆盖是否足够? |
|
|
480
|
+
| 6 | Security | 有无安全漏洞? |
|
|
481
|
+
| 7 | Performance | 是否有效率? |
|
|
482
|
+
| 8 | Error Handling | 错误处理是否完善? |
|
|
483
|
+
|
|
484
|
+
**评论前缀系统:**
|
|
485
|
+
|
|
486
|
+
| 前缀 | 意义 | 动作 |
|
|
487
|
+
|------|------|------|
|
|
488
|
+
| **BLOCKING** | 必须修复才能合并 | 必要 |
|
|
489
|
+
| **IMPORTANT** | 应该修复 | 建议 |
|
|
490
|
+
| **SUGGESTION** | 可以更好 | 可选 |
|
|
491
|
+
| **QUESTION** | 需要厘清 | 讨论 |
|
|
492
|
+
|
|
493
|
+
### `/checkin` — 提交前质量闸门
|
|
494
|
+
|
|
495
|
+
提交前运行 `/checkin` 验证所有质量闸门通过(测试、linting、标准合规)。
|
|
496
|
+
|
|
497
|
+
---
|
|
498
|
+
|
|
499
|
+
## 所有 Slash Commands 参考
|
|
500
|
+
|
|
501
|
+
| 家族 | 指令 | 用途 |
|
|
502
|
+
|------|------|------|
|
|
503
|
+
| **探索** | `/discover`, `/dev-workflow` | 评估项目、引导工作流程 |
|
|
504
|
+
| **规格** | `/sdd`, `/requirement`, `/brainstorm` | 规格驱动开发 |
|
|
505
|
+
| **推演** | `/derive-all`, `/derive-bdd`, `/derive-tdd`, `/derive-atdd` | 从规格生成测试 |
|
|
506
|
+
| **开发** | `/tdd`, `/bdd`, `/atdd` | 方法论工作流程 |
|
|
507
|
+
| **质量** | `/commit`, `/review`, `/checkin`, `/coverage`, `/ac-coverage` | 日常质量管理 |
|
|
508
|
+
| **文档** | `/docs`, `/docgen`, `/changelog`, `/release` | 文档与发布 |
|
|
509
|
+
| **反向** | `/reverse`, `/reverse-sdd`, `/reverse-bdd`, `/reverse-tdd` | Legacy Code 反向工程 |
|
|
510
|
+
| **重构** | `/refactor` | 重构指导 |
|
|
511
|
+
| **工具** | `/init`, `/check`, `/update`, `/config`, `/methodology`, `/guide` | 设置与配置 |
|
|
512
|
+
|
|
513
|
+
> 不需要记住全部。输入 `/dev-workflow`,它会引导你到正确的指令。
|
|
514
|
+
|
|
515
|
+
---
|
|
516
|
+
|
|
517
|
+
## 渐进式导入策略
|
|
518
|
+
|
|
519
|
+
不需要一次学会所有指令。分阶段导入:
|
|
520
|
+
|
|
521
|
+
### 第 1 周:零成本起步
|
|
522
|
+
|
|
523
|
+
```bash
|
|
524
|
+
/commit # 标准化 commit message
|
|
525
|
+
/review # 提交前自我审查
|
|
526
|
+
```
|
|
527
|
+
|
|
528
|
+
> 只需要这两个指令,就能立即提升代码质量。
|
|
529
|
+
|
|
530
|
+
### 第 2-3 周:加入测试保护
|
|
531
|
+
|
|
532
|
+
```bash
|
|
533
|
+
/discover # 了解项目健康度
|
|
534
|
+
/tdd # 用 TDD 写新功能
|
|
535
|
+
```
|
|
536
|
+
|
|
537
|
+
### 第 4 周起:完整工作流程
|
|
538
|
+
|
|
539
|
+
```bash
|
|
540
|
+
/sdd # 规格驱动开发
|
|
541
|
+
/derive-all # 自动生成测试
|
|
542
|
+
/bdd # 行为驱动开发
|
|
543
|
+
```
|
|
544
|
+
|
|
545
|
+
> **关键心态**:每周多用一个指令,一个月后自然上手。
|
|
546
|
+
|
|
547
|
+
---
|
|
548
|
+
|
|
549
|
+
## UDS 的一天
|
|
550
|
+
|
|
551
|
+
```
|
|
552
|
+
09:00 /discover auth # 评估要修改的认证模块
|
|
553
|
+
→ 健康分数 7.2/10, CONDITIONAL
|
|
554
|
+
|
|
555
|
+
09:15 /sdd add-2fa # 创建双因素认证规格
|
|
556
|
+
→ 产出 SPEC-001.md
|
|
557
|
+
|
|
558
|
+
09:30 /sdd review # 审查规格完整性
|
|
559
|
+
→ 确认 4 个 AC 无遗漏
|
|
560
|
+
|
|
561
|
+
09:45 /derive-all # 从规格生成 BDD + TDD
|
|
562
|
+
→ 产出 4 个 .feature + 4 组 .test.ts
|
|
563
|
+
|
|
564
|
+
10:00 /tdd red # 开始 TDD 循环
|
|
565
|
+
10:30 /tdd green # 实现最少代码
|
|
566
|
+
11:00 /tdd refactor # 改善质量
|
|
567
|
+
→ 重复循环直到所有 AC 完成
|
|
568
|
+
|
|
569
|
+
12:00 /commit # 标准化提交
|
|
570
|
+
→ feat(auth): 新增双因素认证
|
|
571
|
+
|
|
572
|
+
12:05 /review # 最终审查
|
|
573
|
+
→ 0 BLOCKING, 1 SUGGESTION
|
|
574
|
+
```
|
|
575
|
+
|
|
576
|
+
---
|
|
577
|
+
|
|
578
|
+
## 支持的 AI 工具
|
|
579
|
+
|
|
580
|
+
| AI 工具 | 状态 | Skills | Slash Commands | 配置文件 |
|
|
581
|
+
|---------|------|--------|----------------|---------|
|
|
582
|
+
| **Claude Code** | 完整支持 | 26 | 30 | `CLAUDE.md` |
|
|
583
|
+
| **OpenCode** | 完整支持 | 26 | 30 | `AGENTS.md` |
|
|
584
|
+
| **Gemini CLI** | Preview | 18+ | 20+ | `GEMINI.md` |
|
|
585
|
+
| **Cursor** | 完整支持 | Core | Simulated | `.cursorrules` |
|
|
586
|
+
| **Cline / Roo Code** | 部分支持 | Core | Workflow | `.clinerules` |
|
|
587
|
+
| **Windsurf** | 部分支持 | 有 | Rulebook | `.windsurfrules` |
|
|
588
|
+
|
|
589
|
+
> **一套标准,多工具通用** — 换 AI 工具不需要重学标准。
|
|
590
|
+
|
|
591
|
+
---
|
|
592
|
+
|
|
593
|
+
## 常见问题
|
|
594
|
+
|
|
595
|
+
**Q: UDS 会限制我的技术选择吗?**
|
|
596
|
+
A: 不会。UDS 是语言无关、框架无关的。它定义的是流程和质量标准,不是技术选择。
|
|
597
|
+
|
|
598
|
+
**Q: 一定要用 AI 工具吗?**
|
|
599
|
+
A: 不用。核心标准是 Markdown 文件,人类直接阅读也完全适用。AI 工具只是让流程更顺畅。
|
|
600
|
+
|
|
601
|
+
**Q: 团队中只有我用可以吗?**
|
|
602
|
+
A: 可以。渐进式导入的设计就是为了这个场景。先自己用 `/commit` 和 `/review`,等团队看到效果再推广。
|
|
603
|
+
|
|
604
|
+
**Q: 和 ESLint / Prettier 冲突吗?**
|
|
605
|
+
A: 互补关系。ESLint/Prettier 处理代码格式,UDS 处理更高层次的开发流程和质量标准。
|
|
606
|
+
|
|
607
|
+
**Q: 什么都需要写规格吗?**
|
|
608
|
+
A: 不用。UDS 遵循「碰一点,保护一点」原则。只在重大新功能时用 `/sdd`。Bug 修复和小变更只需 `/tdd` 和 `/commit`。
|
|
609
|
+
|
|
610
|
+
**Q: 如何更新到 UDS 新版本?**
|
|
611
|
+
A: 在项目目录运行 `uds update`。它会更新标准同时保留你的自定义配置。
|
|
612
|
+
|
|
613
|
+
---
|
|
614
|
+
|
|
615
|
+
## 下一步与资源
|
|
616
|
+
|
|
617
|
+
### 现在就开始
|
|
618
|
+
|
|
619
|
+
```bash
|
|
620
|
+
npm install -g universal-dev-standards
|
|
621
|
+
cd your-project
|
|
622
|
+
uds init
|
|
623
|
+
```
|
|
624
|
+
|
|
625
|
+
### 推荐学习路径
|
|
626
|
+
|
|
627
|
+
1. 先用 `/commit` + `/review` 养成习惯
|
|
628
|
+
2. 遇到新功能时试试 `/sdd`
|
|
629
|
+
3. 不确定下一步时,输入 `/dev-workflow`
|
|
630
|
+
|
|
631
|
+
### 参考文档
|
|
632
|
+
|
|
633
|
+
| 资源 | 说明 |
|
|
634
|
+
|------|------|
|
|
635
|
+
| [Daily Workflow Guide](../../../adoption/DAILY-WORKFLOW-GUIDE.md) | 日常工作流程完整指南 |
|
|
636
|
+
| [Command Family Overview](../../../skills/commands/COMMAND-FAMILY-OVERVIEW.md) | 指令家族架构与场景 |
|
|
637
|
+
| [Cheatsheet](CHEATSHEET.md) | 所有功能速查表 |
|
|
638
|
+
| [Feature Reference](FEATURE-REFERENCE.md) | 完整功能目录(182 个功能) |
|
|
639
|
+
| [README](../../../README.md) | 项目总览 |
|
|
640
|
+
|
|
641
|
+
### 获取帮助
|
|
642
|
+
|
|
643
|
+
- 输入 `/dev-workflow` 获得引导式工作流程选择
|
|
644
|
+
- 输入 `/guide <标准名称>` 查阅特定标准参考
|
|
645
|
+
- 访问 [GitHub repository](https://github.com/AsiaOstrich/universal-dev-standards) 提交 issue 或参与讨论
|
|
646
|
+
|
|
647
|
+
---
|
|
648
|
+
|
|
649
|
+
## 许可证
|
|
650
|
+
|
|
651
|
+
- 文档(Markdown):CC BY 4.0
|
|
652
|
+
- 代码(JavaScript):MIT
|