@devflow-core/dsh-devflow 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.
- package/NOTICE +13 -0
- package/README.md +82 -0
- package/assets/commands/devflow-adversarial.toml +11 -0
- package/assets/commands/devflow-audit.toml +32 -0
- package/assets/commands/devflow-debt.toml +42 -0
- package/assets/commands/devflow-find-fault.toml +11 -0
- package/assets/commands/devflow-learn.toml +21 -0
- package/assets/commands/devflow-plan.toml +58 -0
- package/assets/commands/devflow-prove.toml +20 -0
- package/assets/commands/devflow-pua.toml +40 -0
- package/assets/commands/devflow-review.toml +36 -0
- package/assets/commands/devflow-spec.toml +49 -0
- package/assets/commands/devflow.toml +35 -0
- package/assets/presets/devflow-2/NOTICE +4 -0
- package/assets/presets/devflow-2/README.md +71 -0
- package/assets/presets/devflow-2/agent.cordis.yml +337 -0
- package/assets/presets/devflow-2/custom-bash.mjs +213 -0
- package/assets/presets/devflow-2/preset.yml +3 -0
- package/assets/presets/devflow-2/tool-bootstrap.mjs +496 -0
- package/assets/scripts/devflow-audit.js +275 -0
- package/assets/scripts/devflow-debt.js +196 -0
- package/assets/scripts/devflow-doctor.js +90 -0
- package/assets/scripts/devflow-plan.js +638 -0
- package/assets/scripts/devflow-review.js +93 -0
- package/assets/scripts/devflow-spec.js +238 -0
- package/assets/skills/devflow-adversarial/SKILL.md +71 -0
- package/assets/skills/devflow-audit/SKILL.md +78 -0
- package/assets/skills/devflow-brainstorm/SKILL.md +176 -0
- package/assets/skills/devflow-brainstorm/references/interview-discipline.md +184 -0
- package/assets/skills/devflow-build/SKILL.md +238 -0
- package/assets/skills/devflow-build/references/build-methods.md +40 -0
- package/assets/skills/devflow-core/SKILL.md +93 -0
- package/assets/skills/devflow-core/references/core-methods.md +131 -0
- package/assets/skills/devflow-core/references/reference-projects.md +133 -0
- package/assets/skills/devflow-core/references/skill-guide.md +63 -0
- package/assets/skills/devflow-cut/SKILL.md +208 -0
- package/assets/skills/devflow-cut/references/cut-methods.md +65 -0
- package/assets/skills/devflow-cut/references/native-capability-checklist.md +112 -0
- package/assets/skills/devflow-docs-followup/SKILL.md +132 -0
- package/assets/skills/devflow-docs-followup/agents/openai.yaml +4 -0
- package/assets/skills/devflow-find-fault/SKILL.md +109 -0
- package/assets/skills/devflow-learn/SKILL.md +176 -0
- package/assets/skills/devflow-plan/SKILL.md +142 -0
- package/assets/skills/devflow-plan/references/plan-methods.md +74 -0
- package/assets/skills/devflow-project-knowledge/SKILL.md +354 -0
- package/assets/skills/devflow-prove/SKILL.md +216 -0
- package/assets/skills/devflow-prove/references/code-review-checklist.md +202 -0
- package/assets/skills/devflow-prove/references/flow-self-test.md +775 -0
- package/assets/skills/devflow-prove/references/proof-recovery-methods.md +26 -0
- package/assets/skills/devflow-pua/SKILL.md +197 -0
- package/assets/skills/devflow-pua/references/flavor-display.md +49 -0
- package/assets/skills/devflow-pua/references/methodology-library.md +193 -0
- package/assets/skills/devflow-pua/references/methodology-router.md +78 -0
- package/assets/skills/devflow-spec/SKILL.md +92 -0
- package/assets/skills/devflow-spec/references/spec-plan-methods.md +15 -0
- package/cordis.patch.yml +11 -0
- package/lib/dsh-home.js +33 -0
- package/lib/index.js +79 -0
- package/lib/mount-once.js +34 -0
- package/lib/sync.js +168 -0
- package/package.json +32 -0
package/NOTICE
ADDED
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
@devflow-core/dsh-devflow
|
|
2
|
+
|
|
3
|
+
本插件借鉴了以下开源项目的实现(Apache-2.0 / MIT),特此声明:
|
|
4
|
+
|
|
5
|
+
- lib/dsh-home.js、lib/mount-once.js、lib/sync.js、lib/index.js 的同步/挂载/
|
|
6
|
+
单实例守卫逻辑改编自 @linxin666/dsh-liangshen
|
|
7
|
+
(https://github.com/zhu1090093659/dsh-web-ui ,Apache-2.0)。
|
|
8
|
+
- assets/presets/devflow-2/tool-bootstrap.mjs 来自
|
|
9
|
+
https://github.com/xiaobright/dsh-anchored-standard(MIT),
|
|
10
|
+
经 dsh-liangshen 扩展后适配 devflow-2(phase1Persona 人设切换)。
|
|
11
|
+
- assets/presets/devflow-2/custom-bash.mjs 与 NOTICE 同源于上述仓库。
|
|
12
|
+
|
|
13
|
+
原始版权与 MIT/Apache-2.0 许可声明见各开源仓库。
|
package/README.md
ADDED
|
@@ -0,0 +1,82 @@
|
|
|
1
|
+
# @devflow-core/dsh-devflow — DevFlow 插件(DSH)
|
|
2
|
+
|
|
3
|
+
把 DevFlow 完整工作流打包成 DeepSeek Harness 插件:devflow-2 agent preset、
|
|
4
|
+
全套 `devflow-*` skills、斜杠命令与验证脚本,一条命令安装,随插件启动自动同步。
|
|
5
|
+
|
|
6
|
+
## 安装
|
|
7
|
+
|
|
8
|
+
```sh
|
|
9
|
+
npx @deepseek-ai/dsh plugin --profile web add @devflow-core/dsh-devflow
|
|
10
|
+
```
|
|
11
|
+
|
|
12
|
+
装完**必须重启 web**(Ctrl+C → 重新 `npx @deepseek-ai/dsh web`)才生效。
|
|
13
|
+
|
|
14
|
+
重启后:
|
|
15
|
+
|
|
16
|
+
1. 新建会话,预设选择器可选 **DevFlow 2.0 (Anchored)**(两阶段锚定 + Code Mode)。
|
|
17
|
+
2. 会话内 `devflow-*` skills 出现在技能目录,按任务措辞自动触发。
|
|
18
|
+
3. `~/.dsh/commands/` 出现 `devflow*.toml` 斜杠命令,`~/.dsh/scripts/` 出现
|
|
19
|
+
`devflow-*.js` 验证脚本(`node scripts/devflow-plan.js <plan>` 等)。
|
|
20
|
+
|
|
21
|
+
## 同步内容
|
|
22
|
+
|
|
23
|
+
插件启动时把包内 `assets/` 四类资产同步到用户 `~/.dsh/`:
|
|
24
|
+
|
|
25
|
+
| 资产 | 源(包内) | 目标(用户) |
|
|
26
|
+
|---|---|---|
|
|
27
|
+
| agent preset | `assets/presets/devflow-2/`(5 文件) | `~/.dsh/.agent-presets/devflow-2/` |
|
|
28
|
+
| skills | `assets/skills/devflow-*/`(14 个,含 references/) | `~/.dsh/skills/` |
|
|
29
|
+
| 斜杠命令 | `assets/commands/devflow*.toml`(11 个) | `~/.dsh/commands/` |
|
|
30
|
+
| 验证脚本 | `assets/scripts/devflow-*.js`(6 个 checker) | `~/.dsh/scripts/` |
|
|
31
|
+
|
|
32
|
+
## 冲突策略
|
|
33
|
+
|
|
34
|
+
- **devflow-\* 权威覆盖**:目标文件与包内源文件字节相同 → 跳过;不同 → 覆盖。
|
|
35
|
+
- 源不再包含的 devflow-\* 残留(升级后旧文件)→ 删除(prune)。
|
|
36
|
+
- **非 devflow 资产永不触碰**:用户自装的 skill(如 `atlassian`、`rtk`)、
|
|
37
|
+
自定义命令/脚本一律保留,不删除不覆盖。
|
|
38
|
+
- **preset 目录完全由插件管理**:`~/.dsh/.agent-presets/devflow-2/` 整目录归
|
|
39
|
+
插件所有,目录内非包内文件(含手动备份如 `agent.cordis.yml.bak-*`)会在
|
|
40
|
+
下次同步时被清理。请勿在该目录存放自定义文件;如需自定义 preset,把
|
|
41
|
+
目录复制成新预设 id 或改源码重新打包。
|
|
42
|
+
|
|
43
|
+
## 升级更新
|
|
44
|
+
|
|
45
|
+
DevFlow-Core 仓库发布新版本后,维护者流程:
|
|
46
|
+
|
|
47
|
+
```sh
|
|
48
|
+
node dsh/plugins/dsh-devflow/scripts/sync-assets.js # 刷新子包资产(防漂移)
|
|
49
|
+
# bump dsh/plugins/dsh-devflow/package.json 版本号
|
|
50
|
+
npm publish # 在 dsh/plugins/dsh-devflow 目录
|
|
51
|
+
```
|
|
52
|
+
|
|
53
|
+
已安装用户升级:
|
|
54
|
+
|
|
55
|
+
```sh
|
|
56
|
+
npx @deepseek-ai/dsh plugin --profile web update @devflow-core/dsh-devflow
|
|
57
|
+
# 或 remove + add,然后重启 web
|
|
58
|
+
```
|
|
59
|
+
|
|
60
|
+
重启后插件自动把新资产同步到 `~/.dsh/`(字节相同跳过,升级残留 prune)。
|
|
61
|
+
|
|
62
|
+
## 与 install:user 的关系
|
|
63
|
+
|
|
64
|
+
`npm run install:user -- --home ~/.dsh`(根仓库)仍是手动路径:把同一批
|
|
65
|
+
preset/skills/commands/scripts 复制到 `~/.dsh/`。本插件把同一件事变成一条
|
|
66
|
+
命令并随插件版本自动维护,二者并存不冲突——本插件同步时按上述冲突策略
|
|
67
|
+
处理已有文件。
|
|
68
|
+
|
|
69
|
+
## Windows 提示
|
|
70
|
+
|
|
71
|
+
devflow-2 预设的 `custom-bash.mjs` 需要 Git Bash 可解析:默认自动推断 Git
|
|
72
|
+
安装位置;若 `git` 不在 PATH,在 `~/.dsh/.agent-presets/devflow-2/agent.cordis.yml`
|
|
73
|
+
的 custom-bash 行显式配置 `bashPath` 指向本机 Git(参照
|
|
74
|
+
`docs/dsh-plugins-guide.md` 7.1 节)。
|
|
75
|
+
|
|
76
|
+
## 发布
|
|
77
|
+
|
|
78
|
+
```sh
|
|
79
|
+
cd dsh/plugins/dsh-devflow
|
|
80
|
+
node scripts/sync-assets.js # 发布前必须重跑,保证资产与仓库根一致
|
|
81
|
+
npm publish
|
|
82
|
+
```
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
description = "Run an independent manual adversarial review of current work."
|
|
2
|
+
prompt = '''
|
|
3
|
+
Run DevFlow Adversarial Review.
|
|
4
|
+
|
|
5
|
+
Load `skills/devflow-adversarial/SKILL.md` and begin the review when the user explicitly requests it.
|
|
6
|
+
Identify the review target from the request and available task materials. Ask one smallest question only when the target is unclear.
|
|
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
|
+
Cover requirement coverage, reachability, boundaries and regressions, evidence strength, and user-visible outcome.
|
|
9
|
+
Report only the skill's required findings, five-angle coverage, context limitations, and suggested manual next action.
|
|
10
|
+
Do not edit files, invoke another skill, create a task, or declare global task status.
|
|
11
|
+
'''
|
|
@@ -0,0 +1,32 @@
|
|
|
1
|
+
description = "Audit a repository or scope for overengineering and code that can be deleted."
|
|
2
|
+
prompt = '''
|
|
3
|
+
Audit the repository or named scope for overengineering only.
|
|
4
|
+
|
|
5
|
+
When `scripts/devflow-audit.js` exists, run:
|
|
6
|
+
|
|
7
|
+
```bash
|
|
8
|
+
node scripts/devflow-audit.js <target-directory>
|
|
9
|
+
```
|
|
10
|
+
|
|
11
|
+
If only user-level DevFlow is installed, run the user script instead:
|
|
12
|
+
|
|
13
|
+
```bash
|
|
14
|
+
node ~/.codex/scripts/devflow-audit.js <target-directory>
|
|
15
|
+
# or, for Claude Code user-level install:
|
|
16
|
+
node ~/.claude/scripts/devflow-audit.js <target-directory>
|
|
17
|
+
```
|
|
18
|
+
|
|
19
|
+
Use the script output as a first-pass candidate scan, then read referenced code before reporting important findings.
|
|
20
|
+
|
|
21
|
+
Scope: overengineering and complexity only. Do not report correctness, security, performance, or style issues as audit findings.
|
|
22
|
+
|
|
23
|
+
Findings use:
|
|
24
|
+
<file>:L<line>: <delete|reuse|stdlib|native|yagni|shrink>: <what to cut>. <replacement>.
|
|
25
|
+
|
|
26
|
+
Rank biggest useful cut first.
|
|
27
|
+
End with:
|
|
28
|
+
net: -<N> lines, -<M> deps possible.
|
|
29
|
+
|
|
30
|
+
If nothing should be cut:
|
|
31
|
+
Lean already. Ship.
|
|
32
|
+
'''
|
|
@@ -0,0 +1,42 @@
|
|
|
1
|
+
description = "Harvest devflow: simplification markers into a debt ledger report."
|
|
2
|
+
prompt = '''
|
|
3
|
+
Harvest every `devflow:` intentional-simplification marker in this repository.
|
|
4
|
+
|
|
5
|
+
When `scripts/devflow-debt.js` exists, run:
|
|
6
|
+
|
|
7
|
+
```bash
|
|
8
|
+
node scripts/devflow-debt.js .
|
|
9
|
+
```
|
|
10
|
+
|
|
11
|
+
If only user-level DevFlow is installed, run the user script instead:
|
|
12
|
+
|
|
13
|
+
```bash
|
|
14
|
+
node ~/.codex/scripts/devflow-debt.js .
|
|
15
|
+
# or, for Claude Code user-level install:
|
|
16
|
+
node ~/.claude/scripts/devflow-debt.js .
|
|
17
|
+
```
|
|
18
|
+
|
|
19
|
+
Use the script output as the debt ledger report.
|
|
20
|
+
|
|
21
|
+
Search the tree for comment or prose markers such as:
|
|
22
|
+
- `// devflow:`
|
|
23
|
+
- `# devflow:`
|
|
24
|
+
- `<!-- devflow:`
|
|
25
|
+
- `devflow:`
|
|
26
|
+
|
|
27
|
+
Skip generated output, build folders, dependency folders, and VCS metadata.
|
|
28
|
+
|
|
29
|
+
For each marker, report:
|
|
30
|
+
<file>:<line> - <what was simplified>. ceiling: <ceiling>. revisit: <trigger>.
|
|
31
|
+
|
|
32
|
+
Rules:
|
|
33
|
+
- A valid marker names both the ceiling and the revisit trigger.
|
|
34
|
+
- Tag missing trigger/ceiling as `no-trigger`.
|
|
35
|
+
- Do not change files unless the user explicitly asks to persist the ledger.
|
|
36
|
+
|
|
37
|
+
End with:
|
|
38
|
+
<N> markers, <M> no-trigger.
|
|
39
|
+
|
|
40
|
+
If none exist, say:
|
|
41
|
+
No devflow debt markers found.
|
|
42
|
+
'''
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
description = "Run an independent manual find-fault review of current work."
|
|
2
|
+
prompt = '''
|
|
3
|
+
Run DevFlow Find Fault.
|
|
4
|
+
|
|
5
|
+
Load `skills/devflow-find-fault/SKILL.md` and review the user-specified current task materials.
|
|
6
|
+
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.
|
|
7
|
+
Answer the biggest omission, unrecognized blind spot, and least certain point, plus every explicit user question.
|
|
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
|
+
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
|
+
Do not edit files, invoke another skill, create a task, or declare global task status.
|
|
11
|
+
'''
|
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
description = "Capture or verify a reusable correction, pitfall, or project convention with DevFlow Learn."
|
|
2
|
+
prompt = '''
|
|
3
|
+
Run DevFlow Learn.
|
|
4
|
+
|
|
5
|
+
Use this when the user says wrong, not like that, changed wrong, remember, learn, next time don't, wrong place, misplaced content, repeated correction, repeated user challenge, skipped validation, repeated failure, or project convention.
|
|
6
|
+
|
|
7
|
+
Process:
|
|
8
|
+
1. Detect the learning signal and decide whether it is reusable.
|
|
9
|
+
2. Probe `.copilot/LEARNING_INDEX.md`; when present, match the task against Trigger and Scope, then read only matched cards. Do not load all cards.
|
|
10
|
+
3. If a reusable execution lesson qualifies, lazily create or update one focused card and `.copilot/LEARNING_INDEX.md`; do not create empty learning storage after a no-record review.
|
|
11
|
+
4. If code-backed business semantics changed, report a project-knowledge candidate and wait for user confirmation before loading `devflow-project-knowledge` to lazily maintain `docs/project-knowledge/`.
|
|
12
|
+
5. Update `.copilot/LEARNING_INDEX.md` when a card is created, renamed, or its trigger changes.
|
|
13
|
+
6. Report the learning closure before claiming completion.
|
|
14
|
+
|
|
15
|
+
Learning closure:
|
|
16
|
+
- Learning signal: none / present
|
|
17
|
+
- Recalled record: none / index / card
|
|
18
|
+
- Knowledge recall: none / learning index + matched card / project-knowledge candidate
|
|
19
|
+
- Added memory: none / learning card / rule / skill
|
|
20
|
+
- Next intercept: Next time encountering <X>, first do <Y>, not <Z>.
|
|
21
|
+
'''
|
|
@@ -0,0 +1,58 @@
|
|
|
1
|
+
description = "Create a reviewed, executable implementation plan from an approved DevFlow spec or design."
|
|
2
|
+
prompt = '''
|
|
3
|
+
Load `skills/devflow-plan/SKILL.md` after an A/B direct `CUT_PASS`, or when `devflow-core` selects planning for a non-unique artifact. Create the single DevFlow Plan Pack from A/B `CUT_PASS` plus its approved design or confirmed spec.
|
|
4
|
+
|
|
5
|
+
`CUT_PASS` must state the allowed scope, reuse conclusion, exclusions, and verification constraints. Do not create a construction plan before Cut returns `CUT_PASS`.
|
|
6
|
+
|
|
7
|
+
Save plans by default at:
|
|
8
|
+
|
|
9
|
+
```text
|
|
10
|
+
docs/plans/YYYY-MM-DD-<short-kebab-name>.md
|
|
11
|
+
```
|
|
12
|
+
|
|
13
|
+
Keep the plan header in English:
|
|
14
|
+
|
|
15
|
+
```text
|
|
16
|
+
Goal: <outcome>
|
|
17
|
+
Architecture: <smallest design and boundaries>
|
|
18
|
+
Tech Stack: <relevant existing stack>
|
|
19
|
+
Source: <docs/specs/YYYY-MM-DD-<short-kebab-name>.md or approved design>
|
|
20
|
+
Spec coverage: <requirements mapped to tasks, or design-only>
|
|
21
|
+
Cut Decision: <CUT_PASS allowed scope, reuse conclusion, exclusions, verification constraints>
|
|
22
|
+
External Skills: <skill-name>; role: <bounded specialist work>; expected evidence: <result needed by that node>; return facts: <result / not-applicable / failure> / none
|
|
23
|
+
Execution mode: sequential | single-subagent | fan-out (optional; ask and record at approval)
|
|
24
|
+
```
|
|
25
|
+
|
|
26
|
+
Inherit `External Skills` from the Cut Decision unchanged; the Plan Pack carries the specialist role, expected evidence, and return facts into Build and Prove. When a specialist skill is declared, merge its core quality checks into the affected tasks' `Acceptance`/`Verify` fields; the Plan Pack is the only channel that carries external-skill quality requirements into Build and Prove.
|
|
27
|
+
|
|
28
|
+
Each independently understandable task must contain:
|
|
29
|
+
|
|
30
|
+
```text
|
|
31
|
+
Task: <short title>
|
|
32
|
+
Task type: Code change | Documentation-only
|
|
33
|
+
Files:
|
|
34
|
+
- Create: <path> | new file | <responsibility>
|
|
35
|
+
- Modify: <path> | <symbol or stable anchor> | <responsibility>
|
|
36
|
+
- Test: <path> | <test symbol or stable anchor> | <behavior proved> # only when applicable
|
|
37
|
+
Interfaces:
|
|
38
|
+
- Consumes: <exact symbol/API input and type/shape, or documentation-only exception>
|
|
39
|
+
- Produces: <exact symbol/API output and type/shape, or documentation-only exception>
|
|
40
|
+
Current behavior: <observable current state> # Code change only
|
|
41
|
+
Target behavior: <observable outcome> # Code change only
|
|
42
|
+
Change mechanics: <minimal code snippet, pseudocode, or exact replacement rule> # Code change only
|
|
43
|
+
Call impact: <known callers/downstream effect, or no runtime impact> # Code change only
|
|
44
|
+
Steps:
|
|
45
|
+
- [ ] <one file + symbol/anchor + executable action; include code snippet, pseudocode, or exact replacement for code logic>
|
|
46
|
+
- [ ] <one verification action with trigger/input, expected result, and command or manual scenario>
|
|
47
|
+
Acceptance: <specific condition>
|
|
48
|
+
Verify: <exact command or manual scenario, trigger/input, and expected result>
|
|
49
|
+
Comments: <required code comments or "none — trivial change">
|
|
50
|
+
Not doing: <scope removed>
|
|
51
|
+
```
|
|
52
|
+
|
|
53
|
+
For `Code change`, every existing-file row must name a symbol or stable anchor; every `Create` row uses `new file`. Require `Current behavior`, `Target behavior`, `Change mechanics`, and `Call impact`. `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 trigger/input, expected result, and runnable command or manual scenario. `Documentation-only` is allowed only when no runtime code changes; both interface entries must explicitly say `documentation-only` and it cannot be used for a code-file task.
|
|
54
|
+
|
|
55
|
+
Run `node scripts/devflow-plan.js <plan-file>` when it exists; otherwise use the user-level fallback specified in `core-methods.md`. Self-review source coverage, interfaces, precise locations, behavior changes, mechanics, call impact, verification expectations, placeholders, and file-operation labels before presenting the plan.
|
|
56
|
+
|
|
57
|
+
STOP after writing and validating the plan: request user review. On approval, ask execution mode (`sequential` — the Build agent runs tasks in dependency order / `single-subagent` — the main agent only schedules while one subagent runs all tasks / `fan-out` — independent tasks run as parallel subagents) and record it as the plan's optional `Execution mode` header, then perform a lightweight Cut-consistency review. An approved A/B Plan directly starts `devflow-build`; any scope-drift or non-success facts return to `devflow-core`. Do not perform Cut, Build, Prove, test-first workflow, version-control task steps, independent review, or automatic execution here.
|
|
58
|
+
'''
|
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
description = "Verify a DevFlow change before claiming completion."
|
|
2
|
+
prompt = '''
|
|
3
|
+
Run DevFlow Prove.
|
|
4
|
+
|
|
5
|
+
Identify the narrowest sufficient command, test, build, lint, validation script, or manual scenario.
|
|
6
|
+
Run it now if tools are available.
|
|
7
|
+
For development work, run adversarial review before completion: state the strongest plausible reason the result is still wrong, incomplete, unreachable, over-broad, or under-verified, then check it against the acceptance criteria, touched files, likely regressions, activation path, and proof coverage.
|
|
8
|
+
If adversarial review finds a real gap, report FAIL or continue the appropriate DevFlow route before any completion claim.
|
|
9
|
+
Read the real output and exit status.
|
|
10
|
+
Report only:
|
|
11
|
+
|
|
12
|
+
Command: <actual command run>
|
|
13
|
+
Result: <key output summary>
|
|
14
|
+
Adversarial review: <strongest challenge and disposition, or not applicable for non-development verification>
|
|
15
|
+
Judgment: PASS / FAIL / BLOCKED
|
|
16
|
+
|
|
17
|
+
If the check is partial, include coverage and explicit gaps.
|
|
18
|
+
If it fails, route back to Recovery: re-read facts, list 3 hypotheses, try a materially different approach.
|
|
19
|
+
If the failure includes user challenge, changed-wrong result, repeated miss, or quality complaint, load `devflow-pua` before more edits.
|
|
20
|
+
'''
|
|
@@ -0,0 +1,40 @@
|
|
|
1
|
+
description = "Run DevFlow PUA pressure recovery when a result is wrong, challenged, or repeatedly misses the user's target."
|
|
2
|
+
prompt = '''
|
|
3
|
+
Run DevFlow PUA.
|
|
4
|
+
|
|
5
|
+
Use this when the user repeatedly points out that the same function, result, or requested capability has a problem in one task lifecycle, repeatedly identifies missing coverage for that same target, or explicitly invokes `/devflow-pua`.
|
|
6
|
+
|
|
7
|
+
Stop the current approach before more edits. Re-read the request, correction, relevant files, and proof output.
|
|
8
|
+
|
|
9
|
+
Read `skills/devflow-pua/references/methodology-router.md`, `skills/devflow-pua/references/methodology-library.md`, and `skills/devflow-pua/references/flavor-display.md` before selecting the recovery method. Do not link out to the original PUA project at runtime; use these local methodology files.
|
|
10
|
+
|
|
11
|
+
For repeated reports that the same function, result, or requested capability remains wrong, incomplete, or missing, record `Restart Brainstorm: re-confirmation required; Core selects whether to invoke it`, quarantine the previous wrong assumption/path/proof claim, keep only verified facts, diagnose why the user thinks that target is still wrong, and return recovery facts to `devflow-core` before more edits.
|
|
12
|
+
|
|
13
|
+
This command is not permission to continue the old patch. First classify the user-view miss, display the active flavor/method as `METHOD: {flavor} / {method}`, then switch to a different/opposite method if the prior method failed.
|
|
14
|
+
|
|
15
|
+
Output:
|
|
16
|
+
Pressure check:
|
|
17
|
+
Restart Brainstorm:
|
|
18
|
+
Discarded context:
|
|
19
|
+
Keep only verified facts:
|
|
20
|
+
METHOD: {flavor} / {method}
|
|
21
|
+
SWITCH:
|
|
22
|
+
User-view miss:
|
|
23
|
+
Satisfaction gap:
|
|
24
|
+
User goal restated:
|
|
25
|
+
Desired result:
|
|
26
|
+
Blocking questions:
|
|
27
|
+
Hypotheses: 1 / 2 / 3
|
|
28
|
+
Blue-team attack:
|
|
29
|
+
New success contract:
|
|
30
|
+
Changed approach:
|
|
31
|
+
Verification:
|
|
32
|
+
Learning closure:
|
|
33
|
+
|
|
34
|
+
Ask 2-4 pointed questions only when the desired result cannot be inferred from facts. If the result is inferable, state the evidence and return the recovery facts to `devflow-core`. `devflow-core` may select `devflow-brainstorm` only to re-confirm the request; Brainstorm then returns the clarified request to `devflow-core`. Core alone selects the needed lifecycle skill.
|
|
35
|
+
|
|
36
|
+
Completion still requires:
|
|
37
|
+
Command:
|
|
38
|
+
Result:
|
|
39
|
+
Judgment: PASS / FAIL / BLOCKED
|
|
40
|
+
'''
|
|
@@ -0,0 +1,36 @@
|
|
|
1
|
+
description = "Review a plan or diff for overengineering, reuse misses, and scope drift."
|
|
2
|
+
prompt = '''
|
|
3
|
+
Review the provided plan or diff through DevFlow Cut.
|
|
4
|
+
|
|
5
|
+
When `scripts/devflow-review.js` exists and the plan or diff is in a file, run:
|
|
6
|
+
|
|
7
|
+
```bash
|
|
8
|
+
node scripts/devflow-review.js <plan-or-diff-file>
|
|
9
|
+
```
|
|
10
|
+
|
|
11
|
+
If only user-level DevFlow is installed, run the user script instead:
|
|
12
|
+
|
|
13
|
+
```bash
|
|
14
|
+
node ~/.codex/scripts/devflow-review.js <plan-or-diff-file>
|
|
15
|
+
# or, for Claude Code user-level install:
|
|
16
|
+
node ~/.claude/scripts/devflow-review.js <plan-or-diff-file>
|
|
17
|
+
```
|
|
18
|
+
|
|
19
|
+
Use the script output as the gate presence report before writing detailed findings.
|
|
20
|
+
|
|
21
|
+
Check:
|
|
22
|
+
- Reuse Check: existing helpers, patterns, standard library, native platform, installed dependencies
|
|
23
|
+
- Ponytail Rung: smallest rung that should solve the goal
|
|
24
|
+
- Root-Cause Check: for bug fixes, search callers/references and prefer a shared fix when it is the smaller correct fix
|
|
25
|
+
- Native Check: platform or standard-library alternative
|
|
26
|
+
- Overbuild Check: unnecessary dependency, abstraction, config, directory, framework layer, generic engine
|
|
27
|
+
- Diff Check: each changed file maps to the user goal
|
|
28
|
+
- Scope Check: unrequested features or opportunistic refactors
|
|
29
|
+
- Debt Marker Check: intentional `devflow:` shortcuts include both a ceiling and a revisit trigger
|
|
30
|
+
|
|
31
|
+
For findings, use:
|
|
32
|
+
<file>:L<line>: <delete|reuse|stdlib|native|yagni|shrink>: <what to cut>. <replacement>.
|
|
33
|
+
|
|
34
|
+
If nothing should be cut, say:
|
|
35
|
+
Lean already. Ship.
|
|
36
|
+
'''
|
|
@@ -0,0 +1,49 @@
|
|
|
1
|
+
description = "Create and validate a DevFlow spec document before implementation planning."
|
|
2
|
+
prompt = '''
|
|
3
|
+
Create a DevFlow spec from the `Confirmed request` that `devflow-core` selected for Spec work.
|
|
4
|
+
|
|
5
|
+
Compare real no-change/reuse, direct implementation, and relevant existing-pattern options before writing the chosen design contract. Record their trade-offs in `Approach`; do not re-confirm request fields and do not select any later lifecycle skill.
|
|
6
|
+
|
|
7
|
+
Default landing for saved specs is:
|
|
8
|
+
|
|
9
|
+
```text
|
|
10
|
+
docs/specs/YYYY-MM-DD-<short-kebab-name>.md
|
|
11
|
+
```
|
|
12
|
+
|
|
13
|
+
Resolve the default path from the current target project's root. Use an existing project specs directory only when the target project already documents that convention. Do not put implementation specs in `docs/features/`; that directory is for feature ledgers. Do not put specs in `docs/plans/`; that directory is for implementation plans.
|
|
14
|
+
|
|
15
|
+
When `scripts/devflow-spec.js` exists and the spec is in a file, run:
|
|
16
|
+
|
|
17
|
+
```bash
|
|
18
|
+
node scripts/devflow-spec.js <spec-file>
|
|
19
|
+
```
|
|
20
|
+
|
|
21
|
+
If only user-level DevFlow is installed, run the user script instead:
|
|
22
|
+
|
|
23
|
+
```bash
|
|
24
|
+
node ~/.codex/scripts/devflow-spec.js <spec-file>
|
|
25
|
+
# or, for Claude Code user-level install:
|
|
26
|
+
node ~/.claude/scripts/devflow-spec.js <spec-file>
|
|
27
|
+
```
|
|
28
|
+
|
|
29
|
+
Use the script output as the required-section, unresolved-marker, and spec-landing check.
|
|
30
|
+
|
|
31
|
+
Required sections (headers must remain in English for checker validation; content can be in the user's language):
|
|
32
|
+
Goal:
|
|
33
|
+
Context:
|
|
34
|
+
Requirements:
|
|
35
|
+
Non-goals:
|
|
36
|
+
Approach:
|
|
37
|
+
Impact:
|
|
38
|
+
Acceptance:
|
|
39
|
+
Verification:
|
|
40
|
+
Code Documentation:
|
|
41
|
+
Open Questions:
|
|
42
|
+
|
|
43
|
+
When Cut returns `CUT_PASS`, any resulting plan cites:
|
|
44
|
+
Source: <confirmed spec path or approved design>
|
|
45
|
+
Spec coverage: <which requirements map to which tasks>
|
|
46
|
+
Cut Decision: <allowed scope, reuse conclusion, exclusions, verification constraints>
|
|
47
|
+
|
|
48
|
+
After the user reviews and approves an A-branch design contract/spec, directly start `devflow-cut` with the confirmed Spec and preserved Depth. Any rejection, missing depth, scope change, or other non-success result returns facts to `devflow-core`; do not select another lifecycle skill yourself.
|
|
49
|
+
'''
|
|
@@ -0,0 +1,35 @@
|
|
|
1
|
+
description = "Route a task through DevFlow Core."
|
|
2
|
+
prompt = '''
|
|
3
|
+
Use DevFlow Core for this request.
|
|
4
|
+
|
|
5
|
+
Route the work as Fast, Design-lite, Design, Build, or Recovery.
|
|
6
|
+
Before creative work — creating features, building components, adding functionality, modifying behavior, or defining an unapproved problem-directed change — run Brainstorm to confirm the request: read facts, follow `skills/devflow-brainstorm/references/interview-discipline.md`, send a Semantic Echo-Back, apply the Understanding Revision Rule when a correction changes the request, ask one question at a time only for goal/scope/exclusions/constraints/acceptance/open-question gaps, then output `Confirmed request` with `Status: clarified`. Brainstorm then presents A/B/C and waits for the user's explicit choice: A directly starts Spec, B directly starts Cut then Plan, and C directly starts Cut then Build. Brainstorm never infers the depth; a missing or changed selection returns facts to Core.
|
|
7
|
+
An investigation-only problem report without a requested change uses Problem: Sense -> Prove facts. Pure Q&A, fact lookup, verification, and already approved changes are exceptions to the Brainstorm entry gate.
|
|
8
|
+
If the user explicitly asks for upgraded adversarial review, deep adversarial review, red-team review, 对抗审查, or 升级版对抗审查, load `skills/devflow-adversarial/SKILL.md` directly. If the user explicitly asks to find faults, identify the biggest omission, surface a blind spot, name the least certain point, 找茬, 最大遗漏, 没有意识到什么, or 最没有把握, load `skills/devflow-find-fault/SKILL.md` directly. These are independent manual reviews: they may run at any stage and must not read, require, modify, or hand off to devflow-prove, PUA, Build, Learn, or any completion state.
|
|
9
|
+
If the user challenges the result, says changed wrong, says your code is wrong/you wrote it wrong/has a problem/not right/missing/incomplete/still missing/有问题/不对/写错了/少了/少个/缺少/缺漏/遗漏/漏了, reports a quality complaint, or repeated edits miss, use Recovery through devflow-pua before more edits. For repeated challenge, explicit wrong-code signals, or repeated missing-piece complaints, return recovery facts to devflow-core; Core may restart devflow-brainstorm only for request re-confirmation, then selects the lifecycle work. Quarantine the old wrong context, diagnose the user-view miss, ask what is wrong and what result is wanted, then switch to a different/opposite method when the prior method failed.
|
|
10
|
+
Use Fast for pure Q&A, fact lookup, verification, or an already approved trivial code change (one line, no logic change, no risk).
|
|
11
|
+
Use Design-lite only after Brainstorm confirms a small unapproved change to an existing feature with clear behavior, one plausible path, low risk, local impact, and quick proof. Not for new requirements.
|
|
12
|
+
If the boundary is unclear after Brainstorm, have Core select the smallest compatible route instead of guessing.
|
|
13
|
+
Run Sense first by reading or citing relevant project facts.
|
|
14
|
+
At Sense, probe `.copilot/LEARNING_INDEX.md` and `docs/project-knowledge/` when present. Read only matched learning cards or navigation-selected knowledge documents; missing locations are non-blocking and do not create storage.
|
|
15
|
+
The direct success map is A: Brainstorm -> Spec -> Cut -> Plan -> Build -> Prove, B: Brainstorm -> Cut -> Plan -> Build -> Prove, C: Brainstorm -> Cut -> Build -> Prove. An approved A Spec directly starts Cut; A/B `CUT_PASS` directly starts Plan; C `CUT_PASS` directly starts Build; an approved A/B Plan directly starts Build; a completed Build directly starts Prove.
|
|
16
|
+
Before implementation, run Cut with Required Gates: Reuse, Native, Overbuild, Diff, and Scope checks. Core keeps non-unique selection: `CUT_REDUCE`/`CUT_REUSE` STOP for user confirmation, then return facts to Core; `CUT_BLOCKED`, Plan scope drift, `BUILD_BLOCKED`, Proof `FAIL`/`BLOCKED`, changed intent, and PUA recovery return facts so Core chooses the next owner.
|
|
17
|
+
For bug fixes, include Root-Cause Check: searched callers/references; shared vs narrow fix; reason.
|
|
18
|
+
For deliberate simplifications, add or report `devflow: <ceiling>, revisit when <trigger>`.
|
|
19
|
+
If implementation is requested for an already approved scope, continue through Build and Prove.
|
|
20
|
+
For problem solving, bug fixing, and architecture design, use First Principles Cut when the cause, constraint, invariant, abstraction, or smallest correct mechanism is unclear; reduce to facts, constraints, and invariants before selecting a solution.
|
|
21
|
+
Before completion of development work, run adversarial review against acceptance criteria, touched files, likely regressions, activation paths, and proof coverage. A real gap means FAIL or continued work before completion.
|
|
22
|
+
|
|
23
|
+
Design output:
|
|
24
|
+
Goal:
|
|
25
|
+
Smallest useful plan:
|
|
26
|
+
Not doing:
|
|
27
|
+
Impact:
|
|
28
|
+
Verification:
|
|
29
|
+
|
|
30
|
+
Completion proof:
|
|
31
|
+
Command:
|
|
32
|
+
Result:
|
|
33
|
+
Adversarial review:
|
|
34
|
+
Judgment: PASS / FAIL / BLOCKED
|
|
35
|
+
'''
|
|
@@ -0,0 +1,71 @@
|
|
|
1
|
+
# DevFlow 2.0 (Anchored) — DeepSeek Harness Agent Preset
|
|
2
|
+
|
|
3
|
+
A DSH agent preset that anchors the FIRST model request on the Minimal
|
|
4
|
+
surface, then promotes into a full DevFlow session: Code Mode (PTC) on the
|
|
5
|
+
wire, the complete DevFlow persona, and the DevFlow lifecycle guaranteed.
|
|
6
|
+
|
|
7
|
+
## What it is
|
|
8
|
+
|
|
9
|
+
- `agent.cordis.yml` — two-phase composition (adapted from the `liangshen`
|
|
10
|
+
preset). Phase 1 shows only the one-line Minimal persona
|
|
11
|
+
("You are a helpful software engineer assistant."), persistent
|
|
12
|
+
`bash` + `str_replace_editor`, no runtime contexts, no injected pre-step
|
|
13
|
+
messages, and a 1024 output budget. The anchor gate (first minimal-like
|
|
14
|
+
reasoning block, 4-step fallback, or first-response release) then promotes
|
|
15
|
+
the session: the wire switches to Code Mode (a single `run_code` tool), the
|
|
16
|
+
full DevFlow persona is restored, and workspace instructions (AGENTS.md
|
|
17
|
+
digest) plus the skill catalog are deferred one step.
|
|
18
|
+
- `tool-bootstrap.mjs` — the two-phase bootstrap plugin (from
|
|
19
|
+
`xiaobright/dsh-anchored-standard`, MIT, extended by `dsh-liangshen`),
|
|
20
|
+
with a `phase1Persona` swap so the DevFlow persona only appears after
|
|
21
|
+
promotion.
|
|
22
|
+
- `preset.yml` — picker metadata (name: DevFlow 2.0 (Anchored)).
|
|
23
|
+
|
|
24
|
+
Skills are NOT bundled: the preset's `skill-filesystem` row uses the default
|
|
25
|
+
user root (`$DSH_HOME/skills`), which is exactly where `npm run install:user`
|
|
26
|
+
ships the DevFlow skills. One install path, no second copy to drift.
|
|
27
|
+
|
|
28
|
+
## Install
|
|
29
|
+
|
|
30
|
+
```sh
|
|
31
|
+
npm run install:user -- --home ~/.dsh --write --force
|
|
32
|
+
npm run install:user -- --home ~/.dsh --check
|
|
33
|
+
```
|
|
34
|
+
|
|
35
|
+
This installs the preset to `~/.dsh/.agent-presets/devflow-2/` (alongside the
|
|
36
|
+
skills). Manual copy works too (remember the bundled plugin):
|
|
37
|
+
|
|
38
|
+
```sh
|
|
39
|
+
mkdir -p ~/.dsh/.agent-presets/devflow-2
|
|
40
|
+
cp dsh/agent-presets/devflow-2/agent.cordis.yml ~/.dsh/.agent-presets/devflow-2/
|
|
41
|
+
cp dsh/agent-presets/devflow-2/preset.yml ~/.dsh/.agent-presets/devflow-2/
|
|
42
|
+
cp dsh/agent-presets/devflow-2/tool-bootstrap.mjs ~/.dsh/.agent-presets/devflow-2/
|
|
43
|
+
cp dsh/agent-presets/devflow-2/custom-bash.mjs ~/.dsh/.agent-presets/devflow-2/
|
|
44
|
+
cp dsh/agent-presets/devflow-2/NOTICE ~/.dsh/.agent-presets/devflow-2/
|
|
45
|
+
```
|
|
46
|
+
|
|
47
|
+
## Use
|
|
48
|
+
|
|
49
|
+
Start a new session in the web UI and pick **DevFlow 2.0 (Anchored)** in the
|
|
50
|
+
preset picker. The roster may need a refresh or restart to show a newly added
|
|
51
|
+
preset. Existing sessions keep their old phase; the two-phase behavior applies
|
|
52
|
+
to new sessions.
|
|
53
|
+
|
|
54
|
+
## Caveats
|
|
55
|
+
|
|
56
|
+
- `~/.dsh/.agent-presets/` is plugin-maintained: a DSH plugin upgrade may
|
|
57
|
+
regenerate it. Re-run `npm run install:user -- --home ~/.dsh --write --force`
|
|
58
|
+
(or re-copy) after upgrades.
|
|
59
|
+
- Phase 1 uses the persistent (PTY-backed) Minimal `bash` shell. On Windows
|
|
60
|
+
builds where DSH's PTY backend is unavailable, phase-1 `bash` calls fail but
|
|
61
|
+
`str_replace_editor` still works, and the first-response release /
|
|
62
|
+
composition-drift guard keep the session usable (Code Mode `run_code` does
|
|
63
|
+
not need the PTY).
|
|
64
|
+
|
|
65
|
+
## Customize
|
|
66
|
+
|
|
67
|
+
Never edit the shipped `agent-presets` beside the deployment config (an
|
|
68
|
+
upgrade overwrites it). This user-root copy is yours: edit `agent.cordis.yml`
|
|
69
|
+
row by row, keeping the plane rule (a row publishing a service needs an
|
|
70
|
+
`isolate` realm group) and the realm rule. Mount-validate with
|
|
71
|
+
`standingKeyFor(id)` from a `cordis` (创造模式) session before shipping.
|