universal-dev-standards 5.8.0 → 5.10.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.
@@ -0,0 +1,250 @@
1
+ # Multi-Environment E2E Testing Standards - AI Optimized
2
+ # Source: XSPEC-204 (UDS Issue #94, #95)
3
+
4
+ id: multi-environment-e2e-testing
5
+ meta:
6
+ version: "1.0.0"
7
+ updated: "2026-05-13"
8
+ description: >
9
+ Standards for E2E test configuration across multiple deployment targets.
10
+ Core principle: The run command IS the documentation.
11
+ Each environment has one entry-point script that self-checks prerequisites
12
+ and runs the correct test subset.
13
+
14
+ # ─────────────────────────────────────────────────────────
15
+ # Core Principle
16
+ # ─────────────────────────────────────────────────────────
17
+ core_principle:
18
+ name: Executable Environment Documentation
19
+ statement: "The run command IS the documentation."
20
+ rationale: >
21
+ Developers repeatedly ask "how do I run tests against environment X?"
22
+ because the answer is scattered across README, wiki, and verbal knowledge.
23
+ When the run script self-checks prerequisites and sets the correct BASE_URL,
24
+ the script itself becomes the authoritative environment setup guide.
25
+ anti_pattern: >
26
+ Manually changing BASE_URL in .env before test runs — breaks other
27
+ developers' configs and cannot be committed without affecting everyone.
28
+
29
+ # ─────────────────────────────────────────────────────────
30
+ # Test Framework Multi-Environment Config
31
+ # ─────────────────────────────────────────────────────────
32
+ test_framework_config:
33
+ rule: "BASE_URL is baked into test project config, not read from .env"
34
+ rationale: >
35
+ If BASE_URL comes from .env, developers must modify .env before running
36
+ against a specific environment, creating race conditions in teams and
37
+ accidental commits of wrong URLs.
38
+
39
+ playwright_pattern: |
40
+ // playwright.config.ts
41
+ const ENVS = {
42
+ 'local-iis': 'http://localhost/corp',
43
+ 'local-iis-express': 'http://localhost:18080/lotest',
44
+ 'uat': 'http://portal_uat.example.com/app',
45
+ 'prd': 'https://app.example.com',
46
+ } as const;
47
+
48
+ export default defineConfig({
49
+ projects: Object.entries(ENVS).map(([name, url]) => ({
50
+ name,
51
+ use: { browserName: 'chromium', baseURL: url },
52
+ })),
53
+ });
54
+
55
+ cypress_pattern: |
56
+ // cypress.config.ts
57
+ const ENVS = {
58
+ 'local': { baseUrl: 'http://localhost:3000' },
59
+ 'uat': { baseUrl: 'http://uat.example.com' },
60
+ 'prd': { baseUrl: 'https://app.example.com' },
61
+ };
62
+ // Pass via --env target=uat; default to local
63
+
64
+ rules:
65
+ - "One test config file; environment distinction via project name or --project flag"
66
+ - "No environment-specific playwright/cypress.config.*.ts files"
67
+ - "BASE_URL never in .env for E2E test configs"
68
+
69
+ # ─────────────────────────────────────────────────────────
70
+ # Runner Script Pattern
71
+ # ─────────────────────────────────────────────────────────
72
+ runner_script_pattern:
73
+ rule: "Each environment has one entry-point script that self-checks prerequisites"
74
+ location: "scripts/run-tests-<env>.(ps1|sh)"
75
+ template_powershell: |
76
+ # scripts/run-tests-local-iis.ps1
77
+ # Self-check prerequisites before running tests
78
+
79
+ # 1. Check Docker
80
+ if (-not (Get-Process "com.docker.backend" -ErrorAction SilentlyContinue)) {
81
+ Write-Error "Docker is not running. Start Docker Desktop first."
82
+ exit 1
83
+ }
84
+
85
+ # 2. Check App is responding
86
+ try {
87
+ $resp = Invoke-WebRequest "http://localhost/corp/health" -UseBasicParsing -TimeoutSec 5
88
+ } catch {
89
+ Write-Error "App not responding at http://localhost/corp. Start IIS site first."
90
+ exit 1
91
+ }
92
+
93
+ # 3. Run tests
94
+ npx playwright test --project=local-iis @args
95
+
96
+ template_bash: |
97
+ #!/bin/bash
98
+ # scripts/run-tests-local.sh
99
+
100
+ # 1. Check Docker
101
+ if ! docker info > /dev/null 2>&1; then
102
+ echo "ERROR: Docker is not running." >&2
103
+ exit 1
104
+ fi
105
+
106
+ # 2. Check App
107
+ if ! curl -s -f http://localhost:3000/health > /dev/null 2>&1; then
108
+ echo "ERROR: App not responding at http://localhost:3000" >&2
109
+ exit 1
110
+ fi
111
+
112
+ npx playwright test --project=local "$@"
113
+
114
+ prerequisite_checks:
115
+ - "Docker / container runtime"
116
+ - "Application health endpoint"
117
+ - "Database connectivity (if separate from app)"
118
+ - "Required environment-specific services"
119
+
120
+ # ─────────────────────────────────────────────────────────
121
+ # Environment Capability Matrix
122
+ # ─────────────────────────────────────────────────────────
123
+ capability_matrix:
124
+ rule: >
125
+ Projects with external dependencies MUST maintain an environment capability
126
+ matrix committed to the repository (docs/testing/environment-capability-matrix.md
127
+ or inline in testing README).
128
+ when_required: "Any project with external HTTP services, IdP, payment, messaging"
129
+
130
+ template: |
131
+ ## Environment Capability Matrix
132
+
133
+ | Service / Feature | local-dev | local-iis | UAT | PRD |
134
+ |-------------------|:---------:|:---------:|:---:|:---:|
135
+ | Auth / SAML | ⚠️ Keycloak stub | ✅ Keycloak local | ✅ Keycloak UAT | ✅ Enterprise IdP |
136
+ | SMS Gateway | ⚠️ stub-server | ⚠️ stub-server | ⚠️ stub-server / ❌ | ✅ Real Gateway + billing |
137
+ | Payment / Finance | ⚠️ stub-server | ⚠️ stub-server | ⚠️ partial | ✅ Real + reconciliation |
138
+ | Background Jobs | ✅ in-process | ✅ in-process | ✅ | ✅ |
139
+ | File Storage | ✅ local | ✅ local | ✅ blob | ✅ blob |
140
+
141
+ Legend:
142
+ ✅ Full verification possible
143
+ ⚠️ Flow passes but through stub (real-world dimensions NOT verified)
144
+ ❌ Cannot test in this environment
145
+
146
+ ### Dimensions NOT verifiable in UAT (must defer to PRD smoke)
147
+ - SMS: Billing correctness, carrier delivery confirmation, DR reporting
148
+ - Payment: Real debit/credit, bank reconciliation, card validation
149
+
150
+ when_to_update: "Update matrix when adding any new external service dependency"
151
+
152
+ # ─────────────────────────────────────────────────────────
153
+ # CI Gate Mapping
154
+ # ─────────────────────────────────────────────────────────
155
+ ci_gate_mapping:
156
+ rule: "Map environments to CI/CD stages; document which gate must pass before each deployment stage"
157
+
158
+ pattern: |
159
+ # .github/workflows/ci.yml or .gitlab-ci.yml
160
+
161
+ e2e-smoke-gate: # Must pass → any deployment
162
+ runs-on: ubuntu-latest
163
+ script: scripts/run-tests-local.sh --grep smoke
164
+
165
+ e2e-uat-gate: # Must pass → PRD deployment
166
+ environment: uat
167
+ script: scripts/run-tests-uat.sh
168
+ only: [tags, release-branches]
169
+
170
+ e2e-prd-smoke: # Must pass → mark release as stable
171
+ environment: prd
172
+ script: scripts/run-tests-prd-smoke.sh
173
+ only: [tags]
174
+
175
+ gate_requirements:
176
+ before_staging_deploy: ["unit tests", "integration tests", "e2e-smoke-gate"]
177
+ before_uat_deploy: ["all staging gates", "e2e-uat-gate (if UAT environment available)"]
178
+ before_prd_deploy: ["e2e-uat-gate", "sign-off from capability matrix review"]
179
+ after_prd_deploy: ["e2e-prd-smoke within 10 min of deploy"]
180
+
181
+ # ─────────────────────────────────────────────────────────
182
+ # Credential Handling
183
+ # ─────────────────────────────────────────────────────────
184
+ credential_handling:
185
+ rule: "Separate what goes in git from what stays gitignored"
186
+
187
+ commit_to_git:
188
+ - "Base URLs per environment (non-secret, team needs to share)"
189
+ - "Test usernames for non-PRD environments"
190
+ - "Feature flags and test configuration"
191
+ - "Self-check scripts (no credentials embedded)"
192
+
193
+ gitignore:
194
+ - "Passwords and secrets"
195
+ - "API keys and tokens"
196
+ - ".env.test.local (personal overrides)"
197
+
198
+ ci_secrets: "Pass PRD test passwords via CI secret variables (GitHub Secrets / GitLab CI Variables)"
199
+
200
+ example_gitignore: |
201
+ # Test credentials
202
+ .env.test.local
203
+ tests/fixtures/auth-secrets.json
204
+ # Base URLs and non-secrets are committed; see playwright.config.ts
205
+
206
+ # ─────────────────────────────────────────────────────────
207
+ # Rules
208
+ # ─────────────────────────────────────────────────────────
209
+ rules:
210
+ - id: base-url-in-config
211
+ trigger: setting up E2E tests for a project with multiple environments
212
+ instruction: >
213
+ Define all environment BASE_URLs in the test framework config (playwright.config.ts /
214
+ cypress.config.ts) as named projects. Do not rely on .env for BASE_URL.
215
+ priority: required
216
+
217
+ - id: one-runner-per-env
218
+ trigger: adding a new deployment target
219
+ instruction: >
220
+ Create scripts/run-tests-<env>.(ps1|sh) with self-checking prerequisite steps.
221
+ The script must verify all required services before invoking the test runner.
222
+ priority: required
223
+
224
+ - id: capability-matrix-required
225
+ trigger: feature has external service dependencies (SMS, payment, IdP, file storage)
226
+ instruction: >
227
+ Create or update the environment capability matrix in docs/testing/.
228
+ Clearly mark ✅/⚠️/❌ for each service × environment combination.
229
+ List dimensions NOT verifiable in UAT; mark these as "PRD-only smoke" items.
230
+ priority: required
231
+
232
+ - id: ci-gate-mapping
233
+ trigger: defining CI/CD pipeline stages
234
+ instruction: >
235
+ Map each CI gate to the environments it must pass.
236
+ E2E gate must specify which environment it targets.
237
+ priority: required
238
+
239
+ # ─────────────────────────────────────────────────────────
240
+ # Relationship to Other Standards
241
+ # ─────────────────────────────────────────────────────────
242
+ related_standards:
243
+ - id: deployment-standards
244
+ relationship: "Extends — adds environment dimension to CI gates and deployment readiness"
245
+ - id: test-completeness-dimensions
246
+ relationship: "Complements — adds dimension 11: Environment Verifiability"
247
+ - id: verification-evidence
248
+ relationship: "Complements — evidence must specify which environment it was collected from"
249
+ - id: mock-boundary
250
+ relationship: "Complements — capability matrix references Level 2 stub server usage"
@@ -3,10 +3,12 @@
3
3
 
