@seanyao/roll 3.620.1 → 3.624.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.
Files changed (67) hide show
  1. package/CHANGELOG.md +46 -0
  2. package/dist/roll.mjs +4563 -3369
  3. package/package.json +1 -1
  4. package/lib/__pycache__/changelog_audit.cpython-314.pyc +0 -0
  5. package/lib/__pycache__/github_sync.cpython-314.pyc +0 -0
  6. package/lib/__pycache__/loop-fmt.cpython-314.pyc +0 -0
  7. package/lib/__pycache__/loop_result_eval.cpython-314.pyc +0 -0
  8. package/lib/__pycache__/loop_unstick.cpython-314.pyc +0 -0
  9. package/lib/__pycache__/model_prices.cpython-314.pyc +0 -0
  10. package/lib/__pycache__/prices_fetcher.cpython-314.pyc +0 -0
  11. package/lib/__pycache__/roll-home.cpython-314.pyc +0 -0
  12. package/lib/__pycache__/roll-loop-status.cpython-314.pyc +0 -0
  13. package/lib/__pycache__/roll_git.cpython-314.pyc +0 -0
  14. package/lib/__pycache__/roll_render.cpython-314.pyc +0 -0
  15. package/lib/__pycache__/slides-render.cpython-314.pyc +0 -0
  16. package/lib/agent_usage/__pycache__/__init__.cpython-314.pyc +0 -0
  17. package/lib/agent_usage/__pycache__/gemini.cpython-314.pyc +0 -0
  18. package/lib/agent_usage/__pycache__/kimi.cpython-314.pyc +0 -0
  19. package/lib/agent_usage/__pycache__/openai.cpython-314.pyc +0 -0
  20. package/lib/agent_usage/__pycache__/pi.cpython-314.pyc +0 -0
  21. package/lib/agent_usage/__pycache__/pi_emit.cpython-314.pyc +0 -0
  22. package/lib/agent_usage/__pycache__/qwen.cpython-314.pyc +0 -0
  23. package/skills/README.md +0 -64
  24. package/skills/docs/skill-authoring.md +0 -74
  25. package/skills/reports/skill-audit-summary.md +0 -53
  26. package/skills/roll-.changelog/SKILL.md +0 -47
  27. package/skills/roll-.changelog/references/full-contract.md +0 -462
  28. package/skills/roll-.clarify/SKILL.md +0 -64
  29. package/skills/roll-.dream/SKILL.md +0 -47
  30. package/skills/roll-.dream/references/full-contract.md +0 -365
  31. package/skills/roll-.echo/SKILL.md +0 -118
  32. package/skills/roll-.qa/SKILL.md +0 -47
  33. package/skills/roll-.qa/references/full-contract.md +0 -256
  34. package/skills/roll-.review/SKILL.md +0 -148
  35. package/skills/roll-build/SKILL.md +0 -49
  36. package/skills/roll-build/references/full-contract.md +0 -968
  37. package/skills/roll-debug/SKILL.md +0 -48
  38. package/skills/roll-debug/assets/injectable-bb.js +0 -263
  39. package/skills/roll-debug/references/full-contract.md +0 -607
  40. package/skills/roll-design/SKILL.md +0 -52
  41. package/skills/roll-design/references/engineering-checklist.md +0 -298
  42. package/skills/roll-design/references/full-contract.md +0 -940
  43. package/skills/roll-doc-audit/SKILL.md +0 -51
  44. package/skills/roll-doc-audit/references/full-contract.md +0 -796
  45. package/skills/roll-doctor/SKILL.md +0 -211
  46. package/skills/roll-fix/SKILL.md +0 -49
  47. package/skills/roll-fix/references/full-contract.md +0 -672
  48. package/skills/roll-idea/SKILL.md +0 -62
  49. package/skills/roll-loop/SKILL.md +0 -50
  50. package/skills/roll-loop/references/full-contract.md +0 -534
  51. package/skills/roll-notes/SKILL.md +0 -107
  52. package/skills/roll-onboard/SKILL.md +0 -238
  53. package/skills/roll-peer/SKILL.md +0 -47
  54. package/skills/roll-peer/references/full-contract.md +0 -323
  55. package/skills/roll-propose/SKILL.md +0 -155
  56. package/skills/roll-review-pr/SKILL.md +0 -62
  57. package/skills/roll-spar/SKILL.md +0 -47
  58. package/skills/roll-spar/references/full-contract.md +0 -288
  59. package/skills/route-cases/skills.json +0 -216
  60. package/skills/scripts/audit-skills.mjs +0 -272
  61. package/skills/scripts/test-audit-skills.mjs +0 -39
  62. package/skills/tests/fixtures/skill-audit/block-skill/SKILL.md +0 -12
  63. package/skills/tests/fixtures/skill-audit/minimal-skill/SKILL.md +0 -8
  64. package/skills/tests/fixtures/skill-audit/quoted-skill/SKILL.md +0 -10
  65. package/skills/tests/fixtures/skill-audit/route-cases.json +0 -21
  66. package/skills/tests/fixtures/skill-audit/spoke-skill/SKILL.md +0 -12
  67. package/skills/tests/fixtures/skill-audit/spoke-skill/references/runbook.md +0 -3
