@aipper/aiws-spec 0.0.24 → 0.0.25

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 (191) hide show
  1. package/README.md +22 -0
  2. package/docs/aiws-bootstrap-routing-design.md +138 -0
  3. package/docs/aiws-governance-positioning.md +69 -0
  4. package/docs/cli-interface.md +87 -5
  5. package/docs/collaboration-artifacts.md +62 -0
  6. package/docs/opencode-omo-adapter.md +135 -0
  7. package/docs/opencode-omo-validation-checklist.md +90 -0
  8. package/docs/spec-contract.md +26 -11
  9. package/docs/superpowers-collaboration-adoption.md +92 -0
  10. package/docs/workflow-delegation-contracts.json +274 -0
  11. package/docs/workflow-delegation-contracts.md +248 -0
  12. package/docs/workflow-delegation-contracts.schema.json +176 -0
  13. package/docs/workflow-governance-rules.json +294 -0
  14. package/docs/workflow-governance-rules.md +63 -0
  15. package/docs/workflow-governance-rules.schema.json +182 -0
  16. package/docs/workflow-review-gates.json +72 -0
  17. package/docs/workflow-review-gates.md +36 -0
  18. package/docs/workflow-review-gates.schema.json +67 -0
  19. package/docs/workflow-router-rules.json +196 -0
  20. package/docs/workflow-router-rules.md +83 -0
  21. package/docs/workflow-router-rules.schema.json +119 -0
  22. package/docs/workflow-stage-contracts.json +148 -0
  23. package/docs/workflow-stage-contracts.md +70 -0
  24. package/docs/workflow-stage-contracts.schema.json +98 -0
  25. package/package.json +1 -1
  26. package/templates/workspace/.agents/skills/using-aiws/SKILL.md +83 -0
  27. package/templates/workspace/.agents/skills/ws-commit/SKILL.md +23 -0
  28. package/templates/workspace/.agents/skills/ws-delegate/SKILL.md +75 -0
  29. package/templates/workspace/.agents/skills/ws-deliver/SKILL.md +22 -0
  30. package/templates/workspace/.agents/skills/ws-dev/SKILL.md +35 -6
  31. package/templates/workspace/.agents/skills/ws-finish/SKILL.md +24 -0
  32. package/templates/workspace/.agents/skills/ws-frontend-design/SKILL.md +126 -0
  33. package/templates/workspace/.agents/skills/ws-handoff/SKILL.md +22 -1
  34. package/templates/workspace/.agents/skills/ws-plan/SKILL.md +25 -1
  35. package/templates/workspace/.agents/skills/ws-plan-verify/SKILL.md +20 -0
  36. package/templates/workspace/.agents/skills/ws-preflight/SKILL.md +23 -0
  37. package/templates/workspace/.agents/skills/ws-quality-review/SKILL.md +56 -0
  38. package/templates/workspace/.agents/skills/ws-review/SKILL.md +24 -0
  39. package/templates/workspace/.agents/skills/ws-spec-review/SKILL.md +57 -0
  40. package/templates/workspace/.agents/skills/ws-verify-before-complete/SKILL.md +59 -0
  41. package/templates/workspace/.claude/commands/using-aiws.md +24 -0
  42. package/templates/workspace/.claude/commands/ws-quality-review.md +24 -0
  43. package/templates/workspace/.claude/commands/ws-spec-review.md +24 -0
  44. package/templates/workspace/.claude/commands/ws-verify-before-complete.md +24 -0
  45. package/templates/workspace/.claude/skills/p-aiws-change-archive/SKILL.md +24 -0
  46. package/templates/workspace/.claude/skills/p-aiws-change-finish/SKILL.md +24 -0
  47. package/templates/workspace/.claude/skills/p-aiws-change-list/SKILL.md +18 -0
  48. package/templates/workspace/.claude/skills/p-aiws-change-new/SKILL.md +26 -0
  49. package/templates/workspace/.claude/skills/p-aiws-change-next/SKILL.md +19 -0
  50. package/templates/workspace/.claude/skills/p-aiws-change-start/SKILL.md +33 -0
  51. package/templates/workspace/.claude/skills/p-aiws-change-status/SKILL.md +19 -0
  52. package/templates/workspace/.claude/skills/p-aiws-change-sync/SKILL.md +19 -0
  53. package/templates/workspace/.claude/skills/p-aiws-change-templates-init/SKILL.md +18 -0
  54. package/templates/workspace/.claude/skills/p-aiws-change-templates-which/SKILL.md +18 -0
  55. package/templates/workspace/.claude/skills/p-aiws-change-validate/SKILL.md +23 -0
  56. package/templates/workspace/.claude/skills/p-aiws-hooks-install/SKILL.md +30 -0
  57. package/templates/workspace/.claude/skills/p-aiws-hooks-status/SKILL.md +18 -0
  58. package/templates/workspace/.claude/skills/p-aiws-init/SKILL.md +27 -0
  59. package/templates/workspace/.claude/skills/p-aiws-rollback/SKILL.md +18 -0
  60. package/templates/workspace/.claude/skills/p-aiws-update/SKILL.md +26 -0
  61. package/templates/workspace/.claude/skills/p-aiws-validate/SKILL.md +22 -0
  62. package/templates/workspace/.claude/skills/p-tasks-plan/SKILL.md +37 -0
  63. package/templates/workspace/.claude/skills/using-aiws/SKILL.md +83 -0
  64. package/templates/workspace/.claude/skills/ws-analyze/SKILL.md +26 -0
  65. package/templates/workspace/.claude/skills/ws-bugfix/SKILL.md +111 -0
  66. package/templates/workspace/.claude/skills/ws-commit/SKILL.md +127 -0
  67. package/templates/workspace/.claude/skills/ws-deliver/SKILL.md +231 -0
  68. package/templates/workspace/.claude/skills/ws-dev/SKILL.md +168 -0
  69. package/templates/workspace/.claude/skills/ws-finish/SKILL.md +220 -0
  70. package/templates/workspace/.claude/skills/ws-frontend-design/SKILL.md +126 -0
  71. package/templates/workspace/.claude/skills/ws-handoff/SKILL.md +52 -0
  72. package/templates/workspace/.claude/skills/ws-migrate/SKILL.md +54 -0
  73. package/templates/workspace/.claude/skills/ws-plan/SKILL.md +138 -0
  74. package/templates/workspace/.claude/skills/ws-plan-verify/SKILL.md +61 -0
  75. package/templates/workspace/.claude/skills/ws-preflight/SKILL.md +55 -0
  76. package/templates/workspace/.claude/skills/ws-pull/SKILL.md +119 -0
  77. package/templates/workspace/.claude/skills/ws-push/SKILL.md +110 -0
  78. package/templates/workspace/.claude/skills/ws-quality-review/SKILL.md +56 -0
  79. package/templates/workspace/.claude/skills/ws-req-change/SKILL.md +41 -0
  80. package/templates/workspace/.claude/skills/ws-req-contract-sync/SKILL.md +17 -0
  81. package/templates/workspace/.claude/skills/ws-req-contract-validate/SKILL.md +12 -0
  82. package/templates/workspace/.claude/skills/ws-req-flow-sync/SKILL.md +28 -0
  83. package/templates/workspace/.claude/skills/ws-req-review/SKILL.md +32 -0
  84. package/templates/workspace/.claude/skills/ws-review/SKILL.md +50 -0
  85. package/templates/workspace/.claude/skills/ws-rule/SKILL.md +23 -0
  86. package/templates/workspace/.claude/skills/ws-spec-review/SKILL.md +57 -0
  87. package/templates/workspace/.claude/skills/ws-submodule-setup/SKILL.md +65 -0
  88. package/templates/workspace/.claude/skills/ws-verify-before-complete/SKILL.md +59 -0
  89. package/templates/workspace/.opencode/command/using-aiws.md +29 -0
  90. package/templates/workspace/.opencode/command/ws-delegate.md +33 -0
  91. package/templates/workspace/.opencode/command/ws-plan.md +3 -0
  92. package/templates/workspace/.opencode/command/ws-preflight.md +4 -0
  93. package/templates/workspace/.opencode/command/ws-quality-review.md +30 -0
  94. package/templates/workspace/.opencode/command/ws-review.md +3 -0
  95. package/templates/workspace/.opencode/command/ws-spec-review.md +30 -0
  96. package/templates/workspace/.opencode/command/ws-verify-before-complete.md +27 -0
  97. package/templates/workspace/.opencode/commands/p-aiws-change-archive.md +27 -0
  98. package/templates/workspace/.opencode/commands/p-aiws-change-finish.md +27 -0
  99. package/templates/workspace/.opencode/commands/p-aiws-change-list.md +26 -0
  100. package/templates/workspace/.opencode/commands/p-aiws-change-new.md +27 -0
  101. package/templates/workspace/.opencode/commands/p-aiws-change-next.md +27 -0
  102. package/templates/workspace/.opencode/commands/p-aiws-change-start.md +27 -0
  103. package/templates/workspace/.opencode/commands/p-aiws-change-status.md +27 -0
  104. package/templates/workspace/.opencode/commands/p-aiws-change-sync.md +27 -0
  105. package/templates/workspace/.opencode/commands/p-aiws-change-templates-init.md +26 -0
  106. package/templates/workspace/.opencode/commands/p-aiws-change-templates-which.md +26 -0
  107. package/templates/workspace/.opencode/commands/p-aiws-change-validate.md +27 -0
  108. package/templates/workspace/.opencode/commands/p-aiws-hooks-install.md +26 -0
  109. package/templates/workspace/.opencode/commands/p-aiws-hooks-status.md +26 -0
  110. package/templates/workspace/.opencode/commands/p-aiws-init.md +23 -0
  111. package/templates/workspace/.opencode/commands/p-aiws-rollback.md +16 -0
  112. package/templates/workspace/.opencode/commands/p-aiws-update.md +22 -0
  113. package/templates/workspace/.opencode/commands/p-aiws-validate.md +17 -0
  114. package/templates/workspace/.opencode/commands/using-aiws.md +29 -0
  115. package/templates/workspace/.opencode/commands/ws-analyze.md +30 -0
  116. package/templates/workspace/.opencode/commands/ws-bugfix.md +35 -0
  117. package/templates/workspace/.opencode/commands/ws-commit.md +70 -0
  118. package/templates/workspace/.opencode/commands/ws-delegate.md +33 -0
  119. package/templates/workspace/.opencode/commands/ws-deliver.md +58 -0
  120. package/templates/workspace/.opencode/commands/ws-dev.md +36 -0
  121. package/templates/workspace/.opencode/commands/ws-finish.md +71 -0
  122. package/templates/workspace/.opencode/commands/ws-handoff.md +25 -0
  123. package/templates/workspace/.opencode/commands/ws-migrate.md +25 -0
  124. package/templates/workspace/.opencode/commands/ws-plan-verify.md +28 -0
  125. package/templates/workspace/.opencode/commands/ws-plan.md +27 -0
  126. package/templates/workspace/.opencode/commands/ws-preflight.md +34 -0
  127. package/templates/workspace/.opencode/commands/ws-pull.md +87 -0
  128. package/templates/workspace/.opencode/commands/ws-push.md +93 -0
  129. package/templates/workspace/.opencode/commands/ws-quality-review.md +30 -0
  130. package/templates/workspace/.opencode/commands/ws-req-change.md +45 -0
  131. package/templates/workspace/.opencode/commands/ws-req-contract-sync.md +21 -0
  132. package/templates/workspace/.opencode/commands/ws-req-contract-validate.md +16 -0
  133. package/templates/workspace/.opencode/commands/ws-req-flow-sync.md +23 -0
  134. package/templates/workspace/.opencode/commands/ws-req-review.md +36 -0
  135. package/templates/workspace/.opencode/commands/ws-review.md +33 -0
  136. package/templates/workspace/.opencode/commands/ws-rule.md +27 -0
  137. package/templates/workspace/.opencode/commands/ws-spec-review.md +30 -0
  138. package/templates/workspace/.opencode/commands/ws-submodule-setup.md +57 -0
  139. package/templates/workspace/.opencode/commands/ws-verify-before-complete.md +27 -0
  140. package/templates/workspace/.opencode/oh-my-opencode.json.example +17 -0
  141. package/templates/workspace/.opencode/skills/p-aiws-change-archive/SKILL.md +24 -0
  142. package/templates/workspace/.opencode/skills/p-aiws-change-finish/SKILL.md +24 -0
  143. package/templates/workspace/.opencode/skills/p-aiws-change-list/SKILL.md +18 -0
  144. package/templates/workspace/.opencode/skills/p-aiws-change-new/SKILL.md +26 -0
  145. package/templates/workspace/.opencode/skills/p-aiws-change-next/SKILL.md +19 -0
  146. package/templates/workspace/.opencode/skills/p-aiws-change-start/SKILL.md +33 -0
  147. package/templates/workspace/.opencode/skills/p-aiws-change-status/SKILL.md +19 -0
  148. package/templates/workspace/.opencode/skills/p-aiws-change-sync/SKILL.md +19 -0
  149. package/templates/workspace/.opencode/skills/p-aiws-change-templates-init/SKILL.md +18 -0
  150. package/templates/workspace/.opencode/skills/p-aiws-change-templates-which/SKILL.md +18 -0
  151. package/templates/workspace/.opencode/skills/p-aiws-change-validate/SKILL.md +23 -0
  152. package/templates/workspace/.opencode/skills/p-aiws-hooks-install/SKILL.md +30 -0
  153. package/templates/workspace/.opencode/skills/p-aiws-hooks-status/SKILL.md +18 -0
  154. package/templates/workspace/.opencode/skills/p-aiws-init/SKILL.md +27 -0
  155. package/templates/workspace/.opencode/skills/p-aiws-rollback/SKILL.md +18 -0
  156. package/templates/workspace/.opencode/skills/p-aiws-update/SKILL.md +26 -0
  157. package/templates/workspace/.opencode/skills/p-aiws-validate/SKILL.md +22 -0
  158. package/templates/workspace/.opencode/skills/p-tasks-plan/SKILL.md +37 -0
  159. package/templates/workspace/.opencode/skills/using-aiws/SKILL.md +87 -0
  160. package/templates/workspace/.opencode/skills/ws-analyze/SKILL.md +26 -0
  161. package/templates/workspace/.opencode/skills/ws-bugfix/SKILL.md +111 -0
  162. package/templates/workspace/.opencode/skills/ws-commit/SKILL.md +127 -0
  163. package/templates/workspace/.opencode/skills/ws-delegate/SKILL.md +63 -0
  164. package/templates/workspace/.opencode/skills/ws-deliver/SKILL.md +231 -0
  165. package/templates/workspace/.opencode/skills/ws-dev/SKILL.md +168 -0
  166. package/templates/workspace/.opencode/skills/ws-finish/SKILL.md +220 -0
  167. package/templates/workspace/.opencode/skills/ws-frontend-design/SKILL.md +126 -0
  168. package/templates/workspace/.opencode/skills/ws-handoff/SKILL.md +52 -0
  169. package/templates/workspace/.opencode/skills/ws-migrate/SKILL.md +54 -0
  170. package/templates/workspace/.opencode/skills/ws-plan/SKILL.md +148 -0
  171. package/templates/workspace/.opencode/skills/ws-plan-verify/SKILL.md +61 -0
  172. package/templates/workspace/.opencode/skills/ws-preflight/SKILL.md +60 -0
  173. package/templates/workspace/.opencode/skills/ws-pull/SKILL.md +119 -0
  174. package/templates/workspace/.opencode/skills/ws-push/SKILL.md +110 -0
  175. package/templates/workspace/.opencode/skills/ws-quality-review/SKILL.md +63 -0
  176. package/templates/workspace/.opencode/skills/ws-req-change/SKILL.md +41 -0
  177. package/templates/workspace/.opencode/skills/ws-req-contract-sync/SKILL.md +17 -0
  178. package/templates/workspace/.opencode/skills/ws-req-contract-validate/SKILL.md +12 -0
  179. package/templates/workspace/.opencode/skills/ws-req-flow-sync/SKILL.md +28 -0
  180. package/templates/workspace/.opencode/skills/ws-req-review/SKILL.md +32 -0
  181. package/templates/workspace/.opencode/skills/ws-review/SKILL.md +57 -0
  182. package/templates/workspace/.opencode/skills/ws-rule/SKILL.md +23 -0
  183. package/templates/workspace/.opencode/skills/ws-spec-review/SKILL.md +64 -0
  184. package/templates/workspace/.opencode/skills/ws-submodule-setup/SKILL.md +65 -0
  185. package/templates/workspace/.opencode/skills/ws-verify-before-complete/SKILL.md +59 -0
  186. package/templates/workspace/AGENTS.md +72 -30
  187. package/templates/workspace/changes/README.md +18 -0
  188. package/templates/workspace/changes/templates/proposal.md +15 -0
  189. package/templates/workspace/changes/templates/tasks.md +9 -2
  190. package/templates/workspace/manifest.json +277 -2
  191. package/templates/workspace/tools/ws_change_check.py +26 -4