4
4
  id: test-completeness-dimensions
5
5
  meta:
6
- version: "1.2.0"
7
- updated: "2026-05-04"
6
+ version: "1.3.0"
7
+ updated: "2026-05-13"
8
8
  source: core/test-completeness-dimensions.md
9
- description: Framework for evaluating test completeness across 10 dimensions (v1.2.0 adds Flow Completeness and Branch Coverage)
9
+ description: >
10
+ Framework for evaluating test completeness across 11 dimensions.
11
+ v1.3.0 adds Dimension 11: Environment Verifiability (XSPEC-204).
10
12
 
11
13
  dimensions:
12
14
  - id: 1
@@ -114,6 +116,21 @@ dimensions:
114
116
  when_required: When flow has any conditional logic or decision points
115
117
  note: Use decision_table_expansion from flow-based-testing.ai.yaml to enumerate scenarios
116
118
 
119
+ - id: 11
120
+ name: Environment Verifiability
121
+ description: >
122
+ For each AC with external service dependencies, document which environment layer
123
+ can fully verify it, and plan PRD-smoke coverage for items that cannot be verified in UAT.
124
+ test_items:
125
+ - Environment stratification responsibility matrix exists for features with external dependencies
126
+ - Each AC is tagged with its minimum verifiable environment layer (local / UAT / PRD)
127
+ - ACs that are PRD-only are explicitly tracked and have a PRD smoke test plan
128
+ - Evidence for externally-dependent ACs includes environment_layer field
129
+ when_required: >
130
+ Any feature with external service dependencies (SMS, payment, IdP, email,
131
+ SOAP integrations, external REST APIs)
132
+ note: See multi-environment-e2e-testing.ai.yaml and deployment-standards.ai.yaml for environment capability matrix templates
133
+
117
134
  feature_type_mapping:
