@seanyao/roll 0.5.0 → 2.602.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 (181) hide show
  1. package/CHANGELOG.md +717 -0
  2. package/LICENSE +21 -0
  3. package/README.md +65 -165
  4. package/bin/dream-test-quality-scan +110 -0
  5. package/bin/roll +14897 -815
  6. package/conventions/config.yaml +17 -1
  7. package/conventions/global/AGENTS.md +146 -100
  8. package/conventions/global/CLAUDE.md +1 -21
  9. package/conventions/global/GEMINI.md +8 -22
  10. package/conventions/global/project_rules.md +9 -0
  11. package/conventions/templates/backend-service/AGENTS.md +30 -81
  12. package/conventions/templates/backend-service/GEMINI.md +3 -3
  13. package/conventions/templates/backend-service/project_rules.md +16 -0
  14. package/conventions/templates/cli/AGENTS.md +31 -58
  15. package/conventions/templates/cli/CLAUDE.md +3 -5
  16. package/conventions/templates/cli/GEMINI.md +3 -3
  17. package/conventions/templates/cli/project_rules.md +16 -0
  18. package/conventions/templates/frontend-only/AGENTS.md +29 -64
  19. package/conventions/templates/frontend-only/GEMINI.md +3 -3
  20. package/conventions/templates/frontend-only/project_rules.md +14 -0
  21. package/conventions/templates/fullstack/AGENTS.md +31 -79
  22. package/conventions/templates/fullstack/CLAUDE.md +1 -1
  23. package/conventions/templates/fullstack/GEMINI.md +3 -3
  24. package/conventions/templates/fullstack/project_rules.md +15 -0
  25. package/lib/README.md +42 -0
  26. package/lib/__pycache__/github_sync.cpython-314.pyc +0 -0
  27. package/lib/__pycache__/loop-fmt.cpython-314.pyc +0 -0
  28. package/lib/__pycache__/loop_result_eval.cpython-314.pyc +0 -0
  29. package/lib/__pycache__/loop_unstick.cpython-314.pyc +0 -0
  30. package/lib/__pycache__/model_prices.cpython-314.pyc +0 -0
  31. package/lib/__pycache__/prices_fetcher.cpython-314.pyc +0 -0
  32. package/lib/__pycache__/roll-home.cpython-314.pyc +0 -0
  33. package/lib/__pycache__/roll-loop-status.cpython-314.pyc +0 -0
  34. package/lib/__pycache__/roll_git.cpython-314.pyc +0 -0
  35. package/lib/__pycache__/roll_render.cpython-314.pyc +0 -0
  36. package/lib/__pycache__/slides-render.cpython-314.pyc +0 -0
  37. package/lib/agent_usage/README.md +49 -0
  38. package/lib/agent_usage/__init__.py +108 -0
  39. package/lib/agent_usage/__pycache__/__init__.cpython-314.pyc +0 -0
  40. package/lib/agent_usage/__pycache__/gemini.cpython-314.pyc +0 -0
  41. package/lib/agent_usage/__pycache__/kimi.cpython-314.pyc +0 -0
  42. package/lib/agent_usage/__pycache__/openai.cpython-314.pyc +0 -0
  43. package/lib/agent_usage/__pycache__/pi.cpython-314.pyc +0 -0
  44. package/lib/agent_usage/__pycache__/pi_emit.cpython-314.pyc +0 -0
  45. package/lib/agent_usage/__pycache__/qwen.cpython-314.pyc +0 -0
  46. package/lib/agent_usage/gemini.py +127 -0
  47. package/lib/agent_usage/kimi.py +278 -0
  48. package/lib/agent_usage/kimi_emit.py +123 -0
  49. package/lib/agent_usage/openai.py +126 -0
  50. package/lib/agent_usage/pi.py +200 -0
  51. package/lib/agent_usage/pi_emit.py +135 -0
  52. package/lib/agent_usage/qwen.py +128 -0
  53. package/lib/backfill-pi-usage.py +243 -0
  54. package/lib/changelog_audit.py +155 -0
  55. package/lib/changelog_generate.py +263 -0
  56. package/lib/context_feed_budget.sh +194 -0
  57. package/lib/github_sync.py +876 -0
  58. package/lib/i18n/README.md +54 -0
  59. package/lib/i18n/agent.sh +75 -0
  60. package/lib/i18n/alert.sh +20 -0
  61. package/lib/i18n/backlog.sh +96 -0
  62. package/lib/i18n/brief.sh +5 -0
  63. package/lib/i18n/changelog.sh +5 -0
  64. package/lib/i18n/ci.sh +15 -0
  65. package/lib/i18n/debug.sh +0 -0
  66. package/lib/i18n/doctor.sh +44 -0
  67. package/lib/i18n/dream.sh +0 -0
  68. package/lib/i18n/init.sh +91 -0
  69. package/lib/i18n/lang.sh +10 -0
  70. package/lib/i18n/loop.sh +140 -0
  71. package/lib/i18n/migrate.sh +74 -0
  72. package/lib/i18n/offboard.sh +31 -0
  73. package/lib/i18n/onboard.sh +0 -0
  74. package/lib/i18n/peer.sh +41 -0
  75. package/lib/i18n/peer_help.sh +25 -0
  76. package/lib/i18n/peer_reset.sh +7 -0
  77. package/lib/i18n/peer_status.sh +5 -0
  78. package/lib/i18n/prices.sh +3 -0
  79. package/lib/i18n/prices_refresh.sh +17 -0
  80. package/lib/i18n/prices_show.sh +7 -0
  81. package/lib/i18n/propose.sh +0 -0
  82. package/lib/i18n/release.sh +0 -0
  83. package/lib/i18n/research.sh +0 -0
  84. package/lib/i18n/review_pr.sh +0 -0
  85. package/lib/i18n/sentinel.sh +0 -0
  86. package/lib/i18n/setup.sh +3 -0
  87. package/lib/i18n/shared.sh +157 -0
  88. package/lib/i18n/skills/roll-brief.sh +47 -0
  89. package/lib/i18n/skills/roll-build.sh +97 -0
  90. package/lib/i18n/skills/roll-design.sh +18 -0
  91. package/lib/i18n/skills/roll-fix.sh +53 -0
  92. package/lib/i18n/skills/roll-loop.sh +28 -0
  93. package/lib/i18n/skills/roll-onboard.sh +33 -0
  94. package/lib/i18n/skills_catalog.sh +30 -0
  95. package/lib/i18n/slides.sh +3 -0
  96. package/lib/i18n/slides_build.sh +38 -0
  97. package/lib/i18n/slides_delete.sh +19 -0
  98. package/lib/i18n/slides_list.sh +14 -0
  99. package/lib/i18n/slides_logs.sh +12 -0
  100. package/lib/i18n/slides_new.sh +15 -0
  101. package/lib/i18n/slides_preview.sh +14 -0
  102. package/lib/i18n/slides_templates.sh +7 -0
  103. package/lib/i18n/status.sh +21 -0
  104. package/lib/i18n/update.sh +24 -0
  105. package/lib/i18n.sh +211 -0
  106. package/lib/loop-exit-summary.py +393 -0
  107. package/lib/loop-fmt.py +589 -0
  108. package/lib/loop_pick_agent.py +316 -0
  109. package/lib/loop_result_eval.py +469 -0
  110. package/lib/loop_unstick.py +180 -0
  111. package/lib/model_prices.py +186 -0
  112. package/lib/prices/README.md +35 -0
  113. package/lib/prices/snapshot-2026-05-22.json +22 -0
  114. package/lib/prices/snapshot-2026-05-23-deepseek.json +15 -0
  115. package/lib/prices/snapshot-2026-05-23-kimi.json +14 -0
  116. package/lib/prices_fetcher.py +285 -0
  117. package/lib/roll-backlog.py +225 -0
  118. package/lib/roll-brief.py +286 -0
  119. package/lib/roll-help.py +158 -0
  120. package/lib/roll-home.py +556 -0
  121. package/lib/roll-init.py +156 -0
  122. package/lib/roll-loop-status.py +1683 -0
  123. package/lib/roll-loop-story.py +191 -0
  124. package/lib/roll-onboard-render.py +378 -0
  125. package/lib/roll-peer.py +252 -0
  126. package/lib/roll-plan-validate.py +386 -0
  127. package/lib/roll-setup.py +102 -0
  128. package/lib/roll-status.py +367 -0
  129. package/lib/roll_git.py +41 -0
  130. package/lib/roll_render.py +414 -0
  131. package/lib/slides/components/README.md +123 -0
  132. package/lib/slides/components/cards-2.html +9 -0
  133. package/lib/slides/components/cards-3.html +9 -0
  134. package/lib/slides/components/cards-4.html +9 -0
  135. package/lib/slides/components/compare.html +22 -0
  136. package/lib/slides/components/highlight.html +9 -0
  137. package/lib/slides/components/pipeline.html +12 -0
  138. package/lib/slides/components/plain.html +7 -0
  139. package/lib/slides/components/quote.html +4 -0
  140. package/lib/slides/components/timeline.html +9 -0
  141. package/lib/slides/templates/introduction-v3.html +571 -0
  142. package/lib/slides/templates/pitch.html +0 -0
  143. package/lib/slides-render.py +778 -0
  144. package/lib/slides-validate.py +357 -0
  145. package/lib/test_quality_gate.py +143 -0
  146. package/package.json +8 -7
  147. package/skills/roll-.changelog/SKILL.md +406 -33
  148. package/skills/roll-.clarify/SKILL.md +5 -2
  149. package/skills/roll-.dream/SKILL.md +374 -0
  150. package/skills/roll-.echo/SKILL.md +5 -2
  151. package/skills/roll-.qa/SKILL.md +57 -3
  152. package/skills/roll-.review/SKILL.md +42 -3
  153. package/skills/roll-brief/SKILL.md +209 -0
  154. package/skills/roll-build/SKILL.md +308 -63
  155. package/skills/roll-debug/SKILL.md +341 -162
  156. package/skills/roll-debug/injectable-bb.js +263 -0
  157. package/skills/roll-deck/SKILL.md +296 -0
  158. package/skills/roll-design/ENGINEERING_CHECKLIST.md +1 -1
  159. package/skills/roll-design/SKILL.md +727 -94
  160. package/skills/roll-doc/SKILL.md +595 -0
  161. package/skills/roll-doctor/SKILL.md +192 -0
  162. package/skills/roll-fix/SKILL.md +149 -32
  163. package/skills/{roll-jot → roll-idea}/SKILL.md +18 -10
  164. package/skills/roll-loop/SKILL.md +578 -0
  165. package/skills/roll-notes/SKILL.md +103 -0
  166. package/skills/roll-onboard/SKILL.md +234 -0
  167. package/skills/roll-peer/SKILL.md +336 -0
  168. package/skills/roll-propose/SKILL.md +157 -0
  169. package/skills/roll-review-pr/SKILL.md +58 -0
  170. package/skills/roll-sentinel/SKILL.md +11 -2
  171. package/skills/roll-spar/SKILL.md +8 -6
  172. package/template/.github/workflows/ci.yml +5 -2
  173. package/template/AGENTS.md +20 -74
  174. package/skills/roll-research/SKILL.md +0 -307
  175. package/skills/roll-research/references/schema.json +0 -162
  176. package/skills/roll-research/scripts/md_to_pdf.py +0 -289
  177. package/tools/roll-fetch/SKILL.md +0 -182
  178. package/tools/roll-fetch/package.json +0 -15
  179. package/tools/roll-fetch/smart-web-fetch.js +0 -558
  180. package/tools/roll-probe/SKILL.md +0 -84
  181. /package/template/{BACKLOG.md → .roll/backlog.md} +0 -0
