harnessed 1.0.4 → 2.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.
@@ -0,0 +1,143 @@
1
+ # workflows/verify-work/workflow.yaml — Phase v2.0-2.4 W2 T2.4.W2.2 (D-12 + R20.12 + R20.11 + R20.14)
2
+ #
3
+ # Stage ④ Verify 完整 workflow — 9-phase composition per D-12 (Q-AUDIT-2 amend) verbatim + R20.12 acceptance:
4
+ # 必跑串行 (01-02) → 并行 fan-out (03) → 强制 conditional (04) → 可选 conditional (05-07) → 末尾串行 (08) → Agent Team 升级 (09)
5
+ #
6
+ # Sister refs:
7
+ # - ~/.claude/CLAUDE.md "Verify 阶段" 章节 verbatim 7-step 列表 (gsd-verify-work + gsd-progress + code-review 多 agent + 关键模块 gstack /review 强制 + 可选 /qa /cso /design-review + code-simplifier + 4-specialist Agent Team 升级)
8
+ # - ~/.claude/rules/agent-teams.md Pattern C 多维度审查 (4-specialist 互相质询, NOT fire-and-forget; lead 委派 + cleanup mandatory)
9
+ # - workflows/capabilities.yaml — gsd-verify-work / gsd-progress / code-review / gstack-review / gstack-qa / gstack-cso / gstack-design-review / code-simplifier / agent-teams-create 9 entry (Phase 2.3 W0.1 SHIPPED)
10
+ # - workflows/judgments/parallelism-gate.yaml — subagent-default.fires (default fan-out) + agent-teams-upgrade.fires (5 触发 OR-chain; Phase 2.3 W0.2 SHIPPED)
11
+ # - workflows/defaults.yaml — ralph_max_iterations.verify-work.{01-gsd-verify-work=3, 02-code-review=5, 03-gstack-review=3, 04-code-simplifier=5} (Phase 2.3 W1.2 SHIPPED)
12
+ # - src/workflow/schema/workflow.ts WorkflowSchemaV2 (Phase 2.4 W0.1 SHIPPED 86L)
13
+ # - Sister pattern workflows/plan-feature/workflow.yaml v2 + workflows/execute-task/phases.yaml v2 (Phase 2.4 W1 SHIPPED)
14
+ #
15
+ # Workflow-level on_veto: halt_workflow (D-04 PUSH 任 1 phase veto → 全 halt; engine-level wiring,
16
+ # NOT yaml v2 root schema strict additionalProperties:false per T2.4.W0.1 + STRIDE T-2.2-02)。
17
+ #
18
+ # Fallback 3 铁律 chain_isolation (R20.16): phase ≥04 各 conditional `on: [..., {action: skip}]` 实装 —
19
+ # skip 04-gstack-review ≠ skip 08-code-simplifier 等 (条件式 fallback, 非互相级联跳过)。
20
+
21
+ schema_version: harnessed.workflow.v2
22
+ workflow: verify-work
23
+ description: |
24
+ verify-work Stage ④ Verify 完整 workflow — 9-phase composition per CLAUDE.md verbatim:
25
+ gsd-verify-work UAT-driven + gsd-progress 状态同步 必跑串行 → code-review 多 agent 并行 fan-out
26
+ → gstack /review Paranoid Staff Eng 关键模块强制 → 可选 /qa /cso /design-review conditional
27
+ → code-simplifier 末尾串行 → 关键发布/大重构 PR 升级 4-specialist Agent Team Pattern C
28
+ 多维度审查 (code-review + gstack-review + gstack-cso + gstack-qa 互相质询, NOT fire-and-forget)。
29
+ Cleanup mandatory per ~/.claude/rules/agent-teams.md 防呆清单 (SendMessage shutdown_request +
30
+ TeamDelete) — engine-level wiring, NOT yaml v2 schema scope.
31
+
32
+ phases:
33
+ # ============================================================================
34
+ # 必跑串行 (2 phase) — gsd-verify-work 起点 + gsd-progress 状态同步
35
+ # ============================================================================
36
+ - id: 01-gsd-verify-work
37
+ name: gsd-verify-work (UAT-driven conversational verification + acceptance criteria check)
38
+ upstream: gsd
39
+ capability: '{{ capabilities.gsd-verify-work.cmd }}'
40
+ model: sonnet
41
+ max_iterations: '{{ defaults.ralph_max_iterations.verify-work.01-gsd-verify-work }}'
42
+
43
+ - id: 02-gsd-progress
44
+ name: gsd-progress (状态同步 — ROADMAP/STATE/REQUIREMENTS 更新)
45
+ upstream: gsd
46
+ capability: '{{ capabilities.gsd-progress.cmd }}'
47
+ model: haiku
48
+ max_iterations: 2
49
+
50
+ # ============================================================================
51
+ # 并行 fan-out (1 phase) — code-review 多 agent (subagent default per CLAUDE.md 子任务并行机制)
52
+ # ============================================================================
53
+ - id: 03-code-review-parallel
54
+ name: code-review (multi-agent 并行 fan-out — 高置信度 finding)
55
+ upstream: mattpocock-skills
56
+ capability: '{{ capabilities.code-review.cmd }}'
57
+ model: sonnet
58
+ max_iterations: '{{ defaults.ralph_max_iterations.verify-work.02-code-review }}'
59
+ parallelism: judgments.parallelism-gate.subagent-default.fires
60
+
61
+ # ============================================================================
62
+ # 关键模块强制 conditional (1 phase) — gstack /review Paranoid Staff Engineer
63
+ # ============================================================================
64
+ - id: 04-gstack-review-conditional
65
+ name: gstack-review (Paranoid Staff Engineer 视角 — 关键模块 PR 前强制)
66
+ upstream: gstack
67
+ capability: '{{ capabilities.gstack-review.cmd }}'
68
+ model: opus
69
+ max_iterations: '{{ defaults.ralph_max_iterations.verify-work.03-gstack-review }}'
70
+ on:
71
+ - if: 'phase.is_critical_module == true'
72
+ action: invoke
73
+ - if: 'phase.is_critical_module == false'
74
+ action: skip
75
+
76
+ # ============================================================================
77
+ # 可选 conditional (3 phase) — /qa /cso /design-review (按 phase fact context 独立触发)
78
+ # ============================================================================
79
+ - id: 05-qa-conditional
80
+ name: gstack-qa (E2E QA 验收 — has_ui_changes 触发)
81
+ upstream: gstack
82
+ capability: '{{ capabilities.gstack-qa.cmd }}'
83
+ model: sonnet
84
+ max_iterations: 3
85
+ on:
86
+ - if: 'phase.has_ui_changes == true'
87
+ action: invoke
88
+ - if: 'phase.has_ui_changes == false'
89
+ action: skip
90
+
91
+ - id: 06-cso-conditional
92
+ name: gstack-cso (安全审查 OWASP/auth/secrets — has_auth_or_secrets 触发)
93
+ upstream: gstack
94
+ capability: '{{ capabilities.gstack-cso.cmd }}'
95
+ model: opus
96
+ max_iterations: 3
97
+ on:
98
+ - if: 'phase.has_auth_or_secrets == true'
99
+ action: invoke
100
+ - if: 'phase.has_auth_or_secrets == false'
101
+ action: skip
102
+
103
+ - id: 07-design-review-conditional
104
+ name: gstack-design-review (设计系统一致性 + AI 审美问题 — has_design_changes 触发)
105
+ upstream: gstack
106
+ capability: '{{ capabilities.gstack-design-review.cmd }}'
107
+ model: sonnet
108
+ max_iterations: 3
109
+ on:
110
+ - if: 'phase.has_design_changes == true'
111
+ action: invoke
112
+ - if: 'phase.has_design_changes == false'
113
+ action: skip
114
+
115
+ # ============================================================================
116
+ # 末尾串行 (1 phase) — code-simplifier (移除重复/多余逻辑)
117
+ # ============================================================================
118
+ - id: 08-code-simplifier
119
+ name: code-simplifier (末尾串行 — 简化 + 移除重复)
120
+ upstream: mattpocock-skills
121
+ capability: '{{ capabilities.code-simplifier.cmd }}'
122
+ model: sonnet
123
+ max_iterations: '{{ defaults.ralph_max_iterations.verify-work.04-code-simplifier }}'
124
+
125
+ # ============================================================================
126
+ # Agent Team 升级 (1 phase) — 关键发布 / 大重构 PR 4-specialist Pattern C
127
+ # ============================================================================
128
+ # sister ~/.claude/rules/agent-teams.md L42-L52 Pattern C 多维度审查 (≥3 specialist
129
+ # 需要互相质询而非 fire-and-forget): code-review + gstack-review + gstack-cso + gstack-qa
130
+ # team_cost < 2 × subagent_cost 估算前置 (开 team 前必估算 per agent-teams.md L34)
131
+ # cleanup mandatory: SendMessage shutdown_request + TeamDelete (engine-level wiring)
132
+ - id: 09-agent-team-multispecialist
133
+ name: agent-team-upgrade (4-specialist Pattern C — 关键发布/大重构 多维度审查 互相质询)
134
+ upstream: claude-platform
135
+ capability: '{{ capabilities.agent-teams-create.cmd }}'
136
+ model: opus
137
+ max_iterations: 1
138
+ parallelism: judgments.parallelism-gate.agent-teams-upgrade.fires
139
+ on:
140
+ - if: 'phase.is_major_release == true or phase.is_large_refactor == true'
141
+ action: invoke
142
+ - if: 'phase.is_major_release == false and phase.is_large_refactor == false'
143
+ action: skip