universal-dev-standards 6.14.0-beta.8 → 6.14.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 +12 -1
- package/bundled/ai/options/commit-message/traditional-chinese.ai.yaml +69 -67
- package/bundled/ai/standards/commit-message.ai.yaml +12 -2
- package/bundled/ai/standards/secret-management-standards.ai.yaml +12 -1
- package/bundled/core/commit-message-guide.md +22 -19
- package/bundled/core/secret-management-standards.md +13 -1
- package/bundled/extensions/locales/zh-tw.md +19 -19
- package/bundled/hooks/validate-commit-msg.mjs +52 -9
- package/bundled/locales/zh-CN/CHANGELOG.md +2312 -1102
- package/bundled/locales/zh-CN/CLAUDE.md +987 -101
- package/bundled/locales/zh-CN/README.md +3 -3
- package/bundled/locales/zh-CN/SECURITY.md +3 -3
- package/bundled/locales/zh-CN/STANDARDS-MAPPING.md +103 -6
- package/bundled/locales/zh-CN/adoption/ADOPTION-GUIDE.md +68 -97
- package/bundled/locales/zh-CN/adoption/DAILY-WORKFLOW-GUIDE.md +2 -1
- package/bundled/locales/zh-CN/adoption/STATIC-DYNAMIC-GUIDE.md +8 -9
- package/bundled/locales/zh-CN/adoption/checklists/enterprise.md +81 -80
- package/bundled/locales/zh-CN/adoption/checklists/minimal.md +18 -14
- package/bundled/locales/zh-CN/adoption/checklists/recommended.md +49 -46
- package/bundled/locales/zh-CN/ai/MAINTENANCE.md +44 -9
- package/bundled/locales/zh-CN/ai/options/commit-message/traditional-chinese.ai.yaml +63 -55
- package/bundled/locales/zh-CN/core/acceptance-criteria-traceability.md +61 -14
- package/bundled/locales/zh-CN/core/acceptance-test-driven-development.md +2 -1
- package/bundled/locales/zh-CN/core/accessibility-standards.md +871 -62
- package/bundled/locales/zh-CN/core/adr-standards.md +155 -32
- package/bundled/locales/zh-CN/core/agent-communication-protocol.md +2 -1
- package/bundled/locales/zh-CN/core/agent-dispatch.md +68 -33
- package/bundled/locales/zh-CN/core/ai-agreement-standards.md +23 -22
- package/bundled/locales/zh-CN/core/ai-command-behavior.md +2 -1
- package/bundled/locales/zh-CN/core/ai-friendly-architecture.md +311 -72
- package/bundled/locales/zh-CN/core/ai-instruction-standards.md +71 -49
- package/bundled/locales/zh-CN/core/ai-response-navigation.md +2 -1
- package/bundled/locales/zh-CN/core/alerting-standards.md +231 -36
- package/bundled/locales/zh-CN/core/anti-hallucination.md +116 -697
- package/bundled/locales/zh-CN/core/anti-sycophancy-prompting.md +34 -33
- package/bundled/locales/zh-CN/core/api-design-standards.md +144 -58
- package/bundled/locales/zh-CN/core/behavior-driven-development.md +2 -1
- package/bundled/locales/zh-CN/core/branch-completion.md +75 -20
- package/bundled/locales/zh-CN/core/capability-declaration.md +44 -94
- package/bundled/locales/zh-CN/core/change-batching-standards.md +2 -1
- package/bundled/locales/zh-CN/core/changelog-standards.md +485 -63
- package/bundled/locales/zh-CN/core/chaos-engineering-standards.md +141 -39
- package/bundled/locales/zh-CN/core/checkin-standards.md +176 -116
- package/bundled/locales/zh-CN/core/circuit-breaker.md +43 -77
- package/bundled/locales/zh-CN/core/code-review-checklist.md +37 -23
- package/bundled/locales/zh-CN/core/commit-message-guide.md +892 -69
- package/bundled/locales/zh-CN/core/containerization-standards.md +259 -57
- package/bundled/locales/zh-CN/core/context-aware-loading.md +103 -29
- package/bundled/locales/zh-CN/core/database-standards.md +115 -114
- package/bundled/locales/zh-CN/core/deprecation-standards.md +155 -40
- package/bundled/locales/zh-CN/core/design-document-standards.md +265 -55
- package/bundled/locales/zh-CN/core/developer-memory.md +150 -60
- package/bundled/locales/zh-CN/core/documentation-lifecycle.md +20 -16
- package/bundled/locales/zh-CN/core/documentation-structure.md +1284 -127
- package/bundled/locales/zh-CN/core/documentation-writing-standards.md +649 -259
- package/bundled/locales/zh-CN/core/dual-phase-output.md +37 -70
- package/bundled/locales/zh-CN/core/environment-standards.md +251 -73
- package/bundled/locales/zh-CN/core/error-code-standards.md +501 -60
- package/bundled/locales/zh-CN/core/estimation-standards.md +174 -41
- package/bundled/locales/zh-CN/core/execution-history.md +2 -1
- package/bundled/locales/zh-CN/core/failure-source-taxonomy.md +71 -84
- package/bundled/locales/zh-CN/core/feature-flag-standards.md +202 -57
- package/bundled/locales/zh-CN/core/forward-derivation-standards.md +613 -154
- package/bundled/locales/zh-CN/core/frontend-design-standards.md +361 -78
- package/bundled/locales/zh-CN/core/git-workflow.md +148 -262
- package/bundled/locales/zh-CN/core/git-worktree.md +59 -26
- package/bundled/locales/zh-CN/core/guides/file-placement-guide.md +132 -48
- package/bundled/locales/zh-CN/core/guides/performance-guide.md +61 -59
- package/bundled/locales/zh-CN/core/guides/security-guide.md +2 -0
- package/bundled/locales/zh-CN/core/health-check-standards.md +46 -104
- package/bundled/locales/zh-CN/core/immutability-first.md +83 -60
- package/bundled/locales/zh-CN/core/knowledge-transfer-standards.md +94 -31
- package/bundled/locales/zh-CN/core/mutation-testing.md +45 -6
- package/bundled/locales/zh-CN/core/observability-standards.md +281 -37
- package/bundled/locales/zh-CN/core/performance-standards.md +402 -42
- package/bundled/locales/zh-CN/core/pipeline-integration-standards.md +2 -1
- package/bundled/locales/zh-CN/core/postmortem-standards.md +358 -53
- package/bundled/locales/zh-CN/core/privacy-standards.md +148 -40
- package/bundled/locales/zh-CN/core/project-context-memory.md +182 -48
- package/bundled/locales/zh-CN/core/project-structure.md +550 -170
- package/bundled/locales/zh-CN/core/recovery-recipe-registry.md +54 -114
- package/bundled/locales/zh-CN/core/refactoring-standards.md +141 -556
- package/bundled/locales/zh-CN/core/requirement-engineering.md +7 -6
- package/bundled/locales/zh-CN/core/retrospective-standards.md +215 -22
- package/bundled/locales/zh-CN/core/retry-standards.md +46 -101
- package/bundled/locales/zh-CN/core/reverse-engineering-standards.md +370 -120
- package/bundled/locales/zh-CN/core/runbook-standards.md +294 -48
- package/bundled/locales/zh-CN/core/security-decision.md +45 -70
- package/bundled/locales/zh-CN/core/security-standards.md +169 -16
- package/bundled/locales/zh-CN/core/skill-standard-alignment-check.md +105 -71
- package/bundled/locales/zh-CN/core/slo-standards.md +296 -44
- package/bundled/locales/zh-CN/core/spec-driven-development.md +37 -6
- package/bundled/locales/zh-CN/core/standard-admission-criteria.md +25 -31
- package/bundled/locales/zh-CN/core/standard-lifecycle-management.md +49 -57
- package/bundled/locales/zh-CN/core/structured-task-definition.md +2 -1
- package/bundled/locales/zh-CN/core/supply-chain-security-standards.md +159 -32
- package/bundled/locales/zh-CN/core/systematic-debugging.md +87 -42
- package/bundled/locales/zh-CN/core/tech-debt-standards.md +202 -86
- package/bundled/locales/zh-CN/core/test-completeness-dimensions.md +262 -190
- package/bundled/locales/zh-CN/core/test-data-standards.md +252 -30
- package/bundled/locales/zh-CN/core/test-driven-development.md +21 -1022
- package/bundled/locales/zh-CN/core/test-governance.md +94 -43
- package/bundled/locales/zh-CN/core/testing-standards.md +83 -37
- package/bundled/locales/zh-CN/core/timeout-standards.md +45 -85
- package/bundled/locales/zh-CN/core/token-budget.md +44 -80
- package/bundled/locales/zh-CN/core/translation-lifecycle-standards.md +48 -36
- package/bundled/locales/zh-CN/core/verification-evidence.md +44 -22
- package/bundled/locales/zh-CN/core/versioning.md +737 -73
- package/bundled/locales/zh-CN/core/virtual-organization-standards.md +30 -29
- package/bundled/locales/zh-CN/core/workflow-enforcement.md +9 -8
- package/bundled/locales/zh-CN/core/workflow-state-protocol.md +9 -8
- package/bundled/locales/zh-CN/docs/CHEATSHEET.md +2 -1
- package/bundled/locales/zh-CN/docs/CLI-FLOW.md +2 -1
- package/bundled/locales/zh-CN/docs/CLI-INIT-OPTIONS.md +19 -10
- package/bundled/locales/zh-CN/docs/FEATURE-REFERENCE.md +8 -6
- package/bundled/locales/zh-CN/docs/STANDARDS-REFERENCE.md +2 -1
- package/bundled/locales/zh-CN/docs/USAGE-MODES-COMPARISON.md +133 -132
- package/bundled/locales/zh-CN/docs/USER-MANUAL.md +11 -3
- package/bundled/locales/zh-CN/docs/WINDOWS-GUIDE.md +5 -2
- package/bundled/locales/zh-CN/docs/specs/system/memory-adoption-strategy.md +2 -0
- package/bundled/locales/zh-CN/docs/user/FAQ.md +2 -0
- package/bundled/locales/zh-CN/docs/user/GETTING-STARTED.md +2 -0
- package/bundled/locales/zh-CN/docs/user/GLOSSARY.md +2 -0
- package/bundled/locales/zh-CN/docs/user/README.md +4 -2
- package/bundled/locales/zh-CN/docs/user/TROUBLESHOOTING.md +2 -0
- package/bundled/locales/zh-CN/integrations/codex/AGENTS.md +136 -2
- package/bundled/locales/zh-CN/integrations/codex/README.md +62 -10
- package/bundled/locales/zh-CN/integrations/gemini-cli/GEMINI.md +59 -1
- package/bundled/locales/zh-CN/integrations/gemini-cli/README.md +9 -2
- package/bundled/locales/zh-CN/integrations/github-copilot/COPILOT-CHAT-REFERENCE.md +7 -1
- package/bundled/locales/zh-CN/integrations/github-copilot/README.md +8 -2
- package/bundled/locales/zh-CN/integrations/github-copilot/copilot-instructions.md +146 -12
- package/bundled/locales/zh-CN/integrations/github-copilot/skills-mapping.md +7 -1
- package/bundled/locales/zh-CN/integrations/google-antigravity/AGENTS.md +110 -3
- package/bundled/locales/zh-CN/integrations/google-antigravity/README.md +7 -1
- package/bundled/locales/zh-CN/integrations/opencode/AGENTS.md +140 -2
- package/bundled/locales/zh-CN/integrations/opencode/README.md +7 -1
- package/bundled/locales/zh-CN/integrations/opencode/skills-mapping.md +8 -2
- package/bundled/locales/zh-CN/integrations/openspec/AGENTS.md +46 -1
- package/bundled/locales/zh-CN/integrations/openspec/README.md +7 -1
- package/bundled/locales/zh-CN/integrations/spec-kit/AGENTS.md +20 -2
- package/bundled/locales/zh-CN/integrations/spec-kit/README.md +7 -1
- package/bundled/locales/zh-CN/options/changelog/auto-generated.md +2 -0
- package/bundled/locales/zh-CN/options/changelog/keep-a-changelog.md +2 -0
- package/bundled/locales/zh-CN/options/code-review/automated-review.md +2 -0
- package/bundled/locales/zh-CN/options/code-review/pair-programming.md +2 -0
- package/bundled/locales/zh-CN/options/commit-message/bilingual.md +139 -50
- package/bundled/locales/zh-CN/options/commit-message/english.md +159 -42
- package/bundled/locales/zh-CN/options/commit-message/traditional-chinese.md +156 -75
- package/bundled/locales/zh-CN/options/documentation/api-docs.md +3 -1
- package/bundled/locales/zh-CN/options/documentation/markdown-docs.md +2 -0
- package/bundled/locales/zh-CN/options/documentation/wiki-style.md +2 -0
- package/bundled/locales/zh-CN/options/git-workflow/gitflow.md +105 -77
- package/bundled/locales/zh-CN/options/git-workflow/github-flow.md +75 -57
- package/bundled/locales/zh-CN/options/git-workflow/merge-commit.md +155 -44
- package/bundled/locales/zh-CN/options/git-workflow/rebase-ff.md +168 -53
- package/bundled/locales/zh-CN/options/git-workflow/squash-merge.md +122 -37
- package/bundled/locales/zh-CN/options/git-workflow/trunk-based.md +108 -61
- package/bundled/locales/zh-CN/options/project-structure/dotnet.md +266 -47
- package/bundled/locales/zh-CN/options/project-structure/go.md +301 -43
- package/bundled/locales/zh-CN/options/project-structure/java.md +268 -48
- package/bundled/locales/zh-CN/options/project-structure/kotlin.md +2 -0
- package/bundled/locales/zh-CN/options/project-structure/nodejs.md +168 -51
- package/bundled/locales/zh-CN/options/project-structure/php.md +2 -0
- package/bundled/locales/zh-CN/options/project-structure/python.md +210 -52
- package/bundled/locales/zh-CN/options/project-structure/ruby.md +2 -0
- package/bundled/locales/zh-CN/options/project-structure/rust.md +2 -0
- package/bundled/locales/zh-CN/options/project-structure/swift.md +2 -0
- package/bundled/locales/zh-CN/options/testing/contract-testing.md +2 -0
- package/bundled/locales/zh-CN/options/testing/e2e-testing.md +227 -66
- package/bundled/locales/zh-CN/options/testing/industry-pyramid.md +2 -0
- package/bundled/locales/zh-CN/options/testing/integration-testing.md +185 -73
- package/bundled/locales/zh-CN/options/testing/istqb-framework.md +2 -0
- package/bundled/locales/zh-CN/options/testing/performance-testing.md +2 -0
- package/bundled/locales/zh-CN/options/testing/security-testing.md +2 -0
- package/bundled/locales/zh-CN/options/testing/system-testing.md +270 -96
- package/bundled/locales/zh-CN/options/testing/unit-testing.md +185 -71
- package/bundled/locales/zh-CN/skills/CONTRIBUTING.template.md +43 -42
- package/bundled/locales/zh-CN/skills/INTEGRATION-GUIDE.md +2 -1
- package/bundled/locales/zh-CN/skills/README.md +2 -1
- package/bundled/locales/zh-CN/skills/_shared/README.md +2 -1
- package/bundled/locales/zh-CN/skills/adr-assistant/guide.md +240 -4
- package/bundled/locales/zh-CN/skills/agents/README.md +180 -82
- package/bundled/locales/zh-CN/skills/agents/code-architect.md +3 -1
- package/bundled/locales/zh-CN/skills/agents/doc-writer.md +3 -1
- package/bundled/locales/zh-CN/skills/agents/reviewer.md +4 -2
- package/bundled/locales/zh-CN/skills/agents/spec-analyst.md +3 -1
- package/bundled/locales/zh-CN/skills/agents/test-specialist.md +3 -1
- package/bundled/locales/zh-CN/skills/ai-collaboration-standards/SKILL.md +91 -81
- package/bundled/locales/zh-CN/skills/ai-collaboration-standards/anti-hallucination.md +79 -59
- package/bundled/locales/zh-CN/skills/ai-collaboration-standards/certainty-labels.md +66 -40
- package/bundled/locales/zh-CN/skills/ai-friendly-architecture/SKILL.md +23 -36
- package/bundled/locales/zh-CN/skills/ai-instruction-standards/SKILL.md +217 -137
- package/bundled/locales/zh-CN/skills/api-design-assistant/SKILL.md +13 -2
- package/bundled/locales/zh-CN/skills/atdd-assistant/SKILL.md +16 -2
- package/bundled/locales/zh-CN/skills/atdd-assistant/acceptance-criteria-guide.md +2 -1
- package/bundled/locales/zh-CN/skills/atdd-assistant/atdd-workflow.md +98 -1
- package/bundled/locales/zh-CN/skills/atdd-assistant/guide.md +148 -132
- package/bundled/locales/zh-CN/skills/audit-assistant/SKILL.md +5 -2
- package/bundled/locales/zh-CN/skills/bdd-assistant/SKILL.md +16 -2
- package/bundled/locales/zh-CN/skills/bdd-assistant/bdd-workflow.md +2 -1
- package/bundled/locales/zh-CN/skills/bdd-assistant/gherkin-guide.md +2 -1
- package/bundled/locales/zh-CN/skills/bdd-assistant/guide.md +122 -121
- package/bundled/locales/zh-CN/skills/changelog-guide/SKILL.md +9 -2
- package/bundled/locales/zh-CN/skills/changelog-guide/guide.md +91 -88
- package/bundled/locales/zh-CN/skills/checkin-assistant/SKILL.md +12 -2
- package/bundled/locales/zh-CN/skills/checkin-assistant/guide.md +211 -210
- package/bundled/locales/zh-CN/skills/ci-cd-assistant/SKILL.md +14 -2
- package/bundled/locales/zh-CN/skills/code-review-assistant/SKILL.md +12 -2
- package/bundled/locales/zh-CN/skills/code-review-assistant/checkin-checklist.md +79 -78
- package/bundled/locales/zh-CN/skills/code-review-assistant/guide.md +119 -45
- package/bundled/locales/zh-CN/skills/code-review-assistant/review-checklist.md +89 -88
- package/bundled/locales/zh-CN/skills/commands/ac-coverage.md +43 -1
- package/bundled/locales/zh-CN/skills/commands/api-design.md +2 -1
- package/bundled/locales/zh-CN/skills/commands/atdd.md +71 -1
- package/bundled/locales/zh-CN/skills/commands/audit.md +2 -1
- package/bundled/locales/zh-CN/skills/commands/bdd.md +160 -62
- package/bundled/locales/zh-CN/skills/commands/changelog.md +36 -1
- package/bundled/locales/zh-CN/skills/commands/check.md +53 -1
- package/bundled/locales/zh-CN/skills/commands/checkin.md +45 -1
- package/bundled/locales/zh-CN/skills/commands/ci-cd.md +3 -2
- package/bundled/locales/zh-CN/skills/commands/code-review.md +41 -1
- package/bundled/locales/zh-CN/skills/commands/commit.md +56 -1
- package/bundled/locales/zh-CN/skills/commands/config.md +50 -1
- package/bundled/locales/zh-CN/skills/commands/coverage.md +43 -1
- package/bundled/locales/zh-CN/skills/commands/database.md +4 -3
- package/bundled/locales/zh-CN/skills/commands/derive-all.md +42 -1
- package/bundled/locales/zh-CN/skills/commands/derive-atdd.md +35 -1
- package/bundled/locales/zh-CN/skills/commands/derive-bdd.md +41 -1
- package/bundled/locales/zh-CN/skills/commands/derive-tdd.md +42 -1
- package/bundled/locales/zh-CN/skills/commands/derive.md +60 -4
- package/bundled/locales/zh-CN/skills/commands/dev-workflow.md +58 -8
- package/bundled/locales/zh-CN/skills/commands/discover.md +41 -1
- package/bundled/locales/zh-CN/skills/commands/docgen.md +37 -1
- package/bundled/locales/zh-CN/skills/commands/docs.md +136 -5
- package/bundled/locales/zh-CN/skills/commands/durable.md +4 -3
- package/bundled/locales/zh-CN/skills/commands/e2e.md +85 -1
- package/bundled/locales/zh-CN/skills/commands/guide.md +2 -1
- package/bundled/locales/zh-CN/skills/commands/incident.md +5 -4
- package/bundled/locales/zh-CN/skills/commands/init.md +57 -1
- package/bundled/locales/zh-CN/skills/commands/methodology.md +166 -77
- package/bundled/locales/zh-CN/skills/commands/metrics.md +3 -2
- package/bundled/locales/zh-CN/skills/commands/migrate.md +5 -4
- package/bundled/locales/zh-CN/skills/commands/observability.md +48 -3
- package/bundled/locales/zh-CN/skills/commands/pr.md +4 -3
- package/bundled/locales/zh-CN/skills/commands/refactor.md +76 -38
- package/bundled/locales/zh-CN/skills/commands/release.md +82 -1
- package/bundled/locales/zh-CN/skills/commands/requirement.md +40 -1
- package/bundled/locales/zh-CN/skills/commands/reverse-bdd.md +36 -1
- package/bundled/locales/zh-CN/skills/commands/reverse-sdd.md +44 -1
- package/bundled/locales/zh-CN/skills/commands/reverse-tdd.md +42 -1
- package/bundled/locales/zh-CN/skills/commands/reverse.md +43 -1
- package/bundled/locales/zh-CN/skills/commands/runbook.md +50 -3
- package/bundled/locales/zh-CN/skills/commands/scan.md +3 -2
- package/bundled/locales/zh-CN/skills/commands/sdd-retro.md +50 -1
- package/bundled/locales/zh-CN/skills/commands/sdd.md +182 -1
- package/bundled/locales/zh-CN/skills/commands/security.md +3 -2
- package/bundled/locales/zh-CN/skills/commands/slo.md +51 -3
- package/bundled/locales/zh-CN/skills/commands/tdd.md +74 -5
- package/bundled/locales/zh-CN/skills/commands/update.md +70 -8
- package/bundled/locales/zh-CN/skills/commit-standards/SKILL.md +4 -4
- package/bundled/locales/zh-CN/skills/commit-standards/conventional-commits.md +45 -44
- package/bundled/locales/zh-CN/skills/commit-standards/guide.md +172 -52
- package/bundled/locales/zh-CN/skills/commit-standards/language-options.md +50 -47
- package/bundled/locales/zh-CN/skills/contract-test-assistant/SKILL.md +2 -2
- package/bundled/locales/zh-CN/skills/contract-test-assistant/guide.md +76 -1
- package/bundled/locales/zh-CN/skills/database-assistant/SKILL.md +18 -5
- package/bundled/locales/zh-CN/skills/dev-methodology/SKILL.md +4 -2
- package/bundled/locales/zh-CN/skills/dev-methodology/create-methodology.md +2 -0
- package/bundled/locales/zh-CN/skills/dev-methodology/runtime.md +2 -0
- package/bundled/locales/zh-CN/skills/docs-generator/SKILL.md +16 -2
- package/bundled/locales/zh-CN/skills/docs-generator/guide.md +8 -7
- package/bundled/locales/zh-CN/skills/documentation-guide/SKILL.md +209 -184
- package/bundled/locales/zh-CN/skills/documentation-guide/documentation-structure.md +73 -72
- package/bundled/locales/zh-CN/skills/documentation-guide/readme-template.md +37 -36
- package/bundled/locales/zh-CN/skills/durable-execution-assistant/SKILL.md +28 -2
- package/bundled/locales/zh-CN/skills/e2e-assistant/SKILL.md +21 -6
- package/bundled/locales/zh-CN/skills/error-code-guide/SKILL.md +76 -95
- package/bundled/locales/zh-CN/skills/git-workflow-guide/SKILL.md +80 -87
- package/bundled/locales/zh-CN/skills/git-workflow-guide/branch-naming.md +44 -43
- package/bundled/locales/zh-CN/skills/git-workflow-guide/git-workflow.md +66 -65
- package/bundled/locales/zh-CN/skills/incident-response-assistant/SKILL.md +31 -13
- package/bundled/locales/zh-CN/skills/metrics-dashboard-assistant/SKILL.md +38 -2
- package/bundled/locales/zh-CN/skills/observability-assistant/SKILL.md +75 -1
- package/bundled/locales/zh-CN/skills/pr-automation-assistant/SKILL.md +32 -6
- package/bundled/locales/zh-CN/skills/project-discovery/SKILL.md +8 -2
- package/bundled/locales/zh-CN/skills/project-discovery/guide.md +158 -157
- package/bundled/locales/zh-CN/skills/project-structure-guide/SKILL.md +49 -46
- package/bundled/locales/zh-CN/skills/project-structure-guide/language-patterns.md +8 -7
- package/bundled/locales/zh-CN/skills/refactoring-assistant/SKILL.md +22 -2
- package/bundled/locales/zh-CN/skills/refactoring-assistant/guide.md +172 -171
- package/bundled/locales/zh-CN/skills/release-standards/SKILL.md +66 -23
- package/bundled/locales/zh-CN/skills/release-standards/changelog-format.md +42 -41
- package/bundled/locales/zh-CN/skills/release-standards/guide.md +51 -43
- package/bundled/locales/zh-CN/skills/release-standards/release-workflow.md +131 -95
- package/bundled/locales/zh-CN/skills/release-standards/semantic-versioning.md +62 -61
- package/bundled/locales/zh-CN/skills/requirement-assistant/SKILL.md +24 -15
- package/bundled/locales/zh-CN/skills/requirement-assistant/guide.md +88 -79
- package/bundled/locales/zh-CN/skills/requirement-assistant/requirement-checklist.md +128 -127
- package/bundled/locales/zh-CN/skills/requirement-assistant/requirement-writing.md +121 -120
- package/bundled/locales/zh-CN/skills/retrospective-assistant/guide.md +206 -2
- package/bundled/locales/zh-CN/skills/reverse-engineer/SKILL.md +2 -2
- package/bundled/locales/zh-CN/skills/reverse-engineer/bdd-extraction.md +2 -1
- package/bundled/locales/zh-CN/skills/reverse-engineer/guide.md +297 -173
- package/bundled/locales/zh-CN/skills/reverse-engineer/tdd-analysis.md +2 -1
- package/bundled/locales/zh-CN/skills/reverse-engineer/workflow.md +2 -1
- package/bundled/locales/zh-CN/skills/runbook-assistant/SKILL.md +9 -2
- package/bundled/locales/zh-CN/skills/security-assistant/SKILL.md +24 -6
- package/bundled/locales/zh-CN/skills/security-scan-assistant/SKILL.md +34 -10
- package/bundled/locales/zh-CN/skills/slo-assistant/SKILL.md +2 -1
- package/bundled/locales/zh-CN/skills/spec-derivation/SKILL.md +2 -2
- package/bundled/locales/zh-CN/skills/spec-driven-dev/guide.md +38 -6
- package/bundled/locales/zh-CN/skills/tdd-assistant/SKILL.md +16 -3
- package/bundled/locales/zh-CN/skills/tdd-assistant/guide.md +217 -156
- package/bundled/locales/zh-CN/skills/tdd-assistant/language-examples.md +727 -82
- package/bundled/locales/zh-CN/skills/tdd-assistant/tdd-workflow.md +396 -214
- package/bundled/locales/zh-CN/skills/test-coverage-assistant/SKILL.md +14 -5
- package/bundled/locales/zh-CN/skills/test-coverage-assistant/guide.md +25 -12
- package/bundled/locales/zh-CN/skills/testing-guide/testing-pyramid.md +99 -98
- package/bundled/locales/zh-CN/skills/testing-guide/testing-theory.md +3 -1
- package/bundled/locales/zh-CN/skills/tools/cline/README.md +2 -1
- package/bundled/locales/zh-CN/skills/tools/copilot/README.md +65 -18
- package/bundled/locales/zh-CN/skills/tools/copilot/copilot-instructions.md +2 -1
- package/bundled/locales/zh-CN/skills/tools/cursor/README.md +2 -1
- package/bundled/locales/zh-CN/skills/tools/windsurf/README.md +2 -1
- package/bundled/locales/zh-CN/skills/workflows/README.md +4 -2
- package/bundled/locales/zh-CN/templates/reverse-spec-template.md +50 -1
- package/bundled/locales/zh-TW/CHANGELOG.md +2291 -1110
- package/bundled/locales/zh-TW/CLAUDE.md +962 -76
- package/bundled/locales/zh-TW/README.md +3 -3
- package/bundled/locales/zh-TW/SECURITY.md +3 -3
- package/bundled/locales/zh-TW/STANDARDS-MAPPING.md +103 -6
- package/bundled/locales/zh-TW/adoption/ADOPTION-GUIDE.md +46 -93
- package/bundled/locales/zh-TW/adoption/DAILY-WORKFLOW-GUIDE.md +2 -1
- package/bundled/locales/zh-TW/adoption/STATIC-DYNAMIC-GUIDE.md +3 -1
- package/bundled/locales/zh-TW/adoption/checklists/enterprise.md +10 -9
- package/bundled/locales/zh-TW/adoption/checklists/minimal.md +6 -2
- package/bundled/locales/zh-TW/adoption/checklists/recommended.md +7 -4
- package/bundled/locales/zh-TW/ai/MAINTENANCE.md +34 -14
- package/bundled/locales/zh-TW/ai/options/commit-message/traditional-chinese.ai.yaml +48 -40
- package/bundled/locales/zh-TW/core/acceptance-criteria-traceability.md +56 -10
- package/bundled/locales/zh-TW/core/acceptance-test-driven-development.md +2 -1
- package/bundled/locales/zh-TW/core/accessibility-standards.md +895 -46
- package/bundled/locales/zh-TW/core/adr-standards.md +2 -1
- package/bundled/locales/zh-TW/core/agent-communication-protocol.md +2 -1
- package/bundled/locales/zh-TW/core/agent-dispatch.md +102 -33
- package/bundled/locales/zh-TW/core/ai-agreement-standards.md +58 -41
- package/bundled/locales/zh-TW/core/ai-command-behavior.md +2 -1
- package/bundled/locales/zh-TW/core/ai-friendly-architecture.md +306 -67
- package/bundled/locales/zh-TW/core/ai-instruction-standards.md +16 -13
- package/bundled/locales/zh-TW/core/ai-response-navigation.md +3 -3
- package/bundled/locales/zh-TW/core/alerting-standards.md +257 -35
- package/bundled/locales/zh-TW/core/anti-hallucination.md +169 -40
- package/bundled/locales/zh-TW/core/anti-sycophancy-prompting.md +2 -1
- package/bundled/locales/zh-TW/core/api-design-standards.md +2 -1
- package/bundled/locales/zh-TW/core/behavior-driven-development.md +3 -17
- package/bundled/locales/zh-TW/core/branch-completion.md +130 -34
- package/bundled/locales/zh-TW/core/capability-declaration.md +41 -79
- package/bundled/locales/zh-TW/core/change-batching-standards.md +2 -1
- package/bundled/locales/zh-TW/core/changelog-standards.md +14 -9
- package/bundled/locales/zh-TW/core/chaos-engineering-standards.md +138 -36
- package/bundled/locales/zh-TW/core/checkin-standards.md +84 -26
- package/bundled/locales/zh-TW/core/circuit-breaker.md +48 -87
- package/bundled/locales/zh-TW/core/code-review-checklist.md +19 -7
- package/bundled/locales/zh-TW/core/commit-message-guide.md +218 -87
- package/bundled/locales/zh-TW/core/containerization-standards.md +259 -57
- package/bundled/locales/zh-TW/core/context-aware-loading.md +121 -27
- package/bundled/locales/zh-TW/core/database-standards.md +2 -1
- package/bundled/locales/zh-TW/core/deprecation-standards.md +139 -37
- package/bundled/locales/zh-TW/core/design-document-standards.md +265 -55
- package/bundled/locales/zh-TW/core/developer-memory.md +102 -12
- package/bundled/locales/zh-TW/core/documentation-lifecycle.md +2 -1
- package/bundled/locales/zh-TW/core/documentation-structure.md +17 -8
- package/bundled/locales/zh-TW/core/dual-phase-output.md +28 -90
- package/bundled/locales/zh-TW/core/environment-standards.md +250 -72
- package/bundled/locales/zh-TW/core/error-code-standards.md +17 -6
- package/bundled/locales/zh-TW/core/estimation-standards.md +177 -44
- package/bundled/locales/zh-TW/core/execution-history.md +2 -1
- package/bundled/locales/zh-TW/core/failure-source-taxonomy.md +59 -117
- package/bundled/locales/zh-TW/core/feature-flag-standards.md +202 -57
- package/bundled/locales/zh-TW/core/forward-derivation-standards.md +592 -133
- package/bundled/locales/zh-TW/core/frontend-design-standards.md +120 -8
- package/bundled/locales/zh-TW/core/git-workflow.md +197 -37
- package/bundled/locales/zh-TW/core/git-worktree.md +79 -49
- package/bundled/locales/zh-TW/core/guides/anti-hallucination-guide.md +234 -487
- package/bundled/locales/zh-TW/core/guides/file-placement-guide.md +86 -2
- package/bundled/locales/zh-TW/core/guides/git-workflow-guide.md +411 -464
- package/bundled/locales/zh-TW/core/guides/performance-guide.md +2 -0
- package/bundled/locales/zh-TW/core/guides/refactoring-guide.md +237 -484
- package/bundled/locales/zh-TW/core/guides/security-guide.md +2 -0
- package/bundled/locales/zh-TW/core/health-check-standards.md +46 -104
- package/bundled/locales/zh-TW/core/immutability-first.md +45 -85
- package/bundled/locales/zh-TW/core/knowledge-graph-memory.md +2 -1
- package/bundled/locales/zh-TW/core/knowledge-transfer-standards.md +103 -40
- package/bundled/locales/zh-TW/core/observability-standards.md +284 -40
- package/bundled/locales/zh-TW/core/performance-standards.md +387 -86
- package/bundled/locales/zh-TW/core/pipeline-integration-standards.md +2 -1
- package/bundled/locales/zh-TW/core/postmortem-standards.md +367 -36
- package/bundled/locales/zh-TW/core/privacy-standards.md +153 -46
- package/bundled/locales/zh-TW/core/project-context-memory.md +210 -31
- package/bundled/locales/zh-TW/core/project-structure.md +240 -19
- package/bundled/locales/zh-TW/core/recovery-recipe-registry.md +54 -114
- package/bundled/locales/zh-TW/core/refactoring-standards.md +153 -48
- package/bundled/locales/zh-TW/core/requirement-engineering.md +8 -37
- package/bundled/locales/zh-TW/core/retrospective-standards.md +127 -7
- package/bundled/locales/zh-TW/core/retry-standards.md +41 -105
- package/bundled/locales/zh-TW/core/reverse-engineering-standards.md +5 -1
- package/bundled/locales/zh-TW/core/runbook-standards.md +296 -23
- package/bundled/locales/zh-TW/core/secret-management-standards.md +12 -4
- package/bundled/locales/zh-TW/core/security-decision.md +43 -84
- package/bundled/locales/zh-TW/core/security-standards.md +204 -25
- package/bundled/locales/zh-TW/core/self-review-protocol.md +2 -1
- package/bundled/locales/zh-TW/core/skill-standard-alignment-check.md +103 -69
- package/bundled/locales/zh-TW/core/slo-standards.md +301 -49
- package/bundled/locales/zh-TW/core/spec-driven-development.md +36 -7
- package/bundled/locales/zh-TW/core/standard-admission-criteria.md +22 -28
- package/bundled/locales/zh-TW/core/standard-lifecycle-management.md +40 -48
- package/bundled/locales/zh-TW/core/structured-task-definition.md +2 -1
- package/bundled/locales/zh-TW/core/supply-chain-security-standards.md +137 -10
- package/bundled/locales/zh-TW/core/systematic-debugging.md +94 -38
- package/bundled/locales/zh-TW/core/tech-debt-standards.md +170 -54
- package/bundled/locales/zh-TW/core/test-completeness-dimensions.md +101 -12
- package/bundled/locales/zh-TW/core/test-data-standards.md +245 -23
- package/bundled/locales/zh-TW/core/test-driven-development.md +4 -1
- package/bundled/locales/zh-TW/core/test-governance.md +92 -32
- package/bundled/locales/zh-TW/core/testing-standards.md +61 -14
- package/bundled/locales/zh-TW/core/timeout-standards.md +45 -85
- package/bundled/locales/zh-TW/core/token-budget.md +41 -112
- package/bundled/locales/zh-TW/core/translation-lifecycle-standards.md +28 -16
- package/bundled/locales/zh-TW/core/verification-evidence.md +2 -1
- package/bundled/locales/zh-TW/core/versioning.md +6 -2
- package/bundled/locales/zh-TW/core/virtual-organization-standards.md +42 -36
- package/bundled/locales/zh-TW/core/workflow-enforcement.md +2 -1
- package/bundled/locales/zh-TW/core/workflow-state-protocol.md +2 -1
- package/bundled/locales/zh-TW/docs/CHEATSHEET.md +2 -1
- package/bundled/locales/zh-TW/docs/CLI-FLOW.md +2 -1
- package/bundled/locales/zh-TW/docs/CLI-INIT-OPTIONS.md +12 -3
- package/bundled/locales/zh-TW/docs/DEV-WORKFLOW-MAPPING.md +2 -1
- package/bundled/locales/zh-TW/docs/FEATURE-REFERENCE.md +8 -6
- package/bundled/locales/zh-TW/docs/STANDARDS-REFERENCE.md +2 -1
- package/bundled/locales/zh-TW/docs/USAGE-MODES-COMPARISON.md +2 -1
- package/bundled/locales/zh-TW/docs/USER-MANUAL.md +9 -1
- package/bundled/locales/zh-TW/docs/WINDOWS-GUIDE.md +4 -1
- package/bundled/locales/zh-TW/docs/specs/system/memory-adoption-strategy.md +2 -0
- package/bundled/locales/zh-TW/docs/user/FAQ.md +2 -0
- package/bundled/locales/zh-TW/docs/user/GETTING-STARTED.md +2 -0
- package/bundled/locales/zh-TW/docs/user/GLOSSARY.md +2 -0
- package/bundled/locales/zh-TW/docs/user/README.md +2 -0
- package/bundled/locales/zh-TW/docs/user/TROUBLESHOOTING.md +2 -0
- package/bundled/locales/zh-TW/integrations/claude-code/README.md +2 -1
- package/bundled/locales/zh-TW/integrations/codex/AGENTS.md +136 -2
- package/bundled/locales/zh-TW/integrations/codex/README.md +7 -1
- package/bundled/locales/zh-TW/integrations/gemini-cli/GEMINI.md +59 -1
- package/bundled/locales/zh-TW/integrations/gemini-cli/README.md +8 -1
- package/bundled/locales/zh-TW/integrations/github-copilot/COPILOT-CHAT-REFERENCE.md +7 -1
- package/bundled/locales/zh-TW/integrations/github-copilot/README.md +9 -3
- package/bundled/locales/zh-TW/integrations/github-copilot/copilot-instructions.md +146 -12
- package/bundled/locales/zh-TW/integrations/github-copilot/skills-mapping.md +7 -1
- package/bundled/locales/zh-TW/integrations/google-antigravity/AGENTS.md +110 -3
- package/bundled/locales/zh-TW/integrations/google-antigravity/README.md +7 -1
- package/bundled/locales/zh-TW/integrations/opencode/AGENTS.md +140 -2
- package/bundled/locales/zh-TW/integrations/opencode/README.md +7 -1
- package/bundled/locales/zh-TW/integrations/opencode/skills-mapping.md +8 -2
- package/bundled/locales/zh-TW/integrations/openspec/AGENTS.md +46 -1
- package/bundled/locales/zh-TW/integrations/openspec/README.md +7 -1
- package/bundled/locales/zh-TW/integrations/spec-kit/AGENTS.md +20 -2
- package/bundled/locales/zh-TW/integrations/spec-kit/README.md +7 -1
- package/bundled/locales/zh-TW/methodologies/guides/tdd-guide.md +584 -475
- package/bundled/locales/zh-TW/options/changelog/auto-generated.md +2 -0
- package/bundled/locales/zh-TW/options/changelog/keep-a-changelog.md +2 -0
- package/bundled/locales/zh-TW/options/code-review/automated-review.md +2 -0
- package/bundled/locales/zh-TW/options/code-review/pair-programming.md +2 -0
- package/bundled/locales/zh-TW/options/commit-message/bilingual.md +93 -5
- package/bundled/locales/zh-TW/options/commit-message/english.md +118 -1
- package/bundled/locales/zh-TW/options/commit-message/traditional-chinese.md +82 -1
- package/bundled/locales/zh-TW/options/documentation/api-docs.md +2 -0
- package/bundled/locales/zh-TW/options/documentation/markdown-docs.md +2 -0
- package/bundled/locales/zh-TW/options/documentation/wiki-style.md +2 -0
- package/bundled/locales/zh-TW/options/git-workflow/gitflow.md +99 -71
- package/bundled/locales/zh-TW/options/git-workflow/github-flow.md +68 -50
- package/bundled/locales/zh-TW/options/git-workflow/merge-commit.md +131 -20
- package/bundled/locales/zh-TW/options/git-workflow/rebase-ff.md +142 -27
- package/bundled/locales/zh-TW/options/git-workflow/squash-merge.md +100 -15
- package/bundled/locales/zh-TW/options/git-workflow/trunk-based.md +103 -56
- package/bundled/locales/zh-TW/options/project-structure/dotnet.md +233 -14
- package/bundled/locales/zh-TW/options/project-structure/go.md +270 -12
- package/bundled/locales/zh-TW/options/project-structure/java.md +235 -15
- package/bundled/locales/zh-TW/options/project-structure/kotlin.md +2 -0
- package/bundled/locales/zh-TW/options/project-structure/nodejs.md +136 -19
- package/bundled/locales/zh-TW/options/project-structure/php.md +2 -0
- package/bundled/locales/zh-TW/options/project-structure/python.md +177 -19
- package/bundled/locales/zh-TW/options/project-structure/ruby.md +2 -0
- package/bundled/locales/zh-TW/options/project-structure/rust.md +2 -0
- package/bundled/locales/zh-TW/options/project-structure/swift.md +2 -0
- package/bundled/locales/zh-TW/options/testing/contract-testing.md +2 -0
- package/bundled/locales/zh-TW/options/testing/e2e-testing.md +182 -21
- package/bundled/locales/zh-TW/options/testing/industry-pyramid.md +2 -0
- package/bundled/locales/zh-TW/options/testing/integration-testing.md +134 -22
- package/bundled/locales/zh-TW/options/testing/istqb-framework.md +2 -0
- package/bundled/locales/zh-TW/options/testing/performance-testing.md +2 -0
- package/bundled/locales/zh-TW/options/testing/security-testing.md +2 -0
- package/bundled/locales/zh-TW/options/testing/system-testing.md +175 -1
- package/bundled/locales/zh-TW/options/testing/unit-testing.md +123 -9
- package/bundled/locales/zh-TW/skills/CONTRIBUTING.template.md +3 -2
- package/bundled/locales/zh-TW/skills/INTEGRATION-GUIDE.md +2 -1
- package/bundled/locales/zh-TW/skills/README.md +2 -1
- package/bundled/locales/zh-TW/skills/_shared/README.md +2 -1
- package/bundled/locales/zh-TW/skills/ac-coverage/SKILL.md +15 -4
- package/bundled/locales/zh-TW/skills/adr-assistant/guide.md +123 -3
- package/bundled/locales/zh-TW/skills/agents/README.md +99 -1
- package/bundled/locales/zh-TW/skills/agents/code-architect.md +2 -0
- package/bundled/locales/zh-TW/skills/agents/doc-writer.md +2 -0
- package/bundled/locales/zh-TW/skills/agents/reviewer.md +3 -1
- package/bundled/locales/zh-TW/skills/agents/spec-analyst.md +2 -0
- package/bundled/locales/zh-TW/skills/agents/test-specialist.md +2 -0
- package/bundled/locales/zh-TW/skills/ai-collaboration-standards/SKILL.md +48 -37
- package/bundled/locales/zh-TW/skills/ai-collaboration-standards/anti-hallucination.md +22 -2
- package/bundled/locales/zh-TW/skills/ai-collaboration-standards/certainty-labels.md +29 -3
- package/bundled/locales/zh-TW/skills/ai-friendly-architecture/SKILL.md +23 -36
- package/bundled/locales/zh-TW/skills/ai-instruction-standards/SKILL.md +12 -36
- package/bundled/locales/zh-TW/skills/api-design-assistant/SKILL.md +21 -5
- package/bundled/locales/zh-TW/skills/atdd-assistant/SKILL.md +40 -15
- package/bundled/locales/zh-TW/skills/atdd-assistant/acceptance-criteria-guide.md +2 -1
- package/bundled/locales/zh-TW/skills/atdd-assistant/atdd-workflow.md +98 -1
- package/bundled/locales/zh-TW/skills/atdd-assistant/guide.md +24 -8
- package/bundled/locales/zh-TW/skills/audit-assistant/SKILL.md +8 -2
- package/bundled/locales/zh-TW/skills/bdd-assistant/SKILL.md +29 -6
- package/bundled/locales/zh-TW/skills/bdd-assistant/bdd-workflow.md +2 -1
- package/bundled/locales/zh-TW/skills/bdd-assistant/gherkin-guide.md +2 -1
- package/bundled/locales/zh-TW/skills/bdd-assistant/guide.md +9 -8
- package/bundled/locales/zh-TW/skills/changelog-guide/SKILL.md +12 -3
- package/bundled/locales/zh-TW/skills/changelog-guide/guide.md +11 -7
- package/bundled/locales/zh-TW/skills/checkin-assistant/SKILL.md +19 -3
- package/bundled/locales/zh-TW/skills/checkin-assistant/guide.md +5 -3
- package/bundled/locales/zh-TW/skills/ci-cd-assistant/SKILL.md +35 -16
- package/bundled/locales/zh-TW/skills/code-review-assistant/SKILL.md +19 -2
- package/bundled/locales/zh-TW/skills/code-review-assistant/checkin-checklist.md +2 -1
- package/bundled/locales/zh-TW/skills/code-review-assistant/guide.md +81 -6
- package/bundled/locales/zh-TW/skills/code-review-assistant/review-checklist.md +2 -1
- package/bundled/locales/zh-TW/skills/commands/ac-coverage.md +47 -2
- package/bundled/locales/zh-TW/skills/commands/api-design.md +3 -2
- package/bundled/locales/zh-TW/skills/commands/atdd.md +80 -10
- package/bundled/locales/zh-TW/skills/commands/audit.md +3 -2
- package/bundled/locales/zh-TW/skills/commands/bdd.md +114 -16
- package/bundled/locales/zh-TW/skills/commands/changelog.md +45 -9
- package/bundled/locales/zh-TW/skills/commands/check.md +74 -21
- package/bundled/locales/zh-TW/skills/commands/checkin.md +56 -11
- package/bundled/locales/zh-TW/skills/commands/ci-cd.md +2 -1
- package/bundled/locales/zh-TW/skills/commands/code-review.md +43 -2
- package/bundled/locales/zh-TW/skills/commands/commit.md +58 -4
- package/bundled/locales/zh-TW/skills/commands/config.md +52 -4
- package/bundled/locales/zh-TW/skills/commands/coverage.md +45 -4
- package/bundled/locales/zh-TW/skills/commands/database.md +3 -2
- package/bundled/locales/zh-TW/skills/commands/derive-all.md +44 -2
- package/bundled/locales/zh-TW/skills/commands/derive-atdd.md +37 -2
- package/bundled/locales/zh-TW/skills/commands/derive-bdd.md +44 -3
- package/bundled/locales/zh-TW/skills/commands/derive-tdd.md +45 -3
- package/bundled/locales/zh-TW/skills/commands/derive.md +62 -5
- package/bundled/locales/zh-TW/skills/commands/dev-workflow.md +60 -9
- package/bundled/locales/zh-TW/skills/commands/discover.md +43 -2
- package/bundled/locales/zh-TW/skills/commands/docgen.md +39 -2
- package/bundled/locales/zh-TW/skills/commands/docs.md +139 -7
- package/bundled/locales/zh-TW/skills/commands/durable.md +3 -2
- package/bundled/locales/zh-TW/skills/commands/e2e.md +86 -3
- package/bundled/locales/zh-TW/skills/commands/guide.md +4 -2
- package/bundled/locales/zh-TW/skills/commands/incident.md +3 -2
- package/bundled/locales/zh-TW/skills/commands/init.md +72 -15
- package/bundled/locales/zh-TW/skills/commands/methodology.md +117 -28
- package/bundled/locales/zh-TW/skills/commands/metrics.md +2 -1
- package/bundled/locales/zh-TW/skills/commands/migrate.md +2 -1
- package/bundled/locales/zh-TW/skills/commands/observability.md +45 -2
- package/bundled/locales/zh-TW/skills/commands/pr.md +2 -1
- package/bundled/locales/zh-TW/skills/commands/refactor.md +54 -13
- package/bundled/locales/zh-TW/skills/commands/release.md +83 -2
- package/bundled/locales/zh-TW/skills/commands/requirement.md +41 -2
- package/bundled/locales/zh-TW/skills/commands/reverse-bdd.md +37 -2
- package/bundled/locales/zh-TW/skills/commands/reverse-sdd.md +45 -2
- package/bundled/locales/zh-TW/skills/commands/reverse-tdd.md +43 -2
- package/bundled/locales/zh-TW/skills/commands/reverse.md +44 -2
- package/bundled/locales/zh-TW/skills/commands/runbook.md +47 -2
- package/bundled/locales/zh-TW/skills/commands/scan.md +3 -2
- package/bundled/locales/zh-TW/skills/commands/sdd-retro.md +52 -3
- package/bundled/locales/zh-TW/skills/commands/sdd.md +209 -28
- package/bundled/locales/zh-TW/skills/commands/security.md +3 -2
- package/bundled/locales/zh-TW/skills/commands/slo.md +48 -2
- package/bundled/locales/zh-TW/skills/commands/tdd.md +71 -2
- package/bundled/locales/zh-TW/skills/commands/update.md +64 -2
- package/bundled/locales/zh-TW/skills/commit-standards/SKILL.md +2 -2
- package/bundled/locales/zh-TW/skills/commit-standards/conventional-commits.md +2 -1
- package/bundled/locales/zh-TW/skills/commit-standards/guide.md +137 -17
- package/bundled/locales/zh-TW/skills/commit-standards/language-options.md +21 -18
- package/bundled/locales/zh-TW/skills/contract-test-assistant/SKILL.md +2 -2
- package/bundled/locales/zh-TW/skills/contract-test-assistant/guide.md +81 -1
- package/bundled/locales/zh-TW/skills/database-assistant/SKILL.md +21 -5
- package/bundled/locales/zh-TW/skills/deploy-assistant/SKILL.md +2 -1
- package/bundled/locales/zh-TW/skills/dev-methodology/SKILL.md +4 -1
- package/bundled/locales/zh-TW/skills/dev-methodology/create-methodology.md +2 -0
- package/bundled/locales/zh-TW/skills/dev-methodology/runtime.md +2 -0
- package/bundled/locales/zh-TW/skills/docs-generator/SKILL.md +19 -2
- package/bundled/locales/zh-TW/skills/docs-generator/guide.md +4 -3
- package/bundled/locales/zh-TW/skills/documentation-guide/SKILL.md +67 -42
- package/bundled/locales/zh-TW/skills/documentation-guide/documentation-structure.md +2 -1
- package/bundled/locales/zh-TW/skills/documentation-guide/readme-template.md +2 -1
- package/bundled/locales/zh-TW/skills/durable-execution-assistant/SKILL.md +32 -3
- package/bundled/locales/zh-TW/skills/e2e-assistant/SKILL.md +25 -7
- package/bundled/locales/zh-TW/skills/error-code-guide/SKILL.md +17 -34
- package/bundled/locales/zh-TW/skills/git-workflow-guide/SKILL.md +33 -38
- package/bundled/locales/zh-TW/skills/git-workflow-guide/branch-naming.md +2 -1
- package/bundled/locales/zh-TW/skills/git-workflow-guide/git-workflow.md +2 -1
- package/bundled/locales/zh-TW/skills/incident-response-assistant/SKILL.md +35 -14
- package/bundled/locales/zh-TW/skills/journey-test-assistant/SKILL.md +2 -14
- package/bundled/locales/zh-TW/skills/knowledge-graph/SKILL.md +6 -2
- package/bundled/locales/zh-TW/skills/metrics-dashboard-assistant/SKILL.md +42 -3
- package/bundled/locales/zh-TW/skills/observability-assistant/SKILL.md +85 -18
- package/bundled/locales/zh-TW/skills/pr-automation-assistant/SKILL.md +27 -3
- package/bundled/locales/zh-TW/skills/project-discovery/SKILL.md +11 -3
- package/bundled/locales/zh-TW/skills/project-discovery/guide.md +5 -3
- package/bundled/locales/zh-TW/skills/project-discovery/workflow.md +2 -1
- package/bundled/locales/zh-TW/skills/project-structure-guide/SKILL.md +19 -16
- package/bundled/locales/zh-TW/skills/project-structure-guide/language-patterns.md +2 -1
- package/bundled/locales/zh-TW/skills/refactoring-assistant/SKILL.md +26 -3
- package/bundled/locales/zh-TW/skills/refactoring-assistant/guide.md +4 -2
- package/bundled/locales/zh-TW/skills/release-standards/SKILL.md +91 -45
- package/bundled/locales/zh-TW/skills/release-standards/changelog-format.md +4 -3
- package/bundled/locales/zh-TW/skills/release-standards/guide.md +14 -5
- package/bundled/locales/zh-TW/skills/release-standards/release-workflow.md +5 -1
- package/bundled/locales/zh-TW/skills/release-standards/semantic-versioning.md +2 -1
- package/bundled/locales/zh-TW/skills/requirement-assistant/SKILL.md +15 -6
- package/bundled/locales/zh-TW/skills/requirement-assistant/guide.md +18 -8
- package/bundled/locales/zh-TW/skills/requirement-assistant/requirement-checklist.md +2 -1
- package/bundled/locales/zh-TW/skills/requirement-assistant/requirement-writing.md +2 -1
- package/bundled/locales/zh-TW/skills/retrospective-assistant/guide.md +200 -6
- package/bundled/locales/zh-TW/skills/reverse-engineer/bdd-extraction.md +2 -1
- package/bundled/locales/zh-TW/skills/reverse-engineer/guide.md +161 -36
- package/bundled/locales/zh-TW/skills/reverse-engineer/tdd-analysis.md +2 -1
- package/bundled/locales/zh-TW/skills/reverse-engineer/workflow.md +2 -1
- package/bundled/locales/zh-TW/skills/runbook-assistant/SKILL.md +9 -1
- package/bundled/locales/zh-TW/skills/security-assistant/SKILL.md +25 -5
- package/bundled/locales/zh-TW/skills/security-scan-assistant/SKILL.md +34 -8
- package/bundled/locales/zh-TW/skills/skill-builder/SKILL.md +3 -21
- package/bundled/locales/zh-TW/skills/slo-assistant/SKILL.md +3 -1
- package/bundled/locales/zh-TW/skills/spec-derivation/SKILL.md +2 -1
- package/bundled/locales/zh-TW/skills/spec-driven-dev/guide.md +35 -2
- package/bundled/locales/zh-TW/skills/sweep/SKILL.md +2 -1
- package/bundled/locales/zh-TW/skills/tdd-assistant/SKILL.md +10 -2
- package/bundled/locales/zh-TW/skills/tdd-assistant/guide.md +68 -9
- package/bundled/locales/zh-TW/skills/tdd-assistant/language-examples.md +693 -47
- package/bundled/locales/zh-TW/skills/tdd-assistant/tdd-workflow.md +183 -1
- package/bundled/locales/zh-TW/skills/test-coverage-assistant/SKILL.md +15 -5
- package/bundled/locales/zh-TW/skills/test-coverage-assistant/guide.md +26 -13
- package/bundled/locales/zh-TW/skills/testing-guide/testing-pyramid.md +2 -1
- package/bundled/locales/zh-TW/skills/testing-guide/testing-theory.md +3 -1
- package/bundled/locales/zh-TW/skills/tools/cline/README.md +2 -1
- package/bundled/locales/zh-TW/skills/tools/copilot/README.md +65 -18
- package/bundled/locales/zh-TW/skills/tools/copilot/copilot-instructions.md +2 -1
- package/bundled/locales/zh-TW/skills/tools/cursor/README.md +2 -1
- package/bundled/locales/zh-TW/skills/tools/windsurf/README.md +2 -1
- package/bundled/locales/zh-TW/skills/workflows/README.md +11 -9
- package/bundled/locales/zh-TW/templates/reverse-spec-template.md +50 -1
- package/bundled/skills/.claude-plugin/plugin.json +71 -0
- package/bundled/skills/commit-standards/SKILL.md +2 -2
- package/bundled/skills/commit-standards/guide.md +3 -2
- package/bundled/skills/commit-standards/language-options.md +19 -17
- package/package.json +2 -2
- package/src/commands/audit.js +28 -1
- package/src/commands/check.js +77 -7
- package/src/commands/compile.js +37 -4
- package/src/commands/config.js +49 -24
- package/src/commands/init.js +78 -30
- package/src/commands/open-work.js +6 -2
- package/src/commands/release-messages.js +228 -0
- package/src/commands/release.js +127 -68
- package/src/commands/run-intent.js +11 -0
- package/src/commands/spec-split.js +2 -1
- package/src/commands/spec.js +11 -2
- package/src/commands/update.js +184 -30
- package/src/compilers/claude-code-compiler.js +9 -1
- package/src/config/ai-agent-paths.js +14 -1
- package/src/core/installed-formats.js +15 -0
- package/src/core/open-work-config.js +20 -1
- package/src/core/project-config.js +55 -0
- package/src/i18n/messages.js +160 -2
- package/src/installers/hooks-installer.js +1 -1
- package/src/installers/manifest-installer.js +1 -1
- package/src/installers/skills-installer.js +1 -1
- package/src/installers/standards-installer.js +3 -1
- package/src/mcp/server.js +9 -3
- package/src/prompts/init.js +26 -22
- package/src/reconciler/actual-state-scanner.js +2 -8
- package/src/reconciler/backup-locations.js +5 -0
- package/src/reconciler/backup-manager.js +19 -11
- package/src/reconciler/desired-state-calculator.js +89 -57
- package/src/reconciler/plan-executor.js +101 -8
- package/src/reconciler/recorded-versions.js +49 -0
- package/src/reconciler/relative-path.js +23 -0
- package/src/uninstallers/hook-uninstaller.js +9 -1
- package/src/uninstallers/skills-uninstaller.js +22 -3
- package/src/utils/available-standards-report.js +25 -4
- package/src/utils/available-standards.js +13 -3
- package/src/utils/build-manifest.js +1 -1
- package/src/utils/commit-message-judge.js +60 -13
- package/src/utils/friction-detector.js +23 -11
- package/src/utils/git-hooks.js +106 -4
- package/src/utils/integration-generator.js +95 -67
- package/src/utils/legacy-hook-migration.js +121 -2
- package/src/utils/open-work-tracking.mjs +105 -16
- package/src/utils/sdd-header.js +16 -4
- package/src/utils/skills-installer.js +2 -1
- package/src/utils/spinner.js +14 -4
- package/src/utils/standard-validator.js +3 -2
- package/standards-registry.json +10 -8
- package/bundled/locales/zh-TW/core/guides/testing-guide.md +0 -2280
|
@@ -1,30 +1,33 @@
|
|
|
1
1
|
---
|
|
2
2
|
source: ../../../core/reverse-engineering-standards.md
|
|
3
|
-
source_version: 1.
|
|
4
|
-
translation_version: 1.
|
|
5
|
-
last_synced: 2026-
|
|
6
|
-
|
|
3
|
+
source_version: 1.3.0
|
|
4
|
+
translation_version: 1.3.0
|
|
5
|
+
last_synced: 2026-10-16
|
|
6
|
+
source_hash: 5d4bb821ae35
|
|
7
|
+
status: current
|
|
7
8
|
---
|
|
8
9
|
|
|
9
|
-
# 反向工程标准
|
|
10
|
+
# Reverse Engineering Standards | 反向工程标准
|
|
10
11
|
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
12
|
+
**Version**: 1.3.0
|
|
13
|
+
**Last Updated**: 2026-08-20
|
|
14
|
+
**Applicability**: All projects requiring code-to-specification transformation
|
|
15
|
+
**Scope**: uds-specific
|
|
16
|
+
**Industry Standards**: IEEE 830-1998, SWEBOK v4.0 Chapter 9
|
|
14
17
|
|
|
15
|
-
> **语言**: [English](../../../core/reverse-engineering-standards.md) | [
|
|
18
|
+
> **语言**: [English](../../../core/reverse-engineering-standards.md) | [繁體中文](../../zh-TW/core/reverse-engineering-standards.md) | 简体中文
|
|
16
19
|
|
|
17
20
|
---
|
|
18
21
|
|
|
19
22
|
## 目的
|
|
20
23
|
|
|
21
|
-
|
|
24
|
+
本标准定义将现有代码反向工程为结构化规格文档的原则、工作流程和最佳实践。反向工程是连接遗留系统与现代开发方法论(SDD → BDD → TDD)的桥梁。
|
|
22
25
|
|
|
23
|
-
|
|
24
|
-
-
|
|
25
|
-
-
|
|
26
|
-
-
|
|
27
|
-
-
|
|
26
|
+
**主要收益**:
|
|
27
|
+
- 将未文档化的代码转换为可追溯的规格
|
|
28
|
+
- 在遗留系统上启用现代开发实践
|
|
29
|
+
- 在新团队成员与现有代码库之间建立共同理解
|
|
30
|
+
- 为未来的增强与重构奠定基础
|
|
28
31
|
|
|
29
32
|
---
|
|
30
33
|
|
|
@@ -32,21 +35,21 @@ status: stale
|
|
|
32
35
|
|
|
33
36
|
```
|
|
34
37
|
┌──────────────────────────────────────────────────────────────────────────┐
|
|
35
|
-
│
|
|
38
|
+
│ Reverse Engineering Workflow │
|
|
36
39
|
├──────────────────────────────────────────────────────────────────────────┤
|
|
37
40
|
│ │
|
|
38
41
|
│ ┌─────────────┐ ┌─────────────┐ ┌─────────────┐ ┌───────────┐ │
|
|
39
|
-
│ │
|
|
42
|
+
│ │ Code Scan │───▶│Test Analysis│───▶│Gap Identify │───▶│ Spec Gen │ │
|
|
40
43
|
│ └─────────────┘ └─────────────┘ └─────────────┘ └───────────┘ │
|
|
41
44
|
│ │ │ │ │ │
|
|
42
45
|
│ │ │ │ ▼ │
|
|
43
46
|
│ │ │ │ ┌───────────────┐ │
|
|
44
|
-
│ │ │ │ │
|
|
47
|
+
│ │ │ │ │ Human Review │ │
|
|
45
48
|
│ │ │ │ └───────────────┘ │
|
|
46
49
|
│ │ │ │ │ │
|
|
47
50
|
│ ▼ ▼ ▼ ▼ │
|
|
48
|
-
│
|
|
49
|
-
│
|
|
51
|
+
│ [Confirmed] [Confirmed] [Unknown] [Validated] │
|
|
52
|
+
│ from code from tests for humans specification │
|
|
50
53
|
│ │
|
|
51
54
|
└──────────────────────────────────────────────────────────────────────────┘
|
|
52
55
|
```
|
|
@@ -54,54 +57,131 @@ status: stale
|
|
|
54
57
|
### 工作流程阶段
|
|
55
58
|
|
|
56
59
|
| 阶段 | 说明 | 产出物 | 确定性层级 |
|
|
57
|
-
|
|
58
|
-
|
|
|
59
|
-
| **测试分析** |
|
|
60
|
-
| **隐含规则扫描** | 扫描非 HTTP
|
|
61
|
-
|
|
|
60
|
+
|-------|-------------|--------|-----------------|
|
|
61
|
+
| **代码扫描** | 分析代码结构、API、数据模型 | 技术清单 | [已确认] |
|
|
62
|
+
| **测试分析** | 解析现有测试以提取验收条件 | 草拟验收条件 | [已确认]/[推论] |
|
|
63
|
+
| **隐含规则扫描** | 扫描非 HTTP 持久化写入路径中未文档化的规则 | 隐含规则清单 + 三问解答 | [已确认]/[推论]/[未知] |
|
|
64
|
+
| **权限范围提取** | 提取所有根据操作者自身身份限定结果范围的查询谓词 | 自作用域谓词清单 + 必需的反向测试 | [已确认]/[推论]/[未知] |
|
|
65
|
+
| **缺口识别** | 列出需要人工输入的未知项 | 缺口分析文档 | [未知] 项 |
|
|
62
66
|
| **规格生成** | 生成草拟规格 | 草拟 SPEC-XXX.md | 混合确定性 |
|
|
63
|
-
|
|
|
67
|
+
| **人工审查** | 利益相关者验证与填补缺口 | 已验证规格 | [已确认] |
|
|
64
68
|
|
|
65
|
-
> **注(v1.
|
|
69
|
+
> **注(v1.3.0)**:**权限范围提取**阶段与隐含规则扫描并行运行——参见下方的[权限范围提取(自引用查询谓词)](#auth-scope-extraction-self-referential-query-predicates)。隐含规则扫描涵盖那些由于在请求路径**之外**运行而不可见的规则。本阶段涵盖的则是一条虽然位于得到充分执行的请求路径**之上**却依然不可见的规则:一个根据操作者自身身份限定结果范围的 `WHERE` 谓词。它看起来只是若干过滤条件中的一个,而一旦重写时遗漏了它,返回的数据形状完全正确——却属于所有人。
|
|
70
|
+
>
|
|
71
|
+
> **注(v1.2.0)**:在代码扫描/测试分析之后、缺口识别之前插入了**隐含规则扫描**阶段——参见下方的[隐含规则扫描(非 HTTP 持久化规则)](#implicit-rule-scan-non-http-persistence-rules)。标准代码扫描提取 HTTP 入口点与数据模型,但持久化字段的值经常由**非 HTTP 路径**(cron、队列、计算列、触发器、ORM 钩子)写入,其业务规则从未被文档化——这是跨语言重写或跨数据库迁移中遗漏逻辑发生频率最高的原因。
|
|
66
72
|
|
|
67
73
|
---
|
|
68
74
|
|
|
69
75
|
## 隐含规则扫描(非 HTTP 持久化规则)
|
|
70
76
|
|
|
71
|
-
>
|
|
77
|
+
> **工作流程位置**:代码扫描/测试分析之后,缺口识别之前。
|
|
72
78
|
|
|
73
|
-
|
|
79
|
+
代码扫描提取的是通过 HTTP 可达的内容——路由、控制器、请求处理器。但持久化字段的值往往是在**请求路径之外**决定的:夜间 cron 翻转状态、队列重试重新打上时间戳、数据库触发器计算总和、ORM 生命周期钩子将计数器归零。这些规则很少被记录下来,因此仅镜像 HTTP 表面的重写会静默丢失它们。本阶段机械化地推导出每一条非 HTTP 写入路径,并将每条隐含规则锁定为可验证的产物。
|
|
74
80
|
|
|
75
|
-
###
|
|
81
|
+
### 推导(机械化清单来源)
|
|
76
82
|
|
|
77
|
-
|
|
83
|
+
扫描遗留系统中跨越四个类别的每一条**非 HTTP 持久化写入路径**:
|
|
78
84
|
|
|
79
|
-
1.
|
|
80
|
-
2.
|
|
81
|
-
3.
|
|
82
|
-
4. **ORM
|
|
85
|
+
1. **定时任务(Scheduled)**——crontab 条目、调度器配置、`@Scheduled` 风格注解、批处理作业
|
|
86
|
+
2. **队列(Queue)**——队列消费者、作业处理器、后台 worker、消息监听器
|
|
87
|
+
3. **数据库层(DB-layer)**——触发器、计算列/生成列、`DEFAULT` 表达式、检查约束
|
|
88
|
+
4. **ORM 生命周期(ORM lifecycle)**——`beforeSave`/`afterSave`/观察者/模型事件钩子、修改持久化状态的中间件
|
|
83
89
|
|
|
84
|
-
###
|
|
90
|
+
### 预言机(检测)——每个字段的三问
|
|
85
91
|
|
|
86
|
-
|
|
92
|
+
针对由非 HTTP 路径写入的每个持久化字段,回答并锁定**三个问题**:
|
|
87
93
|
|
|
88
|
-
| 问题 |
|
|
89
|
-
|
|
90
|
-
| **何时设值(SET)?** |
|
|
91
|
-
|
|
|
92
|
-
|
|
|
94
|
+
| 问题 | 需要捕获的内容 |
|
|
95
|
+
|------|-----------------|
|
|
96
|
+
| **何时设值(SET)?** | 首次赋值的条件/触发器 |
|
|
97
|
+
| **何时被覆盖(OVERWRITTEN)?** | 之后每一次写入——**包括异步覆盖**(关联回割接后的聚合对账) |
|
|
98
|
+
| **何时重置/归零(RESET)?** | 清除或恢复为默认值的条件 |
|
|
93
99
|
|
|
94
|
-
-
|
|
95
|
-
-
|
|
96
|
-
-
|
|
100
|
+
- 将**魔鬼代言人(Devil's Advocate)**质疑从 HTTP 层扩展到**覆盖非 HTTP 路径**:将相同的五种对抗性类别(边界、顺序、并发、失败/重试、空值/默认值)应用于 cron 条件、队列重试、计算列和触发器逻辑。
|
|
101
|
+
- 为每条提取的规则标注确定性层级:`[已确认]`(附 `file:line` 引用)/`[推论]`/`[未知]`。每个 `[未知]` 均移交给缺口识别由人工处理——绝不臆测。
|
|
102
|
+
- **产出**:将每条隐含规则锁定为**行为快照场景(behavior-snapshot scenario)**或**对账不变量(reconciliation invariant)**(例如 `SUM(cost) GROUP BY status` 必须跨割接保持一致),使规则成为可重复运行的判定准则(oracle)而非散文式描述。
|
|
97
103
|
|
|
98
|
-
###
|
|
104
|
+
### 门禁时机
|
|
99
105
|
|
|
100
|
-
|
|
106
|
+
起飞前(规划期)。任何三个问题未获解答的非 HTTP 写入字段都会被标记为 `not_implemented` 并**阻断割接(blocks cutover)**——未声明的隐含规则被视为已知的遗漏风险,而非可接受的缺口。
|
|
101
107
|
|
|
102
|
-
### PHP
|
|
108
|
+
### PHP 特别说明:宽松比较/type juggling
|
|
103
109
|
|
|
104
|
-
扫描 PHP
|
|
110
|
+
扫描 PHP 写入路径时,需额外标记**宽松比较/类型戏法(loose-comparison / type-juggling)**依赖项:`==` 比较、`"0"` / `""` / `null` / `0` 的真假值(truthy/falsy)行为,以及字符串到数字的自动强制转换。这些在强类型目标(例如 C#/.NET)下没有直接等价物,因此它们所编码的隐含规则是在跨语言重写期间静默丢失逻辑的高发来源。为每个此类位置标注 `[已确认]` 并附带 `file:line`,并将预期语义锁定为一条明确的规则。
|
|
111
|
+
|
|
112
|
+
---
|
|
113
|
+
|
|
114
|
+
## 权限范围提取(自引用查询谓词)
|
|
115
|
+
|
|
116
|
+
> **工作流程位置**:与隐含规则扫描并行——在代码扫描/测试分析之后,缺口识别之前。
|
|
117
|
+
|
|
118
|
+
**自引用谓词(self-referential predicate)**是一种根据*请求者是谁*来限定结果集范围的查询条件:`WHERE tenant_id = :current_user_tenant`、`WHERE owner = :uid`、`WHERE dept_id = (SELECT dept_id FROM member WHERE account = :uid)`。正是这行代码将“列出所有账户”变成了“列出**你的**账户”。
|
|
119
|
+
|
|
120
|
+
本阶段所回答的问题狭窄且机械化:
|
|
121
|
+
|
|
122
|
+
> **对于遗留代码中每一个根据操作者自身身份限定结果范围的谓词,移植后的代码是否具有等价的谓词?**
|
|
123
|
+
|
|
124
|
+
不是“它是否返回相同的结构形状”。不是“它是否返回数据”。而是一个**等价谓词**:相同的字段,绑定到对*自身(self)*相同的概念定义。
|
|
125
|
+
|
|
126
|
+
### 为什么这需要一个独立阶段
|
|
127
|
+
|
|
128
|
+
授权并非被遗漏的关注点——任何合格的测试分类法都早已将跨租户访问列为测试对象。该关注点并没有丢失;**它只是未被召回(un-recalled)**。以下三个特性使得这一特定缺陷能够在通常可以捕获它的所有门禁中幸存下来:
|
|
129
|
+
|
|
130
|
+
1. **关乎安全的关键代码行看起来就像普通过滤器。** 安全边界存在于 `WHERE` 子句内部,而非请求或响应契约中。移植“获取所有账户”的人会看到 `SELECT` 和 `JOIN`;租户谓词看起来只是众多条件中的又一个而已。
|
|
131
|
+
2. **基于结构形状的断言无法察觉作用域。** 一个以某个有效管理员身份调用端点并断言 `200` 以及非空列表的测试,无论作用域限定是正确的还是被彻底删除了,其通过情况都是**完全相同**的。契约测试、对等快照(parity snapshot)和响应 DTO 比较在此处结构性地失效(全然盲目):无论哪种方式,响应格式都是良好的。只不过它属于所有人。
|
|
132
|
+
3. **存在共享解析器并不等同于该调用点使用了它。** 曾经吃过亏的代码库通常会发展出一个共享的作用域解析器(scope-resolver)工具类。新的或被忽视的调用点可能会从零重新实现该查询并且从未调用它——而该工具类在代码库其他地方的存在反而会产生极大的误导,因为它被误读为测试覆盖。
|
|
133
|
+
|
|
134
|
+
### 推导(机械化清单来源)
|
|
135
|
+
|
|
136
|
+
通过扫描遗留数据访问层来枚举候选谓词——切勿凭记忆行事。根据具体技术栈调整模式;目标是其右侧解析为**调用者自身的值**的任何条件:
|
|
137
|
+
|
|
138
|
+
| 信号 | 示例 |
|
|
139
|
+
|------|------|
|
|
140
|
+
| **直接自身绑定** | `WHERE <col> = :currentUser` / `:uid` / `$operatorId` / `session.user_id` |
|
|
141
|
+
| **租户/组织/所有者字段** | 与调用者派生值进行比较的 `tenant_id`、`org_id`、`master_account`、`owner_id`、`dept_id`、`company_id` |
|
|
142
|
+
| **解析调用者作用域的子查询** | `WHERE dept_id = (SELECT dept_id FROM member WHERE account = :uid)` |
|
|
143
|
+
| **按角色分支构建查询** | 基于 `role` / `account_type` 进行分支,其中**每个分支**应用不同的作用域——枚举每一个分支,而不仅仅是正常路径(happy path)所走的分支 |
|
|
144
|
+
| **在 SQL 之外应用的作用域** | ORM 全局作用域、查询构建器 mixin、仓储基类、行级安全策略、注入过滤器的中间件 |
|
|
145
|
+
|
|
146
|
+
最后一行至关重要:谓词可以由 `SELECT` 语句从未提及的机制来强制执行。仅对 SQL 进行 grep 将报告一个比实际存在的集合**更小**的集合,而在这里,更小的集合看起来恰恰像是一个更安全的集合。
|
|
147
|
+
|
|
148
|
+
### 记录(每个匹配项)
|
|
149
|
+
|
|
150
|
+
针对每个候选谓词进行记录——`[已确认]`需要 `file:line` 引用:
|
|
151
|
+
|
|
152
|
+
| 字段 | 内容 |
|
|
153
|
+
|------|------|
|
|
154
|
+
| **位置** | 遗留源码中的 `file:line` |
|
|
155
|
+
| **谓词** | 确切的条件文本 |
|
|
156
|
+
| **自身绑定** | 解析为哪一个调用者派生值,以及该值是如何获取的 |
|
|
157
|
+
| **触发分支** | 哪个角色/参数/代码路径到达此谓词 |
|
|
158
|
+
| **确定性** | `[已确认]` / `[推论]` / `[未知]` |
|
|
159
|
+
|
|
160
|
+
每个 `[未知]`——即无法从代码中确定的作用域——均进入缺口识别由人工处理。绝不臆测,也绝不假定其不存在。
|
|
161
|
+
|
|
162
|
+
### 预言机(检测)——每个调用点的谓词等价性
|
|
163
|
+
|
|
164
|
+
针对每个记录的谓词,在移植后的代码中验证:
|
|
165
|
+
|
|
166
|
+
1. **存在字面等价物**——相同的字段,绑定到对自身(self)相同的概念定义。一个“恰好对当前数据返回相同行”的不同字段并不是等价的;它只是一个带有有效期的巧合。
|
|
167
|
+
2. **覆盖每一个分支。** 如果遗留代码根据角色进行了不同的作用域限定,则每个分支都需要有自己经过验证的等价物。将五个角色分支合并为一个粗粒度的“此账户是否为管理员?”检查的移植实现,是用权限取代了边界。
|
|
168
|
+
3. **该调用点调用了共享解析器。** 如果新系统将作用域限定集中在一个工具类中,请确认**该**调用点确实调用了它。该工具类在代码库其他位置的存在,并不能作为该端点已正确处理的证据。
|
|
169
|
+
|
|
170
|
+
### 强制性反向测试
|
|
171
|
+
|
|
172
|
+
**规则 RE-AUTH-001(必需)**——每一个确认的自作用域谓词必须由一个**反向测试**锁定:操作者 **A** 发起请求,断言结果为操作者 **B** 的记录在响应中**不存在**。A 和 B 均为有效、已认证且被授权使用该端点的操作者。
|
|
173
|
+
|
|
174
|
+
断言必须是关于**不存在(absence)**。断言 `200`、非空列表或匹配的响应模式(schema)的测试不是充分的证据,且**绝不能**被视为对该谓词的覆盖——即使删除了作用域子句,这些测试中的每一项也都能照样通过。
|
|
175
|
+
|
|
176
|
+
在信任测试之前,一个有用的自检方法是:**在临时副本中删除作用域谓词并重新运行。**如果测试仍然通过,那么无论它的名称叫什么,它都没有在测试作用域。
|
|
177
|
+
|
|
178
|
+
### 门禁时机
|
|
179
|
+
|
|
180
|
+
提取阶段为起飞前(规划期);反向测试阶段为 UAT 前。
|
|
181
|
+
|
|
182
|
+
**规则 RE-AUTH-002(必需)**——任何移植等价物未经验证或没有反向测试的自作用域谓词,均被标记为 `not_implemented` 并**阻断割接**。未经验证的授权边界是已知的遗漏风险,而非可接受的缺口——其故障模式是跨租户信息泄露,而且在测试全绿(ships green)的情况下直接发布。
|
|
183
|
+
|
|
184
|
+
> **出处(Provenance)。** 本阶段源于一次真实的 PHP → C# 迁移,在该迁移中,一个按租户限定作用域的账户列表端点在重写期间丢失了其隔离谓词。移植实现用粗粒度的“该账户是否为任何已启用的管理员?”检查取代了按角色的作用域限定,并不管是哪个租户发起的请求,直接返回数据库中的所有账户。它发布了,它通过了所有现有的测试——该方法本来没有任何测试——直到有客户报告看到了不该出现的账户信息时才被发现。
|
|
105
185
|
|
|
106
186
|
---
|
|
107
187
|
|
|
@@ -109,14 +189,14 @@ pre-flight(规划期)。任何三问未获解答的非 HTTP 写入栏位会
|
|
|
109
189
|
|
|
110
190
|
### 1. 确定性框架
|
|
111
191
|
|
|
112
|
-
|
|
192
|
+
所有提取的信息必须标注确定性层级:
|
|
113
193
|
|
|
114
194
|
| 标签 | 定义 | 范例 |
|
|
115
195
|
|------|------|------|
|
|
116
|
-
| `[已确认]` |
|
|
117
|
-
| `[推论]` | 从观察到的模式进行逻辑推导 | "
|
|
196
|
+
| `[已确认]` | 直接从代码或测试验证 | "POST /api/users 端点位于 src/routes/users.ts:15" |
|
|
197
|
+
| `[推论]` | 从观察到的模式进行逻辑推导 | "根据构造函数模式,可能使用依赖注入" |
|
|
118
198
|
| `[假设]` | 需要验证的合理假设 | "根据典型模式,session 可能在 24 小时后过期" |
|
|
119
|
-
| `[未知]` |
|
|
199
|
+
| `[未知]` | 无法从代码判断,需要人类输入 | "此功能的业务动机" |
|
|
120
200
|
|
|
121
201
|
**规则**:有疑问时,使用更不确定的标签,而非过度声称。
|
|
122
202
|
|
|
@@ -125,24 +205,24 @@ pre-flight(规划期)。任何三问未获解答的非 HTTP 写入栏位会
|
|
|
125
205
|
本标准严格遵循[反幻觉标准](anti-hallucination.md):
|
|
126
206
|
|
|
127
207
|
- **基于证据**:仅分析已明确读取的内容
|
|
128
|
-
- **来源归属**:每项声明必须包含 `[来源:
|
|
208
|
+
- **来源归属**:每项声明必须包含 `[来源: 代码]` 或 `[来源: 测试]` 并附带 file:line 引用
|
|
129
209
|
- **禁止捏造**:未经验证不得编造 API、配置或需求
|
|
130
|
-
-
|
|
210
|
+
- **明确未知**:始终列出无法从代码判断的内容
|
|
131
211
|
|
|
132
|
-
### 3.
|
|
212
|
+
### 3. 渐进式披露
|
|
133
213
|
|
|
134
|
-
|
|
214
|
+
分层提取信息:
|
|
135
215
|
|
|
136
|
-
1.
|
|
137
|
-
2.
|
|
138
|
-
3.
|
|
216
|
+
1. **系统概览**:入口点、主要组件、高层架构
|
|
217
|
+
2. **组件详情**:各个模块、其职责、接口
|
|
218
|
+
3. **实现细节**:算法、数据流、边界情况
|
|
139
219
|
|
|
140
220
|
### 4. 测试对需求映射
|
|
141
221
|
|
|
142
|
-
|
|
222
|
+
现有测试是隐含需求的宝贵来源:
|
|
143
223
|
|
|
144
224
|
```javascript
|
|
145
|
-
//
|
|
225
|
+
// Test: src/tests/auth.test.ts
|
|
146
226
|
describe('Authentication', () => {
|
|
147
227
|
it('should return 401 for invalid credentials', () => {...});
|
|
148
228
|
it('should issue JWT token on successful login', () => {...});
|
|
@@ -152,10 +232,10 @@ describe('Authentication', () => {
|
|
|
152
232
|
映射为:
|
|
153
233
|
|
|
154
234
|
```markdown
|
|
155
|
-
##
|
|
156
|
-
[
|
|
157
|
-
- [ ]
|
|
158
|
-
- [ ]
|
|
235
|
+
## Acceptance Criteria
|
|
236
|
+
[Confirmed] From test analysis (src/tests/auth.test.ts):
|
|
237
|
+
- [ ] Return 401 status code for invalid credentials (line 3)
|
|
238
|
+
- [ ] Issue JWT token on successful login (line 4)
|
|
159
239
|
```
|
|
160
240
|
|
|
161
241
|
---
|
|
@@ -164,26 +244,26 @@ describe('Authentication', () => {
|
|
|
164
244
|
|
|
165
245
|
### 可提取(AI 自动化)
|
|
166
246
|
|
|
167
|
-
|
|
|
247
|
+
| 方面 | 确定性 | 来源 |
|
|
168
248
|
|------|--------|------|
|
|
169
249
|
| API 端点 | [已确认] | 路由定义、控制器 |
|
|
170
|
-
|
|
|
171
|
-
| 函数签名 | [已确认] |
|
|
172
|
-
|
|
|
173
|
-
|
|
|
174
|
-
| 配置模式 | [已确认] |
|
|
175
|
-
| 行为模式 | [推论] |
|
|
250
|
+
| 数据模型 | [已确认] | 类型、接口、Schema |
|
|
251
|
+
| 函数签名 | [已确认] | 参数、返回类型 |
|
|
252
|
+
| 测试用例 | [已确认] | 测试文件 → 验收条件 |
|
|
253
|
+
| 依赖项 | [已确认] | 包引用、导入 |
|
|
254
|
+
| 配置模式 | [已确认] | 配置文件 |
|
|
255
|
+
| 行为模式 | [推论] | 代码分析 |
|
|
176
256
|
|
|
177
257
|
### 不可提取(需要人类输入)
|
|
178
258
|
|
|
179
|
-
|
|
|
259
|
+
| 方面 | 原因 | 必要行动 |
|
|
180
260
|
|------|------|---------|
|
|
181
|
-
| **动机/为什么** |
|
|
182
|
-
|
|
|
183
|
-
| **风险评估** |
|
|
184
|
-
| **取舍决策** |
|
|
261
|
+
| **动机/为什么** | 历史背景不在代码中 | 询问利益相关者 |
|
|
262
|
+
| **业务背景** | 领域知识 | 询问产品负责人 |
|
|
263
|
+
| **风险评估** | 需要领域专业知识 | 咨询领域专家 |
|
|
264
|
+
| **取舍决策** | 缺失历史背景 | 查阅设计文档(如有) |
|
|
185
265
|
| **非功能性需求** | 通常是隐含的 | 与架构师讨论 |
|
|
186
|
-
| **范围外决策** |
|
|
266
|
+
| **范围外决策** | 明确排除的项目 | 审查原始需求 |
|
|
187
267
|
|
|
188
268
|
---
|
|
189
269
|
|
|
@@ -193,40 +273,40 @@ describe('Authentication', () => {
|
|
|
193
273
|
|
|
194
274
|
```
|
|
195
275
|
┌───────────────────────────────────────────────────────────────────────┐
|
|
196
|
-
│
|
|
276
|
+
│ Reverse Engineering → Forward Development │
|
|
197
277
|
├───────────────────────────────────────────────────────────────────────┤
|
|
198
278
|
│ │
|
|
199
|
-
│
|
|
200
|
-
│
|
|
279
|
+
│ Existing │
|
|
280
|
+
│ Code + Tests │
|
|
201
281
|
│ │ │
|
|
202
282
|
│ ▼ │
|
|
203
283
|
│ ┌─────────────────────────────────────────────────────────────┐ │
|
|
204
|
-
│ │
|
|
205
|
-
│ │ •
|
|
206
|
-
│ │ •
|
|
207
|
-
│ │ •
|
|
284
|
+
│ │ Reverse Engineering (This Standard) │ │
|
|
285
|
+
│ │ • Code Scanning → Technical Inventory │ │
|
|
286
|
+
│ │ • Test Analysis → Acceptance Criteria │ │
|
|
287
|
+
│ │ • Gap Identification → [Unknown] List │ │
|
|
208
288
|
│ └─────────────────────────────────────────────────────────────┘ │
|
|
209
289
|
│ │ │
|
|
210
290
|
│ ▼ │
|
|
211
291
|
│ ┌─────────────────────────────────────────────────────────────┐ │
|
|
212
|
-
│ │ SDD
|
|
213
|
-
│ │ •
|
|
214
|
-
│ │ •
|
|
215
|
-
│ │ •
|
|
292
|
+
│ │ SDD (Spec-Driven Development) │ │
|
|
293
|
+
│ │ • Reverse-engineered spec = Proposal Draft │ │
|
|
294
|
+
│ │ • Fill [Unknown] sections → Complete Proposal │ │
|
|
295
|
+
│ │ • Formal Review → Approved Specification │ │
|
|
216
296
|
│ └─────────────────────────────────────────────────────────────┘ │
|
|
217
297
|
│ │ │
|
|
218
298
|
│ ▼ │
|
|
219
299
|
│ ┌─────────────────────────────────────────────────────────────┐ │
|
|
220
|
-
│ │ BDD
|
|
221
|
-
│ │ •
|
|
222
|
-
│ │ •
|
|
300
|
+
│ │ BDD (Behavior-Driven Development) │ │
|
|
301
|
+
│ │ • Acceptance Criteria → Gherkin Scenarios │ │
|
|
302
|
+
│ │ • Stakeholder Validation │ │
|
|
223
303
|
│ └─────────────────────────────────────────────────────────────┘ │
|
|
224
304
|
│ │ │
|
|
225
305
|
│ ▼ │
|
|
226
306
|
│ ┌─────────────────────────────────────────────────────────────┐ │
|
|
227
|
-
│ │ TDD
|
|
228
|
-
│ │ • Gherkin →
|
|
229
|
-
│ │ •
|
|
307
|
+
│ │ TDD (Test-Driven Development) │ │
|
|
308
|
+
│ │ • Gherkin → Unit Test Requirements │ │
|
|
309
|
+
│ │ • Gap Analysis → Missing Test Coverage │ │
|
|
230
310
|
│ └─────────────────────────────────────────────────────────────┘ │
|
|
231
311
|
│ │
|
|
232
312
|
└───────────────────────────────────────────────────────────────────────┘
|
|
@@ -234,31 +314,200 @@ describe('Authentication', () => {
|
|
|
234
314
|
|
|
235
315
|
### SDD 整合
|
|
236
316
|
|
|
237
|
-
|
|
317
|
+
反向工程规格直接进入 SDD 工作流程:
|
|
238
318
|
|
|
239
319
|
1. **产出 = SDD 提案草稿**:生成的规格成为提案
|
|
240
320
|
2. **需要人类审查**:所有 `[未知]` 区块必须由人类填写
|
|
241
321
|
3. **正式核准**:规格必须经过标准 SDD 审查流程
|
|
242
|
-
4.
|
|
322
|
+
4. **状态追踪**:在规格元数据中标记为 "Reverse-Engineered"
|
|
323
|
+
|
|
324
|
+
### BDD 整合
|
|
325
|
+
|
|
326
|
+
将验收条件转换为 Gherkin 格式:
|
|
327
|
+
|
|
328
|
+
```markdown
|
|
329
|
+
## Acceptance Criteria (from reverse engineering)
|
|
330
|
+
[Confirmed] User can add item to empty cart
|
|
331
|
+
[Confirmed] Quantity increments for duplicate items
|
|
332
|
+
[Inferred] Maximum quantity limit: 99 items
|
|
333
|
+
```
|
|
334
|
+
|
|
335
|
+
转换为:
|
|
336
|
+
|
|
337
|
+
```gherkin
|
|
338
|
+
Feature: Shopping Cart
|
|
339
|
+
# Source: Reverse-engineered from src/cart/
|
|
340
|
+
|
|
341
|
+
Scenario: Add item to empty cart
|
|
342
|
+
Given an empty shopping cart
|
|
343
|
+
When the user adds "Widget" to the cart
|
|
344
|
+
Then the cart should contain 1 "Widget"
|
|
345
|
+
|
|
346
|
+
Scenario: Add duplicate item
|
|
347
|
+
Given a cart with 1 "Widget"
|
|
348
|
+
When the user adds another "Widget"
|
|
349
|
+
Then the cart should contain 2 "Widget"
|
|
350
|
+
|
|
351
|
+
@needs-confirmation
|
|
352
|
+
Scenario: Maximum quantity limit
|
|
353
|
+
Given a cart with 99 "Widget"
|
|
354
|
+
When the user tries to add another "Widget"
|
|
355
|
+
Then the add should be rejected
|
|
356
|
+
# [Inferred] - Verify with stakeholders
|
|
357
|
+
```
|
|
358
|
+
|
|
359
|
+
### TDD 整合
|
|
360
|
+
|
|
361
|
+
使用反向工程规格识别测试覆盖缺口:
|
|
362
|
+
|
|
363
|
+
1. **映射现有测试**:将测试关联到验收条件
|
|
364
|
+
2. **识别缺口**:找出没有对应测试的验收条件
|
|
365
|
+
3. **确定优先级**:重点关注高风险且未测试的行为
|
|
366
|
+
4. **编写测试**:使用 TDD 工作流程补全测试覆盖
|
|
367
|
+
|
|
368
|
+
---
|
|
369
|
+
|
|
370
|
+
## 反向工程规格模板
|
|
371
|
+
|
|
372
|
+
```markdown
|
|
373
|
+
# [SPEC-XXX] [Feature Name] - Reverse Engineered
|
|
374
|
+
|
|
375
|
+
## Metadata
|
|
376
|
+
- **Status**: Draft (Reverse-Engineered)
|
|
377
|
+
- **Source**: [directory or file path]
|
|
378
|
+
- **Generated**: [date]
|
|
379
|
+
- **Reviewed By**: [pending]
|
|
380
|
+
|
|
381
|
+
## Summary
|
|
382
|
+
[Brief description - [Inferred] or [Confirmed]]
|
|
383
|
+
|
|
384
|
+
## Motivation
|
|
385
|
+
[Unknown] - Requires human input
|
|
386
|
+
- Why was this feature originally built?
|
|
387
|
+
- What problem does it solve?
|
|
388
|
+
|
|
389
|
+
## Technical Design
|
|
390
|
+
|
|
391
|
+
### API Endpoints
|
|
392
|
+
[Confirmed] From code analysis:
|
|
393
|
+
- `POST /api/resource` - [Source: Code] src/routes/resource.ts:15
|
|
394
|
+
- `GET /api/resource/:id` - [Source: Code] src/routes/resource.ts:25
|
|
395
|
+
|
|
396
|
+
### Data Models
|
|
397
|
+
[Confirmed] From type definitions:
|
|
398
|
+
- `Resource` interface - [Source: Code] src/types/resource.ts:5-20
|
|
399
|
+
|
|
400
|
+
### Dependencies
|
|
401
|
+
[Confirmed] From import analysis:
|
|
402
|
+
- Database: PostgreSQL (knex client)
|
|
403
|
+
- Cache: Redis
|
|
404
|
+
|
|
405
|
+
## Acceptance Criteria
|
|
406
|
+
[Confirmed] From test analysis (src/tests/resource.test.ts):
|
|
407
|
+
- [ ] Create resource with valid data (line 10)
|
|
408
|
+
- [ ] Return 400 for invalid input (line 25)
|
|
409
|
+
- [ ] Return 404 for non-existent resource (line 40)
|
|
410
|
+
|
|
411
|
+
[Unknown] Not covered by tests:
|
|
412
|
+
- [ ] [Need Confirmation] Rate limiting behavior
|
|
413
|
+
- [ ] [Need Confirmation] Cache invalidation strategy
|
|
414
|
+
|
|
415
|
+
## Risks
|
|
416
|
+
[Unknown] - Requires domain expertise
|
|
417
|
+
|
|
418
|
+
## Out of Scope
|
|
419
|
+
[Unknown] - Requires historical context
|
|
420
|
+
|
|
421
|
+
## Source Citations
|
|
422
|
+
| Item | File | Line | Certainty |
|
|
423
|
+
|------|------|------|-----------|
|
|
424
|
+
| POST /api/resource | src/routes/resource.ts | 15 | [Confirmed] |
|
|
425
|
+
| Resource interface | src/types/resource.ts | 5-20 | [Confirmed] |
|
|
426
|
+
| 400 on invalid | src/tests/resource.test.ts | 25 | [Confirmed] |
|
|
427
|
+
```
|
|
428
|
+
|
|
429
|
+
---
|
|
430
|
+
|
|
431
|
+
## 失败处理与升级
|
|
432
|
+
|
|
433
|
+
反向工程从现有代码中推断意图;某些输入无法被安全地分析。本节定义了“失败 → 升级 → 重新验证”路径,以确保低置信度或无法解析的输入绝不会产生看似权威的规格。
|
|
434
|
+
|
|
435
|
+
| 条件 | 触发点 | 操作 | 重新验证 |
|
|
436
|
+
|-----------|---------|--------|-----------|
|
|
437
|
+
| **解析失败** | 源代码无法解析(不支持的语言、损坏的语法树) | 将该单元标记为 `[Unknown]` 并报告语言/文件;升级至人类领域专家。不为其生成任何推断行为。 | 工具修复/补丁后源代码可正常解析 |
|
|
438
|
+
| **未知比例过高** | `[Unknown]` 项超出置信度阈值(默认 > 50% 的行为) | 暂停规格定稿;要求先对业务领域专家进行访谈以填补 `[Unknown]` 项。绝不交付大部分靠猜测的规格。 | 未知比例低于阈值 |
|
|
439
|
+
| **推断冲突** | 代码与先前推断的行为相冲突 | 将该项降级为 `[Assumption]` 并升级给代码所有者;切勿将存在冲突的推断记录为 `[Confirmed]`。 | 所有者确认或修正 |
|
|
440
|
+
| **测试分析失败** | 现有测试无法运行/解析以提取行为 | 回退为仅进行静态分析;将受影响的行为标记为 `[Inferred]`(较低确定性),绝不标记为 `[Confirmed]`。 | — |
|
|
441
|
+
|
|
442
|
+
**规则 RE-FAIL-001(强制)**:解析失败或超出阈值的 `[Unknown]` 比例必须阻断规格定稿并升级至人类处理——绝不能将低于置信度阈值的规格作为权威规格呈现。
|
|
443
|
+
|
|
444
|
+
---
|
|
445
|
+
|
|
446
|
+
## 应避免的反模式
|
|
447
|
+
|
|
448
|
+
### 代码分析反模式
|
|
449
|
+
|
|
450
|
+
| 反模式 | 影响 | 正确方法 |
|
|
451
|
+
|--------------|--------|------------------|
|
|
452
|
+
| **捏造动机** | 误导性规格 | 标记为 `[Unknown]` |
|
|
453
|
+
| **臆测需求** | 虚假信心 | 标记为 `[Need Confirmation]` |
|
|
454
|
+
| **臆想未读代码** | 幻觉 | 仅分析已读取的内容 |
|
|
455
|
+
| **将推断作为事实呈现** | 破坏信任 | 始终使用适当的标签 |
|
|
456
|
+
| **跳过人类审查** | 规格不完整 | 始终要求审查阶段 |
|
|
457
|
+
|
|
458
|
+
### 流程反模式
|
|
459
|
+
|
|
460
|
+
| 反模式 | 影响 | 正确方法 |
|
|
461
|
+
|--------------|--------|------------------|
|
|
462
|
+
| **为未读代码生成规格** | 无效输出 | 先读取所有相关文件 |
|
|
463
|
+
| **未经人类参与填补 [Unknown]** | 无效规格 | 始终获取人类输入 |
|
|
464
|
+
| **跳过测试分析** | 遗漏标准 | 始终分析现有测试 |
|
|
465
|
+
| **单次通过生成** | 规格肤浅 | 使用渐进式揭露 |
|
|
243
466
|
|
|
244
467
|
---
|
|
245
468
|
|
|
246
|
-
##
|
|
469
|
+
## 最佳实践
|
|
247
470
|
|
|
248
|
-
###
|
|
471
|
+
### 应做事项
|
|
472
|
+
|
|
473
|
+
- ✅ 在提出任何论断之前阅读所有相关文件
|
|
474
|
+
- ✅ 为每项陈述标注确定性层级
|
|
475
|
+
- ✅ 包含附带 file:line 引用的来源出处
|
|
476
|
+
- ✅ 清楚列出需要人类输入的内容
|
|
477
|
+
- ✅ 保留原始代码注释作为上下文
|
|
478
|
+
- ✅ 将测试映射至验收条件
|
|
479
|
+
- ✅ 使用渐进式揭露(概览 → 详情)
|
|
480
|
+
- ✅ 与利益相关者验证推断
|
|
481
|
+
|
|
482
|
+
### 避免事项
|
|
483
|
+
|
|
484
|
+
- ❌ 臆测动机或业务上下文
|
|
485
|
+
- ❌ 将推断作为已确认的事实呈现
|
|
486
|
+
- ❌ 跳过来源归属
|
|
487
|
+
- ❌ 为未读取的代码生成规格
|
|
488
|
+
- ❌ 未经人类输入即填补 `[Unknown]` 部分
|
|
489
|
+
- ❌ 忽视现有测试
|
|
490
|
+
- ❌ 跳过人类审查阶段
|
|
491
|
+
- ❌ 过度设计规格
|
|
492
|
+
|
|
493
|
+
---
|
|
494
|
+
|
|
495
|
+
## 工具集成
|
|
496
|
+
|
|
497
|
+
### 命令行工具
|
|
249
498
|
|
|
250
499
|
| 工具 | 命令 | 用途 |
|
|
251
|
-
|
|
252
|
-
| **Claude Code** | `/reverse-spec` |
|
|
253
|
-
| **Claude Code** | `/reverse-bdd` | 将 AC 转换为 Gherkin
|
|
254
|
-
| **Claude Code** | `/reverse-tdd` |
|
|
500
|
+
|------|---------|---------|
|
|
501
|
+
| **Claude Code** | `/reverse-spec` | 从代码生成 SDD 规格 |
|
|
502
|
+
| **Claude Code** | `/reverse-bdd` | 将 AC 转换为 Gherkin 场景 |
|
|
503
|
+
| **Claude Code** | `/reverse-tdd` | 针对 BDD 分析测试覆盖率 |
|
|
255
504
|
|
|
256
505
|
### 技能参考
|
|
257
506
|
|
|
258
|
-
- [反向工程技能](
|
|
259
|
-
- [规格驱动开发技能](
|
|
260
|
-
- [BDD 助手技能](
|
|
261
|
-
- [TDD 助手技能](
|
|
507
|
+
- [反向工程技能](../skills/reverse-engineer/SKILL.md) - 详细工作流程实现
|
|
508
|
+
- [规格驱动开发技能](../skills/spec-driven-dev/SKILL.md) - SDD 集成
|
|
509
|
+
- [BDD 助手技能](../skills/bdd-assistant/SKILL.md) - Gherkin 编写
|
|
510
|
+
- [TDD 助手技能](../skills/tdd-assistant/SKILL.md) - 测试覆盖率分析
|
|
262
511
|
|
|
263
512
|
---
|
|
264
513
|
|
|
@@ -266,33 +515,34 @@ describe('Authentication', () => {
|
|
|
266
515
|
|
|
267
516
|
- [反幻觉指南](anti-hallucination.md) - 基于证据的分析要求
|
|
268
517
|
- [规格驱动开发](spec-driven-development.md) - 规格工作流程
|
|
269
|
-
- [行为驱动开发](
|
|
518
|
+
- [行为驱动开发](behavior-driven-development.md) - Given-When-Then 场景
|
|
270
519
|
- [测试驱动开发](test-driven-development.md) - 红-绿-重构循环
|
|
271
|
-
- [验收测试驱动开发](
|
|
272
|
-
- [
|
|
520
|
+
- [验收测试驱动开发](acceptance-test-driven-development.md) - 验收条件
|
|
521
|
+
- [代码审查清单](code-review-checklist.md) - 审查指南
|
|
522
|
+
- [测试完备性维度](test-completeness-dimensions.md) - 维度 4(授权)指定了跨租户测试;权限范围提取是确定需要哪些测试的发现步骤
|
|
273
523
|
|
|
274
524
|
---
|
|
275
525
|
|
|
276
526
|
## 版本历史
|
|
277
527
|
|
|
278
528
|
| 版本 | 日期 | 变更内容 |
|
|
279
|
-
|
|
280
|
-
| 1.
|
|
529
|
+
|---------|------|---------|
|
|
530
|
+
| 1.3.0 | 2026-08-20 | 新增:权限范围提取阶段(自引用查询谓词)——派生信号包括非 SQL 范围强制执行、附带 `file:line` 的逐匹配记录、覆盖每个角色分支和每个调用点解析器使用的谓词等价 oracle、规则 RE-AUTH-001(强制性反向测试断言不存在另一操作员的记录)和 RE-AUTH-002(未验证的谓词阻断切换)(issue [#166](https://github.com/AsiaOstrich/universal-dev-standards/issues/166)) |
|
|
531
|
+
| 1.2.0 | 2026-06-27 | 新增:隐含规则扫描阶段(非 HTTP 持久化写入路径提取)——4 类 derive 分类 + 三问 oracle + 非 HTTP 魔鬼代言人 + PHP 类型杂耍(type-juggling)说明 + 确定性/`file:line`(XSPEC-284 R4/AC-8) |
|
|
532
|
+
| 1.1.0 | 2026-06-18 | 新增:失败处理与升级章节——解析失败 / 未知比例过高 / 推断冲突升级 + 规则 RE-FAIL-001(XSPEC-292 T7) |
|
|
281
533
|
| 1.0.0 | 2026-01-19 | 初始发布 |
|
|
282
534
|
|
|
283
|
-
> **翻译同步注**:本简体译本仍落后于英文源(缺 1.0.0 的 BDD/TDD 整合、规格范本、反模式、最佳实践,及 1.1.0 的失败处理与升级章节),属既有翻译欠债,需后续完整重译;故前置 metadata 暂保留 `source_version: 1.0.0 / status: stale`。本次仅补入 R4 隐含规则扫描新内容。
|
|
284
|
-
|
|
285
535
|
---
|
|
286
536
|
|
|
287
537
|
## 参考资料
|
|
288
538
|
|
|
289
539
|
- [反幻觉标准](anti-hallucination.md) - 核心合规要求
|
|
290
|
-
- [IEEE 830-1998 -
|
|
291
|
-
- [SWEBOK v4.0 - 第 9
|
|
292
|
-
- [
|
|
540
|
+
- [IEEE 830-1998 - 软件需求规格](https://standards.ieee.org/ieee/830/1222/)
|
|
541
|
+
- [SWEBOK v4.0 - 第 9 章:软件维护](https://www.computer.org/education/bodies-of-knowledge/software-engineering)
|
|
542
|
+
- [与旧有代码有效协作 - Michael Feathers](https://www.oreilly.com/library/view/working-effectively-with/0131177052/)
|
|
293
543
|
|
|
294
544
|
---
|
|
295
545
|
|
|
296
|
-
##
|
|
546
|
+
## 许可证
|
|
297
547
|
|
|
298
|
-
|
|
548
|
+
本标准依据 [CC BY 4.0](https://creativecommons.org/licenses/by/4.0/) 许可发布。
|