dsh-grill-first 0.1.4 → 0.1.5

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/CHANGELOG.md CHANGED
@@ -2,6 +2,19 @@
2
2
 
3
3
  本项目遵循 [语义化版本](https://semver.org/lang/zh-CN/)。
4
4
 
5
+ ## 0.1.5
6
+
7
+ "让人一眼看懂"版本:只有文档,没有代码改动。
8
+
9
+ ### 新增
10
+
11
+ - **英文 README**(`README.en.md`):面向英文用户重写的,不是逐字翻译——一句话卖点、30 秒对话演示、四档对比、配置表、兼容性与已知限制。
12
+ - **中文 README 首屏重做**:一句话主张「Agent 不是不会做,是经常做完了你才发现不是你要的」、一段真实对话示例、四种门档位的对比表,都提到首屏。
13
+
14
+ ### 变更
15
+
16
+ - 中英文 README 顶部互相加了语言切换链接。
17
+
5
18
  ## 0.1.4
6
19
 
7
20
  "真的按你确认过的意思做"版本:修掉四个"配置写了但不生效"的地方,并让询问类消息不再被当成模糊任务。
package/README.en.md ADDED
@@ -0,0 +1,167 @@
1
+ # dsh-grill-first
2
+
3
+ ![tests](https://img.shields.io/badge/tests-127%20passing-brightgreen)
4
+ ![license](https://img.shields.io/badge/license-MIT-blue)
5
+ ![DSH plugin](https://img.shields.io/badge/DSH-plugin-blueviolet)
6
+
7
+ > A [DSH (DeepSeek Harness)](https://github.com/deepseek-ai/dsh) plugin that **interviews you before it starts working**: vague requests get clarified first, and the main task only starts once you confirm the summary.
8
+
9
+ **Agents rarely fail because they can't do the work. They fail because they do the wrong work, confidently.**
10
+
11
+ [中文](./README.md) · [Install](#install) · [Configuration](#configuration) · [Known limitations](#known-limitations)
12
+
13
+ ## See it in 30 seconds
14
+
15
+ ```text
16
+ you optimize that page
17
+
18
+ it 1) Which page? 2) "Optimize" meaning speed, style or copy?
19
+ 3) How do we know it's done?
20
+
21
+ you the login page, mostly styling — the alignment and spacing look off
22
+
23
+ it GOAL tidy up the login page's visuals
24
+ SCOPE styling only; structure and copy stay as-is
25
+ CONSTRAINTS use the existing design tokens
26
+ ACCEPTANCE key screens don't break on mobile
27
+ [ Confirm and start ] [ Change something ]
28
+
29
+ you confirm
30
+
31
+ it (only now does it touch anything)
32
+ ```
33
+
34
+ Without the plugin, the same sentence usually goes like this:
35
+
36
+ ```text
37
+ you optimize that page
38
+
39
+ it Done! I've updated the homepage copy and color scheme ✨ ← you meant the login page
40
+ ```
41
+
42
+ ## The four gate modes
43
+
44
+ | | No plugin | `gateMode: warn` (default) | `gateMode: ask` | `gateMode: strict` |
45
+ |---|---|---|---|---|
46
+ | Vague request | Guesses and starts | Asks; actions not blocked | Asks; one confirmation card before acting | Asks; blocks writes and commands until confirmed |
47
+
48
+ `warn` is the default so upgrading never silently freezes a workflow you already had.
49
+
50
+ ## How it works
51
+
52
+ Every new task starts with a check, not with work:
53
+
54
+ 1. The model passes your request to `grill_start`.
55
+ 2. If it's missing goal / scope / constraints / acceptance criteria, the plugin asks up to 3 questions per round, 3 rounds max, each round built on your previous answer.
56
+ 3. Once the picture is clear, `grill_confirm` hands you a four-part summary (goal / scope / constraints / acceptance criteria).
57
+ 4. "Confirm" releases the task; "change something" makes it revise and ask again.
58
+ 5. One-liners and questions don't trigger any of this — nor do messages containing `直接做`, `跳过提问`, `不用问`, `skip`, `skip the questions`, `just do it`.
59
+
60
+ ## Install
61
+
62
+ Quit any running task first. Any of these works:
63
+
64
+ **Plugin marketplace (recommended)** — DSH settings → Plugins → search `dsh-grill-first`.
65
+
66
+ **npm**
67
+
68
+ ```bash
69
+ dsh plugin --profile <your-profile> add dsh-grill-first
70
+ ```
71
+
72
+ **From source**
73
+
74
+ ```bash
75
+ dsh plugin --profile <your-profile> add github:InoriMutsumi/dsh-grill-first
76
+ ```
77
+
78
+ Live profiles hot-load the plugin — no restart needed (restart DSH once if it doesn't show up).
79
+
80
+ ## What you get
81
+
82
+ - **A protocol paragraph** injected into the system prompt (~600 chars) telling the model to run `grill_start` before new work. If you can see `【开工前提问协议(grill-first)】` in the prompt, it's installed.
83
+ - **Two tools:**
84
+
85
+ | Tool | What it does |
86
+ |---|---|
87
+ | `grill_start` | Decides whether the request needs clarification. Returns `verdict`, `focus_hints` (what to ask), and `memory_context` (preferences you already confirmed, so it doesn't ask twice) |
88
+ | `grill_confirm` | Hands you the four-part summary; on confirmation releases the task and saves what you confirmed |
89
+
90
+ ## When you don't want to be asked
91
+
92
+ - Put `直接做`, `跳过提问`, `不用问`, `skip`, `skip the questions` or `just do it` in the message → it starts immediately.
93
+ - Asks a question ("how is this plugin", "check my repos", "explain this code") → treated as a question, not a task, so nothing is clarified.
94
+ - Or turn `enabled` off / set `gateMode: off` in the config → fully silent.
95
+
96
+ ## Configuration
97
+
98
+ DSH settings → Plugins → dsh-grill-first, eight options:
99
+
100
+ | Option | Type | Default | Meaning |
101
+ |---|---|---|---|
102
+ | `enabled` | boolean | `true` | Master switch. Off = no questions, no gate |
103
+ | `gateMode` | `off` / `warn` / `ask` / `strict` | `warn` | `off` never blocks; `warn` only logs; `ask` shows one confirmation card; `strict` blocks mutating tools until confirmed |
104
+ | `maxQuestionsPerRound` | 1–6 | `3` | Questions per round |
105
+ | `maxRounds` | 1–10 | `3` | Max clarification rounds; on the last round `grill_start` passes the task through |
106
+ | `intensity` | `gentle` / `standard` / `grill` | `standard` | How much detail counts as clear: `gentle` needs two dimensions, `standard` three, `grill` also requires acceptance criteria |
107
+ | `bypassKeywords` | string[] | `["直接做","跳过提问","不用问","skip"]` | Hit any of these → skip the interview |
108
+ | `memoryEnabled` | boolean | `true` | Enable the two-layer memory |
109
+ | `memoryScope` | `project` / `global` | `project` | Where project context lives: in the workspace, or in the global directory shared across projects |
110
+
111
+ ### Editing the config
112
+
113
+ The plugin page only offers an enable/disable toggle, so edit the profile's patch layer, `<profile>/cordis.patch.yml`:
114
+
115
+ ```yaml
116
+ - id: dsh-grill-first
117
+ name: dsh-grill-first
118
+ config:
119
+ gateMode: ask
120
+ maxQuestionsPerRound: 3
121
+ maxRounds: 3
122
+ intensity: standard
123
+ memoryEnabled: true
124
+ memoryScope: project
125
+ bypassKeywords: [直接做, 跳过提问, 不用问, skip]
126
+ ```
127
+
128
+ Only the keys you set are overridden; the rest keep their defaults. Config changes hot-reload, code changes need a DSH restart.
129
+
130
+ ## Two-layer memory
131
+
132
+ Only what you actually confirmed is stored — never raw conversation, never the summary as a file.
133
+
134
+ | Layer | Location | Contents |
135
+ |---|---|---|
136
+ | Global | `<profile>/grill-first/global.json` (falls back to `~/.dsh-grill-first/global.json`) | Standing preferences, e.g. "comments in English" |
137
+ | Project | `<workspace>/.dsh/grill-first/memory.json` | Project background and task history (task name, summary, date; last 100 entries) |
138
+
139
+ Set `memoryScope: global` to keep project context in the global directory instead — handy when you don't want a `.dsh/` folder in every repo. Next interview, `grill_start` returns this as `memory_context`, so the same question is never asked twice.
140
+
141
+ ## Development
142
+
143
+ ```bash
144
+ npm install # dev dependencies (schemastery comes from the host at runtime)
145
+ npm run build # TypeScript → dist/
146
+ npm test # build + 127 unit / end-to-end tests
147
+ node scripts/selfcheck.mjs # static check: Chinese JSDoc, `any` usage, spec-to-code map
148
+ ```
149
+
150
+ `dist/` is committed on purpose so `dsh plugin add github:…` works without compiling on your machine. CI runs `typecheck` + tests on Node 22.
151
+
152
+ ## Compatibility
153
+
154
+ - Peer dependency: only `@deepseek-ai/schemastery` (`^3.18.1`, shipped by the host).
155
+ - No import of any `@deepseek-ai/dsh*` runtime package, so no `engines.dsh` and no DSH peer range to keep in sync. Verified against DSH `0.2.1-rc.2`.
156
+
157
+ ## Known limitations
158
+
159
+ - The gate only applies to the **root agent** that talks to you. Delegated work isn't gated (but delegation tools themselves are, so a subagent can't be used to sidestep it). This is deliberate.
160
+ - `ask` mode asks **once per task** — otherwise a task that writes 20 files would show 20 cards. Use `strict` if you want every action blocked.
161
+ - The judge is **keyword heuristics**, not a semantic model: questions are detected by punctuation and interrogatives. Rare ambiguous sentences can be misjudged; say `直接做` or let the model call `grill_start` again to correct it.
162
+ - The judge runs in Chinese and English only. English keywords match on word boundaries (`skip` matches `skip` and `(skip)` but not `skipList`).
163
+ - Memory is plain local JSON, unencrypted.
164
+
165
+ ## License
166
+
167
+ MIT — see [LICENSE](./LICENSE).
package/README.md CHANGED
@@ -6,6 +6,46 @@
6
6
 
7
7
  > DSH(DeepSeek Harness)插件:**开工前先刨根问底**——把模糊需求问成明确需求,你在对话里点头之后,主任务才开工。
8
8
 
9
+ **Agent 不是不会做,是经常做完了你才发现不是你要的。**
10
+
11
+ [English](./README.en.md) · [安装](#安装) · [配置项](#配置项) · [已知限制](#已知限制)
12
+
13
+ ## 30 秒看懂
14
+
15
+ ```text
16
+ 你 把那个页面优化一下
17
+
18
+ 它 1) 是哪个页面?2) 「优化」指速度、样式还是文案?
19
+ 3) 怎么才算优化好了?
20
+
21
+ 你 登录页,主要是样式,现在对齐和间距看着乱
22
+
23
+ 它 【目标】整理登录页视觉
24
+ 【范围】只改样式,不动结构和文案
25
+ 【约束】沿用现有设计规范
26
+ 【验收标准】主要页面在移动端不错位
27
+ [ 确认,按此开工 ] [ 要改 ]
28
+
29
+ 你 确认
30
+
31
+ 它 (这时才动手)
32
+ ```
33
+
34
+ 不装这个插件时,同一句话大概率是这样:
35
+
36
+ ```text
37
+ 你 把那个页面优化一下
38
+ 它 好的,已经帮你调整了首页的文案和配色 ✨ ← 你要的是登录页
39
+ ```
40
+
41
+ ## 四种档位的区别
42
+
43
+ | | 不装插件 | `gateMode: warn`(默认) | `gateMode: ask` | `gateMode: strict` |
44
+ |---|---|---|---|---|
45
+ | 任务模糊时 | 直接猜着做 | 追问;动手不拦 | 追问;动手前弹一次确认卡片 | 追问;没确认前拦截写文件、执行命令 |
46
+
47
+ `warn` 是默认值:升级插件不会突然卡住你已有的工作流。
48
+
9
49
  ## 它解决什么问题
10
50
 
11
51
  AI 助手最常见的失败不是"不会做",而是"做完了才发现做的不是你要的"。这个插件在**任何新任务开工前**插入一道需求澄清环节:
@@ -37,7 +77,7 @@ dsh plugin --profile <你的 profile 名> add dsh-grill-first
37
77
  **方式三:本地包 / GitHub 仓库**
38
78
 
39
79
  ```bash
40
- dsh plugin --profile <你的 profile 名> add /绝对路径/dsh-grill-first-0.1.3.tgz
80
+ dsh plugin --profile <你的 profile 名> add /绝对路径/dsh-grill-first-0.1.5.tgz
41
81
  dsh plugin --profile <你的 profile 名> add github:InoriMutsumi/dsh-grill-first
42
82
  ```
43
83
 
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "dsh-grill-first",
3
- "version": "0.1.4",
3
+ "version": "0.1.5",
4
4
  "description": "DSH 插件:开工前刨根问底——把模糊需求问成明确需求,用户确认后才放行主任务",
5
5
  "icon": "./icon.png",
6
6
  "author": "InoriMutsumi",