118
135
  note: "Dimension 8 (AI Generation Quality) applies when tests are AI-generated"
119
136
  types:
@@ -138,8 +155,9 @@ feature_type_mapping:
138
155
  with_ai: [1, 3, 5, 8]
139
156
 
140
157
  - type: External Integration
141
- dimensions: [1, 3, 7]
142
- with_ai: [1, 3, 7, 8]
158
+ dimensions: [1, 3, 7, 11]
159
+ with_ai: [1, 3, 7, 8, 11]
160
+ note: Dimension 11 required for any external service dependency
143
161
 
144
162
  - type: Workflow / Multi-step Process
145
163
  dimensions: [1, 3, 4, 5, 9, 10]
@@ -147,6 +165,11 @@ feature_type_mapping:
147
165
  required_pattern: journey-chained-test
148
166
  note: Apply flow-based-testing standard; use shared ctx; Each-Choice minimum branch coverage
149
167
 
168
+ - type: External-Dependent Workflow
169
+ dimensions: [1, 3, 4, 5, 9, 10, 11]
170
+ with_ai: [1, 3, 4, 5, 9, 10, 8, 11]
171
+ note: Combines Workflow + External Integration; Dimension 11 mandatory
172
+
150
173
  error_code_coverage:
151
174
  - code: 200
152
175
  meaning: Success
@@ -198,7 +221,7 @@ anti_patterns:
198
221
  rules:
