@captain_z/zsk-skills 1.2.1 → 1.4.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.
Files changed (54) hide show
  1. package/README.md +45 -21
  2. package/bundles.yaml +10 -1
  3. package/design-handoff/design-system/SKILL.md +124 -0
  4. package/design-handoff/figma-generate-hifi/SKILL.md +131 -0
  5. package/design-handoff/figma-to-code/SKILL.md +1 -0
  6. package/design-handoff/ue-mcp/SKILL.md +1 -0
  7. package/design-handoff/ux-wireframe/SKILL.md +129 -0
  8. package/frontend/a11y-web/SKILL.md +1 -0
  9. package/frontend/api-contract-ts/SKILL.md +1 -0
  10. package/frontend/design-frontend/SKILL.md +6 -0
  11. package/frontend/dor-dod-frontend/SKILL.md +1 -0
  12. package/frontend/feature-tasks-frontend/SKILL.md +2 -1
  13. package/frontend/i18n/SKILL.md +1 -0
  14. package/frontend/nfr-web/SKILL.md +1 -0
  15. package/frontend/performance-web/SKILL.md +1 -0
  16. package/frontend/react-components/SKILL.md +1 -0
  17. package/frontend/react-naming/SKILL.md +1 -0
  18. package/frontend/review-frontend/SKILL.md +1 -0
  19. package/frontend/security-web/SKILL.md +1 -0
  20. package/frontend/spec-frontend/SKILL.md +1 -0
  21. package/frontend/styling-system/SKILL.md +1 -0
  22. package/frontend/testing-web/SKILL.md +1 -0
  23. package/frontend/typescript/SKILL.md +1 -0
  24. package/meta/philosophy/SKILL.md +2 -1
  25. package/package.json +1 -1
  26. package/quality/a11y-principles/SKILL.md +1 -0
  27. package/quality/code-hygiene/SKILL.md +1 -0
  28. package/quality/release/SKILL.md +1 -0
  29. package/quality/security-owasp/SKILL.md +1 -0
  30. package/quality/testing-pyramid/SKILL.md +1 -0
  31. package/sdlc/archive/SKILL.md +1 -0
  32. package/sdlc/bugfix/SKILL.md +2 -0
  33. package/sdlc/bugfix-tasks/SKILL.md +1 -0
  34. package/sdlc/coding/SKILL.md +49 -18
  35. package/sdlc/design/SKILL.md +1 -0
  36. package/sdlc/dor-dod/SKILL.md +1 -0
  37. package/sdlc/feature/SKILL.md +21 -0
  38. package/sdlc/proposal/SKILL.md +1 -0
  39. package/sdlc/refactor/SKILL.md +2 -0
  40. package/sdlc/refactor-tasks/SKILL.md +1 -0
  41. package/sdlc/reviewing/SKILL.md +2 -1
  42. package/sdlc/spec/SKILL.md +1 -0
  43. package/sdlc/standard-dev-flow/SKILL.md +33 -32
  44. package/sdlc/task/SKILL.md +3 -2
  45. package/sdlc/task-evidence/SKILL.md +23 -0
  46. package/sdlc/task-structure/SKILL.md +1 -0
  47. package/sdlc/task-tracking/SKILL.md +37 -15
  48. package/sdlc/verify/SKILL.md +2 -0
  49. package/system/adr/SKILL.md +1 -0
  50. package/system/agent-orchestration/SKILL.md +115 -0
  51. package/system/architecture/SKILL.md +1 -0
  52. package/system/glossary/SKILL.md +1 -0
  53. package/system/nfr-baseline/SKILL.md +1 -0
  54. package/system/project-constraints-template/SKILL.md +1 -0
@@ -11,6 +11,7 @@ category: standard
11
11
  domain: frontend
12
12
  tier: optional
13
13
  related:
14
+ - ../../system/agent-orchestration/SKILL.md
14
15
  - ../react-components/SKILL.md
15
16
  - ../nfr-web/SKILL.md
16
17
  - ../../system/nfr-baseline/SKILL.md
@@ -9,6 +9,7 @@ category: standard
9
9
  domain: frontend
10
10
  tier: optional
11
11
  related:
12
+ - ../../system/agent-orchestration/SKILL.md
12
13
  - ../react-naming/SKILL.md
13
14
  - ../typescript/SKILL.md
14
15
  - ../../quality/code-hygiene/SKILL.md
@@ -8,6 +8,7 @@ category: standard
8
8
  domain: frontend
9
9
  tier: optional
10
10
  related:
11
+ - ../../system/agent-orchestration/SKILL.md
11
12
  - ../react-components/SKILL.md
12
13
  - ../typescript/SKILL.md
13
14
  - ../i18n/SKILL.md
@@ -14,6 +14,7 @@ variants:
14
14
  - bugfix
15
15
  - refactor
16
16
  related:
17
+ - ../../system/agent-orchestration/SKILL.md
17
18
  - ../../sdlc/reviewing/SKILL.md
18
19
  - ../typescript/SKILL.md
19
20
  - ../react-components/SKILL.md
@@ -11,6 +11,7 @@ category: standard
11
11
  domain: frontend
12
12
  tier: optional
13
13
  related:
14
+ - ../../system/agent-orchestration/SKILL.md
14
15
  - ../i18n/SKILL.md
