super-engineer-workflow 0.1.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 (53) hide show
  1. package/CHANGELOG.md +9 -0
  2. package/CONTRIBUTING.md +34 -0
  3. package/LICENSE +21 -0
  4. package/README.md +300 -0
  5. package/SECURITY.md +21 -0
  6. package/bin/super-engineer.js +19 -0
  7. package/docs/se/345/221/275/344/273/244/345/215/217/350/256/256.md +335 -0
  8. package/docs//344/270/255/346/226/207/344/275/277/347/224/250/346/211/213/345/206/214.md +707 -0
  9. package/docs//345/205/254/345/274/200/345/217/221/345/270/203/346/243/200/346/237/245/346/270/205/345/215/225.md +43 -0
  10. package/docs//345/277/253/351/200/237/345/210/235/345/247/213/345/214/226/345/267/245/344/275/234/345/214/272.md +419 -0
  11. package/docs//351/241/271/347/233/256/346/236/266/346/236/204/344/270/216/350/256/276/350/256/241/350/257/264/346/230/216.md +657 -0
  12. package/package.json +55 -0
  13. package/scripts/se-cli.py +301 -0
  14. package/scripts/se-setup.py +331 -0
  15. package/scripts/se-smoke-test.py +86 -0
  16. package/super-engineer-workflow/SKILL.md +439 -0
  17. package/super-engineer-workflow/adapters/go.yml +8 -0
  18. package/super-engineer-workflow/adapters/java-gradle.yml +8 -0
  19. package/super-engineer-workflow/adapters/java-maven.yml +8 -0
  20. package/super-engineer-workflow/adapters/node-react.yml +8 -0
  21. package/super-engineer-workflow/adapters/node-vue.yml +8 -0
  22. package/super-engineer-workflow/adapters/python.yml +8 -0
  23. package/super-engineer-workflow/agents/openai.yaml +4 -0
  24. package/super-engineer-workflow/assets/config-schema.json +100 -0
  25. package/super-engineer-workflow/assets/config.example.yml +12 -0
  26. package/super-engineer-workflow/assets/plan-schema.json +362 -0
  27. package/super-engineer-workflow/assets/status-schema.json +83 -0
  28. package/super-engineer-workflow/assets/workspace.example.yml +25 -0
  29. package/super-engineer-workflow/config.example.yml +12 -0
  30. package/super-engineer-workflow/references/contracts.md +39 -0
  31. package/super-engineer-workflow/references/execution-modes.md +38 -0
  32. package/super-engineer-workflow/references/java.md +21 -0
  33. package/super-engineer-workflow/references/planning.md +45 -0
  34. package/super-engineer-workflow/references/platform-openclaw.md +10 -0
  35. package/super-engineer-workflow/references/project-docs.md +7 -0
  36. package/super-engineer-workflow/references/review-checklist.md +26 -0
  37. package/super-engineer-workflow/references/se-commands.md +582 -0
  38. package/super-engineer-workflow/references/verify-checklist.md +45 -0
  39. package/super-engineer-workflow/references/workflow.md +208 -0
  40. package/super-engineer-workflow/scripts/archive-openspec.py +110 -0
  41. package/super-engineer-workflow/scripts/bootstrap-openspec.py +42 -0
  42. package/super-engineer-workflow/scripts/common.py +3285 -0
  43. package/super-engineer-workflow/scripts/generate-discovery.py +185 -0
  44. package/super-engineer-workflow/scripts/generate-review-report.py +296 -0
  45. package/super-engineer-workflow/scripts/generate-self-check.py +185 -0
  46. package/super-engineer-workflow/scripts/generate-smart-plan.py +429 -0
  47. package/super-engineer-workflow/scripts/init-workspace.py +68 -0
  48. package/super-engineer-workflow/scripts/prepare-archive-openspec.py +186 -0
  49. package/super-engineer-workflow/scripts/propose-openspec.py +170 -0
  50. package/super-engineer-workflow/scripts/run-verify-and-report.py +399 -0
  51. package/super-engineer-workflow/scripts/run-workflow.py +506 -0
  52. package/super-engineer-workflow/scripts/update-status.py +43 -0
  53. package/super-engineer-workflow/scripts/writeback-openspec.py +311 -0