199
222
  - id: use-checklist
200
223
  trigger: designing tests for a feature
201
- instruction: Use the 10 dimensions checklist to ensure completeness (dim 8 for AI-generated tests; dim 9/10 for multi-step workflows)
224
+ instruction: Use the 11 dimensions checklist to ensure completeness (dim 8 for AI-generated tests; dim 9/10 for multi-step workflows; dim 11 for external dependencies)
202
225
  priority: required
203
226
 
204
227
  - id: authorization-matrix
@@ -278,6 +301,12 @@ checklist_template: |
278
301
  □ Each distinct error branch has its own describe block
279
302
  □ Critical flows (auth/payment/security) use All-Combinations
280
303
 
304
+ □ Environment Verifiability (for features with external dependencies)
305
+ □ Environment stratification matrix created/updated
306
+ □ Each AC tagged with minimum verifiable environment layer
307
+ □ PRD-only ACs documented with smoke test plan
308
+ □ Evidence includes environment_layer field for externally-dependent ACs
309
+
281
310
  quick_reference:
282
311
  dimensions:
283
312
  columns: [ID, Dimension, Key Focus]
@@ -292,9 +321,10 @@ quick_reference:
292
321
  - [8, AI Generation, AI-generated test quality]
293
322
  - [9, Flow Completeness, Complete path to each terminal state]
294
323
  - [10, Branch Coverage, All decision-point branches covered]
324
+ - [11, Environment Verifiability, External-dep ACs tagged with environment layer]
295
325
 
296
326
  feature_dimensions:
297
- note: "*Dimension 8 applies when tests are AI-generated; †Dimensions 9/10 apply to multi-step workflows"
327
+ note: "*Dimension 8 applies when tests are AI-generated; †Dimensions 9/10 apply to multi-step workflows; ‡Dimension 11 applies to features with external service dependencies"
298
328
  columns: [Feature Type, Required Dimensions]
299
329
  rows:
300
330
  - [CRUD API, "1,2,3,4,6,7,8*"]
@@ -304,3 +334,5 @@ quick_reference:
304
334
  - [Background Job, "1,3,5,8*"]
305
335
  - [External Integration, "1,3,7,8*"]
306
336
  - [Workflow / Multi-step Process, "1,3,4,5,9†,10†,8*"]
337
+ - [External Integration, "1,3,7,11‡,8*"]
338
+ - [External-Dependent Workflow, "1,3,4,5,9†,10†,11‡,8*"]
@@ -8,15 +8,19 @@ standard:
8
8
  description: 驗證證據標準,強化 anti-hallucination
9
9
 
10
10
  meta:
11
- version: "1.0.0"
12
- updated: "2026-03-20"
11
+ version: "1.1.0"
12
+ updated: "2026-05-13"
13
13
  source: core/verification-evidence.md
14
- description: 驗證證據標準 — Iron Law: 無驗證證據不可聲稱完成
14
+ description: >
15
+ 驗證證據標準 — Iron Law: 無驗證證據不可聲稱完成。
16
+ v1.1.0: Evidence must specify which environment layer it was collected from (XSPEC-204).
15
17
  inspired_by: superpowers/verification-before-completion
16
18
 
17
19
  guidelines:
18
20
  - "Iron Law:無驗證證據 = 不可聲稱完成"
19
21
  - "每次驗證必須記錄 command + exitCode + output + timestamp"
22
+ - "Iron Law(Environment):驗收前必須確認「此環境層次能驗證此流程的哪些維度」"
23
+ - "驗收證據必須標明收集自哪個環境層次(local / UAT / PRD)"
20
24
  - "回歸測試必須展示 RED → GREEN 循環"
21
25
  - "代理報告 success ≠ 實際 success,需獨立驗證"
22
26
  - "驗證輸出截斷至合理長度(2000 字元)但保留關鍵資訊"
@@ -39,6 +43,13 @@ standard:
39
43
  type: string
40
44
  required: true
41
45
  description: "執行時間(ISO 8601 格式)"
46
+ - name: environment_layer
47
+ type: string
48
+ required: false
49
+ description: >
50
+ 收集證據的環境層次(local / uat / prd)。
51
+ 對有外部服務依賴的功能為必填——缺少此欄位時,該 AC 的驗收等級視為 local-only。
52
+ example: "uat"
42
53
 
43
54
  red_green_cycle:
44
55
  description: "回歸測試的 RED → GREEN 驗證"
@@ -72,13 +83,28 @@ standard:
72
83
  action: "截斷但保留錯誤訊息與摘要行"
73
84
  priority: medium
74
85
 