15
16
  - ../../quality/security-owasp/SKILL.md
16
17
  triggers:
@@ -14,6 +14,7 @@ variants:
14
14
  - bugfix
15
15
  - refactor
16
16
  related:
17
+ - ../../system/agent-orchestration/SKILL.md
17
18
  - ../../sdlc/spec/SKILL.md
18
19
  - ../../design-handoff/ue-mcp/SKILL.md
19
20
  - ../design-frontend/SKILL.md
@@ -8,6 +8,7 @@ category: standard
8
8
  domain: frontend
9
9
  tier: optional
10
10
  related:
11
+ - ../../system/agent-orchestration/SKILL.md
11
12
  - ../react-naming/SKILL.md
12
13
  - ../../design-handoff/figma-to-code/SKILL.md
13
14
  triggers:
@@ -10,6 +10,7 @@ category: standard
10
10
  domain: frontend
11
11
  tier: optional
12
12
  related:
13
+ - ../../system/agent-orchestration/SKILL.md
13
14
  - ../react-components/SKILL.md
14
15
  - ../a11y-web/SKILL.md
15
16
  - ../api-contract-ts/SKILL.md
@@ -9,6 +9,7 @@ category: standard
9
9
  domain: frontend
10
10
  tier: optional
11
11
  related:
12
+ - ../../system/agent-orchestration/SKILL.md
12
13
  - ../react-components/SKILL.md
13
14
  - ../api-contract-ts/SKILL.md
14
15
  - ../../quality/code-hygiene/SKILL.md
@@ -8,6 +8,7 @@ domain: meta
8
8
  tier: optional
9
9
  related:
10
10
  - ../../system/project-constraints-template/SKILL.md
11
+ - ../../system/agent-orchestration/SKILL.md
11
12
  triggers:
12
13
  - zsk philosophy
13
14
  - why is zsk organized this way
@@ -141,7 +142,7 @@ Karpathy 原文是**"LLM 持续自维护的活知识库"**;本 skill set 是**
141
142
  - 修 bug 前必问三问(Superpowers 置信度质疑)
142
143
  - Review 分歧时先验证技术,再讨论情感
143
144
  - Issue / Bug 先读日志与复现事实,确认根因后再改代码
144
- - 多 Agent 只按独立问题域拆分,输入必须自包含,结论必须由主 Agent 复核
145
+ - 多 Agent 协作是全局执行协议:按独立问题域自动分配 Sub-Agent,输入必须自包含,职责必须清晰,结论必须由主 Agent 复核(见 [`zsk:agent-orchestration`](../../system/agent-orchestration/SKILL.md))
145
146
 
146
147
  ### 原则 5:编号化交叉引用
147
148
 
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@captain_z/zsk-skills",
3
- "version": "1.2.1",
3
+ "version": "1.4.0",
4
4
  "description": "ZNorth Standard Kit — skill content package (SDLC + frontend + quality + design-handoff + system + meta)",
5
5
  "license": "MIT",
