dream-wf 0.1.0 → 0.1.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.
- package/README.md +122 -55
- package/core/grill-prd-policy.md +2 -0
- package/core/workflow-profile.md +1 -0
- package/package.json +4 -3
- package/src/cli/index.js +192 -65
- package/src/deps/index.js +50 -0
- package/src/lib/catalog.js +82 -0
- package/src/lib/mcp.js +305 -0
- package/src/lib/platforms.js +13 -3
- package/src/lib/trellis.js +25 -2
- package/src/platforms/claude-code/index.js +7 -3
- package/src/platforms/codex/index.js +83 -0
- package/src/platforms/cursor/index.js +7 -3
- package/src/platforms/opencode/index.js +7 -3
- package/src/platforms/shared.js +11 -0
- package/src/tui/index.js +445 -0
- package/templates/hooks/claude-code/__pycache__/dream-wf-guard.cpython-314.pyc +0 -0
- package/templates/hooks/claude-code/dream-wf-guard.py +33 -11
- package/templates/hooks/codex/__pycache__/dream-wf-guard.cpython-314.pyc +0 -0
- package/templates/hooks/codex/dream-wf-guard.py +150 -0
- package/templates/hooks/cursor/__pycache__/dream-wf-guard.cpython-314.pyc +0 -0
- package/templates/hooks/cursor/dream-wf-guard.py +30 -11
- package/templates/hooks/opencode/dream-wf-guard.js +28 -10
- package/templates/rules/claude-code/dream-wf-block.md +20 -0
- package/templates/rules/codex/dream-wf-block.md +43 -0
- package/templates/rules/cursor/dream-wf.mdc +20 -1
- package/templates/rules/opencode/dream-wf-block.md +20 -0
- package/templates/skills/dream-wf-grill-prd/SKILL.md +54 -2
- package/templates/spec/guides/dream-wf-mcp-policy.md +6 -0
- package/templates/spec/guides/dream-wf-prd-policy.md +17 -0
package/README.md
CHANGED
|
@@ -1,80 +1,130 @@
|
|
|
1
1
|
# DREAM-WORKFLOW
|
|
2
2
|
|
|
3
|
-
|
|
3
|
+
面向 Codex、Claude Code、OpenCode 和 Cursor 的 Workflow patch 安装聚合器。
|
|
4
4
|
|
|
5
|
-
`dream-wf`
|
|
5
|
+
`dream-wf` 不替代 Trellis。它是在 Trellis 之上安装一组项目级个人 workflow 约束,同时聚合配置 MCP servers 和 skills:
|
|
6
6
|
|
|
7
|
-
-
|
|
8
|
-
- Trellis
|
|
9
|
-
-
|
|
10
|
-
-
|
|
11
|
-
-
|
|
12
|
-
-
|
|
7
|
+
- 平台选择:Cursor / Claude Code / OpenCode / Codex
|
|
8
|
+
- Skill 安装:`dream-wf-grill-prd`(Trellis patch · grill-me 风格 PRD)、`dream-wf-mcp-policy`(MCP 优先级策略)
|
|
9
|
+
- MCP 配置:`fast-context-mcp`(代码语义检索)、`grok-search-mcp`(外部文档/实时网络检索)
|
|
10
|
+
- 交互式 TUI:上下选择、space 选中、enter 下一步/安装
|
|
11
|
+
- PRD 澄清自动采用 grill-me 风格,用户不需要显式提到 `dream-wf`
|
|
12
|
+
- Trellis 原生的任务生命周期、spec、hooks、skills、sub-agents、checks 和 finish-work 保持不变
|
|
13
|
+
- strict 模式会阻止无活跃任务或 PRD 未确认时的实现类操作
|
|
13
14
|
|
|
14
|
-
##
|
|
15
|
+
## 安装
|
|
16
|
+
|
|
17
|
+
### 交互式 TUI(推荐)
|
|
18
|
+
|
|
19
|
+
```bash
|
|
20
|
+
npx dream-wf
|
|
21
|
+
```
|
|
22
|
+
|
|
23
|
+
无参数时自动进入 TUI:
|
|
24
|
+
|
|
25
|
+
1. 第一步选择平台(claude code / codex / opencode / cursor)
|
|
26
|
+
2. 第二步选择要安装的 skills(默认全选)
|
|
27
|
+
3. 第三步选择要配置的 MCP servers(默认全选)
|
|
28
|
+
4. enter 确认安装
|
|
29
|
+
|
|
30
|
+
操作键:
|
|
31
|
+
|
|
32
|
+
- `↑/↓` 移动光标
|
|
33
|
+
- `space` 切换选中
|
|
34
|
+
- `a` 全选/全不选
|
|
35
|
+
- `enter` 下一步/确认
|
|
36
|
+
- `ctrl+c` 退出
|
|
37
|
+
|
|
38
|
+
### 命令行模式
|
|
15
39
|
|
|
16
40
|
```bash
|
|
17
41
|
npx dream-wf init -p cursor
|
|
18
42
|
npx dream-wf init -p claude
|
|
19
43
|
npx dream-wf init -p opencode
|
|
44
|
+
npx dream-wf init -p codex
|
|
20
45
|
```
|
|
21
46
|
|
|
22
|
-
`-p`
|
|
47
|
+
`-p` 是必填参数。默认安装范围是项目级,默认模式是 `strict`,默认安装全部 skills 和 MCPs。
|
|
23
48
|
|
|
24
|
-
##
|
|
49
|
+
## 命令
|
|
25
50
|
|
|
26
51
|
```bash
|
|
27
|
-
npx dream-wf
|
|
28
|
-
npx dream-wf
|
|
29
|
-
npx dream-wf
|
|
52
|
+
npx dream-wf # 交互式 TUI
|
|
53
|
+
npx dream-wf interactive # 同上
|
|
54
|
+
npx dream-wf init -p <platform> [options]
|
|
55
|
+
npx dream-wf doctor -p <platform>
|
|
56
|
+
npx dream-wf update -p <platform>
|
|
30
57
|
```
|
|
31
58
|
|
|
32
|
-
|
|
59
|
+
参数:
|
|
33
60
|
|
|
34
61
|
```bash
|
|
35
|
-
-p cursor|claude|opencode
|
|
36
|
-
--mode strict|advisory
|
|
37
|
-
--
|
|
38
|
-
--
|
|
62
|
+
-p cursor|claude|opencode|codex # 必填
|
|
63
|
+
--mode strict|advisory # 默认 strict
|
|
64
|
+
--skills <id,id,...> # 指定 skill id,默认全部
|
|
65
|
+
--mcps <id,id,...> # 指定 mcp id,默认全部
|
|
66
|
+
--skip-skills # 不安装任何 skill
|
|
67
|
+
--skip-mcps # 不配置任何 mcp
|
|
68
|
+
--install-deps --developer <name> # 自动初始化 Trellis
|
|
39
69
|
```
|
|
40
70
|
|
|
41
|
-
|
|
71
|
+
Skill ids:
|
|
42
72
|
|
|
43
|
-
|
|
73
|
+
- `trellis-dream-wf-patch`(dream-wf-grill-prd)
|
|
74
|
+
- `dream-wf-mcp-policy`
|
|
75
|
+
|
|
76
|
+
MCP ids:
|
|
77
|
+
|
|
78
|
+
- `fast-context`(fast-context-mcp)
|
|
79
|
+
- `grok-search`(grok-search-mcp)
|
|
80
|
+
|
|
81
|
+
## 平台支持
|
|
82
|
+
|
|
83
|
+
| 平台 | 入口规则 | Skills 目录 | Hook 类型 | MCP 配置文件 |
|
|
84
|
+
|------|---------|------------|----------|-------------|
|
|
85
|
+
| Cursor | `.cursor/rules/dream-wf.mdc` | `.cursor/skills/` | `preToolUse` (python) | `.cursor/mcp.json` |
|
|
86
|
+
| Claude Code | `CLAUDE.md` | `.claude/skills/` | `PreToolUse` (python) | `.mcp.json` |
|
|
87
|
+
| OpenCode | `AGENTS.md` | `.opencode/skills/` | `tool.execute.before` plugin (js) | `opencode.json` |
|
|
88
|
+
| Codex | `AGENTS.md` | `.codex/skills/` | `PreToolUse` (python, hooks.json) | `.codex/config.toml` |
|
|
89
|
+
|
|
90
|
+
## Trellis
|
|
91
|
+
|
|
92
|
+
来源:https://github.com/mindfold-ai/trellis
|
|
44
93
|
|
|
45
94
|
```bash
|
|
46
95
|
npm install -g @mindfoldhq/trellis@latest
|
|
47
96
|
```
|
|
48
97
|
|
|
49
|
-
|
|
98
|
+
先初始化 Trellis,或者让 `dream-wf` 输出对应的初始化命令:
|
|
50
99
|
|
|
51
100
|
```bash
|
|
52
|
-
trellis init -u your-name --cursor
|
|
53
|
-
trellis init -u your-name --claude
|
|
54
|
-
trellis init -u your-name --opencode
|
|
101
|
+
trellis init -u your-name --cursor --yes
|
|
102
|
+
trellis init -u your-name --claude --yes
|
|
103
|
+
trellis init -u your-name --opencode --yes
|
|
104
|
+
trellis init -u your-name --codex --yes
|
|
55
105
|
```
|
|
56
106
|
|
|
57
|
-
## Grill Me
|
|
107
|
+
## Grill Me
|
|
58
108
|
|
|
59
|
-
|
|
109
|
+
来源:https://github.com/mattpocock/skills/blob/main/skills/productivity/grill-me/SKILL.md
|
|
60
110
|
|
|
61
|
-
`dream-wf`
|
|
111
|
+
`dream-wf` 会安装项目级 `dream-wf-grill-prd` skill,用于复用 grill-me 的交互风格:
|
|
62
112
|
|
|
63
|
-
-
|
|
64
|
-
-
|
|
65
|
-
-
|
|
66
|
-
-
|
|
67
|
-
-
|
|
113
|
+
- 一次只问一个问题。
|
|
114
|
+
- 给出选项和推荐答案。
|
|
115
|
+
- 尽可能先检查代码再提问。
|
|
116
|
+
- 用户回答后更新 `prd.md`。
|
|
117
|
+
- 实现开始前必须获得明确的 PRD 确认。
|
|
68
118
|
|
|
69
119
|
## Fast Context MCP
|
|
70
120
|
|
|
71
|
-
|
|
121
|
+
来源:https://github.com/SammySnake-d/fast-context-mcp
|
|
72
122
|
|
|
73
123
|
```bash
|
|
74
124
|
npm install @sammysnake/fast-context-mcp
|
|
75
125
|
```
|
|
76
126
|
|
|
77
|
-
|
|
127
|
+
MCP server 配置示例:
|
|
78
128
|
|
|
79
129
|
```json
|
|
80
130
|
{
|
|
@@ -94,9 +144,9 @@ Example MCP server config:
|
|
|
94
144
|
|
|
95
145
|
## Grok Search MCP
|
|
96
146
|
|
|
97
|
-
|
|
147
|
+
来源:https://github.com/GuDaStudio/GrokSearch
|
|
98
148
|
|
|
99
|
-
|
|
149
|
+
需要 Python 3.10+ 和 `uv` / `uvx`。
|
|
100
150
|
|
|
101
151
|
```json
|
|
102
152
|
{
|
|
@@ -119,47 +169,57 @@ Requires Python 3.10+ and `uv` / `uvx`.
|
|
|
119
169
|
}
|
|
120
170
|
```
|
|
121
171
|
|
|
122
|
-
|
|
172
|
+
## 生成文件
|
|
123
173
|
|
|
124
|
-
|
|
125
|
-
|
|
126
|
-
Cursor:
|
|
174
|
+
Cursor:
|
|
127
175
|
|
|
128
176
|
- `.cursor/rules/dream-wf.mdc`
|
|
129
177
|
- `.cursor/skills/dream-wf-grill-prd/SKILL.md`
|
|
130
178
|
- `.cursor/skills/dream-wf-mcp-policy/SKILL.md`
|
|
131
179
|
- `.cursor/hooks/dream-wf-guard.py`
|
|
132
180
|
- `.cursor/hooks.json`
|
|
181
|
+
- `.cursor/mcp.json`
|
|
133
182
|
|
|
134
|
-
Claude Code
|
|
183
|
+
Claude Code:
|
|
135
184
|
|
|
136
185
|
- `CLAUDE.md` dream-wf entry block
|
|
137
186
|
- `.claude/skills/dream-wf-grill-prd/SKILL.md`
|
|
138
187
|
- `.claude/skills/dream-wf-mcp-policy/SKILL.md`
|
|
139
188
|
- `.claude/hooks/dream-wf-guard.py`
|
|
140
189
|
- `.claude/settings.json`
|
|
190
|
+
- `.mcp.json`
|
|
141
191
|
|
|
142
|
-
OpenCode
|
|
192
|
+
OpenCode:
|
|
143
193
|
|
|
144
194
|
- `AGENTS.md` dream-wf entry block
|
|
145
195
|
- `.opencode/skills/dream-wf-grill-prd/SKILL.md`
|
|
146
196
|
- `.opencode/skills/dream-wf-mcp-policy/SKILL.md`
|
|
147
197
|
- `.opencode/plugins/dream-wf-guard.js`
|
|
198
|
+
- `opencode.json`
|
|
199
|
+
|
|
200
|
+
Codex:
|
|
148
201
|
|
|
149
|
-
|
|
202
|
+
- `AGENTS.md` dream-wf entry block
|
|
203
|
+
- `.codex/skills/dream-wf-grill-prd/SKILL.md`
|
|
204
|
+
- `.codex/skills/dream-wf-mcp-policy/SKILL.md`
|
|
205
|
+
- `.codex/hooks/dream-wf-guard.py`
|
|
206
|
+
- `.codex/hooks.json`
|
|
207
|
+
- `.codex/config.toml`(含 `[features] hooks = true` 和 `[mcp_servers.*]`)
|
|
150
208
|
|
|
151
|
-
|
|
152
|
-
- Installs `.trellis/spec/guides/dream-wf-prd-policy.md`.
|
|
153
|
-
- Installs `.trellis/spec/guides/dream-wf-mcp-policy.md`.
|
|
209
|
+
Trellis:
|
|
154
210
|
|
|
155
|
-
|
|
211
|
+
- 向 `.trellis/workflow.md` 追加 `Dream WF Profile` 区块。
|
|
212
|
+
- 安装 `.trellis/spec/guides/dream-wf-prd-policy.md`。
|
|
213
|
+
- 安装 `.trellis/spec/guides/dream-wf-mcp-policy.md`。
|
|
156
214
|
|
|
157
|
-
Strict
|
|
215
|
+
## Strict 模式
|
|
158
216
|
|
|
159
|
-
|
|
160
|
-
- A task is still in `planning` and `prd.md` is not confirmed.
|
|
217
|
+
strict 模式会阻止以下变更类操作:
|
|
161
218
|
|
|
162
|
-
|
|
219
|
+
- 当前没有活跃 Trellis task。
|
|
220
|
+
- task 仍处于 `planning` 状态,且 `prd.md` 尚未确认。
|
|
221
|
+
|
|
222
|
+
可以在 `prd.md` 中使用以下任一标记表示 PRD 已确认:
|
|
163
223
|
|
|
164
224
|
```markdown
|
|
165
225
|
PRD confirmed
|
|
@@ -167,12 +227,19 @@ confirmed: true
|
|
|
167
227
|
status: confirmed
|
|
168
228
|
```
|
|
169
229
|
|
|
170
|
-
##
|
|
230
|
+
## 安全检查
|
|
171
231
|
|
|
172
|
-
|
|
232
|
+
提交前运行 doctor:
|
|
173
233
|
|
|
174
234
|
```bash
|
|
175
235
|
npx dream-wf doctor -p cursor
|
|
236
|
+
npx dream-wf doctor -p codex
|
|
176
237
|
```
|
|
177
238
|
|
|
178
|
-
|
|
239
|
+
doctor 会检查:
|
|
240
|
+
|
|
241
|
+
- 必需二进制(node、python3、trellis、uvx)
|
|
242
|
+
- Trellis 项目目录和 workflow.md
|
|
243
|
+
- 平台对应的规则、skills、hook 文件
|
|
244
|
+
- MCP 配置文件存在性和默认 MCP 条目完整性
|
|
245
|
+
- 项目文件中的密钥泄露扫描
|
package/core/grill-prd-policy.md
CHANGED
|
@@ -12,6 +12,7 @@ Use grill-me behavior during Trellis planning. This replaces only the interview
|
|
|
12
12
|
- If a question can be answered by exploring the codebase, docs, config, existing specs, or task history, explore first instead of asking the user.
|
|
13
13
|
- After each answer, update `prd.md` immediately.
|
|
14
14
|
- Keep open questions explicit until they are answered or intentionally deferred.
|
|
15
|
+
- **Before requesting PRD confirmation, perform a Knowledge Verification pass.** Use `grok-search-mcp` (`web_search`, `web_fetch`) to verify technical assumptions that could be outdated or wrong. Record results in the `## Knowledge Verification` section of `prd.md`. Correct any outdated assumptions. Move unverified points to `Open Questions`. Add `knowledge verified` to the PRD after verification is complete.
|
|
15
16
|
- Do not start implementation until the PRD is reviewed and confirmed.
|
|
16
17
|
|
|
17
18
|
## Required PRD Sections
|
|
@@ -23,6 +24,7 @@ Use grill-me behavior during Trellis planning. This replaces only the interview
|
|
|
23
24
|
- Acceptance criteria
|
|
24
25
|
- Decisions
|
|
25
26
|
- Technical notes
|
|
27
|
+
- Knowledge verification
|
|
26
28
|
- Open questions
|
|
27
29
|
- Spec candidates
|
|
28
30
|
|
package/core/workflow-profile.md
CHANGED
|
@@ -24,6 +24,7 @@ Keep the native Trellis flow:
|
|
|
24
24
|
## Dream WF Patch Points
|
|
25
25
|
|
|
26
26
|
- Use `dream-wf-grill-prd` for PRD clarification instead of open-ended brainstorm interviewing.
|
|
27
|
+
- **Before PRD confirmation, perform a Knowledge Verification pass**: use `grok-search-mcp` (`web_search`, `web_fetch`) to verify technical assumptions that could be outdated or wrong. Record results in the `## Knowledge Verification` section of `prd.md`. Correct outdated assumptions. Add `knowledge verified` to the PRD after verification is complete.
|
|
27
28
|
- Generate initial spec candidates from user answers, PRD decisions, and verified project facts.
|
|
28
29
|
- Prefer `fast-context-mcp` for codebase semantic search.
|
|
29
30
|
- Prefer `grok-search-mcp` for external docs, live technical information, and webpage fetching.
|
package/package.json
CHANGED
|
@@ -1,13 +1,13 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "dream-wf",
|
|
3
|
-
"version": "0.1.
|
|
4
|
-
"description": "
|
|
3
|
+
"version": "0.1.2",
|
|
4
|
+
"description": "Trellis workflow patch installer and MCP/skill aggregator for Cursor, Claude Code, OpenCode and Codex.",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"bin": {
|
|
7
7
|
"dream-wf": "bin/dream-wf.js"
|
|
8
8
|
},
|
|
9
9
|
"scripts": {
|
|
10
|
-
"check": "node --check bin/dream-wf.js && node --check src/cli/index.js && node --check src/lib/files.js && node --check src/lib/platforms.js && node --check src/lib/trellis.js && node --check src/lib/json.js && node --check src/doctor/index.js && node --check src/deps/index.js && node --check src/platforms/shared.js && node --check src/platforms/cursor/index.js && node --check src/platforms/claude-code/index.js && node --check src/platforms/opencode/index.js && node --check templates/hooks/opencode/dream-wf-guard.js"
|
|
10
|
+
"check": "node --check bin/dream-wf.js && node --check src/cli/index.js && node --check src/lib/files.js && node --check src/lib/platforms.js && node --check src/lib/trellis.js && node --check src/lib/json.js && node --check src/lib/catalog.js && node --check src/lib/mcp.js && node --check src/doctor/index.js && node --check src/deps/index.js && node --check src/platforms/shared.js && node --check src/platforms/cursor/index.js && node --check src/platforms/claude-code/index.js && node --check src/platforms/opencode/index.js && node --check src/platforms/codex/index.js && node --check src/tui/index.js && node --check templates/hooks/opencode/dream-wf-guard.js"
|
|
11
11
|
},
|
|
12
12
|
"keywords": [
|
|
13
13
|
"trellis",
|
|
@@ -15,6 +15,7 @@
|
|
|
15
15
|
"cursor",
|
|
16
16
|
"claude",
|
|
17
17
|
"opencode",
|
|
18
|
+
"codex",
|
|
18
19
|
"mcp"
|
|
19
20
|
],
|
|
20
21
|
"license": "MIT",
|