universal-dev-standards 5.17.0 → 6.1.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/bin/uds.js +13 -135
- package/bundled/ai/options/commit-message/bilingual.ai.yaml +19 -1
- package/bundled/ai/standards/acceptance-criteria-traceability.ai.yaml +13 -4
- package/bundled/ai/standards/accessibility-standards.ai.yaml +1 -1
- package/bundled/ai/standards/ai-response-navigation.ai.yaml +15 -2
- package/bundled/ai/standards/api-design-standards.ai.yaml +27 -4
- package/bundled/ai/standards/behavior-snapshot.ai.yaml +86 -9
- package/bundled/ai/standards/checkin-standards.ai.yaml +3 -3
- package/bundled/ai/standards/code-review.ai.yaml +2 -2
- package/bundled/ai/standards/context-aware-loading.ai.yaml +3 -3
- package/bundled/ai/standards/data-migration-testing.ai.yaml +79 -3
- package/bundled/ai/standards/deprecation-standards.ai.yaml +10 -2
- package/bundled/ai/standards/developer-memory.ai.yaml +4 -3
- package/bundled/ai/standards/documentation-writing-standards.ai.yaml +1 -1
- package/bundled/ai/standards/flow-based-testing.ai.yaml +2 -2
- package/bundled/ai/standards/forward-derivation-standards.ai.yaml +26 -2
- package/bundled/ai/standards/frontend-design-standards.ai.yaml +33 -3
- package/bundled/ai/standards/full-coverage-testing.ai.yaml +34 -2
- package/bundled/ai/standards/git-worktree.ai.yaml +3 -3
- package/bundled/ai/standards/logging.ai.yaml +97 -3
- package/bundled/ai/standards/mock-boundary.ai.yaml +48 -2
- package/bundled/ai/standards/model-provenance.ai.yaml +297 -0
- package/bundled/ai/standards/model-selection.ai.yaml +11 -2
- package/bundled/ai/standards/observability-standards.ai.yaml +10 -0
- package/bundled/ai/standards/performance-standards.ai.yaml +46 -1
- package/bundled/ai/standards/pii-classification.ai.yaml +15 -1
- package/bundled/ai/standards/pipeline-security-gates.ai.yaml +10 -0
- package/bundled/ai/standards/privacy-standards.ai.yaml +2 -2
- package/bundled/ai/standards/project-context-memory.ai.yaml +2 -2
- package/bundled/ai/standards/push-standards.ai.yaml +14 -3
- package/bundled/ai/standards/refactoring-standards.ai.yaml +68 -3
- package/bundled/ai/standards/requirement-engineering.ai.yaml +42 -3
- package/bundled/ai/standards/resource-cost-boundary.ai.yaml +279 -0
- package/bundled/ai/standards/reverse-engineering-standards.ai.yaml +55 -2
- package/bundled/ai/standards/security-testing.ai.yaml +13 -2
- package/bundled/ai/standards/self-review-protocol.ai.yaml +15 -10
- package/bundled/ai/standards/skill-standard-alignment-check.ai.yaml +37 -2
- package/bundled/ai/standards/user-journey-testing.ai.yaml +107 -0
- package/bundled/ai/standards/verification-evidence.ai.yaml +88 -5
- package/bundled/ai/standards/verification-oracle.ai.yaml +278 -0
- package/bundled/ai/standards/versioning.ai.yaml +32 -38
- package/bundled/core/acceptance-criteria-traceability.md +15 -5
- package/bundled/core/accessibility-standards.md +8 -4
- package/bundled/core/ai-friendly-architecture.md +1 -1
- package/bundled/core/ai-response-navigation.md +31 -3
- package/bundled/core/anti-sycophancy-prompting.md +1 -1
- package/bundled/core/api-design-standards.md +92 -7
- package/bundled/core/audit-trail.md +119 -0
- package/bundled/core/behavior-snapshot.md +94 -7
- package/bundled/core/browser-compatibility-standards.md +15 -2
- package/bundled/core/checkin-standards.md +10 -3
- package/bundled/core/code-review-checklist.md +10 -2
- package/bundled/core/container-image-standards.md +97 -0
- package/bundled/core/context-aware-loading.md +2 -2
- package/bundled/core/cost-budget-test.md +1 -1
- package/bundled/core/cross-flow-regression.md +3 -2
- package/bundled/core/data-contract.md +104 -0
- package/bundled/core/data-migration-testing.md +90 -0
- package/bundled/core/data-pipeline.md +113 -0
- package/bundled/core/deprecation-standards.md +16 -2
- package/bundled/core/developer-memory.md +13 -8
- package/bundled/core/documentation-writing-standards.md +2 -2
- package/bundled/core/error-code-standards.md +4 -3
- package/bundled/core/feature-discovery-standards.md +191 -0
- package/bundled/core/flaky-test-management.md +1 -1
- package/bundled/core/flow-based-testing.md +3 -3
- package/bundled/core/forward-derivation-standards.md +33 -5
- package/bundled/core/frontend-design-standards.md +93 -4
- package/bundled/core/full-coverage-testing.md +72 -0
- package/bundled/core/git-worktree.md +4 -4
- package/bundled/core/guides/performance-guide.md +1 -1
- package/bundled/core/guides/security-guide.md +1 -1
- package/bundled/core/health-check-standards.md +2 -2
- package/bundled/core/iac-design-principles.md +97 -0
- package/bundled/core/incident-response.md +119 -0
- package/bundled/core/license-compliance.md +2 -0
- package/bundled/core/logging-standards.md +78 -2
- package/bundled/core/mock-boundary.md +54 -2
- package/bundled/core/model-provenance.md +181 -0
- package/bundled/core/model-selection.md +27 -2
- package/bundled/core/multi-environment-e2e-testing.md +195 -0
- package/bundled/core/packaging-standards.md +1 -0
- package/bundled/core/performance-standards.md +96 -2
- package/bundled/core/pii-classification.md +148 -0
- package/bundled/core/pipeline-security-gates.md +22 -2
- package/bundled/core/postmortem-standards.md +2 -0
- package/bundled/core/prd-standards.md +91 -0
- package/bundled/core/privacy-standards.md +14 -3
- package/bundled/core/product-metrics-standards.md +100 -0
- package/bundled/core/project-context-memory.md +8 -2
- package/bundled/core/prompt-regression.md +1 -1
- package/bundled/core/push-standards.md +82 -0
- package/bundled/core/refactoring-standards.md +44 -3
- package/bundled/core/replay-test.md +1 -1
- package/bundled/core/requirement-engineering.md +2 -2
- package/bundled/core/resource-cost-boundary.md +180 -0
- package/bundled/core/reverse-engineering-standards.md +66 -2
- package/bundled/core/runbook.md +113 -0
- package/bundled/core/schema-evolution.md +105 -0
- package/bundled/core/secret-management-standards.md +110 -0
- package/bundled/core/security-testing.md +26 -2
- package/bundled/core/self-review-protocol.md +15 -10
- package/bundled/core/skill-standard-alignment-check.md +53 -0
- package/bundled/core/slo-sli.md +109 -0
- package/bundled/core/smoke-test.md +1 -1
- package/bundled/core/tech-debt-standards.md +1 -1
- package/bundled/core/test-data-standards.md +2 -2
- package/bundled/core/user-journey-testing.md +102 -0
- package/bundled/core/user-story-mapping.md +96 -0
- package/bundled/core/verification-evidence.md +170 -10
- package/bundled/core/verification-oracle.md +167 -0
- package/bundled/core/versioning.md +133 -109
- package/bundled/locales/COVERAGE.md +94 -77
- package/bundled/locales/zh-CN/CHANGELOG.md +94 -6
- package/bundled/locales/zh-CN/CLAUDE.md +1 -1
- package/bundled/locales/zh-CN/MAINTENANCE.md +42 -661
- package/bundled/locales/zh-CN/README.md +25 -12
- package/bundled/locales/zh-CN/SECURITY.md +2 -2
- package/bundled/locales/zh-CN/adoption/DAILY-WORKFLOW-GUIDE.md +2 -2
- package/bundled/locales/zh-CN/ai/options/commit-message/bilingual.ai.yaml +6 -1
- package/bundled/locales/zh-CN/core/acceptance-criteria-traceability.md +4 -6
- package/bundled/locales/zh-CN/core/accessibility-standards.md +1 -1
- package/bundled/locales/zh-CN/core/adversarial-test.md +226 -0
- package/bundled/locales/zh-CN/core/agent-behavior-discipline.md +187 -0
- package/bundled/locales/zh-CN/core/ai-response-navigation.md +32 -6
- package/bundled/locales/zh-CN/core/anti-sycophancy-prompting.md +1 -1
- package/bundled/locales/zh-CN/core/api-design-standards.md +1 -1
- package/bundled/locales/zh-CN/core/behavior-snapshot.md +335 -0
- package/bundled/locales/zh-CN/core/browser-compatibility-standards.md +239 -0
- package/bundled/locales/zh-CN/core/cd-deployment-strategies.md +135 -0
- package/bundled/locales/zh-CN/core/chaos-injection-tests.md +130 -0
- package/bundled/locales/zh-CN/core/checkin-standards.md +1 -1
- package/bundled/locales/zh-CN/core/code-review-checklist.md +1 -1
- package/bundled/locales/zh-CN/core/container-security.md +535 -0
- package/bundled/locales/zh-CN/core/context-aware-loading.md +1 -1
- package/bundled/locales/zh-CN/core/contract-testing-standards.md +191 -0
- package/bundled/locales/zh-CN/core/cost-budget-test.md +86 -0
- package/bundled/locales/zh-CN/core/cross-flow-regression.md +200 -0
- package/bundled/locales/zh-CN/core/data-migration-testing.md +217 -0
- package/bundled/locales/zh-CN/core/deployment-standards.md +328 -9
- package/bundled/locales/zh-CN/core/deprecation-standards.md +1 -1
- package/bundled/locales/zh-CN/core/developer-memory.md +2 -2
- package/bundled/locales/zh-CN/core/disaster-recovery-drill.md +87 -0
- package/bundled/locales/zh-CN/core/documentation-structure.md +1 -1
- package/bundled/locales/zh-CN/core/documentation-writing-standards.md +1 -1
- package/bundled/locales/zh-CN/core/error-code-standards.md +2 -2
- package/bundled/locales/zh-CN/core/feature-manifest-standard.md +222 -0
- package/bundled/locales/zh-CN/core/flaky-test-management.md +87 -0
- package/bundled/locales/zh-CN/core/flow-based-testing.md +284 -0
- package/bundled/locales/zh-CN/core/forward-derivation-standards.md +3 -4
- package/bundled/locales/zh-CN/core/frontend-design-standards.md +1 -1
- package/bundled/locales/zh-CN/core/full-coverage-testing.md +269 -0
- package/bundled/locales/zh-CN/core/git-worktree.md +1 -1
- package/bundled/locales/zh-CN/core/governance-layer.md +160 -0
- package/bundled/locales/zh-CN/core/guides/performance-guide.md +515 -0
- package/bundled/locales/zh-CN/core/guides/security-guide.md +494 -0
- package/bundled/locales/zh-CN/core/knowledge-graph-memory.md +128 -0
- package/bundled/locales/zh-CN/core/license-compliance.md +131 -0
- package/bundled/locales/zh-CN/core/llm-output-validation.md +192 -0
- package/bundled/locales/zh-CN/core/logging-standards.md +205 -7
- package/bundled/locales/zh-CN/core/mock-boundary.md +161 -0
- package/bundled/locales/zh-CN/core/model-selection.md +28 -5
- package/bundled/locales/zh-CN/core/mutation-testing.md +106 -0
- package/bundled/locales/zh-CN/core/no-cicd-deployment.md +219 -0
- package/bundled/locales/zh-CN/core/packaging-standards.md +77 -5
- package/bundled/locales/zh-CN/core/pipeline-security-gates.md +146 -0
- package/bundled/locales/zh-CN/core/policy-as-code-testing.md +203 -0
- package/bundled/locales/zh-CN/core/privacy-standards.md +1 -1
- package/bundled/locales/zh-CN/core/project-context-memory.md +1 -1
- package/bundled/locales/zh-CN/core/prompt-regression.md +88 -0
- package/bundled/locales/zh-CN/core/property-based-testing.md +87 -0
- package/bundled/locales/zh-CN/core/release-quality-manifest.md +207 -0
- package/bundled/locales/zh-CN/core/release-readiness-gate.md +193 -0
- package/bundled/locales/zh-CN/core/replay-test.md +102 -0
- package/bundled/locales/zh-CN/core/requirement-engineering.md +1 -1
- package/bundled/locales/zh-CN/core/reverse-engineering-standards.md +46 -1
- package/bundled/locales/zh-CN/core/rollback-standards.md +120 -0
- package/bundled/locales/zh-CN/core/sast-advanced.md +309 -0
- package/bundled/locales/zh-CN/core/secure-op.md +328 -0
- package/bundled/locales/zh-CN/core/security-testing.md +113 -0
- package/bundled/locales/zh-CN/core/self-review-protocol.md +172 -0
- package/bundled/locales/zh-CN/core/server-ops-security.md +507 -0
- package/bundled/locales/zh-CN/core/smoke-test.md +79 -0
- package/bundled/locales/zh-CN/core/spec-driven-development.md +39 -3
- package/bundled/locales/zh-CN/core/supply-chain-attestation.md +131 -0
- package/bundled/locales/zh-CN/core/verification-evidence.md +252 -41
- package/bundled/locales/zh-CN/core/versioning.md +1 -1
- package/bundled/locales/zh-CN/docs/CHEATSHEET.md +36 -7
- package/bundled/locales/zh-CN/docs/FEATURE-REFERENCE.md +71 -53
- package/bundled/locales/zh-CN/docs/MIGRATION-v6.md +88 -0
- package/bundled/locales/zh-CN/docs/USAGE-MODES-COMPARISON.md +2 -2
- package/bundled/locales/zh-CN/docs/USER-MANUAL.md +14 -14
- package/bundled/locales/zh-CN/docs/specs/system/memory-adoption-strategy.md +105 -0
- package/bundled/locales/zh-CN/docs/user/FAQ.md +132 -0
- package/bundled/locales/zh-CN/docs/user/GETTING-STARTED.md +144 -0
- package/bundled/locales/zh-CN/docs/user/GLOSSARY.md +178 -0
- package/bundled/locales/zh-CN/docs/user/README.md +70 -0
- package/bundled/locales/zh-CN/docs/user/TROUBLESHOOTING.md +190 -0
- package/bundled/locales/zh-CN/integrations/github-copilot/COPILOT-CHAT-REFERENCE.md +1 -1
- package/bundled/locales/zh-CN/integrations/github-copilot/README.md +1 -1
- package/bundled/locales/zh-CN/integrations/github-copilot/skills-mapping.md +3 -3
- package/bundled/locales/zh-CN/integrations/opencode/skills-mapping.md +3 -3
- package/bundled/locales/zh-CN/methodologies/guides/sdd-guide.md +836 -0
- package/bundled/locales/zh-CN/options/changelog/auto-generated.md +166 -0
- package/bundled/locales/zh-CN/options/changelog/keep-a-changelog.md +140 -0
- package/bundled/locales/zh-CN/options/code-review/automated-review.md +214 -0
- package/bundled/locales/zh-CN/options/code-review/pair-programming.md +166 -0
- package/bundled/locales/zh-CN/options/code-review/pr-review.md +167 -0
- package/bundled/locales/zh-CN/options/commit-message/bilingual.md +10 -3
- package/bundled/locales/zh-CN/options/documentation/api-docs.md +191 -0
- package/bundled/locales/zh-CN/options/documentation/markdown-docs.md +150 -0
- package/bundled/locales/zh-CN/options/documentation/wiki-style.md +131 -0
- package/bundled/locales/zh-CN/options/project-structure/kotlin.md +144 -0
- package/bundled/locales/zh-CN/options/project-structure/php.md +168 -0
- package/bundled/locales/zh-CN/options/project-structure/ruby.md +156 -0
- package/bundled/locales/zh-CN/options/project-structure/rust.md +136 -0
- package/bundled/locales/zh-CN/options/project-structure/swift.md +165 -0
- package/bundled/locales/zh-CN/options/testing/contract-testing.md +237 -0
- package/bundled/locales/zh-CN/options/testing/industry-pyramid.md +200 -0
- package/bundled/locales/zh-CN/options/testing/istqb-framework.md +144 -0
- package/bundled/locales/zh-CN/options/testing/performance-testing.md +251 -0
- package/bundled/locales/zh-CN/options/testing/security-testing.md +192 -0
- package/bundled/locales/zh-CN/skills/README.md +89 -126
- package/bundled/locales/zh-CN/skills/ac-coverage/SKILL.md +5 -7
- package/bundled/locales/zh-CN/skills/adr-assistant/SKILL.md +1 -1
- package/bundled/locales/zh-CN/skills/agents/code-architect.md +263 -0
- package/bundled/locales/zh-CN/skills/agents/doc-writer.md +410 -0
- package/bundled/locales/zh-CN/skills/agents/reviewer.md +357 -0
- package/bundled/locales/zh-CN/skills/agents/spec-analyst.md +410 -0
- package/bundled/locales/zh-CN/skills/agents/test-specialist.md +368 -0
- package/bundled/locales/zh-CN/skills/ai-collaboration-standards/SKILL.md +2 -2
- package/bundled/locales/zh-CN/skills/ai-friendly-architecture/SKILL.md +2 -2
- package/bundled/locales/zh-CN/skills/ai-instruction-standards/SKILL.md +1 -1
- package/bundled/locales/zh-CN/skills/atdd-assistant/acceptance-criteria-guide.md +1 -1
- package/bundled/locales/zh-CN/skills/atdd-assistant/atdd-workflow.md +3 -4
- package/bundled/locales/zh-CN/skills/audit-assistant/SKILL.md +2 -2
- package/bundled/locales/zh-CN/skills/bdd-assistant/guide.md +1 -2
- package/bundled/locales/zh-CN/skills/brainstorm-assistant/SKILL.md +115 -17
- package/bundled/locales/zh-CN/skills/brainstorm-assistant/guide.md +37 -12
- package/bundled/locales/zh-CN/skills/checkin-assistant/SKILL.md +1 -1
- package/bundled/locales/zh-CN/skills/ci-cd-assistant/SKILL.md +50 -0
- package/bundled/locales/zh-CN/skills/code-review-assistant/SKILL.md +5 -5
- package/bundled/locales/zh-CN/skills/commands/ac-coverage.md +1 -1
- package/bundled/locales/zh-CN/skills/commands/atdd.md +3 -3
- package/bundled/locales/zh-CN/skills/commands/bdd.md +2 -2
- package/bundled/locales/zh-CN/skills/commands/brainstorm.md +26 -17
- package/bundled/locales/zh-CN/skills/commands/{review.md → code-review.md} +4 -4
- package/bundled/locales/zh-CN/skills/commands/derive-all.md +1 -1
- package/bundled/locales/zh-CN/skills/commands/derive-atdd.md +1 -1
- package/bundled/locales/zh-CN/skills/commands/derive-bdd.md +2 -3
- package/bundled/locales/zh-CN/skills/commands/derive-tdd.md +1 -1
- package/bundled/locales/zh-CN/skills/commands/derive.md +1 -1
- package/bundled/locales/zh-CN/skills/commands/dev-workflow.md +2 -2
- package/bundled/locales/zh-CN/skills/commands/methodology.md +4 -4
- package/bundled/locales/zh-CN/skills/commands/pr.md +1 -1
- package/bundled/locales/zh-CN/skills/commands/tdd.md +1 -1
- package/bundled/locales/zh-CN/skills/commit-standards/SKILL.md +1 -1
- package/bundled/locales/zh-CN/skills/contract-test-assistant/SKILL.md +1 -1
- package/bundled/locales/zh-CN/skills/dev-methodology/SKILL.md +1 -1
- package/bundled/locales/zh-CN/skills/dev-methodology/create-methodology.md +456 -0
- package/bundled/locales/zh-CN/skills/dev-methodology/guide.md +6 -6
- package/bundled/locales/zh-CN/skills/dev-methodology/runtime.md +296 -0
- package/bundled/locales/zh-CN/skills/dev-workflow-guide/SKILL.md +5 -5
- package/bundled/locales/zh-CN/skills/docs-generator/SKILL.md +1 -1
- package/bundled/locales/zh-CN/skills/e2e-assistant/SKILL.md +1 -1
- package/bundled/locales/zh-CN/skills/incident-response-assistant/SKILL.md +2 -2
- package/bundled/locales/zh-CN/skills/journey-test-assistant/SKILL.md +1 -1
- package/bundled/locales/zh-CN/skills/logging-guide/SKILL.md +169 -142
- package/bundled/locales/zh-CN/skills/migration-assistant/SKILL.md +1 -1
- package/bundled/locales/zh-CN/skills/observability-assistant/guide.md +1 -1
- package/bundled/locales/zh-CN/skills/pr-automation-assistant/SKILL.md +1 -1
- package/bundled/locales/zh-CN/skills/project-discovery/guide.md +2 -2
- package/bundled/locales/zh-CN/skills/reverse-engineer/SKILL.md +1 -1
- package/bundled/locales/zh-CN/skills/runbook-assistant/guide.md +1 -1
- package/bundled/locales/zh-CN/skills/security-assistant/SKILL.md +1 -1
- package/bundled/locales/zh-CN/skills/skill-builder/SKILL.md +3 -3
- package/bundled/locales/zh-CN/skills/slo-assistant/guide.md +1 -1
- package/bundled/locales/zh-CN/skills/spec-derivation/SKILL.md +1 -1
- package/bundled/locales/zh-CN/skills/spec-derivation/guide.md +8 -9
- package/bundled/locales/zh-CN/skills/spec-driven-dev/SKILL.md +2 -2
- package/bundled/locales/zh-CN/skills/sweep/SKILL.md +1 -1
- package/bundled/locales/zh-CN/skills/tdd-assistant/SKILL.md +1 -1
- package/bundled/locales/zh-CN/skills/testing-guide/SKILL.md +2 -2
- package/bundled/locales/zh-CN/skills/testing-guide/testing-theory.md +2298 -0
- package/bundled/locales/zh-CN/skills/workflows/README.md +451 -0
- package/bundled/locales/zh-TW/CHANGELOG.md +94 -6
- package/bundled/locales/zh-TW/CLAUDE.md +1 -1
- package/bundled/locales/zh-TW/MAINTENANCE.md +51 -4
- package/bundled/locales/zh-TW/README.md +25 -12
- package/bundled/locales/zh-TW/SECURITY.md +2 -2
- package/bundled/locales/zh-TW/adoption/DAILY-WORKFLOW-GUIDE.md +2 -2
- package/bundled/locales/zh-TW/ai/options/commit-message/bilingual.ai.yaml +6 -1
- package/bundled/locales/zh-TW/ai/standards/versioning.ai.yaml +8 -48
- package/bundled/locales/zh-TW/core/acceptance-criteria-traceability.md +4 -6
- package/bundled/locales/zh-TW/core/accessibility-standards.md +1 -1
- package/bundled/locales/zh-TW/core/adversarial-test.md +226 -0
- package/bundled/locales/zh-TW/core/agent-behavior-discipline.md +187 -0
- package/bundled/locales/zh-TW/core/ai-response-navigation.md +32 -6
- package/bundled/locales/zh-TW/core/anti-sycophancy-prompting.md +1 -1
- package/bundled/locales/zh-TW/core/api-design-standards.md +91 -9
- package/bundled/locales/zh-TW/core/audit-trail.md +110 -0
- package/bundled/locales/zh-TW/core/behavior-snapshot.md +335 -0
- package/bundled/locales/zh-TW/core/browser-compatibility-standards.md +1 -0
- package/bundled/locales/zh-TW/core/cd-deployment-strategies.md +135 -0
- package/bundled/locales/zh-TW/core/chaos-injection-tests.md +130 -0
- package/bundled/locales/zh-TW/core/checkin-standards.md +1 -1
- package/bundled/locales/zh-TW/core/code-review-checklist.md +1 -1
- package/bundled/locales/zh-TW/core/container-image-standards.md +93 -0
- package/bundled/locales/zh-TW/core/container-security.md +535 -0
- package/bundled/locales/zh-TW/core/cost-budget-test.md +86 -0
- package/bundled/locales/zh-TW/core/cross-flow-regression.md +1 -0
- package/bundled/locales/zh-TW/core/data-contract.md +101 -0
- package/bundled/locales/zh-TW/core/data-migration-testing.md +217 -0
- package/bundled/locales/zh-TW/core/data-pipeline.md +105 -0
- package/bundled/locales/zh-TW/core/deployment-standards.md +363 -25
- package/bundled/locales/zh-TW/core/deprecation-standards.md +17 -4
- package/bundled/locales/zh-TW/core/developer-memory.md +2 -2
- package/bundled/locales/zh-TW/core/disaster-recovery-drill.md +87 -0
- package/bundled/locales/zh-TW/core/documentation-writing-standards.md +1 -1
- package/bundled/locales/zh-TW/core/error-code-standards.md +2 -2
- package/bundled/locales/zh-TW/core/feature-manifest-standard.md +222 -0
- package/bundled/locales/zh-TW/core/flaky-test-management.md +87 -0
- package/bundled/locales/zh-TW/core/flow-based-testing.md +284 -0
- package/bundled/locales/zh-TW/core/forward-derivation-standards.md +3 -4
- package/bundled/locales/zh-TW/core/frontend-design-standards.md +1 -1
- package/bundled/locales/zh-TW/core/full-coverage-testing.md +250 -0
- package/bundled/locales/zh-TW/core/git-worktree.md +1 -1
- package/bundled/locales/zh-TW/core/guides/performance-guide.md +515 -0
- package/bundled/locales/zh-TW/core/guides/security-guide.md +494 -0
- package/bundled/locales/zh-TW/core/iac-design-principles.md +90 -0
- package/bundled/locales/zh-TW/core/incident-response.md +111 -0
- package/bundled/locales/zh-TW/core/license-compliance.md +131 -0
- package/bundled/locales/zh-TW/core/llm-output-validation.md +192 -0
- package/bundled/locales/zh-TW/core/logging-standards.md +208 -4
- package/bundled/locales/zh-TW/core/mock-boundary.md +161 -0
- package/bundled/locales/zh-TW/core/model-provenance.md +173 -0
- package/bundled/locales/zh-TW/core/model-selection.md +28 -5
- package/bundled/locales/zh-TW/core/mutation-testing.md +106 -0
- package/bundled/locales/zh-TW/core/no-cicd-deployment.md +219 -0
- package/bundled/locales/zh-TW/core/packaging-standards.md +77 -5
- package/bundled/locales/zh-TW/core/performance-standards.md +84 -5
- package/bundled/locales/zh-TW/core/pii-classification.md +102 -0
- package/bundled/locales/zh-TW/core/pipeline-security-gates.md +146 -0
- package/bundled/locales/zh-TW/core/policy-as-code-testing.md +203 -0
- package/bundled/locales/zh-TW/core/prd-standards.md +88 -0
- package/bundled/locales/zh-TW/core/privacy-standards.md +1 -1
- package/bundled/locales/zh-TW/core/product-metrics-standards.md +96 -0
- package/bundled/locales/zh-TW/core/project-context-memory.md +1 -1
- package/bundled/locales/zh-TW/core/prompt-regression.md +88 -0
- package/bundled/locales/zh-TW/core/property-based-testing.md +87 -0
- package/bundled/locales/zh-TW/core/refactoring-standards.md +43 -6
- package/bundled/locales/zh-TW/core/release-quality-manifest.md +207 -0
- package/bundled/locales/zh-TW/core/replay-test.md +102 -0
- package/bundled/locales/zh-TW/core/requirement-engineering.md +1 -1
- package/bundled/locales/zh-TW/core/resource-cost-boundary.md +175 -0
- package/bundled/locales/zh-TW/core/reverse-engineering-standards.md +64 -5
- package/bundled/locales/zh-TW/core/rollback-standards.md +120 -0
- package/bundled/locales/zh-TW/core/runbook.md +110 -0
- package/bundled/locales/zh-TW/core/sast-advanced.md +309 -0
- package/bundled/locales/zh-TW/core/schema-evolution.md +98 -0
- package/bundled/locales/zh-TW/core/secret-management-standards.md +101 -0
- package/bundled/locales/zh-TW/core/secure-op.md +328 -0
- package/bundled/locales/zh-TW/core/security-testing.md +113 -0
- package/bundled/locales/zh-TW/core/self-review-protocol.md +18 -13
- package/bundled/locales/zh-TW/core/server-ops-security.md +507 -0
- package/bundled/locales/zh-TW/core/slo-sli.md +108 -0
- package/bundled/locales/zh-TW/core/smoke-test.md +79 -0
- package/bundled/locales/zh-TW/core/spec-driven-development.md +19 -11
- package/bundled/locales/zh-TW/core/supply-chain-attestation.md +131 -0
- package/bundled/locales/zh-TW/core/user-journey-testing.md +111 -0
- package/bundled/locales/zh-TW/core/user-story-mapping.md +94 -0
- package/bundled/locales/zh-TW/core/verification-evidence.md +260 -31
- package/bundled/locales/zh-TW/core/verification-oracle.md +159 -0
- package/bundled/locales/zh-TW/core/versioning.md +112 -112
- package/bundled/locales/zh-TW/docs/CHEATSHEET.md +36 -7
- package/bundled/locales/zh-TW/docs/DEV-WORKFLOW-MAPPING.md +6 -6
- package/bundled/locales/zh-TW/docs/FEATURE-REFERENCE.md +71 -53
- package/bundled/locales/zh-TW/docs/MIGRATION-v6.md +88 -0
- package/bundled/locales/zh-TW/docs/USAGE-MODES-COMPARISON.md +2 -2
- package/bundled/locales/zh-TW/docs/USER-MANUAL.md +14 -14
- package/bundled/locales/zh-TW/docs/specs/system/memory-adoption-strategy.md +105 -0
- package/bundled/locales/zh-TW/docs/user/FAQ.md +132 -0
- package/bundled/locales/zh-TW/docs/user/GETTING-STARTED.md +144 -0
- package/bundled/locales/zh-TW/docs/user/GLOSSARY.md +178 -0
- package/bundled/locales/zh-TW/docs/user/README.md +70 -0
- package/bundled/locales/zh-TW/docs/user/TROUBLESHOOTING.md +190 -0
- package/bundled/locales/zh-TW/integrations/github-copilot/COPILOT-CHAT-REFERENCE.md +1 -1
- package/bundled/locales/zh-TW/integrations/github-copilot/README.md +1 -1
- package/bundled/locales/zh-TW/integrations/github-copilot/skills-mapping.md +3 -3
- package/bundled/locales/zh-TW/integrations/opencode/skills-mapping.md +3 -3
- package/bundled/locales/zh-TW/methodologies/guides/sdd-guide.md +523 -26
- package/bundled/locales/zh-TW/options/changelog/auto-generated.md +166 -0
- package/bundled/locales/zh-TW/options/changelog/keep-a-changelog.md +140 -0
- package/bundled/locales/zh-TW/options/code-review/automated-review.md +214 -0
- package/bundled/locales/zh-TW/options/code-review/pair-programming.md +166 -0
- package/bundled/locales/zh-TW/options/code-review/pr-review.md +167 -0
- package/bundled/locales/zh-TW/options/commit-message/bilingual.md +10 -3
- package/bundled/locales/zh-TW/options/documentation/api-docs.md +191 -0
- package/bundled/locales/zh-TW/options/documentation/markdown-docs.md +150 -0
- package/bundled/locales/zh-TW/options/documentation/wiki-style.md +131 -0
- package/bundled/locales/zh-TW/options/project-structure/kotlin.md +144 -0
- package/bundled/locales/zh-TW/options/project-structure/php.md +168 -0
- package/bundled/locales/zh-TW/options/project-structure/ruby.md +156 -0
- package/bundled/locales/zh-TW/options/project-structure/rust.md +136 -0
- package/bundled/locales/zh-TW/options/project-structure/swift.md +165 -0
- package/bundled/locales/zh-TW/options/testing/contract-testing.md +237 -0
- package/bundled/locales/zh-TW/options/testing/industry-pyramid.md +200 -0
- package/bundled/locales/zh-TW/options/testing/istqb-framework.md +144 -0
- package/bundled/locales/zh-TW/options/testing/performance-testing.md +251 -0
- package/bundled/locales/zh-TW/options/testing/security-testing.md +192 -0
- package/bundled/locales/zh-TW/skills/README.md +91 -128
- package/bundled/locales/zh-TW/skills/ac-coverage/SKILL.md +4 -6
- package/bundled/locales/zh-TW/skills/adr-assistant/SKILL.md +1 -1
- package/bundled/locales/zh-TW/skills/agents/code-architect.md +263 -0
- package/bundled/locales/zh-TW/skills/agents/doc-writer.md +410 -0
- package/bundled/locales/zh-TW/skills/agents/reviewer.md +357 -0
- package/bundled/locales/zh-TW/skills/agents/spec-analyst.md +410 -0
- package/bundled/locales/zh-TW/skills/agents/test-specialist.md +368 -0
- package/bundled/locales/zh-TW/skills/ai-collaboration-standards/SKILL.md +2 -2
- package/bundled/locales/zh-TW/skills/ai-friendly-architecture/SKILL.md +2 -2
- package/bundled/locales/zh-TW/skills/ai-instruction-standards/SKILL.md +1 -1
- package/bundled/locales/zh-TW/skills/atdd-assistant/SKILL.md +2 -0
- package/bundled/locales/zh-TW/skills/atdd-assistant/acceptance-criteria-guide.md +1 -1
- package/bundled/locales/zh-TW/skills/atdd-assistant/atdd-workflow.md +3 -4
- package/bundled/locales/zh-TW/skills/audit-assistant/SKILL.md +2 -2
- package/bundled/locales/zh-TW/skills/bdd-assistant/SKILL.md +2 -0
- package/bundled/locales/zh-TW/skills/bdd-assistant/guide.md +1 -2
- package/bundled/locales/zh-TW/skills/brainstorm-assistant/SKILL.md +116 -18
- package/bundled/locales/zh-TW/skills/brainstorm-assistant/guide.md +38 -11
- package/bundled/locales/zh-TW/skills/checkin-assistant/SKILL.md +3 -1
- package/bundled/locales/zh-TW/skills/ci-cd-assistant/SKILL.md +50 -0
- package/bundled/locales/zh-TW/skills/code-review-assistant/SKILL.md +7 -5
- package/bundled/locales/zh-TW/skills/commands/ac-coverage.md +1 -1
- package/bundled/locales/zh-TW/skills/commands/atdd.md +3 -3
- package/bundled/locales/zh-TW/skills/commands/bdd.md +2 -2
- package/bundled/locales/zh-TW/skills/commands/brainstorm.md +26 -17
- package/bundled/locales/zh-TW/skills/commands/{review.md → code-review.md} +5 -5
- package/bundled/locales/zh-TW/skills/commands/derive-all.md +1 -1
- package/bundled/locales/zh-TW/skills/commands/derive-atdd.md +1 -1
- package/bundled/locales/zh-TW/skills/commands/derive-bdd.md +2 -3
- package/bundled/locales/zh-TW/skills/commands/derive-tdd.md +1 -1
- package/bundled/locales/zh-TW/skills/commands/derive.md +1 -1
- package/bundled/locales/zh-TW/skills/commands/dev-workflow.md +2 -2
- package/bundled/locales/zh-TW/skills/commands/methodology.md +4 -4
- package/bundled/locales/zh-TW/skills/commands/pr.md +1 -1
- package/bundled/locales/zh-TW/skills/commands/tdd.md +1 -1
- package/bundled/locales/zh-TW/skills/commit-standards/SKILL.md +1 -1
- package/bundled/locales/zh-TW/skills/contract-test-assistant/SKILL.md +1 -1
- package/bundled/locales/zh-TW/skills/dev-methodology/create-methodology.md +456 -0
- package/bundled/locales/zh-TW/skills/dev-methodology/guide.md +5 -5
- package/bundled/locales/zh-TW/skills/dev-methodology/runtime.md +296 -0
- package/bundled/locales/zh-TW/skills/dev-workflow-guide/SKILL.md +5 -5
- package/bundled/locales/zh-TW/skills/docs-generator/SKILL.md +1 -1
- package/bundled/locales/zh-TW/skills/e2e-assistant/SKILL.md +1 -1
- package/bundled/locales/zh-TW/skills/incident-response-assistant/SKILL.md +2 -2
- package/bundled/locales/zh-TW/skills/logging-guide/SKILL.md +52 -27
- package/bundled/locales/zh-TW/skills/migration-assistant/SKILL.md +1 -1
- package/bundled/locales/zh-TW/skills/pr-automation-assistant/SKILL.md +3 -1
- package/bundled/locales/zh-TW/skills/project-discovery/guide.md +2 -2
- package/bundled/locales/zh-TW/skills/reverse-engineer/SKILL.md +1 -1
- package/bundled/locales/zh-TW/skills/security-assistant/SKILL.md +1 -1
- package/bundled/locales/zh-TW/skills/spec-derivation/guide.md +7 -8
- package/bundled/locales/zh-TW/skills/spec-driven-dev/SKILL.md +2 -2
- package/bundled/locales/zh-TW/skills/sweep/SKILL.md +1 -1
- package/bundled/locales/zh-TW/skills/tdd-assistant/SKILL.md +3 -1
- package/bundled/locales/zh-TW/skills/testing-guide/SKILL.md +2 -2
- package/bundled/locales/zh-TW/skills/testing-guide/testing-theory.md +2298 -0
- package/bundled/locales/zh-TW/skills/workflows/README.md +451 -0
- package/bundled/skills/README.md +1 -1
- package/bundled/skills/ac-coverage/SKILL.md +17 -7
- package/bundled/skills/adr-assistant/SKILL.md +1 -1
- package/bundled/skills/agents/code-architect.md +1 -1
- package/bundled/skills/agents/doc-writer.md +1 -1
- package/bundled/skills/agents/reviewer.md +2 -2
- package/bundled/skills/agents/spec-analyst.md +1 -1
- package/bundled/skills/agents/test-specialist.md +1 -1
- package/bundled/skills/ai-collaboration-standards/SKILL.md +2 -2
- package/bundled/skills/ai-friendly-architecture/SKILL.md +2 -2
- package/bundled/skills/ai-instruction-standards/SKILL.md +1 -1
- package/bundled/skills/atdd-assistant/SKILL.md +7 -0
- package/bundled/skills/atdd-assistant/acceptance-criteria-guide.md +1 -1
- package/bundled/skills/atdd-assistant/atdd-workflow.md +6 -8
- package/bundled/skills/audit-assistant/SKILL.md +2 -2
- package/bundled/skills/bdd-assistant/SKILL.md +7 -0
- package/bundled/skills/bdd-assistant/guide.md +1 -2
- package/bundled/skills/brainstorm-assistant/SKILL.md +139 -15
- package/bundled/skills/brainstorm-assistant/guide.md +39 -8
- package/bundled/skills/checkin-assistant/SKILL.md +8 -1
- package/bundled/skills/ci-cd-assistant/SKILL.md +57 -0
- package/bundled/skills/code-review-assistant/SKILL.md +15 -8
- package/bundled/skills/commands/COMMAND-FAMILY-OVERVIEW.md +2 -2
- package/bundled/skills/commands/COMMAND-INDEX.json +3 -3
- package/bundled/skills/commands/README.md +2 -2
- package/bundled/skills/commands/ac-coverage.md +1 -1
- package/bundled/skills/commands/atdd.md +2 -2
- package/bundled/skills/commands/bdd.md +2 -2
- package/bundled/skills/commands/brainstorm.md +25 -14
- package/bundled/skills/commands/{review.md → code-review.md} +6 -6
- package/bundled/skills/commands/derive-all.md +1 -1
- package/bundled/skills/commands/derive-atdd.md +1 -1
- package/bundled/skills/commands/derive-bdd.md +2 -3
- package/bundled/skills/commands/derive-tdd.md +1 -1
- package/bundled/skills/commands/derive.md +1 -1
- package/bundled/skills/commands/dev-workflow.md +1 -1
- package/bundled/skills/commands/journey-test.md +45 -0
- package/bundled/skills/commands/methodology.md +4 -4
- package/bundled/skills/commands/pr.md +1 -1
- package/bundled/skills/commands/skill-builder.md +42 -0
- package/bundled/skills/commands/tdd.md +1 -1
- package/bundled/skills/dev-methodology/create-methodology.md +1 -1
- package/bundled/skills/dev-methodology/guide.md +1 -1
- package/bundled/skills/dev-methodology/runtime.md +1 -1
- package/bundled/skills/dev-workflow-guide/SKILL.md +3 -3
- package/bundled/skills/dev-workflow-guide/workflow-phases.md +3 -3
- package/bundled/skills/docs-generator/SKILL.md +3 -3
- package/bundled/skills/incident-response-assistant/SKILL.md +2 -2
- package/bundled/skills/logging-guide/SKILL.md +38 -2
- package/bundled/skills/migration-assistant/SKILL.md +226 -0
- package/bundled/skills/observability-assistant/SKILL.md +74 -0
- package/bundled/skills/pr-automation-assistant/SKILL.md +5 -1
- package/bundled/skills/project-discovery/guide.md +2 -2
- package/bundled/skills/push/SKILL.md +1 -1
- package/bundled/skills/release-standards/SKILL.md +19 -5
- package/bundled/skills/security-assistant/SKILL.md +1 -1
- package/bundled/skills/skill-builder/SKILL.md +1 -1
- package/bundled/skills/spec-derivation/guide.md +3 -4
- package/bundled/skills/spec-driven-dev/SKILL.md +13 -2
- package/bundled/skills/sweep/SKILL.md +1 -1
- package/bundled/skills/tdd-assistant/SKILL.md +8 -1
- package/bundled/skills/testing-guide/SKILL.md +1 -1
- package/bundled/skills/testing-guide/testing-theory.md +1 -1
- package/bundled/skills/workflows/README.md +2 -2
- package/package.json +4 -4
- package/src/commands/audit.js +30 -9
- package/src/commands/config.js +33 -2
- package/src/commands/hitl.js +14 -1
- package/src/commands/init.js +168 -75
- package/src/commands/quickstart.js +1 -2
- package/src/commands/release.js +51 -6
- package/src/commands/run-intent.js +9 -0
- package/src/commands/spec-split.js +27 -2
- package/src/commands/update.js +22 -6
- package/src/config/ai-agent-paths.js +3 -1
- package/src/i18n/messages.js +3 -102
- package/src/missions/MissionManager.js +44 -12
- package/src/utils/build-manifest.js +35 -3
- package/src/utils/friction-detector.js +71 -22
- package/src/utils/health-checker.js +29 -2
- package/src/utils/transaction.js +111 -0
- package/src/utils/version-promote.js +16 -0
- package/standards-registry.json +61 -149
- package/bundled/ai/standards/agent-communication-protocol.ai.yaml +0 -42
- package/bundled/ai/standards/agent-dispatch.ai.yaml +0 -42
- package/bundled/ai/standards/branch-completion.ai.yaml +0 -44
- package/bundled/ai/standards/change-batching-standards.ai.yaml +0 -44
- package/bundled/ai/standards/execution-history.ai.yaml +0 -42
- package/bundled/ai/standards/pipeline-integration-standards.ai.yaml +0 -42
- package/bundled/ai/standards/workflow-enforcement.ai.yaml +0 -44
- package/bundled/ai/standards/workflow-state-protocol.ai.yaml +0 -43
- package/src/commands/flow.js +0 -260
- package/src/commands/start.js +0 -372
- package/src/commands/sweep.js +0 -151
- package/src/commands/workflow.js +0 -681
|
@@ -0,0 +1,207 @@
|
|
|
1
|
+
---
|
|
2
|
+
source: ../../../core/release-quality-manifest.md
|
|
3
|
+
source_version: 1.0.0
|
|
4
|
+
translation_version: 1.0.0
|
|
5
|
+
last_synced: 2026-06-10
|
|
6
|
+
source_hash: 9ab9b61963df
|
|
7
|
+
status: current
|
|
8
|
+
---
|
|
9
|
+
|
|
10
|
+
# Release Quality Manifest(發布品質清單)
|
|
11
|
+
|
|
12
|
+
> **Language**: [English](../../../core/release-quality-manifest.md) | 繁體中文
|
|
13
|
+
|
|
14
|
+
## 概述
|
|
15
|
+
|
|
16
|
+
Release Quality Manifest(RQM)是由 CI 為每次發布自動產生的機器可讀文件。它將所有品質閘門的結果彙整為單一產物,作為發布就緒度的權威證據——既供內部 go/no-go 自動化使用,也供客戶稽核使用。
|
|
17
|
+
|
|
18
|
+
## 為什麼需要 Manifest?
|
|
19
|
+
|
|
20
|
+
沒有 manifest 時,品質證據會散落在 CI 日誌、覆蓋率 HTML 報告、SARIF 檔案與容器掃描摘要之中。當客戶問「這個發布是怎麼測試的?」,答案要不是「相信我們」,就是一場 45 分鐘的手動彙整作業。
|
|
21
|
+
|
|
22
|
+
Release Quality Manifest 讓品質證據變得:
|
|
23
|
+
- **彙整化**:一個檔案,所有閘門
|
|
24
|
+
- **機器可讀**:下游工具可以解析並強制執行
|
|
25
|
+
- **帶時間戳且綁定 commit**:與特定發布產物綁定
|
|
26
|
+
- **可與客戶分享**:可直接附加到發布套件
|
|
27
|
+
|
|
28
|
+
## Schema
|
|
29
|
+
|
|
30
|
+
RQM 目前涵蓋 **16 個品質維度**,與 `release-readiness-gate.md` 對齊。自動化閘門出現在此處;人工驗證的閘門則出現在 Release Readiness Sign-off 文件中。
|
|
31
|
+
|
|
32
|
+
```yaml
|
|
33
|
+
release: app-commercial-1.2.0
|
|
34
|
+
generated_at: "2026-05-05T04:00:00Z"
|
|
35
|
+
commit: "abc1234"
|
|
36
|
+
gates:
|
|
37
|
+
# ── Automated quality gates ──────────────────────────────
|
|
38
|
+
unit_coverage:
|
|
39
|
+
actual: "73%"
|
|
40
|
+
target: "80%"
|
|
41
|
+
status: warn # within 10pp of target → warn, not fail
|
|
42
|
+
mutation_score:
|
|
43
|
+
actual: "62%"
|
|
44
|
+
target: "60%"
|
|
45
|
+
status: pass
|
|
46
|
+
sca_critical_cve:
|
|
47
|
+
actual: 0
|
|
48
|
+
target: 0
|
|
49
|
+
status: pass
|
|
50
|
+
sca_high_cve:
|
|
51
|
+
actual: 0
|
|
52
|
+
target: 0
|
|
53
|
+
status: pass
|
|
54
|
+
sast_high:
|
|
55
|
+
actual: 0
|
|
56
|
+
target: 0
|
|
57
|
+
status: pass
|
|
58
|
+
e2e_pass_rate:
|
|
59
|
+
actual: "96%"
|
|
60
|
+
target: "95%"
|
|
61
|
+
status: pass
|
|
62
|
+
container_cve_critical:
|
|
63
|
+
actual: 0
|
|
64
|
+
target: 0
|
|
65
|
+
status: pass
|
|
66
|
+
image_signed:
|
|
67
|
+
actual: true
|
|
68
|
+
target: true
|
|
69
|
+
status: pass
|
|
70
|
+
sbom_present:
|
|
71
|
+
actual: true
|
|
72
|
+
target: true
|
|
73
|
+
status: pass
|
|
74
|
+
# ── Extended dimensions (aligned with release-readiness-gate.md) ──
|
|
75
|
+
a11y_critical: # Dimension 3: axe-core critical violations
|
|
76
|
+
actual: 0
|
|
77
|
+
target: 0
|
|
78
|
+
status: pass
|
|
79
|
+
a11y_serious: # Dimension 3: axe-core serious violations
|
|
80
|
+
actual: 0
|
|
81
|
+
target: 0
|
|
82
|
+
status: pass
|
|
83
|
+
contract_drift: # Dimension 4: consumer contracts failing (n/a if no consumers)
|
|
84
|
+
actual: 0
|
|
85
|
+
target: 0
|
|
86
|
+
status: pass # or "n/a" if no API consumers
|
|
87
|
+
cross_flow_cuj_pass_rate: # Dimension 6: critical user journey pass rate
|
|
88
|
+
actual: "100%"
|
|
89
|
+
target: "95%"
|
|
90
|
+
status: pass
|
|
91
|
+
browser_tier1_pass_rate: # Dimension 9: Tier-1 browser matrix (n/a for non-frontend)
|
|
92
|
+
actual: "100%"
|
|
93
|
+
target: "100%"
|
|
94
|
+
status: pass # or "n/a" for CLI/backend
|
|
95
|
+
capacity_headroom_cpu_pct: # Dimension 10: CPU headroom at projected peak (n/a for small projects)
|
|
96
|
+
actual: "42%"
|
|
97
|
+
target: "30%"
|
|
98
|
+
status: pass # or "n/a" for small-scale projects
|
|
99
|
+
smoke_pass_rate: # Dimension 14: post-deploy smoke (populated after staging deploy)
|
|
100
|
+
actual: "100%"
|
|
101
|
+
target: "100%"
|
|
102
|
+
status: pass
|
|
103
|
+
flow_gate_report: # Dimension 16: Multi-Gate Flow verification
|
|
104
|
+
gate_0_complete: true # all flows with ≥3 steps have §2.4 + §9.4 filled
|
|
105
|
+
gate_1_pr_coverage: true # all PRs touching flows include terminal-state tests
|
|
106
|
+
gate_3_ci_pass: true # Decision Table CI all green; branch coverage ≥ 90%
|
|
107
|
+
gate_4_uat_signoff: true # UAT sign-off table signed
|
|
108
|
+
status: pass
|
|
109
|
+
overall: WARN # worst gate status across all dimensions (2 warns, no fails)
|
|
110
|
+
```
|
|
111
|
+
|
|
112
|
+
## 狀態語義
|
|
113
|
+
|
|
114
|
+
| 狀態 | 意義 | 行動 |
|
|
115
|
+
|--------|---------|--------|
|
|
116
|
+
| `pass` | 達到或超過目標 | 無需任何行動 |
|
|
117
|
+
| `warn` | 在可接受偏差範圍內(見各閘門政策) | 記錄原因;不阻擋發布 |
|
|
118
|
+
| `fail` | 低於硬性下限 | **阻擋發布** |
|
|
119
|
+
|
|
120
|
+
### 各閘門硬性下限
|
|
121
|
+
|
|
122
|
+
| 閘門 | Warn 區間 | Fail 門檻 | Release Readiness 維度 |
|
|
123
|
+
|------|-----------|----------------|----------------------------|
|
|
124
|
+
| unit_coverage | target - 10pp 至 target | 低於 target - 10pp | (核心 RQM) |
|
|
125
|
+
| mutation_score | target - 5pp 至 target | 低於 target - 5pp | (核心 RQM) |
|
|
126
|
+
| sca_critical_cve | — | 任何 critical CVE = fail | Dim 2(安全) |
|
|
127
|
+
| container_cve_critical | — | 任何 critical CVE = fail | Dim 2(安全) |
|
|
128
|
+
| e2e_pass_rate | target - 3pp 至 target | 低於 target - 3pp | (核心 RQM) |
|
|
129
|
+
| a11y_critical | — | > 0 = fail | Dim 3(a11y) |
|
|
130
|
+
| a11y_serious | 專案門檻 | 專案門檻 + 1-2 | Dim 3(a11y) |
|
|
131
|
+
| contract_drift | — | 任何紅燈 consumer contract = fail(若 n/a:跳過) | Dim 4(Contract) |
|
|
132
|
+
| cross_flow_cuj_pass_rate | 90–95% | < 90% | Dim 6(跨流程回歸) |
|
|
133
|
+
| browser_tier1_pass_rate | — | < 100%(若 n/a:跳過) | Dim 9(瀏覽器相容性) |
|
|
134
|
+
| capacity_headroom_cpu_pct | 20–30% | < 20%(若 n/a:跳過) | Dim 10(容量) |
|
|
135
|
+
| smoke_pass_rate | — | 任何 smoke 失敗 = fail | Dim 14(Smoke) |
|
|
136
|
+
| flow_gate_report | gate_3_ci_pass=false | gate_0_complete=false 或 gate_4_uat_signoff=false | Dim 16(Multi-Gate Flow) |
|
|
137
|
+
|
|
138
|
+
## 自動產生
|
|
139
|
+
|
|
140
|
+
在所有閘門 job 完成後於 CI 產生 manifest:
|
|
141
|
+
|
|
142
|
+
```bash
|
|
143
|
+
#!/usr/bin/env bash
|
|
144
|
+
# scripts/generate-quality-manifest.sh
|
|
145
|
+
set -euo pipefail
|
|
146
|
+
|
|
147
|
+
COVERAGE=$(node -e "
|
|
148
|
+
const r = JSON.parse(require('fs').readFileSync('coverage/coverage-summary.json'));
|
|
149
|
+
console.log(r.total.lines.pct.toFixed(1) + '%')
|
|
150
|
+
")
|
|
151
|
+
|
|
152
|
+
MUTATION=$(node -e "
|
|
153
|
+
const r = JSON.parse(require('fs').readFileSync('reports/mutation/mutation-testing-report.json'));
|
|
154
|
+
console.log(r.metrics.mutationScore.toFixed(1) + '%')
|
|
155
|
+
")
|
|
156
|
+
|
|
157
|
+
CRITICAL_CVE=$(jq '[.Results[]?.Vulnerabilities[]? | select(.Severity == "CRITICAL")] | length' trivy-report.json)
|
|
158
|
+
|
|
159
|
+
cat > quality-manifest.yaml <<YAML
|
|
160
|
+
release: ${RELEASE_TAG}
|
|
161
|
+
generated_at: "$(date -u +%Y-%m-%dT%H:%M:%SZ)"
|
|
162
|
+
commit: "${GITHUB_SHA:-$(git rev-parse HEAD)}"
|
|
163
|
+
gates:
|
|
164
|
+
unit_coverage:
|
|
165
|
+
actual: "${COVERAGE}"
|
|
166
|
+
target: "80%"
|
|
167
|
+
status: $([ $(echo "$COVERAGE" | tr -d '%') -ge 80 ] && echo pass || echo warn)
|
|
168
|
+
sca_critical_cve:
|
|
169
|
+
actual: ${CRITICAL_CVE}
|
|
170
|
+
target: 0
|
|
171
|
+
status: $([ "$CRITICAL_CVE" -eq 0 ] && echo pass || echo fail)
|
|
172
|
+
overall: $(grep -q "fail" quality-manifest.yaml && echo FAIL || grep -q "warn" quality-manifest.yaml && echo WARN || echo PASS)
|
|
173
|
+
YAML
|
|
174
|
+
```
|
|
175
|
+
|
|
176
|
+
## 面向客戶的摘要
|
|
177
|
+
|
|
178
|
+
在 YAML 之外同時產生 Markdown 表格,以便納入 release notes:
|
|
179
|
+
|
|
180
|
+
```markdown
|
|
181
|
+
## Release Quality Gates — app-commercial-1.2.0
|
|
182
|
+
|
|
183
|
+
| Gate | Actual | Target | Status |
|
|
184
|
+
|------|--------|--------|--------|
|
|
185
|
+
| Unit Test Coverage | 73% | 80% | ⚠️ WARN |
|
|
186
|
+
| Mutation Score | 62% | 60% | ✅ PASS |
|
|
187
|
+
| Critical CVEs | 0 | 0 | ✅ PASS |
|
|
188
|
+
...
|
|
189
|
+
| **Overall** | | | ⚠️ WARN |
|
|
190
|
+
```
|
|
191
|
+
|
|
192
|
+
## 反模式
|
|
193
|
+
|
|
194
|
+
- **手動撰寫 manifest** —— 違背初衷;必須由工具輸出產生
|
|
195
|
+
- **對關鍵安全閘門使用 warn** —— `sca_critical_cve` 與 `container_cve_critical` 是二元判定
|
|
196
|
+
- **在所有閘門跑完之前產生 manifest** —— 數值必須反映實際結果,而非估計值
|
|
197
|
+
- **未將 manifest 附加到發布產物** —— 只存在於 git 歷史中的 manifest 客戶無法取得
|
|
198
|
+
|
|
199
|
+
## 另請參閱
|
|
200
|
+
|
|
201
|
+
- `verification-evidence.ai.yaml` — 稽核證據原則
|
|
202
|
+
- `supply-chain-attestation.ai.yaml` — SBOM 與 provenance
|
|
203
|
+
- `testing.ai.yaml` — 整體測試策略
|
|
204
|
+
- `deployment-standards.ai.yaml` — 發布閘門整合
|
|
205
|
+
|
|
206
|
+
|
|
207
|
+
**Scope**: universal
|
|
@@ -0,0 +1,102 @@
|
|
|
1
|
+
---
|
|
2
|
+
source: ../../../core/replay-test.md
|
|
3
|
+
source_version: 1.0.0
|
|
4
|
+
translation_version: 1.0.0
|
|
5
|
+
last_synced: 2026-06-10
|
|
6
|
+
source_hash: 3ae2d3277b2d
|
|
7
|
+
status: current
|
|
8
|
+
---
|
|
9
|
+
|
|
10
|
+
# Replay 測試標準
|
|
11
|
+
|
|
12
|
+
> **語言**: [English](../../../core/replay-test.md) | 繁體中文
|
|
13
|
+
|
|
14
|
+
---
|
|
15
|
+
|
|
16
|
+
## 概述
|
|
17
|
+
|
|
18
|
+
AI 代理系統透過複雜的多步驟管線與使用者互動。當客戶回報非預期行為時,重現確切的失敗情境往往相當困難——模型輸出可能是非確定性的、環境可能已發生變化,或確切的輸入內容可能不明確。黃金 fixture replay 透過在發現問題時序列化確切的輸入與預期輸出,解決了這個問題,從而實現確定性的回歸測試。
|
|
19
|
+
|
|
20
|
+
## Fixture 格式
|
|
21
|
+
|
|
22
|
+
```json
|
|
23
|
+
{
|
|
24
|
+
"meta": {
|
|
25
|
+
"recorded": "2026-05-05",
|
|
26
|
+
"source": "customer-report | ci-regression | red-team | incident",
|
|
27
|
+
"description": "Human-readable description of what this tests"
|
|
28
|
+
},
|
|
29
|
+
"input": { /* exact component input */ },
|
|
30
|
+
"expected": { /* expected output fields to assert */ }
|
|
31
|
+
}
|
|
32
|
+
```
|
|
33
|
+
|
|
34
|
+
## Fixture 命名規則
|
|
35
|
+
|
|
36
|
+
`<component>-<outcome>-<description>.json`
|
|
37
|
+
|
|
38
|
+
| 好的命名 | 不好的命名 |
|
|
39
|
+
|---------|----------|
|
|
40
|
+
| `guardian-deny-prod-drop-table.json` | `test1.json` |
|
|
41
|
+
| `guardian-allow-dev-npm-test.json` | `fixture.json` |
|
|
42
|
+
| `guardian-hitl-prod-irreversible.json` | `scenario_3.json` |
|
|
43
|
+
|
|
44
|
+
## Replay 測試實作(Vitest)
|
|
45
|
+
|
|
46
|
+
```typescript
|
|
47
|
+
// SPDX-License-Identifier: AGPL-3.0-only
|
|
48
|
+
import { readdirSync, readFileSync } from "fs"
|
|
49
|
+
import { join } from "path"
|
|
50
|
+
import { describe, it, expect } from "vitest"
|
|
51
|
+
import { scoreReviewable } from "../scoring/risk-engine.js"
|
|
52
|
+
|
|
53
|
+
const FIXTURES_DIR = join(__dirname, "..", "__fixtures__")
|
|
54
|
+
|
|
55
|
+
interface ReplayFixture {
|
|
56
|
+
meta: { recorded: string; source: string; description: string }
|
|
57
|
+
input: Parameters<typeof scoreReviewable>[0]
|
|
58
|
+
expected: { decision: string }
|
|
59
|
+
}
|
|
60
|
+
|
|
61
|
+
function deriveDecision(score: number): string {
|
|
62
|
+
if (score >= 76) return "DENY"
|
|
63
|
+
if (score >= 51) return "REQUIRE_HITL"
|
|
64
|
+
return "ALLOW"
|
|
65
|
+
}
|
|
66
|
+
|
|
67
|
+
describe("Guardian replay fixtures", () => {
|
|
68
|
+
const fixtures = readdirSync(FIXTURES_DIR)
|
|
69
|
+
.filter(f => f.endsWith(".json"))
|
|
70
|
+
.map(f => ({
|
|
71
|
+
name: f,
|
|
72
|
+
fixture: JSON.parse(readFileSync(join(FIXTURES_DIR, f), "utf-8")) as ReplayFixture,
|
|
73
|
+
}))
|
|
74
|
+
|
|
75
|
+
for (const { name, fixture } of fixtures) {
|
|
76
|
+
it(`[${fixture.meta.source}] ${fixture.meta.description}`, () => {
|
|
77
|
+
const result = scoreReviewable(fixture.input)
|
|
78
|
+
const decision = deriveDecision(result.score)
|
|
79
|
+
expect(decision).toBe(fixture.expected.decision)
|
|
80
|
+
})
|
|
81
|
+
}
|
|
82
|
+
})
|
|
83
|
+
```
|
|
84
|
+
|
|
85
|
+
## 錯誤回歸工作流程
|
|
86
|
+
|
|
87
|
+
1. 客戶回報非預期的 Guardian 判定
|
|
88
|
+
2. 擷取確切的 `Reviewable` 輸入(來自稽核日誌)
|
|
89
|
+
3. 建立 fixture 檔案:`guardian-<outcome>-<description>.json`
|
|
90
|
+
4. 在本地重現失敗(測試應當失敗)
|
|
91
|
+
5. 修復錯誤
|
|
92
|
+
6. 確認測試通過
|
|
93
|
+
7. 此 fixture 現在永久防止回歸
|
|
94
|
+
|
|
95
|
+
## 相關標準
|
|
96
|
+
|
|
97
|
+
- [對抗性測試標準](../../../core/adversarial-test.md) — 紅隊語料庫
|
|
98
|
+
- [驗證證據標準](../../../core/verification-evidence.md) — AC 可追溯性
|
|
99
|
+
- [測試標準](../../../core/testing-standards.md) — 整體測試金字塔
|
|
100
|
+
|
|
101
|
+
|
|
102
|
+
**Scope**: universal
|
|
@@ -0,0 +1,175 @@
|
|
|
1
|
+
---
|
|
2
|
+
source: ../../../core/resource-cost-boundary.md
|
|
3
|
+
source_version: 1.0.0
|
|
4
|
+
translation_version: 1.0.0
|
|
5
|
+
last_synced: 2026-06-17
|
|
6
|
+
source_hash: a9be6a420041
|
|
7
|
+
status: current
|
|
8
|
+
---
|
|
9
|
+
|
|
10
|
+
# 資源/成本邊界宣告標準
|
|
11
|
+
|
|
12
|
+
> **Language**: [English](../../../core/resource-cost-boundary.md) | 繁體中文
|
|
13
|
+
|
|
14
|
+
> **版本**: 1.0.0 | **狀態**: Active | **更新日期**: 2026-06-17
|
|
15
|
+
> **AI 最佳化版本**: `ai/standards/resource-cost-boundary.ai.yaml`
|
|
16
|
+
> **規格**: XSPEC-277 (cross-project/specs/XSPEC-277-resource-cost-boundary-standard.md)
|
|
17
|
+
|
|
18
|
+
## 概述
|
|
19
|
+
|
|
20
|
+
agentic / LLM 執行單元(pipeline run、agent、role)的資源消耗 **往往是隱性的**:token 用量、
|
|
21
|
+
迴圈/迭代次數、重試次數、單次成本上限、wall-clock、呼叫頻率。當這些邊界未被 **顯式宣告與
|
|
22
|
+
強制** 時,失控迴圈與 token 燒錢就是已知的 LLM-native 失敗模式——**cost burn**。
|
|
23
|
+
|
|
24
|
+
本標準把 **資源/成本邊界做成顯式、機器可讀、fail-closed 的宣告**。任何 LLM 執行單元 MUST
|
|
25
|
+
宣告其資源 budget;執行期 breach MUST 依宣告 fail-closed。它是邊界物質化(XSPEC-276)的
|
|
26
|
+
**成本維度**:UDS 唯一沒有對應標準、又夠具體可做成 AI-executable 的那一維——故抽出為窄標準,
|
|
27
|
+
而非塞進更廣(且重疊)的邊界框架。
|
|
28
|
+
|
|
29
|
+
> **範圍**:本標準定義 *宣告機制*(budget 分類法、機器可讀的 `resource_budget:` 區塊、
|
|
30
|
+
> fail-closed 閘門)。**budget 數值歸採用者/客戶**——那是專案決策。它規範的是「邊界*有沒有*
|
|
31
|
+
> 被宣告與強制」,而非「該設*多少*數字」。執行引擎接線(如 VibeOps 主動成本治理執行器)屬
|
|
32
|
+
> 下游採用議題;本標準是「宣告要哪些邊界」那一半,XSPEC-285 是「強制/治理」那一半。
|
|
33
|
+
|
|
34
|
+
## 為何要做成標準(而非逐單元設定)
|
|
35
|
+
|
|
36
|
+
VibeOps 已有成本機制,但 **分散且未標準化**——各自是點狀機制,沒有一份標準說「每個 LLM
|
|
37
|
+
執行單元都 MUST 宣告其資源邊界、且 breach MUST fail-closed」。新單元(新 agent/role)很容易
|
|
38
|
+
漏掉某個 budget → 無上限。本標準把這些點狀機制收斂到一份宣告。
|
|
39
|
+
|
|
40
|
+
| 既有機制(成為參考實作)| budget 類別 |
|
|
41
|
+
|---|---|
|
|
42
|
+
| orchestrator quality profile `max_retries` / `max_retry_budget_usd`(per-task fix-loop)| retry / cost_usd |
|
|
43
|
+
| BudgetGuard / PoC abort `max_cost_per_session_usd` / `min_cache_hit_ratio`(XSPEC-191)| cost_usd / rate |
|
|
44
|
+
| Pareto Evolution Gate token-cost 維度(DEC-024)| token / cost_usd |
|
|
45
|
+
| agent-loop `maxToolRounds` / `maxTotalTokens` | iteration / token |
|
|
46
|
+
|
|
47
|
+
## 資源 Budget 分類法
|
|
48
|
+
|
|
49
|
+
| 類別 | 邊界 | 典型 breach |
|
|
50
|
+
|------|------|-------------|
|
|
51
|
+
| `token` | input / output / total token 上限 | prompt/輸出爆量 |
|
|
52
|
+
| `iteration` | 迴圈 / 迭代 / tool-round 上限 | 失控迴圈 |
|
|
53
|
+
| `retry` | 重試上限 | 無上限重試 |
|
|
54
|
+
| `cost_usd` | 單次 / 單 run / 單 session 成本天花板 | 靜默燒預算 |
|
|
55
|
+
| `wallclock` | 逾時 | 卡死的 run |
|
|
56
|
+
| `rate` | 呼叫頻率 | 呼叫風暴 |
|
|
57
|
+
|
|
58
|
+
## 需求
|
|
59
|
+
|
|
60
|
+
| ID | 規則 | 等級 |
|
|
61
|
+
|----|------|------|
|
|
62
|
+
| REQ-001 | 資源 budget 分類法——從一組標準類別宣告邊界 | MUST |
|
|
63
|
+
| REQ-002 | 機器可讀的 `resource_budget:` 宣告(類別 + 上限 + breach 行為)| MUST |
|
|
64
|
+
| REQ-003 | fail-closed 強制閘門(未宣告→warn/block;執行期 breach→abort)| MUST |
|
|
65
|
+
| REQ-004 | 既有機制收斂為參考實作(不重造)| SHOULD |
|
|
66
|
+
| REQ-005 | budget 數值主權——機制標準化、數值歸採用者 | SHOULD |
|
|
67
|
+
|
|
68
|
+
### REQ-001 — 資源 Budget 分類法
|
|
69
|
+
|
|
70
|
+
每個 LLM 執行單元的資源邊界 MUST 能從一組標準類別表達:`token`(input/output/total)、
|
|
71
|
+
`iteration`(迴圈/迭代/tool-round 上限)、`retry`(重試上限)、`cost_usd`(單次 / 單 run /
|
|
72
|
+
單 session 天花板)、`wallclock`(逾時)、`rate`(呼叫頻率)。單元不必宣告每個類別,但它**為
|
|
73
|
+
安全而依賴**的類別 MUST 被宣告(被依賴卻無上限的類別=違規)。
|
|
74
|
+
|
|
75
|
+
### REQ-002 — 機器可讀宣告
|
|
76
|
+
|
|
77
|
+
`resource_budget:` 區塊 MUST 可被宣告(內嵌於 plan / agent / role config),每筆含 **類別 +
|
|
78
|
+
上限值 + breach 行為**(`warn` / `abort`)。它是生成器/runtime 可讀的一級工件——非散落設定、
|
|
79
|
+
非事後 review 註記。
|
|
80
|
+
|
|
81
|
+
```yaml
|
|
82
|
+
resource_budget:
|
|
83
|
+
- kind: cost_usd # 單 run 成本天花板
|
|
84
|
+
scope: per_run
|
|
85
|
+
limit: 3.00
|
|
86
|
+
on_breach: abort
|
|
87
|
+
- kind: iteration # tool-round / 迴圈上限
|
|
88
|
+
limit: 60
|
|
89
|
+
on_breach: abort
|
|
90
|
+
- kind: retry
|
|
91
|
+
limit: 3
|
|
92
|
+
on_breach: warn
|
|
93
|
+
- kind: token
|
|
94
|
+
scope: total
|
|
95
|
+
limit: 400000
|
|
96
|
+
on_breach: abort
|
|
97
|
+
```
|
|
98
|
+
|
|
99
|
+
### REQ-003 — Fail-Closed 強制閘門
|
|
100
|
+
|
|
101
|
+
quality gate `check-resource-budget` MUST:(a) 標出任何 **未宣告** budget 的 LLM 執行單元——
|
|
102
|
+
預設 `warn`、嚴格模式 `block`;(b) 執行期 **breach** 時依宣告的 `on_breach` fail-closed
|
|
103
|
+
(`abort` 中止該單元、`warn` 記錄並續行)。比照 `capability-declaration`(XSPEC-037)與治理
|
|
104
|
+
閘門家族的 fail-closed 姿態——絕不靜默放行無上限。
|
|
105
|
+
|
|
106
|
+
### REQ-004 — 收斂既有機制
|
|
107
|
+
|
|
108
|
+
既有點狀機制(orchestrator `max_retries` / `max_retry_budget_usd`、XSPEC-191 BudgetGuard、
|
|
109
|
+
DEC-024 Pareto token gate、XSPEC-270 right-sizing router)SHOULD **對映為本標準的參考實作**——
|
|
110
|
+
統一、不重造。新單元繼承「宣告」習慣,而非重新發明 budget 旋鈕。
|
|
111
|
+
|
|
112
|
+
### REQ-005 — Budget 數值主權
|
|
113
|
+
|
|
114
|
+
宣告 *機制* 已標準化;*budget 數值*(實際天花板)歸採用者/客戶(專案/經濟決策)。標準規範的
|
|
115
|
+
是「邊界*有沒有*被宣告與強制」,而非「該設*多少*數字」。
|
|
116
|
+
|
|
117
|
+
## 原則
|
|
118
|
+
|
|
119
|
+
| ID | 原則 |
|
|
120
|
+
|----|------|
|
|
121
|
+
| P-1 | 邊界顯式——資源 budget 被宣告,而非藏在某人腦中 |
|
|
122
|
+
| P-2 | 機器可讀——生成器/runtime 可一級讀取 `resource_budget:` 區塊 |
|
|
123
|
+
| P-3 | Fail-Closed——被依賴卻未宣告、或執行期 breach,則 block/abort;絕不靜默 |
|
|
124
|
+
| P-4 | 不重造——既有點狀機制收斂為參考實作 |
|
|
125
|
+
| P-5 | 數值主權——機制標準化,天花板數值歸採用者 |
|
|
126
|
+
|
|
127
|
+
## 閘門時機
|
|
128
|
+
|
|
129
|
+
```
|
|
130
|
+
plan / agent / role config(resource_budget: 區塊)
|
|
131
|
+
│
|
|
132
|
+
├─→ [check-resource-budget — 宣告檢查] ← REQ-003(a)、run 前
|
|
133
|
+
│ 被依賴卻未宣告 ──→ warn(嚴格:block)
|
|
134
|
+
↓
|
|
135
|
+
run(token / iteration / retry / cost / wallclock / rate 量測)
|
|
136
|
+
│
|
|
137
|
+
└─→ 執行期 breach ──→ 依 on_breach fail-closed ← REQ-003(b)(abort / warn)
|
|
138
|
+
│
|
|
139
|
+
記錄 breach 供稽核 / 成本治理執行器(XSPEC-285)
|
|
140
|
+
```
|
|
141
|
+
|
|
142
|
+
## 與鄰近標準的邊界(admission 條件 3)
|
|
143
|
+
|
|
144
|
+
本標準 **只收成本/資源維度**,以避開讓更廣的邊界框架(XSPEC-276)無法進標準庫的重疊問題。
|
|
145
|
+
|
|
146
|
+
| 鄰近標準 | 它的角度 | 為何不同(<30% 重疊)|
|
|
147
|
+
|---|---|---|
|
|
148
|
+
| `performance-standards` | 延遲 / 吞吐 *目標* | 目標,非 fail-closed 成本天花板 |
|
|
149
|
+
| `model-selection` | 選模型 *tier* | tier 選擇,非 budget 強制 |
|
|
150
|
+
| `capability-declaration`(XSPEC-037)| 顯式能力 + fail-closed | 能力面,非資源 budget |
|
|
151
|
+
|
|
152
|
+
## 與既有標準的整合
|
|
153
|
+
|
|
154
|
+
- **`performance-standards`** — performance 設延遲/吞吐目標;本標準設 fail-closed 資源天花板。
|
|
155
|
+
鄰接、互補、不同。
|
|
156
|
+
- **`model-selection`** — right-sizing 選模型 tier;`cost_usd` breach 可 *驅動* 降級
|
|
157
|
+
(XSPEC-270 router),但 budget 宣告是本標準的職責。
|
|
158
|
+
- **`test-governance`** — `check-resource-budget` 是受治理閘門;budget 宣告是受治理政策。
|
|
159
|
+
- **`verification-evidence`** — breach/no-breach 的 run 報告是一種驗證證據(budget 守住 + 軌跡)。
|
|
160
|
+
|
|
161
|
+
## 相關規格
|
|
162
|
+
|
|
163
|
+
- XSPEC-277 — Resource / Cost Boundary 宣告標準完整規格(本標準來源)
|
|
164
|
+
- XSPEC-276 — LLM-native 邊界物質化(母透鏡;成本為抽出的維度)
|
|
165
|
+
- XSPEC-285 — VibeOps 主動成本治理(本標準的強制/執行器面)
|
|
166
|
+
- XSPEC-191 — Unit-economics PoC / BudgetGuard(參考實作)
|
|
167
|
+
- XSPEC-270 — 模型 right-sizing router(成本驅動降級)
|
|
168
|
+
- XSPEC-037 — Capability declaration(本標準比照的 fail-closed 姿態)
|
|
169
|
+
- DEC-024 — Pareto evolution token-cost gate(參考實作)
|
|
170
|
+
|
|
171
|
+
## 變更紀錄
|
|
172
|
+
|
|
173
|
+
| 版本 | 日期 | 變更 |
|
|
174
|
+
|------|------|------|
|
|
175
|
+
| v1.0.0 | 2026-06-17 | 初版——REQ-001~005:資源 budget 分類法、機器可讀的 `resource_budget:` 宣告、fail-closed `check-resource-budget` 閘門、既有機制收斂為參考實作、budget 數值主權(XSPEC-277) |
|
|
@@ -1,15 +1,15 @@
|
|
|
1
1
|
---
|
|
2
2
|
source: ../../../core/reverse-engineering-standards.md
|
|
3
|
-
source_version: 1.
|
|
4
|
-
translation_version: 1.
|
|
5
|
-
last_synced: 2026-
|
|
3
|
+
source_version: 1.2.0
|
|
4
|
+
translation_version: 1.2.0
|
|
5
|
+
last_synced: 2026-06-27
|
|
6
6
|
status: current
|
|
7
7
|
---
|
|
8
8
|
|
|
9
9
|
# 反向工程標準
|
|
10
10
|
|
|
11
|
-
**版本**: 1.
|
|
12
|
-
**最後更新**: 2026-
|
|
11
|
+
**版本**: 1.2.0
|
|
12
|
+
**最後更新**: 2026-06-27
|
|
13
13
|
**適用範圍**: 所有需要將程式碼轉換為規格文件的專案
|
|
14
14
|
|
|
15
15
|
> **語言**: [English](../../../core/reverse-engineering-standards.md) | [繁體中文](reverse-engineering-standards.md)
|
|
@@ -57,10 +57,52 @@ status: current
|
|
|
57
57
|
|------|------|--------|-----------|
|
|
58
58
|
| **程式碼掃描** | 分析程式碼結構、API、資料模型 | 技術清單 | [已確認] |
|
|
59
59
|
| **測試分析** | 解析現有測試以取得驗收條件 | 草擬驗收條件 | [已確認]/[推論] |
|
|
60
|
+
| **隱含規則掃描** | 掃描非 HTTP 持久化寫入路徑中未文件化的規則 | 隱含規則清單 + 三問解答 | [已確認]/[推論]/[未知] |
|
|
60
61
|
| **缺口識別** | 列出需要人類輸入的未知項目 | 缺口分析文件 | [未知] 項目 |
|
|
61
62
|
| **規格生成** | 生成草擬規格 | 草擬 SPEC-XXX.md | 混合確定性 |
|
|
62
63
|
| **人類審查** | 利害關係人驗證與填補缺口 | 已驗證的規格 | [已確認] |
|
|
63
64
|
|
|
65
|
+
> **註(v1.2.0)**:在程式碼掃描/測試分析之後、缺口識別之前,插入一個 **隱含規則掃描** 階段——詳見下方[隱含規則掃描(非 HTTP 持久化規則)](#隱含規則掃描非-http-持久化規則)。標準程式碼掃描只提取 HTTP 入口點與資料模型,但持久化欄位的值經常由**非 HTTP 路徑**(cron、佇列、計算欄、trigger、ORM hook)寫入,其業務規則從未被文件化——這是跨語言重寫或跨 DB 遷移時遺漏邏輯的最高發來源。
|
|
66
|
+
|
|
67
|
+
---
|
|
68
|
+
|
|
69
|
+
## 隱含規則掃描(非 HTTP 持久化規則)
|
|
70
|
+
|
|
71
|
+
> **工作流程位置**:在程式碼掃描/測試分析之後、缺口識別之前。
|
|
72
|
+
|
|
73
|
+
程式碼掃描提取的是透過 HTTP 可達的部分——路由、控制器、請求處理器。但一個持久化欄位的值經常在**請求路徑之外**被決定:夜間 cron 翻轉某個 status、佇列重試重新蓋上某個 timestamp、資料庫 trigger 推導出某個總額、ORM 生命週期 hook 把某個計數器歸零。這些規則鮮少被寫下來,因此只鏡像 HTTP 表面的重寫會悄悄遺漏它們。本階段機械化地推導出每一條非 HTTP 寫入路徑,並把每條隱含規則鎖為可驗證物。
|
|
74
|
+
|
|
75
|
+
### 清單來源(derive,機械化)
|
|
76
|
+
|
|
77
|
+
對舊系統掃描每一條**非 HTTP 持久化寫入路徑**,涵蓋四類:
|
|
78
|
+
|
|
79
|
+
1. **排程**——crontab 項目、scheduler 設定、`@Scheduled` 類註解、批次作業
|
|
80
|
+
2. **佇列**——queue consumer、job handler、背景 worker、message listener
|
|
81
|
+
3. **DB 層**——trigger、computed/generated column、`DEFAULT` 運算式、check constraint
|
|
82
|
+
4. **ORM 生命週期**——`beforeSave`/`afterSave`/observer/model-event hook、會變更持久狀態的 middleware
|
|
83
|
+
|
|
84
|
+
### Oracle(detect)——每欄三問
|
|
85
|
+
|
|
86
|
+
對每個由非 HTTP 路徑寫入的持久化欄位,回答並鎖定**三個問題**:
|
|
87
|
+
|
|
88
|
+
| 問題 | 要擷取的內容 |
|
|
89
|
+
|------|-------------|
|
|
90
|
+
| **何時設值(SET)?** | 首次賦值的條件/觸發點 |
|
|
91
|
+
| **何時被覆寫(OVERWRITE)?** | 之後每一次寫入——**含非同步覆寫**(連回 post-cutover 聚合對帳) |
|
|
92
|
+
| **何時歸零/重置(RESET)?** | 清除或回復為預設值的條件 |
|
|
93
|
+
|
|
94
|
+
- 把 **Devil's Advocate(魔鬼代言人)** 質疑從 HTTP 層擴展到**涵蓋非 HTTP 路徑**:對 cron 條件、佇列重試、計算欄、trigger 邏輯,套用同樣的五類對抗式質疑(邊界、順序、並發、失敗/重試、null/預設)。
|
|
95
|
+
- 為每條擷取的規則標註確定性層級:`[已確認]`(附 `file:line` 引用)/`[推論]`/`[未知]`。每個 `[未知]` 都交給缺口識別由人類處理——絕不臆測。
|
|
96
|
+
- **輸出**:把每條隱含規則鎖為 **behavior-snapshot 場景** 或 **對帳不變量**(例如 `SUM(cost) GROUP BY status` 須跨 cutover 維持),讓規則成為可重跑的 oracle 而非散文。
|
|
97
|
+
|
|
98
|
+
### Gate 時機
|
|
99
|
+
|
|
100
|
+
pre-flight(規劃期)。任何三問未獲解答的非 HTTP 寫入欄位會被標為 `not_implemented` 並 **block cutover**——未宣告的隱含規則視為已知遺漏風險,而非可接受的缺口。
|
|
101
|
+
|
|
102
|
+
### PHP 專屬補述:鬆散比較/type juggling
|
|
103
|
+
|
|
104
|
+
掃描 PHP 寫入路徑時,須額外標記**鬆散比較/type juggling** 依賴點:`==` 比較、`"0"` / `""` / `null` / `0` 的 truthy/falsy 行為、字串自動轉數字。這些在強型別目標(如 C#/.NET)下沒有直接對應,因此它們所編碼的隱含規則是跨語言重寫時被悄悄丟失邏輯的高發來源。對每個此類位置標 `[已確認]` 並附 `file:line`,並把預期語義鎖為一條明確規則。
|
|
105
|
+
|
|
64
106
|
---
|
|
65
107
|
|
|
66
108
|
## 核心原則
|
|
@@ -306,6 +348,21 @@ Feature: 購物車
|
|
|
306
348
|
|
|
307
349
|
---
|
|
308
350
|
|
|
351
|
+
## 失敗處理與升級
|
|
352
|
+
|
|
353
|
+
反向工程從現有程式碼推論意圖;某些輸入無法被安全分析。本節定義失敗 → 升級 → 重新驗證的路徑,使低信心或無法解析的輸入永遠不會產出一份看似權威的規格。
|
|
354
|
+
|
|
355
|
+
| 條件 | 觸發 | 行動 | 重新驗證 |
|
|
356
|
+
|------|------|------|---------|
|
|
357
|
+
| **解析失敗** | 來源無法解析(不支援的語言、損壞的語法樹) | 將該單元標為 `[未知]` 並回報語言/檔案;升級至人類領域專家。不為其產出任何推論行為。 | 經工具/修正後可解析 |
|
|
358
|
+
| **高未知比例** | `[未知]` 項目超過信心門檻(預設 > 50% 的行為) | 暫停規格定稿;要求領域專家訪談先填補 `[未知]` 項目。不交付多數靠猜測的規格。 | 未知比例低於門檻 |
|
|
359
|
+
| **被推翻的推論** | 程式碼與先前推論的行為相矛盾 | 將該項降級為 `[假設]` 並升級至程式碼負責人;絕不把被推翻的推論記為 `[已確認]`。 | 負責人確認或更正 |
|
|
360
|
+
| **測試分析失敗** | 現有測試無法執行/解析以提取行為 | 退回僅做靜態分析;將受影響行為標為 `[推論]`(較低確定性),絕不標 `[已確認]`。 | — |
|
|
361
|
+
|
|
362
|
+
**規則 RE-FAIL-001(必要)**:解析失敗或超過門檻的 `[未知]` 比例,**必須** block 規格定稿並升級至人類——絕不把低於信心門檻的規格呈現為權威。
|
|
363
|
+
|
|
364
|
+
---
|
|
365
|
+
|
|
309
366
|
## 應避免的反模式
|
|
310
367
|
|
|
311
368
|
### 程式碼分析反模式
|
|
@@ -389,6 +446,8 @@ Feature: 購物車
|
|
|
389
446
|
|
|
390
447
|
| 版本 | 日期 | 變更內容 |
|
|
391
448
|
|------|------|----------|
|
|
449
|
+
| 1.2.0 | 2026-06-27 | 新增:隱含規則掃描階段(非 HTTP 持久化寫入路徑擷取)——4 類 derive 清單 + 三問 oracle + 非 HTTP Devil's Advocate + PHP type-juggling 補述 + 確定性/`file:line`(XSPEC-284 R4/AC-8) |
|
|
450
|
+
| 1.1.0 | 2026-06-18 | 新增:失敗處理與升級章節——解析失敗/高未知比例/被推翻推論的升級 + 規則 RE-FAIL-001(XSPEC-292 T7) |
|
|
392
451
|
| 1.0.0 | 2026-01-19 | 初始發布 |
|
|
393
452
|
|
|
394
453
|
---
|