@devflow-core/dsh-devflow 0.6.1 → 0.6.2
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.
|
@@ -1,20 +1,21 @@
|
|
|
1
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
|
-
surface, then promotes into a full DevFlow session:
|
|
5
|
-
|
|
4
|
+
surface, then promotes into a full DevFlow session: the native tool surface,
|
|
5
|
+
the complete DevFlow persona, and the DevFlow lifecycle guaranteed.
|
|
6
6
|
|
|
7
7
|
## What it is
|
|
8
8
|
|
|
9
9
|
- `agent.cordis.yml` — two-phase composition (adapted from the `liangshen`
|
|
10
10
|
preset). Phase 1 shows only the one-line Minimal persona
|
|
11
|
-
("You are a helpful software engineer assistant."),
|
|
11
|
+
("You are a helpful software engineer assistant."),
|
|
12
12
|
`bash` + `str_replace_editor`, no runtime contexts, no injected pre-step
|
|
13
|
-
messages, and
|
|
14
|
-
reasoning block, 4-step fallback, or first-response
|
|
15
|
-
the session: the wire switches to
|
|
16
|
-
|
|
17
|
-
|
|
13
|
+
messages, and — since 2026-09-10 — no output-token cap. The anchor gate
|
|
14
|
+
(first minimal-like reasoning block, 4-step fallback, or first-response
|
|
15
|
+
release) then promotes the session: the wire switches to the deployment
|
|
16
|
+
default presentation (`native` — 33 tool schemas, no `run_code`, no generated
|
|
17
|
+
SDK section), the full DevFlow persona is restored, and workspace
|
|
18
|
+
instructions (AGENTS.md digest) plus the skill catalog are deferred one step.
|
|
18
19
|
- `tool-bootstrap.mjs` — the two-phase bootstrap plugin (from
|
|
19
20
|
`xiaobright/dsh-anchored-standard`, MIT, extended by `dsh-liangshen`),
|
|
20
21
|
with a `phase1Persona` swap so the DevFlow persona only appears after
|
|
@@ -49,18 +50,48 @@ cp dsh/agent-presets/devflow-2/NOTICE ~/.dsh/.agent-presets/devfl
|
|
|
49
50
|
Start a new session in the web UI and pick **DevFlow 2.0** in the
|
|
50
51
|
preset picker. The roster may need a refresh or restart to show a newly added
|
|
51
52
|
preset. Existing sessions keep their old phase; the two-phase behavior applies
|
|
52
|
-
to new sessions.
|
|
53
|
+
to new sessions. The same holds for the 2026-09-10 prompt-budget changes: a
|
|
54
|
+
running session keeps the policy it mounted with, so start a new session to
|
|
55
|
+
pick them up.
|
|
53
56
|
|
|
54
57
|
## Caveats
|
|
55
58
|
|
|
56
59
|
- `~/.dsh/.agent-presets/` is plugin-maintained: a DSH plugin upgrade may
|
|
57
60
|
regenerate it. Re-run `npm run install:user -- --home ~/.dsh --write --force`
|
|
58
61
|
(or re-copy) after upgrades.
|
|
59
|
-
- Phase 1 uses the persistent
|
|
60
|
-
|
|
61
|
-
`str_replace_editor`
|
|
62
|
-
|
|
63
|
-
|
|
62
|
+
- Phase 1 uses the Minimal `bash`: the persistent PTY-backed shell on
|
|
63
|
+
linux/darwin, or the stateless Git-Bash-backed `custom-bash.mjs` on Windows,
|
|
64
|
+
where the PTY backend is unavailable. `str_replace_editor` is the phase-1
|
|
65
|
+
editor on both paths, and the first-response release / composition-drift
|
|
66
|
+
guard keep the session usable if either bootstrap tool is missing.
|
|
67
|
+
|
|
68
|
+
## Changes 2026-09-10 (prompt budget)
|
|
69
|
+
|
|
70
|
+
Three independent defects were measured on real session logs and fixed:
|
|
71
|
+
|
|
72
|
+
- **Phase-1 output cap removed.** `bootstrapMaxTokens: 1024` capped every
|
|
73
|
+
pre-promotion request, and output tokens INCLUDE reasoning tokens: under
|
|
74
|
+
`reasoningEffort: max` the first request was hard-truncated at 1024
|
|
75
|
+
(`finish_reason=length`, reasoning-only blocks with no text and no tool call),
|
|
76
|
+
which the web UI reports as "已达到输出 token 上限 / 回答被截断". The cap was
|
|
77
|
+
the anchor's forcing function for the short We-need block, not a safety limit;
|
|
78
|
+
the gate still promotes through its other three paths.
|
|
79
|
+
- **`promotedPresentation: code` → `native`.** `code` does NOT mean "PTC only".
|
|
80
|
+
In `@deepseek-ai/dsh-tools`, `presentAs(mode)` attaches the collapse + SDK
|
|
81
|
+
sections for every mode except `native`, while `wireSchemas()` narrows the
|
|
82
|
+
wire to `run_code` only for `ptc`; `code` falls through to the default branch.
|
|
83
|
+
`code` therefore behaves as `both`: native schemas AND `run_code` AND the
|
|
84
|
+
generated SDK section — measured at 33,805 + 35,333 chars, i.e. one 36-tool
|
|
85
|
+
catalog paid for twice. `native` keeps the tools and drops the duplicate
|
|
86
|
+
(~-48% prompt per request). Use `ptc` instead to keep PTC batching at about
|
|
87
|
+
the same saving, at the cost of routing every call through a program.
|
|
88
|
+
- **Three never-used tool families disabled** (0 calls across 30 recorded
|
|
89
|
+
sessions): `tool-jobs` (`job_kill`/`job_list`/`job_output`, 1,508 B + a
|
|
90
|
+
384-char guidance section that the same plugin contributes), the `workflow`
|
|
91
|
+
rows (4,067 B — the largest single schema), and `tool-ralph` (845 B). Each is
|
|
92
|
+
commented out in place with its restore note. The `subagent` family is kept
|
|
93
|
+
(it has real calls); `herdr_*` is kept because this deployment installs
|
|
94
|
+
`@deepseek-ai/dsh-tool-herdr` deliberately via `~/.dsh/cordis.patch.yml`.
|
|
64
95
|
|
|
65
96
|
## Customize
|
|
66
97
|
|
|
@@ -4,13 +4,18 @@
|
|
|
4
4
|
#
|
|
5
5
|
# TWO-PHASE PERSONA: the FIRST model request sees only the one-line Minimal
|
|
6
6
|
# persona ("You are a helpful software engineer assistant."), the minimal tool
|
|
7
|
-
# pair (
|
|
7
|
+
# pair (`bash` + `str_replace_editor`), NO runtime contexts and NO
|
|
8
8
|
# auto-injected pre-step messages. After the anchor gate passes (first
|
|
9
9
|
# minimal-like reasoning block, 4-step fallback, or first-response release) the
|
|
10
|
-
# session promotes: the wire switches to
|
|
11
|
-
#
|
|
12
|
-
#
|
|
13
|
-
#
|
|
10
|
+
# session promotes: the wire switches to the deployment default presentation
|
|
11
|
+
# (`native` — all tool schemas, no `run_code`, no generated SDK section), the
|
|
12
|
+
# FULL DevFlow persona below is restored (with {{model}}/{{cwd}}), and
|
|
13
|
+
# workspace instructions (AGENTS.md digest) + the skill catalog are deferred
|
|
14
|
+
# one step, then stay current.
|
|
15
|
+
#
|
|
16
|
+
# The pre-promotion requests carry NO output-token cap (2026-09-10): the
|
|
17
|
+
# former `bootstrapMaxTokens: 1024` truncated the first request under
|
|
18
|
+
# `reasoningEffort: max`, because output tokens include reasoning tokens.
|
|
14
19
|
#
|
|
15
20
|
# This row MUST stay the FIRST row: the pre-step strip relies on waterfall
|
|
16
21
|
# reverse-registration order so request #1 stays minimal-exact.
|
|
@@ -24,12 +29,33 @@
|
|
|
24
29
|
anchorGate: true
|
|
25
30
|
maxBootstrapSteps: 4
|
|
26
31
|
promoteAfterFirstResponse: true
|
|
27
|
-
|
|
32
|
+
# DISABLED 2026-09-10: the phase-1 output cap collides with
|
|
33
|
+
# `reasoningEffort: max`. Output tokens INCLUDE reasoning tokens, so a
|
|
34
|
+
# 1024 cap hard-truncates the first request (finish_reason=length) and the
|
|
35
|
+
# web UI reports "已达到输出 token 上限 / 回答被截断". The cap is the
|
|
36
|
+
# anchor's forcing function for the short We-need block, not a safety
|
|
37
|
+
# limit: without it the gate still promotes via the anchor heuristic, the
|
|
38
|
+
# `maxBootstrapSteps` fallback, or `promoteAfterFirstResponse`.
|
|
39
|
+
# Re-enable only alongside a reasoningEffort low enough to fit under it.
|
|
40
|
+
# bootstrapMaxTokens: 1024
|
|
28
41
|
# Core work set after a compaction, before re-promotion.
|
|
29
42
|
compactionTools: [read, write, edit, glob, grep, todo_write, ask_user_question]
|
|
30
43
|
deferredSources: [agent-instructions, skill-catalog]
|
|
31
44
|
deferredGraceSteps: 1
|
|
32
|
-
|
|
45
|
+
# native (changed 2026-09-10, was `code`): `code` does NOT mean "PTC only".
|
|
46
|
+
# In @deepseek-ai/dsh-tools, presentAs(mode) attaches the collapse + SDK
|
|
47
|
+
# sections for every mode except `native`, while wireSchemas() narrows the
|
|
48
|
+
# wire to `run_code` ONLY for `ptc`; `code` falls through to the default
|
|
49
|
+
# branch, so it behaves as `both` — native schemas AND run_code AND the
|
|
50
|
+
# generated SDK section. Measured on a real session: 36 tool schemas
|
|
51
|
+
# (33,805 chars) plus a 35,333-char SDK section in the system prompt, i.e.
|
|
52
|
+
# one 36-tool catalog paid for twice (76,968 chars/request). `native` keeps
|
|
53
|
+
# the same 36 native tools and drops the duplicate SDK section
|
|
54
|
+
# (~40,065 chars/request, -48%). Trade-off: `run_code` disappears.
|
|
55
|
+
# Use `ptc` instead if the PTC batching surface is wanted: it saves about
|
|
56
|
+
# the same amount (drops the 33,805-char schema array instead) but forces
|
|
57
|
+
# every tool call through a program.
|
|
58
|
+
promotedPresentation: native
|
|
33
59
|
# Aligned with liangshen 0.2.8 (issue #388): after promotion, replace the
|
|
34
60
|
# full-text AGENTS.md injection with one non-imperative reference hint.
|
|
35
61
|
instructionHint: true
|
|
@@ -157,8 +183,11 @@
|
|
|
157
183
|
# registry is keyed by owning agent anyway. With the persistent shell, long
|
|
158
184
|
# commands run through `&`; these controls still expose whatever the host
|
|
159
185
|
# registry tracks.
|
|
160
|
-
-
|
|
161
|
-
|
|
186
|
+
# DISABLED 2026-09-10 (prompt-budget trim): `job_kill` / `job_list` /
|
|
187
|
+
# `job_output` were never called in 30 recorded sessions. Uncomment to restore
|
|
188
|
+
# background-job control. Long commands still work through `&` in the shell.
|
|
189
|
+
# - id: tool-jobs
|
|
190
|
+
# name: '@deepseek-ai/dsh-tool-jobs'
|
|
162
191
|
|
|
163
192
|
# ── skills ──────────────────────────────────────────────────────────────────
|
|
164
193
|
|
|
@@ -307,19 +336,25 @@
|
|
|
307
336
|
enableRunInBackground: false
|
|
308
337
|
maxDepth: provider-managed
|
|
309
338
|
|
|
310
|
-
-
|
|
311
|
-
|
|
312
|
-
|
|
313
|
-
|
|
314
|
-
|
|
315
|
-
|
|
316
|
-
|
|
317
|
-
|
|
318
|
-
|
|
319
|
-
|
|
320
|
-
|
|
321
|
-
|
|
322
|
-
|
|
339
|
+
# DISABLED 2026-09-10 (prompt-budget trim): the `workflow` schema is the
|
|
340
|
+
# single largest tool description in this catalog (4,067 chars) and was
|
|
341
|
+
# never called in 30 recorded sessions. Uncomment both rows to restore
|
|
342
|
+
# large multi-agent orchestration.
|
|
343
|
+
# - id: workflow-worker-thread
|
|
344
|
+
# name: '@deepseek-ai/dsh-workflow-worker-thread'
|
|
345
|
+
# config:
|
|
346
|
+
# provider: spawn
|
|
347
|
+
#
|
|
348
|
+
# - id: tool-workflow
|
|
349
|
+
# name: '@deepseek-ai/dsh-tool-workflow'
|
|
350
|
+
|
|
351
|
+
# DISABLED 2026-09-10 (prompt-budget trim): `ralph` was never called in 30
|
|
352
|
+
# recorded sessions. Uncomment to restore fresh-agent Ralph loops.
|
|
353
|
+
# - id: tool-ralph
|
|
354
|
+
# name: '@deepseek-ai/dsh-tool-ralph'
|
|
355
|
+
# config:
|
|
356
|
+
# subagentProvider: spawn
|
|
357
|
+
# maxRounds: 64
|
|
323
358
|
|
|
324
359
|
# ── remaining model-facing rows ─────────────────────────────────────────────
|
|
325
360
|
|
|
@@ -1,3 +1,3 @@
|
|
|
1
1
|
name: DevFlow 2.0
|
|
2
|
-
description: DevFlow 开发工作流 + 梁神式两阶段锚定:首个请求只暴露一行 persona(You are a helpful software engineer assistant.)+
|
|
2
|
+
description: DevFlow 开发工作流 + 梁神式两阶段锚定:首个请求只暴露一行 persona(You are a helpful software engineer assistant.)+ 最小工具对(bash + str_replace_editor),无运行时上下文、无任何注入、无输出 token 上限;anchorGate 门控(首个 minimal-like 推理块或 4 步兜底)晋升后切换为 native 工具面(33 个工具,无 run_code、无 SDK 重复表达),恢复完整 DevFlow 人设并自动激活 devflow-core 生命周期(Brainstorm → Spec/Cut → Plan → Build → Prove)与验证完成闭环;workspace 指令与技能目录延迟一步注入。
|
|
3
3
|
order: 6
|
|
@@ -29,10 +29,16 @@
|
|
|
29
29
|
* `we` and no `let me`) or the `maxBootstrapSteps` fallback.
|
|
30
30
|
* `promoteAfterFirstResponse` promotes a tool-less first response once it has
|
|
31
31
|
* responded, and also releases an anchor-gated session when its first turn
|
|
32
|
-
* ends (`turn/end`).
|
|
33
|
-
*
|
|
34
|
-
*
|
|
35
|
-
*
|
|
32
|
+
* ends (`turn/end`). `promotedPresentation` is passed verbatim to
|
|
33
|
+
* `tools.presentAs(mode)`, so the promoted wire depends on which mode string
|
|
34
|
+
* the preset names: `native` = every tool schema and no SDK section; `ptc` =
|
|
35
|
+
* the `run_code` transport plus the generated SDK; `both`, and any other
|
|
36
|
+
* string — including `code`, which this preset used before 2026-09-10 and
|
|
37
|
+
* which `dsh-tools` falls through to the default branch — = every tool schema
|
|
38
|
+
* AND `run_code` AND the SDK section, i.e. one catalog paid for twice. Only
|
|
39
|
+
* `ptc` narrows `wireSchemas()` to the `run_code` transport. The switch
|
|
40
|
+
* happens at the step boundary so the current step's native calls are never
|
|
41
|
+
* interrupted. `deferredSources` and
|
|
36
42
|
* `deferredGraceSteps` delay selected injected message kinds (workspace
|
|
37
43
|
* instructions, skill catalog) for a few steps after promotion.
|
|
38
44
|
*
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@devflow-core/dsh-devflow",
|
|
3
|
-
"version": "0.6.
|
|
3
|
+
"version": "0.6.2",
|
|
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": {
|