6
6
  "files": [
@@ -9,6 +9,7 @@ category: standard
9
9
  domain: quality
10
10
  tier: optional
11
11
  related:
12
+ - ../../system/agent-orchestration/SKILL.md
12
13
  - ../../system/nfr-baseline/SKILL.md
13
14
  - ../../frontend/a11y-web/SKILL.md
14
15
  triggers:
@@ -8,6 +8,7 @@ category: standard
8
8
  domain: quality
9
9
  tier: optional
10
10
  related:
11
+ - ../../system/agent-orchestration/SKILL.md
11
12
  - ../../sdlc/coding/SKILL.md
12
13
  - ../../sdlc/reviewing/SKILL.md
13
14
  - ../../frontend/typescript/SKILL.md
@@ -9,6 +9,7 @@ category: standard
9
9
  domain: quality
10
10
  tier: optional
11
11
  related:
12
+ - ../../system/agent-orchestration/SKILL.md
12
13
  - ../../sdlc/archive/SKILL.md
13
14
  - ../../sdlc/bugfix/SKILL.md
14
15
  triggers:
@@ -9,6 +9,7 @@ category: standard
9
9
  domain: quality
10
10
  tier: optional
11
11
  related:
12
+ - ../../system/agent-orchestration/SKILL.md
12
13
  - ../../sdlc/coding/SKILL.md
13
14
  - ../../sdlc/reviewing/SKILL.md
14
15
  - ../../frontend/security-web/SKILL.md
@@ -9,6 +9,7 @@ category: standard
9
9
  domain: quality
10
10
  tier: optional
11
11
  related:
12
+ - ../../system/agent-orchestration/SKILL.md
12
13
  - ../../sdlc/coding/SKILL.md
13
14
  - ../../sdlc/verify/SKILL.md
14
15
  - ../../sdlc/dor-dod/SKILL.md
@@ -14,6 +14,7 @@ variants:
14
14
  - bugfix
15
15
  - refactor
16
16
  related:
17
+ - ../../system/agent-orchestration/SKILL.md
17
18
  - ../verify/SKILL.md
18
19
  - ../proposal/SKILL.md
19
20
  - ../../system/adr/SKILL.md
@@ -15,6 +15,7 @@ related:
15
15
  - ../coding/SKILL.md
16
16
  - ../bugfix-tasks/SKILL.md
17
17
  - ../archive/SKILL.md
18
+ - ../../system/agent-orchestration/SKILL.md
18
19
  - ../../quality/release/SKILL.md
19
20
  triggers:
20
21
  - bug fix workflow
@@ -31,6 +32,7 @@ triggers:
31
32
  > **定位**:在 7 阶段基础上,针对"**修复已存在的错误行为**"编排工作流
32
33
  > **阶段映射**:proposal(Bug 报告)→ spec(Expected vs Actual)→ design(RCA + 修复)→ coding(TDD 红绿)→ reviewing(审 RCA 与回归)→ verify(证据链)→ archive(Postmortem)
33
34
  > **吸收硬原则**:Bug 置信度质疑(Superpowers `systematic-debugging`)
35
+ > **自动化**:启动本工作流后,Agent 按 [`zsk:agent-orchestration`](../../system/agent-orchestration/SKILL.md) 自动分配 RCA / 修复 / 回归 / Verify 角色,并按任务组完成后验证与 Review。
34
36
 
35
37
  ## 核心纪律
36
38
 
@@ -10,6 +10,7 @@ domain: sdlc
10
10
  tier: core
11
11
  change_type: bugfix
12
12
  related:
13
+ - ../../system/agent-orchestration/SKILL.md
13
14
  - ../bugfix/SKILL.md
14
15
  - ../dor-dod/SKILL.md
15
16
  - ../task-evidence/SKILL.md
@@ -1,9 +1,9 @@
1
1
  ---
2
2
  name: zsk:coding
3
3
  description: Implementation execution after design freeze — smallest viable
4
- change, task-by-task delivery, test-first where risk is high, continuous
5
- evidence capture, and local quality gates before review. Stage 4 of the
6
- 7-stage SDLC.
4
+ change, auditable delivery batches, explicit TDD rules by change type,
5
+ continuous evidence capture, and local quality gates before review. Stage 4 of
6
+ the 7-stage SDLC.
7
7
  category: stage
8
8
  domain: sdlc
9
9
  tier: core
@@ -15,16 +15,18 @@ variants:
15
15
  related:
16
16
  - ../design/SKILL.md
17
17
  - ../reviewing/SKILL.md
18
+ - ../verify/SKILL.md
18
19
  - ../dor-dod/SKILL.md
19
20
  - ../task/SKILL.md
20
21
  - ../task-structure/SKILL.md
21
22
  - ../task-evidence/SKILL.md
23
+ - ../../system/agent-orchestration/SKILL.md
22
24
  - ../../quality/testing-pyramid/SKILL.md
23
25
  - ../../quality/code-hygiene/SKILL.md
24
26
  - ../../system/project-constraints-template/SKILL.md
25
27
  triggers:
26
28
  - implementing design
27
- - task by task delivery
29
+ - auditable delivery batches
28
30
  - local quality gates
29
31
  - smallest viable change
30
32
  - test first
@@ -38,6 +40,7 @@ triggers:
38
40
  > **回答的问题**:按什么顺序实现、如何控制改动、何时可以提交评审
39
41
  > **不回答的问题**:需求边界是否成立(看 `spec`)、方案是否合理(看 `design`)、是否满足契约(看 `verify`)
40
42
  > **项目/框架约束放哪里**:仓库结构、提交规范、分支规则、必用封装、禁用模式都来自 `SYSTEM-SPEC.md`、`project-config.md` 或 [`zsk:project-constraints-template`](../../system/project-constraints-template/SKILL.md)
43
+ > **多 Agent 协议**:任务组可拆成独立问题域时,按 [`zsk:agent-orchestration`](../../system/agent-orchestration/SKILL.md) 自动分配 Explorer / Worker / Reviewer / Verifier。
41
44
 
42
45
  ## 阶段职责
43
46
 
@@ -51,9 +54,9 @@ coding 阶段只做三件事:
51
54
 
52
55
  | 类型 | Coding 侧重 |
53
56
  | --- | --- |
54
- | **Feature** | 最小可交付切片、覆盖关键场景、逐步补齐质量门禁 |
55
- | **Bugfix** | 先复现再修复,优先 TDD,保留 before/after 证据 |
56
- | **Refactor** | Characterization 基线、小步迁移、行为不变 |
57
+ | **Feature** | 最小可交付切片、覆盖关键场景、按风险选择 test-first |
58
+ | **Bugfix** | 先复现再修复,强制 Red → Green,保留 before/after 证据 |
59
+ | **Refactor** | Characterization 基线强制,小步迁移、行为不变 |
57
60
 
58
61
  ## 硬规则
59
62
 
@@ -73,14 +76,13 @@ coding 阶段只做三件事:
73
76
 
74
77
  不要借机顺手重构、升级架构或清理无关问题。
75
78
 
76
- ### 3. 风险越高,越要测试先行
79
+ ### 3. 测试先行按变更类型强制
77
80
 
78
- 以下场景默认先写失败验证:
81
+ 测试纪律不是“尽量”。按以下规则执行:
79
82
 
80
- - Bugfix
81
- - Refactor
82
- - 核心业务规则
83
- - 状态转换 / 并发 / 数据转换
83
+ - **Bugfix**:强制先写能失败的复现测试,再修复到 Green。没有自动化框架时,必须有可重复脚本或录屏级复现证据;跳过需用户显式豁免。
84
+ - **Refactor**:强制先建立 Characterization baseline(现有测试、快照、视觉/接口对照),baseline 绿后才能改结构。
85
+ - **Feature**:核心业务规则、状态机、权限、并发、数据转换、跨模块契约默认 test-first;纯展示 UI 可 test-after,但必须在任务证据中记录原因和人工/视觉验证。
84
86
 
85
87
  原则见 [`quality/testing-pyramid`](../../quality/testing-pyramid/SKILL.md)。
86
88
 
@@ -98,18 +100,47 @@ coding 阶段只做三件事:
98
100
 
99
101
  编译、测试、构建、静态检查、人工验证,凡未执行过的,不得写成"已通过"。
100
102
 
103
+ ### 6. 任务组完成后自动验证
104
+
105
+ 每个可审计批次完成后,Agent 必须自动运行**匹配范围的验证流水线**,不需要用户重复输入 `review` / `verify` / `figma` / `computer use` 等指令。
106
+
107
+ 验证强度按批次类型选择:
108
+
109
+ | 批次类型 | 自动验证 |
110
+ | --- | --- |
111
+ | 纯逻辑 / 数据转换 | 相关单元测试 + type-check / lint(按项目配置) |
112
+ | Bugfix | Red 复现证据 + Green 测试 + 原路径回归 + 相邻场景 |
113
+ | Refactor | Characterization baseline + 全量相关测试 + before/after 对照 |
114
+ | 前端 UI / 高保真 | Figma MCP 读取 / `ue-mcp.md` 对照 + Computer Use 浏览器流 + 视觉/交互/a11y 检查 |
115
+ | API / 契约 | 生成类型 / schema diff + service 边界测试 + 调用方影响扫描 |
116
+ | 安全 / 权限 | 安全红线扫描 + 越权/降权路径测试 |
117
+
118
+ 工具不可用时,不得跳过;必须记录降级原因和替代证据(截图、录屏、手工步骤、静态对照)。
119
+
101
120
  ## 通用执行循环
102
121
 
103
122
  ```text
104
- 1. 选择一个切片 / 任务
123
+ 1. 选择一个可审计批次(显式任务组 / 用户指定任务组 / 默认全任务组)
105
124
  2. 重述目标、边界、覆盖 FR
106
- 3. 准备验证(高风险改动先写失败测试)
125
+ 3. 准备验证(按变更类型决定 Red test / baseline / test-after)
107
126
  4. 实现最小改动
108
- 5. 运行与该切片匹配的检查
109
- 6. 更新 tasks / evidence
110
- 7. 再进入下一个切片
127
+ 5. 自动运行批次验证流水线
128
+ 6. 运行本任务组 / 批次的轻量 Review(自查或 Sub-Agent Reviewer)
129
+ 7. 更新 tasks / evidence
130
+ 8. 达到阶段阈值后进入 Reviewing,否则继续下一批次
111
131
  ```
112
132
 
133
+ ## 自动流水线模式
134
+
135
+ 一旦用户启动 `zsk:standard-dev-flow`、`zsk:feature`、`zsk:bugfix`、`zsk:refactor` 或 `zsk:coding`,Agent 默认进入自动流水线模式:
136
+
137
+ - 自动选择后续相关 zsk skill,不要求用户每一步重复点名
138
+ - 自动按任务组分配 Sub-Agent(如可用)
139
+ - 自动运行批次验证并落证据
140
+ - 自动在 Review 红灯、Verify 失败、范围变更、缺工具需豁免、跨阶段放行时停下
141
+
142
+ 这不是跳过交互;交互点从“每条命令”提升到“风险/阶段门禁”。
143
+
113
144
  ## 任务开始前最小检查
114
145
 
115
146
  - 当前任务目标是什么
@@ -12,6 +12,7 @@ variants:
12
12
  - bugfix
13
13
  - refactor
14
14
  related:
15
+ - ../../system/agent-orchestration/SKILL.md
15
16
  - ../spec/SKILL.md
16
17
  - ../coding/SKILL.md
17
18
  - ../task-structure/SKILL.md
@@ -11,6 +11,7 @@ variants:
11
11
  - bugfix
12
12
  - refactor
13
13
  related:
14
+ - ../../system/agent-orchestration/SKILL.md
14
15
  - ../task/SKILL.md
15
16
  - ../task-structure/SKILL.md
16
17
  - ../task-evidence/SKILL.md
@@ -16,6 +16,10 @@ related:
16
16
  - ../reviewing/SKILL.md
17
17
  - ../verify/SKILL.md
18
18
  - ../archive/SKILL.md
19
+ - ../../system/agent-orchestration/SKILL.md
20
+ - ../../design-handoff/ux-wireframe/SKILL.md
21
+ - ../../design-handoff/figma-generate-hifi/SKILL.md
22
+ - ../../design-handoff/design-system/SKILL.md
19
23
  - ../../frontend/feature-tasks-frontend/SKILL.md
20
24
  triggers:
21
25
  - new feature workflow
@@ -30,6 +34,7 @@ triggers:
30
34
  > **定位**:在 7 阶段基础上,针对"**新增功能**"编排完整工作流
31
35
  > **阶段映射**:proposal → spec → design → coding → reviewing → verify → archive
32
36
  > **适用**:新组件 / 新页面 / 新能力 / 新接入点
37
+ > **自动化**:启动本工作流后,Agent 按 [`zsk:agent-orchestration`](../../system/agent-orchestration/SKILL.md) 自动选择后续 skills、分配 Sub-Agent、执行批次验证;用户不需要每步重复输入指令。
33
38
 
34
39
  ## 总览
35
40
 
@@ -74,6 +79,22 @@ triggers:
74
79
 
75
80
  ---
76
81
 
82
+ ### Step 2.5:Experience Design — 低保真 / 高保真设计输入(有 UI 时)
83
+
84
+ **Primary Skill**: `zsk:ux-wireframe` · `zsk:figma-generate-hifi` · `zsk:design-system`
85
+
86
+ **Addendum**:
87
+ - 无现成 Figma 时,先用 `zsk:ux-wireframe` 固化信息架构、任务流和低保真布局,再生成高保真。
88
+ - 高保真必须从 Spec、项目设计系统、真实内容密度和品牌语气推导,不允许套通用 AI 模板。
89
+ - 已有 Figma 时,本步骤退化为读取 / 对齐 `zsk:ue-mcp`,不重复造稿。
90
+ - 设计产物需覆盖核心状态:default / loading / empty / error / hover / focus-visible / disabled / selected。
91
+
92
+ **Output**: `docs/{module}/ux-wireframe.md`(如需)· Figma URL / node-id · `docs/{module}/ue-mcp.md`
93
+
94
+ **Exit**: 关键用户路径和状态矩阵可被 Spec / Design 引用;没有设计交付时明确降级方案。
95
+
96
+ ---
97
+
77
98
  ### Step 3:Design — 怎么落地
78
99
 
79
100
  **Primary Skill**: `zsk:design` · `plan-eng-review` · `plan-design-review` · `plan-ceo-review` · `codex` · `graphify` · GSD: Reflect
@@ -12,6 +12,7 @@ variants:
12
12
  - bugfix
13
13
  - refactor
14
14
  related:
15
+ - ../../system/agent-orchestration/SKILL.md
15
16
  - ../spec/SKILL.md
16
17
  - ../feature/SKILL.md
17
18
  - ../bugfix/SKILL.md
@@ -14,6 +14,7 @@ related:
14
14
  - ../design/SKILL.md
15
15
  - ../coding/SKILL.md
16
16
  - ../refactor-tasks/SKILL.md
17
+ - ../../system/agent-orchestration/SKILL.md
17
18
  - ../../system/adr/SKILL.md
18
19
  triggers:
19
20
  - refactor workflow
@@ -30,6 +31,7 @@ triggers:
30
31
  > **定位**:在 7 阶段基础上,针对"**不改变可观察行为、只改结构**"的重构编排工作流
31
32
  > **阶段映射**:proposal(触发评估)→ spec(行为不变契约)→ design(重构手法)→ coding(Characterization + 小步 TDD)→ reviewing(commit 序列可 replay)→ verify(行为不变证据)→ archive(ADR + 知识图)
32
33
  > **吸收硬原则**:Red-Green-Refactor + 行为不变(Fowler)
34
+ > **自动化**:启动本工作流后,Agent 按 [`zsk:agent-orchestration`](../../system/agent-orchestration/SKILL.md) 自动分配现状扫描、迁移执行、行为不变验证和任务组 Review。
33
35
 
34
36
  ## 核心纪律
35
37
 
@@ -9,6 +9,7 @@ domain: sdlc
9
9
  tier: core
10
10
  change_type: refactor
11
11
  related:
12
+ - ../../system/agent-orchestration/SKILL.md
12
13
  - ../refactor/SKILL.md
13
14
  - ../dor-dod/SKILL.md
14
15
  - ../task-evidence/SKILL.md
@@ -13,6 +13,7 @@ variants:
13
13
  related:
14
14
  - ../coding/SKILL.md
15
15
  - ../verify/SKILL.md
16
+ - ../../system/agent-orchestration/SKILL.md
16
17
  - ../../frontend/review-frontend/SKILL.md
17
18
  - ../../quality/code-hygiene/SKILL.md
18
19
  - ../../system/project-constraints-template/SKILL.md
@@ -36,7 +37,7 @@ triggers:
36
37
 
37
38
  ## AI 代码审查标准流 (AI Code Review Flow)
38
39
 
39
- 当 Agent 被召唤进行代码审查时,必须**严格按顺序执行以下五个阶段**。主 Agent 负责整合结论;Sub-Agent 只负责专业视角,不直接给最终放行。
40
+ 当 Agent 被召唤进行代码审查时,必须**严格按顺序执行以下五个阶段**。主 Agent 负责整合结论;Sub-Agent 按 [`zsk:agent-orchestration`](../../system/agent-orchestration/SKILL.md) 只负责专业视角,不直接给最终放行。
40
41
 
41
42
  ### 阶段 1:Scope Drift Detection (需求偏移检测)
42
43
 
@@ -12,6 +12,7 @@ variants:
12
12
  - bugfix
13
13
  - refactor
14
14
  related:
15
+ - ../../system/agent-orchestration/SKILL.md
15
16
  - ../proposal/SKILL.md
16
17
  - ../design/SKILL.md
17
18
  - ../dor-dod/SKILL.md
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  name: zsk:standard-dev-flow
3
- description: 交互式标准开发工作流,包含 9 个核心节点(Prepare, Proposal, Spec, Design, Task,
4
- Coding, Review, Verify, Commit)。通过强门禁和 Sub-Agent 审查机制,保障高质量的开发落地。
3
+ description: 交互式标准开发工作流,包含 Prepare 预检 + 7 阶段 SDLC(Proposal, Spec, Design,
4
+ Coding, Reviewing, Verify, Archive)。通过强门禁、可审计批次和多视角审查,保障高质量开发落地。
5
5
  category: workflow
6
6
  domain: sdlc
7
7
  tier: core
@@ -15,20 +15,22 @@ related:
15
15
  - ../design/SKILL.md
16
16
  - ../task/SKILL.md
17
17
  - ../coding/SKILL.md
18
+ - ../task-evidence/SKILL.md
18
19
  - ../verify/SKILL.md
20
+ - ../../system/agent-orchestration/SKILL.md
19
21
  - ../../system/project-constraints-template/SKILL.md
20
22
  triggers:
21
23
  - standard dev flow
22
24
  - start a new feature workflow
23
25
  - execute enterprise workflow
24
- - 9 node development
26
+ - 7 stage development
25
27
  - zsk standard workflow
26
28
  ---
27
29
 
28
30
  # 交互式标准开发工作流 (Standard Dev Workflow)
29
31
 
30
32
  > **定位**:这是一套专为公司级开发或新项目设计的 **分节点交互式编排工作流 (Interactive Orchestrator Skill)**。遵循业界最佳实践,确保高内聚、低耦合以及严格的质量门禁。
31
- > **核心原则**:工作流分为 **9 个串行节点**。Agent **绝不允许跨节点越权执行**。在每个节点的任务完成后,Agent 必须停下来,询问用户是否可以进入下一个环节,并在得到明确肯定后方可继续。
33
+ > **核心原则**:工作流分为 **Prepare 预检 + 7 个 SDLC 阶段**。Agent **绝不允许跨阶段越权执行**。阶段出口必须有产物、证据和放行结论。
32
34
  > **适用场景**:复杂功能的从头开发、需要高质量审查的重要迭代。
33
35
  > **职责边界**:本 skill 只做流程编排;每个节点的详细模板和门禁以对应 stage skill 为准,避免复制出第二套规范。
34
36
 
@@ -37,14 +39,16 @@ triggers:
37
39
  作为执行该工作流的 Agent,你必须遵守:
38
40
  1. **单节点聚焦**:当前处于哪个阶段,就只能执行那个阶段的任务。禁止在 `Spec` 阶段直接去写代码。
39
41
  2. **多轮对话打磨**:一个节点内部可以进行多次对话(修改、澄清)。
40
- 3. **显式放行 (Explicit Gate)**:每个节点的末尾,必须输出当前的最终产物,并询问:“当前节点产物已就绪,是否准许进入 [下一节点]?”
42
+ 3. **显式放行 (Explicit Gate)**:阶段末尾必须输出最终产物、证据和结论;进入下一阶段需用户确认或既定自动化门禁绿灯。
41
43
  4. **加载上下文**:全局系统约束 (`SYSTEM-SPEC.md`) 和工程配置 (`project-config.md`) 在启动时自动载入,贯穿整个流程。
44
+ 5. **能力降级**:外部 skill / MCP / Sub-Agent 不可用时,按本 skill 的同等检查维度手动执行,并记录降级原因。
45
+ 6. **自动流水线**:启动本流程后,Agent 自动调用后续相关 zsk skill、分配 Sub-Agent、执行批次验证;只在阶段门禁、红灯、范围变化或需用户豁免时停。
42
46
 
43
47
  ---
44
48
 
45
- ## 9 节点流转逻辑 (The 9 Nodes)
49
+ ## Prepare + 7 阶段流转逻辑
46
50
 
47
- ### Node 1: Prepare (准备与资源收集)
51
+ ### Preflight: Prepare (准备与资源收集)
48
52
  - **目标**:准备开发资源,建立本次迭代的事实源(Source of Truth)。
49
53
  - **Agent 动作**:先读取 `zsk.config.yaml.sources.*`,确认每类资源从哪里来、写到哪里;配置缺失或不理解时必须向用户确认。
50
54
  - **`.raws/` 推荐命名**(与 `zsk.config.yaml` 模板一致):
@@ -56,59 +60,56 @@ triggers:
56
60
  - **同步规则**:`kind: local` 只检查存在性;`kind: script` 由命令更新 `output`;`kind: skill` 由对应 AI skill / MCP / Computer Use 获取后写入 `output`,并更新 `.raws/manifest.json`。
57
61
  - **出口门禁**:必要资源已按 `zsk.config.yaml` 落盘或登记为待同步;`.raws/manifest.json` 已反映当前状态;向用户确认是否进入 `Proposal` 阶段。
58
62
 
59
- ### Node 2: Proposal (提案阶段)
63
+ ### Stage 1: Proposal (提案阶段)
60
64
  - **目标**:对齐业务意图和范围边界。
61
65
  - **Agent 动作**:结合 `.raws/` 中的资料和 `SYSTEM-SPEC.md`,输出 `proposal.md`。必须明确 SMART 目标、备选方案和“不做什么(Out of scope)”。
62
66
  - **出口门禁**:用户确认 `proposal.md` 的内容无误。
63
67
 
64
- ### Node 3: Spec (规格定义)
68
+ ### Stage 2: Spec (规格定义)
65
69
  - **目标**:确立行为契约。
66
70
  - **Agent 动作**:基于 Proposal 产出 `spec.md`。为功能需求(FR)、非功能需求(NFR,须继承自 SYSTEM-SPEC 基线)和验收标准(AC)进行编号。
67
71
  - **出口门禁**:用户确认 `spec.md` 的所有编号和验收条件清晰可测。
68
72
 
69
- ### Node 4: Design (技术设计)
73
+ ### Stage 3: Design (技术设计)
70
74
  - **目标**:给出实现方案映射。
71
75
  - **Agent 动作**:基于 Spec 产出 `design.md`。必须给出技术选型理由,并提供 `FR 编号 -> 代码模块路径` 的映射。受 `project-config.md` 路径约束。
72
76
  - **出口门禁**:用户对架构和技术实现方案没有异议。
73
77
 
74
- ### Node 5: Task (任务拆解)
75
- - **目标**:将大需求拆分成可执行的原子任务。
76
- - **Agent 动作**:生成 `tasks.md`,按最小可行切片(Slice)列出具有前置依赖关系的任务组。
77
- - **出口门禁**:用户确认任务切分颗粒度合理,同意开始编码。
78
-
79
- ### Node 6: Coding (编码执行)
80
- - **目标**:按任务清单写代码。
81
- - **Agent 动作**:严格按 `tasks.md` 逐步执行代码。每次引入依赖或改动时,自我审查是否违背了 `SYSTEM-SPEC.md` 中的禁忌清单和 Import 起源规则。
82
- - **触发 Review 的明确时机**(满足任一即停止编码,进入 Node 7):
78
+ ### Stage 4: Coding (任务拆解 + 编码执行)
79
+ - **目标**:把 Design 切成可执行任务,并按可审计批次交付代码与测试。
80
+ - **Agent 动作**:生成 / 更新 `tasks.md`,按最小可行切片(Slice)执行。每次引入依赖或改动时,自我审查是否违背了 `SYSTEM-SPEC.md` 中的禁忌清单和 Import 起源规则。
81
+ - **批次原则**:优先使用 `tasks.md` 显式任务组;没有任务组时全部任务默认为一个组;用户可指定 T-1/T-2/T-3 完成后统一验证并 Review。
82
+ - **批次验证**:每个批次完成后自动运行匹配验证并写入 `task-evidence`。UI / 高保真批次必须优先使用 Figma MCP + Computer Use;不可用时记录降级证据。
83
+ - **触发 Review 的明确时机**(满足任一即停止编码,进入 Reviewing):
83
84
  - 完成 `tasks.md` 中一个**独立功能切片**(同一 FR 编号下的全部原子 Task 均打钩)。
84
85
  - 单轮改动累计超过 **10 个文件** 或 **300 行代码**。
85
86
  - 任何引入新 npm 包的改动完成后。
86
- - **出口门禁**:Agent 主动停止编码,声明已进入 Node 7,用户无需手动提醒。
87
+ - **出口门禁**:Agent 主动停止编码,声明已进入 Reviewing,用户无需手动提醒。
87
88
 
88
- ### Node 7: Review (多视角审查)
89
+ ### Stage 5: Reviewing (多视角审查)
89
90
  - **目标**:提高代码交付质量,排查隐患。
90
- - **Agent 动作**:参照 `zsk:reviewing` 技能的五阶段流程(Scope Drift → Sub-Agent Plan → Core Review → Test Coverage → Severity Verdict),按不同专业视角拆分 Sub-Agent 审查,并由主 Agent 汇总。
91
+ - **Agent 动作**:参照 `zsk:reviewing` 技能的五阶段流程(Scope Drift → Review Plan → Core Review → Test Coverage → Severity Verdict)。能拆 Sub-Agent 时按不同专业视角并行审查;不能拆时主 Agent 按同一视角清单自查并记录原因。
91
92
  - **输出产物**:最终给出以下三种评估之一:
92
- - 🟢 **绿灯 (Green)**:无阻碍性问题,进入 Node 8 Verify。
93
+ - 🟢 **绿灯 (Green)**:无阻碍性问题,进入 Verify。
93
94
  - 🟡 **黄灯 (Yellow)**:存在建议项,列出清单,由用户决定是否修复后再 Review,或豁免放行。
94
- - 🔴 **红灯 (Red)**:发现 P1 级 Critical 问题或高置信度严重缺陷。**自动回退 Node 6**,Agent 声明:“Review 发现阻塞性问题,回退至 Coding……”并重新列出需修改的 Task,重新进入 Coding → Review 循环,直至通过。
95
- - **出口门禁**:🟢 绿灯,或 🟡 用户明确豁免。🔴 红灯时禁止放行,必须回退至 Node 6
95
+ - 🔴 **红灯 (Red)**:发现 P1 级 Critical 问题或高置信度严重缺陷。**自动回退 Coding**,Agent 声明:“Review 发现阻塞性问题,回退至 Coding……”并重新列出需修改的 Task,重新进入 Coding → Reviewing 循环,直至通过。
96
+ - **出口门禁**:🟢 绿灯,或 🟡 用户明确豁免。🔴 红灯时禁止放行,必须回退至 Coding
96
97
 
97
- ### Node 8: Verify (多维验收)
98
+ ### Stage 6: Verify (多维验收)
98
99
  - **目标**:以客观证据逐条验证 `spec.md` 中所有 AC 均已满足。
99
100
  - **Agent 动作**:
100
101
  1. 从 `spec.md` 提取所有 `AC-XXX` 编号,逐条核对,输出:`AC-XXX: [PASS / FAIL] — 证据:<命令输出 / 截图 / 日志片段>`
101
102
  2. 运行 `SYSTEM-SPEC.md § NFR 基线` / `project-config.md` 中声明的命令并展示 Exit code(如 `{{config.scripts.type_check}}`、`{{config.scripts.lint}}`、`{{config.scripts.build}}`)。
102
103
  3. 若环境允许,调用高级工具(如 `Figma MCP` 进行 UI 还原度比对,或 `Computer Use` 模拟浏览器验证用户流)。
103
- - **出口门禁**:所有 AC 状态为 `PASS` 且 NFR 命令 Exit code = 0。任一 AC 为 `FAIL`,禁止进入 Node 9,回退 Node 6 修复。
104
+ - **出口门禁**:所有 AC 状态为 `PASS` 且 NFR 命令 Exit code = 0。任一 AC 为 `FAIL`,禁止进入 Archive,回退 Coding 修复。
104
105
 
105
- ### Node 9: Commit (提交)
106
- - **目标**:版本封版。
107
- - **Agent 动作**:基于 Conventional Commits 规范,总结这一阶段的修改,自动生成 Commit Message。
108
- - **出口门禁**:询问用户是否可以执行 Git Commit(及 Push)。用户同意后,完成整个工作流。
106
+ ### Stage 7: Archive (提交 / 发布 / 沉淀)
107
+ - **目标**:封版并把本轮经验沉淀为可复用约束。
108
+ - **Agent 动作**:按 `zsk:archive` 完成 Changelog、ADR flush、SYSTEM-SPEC / standards 反哺、Postmortem(P0/P1)、发布记录。需要 Git Commit / Push 时先询问用户。
109
+ - **出口门禁**:Archive 质量门禁全过;提交、发布或跳过发布的决策已记录。
109
110
 
110
111
  ---
111
112
 
112
113
  ## 启动口令范例
113
114
 
114
- > "启动 `zsk:standard-dev-flow` 流程。请先带我进入 Node 1 (Prepare)。我这边有一些 API 的 json 结构,你可以先保存到 `.raws/` 里。"
115
+ > "启动 `zsk:standard-dev-flow` 流程。请先带我进入 Prepare。我这边有一些 API 的 json 结构,你可以先保存到 `.raws/` 里。"
@@ -11,6 +11,7 @@ related:
11
11
  - ../task-structure/SKILL.md
12
12
  - ../task-tracking/SKILL.md
13
13
  - ../task-evidence/SKILL.md
14
+ - ../../system/agent-orchestration/SKILL.md
14
15
  - ../feature/SKILL.md
15
16
  - ../bugfix/SKILL.md
16
17
  - ../refactor/SKILL.md
@@ -34,7 +35,7 @@ triggers:
34
35
  | --- | --- | --- |
35
36
  | **如何制定任务** | 目标 / 粒度(0.5-2 人天)/ 必填字段 / 估算单位 / FR 覆盖编号 | [`zsk:task-structure`](../task-structure/SKILL.md) |
36
37
  | **如何拆分任务** | 父子两级(不更深)/ 依赖关系 / 并行度 / FR 全覆盖 | [`zsk:task-structure`](../task-structure/SKILL.md) + [`zsk:task-tracking`](../task-tracking/SKILL.md) §1 |
37
- | **执行完如何交互** | 更新状态 → 填证据 → 短汇报 → **等人类确认**再推下一任务 | [`zsk:task-tracking`](../task-tracking/SKILL.md) §6 |
38
+ | **执行完如何交互** | 可审计批次完成 → 自动验证 → 更新状态 → 填证据 → 短汇报 → 确认 / Review 再推下一批次 | [`zsk:task-tracking`](../task-tracking/SKILL.md) §6 |
38
39
 
39
40
  ## Task 在 7 阶段中的位置
40
41
 
@@ -80,7 +81,7 @@ proposal → spec → design → coding → reviewing → verify → archive
80
81
  4. 按 zsk:dor-dod 跑 DoR
81
82
  5. 按 zsk:task-structure 细化任务与估算
82
83
  6. 按 zsk:task-tracking 画依赖图、建阻塞记录
83
- 7. 开始执行:**每任务完成 → 更新状态 + 填证据 → 短汇报 → 等人类确认再推下一任务**(不自动连跑;详见 [`zsk:task-tracking`](../task-tracking/SKILL.md) §6)
84
+ 7. 开始执行:**每个任务组 / 可审计批次完成 自动验证 → 更新状态 + 填证据 → 短汇报 → 确认 / Review 再推下一批次**(无任务组时全部任务默认为一组;用户可指定分组;详见 [`zsk:task-tracking`](../task-tracking/SKILL.md) §6)
84
85
  8. 交付前按 zsk:task-evidence 填证据
85
86
  9. 按 zsk:dor-dod 跑 DoD
86
87
  10. 进 zsk:reviewing → zsk:verify → zsk:archive