universal-dev-standards 5.1.0 → 5.1.1
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/bundled/ai/standards/checkin-standards.ai.yaml +18 -0
- package/bundled/ai/standards/test-governance.ai.yaml +12 -0
- package/bundled/ai/standards/testing.ai.yaml +14 -0
- package/bundled/core/checkin-standards.md +21 -2
- package/bundled/core/test-governance.md +3 -0
- package/bundled/core/testing-standards.md +25 -2
- package/bundled/locales/zh-CN/CHANGELOG.md +20 -2
- package/bundled/locales/zh-CN/README.md +1 -1
- package/bundled/locales/zh-CN/core/checkin-standards.md +22 -3
- package/bundled/locales/zh-CN/core/test-governance.md +14 -3
- package/bundled/locales/zh-CN/core/testing-standards.md +26 -3
- package/bundled/locales/zh-TW/CHANGELOG.md +20 -2
- package/bundled/locales/zh-TW/README.md +1 -1
- package/bundled/locales/zh-TW/core/checkin-standards.md +24 -3
- package/bundled/locales/zh-TW/core/test-governance.md +14 -3
- package/bundled/locales/zh-TW/core/testing-standards.md +31 -0
- package/bundled/locales/zh-TW/skills/ac-coverage-assistant/SKILL.md +1 -0
- package/bundled/locales/zh-TW/skills/adr-assistant/SKILL.md +1 -0
- package/bundled/locales/zh-TW/skills/ai-collaboration-standards/SKILL.md +1 -0
- package/bundled/locales/zh-TW/skills/ai-friendly-architecture/SKILL.md +1 -0
- package/bundled/locales/zh-TW/skills/ai-instruction-standards/SKILL.md +1 -0
- package/bundled/locales/zh-TW/skills/api-design-assistant/SKILL.md +1 -0
- package/bundled/locales/zh-TW/skills/atdd-assistant/SKILL.md +1 -0
- package/bundled/locales/zh-TW/skills/audit-assistant/SKILL.md +1 -0
- package/bundled/locales/zh-TW/skills/bdd-assistant/SKILL.md +1 -0
- package/bundled/locales/zh-TW/skills/brainstorm-assistant/SKILL.md +1 -0
- package/bundled/locales/zh-TW/skills/changelog-guide/SKILL.md +1 -0
- package/bundled/locales/zh-TW/skills/checkin-assistant/SKILL.md +1 -0
- package/bundled/locales/zh-TW/skills/ci-cd-assistant/SKILL.md +1 -0
- package/bundled/locales/zh-TW/skills/code-review-assistant/SKILL.md +1 -0
- package/bundled/locales/zh-TW/skills/commit-standards/SKILL.md +1 -0
- package/bundled/locales/zh-TW/skills/contract-test-assistant/SKILL.md +1 -0
- package/bundled/locales/zh-TW/skills/database-assistant/SKILL.md +1 -0
- package/bundled/locales/zh-TW/skills/dev-workflow-guide/SKILL.md +1 -0
- package/bundled/locales/zh-TW/skills/docs-generator/SKILL.md +1 -0
- package/bundled/locales/zh-TW/skills/documentation-guide/SKILL.md +1 -0
- package/bundled/locales/zh-TW/skills/durable-execution-assistant/SKILL.md +1 -0
- package/bundled/locales/zh-TW/skills/e2e-assistant/SKILL.md +1 -0
- package/bundled/locales/zh-TW/skills/forward-derivation/SKILL.md +1 -0
- package/bundled/locales/zh-TW/skills/incident-response-assistant/SKILL.md +1 -0
- package/bundled/locales/zh-TW/skills/methodology-system/SKILL.md +1 -0
- package/bundled/locales/zh-TW/skills/metrics-dashboard-assistant/SKILL.md +1 -0
- package/bundled/locales/zh-TW/skills/migration-assistant/SKILL.md +1 -0
- package/bundled/locales/zh-TW/skills/observability-assistant/SKILL.md +1 -0
- package/bundled/locales/zh-TW/skills/pr-automation-assistant/SKILL.md +1 -0
- package/bundled/locales/zh-TW/skills/process-automation/SKILL.md +1 -0
- package/bundled/locales/zh-TW/skills/project-discovery/SKILL.md +1 -0
- package/bundled/locales/zh-TW/skills/project-structure-guide/SKILL.md +1 -0
- package/bundled/locales/zh-TW/skills/refactoring-assistant/SKILL.md +1 -0
- package/bundled/locales/zh-TW/skills/release-standards/SKILL.md +1 -0
- package/bundled/locales/zh-TW/skills/requirement-assistant/SKILL.md +1 -0
- package/bundled/locales/zh-TW/skills/retrospective-assistant/SKILL.md +1 -0
- package/bundled/locales/zh-TW/skills/reverse-engineer/SKILL.md +1 -0
- package/bundled/locales/zh-TW/skills/runbook-assistant/SKILL.md +1 -0
- package/bundled/locales/zh-TW/skills/security-assistant/SKILL.md +1 -0
- package/bundled/locales/zh-TW/skills/security-scan-assistant/SKILL.md +1 -0
- package/bundled/locales/zh-TW/skills/slo-assistant/SKILL.md +1 -0
- package/bundled/locales/zh-TW/skills/spec-driven-dev/SKILL.md +1 -0
- package/bundled/locales/zh-TW/skills/tdd-assistant/SKILL.md +1 -0
- package/bundled/locales/zh-TW/skills/test-coverage-assistant/SKILL.md +1 -0
- package/bundled/skills/ai-collaboration-standards/SKILL.md +1 -0
- package/bundled/skills/ai-friendly-architecture/SKILL.md +1 -0
- package/bundled/skills/ai-instruction-standards/SKILL.md +1 -0
- package/bundled/skills/documentation-guide/SKILL.md +1 -0
- package/bundled/skills/error-code-guide/SKILL.md +1 -0
- package/bundled/skills/git-workflow-guide/SKILL.md +1 -0
- package/bundled/skills/logging-guide/SKILL.md +1 -0
- package/bundled/skills/project-structure-guide/SKILL.md +1 -0
- package/bundled/skills/testing-guide/SKILL.md +1 -0
- package/package.json +4 -4
- package/src/utils/directory-mapper.js +2 -2
- package/standards-registry.json +3 -3
|
@@ -147,6 +147,24 @@ standard:
|
|
|
147
147
|
instruction: AI must NOT auto-execute git add/commit/push, wait for explicit user approval
|
|
148
148
|
priority: required
|
|
149
149
|
|
|
150
|
+
- id: project-file-sync
|
|
151
|
+
trigger: adding a new source file to disk
|
|
152
|
+
instruction: >
|
|
153
|
+
For legacy project formats (e.g. .NET Framework .csproj, MSBuild), every
|
|
154
|
+
source file on disk must also be registered in the project manifest file.
|
|
155
|
+
Unregistered files are silently excluded from compilation without any error
|
|
156
|
+
or warning. Run a pre-build or pre-commit check comparing files on disk
|
|
157
|
+
against project manifest entries; fail fast on any unregistered file.
|
|
158
|
+
priority: required
|
|
159
|
+
applicability: legacy_project_formats
|
|
160
|
+
examples:
|
|
161
|
+
- ".NET Framework .csproj (ItemGroup/Compile Include)"
|
|
162
|
+
- "legacy MSBuild project files"
|
|
163
|
+
evidence: >
|
|
164
|
+
Real incident (2026-04): ADAccountManagerV2.aspx.cs added to disk but not
|
|
165
|
+
registered in MSPlatform.csproj — silently excluded from build, causing
|
|
166
|
+
production crash with "Cannot load type" error.
|
|
167
|
+
|
|
150
168
|
physical_spec:
|
|
151
169
|
type: custom_script
|
|
152
170
|
validator:
|
|
@@ -146,3 +146,15 @@ standard:
|
|
|
146
146
|
System tests should stub external dependencies but use real internal services.
|
|
147
147
|
Use SIT environment for system-level validation.
|
|
148
148
|
priority: recommended
|
|
149
|
+
|
|
150
|
+
- id: test-execution-continuity
|
|
151
|
+
trigger: adding or completing a test case
|
|
152
|
+
instruction: >
|
|
153
|
+
A test case must be wired to an automated execution trigger (CI gate, build
|
|
154
|
+
hook, or scheduled run). A test that exists but is never run provides false
|
|
155
|
+
confidence and is worse than no test at all. Verify that execution history
|
|
156
|
+
exists before marking test coverage as complete.
|
|
157
|
+
priority: required
|
|
158
|
+
evidence: >
|
|
159
|
+
BUG-A08 post-mortem (2026-04-20): 22 tests existed in UDS but were never
|
|
160
|
+
executed by any CI gate, passing silently and masking real failures.
|
|
@@ -113,6 +113,20 @@ standard:
|
|
|
113
113
|
instruction: Use test doubles sparingly; prefer real implementations when fast enough
|
|
114
114
|
priority: recommended
|
|
115
115
|
|
|
116
|
+
- id: e2e-precondition-scope
|
|
117
|
+
trigger: writing E2E globalSetup or environment pre-checks
|
|
118
|
+
instruction: >
|
|
119
|
+
E2E environment pre-checks must verify the health of ALL pages and endpoints
|
|
120
|
+
under test, not just the authentication entry point. A smoke check that only
|
|
121
|
+
validates the login page will silently pass even when feature pages return
|
|
122
|
+
HTTP 500. Maintain an explicit list of pages covered by the suite and verify
|
|
123
|
+
each returns a non-5xx response before running tests.
|
|
124
|
+
priority: recommended
|
|
125
|
+
evidence: >
|
|
126
|
+
Real incident (2026-04): E2E globalSetup only checked Login.aspx health;
|
|
127
|
+
feature page returned 500 silently — full E2E suite passed with false
|
|
128
|
+
confidence, masking a production crash.
|
|
129
|
+
|
|
116
130
|
physical_spec:
|
|
117
131
|
type: custom_script
|
|
118
132
|
validator:
|
|
@@ -2,8 +2,8 @@
|
|
|
2
2
|
|
|
3
3
|
> **Language**: English | [繁體中文](../locales/zh-TW/core/checkin-standards.md)
|
|
4
4
|
|
|
5
|
-
**Version**: 1.
|
|
6
|
-
**Last Updated**: 2026-
|
|
5
|
+
**Version**: 1.6.0
|
|
6
|
+
**Last Updated**: 2026-04-20
|
|
7
7
|
**Applicability**: All software projects using version control
|
|
8
8
|
**Scope**: partial
|
|
9
9
|
**Industry Standards**: SWEBOK v4.0 Chapter 6
|
|
@@ -906,6 +906,25 @@ obj/
|
|
|
906
906
|
node_modules/
|
|
907
907
|
```
|
|
908
908
|
|
|
909
|
+
### Legacy Project File Sync (project-file-sync)
|
|
910
|
+
|
|
911
|
+
> **Applicability**: .NET Framework, MSBuild `.csproj`, and any legacy format that requires explicit file registration.
|
|
912
|
+
|
|
913
|
+
Legacy project formats (e.g. `.NET Framework .csproj`) do **not** auto-include source files on disk — every file must be explicitly listed in the project manifest. Unregistered files are **silently excluded from compilation** with no error or warning.
|
|
914
|
+
|
|
915
|
+
**Risk**: You add a new `.cs`/`.aspx.cs` file, rebuild the DLL — the file is excluded. Tests pass (they're testing the old DLL). Production crashes with "Cannot load type".
|
|
916
|
+
|
|
917
|
+
**Pre-commit check**:
|
|
918
|
+
|
|
919
|
+
```bash
|
|
920
|
+
# Find .cs files on disk not registered in .csproj
|
|
921
|
+
comm -23 \
|
|
922
|
+
<(find . -name "*.cs" | sort) \
|
|
923
|
+
<(grep -oP '(?<=Include=")[^"]+\.cs' MyProject.csproj | sort)
|
|
924
|
+
```
|
|
925
|
+
|
|
926
|
+
**Rule**: If your project uses a legacy format, run a disk-vs-manifest comparison before every commit. Fail fast on any unregistered file.
|
|
927
|
+
|
|
909
928
|
---
|
|
910
929
|
|
|
911
930
|
## Common Violations and Solutions
|
|
@@ -2,6 +2,8 @@
|
|
|
2
2
|
|
|
3
3
|
> **Language**: English | [繁體中文](../locales/zh-TW/core/test-governance.md)
|
|
4
4
|
|
|
5
|
+
**Version**: 1.1.0
|
|
6
|
+
**Last Updated**: 2026-04-20
|
|
5
7
|
**Applicability**: All software projects
|
|
6
8
|
**Scope**: universal
|
|
7
9
|
|
|
@@ -121,6 +123,7 @@ Release completion criteria (checked before release):
|
|
|
121
123
|
| enforce-completion-criteria | Completing a task or feature | Verify all required completion criteria are met before marking task/feature as done | Required |
|
|
122
124
|
| pyramid-compliance | Planning test strategy | Follow the 70/20/7/3 pyramid ratio as a guideline. Deviation is acceptable with documented justification | Required |
|
|
123
125
|
| sit-isolation | Running system tests | System tests should stub external dependencies but use real internal services. Use SIT environment for system-level validation | Recommended |
|
|
126
|
+
| test-execution-continuity | Adding or completing a test case | A test case must be wired to an automated execution trigger (CI gate, build hook, or scheduled run). A test that exists but is never run provides false confidence and is worse than no test at all. Verify that execution history exists before marking test coverage as complete. | Required |
|
|
124
127
|
|
|
125
128
|
---
|
|
126
129
|
|
|
@@ -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.2.0
|
|
6
|
+
**Last Updated**: 2026-04-20
|
|
7
7
|
**Applicability**: All software projects
|
|
8
8
|
**Scope**: universal
|
|
9
9
|
**Industry Standards**: ISTQB CTFL v4.0, ISO/IEC/IEEE 29119
|
|
@@ -231,6 +231,29 @@ This standard defines actionable testing rules and conventions for AI agents and
|
|
|
231
231
|
e2e/[feature]/[scenario].[ext]
|
|
232
232
|
```
|
|
233
233
|
|
|
234
|
+
#### E2E Precondition Scope (e2e-precondition-scope)
|
|
235
|
+
|
|
236
|
+
E2E environment pre-checks (`globalSetup`, `beforeAll`) must verify the health of **all pages and endpoints under test**, not just the authentication entry point.
|
|
237
|
+
|
|
238
|
+
**Anti-pattern** — login-only health check:
|
|
239
|
+
```ts
|
|
240
|
+
// ❌ Passes even when feature pages return 500
|
|
241
|
+
await page.goto('/login');
|
|
242
|
+
expect(response.status()).toBe(200);
|
|
243
|
+
```
|
|
244
|
+
|
|
245
|
+
**Required pattern** — explicit coverage list:
|
|
246
|
+
```ts
|
|
247
|
+
// ✅ Verify all pages covered by the suite
|
|
248
|
+
const PAGES_UNDER_TEST = ['/login', '/dashboard', '/feature-x'];
|
|
249
|
+
for (const path of PAGES_UNDER_TEST) {
|
|
250
|
+
const res = await fetch(`${BASE_URL}${path}`);
|
|
251
|
+
expect(res.status).toBeLessThan(500); // fail fast on 5xx
|
|
252
|
+
}
|
|
253
|
+
```
|
|
254
|
+
|
|
255
|
+
> **Evidence**: Real incident — E2E `globalSetup` only checked `Login.aspx`; a feature page returned HTTP 500 silently. The full E2E suite passed with false confidence, masking a production crash.
|
|
256
|
+
|
|
234
257
|
---
|
|
235
258
|
|
|
236
259
|
## Test Doubles
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
---
|
|
2
2
|
source: ../../CHANGELOG.md
|
|
3
|
-
source_version: 5.1.
|
|
4
|
-
translation_version: 5.1.
|
|
3
|
+
source_version: 5.1.1
|
|
4
|
+
translation_version: 5.1.1
|
|
5
5
|
last_synced: 2026-04-20
|
|
6
6
|
status: current
|
|
7
7
|
---
|
|
@@ -17,6 +17,24 @@ status: current
|
|
|
17
17
|
|
|
18
18
|
## [Unreleased]
|
|
19
19
|
|
|
20
|
+
## [5.1.1] - 2026-04-20
|
|
21
|
+
|
|
22
|
+
> **补丁版本**:Windows CI 修正、53 个 SKILL.md 补 `name` 字段、三份 `.md` 源文件依 BUG-A08 事后分析新增规则、zh-TW/zh-CN 翻译同步。
|
|
23
|
+
|
|
24
|
+
### 修正
|
|
25
|
+
- **`cli/src/utils/directory-mapper.js`**:以 `path.basename(dir)` 取代 `dir.split('/').pop()`,修正 Windows CI 路径分隔符兼容性问题(修复 Windows CI runner 上 `directory-mapper.test.js` 测试失败)。
|
|
26
|
+
|
|
27
|
+
### 新增
|
|
28
|
+
- **`name` 字段** 补齐至 9 个源目录 `skills/*/SKILL.md` 及 44 个 `locales/zh-TW/skills/*/SKILL.md`,符合 Skill 验证工具需求。
|
|
29
|
+
|
|
30
|
+
### 变更
|
|
31
|
+
- **`core/test-governance.md`** 1.0.0 → 1.1.0:新增 `test-execution-continuity` 规则(BUG-A08 事后分析 — 22 个测试存在但未连接任何 CI 执行触发器)。
|
|
32
|
+
- **`core/checkin-standards.md`** 1.5.0 → 1.6.0:新增旧版项目文件同步(`project-file-sync`)章节 — 磁盘上的每个源文件必须注册于旧版项目 manifest 中。
|
|
33
|
+
- **`core/testing-standards.md`** 3.1.0 → 3.2.0:新增 E2E 前置条件范围(`e2e-precondition-scope`)章节 — E2E 前置检查必须验证所有受测页面/端点,而非仅验证认证入口。
|
|
34
|
+
- **zh-TW 与 zh-CN 翻译** 已同步 `test-governance.md`、`checkin-standards.md`、`testing-standards.md` 三份文件。
|
|
35
|
+
|
|
36
|
+
[5.1.1]: https://github.com/AsiaOstrich/universal-dev-standards/compare/v5.1.0...v5.1.1
|
|
37
|
+
|
|
20
38
|
## [5.1.0] - 2026-04-20
|
|
21
39
|
|
|
22
40
|
> **正式版**:BUG-A06 i18n 完整性 — 新增 32 份缺失翻译、Semver 感知翻译闸门、新增 `translation-lifecycle-standards` UDS 标准。BUG-A07 Shell 测试覆盖 — 20+ 脚本的 bats smoke tests。BUG-A08 假通过测试审计 — 修正 22 个测试。Pre-release Batch 0:6 个标准从 Trial 升至 Adopt(DEC-021/025/031/035/038/040)。标准总数:106 个。
|
|
@@ -6,7 +6,7 @@
|
|
|
6
6
|
|
|
7
7
|
> **语言**: [English](../../README.md) | [繁體中文](../zh-TW/README.md) | 简体中文
|
|
8
8
|
|
|
9
|
-
**版本**: 5.1.
|
|
9
|
+
**版本**: 5.1.1 | **发布日期**: 2026-04-13 | **授权**: [双重授权](../../LICENSE) (CC BY 4.0 + MIT)
|
|
10
10
|
|
|
11
11
|
语言无关、框架无关的软件项目文档标准。通过 AI 原生工作流,确保不同技术栈之间的一致性、质量和可维护性。
|
|
12
12
|
|
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
---
|
|
2
2
|
source: ../../../core/checkin-standards.md
|
|
3
|
-
source_version: 1.
|
|
4
|
-
translation_version: 1.
|
|
5
|
-
last_synced: 2026-
|
|
3
|
+
source_version: 1.6.0
|
|
4
|
+
translation_version: 1.6.0
|
|
5
|
+
last_synced: 2026-04-20
|
|
6
6
|
status: current
|
|
7
7
|
---
|
|
8
8
|
|
|
@@ -911,6 +911,25 @@ obj/
|
|
|
911
911
|
node_modules/
|
|
912
912
|
```
|
|
913
913
|
|
|
914
|
+
### 旧版项目文件同步(project-file-sync)
|
|
915
|
+
|
|
916
|
+
> **适用范围**:.NET Framework、MSBuild `.csproj` 及任何需要显式登记文件的旧版格式。
|
|
917
|
+
|
|
918
|
+
旧版项目格式(如 `.NET Framework .csproj`)不会自动包含磁盘上的源码文件——每个文件都必须在项目 manifest 中显式列出。未登记的文件在**编译时被静默排除,不会产生任何错误或警告**。
|
|
919
|
+
|
|
920
|
+
**风险**:新增 `.cs`/`.aspx.cs` 文件后重建 DLL,该文件被排除。测试通过(测试的是旧 DLL),正式环境崩溃并显示"无法加载类型"。
|
|
921
|
+
|
|
922
|
+
**预提交检查**:
|
|
923
|
+
|
|
924
|
+
```bash
|
|
925
|
+
# 找出磁盘上未登记于 .csproj 的 .cs 文件
|
|
926
|
+
comm -23 \
|
|
927
|
+
<(find . -name "*.cs" | sort) \
|
|
928
|
+
<(grep -oP '(?<=Include=")[^"]+\.cs' MyProject.csproj | sort)
|
|
929
|
+
```
|
|
930
|
+
|
|
931
|
+
**规则**:若项目使用旧版格式,每次提交前执行磁盘与 manifest 的比对。发现未登记文件时立即失败。
|
|
932
|
+
|
|
914
933
|
---
|
|
915
934
|
|
|
916
935
|
## 常见违规与解决方案
|
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
---
|
|
2
2
|
source: ../../../core/test-governance.md
|
|
3
|
-
source_version: 1.
|
|
4
|
-
translation_version: 1.
|
|
5
|
-
last_synced: 2026-
|
|
3
|
+
source_version: 1.1.0
|
|
4
|
+
translation_version: 1.1.0
|
|
5
|
+
last_synced: 2026-04-20
|
|
6
6
|
status: current
|
|
7
7
|
---
|
|
8
8
|
|
|
@@ -103,6 +103,17 @@ status: current
|
|
|
103
103
|
|
|
104
104
|
---
|
|
105
105
|
|
|
106
|
+
## 规则
|
|
107
|
+
|
|
108
|
+
| ID | 触发条件 | 指令 | 优先级 |
|
|
109
|
+
|----|---------|------|--------|
|
|
110
|
+
| enforce-completion-criteria | 完成任务或功能时 | 在将任务/功能标记为完成之前,验证所有必要的完成条件已满足 | 必须 |
|
|
111
|
+
| pyramid-compliance | 规划测试策略时 | 以 70/20/7/3 金字塔比例作为指导方针。允许偏差,但需有文档记录的理由 | 必须 |
|
|
112
|
+
| sit-isolation | 运行系统测试时 | 系统测试应对外部依赖使用 Stub,但使用真实的内部服务。使用 SIT 环境进行系统级验证 | 建议 |
|
|
113
|
+
| test-execution-continuity | 新增或完成测试用例时 | 测试用例必须连接到自动化执行触发器(CI gate、build hook 或定时执行)。存在但从未执行的测试提供假信心,比没有测试更糟。在将测试覆盖率标记为完成前,请确认执行历程存在。| 必须 |
|
|
114
|
+
|
|
115
|
+
---
|
|
116
|
+
|
|
106
117
|
## 相关标准
|
|
107
118
|
|
|
108
119
|
- [测试标准](testing-standards.md)
|
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
---
|
|
2
2
|
source: ../../../core/testing-standards.md
|
|
3
|
-
source_version: 3.
|
|
4
|
-
translation_version: 3.
|
|
5
|
-
last_synced: 2026-
|
|
3
|
+
source_version: 3.2.0
|
|
4
|
+
translation_version: 3.2.0
|
|
5
|
+
last_synced: 2026-04-20
|
|
6
6
|
status: current
|
|
7
7
|
---
|
|
8
8
|
|
|
@@ -239,6 +239,29 @@ status: current
|
|
|
239
239
|
e2e/[feature]/[scenario].[ext]
|
|
240
240
|
```
|
|
241
241
|
|
|
242
|
+
#### E2E 前置条件范围(e2e-precondition-scope)
|
|
243
|
+
|
|
244
|
+
E2E 环境前置检查(`globalSetup`、`beforeAll`)必须验证**所有受测页面与端点**的健康状态,而非仅验证认证入口点。
|
|
245
|
+
|
|
246
|
+
**反模式** — 只验 login:
|
|
247
|
+
```ts
|
|
248
|
+
// ❌ 即使功能页返回 500 也会通过
|
|
249
|
+
await page.goto('/login');
|
|
250
|
+
expect(response.status()).toBe(200);
|
|
251
|
+
```
|
|
252
|
+
|
|
253
|
+
**正确模式** — 明确的覆盖列表:
|
|
254
|
+
```ts
|
|
255
|
+
// ✅ 验证套件涵盖的所有页面
|
|
256
|
+
const PAGES_UNDER_TEST = ['/login', '/dashboard', '/feature-x'];
|
|
257
|
+
for (const path of PAGES_UNDER_TEST) {
|
|
258
|
+
const res = await fetch(`${BASE_URL}${path}`);
|
|
259
|
+
expect(res.status).toBeLessThan(500); // 遇到 5xx 立即失败
|
|
260
|
+
}
|
|
261
|
+
```
|
|
262
|
+
|
|
263
|
+
> **证据**:真实事故 — E2E `globalSetup` 只验了 `Login.aspx`;功能页静默返回 HTTP 500。整个 E2E 套件通过,提供假信心,直到正式环境崩溃才被发现。
|
|
264
|
+
|
|
242
265
|
---
|
|
243
266
|
|
|
244
267
|
## 测试替身
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
---
|
|
2
2
|
source: ../../CHANGELOG.md
|
|
3
|
-
source_version: 5.1.
|
|
4
|
-
translation_version: 5.1.
|
|
3
|
+
source_version: 5.1.1
|
|
4
|
+
translation_version: 5.1.1
|
|
5
5
|
last_synced: 2026-04-20
|
|
6
6
|
status: current
|
|
7
7
|
---
|
|
@@ -17,6 +17,24 @@ status: current
|
|
|
17
17
|
|
|
18
18
|
## [Unreleased]
|
|
19
19
|
|
|
20
|
+
## [5.1.1] - 2026-04-20
|
|
21
|
+
|
|
22
|
+
> **修補版本**:Windows CI 修正、53 個 SKILL.md 補 `name` 欄位、三份 `.md` 源文件依 BUG-A08 事後分析新增規則、zh-TW/zh-CN 翻譯同步。
|
|
23
|
+
|
|
24
|
+
### 修正
|
|
25
|
+
- **`cli/src/utils/directory-mapper.js`**:以 `path.basename(dir)` 取代 `dir.split('/').pop()`,修正 Windows CI 路徑分隔符相容性問題(修復 Windows CI runner 上 `directory-mapper.test.js` 測試失敗)。
|
|
26
|
+
|
|
27
|
+
### 新增
|
|
28
|
+
- **`name` 欄位** 補齊至 9 個源目錄 `skills/*/SKILL.md` 及 44 個 `locales/zh-TW/skills/*/SKILL.md`,符合 Skill 驗證工具需求。
|
|
29
|
+
|
|
30
|
+
### 變更
|
|
31
|
+
- **`core/test-governance.md`** 1.0.0 → 1.1.0:新增 `test-execution-continuity` 規則(BUG-A08 事後分析 — 22 個測試存在但未連接任何 CI 執行觸發器)。
|
|
32
|
+
- **`core/checkin-standards.md`** 1.5.0 → 1.6.0:新增舊版專案檔案同步(`project-file-sync`)章節 — 磁碟上的每個源文件必須登錄於舊版專案 manifest 中。
|
|
33
|
+
- **`core/testing-standards.md`** 3.1.0 → 3.2.0:新增 E2E 前置條件範圍(`e2e-precondition-scope`)章節 — E2E 前置檢查必須驗證所有受測頁面/端點,而非僅驗證認證入口。
|
|
34
|
+
- **zh-TW 與 zh-CN 翻譯** 已同步 `test-governance.md`、`checkin-standards.md`、`testing-standards.md` 三份文件。
|
|
35
|
+
|
|
36
|
+
[5.1.1]: https://github.com/AsiaOstrich/universal-dev-standards/compare/v5.1.0...v5.1.1
|
|
37
|
+
|
|
20
38
|
## [5.1.0] - 2026-04-20
|
|
21
39
|
|
|
22
40
|
> **正式版**:BUG-A06 i18n 完整性 — 新增 32 份缺失翻譯、Semver 感知翻譯閘門、新增 `translation-lifecycle-standards` UDS 標準。BUG-A07 Shell 測試覆蓋 — 20+ 腳本的 bats smoke tests。BUG-A08 假通過測試稽核 — 修正 22 個測試。Pre-release Batch 0:6 個標準從 Trial 升至 Adopt(DEC-021/025/031/035/038/040)。標準總數:106 個。
|
|
@@ -6,7 +6,7 @@
|
|
|
6
6
|
|
|
7
7
|
> **語言**: [English](../../README.md) | 繁體中文 | [简体中文](../zh-CN/README.md)
|
|
8
8
|
|
|
9
|
-
**版本**: 5.1.
|
|
9
|
+
**版本**: 5.1.1 | **發布日期**: 2026-04-13 | **授權**: [雙重授權](../../LICENSE) (CC BY 4.0 + MIT)
|
|
10
10
|
|
|
11
11
|
語言無關、框架無關的軟體專案文件標準。透過 AI 原生工作流,確保不同技術堆疊之間的一致性、品質和可維護性。
|
|
12
12
|
|
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
---
|
|
2
2
|
source: ../../../core/checkin-standards.md
|
|
3
|
-
source_version: 1.
|
|
4
|
-
translation_version: 1.
|
|
5
|
-
last_synced: 2026-
|
|
3
|
+
source_version: 1.6.0
|
|
4
|
+
translation_version: 1.6.0
|
|
5
|
+
last_synced: 2026-04-20
|
|
6
6
|
status: current
|
|
7
7
|
---
|
|
8
8
|
|
|
@@ -913,6 +913,27 @@ node_modules/
|
|
|
913
913
|
|
|
914
914
|
---
|
|
915
915
|
|
|
916
|
+
### 舊版專案檔案同步(project-file-sync)
|
|
917
|
+
|
|
918
|
+
> **適用範圍**:.NET Framework、MSBuild `.csproj` 及任何需要明確登錄檔案的舊版格式。
|
|
919
|
+
|
|
920
|
+
舊版專案格式(如 `.NET Framework .csproj`)不會自動包含磁碟上的原始碼檔案——每個檔案都必須明確列在專案 manifest 中。未登錄的檔案在**編譯時被靜默排除,不會產生任何錯誤或警告**。
|
|
921
|
+
|
|
922
|
+
**風險**:新增 `.cs`/`.aspx.cs` 檔案後重建 DLL,該檔案被排除。測試通過(測試的是舊 DLL),正式環境崩潰並顯示「無法載入型別」。
|
|
923
|
+
|
|
924
|
+
**預提交檢查**:
|
|
925
|
+
|
|
926
|
+
```bash
|
|
927
|
+
# 找出磁碟上未登錄於 .csproj 的 .cs 檔案
|
|
928
|
+
comm -23 \
|
|
929
|
+
<(find . -name "*.cs" | sort) \
|
|
930
|
+
<(grep -oP '(?<=Include=")[^"]+\.cs' MyProject.csproj | sort)
|
|
931
|
+
```
|
|
932
|
+
|
|
933
|
+
**規則**:若專案使用舊版格式,每次提交前執行磁碟與 manifest 的比對。發現未登錄檔案時立即失敗。
|
|
934
|
+
|
|
935
|
+
---
|
|
936
|
+
|
|
916
937
|
## 常見違規與解決方案
|
|
917
938
|
|
|
918
939
|
### 違規 1: "WIP" 提交
|
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
---
|
|
2
2
|
source: ../../../core/test-governance.md
|
|
3
|
-
source_version: 1.
|
|
4
|
-
translation_version: 1.
|
|
5
|
-
last_synced: 2026-
|
|
3
|
+
source_version: 1.1.0
|
|
4
|
+
translation_version: 1.1.0
|
|
5
|
+
last_synced: 2026-04-20
|
|
6
6
|
status: current
|
|
7
7
|
---
|
|
8
8
|
|
|
@@ -81,6 +81,17 @@ status: current
|
|
|
81
81
|
| Staging | 整合和 E2E 測試 | DevOps |
|
|
82
82
|
| Production | 煙霧測試和監控 | SRE |
|
|
83
83
|
|
|
84
|
+
## 規則
|
|
85
|
+
|
|
86
|
+
| ID | 觸發時機 | 指令 | 優先度 |
|
|
87
|
+
|----|---------|------|--------|
|
|
88
|
+
| enforce-completion-criteria | 完成任務或功能時 | 在將任務/功能標記為完成前,驗證所有必要的完成準則已達成 | 必須 |
|
|
89
|
+
| pyramid-compliance | 規劃測試策略時 | 以 70/20/7/3 金字塔比例為指引。可接受偏差,但需有文件記錄的正當理由 | 必須 |
|
|
90
|
+
| sit-isolation | 執行系統測試時 | 系統測試應對外部相依性使用 Stub,但使用真實的內部服務。使用 SIT 環境進行系統層級的驗證 | 建議 |
|
|
91
|
+
| test-execution-continuity | 新增或完成測試案例時 | 測試案例必須連接到自動化執行觸發器(CI gate、build hook 或排程執行)。存在但從未執行的測試提供假信心,比沒有測試更糟。在將測試覆蓋率標記為完成前,請確認執行歷程存在。| 必須 |
|
|
92
|
+
|
|
93
|
+
---
|
|
94
|
+
|
|
84
95
|
## 相關標準
|
|
85
96
|
|
|
86
97
|
- [測試標準](testing-standards.md)
|
|
@@ -1,3 +1,11 @@
|
|
|
1
|
+
---
|
|
2
|
+
source: ../../../core/testing-standards.md
|
|
3
|
+
source_version: 3.2.0
|
|
4
|
+
translation_version: 3.2.0
|
|
5
|
+
last_synced: 2026-04-20
|
|
6
|
+
status: current
|
|
7
|
+
---
|
|
8
|
+
|
|
1
9
|
# 測試標準
|
|
2
10
|
|
|
3
11
|
> **Language**: [English](../../../core/testing-standards.md) | 繁體中文
|
|
@@ -231,6 +239,29 @@
|
|
|
231
239
|
e2e/[feature]/[scenario].[ext]
|
|
232
240
|
```
|
|
233
241
|
|
|
242
|
+
#### E2E 前置條件範圍(e2e-precondition-scope)
|
|
243
|
+
|
|
244
|
+
E2E 環境前置檢查(`globalSetup`、`beforeAll`)必須驗證**所有受測頁面與端點**的健康狀態,而非僅驗證認證入口點。
|
|
245
|
+
|
|
246
|
+
**反模式** — 只驗 login:
|
|
247
|
+
```ts
|
|
248
|
+
// ❌ 即使功能頁回傳 500 也會通過
|
|
249
|
+
await page.goto('/login');
|
|
250
|
+
expect(response.status()).toBe(200);
|
|
251
|
+
```
|
|
252
|
+
|
|
253
|
+
**正確模式** — 明確的覆蓋清單:
|
|
254
|
+
```ts
|
|
255
|
+
// ✅ 驗證套件涵蓋的所有頁面
|
|
256
|
+
const PAGES_UNDER_TEST = ['/login', '/dashboard', '/feature-x'];
|
|
257
|
+
for (const path of PAGES_UNDER_TEST) {
|
|
258
|
+
const res = await fetch(`${BASE_URL}${path}`);
|
|
259
|
+
expect(res.status).toBeLessThan(500); // 遇到 5xx 立即失敗
|
|
260
|
+
}
|
|
261
|
+
```
|
|
262
|
+
|
|
263
|
+
> **證據**:真實事故 — E2E `globalSetup` 只驗了 `Login.aspx`;功能頁靜默回傳 HTTP 500。整個 E2E 套件通過,提供假信心,直到正式環境崩潰才被發現。
|
|
264
|
+
|
|
234
265
|
---
|
|
235
266
|
|
|
236
267
|
## 測試替身
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "universal-dev-standards",
|
|
3
|
-
"version": "5.1.
|
|
3
|
+
"version": "5.1.1",
|
|
4
4
|
"description": "CLI tool for adopting Universal Development Standards",
|
|
5
5
|
"keywords": [
|
|
6
6
|
"documentation",
|
|
@@ -59,7 +59,7 @@
|
|
|
59
59
|
"prepack": "node scripts/prepack.mjs"
|
|
60
60
|
},
|
|
61
61
|
"dependencies": {
|
|
62
|
-
"@inquirer/prompts": "
|
|
62
|
+
"@inquirer/prompts": "8.4.1",
|
|
63
63
|
"chalk": "^5.3.0",
|
|
64
64
|
"commander": "^14.0.0",
|
|
65
65
|
"js-yaml": "^4.1.0",
|
|
@@ -70,9 +70,9 @@
|
|
|
70
70
|
"@vitest/coverage-v8": "^4.1.2",
|
|
71
71
|
"ajv": "^8.17.1",
|
|
72
72
|
"ajv-formats": "^3.0.1",
|
|
73
|
-
"eslint": "
|
|
73
|
+
"eslint": "10.2.1",
|
|
74
74
|
"glob": "^13.0.1",
|
|
75
|
-
"globals": "
|
|
75
|
+
"globals": "17.5.0",
|
|
76
76
|
"husky": "^9.1.7",
|
|
77
77
|
"lint-staged": "^16.4.0",
|
|
78
78
|
"vitest": "^4.1.2"
|
|
@@ -9,7 +9,7 @@
|
|
|
9
9
|
*/
|
|
10
10
|
|
|
11
11
|
import { readdirSync } from 'fs';
|
|
12
|
-
import { join, relative } from 'path';
|
|
12
|
+
import { join, relative, basename } from 'path';
|
|
13
13
|
|
|
14
14
|
/**
|
|
15
15
|
* Default mappings from standard IDs to directory glob patterns.
|
|
@@ -84,7 +84,7 @@ export function mapStandardsToDirectories(projectPath, customMappings = {}) {
|
|
|
84
84
|
const matchedDirs = [];
|
|
85
85
|
|
|
86
86
|
for (const dir of projectDirs) {
|
|
87
|
-
const dirName = dir
|
|
87
|
+
const dirName = basename(dir);
|
|
88
88
|
if (patterns.includes(dirName)) {
|
|
89
89
|
matchedDirs.push(dir);
|
|
90
90
|
}
|
package/standards-registry.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"$schema": "https://json-schema.org/draft/2020-12/schema",
|
|
3
|
-
"version": "5.1.
|
|
3
|
+
"version": "5.1.1",
|
|
4
4
|
"lastUpdated": "2026-04-16",
|
|
5
5
|
"description": "Standards registry for universal-dev-standards with integrated skills and AI-optimized formats",
|
|
6
6
|
"formats": {
|
|
@@ -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.1.
|
|
61
|
+
"version": "5.1.1"
|
|
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.1.
|
|
68
|
+
"version": "5.1.1",
|
|
69
69
|
"note": "Skills are now included in the main repository under skills/"
|
|
70
70
|
}
|
|
71
71
|
},
|