simple-skills 1.3.0 → 1.3.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 +1 -1
- package/package.json +1 -1
- package/skills/engineering/brainstorming/SKILL.md +2 -2
- package/skills/engineering/brainstorming/scripts/frame-template.html +299 -51
- package/skills/engineering/brainstorming/scripts/start-server.sh +4 -4
- package/skills/engineering/brainstorming/scripts/stop-server.sh +1 -1
- package/skills/engineering/brainstorming/spec-document-reviewer-prompt.md +1 -1
- package/skills/engineering/brainstorming/visual-companion.md +4 -4
- package/skills/engineering/code-review/SKILL.md +43 -1
- package/skills/engineering/finishing-a-development-branch/SKILL.md +1 -6
- package/skills/engineering/implement/SKILL.md +2 -0
- package/skills/engineering/subagent-driven-development/SKILL.md +14 -19
- package/skills/engineering/subagent-driven-development/scripts/review-package +1 -1
- package/skills/engineering/subagent-driven-development/scripts/sdd-workspace +3 -3
- package/skills/engineering/subagent-driven-development/scripts/task-brief +1 -5
- package/skills/engineering/systematic-debugging/SKILL.md +2 -15
- package/skills/engineering/systematic-debugging/CREATION-LOG.md +0 -119
- package/skills/engineering/systematic-debugging/condition-based-waiting-example.ts +0 -158
- package/skills/engineering/systematic-debugging/condition-based-waiting.md +0 -115
- package/skills/engineering/systematic-debugging/defense-in-depth.md +0 -122
- package/skills/engineering/systematic-debugging/find-polluter.sh +0 -72
- package/skills/engineering/systematic-debugging/root-cause-tracing.md +0 -169
- package/skills/engineering/systematic-debugging/test-academic.md +0 -14
- package/skills/engineering/systematic-debugging/test-pressure-1.md +0 -58
- package/skills/engineering/systematic-debugging/test-pressure-2.md +0 -68
- package/skills/engineering/systematic-debugging/test-pressure-3.md +0 -69
package/README.md
CHANGED
|
@@ -72,6 +72,7 @@ rm -rf ~/.claude/skills # 若当初装了这份
|
|
|
72
72
|
| Skill | 用途 |
|
|
73
73
|
| --- | --- |
|
|
74
74
|
| [ask-route](./skills/engineering/ask-route/SKILL.md) | 询问哪个 skill 或流程适合你的情况。user-invoked skills 之上的路由器 |
|
|
75
|
+
| [requirement-workflow](./skills/engineering/requirement-workflow/SKILL.md) | 需求开发流程编排:设计 → 规格 → 票据 → 实施 → 评审 → 维护,每阶段路由到对应 skill |
|
|
75
76
|
| [grill-with-docs](./skills/engineering/grill-with-docs/SKILL.md) | 盘问式会话,同时构建项目的领域模型,打磨术语并就地更新 `CONTEXT.md` 和 ADR |
|
|
76
77
|
| [brainstorming](./skills/engineering/brainstorming/SKILL.md) | 在任何创造性工作之前通过协作对话把想法打磨成设计,获用户批准后才进入实现 |
|
|
77
78
|
| [improve-codebase-architecture](./skills/engineering/improve-codebase-architecture/SKILL.md) | 扫描代码库寻找深化机会,以可视化 HTML 报告呈现,再对选中的机会进行盘问 |
|
|
@@ -79,7 +80,6 @@ rm -rf ~/.claude/skills # 若当初装了这份
|
|
|
79
80
|
| [to-spec](./skills/engineering/to-spec/SKILL.md) | 把当前对话转化为一份 spec 并发布到 issue tracker |
|
|
80
81
|
| [to-tickets](./skills/engineering/to-tickets/SKILL.md) | 把任何计划、spec 或对话拆解为一组 tracer-bullet 票据,每张票据声明其阻塞边 |
|
|
81
82
|
| [implement](./skills/engineering/implement/SKILL.md) | 构建 spec 或一组票据描述的工作,在约定 seam 处驱动 `/tdd`,提交前以 `/code-review` 收尾 |
|
|
82
|
-
| [requirement-workflow](./skills/engineering/requirement-workflow/SKILL.md) | 需求开发流程编排:设计 → 规格 → 票据 → 实施 → 评审 → 维护,每阶段路由到对应 skill |
|
|
83
83
|
| [wayfinder](./skills/engineering/wayfinder/SKILL.md) | 规划超出一个 agent 会话容量的工作——以决策票据共享地图的形式,一次解决一张 |
|
|
84
84
|
| [systematic-debugging](./skills/engineering/systematic-debugging/SKILL.md) | 修复前先系统化定位根本原因:复现、假设、验证、修复、回归 |
|
|
85
85
|
| [diagnosing-bugs](./skills/engineering/diagnosing-bugs/SKILL.md) | 针对疑难 bug 和性能回退的纪律化诊断循环:变红反馈回路 → 最小化 → 假设 → 插桩 → 修复 → 回归测试 |
|
package/package.json
CHANGED
|
@@ -26,7 +26,7 @@ description: "在任何创造性工作之前必须使用此技能——创建功
|
|
|
26
26
|
3. **提出澄清问题** — 每次一个,了解目的/约束/成功标准
|
|
27
27
|
4. **提出 2-3 种方案** — 附带权衡分析和你的推荐
|
|
28
28
|
5. **展示设计** — 按复杂度分节展示,每节展示后获得用户批准
|
|
29
|
-
6. **编写设计文档** — 保存到 `docs/
|
|
29
|
+
6. **编写设计文档** — 保存到 `docs/specs/YYYY-MM-DD-<topic>-design.md` 并 commit
|
|
30
30
|
7. **规格自检** — 快速内联检查占位符、矛盾、模糊性、范围(详见下方)
|
|
31
31
|
8. **用户审查书面规格** — 在继续之前请用户审查规格文件
|
|
32
32
|
9. **过渡到实现** — 调用 writing-plans 技能创建实现计划
|
|
@@ -109,7 +109,7 @@ digraph brainstorming {
|
|
|
109
109
|
|
|
110
110
|
**文档:**
|
|
111
111
|
|
|
112
|
-
- 将验证通过的设计(规格说明)写入 `docs/
|
|
112
|
+
- 将验证通过的设计(规格说明)写入 `docs/specs/YYYY-MM-DD-<topic>-design.md`
|
|
113
113
|
- (用户对规格位置的偏好优先于此默认值)
|
|
114
114
|
- 如果可用,使用 elements-of-style:writing-clearly-and-concisely 技能
|
|
115
115
|
- 将设计文档 commit 到 git
|
|
@@ -1,8 +1,9 @@
|
|
|
1
1
|
<!DOCTYPE html>
|
|
2
2
|
<html>
|
|
3
|
+
|
|
3
4
|
<head>
|
|
4
5
|
<meta charset="utf-8">
|
|
5
|
-
<title>
|
|
6
|
+
<title>Brainstorming</title>
|
|
6
7
|
<style>
|
|
7
8
|
/*
|
|
8
9
|
* BRAINSTORM COMPANION FRAME TEMPLATE
|
|
@@ -16,8 +17,17 @@
|
|
|
16
17
|
* Content is injected via placeholder comment in #frame-content.
|
|
17
18
|
*/
|
|
18
19
|
|
|
19
|
-
* {
|
|
20
|
-
|
|
20
|
+
* {
|
|
21
|
+
box-sizing: border-box;
|
|
22
|
+
margin: 0;
|
|
23
|
+
padding: 0;
|
|
24
|
+
}
|
|
25
|
+
|
|
26
|
+
html,
|
|
27
|
+
body {
|
|
28
|
+
height: 100%;
|
|
29
|
+
overflow: hidden;
|
|
30
|
+
}
|
|
21
31
|
|
|
22
32
|
/* ===== THEME VARIABLES ===== */
|
|
23
33
|
:root {
|
|
@@ -63,18 +73,79 @@
|
|
|
63
73
|
}
|
|
64
74
|
|
|
65
75
|
/* ===== FRAME STRUCTURE ===== */
|
|
66
|
-
.brand {
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
76
|
+
.brand {
|
|
77
|
+
display: flex;
|
|
78
|
+
align-items: center;
|
|
79
|
+
min-width: 0;
|
|
80
|
+
overflow: hidden;
|
|
81
|
+
color: var(--text-secondary);
|
|
82
|
+
line-height: 1;
|
|
83
|
+
}
|
|
84
|
+
|
|
85
|
+
.brand a {
|
|
86
|
+
color: inherit;
|
|
87
|
+
text-decoration: none;
|
|
88
|
+
display: flex;
|
|
89
|
+
align-items: center;
|
|
90
|
+
gap: 0.5rem;
|
|
91
|
+
min-width: 0;
|
|
92
|
+
max-width: 100%;
|
|
93
|
+
line-height: 1;
|
|
94
|
+
}
|
|
95
|
+
|
|
96
|
+
.brand-copy {
|
|
97
|
+
display: block;
|
|
98
|
+
min-width: 0;
|
|
99
|
+
overflow: hidden;
|
|
100
|
+
text-overflow: ellipsis;
|
|
101
|
+
white-space: nowrap;
|
|
102
|
+
line-height: 1;
|
|
103
|
+
transform: translateY(-1px);
|
|
104
|
+
}
|
|
105
|
+
|
|
106
|
+
.brand-logo {
|
|
107
|
+
display: block;
|
|
108
|
+
height: 1em;
|
|
109
|
+
width: auto;
|
|
110
|
+
max-width: 180px;
|
|
111
|
+
flex-shrink: 0;
|
|
112
|
+
filter: invert(1);
|
|
113
|
+
}
|
|
114
|
+
|
|
70
115
|
@media (prefers-color-scheme: dark) {
|
|
71
|
-
.brand-logo {
|
|
116
|
+
.brand-logo {
|
|
117
|
+
filter: none;
|
|
118
|
+
}
|
|
72
119
|
}
|
|
73
|
-
.status { font-size: 0.7rem; color: var(--status-color, var(--success)); display: flex; align-items: center; gap: 0.4rem; justify-self: end; white-space: nowrap; line-height: 1; }
|
|
74
|
-
.status::before { content: ''; width: 6px; height: 6px; background: var(--status-color, var(--success)); border-radius: 50%; }
|
|
75
120
|
|
|
76
|
-
.
|
|
77
|
-
|
|
121
|
+
.status {
|
|
122
|
+
font-size: 0.7rem;
|
|
123
|
+
color: var(--status-color, var(--success));
|
|
124
|
+
display: flex;
|
|
125
|
+
align-items: center;
|
|
126
|
+
gap: 0.4rem;
|
|
127
|
+
justify-self: end;
|
|
128
|
+
white-space: nowrap;
|
|
129
|
+
line-height: 1;
|
|
130
|
+
}
|
|
131
|
+
|
|
132
|
+
.status::before {
|
|
133
|
+
content: '';
|
|
134
|
+
width: 6px;
|
|
135
|
+
height: 6px;
|
|
136
|
+
background: var(--status-color, var(--success));
|
|
137
|
+
border-radius: 50%;
|
|
138
|
+
}
|
|
139
|
+
|
|
140
|
+
.main {
|
|
141
|
+
flex: 1;
|
|
142
|
+
overflow-y: auto;
|
|
143
|
+
}
|
|
144
|
+
|
|
145
|
+
#frame-content {
|
|
146
|
+
padding: 2rem;
|
|
147
|
+
min-height: 100%;
|
|
148
|
+
}
|
|
78
149
|
|
|
79
150
|
.header {
|
|
80
151
|
background: var(--bg-secondary);
|
|
@@ -87,26 +158,66 @@
|
|
|
87
158
|
gap: 1rem;
|
|
88
159
|
min-height: 42px;
|
|
89
160
|
}
|
|
90
|
-
|
|
91
|
-
.header .
|
|
161
|
+
|
|
162
|
+
.header .brand {
|
|
163
|
+
justify-self: start;
|
|
164
|
+
width: 100%;
|
|
165
|
+
font-size: 0.75rem;
|
|
166
|
+
line-height: 1;
|
|
167
|
+
}
|
|
168
|
+
|
|
169
|
+
.header .status {
|
|
170
|
+
grid-column: 2;
|
|
171
|
+
line-height: 1;
|
|
172
|
+
}
|
|
173
|
+
|
|
92
174
|
.header span {
|
|
93
175
|
font-size: 0.75rem;
|
|
94
176
|
color: var(--text-secondary);
|
|
95
177
|
}
|
|
178
|
+
|
|
96
179
|
.header .selected-text {
|
|
97
180
|
color: var(--accent);
|
|
98
181
|
font-weight: 500;
|
|
99
182
|
}
|
|
100
183
|
|
|
101
184
|
/* ===== TYPOGRAPHY ===== */
|
|
102
|
-
h2 {
|
|
103
|
-
|
|
104
|
-
|
|
105
|
-
|
|
106
|
-
|
|
185
|
+
h2 {
|
|
186
|
+
font-size: 1.5rem;
|
|
187
|
+
font-weight: 600;
|
|
188
|
+
margin-bottom: 0.5rem;
|
|
189
|
+
}
|
|
190
|
+
|
|
191
|
+
h3 {
|
|
192
|
+
font-size: 1.1rem;
|
|
193
|
+
font-weight: 600;
|
|
194
|
+
margin-bottom: 0.25rem;
|
|
195
|
+
}
|
|
196
|
+
|
|
197
|
+
.subtitle {
|
|
198
|
+
color: var(--text-secondary);
|
|
199
|
+
margin-bottom: 1.5rem;
|
|
200
|
+
}
|
|
201
|
+
|
|
202
|
+
.section {
|
|
203
|
+
margin-bottom: 2rem;
|
|
204
|
+
}
|
|
205
|
+
|
|
206
|
+
.label {
|
|
207
|
+
font-size: 0.7rem;
|
|
208
|
+
color: var(--text-secondary);
|
|
209
|
+
text-transform: uppercase;
|
|
210
|
+
letter-spacing: 0.05em;
|
|
211
|
+
margin-bottom: 0.5rem;
|
|
212
|
+
}
|
|
107
213
|
|
|
108
214
|
/* ===== OPTIONS (for A/B/C choices) ===== */
|
|
109
|
-
.options {
|
|
215
|
+
.options {
|
|
216
|
+
display: flex;
|
|
217
|
+
flex-direction: column;
|
|
218
|
+
gap: 0.75rem;
|
|
219
|
+
}
|
|
220
|
+
|
|
110
221
|
.option {
|
|
111
222
|
background: var(--bg-secondary);
|
|
112
223
|
border: 2px solid var(--border);
|
|
@@ -118,23 +229,57 @@
|
|
|
118
229
|
align-items: flex-start;
|
|
119
230
|
gap: 1rem;
|
|
120
231
|
}
|
|
121
|
-
|
|
122
|
-
.option
|
|
232
|
+
|
|
233
|
+
.option:hover {
|
|
234
|
+
border-color: var(--accent);
|
|
235
|
+
}
|
|
236
|
+
|
|
237
|
+
.option.selected {
|
|
238
|
+
background: var(--selected-bg);
|
|
239
|
+
border-color: var(--selected-border);
|
|
240
|
+
}
|
|
241
|
+
|
|
123
242
|
.option .letter {
|
|
124
243
|
background: var(--bg-tertiary);
|
|
125
244
|
color: var(--text-secondary);
|
|
126
|
-
width: 1.75rem;
|
|
245
|
+
width: 1.75rem;
|
|
246
|
+
height: 1.75rem;
|
|
127
247
|
border-radius: 6px;
|
|
128
|
-
display: flex;
|
|
129
|
-
|
|
248
|
+
display: flex;
|
|
249
|
+
align-items: center;
|
|
250
|
+
justify-content: center;
|
|
251
|
+
font-weight: 600;
|
|
252
|
+
font-size: 0.85rem;
|
|
253
|
+
flex-shrink: 0;
|
|
254
|
+
}
|
|
255
|
+
|
|
256
|
+
.option.selected .letter {
|
|
257
|
+
background: var(--accent);
|
|
258
|
+
color: white;
|
|
259
|
+
}
|
|
260
|
+
|
|
261
|
+
.option .content {
|
|
262
|
+
flex: 1;
|
|
263
|
+
}
|
|
264
|
+
|
|
265
|
+
.option .content h3 {
|
|
266
|
+
font-size: 0.95rem;
|
|
267
|
+
margin-bottom: 0.15rem;
|
|
268
|
+
}
|
|
269
|
+
|
|
270
|
+
.option .content p {
|
|
271
|
+
color: var(--text-secondary);
|
|
272
|
+
font-size: 0.85rem;
|
|
273
|
+
margin: 0;
|
|
130
274
|
}
|
|
131
|
-
.option.selected .letter { background: var(--accent); color: white; }
|
|
132
|
-
.option .content { flex: 1; }
|
|
133
|
-
.option .content h3 { font-size: 0.95rem; margin-bottom: 0.15rem; }
|
|
134
|
-
.option .content p { color: var(--text-secondary); font-size: 0.85rem; margin: 0; }
|
|
135
275
|
|
|
136
276
|
/* ===== CARDS (for showing designs/mockups) ===== */
|
|
137
|
-
.cards {
|
|
277
|
+
.cards {
|
|
278
|
+
display: grid;
|
|
279
|
+
grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
|
|
280
|
+
gap: 1rem;
|
|
281
|
+
}
|
|
282
|
+
|
|
138
283
|
.card {
|
|
139
284
|
background: var(--bg-secondary);
|
|
140
285
|
border: 1px solid var(--border);
|
|
@@ -143,12 +288,38 @@
|
|
|
143
288
|
cursor: pointer;
|
|
144
289
|
transition: all 0.15s ease;
|
|
145
290
|
}
|
|
146
|
-
|
|
147
|
-
.card
|
|
148
|
-
|
|
149
|
-
|
|
150
|
-
|
|
151
|
-
|
|
291
|
+
|
|
292
|
+
.card:hover {
|
|
293
|
+
border-color: var(--accent);
|
|
294
|
+
transform: translateY(-2px);
|
|
295
|
+
box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
|
|
296
|
+
}
|
|
297
|
+
|
|
298
|
+
.card.selected {
|
|
299
|
+
border-color: var(--selected-border);
|
|
300
|
+
border-width: 2px;
|
|
301
|
+
}
|
|
302
|
+
|
|
303
|
+
.card-image {
|
|
304
|
+
background: var(--bg-tertiary);
|
|
305
|
+
aspect-ratio: 16/10;
|
|
306
|
+
display: flex;
|
|
307
|
+
align-items: center;
|
|
308
|
+
justify-content: center;
|
|
309
|
+
}
|
|
310
|
+
|
|
311
|
+
.card-body {
|
|
312
|
+
padding: 1rem;
|
|
313
|
+
}
|
|
314
|
+
|
|
315
|
+
.card-body h3 {
|
|
316
|
+
margin-bottom: 0.25rem;
|
|
317
|
+
}
|
|
318
|
+
|
|
319
|
+
.card-body p {
|
|
320
|
+
color: var(--text-secondary);
|
|
321
|
+
font-size: 0.85rem;
|
|
322
|
+
}
|
|
152
323
|
|
|
153
324
|
/* ===== MOCKUP CONTAINER ===== */
|
|
154
325
|
.mockup {
|
|
@@ -158,6 +329,7 @@
|
|
|
158
329
|
overflow: hidden;
|
|
159
330
|
margin-bottom: 1.5rem;
|
|
160
331
|
}
|
|
332
|
+
|
|
161
333
|
.mockup-header {
|
|
162
334
|
background: var(--bg-tertiary);
|
|
163
335
|
padding: 0.5rem 1rem;
|
|
@@ -165,19 +337,62 @@
|
|
|
165
337
|
color: var(--text-secondary);
|
|
166
338
|
border-bottom: 1px solid var(--border);
|
|
167
339
|
}
|
|
168
|
-
|
|
340
|
+
|
|
341
|
+
.mockup-body {
|
|
342
|
+
padding: 1.5rem;
|
|
343
|
+
}
|
|
169
344
|
|
|
170
345
|
/* ===== SPLIT VIEW (side-by-side comparison) ===== */
|
|
171
|
-
.split {
|
|
172
|
-
|
|
346
|
+
.split {
|
|
347
|
+
display: grid;
|
|
348
|
+
grid-template-columns: 1fr 1fr;
|
|
349
|
+
gap: 1.5rem;
|
|
350
|
+
}
|
|
351
|
+
|
|
352
|
+
@media (max-width: 700px) {
|
|
353
|
+
.split {
|
|
354
|
+
grid-template-columns: 1fr;
|
|
355
|
+
}
|
|
356
|
+
}
|
|
173
357
|
|
|
174
358
|
/* ===== PROS/CONS ===== */
|
|
175
|
-
.pros-cons {
|
|
176
|
-
|
|
177
|
-
|
|
178
|
-
|
|
179
|
-
|
|
180
|
-
|
|
359
|
+
.pros-cons {
|
|
360
|
+
display: grid;
|
|
361
|
+
grid-template-columns: 1fr 1fr;
|
|
362
|
+
gap: 1rem;
|
|
363
|
+
margin: 1rem 0;
|
|
364
|
+
}
|
|
365
|
+
|
|
366
|
+
.pros,
|
|
367
|
+
.cons {
|
|
368
|
+
background: var(--bg-secondary);
|
|
369
|
+
border-radius: 8px;
|
|
370
|
+
padding: 1rem;
|
|
371
|
+
}
|
|
372
|
+
|
|
373
|
+
.pros h4 {
|
|
374
|
+
color: var(--success);
|
|
375
|
+
font-size: 0.85rem;
|
|
376
|
+
margin-bottom: 0.5rem;
|
|
377
|
+
}
|
|
378
|
+
|
|
379
|
+
.cons h4 {
|
|
380
|
+
color: var(--error);
|
|
381
|
+
font-size: 0.85rem;
|
|
382
|
+
margin-bottom: 0.5rem;
|
|
383
|
+
}
|
|
384
|
+
|
|
385
|
+
.pros ul,
|
|
386
|
+
.cons ul {
|
|
387
|
+
margin-left: 1.25rem;
|
|
388
|
+
font-size: 0.85rem;
|
|
389
|
+
color: var(--text-secondary);
|
|
390
|
+
}
|
|
391
|
+
|
|
392
|
+
.pros li,
|
|
393
|
+
.cons li {
|
|
394
|
+
margin-bottom: 0.25rem;
|
|
395
|
+
}
|
|
181
396
|
|
|
182
397
|
/* ===== PLACEHOLDER (for mockup areas) ===== */
|
|
183
398
|
.placeholder {
|
|
@@ -190,13 +405,45 @@
|
|
|
190
405
|
}
|
|
191
406
|
|
|
192
407
|
/* ===== INLINE MOCKUP ELEMENTS ===== */
|
|
193
|
-
.mock-nav {
|
|
194
|
-
|
|
195
|
-
|
|
196
|
-
|
|
197
|
-
|
|
408
|
+
.mock-nav {
|
|
409
|
+
background: var(--accent);
|
|
410
|
+
color: white;
|
|
411
|
+
padding: 0.75rem 1rem;
|
|
412
|
+
display: flex;
|
|
413
|
+
gap: 1.5rem;
|
|
414
|
+
font-size: 0.9rem;
|
|
415
|
+
}
|
|
416
|
+
|
|
417
|
+
.mock-sidebar {
|
|
418
|
+
background: var(--bg-tertiary);
|
|
419
|
+
padding: 1rem;
|
|
420
|
+
min-width: 180px;
|
|
421
|
+
}
|
|
422
|
+
|
|
423
|
+
.mock-content {
|
|
424
|
+
padding: 1.5rem;
|
|
425
|
+
flex: 1;
|
|
426
|
+
}
|
|
427
|
+
|
|
428
|
+
.mock-button {
|
|
429
|
+
background: var(--accent);
|
|
430
|
+
color: white;
|
|
431
|
+
border: none;
|
|
432
|
+
padding: 0.5rem 1rem;
|
|
433
|
+
border-radius: 6px;
|
|
434
|
+
font-size: 0.85rem;
|
|
435
|
+
}
|
|
436
|
+
|
|
437
|
+
.mock-input {
|
|
438
|
+
background: var(--bg-primary);
|
|
439
|
+
border: 1px solid var(--border);
|
|
440
|
+
border-radius: 6px;
|
|
441
|
+
padding: 0.5rem;
|
|
442
|
+
width: 100%;
|
|
443
|
+
}
|
|
198
444
|
</style>
|
|
199
445
|
</head>
|
|
446
|
+
|
|
200
447
|
<body>
|
|
201
448
|
<div class="header">
|
|
202
449
|
<!-- BRANDING -->
|
|
@@ -210,4 +457,5 @@
|
|
|
210
457
|
</div>
|
|
211
458
|
|
|
212
459
|
</body>
|
|
213
|
-
|
|
460
|
+
|
|
461
|
+
</html>
|
|
@@ -6,7 +6,7 @@
|
|
|
6
6
|
# Each session gets its own directory to avoid conflicts.
|
|
7
7
|
#
|
|
8
8
|
# Options:
|
|
9
|
-
# --project-dir <path> Store session files under <path
|
|
9
|
+
# --project-dir <path> Store session files under <path>/docs/brainstorm/
|
|
10
10
|
# instead of /tmp. Files persist after server stops.
|
|
11
11
|
# --host <bind-host> Host/interface to bind (default: 127.0.0.1).
|
|
12
12
|
# Use 0.0.0.0 in remote/containerized environments.
|
|
@@ -114,11 +114,11 @@ umask 077
|
|
|
114
114
|
SESSION_ID="$$-$(date +%s)"
|
|
115
115
|
|
|
116
116
|
if [[ -n "$PROJECT_DIR" ]]; then
|
|
117
|
-
SESSION_DIR="${PROJECT_DIR}
|
|
117
|
+
SESSION_DIR="${PROJECT_DIR}/docs/brainstorm/${SESSION_ID}"
|
|
118
118
|
# Persist the bound port and key per project so a restart reuses them and an
|
|
119
119
|
# already-open browser tab reconnects to the same URL with a valid cookie.
|
|
120
|
-
export BRAINSTORM_PORT_FILE="${PROJECT_DIR}
|
|
121
|
-
export BRAINSTORM_TOKEN_FILE="${PROJECT_DIR}
|
|
120
|
+
export BRAINSTORM_PORT_FILE="${PROJECT_DIR}/docs/brainstorm/.last-port"
|
|
121
|
+
export BRAINSTORM_TOKEN_FILE="${PROJECT_DIR}/docs/brainstorm/.last-token"
|
|
122
122
|
else
|
|
123
123
|
SESSION_DIR="/tmp/brainstorm-${SESSION_ID}"
|
|
124
124
|
fi
|
|
@@ -3,7 +3,7 @@
|
|
|
3
3
|
# Usage: stop-server.sh <session_dir>
|
|
4
4
|
#
|
|
5
5
|
# Kills the server process. Only deletes session directory if it's
|
|
6
|
-
# under /tmp (ephemeral). Persistent directories (
|
|
6
|
+
# under /tmp (ephemeral). Persistent directories (docs/) are
|
|
7
7
|
# kept so mockups can be reviewed later.
|
|
8
8
|
|
|
9
9
|
SESSION_DIR="$1"
|
|
@@ -37,14 +37,14 @@
|
|
|
37
37
|
scripts/start-server.sh --project-dir /path/to/project
|
|
38
38
|
|
|
39
39
|
# 返回:{"type":"server-started","port":52341,"url":"http://localhost:52341",
|
|
40
|
-
# "screen_dir":"/path/to/project
|
|
40
|
+
# "screen_dir":"/path/to/project/docs/brainstorm/12345-1706000000"}
|
|
41
41
|
```
|
|
42
42
|
|
|
43
43
|
保存响应中的 `screen_dir`。告诉用户打开该 URL。
|
|
44
44
|
|
|
45
|
-
**查找连接信息:** 服务器将其启动 JSON 写入 `$SCREEN_DIR/.server-info`。如果你在后台启动了服务器且没有捕获 stdout,读取该文件以获取 URL 和端口。使用 `--project-dir` 时,检查 `<project
|
|
45
|
+
**查找连接信息:** 服务器将其启动 JSON 写入 `$SCREEN_DIR/.server-info`。如果你在后台启动了服务器且没有捕获 stdout,读取该文件以获取 URL 和端口。使用 `--project-dir` 时,检查 `<project>/docs/brainstorm/` 获取会话目录。
|
|
46
46
|
|
|
47
|
-
**注意:** 传入项目根目录作为 `--project-dir`,这样原型会持久化在
|
|
47
|
+
**注意:** 传入项目根目录作为 `--project-dir`,这样原型会持久化在 `docs/brainstorm/` 中,不会因服务器重启而丢失。不传的话,文件会保存到 `/tmp` 并在清理时被删除。提醒用户将 `docs/` 添加到 `.gitignore`(如果尚未添加)。
|
|
48
48
|
|
|
49
49
|
**按平台启动服务器:**
|
|
50
50
|
|
|
@@ -278,7 +278,7 @@ scripts/start-server.sh \
|
|
|
278
278
|
scripts/stop-server.sh $SCREEN_DIR
|
|
279
279
|
```
|
|
280
280
|
|
|
281
|
-
如果会话使用了 `--project-dir`,原型文件会持久化在
|
|
281
|
+
如果会话使用了 `--project-dir`,原型文件会持久化在 `docs/brainstorm/` 中以供日后参考。只有 `/tmp` 会话会在停止时被删除。
|
|
282
282
|
|
|
283
283
|
## 参考
|
|
284
284
|
|
|
@@ -3,6 +3,10 @@ name: code-review
|
|
|
3
3
|
description: 沿两个轴评审某个固定点(commit、branch、tag 或 merge-base)以来的变更——Standards(代码是否遵循本 repo 文档化的编码规范?)与 Spec(代码是否符合发起 issue/spec 的要求?)。两个评审以并行 sub-agent 运行,结果并排汇报。当用户想评审一个分支、一个 PR、进行中的变更,或要求「review since X」时使用。
|
|
4
4
|
---
|
|
5
5
|
|
|
6
|
+
# Code Review
|
|
7
|
+
|
|
8
|
+
派遣代码审查子代理,在问题扩散之前发现它们。审查者获得的是精心组织的评估汇报。
|
|
9
|
+
|
|
6
10
|
对 `HEAD` 与用户提供的固定点之间的 diff 做双轴评审:
|
|
7
11
|
|
|
8
12
|
- **Standards** — 代码是否符合本 repo 文档化的编码规范?
|
|
@@ -12,11 +16,49 @@ description: 沿两个轴评审某个固定点(commit、branch、tag 或 merge
|
|
|
12
16
|
|
|
13
17
|
issue tracker 应当已经提供给你了——如果 `docs/agents/issue-tracker.md` 缺失,运行 `/setup-simple-skills`。
|
|
14
18
|
|
|
19
|
+
**核心原则:** 早审查,勤审查。
|
|
20
|
+
|
|
21
|
+
## 检查内容
|
|
22
|
+
|
|
23
|
+
包括但不限于:
|
|
24
|
+
|
|
25
|
+
**计划对齐:**
|
|
26
|
+
- 实现是否匹配计划 / 需求?
|
|
27
|
+
- 偏差是有道理的改进,还是有问题的偏离?
|
|
28
|
+
- 计划中的所有功能都到位了吗?
|
|
29
|
+
|
|
30
|
+
**代码质量:**
|
|
31
|
+
- 关注点分离清晰吗?
|
|
32
|
+
- 错误处理到位吗?
|
|
33
|
+
- 该有类型安全的地方有吗?
|
|
34
|
+
- DRY 但没有过早抽象?
|
|
35
|
+
- 边界情况处理了吗?
|
|
36
|
+
|
|
37
|
+
**架构:**
|
|
38
|
+
- 设计决策合理吗?
|
|
39
|
+
- 可扩展性和性能合理吗?
|
|
40
|
+
- 有没有安全隐患?
|
|
41
|
+
- 与周围代码集成是否干净?
|
|
42
|
+
|
|
43
|
+
**测试:**
|
|
44
|
+
- 测试验证的是真实行为,不是 mock?
|
|
45
|
+
- 边界情况覆盖了吗?
|
|
46
|
+
- 该有集成测试的地方有吗?
|
|
47
|
+
- 所有测试都通过吗?
|
|
48
|
+
|
|
49
|
+
**生产就绪:**
|
|
50
|
+
- 如果改了 schema,有迁移策略吗?
|
|
51
|
+
- 考虑了向后兼容吗?
|
|
52
|
+
- 文档完整吗?
|
|
53
|
+
- 没有明显 bug?
|
|
54
|
+
|
|
15
55
|
## 流程
|
|
16
56
|
|
|
17
57
|
### 1. 钉住固定点
|
|
18
58
|
|
|
19
|
-
用户指定的就是固定点——commit SHA、分支名、tag、`main`、`HEAD~5`
|
|
59
|
+
用户指定的就是固定点——commit SHA、分支名、tag、`main`、`HEAD~5` 等等。
|
|
60
|
+
如果没指定,审查范围就是当前完成的任务或进行中的变更。
|
|
61
|
+
如果不存在进行中的任务,就问。
|
|
20
62
|
|
|
21
63
|
把 diff 命令一次性记录下来:`git diff <fixed-point>...HEAD`(三点语法,即与 merge-base 比较)。同时用 `git log <fixed-point>..HEAD --oneline` 记下提交列表。
|
|
22
64
|
|
|
@@ -1,11 +1,6 @@
|
|
|
1
1
|
---
|
|
2
2
|
name: finishing-a-development-branch
|
|
3
3
|
description: 当实现完成、所有测试通过、需要决定如何集成这份工作时使用
|
|
4
|
-
version: "1.0.0"
|
|
5
|
-
license: MIT
|
|
6
|
-
metadata:
|
|
7
|
-
hermes:
|
|
8
|
-
tags: [git, workflow]
|
|
9
4
|
---
|
|
10
5
|
|
|
11
6
|
# 收尾一个开发分支
|
|
@@ -155,7 +150,7 @@ git branch -D <feature-branch>
|
|
|
155
150
|
|
|
156
151
|
**如果 `GIT_DIR == GIT_COMMON`:** 普通仓库,无 worktree 可清理。结束。
|
|
157
152
|
|
|
158
|
-
**如果 `WORKTREE_PATH` 在 `.worktrees/` 或 `worktrees/` 之下:** 这是
|
|
153
|
+
**如果 `WORKTREE_PATH` 在 `.worktrees/` 或 `worktrees/` 之下:** 这是 AI Agent 创建的 worktree——我们负责清理:
|
|
159
154
|
|
|
160
155
|
```bash
|
|
161
156
|
git worktree remove "$WORKTREE_PATH"
|