86
+ environment_rules:
87
+ - id: VE-005
88
+ trigger: "AC 涉及外部服務依賴(SMS、金流、IdP)"
89
+ action: >
90
+ 驗收證據必須標明 environment_layer。
91
+ local-only 證據對此類 AC 不足——需確認 UAT 或 PRD 層次的驗證計畫。
92
+ priority: required
93
+ - id: VE-006
94
+ trigger: "有外部服務依賴的 AC 標記為 done,但無 environment_layer"
95
+ action: >
96
+ 降級為 done_with_concerns。
97
+ 要求補充環境層次聲明,或在 environment-stratification-matrix 中標記為 ⚠️/❌。
98
+ priority: high
99
+
75
100
  physical_spec:
76
101
  type: checklist
77
102
  validator:
78
103
  type: ai_review
79
- rule: "檢查任務完成是否附帶驗證證據(command + exit_code + output + timestamp)"
104
+ rule: "檢查任務完成是否附帶驗證證據(command + exit_code + output + timestamp + environment_layer)"
80
105
  checks:
81
106
  - "完成聲明是否附帶 verification_evidence"
82
107
  - "evidence 是否包含所有必填欄位"
83
108
  - "exit_code 是否為 0(成功)"
84
109
  - "Bug fix 是否有 RED → GREEN 循環證據"
110
+ - "有外部服務依賴的 AC 是否標明 environment_layer"
@@ -1,8 +1,8 @@
1
1
  ---
2
2
  source: ../../CHANGELOG.md
3
- source_version: 5.8.0
4
- translation_version: 5.8.0
5
- last_synced: 2026-05-12
3
+ source_version: 5.10.0
4
+ translation_version: 5.10.0
5
+ last_synced: 2026-05-13
6
6
  status: current
7
7
  ---
8
8
 
@@ -17,6 +17,31 @@ status: current
17
17
 
18
18
  ## [Unreleased]
19
19
 
20
+ ## [5.10.0] - 2026-05-13
21
+
22
+ ### 新增
23
+ - **`multi-environment-e2e-testing`**(`ai/standards/multi-environment-e2e-testing.ai.yaml`):新增多部署目标 E2E 测试配置标准。核心原则:"执行命令即文档"。涵盖:BASE_URL 内嵌于测试框架配置(不依赖 .env);各环境含自检前置条件的 runner 脚本;环境能力矩阵提交至 repo;CI Gate 映射;凭证处理规则。关闭 UDS Issue #95。(XSPEC-204)
24
+
25
+ ### 修改
26
+ - **`mock-boundary`**(v1.0.0 → v1.1.0):新增 Level 1 / Level 2 mock 层级区分。Level 1 = 代码级 mock,受 STUB 标记规则管制。Level 2 = 基础设施级 stub server(WireMock、MockSoap),受环境分层规则管制,**不受** STUB 部署阻断规则管辖。新增 `external_dependency_testability_matrix` 模板(✅/⚠️/❌ 各服务 × 环境)。新增规则:`level-2-stub-server-rules`、`no-stub-server-in-prd`。关闭 UDS Issue #94 盲点二。(XSPEC-204)
27
+ - **`deployment-standards`**(v1.0.0 → v1.1.0):新增 `environment_stratification_matrix` 块——有外部依赖的项目必须在测试计划阶段建立此矩阵;模板包含 10 大流程 × 三层环境对照表。新增 `stub_server_cicd_rules` 块——选项 A(sidecar 部署)/ 选项 B(推迟至 PRD Smoke);production artifact 排除规则;PRD 禁止规则;禁止状态定义。关闭 UDS Issue #94 盲点一与盲点三。(XSPEC-204)
28
+ - **`verification-evidence`**(v1.0.0 → v1.1.0):新增 Iron Law(环境维度):有外部服务依赖的 AC 验收证据必须标明 `environment_layer`。在 evidence format 新增 `environment_layer` 字段(有外部服务依赖的功能为必填)。新增规则 VE-005、VE-006。(XSPEC-204)
29
+ - **`test-completeness-dimensions`**(v1.2.0 → v1.3.0):新增第 11 维度:**环境可验证性(Environment Verifiability)**——有外部服务依赖的 AC 须标明最低可验证环境层次(local/UAT/PRD),追踪 PRD-only 项目,要求 smoke 测试计划。更新功能类型映射:外部集成 → [1,3,7,11];新增类型"外部依赖工作流程"→ [1,3,4,5,9,10,11]。更新 use-checklist 规则。(XSPEC-204)
30
+
31
+ ### 修复
32
+ - **`uds update` 集成工具名称误作文件路径的误报**:`manifest.integrations` 含有 `"claude-code"`、`"opencode"` 等工具标识符时,update 命令将其直接推入 `allTrackedFiles` 作为文件路径,导致 `existsSync("claude-code")` 返回 false,触发假的「⚠ N 个文件缺失」警告和「✗ claude-code: 无法判断来源」还原失败。修复方式:先用 `getToolFilePath(int)` 转换为真实路径(如 `"CLAUDE.md"`)再推入列表;无法映射的条目跳过。问题出现于 `uds update` 5.7.2 → 5.8.0。
33
+
34
+ ## [5.9.0] - 2026-05-13
35
+
36
+ ### 新增
37
+ - **`feature-discovery-standards`**(`ai/standards/feature-discovery-standards.ai.yaml`、`core/feature-discovery-standards.md`):新增标准,定义遗留系统功能穷举发现的语言无关方法论。确立 **Deterministic-First 原则**(AI 在 Discovery Phase 禁止通过推断生成功能清单)。定义七种软件形式分类法(web/cli/gui/daemon/library/mobile/embedded),各含检测信号与提取工具。定义五个静态基础(入口点→调用图→字符串挖掘→资源文件→外部接口)、动态观察协议(三平台)、人工观察协议(confidence: 0.7 规则)与多层交叉比对矩阵模板。流水线位置:Discovery → feature-manifest → behavior-snapshot。(XSPEC-202)
38
+ - **`ai/language-packs/language-pack-php-to-csharp.ai.yaml`**:UDS 首个语言包,提供 PHP→C#(ASP.NET Core)迁移风险标签,含 7 个标签(SESSION_HANDLING、ORM_DIFFERENCES、TIMEZONE_HANDLING、FILE_UPLOAD_PATH、REGEX_DIFFERENCES、ARRAY_FUNCTIONS、EXCEPTION_HIERARCHY)各附详细说明。(XSPEC-203)
39
+ - **`ai/language-packs/README.md`**:语言包命名规范、使用指南与贡献说明。(XSPEC-203)
40
+
41
+ ### 变更
42
+ - **`feature-manifest-standard`**(v1.0.0 → v1.1.0):重构 `migration_risks` 为语言无关架构。移除硬编的 `php_to_csharp` 区块(已移入 `ai/language-packs/`)。新增 `language_packs` Extension Point(`extension_point: true`)。新增三个通用风险标签:CONCURRENCY_MODEL、PACKAGE_ECOSYSTEM、TYPE_SYSTEM。(XSPEC-203)
43
+ - **`behavior-snapshot`**(v1.0.0 → v1.1.0):从纯 HTTP 扩充为多模态格式。新增 `adapter` 字段(默认 `http`,向下兼容)。新增 `adapters` 区段,含 4 种 schema:`http` / `cli` / `file` / `event`。新增 `adapter-selection` 与 `backward-compatibility` 规则。现有不含 `adapter` 字段的 HTTP 快照无需修改。(XSPEC-203)
44
+
20
45
  ## [5.8.0] - 2026-05-12
