dream-wf 0.1.0 → 0.1.1
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 +44 -44
- package/package.json +1 -1
- package/src/lib/trellis.js +3 -0
- package/templates/rules/claude-code/dream-wf-block.md +18 -0
- package/templates/rules/cursor/dream-wf.mdc +18 -0
- package/templates/rules/opencode/dream-wf-block.md +18 -0
- package/templates/spec/guides/dream-wf-mcp-policy.md +6 -0
- package/templates/spec/guides/dream-wf-prd-policy.md +3 -0
package/README.md
CHANGED
|
@@ -1,17 +1,17 @@
|
|
|
1
1
|
# DREAM-WORKFLOW
|
|
2
2
|
|
|
3
|
-
|
|
3
|
+
面向 Cursor、Claude Code 和 OpenCode 的个人 Trellis workflow patch 安装器。
|
|
4
4
|
|
|
5
|
-
`dream-wf`
|
|
5
|
+
`dream-wf` 不替代 Trellis。它是在 Trellis 之上安装一组项目级个人 workflow 约束:
|
|
6
6
|
|
|
7
|
-
- PRD
|
|
8
|
-
- Trellis
|
|
9
|
-
-
|
|
10
|
-
-
|
|
11
|
-
-
|
|
12
|
-
-
|
|
7
|
+
- PRD 澄清自动采用 grill-me 风格,用户不需要显式提到 `dream-wf`。
|
|
8
|
+
- Trellis 原生的任务生命周期、spec、hooks、skills、sub-agents、checks 和 finish-work 保持不变。
|
|
9
|
+
- 初始 spec 候选内容来自用户回答、PRD 决策和已验证的项目事实。
|
|
10
|
+
- 代码语义检索优先使用 `fast-context-mcp`。
|
|
11
|
+
- 外部文档和实时网络检索优先使用 `grok-search-mcp`。
|
|
12
|
+
- strict 模式会阻止无活跃任务或 PRD 未确认时的实现类操作。
|
|
13
13
|
|
|
14
|
-
##
|
|
14
|
+
## 安装
|
|
15
15
|
|
|
16
16
|
```bash
|
|
17
17
|
npx dream-wf init -p cursor
|
|
@@ -19,9 +19,9 @@ npx dream-wf init -p claude
|
|
|
19
19
|
npx dream-wf init -p opencode
|
|
20
20
|
```
|
|
21
21
|
|
|
22
|
-
`-p`
|
|
22
|
+
`-p` 是必填参数。默认安装范围是项目级,默认模式是 `strict`。
|
|
23
23
|
|
|
24
|
-
##
|
|
24
|
+
## 命令
|
|
25
25
|
|
|
26
26
|
```bash
|
|
27
27
|
npx dream-wf init -p cursor
|
|
@@ -29,7 +29,7 @@ npx dream-wf doctor -p cursor
|
|
|
29
29
|
npx dream-wf update -p cursor
|
|
30
30
|
```
|
|
31
31
|
|
|
32
|
-
|
|
32
|
+
参数:
|
|
33
33
|
|
|
34
34
|
```bash
|
|
35
35
|
-p cursor|claude|opencode
|
|
@@ -38,15 +38,15 @@ Options:
|
|
|
38
38
|
--developer <name>
|
|
39
39
|
```
|
|
40
40
|
|
|
41
|
-
## Trellis
|
|
41
|
+
## Trellis 依赖
|
|
42
42
|
|
|
43
|
-
|
|
43
|
+
来源:https://github.com/mindfold-ai/trellis
|
|
44
44
|
|
|
45
45
|
```bash
|
|
46
46
|
npm install -g @mindfoldhq/trellis@latest
|
|
47
47
|
```
|
|
48
48
|
|
|
49
|
-
|
|
49
|
+
先初始化 Trellis,或者让 `dream-wf` 输出对应的初始化命令:
|
|
50
50
|
|
|
51
51
|
```bash
|
|
52
52
|
trellis init -u your-name --cursor
|
|
@@ -54,27 +54,27 @@ trellis init -u your-name --claude
|
|
|
54
54
|
trellis init -u your-name --opencode
|
|
55
55
|
```
|
|
56
56
|
|
|
57
|
-
## Grill Me
|
|
57
|
+
## Grill Me 依赖
|
|
58
58
|
|
|
59
|
-
|
|
59
|
+
来源:https://github.com/mattpocock/skills/blob/main/skills/productivity/grill-me/SKILL.md
|
|
60
60
|
|
|
61
|
-
`dream-wf`
|
|
61
|
+
`dream-wf` 会安装项目级 `dream-wf-grill-prd` skill,用于复用 grill-me 的交互风格:
|
|
62
62
|
|
|
63
|
-
-
|
|
64
|
-
-
|
|
65
|
-
-
|
|
66
|
-
-
|
|
67
|
-
-
|
|
63
|
+
- 一次只问一个问题。
|
|
64
|
+
- 给出选项和推荐答案。
|
|
65
|
+
- 尽可能先检查代码再提问。
|
|
66
|
+
- 用户回答后更新 `prd.md`。
|
|
67
|
+
- 实现开始前必须获得明确的 PRD 确认。
|
|
68
68
|
|
|
69
69
|
## Fast Context MCP
|
|
70
70
|
|
|
71
|
-
|
|
71
|
+
来源:https://github.com/SammySnake-d/fast-context-mcp
|
|
72
72
|
|
|
73
73
|
```bash
|
|
74
74
|
npm install @sammysnake/fast-context-mcp
|
|
75
75
|
```
|
|
76
76
|
|
|
77
|
-
|
|
77
|
+
MCP server 配置示例:
|
|
78
78
|
|
|
79
79
|
```json
|
|
80
80
|
{
|
|
@@ -94,9 +94,9 @@ Example MCP server config:
|
|
|
94
94
|
|
|
95
95
|
## Grok Search MCP
|
|
96
96
|
|
|
97
|
-
|
|
97
|
+
来源:https://github.com/GuDaStudio/GrokSearch
|
|
98
98
|
|
|
99
|
-
|
|
99
|
+
需要 Python 3.10+ 和 `uv` / `uvx`。
|
|
100
100
|
|
|
101
101
|
```json
|
|
102
102
|
{
|
|
@@ -119,11 +119,11 @@ Requires Python 3.10+ and `uv` / `uvx`.
|
|
|
119
119
|
}
|
|
120
120
|
```
|
|
121
121
|
|
|
122
|
-
|
|
122
|
+
不要把真实 API key、token 或 MCP secret 提交到项目文件中。
|
|
123
123
|
|
|
124
|
-
##
|
|
124
|
+
## 生成文件
|
|
125
125
|
|
|
126
|
-
Cursor
|
|
126
|
+
Cursor:
|
|
127
127
|
|
|
128
128
|
- `.cursor/rules/dream-wf.mdc`
|
|
129
129
|
- `.cursor/skills/dream-wf-grill-prd/SKILL.md`
|
|
@@ -131,7 +131,7 @@ Cursor:
|
|
|
131
131
|
- `.cursor/hooks/dream-wf-guard.py`
|
|
132
132
|
- `.cursor/hooks.json`
|
|
133
133
|
|
|
134
|
-
Claude Code
|
|
134
|
+
Claude Code:
|
|
135
135
|
|
|
136
136
|
- `CLAUDE.md` dream-wf entry block
|
|
137
137
|
- `.claude/skills/dream-wf-grill-prd/SKILL.md`
|
|
@@ -139,27 +139,27 @@ Claude Code:
|
|
|
139
139
|
- `.claude/hooks/dream-wf-guard.py`
|
|
140
140
|
- `.claude/settings.json`
|
|
141
141
|
|
|
142
|
-
OpenCode
|
|
142
|
+
OpenCode:
|
|
143
143
|
|
|
144
144
|
- `AGENTS.md` dream-wf entry block
|
|
145
145
|
- `.opencode/skills/dream-wf-grill-prd/SKILL.md`
|
|
146
146
|
- `.opencode/skills/dream-wf-mcp-policy/SKILL.md`
|
|
147
147
|
- `.opencode/plugins/dream-wf-guard.js`
|
|
148
148
|
|
|
149
|
-
Trellis
|
|
149
|
+
Trellis:
|
|
150
150
|
|
|
151
|
-
-
|
|
152
|
-
-
|
|
153
|
-
-
|
|
151
|
+
- 向 `.trellis/workflow.md` 追加 `Dream WF Profile` 区块。
|
|
152
|
+
- 安装 `.trellis/spec/guides/dream-wf-prd-policy.md`。
|
|
153
|
+
- 安装 `.trellis/spec/guides/dream-wf-mcp-policy.md`。
|
|
154
154
|
|
|
155
|
-
## Strict
|
|
155
|
+
## Strict 模式
|
|
156
156
|
|
|
157
|
-
|
|
157
|
+
strict 模式会阻止以下变更类操作:
|
|
158
158
|
|
|
159
|
-
-
|
|
160
|
-
-
|
|
159
|
+
- 当前没有活跃 Trellis task。
|
|
160
|
+
- task 仍处于 `planning` 状态,且 `prd.md` 尚未确认。
|
|
161
161
|
|
|
162
|
-
|
|
162
|
+
可以在 `prd.md` 中使用以下任一标记表示 PRD 已确认:
|
|
163
163
|
|
|
164
164
|
```markdown
|
|
165
165
|
PRD confirmed
|
|
@@ -167,12 +167,12 @@ confirmed: true
|
|
|
167
167
|
status: confirmed
|
|
168
168
|
```
|
|
169
169
|
|
|
170
|
-
##
|
|
170
|
+
## 安全检查
|
|
171
171
|
|
|
172
|
-
|
|
172
|
+
提交前运行 doctor:
|
|
173
173
|
|
|
174
174
|
```bash
|
|
175
175
|
npx dream-wf doctor -p cursor
|
|
176
176
|
```
|
|
177
177
|
|
|
178
|
-
|
|
178
|
+
Doctor 会检查明显的 MCP secret 模式,并提示可疑内容。
|
package/package.json
CHANGED
package/src/lib/trellis.js
CHANGED
|
@@ -100,6 +100,9 @@ function dreamWorkflowBlock() {
|
|
|
100
100
|
'- Update `prd.md` only after a user answer, confirmed existing fact, or explicit decision is available.',
|
|
101
101
|
'- Treat PRD confirmation as separate from task creation consent.',
|
|
102
102
|
'- Generate initial spec candidates from user answers, PRD decisions, and verified project/code facts; require user review before treating them as stable conventions.',
|
|
103
|
+
'- Do not guess or fabricate unknown facts, APIs, package behavior, release status, or external documentation; search with preferred MCP tools or ask the user until accurate information is available.',
|
|
104
|
+
'- Write README and project documentation in Chinese. Write code comments in Chinese when comments are necessary, and avoid obvious comments.',
|
|
105
|
+
'- Prefer concise file names: use one word when clear, or lowercase snake_case for necessary multi-word names.',
|
|
103
106
|
'- Continue using `trellis-before-dev`, `trellis-check`, `trellis-update-spec`, and `trellis-break-loop` without replacing them.',
|
|
104
107
|
'',
|
|
105
108
|
'### Dream WF MCP Tool Policy',
|
|
@@ -20,4 +20,22 @@ Do not start implementation until the active Trellis task has a confirmed PRD. P
|
|
|
20
20
|
- Use `fast-context-mcp` for codebase semantic context.
|
|
21
21
|
- Use `grok-search-mcp` for external docs, live web information, and webpage fetch.
|
|
22
22
|
- If a preferred MCP is unavailable, state the fallback reason before using another tool.
|
|
23
|
+
|
|
24
|
+
## Accuracy Policy
|
|
25
|
+
|
|
26
|
+
- Do not guess or fabricate facts, APIs, package behavior, release status, or external documentation when the answer is not already known from model knowledge or project context.
|
|
27
|
+
- When current or missing knowledge is required, actively use the preferred web search/fetch MCP tools, or ask the user for authoritative information.
|
|
28
|
+
- Continue searching or asking until the information is accurate enough to proceed safely.
|
|
29
|
+
|
|
30
|
+
## Language Policy
|
|
31
|
+
|
|
32
|
+
- Write README and project documentation in Chinese.
|
|
33
|
+
- Write code comments in Chinese when comments are necessary.
|
|
34
|
+
- Avoid obvious comments; only explain non-obvious intent, constraints, or trade-offs.
|
|
35
|
+
|
|
36
|
+
## Naming Policy
|
|
37
|
+
|
|
38
|
+
- Prefer concise file names.
|
|
39
|
+
- Use one word when one word clearly describes the purpose, such as `pipeline`.
|
|
40
|
+
- When multiple words are necessary, use lowercase snake_case, such as `paper_extract`.
|
|
23
41
|
<!-- DREAM-WF:END -->
|
|
@@ -36,3 +36,21 @@ Do not start implementation until the active Trellis task has a confirmed PRD. P
|
|
|
36
36
|
- Use `fast-context-mcp` for codebase semantic context.
|
|
37
37
|
- Use `grok-search-mcp` for external docs, live web information, and webpage fetch.
|
|
38
38
|
- If a preferred MCP is unavailable, state the fallback reason before using another tool.
|
|
39
|
+
|
|
40
|
+
## Accuracy Policy
|
|
41
|
+
|
|
42
|
+
- Do not guess or fabricate facts, APIs, package behavior, release status, or external documentation when the answer is not already known from model knowledge or project context.
|
|
43
|
+
- When current or missing knowledge is required, actively use the preferred web search/fetch MCP tools, or ask the user for authoritative information.
|
|
44
|
+
- Continue searching or asking until the information is accurate enough to proceed safely.
|
|
45
|
+
|
|
46
|
+
## Language Policy
|
|
47
|
+
|
|
48
|
+
- Write README and project documentation in Chinese.
|
|
49
|
+
- Write code comments in Chinese when comments are necessary.
|
|
50
|
+
- Avoid obvious comments; only explain non-obvious intent, constraints, or trade-offs.
|
|
51
|
+
|
|
52
|
+
## Naming Policy
|
|
53
|
+
|
|
54
|
+
- Prefer concise file names.
|
|
55
|
+
- Use one word when one word clearly describes the purpose, such as `pipeline`.
|
|
56
|
+
- When multiple words are necessary, use lowercase snake_case, such as `paper_extract`.
|
|
@@ -20,4 +20,22 @@ Do not start implementation until the active Trellis task has a confirmed PRD. P
|
|
|
20
20
|
- Use `fast-context-mcp` for codebase semantic context.
|
|
21
21
|
- Use `grok-search-mcp` for external docs, live web information, and webpage fetch.
|
|
22
22
|
- If a preferred MCP is unavailable, state the fallback reason before using another tool.
|
|
23
|
+
|
|
24
|
+
## Accuracy Policy
|
|
25
|
+
|
|
26
|
+
- Do not guess or fabricate facts, APIs, package behavior, release status, or external documentation when the answer is not already known from model knowledge or project context.
|
|
27
|
+
- When current or missing knowledge is required, actively use the preferred web search/fetch MCP tools, or ask the user for authoritative information.
|
|
28
|
+
- Continue searching or asking until the information is accurate enough to proceed safely.
|
|
29
|
+
|
|
30
|
+
## Language Policy
|
|
31
|
+
|
|
32
|
+
- Write README and project documentation in Chinese.
|
|
33
|
+
- Write code comments in Chinese when comments are necessary.
|
|
34
|
+
- Avoid obvious comments; only explain non-obvious intent, constraints, or trade-offs.
|
|
35
|
+
|
|
36
|
+
## Naming Policy
|
|
37
|
+
|
|
38
|
+
- Prefer concise file names.
|
|
39
|
+
- Use one word when one word clearly describes the purpose, such as `pipeline`.
|
|
40
|
+
- When multiple words are necessary, use lowercase snake_case, such as `paper_extract`.
|
|
23
41
|
<!-- DREAM-WF:END -->
|
|
@@ -24,6 +24,12 @@ Prefer `grok-search-mcp` for external information:
|
|
|
24
24
|
|
|
25
25
|
Built-in web tools are fallback only. State the fallback reason before using them.
|
|
26
26
|
|
|
27
|
+
## Accuracy Requirements
|
|
28
|
+
|
|
29
|
+
- Do not guess or fabricate unknown facts, APIs, package behavior, release status, or external documentation.
|
|
30
|
+
- If model knowledge or project context is insufficient, actively search with the preferred web MCP tools or ask the user for authoritative information.
|
|
31
|
+
- Continue searching or asking until the information is accurate enough to proceed safely.
|
|
32
|
+
|
|
27
33
|
## Security
|
|
28
34
|
|
|
29
35
|
Do not commit API keys, tokens, or MCP secrets into project files.
|
|
@@ -13,6 +13,9 @@ This project uses `dream-wf` on top of Trellis.
|
|
|
13
13
|
- Update `prd.md` only after each confirmed answer, confirmed existing fact, or explicit decision.
|
|
14
14
|
- Treat task creation consent and implementation approval as separate gates.
|
|
15
15
|
- Do not start implementation until the PRD is confirmed.
|
|
16
|
+
- Write README and project documentation in Chinese.
|
|
17
|
+
- Write code comments in Chinese when comments are necessary, and avoid obvious comments.
|
|
18
|
+
- Prefer concise file names: one word when clear, or lowercase snake_case for necessary multi-word names.
|
|
16
19
|
|
|
17
20
|
## Initial Spec Candidates
|
|
18
21
|
|