@chenmk/superflow 0.2.5 → 0.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 (116) hide show
  1. package/README.md +24 -2
  2. package/README.zh-CN.md +17 -1
  3. package/assets/manifest.json +7 -4
  4. package/assets/prompts/superflow-clarify.md +6 -0
  5. package/assets/prompts/superflow-design.md +3 -0
  6. package/assets/prompts/superflow-docs.md +4 -1
  7. package/assets/prompts/superflow-pipeline.md +8 -0
  8. package/assets/scripts/superflow-archive-command-hook.sh +80 -0
  9. package/assets/scripts/superflow-delivery-check.sh +23 -4
  10. package/assets/scripts/superflow-dependency-update-hook.sh +1 -1
  11. package/assets/scripts/superflow-managed-work-check.mjs +194 -0
  12. package/assets/scripts/superflow-managed-work-guard.sh +103 -0
  13. package/assets/skills/openspec-propose/SKILL.md +11 -0
  14. package/assets/skills/superflow-archive/SKILL.md +5 -0
  15. package/assets/skills/superflow-clarify/SKILL.md +26 -7
  16. package/assets/skills/superflow-design/SKILL.md +38 -7
  17. package/assets/skills/superflow-docs/SKILL.md +27 -0
  18. package/assets/skills/superflow-pipeline/SKILL.md +75 -0
  19. package/assets/skills/superflow-pipeline/references/api-design-template.md +11 -0
  20. package/assets/skills/superflow-pipeline/references/batch-prompt-template.md +27 -0
  21. package/assets/skills/superflow-pipeline/references/document-templates.md +8 -0
  22. package/assets/skills/superflow-pipeline/references/implementation-prompt-template.md +29 -1
  23. package/assets/skills/superflow-pipeline/references/managed-work.md +58 -0
  24. package/assets/skills/superflow-pipeline/references/quality-gate.md +3 -0
  25. package/assets/skills/superflow-pipeline/references/superpower-technical-design-template.md +51 -0
  26. package/assets/skills/superflow-pipeline/references/test-execution-template.md +10 -0
  27. package/assets/skills/superflow-pipeline/scripts/superflow-archive.sh +1 -1
  28. package/assets/skills/superflow-pipeline/scripts/superflow-guard.sh +215 -2
  29. package/assets/skills/superflow-verify/SKILL.md +7 -0
  30. package/assets/skills-en/openspec-propose/SKILL.md +14 -0
  31. package/assets/skills-en/superflow-archive/SKILL.md +6 -0
  32. package/assets/skills-en/superflow-clarify/SKILL.md +26 -7
  33. package/assets/skills-en/superflow-design/SKILL.md +38 -6
  34. package/assets/skills-en/superflow-docs/SKILL.md +27 -0
  35. package/assets/skills-en/superflow-pipeline/SKILL.md +76 -0
  36. package/assets/skills-en/superflow-pipeline/references/api-design-template.md +13 -0
  37. package/assets/skills-en/superflow-pipeline/references/batch-prompt-template.md +16 -0
  38. package/assets/skills-en/superflow-pipeline/references/document-templates.md +5 -0
  39. package/assets/skills-en/superflow-pipeline/references/implementation-prompt-template.md +17 -0
  40. package/assets/skills-en/superflow-pipeline/references/managed-work.md +34 -0
  41. package/assets/skills-en/superflow-pipeline/references/quality-gate.md +25 -0
  42. package/assets/skills-en/superflow-pipeline/references/superpower-technical-design-template.md +57 -0
  43. package/assets/skills-en/superflow-pipeline/references/test-execution-template.md +12 -0
  44. package/assets/skills-en/superflow-pipeline/scripts/superflow-archive.sh +1 -1
  45. package/assets/skills-en/superflow-pipeline/scripts/superflow-guard.sh +214 -2
  46. package/assets/skills-en/superflow-verify/SKILL.md +8 -0
  47. package/dist/app/cli.js +120 -102
  48. package/dist/app/cli.js.map +1 -1
  49. package/dist/app/commands/archive.js +7 -3
  50. package/dist/app/commands/archive.js.map +1 -1
  51. package/dist/app/commands/change-guard.js +27 -0
  52. package/dist/app/commands/change-guard.js.map +1 -0
  53. package/dist/app/commands/design.js +2 -20
  54. package/dist/app/commands/design.js.map +1 -1
  55. package/dist/app/commands/init.js +7 -7
  56. package/dist/app/commands/init.js.map +1 -1
  57. package/dist/app/commands/managed-service.js +5 -0
  58. package/dist/app/commands/managed-service.js.map +1 -0
  59. package/dist/app/commands/pipeline.js +123 -3
  60. package/dist/app/commands/pipeline.js.map +1 -1
  61. package/dist/app/commands/status.js +199 -77
  62. package/dist/app/commands/status.js.map +1 -1
  63. package/dist/app/commands/uninstall.js +5 -2
  64. package/dist/app/commands/uninstall.js.map +1 -1
  65. package/dist/app/commands/update.js +33 -11
  66. package/dist/app/commands/update.js.map +1 -1
  67. package/dist/app/commands/verify.js +7 -3
  68. package/dist/app/commands/verify.js.map +1 -1
  69. package/dist/domains/config/cli-help.js +103 -73
  70. package/dist/domains/config/cli-help.js.map +1 -1
  71. package/dist/domains/config/context.js +1 -5
  72. package/dist/domains/config/context.js.map +1 -1
  73. package/dist/domains/deps.js +3 -6
  74. package/dist/domains/deps.js.map +1 -1
  75. package/dist/domains/hook.js +71 -37
  76. package/dist/domains/hook.js.map +1 -1
  77. package/dist/domains/managed-work/contract.js +218 -0
  78. package/dist/domains/managed-work/contract.js.map +1 -0
  79. package/dist/domains/managed-work/i18n.js +12 -0
  80. package/dist/domains/managed-work/i18n.js.map +1 -0
  81. package/dist/domains/managed-work/input.js +111 -0
  82. package/dist/domains/managed-work/input.js.map +1 -0
  83. package/dist/domains/managed-work/journal.js +122 -0
  84. package/dist/domains/managed-work/journal.js.map +1 -0
  85. package/dist/domains/managed-work/lock.js +40 -0
  86. package/dist/domains/managed-work/lock.js.map +1 -0
  87. package/dist/domains/managed-work/notifications.js +53 -0
  88. package/dist/domains/managed-work/notifications.js.map +1 -0
  89. package/dist/domains/managed-work/paths.js +18 -0
  90. package/dist/domains/managed-work/paths.js.map +1 -0
  91. package/dist/domains/managed-work/prompts.js +218 -0
  92. package/dist/domains/managed-work/prompts.js.map +1 -0
  93. package/dist/domains/managed-work/runner.js +626 -0
  94. package/dist/domains/managed-work/runner.js.map +1 -0
  95. package/dist/domains/managed-work/schemas.js +85 -0
  96. package/dist/domains/managed-work/schemas.js.map +1 -0
  97. package/dist/domains/managed-work/service.js +121 -0
  98. package/dist/domains/managed-work/service.js.map +1 -0
  99. package/dist/domains/managed-work/state.js +90 -0
  100. package/dist/domains/managed-work/state.js.map +1 -0
  101. package/dist/domains/managed-work/storage.js +181 -0
  102. package/dist/domains/managed-work/storage.js.map +1 -0
  103. package/dist/domains/managed-work/types.js +16 -0
  104. package/dist/domains/managed-work/types.js.map +1 -0
  105. package/dist/domains/managed-work/wait.js +40 -0
  106. package/dist/domains/managed-work/wait.js.map +1 -0
  107. package/dist/platform/agent-process.js +308 -0
  108. package/dist/platform/agent-process.js.map +1 -0
  109. package/dist/platform/assets.js +9 -0
  110. package/dist/platform/assets.js.map +1 -0
  111. package/dist/platform/process-liveness.js +10 -0
  112. package/dist/platform/process-liveness.js.map +1 -0
  113. package/dist/platform/version-check.js +30 -9
  114. package/dist/platform/version-check.js.map +1 -1
  115. package/package.json +3 -2
  116. package/scripts/release-notes-check.js +102 -0