@@ -1,462 +0,0 @@
1
- # Full Contract Reference
2
-
3
- This file preserves the detailed contract extracted from SKILL.md. Read it when the hub points here for exact workflow steps, templates, rubrics, or recovery branches.
4
-
5
- ---
6
-
7
- # WK Generate Changelog
8
-
9
- After successful Build & Deploy, extracts completed Stories from .roll/backlog.md to generate a user-friendly `CHANGELOG.md`.
10
-
11
- ## Evidence marker(US-ATTEST-008 约定)
12
-
13
- 写入 CHANGELOG 的每个条目,若对应 story 存在验收报告
14
- (`.roll/features/<epic>/<id>/latest/<id>-report.html`),在该 bullet 行的下一行追加
15
- 不可见注释 marker(GitHub Release body 不渲染,grep 可追溯):
16
-
17
- ```markdown
18
- - 修复导出报表时间区间偏移(FIX-200)
19
- <!-- evidence: .roll/features/<epic>/FIX-200/latest/FIX-200-report.html -->
20
- ```
21
-
22
- 报告不存在则不加(deletion-not-placeholder,与报告渲染同一契约)。
23
-
24
- ## When Triggered
25
-
26
- - **Auto-triggered**: After successful deploy of `$roll-build` or `$roll-fix`
27
- - **Manual trigger**: When user requests "update changelog" / "更新 changelog"
28
-
29
- ## When Not to Use
30
-
31
- - Generating commit messages or PR descriptions — this skill only runs post-deploy
32
- - Recording dev diary / moments (use `$roll-notes`)
33
- - Bumping package version (use the project's release script — Roll's lives in `roll-meta/ops/release.sh`)
34
-
35
- ## Workflow
36
-
37
- ### 1. Check CHANGELOG.md
38
-
39
- ```
40
- CHANGELOG.md exists?
41
- ├── Yes → Append mode (add current deploy's changes)
42
- └── No → Create mode (backfill all historical completed Stories)
43
- ```
44
-
45
- ### 2. Read .roll/backlog.md
46
-
47
- ```
48
- Append mode:
49
- Extract only the Story/Fix just deployed in this session.
50
-
51
- Create mode:
52
- Extract ALL Stories and Fixes with status ✅ Done.
53
- Read each Story's .roll/features/<feature>.md for Completed date.
54
- Group entries by completion date, reverse chronological order.
55
- ```
56
-
57
- ### 3. Filter for External Content
58
-
59
- CHANGELOG 是给**使用者**看的,不是给维护者看的。一句话讲清"用户能做什么 / 不再被什么坑",能不写就不写。
60
-
61
- **BACKLOG 描述写好了,CHANGELOG 就是复制 + 过滤,不是重写。**
62
- 如果 BACKLOG 描述已经是人话、一句话、说用户价值,直接用它(去掉 `depends-on:` 等功能性标签)。
63
- 只有 BACKLOG 描述包含实现细节或技术黑话时,才需要改写。
64
-
65
- **FIX 条目的 filter 规则**:BACKLOG 的 FIX 描述通常是 `<用户症状> — <修复手段>` 结构。
66
- CHANGELOG 只取破折号前的用户症状,丢弃破折号后的修复手段。
67
- 例:`roll update 后 loop 状态误报 off — reload 改用 bootout+bootstrap` → CHANGELOG 只写 `roll update 后 loop 状态不再误报 off`。
68
-
69
- **完全跳过(不写入 CHANGELOG):**
70
- - 测试基建(teardown 清理、test isolation、bats helper、CI 时序)
71
- - prompt / SKILL.md 内部契约(schema 锁定、enum 强制、contract test)
72
- - 内部重构(提取函数、变量改名、目录调整)
73
- - 只有开发者会遇到的 bug(发版脚本自身逻辑、TCR 节奏调整)
74
- - 任何"用户体验不变"的改动
75
-
76
- 判断准则:**如果用户读了这条记录,他不会改变使用方式,就别写。**
77
-
78
- **保留:**
79
- - 用户能直接调用的新功能 / 新命令
80
- - 用户实际遇到过的 bug 修复
81
- - 看得见的体验变化(布局、文案、速度、可见性)
82
- - 影响安装、升级、配置的改动
83
-
84
- **写法约束(BACKLOG 描述不符合时才介入改写):**
85
-
86
- 1. **一行**。超了就是太啰嗦。
87
- 2. **不写实现细节**:禁止文件路径、函数名、字段列表、命令参数、配置键名。
88
- 3. **不写数字细节**:"3 个服务"、"60+ ghost" 这种内部状态不写。
89
- 4. **说人话**:避免 "幂等"、"trap"、"epoch" 等技术黑话;说"做两次效果一样"、"异常退出也会清理"、"启动时间"。
90
- 5. **句式**:`功能名 — 用户能做什么 / 解决了什么麻烦`。
91
-
92
- **语言:中文。**
93
-
94
- 具体对比(都是真实的 roll 改动):
95
-
96
- ❌ 全是实现细节:
97
- ```
98
- - **Added**: `roll loop runs` 每次 loop 运行的快速可见性 — 单次 loop 结束追加一行 JSON 到 `~/.shared/roll/loop/runs.jsonl`(含 ts/project/run_id/status/built/skipped/alerts/tcr_count/duration_sec),新命令 `roll loop runs [N] [--all]` 倒序显示最近 N 次(默认 10)。
99
- ```
100
-
101
- ✅ 讲价值:
102
- ```
103
- - **Added**: `roll loop runs` — 随时查看 loop 最近几次都跑了什么
104
- ```
105
-
106
- ❌ 内部信息扎堆:
107
- ```
108
- - **Fixed**: 集成测试 launchd ghost 泄漏 — `integration_teardown` 在删除 TEST_TMP 之前,先 `launchctl bootout` 该沙箱里被 `roll loop on` 注册到 user gui domain 的所有 `com.roll.*` 服务。
109
- ```
110
-
111
- ✅ **直接跳过**:测试基建修复,用户感知不到。
112
-
113
- ❌ 参数列表+黑话:
114
- ```
115
- - **Added**: Loop 并发安全 — runner script 启动时写入 per-project LOCK 文件并检测重入;活跃 PID 已存在则跳过本次,残留死 LOCK 自动清理;正常/异常退出均通过 trap 清掉 LOCK。
116
- ```
117
-
118
- ✅ 用户视角:
119
- ```
120
- - **Fixed**: 多个 loop 实例不会再互相打架(重复触发自动跳过)
121
- ```
122
-
123
- ❌ 说机制不说现象(Fix 类最常犯):
124
- ```
125
- - **Fixed**: `roll loop runs` 过滤条件从完整路径改为 slug,历史记录不再因路径不匹配而消失
126
- - **Fixed**: `roll-loop` skill 写入 `runs.jsonl` 时 project slug 计算方式明确,避免写成 bare basename
127
- ```
128
-
129
- ✅ 直接说用户看到了什么:
130
- ```
131
- - **Fixed**: `roll loop runs` 不再报"当前项目尚无运行记录",历史记录正常显示
132
- ```
133
-
134
- Fix 类句式参考:`<命令/功能> 不再 <之前的坏现象>`,或 `<命令/功能> 现在 <正常表现>`。内部有几个 bug 导致这一个现象,合并成一条。
135
-
136
- **归因标签**:每条 bullet 末尾加来源标签——`[loop]`(对应 `US-AUTO-*` / `FIX-*` / `US-CL-*` 等由 Loop 自动执行的故事)、`[dream]`(对应 `REFACTOR-*`,Dream 夜间扫描推入 Backlog)、无标签(人工提交或来源不明)。同一来源的多条不必重复标。
137
-
138
- ### 4. Section Header — Always `## Unreleased`
139
-
140
- **⚠️ do NOT guess version numbers.** Only the release script (maintainer-private
141
- in `roll-meta/ops/release.sh`) assigns concrete versions, and it only does so at
142
- the moment of a real release. Until then, every new bullet goes under
143
- `## Unreleased` at the top of CHANGELOG.md.
144
-
145
- ```
146
- ## Unreleased
147
-
148
- ### 新功能
149
- - ...new entries here...
150
-
151
- ### 稳定性
152
- - ...
153
- ```
154
-
155
- 新条目按**感知分组**(`### 标题`)归类,不写 `**Added**` / `**Fixed**` 前缀——
156
- 分组规则见 **Section 7**(版本段落 = GitHub Release 正文,分组结构是 changelog 自己的格式)。
157
-
158
- When the release script runs, it renames `## Unreleased` to `## v{N}` (where N
159
- is computed from git tags) — that's the single moment a version label gets
160
- assigned.
161
-
162
- Do NOT read `package.json` version, do NOT call `git describe`, do NOT invent
163
- version numbers like `v2026.511.8`. Just write to `## Unreleased`.
164
-
165
- ### 5.3 Style Anchors — In-Context Few-Shot
166
-
167
- Before drafting bullets, pull the most recent 3 published versions' bullets as
168
- in-context examples so the agent doesn't write from a blank slate (the blank
169
- slate is where the technical-jargon habit comes from — the agent is fresh
170
- from writing function names and just copies them over).
171
-
172
- ```bash
173
- _changelog_style_anchors CHANGELOG.md
174
- ```
175
-
176
- Output is the concatenated bullet lines from the last 3 `## v...` sections,
177
- capped at 1500 characters. Use them as a style reference when drafting — pay
178
- attention to length, voice ("不再被…坑" / "现在 …"), and absence of internal
179
- names.
180
-
181
- ### 5.4 Mechanical Lint — Hard Gate
182
-
183
- After drafting bullets, run each through the mechanical linter. Any non-empty
184
- output means the bullet violates at least one blacklist rule and must be
185
- rewritten.
186
-
187
- ```bash
188
- for bullet in "${draft_bullets[@]}"; do
189
- violations=$(_changelog_lint_bullet "$bullet")
190
- [ -n "$violations" ] && needs_rewrite+=("$bullet :: $violations")
191
- done
192
- ```
193
-
194
- Violation tags emitted by `_changelog_lint_bullet`:
195
-
196
- | Tag | Trigger | Why it's noise to users |
197
- |---|---|---|
198
- | `backtick-identifier` | `…` contains `_` or `()` | Internal symbol names mean nothing to users |
199
- | `file-suffix` | `.md/.sh/.yml/.ts/.bats` outside backticks | File paths are maintainer concern |
200
- | `internal-word` | Phase N / Step N / Helper / Schema / Fixture / Refactor | Workflow/design vocabulary, not user-facing |
201
- | `over-length` | > 50 visible chars | Too long = probably explaining implementation |
202
- | `path-fragment` | `docs/` / `bin/` / `tests/` / `scripts/` outside backticks | Source-tree layout is maintainer concern |
203
-
204
- **Rewrite loop (max 2 rounds)**:
205
- 1. Show the agent the violation list + original bullet → request rewrite
206
- 2. Re-lint the rewrite
207
- 3. If still violating after 2 rewrites → **keep the bullet but prefix `⚠️ `** so
208
- the human reviewer can spot it, AND append a line to
209
- `~/.shared/roll/loop/ALERT.md` describing what couldn't be fixed.
210
- Never block the whole release on style — let the human take the wheel.
211
-
212
- ### 5.5 Self-Audit — Stage Gate
213
-
214
- The mechanical linter in Step 5.4 catches **blacklist** patterns; the audit
215
- gate in this step is a **whitelist** of 5 boolean checks that the bullet must
216
- satisfy before it can be staged. Stricter (30-char cap vs 50) and shape-aware
217
- (requires the user-facing `—` or `不再`/`现在` sentence pattern).
218
-
219
- ```bash
220
- accepted=$(_changelog_audit_gate "$draft1" "$rewrite1" "$rewrite2")
221
- # Exit 0: stdout = first clean candidate
222
- # Exit 1: stdout = ⚠️-prefixed last candidate; ALERT was written
223
- ```
224
-
225
- 5 boolean checks evaluated by `_changelog_audit_bullet`:
226
-
227
- | Tag | Trigger |
228
- |---|---|
229
- | `over-length-30` | visible chars > 30 (bypassed if bullet has a backticked user command) |
230
- | `internal-id` | backtick content contains `_` or `()` |
231
- | `path-or-suffix` | `.md/.sh/.yml/.ts/.bats` or `docs/bin/tests/scripts/` outside backticks |
232
- | `phase-step` | `Phase N` or `Step N` |
233
- | `bad-shape` | none of `—`, `不再`, `现在` present |
234
-
235
- **3-round retry envelope**:
236
- 1. Round 1 = original draft; if pass → stage immediately
237
- 2. Round 2 = rewrite based on violations from round 1
238
- 3. Round 3 = second rewrite if round 2 also failed
239
- 4. All 3 failed → keep last candidate prefixed with `⚠️ `, append ALERT to
240
- `~/.shared/roll/loop/ALERT.md`. **Never block the stage** — let the human
241
- reviewer take the wheel. The loop must keep moving.
242
-
243
- **Audit log**: every round (pass or fail) appends one JSONL line to
244
- `~/.shared/roll/loop/changelog-audit.jsonl`:
245
-
246
- ```json
247
- {"ts":"2026-05-13T13:50:00Z","verdict":"fail","round":1,"bullet":"...","reasons":["over-length-30","bad-shape"]}
248
- ```
249
-
250
- Useful when reviewing whether the agent actually iterated or just rubber-stamped
251
- its own first draft. Set `ROLL_CHANGELOG_AUDIT_LOG` to redirect (tests only).
252
-
253
- ### 5. Generate CHANGELOG.md
254
-
255
- 条目结构按 **Section 7** 的感知分组(`### 新功能` / `### 自动化流水线` / …),不用 `Added`/`Fixed`。
256
-
257
- **Create mode** (first time, no CHANGELOG.md yet):
258
- ```markdown
259
- # Changelog
260
-
261
- ## Unreleased
262
-
263
- ### 新功能
264
- - ...current deploy's entries...
265
-
266
- ## 2026.05.10
267
- - ...historical entries from completed Stories before today...
268
- ```
269
-
270
- **Append mode** (most common — CHANGELOG.md exists):
271
-
272
- 1. Find `## Unreleased` heading at the top of CHANGELOG.md.
273
- 2. If it exists → append each new bullet under the **right `### 感知分组`**(已有该组就追加,没有就按 Section 7 的分组顺序插入),do NOT create a new `##` section.
274
- 3. If it doesn't exist → insert a fresh `## Unreleased` at the very top (right after the `# Changelog` title) with the grouped bullets.
275
-
276
- ```markdown
277
- # Changelog
278
-
279
- ## Unreleased
280
-
281
- ### 自动化流水线
282
- - ...just-deployed entry appended here... `[loop]`
283
-
284
- ### 稳定性
285
- - ...another just-deployed entry...
286
-
287
- ## v2026.05.07 ← previous releases left untouched
288
- - ...
289
- ```
290
-
291
- **Ordering**: Unreleased always at top. Below it, released versions in reverse chronological order.
292
-
293
- ### 6. Stage Update
294
-
295
- **Normal path (called from `$roll-build` or `$roll-fix`)**: stage only — the
296
- caller's completion commit will pick up CHANGELOG.md.
297
-
298
- ```bash
299
- git add CHANGELOG.md
300
- ```
301
-
302
- **Standalone / manual path** (called outside a roll-build session): stage and commit.
303
-
304
- ```bash
305
- git add CHANGELOG.md
306
- git commit -m "chore: sync changelog"
307
- git push
308
- ```
309
-
310
- ## Integration
311
-
312
- After successful deploy in `$roll-build` / `$roll-fix`:
313
-
314
- ```markdown
315
- **Post-Deploy:**
316
- - `$roll-.changelog` - Sync external changelog
317
- ```
318
-
319
- ---
320
-
321
- ## 7. 版本段落 = GitHub Release 正文(分组 + 措辞)
322
-
323
- Roll 里**没有独立的 "release notes"**:release notes 就是 changelog——同一份内容、
324
- 同一个文件(`CHANGELOG.md`)。凡是有人说 "release notes",在 Roll 里就是指 changelog。
325
- 发版脚本(maintainer-private,`roll-meta/ops/release.sh`)把 `## Unreleased` 改名成
326
- `## v{N}`,把该版段落**逐字提取**作为 GitHub Release 正文——不另写格式、不另存文件
327
- (没有 `RELEASE_NOTES.md`)、不在发版关键路径上现场生成。
328
-
329
- 所以**版本段落本身就要长成 Release 正文该有的样子**。下面的分组 / 合并 / 措辞 / hard
330
- rules 不是"另一种格式",就是 changelog 段落的写法——把它写好 = 同时写好了 changelog
331
- 和"发布说明"。
332
-
333
- ### 7.1 分组(取代 Added/Fixed)
334
-
335
- 每条 bullet 按**用户感知**归入下列分组,分组用 `###` 标题,每组最多 5 条,超出的合并:
336
-
337
- | 分组(`### 标题`) | 归入条件 |
338
- |---|---|
339
- | 新功能 | 全新命令或用户可感知的新能力 |
340
- | 自动化流水线 | PR 自动化、Auto-merge、CI 触发、分支管理 |
341
- | 可见性 | Dashboard、弹窗、实时输出、状态显示 |
342
- | 稳定性 | 崩溃修复、并发问题、状态误报 |
343
- | 工程和测试 | CI 速度、测试并行、文档工作流 |
344
-
345
- 分组顺序:**影响日常使用的放前面**,纯工程改进放后面。某组少于 2 条可并入相邻组,不强留空组。
346
- **不写 `**Added**` / `**Fixed**` 前缀**——分组标题已经承担语义分类。
347
-
348
- ### 7.2 合并相似条目(dedup)
349
-
350
- 同一功能点的多个 bullet(如"开 PR"和"Auto-merge"都在描述同一条流水线)合并成一条,
351
- 一句话说清整体效果。判断标准:**用户感知到的是同一件事,就合并。**
352
-
353
- ### 7.3 措辞:第二人称 + 有温度
354
-
355
- - 用**第二人称**("你不用再盯着"、"你可以随时查看")
356
- - **主语是用户的感受**,不是系统行为("不再误报" > "修复了误报逻辑")
357
- - **故意模糊实现细节**:不写函数名、文件名、Phase 编号(Section 3 的过滤规则同样适用)
358
- - **有温度**:可以用"真的很急"、"不再越来越乱"这种口语表达
359
- - 每条一行,简洁优先
360
-
361
- ### 7.4 Hard rules
362
-
363
- - **不杜撰**:每条都能追溯到一个真实的已完成 Story / FIX / 合并 PR;CHANGELOG 里没有的改动不写。
364
- - **不猜版本号**:只写 `## Unreleased`(见 Section 4),版本号由发版脚本赋。
365
- - **不 bump / tag / 发布**:那是人执行的发版步骤,本 skill 只写 changelog。
366
- - **可审阅**:CHANGELOG 是提交进仓库的文件,owner 随时(尤其发版前)可直接审阅 / 编辑——
367
- 无需为审阅单独生成什么。
368
-
369
- ### 7.5 示例
370
-
371
- ```markdown
372
- ## Unreleased
373
-
374
- ### 自动化流水线
375
- - 你不用再盯着 PR,开完自动合并 `[loop]`
376
-
377
- ### 稳定性
378
- - 多个 loop 不再互相打架 `[loop]`
379
-
380
- ### 新功能
381
- - `roll loop runs` 随时回看最近几次跑了啥 `[loop]`
382
- ```
383
-
384
- ## 8. features.md 重写模式(产品 SOT)
385
-
386
- US-DOC-008 — 发版脚本(maintainer-private,位于 `roll-meta/ops/release.sh`)
387
- 在 changelog 写盘后会再调一次本 skill,请求"整体重写
388
- `.roll/features.md`"。这次调用的语义和上面完全不同:**不是基于本版
389
- Story 增量**,而是基于**项目整体当前状态**。
390
-
391
- ### 8.1 何时触发
392
-
393
- 发版脚本完成 changelog 写盘后,喂一段以
394
- `## 当前任务:重写 .roll/features.md(Section 8)` 开头的 prompt。
395
-
396
- ### 8.2 输入
397
-
398
- prompt 会包含:
399
- - 当前 `.roll/features.md`(可能为空,可能上一版本的)
400
- - 当前 `.roll/backlog.md` 全文(Epic / Feature 分组结构)
401
- - 当前 `.roll/features/` 目录清单
402
- - 当前版本号
403
-
404
- ### 8.3 输出契约
405
-
406
- 把整个 `.roll/features.md` 写出来。结构固定为三段:
407
-
408
- ```
409
- # Roll — Features
410
-
411
- > 说明段(保留原文)
412
-
413
- ---
414
-
415
- ## ✨ Core Highlights
416
-
417
- - **<Feature 名>** — 1 句话产品级描述
418
- - **<Feature 名>** — 1 句话产品级描述
419
- - ...(3-5 条)
420
-
421
- ---
422
-
423
- ## Features by Epic
424
-
425
- ### <Epic 名>
426
- - [<Feature 名>](.roll/features/<file>.md) — 1 句话描述
427
- - <Feature 名> — 1 句话描述(缺 deep doc 时不加链接)
428
-
429
- ### <Epic 名>
430
- - ...
431
-
432
- ---
433
-
434
- ## 维护说明(保留原文)
435
- ```
436
-
437
- ### 8.4 规则
438
-
439
- - **Catalog 必须列出 BACKLOG 中所有 `### Feature:` 出现的 Feature 名**
440
- (即使没有 deep doc 也要列)
441
- - Feature 名跟 `.roll/features/<file>.md` 文件名一致时,加链接到该 md
442
- - 没有对应 deep doc 的 Feature,**只写 plain text 不加链接**
443
- - **Planning distinction(US-DOC-011)**:
444
- - 该 Feature 下**所有** Story 均为 `📋 Todo` → 在描述末尾追加 `*(规划中)*`
445
- - 只要有 **≥1 个** `✅ Done` Story → 正常展示,**不加**任何标记
446
- - 一眼可见:规划中的 Feature 在每个 Epic 分组的末尾列出
447
- - **FIX-051 兜底**:发版脚本在 AI 重写后会跑机械校验
448
- `_enforce_planning_markers`,即使本规则被 AI 漏掉也会自动补 `*(规划中)*`;
449
- 规则的权威实现是发版脚本里的纯 shell 函数,prompt 这条只是软提示
450
- - 描述写 1 句话 **产品视角**:用户能用它做什么,避免实现细节
451
- - **语言:单一中文**。Feature 名(如 `roll-loop` / `Cross-Agent Peer Review`)和命令、环境变量等术语保留英文原样;描述句一律中文。**不要**在条目下追加英文翻译行(早期 v517.x 双语混排版式已废弃,理由:扫读困难、维护翻倍、与 `guide/en|zh/` 平行目录约定不一致;英文受众走 site 端 i18n)
452
- - 分组用 BACKLOG 的 Epic 名,原序,不重排
453
- - Core Highlights 从所有 Features 里挑 3-5 个最能代表产品定位的,
454
- 描述用 bold 标 Feature 名后接说明;不照搬 catalog 文案
455
- - **不**写 "Recent Activity" 类区块——features.md 是 SOT,全量当下状态
456
- - **不**写版本号、不引用 changelog 条目
457
- - 说明段(顶部 quote)和维护说明(尾部)原文保留,不要重新生成措辞
458
-
459
- ### 8.5 失败安全
460
-
461
- 如果 prompt 信息不足(BACKLOG 解析失败等),**不要部分写入** —— 输出原
462
- 文件内容即可。发版脚本会捕获 stdout 后比较:内容未变就不 stage。
@@ -1,64 +0,0 @@
1
- ---
2
- hidden: true
3
- name: roll-.clarify
4
- license: MIT
5
- description: "Load when roll-build Fly mode input is vague or underspecified and the agent must ask targeted scope questions before planning or coding."
6
- ---
7
- # roll-.clarify
8
-
9
- ## Gotchas
10
-
11
- - This is for scope questions before planning; use roll-.echo when the immediate need is only intent restatement.
12
- - Stop after asking questions; do not silently proceed into design or code while uncertainty remains.
13
-
14
- > Understand first, build second.
15
-
16
- ## Trigger
17
-
18
- Auto-invoked by `roll-build` (Fly mode) when the user input is:
19
- - A single vague sentence
20
- - Missing clear boundaries (what/who/when/where)
21
- - Contains ambiguous terms like "优化一下", "改一下", "加个东西"
22
- - Could be interpreted in multiple ways
23
-
24
- ## When Not to Use
25
-
26
- - Intent is already clear and actionable
27
- - User gives a specific command with a skill trigger (e.g. `$roll-idea ...`)
28
- - User is answering a clarification question you just asked
29
- - The task is simple enough that misinterpretation risk is negligible
30
- - User messy thoughts need restatement rather than questioning (use `$roll-.echo`)
31
-
32
- ## Behavior
33
-
34
- 1. **Summarize** the user's intent in 1–2 sentences.
35
- 2. **Assess complexity** (small / medium / large).
36
- 3. **Ask 3–5 targeted questions** to fill the biggest gaps. Focus on:
37
- - Scope: what exactly is in / out?
38
- - User: who is the actor?
39
- - Data: what changes or persists?
40
- - Edge cases: what could go wrong?
41
- - Verification: how will we know it's done?
42
-
43
- ## Output format
44
-
45
- ```
46
- 🎯 Clarified Intent: {1-2 sentences}
47
-
48
- 📏 Complexity: {small|medium|large}
49
-
50
- ❓ Open Questions:
51
- 1. {question 1}
52
- 2. {question 2}
53
- 3. {question 3}
54
- ...
55
-
56
- ➡️ Please answer the questions above and I'll proceed to planning / building.
57
- ```
58
-
59
- ## Rules
60
-
61
- - Do **not** start coding or planning until the user replies.
62
- - Questions must be concrete and answerable in one sentence each.
63
- - If the input is already clear enough, silently return and let `roll-build` continue.
64
- - Never announce "I'm using roll-.clarify."
@@ -1,47 +0,0 @@
1
- ---
2
- hidden: true
3
- name: roll-.dream
4
- license: MIT
5
- allowed-tools: "Read, Glob, Grep, Bash(git:*, curl:*, claude:*), Write, Edit"
6
- description: "Load when a scheduled or manual nightly architecture health scan should inspect code structure, dead code, doc staleness, and refactor candidates."
7
- ---
8
- # Roll Dream
9
-
10
- This hub keeps the routing boundary, hard gates, and execution skeleton in the initial context. Load the heavier runbook only when the task actually needs the detailed contract.
11
-
12
- ## Load
13
-
14
- Load when a scheduled or manual nightly architecture health scan should inspect code structure, dead code, doc staleness, and refactor candidates.
15
-
16
- ## When Not to Use
17
-
18
- - Runtime patrols; load roll-sentinel.
19
- - Local web debugging; load roll-debug.
20
-
21
- ## Read On Demand
22
-
23
- - Read [the full contract](references/full-contract.md) before executing the workflow end to end, recovering from failures, or checking exact output templates.
24
- - Keep this hub in context for trigger boundaries and hard gates.
25
-
26
- ## Workflow Skeleton
27
-
28
- 1. Scan structure, dead code, drift, and docs.
29
- 2. Classify findings as refactor/doc candidates.
30
- 3. Write daily dream log and backlog candidates.
31
- 4. Keep recommendations human-reviewed.
32
-
33
- ## Hard Gates
34
-
35
- - Do not auto-activate scored findings.
36
- - Fail loud if the dream skill or project context is missing.
37
-
38
- ## Gotchas
39
-
40
- - Dream reviews code and architecture health, not live production behavior; use roll-sentinel for runtime patrols.
41
- - Findings become human-reviewed backlog candidates; do not auto-activate refactors from scoring signals.
42
-
43
- ## Maintenance
44
-
45
- - Description changes require updates in `route-cases/skills.json`.
46
- - New observed failures should add a gotcha and the matching positive or negative route case.
47
- - Heavy examples, templates, recovery paths, and deterministic snippets belong in `references/`, `assets/`, or `scripts/`, not in this hub.