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,230 @@
|
|
|
1
|
+
# Pipeline Integration Standards
|
|
2
|
+
|
|
3
|
+
> **Language**: English | [繁體中文](../locales/zh-TW/core/pipeline-integration-standards.md)
|
|
4
|
+
|
|
5
|
+
**Applicability**: All software projects using automated development pipelines
|
|
6
|
+
**Scope**: universal
|
|
7
|
+
|
|
8
|
+
---
|
|
9
|
+
|
|
10
|
+
## Overview
|
|
11
|
+
|
|
12
|
+
Pipeline Integration Standards define how automated development pipelines should read project configuration, execute development stages, and adapt behavior based on project context. This standard provides a language-agnostic, framework-agnostic model for AI-assisted and CI/CD-driven development workflows.
|
|
13
|
+
|
|
14
|
+
## References
|
|
15
|
+
|
|
16
|
+
| Standard/Source | Content |
|
|
17
|
+
|----------------|---------|
|
|
18
|
+
| ISO/IEC 12207 | Software Lifecycle Processes |
|
|
19
|
+
| ISO/IEC 15504 (SPICE) | Process Assessment |
|
|
20
|
+
| Continuous Delivery (Jez Humble) | Pipeline design principles |
|
|
21
|
+
| DORA Metrics | Deployment frequency, lead time, MTTR, change failure rate |
|
|
22
|
+
|
|
23
|
+
---
|
|
24
|
+
|
|
25
|
+
## Configuration Contract
|
|
26
|
+
|
|
27
|
+
### UDS Configuration Block
|
|
28
|
+
|
|
29
|
+
Projects using automated pipelines MUST declare their pipeline preferences in a standard configuration block. The configuration block is typically placed in the project's manifest file (e.g., `manifest.json`, `uds.config.json`, or equivalent).
|
|
30
|
+
|
|
31
|
+
### Standard Toggle Names
|
|
32
|
+
|
|
33
|
+
| Toggle | Type | Default | Description |
|
|
34
|
+
|--------|------|---------|-------------|
|
|
35
|
+
| `autoSpecGeneration` | boolean | false | Automatically generate SDD specs from PRD/user stories |
|
|
36
|
+
| `autoDerive` | boolean | false | Automatically derive BDD/TDD/ATDD from approved specs |
|
|
37
|
+
| `autoTDD` | boolean | false | Automatically enter TDD RED phase after derivation |
|
|
38
|
+
| `autoCheckin` | boolean | false | Automatically commit when all quality gates pass |
|
|
39
|
+
| `autoBatch` | boolean | false | Automatically batch pending changes before commit |
|
|
40
|
+
|
|
41
|
+
### Toggle Semantics
|
|
42
|
+
|
|
43
|
+
Each toggle controls a specific pipeline behavior:
|
|
44
|
+
|
|
45
|
+
| Toggle | When ON | When OFF |
|
|
46
|
+
|--------|---------|----------|
|
|
47
|
+
| `autoSpecGeneration` | Pipeline generates spec draft from input, submits for review | Manual spec creation required |
|
|
48
|
+
| `autoDerive` | Pipeline runs derivation (BDD/TDD/ATDD) after spec approval | Manual derivation via commands |
|
|
49
|
+
| `autoTDD` | Pipeline sets RED state and creates test skeleton after derivation | Developer manually enters TDD |
|
|
50
|
+
| `autoCheckin` | Pipeline commits after all gates pass (tests, lint, coverage) | Developer manually commits |
|
|
51
|
+
| `autoBatch` | Pipeline accumulates changes and merges at threshold | Each change committed individually |
|
|
52
|
+
|
|
53
|
+
### Configuration Example
|
|
54
|
+
|
|
55
|
+
```json
|
|
56
|
+
{
|
|
57
|
+
"pipeline": {
|
|
58
|
+
"autoSpecGeneration": true,
|
|
59
|
+
"autoDerive": true,
|
|
60
|
+
"autoTDD": true,
|
|
61
|
+
"autoCheckin": false,
|
|
62
|
+
"autoBatch": false,
|
|
63
|
+
"context": "greenfield"
|
|
64
|
+
}
|
|
65
|
+
}
|
|
66
|
+
```
|
|
67
|
+
|
|
68
|
+
### Configuration Reading Rules
|
|
69
|
+
|
|
70
|
+
1. **Fail-safe defaults**: All toggles default to OFF (manual mode)
|
|
71
|
+
2. **Explicit declaration**: Pipeline MUST NOT assume toggle state without reading configuration
|
|
72
|
+
3. **Runtime override**: CLI flags or environment variables MAY override file-based configuration
|
|
73
|
+
4. **Validation**: Pipeline MUST validate configuration values before execution
|
|
74
|
+
|
|
75
|
+
---
|
|
76
|
+
|
|
77
|
+
## Pipeline Stage Model
|
|
78
|
+
|
|
79
|
+
### Standard 6-Stage Pipeline
|
|
80
|
+
|
|
81
|
+
```
|
|
82
|
+
┌──────────┐ ┌──────────┐ ┌──────────┐ ┌──────────┐ ┌──────────┐ ┌──────────┐
|
|
83
|
+
│ 1.PLAN │───▶│ 2.SPEC │───▶│ 3.DERIVE │───▶│ 4.BUILD │───▶│ 5.REVIEW │───▶│6.CHECKIN │
|
|
84
|
+
│ 需求分析 │ │ 規格撰寫 │ │ 測試衍生 │ │ 實作建置 │ │ 審查驗證 │ │ 提交簽入 │
|
|
85
|
+
└──────────┘ └──────────┘ └──────────┘ └──────────┘ └──────────┘ └──────────┘
|
|
86
|
+
```
|
|
87
|
+
|
|
88
|
+
### Stage Definitions
|
|
89
|
+
|
|
90
|
+
| Stage | Input | Output | Quality Gate |
|
|
91
|
+
|-------|-------|--------|-------------|
|
|
92
|
+
| **Plan** | PRD, user stories, requirements | Structured requirements document | Requirements reviewed |
|
|
93
|
+
| **Spec** | Requirements | SDD specification with AC | Spec approved |
|
|
94
|
+
| **Derive** | Approved spec | BDD scenarios, TDD skeletons, ATDD tables | 1:1 AC mapping verified |
|
|
95
|
+
| **Build** | Test skeletons + spec | Implementation code | Tests pass (RED→GREEN) |
|
|
96
|
+
| **Review** | Implementation + tests | Review feedback | Review approved |
|
|
97
|
+
| **Checkin** | Approved changes | Committed code | All quality gates pass |
|
|
98
|
+
|
|
99
|
+
### Stage Dependencies
|
|
100
|
+
|
|
101
|
+
- Each stage's output is the next stage's input
|
|
102
|
+
- Stages MUST NOT be skipped without explicit configuration
|
|
103
|
+
- Failed quality gates MUST block progression to next stage
|
|
104
|
+
|
|
105
|
+
---
|
|
106
|
+
|
|
107
|
+
## Development Context Classification
|
|
108
|
+
|
|
109
|
+
### Context Types
|
|
110
|
+
|
|
111
|
+
| Context | Description | Typical Scenario |
|
|
112
|
+
|---------|-------------|------------------|
|
|
113
|
+
| **Greenfield** | New project or feature with no existing code | Starting a new module, new service, new product |
|
|
114
|
+
| **Brownfield** | Existing codebase requiring modification | Adding features to legacy code, refactoring |
|
|
115
|
+
| **Adhoc** | Small, isolated changes | Bug fixes, configuration changes, hotfixes |
|
|
116
|
+
|
|
117
|
+
### Context Strategy Matrix
|
|
118
|
+
|
|
119
|
+
| Stage | Greenfield | Brownfield | Adhoc |
|
|
120
|
+
|-------|-----------|------------|-------|
|
|
121
|
+
| **Plan** | Full requirements | Impact analysis first | Quick assessment |
|
|
122
|
+
| **Spec** | Complete SDD | Delta SDD (changes only) | Optional (for significant changes) |
|
|
123
|
+
| **Derive** | Full derivation | Targeted derivation | Skip (unless complex) |
|
|
124
|
+
| **Build** | TDD from scratch | Modify existing + new tests | Direct fix |
|
|
125
|
+
| **Review** | Full review | Focused review on changes | Quick review |
|
|
126
|
+
| **Checkin** | Standard checkin | Standard checkin | Standard checkin |
|
|
127
|
+
|
|
128
|
+
### Context Detection Heuristics
|
|
129
|
+
|
|
130
|
+
Pipelines SHOULD auto-detect context using these signals:
|
|
131
|
+
|
|
132
|
+
| Signal | Greenfield Indicator | Brownfield Indicator | Adhoc Indicator |
|
|
133
|
+
|--------|---------------------|---------------------|-----------------|
|
|
134
|
+
| File count | 0 or minimal files | Established codebase | N/A |
|
|
135
|
+
| Change scope | New directory/module | Modifications to existing files | 1-3 files changed |
|
|
136
|
+
| Test coverage | No existing tests | Existing test suite | Existing tests cover area |
|
|
137
|
+
| Spec existence | No specs | Existing specs | May or may not have specs |
|
|
138
|
+
|
|
139
|
+
### Context Override
|
|
140
|
+
|
|
141
|
+
Developers can explicitly set context in configuration:
|
|
142
|
+
|
|
143
|
+
```json
|
|
144
|
+
{
|
|
145
|
+
"pipeline": {
|
|
146
|
+
"context": "brownfield"
|
|
147
|
+
}
|
|
148
|
+
}
|
|
149
|
+
```
|
|
150
|
+
|
|
151
|
+
Or via CLI flag:
|
|
152
|
+
```bash
|
|
153
|
+
pipeline run --context=greenfield
|
|
154
|
+
```
|
|
155
|
+
|
|
156
|
+
---
|
|
157
|
+
|
|
158
|
+
## Integration Verification
|
|
159
|
+
|
|
160
|
+
### Pipeline Implementor Checklist
|
|
161
|
+
|
|
162
|
+
Implementors integrating with this standard MUST verify:
|
|
163
|
+
|
|
164
|
+
| Check | Requirement | Verification Method |
|
|
165
|
+
|-------|-------------|-------------------|
|
|
166
|
+
| Config reading | Pipeline reads all toggles from configuration | Unit test: mock config → verify behavior |
|
|
167
|
+
| Default handling | Unset toggles default to OFF | Unit test: empty config → manual mode |
|
|
168
|
+
| Stage execution | All 6 stages execute in order | Integration test: full pipeline run |
|
|
169
|
+
| Gate enforcement | Failed gates block next stage | Integration test: inject failure → verify block |
|
|
170
|
+
| Context awareness | Pipeline adapts to context type | Integration test: each context → verify stages |
|
|
171
|
+
| Override support | CLI flags override file config | Unit test: file + flag → flag wins |
|
|
172
|
+
|
|
173
|
+
### Validation Rules
|
|
174
|
+
|
|
175
|
+
1. **Configuration schema**: Validate against known toggle names; warn on unknown keys
|
|
176
|
+
2. **Toggle type safety**: All toggles MUST be boolean; reject non-boolean values
|
|
177
|
+
3. **Context enum**: Context MUST be one of: `greenfield`, `brownfield`, `adhoc`
|
|
178
|
+
4. **Stage completeness**: Pipeline MUST report which stages were executed and which were skipped
|
|
179
|
+
|
|
180
|
+
---
|
|
181
|
+
|
|
182
|
+
## Anti-Patterns
|
|
183
|
+
|
|
184
|
+
| Anti-Pattern | Impact | Correct Approach |
|
|
185
|
+
|--------------|--------|------------------|
|
|
186
|
+
| Hardcoding pipeline behavior | Cannot adapt to project needs | Read configuration at runtime |
|
|
187
|
+
| Ignoring context type | Wrong stages executed | Detect or read context setting |
|
|
188
|
+
| Skipping quality gates | Broken code enters codebase | Enforce gates at each stage |
|
|
189
|
+
| All-or-nothing automation | Users avoid pipeline entirely | Allow per-toggle granular control |
|
|
190
|
+
| Silent stage skipping | Lost traceability | Log and report all skip decisions |
|
|
191
|
+
|
|
192
|
+
---
|
|
193
|
+
|
|
194
|
+
## Best Practices
|
|
195
|
+
|
|
196
|
+
### Do's
|
|
197
|
+
|
|
198
|
+
- ✅ Read configuration before executing any stage
|
|
199
|
+
- ✅ Default all toggles to OFF (safe defaults)
|
|
200
|
+
- ✅ Log which toggles are active at pipeline start
|
|
201
|
+
- ✅ Report stage execution status (executed/skipped/failed)
|
|
202
|
+
- ✅ Allow granular toggle control per stage
|
|
203
|
+
- ✅ Validate configuration schema before use
|
|
204
|
+
- ✅ Support configuration override via CLI
|
|
205
|
+
|
|
206
|
+
### Don'ts
|
|
207
|
+
|
|
208
|
+
- ❌ Assume toggle state without reading configuration
|
|
209
|
+
- ❌ Skip stages silently without logging
|
|
210
|
+
- ❌ Ignore quality gate failures
|
|
211
|
+
- ❌ Hardcode pipeline behavior
|
|
212
|
+
- ❌ Mix context strategies (e.g., greenfield spec + adhoc build)
|
|
213
|
+
|
|
214
|
+
---
|
|
215
|
+
|
|
216
|
+
## Related Standards
|
|
217
|
+
|
|
218
|
+
- [Spec-Driven Development](spec-driven-development.md) — Spec stage workflow
|
|
219
|
+
- [Forward Derivation Standards](forward-derivation-standards.md) — Derive stage implementation
|
|
220
|
+
- [Check-in Standards](checkin-standards.md) — Checkin stage quality gates
|
|
221
|
+
- [Change Batching Standards](change-batching-standards.md) — Batch merging before checkin
|
|
222
|
+
- [Acceptance Criteria Traceability](acceptance-criteria-traceability.md) — AC tracking across stages
|
|
223
|
+
|
|
224
|
+
---
|
|
225
|
+
|
|
226
|
+
## Version History
|
|
227
|
+
|
|
228
|
+
| Version | Date | Changes |
|
|
229
|
+
|---------|------|---------|
|
|
230
|
+
| 1.0.0 | 2026-03-18 | Initial version — configuration contract, 6-stage pipeline model, context classification |
|
|
@@ -0,0 +1,156 @@
|
|
|
1
|
+
# Systematic Debugging Workflow
|
|
2
|
+
|
|
3
|
+
> **Language**: English | [繁體中文](../locales/zh-TW/core/systematic-debugging.md)
|
|
4
|
+
|
|
5
|
+
**Version**: 1.0.0
|
|
6
|
+
**Last Updated**: 2026-03-20
|
|
7
|
+
**Applicability**: All software projects using AI-assisted development
|
|
8
|
+
**Scope**: universal
|
|
9
|
+
**Inspired by**: [Superpowers](https://github.com/obra/superpowers) — systematic-debugging (MIT)
|
|
10
|
+
|
|
11
|
+
---
|
|
12
|
+
|
|
13
|
+
## Purpose
|
|
14
|
+
|
|
15
|
+
Define a structured, four-phase debugging workflow that prevents the common anti-pattern of "guess and fix" cycles. This standard enforces root cause analysis before any fix attempt and includes the **3-Strike Rule** to catch architectural issues early.
|
|
16
|
+
|
|
17
|
+
本標準定義結構化的四階段除錯工作流,防止常見的「猜測修復」反模式。強制要求在嘗試修復前先進行根因分析,並包含 **3-Strike Rule** 以提早發現架構問題。
|
|
18
|
+
|
|
19
|
+
---
|
|
20
|
+
|
|
21
|
+
## Glossary
|
|
22
|
+
|
|
23
|
+
| Term | Definition |
|
|
24
|
+
|------|-----------|
|
|
25
|
+
| Root Cause | The fundamental reason a defect exists, not merely the symptom |
|
|
26
|
+
| 3-Strike Rule | After 3 consecutive failed fix attempts, suspect an architectural issue |
|
|
27
|
+
| Backward Tracing | Tracing from error symptom back to the originating source |
|
|
28
|
+
| Component Boundary | The interface between two modules or subsystems |
|
|
29
|
+
|
|
30
|
+
---
|
|
31
|
+
|
|
32
|
+
## Core Principle — The Iron Rule
|
|
33
|
+
|
|
34
|
+
> **Never skip root cause analysis to jump directly to a fix.**
|
|
35
|
+
|
|
36
|
+
禁止跳過根因分析直接修復。
|
|
37
|
+
|
|
38
|
+
If you catch yourself saying "quick fix", "just try", or "should work now" — **stop** and return to Phase 1.
|
|
39
|
+
|
|
40
|
+
---
|
|
41
|
+
|
|
42
|
+
## The Four Phases
|
|
43
|
+
|
|
44
|
+
### Phase 1: Root Cause Investigation(根因調查)
|
|
45
|
+
|
|
46
|
+
Analyze error messages and track recent changes to form an initial hypothesis.
|
|
47
|
+
|
|
48
|
+
1. **Read the error carefully** — identify the exact location and type of failure
|
|
49
|
+
2. **Track recent changes** — use `git log`, `git diff`, `git blame` to find what changed
|
|
50
|
+
3. **Add diagnostics at component boundaries** — insert logging / breakpoints at interfaces between modules
|
|
51
|
+
4. **Record observations** — document what you see and form an initial hypothesis
|
|
52
|
+
|
|
53
|
+
分析錯誤訊息並追蹤最近變更,形成初步假設。
|
|
54
|
+
|
|
55
|
+
### Phase 2: Pattern Analysis(模式分析)
|
|
56
|
+
|
|
57
|
+
Compare the failing code against similar working implementations.
|
|
58
|
+
|
|
59
|
+
1. **Search for similar successful implementations** in the codebase
|
|
60
|
+
2. **Identify differences** between the failing and working code
|
|
61
|
+
3. **Check for missing preconditions** — initialization, configuration, ordering
|
|
62
|
+
|
|
63
|
+
比對失敗程式碼與類似的成功實作,找出差異。
|
|
64
|
+
|
|
65
|
+
### Phase 3: Hypothesis Testing(假設測試)
|
|
66
|
+
|
|
67
|
+
Validate your hypothesis with minimal, isolated changes.
|
|
68
|
+
|
|
69
|
+
1. **Make the smallest possible change** to test your hypothesis
|
|
70
|
+
2. **Change only one variable at a time** — never make multiple changes simultaneously
|
|
71
|
+
3. **Record each attempt** — document the hypothesis, the change, and the result
|
|
72
|
+
|
|
73
|
+
以最小化修改驗證假設,每次只改一個變數。
|
|
74
|
+
|
|
75
|
+
### Phase 4: Fix Implementation(修復實作)
|
|
76
|
+
|
|
77
|
+
Only implement the fix after confirming the root cause.
|
|
78
|
+
|
|
79
|
+
1. **Confirm the root cause** is validated by your hypothesis testing
|
|
80
|
+
2. **Implement the fix** with proper error handling
|
|
81
|
+
3. **Run the full test suite** — ensure no regressions
|
|
82
|
+
4. **Verify the fix doesn't introduce new issues**
|
|
83
|
+
|
|
84
|
+
確認根因後才實作修復,並執行完整測試套件驗證。
|
|
85
|
+
|
|
86
|
+
---
|
|
87
|
+
|
|
88
|
+
## The 3-Strike Rule
|
|
89
|
+
|
|
90
|
+
> After **3 consecutive failed fix attempts**, stop guessing and question the architectural design.
|
|
91
|
+
|
|
92
|
+
連續 3 次修復失敗後,必須停止猜測並質疑架構設計。
|
|
93
|
+
|
|
94
|
+
When the 3-Strike Rule triggers:
|
|
95
|
+
|
|
96
|
+
1. Step back from the specific bug
|
|
97
|
+
2. Review the overall module/component design
|
|
98
|
+
3. Consider whether the architecture supports the intended behavior
|
|
99
|
+
4. Look for design flaws that make the bug class possible
|
|
100
|
+
5. Consider refactoring before attempting another fix
|
|
101
|
+
|
|
102
|
+
---
|
|
103
|
+
|
|
104
|
+
## Rules
|
|
105
|
+
|
|
106
|
+
| ID | Trigger | Action | Priority |
|
|
107
|
+
|----|---------|--------|----------|
|
|
108
|
+
| SD-001 | 3 consecutive failed fixes | Stop guessing, question architectural design | Critical |
|
|
109
|
+
| SD-002 | Phrases like "quick fix", "just try", "should work now" | Return to Phase 1 root cause analysis | High |
|
|
110
|
+
| SD-003 | Multi-component interaction error | Add diagnostic observations at every component boundary | Medium |
|
|
111
|
+
|
|
112
|
+
---
|
|
113
|
+
|
|
114
|
+
## Anti-Patterns to Avoid
|
|
115
|
+
|
|
116
|
+
| Anti-Pattern | Why It's Harmful |
|
|
117
|
+
|-------------|-----------------|
|
|
118
|
+
| Shotgun debugging | Random changes waste time and may introduce new bugs |
|
|
119
|
+
| Copy-paste fix from Stack Overflow | Without understanding, the fix may not address the actual root cause |
|
|
120
|
+
| Suppressing the error | Hiding symptoms doesn't fix the problem |
|
|
121
|
+
| "It works on my machine" | Environment differences are clues, not dismissals |
|
|
122
|
+
|
|
123
|
+
---
|
|
124
|
+
|
|
125
|
+
## Examples
|
|
126
|
+
|
|
127
|
+
### Good: Structured Debugging
|
|
128
|
+
|
|
129
|
+
```
|
|
130
|
+
Phase 1: TypeError at line 42 in parser.ts — reading property of undefined
|
|
131
|
+
git log shows parser.ts was modified 2 commits ago
|
|
132
|
+
Added console.log at module boundary → input is null when empty array passed
|
|
133
|
+
|
|
134
|
+
Phase 2: Similar parser in legacy/ handles empty arrays with early return
|
|
135
|
+
|
|
136
|
+
Phase 3: Added early return for empty array → test passes
|
|
137
|
+
Changed only one thing, recorded result
|
|
138
|
+
|
|
139
|
+
Phase 4: Implemented fix, ran full test suite (47/47 pass), no regressions
|
|
140
|
+
```
|
|
141
|
+
|
|
142
|
+
### Bad: Guess-and-Fix
|
|
143
|
+
|
|
144
|
+
```
|
|
145
|
+
"Hmm, let me try adding a null check... nope.
|
|
146
|
+
Maybe wrapping in try-catch... still broken.
|
|
147
|
+
Let me just change the type to any... 🤦"
|
|
148
|
+
```
|
|
149
|
+
|
|
150
|
+
---
|
|
151
|
+
|
|
152
|
+
## References
|
|
153
|
+
|
|
154
|
+
- **Superpowers**: [systematic-debugging](https://github.com/obra/superpowers) (MIT)
|
|
155
|
+
- **The Pragmatic Programmer**: Chapter on Debugging
|
|
156
|
+
- **Debugging by Thinking**: A Multidisciplinary Approach (Robert Charles Metzger)
|
|
@@ -2,8 +2,8 @@
|
|
|
2
2
|
|
|
3
3
|
> **Language**: English | [繁體中文](../locales/zh-TW/core/testing-standards.md)
|
|
4
4
|
|
|
5
|
-
**Version**: 3.
|
|
6
|
-
**Last Updated**: 2026-
|
|
5
|
+
**Version**: 3.1.0
|
|
6
|
+
**Last Updated**: 2026-03-24
|
|
7
7
|
**Applicability**: All software projects
|
|
8
8
|
**Scope**: universal
|
|
9
9
|
**Industry Standards**: ISTQB CTFL v4.0, ISO/IEC/IEEE 29119
|
|
@@ -38,40 +38,62 @@ This standard defines actionable testing rules and conventions for AI agents and
|
|
|
38
38
|
|
|
39
39
|
---
|
|
40
40
|
|
|
41
|
+
## Coverage Targets (Primary Metric)
|
|
42
|
+
|
|
43
|
+
> **Coverage is the primary metric for test quality.** Higher coverage means more code is protected by tests.
|
|
44
|
+
> **覆蓋率是測試品質的主要指標。** 更高的覆蓋率代表更多程式碼受到測試保護。
|
|
45
|
+
|
|
46
|
+
| Metric | Minimum | Standard | Ideal |
|
|
47
|
+
|--------|---------|----------|-------|
|
|
48
|
+
| **Line Coverage** | 80% | 90% | 95%+ |
|
|
49
|
+
| **Branch Coverage** | 70% | 85% | 90%+ |
|
|
50
|
+
| **Function Coverage** | 85% | 95% | 100% |
|
|
51
|
+
| **Mutation Score** | — | 80% | 90%+ (critical code) |
|
|
52
|
+
|
|
53
|
+
**Level definitions:**
|
|
54
|
+
- **Minimum**: Baseline for all projects — below this is a quality risk
|
|
55
|
+
- **Standard**: Target for most projects — achievable with disciplined testing
|
|
56
|
+
- **Ideal**: Target for critical systems and core business logic — strive for 100% where practical
|
|
57
|
+
|
|
58
|
+
> **Practical guidance**: 100% coverage is the ideal goal. In practice, diminishing returns appear around 95%+ for line coverage. Focus the last 5% on critical paths (authentication, payment, data integrity) rather than generated code or trivial getters/setters.
|
|
59
|
+
|
|
60
|
+
---
|
|
61
|
+
|
|
62
|
+
## Coverage vs Ratio — Key Distinction
|
|
63
|
+
|
|
64
|
+
> **AI agents and developers: do NOT confuse these two concepts.**
|
|
65
|
+
|
|
66
|
+
| Concept | Meaning | Importance |
|
|
67
|
+
|---------|---------|------------|
|
|
68
|
+
| **Coverage(覆蓋率)** | Percentage of code executed by tests | **Primary metric** — measures protection |
|
|
69
|
+
| **Ratio(佔比)** | Distribution of test count across levels | Reference only — affects execution time |
|
|
70
|
+
|
|
71
|
+
**Coverage** answers: "How much of my code is tested?"
|
|
72
|
+
**Ratio** answers: "What proportion of my tests are unit vs integration vs E2E?"
|
|
73
|
+
|
|
74
|
+
---
|
|
75
|
+
|
|
41
76
|
## Testing Framework Selection
|
|
42
77
|
|
|
43
78
|
| Framework | Levels | Best For |
|
|
44
79
|
|-----------|--------|----------|
|
|
45
80
|
| **ISTQB** | UT → IT/SIT → ST → AT/UAT | Enterprise, compliance, formal QA |
|
|
46
|
-
| **Industry Pyramid** | UT
|
|
81
|
+
| **Industry Pyramid** | UT → IT → ST → E2E | Agile, DevOps, CI/CD |
|
|
47
82
|
|
|
48
83
|
---
|
|
49
84
|
|
|
50
|
-
## Testing Pyramid (
|
|
85
|
+
## Testing Pyramid (Test Count Ratio — Reference Only)
|
|
51
86
|
|
|
52
|
-
|
|
53
|
-
┌───────┐
|
|
54
|
-
│ E2E │ ← 3% (Slow, expensive)
|
|
55
|
-
─┴───────┴─
|
|
56
|
-
┌───────────┐
|
|
57
|
-
│ ST │ ← 7% (System Testing)
|
|
58
|
-
─┴───────────┴─
|
|
59
|
-
┌─────────────┐
|
|
60
|
-
│ IT │ ← 20% (Integration Testing)
|
|
61
|
-
─┴─────────────┴─
|
|
62
|
-
┌─────────────────┐
|
|
63
|
-
│ UT │ ← 70% (Unit Testing - Foundation)
|
|
64
|
-
└─────────────────┘
|
|
65
|
-
```
|
|
87
|
+
> **Note**: These are test **count** ratios (how many tests at each level), NOT coverage targets. See [Coverage Targets](#coverage-targets-primary-metric) above for coverage requirements.
|
|
66
88
|
|
|
67
|
-
|
|
89
|
+
| Level | Test Count Ratio | Execution Time Target |
|
|
90
|
+
|-------|-----------------|----------------------|
|
|
91
|
+
| Unit Testing (UT) | ~70% of tests | < 10 min total |
|
|
92
|
+
| Integration Testing (IT) | ~20% of tests | < 30 min total |
|
|
93
|
+
| System Testing (ST) | ~7% of tests | < 1 hour total |
|
|
94
|
+
| E2E Testing | ~3% of tests | < 2 hours total |
|
|
68
95
|
|
|
69
|
-
|
|
70
|
-
|-------|------------|----------------------|
|
|
71
|
-
| Unit Testing (UT) | 70% | < 10 min total |
|
|
72
|
-
| Integration Testing (IT) | 20% | < 30 min total |
|
|
73
|
-
| System Testing (ST) | 7% | < 1 hour total |
|
|
74
|
-
| E2E Testing | 3% | < 2 hours total |
|
|
96
|
+
> The 70/20/7/3 ratio is an empirical recommendation (Mike Cohn). It optimizes for fast feedback — most tests run quickly (UT), fewer tests run slowly (E2E).
|
|
75
97
|
|
|
76
98
|
---
|
|
77
99
|
|
|
@@ -110,11 +132,7 @@ This standard defines actionable testing rules and conventions for AI agents and
|
|
|
110
132
|
|
|
111
133
|
#### Coverage Thresholds
|
|
112
134
|
|
|
113
|
-
|
|
114
|
-
|--------|---------|-------------|
|
|
115
|
-
| Line Coverage | 70% | 85% |
|
|
116
|
-
| Branch Coverage | 60% | 80% |
|
|
117
|
-
| Function Coverage | 80% | 90% |
|
|
135
|
+
> See [Coverage Targets](#coverage-targets-primary-metric) at the top of this document for the authoritative coverage requirements.
|
|
118
136
|
|
|
119
137
|
---
|
|
120
138
|
|
|
@@ -429,15 +447,6 @@ tests/
|
|
|
429
447
|
|
|
430
448
|
---
|
|
431
449
|
|
|
432
|
-
## Coverage Targets Summary
|
|
433
|
-
|
|
434
|
-
| Metric | Minimum | Recommended |
|
|
435
|
-
|--------|---------|-------------|
|
|
436
|
-
| Line | 70% | 85% |
|
|
437
|
-
| Branch | 60% | 80% |
|
|
438
|
-
| Function | 80% | 90% |
|
|
439
|
-
| Mutation Score | - | >= 80% (critical code) |
|
|
440
|
-
|
|
441
450
|
---
|
|
442
451
|
|
|
443
452
|
## Related Standards
|
|
@@ -456,6 +465,7 @@ tests/
|
|
|
456
465
|
|
|
457
466
|
| Version | Date | Changes |
|
|
458
467
|
|---------|------|---------|
|
|
468
|
+
| 3.1.0 | 2026-03-24 | **Coverage-first restructure**: Elevated Coverage Targets to primary position, raised thresholds (Line 80/90/95+, Branch 70/85/90+, Function 85/95/100), added Coverage vs Ratio distinction, demoted Testing Pyramid to reference-only |
|
|
459
469
|
| 3.0.0 | 2026-01-29 | **Major refactor**: Split into Rules (this file) and Theory (testing-theory.md). Reduced from 141KB/3185 lines to ~12KB/350 lines. All educational content moved to skills/testing-guide/testing-theory.md. Rules-only format optimized for AI agent consumption. |
|
|
460
470
|
| 2.2.0 | 2026-01-20 | Added Test Documentation Structure section |
|
|
461
471
|
| 2.1.0 | 2026-01-05 | Added SWEBOK v4.0 reference, Testing Fundamentals, Test-Related Measures |
|
|
@@ -0,0 +1,172 @@
|
|
|
1
|
+
# Verification Evidence Standard
|
|
2
|
+
|
|
3
|
+
> **Language**: English | [繁體中文](../locales/zh-TW/core/verification-evidence.md)
|
|
4
|
+
|
|
5
|
+
**Version**: 1.0.0
|
|
6
|
+
**Last Updated**: 2026-03-20
|
|
7
|
+
**Applicability**: All AI-assisted development workflows
|
|
8
|
+
**Scope**: universal
|
|
9
|
+
**Inspired by**: [Superpowers](https://github.com/obra/superpowers) — verification-before-completion (MIT)
|
|
10
|
+
|
|
11
|
+
---
|
|
12
|
+
|
|
13
|
+
## Purpose
|
|
14
|
+
|
|
15
|
+
Establish an "Iron Law" that no task can be claimed as complete without verification evidence. This standard prevents AI agents from hallucinating success and ensures every completion claim is backed by executable proof.
|
|
16
|
+
|
|
17
|
+
建立「鐵律」:無驗證證據不可聲稱完成。防止 AI 代理虛構成功結果,確保每個完成聲明都有可執行的證據支持。
|
|
18
|
+
|
|
19
|
+
---
|
|
20
|
+
|
|
21
|
+
## Glossary
|
|
22
|
+
|
|
23
|
+
| Term | Definition |
|
|
24
|
+
|------|-----------|
|
|
25
|
+
| Verification Evidence | A structured record of a verification command's execution and result |
|
|
26
|
+
| Iron Law | The absolute rule: no evidence = no completion claim |
|
|
27
|
+
| RED-GREEN Cycle | Proving a bug fix by showing the test fails before and passes after the fix |
|
|
28
|
+
| Exit Code | The numeric return value of a command (0 = success, non-zero = failure) |
|
|
29
|
+
|
|
30
|
+
---
|
|
31
|
+
|
|
32
|
+
## The Iron Law
|
|
33
|
+
|
|
34
|
+
> **No verification evidence = no completion claim.**
|
|
35
|
+
|
|
36
|
+
無驗證證據 = 不可聲稱完成。
|
|
37
|
+
|
|
38
|
+
An agent saying "it's done" is not evidence. The verification must be independently executable and produce observable output.
|
|
39
|
+
|
|
40
|
+
代理聲稱「已完成」不是證據。驗證必須是可獨立執行且產生可觀察輸出的。
|
|
41
|
+
|
|
42
|
+
---
|
|
43
|
+
|
|
44
|
+
## Evidence Format
|
|
45
|
+
|
|
46
|
+
Every verification must produce a structured evidence record:
|
|
47
|
+
|
|
48
|
+
```json
|
|
49
|
+
{
|
|
50
|
+
"command": "pnpm test -- --filter core",
|
|
51
|
+
"exit_code": 0,
|
|
52
|
+
"output": "Tests: 47 passed, 0 failed\nDuration: 3.2s",
|
|
53
|
+
"timestamp": "2026-03-20T14:30:00Z"
|
|
54
|
+
}
|
|
55
|
+
```
|
|
56
|
+
|
|
57
|
+
### Required Fields
|
|
58
|
+
|
|
59
|
+
| Field | Type | Required | Description |
|
|
60
|
+
|-------|------|----------|-------------|
|
|
61
|
+
| `command` | string | Yes | The actual verification command executed |
|
|
62
|
+
| `exit_code` | number | Yes | Command exit code (0 = success) |
|
|
63
|
+
| `output` | string | Yes | Command output (truncated to 2000 chars, preserving key info) |
|
|
64
|
+
| `timestamp` | string | Yes | Execution time in ISO 8601 format |
|
|
65
|
+
|
|
66
|
+
---
|
|
67
|
+
|
|
68
|
+
## RED-GREEN Cycle
|
|
69
|
+
|
|
70
|
+
For bug fixes and regression tests, verification requires showing both the failure and the fix:
|
|
71
|
+
|
|
72
|
+
### Step 1: RED — Prove the Bug Exists
|
|
73
|
+
|
|
74
|
+
Run the test **before** the fix to confirm it fails:
|
|
75
|
+
|
|
76
|
+
```json
|
|
77
|
+
{
|
|
78
|
+
"command": "pnpm test -- parser.test.ts",
|
|
79
|
+
"exit_code": 1,
|
|
80
|
+
"output": "FAIL: expected null to equal { name: 'test' }",
|
|
81
|
+
"timestamp": "2026-03-20T14:25:00Z"
|
|
82
|
+
}
|
|
83
|
+
```
|
|
84
|
+
|
|
85
|
+
### Step 2: Apply the Fix
|
|
86
|
+
|
|
87
|
+
Make the code change.
|
|
88
|
+
|
|
89
|
+
### Step 3: GREEN — Prove the Fix Works
|
|
90
|
+
|
|
91
|
+
Run the test **after** the fix to confirm it passes:
|
|
92
|
+
|
|
93
|
+
```json
|
|
94
|
+
{
|
|
95
|
+
"command": "pnpm test -- parser.test.ts",
|
|
96
|
+
"exit_code": 0,
|
|
97
|
+
"output": "PASS: 12 tests passed",
|
|
98
|
+
"timestamp": "2026-03-20T14:28:00Z"
|
|
99
|
+
}
|
|
100
|
+
```
|
|
101
|
+
|
|
102
|
+
### Step 4: Record Both
|
|
103
|
+
|
|
104
|
+
The evidence record must include both RED and GREEN phases.
|
|
105
|
+
|
|
106
|
+
回歸測試必須展示 RED → GREEN 循環,兩個階段的證據都必須記錄。
|
|
107
|
+
|
|
108
|
+
---
|
|
109
|
+
|
|
110
|
+
## Trust Rules
|
|
111
|
+
|
|
112
|
+
| Rule | Description |
|
|
113
|
+
|------|-------------|
|
|
114
|
+
| Agent says "done" but no `verification_evidence` | Mark as **unverified** |
|
|
115
|
+
| `verification_evidence` exists but `exit_code ≠ 0` | Mark as **verification failed** |
|
|
116
|
+
| Multiple verification steps | **All** steps must pass |
|
|
117
|
+
| Agent provides evidence for wrong command | Mark as **unverified** |
|
|
118
|
+
|
|
119
|
+
---
|
|
120
|
+
|
|
121
|
+
## Rules
|
|
122
|
+
|
|
123
|
+
| ID | Trigger | Action | Priority |
|
|
124
|
+
|----|---------|--------|----------|
|
|
125
|
+
| VE-001 | Agent reports success without verification_evidence | Downgrade to `done_with_concerns` | Critical |
|
|
126
|
+
| VE-002 | `exit_code ≠ 0` in evidence | Mark verification failed, trigger fix loop | High |
|
|
127
|
+
| VE-003 | Bug fix without RED-GREEN cycle | Request both RED and GREEN evidence | High |
|
|
128
|
+
| VE-004 | Output exceeds 2000 chars | Truncate but preserve error messages and summary lines | Medium |
|
|
129
|
+
|
|
130
|
+
---
|
|
131
|
+
|
|
132
|
+
## Output Truncation Guidelines
|
|
133
|
+
|
|
134
|
+
When verification output exceeds 2000 characters:
|
|
135
|
+
|
|
136
|
+
1. **Keep**: Error messages, failure summaries, test counts, final status line
|
|
137
|
+
2. **Remove**: Verbose progress output, stack traces for passing tests, duplicate lines
|
|
138
|
+
3. **Mark truncation**: Add `[... truncated ...]` where content was removed
|
|
139
|
+
|
|
140
|
+
---
|
|
141
|
+
|
|
142
|
+
## Examples
|
|
143
|
+
|
|
144
|
+
### Good: Complete Evidence
|
|
145
|
+
|
|
146
|
+
```yaml
|
|
147
|
+
verification_evidence:
|
|
148
|
+
- command: "pnpm test"
|
|
149
|
+
exit_code: 0
|
|
150
|
+
output: "Test Suites: 12 passed\nTests: 147 passed\nTime: 8.3s"
|
|
151
|
+
timestamp: "2026-03-20T14:30:00Z"
|
|
152
|
+
- command: "pnpm lint"
|
|
153
|
+
exit_code: 0
|
|
154
|
+
output: "No issues found"
|
|
155
|
+
timestamp: "2026-03-20T14:30:05Z"
|
|
156
|
+
```
|
|
157
|
+
|
|
158
|
+
### Bad: No Evidence
|
|
159
|
+
|
|
160
|
+
```yaml
|
|
161
|
+
status: success
|
|
162
|
+
message: "I've completed the task and everything should work now."
|
|
163
|
+
# ❌ No verification_evidence — violates Iron Law
|
|
164
|
+
```
|
|
165
|
+
|
|
166
|
+
---
|
|
167
|
+
|
|
168
|
+
## References
|
|
169
|
+
|
|
170
|
+
- **Superpowers**: [verification-before-completion](https://github.com/obra/superpowers) (MIT)
|
|
171
|
+
- **Test-Driven Development**: RED-GREEN-REFACTOR cycle
|
|
172
|
+
- **Anti-Hallucination**: Complementary standard for preventing fabricated claims
|