@@ -0,0 +1,294 @@
1
+ {
2
+ "version": 1,
3
+ "description": "Machine-readable governance inference rules for aiws change status/next/dashboard.",
4
+ "governanceRules": [
5
+ {
6
+ "id": "strict_blockers",
7
+ "when": { "signal": "blockers_strict_count", "gt": 0 },
8
+ "currentStage": "ws-plan-verify",
9
+ "recommendedStage": "ws-plan-verify",
10
+ "rationale": "strict blockers remain unresolved"
11
+ },
12
+ {
13
+ "id": "unchecked_tasks",
14
+ "when": { "signal": "tasks_unchecked", "gt": 0 },
15
+ "currentStage": "ws-dev",
16
+ "recommendedStage": "ws-dev",
17
+ "rationale": "{tasks_unchecked} unchecked task(s) remain"
18
+ },
19
+ {
20
+ "id": "finish_completed",
21
+ "when": { "signal": "finish_state", "eq": "done" },
22
+ "currentStage": "ws-finish",
23
+ "recommendedStage": "ws-handoff",
24
+ "rationale": "finish completed; archive/handoff remains"
25
+ },
26
+ {
27
+ "id": "finish_failed",
28
+ "when": { "signal": "finish_state", "eq": "failed" },
29
+ "currentStage": "ws-finish",
30
+ "recommendedStage": "ws-finish",
31
+ "rationale": "finish started locally but push/cleanup failed; resolve and rerun finish"
32
+ },
33
+ {
34
+ "id": "finish_cleanup_pending",
35
+ "when": { "signal": "finish_state", "eq": "cleanup_pending" },
36
+ "currentStage": "ws-finish",
37
+ "recommendedStage": "ws-finish",
38
+ "rationale": "push completed but cleanup is still pending ({finish_state_reason}); resolve and rerun finish"
39
+ },
40
+ {
41
+ "id": "finish_local",
42
+ "when": { "signal": "finish_state", "eq": "local" },
43
+ "currentStage": "ws-finish",
44
+ "recommendedStage": "ws-finish",
45
+ "rationale": "finish started locally but is not fully completed yet"
46
+ },
47
+ {
48
+ "id": "review_missing",
49
+ "when": { "signal": "review_effective_count", "eq": 0 },
50
+ "currentStage": "ws-review",
51
+ "recommendedStage": "ws-review",
52
+ "rationale": "deliver-ready state has no review artifact yet"
53
+ },
54
+ {
55
+ "id": "dual_review_incomplete",
56
+ "when": { "signal": "dual_review_missing_count", "gt": 0 },
57
+ "currentStage": "ws-review",
58
+ "recommendedStage": "ws-review",
59
+ "rationale": "dual review gate incomplete (spec={spec_review_status}, quality={quality_review_status})"
60
+ },
61
+ {
62
+ "id": "review_conflicted",
63
+ "when": { "signal": "git_conflicted", "gt": 0 },
64
+ "currentStage": "ws-commit",
65
+ "recommendedStage": "ws-commit",
66
+ "rationale": "review exists but the change worktree still has merge conflicts"
67
+ },
68
+ {
69
+ "id": "review_dirty",
70
+ "when": { "signal": "git_total", "gt": 0 },
71
+ "currentStage": "ws-commit",
72
+ "recommendedStage": "ws-commit",
73
+ "rationale": "review exists but the change worktree is still dirty"
74
+ },
75
+ {
76
+ "id": "deliver_finish_gate_pending_submodules",
77
+ "when": {
78
+ "all": [
79
+ { "signal": "repo_submodules", "gt": 0 },
80
+ {
81
+ "any": [
82
+ { "signal": "evidence_persistent_count", "gt": 0 },
83
+ { "signal": "lifecycle_evidence_runs", "gt": 0 }
84
+ ]
85
+ },
86
+ { "signal": "finish_gate_missing_count", "gt": 0 }
87
+ ]
88
+ },
89
+ "currentStage": "ws-deliver",
90
+ "recommendedStage": "ws-deliver",
91
+ "rationale": "delivery evidence exists but finish gate is incomplete (missing={finish_gate_missing_count})"
92
+ },
93
+ {
94
+ "id": "deliver_finish_gate_pending",
95
+ "when": {
96
+ "all": [
97
+ {
98
+ "any": [
99
+ { "signal": "evidence_persistent_count", "gt": 0 },
100
+ { "signal": "lifecycle_evidence_runs", "gt": 0 }
101
+ ]
102
+ },
103
+ { "signal": "finish_gate_missing_count", "gt": 0 }
104
+ ]
105
+ },
106
+ "currentStage": "ws-deliver",
107
+ "recommendedStage": "ws-deliver",
108
+ "rationale": "delivery evidence exists but finish gate is incomplete (missing={finish_gate_missing_count})"
109
+ },
110
+ {
111
+ "id": "deliver_evidence_converged_submodules",
112
+ "when": {
113
+ "all": [
114
+ { "signal": "repo_submodules", "gt": 0 },
115
+ {
116
+ "any": [
117
+ { "signal": "evidence_persistent_count", "gt": 0 },
118
+ { "signal": "lifecycle_evidence_runs", "gt": 0 }
119
+ ]
120
+ },
121
+ { "signal": "finish_gate_missing_count", "eq": 0 }
122
+ ]
123
+ },
124
+ "currentStage": "ws-deliver",
125
+ "recommendedStage": "ws-finish",
126
+ "rationale": "delivery evidence and finish gate are converged; next step is submodule-aware finish"
127
+ },
128
+ {
129
+ "id": "deliver_evidence_converged",
130
+ "when": {
131
+ "all": [
132
+ {
133
+ "any": [
134
+ { "signal": "evidence_persistent_count", "gt": 0 },
135
+ { "signal": "lifecycle_evidence_runs", "gt": 0 }
136
+ ]
137
+ },
138
+ { "signal": "finish_gate_missing_count", "eq": 0 }
139
+ ]
140
+ },
141
+ "currentStage": "ws-deliver",
142
+ "recommendedStage": "ws-finish",
143
+ "rationale": "delivery evidence and finish gate are converged; next step is safe finish"
144
+ },
145
+ {
146
+ "id": "deliver_evidence_pending_submodules",
147
+ "when": { "signal": "repo_submodules", "gt": 0 },
148
+ "currentStage": "ws-deliver",
149
+ "recommendedStage": "ws-deliver",
150
+ "rationale": "submodule-aware delivery/evidence convergence is still required"
151
+ },
152
+ {
153
+ "id": "deliver_evidence_pending",
154
+ "when": {},
155
+ "currentStage": "ws-deliver",
156
+ "recommendedStage": "ws-deliver",
157
+ "rationale": "delivery evidence is still required before finish"
158
+ }
159
+ ],
160
+ "guidanceRules": [
161
+ {
162
+ "id": "guidance_plan_verify",
163
+ "when": { "signal": "governance_current_stage", "eq": "ws-plan-verify" },
164
+ "lines": [
165
+ "先修复 strict blockers,再复跑 `aiws change validate <id> --strict`"
166
+ ]
167
+ },
168
+ {
169
+ "id": "guidance_dev",
170
+ "when": { "signal": "governance_current_stage", "eq": "ws-dev" },
171
+ "lines": [
172
+ "继续开发:在 AI 工具中运行 `$ws-dev`(小步实现 + 可复现验证)"
173
+ ]
174
+ },
175
+ {
176
+ "id": "guidance_review",
177
+ "when": { "signal": "governance_current_stage", "eq": "ws-review" },
178
+ "lines": [
179
+ "进入审计:在 AI 工具中运行 `$ws-review`(形成 review 结论后再进入提交/交付)"
180
+ ]
181
+ },
182
+ {
183
+ "id": "guidance_review_spec_missing",
184
+ "when": { "signal": "spec_review_ready", "falsy": true },
185
+ "lines": [
186
+ "补齐流程审查:运行 `$ws-spec-review`,并落盘 `changes/<change-id>/review/spec-review.md`"
187
+ ]
188
+ },
189
+ {
190
+ "id": "guidance_review_quality_missing",
191
+ "when": { "signal": "quality_review_ready", "falsy": true },
192
+ "lines": [
193
+ "补齐质量审查:运行 `$ws-quality-review`,并落盘 `changes/<change-id>/review/quality-review.md`"
194
+ ]
195
+ },
196
+ {
197
+ "id": "guidance_commit",
198
+ "when": { "signal": "governance_current_stage", "eq": "ws-commit" },
199
+ "lines": [
200
+ "进入提交门:在 AI 工具中运行 `$ws-commit`(review + validate stamp + commit message 确认)"
201
+ ]
202
+ },
203
+ {
204
+ "id": "guidance_commit_stage_scope",
205
+ "when": {
206
+ "all": [
207
+ { "signal": "governance_current_stage", "eq": "ws-commit" },
208
+ { "signal": "git_staged", "eq": 0 }
209
+ ]
210
+ },
211
+ "lines": [
212
+ "进入 `$ws-commit` 前,先明确 staging 范围(例如 `git add <path>` 或 `git add -p`)"
213
+ ]
214
+ },
215
+ {
216
+ "id": "guidance_deliver",
217
+ "when": { "signal": "governance_current_stage", "eq": "ws-deliver" },
218
+ "lines": [
219
+ "进入交付收敛:在 AI 工具中运行 `$ws-deliver`(证据收敛 + submodule 感知提交)"
220
+ ]
221
+ },
222
+ {
223
+ "id": "guidance_deliver_validate_missing",
224
+ "when": {
225
+ "all": [
226
+ { "signal": "governance_current_stage", "eq": "ws-deliver" },
227
+ { "signal": "validate_stamp_ready", "falsy": true }
228
+ ]
229
+ },
230
+ "lines": [
231
+ "补齐 validate stamp:运行 `aiws validate . --stamp`"
232
+ ]
233
+ },
234
+ {
235
+ "id": "guidance_deliver_verify_before_complete_missing",
236
+ "when": {
237
+ "all": [
238
+ { "signal": "governance_current_stage", "eq": "ws-deliver" },
239
+ { "signal": "verify_before_complete_ready", "falsy": true }
240
+ ]
241
+ },
242
+ "lines": [
243
+ "补齐完成前 gate:运行 `$ws-verify-before-complete`,并落盘 `changes/<change-id>/evidence/verify-before-complete.md`"
244
+ ]
245
+ },
246
+ {
247
+ "id": "guidance_deliver_finish",
248
+ "when": {
249
+ "all": [
250
+ { "signal": "governance_current_stage", "eq": "ws-deliver" },
251
+ { "signal": "governance_recommended_stage", "eq": "ws-finish" }
252
+ ]
253
+ },
254
+ "lines": [
255
+ "交付工件齐全后,进入 `$ws-finish`(安全合并 + push + cleanup)"
256
+ ]
257
+ },
258
+ {
259
+ "id": "guidance_finish_cleanup_pending",
260
+ "when": { "signal": "governance_rule_id", "eq": "finish_cleanup_pending" },
261
+ "lines": [
262
+ "push 已完成,但 cleanup 仍未完成({finish_state_reason});清理对应 worktree 后重跑 `$ws-finish`"
263
+ ]
264
+ },
265
+ {
266
+ "id": "guidance_finish_handoff",
267
+ "when": { "signal": "governance_rule_id", "eq": "finish_completed" },
268
+ "lines": [
269
+ "收尾已完成:下一步运行 `$ws-handoff`,并归档 change"
270
+ ]
271
+ },
272
+ {
273
+ "id": "guidance_finish_retry",
274
+ "when": { "signal": "governance_rule_id", "in": ["finish_failed", "finish_local"] },
275
+ "lines": [
276
+ "收尾未完整完成:检查 push / cleanup / submodule 状态后重跑 `$ws-finish`"
277
+ ]
278
+ },
279
+ {
280
+ "id": "guidance_handoff",
281
+ "when": { "signal": "governance_current_stage", "eq": "ws-handoff" },
282
+ "lines": [
283
+ "进入交接:在 AI 工具中运行 `$ws-handoff`,并生成/检查归档 handoff"
284
+ ]
285
+ },
286
+ {
287
+ "id": "guidance_default",
288
+ "when": { "signal": "governance_current_stage", "eq": "" },
289
+ "lines": [
290
+ "按阶段契约继续推进当前 change"
291
+ ]
292
+ }
293
+ ]
294
+ }
@@ -0,0 +1,63 @@
1
+ # workflow-governance-rules
2
+
3
+ <!-- Generated from packages/spec/docs/workflow-governance-rules.json by scripts/sync-workflow-governance-rules.mjs. Do not hand edit. -->
4
+
5
+ ## 目的
6
+
7
+ 这份文档描述 `aiws change status` / `change next` / dashboard 共用的阶段推断规则真值。
8
+ 运行时应读取 `workflow-governance-rules.json`;本文件保留为人类可读说明。
9
+
10
+ ## 概览
11
+
12
+ - version: `1`
13
+ - description: Machine-readable governance inference rules for aiws change status/next/dashboard.
14
+ - governance rules: 16
15
+ - guidance rules: 16
16
+
17
+ ## 阶段推断规则
18
+
19
+ | Rule ID | Match | Current | Next | Rationale |
20
+ | --- | --- | --- | --- | --- |
21
+ | `strict_blockers` | `blockers_strict_count` > 0 | `ws-plan-verify` | `ws-plan-verify` | strict blockers remain unresolved |
22
+ | `unchecked_tasks` | `tasks_unchecked` > 0 | `ws-dev` | `ws-dev` | {tasks_unchecked} unchecked task(s) remain |
23
+ | `finish_completed` | `finish_state` == `done` | `ws-finish` | `ws-handoff` | finish completed; archive/handoff remains |
24
+ | `finish_failed` | `finish_state` == `failed` | `ws-finish` | `ws-finish` | finish started locally but push/cleanup failed; resolve and rerun finish |
25
+ | `finish_cleanup_pending` | `finish_state` == `cleanup_pending` | `ws-finish` | `ws-finish` | push completed but cleanup is still pending ({finish_state_reason}); resolve and rerun finish |
26
+ | `finish_local` | `finish_state` == `local` | `ws-finish` | `ws-finish` | finish started locally but is not fully completed yet |
27
+ | `review_missing` | `review_effective_count` == `0` | `ws-review` | `ws-review` | deliver-ready state has no review artifact yet |
28
+ | `dual_review_incomplete` | `dual_review_missing_count` > 0 | `ws-review` | `ws-review` | dual review gate incomplete (spec={spec_review_status}, quality={quality_review_status}) |
29
+ | `review_conflicted` | `git_conflicted` > 0 | `ws-commit` | `ws-commit` | review exists but the change worktree still has merge conflicts |
30
+ | `review_dirty` | `git_total` > 0 | `ws-commit` | `ws-commit` | review exists but the change worktree is still dirty |
31
+ | `deliver_finish_gate_pending_submodules` | (`repo_submodules` > 0) AND ((`evidence_persistent_count` > 0) OR (`lifecycle_evidence_runs` > 0)) AND (`finish_gate_missing_count` > 0) | `ws-deliver` | `ws-deliver` | delivery evidence exists but finish gate is incomplete (missing={finish_gate_missing_count}) |
32
+ | `deliver_finish_gate_pending` | ((`evidence_persistent_count` > 0) OR (`lifecycle_evidence_runs` > 0)) AND (`finish_gate_missing_count` > 0) | `ws-deliver` | `ws-deliver` | delivery evidence exists but finish gate is incomplete (missing={finish_gate_missing_count}) |
33
+ | `deliver_evidence_converged_submodules` | (`repo_submodules` > 0) AND ((`evidence_persistent_count` > 0) OR (`lifecycle_evidence_runs` > 0)) AND (`finish_gate_missing_count` == `0`) | `ws-deliver` | `ws-finish` | delivery evidence and finish gate are converged; next step is submodule-aware finish |
34
+ | `deliver_evidence_converged` | ((`evidence_persistent_count` > 0) OR (`lifecycle_evidence_runs` > 0)) AND (`finish_gate_missing_count` == `0`) | `ws-deliver` | `ws-finish` | delivery evidence and finish gate are converged; next step is safe finish |
35
+ | `deliver_evidence_pending_submodules` | `repo_submodules` > 0 | `ws-deliver` | `ws-deliver` | submodule-aware delivery/evidence convergence is still required |
36
+ | `deliver_evidence_pending` | (default) | `ws-deliver` | `ws-deliver` | delivery evidence is still required before finish |
37
+
38
+ ## Guidance 规则
39
+
40
+ | Rule ID | Match | Guidance |
41
+ | --- | --- | --- |
42
+ | `guidance_plan_verify` | `governance_current_stage` == `ws-plan-verify` | 先修复 strict blockers,再复跑 `aiws change validate <id> --strict` |
43
+ | `guidance_dev` | `governance_current_stage` == `ws-dev` | 继续开发:在 AI 工具中运行 `$ws-dev`(小步实现 + 可复现验证) |
44
+ | `guidance_review` | `governance_current_stage` == `ws-review` | 进入审计:在 AI 工具中运行 `$ws-review`(形成 review 结论后再进入提交/交付) |
45
+ | `guidance_review_spec_missing` | `spec_review_ready` is falsy | 补齐流程审查:运行 `$ws-spec-review`,并落盘 `changes/<change-id>/review/spec-review.md` |
46
+ | `guidance_review_quality_missing` | `quality_review_ready` is falsy | 补齐质量审查:运行 `$ws-quality-review`,并落盘 `changes/<change-id>/review/quality-review.md` |
47
+ | `guidance_commit` | `governance_current_stage` == `ws-commit` | 进入提交门:在 AI 工具中运行 `$ws-commit`(review + validate stamp + commit message 确认) |
48
+ | `guidance_commit_stage_scope` | (`governance_current_stage` == `ws-commit`) AND (`git_staged` == `0`) | 进入 `$ws-commit` 前,先明确 staging 范围(例如 `git add <path>` 或 `git add -p`) |
49
+ | `guidance_deliver` | `governance_current_stage` == `ws-deliver` | 进入交付收敛:在 AI 工具中运行 `$ws-deliver`(证据收敛 + submodule 感知提交) |
50
+ | `guidance_deliver_validate_missing` | (`governance_current_stage` == `ws-deliver`) AND (`validate_stamp_ready` is falsy) | 补齐 validate stamp:运行 `aiws validate . --stamp` |
51
+ | `guidance_deliver_verify_before_complete_missing` | (`governance_current_stage` == `ws-deliver`) AND (`verify_before_complete_ready` is falsy) | 补齐完成前 gate:运行 `$ws-verify-before-complete`,并落盘 `changes/<change-id>/evidence/verify-before-complete.md` |
52
+ | `guidance_deliver_finish` | (`governance_current_stage` == `ws-deliver`) AND (`governance_recommended_stage` == `ws-finish`) | 交付工件齐全后,进入 `$ws-finish`(安全合并 + push + cleanup) |
53
+ | `guidance_finish_cleanup_pending` | `governance_rule_id` == `finish_cleanup_pending` | push 已完成,但 cleanup 仍未完成({finish_state_reason});清理对应 worktree 后重跑 `$ws-finish` |
54
+ | `guidance_finish_handoff` | `governance_rule_id` == `finish_completed` | 收尾已完成:下一步运行 `$ws-handoff`,并归档 change |
55
+ | `guidance_finish_retry` | `governance_rule_id` in [`finish_failed`, `finish_local`] | 收尾未完整完成:检查 push / cleanup / submodule 状态后重跑 `$ws-finish` |
56
+ | `guidance_handoff` | `governance_current_stage` == `ws-handoff` | 进入交接:在 AI 工具中运行 `$ws-handoff`,并生成/检查归档 handoff |
57
+ | `guidance_default` | `governance_current_stage` == `` | 按阶段契约继续推进当前 change |
58
+
59
+ ## 说明
60
+
61
+ - 规则按数组顺序匹配,先命中者优先。
62
+ - `governance.ruleId` 应对应上表中的 `Rule ID`,便于状态诊断。
63
+ - 若需要补充背景说明,请编辑 JSON 真值,再重新生成本文件。
@@ -0,0 +1,182 @@
1
+ {
2
+ "type": "object",
3
+ "required": ["version", "description", "governanceRules", "guidanceRules"],
4
+ "properties": {
5
+ "version": { "type": "integer" },
6
+ "description": { "type": "string", "minLength": 1 },
7
+ "governanceRules": {
8
+ "type": "array",
9
+ "minItems": 1,
10
+ "items": {
11
+ "type": "object",
12
+ "required": ["id", "when", "currentStage", "recommendedStage", "rationale"],
13
+ "properties": {
14
+ "id": { "type": "string", "minLength": 1, "pattern": "^[a-z0-9_]+$" },
15
+ "when": { "$ref": "#/$defs/condition" },
16
+ "currentStage": { "type": "string", "minLength": 1, "pattern": "^ws-[a-z0-9-]+$" },
17
+ "recommendedStage": { "type": "string", "minLength": 1, "pattern": "^ws-[a-z0-9-]+$" },
18
+ "rationale": { "type": "string", "minLength": 1 }
19
+ },
20
+ "additionalProperties": false
21
+ }
22
+ },
23
+ "guidanceRules": {
24
+ "type": "array",
25
+ "minItems": 1,
26
+ "items": {
27
+ "type": "object",
28
+ "required": ["id", "when", "lines"],
29
+ "properties": {
30
+ "id": { "type": "string", "minLength": 1, "pattern": "^[a-z0-9_]+$" },
31
+ "when": { "$ref": "#/$defs/condition" },
32
+ "lines": {
33
+ "type": "array",
34
+ "minItems": 1,
35
+ "items": { "type": "string", "minLength": 1 }
36
+ }
37
+ },
38
+ "additionalProperties": false
39
+ }
40
+ }
41
+ },
42
+ "additionalProperties": false,
43
+ "$defs": {
44
+ "condition": {
45
+ "anyOf": [
46
+ {
47
+ "type": "object",
48
+ "maxProperties": 0,
49
+ "additionalProperties": false
50
+ },
51
+ {
52
+ "type": "object",
53
+ "required": ["all"],
54
+ "properties": {
55
+ "all": {
56
+ "type": "array",
57
+ "minItems": 1,
58
+ "items": { "$ref": "#/$defs/condition" }
59
+ }
60
+ },
61
+ "additionalProperties": false
62
+ },
63
+ {
64
+ "type": "object",
65
+ "required": ["any"],
66
+ "properties": {
67
+ "any": {
68
+ "type": "array",
69
+ "minItems": 1,
70
+ "items": { "$ref": "#/$defs/condition" }
71
+ }
72
+ },
73
+ "additionalProperties": false
74
+ },
75
+ {
76
+ "type": "object",
77
+ "required": ["not"],
78
+ "properties": {
79
+ "not": { "$ref": "#/$defs/condition" }
80
+ },
81
+ "additionalProperties": false
82
+ },
83
+ {
84
+ "type": "object",
85
+ "required": ["signal", "eq"],
86
+ "properties": {
87
+ "signal": { "type": "string", "minLength": 1, "pattern": "^[a-z0-9_]+$" },
88
+ "eq": {}
89
+ },
90
+ "additionalProperties": false
91
+ },
92
+ {
93
+ "type": "object",
94
+ "required": ["signal", "ne"],
95
+ "properties": {
96
+ "signal": { "type": "string", "minLength": 1, "pattern": "^[a-z0-9_]+$" },
97
+ "ne": {}
98
+ },
99
+ "additionalProperties": false
100
+ },
101
+ {
102
+ "type": "object",
103
+ "required": ["signal", "gt"],
104
+ "properties": {
105
+ "signal": { "type": "string", "minLength": 1, "pattern": "^[a-z0-9_]+$" },
106
+ "gt": { "type": "number" }
107
+ },
108
+ "additionalProperties": false
109
+ },
110
+ {
111
+ "type": "object",
112
+ "required": ["signal", "gte"],
113
+ "properties": {
114
+ "signal": { "type": "string", "minLength": 1, "pattern": "^[a-z0-9_]+$" },
115
+ "gte": { "type": "number" }
116
+ },
117
+ "additionalProperties": false
118
+ },
119
+ {
120
+ "type": "object",
121
+ "required": ["signal", "lt"],
122
+ "properties": {
123
+ "signal": { "type": "string", "minLength": 1, "pattern": "^[a-z0-9_]+$" },
124
+ "lt": { "type": "number" }
125
+ },
126
+ "additionalProperties": false
127
+ },
128
+ {
129
+ "type": "object",
130
+ "required": ["signal", "lte"],
131
+ "properties": {
132
+ "signal": { "type": "string", "minLength": 1, "pattern": "^[a-z0-9_]+$" },
133
+ "lte": { "type": "number" }
134
+ },
135
+ "additionalProperties": false
136
+ },
137
+ {
138
+ "type": "object",
139
+ "required": ["signal", "in"],
140
+ "properties": {
141
+ "signal": { "type": "string", "minLength": 1, "pattern": "^[a-z0-9_]+$" },
142
+ "in": {
143
+ "type": "array",
144
+ "minItems": 1
145
+ }
146
+ },
147
+ "additionalProperties": false
148
+ },
149
+ {
150
+ "type": "object",
151
+ "required": ["signal", "notIn"],
152
+ "properties": {
153
+ "signal": { "type": "string", "minLength": 1, "pattern": "^[a-z0-9_]+$" },
154
+ "notIn": {
155
+ "type": "array",
156
+ "minItems": 1
157
+ }
158
+ },
159
+ "additionalProperties": false
160
+ },
161
+ {
162
+ "type": "object",
163
+ "required": ["signal", "truthy"],
164
+ "properties": {
165
+ "signal": { "type": "string", "minLength": 1, "pattern": "^[a-z0-9_]+$" },
166
+ "truthy": { "type": "boolean", "const": true }
167
+ },
168
+ "additionalProperties": false
169
+ },
170
+ {
171
+ "type": "object",
172
+ "required": ["signal", "falsy"],
173
+ "properties": {
174
+ "signal": { "type": "string", "minLength": 1, "pattern": "^[a-z0-9_]+$" },
175
+ "falsy": { "type": "boolean", "const": true }
176
+ },
177
+ "additionalProperties": false
178
+ }
179
+ ]
180
+ }
181
+ }
182
+ }
@@ -0,0 +1,72 @@
1
+ {
2
+ "version": 1,
3
+ "title": "workflow-review-gates",
4
+ "description": "Machine-readable dual-review and pre-complete verification gates for aiws.",
5
+ "purpose": [
6
+ "这份文档把 `ws-review` 进一步拆成可复用的 review gate:一类检查 workflow/spec/gate 是否完整,一类检查实现质量与回归风险。",
7
+ "同时增加完成前验证 gate,避免只有 review 文件存在,却没有 validate stamp、交付证据或 finish 前检查的伪完成状态。"
8
+ ],
9
+ "gates": [
10
+ {
11
+ "id": "spec_review",
12
+ "name": "ws-spec-review",
13
+ "stage": "review",
14
+ "focus": "requirements 归因、plan/change 绑定、证据路径、流程 gate 与危险操作边界",
15
+ "mustRead": "AI_PROJECT.md;REQUIREMENTS.md;AI_WORKSPACE.md;plan/...;changes/<change-id>/...",
16
+ "mustWrite": "changes/<change-id>/review/spec-review.md(无法识别 change 时回退 .agentdocs/tmp/review/spec-review.md)",
17
+ "blockers": "无法定位真值文件;无法确认变更归因;无法写 review 证据",
18
+ "exitCriteria": "已给出流程/真值层 blockers、scope/gate 问题与最小修复建议",
19
+ "next": "ws-quality-review 或修复后重审"
20
+ },
21
+ {
22
+ "id": "quality_review",
23
+ "name": "ws-quality-review",
24
+ "stage": "review",
25
+ "focus": "行为回归、边界条件、测试覆盖、实现质量、可维护性",
26
+ "mustRead": "git diff;验证结果;相关代码/配置;已有 review/analysis/patches 工件",
27
+ "mustWrite": "changes/<change-id>/review/quality-review.md(无法识别 change 时回退 .agentdocs/tmp/review/quality-review.md)",
28
+ "blockers": "没有可审改动;没有验证上下文;无法写 review 证据",
29
+ "exitCriteria": "已给出高优先级缺陷/风险、测试缺口和最小验证建议",
30
+ "next": "ws-verify-before-complete 或修复后重审"
31
+ },
32
+ {
33
+ "id": "verify_before_complete",
34
+ "name": "ws-verify-before-complete",
35
+ "stage": "finish_gate",
36
+ "focus": "finish / handoff 前检查 review、validate、evidence 与 completion gate 是否齐全",
37
+ "mustRead": "changes/<change-id>/review/...;.agentdocs/tmp/aiws-validate/*.json;changes/<change-id>/evidence/...;git status",
38
+ "mustWrite": "changes/<change-id>/evidence/verify-before-complete.md(无法识别 change 时回退 .agentdocs/tmp/review/verify-before-complete.md)",
39
+ "blockers": "缺少 spec review;缺少 quality review;缺少 validate stamp;存在未关闭 blocker",
40
+ "exitCriteria": "已明确 pass/fail、缺失项与是否可进入 ws-finish / ws-handoff",
41
+ "next": "ws-finish / ws-handoff 或回退前置 gate"
42
+ }
43
+ ],
44
+ "unifiedRules": [
45
+ "spec review 与 quality review 关注点不同;不能用单一 review 文件同时替代两者而不明确区分。",
46
+ "双审查的最小要求是留下两份可审计 review 证据,而不是口头说“已经 review 过”。",
47
+ "verify-before-complete 不负责替代 finish;它只负责判断是否已经具备进入 finish / handoff 的前置条件。",
48
+ "若 review 结论里仍有 blocker,则不得把状态表述为 ready-to-finish。"
49
+ ],
50
+ "evidence": [
51
+ {
52
+ "label": "spec review",
53
+ "value": "changes/<change-id>/review/spec-review.md"
54
+ },
55
+ {
56
+ "label": "quality review",
57
+ "value": "changes/<change-id>/review/quality-review.md"
58
+ },
59
+ {
60
+ "label": "validate stamp",
61
+ "value": ".agentdocs/tmp/aiws-validate/*.json"
62
+ },
63
+ {
64
+ "label": "pre-complete summary",
65
+ "value": "changes/<change-id>/evidence/verify-before-complete.md"
66
+ }
67
+ ],
68
+ "notes": [
69
+ "`ws-review` 仍保留为通用评审入口;在高风险或准备 finish 的任务里,应进一步细化到 `ws-spec-review` + `ws-quality-review`。",
70
+ "这份真值当前主要服务 skill/command 文案和人工 gate;后续若需要,再由 dashboard 或 validate 消费。"
71
+ ]
72
+ }
@@ -0,0 +1,36 @@
1
+ # workflow-review-gates
2
+
3
+ <!-- Generated from packages/spec/docs/workflow-review-gates.json by scripts/sync-workflow-review-gates.mjs. Do not hand edit. -->
4
+
5
+ ## 目的
6
+
7
+ 这份文档把 `ws-review` 进一步拆成可复用的 review gate:一类检查 workflow/spec/gate 是否完整,一类检查实现质量与回归风险。
8
+
9
+ 同时增加完成前验证 gate,避免只有 review 文件存在,却没有 validate stamp、交付证据或 finish 前检查的伪完成状态。
10
+
11
+ ## Gate 表
12
+
13
+ | Gate | Stage | Focus | Must Read | Must Write | Blockers | Exit | Next |
14
+ | --- | --- | --- | --- | --- | --- | --- | --- |
15
+ | `ws-spec-review` | review | requirements 归因、plan/change 绑定、证据路径、流程 gate 与危险操作边界 | AI_PROJECT.md;REQUIREMENTS.md;AI_WORKSPACE.md;plan/...;changes/<change-id>/... | changes/<change-id>/review/spec-review.md(无法识别 change 时回退 .agentdocs/tmp/review/spec-review.md) | 无法定位真值文件;无法确认变更归因;无法写 review 证据 | 已给出流程/真值层 blockers、scope/gate 问题与最小修复建议 | ws-quality-review 或修复后重审 |
16
+ | `ws-quality-review` | review | 行为回归、边界条件、测试覆盖、实现质量、可维护性 | git diff;验证结果;相关代码/配置;已有 review/analysis/patches 工件 | changes/<change-id>/review/quality-review.md(无法识别 change 时回退 .agentdocs/tmp/review/quality-review.md) | 没有可审改动;没有验证上下文;无法写 review 证据 | 已给出高优先级缺陷/风险、测试缺口和最小验证建议 | ws-verify-before-complete 或修复后重审 |
17
+ | `ws-verify-before-complete` | finish_gate | finish / handoff 前检查 review、validate、evidence 与 completion gate 是否齐全 | changes/<change-id>/review/...;.agentdocs/tmp/aiws-validate/*.json;changes/<change-id>/evidence/...;git status | changes/<change-id>/evidence/verify-before-complete.md(无法识别 change 时回退 .agentdocs/tmp/review/verify-before-complete.md) | 缺少 spec review;缺少 quality review;缺少 validate stamp;存在未关闭 blocker | 已明确 pass/fail、缺失项与是否可进入 ws-finish / ws-handoff | ws-finish / ws-handoff 或回退前置 gate |
18
+
19
+ ## 统一规则
20
+
21
+ - spec review 与 quality review 关注点不同;不能用单一 review 文件同时替代两者而不明确区分。
22
+ - 双审查的最小要求是留下两份可审计 review 证据,而不是口头说“已经 review 过”。
23
+ - verify-before-complete 不负责替代 finish;它只负责判断是否已经具备进入 finish / handoff 的前置条件。
24
+ - 若 review 结论里仍有 blocker,则不得把状态表述为 ready-to-finish。
25
+
26
+ ## 证据约定
27
+
28
+ - spec review:changes/<change-id>/review/spec-review.md
29
+ - quality review:changes/<change-id>/review/quality-review.md
30
+ - validate stamp:.agentdocs/tmp/aiws-validate/*.json
31
+ - pre-complete summary:changes/<change-id>/evidence/verify-before-complete.md
32
+
33
+ ## 说明
34
+
35
+ - `ws-review` 仍保留为通用评审入口;在高风险或准备 finish 的任务里,应进一步细化到 `ws-spec-review` + `ws-quality-review`。
36
+ - 这份真值当前主要服务 skill/command 文案和人工 gate;后续若需要,再由 dashboard 或 validate 消费。