@@ -0,0 +1,218 @@
1
+ import path from "path";
2
+ import { managedRunDir, managedTaskDir } from "./paths.js";
3
+ export function buildExecutorPrompt(contract, state, repairFindings = []) {
4
+ if (contract.language === "en") {
5
+ return buildExecutorPromptEnglish(contract, state, repairFindings);
6
+ }
7
+ const taskDir = managedTaskDir(contract.projectRoot, contract.taskId);
8
+ const runDir = managedRunDir(contract.projectRoot, contract.taskId, state.runId);
9
+ const frozenPrompt = contract.taskPrompt
10
+ ? [
11
+ `冻结任务 Prompt:${contract.taskPrompt.snapshotPath}`,
12
+ `原始 Prompt 目录:${path.dirname(contract.taskPrompt.originalPath)}`,
13
+ `Prompt SHA-256:${contract.taskPrompt.sha256}`,
14
+ ]
15
+ : [];
16
+ const repair = repairFindings.length === 0
17
+ ? ""
18
+ : [
19
+ "",
20
+ "## 本轮必须整改的问题",
21
+ "",
22
+ ...repairFindings.map((finding) => [
23
+ `- ${finding.id} [${finding.severity}] ${finding.target}`,
24
+ ` - 证据:${finding.evidence}`,
25
+ ` - 风险:${finding.risk}`,
26
+ ` - 必须修复:${finding.requiredFix}`,
27
+ ` - 验收:${finding.acceptanceChecks.join(";")}`,
28
+ ].join("\n")),
29
+ ].join("\n");
30
+ return [
31
+ "你是这个托管任务唯一允许修改目标产物的执行者。",
32
+ "请持续完成任务,不要因为配置、依赖、端口、开发数据库或测试失败就降低标准。",
33
+ "",
34
+ `任务编号:${contract.taskId}`,
35
+ `运行编号:${state.runId}`,
36
+ `任务档位:${contract.profile}`,
37
+ `合同哈希:${contract.contractHash}`,
38
+ `项目目录:${contract.projectRoot}`,
39
+ `关联可写仓库:${contract.relatedProjectRoots.join("、") || "无"}`,
40
+ `任务合同:${path.join(taskDir, "task-brief.md")}`,
41
+ ...frozenPrompt,
42
+ `运行证据目录(只读,不要修改):${runDir}`,
43
+ "",
44
+ "## 用户目标",
45
+ "",
46
+ contract.objective,
47
+ "",
48
+ "## 强制边界",
49
+ "",
50
+ "- 编码前先搜索现有模块、公共方法、组件、测试和依赖,优先复用。",
51
+ ...(contract.taskPrompt
52
+ ? [
53
+ "- 开始工作前必须完整读取冻结任务 Prompt;它是本次执行入口。",
54
+ `- Prompt 内相对路径统一以 ${path.dirname(contract.taskPrompt.originalPath)} 为基准解析。`,
55
+ "- tasks.md 只用于清单追踪,不得替代冻结任务 Prompt。",
56
+ ]
57
+ : []),
58
+ "- 可以在同一业务平台相关仓库内追踪真实 owner,但必须记录涉及仓库。",
59
+ "- 可以使用已确认的开发环境数据库,禁止删库、删表、清表和无条件批量更新删除。",
60
+ "- 禁止 Git commit、push、发布、部署和生产写入。",
61
+ "- 禁止关闭沙箱、绕过权限、修改测试迎合实现或用默认值掩盖业务缺口。",
62
+ "- 不要修改 `.superflow/tasks` 下的状态、事件、历史 Prompt 和报告,由后台统一维护。",
63
+ "- 任务涉及代码时必须执行与风险匹配的构建、测试和运行验证;只编译或只跑单测不等于完成。",
64
+ "- 遇到确实需要用户决定、凭据或高风险权限时返回 blocked,写清已经尝试的替代方案。",
65
+ repair,
66
+ "",
67
+ "最终必须严格按照 JSON Schema 返回结构化结果。",
68
+ ].join("\n");
69
+ }
70
+ export function buildReviewPrompt(contract, state) {
71
+ if (contract.language === "en") {
72
+ return buildReviewPromptEnglish(contract, state);
73
+ }
74
+ const taskDir = managedTaskDir(contract.projectRoot, contract.taskId);
75
+ const runDir = managedRunDir(contract.projectRoot, contract.taskId, state.runId);
76
+ const frozenPrompt = contract.taskPrompt
77
+ ? [
78
+ `冻结任务 Prompt:${contract.taskPrompt.snapshotPath}`,
79
+ `原始 Prompt 目录:${path.dirname(contract.taskPrompt.originalPath)}`,
80
+ `Prompt SHA-256:${contract.taskPrompt.sha256}`,
81
+ ]
82
+ : [];
83
+ return [
84
+ "你是这个任务持续跟踪的只读检查者。本轮不得修改任何目标文件。",
85
+ "不要相信执行者的口头完成声明,必须独立检查当前工作区和原始证据。",
86
+ "",
87
+ `任务编号:${contract.taskId}`,
88
+ `运行编号:${state.runId}`,
89
+ `检查轮次:${state.reviewRound}`,
90
+ `合同哈希:${contract.contractHash}`,
91
+ `任务合同:${path.join(taskDir, "task-brief.md")}`,
92
+ ...frozenPrompt,
93
+ `执行结果:${state.lastExecutorResult}`,
94
+ `任务报告:${path.join(runDir, "task-report.md")}`,
95
+ "",
96
+ "## 检查要求",
97
+ "",
98
+ "- 独立检查用户目标、修改范围、代码差异和命令证据。",
99
+ ...(contract.taskPrompt
100
+ ? ["- 必须以冻结任务 Prompt 及其引用的 SDD 文档作为评审合同。"]
101
+ : []),
102
+ "- 检查是否复用了现有能力,是否出现重复实现。",
103
+ "- 检查正确性、安全、数据、并发、事务、配置和真实运行风险。",
104
+ "- 任务需要启动/API/数据库/日志证据时,缺少任一项必须阻断。",
105
+ "- 纯格式和个人偏好不要阻断,避免浪费整改轮次。",
106
+ "- 每个阻断问题必须给出事实证据、风险、明确修复要求和可执行验收条件。",
107
+ "- 没有阻断问题时返回 pass;执行范围外且需要用户决定时返回 blocked。",
108
+ "",
109
+ "最终必须严格按照 JSON Schema 返回结构化结果。",
110
+ ].join("\n");
111
+ }
112
+ function buildExecutorPromptEnglish(contract, state, repairFindings) {
113
+ const taskDir = managedTaskDir(contract.projectRoot, contract.taskId);
114
+ const runDir = managedRunDir(contract.projectRoot, contract.taskId, state.runId);
115
+ const originalPromptDir = contract.taskPrompt
116
+ ? path.dirname(contract.taskPrompt.originalPath)
117
+ : null;
118
+ const frozenPrompt = contract.taskPrompt
119
+ ? [
120
+ `Frozen task prompt: ${contract.taskPrompt.snapshotPath}`,
121
+ `Original prompt directory: ${originalPromptDir}`,
122
+ `Prompt SHA-256: ${contract.taskPrompt.sha256}`,
123
+ ]
124
+ : [];
125
+ const repair = repairFindings.length === 0
126
+ ? ""
127
+ : [
128
+ "",
129
+ "## Required fixes for this round",
130
+ "",
131
+ ...repairFindings.map((finding) => [
132
+ `- ${finding.id} [${finding.severity}] ${finding.target}`,
133
+ ` - Evidence: ${finding.evidence}`,
134
+ ` - Risk: ${finding.risk}`,
135
+ ` - Required fix: ${finding.requiredFix}`,
136
+ ` - Acceptance checks: ${finding.acceptanceChecks.join("; ")}`,
137
+ ].join("\n")),
138
+ ].join("\n");
139
+ return [
140
+ "You are the only executor allowed to modify target deliverables for this managed task.",
141
+ "Continue until the task is complete. Do not lower the bar because of configuration, dependencies, ports, development databases, or test failures.",
142
+ "",
143
+ `Task ID: ${contract.taskId}`,
144
+ `Run ID: ${state.runId}`,
145
+ `Task profile: ${contract.profile}`,
146
+ `Contract hash: ${contract.contractHash}`,
147
+ `Project root: ${contract.projectRoot}`,
148
+ `Additional writable repositories: ${contract.relatedProjectRoots.join(", ") || "none"}`,
149
+ `Task contract: ${path.join(taskDir, "task-brief.md")}`,
150
+ ...frozenPrompt,
151
+ `Run evidence directory (read-only; do not modify): ${runDir}`,
152
+ "",
153
+ "## User goal",
154
+ "",
155
+ contract.objective,
156
+ "",
157
+ "## Mandatory boundaries",
158
+ "",
159
+ "- Before coding, search existing modules, shared methods, components, tests, and dependencies; prefer reuse.",
160
+ ...(originalPromptDir
161
+ ? [
162
+ "- Read the complete frozen task prompt before starting; it is the execution entry point.",
163
+ `- Resolve relative paths in the prompt against ${originalPromptDir}.`,
164
+ "- tasks.md is only a checklist and must not replace the frozen task prompt.",
165
+ ]
166
+ : []),
167
+ "- You may trace the real owner across related repositories in the same platform, but record every repository involved.",
168
+ "- You may use an approved development database. Never drop databases or tables, truncate data, or run unbounded bulk updates/deletes.",
169
+ "- Never run Git commit/push, publish, deploy, or write to production.",
170
+ "- Never disable the sandbox, bypass permissions, alter tests to fit the implementation, or hide business gaps with defaults.",
171
+ "- Do not modify state, events, historical prompts, or reports under `.superflow/tasks`; the background service owns them.",
172
+ "- For code tasks, run build, tests, and runtime verification proportionate to risk. Compilation-only or unit-test-only evidence is not completion.",
173
+ "- Return blocked only when a user decision, credential, or high-risk permission is genuinely required, and list alternatives already attempted.",
174
+ repair,
175
+ "",
176
+ "Return the final result strictly according to the JSON Schema.",
177
+ ].join("\n");
178
+ }
179
+ function buildReviewPromptEnglish(contract, state) {
180
+ const taskDir = managedTaskDir(contract.projectRoot, contract.taskId);
181
+ const runDir = managedRunDir(contract.projectRoot, contract.taskId, state.runId);
182
+ const frozenPrompt = contract.taskPrompt
183
+ ? [
184
+ `Frozen task prompt: ${contract.taskPrompt.snapshotPath}`,
185
+ `Original prompt directory: ${path.dirname(contract.taskPrompt.originalPath)}`,
186
+ `Prompt SHA-256: ${contract.taskPrompt.sha256}`,
187
+ ]
188
+ : [];
189
+ return [
190
+ "You are the persistent read-only reviewer for this task. Do not modify any target files in this round.",
191
+ "Do not trust completion claims from the executor. Independently inspect the workspace and original evidence.",
192
+ "",
193
+ `Task ID: ${contract.taskId}`,
194
+ `Run ID: ${state.runId}`,
195
+ `Review round: ${state.reviewRound}`,
196
+ `Contract hash: ${contract.contractHash}`,
197
+ `Task contract: ${path.join(taskDir, "task-brief.md")}`,
198
+ ...frozenPrompt,
199
+ `Executor result: ${state.lastExecutorResult}`,
200
+ `Task report: ${path.join(runDir, "task-report.md")}`,
201
+ "",
202
+ "## Review requirements",
203
+ "",
204
+ "- Independently inspect the user goal, change scope, code diff, and command evidence.",
205
+ ...(contract.taskPrompt
206
+ ? ["- Treat the frozen task prompt and its referenced SDD documents as the review contract."]
207
+ : []),
208
+ "- Check reuse of existing capabilities and reject parallel duplicate implementations.",
209
+ "- Check correctness, security, data, concurrency, transactions, configuration, and real runtime risks.",
210
+ "- If startup, API, database, or log evidence is required, block when any required category is missing.",
211
+ "- Do not block on formatting or personal preference; preserve review rounds for material risks.",
212
+ "- Every blocking finding must include factual evidence, risk, a precise required fix, and executable acceptance checks.",
213
+ "- Return pass when there are no blocking findings; return blocked only for decisions outside execution scope that require the user.",
214
+ "",
215
+ "Return the final result strictly according to the JSON Schema.",
216
+ ].join("\n");
217
+ }
218
+ //# sourceMappingURL=prompts.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"prompts.js","sourceRoot":"","sources":["../../../src/domains/managed-work/prompts.ts"],"names":[],"mappings":"AAAA,OAAO,IAAI,MAAM,MAAM,CAAC;AAMxB,OAAO,EAAE,aAAa,EAAE,cAAc,EAAE,MAAM,YAAY,CAAC;AAE3D,MAAM,UAAU,mBAAmB,CACjC,QAA6B,EAC7B,KAAsB,EACtB,iBAAkC,EAAE;IAEpC,IAAI,QAAQ,CAAC,QAAQ,KAAK,IAAI,EAAE,CAAC;QAC/B,OAAO,0BAA0B,CAAC,QAAQ,EAAE,KAAK,EAAE,cAAc,CAAC,CAAC;IACrE,CAAC;IACD,MAAM,OAAO,GAAG,cAAc,CAAC,QAAQ,CAAC,WAAW,EAAE,QAAQ,CAAC,MAAM,CAAC,CAAC;IACtE,MAAM,MAAM,GAAG,aAAa,CAC1B,QAAQ,CAAC,WAAW,EACpB,QAAQ,CAAC,MAAM,EACf,KAAK,CAAC,KAAK,CACZ,CAAC;IACF,MAAM,YAAY,GAAG,QAAQ,CAAC,UAAU;QACtC,CAAC,CAAC;YACE,eAAe,QAAQ,CAAC,UAAU,CAAC,YAAY,EAAE;YACjD,gBAAgB,IAAI,CAAC,OAAO,CAAC,QAAQ,CAAC,UAAU,CAAC,YAAY,CAAC,EAAE;YAChE,kBAAkB,QAAQ,CAAC,UAAU,CAAC,MAAM,EAAE;SAC/C;QACH,CAAC,CAAC,EAAE,CAAC;IACP,MAAM,MAAM,GACV,cAAc,CAAC,MAAM,KAAK,CAAC;QACzB,CAAC,C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