21
46
 
22
47
  ### 新增
@@ -14,7 +14,7 @@ status: current
14
14
 
15
15
  > **语言**: [English](../../README.md) | [繁體中文](../zh-TW/README.md) | 简体中文
16
16
 
17
- **版本**: 5.8.0 | **发布日期**: 2026-04-13 | **授权**: [双重授权](../../LICENSE) (CC BY 4.0 + MIT)
17
+ **版本**: 5.10.0 | **发布日期**: 2026-04-13 | **授权**: [双重授权](../../LICENSE) (CC BY 4.0 + MIT)
18
18
 
19
19
  语言无关、框架无关的软件项目文档标准。通过 AI 原生工作流,确保不同技术栈之间的一致性、质量和可维护性。
20
20
 
@@ -1,8 +1,8 @@
1
1
  ---
2
2
  source: ../../CHANGELOG.md
3
- source_version: 5.8.0
4
- translation_version: 5.8.0
5
- last_synced: 2026-05-12
3
+ source_version: 5.10.0
4
+ translation_version: 5.10.0
5
+ last_synced: 2026-05-13
6
6
  status: current
7
7
  ---
8
8
 
@@ -17,6 +17,31 @@ status: current
17
17
 
18
18
  ## [Unreleased]
19
19
 
20
+ ## [5.10.0] - 2026-05-13
21
+
22
+ ### 新增
23
+ - **`multi-environment-e2e-testing`**(`ai/standards/multi-environment-e2e-testing.ai.yaml`):新增多部署目標 E2E 測試設定標準。核心原則:「執行指令即文件」。涵蓋:BASE_URL 內嵌於測試框架設定(不依賴 .env);各環境含自我檢查前置條件的 runner 腳本;環境能力矩陣 commit 至 repo;CI Gate 映射;憑證處理規則。關閉 UDS Issue #95。(XSPEC-204)
24
+
25
+ ### 修改
26
+ - **`mock-boundary`**(v1.0.0 → v1.1.0):新增 Level 1 / Level 2 mock 層次區分。Level 1 = 程式碼級 mock,受 STUB 標記規則管制。Level 2 = 基礎設施級 stub server(WireMock、MockSoap),受環境分層規則管制,**不受** STUB 部署封鎖規則管轄。新增 `external_dependency_testability_matrix` 模板(✅/⚠️/❌ 各服務 × 環境)。新增規則:`level-2-stub-server-rules`、`no-stub-server-in-prd`。關閉 UDS Issue #94 盲點二。(XSPEC-204)
27
+ - **`deployment-standards`**(v1.0.0 → v1.1.0):新增 `environment_stratification_matrix` 區塊——有外部依賴的專案必須在測試計畫階段建立此矩陣;模板包含 10 大流程 × 三層環境對照表。新增 `stub_server_cicd_rules` 區塊——選項 A(sidecar 部署)/ 選項 B(推遲至 PRD Smoke);production artifact 排除規則;PRD 禁止規則;禁止狀態定義。關閉 UDS Issue #94 盲點一與盲點三。(XSPEC-204)
28
+ - **`verification-evidence`**(v1.0.0 → v1.1.0):新增 Iron Law(環境維度):有外部服務依賴的 AC 驗收證據必須標明 `environment_layer`。在 evidence format 新增 `environment_layer` 欄位(有外部服務依賴的功能為必填)。新增規則 VE-005、VE-006。(XSPEC-204)
29
+ - **`test-completeness-dimensions`**(v1.2.0 → v1.3.0):新增第 11 維度:**環境可驗證性(Environment Verifiability)**——有外部服務依賴的 AC 須標明最低可驗證環境層次(local/UAT/PRD),追蹤 PRD-only 項目,要求 smoke 測試計畫。更新功能類型對照:外部整合 → [1,3,7,11];新增類型「外部依賴工作流程」→ [1,3,4,5,9,10,11]。更新 use-checklist 規則。(XSPEC-204)
30
+
31
+ ### 修正
32
+ - **`uds update` 整合工具名稱誤當檔案路徑的假警報**:`manifest.integrations` 包含 `"claude-code"`、`"opencode"` 等工具識別碼時,update 指令將其直接推入 `allTrackedFiles` 當作檔案路徑,導致 `existsSync("claude-code")` 回傳 false,觸發假的「⚠ N 個檔案缺失」警告與「✗ claude-code: 無法判斷來源」還原失敗。修正方式:先用 `getToolFilePath(int)` 轉換為真實路徑(如 `"CLAUDE.md"`)再推入清單;無法對應的 entry 跳過。問題出現於 `uds update` 5.7.2 → 5.8.0。
33
+
34
+ ## [5.9.0] - 2026-05-13
35
+
36
+ ### 新增
37
+ - **`feature-discovery-standards`**(`ai/standards/feature-discovery-standards.ai.yaml`、`core/feature-discovery-standards.md`):新增標準,定義遺留系統功能窮舉發現的語言無關方法論。確立 **Deterministic-First 原則**(AI 在 Discovery Phase 禁止透過推論產生功能清單)。定義七種軟體形式分類法(web/cli/gui/daemon/library/mobile/embedded),各含偵測信號與提取工具。定義五個靜態地基(入口點→呼叫圖→字串挖掘→資源檔→外部介面)、動態觀察協議(三平台)、人力觀察協議(confidence: 0.7 規則)與多層交叉比對矩陣模板。流水線位置:Discovery → feature-manifest → behavior-snapshot。(XSPEC-202)
38
+ - **`ai/language-packs/language-pack-php-to-csharp.ai.yaml`**:UDS 首個語言包,提供 PHP→C#(ASP.NET Core)移植風險標籤,含 7 個標籤(SESSION_HANDLING、ORM_DIFFERENCES、TIMEZONE_HANDLING、FILE_UPLOAD_PATH、REGEX_DIFFERENCES、ARRAY_FUNCTIONS、EXCEPTION_HIERARCHY)各附詳細說明。(XSPEC-203)
39
+ - **`ai/language-packs/README.md`**:語言包命名規範、使用指南與貢獻說明。(XSPEC-203)
40
+
41
+ ### 變更
42
+ - **`feature-manifest-standard`**(v1.0.0 → v1.1.0):重構 `migration_risks` 為語言無關架構。移除硬編的 `php_to_csharp` 區塊(已移入 `ai/language-packs/`)。新增 `language_packs` Extension Point(`extension_point: true`)。新增三個通用風險標籤:CONCURRENCY_MODEL、PACKAGE_ECOSYSTEM、TYPE_SYSTEM。(XSPEC-203)
43
+ - **`behavior-snapshot`**(v1.0.0 → v1.1.0):從純 HTTP 擴充為多模態格式。新增 `adapter` 欄位(預設 `http`,向下相容)。新增 `adapters` 區段,含 4 種 schema:`http` / `cli` / `file` / `event`。新增 `adapter-selection` 與 `backward-compatibility` 規則。現有不含 `adapter` 欄位的 HTTP 快照無需修改。(XSPEC-203)
44
+
20
45
  ## [5.8.0] - 2026-05-12
