@devflow-core/dsh-devflow 0.1.0 → 0.3.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.
- package/README.md +7 -3
- package/RELEASE.md +128 -0
- package/assets/commands/devflow-adversarial.toml +1 -0
- package/assets/commands/devflow-find-fault.toml +1 -0
- package/assets/presets/devflow-2/README.md +3 -3
- package/assets/presets/devflow-2/agent.cordis.yml +4 -1
- package/assets/presets/devflow-2/preset.yml +1 -1
- package/assets/presets/devflow-2/tool-bootstrap.mjs +80 -5
- package/assets/skills/devflow-adversarial/SKILL.md +7 -2
- package/assets/skills/devflow-build/SKILL.md +14 -19
- package/assets/skills/devflow-find-fault/SKILL.md +8 -1
- package/assets/skills/devflow-plan/SKILL.md +8 -6
- package/assets/skills/devflow-plan/references/plan-methods.md +7 -7
- package/assets/skills/devflow-prove/references/flow-self-test.md +4 -0
- package/lib/index.js +1 -1
- package/package.json +3 -2
package/README.md
CHANGED
|
@@ -13,7 +13,7 @@ npx @deepseek-ai/dsh plugin --profile web add @devflow-core/dsh-devflow
|
|
|
13
13
|
|
|
14
14
|
重启后:
|
|
15
15
|
|
|
16
|
-
1. 新建会话,预设选择器可选 **DevFlow 2.0
|
|
16
|
+
1. 新建会话,预设选择器可选 **DevFlow 2.0**(两阶段锚定 + Code Mode)。
|
|
17
17
|
2. 会话内 `devflow-*` skills 出现在技能目录,按任务措辞自动触发。
|
|
18
18
|
3. `~/.dsh/commands/` 出现 `devflow*.toml` 斜杠命令,`~/.dsh/scripts/` 出现
|
|
19
19
|
`devflow-*.js` 验证脚本(`node scripts/devflow-plan.js <plan>` 等)。
|
|
@@ -73,10 +73,14 @@ devflow-2 预设的 `custom-bash.mjs` 需要 Git Bash 可解析:默认自动
|
|
|
73
73
|
的 custom-bash 行显式配置 `bashPath` 指向本机 Git(参照
|
|
74
74
|
`docs/dsh-plugins-guide.md` 7.1 节)。
|
|
75
75
|
|
|
76
|
-
##
|
|
76
|
+
## 发布与更新
|
|
77
|
+
|
|
78
|
+
完整维护者流程(前置条件、版本 bump、发布命令、错误对照表、git 备选)见
|
|
79
|
+
[RELEASE.md](RELEASE.md)。简版:
|
|
77
80
|
|
|
78
81
|
```sh
|
|
79
82
|
cd dsh/plugins/dsh-devflow
|
|
80
83
|
node scripts/sync-assets.js # 发布前必须重跑,保证资产与仓库根一致
|
|
81
|
-
|
|
84
|
+
# bump package.json 版本号
|
|
85
|
+
npm publish --access public --//registry.npmjs.org/:_authToken=<TOKEN>
|
|
82
86
|
```
|
package/RELEASE.md
ADDED
|
@@ -0,0 +1,128 @@
|
|
|
1
|
+
# @devflow-core/dsh-devflow — 发布与更新流程
|
|
2
|
+
|
|
3
|
+
维护者指南:如何发布新版本、用户如何升级、常见错误与修复。用户安装/使用说明见
|
|
4
|
+
[README.md](README.md)。
|
|
5
|
+
|
|
6
|
+
## 前置条件
|
|
7
|
+
|
|
8
|
+
| 项 | 要求 |
|
|
9
|
+
|---|---|
|
|
10
|
+
| npm 账号 | 拥有 `@devflow-core` 组织(org)的写权限(创建于 npmjs.com/org/create,免费 public 方案) |
|
|
11
|
+
| npm token | Granular Access Token,**Read and write** + **勾选 "Bypass 2FA for publish"**(或 Automation token)。生成地址:https://www.npmjs.com/settings/<账号>/tokens |
|
|
12
|
+
| Node / pnpm | Node ≥22;pnpm ≥10(发布由 npm CLI 完成,但 `dsh plugin` 安装链路依赖 pnpm) |
|
|
13
|
+
| 仓库 | DevFlow-Core 仓库可写,`dsh/plugins/dsh-devflow/` 子包为发布源 |
|
|
14
|
+
|
|
15
|
+
> token 不要写进仓库或 .npmrc。发布时用命令行参数临时注入(见下),用完即弃;
|
|
16
|
+
> token 一旦在聊天/日志中暴露,发布后立即到 npm 设置页 revoke 并重新生成。
|
|
17
|
+
|
|
18
|
+
## 一次完整发布(改代码 → 发布 → 用户升级)
|
|
19
|
+
|
|
20
|
+
### 1. 修改源码或资产
|
|
21
|
+
|
|
22
|
+
需要更新的内容都在仓库根:
|
|
23
|
+
|
|
24
|
+
- 预设:`dsh/agent-presets/devflow-2/`(agent.cordis.yml / preset.yml / tool-bootstrap.mjs / custom-bash.mjs / NOTICE)
|
|
25
|
+
- 技能:`skills/devflow-*/`(SKILL.md 与 references/)
|
|
26
|
+
- 命令:`commands/devflow*.toml`
|
|
27
|
+
- 验证脚本:`scripts/devflow-*.js`(spec/plan/review/debt/audit/doctor)
|
|
28
|
+
- 插件代码:`dsh/plugins/dsh-devflow/lib/`(同步引擎 / 挂载 / announce)
|
|
29
|
+
|
|
30
|
+
### 2. 根仓库验证不回归
|
|
31
|
+
|
|
32
|
+
```sh
|
|
33
|
+
npm run verify:all # 必须全绿(exit 0)
|
|
34
|
+
```
|
|
35
|
+
|
|
36
|
+
### 3. 刷新子包资产(防漂移)
|
|
37
|
+
|
|
38
|
+
子包 assets/ 是自包含副本,发布前必须从仓库根重新复制:
|
|
39
|
+
|
|
40
|
+
```sh
|
|
41
|
+
node dsh/plugins/dsh-devflow/scripts/sync-assets.js
|
|
42
|
+
```
|
|
43
|
+
|
|
44
|
+
预期输出四行 `synced N entries`;重复运行应幂等(第二次仍成功且无新文件)。
|
|
45
|
+
|
|
46
|
+
### 4. 子包自测
|
|
47
|
+
|
|
48
|
+
```sh
|
|
49
|
+
node dsh/plugins/dsh-devflow/test/sync.test.js
|
|
50
|
+
# 预期: DevFlow DSH plugin sync test passed(五场景: 创建/幂等/覆盖/隔离/prune)
|
|
51
|
+
```
|
|
52
|
+
|
|
53
|
+
### 5. 版本 bump
|
|
54
|
+
|
|
55
|
+
```sh
|
|
56
|
+
# 编辑 dsh/plugins/dsh-devflow/package.json 的 "version"
|
|
57
|
+
# 语义: patch=缺陷修复, minor=资产/功能更新, major=不兼容变更
|
|
58
|
+
```
|
|
59
|
+
|
|
60
|
+
发布时使用 CLI 参数临时注入 token(不落盘):
|
|
61
|
+
|
|
62
|
+
```sh
|
|
63
|
+
cd dsh/plugins/dsh-devflow
|
|
64
|
+
node scripts/sync-assets.js # 发布前再跑一次,保证资产最新
|
|
65
|
+
npm publish --access public --//registry.npmjs.org/:_authToken=<TOKEN>
|
|
66
|
+
```
|
|
67
|
+
|
|
68
|
+
- `--access public` 必须显式给出:scoped 包默认按私有发布,会报 `E402 Payment Required`。
|
|
69
|
+
- `--//registry.npmjs.org/:_authToken=` 是 npm 的 per-registry 参数注入,token 不写入 .npmrc。
|
|
70
|
+
|
|
71
|
+
### 6. 发布后验证
|
|
72
|
+
|
|
73
|
+
```sh
|
|
74
|
+
npm view @devflow-core/dsh-devflow version dist-tags.latest
|
|
75
|
+
# 预期输出: 0.1.x 与 latest: 0.1.x
|
|
76
|
+
```
|
|
77
|
+
|
|
78
|
+
> 新包首次发布后 registry 有约 5 分钟传播延迟,期间 `npm view` 可能 404 属正常;
|
|
79
|
+
> 用 `--prefer-online` 绕过本地缓存。若发布命令报 "cannot publish over the
|
|
80
|
+
> previously published versions",说明该版本已存在,bump 版本号再发。
|
|
81
|
+
|
|
82
|
+
### 7. 提交并推送仓库
|
|
83
|
+
|
|
84
|
+
```sh
|
|
85
|
+
git add -A
|
|
86
|
+
git commit -m "chore(dsh-devflow): release v<新版本>"
|
|
87
|
+
git push origin master
|
|
88
|
+
```
|
|
89
|
+
|
|
90
|
+
## 用户升级
|
|
91
|
+
|
|
92
|
+
已安装用户升级到新版本:
|
|
93
|
+
|
|
94
|
+
```sh
|
|
95
|
+
npx @deepseek-ai/dsh plugin --profile web update @devflow-core/dsh-devflow
|
|
96
|
+
# 或 remove + add 后重启
|
|
97
|
+
```
|
|
98
|
+
|
|
99
|
+
重启 web 后插件启动时自动把新资产同步到 `~/.dsh/`:
|
|
100
|
+
|
|
101
|
+
- 字节相同的文件跳过(不覆盖用户 mtime)
|
|
102
|
+
- 不同的文件覆盖(devflow-* 权威)
|
|
103
|
+
- 源不再包含的 devflow-* 残留 prune
|
|
104
|
+
- 非 devflow 资产(atlassian、rtk 等)永不触碰
|
|
105
|
+
- `~/.dsh/.agent-presets/devflow-2/` 整目录归插件管理,目录内非包内文件会被清理
|
|
106
|
+
|
|
107
|
+
## 常见错误对照表
|
|
108
|
+
|
|
109
|
+
| 报错 | 原因 | 修复 |
|
|
110
|
+
|---|---|---|
|
|
111
|
+
| `E403 Two-factor authentication or granular access token with bypass 2fa` | token 未勾选 Bypass 2FA | 重新生成 token,勾选 "Bypass 2FA for publish" 或改用 Automation token |
|
|
112
|
+
| `E402 Payment Required - You must sign up for private packages` | scoped 包按私有发布 | 加 `--access public` |
|
|
113
|
+
| `E404 Scope not found` | `@devflow-core` 组织不存在或无权 | 先在 npmjs.com 创建 `devflow-core` org,或改用账号 scope |
|
|
114
|
+
| `E403 You cannot publish over the previously published versions: x.y.z` | 该版本已发布 | bump 版本号再发 |
|
|
115
|
+
| `npm view` 404 但 publish 成功 | registry 传播延迟 / 本地缓存 | 等 5 分钟;`npm view --prefer-online` |
|
|
116
|
+
| `E404 Not found`(view 时) | 包不存在或 scope 无权 | 确认发布成功(`npm view --prefer-online`),或检查 org 归属 |
|
|
117
|
+
|
|
118
|
+
## 备选:git 分发(不用 npm)
|
|
119
|
+
|
|
120
|
+
仓库已推送到 GitHub 时,用户也可以不经 npm registry 直接安装:
|
|
121
|
+
|
|
122
|
+
```sh
|
|
123
|
+
npx @deepseek-ai/dsh plugin --profile web add github:huangwen-changdu/DevFlow-Core#path:dsh/plugins/dsh-devflow
|
|
124
|
+
```
|
|
125
|
+
|
|
126
|
+
- `dsh plugin` 是 pnpm 转发器,git URL 直接透传;`#path:` 指定仓库内子目录。
|
|
127
|
+
- 无需 npm token/org;更新 = 推送仓库后用户重装。
|
|
128
|
+
- 与 npm 发布二选一即可;npm 发布提供版本化与 `dsh plugin update` 升级路径。
|
|
@@ -7,5 +7,6 @@ Identify the review target from the request and available task materials. Ask on
|
|
|
7
7
|
This command is manual and independent: it does not require, read, modify, or hand off to devflow-prove, PUA, Build, Learn, or any completion state.
|
|
8
8
|
Cover requirement coverage, reachability, boundaries and regressions, evidence strength, and user-visible outcome.
|
|
9
9
|
Report only the skill's required findings, five-angle coverage, context limitations, and suggested manual next action.
|
|
10
|
+
On DeepSeek Harness (DSH), dispatch a fresh subagent and run the review in bounded rounds, one round per review angle; the subagent returns each round's findings and the main agent aggregates them into the final report.
|
|
10
11
|
Do not edit files, invoke another skill, create a task, or declare global task status.
|
|
11
12
|
'''
|
|
@@ -7,5 +7,6 @@ This command is manual and independent: it does not require, read, modify, or ha
|
|
|
7
7
|
Answer the biggest omission, unrecognized blind spot, and least certain point, plus every explicit user question.
|
|
8
8
|
When reviewing implemented work, also run a post-implementation unease check: find business decisions encoded by the implementation but not explicitly confirmed, classify their risk, and state the confirmation needed.
|
|
9
9
|
Separate facts, inference, and unknowns; give every answer confidence and a next step, then report finding levels, unease decisions, limitations, and suggested manual action.
|
|
10
|
+
On DeepSeek Harness (DSH), dispatch a fresh subagent and run the review in bounded rounds, one round per question and one round for the post-implementation unease check; the subagent returns each round's findings and the main agent aggregates them into the final report.
|
|
10
11
|
Do not edit files, invoke another skill, create a task, or declare global task status.
|
|
11
12
|
'''
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
# DevFlow 2.0
|
|
1
|
+
# DevFlow 2.0 — DeepSeek Harness Agent Preset
|
|
2
2
|
|
|
3
3
|
A DSH agent preset that anchors the FIRST model request on the Minimal
|
|
4
4
|
surface, then promotes into a full DevFlow session: Code Mode (PTC) on the
|
|
@@ -19,7 +19,7 @@ wire, the complete DevFlow persona, and the DevFlow lifecycle guaranteed.
|
|
|
19
19
|
`xiaobright/dsh-anchored-standard`, MIT, extended by `dsh-liangshen`),
|
|
20
20
|
with a `phase1Persona` swap so the DevFlow persona only appears after
|
|
21
21
|
promotion.
|
|
22
|
-
- `preset.yml` — picker metadata (name: DevFlow 2.0
|
|
22
|
+
- `preset.yml` — picker metadata (name: DevFlow 2.0).
|
|
23
23
|
|
|
24
24
|
Skills are NOT bundled: the preset's `skill-filesystem` row uses the default
|
|
25
25
|
user root (`$DSH_HOME/skills`), which is exactly where `npm run install:user`
|
|
@@ -46,7 +46,7 @@ cp dsh/agent-presets/devflow-2/NOTICE ~/.dsh/.agent-presets/devfl
|
|
|
46
46
|
|
|
47
47
|
## Use
|
|
48
48
|
|
|
49
|
-
Start a new session in the web UI and pick **DevFlow 2.0
|
|
49
|
+
Start a new session in the web UI and pick **DevFlow 2.0** in the
|
|
50
50
|
preset picker. The roster may need a refresh or restart to show a newly added
|
|
51
51
|
preset. Existing sessions keep their old phase; the two-phase behavior applies
|
|
52
52
|
to new sessions.
|
|
@@ -20,7 +20,7 @@
|
|
|
20
20
|
config:
|
|
21
21
|
shellTools: [bash]
|
|
22
22
|
commonTools: [str_replace_editor]
|
|
23
|
-
messageSources: [user]
|
|
23
|
+
messageSources: [user, goal]
|
|
24
24
|
anchorGate: true
|
|
25
25
|
maxBootstrapSteps: 4
|
|
26
26
|
promoteAfterFirstResponse: true
|
|
@@ -30,6 +30,9 @@
|
|
|
30
30
|
deferredSources: [agent-instructions, skill-catalog]
|
|
31
31
|
deferredGraceSteps: 1
|
|
32
32
|
promotedPresentation: code
|
|
33
|
+
# Aligned with liangshen 0.2.8 (issue #388): after promotion, replace the
|
|
34
|
+
# full-text AGENTS.md injection with one non-imperative reference hint.
|
|
35
|
+
instructionHint: true
|
|
33
36
|
phase1Persona: You are a helpful software engineer assistant.
|
|
34
37
|
|
|
35
38
|
# The `devflow` agent preset: the full coding agent plus DevFlow workflow
|
|
@@ -1,3 +1,3 @@
|
|
|
1
|
-
name: DevFlow 2.0
|
|
1
|
+
name: DevFlow 2.0
|
|
2
2
|
description: DevFlow 开发工作流 + 梁神式两阶段锚定:首个请求只暴露一行 persona(You are a helpful software engineer assistant.)+ 最小工具对(持久 bash + str_replace_editor),无运行时上下文与任何注入;anchorGate 门控(首个 minimal-like 推理块或 4 步兜底)+ 1024 输出预算稳定锚定后,晋升为 Code Mode(单一 run_code),恢复完整 DevFlow 人设并自动激活 devflow-core 生命周期(Brainstorm → Spec/Cut → Plan → Build → Prove)与验证完成闭环;workspace 指令与技能目录延迟一步注入。
|
|
3
3
|
order: 6
|
|
@@ -166,6 +166,74 @@ function isDeferredMessage(message, deferredSources) {
|
|
|
166
166
|
const kind = message.source?.kind
|
|
167
167
|
return kind !== undefined && deferredSources.has(kind)
|
|
168
168
|
}
|
|
169
|
+
// Instruction-hint mode (issue #388, aligned with liangshen 0.2.8): a
|
|
170
|
+
// full-text agent-instructions dump on the promotion boundary flips the
|
|
171
|
+
// anchored trajectory (upstream dsh-anchored-standard #49), so the preset
|
|
172
|
+
// can replace it with a single non-imperative hint that names the reference
|
|
173
|
+
// files and lets the model read them on demand.
|
|
174
|
+
const INSTRUCTION_FROM_RE = /(?:^|\n) *(?:Additional |Updated )?Instructions from: ([^\n]+)/g
|
|
175
|
+
|
|
176
|
+
/** Extract the reference file list one agent-instructions message renders. */
|
|
177
|
+
function extractInstructionPaths(message) {
|
|
178
|
+
const paths = []
|
|
179
|
+
const blocks = Array.isArray(message?.content) ? message.content : []
|
|
180
|
+
for (const block of blocks) {
|
|
181
|
+
if (block?.type !== 'text' || typeof block.text !== 'string') continue
|
|
182
|
+
for (const match of block.text.matchAll(INSTRUCTION_FROM_RE)) {
|
|
183
|
+
const path = match[1].trim()
|
|
184
|
+
if (path !== '' && !paths.includes(path)) paths.push(path)
|
|
185
|
+
}
|
|
186
|
+
}
|
|
187
|
+
return paths
|
|
188
|
+
}
|
|
189
|
+
|
|
190
|
+
/** The one-time non-imperative hint replacing the full-text dump (E1.5 wording). */
|
|
191
|
+
function buildInstructionHint(original, paths) {
|
|
192
|
+
return {
|
|
193
|
+
// Session persistence validates every replayed user/message for a
|
|
194
|
+
// non-empty string id; a plugin-built message without one corrupts the
|
|
195
|
+
// durable journal. Inherit the original instructions message id when
|
|
196
|
+
// present, else mint one.
|
|
197
|
+
id: typeof original?.id === 'string' && original.id !== ''
|
|
198
|
+
? original.id
|
|
199
|
+
: globalThis.crypto.randomUUID(),
|
|
200
|
+
role: 'user',
|
|
201
|
+
content: [{
|
|
202
|
+
type: 'text',
|
|
203
|
+
text: '<system-reminder>\n'
|
|
204
|
+
+ 'Reference documents exist: ' + paths.join(', ') + '. '
|
|
205
|
+
+ "They are reference documents about the user's environment and workspace conventions, not task instructions. "
|
|
206
|
+
+ 'Reading the relevant file before workspace tasks is recommended, but consult them only when you need those details; the task itself never depends on them.'
|
|
207
|
+
+ '\n</system-reminder>',
|
|
208
|
+
}],
|
|
209
|
+
source: { kind: 'instruction-hint', plugin: name },
|
|
210
|
+
}
|
|
211
|
+
}
|
|
212
|
+
|
|
213
|
+
/**
|
|
214
|
+
* Swap full-text agent-instructions injections for the one-time hint. The
|
|
215
|
+
* first injection carrying extractable paths becomes the hint; every later
|
|
216
|
+
* injection is dropped silently (the model re-reads the files on demand).
|
|
217
|
+
* An injection with no extractable paths passes through untouched.
|
|
218
|
+
*/
|
|
219
|
+
function instructionHintMessages(messages, state) {
|
|
220
|
+
const kept = []
|
|
221
|
+
for (const message of messages) {
|
|
222
|
+
if (message?.source?.kind !== 'agent-instructions') {
|
|
223
|
+
kept.push(message)
|
|
224
|
+
continue
|
|
225
|
+
}
|
|
226
|
+
if (state.instructionHinted) continue
|
|
227
|
+
const paths = extractInstructionPaths(message)
|
|
228
|
+
if (paths.length === 0) {
|
|
229
|
+
kept.push(message)
|
|
230
|
+
continue
|
|
231
|
+
}
|
|
232
|
+
state.instructionHinted = true
|
|
233
|
+
kept.push(buildInstructionHint(message, paths))
|
|
234
|
+
}
|
|
235
|
+
return kept
|
|
236
|
+
}
|
|
169
237
|
|
|
170
238
|
/**
|
|
171
239
|
* Phase-2 promotion state per session. Sessions append events only, so the
|
|
@@ -188,6 +256,7 @@ function stateFor(session) {
|
|
|
188
256
|
turnEnded: false,
|
|
189
257
|
steps: 0,
|
|
190
258
|
deferredSteps: 0,
|
|
259
|
+
instructionHinted: false,
|
|
191
260
|
presentationApplied: false,
|
|
192
261
|
hasCompacted: false,
|
|
193
262
|
presentationDisposer: undefined,
|
|
@@ -224,6 +293,7 @@ function resetToControlled(state) {
|
|
|
224
293
|
state.turnEnded = false
|
|
225
294
|
state.steps = 0
|
|
226
295
|
state.deferredSteps = 0
|
|
296
|
+
state.instructionHinted = false
|
|
227
297
|
state.presentationApplied = false
|
|
228
298
|
state.hasCompacted = true
|
|
229
299
|
}
|
|
@@ -369,6 +439,7 @@ export function apply(ctx, config) {
|
|
|
369
439
|
compactionTools,
|
|
370
440
|
phase1FirstCallInstruction,
|
|
371
441
|
phase1Persona,
|
|
442
|
+
instructionHint: config.instructionHint === true,
|
|
372
443
|
}
|
|
373
444
|
|
|
374
445
|
// Promotion is applied at step/turn boundaries, never while a step is still
|
|
@@ -464,14 +535,18 @@ export function apply(ctx, config) {
|
|
|
464
535
|
messages: decision.messages.filter(message => isAllowedMessage(message, messageSources)),
|
|
465
536
|
}
|
|
466
537
|
}
|
|
538
|
+
let result = decision
|
|
467
539
|
if (state.deferredSteps < policy.deferredGraceSteps) {
|
|
468
540
|
state.deferredSteps += 1
|
|
469
|
-
|
|
470
|
-
...
|
|
471
|
-
messages:
|
|
541
|
+
result = {
|
|
542
|
+
...result,
|
|
543
|
+
messages: result.messages.filter(message => !isDeferredMessage(message, deferredSources)),
|
|
472
544
|
}
|
|
473
545
|
}
|
|
474
|
-
|
|
546
|
+
if (policy.instructionHint) {
|
|
547
|
+
result = { ...result, messages: instructionHintMessages(result.messages, state) }
|
|
548
|
+
}
|
|
549
|
+
return result
|
|
475
550
|
}, { prepend: true })
|
|
476
551
|
|
|
477
552
|
// Phase 1 caps the next request output budget to bootstrapMaxTokens, the
|
|
@@ -493,4 +568,4 @@ export function apply(ctx, config) {
|
|
|
493
568
|
}
|
|
494
569
|
return { ...resolved, maxTokens: policy.bootstrapMaxTokens }
|
|
495
570
|
}, { prepend: true })
|
|
496
|
-
}
|
|
571
|
+
}
|
|
@@ -1,12 +1,14 @@
|
|
|
1
1
|
---
|
|
2
2
|
name: devflow-adversarial
|
|
3
|
-
description: "Use when a user explicitly asks for an independent deep adversarial review, upgraded adversarial review, red-team review, 对抗审查, 升级版对抗审查, or a five-angle challenge of current work. It can run at any task stage and does not read, require, modify, or hand off to devflow-prove, PUA, Build, Learn, or any completion state."
|
|
3
|
+
description: "Use when a user explicitly asks for an independent deep adversarial review, upgraded adversarial review, red-team review, 对抗审查, 升级版对抗审查, 红队审查, 五角度挑战, or a five-angle challenge of current work. It can run at any task stage and does not read, require, modify, or hand off to devflow-prove, PUA, Build, Learn, or any completion state."
|
|
4
4
|
---
|
|
5
5
|
|
|
6
6
|
# DevFlow Adversarial Review
|
|
7
7
|
|
|
8
8
|
Run an independent, user-requested challenge of the current task materials. This skill does not declare global task status or perform work beyond review.
|
|
9
9
|
|
|
10
|
+
Use this skill when the user asks to challenge whether the current result holds. When the user asks what is missing or uncertain instead, use `devflow-find-fault`.
|
|
11
|
+
|
|
10
12
|
## Entry Gate
|
|
11
13
|
|
|
12
14
|
1. Confirm the user explicitly requested this review.
|
|
@@ -14,7 +16,9 @@ Run an independent, user-requested challenge of the current task materials. This
|
|
|
14
16
|
3. If the target is unclear, ask one smallest question to identify it.
|
|
15
17
|
4. As an independent manual review, do not read, require, or alter `devflow-prove`, PUA, Build, Learn, or any lifecycle state.
|
|
16
18
|
|
|
17
|
-
On DeepSeek Harness (DSH),
|
|
19
|
+
On DeepSeek Harness (DSH), dispatch a fresh `subagent` so the challenge stays independent of the main agent's reasoning. Call the `subagent` tool once with `run_in_background: false` and a complete standalone prompt that names the review target and the material paths, and instructs the subagent to read those materials and return evidence-backed findings (the subagent has no conversation seed and cannot see this conversation). Then run the review in bounded rounds, one review unit per round: after each round the subagent returns that unit's findings, you aggregate them and report progress, then continue the same subagent conversation with the `send_message` tool. After the final unit, assemble the complete `Required Output` below from the aggregated findings. The subagent returns findings only — it never declares lifecycle status, edits files, or invokes another skill. If a round returns nothing usable (timeout, truncation, or failure), record it under `Context limitations`, retry that unit once with a narrower instruction, and continue with the remaining units; never silently drop a unit.
|
|
20
|
+
|
|
21
|
+
Review units: one of the five angles per round, five rounds in total.
|
|
18
22
|
|
|
19
23
|
## Five-Angle Review
|
|
20
24
|
|
|
@@ -37,6 +41,7 @@ Findings:
|
|
|
37
41
|
- Critical: <finding or none>; evidence: <facts>; confidence: high/medium/low
|
|
38
42
|
- Important: <finding or none>; evidence: <facts>; confidence: high/medium/low
|
|
39
43
|
- Observation: <finding or none>; evidence: <facts>; confidence: high/medium/low
|
|
44
|
+
Repeat one bullet per finding; order findings by severity, then confidence; write none when a level has no finding.
|
|
40
45
|
Five-angle coverage:
|
|
41
46
|
- Requirement coverage: <challenge and result>
|
|
42
47
|
- Reachability: <challenge and result>
|
|
@@ -15,20 +15,15 @@ Receives a `CUT_PASS` Cut Decision from `devflow-cut`, either through the direct
|
|
|
15
15
|
- Depth C input: `CUT_PASS` plus the approved design contract; no Plan Pack is required.
|
|
16
16
|
|
|
17
17
|
When no plan file exists, the approved design and Cut Decision form the Build Contract basis; skip the plan checker.
|
|
18
|
-
##
|
|
18
|
+
## Direct Execution
|
|
19
19
|
|
|
20
|
-
Load `skills/devflow-build/references/build-methods.md` after this
|
|
20
|
+
Load `skills/devflow-build/references/build-methods.md` after this section and before implementation slices. It owns the detailed minimal-change and slice discipline.
|
|
21
21
|
|
|
22
|
-
|
|
22
|
+
There is no pre-edit plan review. The executor reads only the current task's execution spec — `Files`, `Change mechanics`, `Steps`, `Verify` — from the approved plan, edits those files directly, runs `Verify`, and appends actual evidence. An actual edit or verification failure must stop and return `BUILD_BLOCKED` with the facts to `devflow-core`: the observed mismatch, affected anchor, and smallest replan decision. Do not pre-check anchors, do not guess, do not silently repair the plan.
|
|
23
23
|
|
|
24
|
-
|
|
25
|
-
2. Behavior: each task's `Current behavior` still describes the code.
|
|
26
|
-
3. Steps: unambiguous, with verification commands that can run in this environment.
|
|
27
|
-
4. Skills: every skill declared in `External Skills` (Cut Decision or plan header) is actually loaded through the platform's skill mechanism, or the reason it does not apply is recorded; loading alone is not completion — Build requires the specialist's returned result, not-applicable, or failure facts. A specialist result implying structure outside the approved scope returns scope-drift facts to `devflow-core`, not silent adoption.
|
|
24
|
+
Every skill declared in `External Skills` (Cut Decision or plan header) must actually be loaded through the platform's skill mechanism, or the reason it does not apply recorded; loading alone is not completion — Build requires the specialist's returned result, not-applicable, or failure facts. A specialist result implying structure outside the approved scope returns scope-drift facts to `devflow-core`, not silent adoption. Skill loading is not a pre-edit view and remains mandatory.
|
|
28
25
|
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
For Depth C (no Plan Pack), run the same review against the approved design contract: confirm the symbols and behaviors it names still exist. Depth C keeps Build freedom inside the Cut Decision; it does not skip this review or the Stop Protocol.
|
|
26
|
+
For Depth C (no Plan Pack), the approved design contract is the execution spec: edit directly from it without a separate reconciliation pass. Depth C keeps Build freedom inside the Cut Decision; it does not skip the Stop Protocol.
|
|
32
27
|
|
|
33
28
|
## Build Contract
|
|
34
29
|
|
|
@@ -51,7 +46,7 @@ When saving a plan file, use `docs/plans/YYYY-MM-DD-<short-kebab-name>.md`, reso
|
|
|
51
46
|
|
|
52
47
|
For multi-step work, tasks must cite the approved source, be small and verifiable, and follow the required task contract (Task: / Task type: / Files: / Interfaces: / Current behavior: / Target behavior: / Change mechanics: / Call impact: / Steps: / Acceptance: / Verify: / Comments: / Not doing:) defined in `skills/devflow-plan/SKILL.md`.
|
|
53
48
|
|
|
54
|
-
No unresolved markers. For `Code change`,
|
|
49
|
+
No unresolved markers. For `Code change`, the dispatched execution spec follows the recorded file symbol/anchor and `Change mechanics`; do not re-decide the implementation mechanism in Build. `Current behavior`, `Target behavior`, and `Call impact` are the plan author's records, not executor re-read requirements. The verification step must retain its trigger/input, expected result, and command or manual scenario. `Documentation-only` applies only to tasks with no runtime code files and explicit `documentation-only` interfaces. No "add tests" without naming the behavior. No "handle edge cases" without naming the edge case. No "similar to Task N" shortcuts; repeat enough detail for each task to stand alone.
|
|
55
50
|
|
|
56
51
|
Before Build, run `node scripts/devflow-plan.js <plan-file>` when a plan is saved to a file. If not found at `scripts/devflow-plan.js` (project-level), try `~/.codex/scripts/devflow-plan.js` or `~/.claude/scripts/devflow-plan.js` (user-level). Do NOT look under `skills/scripts/`. See `core-methods.md` Script Path Resolution.
|
|
57
52
|
|
|
@@ -85,21 +80,21 @@ Rules:
|
|
|
85
80
|
|
|
86
81
|
## Execution Mode
|
|
87
82
|
|
|
88
|
-
The plan's `Execution mode` (`sequential` | `single-subagent` | `fan-out`) is chosen at Plan approval and passed to Build; Build does not re-decide it. `sequential` runs tasks in dependency order as the Build agent itself; `single-subagent`
|
|
83
|
+
The plan's `Execution mode` (`sequential` | `single-subagent` | `fan-out`) is chosen at Plan approval and passed to Build; Build does not re-decide it. `sequential` runs tasks in dependency order as the Build agent itself; `single-subagent` dispatches one task's execution spec at a time to one executor subagent while the main agent only schedules; `fan-out` runs independent tasks as parallel subagents and dependent tasks in sequence after their inputs land.
|
|
89
84
|
|
|
90
85
|
### Single-subagent dispatch
|
|
91
86
|
|
|
92
|
-
- The main agent does not execute tasks. It dispatches
|
|
93
|
-
- The subagent
|
|
87
|
+
- The main agent does not execute tasks. It dispatches one task's execution spec at a time to one executor subagent, waits for the return, and then merges the returned evidence and enters Prove once.
|
|
88
|
+
- The subagent edits that task's `Files` directly, runs its `Verify`, appends actual evidence, and returns the task results and evidence, or `BUILD_BLOCKED` facts. On DSH, one task per subagent round; the next task continues through `send_message`; a timeout or truncated return retries that task once.
|
|
94
89
|
- The main agent may send one bounded follow-up when the return misses evidence; anything still incomplete is returned to `devflow-core` as `BUILD_BLOCKED` facts. The subagent never declares done, never enters Prove, and never re-decides the mode or the Cut scope.
|
|
95
90
|
|
|
96
91
|
### Fan-out dispatch
|
|
97
92
|
|
|
98
93
|
- Two tasks may run in parallel only when their `Files` touch disjoint file/symbol sets and neither `Interfaces` consumes a symbol the other `Produces`; otherwise run the producer first.
|
|
99
|
-
- Each subagent
|
|
94
|
+
- Each subagent receives only its task's execution spec, edits its task's `Files` directly, runs its `Verify`, and returns the task result or `BUILD_BLOCKED` facts.
|
|
100
95
|
- The main agent merges returned results, reconciles cross-task file overlap, runs the unified `Diff Self-Check`, and enters `devflow-prove` once with merged evidence — never per-subagent.
|
|
101
96
|
|
|
102
|
-
`single-subagent` and `fan-out` are scheduling only; they do not change
|
|
97
|
+
`single-subagent` and `fan-out` are scheduling only; they do not change Cut scope, Stop Protocol, or the single Prove gate.
|
|
103
98
|
|
|
104
99
|
## Source Check
|
|
105
100
|
|
|
@@ -196,7 +191,7 @@ If any file has no goal link, remove that change.
|
|
|
196
191
|
| "We'll verify everything at the end." | Verify slices when focused checks exist. |
|
|
197
192
|
| "Docs changes do not need proof." | Docs/rules/skills need validation just like code. |
|
|
198
193
|
| "The issue only mentions one caller." | Check sibling callers before choosing the fix location. |
|
|
199
|
-
| "The plan is approved, so I just execute." |
|
|
194
|
+
| "The plan is approved, so I just execute." | Right: the approved execution spec is edited directly; an actual edit or verification failure returns `BUILD_BLOCKED` to Core. |
|
|
200
195
|
| "I'll infer the missing step." | Guessing past a gap is forbidden; unclear instructions return `BUILD_BLOCKED` facts. |
|
|
201
196
|
| "The code is self-explanatory." | That does not waive a comment required by the approved contract, project convention, or a non-obvious boundary. |
|
|
202
197
|
| "Comments will get stale." | Keep a required comment accurate or remove a stale one; a stale explanation is not a reason to skip a needed decision record. |
|
|
@@ -207,7 +202,7 @@ If any file has no goal link, remove that change.
|
|
|
207
202
|
|
|
208
203
|
Stop executing immediately and return `BUILD_BLOCKED` with the blocking facts to `devflow-core` when:
|
|
209
204
|
|
|
210
|
-
-
|
|
205
|
+
- an edit cannot be applied or a verification fails (dead anchor, stale behavior, missing interface, unclear step)
|
|
211
206
|
- a dependency, tool, or declared external skill is missing and the task depends on it, or its returned failure facts block the approved work
|
|
212
207
|
- verification fails repeatedly for the same task
|
|
213
208
|
- the plan has a critical gap that prevents starting or continuing
|
|
@@ -228,7 +223,7 @@ Known unverified: ...
|
|
|
228
223
|
|
|
229
224
|
Before leaving this skill, confirm:
|
|
230
225
|
|
|
231
|
-
- [ ]
|
|
226
|
+
- [ ] Direct Execution completed — each task's spec was edited directly and verified, or actual failures were returned to `devflow-core` as `BUILD_BLOCKED`.
|
|
232
227
|
- [ ] Declared external skills were loaded, or the exception reason was recorded in `Skills loaded`.
|
|
233
228
|
- [ ] Build contract exists.
|
|
234
229
|
- [ ] Cut gates passed or were run.
|
|
@@ -7,6 +7,8 @@ description: "Use when a user explicitly asks to find faults, identify the bigge
|
|
|
7
7
|
|
|
8
8
|
Run an independent, user-requested critique of the current task materials. This skill identifies gaps and uncertainty without declaring global task status.
|
|
9
9
|
|
|
10
|
+
Use this skill when the user asks what is missing, unrecognized, or uncertain. When the user asks a five-angle challenge of whether the result holds instead, use `devflow-adversarial`.
|
|
11
|
+
|
|
10
12
|
## Entry Gate
|
|
11
13
|
|
|
12
14
|
1. Confirm the user explicitly requested find-fault review.
|
|
@@ -14,12 +16,16 @@ Run an independent, user-requested critique of the current task materials. This
|
|
|
14
16
|
3. Ask one smallest question when the target is unclear.
|
|
15
17
|
4. As an independent manual review, do not read, require, or alter `devflow-prove`, PUA, Build, Learn, or any lifecycle state.
|
|
16
18
|
|
|
17
|
-
On DeepSeek Harness (DSH),
|
|
19
|
+
On DeepSeek Harness (DSH), dispatch a fresh `subagent` so the critique stays independent of the main agent's reasoning. Call the `subagent` tool once with `run_in_background: false` and a complete standalone prompt that names the review target and the material paths, and instructs the subagent to read those materials and return evidence-backed findings (the subagent has no conversation seed and cannot see this conversation). Then run the review in bounded rounds, one review unit per round: after each round the subagent returns that unit's findings, you aggregate them and report progress, then continue the same subagent conversation with the `send_message` tool. After the final unit, assemble the complete `Required Output` below from the aggregated findings. The subagent returns findings only — it never declares lifecycle status, edits files, or invokes another skill. If a round returns nothing usable (timeout, truncation, or failure), record it under `Context limitations`, retry that unit once with a narrower instruction, and continue with the remaining units; never silently drop a unit.
|
|
20
|
+
|
|
21
|
+
Review units: one question per round — the three default questions and every user-supplied question — plus one final round for the unease check when the target contains implementation material.
|
|
18
22
|
|
|
19
23
|
## Post-Implementation Unease Check
|
|
20
24
|
|
|
21
25
|
When target materials include an implemented feature, diff, or completion-ready result, also inspect whether the implementation has silently decided business behavior the user never confirmed. This check is for requirement-confidence gaps, not code quality or test coverage.
|
|
22
26
|
|
|
27
|
+
When the target contains no implementation material (no diff, no new code, no completion-ready result), skip the unease check and report `Unease check: not applicable` with the reason; do not invent business decisions from requirements text alone.
|
|
28
|
+
|
|
23
29
|
1. Compare explicit requirements, conversation evidence, acceptance criteria, and current behavior against the implementation.
|
|
24
30
|
2. List every material decision with no direct confirmation, especially: ordering, filtering, defaults, empty states, pagination, permissions, state transitions, exceptions, retries, boundary inputs, and conflicting actor outcomes.
|
|
25
31
|
3. For each decision, state the encoded behavior or implicit assumption, plausible alternative interpretations, impact if wrong, the confirmation question, and a temporary recommendation.
|
|
@@ -78,6 +84,7 @@ Findings:
|
|
|
78
84
|
- Critical: <finding or none>; evidence: <facts>; confidence: high/medium/low
|
|
79
85
|
- Important: <finding or none>; evidence: <facts>; confidence: high/medium/low
|
|
80
86
|
- Observation: <finding or none>; evidence: <facts>; confidence: high/medium/low
|
|
87
|
+
Repeat one bullet per finding; order findings by severity, then confidence; write none when a level has no finding.
|
|
81
88
|
Context limitations: <unavailable material or none>
|
|
82
89
|
Suggested next action: <manual action for the user, or none>
|
|
83
90
|
```
|
|
@@ -18,11 +18,11 @@ Turn an A/B `CUT_PASS`-bounded approved design or confirmed Spec into one review
|
|
|
18
18
|
1. Read only source material, code, tests, and conventions relevant to the approved scope. Load `skills/devflow-spec/references/spec-plan-methods.md` and `skills/devflow-plan/references/plan-methods.md` before applying Plan Pack mechanics.
|
|
19
19
|
2. Map exact affected file responsibilities once in `## File Structure` before writing tasks. Reuse existing modules and name the intended file operation.
|
|
20
20
|
3. Perform bounded real investigation and record it as task-level `Prewalk`: actual `Execution Trace`, Current Handoff Facts, and only the unfinished `Remaining Structured Worklist`.
|
|
21
|
-
4. Split independent deliverables into small, reviewable tasks. Each task should be understandable without referring to another task
|
|
21
|
+
4. Split independent deliverables into small, reviewable tasks. Each task should be understandable without referring to another task, and it carries its own complete execution spec(执行规范)— `Files`, `Change mechanics`, `Steps`, and `Verify` — so the executor edits directly from the task without re-reading the plan or the code for a pre-edit view(零 view).
|
|
22
22
|
5. Write the plan using the required header and task contract below.
|
|
23
23
|
6. Self-review Cut Decision fidelity, source coverage, File Structure, Prewalk evidence, file-operation classifications, interface consistency, concrete steps, acceptance proof, and scope exclusions.
|
|
24
24
|
7. Run `node scripts/devflow-plan.js <plan-file>` when the project-level checker exists. Otherwise resolve the user-level checker according to `core-methods.md` Script Path Resolution.
|
|
25
|
-
8. **STOP — request user review.** On DSH, request review with the structured `ask_user_question` tool (single-select: approve / request changes). Revise and revalidate when requested. On approval, ask execution mode (single-select: `sequential` — the Build agent runs tasks in dependency order / `single-subagent` — the main agent only schedules: one subagent runs
|
|
25
|
+
8. **STOP — request user review.** On DSH, request review with the structured `ask_user_question` tool (single-select: approve / request changes). Revise and revalidate when requested. On approval, ask execution mode (single-select: `sequential` — the Build agent runs tasks in dependency order / `single-subagent` — the main agent only schedules: one subagent runs tasks one per round in dependency order / `fan-out` — independent tasks run as parallel subagents) and record it as the plan's optional `Execution mode` header. Then perform only a lightweight Cut-consistency review. An approved A/B Plan directly enters `devflow-build`; scope-drift facts return to `devflow-core`.
|
|
26
26
|
|
|
27
27
|
Default landing is `docs/plans/YYYY-MM-DD-<short-kebab-name>.md`, resolved from the target project root. Do not place implementation plans in `docs/features/` or `docs/specs/`.
|
|
28
28
|
|
|
@@ -56,6 +56,8 @@ Inherit `External Skills` from the Cut Decision unchanged; the Plan Pack carries
|
|
|
56
56
|
|
|
57
57
|
`Execution mode` is not part of Cut scope and does not change the checker. It is asked at approval and recorded so Build knows how to run tasks: sequentially as the Build agent itself, through one delegated subagent while the main agent only schedules, or fan out independent tasks to parallel subagents.
|
|
58
58
|
|
|
59
|
+
Each task's `Files`, `Change mechanics`, `Steps`, and `Verify` form the only execution basis(执行规范)handed to the executor: dispatch sends just these fields, and the executor edits directly from them without a pre-edit view of the plan document, the code, or the anchors. `Read-basis` / `Live anchors` remain the plan author's evidence record, not executor re-read instructions.
|
|
60
|
+
|
|
59
61
|
## Required Task Contract
|
|
60
62
|
|
|
61
63
|
```text
|
|
@@ -90,7 +92,7 @@ Execution Trace:
|
|
|
90
92
|
- Verified: <actual check> → <observed result; or "none yet">.
|
|
91
93
|
|
|
92
94
|
Current Handoff Facts:
|
|
93
|
-
- Target anchors: <current file, symbol, or range
|
|
95
|
+
- Target anchors: <current file, symbol, or range the plan author verified (evidence record, not executor re-read instruction)>.
|
|
94
96
|
- Nearby convention: <comparable inspected code and observed convention; or "no comparable code found">.
|
|
95
97
|
- Direct path: <traced callers, collaborators, boundaries, affected tests; or "none">.
|
|
96
98
|
- Current constraints: <observed contract, ordering, errors, compatibility; or "none">.
|
|
@@ -104,7 +106,7 @@ Remaining Structured Worklist:
|
|
|
104
106
|
Done when: <fact proving this action is complete>.
|
|
105
107
|
```
|
|
106
108
|
|
|
107
|
-
`File Structure` is one responsibility map, not a fixed architecture rule. For every non-trivial Code change, every task must carry a `Prewalk`. Each trace row records an action actually performed and its observed result; it cannot describe planned work. `Remaining Structured Worklist` contains only unfinished actions. Each item needs `Anchors`, `Verify`, and `Done when`; cap one task at 12 items.
|
|
109
|
+
`File Structure` is one responsibility map, not a fixed architecture rule. For every non-trivial Code change, every task must carry a `Prewalk`. Each trace row records an action actually performed and its observed result; it cannot describe planned work. `Remaining Structured Worklist` contains only unfinished actions. Each item needs `Anchors`, `Verify`, and `Done when`; cap one task at 12 items. The executor reads the current task's execution spec (`Files`, `Change mechanics`, `Steps`, `Verify`), edits directly, runs `Verify`, appends actual evidence, and returns the observed difference as facts to `devflow-core` only when an edit or verification actually fails — there is no pre-edit plan or code view. Documentation-only tasks retain their existing exception.
|
|
108
110
|
|
|
109
111
|
Use only `Create`, `Modify`, and `Test` file-operation labels. For a `Code change`, every existing-file row must name a symbol or stable anchor; `Create` rows use `new file`. `Current behavior`, `Target behavior`, `Change mechanics`, and `Call impact` are mandatory. `Change mechanics` must contain the smallest code snippet, pseudocode, or exact replacement rule that removes implementation inference. Interfaces name exact symbols and input/output shape. The verification step and `Verify` field name the trigger/input, expected result, and runnable command or manual scenario.
|
|
110
112
|
|
|
@@ -112,7 +114,7 @@ Use only `Create`, `Modify`, and `Test` file-operation labels. For a `Code chang
|
|
|
112
114
|
|
|
113
115
|
## Boundaries
|
|
114
116
|
|
|
115
|
-
Plan generation does not repeat Cut, perform Build or Prove, prescribe independent review, test-first workflow, version-control task steps, or execute automatically. It converts `CUT_PASS` into a static construction checklist. The checker validates static structure; it does not judge architecture or lifecycle state.
|
|
117
|
+
Plan generation does not repeat Cut, perform Build or Prove, prescribe independent review, test-first workflow, version-control task steps, or execute automatically. It converts `CUT_PASS` into a static construction checklist. The checker validates static structure; it does not judge architecture or lifecycle state. Plan generation writes the execution spec(执行规范); the zero-view(零 view)execution discipline belongs to `plan-methods.md` and `devflow-build` — a Plan Pack must not include execution-phase re-read or pre-edit review instructions.
|
|
116
118
|
|
|
117
119
|
## Anti-Rationalization
|
|
118
120
|
|
|
@@ -136,7 +138,7 @@ Before leaving this skill, confirm:
|
|
|
136
138
|
- [ ] `Spec coverage` maps the source to plan tasks.
|
|
137
139
|
- [ ] Header, constraints, File Structure, interfaces, concrete steps, acceptance, verification, context-specific comments, exclusions, and task-level Prewalk records are present.
|
|
138
140
|
- [ ] Each trace entry is an observed past action/result; each remaining worklist item is bounded, verified, and fact-complete.
|
|
139
|
-
- [ ] Every task is independently understandable, requires
|
|
141
|
+
- [ ] Every task is independently understandable, requires no pre-edit read, and has no unresolved or vague placeholder.
|
|
140
142
|
- [ ] The checker passed when available.
|
|
141
143
|
- [ ] The user reviewed the written plan.
|
|
142
144
|
- [ ] An approved A/B Plan entered `devflow-build`; any scope-drift facts returned to `devflow-core`.
|
|
@@ -29,14 +29,14 @@ Execution Trace:
|
|
|
29
29
|
- Verified: [actual check] → [observed result; or "none yet"].
|
|
30
30
|
|
|
31
31
|
Current Handoff Facts:
|
|
32
|
-
- Target anchors: [
|
|
32
|
+
- Target anchors: [current file/symbol/range the plan author verified; evidence record, not executor re-read instruction].
|
|
33
33
|
- Nearby convention: [inspected comparable code and observed convention; or "no comparable code found"].
|
|
34
34
|
- Direct path: [traced callers, collaborators, boundaries, affected tests; or "none"].
|
|
35
35
|
- Current constraints: [observed contract, ordering, error behavior, compatibility; or "none"].
|
|
36
36
|
- Planned touch set: [remaining expected files/symbols and reason].
|
|
37
37
|
- Risks / stop conditions: [facts that require Core replan; or "none beyond ordinary Plan drift"].
|
|
38
|
-
- Read-basis: [
|
|
39
|
-
- Live anchors: [
|
|
38
|
+
- Read-basis: [已读文件清单——计划作者的证据簿记,执行者不重读].
|
|
39
|
+
- Live anchors: [计划作者已确认的锚点——执行者不重读,仅作失败回报时的定位].
|
|
40
40
|
|
|
41
41
|
Remaining Structured Worklist:
|
|
42
42
|
- [ ] [one independently completable remaining action with file/symbol and expected outcome].
|
|
@@ -61,14 +61,14 @@ Remaining Structured Worklist:
|
|
|
61
61
|
|
|
62
62
|
## Delegated Execution
|
|
63
63
|
|
|
64
|
-
A delegated executor
|
|
64
|
+
A delegated executor — the main agent itself, one delegated subagent, or one fan-out subagent — never re-reads the plan document, the latest trace, the anchors, the goal, or the code for a pre-edit view. It receives only the current task's execution spec (`Files`, exact replacement rules, `Steps`, `Verify`), edits those files directly, runs the task's `Verify` command, and returns actual evidence or failure facts to the orchestrating Build agent. `Read-basis` and `Live anchors` stay in the plan as the plan author's evidence record (the checker requires them); they are not executor re-read instructions.
|
|
65
65
|
|
|
66
|
-
|
|
66
|
+
When an edit cannot be applied or a `Verify` fails, the executor returns the observed difference — affected file/anchor, actual behavior, blocked verification, and smallest replan decision — as facts to `devflow-core`; it does not pre-check anchors and does not guess past a failed edit. A stale line reference may be corrected without returning only when the symbol, contract, responsibility, and intended outcome are unchanged.
|
|
67
67
|
|
|
68
68
|
### Fan-out
|
|
69
69
|
|
|
70
|
-
When the plan's `Execution mode` is `fan-out`, one Build orchestrator partitions tasks into parallel groups and dispatches each task to a subagent. Every subagent
|
|
70
|
+
When the plan's `Execution mode` is `fan-out`, one Build orchestrator partitions tasks into parallel groups and dispatches each task to a subagent. Every subagent receives only its own task's execution spec, edits its task's `Files` directly, runs its task's `Verify`, and returns evidence or failure facts; it does not re-read the plan, the trace, the anchors, or the code. Two tasks may run in parallel only when their `Files` touch disjoint file/symbol sets and neither `Interfaces` consumes a symbol the other `Produces`; tasks sharing a file/symbol or with a consume/produce dependency run in sequence. The orchestrator merges returned results, reconciles cross-task overlap, and enters Prove once with merged evidence.
|
|
71
71
|
|
|
72
72
|
### Single-subagent
|
|
73
73
|
|
|
74
|
-
When the plan's `Execution mode` is `single-subagent`, the main agent only schedules: it dispatches
|
|
74
|
+
When the plan's `Execution mode` is `single-subagent`, the main agent only schedules: it dispatches one task's execution spec at a time to one executor subagent, waits for the return, then merges the returned evidence and enters Prove once. The main agent dispatches one task at a time — only that task's execution spec, not the whole plan. The subagent edits that task's `Files` directly, runs its `Verify`, appends actual evidence, and returns the task results and evidence or `BUILD_BLOCKED` facts; the next task continues the same subagent conversation through `send_message`. On DeepSeek Harness (DSH), subagent turns are time-bounded, so one task per round is the norm; a timeout or truncated return retries that one task once with a narrower instruction. The subagent never re-reads the plan, the trace, the anchors, or the code for a pre-edit view. Nothing runs in parallel; prefer this mode for small to medium plans or plans whose tasks are strongly dependent, and keep `fan-out` for large parallel plans.
|
|
@@ -219,6 +219,8 @@ Expected behavior:
|
|
|
219
219
|
- Must begin after the explicit review request without a separate confirmation prompt. Must not add a second confirmation gate after the explicit review request.
|
|
220
220
|
- Must ask one smallest question only when the review target is unclear.
|
|
221
221
|
- Must cover all five fixed dimensions: requirement coverage, reachability, boundaries and regressions, evidence strength, and user-visible outcome.
|
|
222
|
+
- Must run on DSH in bounded rounds, one round per review angle, with the subagent returning each round's findings to the main agent for aggregation.
|
|
223
|
+
- Must dispatch a fresh subagent.
|
|
222
224
|
- Findings must use `Critical`, `Important`, or `Observation` and include evidence, confidence, and context limitations.
|
|
223
225
|
- Must not read, require, modify, or hand off to `devflow-prove`, PUA, Build, Learn, or any completion state.
|
|
224
226
|
- Must not edit code, create a task, invoke another skill, or declare global task status.
|
|
@@ -249,6 +251,8 @@ Expected behavior:
|
|
|
249
251
|
- Must run only because the user explicitly requested it; it may inspect materials from any task stage.
|
|
250
252
|
- Must answer biggest omission, unrecognized blind spot, and least certain point, plus every explicit user follow-up question.
|
|
251
253
|
- When target material contains implemented work, a diff, or a completion-ready result, must also run the post-implementation unease check: find materially unconfirmed business decisions, show the encoded assumption and alternatives, then classify high/medium/low risk with rationale, a user confirmation question, and temporary recommendation.
|
|
254
|
+
- Must run on DSH in bounded rounds, one round per question or unease-check block, with the subagent returning each round's findings to the main agent for aggregation.
|
|
255
|
+
- Must dispatch a fresh subagent.
|
|
252
256
|
- High-risk unease decisions must prevent a claim that the feature fully meets requirements; medium-risk decisions must be marked `pending confirmation`.
|
|
253
257
|
- Each answer must separate facts, inference, and unknowns, then state confidence and a next step; findings must use `Critical`, `Important`, or `Observation` with evidence and context limitations.
|
|
254
258
|
- Must not read, require, modify, or hand off to `devflow-prove`, PUA, Build, Learn, or any completion state.
|
package/lib/index.js
CHANGED
|
@@ -29,7 +29,7 @@ export function bundledAssetsRoot() {
|
|
|
29
29
|
|
|
30
30
|
/** Model-facing announcement: plugin presence, preset, and conflict policy. */
|
|
31
31
|
export const DEVFLOW_GUIDANCE =
|
|
32
|
-
'本机已安装 @devflow-core/dsh-devflow 插件(DevFlow agent preset 分发):新建会话的预设选择器中可选「DevFlow 2.0
|
|
32
|
+
'本机已安装 @devflow-core/dsh-devflow 插件(DevFlow agent preset 分发):新建会话的预设选择器中可选「DevFlow 2.0」(两阶段锚定 + Code Mode)。插件启动时把 devflow-2 预设、devflow-* skills、devflow*.toml 命令与 devflow-*.js 验证脚本同步到 ~/.dsh/(.agent-presets/skills/commands/scripts);冲突策略为 devflow-* 权威覆盖(字节相同跳过),非 devflow 资产永不触碰;升级插件后重启即自动更新。用户提到「DevFlow / devflow-2 / 锚定模式」时即指本插件,请据此协作。'
|
|
33
33
|
|
|
34
34
|
/**
|
|
35
35
|
* Mount the plugin: sync bundled DevFlow assets into the harness-home
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@devflow-core/dsh-devflow",
|
|
3
|
-
"version": "0.
|
|
3
|
+
"version": "0.3.0",
|
|
4
4
|
"description": "DevFlow for DeepSeek Harness: devflow-2 agent preset + skills + commands + verification scripts, synced into ~/.dsh on host startup.",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"engines": {
|
|
@@ -22,6 +22,7 @@
|
|
|
22
22
|
"assets",
|
|
23
23
|
"cordis.patch.yml",
|
|
24
24
|
"README.md",
|
|
25
|
+
"RELEASE.md",
|
|
25
26
|
"NOTICE"
|
|
26
27
|
],
|
|
27
28
|
"license": "Apache-2.0",
|
|
@@ -29,4 +30,4 @@
|
|
|
29
30
|
"sync-assets": "node scripts/sync-assets.js",
|
|
30
31
|
"test": "node test/sync.test.js"
|
|
31
32
|
}
|
|
32
|
-
}
|
|
33
|
+
}
|