universal-dev-standards 4.0.0-beta.1 → 4.0.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/bundled/core/testing-standards.md +93 -2
- package/bundled/locales/zh-CN/CLAUDE.md +3 -3
- package/bundled/locales/zh-CN/README.md +38 -40
- package/bundled/locales/zh-CN/core/testing-standards.md +92 -3
- package/bundled/locales/zh-CN/skills/claude-code/commands/bdd.md +1 -1
- package/bundled/locales/zh-CN/skills/claude-code/commands/methodology.md +1 -1
- package/bundled/locales/zh-TW/CLAUDE.md +3 -3
- package/bundled/locales/zh-TW/README.md +37 -39
- package/bundled/locales/zh-TW/core/testing-standards.md +96 -5
- package/bundled/locales/zh-TW/skills/claude-code/commands/bdd.md +1 -1
- package/bundled/locales/zh-TW/skills/claude-code/commands/methodology.md +1 -1
- package/bundled/skills/claude-code/commands/init.md +90 -25
- package/bundled/skills/claude-code/commands/update.md +110 -34
- package/package.json +1 -1
- package/src/commands/check.js +8 -3
- package/src/commands/configure.js +39 -11
- package/src/commands/init.js +11 -3
- package/src/commands/update.js +15 -9
- package/src/config/ai-agent-paths.js +4 -1
- package/src/i18n/messages.js +3 -3
- package/src/utils/integration-generator.js +315 -1
- package/standards-registry.json +4 -4
|
@@ -2,8 +2,8 @@
|
|
|
2
2
|
|
|
3
3
|
> **Language**: English | [繁體中文](../locales/zh-TW/core/testing-standards.md)
|
|
4
4
|
|
|
5
|
-
**Version**: 2.
|
|
6
|
-
**Last Updated**: 2026-01-
|
|
5
|
+
**Version**: 2.2.0
|
|
6
|
+
**Last Updated**: 2026-01-20
|
|
7
7
|
**Applicability**: All software projects
|
|
8
8
|
|
|
9
9
|
---
|
|
@@ -38,6 +38,7 @@ This standard defines testing conventions and best practices to ensure software
|
|
|
38
38
|
15. [Test Environment Isolation](#test-environment-isolation)
|
|
39
39
|
16. [CI/CD Integration](#cicd-integration)
|
|
40
40
|
17. [Best Practices](#best-practices)
|
|
41
|
+
18. [Test Documentation Structure](#test-documentation-structure) ⭐ NEW
|
|
41
42
|
|
|
42
43
|
---
|
|
43
44
|
|
|
@@ -2946,6 +2947,95 @@ public void MethodName_Scenario_ExpectedBehavior()
|
|
|
2946
2947
|
|
|
2947
2948
|
---
|
|
2948
2949
|
|
|
2950
|
+
## Test Documentation Structure
|
|
2951
|
+
|
|
2952
|
+
Improve test discoverability by maintaining a standardized documentation structure within test directories.
|
|
2953
|
+
|
|
2954
|
+
### tests/README.md Required Sections
|
|
2955
|
+
|
|
2956
|
+
Every `tests/` directory SHOULD include a README.md with the following sections for discoverability.
|
|
2957
|
+
|
|
2958
|
+
#### 1. Test Overview Table
|
|
2959
|
+
|
|
2960
|
+
List all test types with count, technology stack, and execution environment.
|
|
2961
|
+
|
|
2962
|
+
```markdown
|
|
2963
|
+
| Test Type | Count | Framework | Environment |
|
|
2964
|
+
|-----------|-------|-----------|-------------|
|
|
2965
|
+
| Unit Tests | 150 | Jest | Node.js |
|
|
2966
|
+
| Integration Tests | 45 | Jest | Node.js + TestContainers |
|
|
2967
|
+
| E2E Tests | 12 | Playwright | Browser |
|
|
2968
|
+
```
|
|
2969
|
+
|
|
2970
|
+
#### 2. Current Status Section
|
|
2971
|
+
|
|
2972
|
+
Display latest test execution results with clear pass/fail indicators.
|
|
2973
|
+
|
|
2974
|
+
```markdown
|
|
2975
|
+
## Current Status
|
|
2976
|
+
|
|
2977
|
+
| Metric | Value | Target | Status |
|
|
2978
|
+
|--------|-------|--------|--------|
|
|
2979
|
+
| Pass Rate | 98.5% | ≥ 95% | ✅ |
|
|
2980
|
+
| Line Coverage | 82% | ≥ 80% | ✅ |
|
|
2981
|
+
| Branch Coverage | 75% | ≥ 70% | ✅ |
|
|
2982
|
+
|
|
2983
|
+
**Last Run**: 2026-01-20 14:30 UTC
|
|
2984
|
+
**Report**: [test-report-20260120-143000.md](results/test-report-20260120-143000.md)
|
|
2985
|
+
```
|
|
2986
|
+
|
|
2987
|
+
#### 3. Report Links Section
|
|
2988
|
+
|
|
2989
|
+
Include links to test reports, gap analysis, and coverage summary.
|
|
2990
|
+
|
|
2991
|
+
```markdown
|
|
2992
|
+
## Reports
|
|
2993
|
+
|
|
2994
|
+
| Report Type | Location | Description |
|
|
2995
|
+
|-------------|----------|-------------|
|
|
2996
|
+
| Test Results | `results/` | Timestamped test execution reports |
|
|
2997
|
+
| Coverage | `coverage/` | Code coverage reports (HTML, JSON) |
|
|
2998
|
+
| Gap Analysis | `docs/gap-analysis.md` | Missing test coverage analysis |
|
|
2999
|
+
```
|
|
3000
|
+
|
|
3001
|
+
### Test Report Naming Convention
|
|
3002
|
+
|
|
3003
|
+
| Item | Convention | Example |
|
|
3004
|
+
|------|------------|---------|
|
|
3005
|
+
| Report filename | `test-report-YYYYMMDD-HHMMSS.md` | `test-report-20260120-143000.md` |
|
|
3006
|
+
| Report directory | `tests/results/` | `tests/results/test-report-*.md` |
|
|
3007
|
+
| Coverage directory | `tests/coverage/` | `tests/coverage/lcov-report/` |
|
|
3008
|
+
| Gap analysis | `tests/docs/gap-analysis.md` | - |
|
|
3009
|
+
|
|
3010
|
+
### Directory Structure Example
|
|
3011
|
+
|
|
3012
|
+
```
|
|
3013
|
+
tests/
|
|
3014
|
+
├── README.md # Test overview and status
|
|
3015
|
+
├── results/ # Test execution reports
|
|
3016
|
+
│ ├── test-report-20260120-143000.md
|
|
3017
|
+
│ └── test-report-20260119-090000.md
|
|
3018
|
+
├── coverage/ # Coverage reports
|
|
3019
|
+
│ ├── lcov-report/
|
|
3020
|
+
│ └── coverage-summary.json
|
|
3021
|
+
├── docs/ # Test documentation
|
|
3022
|
+
│ └── gap-analysis.md
|
|
3023
|
+
├── unit/ # Unit tests
|
|
3024
|
+
├── integration/ # Integration tests
|
|
3025
|
+
└── e2e/ # End-to-end tests
|
|
3026
|
+
```
|
|
3027
|
+
|
|
3028
|
+
### Benefits
|
|
3029
|
+
|
|
3030
|
+
| Benefit | Description |
|
|
3031
|
+
|---------|-------------|
|
|
3032
|
+
| **Discoverability** | Developers can quickly find test status without searching |
|
|
3033
|
+
| **Transparency** | Current quality metrics visible at a glance |
|
|
3034
|
+
| **Traceability** | Historical reports enable trend analysis |
|
|
3035
|
+
| **Onboarding** | New team members understand test structure immediately |
|
|
3036
|
+
|
|
3037
|
+
---
|
|
3038
|
+
|
|
2949
3039
|
## Quick Reference Card
|
|
2950
3040
|
|
|
2951
3041
|
```
|
|
@@ -3042,6 +3132,7 @@ public void MethodName_Scenario_ExpectedBehavior()
|
|
|
3042
3132
|
|
|
3043
3133
|
| Version | Date | Changes |
|
|
3044
3134
|
|---------|------|---------|
|
|
3135
|
+
| 2.2.0 | 2026-01-20 | Added Test Documentation Structure section: tests/README.md required sections, test report naming conventions, directory structure example. |
|
|
3045
3136
|
| 2.1.0 | 2026-01-05 | Added SWEBOK v4.0 reference. New sections: Testing Fundamentals (Faults vs Failures, Oracle Problem, Theoretical Limitations, Testability, Test Adequacy), Test-Related Measures (Fault Density, Reliability Growth, Fault Seeding). Expanded: Test Design Techniques (Pairwise Testing, Data Flow Testing), Specialized Testing (Installation, Alpha/Beta, Recovery, Configuration, Back-to-Back, Usability). Updated Quick Reference Card. |
|
|
3046
3137
|
| 2.0.0 | 2026-01-05 | Major update aligned with ISTQB CTFL v4.0 and ISO/IEC/IEEE 29119. Added: Static Testing (reviews, static analysis), Test Design Techniques (EP, BVA, Decision Table, State Transition, Use Case, Statement/Branch/Condition/MC/DC coverage), Experience-Based Testing (exploratory, error guessing, checklists), Risk-Based Testing (risk assessment, prioritization), Specialized Testing (contract, mutation, chaos, property-based, visual regression, accessibility), Defect Management (lifecycle, metrics, root cause), Test Process Management (planning, monitoring, completion) |
|
|
3047
3138
|
| 1.3.0 | 2025-12-29 | Add: Testing Framework Selection (ISTQB vs Industry Pyramid), IT/SIT abbreviation clarification, source references |
|
|
@@ -14,7 +14,7 @@ status: current
|
|
|
14
14
|
|
|
15
15
|
Universal Development Standards 是一个语言无关、框架无关的文件化标准框架。它提供:
|
|
16
16
|
|
|
17
|
-
- **核心规范** (`core/`):
|
|
17
|
+
- **核心规范** (`core/`):22 个基础开发标准
|
|
18
18
|
- **AI 技能** (`skills/`):用于 AI 辅助开发的 Claude Code 技能
|
|
19
19
|
- **CLI 工具** (`cli/`):用于采用标准的 Node.js CLI
|
|
20
20
|
- **整合** (`integrations/`):各种 AI 工具的配置
|
|
@@ -200,9 +200,9 @@ node cli\bin\uds.js init --help
|
|
|
200
200
|
|
|
201
201
|
```
|
|
202
202
|
universal-dev-standards/
|
|
203
|
-
├── core/ # 核心规范(
|
|
203
|
+
├── core/ # 核心规范(22 个档案)
|
|
204
204
|
├── skills/ # AI 工具技能
|
|
205
|
-
│ └── claude-code/ # Claude Code 技能(
|
|
205
|
+
│ └── claude-code/ # Claude Code 技能(23 个技能)
|
|
206
206
|
├── cli/ # Node.js CLI 工具
|
|
207
207
|
│ ├── src/ # 原始码
|
|
208
208
|
│ ├── tests/ # 测试档案
|
|
@@ -1,37 +1,32 @@
|
|
|
1
1
|
---
|
|
2
2
|
source: ../../README.md
|
|
3
|
-
source_version:
|
|
4
|
-
translation_version:
|
|
5
|
-
last_synced: 2026-01-
|
|
3
|
+
source_version: 4.0.0
|
|
4
|
+
translation_version: 4.0.0
|
|
5
|
+
last_synced: 2026-01-20
|
|
6
6
|
status: current
|
|
7
7
|
---
|
|
8
8
|
|
|
9
9
|
# 通用开发规范
|
|
10
10
|
|
|
11
|
-
> **Language**: [English](../../README.md) | [
|
|
11
|
+
> **Language**: [English](../../README.md) | [繁體中文](../zh-TW/README.md) | 简体中文
|
|
12
12
|
|
|
13
|
-
**版本**:
|
|
14
|
-
**最后更新**: 2026-01-
|
|
13
|
+
**版本**: 4.0.0
|
|
14
|
+
**最后更新**: 2026-01-20
|
|
15
15
|
**授权**: [双重授权](../../LICENSE) (CC BY 4.0 + MIT)
|
|
16
16
|
|
|
17
|
-
|
|
18
|
-
> 如需稳定版本: `npm install universal-dev-standards@3.4.2`
|
|
17
|
+
### 4.0.0 新功能
|
|
19
18
|
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
|
23
|
-
|
|
24
|
-
|
|
|
25
|
-
| **
|
|
26
|
-
|
|
|
27
|
-
|
|
|
28
|
-
|
|
|
29
|
-
| **方法论系统** | ❌ | ✅ 🧪 |
|
|
30
|
-
| `/methodology` 命令 | ❌ | ✅ 🧪 |
|
|
31
|
-
| `/bdd` 命令 | ❌ | ✅ 🧪 |
|
|
32
|
-
| TDD/BDD/SDD/ATDD 工作流 | ❌ | ✅ 🧪 |
|
|
19
|
+
| 功能 | 说明 |
|
|
20
|
+
|------|------|
|
|
21
|
+
| **双向推演** | 正向推演 + 反向工程形成完整的规格-代码循环 |
|
|
22
|
+
| **6 个新核心标准** | BDD、ATDD、反向工程、正向推演、AI 指令、重构 |
|
|
23
|
+
| **23 个 Skills** | 8 个新技能,包括正向推演、BDD/ATDD 助手、Commands |
|
|
24
|
+
| **24 个斜杠命令** | 9 个新命令(`/derive-*`、`/reverse-*`、`/atdd`、`/bdd`)|
|
|
25
|
+
| **每工具安装层级** | Skills/Commands 支持每个 AI 工具的用户或项目层级 |
|
|
26
|
+
| **增强 CLI** | Debug 标志、拒绝功能记忆、文件完整性追踪 |
|
|
27
|
+
| **方法论系统** | TDD/BDD/SDD/ATDD 工作流现已正式发布 |
|
|
33
28
|
|
|
34
|
-
>
|
|
29
|
+
> **4.0 新功能**:双向推演带来完整的规格-代码生命周期管理,包含正向推演和反向工程。
|
|
35
30
|
|
|
36
31
|
---
|
|
37
32
|
|
|
@@ -88,7 +83,7 @@ cp core/commit-message-guide.md your-project/.standards/
|
|
|
88
83
|
| Cursor | `uds init` → `.cursorrules` | ❌ 仅 Rules | - |
|
|
89
84
|
| Google Antigravity | `uds init` → `INSTRUCTIONS.md` | - | - |
|
|
90
85
|
|
|
91
|
-
> **
|
|
86
|
+
> **v4.0.0 新功能**:`uds init` 支持每工具安装层级选择(用户或项目层级)。双向推演系统(正向推演 + 反向工程)现已可用。
|
|
92
87
|
|
|
93
88
|
---
|
|
94
89
|
|
|
@@ -112,20 +107,15 @@ uds skills # 列出已安装的技能
|
|
|
112
107
|
npx universal-dev-standards init
|
|
113
108
|
```
|
|
114
109
|
|
|
115
|
-
|
|
110
|
+
**特定版本**
|
|
116
111
|
```bash
|
|
117
|
-
#
|
|
118
|
-
npm install -g universal-dev-standards@
|
|
112
|
+
# 安装特定版本
|
|
113
|
+
npm install -g universal-dev-standards@4.0.0
|
|
119
114
|
|
|
120
|
-
#
|
|
121
|
-
npm install -g universal-dev-standards@
|
|
122
|
-
|
|
123
|
-
# 或通过 npx
|
|
124
|
-
npx universal-dev-standards@beta init
|
|
115
|
+
# 或安装 beta 版以获得即将推出的功能
|
|
116
|
+
npm install -g universal-dev-standards@beta
|
|
125
117
|
```
|
|
126
118
|
|
|
127
|
-
> **注意**:Beta 版本包含实验性功能,例如方法论系统(`/methodology`、`/bdd`)。详见[功能可用性](#功能可用性)。
|
|
128
|
-
|
|
129
119
|
**克隆并链接(开发用)**
|
|
130
120
|
|
|
131
121
|
macOS / Linux:
|
|
@@ -168,7 +158,7 @@ cd universal-dev-standards\cli; npm install; npm link
|
|
|
168
158
|
|
|
169
159
|
Agent Skills 是增强 AI 辅助开发的交互式命令(`/commit`、`/tdd`、`/review` 等)。Skills 遵循 [Agent Skills 标准](https://agentskills.io),可跨多个 AI 工具使用。
|
|
170
160
|
|
|
171
|
-
**包含的技能(
|
|
161
|
+
**包含的技能(23 个):** ai-collaboration-standards、atdd-assistant、bdd-assistant、changelog-guide、checkin-assistant、code-review-assistant、commands、commit-standards、documentation-guide、error-code-guide、forward-derivation、git-workflow-guide、logging-guide、methodology-system、project-structure-guide、refactoring-assistant、release-standards、requirement-assistant、reverse-engineer、spec-driven-dev、tdd-assistant、test-coverage-assistant、testing-guide
|
|
172
162
|
|
|
173
163
|
#### 支持的工具
|
|
174
164
|
|
|
@@ -189,7 +179,7 @@ Claude Code 用户可通过 Plugin Marketplace 最简单地安装:
|
|
|
189
179
|
**优势:**
|
|
190
180
|
- 单一命令安装
|
|
191
181
|
- 新版本发布时自动更新
|
|
192
|
-
- 所有
|
|
182
|
+
- 所有 22 个技能即时加载
|
|
193
183
|
|
|
194
184
|
**从 v3.2.x 迁移?** 如果您使用旧的 marketplace 名称:
|
|
195
185
|
|
|
@@ -284,7 +274,7 @@ Remove-Item -Recurse $env:TEMP\uds
|
|
|
284
274
|
|
|
285
275
|
```
|
|
286
276
|
universal-dev-standards/
|
|
287
|
-
├── core/ # 核心通用标准(
|
|
277
|
+
├── core/ # 核心通用标准(22 个文件)
|
|
288
278
|
├── ai/ # AI 优化标准(.ai.yaml)
|
|
289
279
|
├── options/ # 人类可读选项指南
|
|
290
280
|
├── skills/ # AI 工具技能(Claude Code 等)
|
|
@@ -576,6 +566,8 @@ cp integrations/openspec/commands/* your-project/.claude/commands/
|
|
|
576
566
|
|
|
577
567
|
| 版本 | 日期 | 亮点 |
|
|
578
568
|
|------|------|------|
|
|
569
|
+
| 4.0.0 | 2026-01-20 | 双向推演;6 个新核心标准;22 个技能 |
|
|
570
|
+
| 3.5.0 | 2026-01-15 | 多 Agent Skills;Gemini CLI TOML;i18n 支持 |
|
|
579
571
|
| 3.2.2 | 2026-01-06 | 新增 `uds skills` 命令;弃用手动安装脚本 |
|
|
580
572
|
| 3.2.0 | 2026-01-02 | Plugin Marketplace 支持;CLI 增强 |
|
|
581
573
|
| 3.0.0 | 2025-12-30 | 完整 Windows 支持;AI 优化标准;npm 发布 |
|
|
@@ -628,8 +620,11 @@ cp integrations/openspec/commands/* your-project/.claude/commands/
|
|
|
628
620
|
|
|
629
621
|
```
|
|
630
622
|
universal-dev-standards/
|
|
631
|
-
├── core/ # 核心通用标准(
|
|
623
|
+
├── core/ # 核心通用标准(22 个文件)
|
|
624
|
+
│ ├── acceptance-test-driven-development.md # ATDD 方法论
|
|
625
|
+
│ ├── ai-instruction-standards.md # AI 指令撰写指南
|
|
632
626
|
│ ├── anti-hallucination.md # AI 协作指南
|
|
627
|
+
│ ├── behavior-driven-development.md # BDD 方法论
|
|
633
628
|
│ ├── changelog-standards.md # 变更日志撰写指南
|
|
634
629
|
│ ├── checkin-standards.md # 代码签入质量门槛
|
|
635
630
|
│ ├── code-review-checklist.md # 代码审查指南
|
|
@@ -637,16 +632,19 @@ universal-dev-standards/
|
|
|
637
632
|
│ ├── documentation-structure.md # 文档组织
|
|
638
633
|
│ ├── documentation-writing-standards.md # 文档撰写指南
|
|
639
634
|
│ ├── error-code-standards.md # 错误码规范
|
|
635
|
+
│ ├── forward-derivation-standards.md # 正向推演标准
|
|
640
636
|
│ ├── git-workflow.md # Git 分支策略
|
|
641
637
|
│ ├── logging-standards.md # 日志标准
|
|
642
638
|
│ ├── project-structure.md # 项目目录规范
|
|
639
|
+
│ ├── refactoring-standards.md # 重构标准
|
|
640
|
+
│ ├── reverse-engineering-standards.md # 反向工程标准
|
|
643
641
|
│ ├── spec-driven-development.md # SDD 方法论与标准
|
|
644
642
|
│ ├── test-completeness-dimensions.md # 测试完整度维度
|
|
645
643
|
│ ├── test-driven-development.md # TDD 方法论
|
|
646
644
|
│ ├── testing-standards.md # 测试标准(UT/IT/ST/E2E)
|
|
647
645
|
│ └── versioning.md # 语义化版本控制指南
|
|
648
646
|
│
|
|
649
|
-
├── ai/ # AI
|
|
647
|
+
├── ai/ # AI 优化标准
|
|
650
648
|
│ ├── standards/ # Token 高效的 YAML 格式(约 80% 减少)
|
|
651
649
|
│ │ ├── git-workflow.ai.yaml
|
|
652
650
|
│ │ ├── commit-message.ai.yaml
|
|
@@ -664,8 +662,8 @@ universal-dev-standards/
|
|
|
664
662
|
│ ├── testing/ # 测试层级指南
|
|
665
663
|
│ └── project-structure/ # 语言特定项目结构
|
|
666
664
|
│
|
|
667
|
-
├── skills/ # AI
|
|
668
|
-
│ ├── claude-code/ # Claude Code 技能(
|
|
665
|
+
├── skills/ # AI 工具技能
|
|
666
|
+
│ ├── claude-code/ # Claude Code 技能(22 个技能)
|
|
669
667
|
│ ├── cursor/ # Cursor Rules(规划中)
|
|
670
668
|
│ ├── windsurf/ # Windsurf Rules(规划中)
|
|
671
669
|
│ ├── cline/ # Cline Rules(规划中)
|
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
---
|
|
2
2
|
source: ../../../core/testing-standards.md
|
|
3
|
-
source_version: 2.
|
|
4
|
-
translation_version: 2.
|
|
5
|
-
last_synced: 2026-01-
|
|
3
|
+
source_version: 2.2.0
|
|
4
|
+
translation_version: 2.2.0
|
|
5
|
+
last_synced: 2026-01-20
|
|
6
6
|
status: current
|
|
7
7
|
---
|
|
8
8
|
|
|
@@ -135,6 +135,95 @@ test_<method>_<condition>_<expected result>
|
|
|
135
135
|
|
|
136
136
|
---
|
|
137
137
|
|
|
138
|
+
## 测试文档结构
|
|
139
|
+
|
|
140
|
+
通过在测试目录中维护标准化的文档结构,提升测试可发现性。
|
|
141
|
+
|
|
142
|
+
### tests/README.md 必要区块
|
|
143
|
+
|
|
144
|
+
每个 `tests/` 目录应包含 README.md,并具备以下区块以提高可发现性。
|
|
145
|
+
|
|
146
|
+
#### 1. 测试总览表格
|
|
147
|
+
|
|
148
|
+
列出所有测试类型、数量、技术栈和执行环境。
|
|
149
|
+
|
|
150
|
+
```markdown
|
|
151
|
+
| 测试类型 | 数量 | 框架 | 环境 |
|
|
152
|
+
|----------|------|------|------|
|
|
153
|
+
| 单元测试 | 150 | Jest | Node.js |
|
|
154
|
+
| 集成测试 | 45 | Jest | Node.js + TestContainers |
|
|
155
|
+
| E2E 测试 | 12 | Playwright | 浏览器 |
|
|
156
|
+
```
|
|
157
|
+
|
|
158
|
+
#### 2. 当前状态区块
|
|
159
|
+
|
|
160
|
+
显示最新测试执行结果,包含清楚的通过/失败指标。
|
|
161
|
+
|
|
162
|
+
```markdown
|
|
163
|
+
## 当前状态
|
|
164
|
+
|
|
165
|
+
| 指标 | 数值 | 目标 | 状态 |
|
|
166
|
+
|------|------|------|------|
|
|
167
|
+
| 通过率 | 98.5% | ≥ 95% | ✅ |
|
|
168
|
+
| 行覆盖率 | 82% | ≥ 80% | ✅ |
|
|
169
|
+
| 分支覆盖率 | 75% | ≥ 70% | ✅ |
|
|
170
|
+
|
|
171
|
+
**最后执行**: 2026-01-20 14:30 UTC
|
|
172
|
+
**报告**: [test-report-20260120-143000.md](results/test-report-20260120-143000.md)
|
|
173
|
+
```
|
|
174
|
+
|
|
175
|
+
#### 3. 报告链接区块
|
|
176
|
+
|
|
177
|
+
包含测试报告、差距分析和覆盖率摘要的链接。
|
|
178
|
+
|
|
179
|
+
```markdown
|
|
180
|
+
## 报告
|
|
181
|
+
|
|
182
|
+
| 报告类型 | 位置 | 说明 |
|
|
183
|
+
|----------|------|------|
|
|
184
|
+
| 测试结果 | `results/` | 带时间戳的测试执行报告 |
|
|
185
|
+
| 覆盖率 | `coverage/` | 代码覆盖率报告(HTML、JSON) |
|
|
186
|
+
| 差距分析 | `docs/gap-analysis.md` | 缺失的测试覆盖率分析 |
|
|
187
|
+
```
|
|
188
|
+
|
|
189
|
+
### 测试报告命名规范
|
|
190
|
+
|
|
191
|
+
| 项目 | 规范 | 范例 |
|
|
192
|
+
|------|------|------|
|
|
193
|
+
| 报告文件名 | `test-report-YYYYMMDD-HHMMSS.md` | `test-report-20260120-143000.md` |
|
|
194
|
+
| 报告目录 | `tests/results/` | `tests/results/test-report-*.md` |
|
|
195
|
+
| 覆盖率目录 | `tests/coverage/` | `tests/coverage/lcov-report/` |
|
|
196
|
+
| 差距分析 | `tests/docs/gap-analysis.md` | - |
|
|
197
|
+
|
|
198
|
+
### 目录结构范例
|
|
199
|
+
|
|
200
|
+
```
|
|
201
|
+
tests/
|
|
202
|
+
├── README.md # 测试总览与状态
|
|
203
|
+
├── results/ # 测试执行报告
|
|
204
|
+
│ ├── test-report-20260120-143000.md
|
|
205
|
+
│ └── test-report-20260119-090000.md
|
|
206
|
+
├── coverage/ # 覆盖率报告
|
|
207
|
+
│ ├── lcov-report/
|
|
208
|
+
│ └── coverage-summary.json
|
|
209
|
+
├── docs/ # 测试文档
|
|
210
|
+
│ └── gap-analysis.md
|
|
211
|
+
├── unit/ # 单元测试
|
|
212
|
+
├── integration/ # 集成测试
|
|
213
|
+
└── e2e/ # 端对端测试
|
|
214
|
+
```
|
|
215
|
+
|
|
216
|
+
### 效益
|
|
217
|
+
|
|
218
|
+
| 效益 | 说明 |
|
|
219
|
+
|------|------|
|
|
220
|
+
| **可发现性** | 开发者可快速找到测试状态,无需全面搜索 |
|
|
221
|
+
| **透明度** | 当前质量指标一目了然 |
|
|
222
|
+
| **可追溯性** | 历史报告支援趋势分析 |
|
|
223
|
+
| **新人入门** | 新团队成员可立即理解测试结构 |
|
|
224
|
+
|
|
225
|
+
---
|
|
226
|
+
|
|
138
227
|
## 快速参考卡
|
|
139
228
|
|
|
140
229
|
### 测试类型选择
|
|
@@ -9,7 +9,7 @@ status: experimental
|
|
|
9
9
|
---
|
|
10
10
|
description: 引導行为驅动开发流程 | Guide through Behavior-Driven Development workflow
|
|
11
11
|
allowed-tools: Read, Write, Grep, Glob, Bash(npm test:*), Bash(npx:*)
|
|
12
|
-
argument-hint: [要实作的行为或場景 | behavior or scenario to implement]
|
|
12
|
+
argument-hint: "[要实作的行为或場景 | behavior or scenario to implement]"
|
|
13
13
|
status: experimental
|
|
14
14
|
---
|
|
15
15
|
|
|
@@ -14,7 +14,7 @@ status: current
|
|
|
14
14
|
|
|
15
15
|
Universal Development Standards 是一個語言無關、框架無關的文件化標準框架。它提供:
|
|
16
16
|
|
|
17
|
-
- **核心規範** (`core/`):
|
|
17
|
+
- **核心規範** (`core/`):22 個基礎開發標準
|
|
18
18
|
- **AI 技能** (`skills/`):用於 AI 輔助開發的 Claude Code 技能
|
|
19
19
|
- **CLI 工具** (`cli/`):用於採用標準的 Node.js CLI
|
|
20
20
|
- **整合** (`integrations/`):各種 AI 工具的配置
|
|
@@ -200,9 +200,9 @@ node cli\bin\uds.js init --help
|
|
|
200
200
|
|
|
201
201
|
```
|
|
202
202
|
universal-dev-standards/
|
|
203
|
-
├── core/ # 核心規範(
|
|
203
|
+
├── core/ # 核心規範(22 個檔案)
|
|
204
204
|
├── skills/ # AI 工具技能
|
|
205
|
-
│ └── claude-code/ # Claude Code 技能(
|
|
205
|
+
│ └── claude-code/ # Claude Code 技能(23 個技能)
|
|
206
206
|
├── cli/ # Node.js CLI 工具
|
|
207
207
|
│ ├── src/ # 原始碼
|
|
208
208
|
│ ├── tests/ # 測試檔案
|
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
---
|
|
2
2
|
source: ../../README.md
|
|
3
|
-
source_version:
|
|
4
|
-
translation_version:
|
|
5
|
-
last_synced: 2026-01-
|
|
3
|
+
source_version: 4.0.0
|
|
4
|
+
translation_version: 4.0.0
|
|
5
|
+
last_synced: 2026-01-20
|
|
6
6
|
status: current
|
|
7
7
|
---
|
|
8
8
|
|
|
@@ -10,28 +10,23 @@ status: current
|
|
|
10
10
|
|
|
11
11
|
> **Language**: [English](../../README.md) | 繁體中文 | [简体中文](../zh-CN/README.md)
|
|
12
12
|
|
|
13
|
-
**版本**:
|
|
14
|
-
**最後更新**: 2026-01-
|
|
13
|
+
**版本**: 4.0.0
|
|
14
|
+
**最後更新**: 2026-01-20
|
|
15
15
|
**授權**: [雙重授權](../../LICENSE) (CC BY 4.0 + MIT)
|
|
16
16
|
|
|
17
|
-
|
|
18
|
-
> 如需穩定版本:`npm install universal-dev-standards@3.4.2`
|
|
17
|
+
### 4.0.0 新功能
|
|
19
18
|
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
|
23
|
-
|
|
24
|
-
|
|
|
25
|
-
| **
|
|
26
|
-
|
|
|
27
|
-
|
|
|
28
|
-
|
|
|
29
|
-
| **方法論系統** | ❌ | ✅ 🧪 |
|
|
30
|
-
| `/methodology` 命令 | ❌ | ✅ 🧪 |
|
|
31
|
-
| `/bdd` 命令 | ❌ | ✅ 🧪 |
|
|
32
|
-
| TDD/BDD/SDD/ATDD 工作流程 | ❌ | ✅ 🧪 |
|
|
19
|
+
| 功能 | 說明 |
|
|
20
|
+
|------|------|
|
|
21
|
+
| **雙向推演** | 正向推演 + 反向工程形成完整的規格-程式碼循環 |
|
|
22
|
+
| **6 個新核心規範** | BDD、ATDD、反向工程、正向推演、AI 指令、重構 |
|
|
23
|
+
| **23 個 Skills** | 8 個新技能,包括正向推演、BDD/ATDD 助手、Commands |
|
|
24
|
+
| **24 個斜線命令** | 9 個新命令(`/derive-*`、`/reverse-*`、`/atdd`、`/bdd`)|
|
|
25
|
+
| **每工具安裝層級** | Skills/Commands 支援每個 AI 工具的使用者或專案層級 |
|
|
26
|
+
| **增強 CLI** | Debug 旗標、拒絕功能記憶、檔案完整性追蹤 |
|
|
27
|
+
| **方法論系統** | TDD/BDD/SDD/ATDD 工作流程現已正式發布 |
|
|
33
28
|
|
|
34
|
-
>
|
|
29
|
+
> **4.0 新功能**:雙向推演帶來完整的規格-程式碼生命週期管理,包含正向推演和反向工程。
|
|
35
30
|
|
|
36
31
|
---
|
|
37
32
|
|
|
@@ -88,7 +83,7 @@ cp core/commit-message-guide.md your-project/.standards/
|
|
|
88
83
|
| Cursor | `uds init` → `.cursorrules` | ❌ 僅 Rules | - |
|
|
89
84
|
| Google Antigravity | `uds init` → `INSTRUCTIONS.md` | - | - |
|
|
90
85
|
|
|
91
|
-
> **
|
|
86
|
+
> **v4.0.0 新功能**:`uds init` 支援每工具安裝層級選擇(使用者或專案層級)。雙向推演系統(正向推演 + 反向工程)現已可用。
|
|
92
87
|
|
|
93
88
|
---
|
|
94
89
|
|
|
@@ -112,20 +107,15 @@ uds skills # 列出已安裝的技能
|
|
|
112
107
|
npx universal-dev-standards init
|
|
113
108
|
```
|
|
114
109
|
|
|
115
|
-
|
|
110
|
+
**特定版本**
|
|
116
111
|
```bash
|
|
117
|
-
#
|
|
118
|
-
npm install -g universal-dev-standards@
|
|
112
|
+
# 安裝特定版本
|
|
113
|
+
npm install -g universal-dev-standards@4.0.0
|
|
119
114
|
|
|
120
|
-
#
|
|
121
|
-
npm install -g universal-dev-standards@
|
|
122
|
-
|
|
123
|
-
# 或透過 npx
|
|
124
|
-
npx universal-dev-standards@beta init
|
|
115
|
+
# 或安裝 beta 版以獲得即將推出的功能
|
|
116
|
+
npm install -g universal-dev-standards@beta
|
|
125
117
|
```
|
|
126
118
|
|
|
127
|
-
> **注意**:Beta 版本包含實驗性功能,例如方法論系統(`/methodology`、`/bdd`)。詳見[功能可用性](#功能可用性)。
|
|
128
|
-
|
|
129
119
|
**克隆並連結(開發用)**
|
|
130
120
|
|
|
131
121
|
macOS / Linux:
|
|
@@ -168,7 +158,7 @@ cd universal-dev-standards\cli; npm install; npm link
|
|
|
168
158
|
|
|
169
159
|
Agent Skills 是增強 AI 輔助開發的互動式指令(`/commit`、`/tdd`、`/review` 等)。Skills 遵循 [Agent Skills 標準](https://agentskills.io),可跨多個 AI 工具使用。
|
|
170
160
|
|
|
171
|
-
**包含的技能(
|
|
161
|
+
**包含的技能(23 個):** ai-collaboration-standards、atdd-assistant、bdd-assistant、changelog-guide、checkin-assistant、code-review-assistant、commands、commit-standards、documentation-guide、error-code-guide、forward-derivation、git-workflow-guide、logging-guide、methodology-system、project-structure-guide、refactoring-assistant、release-standards、requirement-assistant、reverse-engineer、spec-driven-dev、tdd-assistant、test-coverage-assistant、testing-guide
|
|
172
162
|
|
|
173
163
|
#### 支援的工具
|
|
174
164
|
|
|
@@ -189,7 +179,7 @@ Claude Code 用戶可透過 Plugin Marketplace 最簡單地安裝:
|
|
|
189
179
|
**優點:**
|
|
190
180
|
- 單一指令安裝
|
|
191
181
|
- 新版本發布時自動更新
|
|
192
|
-
- 所有
|
|
182
|
+
- 所有 22 個技能立即載入
|
|
193
183
|
|
|
194
184
|
**從 v3.2.x 遷移?** 如果您使用舊的 marketplace 名稱:
|
|
195
185
|
|
|
@@ -284,7 +274,7 @@ Remove-Item -Recurse $env:TEMP\uds
|
|
|
284
274
|
|
|
285
275
|
```
|
|
286
276
|
universal-dev-standards/
|
|
287
|
-
├── core/ # 核心通用標準(
|
|
277
|
+
├── core/ # 核心通用標準(22 個檔案)
|
|
288
278
|
├── ai/ # AI 優化標準(.ai.yaml)
|
|
289
279
|
├── options/ # 人類可讀選項指南
|
|
290
280
|
├── skills/ # AI 工具技能(Claude Code 等)
|
|
@@ -556,6 +546,8 @@ cp integrations/openspec/commands/* your-project/.claude/commands/
|
|
|
556
546
|
|
|
557
547
|
| 版本 | 日期 | 重點 |
|
|
558
548
|
|------|------|------|
|
|
549
|
+
| 4.0.0 | 2026-01-20 | 雙向推演;6 個新核心規範;22 個技能 |
|
|
550
|
+
| 3.5.0 | 2026-01-15 | 多 Agent Skills;Gemini CLI TOML;i18n 支援 |
|
|
559
551
|
| 3.2.2 | 2026-01-06 | 新增 `uds skills` 指令;棄用手動安裝腳本 |
|
|
560
552
|
| 3.2.0 | 2026-01-02 | Plugin Marketplace 支援;CLI 增強 |
|
|
561
553
|
| 3.0.0 | 2025-12-30 | 完整 Windows 支援;AI 優化標準;npm 發布 |
|
|
@@ -608,8 +600,11 @@ cp integrations/openspec/commands/* your-project/.claude/commands/
|
|
|
608
600
|
|
|
609
601
|
```
|
|
610
602
|
universal-dev-standards/
|
|
611
|
-
├── core/ # 核心通用標準(
|
|
603
|
+
├── core/ # 核心通用標準(22 個檔案)
|
|
604
|
+
│ ├── acceptance-test-driven-development.md # ATDD 方法論
|
|
605
|
+
│ ├── ai-instruction-standards.md # AI 指令撰寫指南
|
|
612
606
|
│ ├── anti-hallucination.md # AI 協作指南
|
|
607
|
+
│ ├── behavior-driven-development.md # BDD 方法論
|
|
613
608
|
│ ├── changelog-standards.md # 變更日誌撰寫指南
|
|
614
609
|
│ ├── checkin-standards.md # 程式碼簽入品質門檻
|
|
615
610
|
│ ├── code-review-checklist.md # 程式碼審查指南
|
|
@@ -617,16 +612,19 @@ universal-dev-standards/
|
|
|
617
612
|
│ ├── documentation-structure.md # 文件組織
|
|
618
613
|
│ ├── documentation-writing-standards.md # 文件撰寫指南
|
|
619
614
|
│ ├── error-code-standards.md # 錯誤碼規範
|
|
615
|
+
│ ├── forward-derivation-standards.md # 正向推演標準
|
|
620
616
|
│ ├── git-workflow.md # Git 分支策略
|
|
621
617
|
│ ├── logging-standards.md # 日誌標準
|
|
622
618
|
│ ├── project-structure.md # 專案目錄規範
|
|
619
|
+
│ ├── refactoring-standards.md # 重構標準
|
|
620
|
+
│ ├── reverse-engineering-standards.md # 反向工程標準
|
|
623
621
|
│ ├── spec-driven-development.md # SDD 方法論與標準
|
|
624
622
|
│ ├── test-completeness-dimensions.md # 測試完整度維度
|
|
625
623
|
│ ├── test-driven-development.md # TDD 方法論
|
|
626
624
|
│ ├── testing-standards.md # 測試標準(UT/IT/ST/E2E)
|
|
627
625
|
│ └── versioning.md # 語意化版本控制指南
|
|
628
626
|
│
|
|
629
|
-
├── ai/ # AI
|
|
627
|
+
├── ai/ # AI 優化標準
|
|
630
628
|
│ ├── standards/ # Token 高效 YAML 格式(減少約 80%)
|
|
631
629
|
│ │ ├── git-workflow.ai.yaml
|
|
632
630
|
│ │ ├── commit-message.ai.yaml
|
|
@@ -644,8 +642,8 @@ universal-dev-standards/
|
|
|
644
642
|
│ ├── testing/ # 測試層級指南
|
|
645
643
|
│ └── project-structure/ # 語言特定專案結構
|
|
646
644
|
│
|
|
647
|
-
├── skills/ # AI
|
|
648
|
-
│ ├── claude-code/ # Claude Code Skills(
|
|
645
|
+
├── skills/ # AI 工具技能
|
|
646
|
+
│ ├── claude-code/ # Claude Code Skills(22 個技能)
|
|
649
647
|
│ ├── cursor/ # Cursor Rules(規劃中)
|
|
650
648
|
│ ├── windsurf/ # Windsurf Rules(規劃中)
|
|
651
649
|
│ ├── cline/ # Cline Rules(規劃中)
|