universal-dev-standards 5.1.1 → 5.3.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/ai/options/push/single-owner-mode.ai.yaml +60 -0
- package/bundled/ai/options/push/team-mode.ai.yaml +64 -0
- package/bundled/ai/options/release/publish-mode-github-actions.ai.yaml +65 -0
- package/bundled/ai/standards/agent-behavior-discipline.ai.yaml +142 -0
- package/bundled/ai/standards/cd-deployment-strategies.ai.yaml +73 -0
- package/bundled/ai/standards/no-cicd-deployment.ai.yaml +134 -0
- package/bundled/ai/standards/pipeline-security-gates.ai.yaml +71 -0
- package/bundled/ai/standards/push-standards.ai.yaml +105 -0
- package/bundled/ai/standards/rollback-standards.ai.yaml +68 -0
- package/bundled/core/agent-behavior-discipline.md +178 -0
- package/bundled/core/cd-deployment-strategies.md +121 -0
- package/bundled/core/no-cicd-deployment.md +205 -0
- package/bundled/core/pipeline-security-gates.md +109 -0
- package/bundled/core/rollback-standards.md +104 -0
- package/bundled/core/versioning.md +1 -1
- package/bundled/locales/zh-CN/CHANGELOG.md +34 -3
- package/bundled/locales/zh-CN/README.md +54 -7
- package/bundled/locales/zh-CN/SECURITY.md +8 -0
- package/bundled/locales/zh-CN/core/ai-friendly-architecture.md +8 -0
- package/bundled/locales/zh-CN/core/workflow-enforcement.md +8 -0
- package/bundled/locales/zh-CN/docs/CHEATSHEET.md +8 -0
- package/bundled/locales/zh-CN/docs/CLI-FLOW.md +8 -0
- package/bundled/locales/zh-CN/docs/FEATURE-REFERENCE.md +8 -0
- package/bundled/locales/zh-CN/docs/STANDARDS-REFERENCE.md +8 -0
- package/bundled/locales/zh-CN/skills/commands/requirement.md +8 -0
- package/bundled/locales/zh-CN/skills/commands/reverse-bdd.md +8 -0
- package/bundled/locales/zh-CN/skills/commands/reverse-sdd.md +8 -0
- package/bundled/locales/zh-CN/skills/commands/reverse-tdd.md +8 -0
- package/bundled/locales/zh-CN/skills/commands/reverse.md +8 -0
- package/bundled/locales/zh-CN/skills/commands/review.md +8 -0
- package/bundled/locales/zh-CN/skills/commands/sdd-retro.md +8 -0
- package/bundled/locales/zh-CN/skills/commands/sdd.md +8 -0
- package/bundled/locales/zh-CN/skills/commands/tdd.md +8 -0
- package/bundled/locales/zh-CN/skills/commands/update.md +8 -0
- package/bundled/locales/zh-TW/CHANGELOG.md +34 -3
- package/bundled/locales/zh-TW/MAINTENANCE.md +17 -6
- package/bundled/locales/zh-TW/README.md +53 -6
- package/bundled/locales/zh-TW/SECURITY.md +8 -0
- package/bundled/locales/zh-TW/adoption/STATIC-DYNAMIC-GUIDE.md +1 -1
- package/bundled/locales/zh-TW/core/ai-friendly-architecture.md +8 -0
- package/bundled/locales/zh-TW/core/anti-hallucination.md +8 -0
- package/bundled/locales/zh-TW/core/git-workflow.md +8 -0
- package/bundled/locales/zh-TW/core/refactoring-standards.md +8 -0
- package/bundled/locales/zh-TW/core/spec-driven-development.md +8 -0
- package/bundled/locales/zh-TW/core/structured-task-definition.md +8 -0
- package/bundled/locales/zh-TW/core/test-driven-development.md +8 -0
- package/bundled/locales/zh-TW/core/versioning.md +1 -1
- package/bundled/locales/zh-TW/core/workflow-enforcement.md +8 -0
- package/bundled/locales/zh-TW/core/workflow-state-protocol.md +8 -0
- package/bundled/locales/zh-TW/docs/CHEATSHEET.md +8 -0
- package/bundled/locales/zh-TW/docs/CLI-FLOW.md +8 -0
- package/bundled/locales/zh-TW/docs/FEATURE-REFERENCE.md +8 -0
- package/bundled/locales/zh-TW/docs/MIGRATION-V5.md +8 -0
- package/bundled/locales/zh-TW/docs/STANDARDS-REFERENCE.md +8 -0
- package/bundled/locales/zh-TW/integrations/claude-code/README.md +8 -0
- package/bundled/locales/zh-TW/skills/deploy-assistant/SKILL.md +178 -0
- package/bundled/skills/deploy-assistant/SKILL.md +183 -0
- package/bundled/skills/push/SKILL.md +203 -0
- package/package.json +1 -1
- package/src/config/ai-agent-paths.js +0 -1
- package/standards-registry.json +71 -4
- package/bundled/locales/zh-CN/docs/AI-AGENT-ROADMAP.md +0 -410
- package/bundled/locales/zh-CN/docs/OPERATION-WORKFLOW.md +0 -1074
- package/bundled/locales/zh-TW/docs/AI-AGENT-ROADMAP.md +0 -410
- package/bundled/locales/zh-TW/docs/OPERATION-WORKFLOW.md +0 -1074
|
@@ -0,0 +1,109 @@
|
|
|
1
|
+
# Pipeline Security Gates(CI Pipeline 安全檢查點)
|
|
2
|
+
|
|
3
|
+
## 概述
|
|
4
|
+
|
|
5
|
+
本標準定義嵌入 CI pipeline 各階段的安全檢查點,涵蓋 SAST、DAST、SCA(含 SBOM)和機密掃描,並明確規定各類發現的阻斷(Block)、警告(Warn)、記錄(Log)行為。
|
|
6
|
+
|
|
7
|
+
---
|
|
8
|
+
|
|
9
|
+
## 核心原則
|
|
10
|
+
|
|
11
|
+
- **機密掃描在 pre-commit**:所有包含機密的提交都必須被阻擋,不得例外
|
|
12
|
+
- **SAST 在建置後**:Critical 和 High 等級發現阻斷 pipeline
|
|
13
|
+
- **SCA + SBOM 在封包階段**:追蹤相依套件風險並產生物料清單
|
|
14
|
+
- **DAST 在 staging 部署後**:對運行中的應用進行動態掃描
|
|
15
|
+
- **安全閘門失敗 = pipeline 失敗**:不得視為可忽略的警告
|
|
16
|
+
- **任何繞過都需審計軌跡**:禁止靜默跳過安全閘門
|
|
17
|
+
|
|
18
|
+
---
|
|
19
|
+
|
|
20
|
+
## 安全閘門位置與配置
|
|
21
|
+
|
|
22
|
+
### 1. Pre-Commit — 機密掃描
|
|
23
|
+
|
|
24
|
+
| 項目 | 說明 |
|
|
25
|
+
|------|------|
|
|
26
|
+
| 掃描範圍 | 所有 staged 檔案 |
|
|
27
|
+
| 推薦工具 | gitleaks、trufflehog、detect-secrets |
|
|
28
|
+
| 阻斷條件 | 任何機密模式匹配 |
|
|
29
|
+
| 可跳過 | 否(`never_skip: true`) |
|
|
30
|
+
|
|
31
|
+
**重要**:此閘門必須在程式碼進入版本控制前執行,一旦機密進入 git 歷史便需要完整的機密輪換程序。
|
|
32
|
+
|
|
33
|
+
---
|
|
34
|
+
|
|
35
|
+
### 2. Post-Build — SAST(靜態應用安全測試)
|
|
36
|
+
|
|
37
|
+
| 項目 | 說明 |
|
|
38
|
+
|------|------|
|
|
39
|
+
| 掃描範圍 | 原始碼 + 建置產出物 |
|
|
40
|
+
| 推薦工具 | semgrep、codeql、sonarqube |
|
|
41
|
+
| 阻斷條件 | Critical、High |
|
|
42
|
+
| 警告條件 | Medium |
|
|
43
|
+
| 僅記錄 | Low、Info |
|
|
44
|
+
|
|
45
|
+
---
|
|
46
|
+
|
|
47
|
+
### 3. Package Stage — SCA + SBOM
|
|
48
|
+
|
|
49
|
+
| 項目 | 說明 |
|
|
50
|
+
|------|------|
|
|
51
|
+
| 掃描範圍 | 相依套件 + 容器映像 |
|
|
52
|
+
| 推薦工具 | trivy、syft、grype、dependabot |
|
|
53
|
+
| 阻斷條件 | Critical CVE(有可用修復版本) |
|
|
54
|
+
| 警告條件 | High CVE、過時相依套件 |
|
|
55
|
+
| SBOM 格式 | SPDX、CycloneDX |
|
|
56
|
+
|
|
57
|
+
**SBOM 用途**:上傳至 dependency-track 或 grype-db 進行持續監控。
|
|
58
|
+
|
|
59
|
+
---
|
|
60
|
+
|
|
61
|
+
### 4. Post-Staging Deploy — DAST(動態應用安全測試)
|
|
62
|
+
|
|
63
|
+
| 項目 | 說明 |
|
|
64
|
+
|------|------|
|
|
65
|
+
| 掃描範圍 | 運行中的 staging 應用程式 |
|
|
66
|
+
| 推薦工具 | ZAP、nuclei、BurpSuite Enterprise |
|
|
67
|
+
| 阻斷條件 | Critical |
|
|
68
|
+
| 需審核批准 | High |
|
|
69
|
+
| 警告條件 | Medium |
|
|
70
|
+
|
|
71
|
+
---
|
|
72
|
+
|
|
73
|
+
## 嚴重性回應矩陣
|
|
74
|
+
|
|
75
|
+
| 嚴重性 | 動作 | 通知對象 | SLA |
|
|
76
|
+
|--------|------|---------|-----|
|
|
77
|
+
| Critical | 阻斷 pipeline | 資安團隊 | 立即 |
|
|
78
|
+
| High | 阻斷 pipeline | 團隊主管 | 當日 |
|
|
79
|
+
| Medium | 警告 + 需審核批准 | 開發者 | 下個 Sprint |
|
|
80
|
+
| Low | 僅記錄 | 無 | Backlog |
|
|
81
|
+
|
|
82
|
+
---
|
|
83
|
+
|
|
84
|
+
## 繞過政策
|
|
85
|
+
|
|
86
|
+
**預設禁止繞過**。
|
|
87
|
+
|
|
88
|
+
若有特殊情況:
|
|
89
|
+
- **例外流程**:需書面資安審核 + 審計日誌記錄
|
|
90
|
+
- **緊急繞過**:時效性令牌(time-limited token)+ 強制事後審查
|
|
91
|
+
|
|
92
|
+
---
|
|
93
|
+
|
|
94
|
+
## 整合點
|
|
95
|
+
|
|
96
|
+
| 整合項目 | 說明 |
|
|
97
|
+
|---------|------|
|
|
98
|
+
| 機密管理 | 整合 HashiCorp Vault 或 AWS Secrets Manager 進行機密注入 |
|
|
99
|
+
| SBOM 註冊表 | 上傳 SBOM 至 dependency-track 或 grype-db 持續監控 |
|
|
100
|
+
| 事故回應 | Critical 發現自動建立事故單 |
|
|
101
|
+
|
|
102
|
+
---
|
|
103
|
+
|
|
104
|
+
## 相關標準
|
|
105
|
+
|
|
106
|
+
- [security-standards.md](security-standards.md) — 應用安全基礎標準
|
|
107
|
+
- [pipeline-integration-standards.md](pipeline-integration-standards.md) — CI 管線整合標準
|
|
108
|
+
- [deployment-standards.md](deployment-standards.md) — 部署基礎原則
|
|
109
|
+
- AI 格式:[../ai/standards/pipeline-security-gates.ai.yaml](../ai/standards/pipeline-security-gates.ai.yaml)
|
|
@@ -0,0 +1,104 @@
|
|
|
1
|
+
# Rollback Standards(回滾標準)
|
|
2
|
+
|
|
3
|
+
## 概述
|
|
4
|
+
|
|
5
|
+
本標準定義回滾觸發條件矩陣、自動 vs 手動回滾決策流程,以及與錯誤預算的整合方式。確保每一次部署都有明確、可量化的回滾策略,而非依賴主觀判斷。
|
|
6
|
+
|
|
7
|
+
---
|
|
8
|
+
|
|
9
|
+
## 核心原則
|
|
10
|
+
|
|
11
|
+
- **可量化觸發條件**:回滾觸發必須有明確的數值門檻,絕不使用「看起來有問題」等主觀描述
|
|
12
|
+
- **三層決策模型**:自動回滾(Auto)→ 輔助回滾(Assisted)→ 手動回滾(Manual)
|
|
13
|
+
- **錯誤預算整合**:當錯誤預算低於 10% 時,自動將輔助回滾升級為自動回滾
|
|
14
|
+
- **強制事件記錄**:每次回滾都必須寫入部署日誌並觸發事故回應流程
|
|
15
|
+
|
|
16
|
+
---
|
|
17
|
+
|
|
18
|
+
## 觸發條件矩陣
|
|
19
|
+
|
|
20
|
+
### 自動回滾(Auto-Rollback)
|
|
21
|
+
|
|
22
|
+
系統自動執行,無需人工干預:
|
|
23
|
+
|
|
24
|
+
| 指標 | 觸發門檻 |
|
|
25
|
+
|------|---------|
|
|
26
|
+
| 錯誤率 | > 2× 基線,持續 5 分鐘 |
|
|
27
|
+
| 健康檢查失敗 | 連續 3 次 |
|
|
28
|
+
| P99 延遲 | > 5× 基線,持續 3 分鐘 |
|
|
29
|
+
|
|
30
|
+
### 輔助回滾(Assisted-Rollback)
|
|
31
|
+
|
|
32
|
+
系統發出警報,由值班工程師確認後執行:
|
|
33
|
+
|
|
34
|
+
| 條件 | 說明 |
|
|
35
|
+
|------|------|
|
|
36
|
+
| SLO 違反 | 非關鍵路徑的 SLO 違反 |
|
|
37
|
+
| 錯誤預算剩餘 | < 10%(此時升級為自動回滾) |
|
|
38
|
+
|
|
39
|
+
### 手動回滾(Manual-Rollback)
|
|
40
|
+
|
|
41
|
+
由開發者評估後決定是否執行:
|
|
42
|
+
|
|
43
|
+
| 條件 | 說明 |
|
|
44
|
+
|------|------|
|
|
45
|
+
| 延遲惡化 | 仍在 SLO 範圍內的效能下降 |
|
|
46
|
+
| 外觀問題 | 使用者可見但不影響功能的問題 |
|
|
47
|
+
|
|
48
|
+
---
|
|
49
|
+
|
|
50
|
+
## 嚴重性矩陣
|
|
51
|
+
|
|
52
|
+
| 等級 | 觸發方式 | 處理時限 | 通知對象 |
|
|
53
|
+
|------|---------|---------|---------|
|
|
54
|
+
| P0 | 自動 | < 2 分鐘 | 全體相關人員 |
|
|
55
|
+
| P1 | 自動 | < 5 分鐘 | 值班工程師 |
|
|
56
|
+
| P2 | 輔助 | < 15 分鐘 | 團隊主管 |
|
|
57
|
+
| P3 | 手動 | < 1 小時 | 開發者 |
|
|
58
|
+
|
|
59
|
+
---
|
|
60
|
+
|
|
61
|
+
## 錯誤預算整合
|
|
62
|
+
|
|
63
|
+
當錯誤預算剩餘 < 10% 時:
|
|
64
|
+
|
|
65
|
+
1. 輔助回滾自動升級為自動回滾
|
|
66
|
+
2. 觸發事故事件記錄
|
|
67
|
+
3. 暫停後續部署,直到預算恢復
|
|
68
|
+
|
|
69
|
+
---
|
|
70
|
+
|
|
71
|
+
## 回滾方法比較
|
|
72
|
+
|
|
73
|
+
| 方法 | 執行時間 | 風險 | 前置條件 |
|
|
74
|
+
|------|---------|------|---------|
|
|
75
|
+
| Blue-Green 切換 | < 30 秒 | 低 | 雙環境基礎設施 |
|
|
76
|
+
| Feature Flag 關閉 | < 5 秒 | 極低 | Feature Flag 系統 |
|
|
77
|
+
| DNS 切換 | 60-120 秒 | 中 | 多區域設定 |
|
|
78
|
+
| 程式碼 Revert | 數分鐘 | 中 | 乾淨的 git 歷史 |
|
|
79
|
+
| 資料庫還原 | 數小時 | 高 | 已驗證的備份 |
|
|
80
|
+
|
|
81
|
+
---
|
|
82
|
+
|
|
83
|
+
## 回滾前後檢查清單
|
|
84
|
+
|
|
85
|
+
### 回滾前(Pre-Rollback)
|
|
86
|
+
|
|
87
|
+
- [ ] 確認回滾目標版本是健康的
|
|
88
|
+
- [ ] 確認資料庫遷移向後相容
|
|
89
|
+
- [ ] 通知相關利害關係人
|
|
90
|
+
|
|
91
|
+
### 回滾後(Post-Rollback)
|
|
92
|
+
|
|
93
|
+
- [ ] 確認健康檢查在目標版本通過
|
|
94
|
+
- [ ] 將回滾事件寫入部署日誌
|
|
95
|
+
- [ ] 開立事故單進行根因分析
|
|
96
|
+
- [ ] 更新錯誤預算追蹤
|
|
97
|
+
|
|
98
|
+
---
|
|
99
|
+
|
|
100
|
+
## 相關標準
|
|
101
|
+
|
|
102
|
+
- [deployment-standards.md](deployment-standards.md) — 部署基礎策略
|
|
103
|
+
- [cd-deployment-strategies.md](cd-deployment-strategies.md) — 部署策略選用矩陣
|
|
104
|
+
- AI 格式:[../ai/standards/rollback-standards.ai.yaml](../ai/standards/rollback-standards.ai.yaml)
|
|
@@ -237,7 +237,7 @@ Directories excluded from version control will not be committed, so they should
|
|
|
237
237
|
| Category | Common Directories/Files | Reason |
|
|
238
238
|
|----------|-------------------------|--------|
|
|
239
239
|
| AI Collaboration Tools | `.claude/`, `.cursor/`, `.ai/` | Local development aids, not in version control |
|
|
240
|
-
| Development Standards | `.standards
|
|
240
|
+
| Development Standards | `.standards/` | Local standard docs, not in version control |
|
|
241
241
|
| Build Outputs | `dist/`, `build/`, `out/` | Build artifacts, not in version control |
|
|
242
242
|
| Large Data | `data/`, `datasets/` | Data files, not in version control |
|
|
243
243
|
|
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
---
|
|
2
2
|
source: ../../CHANGELOG.md
|
|
3
|
-
source_version: 5.
|
|
4
|
-
translation_version: 5.
|
|
5
|
-
last_synced: 2026-04-
|
|
3
|
+
source_version: 5.3.0
|
|
4
|
+
translation_version: 5.3.0
|
|
5
|
+
last_synced: 2026-04-26
|
|
6
6
|
status: current
|
|
7
7
|
---
|
|
8
8
|
|
|
@@ -17,6 +17,37 @@ status: current
|
|
|
17
17
|
|
|
18
18
|
## [Unreleased]
|
|
19
19
|
|
|
20
|
+
## [5.3.0] - 2026-04-26
|
|
21
|
+
|
|
22
|
+
> **次版本发布**:四个新标准 + 一个新 Skill(XSPEC-085/064)—— `no-cicd-deployment`、`rollback-standards`、`cd-deployment-strategies`、`pipeline-security-gates`,以及无 CI/CD 环境的 `/deploy` Skill。标准总数:136。
|
|
23
|
+
|
|
24
|
+
### 新增
|
|
25
|
+
- **`no-cicd-deployment.ai.yaml`**(XSPEC-085 Phase 1):无 CI/CD 平台的三层部署架构 — `set -euo pipefail` + deploy.lock + 版本 tag 强制;Smoke Test + 自动 rollback;Blue-Green 切换 <30 秒。
|
|
26
|
+
- **`rollback-standards.ai.yaml`**(XSPEC-064 Phase 1):Rollback 触发条件矩阵 — 自动(error rate >2× baseline)、辅助(SLO 违反)、手动(延迟在 SLO 内)。Error budget <10% 升级为自动。P0–P3 严重级别与 SLA。
|
|
27
|
+
- **`cd-deployment-strategies.ai.yaml`**(XSPEC-064 Phase 1):部署策略选用矩阵 — blue-green / canary / rolling / recreate 决策树(流量 × 风险 × 成本)。含无 CI/CD 兼容性说明。
|
|
28
|
+
- **`pipeline-security-gates.ai.yaml`**(XSPEC-064 Phase 1):CI 安全检查点 — pre-commit secrets 扫描、post-build SAST、post-staging DAST、package 阶段 SCA+SBOM。Critical/High 阻断 pipeline;Medium 需要审核。
|
|
29
|
+
- **`/deploy` Skill**(`skills/deploy-assistant/`,XSPEC-085 Phase 1b):无 CI/CD 交互式部署脚本生成器,含繁体中文本地化翻译。
|
|
30
|
+
|
|
31
|
+
## [5.2.0] - 2026-04-24
|
|
32
|
+
|
|
33
|
+
> **次版本发布**:三项新标准/技能(XSPEC-080/081/082)—— `/release package` 子命令、`/push` 质量守门 Skill、以及 `agent-behavior-discipline` 标准(Karpathy 四大原则:问/减/准/测)。Bundle 一致性加固。文档集中至 dev-platform。标准总数:74。
|
|
34
|
+
|
|
35
|
+
### 新增
|
|
36
|
+
- **`agent-behavior-discipline.ai.yaml`**(Trial 试验期至 2026-10-24,XSPEC-082 / DEC-048):新治理标准,系统化整合 Andrej Karpathy 提炼的四大 AI Agent 行为纪律——问(执行前揭露假设)、减(最小充分代码)、准(精准修改边界)、测(定义可验证成功标准 + 自我修正循环)。已加入 `uds-manifest.json`(第 74 个标准)及 `cli/standards-registry.json`。
|
|
37
|
+
- **`/push` Skill**(`skills/push/`,XSPEC-081):Git Push 质量守门与跨人协作护栏——受保护分支检测、force-push 护栏、pre-push gate 验证、push 审计日志、PR 集成入口。包含两个配置选项:`options/push/single-owner-mode.ai.yaml`(单人仓库简化护栏)和 `options/push/team-mode.ai.yaml`(团队全护栏,需确认)。
|
|
38
|
+
- **`/release package` 子命令**(`skills/release/`,XSPEC-080):10 种目标格式的打包指引——npm/Node.js、Python/PyPI、Go 二进制、Electron App、Homebrew(Wave 1)+ Rust/Cargo、Tauri 桌面、Docker 镜像、VS Code Extension、GitHub Release 资产(Wave 2)。检测优先设计:自动检测项目类型再套用打包步骤。
|
|
39
|
+
|
|
40
|
+
### 修正
|
|
41
|
+
- **Bundle 一致性**(XSPEC-072 Phase 2):解决 `ai/standards/` 与 `bundle/` 之间的差异——74 个标准现在全部纳入 bundle。CI 硬性失败(exit 1)于任何差异,防止静默的 bundle 落差。
|
|
42
|
+
- **i18n NO META frontmatter**(BUG-A06):补齐 36 个翻译文件缺少的 YAML frontmatter,修复翻译同步验证误报。
|
|
43
|
+
|
|
44
|
+
### 变更
|
|
45
|
+
- **文档集中化(DEC-047 Batch 2)**:UDS 规划/治理文档已迁移至 AsiaOstrich dev-platform 规划中心,不再随 UDS 发布:
|
|
46
|
+
- `docs/AI-AGENT-ROADMAP.md`、`docs/OPERATION-WORKFLOW.md`、`docs/internal/` 下四份文档已移除
|
|
47
|
+
- `locales/zh-TW/docs/`、`locales/zh-CN/docs/` 副本亦已移除
|
|
48
|
+
|
|
49
|
+
[5.2.0]: https://github.com/AsiaOstrich/universal-dev-standards/compare/v5.1.1...v5.2.0
|
|
50
|
+
|
|
20
51
|
## [5.1.1] - 2026-04-20
|
|
21
52
|
|
|
22
53
|
> **补丁版本**:Windows CI 修正、53 个 SKILL.md 补 `name` 字段、三份 `.md` 源文件依 BUG-A08 事后分析新增规则、zh-TW/zh-CN 翻译同步。
|
|
@@ -1,3 +1,11 @@
|
|
|
1
|
+
---
|
|
2
|
+
source: ../../README.md
|
|
3
|
+
source_version: 5.2.0
|
|
4
|
+
translation_version: 5.2.0
|
|
5
|
+
last_synced: 2026-04-22
|
|
6
|
+
status: current
|
|
7
|
+
---
|
|
8
|
+
|
|
1
9
|
# Universal Development Standards
|
|
2
10
|
|
|
3
11
|
[](https://www.npmjs.com/package/universal-dev-standards)
|
|
@@ -6,7 +14,7 @@
|
|
|
6
14
|
|
|
7
15
|
> **语言**: [English](../../README.md) | [繁體中文](../zh-TW/README.md) | 简体中文
|
|
8
16
|
|
|
9
|
-
**版本**: 5.
|
|
17
|
+
**版本**: 5.3.0 | **发布日期**: 2026-04-13 | **授权**: [双重授权](../../LICENSE) (CC BY 4.0 + MIT)
|
|
10
18
|
|
|
11
19
|
语言无关、框架无关的软件项目文档标准。通过 AI 原生工作流,确保不同技术栈之间的一致性、质量和可维护性。
|
|
12
20
|
|
|
@@ -55,7 +63,7 @@ npx universal-dev-standards init
|
|
|
55
63
|
<!-- UDS_STATS_TABLE_START -->
|
|
56
64
|
| 类别 | 数量 | 说明 |
|
|
57
65
|
|----------|-------|-------------|
|
|
58
|
-
| **核心标准** |
|
|
66
|
+
| **核心标准** | 78 | 通用开发准则 |
|
|
59
67
|
| **AI Skills** | 48 | 互动式技能 |
|
|
60
68
|
| **斜线命令** | 48 | 快速操作 |
|
|
61
69
|
| **CLI 命令** | 6 | list, init, configure, check, update, skills |
|
|
@@ -72,8 +80,8 @@ UDS 采用 **双层执行模型 (Dual-Layer Execution Model)**,专为高速互
|
|
|
72
80
|
```mermaid
|
|
73
81
|
graph TD
|
|
74
82
|
A[AI 助手 / 开发者] --> B{执行层}
|
|
75
|
-
B -- "日常任务" --> C[技能层 Skills (.ai.yaml)]
|
|
76
|
-
B -- "深度审查" --> D[标准层 Standards (.md)]
|
|
83
|
+
B -- "日常任务" --> C["技能层 Skills (.ai.yaml)"]
|
|
84
|
+
B -- "深度审查" --> D["标准层 Standards (.md)"]
|
|
77
85
|
|
|
78
86
|
C --> C1[Token 优化]
|
|
79
87
|
C --> C2[互动式引导]
|
|
@@ -96,14 +104,14 @@ graph TD
|
|
|
96
104
|
|
|
97
105
|
| AI 工具 | 状态 | Skills | 斜线命令 | 配置文件 |
|
|
98
106
|
| :--- | :--- | :---: | :---: | :--- |
|
|
99
|
-
| **Claude Code** | ✅ 完整支持 | **
|
|
100
|
-
| **OpenCode** | ✅ 完整支持 | **
|
|
107
|
+
| **Claude Code** | ✅ 完整支持 | **29** | **33** | `CLAUDE.md` |
|
|
108
|
+
| **OpenCode** | ✅ 完整支持 | **29** | **33** | `AGENTS.md` |
|
|
101
109
|
| **Gemini CLI** | 🧪 预览版 | **18+** | **20+** | `GEMINI.md` |
|
|
102
110
|
| **Cursor** | ✅ 完整支持 | **核心** | **模拟支持** | `.cursorrules` |
|
|
103
111
|
| **Cline / Roo Code**| 🔶 部分支持 | **核心** | **工作流** | `.clinerules` |
|
|
104
112
|
| **Windsurf** | 🔶 部分支持 | ✅ | **规则书** | `.windsurfrules` |
|
|
105
113
|
|
|
106
|
-
> **状态图例**:✅ 完整支持 | 🧪
|
|
114
|
+
> **状态图例**:✅ 完整支持 | 🧪 预览版 | 🔶 部分支持 | ⏳ 计划中
|
|
107
115
|
|
|
108
116
|
---
|
|
109
117
|
|
|
@@ -145,6 +153,28 @@ uds uninstall # 从项目移除标准
|
|
|
145
153
|
|
|
146
154
|
---
|
|
147
155
|
|
|
156
|
+
## 🌐 生态系统
|
|
157
|
+
|
|
158
|
+
UDS 是 AsiaOstrich 三层产品架构中的**标准定义层**:
|
|
159
|
+
|
|
160
|
+
```
|
|
161
|
+
UDS(定义什么) → DevAP(代理如何执行) → VibeOps(完整生命周期)
|
|
162
|
+
```
|
|
163
|
+
|
|
164
|
+
| 层级 | 产品 | 角色 | 授权 |
|
|
165
|
+
|------|------|------|------|
|
|
166
|
+
| 标准 | **UDS** | 开发方法论框架 | MIT + CC BY 4.0 |
|
|
167
|
+
| 编排 | [DevAP](https://github.com/AsiaOstrich/dev-autopilot) | 代理无关的编排引擎 | MIT |
|
|
168
|
+
| 生命周期 | [VibeOps](https://github.com/AsiaOstrich/vibeops360) | AI 驱动的软件工厂 | AGPL-3.0-only |
|
|
169
|
+
|
|
170
|
+
- **UDS** 定义开发标准 → 供 DevAP(质量 Gate)和 VibeOps(代理管线)使用
|
|
171
|
+
- **DevAP** 使用 UDS 标准编排 AI 代理 → VibeOps 是其消费者之一
|
|
172
|
+
- **VibeOps** 提供完整软件生命周期 → 通过 `uds init` 集成 UDS(一次复制)
|
|
173
|
+
|
|
174
|
+
UDS 保持**工具无关性**:支持 Claude Code、OpenCode、Gemini CLI、Cursor、Cline 和 Windsurf。DevAP 和 VibeOps 是消费者,并非必要依赖。
|
|
175
|
+
|
|
176
|
+
---
|
|
177
|
+
|
|
148
178
|
## 📄 授权
|
|
149
179
|
|
|
150
180
|
| 组件 | 授权 |
|
|
@@ -152,6 +182,23 @@ uds uninstall # 从项目移除标准
|
|
|
152
182
|
| **文档内容** | [CC BY 4.0](https://creativecommons.org/licenses/by/4.0/) |
|
|
153
183
|
| **CLI 工具** | [MIT](../../cli/LICENSE) |
|
|
154
184
|
|
|
185
|
+
## 致谢
|
|
186
|
+
|
|
187
|
+
UDS 的架构灵感来自以下杰出的开源项目:
|
|
188
|
+
|
|
189
|
+
| 项目 | 借鉴概念 | 授权 |
|
|
190
|
+
|------|---------|------|
|
|
191
|
+
| [Superpowers](https://github.com/obra/superpowers) | 系统性调试、代理调度、验证证据 | MIT |
|
|
192
|
+
| [GSD](https://github.com/gsd-build/get-shit-done) | 结构化任务定义、可追溯性矩阵、验证循环上限 | MIT |
|
|
193
|
+
| [PAUL](https://github.com/ChristopherKahler/paul) | Plan-Apply-Unify 循环、验收驱动开发 | MIT |
|
|
194
|
+
| [CARL](https://github.com/ChristopherKahler/carl) | 上下文感知加载、动态规则注入 | MIT |
|
|
195
|
+
| [CrewAI](https://github.com/crewAIInc/crewAI) | 多代理通信协议、上下文预算追踪 | MIT |
|
|
196
|
+
| [LangGraph](https://github.com/langchain-ai/langgraph) | 工作流状态协议、HITL 中断检查点 | MIT |
|
|
197
|
+
| [OpenHands](https://github.com/All-Hands-AI/OpenHands) | 事件溯源、动作-观察流模式 | MIT |
|
|
198
|
+
| [DSPy](https://github.com/stanfordnlp/dspy) | 代理签名、结构化 I/O 契约 | MIT |
|
|
199
|
+
|
|
200
|
+
> **注意**:UDS 仅借鉴概念与方法论,不包含上述项目的任何源代码。
|
|
201
|
+
|
|
155
202
|
---
|
|
156
203
|
|
|
157
204
|
**由开源社区用 ❤️ 维护**
|
|
@@ -1,3 +1,11 @@
|
|
|
1
|
+
---
|
|
2
|
+
source: ../../../docs/CLI-FLOW.md
|
|
3
|
+
source_version: 1.0.0
|
|
4
|
+
translation_version: 1.0.0
|
|
5
|
+
last_synced: 2026-04-22
|
|
6
|
+
status: current
|
|
7
|
+
---
|
|
8
|
+
|
|
1
9
|
# CLI 命令流程
|
|
2
10
|
|
|
3
11
|
> **Language**: [English](../../../docs/CLI-FLOW.md) | [繁體中文](../../zh-TW/docs/CLI-FLOW.md) | 简体中文
|
|
@@ -1,3 +1,11 @@
|
|
|
1
|
+
---
|
|
2
|
+
source: ../../../../skills/commands/requirement.md
|
|
3
|
+
source_version: 1.0.0
|
|
4
|
+
translation_version: 1.0.0
|
|
5
|
+
last_synced: 2026-04-22
|
|
6
|
+
status: current
|
|
7
|
+
---
|
|
8
|
+
|
|
1
9
|
---
|
|
2
10
|
description: [UDS] Write user stories and requirements following INVEST criteria
|
|
3
11
|
allowed-tools: Read, Write, Grep, Glob
|
|
@@ -1,3 +1,11 @@
|
|
|
1
|
+
---
|
|
2
|
+
source: ../../../../skills/commands/reverse-bdd.md
|
|
3
|
+
source_version: 1.0.0
|
|
4
|
+
translation_version: 1.0.0
|
|
5
|
+
last_synced: 2026-04-22
|
|
6
|
+
status: current
|
|
7
|
+
---
|
|
8
|
+
|
|
1
9
|
---
|
|
2
10
|
description: [UDS] Transform SDD acceptance criteria to BDD scenarios
|
|
3
11
|
allowed-tools: Read, Grep, Glob, Write
|
|
@@ -1,3 +1,11 @@
|
|
|
1
|
+
---
|
|
2
|
+
source: ../../../../skills/commands/reverse-sdd.md
|
|
3
|
+
source_version: 1.0.0
|
|
4
|
+
translation_version: 1.0.0
|
|
5
|
+
last_synced: 2026-04-22
|
|
6
|
+
status: current
|
|
7
|
+
---
|
|
8
|
+
|
|
1
9
|
---
|
|
2
10
|
description: [UDS] Reverse engineer code into SDD specification document
|
|
3
11
|
allowed-tools: Read, Grep, Glob, Write
|
|
@@ -1,3 +1,11 @@
|
|
|
1
|
+
---
|
|
2
|
+
source: ../../../../skills/commands/reverse-tdd.md
|
|
3
|
+
source_version: 1.0.0
|
|
4
|
+
translation_version: 1.0.0
|
|
5
|
+
last_synced: 2026-04-22
|
|
6
|
+
status: current
|
|
7
|
+
---
|
|
8
|
+
|
|
1
9
|
---
|
|
2
10
|
description: [UDS] Analyze BDD-TDD coverage gaps
|
|
3
11
|
allowed-tools: Read, Grep, Glob, Write
|
|
@@ -1,3 +1,11 @@
|
|
|
1
|
+
---
|
|
2
|
+
source: ../../../../skills/commands/review.md
|
|
3
|
+
source_version: 1.0.0
|
|
4
|
+
translation_version: 1.0.0
|
|
5
|
+
last_synced: 2026-04-22
|
|
6
|
+
status: current
|
|
7
|
+
---
|
|
8
|
+
|
|
1
9
|
---
|
|
2
10
|
description: [UDS] Perform systematic code review with checklist
|
|
3
11
|
allowed-tools: Read, Grep, Glob, Bash(git diff:*), Bash(git log:*), Bash(git show:*)
|
|
@@ -1,3 +1,11 @@
|
|
|
1
|
+
---
|
|
2
|
+
source: ../../../../skills/commands/sdd-retro.md
|
|
3
|
+
source_version: 1.0.0
|
|
4
|
+
translation_version: 1.0.0
|
|
5
|
+
last_synced: 2026-04-22
|
|
6
|
+
status: current
|
|
7
|
+
---
|
|
8
|
+
|
|
1
9
|
---
|
|
2
10
|
description: [UDS] Create retroactive specs for untracked feat/fix commits
|
|
3
11
|
allowed-tools: Read, Write, Grep, Glob, Bash(git log:*), Bash(git show:*), Bash(git diff:*), Bash(mkdir:*)
|
|
@@ -1,3 +1,11 @@
|
|
|
1
|
+
---
|
|
2
|
+
source: ../../../../skills/commands/sdd.md
|
|
3
|
+
source_version: 1.0.0
|
|
4
|
+
translation_version: 1.0.0
|
|
5
|
+
last_synced: 2026-04-22
|
|
6
|
+
status: current
|
|
7
|
+
---
|
|
8
|
+
|
|
1
9
|
---
|
|
2
10
|
description: [UDS] Create or review specification documents for Spec-Driven Development
|
|
3
11
|
allowed-tools: Read, Write, Grep, Glob, Bash(git:*), Bash(npm test:*)
|
|
@@ -1,3 +1,11 @@
|
|
|
1
|
+
---
|
|
2
|
+
source: ../../../../skills/commands/tdd.md
|
|
3
|
+
source_version: 1.0.0
|
|
4
|
+
translation_version: 1.0.0
|
|
5
|
+
last_synced: 2026-04-22
|
|
6
|
+
status: experimental
|
|
7
|
+
---
|
|
8
|
+
|
|
1
9
|
---
|
|
2
10
|
description: [UDS] Guide through Test-Driven Development workflow
|
|
3
11
|
allowed-tools: Read, Write, Grep, Glob, Bash(npm test:*), Bash(npx:*)
|
|
@@ -1,3 +1,11 @@
|
|
|
1
|
+
---
|
|
2
|
+
source: ../../../../skills/commands/update.md
|
|
3
|
+
source_version: 1.0.0
|
|
4
|
+
translation_version: 1.0.0
|
|
5
|
+
last_synced: 2026-04-22
|
|
6
|
+
status: current
|
|
7
|
+
---
|
|
8
|
+
|
|
1
9
|
---
|
|
2
10
|
description: [UDS] Update development standards to latest version
|
|
3
11
|
allowed-tools: Read, Bash(uds update:*), Bash(uds check:*), Bash(uds configure:*), Bash(npx:*), Bash(cat .standards/*), Bash(ls .claude/*), Bash(ls .opencode/*), Bash(ls .github/*)
|
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
---
|
|
2
2
|
source: ../../CHANGELOG.md
|
|
3
|
-
source_version: 5.
|
|
4
|
-
translation_version: 5.
|
|
5
|
-
last_synced: 2026-04-
|
|
3
|
+
source_version: 5.3.0
|
|
4
|
+
translation_version: 5.3.0
|
|
5
|
+
last_synced: 2026-04-26
|
|
6
6
|
status: current
|
|
7
7
|
---
|
|
8
8
|
|
|
@@ -17,6 +17,37 @@ status: current
|
|
|
17
17
|
|
|
18
18
|
## [Unreleased]
|
|
19
19
|
|
|
20
|
+
## [5.3.0] - 2026-04-26
|
|
21
|
+
|
|
22
|
+
> **次版本發布**:四個新標準 + 一個新 Skill(XSPEC-085/064)—— `no-cicd-deployment`、`rollback-standards`、`cd-deployment-strategies`、`pipeline-security-gates`,以及無 CI/CD 環境的 `/deploy` Skill。標準總數:136。
|
|
23
|
+
|
|
24
|
+
### 新增
|
|
25
|
+
- **`no-cicd-deployment.ai.yaml`**(XSPEC-085 Phase 1):無 CI/CD 平台的三層部署架構 — `set -euo pipefail` + deploy.lock + 版本 tag 強制;Smoke Test + 自動 rollback;Blue-Green 切換 <30 秒。
|
|
26
|
+
- **`rollback-standards.ai.yaml`**(XSPEC-064 Phase 1):Rollback 觸發條件矩陣 — 自動(error rate >2× baseline)、輔助(SLO 違反)、手動(延遲在 SLO 內)。Error budget <10% 升級為自動。P0–P3 嚴重級別與 SLA。
|
|
27
|
+
- **`cd-deployment-strategies.ai.yaml`**(XSPEC-064 Phase 1):部署策略選用矩陣 — blue-green / canary / rolling / recreate 決策樹(流量 × 風險 × 成本)。含無 CI/CD 相容性說明。
|
|
28
|
+
- **`pipeline-security-gates.ai.yaml`**(XSPEC-064 Phase 1):CI 安全檢查點 — pre-commit secrets 掃描、post-build SAST、post-staging DAST、package 階段 SCA+SBOM。Critical/High 阻擋 pipeline;Medium 需要審核。
|
|
29
|
+
- **`/deploy` Skill**(`skills/deploy-assistant/`,XSPEC-085 Phase 1b):無 CI/CD 互動式部署腳本生成器,含繁體中文本地化翻譯。
|
|
30
|
+
|
|
31
|
+
## [5.2.0] - 2026-04-24
|
|
32
|
+
|
|
33
|
+
> **次版本發布**:三項新標準/技能(XSPEC-080/081/082)—— `/release package` 子命令、`/push` 品質守門 Skill、以及 `agent-behavior-discipline` 標準(Karpathy 四大原則:問/減/準/測)。Bundle 一致性加固。文件集中至 dev-platform。標準總數:74。
|
|
34
|
+
|
|
35
|
+
### 新增
|
|
36
|
+
- **`agent-behavior-discipline.ai.yaml`**(Trial 試驗期至 2026-10-24,XSPEC-082 / DEC-048):新治理標準,系統化整合 Andrej Karpathy 提煉的四大 AI Agent 行為紀律——問(執行前揭露假設)、減(最小充分代碼)、準(精準修改邊界)、測(定義可驗證成功標準 + 自我修正循環)。已加入 `uds-manifest.json`(第 74 個標準)及 `cli/standards-registry.json`。
|
|
37
|
+
- **`/push` Skill**(`skills/push/`,XSPEC-081):Git Push 品質守門與跨人協作護欄——受保護分支偵測、force-push 護欄、pre-push gate 驗證、push 稽核日誌、PR 整合入口。包含兩個配置選項:`options/push/single-owner-mode.ai.yaml`(單人倉庫簡化護欄)和 `options/push/team-mode.ai.yaml`(團隊全護欄,需確認)。
|
|
38
|
+
- **`/release package` 子命令**(`skills/release/`,XSPEC-080):10 種目標格式的打包指引——npm/Node.js、Python/PyPI、Go 二進位、Electron App、Homebrew(Wave 1)+ Rust/Cargo、Tauri 桌面、Docker 映像、VS Code Extension、GitHub Release 資產(Wave 2)。偵測優先設計:自動偵測專案類型再套用打包步驟。
|
|
39
|
+
|
|
40
|
+
### 修正
|
|
41
|
+
- **Bundle 一致性**(XSPEC-072 Phase 2):解決 `ai/standards/` 與 `bundle/` 之間的差異——74 個標準現在全部納入 bundle。CI 硬性失敗(exit 1)於任何差異,防止靜默的 bundle 落差。
|
|
42
|
+
- **i18n NO META frontmatter**(BUG-A06):補齊 36 個翻譯檔案缺少的 YAML frontmatter,修復翻譯同步驗證誤報。
|
|
43
|
+
|
|
44
|
+
### 變更
|
|
45
|
+
- **文件集中化(DEC-047 Batch 2)**:UDS 規劃/治理文件已遷移至 AsiaOstrich dev-platform 規劃中心,不再隨 UDS 發布:
|
|
46
|
+
- `docs/AI-AGENT-ROADMAP.md`、`docs/OPERATION-WORKFLOW.md`、`docs/internal/` 下四份文件已移除
|
|
47
|
+
- `locales/zh-TW/docs/`、`locales/zh-CN/docs/` 副本亦已移除
|
|
48
|
+
|
|
49
|
+
[5.2.0]: https://github.com/AsiaOstrich/universal-dev-standards/compare/v5.1.1...v5.2.0
|
|
50
|
+
|
|
20
51
|
## [5.1.1] - 2026-04-20
|
|
21
52
|
|
|
22
53
|
> **修補版本**:Windows CI 修正、53 個 SKILL.md 補 `name` 欄位、三份 `.md` 源文件依 BUG-A08 事後分析新增規則、zh-TW/zh-CN 翻譯同步。
|