package/LICENSE ADDED
@@ -0,0 +1,21 @@
1
+ MIT License
2
+
3
+ Copyright (c) 2026 Sean YAO
4
+
5
+ Permission is hereby granted, free of charge, to any person obtaining a copy
6
+ of this software and associated documentation files (the "Software"), to deal
7
+ in the Software without restriction, including without limitation the rights
8
+ to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
9
+ copies of the Software, and to permit persons to whom the Software is
10
+ furnished to do so, subject to the following conditions:
11
+
12
+ The above copyright notice and this permission notice shall be included in all
13
+ copies or substantial portions of the Software.
14
+
15
+ THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
16
+ IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
17
+ FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
18
+ AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
19
+ LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
20
+ OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
21
+ SOFTWARE.
package/README.md CHANGED
@@ -7,195 +7,95 @@
7
7
  ╚═╝ ╚═╝ ╚═════╝ ╚══════╝╚══════╝
8
8
  ```
9
9
 
10
- > Roll out features with AI agents — _Move fast, no sprints._
10
+ **[中文版 README](README_CN.md)**
11
11
 
12
+ [![Website](https://img.shields.io/badge/Website-seanyao.github.io%2Froll-blue)](https://seanyao.github.io/roll/)
12
13
  [![License: MIT](https://img.shields.io/badge/License-MIT-blue.svg)](LICENSE)
13
- [![npm version](https://img.shields.io/npm/v/roll.svg)](https://www.npmjs.com/package/roll)
14
+ [![npm version](https://img.shields.io/npm/v/@seanyao/roll.svg)](https://www.npmjs.com/package/@seanyao/roll)
15
+ [![CI](https://github.com/seanyao/roll/actions/workflows/ci.yml/badge.svg)](https://github.com/seanyao/roll/actions/workflows/ci.yml)
14
16
 
15
- ---
17
+ Roll — a CLI that lets AI agents pick up backlog items and ship them through your normal git + CI workflow. Works with Claude, Cursor, Codex, Kimi, and others.
16
18
 
17
- ## What is Roll?
19
+ ## Install
18
20
 
19
- Roll solves a specific problem: when developers on the same team use different AI clients (Claude Code, Cursor, Gemini CLI, Codex), each agent operates under different engineering constraints. One developer's Claude runs tests another's Cursor never even considers.
20
-
21
- Roll fixes this through two mechanisms:
22
-
23
- 1. **Convention CLI** — a single source of engineering conventions distributed to every AI client on the machine (`~/.claude/`, `~/.cursor/`, `~/.gemini/`, etc.)
24
- 2. **Skill System** — proven engineering practices (TDD, TCR, SRE, INVEST) encoded as instructions that any AI agent can follow
25
-
26
- The result: any agent, any client, same constraints.
27
-
28
- ---
29
-
30
- ## Start Here
31
-
32
- Before commands and skills, read the Engineering Methodology — it explains the three-loop architecture (Research → Build → Observe), why each skill exists, and how they connect into a complete delivery system.
33
-
34
- **[English](docs/methodology-en.md)** · **[中文](docs/methodology.md)**
35
-
36
- ---
37
-
38
- ## Installation
21
+ ```bash
22
+ curl -fsSL https://seanyao.github.io/roll/install | bash
23
+ ```
39
24
 
40
25
  ```bash