@@ -0,0 +1,100 @@
1
+ {
2
+ "$schema": "https://json-schema.org/draft/2020-12/schema",
3
+ "title": "super-engineer workspace.yml",
4
+ "type": "object",
5
+ "required": ["version", "mode", "workflow_source", "todo_file", "reference_files", "code_path", "output_dir"],
6
+ "additionalProperties": false,
7
+ "properties": {
8
+ "version": {
9
+ "type": "integer",
10
+ "const": 1
11
+ },
12
+ "mode": {
13
+ "type": "string",
14
+ "enum": ["manual", "auto"]
15
+ },
16
+ "workflow_source": {
17
+ "type": "string",
18
+ "enum": ["todo", "openspec"],
19
+ "default": "todo"
20
+ },
21
+ "vars": {
22
+ "type": "object",
23
+ "additionalProperties": {
24
+ "type": ["string", "number", "boolean"]
25
+ }
26
+ },
27
+ "demand_file": {
28
+ "type": "string"
29
+ },
30
+ "todo_file": {
31
+ "type": "string",
32
+ "minLength": 1
33
+ },
34
+ "reference_files": {
35
+ "type": "array",
36
+ "items": {
37
+ "type": "string",
38
+ "minLength": 1
39
+ },
40
+ "default": []
41
+ },
42
+ "code_path": {
43
+ "type": "string",
44
+ "minLength": 1
45
+ },
46
+ "output_dir": {
47
+ "type": "string",
48
+ "minLength": 1
49
+ },
50
+ "verify_commands": {
51
+ "oneOf": [
52
+ {
53
+ "type": "string",
54
+ "minLength": 1
55
+ },
56
+ {
57
+ "type": "object",
58
+ "additionalProperties": {
59
+ "type": "string",
60
+ "minLength": 1
61
+ }
62
+ }
63
+ ]
64
+ },
65
+ "openspec": {
66
+ "type": "object",
67
+ "additionalProperties": false,
68
+ "properties": {
69
+ "changes_dir": {
70
+ "type": "string",
71
+ "minLength": 1
72
+ },
73
+ "change_dir": {
74
+ "type": "string",
75
+ "minLength": 1
76
+ },
77
+ "tasks_file": {
78
+ "type": "string",
79
+ "minLength": 1
80
+ },
81
+ "proposal_file": {
82
+ "type": "string",
83
+ "minLength": 1
84
+ },
85
+ "design_file": {
86
+ "type": "string",
87
+ "minLength": 1
88
+ },
89
+ "specs_dir": {
90
+ "type": "string",
91
+ "minLength": 1
92
+ },
93
+ "writeback_dir": {
94
+ "type": "string",
95
+ "minLength": 1
96
+ }
97
+ }
98
+ }
99
+ }
100
+ }
@@ -0,0 +1,12 @@
1
+ version: 1
2
+ notification:
3
+ pushplus:
4
+ token: ""
5
+ ordinary:
6
+ enabled: false
7
+ channel: wechat
8
+ template: markdown
9
+ feishu:
10
+ enabled: false
11
+ webhook_url: "https://open.feishu.cn/open-apis/bot/v2/hook/your-webhook"
12
+ secret: ""
@@ -0,0 +1,362 @@
1
+ {
2
+ "$schema": "https://json-schema.org/draft/2020-12/schema",
3
+ "title": "super-engineer plan",
4
+ "type": "object",
5
+ "required": [
6
+ "session_id",
7
+ "constraints",
8
+ "todo_progress",
9
+ "task_modules",
10
+ "task_breakdown",
11
+ "requirement_summary",
12
+ "assumptions",
13
+ "workspace",
14
+ "configured_code_path",
15
+ "resolved_code_path",
16
+ "resolved_code_paths",
17
+ "service_hints",
18
+ "service_resolution",
19
+ "target_codebases",
20
+ "reference_files_used",
21
+ "detected_project",
22
+ "impacted_modules",
23
+ "impacted_files",
24
+ "change_steps",
25
+ "confidence",
26
+ "evidence",
27
+ "bridge_context",
28
+ "acceptance_criteria",
29
+ "implementation_slices",
30
+ "test_plan",
31
+ "risks",
32
+ "unknowns"
33
+ ],
34
+ "additionalProperties": false,
35
+ "properties": {
36
+ "session_id": { "type": "string" },
37
+ "constraints": {
38
+ "type": "array",
39
+ "items": { "type": "string" }
40
+ },
41
+ "todo_progress": {
42
+ "type": "object",
43
+ "required": ["pending_task_count", "completed_task_count", "total_task_count"],
44
+ "additionalProperties": false,
45
+ "properties": {
46
+ "pending_task_count": { "type": "integer", "minimum": 0 },
47
+ "completed_task_count": { "type": "integer", "minimum": 0 },
48
+ "total_task_count": { "type": "integer", "minimum": 0 }
49
+ }
50
+ },
51
+ "task_modules": {
52
+ "type": "array",
53
+ "items": {
54
+ "type": "object",
55
+ "required": ["id", "title", "tasks"],
56
+ "additionalProperties": false,
57
+ "properties": {
58
+ "id": { "type": "string" },
59
+ "title": { "type": "string" },
60
+ "tasks": {
61
+ "type": "array",
62
+ "items": {
63
+ "type": "object",
64
+ "required": ["id", "title", "details"],
65
+ "additionalProperties": false,
66
+ "properties": {
67
+ "id": { "type": "string" },
68
+ "title": { "type": "string" },
69
+ "details": {
70
+ "type": "array",
71
+ "items": { "type": "string" }
72
+ }
73
+ }
74
+ }
75
+ }
76
+ }
77
+ }
78
+ },
79
+ "task_breakdown": {
80
+ "type": "array",
81
+ "items": {
82
+ "type": "object",
83
+ "required": ["id", "title", "details"],
84
+ "additionalProperties": false,
85
+ "properties": {
86
+ "id": { "type": "string" },
87
+ "title": { "type": "string" },
88
+ "details": {
89
+ "type": "array",
90
+ "items": { "type": "string" }
91
+ }
92
+ }
93
+ }
94
+ },
95
+ "requirement_summary": { "type": "string" },
96
+ "assumptions": {
97
+ "type": "array",
98
+ "items": { "type": "string" }
99
+ },
100
+ "workspace": { "type": "string" },
101
+ "configured_code_path": { "type": "string" },
102
+ "resolved_code_path": { "type": "string" },
103
+ "resolved_code_paths": {
104
+ "type": "array",
105
+ "items": { "type": "string" }
106
+ },
107
+ "service_hints": {
108
+ "type": "array",
109
+ "items": { "type": "string" }
110
+ },
111
+ "service_resolution": {
112
+ "type": "object",
113
+ "required": [
114
+ "configured_code_path",
115
+ "resolved_code_paths",
116
+ "service_hints",
117
+ "selection_reason",
118
+ "candidate_codebases"
119
+ ],
120
+ "additionalProperties": true,
121
+ "properties": {
122
+ "configured_code_path": { "type": "string" },
123
+ "resolved_code_path": { "type": "string" },
124
+ "resolved_code_paths": {
125
+ "type": "array",
126
+ "items": { "type": "string" }
127
+ },
128
+ "service_hints": {
129
+ "type": "array",
130
+ "items": { "type": "string" }
131
+ },
132
+ "matched_service_hint": { "type": "string" },
133
+ "matched_services": {
134
+ "type": "array",
135
+ "items": {
136
+ "type": "object",
137
+ "required": ["service_hint", "resolved_code_path"],
138
+ "additionalProperties": false,
139
+ "properties": {
140
+ "service_hint": { "type": "string" },
141
+ "resolved_code_path": { "type": "string" }
142
+ }
143
+ }
144
+ },
145
+ "selection_reason": { "type": "string" },
146
+ "candidate_codebases": {
147
+ "type": "array",
148
+ "items": { "type": "string" }
149
+ }
150
+ }
151
+ },
152
+ "target_codebases": {
153
+ "type": "array",
154
+ "items": {
155
+ "type": "object",
156
+ "required": ["name", "path", "detected_project", "impacted_modules", "impacted_files"],
157
+ "additionalProperties": false,
158
+ "properties": {
159
+ "name": { "type": "string" },
160
+ "path": { "type": "string" },
161
+ "detected_project": {
162
+ "type": "object",
163
+ "required": ["language", "build_tool", "test_command", "start_command", "verify_command"],
164
+ "additionalProperties": false,
165
+ "properties": {
166
+ "language": { "type": "string" },
167
+ "build_tool": { "type": "string" },
168
+ "test_command": { "type": "string" },
169
+ "start_command": { "type": "string" },
170
+ "verify_command": { "type": "string" }
171
+ }
172
+ },
173
+ "impacted_modules": {
174
+ "type": "array",
175
+ "items": { "type": "string" }
176
+ },
177
+ "impacted_files": {
178
+ "type": "array",
179
+ "items": { "type": "string" }
180
+ }
181
+ }
182
+ }
183
+ },
184
+ "reference_files_used": {
185
+ "type": "array",
186
+ "items": { "type": "string" }
187
+ },
188
+ "detected_project": {
189
+ "type": "object",
190
+ "required": ["language", "build_tool", "test_command", "start_command", "verify_command"],
191
+ "additionalProperties": false,
192
+ "properties": {
193
+ "language": { "type": "string" },
194
+ "build_tool": { "type": "string" },
195
+ "test_command": { "type": "string" },
196
+ "start_command": { "type": "string" },
197
+ "verify_command": { "type": "string" }
198
+ }
199
+ },
200
+ "impacted_modules": {
201
+ "type": "array",
202
+ "items": { "type": "string" }
203
+ },
204
+ "impacted_files": {
205
+ "type": "array",
206
+ "items": { "type": "string" }
207
+ },
208
+ "change_steps": {
209
+ "type": "array",
210
+ "items": {
211
+ "type": "object",
212
+ "required": ["id", "title", "details", "status"],
213
+ "additionalProperties": false,
214
+ "properties": {
215
+ "id": { "type": "string" },
216
+ "title": { "type": "string" },
217
+ "details": { "type": "string" },
218
+ "status": {
219
+ "type": "string",
220
+ "enum": ["pending", "in_progress", "done", "blocked"]
221
+ }
222
+ }
223
+ }
224
+ },
225
+ "confidence": {
226
+ "type": "string",
227
+ "enum": ["high", "medium", "low"]
228
+ },
229
+ "evidence": {
230
+ "type": "array",
231
+ "items": {
232
+ "type": "object",
233
+ "required": ["codebase", "keyword", "file", "line", "snippet"],
234
+ "additionalProperties": false,
235
+ "properties": {
236
+ "codebase": { "type": "string" },
237
+ "keyword": { "type": "string" },
238
+ "file": { "type": "string" },
239
+ "line": { "type": "integer" },
240
+ "snippet": { "type": "string" }
241
+ }
242
+ }
243
+ },
244
+ "bridge_context": {
245
+ "type": "object",
246
+ "additionalProperties": false,
247
+ "required": [
248
+ "workflow_source",
249
+ "change_name",
250
+ "change_dir",
251
+ "tasks_file",
252
+ "proposal_file",
253
+ "design_file",
254
+ "spec_reference_files",
255
+ "proposal_headings",
256
+ "design_headings",
257
+ "business_constraints",
258
+ "acceptance_criteria",
259
+ "compatibility_notes",
260
+ "spec_merge_targets",
261
+ "updated_at"
262
+ ],
263
+ "properties": {
264
+ "workflow_source": { "type": "string" },
265
+ "change_name": { "type": "string" },
266
+ "change_dir": { "type": "string" },
267
+ "tasks_file": { "type": "string" },
268
+ "proposal_file": { "type": "string" },
269
+ "design_file": { "type": "string" },
270
+ "spec_reference_files": {
271
+ "type": "array",
272
+ "items": { "type": "string" }
273
+ },
274
+ "proposal_headings": {
275
+ "type": "array",
276
+ "items": { "type": "string" }
277
+ },
278
+ "design_headings": {
279
+ "type": "array",
280
+ "items": { "type": "string" }
281
+ },
282
+ "business_constraints": {
283
+ "type": "array",
284
+ "items": { "type": "string" }
285
+ },
286
+ "acceptance_criteria": {
287
+ "type": "array",
288
+ "items": { "type": "string" }
289
+ },
290
+ "compatibility_notes": {
291
+ "type": "array",
292
+ "items": { "type": "string" }
293
+ },
294
+ "spec_merge_targets": {
295
+ "type": "array",
296
+ "items": {
297
+ "type": "object",
298
+ "required": ["delta_source", "target", "relative_path", "target_exists", "target_sha256"],
299
+ "additionalProperties": false,
300
+ "properties": {
301
+ "delta_source": { "type": "string" },
302
+ "target": { "type": "string" },
303
+ "relative_path": { "type": "string" },
304
+ "target_exists": { "type": "boolean" },
305
+ "target_sha256": { "type": "string" }
306
+ }
307
+ }
308
+ },
309
+ "updated_at": { "type": "string" }
310
+ }
311
+ },
312
+ "acceptance_criteria": {
313
+ "type": "array",
314
+ "items": {
315
+ "type": "object",
316
+ "required": ["task_id", "task_title", "checks"],
317
+ "additionalProperties": false,
318
+ "properties": {
319
+ "task_id": { "type": "string" },
320
+ "task_title": { "type": "string" },
321
+ "checks": {
322
+ "type": "array",
323
+ "items": { "type": "string" }
324
+ }
325
+ }
326
+ }
327
+ },
328
+ "implementation_slices": {
329
+ "type": "array",
330
+ "items": {
331
+ "type": "object",
332
+ "required": ["id", "title", "goal", "candidate_files", "status"],
333
+ "additionalProperties": false,
334
+ "properties": {
335
+ "id": { "type": "string" },
336
+ "title": { "type": "string" },
337
+ "goal": { "type": "string" },
338
+ "candidate_files": {
339
+ "type": "array",
340
+ "items": { "type": "string" }
341
+ },
342
+ "status": {
343
+ "type": "string",
344
+ "enum": ["pending", "in_progress", "done", "blocked"]
345
+ }
346
+ }
347
+ }
348
+ },
349
+ "test_plan": {
350
+ "type": "array",
351
+ "items": { "type": "string" }
352
+ },
353
+ "risks": {
354
+ "type": "array",
355
+ "items": { "type": "string" }
356
+ },
357
+ "unknowns": {
358
+ "type": "array",
359
+ "items": { "type": "string" }
360
+ }
361
+ }
362
+ }
@@ -0,0 +1,83 @@
1
+ {
2
+ "$schema": "https://json-schema.org/draft/2020-12/schema",
3
+ "title": "super-engineer status",
4
+ "type": "object",
5
+ "required": [
6
+ "mode",
7
+ "session_id",
8
+ "data_dir",
9
+ "report_dir",
10
+ "phase",
11
+ "current_task",
12
+ "progress",
13
+ "awaiting_confirmation",
14
+ "pending_confirmation_for",
15
+ "next_action",
16
+ "completed_tasks",
17
+ "blocked_tasks",
18
+ "started_at",
19
+ "finished_at",
20
+ "duration_seconds",
21
+ "notification_status",
22
+ "notification_message",
23
+ "updated_at"
24
+ ],
25
+ "additionalProperties": false,
26
+ "properties": {
27
+ "mode": {
28
+ "type": "string",
29
+ "enum": ["manual", "auto"]
30
+ },
31
+ "session_id": { "type": "string" },
32
+ "data_dir": { "type": "string" },
33
+ "report_dir": { "type": "string" },
34
+ "phase": {
35
+ "type": "string",
36
+ "enum": [
37
+ "context",
38
+ "discover",
39
+ "plan",
40
+ "wait_confirm_plan",
41
+ "implement",
42
+ "self_check",
43
+ "wait_confirm_implement",
44
+ "review",
45
+ "fix_review",
46
+ "wait_confirm_review",
47
+ "verify",
48
+ "fix_verify",
49
+ "done",
50
+ "blocked"
51
+ ]
52
+ },
53
+ "current_task": { "type": "string" },
54
+ "progress": {
55
+ "type": "integer",
56
+ "minimum": 0,
57
+ "maximum": 100
58
+ },
59
+ "awaiting_confirmation": { "type": "boolean" },
60
+ "pending_confirmation_for": {
61
+ "type": "string",
62
+ "enum": ["", "implement", "review", "verify"]
63
+ },
64
+ "next_action": { "type": "string" },
65
+ "completed_tasks": {
66
+ "type": "array",
67
+ "items": { "type": "string" }
68
+ },
69
+ "blocked_tasks": {
70
+ "type": "array",
71
+ "items": { "type": "string" }
72
+ },
73
+ "started_at": { "type": "string" },
74
+ "finished_at": { "type": "string" },
75
+ "duration_seconds": {
76
+ "type": "number",
77
+ "minimum": 0
78
+ },
79
+ "notification_status": { "type": "string" },
80
+ "notification_message": { "type": "string" },
81
+ "updated_at": { "type": "string" }
82
+ }
83
+ }
@@ -0,0 +1,25 @@
1
+ version: 1
2
+ mode: manual
3
+ workflow_source: todo
4
+ todo_file: todo.md
5
+ reference_files:
6
+ - docs/项目介绍.md
7
+ - docs/开发规范.md
8
+ code_path: ../your-project
9
+ output_dir: output
10
+ # 可选:自动识别不准确时覆盖验证命令
11
+ # verify_commands:
12
+ # default: pnpm test && pnpm build
13
+ # frontend-app: pnpm test && pnpm build
14
+ # user-service: go test ./...
15
+
16
+ # 如果使用 OpenSpec 模式,改成:
17
+ # workflow_source: openspec
18
+ # vars:
19
+ # demand_name: 7-your-demand
20
+ # demand_file: superengineer/${demand_name}/需求.md
21
+ # demand_file 也可以配置为飞书/Lark 云文档 URL,需本机已安装并授权 lark-cli。
22
+ # todo_file: superengineer/${demand_name}/todo.md
23
+ # output_dir: superengineer/${demand_name}/output
24
+ # openspec:
25
+ # changes_dir: openspec/changes
@@ -0,0 +1,12 @@
1
+ version: 1
2
+ notification:
3
+ pushplus:
4
+ token: ""
5
+ ordinary:
6
+ enabled: false
7
+ channel: wechat
8
+ template: markdown
9
+ feishu:
10
+ enabled: false
11
+ webhook_url: "https://open.feishu.cn/open-apis/bot/v2/hook/your-webhook"
12
+ secret: ""
@@ -0,0 +1,39 @@
1
+ # 工作流契约
2
+
3
+ ## 输入来源
4
+
5
+ - `workflow_source=todo`:直接读取 `todo_file`
6
+ - `workflow_source=openspec`:从 OpenSpec `tasks.md` 生成桥接 `todo_file`,并写入 `openspec-bridge-context.json`
7
+
8
+ ## 关键产物
9
+
10
+ - `discovery.json`:代码定位证据
11
+ - `plan.json`:工程计划与验收基线
12
+ - `review.json`:结构化审查结论
13
+ - `verify.json`:结构化验证结论
14
+ - `execution-summary.json`:写回 OpenSpec change 的执行摘要
15
+ - `archive-input.json`:归档前检查输入
16
+ - `archive-result.json`:归档执行结果
17
+
18
+ ## 可靠性边界
19
+
20
+ - `plan.json` 是实现阶段的执行基线
21
+ - `review.json` 和 `verify.json` 是是否允许归档的核心证据
22
+ - `execution-summary.json` 是 OpenSpec change 的共享摘要,不是长期规格 source of truth
23
+ - `openspec/specs/` 在 archive 完成后才成为新的长期规格基线
24
+ - `archive-input.json.merge_mode` 只要不是 `safe_merge`,就不允许自动 archive
25
+
26
+ ## 归档顺序
27
+
28
+ 1. `writeback-openspec`
29
+ 2. `prepare-archive-openspec`
30
+ 3. `archive-openspec`
31
+
32
+ ## 归档前置条件
33
+
34
+ - `review.result == passed`
35
+ - `verify.result == 通过`
36
+ - `status.phase == done`
37
+ - `archive-input.json.archive_ready == true`
38
+ - `archive-input.json.spec_conflicts` 为空
39
+ - `archive-input.json.merge_mode == safe_merge`
@@ -0,0 +1,38 @@
1
+ # 执行模式
2
+
3
+ ## manual
4
+
5
+ `manual` 模式下,工作流必须在以下节点暂停:
6
+
7
+ - 计划生成后
8
+ - 代码实现后
9
+ - 代码审查后
10
+
11
+ 暂停时需要:
12
+
13
+ - 把 `awaiting_confirmation` 设为 `true`
14
+ - 把 `pending_confirmation_for` 设为下一阶段
15
+ - 在 `status.json` 中写清楚下一步动作
16
+
17
+ ## auto
18
+
19
+ `auto` 模式下,工作流应自动继续,除非出现以下情况:
20
+
21
+ - 无法读取 `workspace.yml` 或配置不合法
22
+ - 无法找到 todo、代码目录或必要参考文件,且缺失已经阻断后续执行
23
+ - `code_path` 是聚合目录,但无法从 todo 判断目标服务
24
+ - Git、文件系统、权限、命令执行错误导致后续步骤无法继续
25
+ - 验证失败,已经不适合继续自动推进
26
+
27
+ 阻塞时需要:
28
+
29
+ - 把 `phase` 设为 `blocked`
30
+ - 记录阻塞原因
31
+ - 明确停止,并输出可执行的下一步建议
32
+
33
+ `auto` 模式下的强约束:
34
+
35
+ - 不要因为“计划还不够细”“还需要先定位代码”“还想先确认方案”而请求用户批准
36
+ - 如果计划粒度不够,应直接进入代码定位、补充计划,然后继续实现
37
+ - 如果 review 发现计划与现实不一致,应先更新计划,再继续 review 或 verify
38
+ - 只有真正的硬阻塞才允许停下来询问用户