21
46
 
22
47
  ### 新增
@@ -14,7 +14,7 @@ status: current
14
14
 
15
15
  > **語言**: [English](../../README.md) | 繁體中文 | [简体中文](../zh-CN/README.md)
16
16
 
17
- **版本**: 5.8.0 | **發布日期**: 2026-04-13 | **授權**: [雙重授權](../../LICENSE) (CC BY 4.0 + MIT)
17
+ **版本**: 5.10.0 | **發布日期**: 2026-04-13 | **授權**: [雙重授權](../../LICENSE) (CC BY 4.0 + MIT)
18
18
 
19
19
  語言無關、框架無關的軟體專案文件標準。透過 AI 原生工作流,確保不同技術堆疊之間的一致性、品質和可維護性。
20
20
 
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "universal-dev-standards",
3
- "version": "5.8.0",
3
+ "version": "5.10.0",
4
4
  "description": "CLI tool for adopting Universal Development Standards",
5
5
  "keywords": [
6
6
  "documentation",
@@ -70,11 +70,11 @@
70
70
  "@vitest/coverage-v8": "^4.1.5",
71
71
  "ajv": "^8.20.0",
72
72
  "ajv-formats": "^3.0.1",
73
- "eslint": "10.2.1",
73
+ "eslint": "10.3.0",
74
74
  "glob": "^13.0.1",
75
- "globals": "17.5.0",
75
+ "globals": "17.6.0",
76
76
  "husky": "^9.1.7",
77
- "lint-staged": "^16.4.0",
77
+ "lint-staged": "^17.0.3",
78
78
  "vitest": "^4.1.5"
79
79
  },