41
26
  npm install -g @seanyao/roll
42
- roll setup
43
27
  ```
44
28
 
45
- **Requirements:** bash 4+, Node.js 16+
29
+ Requirements: bash 3.2+. npm/Node.js not required — curl install is self-contained.
46
30
 
47
- To update:
31
+ ## Use
48
32
 
49
33
  ```bash
50
- roll update
34
+ cd your-project
35
+ roll init # set up Roll here
36
+ roll loop on # let AI work through the backlog (optional)
51
37
  ```
52
38
 
53
- > **For contributors** (working on roll itself): `git clone https://github.com/seanyao/roll.git && cd roll && ./install.sh`
54
-
55
- ---
39
+ `roll init` detects legacy code and routes you to `$roll-onboard` when appropriate.
56
40
 
57
- ## Convention Management
58
-
59
- Unified behavioral conventions for Claude Code / Gemini CLI / Cursor / Codex — all from one source.
60
-
61
- ### Commands
41
+ ## Commands
62
42
 
63
43
  | Command | Description |
64
44
  |---------|-------------|
65
- | `roll setup` | First-time install: create `~/.roll/` + sync to all AI tools |
66
- | `roll update` | Update roll to latest version + re-sync |
67
- | `roll sync` | Re-sync conventions and skill symlinks to all AI tools |
68
- | `roll init` | New project: create `AGENTS.md` + `BACKLOG.md` + `docs/features/` |
69
- | `roll hook install` | Optional: global git hook for AI client auto-detection |
70
- | `roll reset` | Force-rebuild local cache from repo source, then re-sync |
71
- | `roll status` | Show sync state, skill links, and detected AI tools |
72
- | `roll clean` | Remove legacy `~/.wukong/` or `~/.cybernetix/` remnants |
73
-
74
- ### Typical Flow
75
-
76
- ```bash
77
- # 1. Install
78
- ./install.sh
79
-
80
- # 2. Initialize a project (run from project root)
81
- cd my-app
82
- roll init
83
-
84
- # 3. Re-sync after editing ~/.roll/config.yaml
85
- roll sync
86
-
87
- # 4. Optional: tag commits with AI client name
88
- roll hook install
89
- ```
90
-
91
- ### How Convention Layering Works
92
-
93
- ```
94
- Global ~/.claude/CLAUDE.md ← user-owned; roll setup appends @roll.md
95
- ~/.claude/roll.md ← Roll conventions (written by roll setup/sync)
96
- ↓ auto-stacked
97
- Project <project>/AGENTS.md generated by roll init
98
- <project>/.claude/CLAUDE.md
99
- ```
100
-
101
- Global conventions are additive and never overwrite existing files. Project conventions are injected per project via `roll init`.
102
-
103
- ### Directory Layout
104
-
105
- ```
106
- ~/.roll/
107
- ├── config.yaml # sync path configuration
108
- └── conventions/
109
- ├── global/ # single source of truth
110
- │ ├── AGENTS.md
111
- │ ├── CLAUDE.md / GEMINI.md / .cursor-rules
112
- └── templates/ # project type templates
113
- ├── fullstack/
114
- ├── frontend-only/
115
- ├── backend-service/
116
- └── cli/
117
- ```
118
-
119
- ---
120
-
121
- ## Skill System
122
-
123
- Skills are instructions that encode proven engineering practices into a form AI agents can reliably follow. They live in `~/.roll/skills/` and are symlinked into each AI client's skill directory on `roll sync`.
124
-
125
- ### Workflow
126
-
127
- ```
128
- Research → Design → Build → Check → Fix → (loop)
129
- ```
130
-
131
- ### Quick Reference
132
-
133
- | Scenario | Skill |
134
- |----------|-------|
135
- | Uncertain approach, need to think it through | `$roll-design "topic"` |
136
- | Execute a planned Story | `$roll-build US-001` |
137
- | Free-form feature request | `$roll-build "add search to admin"` |
138
- | Bug fix | `$roll-fix FIX-001` |
139
- | Fast backlog capture (bug / idea) | `$roll-jot "description"` |
140
- | High-risk logic (payments, auth, state machines) | `$roll-spar "feature"` |
141
- | Deep research (product / company / tech) | `$roll-research "subject"` |
142
- | Patrol production for regressions | `$roll-sentinel patrol` |
143
- | Debug a broken page | `$roll-debug <URL>` |
144
-
145
- ### Full Skill List
146
-
147
- | Skill | Phase | Description |
148
- |-------|-------|-------------|
149
- | `$roll-build` | DESIGN+BUILD | Universal entry: Story ID, fix ID, or free-text fly mode |
150
- | `$roll-design` | DESIGN | Explore approaches → design solution → write Stories to BACKLOG |
151
- | `$roll-fix` | FIX | Bug fix / hotfix from BACKLOG |
152
- | `$roll-jot` | Support | Fast capture a bug or idea into BACKLOG.md |
153
- | `$roll-spar` | BUILD | Adversarial TDD — Attacker writes tests, Defender writes code |
154
- | `$roll-sentinel` | CHECK | Scheduled production patrol |
155
- | `$roll-debug` | CHECK | Deep page diagnostics + root cause analysis |
156
- | `$roll-research` | RESEARCH | HV Analysis framework, outputs PDF report |
157
- | `$roll-.review` | Support | Pre-commit self code review |
158
- | `$roll-.qa` | Support | Test pyramid and coverage standards reference |
159
- | `$roll-.changelog` | Support | Auto-generate CHANGELOG from BACKLOG |
160
- | `$roll-.echo` | Support | Passive intent clarification |
161
- | `$roll-.clarify` | Support | Passive scope clarification for vague build requests |
162
-
163
- ---
164
-
165
- ## Project Structure (`roll init`)
166
-
167
- ```
168
- my-project/
169
- ├── AGENTS.md # Project constraints & skill routing
170
- ├── BACKLOG.md # Story and bug index
171
- ├── docs/features/ # Story details and specs
172
- └── ... your project files
173
- ```
174
-
175
- ---
45
+ | **Autonomy · daily use** | |
46
+ | `roll loop <on\|off\|now\|status\|eval\|signals\|runs\|story\|monitor\|…>` | Manage the autonomous BACKLOG executor (incl. per-cycle result scoring) |
47
+ | `roll brief` | Show latest owner brief |
48
+ | `roll backlog [sync\|block\|defer\|lint\|…]` | View, manage, and sync (from GitHub Issues) pending tasks |
49
+ | `roll peer` | Cross-agent negotiation & review |
50
+ | `roll alert` | View / clear loop alerts |
51
+ | **Project · per repo** | |
52
+ | `roll init` | Set up Roll in this project |
53
+ | `roll status` | Show current state and drift |
54
+ | `roll agent [use <name>]` | Per-project agent selection |
55
+ | `roll ci [--wait]` | Show or wait for current commit's CI status |
56
+ | `roll test [--where] [--reset]` | Run the test suite (routes through isolation adapter; Tart VM on Apple Silicon) |
57
+ | `roll release` | Run the release script (human-only) |
58
+ | `roll review-pr <number>` | AI-powered code review for a PR |
59
+ | **Machine · global** | |
60
+ | `roll setup [-f]` | First-time install or re-sync conventions to all AI clients |
61
+ | `roll update` | Upgrade to latest + re-sync |
62
+ | `roll version` | Print installed roll version |
63
+
64
+ ## Documentation
65
+
66
+ | Topic | English | 中文 |
67
+ |-------|---------|------|
68
+ | Overview & architecture | [guide/en/overview.md](guide/en/overview.md) | [guide/zh/overview.md](guide/zh/overview.md) |
69
+ | Engineering methodology | [guide/en/methodology.md](guide/en/methodology.md) | [guide/zh/methodology.md](guide/zh/methodology.md) |
70
+ | Loop (autonomous executor) | [guide/en/loop.md](guide/en/loop.md) | [guide/zh/loop.md](guide/zh/loop.md) |
71
+ | Loop data layout (Phase 2.0) | [guide/en/loop-data-layout.md](guide/en/loop-data-layout.md) | [guide/zh/loop-data-layout.md](guide/zh/loop-data-layout.md) |
72
+ | Dream (nightly health scan) | [guide/en/dream.md](guide/en/dream.md) | [guide/zh/dream.md](guide/zh/dream.md) |
73
+ | Peer (cross-agent review) | [guide/en/peer.md](guide/en/peer.md) | [guide/zh/peer.md](guide/zh/peer.md) |
74
+ | AI agents & complexity routing | [guide/en/ai-agents.md](guide/en/ai-agents.md) | [guide/zh/ai-agents.md](guide/zh/ai-agents.md) |
75
+ | Configuration (env vars) | [guide/en/configuration.md](guide/en/configuration.md) | [guide/zh/configuration.md](guide/zh/configuration.md) |
76
+ | Skill selection guide | [guide/en/skills.md](guide/en/skills.md) | [guide/zh/skills.md](guide/zh/skills.md) |
77
+ | roll-doc (legacy doc automation: four phases + Phase 3b deep read) | [guide/en/roll-doc.md](guide/en/roll-doc.md) | [guide/zh/roll-doc.md](guide/zh/roll-doc.md) |
78
+ | Slides (deck generator) | [guide/en/slides.md](guide/en/slides.md) | [guide/zh/slides.md](guide/zh/slides.md) |
79
+ | Slides — Layouts reference | [guide/en/slides.md#layouts](guide/en/slides.md#layouts) | [guide/zh/slides.md#layouts布局](guide/zh/slides.md#layouts%E5%B8%83%E5%B1%80) |
80
+ | Feedback (`roll feedback`) | [guide/en/feedback.md](guide/en/feedback.md) | [guide/zh/feedback.md](guide/zh/feedback.md) |
81
+ | Backlog GitHub sync (`roll backlog sync`) | [guide/en/backlog-github-sync.md](guide/en/backlog-github-sync.md) | [guide/zh/backlog-github-sync.md](guide/zh/backlog-github-sync.md) |
82
+ | Test isolation (`roll test` + Tart VM) | [guide/en/test-isolation.md](guide/en/test-isolation.md) | [guide/zh/test-isolation.md](guide/zh/test-isolation.md) |
83
+ | Cross-machine sync | [guide/en/loop.md#cross-machine-sync](guide/en/loop.md#cross-machine-sync) | [guide/zh/loop.md#跨机器同步](guide/zh/loop.md#%E8%B7%A8%E6%9C%BA%E5%99%A8%E5%90%8C%E6%AD%A5) |
84
+ | Remote monitoring (watch loop from a phone via `remote-watch`) | [guide/en/loop.md#remote-monitoring](guide/en/loop.md#remote-monitoring) | [guide/zh/loop.md#远程监控remote-monitoring](guide/zh/loop.md#%E8%BF%9C%E7%A8%8B%E7%9B%91%E6%8E%A7remote-monitoring) |
85
+ | Cycle result eval (`roll loop eval`) | [guide/en/loop.md#cycle-result-eval](guide/en/loop.md#cycle-result-eval) | [guide/zh/loop.md#cycle-结果评分result-eval](guide/zh/loop.md#cycle-%E7%BB%93%E6%9E%9C%E8%AF%84%E5%88%86result-eval) |
86
+ | Cycle exit summary (`.command` window recap) | [guide/en/loop.md#cycle-exit-summary](guide/en/loop.md#cycle-exit-summary) | [guide/zh/loop.md#cycle-退出摘要cycle-exit-summary](guide/zh/loop.md#cycle-%E9%80%80%E5%87%BA%E6%91%98%E8%A6%81cycle-exit-summary) |
87
+ | Pricing (cost visibility) | [guide/en/pricing.md](guide/en/pricing.md) | [guide/zh/pricing.md](guide/zh/pricing.md) |
88
+ | FAQ (troubleshooting) | [guide/en/faq.md](guide/en/faq.md) | [guide/zh/faq.md](guide/zh/faq.md) |
89
+ | Adoption patterns | [guide/en/patterns/](guide/en/patterns/) | [guide/zh/patterns/](guide/zh/patterns/) |
176
90
 
177
91
  ## Contributing
178
92
 
179
- Contributions are welcome. Roll is a small focused tool keep PRs focused on one thing.
180
-
181
- 1. Fork the repo and create a branch from `main`
182
- 2. Make your changes with tests where applicable (`tests/`)
183
- 3. Ensure `./bin/roll --help` output is correct
184
- 4. Open a pull request with a clear description
185
-
186
- For larger changes, open an issue first to discuss the approach.
187
-
188
- ---
189
-
190
- ## Acknowledgments
191
-
192
- Roll builds on ideas and inspiration from the open-source community:
93
+ See [CONTRIBUTING.md](CONTRIBUTING.md) for the development workflow, test setup, and PR conventions.
193
94
 
194
- - **[khazix-skills](https://github.com/KKKKhazix/khazix-skills)** by Digital Life Khazix — The HV Analysis (Horizontal-Vertical Analysis) deep research framework that powers `$roll-research` was adapted from this project.
195
- - **[superpowers](https://github.com/obra/superpowers)** by Jesse Vincent — A composable skills library for AI coding agents that informed several workflow patterns in Roll.
95
+ ## Security
196
96
 
197
- ---
97
+ See [SECURITY.md](SECURITY.md). Please report vulnerabilities privately, not through public issues.
198
98
 
199
99
  ## License
200
100
 
201
- MIT
101
+ [MIT](LICENSE)
@@ -0,0 +1,110 @@
1
+ #!/usr/bin/env bash
2
+ # dream-test-quality-scan — ad-hoc helper for roll-.dream Scan 7.
3
+ #
4
+ # Walks bats files and flags ❶-class anti-patterns (hardcoded business data
5
+ # in assertion bodies). Emits structured REFACTOR-shaped lines so the
6
+ # maintainer can sanity-check the rubric against the current suite without
7
+ # waiting for the nightly dream cycle.
8
+ #
9
+ # Usage:
10
+ # dream-test-quality-scan [--category N] [--path PATH] [--max N]
11
+ # dream-test-quality-scan --help
12
+ #
13
+ # Only category 1 (❶ hardcoded business data) is implemented as a deterministic
14
+ # heuristic; categories ❷..❻ stay with the dream skill (AI agent applies the
15
+ # rubric). The helper exists so a smoke test and a maintainer dry-run can
16
+ # confirm ❶ detection keeps working as the suite evolves.
17
+
18
+ set -euo pipefail
19
+
20
+ CATEGORY=1
21
+ TARGET=""
22
+ MAX=5
23
+
24
+ usage() {
25
+ cat <<'EOF'
26
+ dream-test-quality-scan — Scan 7 ❶ dry-run helper
27
+
28
+ Usage:
29
+ dream-test-quality-scan [--category N] [--path PATH] [--max N]
30
+ dream-test-quality-scan --help
31
+
32
+ Options:
33
+ --category N Anti-pattern category (only 1 is implemented; default 1)
34
+ --path PATH File or directory to scan (default: tests/)
35
+ --max N Maximum entries to emit (default: 5; matches dream skill cap)
36
+ --help Show this message
37
+
38
+ Output:
39
+ One line per finding:
40
+ [test-quality:❶] <file>:<line> — <one-line description>
41
+ Exit code is 0 even when nothing is found (dry-run is informational).
42
+ EOF
43
+ }
44
+
45
+ while [[ $# -gt 0 ]]; do
46
+ case "$1" in
47
+ --category) CATEGORY="${2:-1}"; shift 2 ;;
48
+ --path) TARGET="${2:-}"; shift 2 ;;
49
+ --max) MAX="${2:-5}"; shift 2 ;;
50
+ --help|-h) usage; exit 0 ;;
51
+ *) echo "unknown flag: $1" >&2; usage >&2; exit 2 ;;
52
+ esac
53
+ done
54
+
55
+ if [[ "$CATEGORY" -ne 1 ]]; then
56
+ echo "category $CATEGORY not yet implemented — only ❶ is mechanical" >&2
57
+ exit 0
58
+ fi
59
+
60
+ # Default scan root.
61
+ if [[ -z "$TARGET" ]]; then
62
+ repo_root=$(git rev-parse --show-toplevel 2>/dev/null || pwd)
63
+ TARGET="${repo_root}/tests"
64
+ fi
65
+
66
+ if [[ ! -e "$TARGET" ]]; then
67
+ echo "path not found: $TARGET" >&2
68
+ exit 2
69
+ fi
70
+
71
+ scan_file() {
72
+ local file="$1"
73
+ # ❶ heuristic — assertion lines whose RHS contains a numeric literal:
74
+ # - lines containing `[[` or `[ ` (bats assertion syntax)
75
+ # - AND containing `==` or `=` (equality)
76
+ # - AND containing a decimal/integer literal of length ≥ 1 inside quotes
77
+ # Emits one entry per file (not per line) to stay under the rate cap.
78
+ local first_hit
79
+ first_hit=$(grep -nE '\[\[.*"[^"]*[0-9]+(\.[0-9]+)?[^"]*"' "$file" 2>/dev/null \
80
+ | head -1 || true)
81
+ [[ -z "$first_hit" ]] && return 1
82
+
83
+ local lineno
84
+ lineno=$(echo "$first_hit" | cut -d: -f1)
85
+ local rel
86
+ rel=$(python3 -c "import os,sys; print(os.path.relpath(sys.argv[1]))" "$file" 2>/dev/null || echo "$file")
87
+ printf '[test-quality:❶] %s:%s — assertion body hardcodes a numeric literal that likely owns its value elsewhere\n' \
88
+ "$rel" "$lineno"
89
+ return 0
90
+ }
91
+
92
+ emitted=0
93
+ if [[ -d "$TARGET" ]]; then
94
+ # Iterate over .bats files under TARGET; stop after MAX hits.
95
+ # Exclude vendored bats-core helpers — those are framework tests, not ours.
96
+ while IFS= read -r f; do
97
+ case "$f" in
98
+ */tests/helpers/bats-*/*) continue ;;
99
+ esac
100
+ if scan_file "$f"; then
101
+ emitted=$((emitted + 1))
102
+ [[ "$emitted" -ge "$MAX" ]] && break
103
+ fi
104
+ done < <(find "$TARGET" -type f -name '*.bats' | sort)
105
+ else
106
+ scan_file "$TARGET" && emitted=1 || true
107
+ fi
108
+
109
+ # Always succeed — dry-run is informational, the dream cycle decides what to do.
110
+ exit 0