80
80
  "lint-staged": {
@@ -771,7 +771,10 @@ export async function updateCommand(options) {
771
771
  allTrackedFiles.push(join('.standards', fileName));
772
772
  }
773
773
  for (const int of (manifest.integrations || [])) {
774
- allTrackedFiles.push(int);
774
+ const filePath = getToolFilePath(int);
775
+ if (filePath) {
776
+ allTrackedFiles.push(filePath);
777
+ }
775
778
  }
776
779
 
777
780
  const missingFiles = allTrackedFiles.filter(f => !existsSync(join(projectPath, f)));
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "$schema": "https://json-schema.org/draft/2020-12/schema",
3
- "version": "5.8.0",
4
- "lastUpdated": "2026-05-12",
3
+ "version": "5.10.0",
4
+ "lastUpdated": "2026-05-13",
5
5
  "description": "Standards registry for universal-dev-standards with integrated skills and AI-optimized formats",
6
6
  "formats": {
7
7
  "ai": {
@@ -58,14 +58,14 @@
58
58
  "standards": {
59
59
  "name": "universal-dev-standards",
60
60
  "url": "https://github.com/AsiaOstrich/universal-dev-standards",
61
- "version": "5.8.0"
61
+ "version": "5.10.0"
62
62
  },
63
63
  "skills": {
64
64
  "name": "universal-dev-standards",
65
65
  "url": "https://github.com/AsiaOstrich/universal-dev-standards",
66
66
  "localPath": "skills",
67
67
  "rawUrl": "https://raw.githubusercontent.com/AsiaOstrich/universal-dev-standards/main/skills",
68
- "version": "5.8.0",
68
+ "version": "5.10.0",
69
69
  "note": "Skills are now included in the main repository under skills/"
70
70
  }
71
71
  },
@@ -1692,7 +1692,31 @@
1692
1692
  },
1693
1693
  "category": "reference",
1694
1694
  "skillName": null,
1695
- "description": "HTTP golden-file snapshot format for migration parity verification and refactoring characterization (Gate 0/1 protocol)"
1695
+ "description": "Multi-modal golden-file snapshot format (HTTP/CLI/File/Event adapters) for migration parity verification and refactoring characterization (Gate 0/1 protocol)"
1696
+ },
1697
+ {
1698
+ "id": "feature-discovery-standards",
1699
+ "name": "Feature Discovery Standards",
1700
+ "nameZh": "功能發現方法論標準",
1701
+ "source": {
1702
+ "human": "core/feature-discovery-standards.md",
1703
+ "ai": "ai/standards/feature-discovery-standards.ai.yaml"
1704
+ },
1705
+ "category": "reference",
1706
+ "skillName": null,
1707
+ "description": "Language-agnostic methodology for exhaustive feature discovery in legacy systems; Deterministic-First principle, Software Form Taxonomy (7 forms), five static foundations, dynamic/human observation protocols, cross-layer validation matrix"
1708
+ },
1709
+ {
1710
+ "id": "multi-environment-e2e-testing",
1711
+ "name": "Multi-Environment E2E Testing",
1712
+ "nameZh": "多環境 E2E 測試標準",
1713
+ "source": {
1714
+ "human": "core/multi-environment-e2e-testing.md",
1715
+ "ai": "ai/standards/multi-environment-e2e-testing.ai.yaml"
1716
+ },
1717
+ "category": "testing",
1718
+ "skillName": null,
1719
+ "description": "E2E test configuration across multiple deployment targets; BASE_URL baked in test config; self-checking runner scripts; environment capability matrix; CI gate mapping; credential handling rules"
1696
1720
  },
1697
1721
  {
1698
1722
  "id": "change-batching",