@seanyao/roll 0.5.0

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 (50) hide show
  1. package/README.md +201 -0
  2. package/bin/roll +1375 -0
  3. package/conventions/config.yaml +15 -0
  4. package/conventions/global/.cursor-rules +31 -0
  5. package/conventions/global/AGENTS.md +100 -0
  6. package/conventions/global/CLAUDE.md +32 -0
  7. package/conventions/global/GEMINI.md +28 -0
  8. package/conventions/templates/backend-service/.cursor-rules +17 -0
  9. package/conventions/templates/backend-service/AGENTS.md +88 -0
  10. package/conventions/templates/backend-service/CLAUDE.md +18 -0
  11. package/conventions/templates/backend-service/GEMINI.md +16 -0
  12. package/conventions/templates/cli/.cursor-rules +17 -0
  13. package/conventions/templates/cli/AGENTS.md +66 -0
  14. package/conventions/templates/cli/CLAUDE.md +18 -0
  15. package/conventions/templates/cli/GEMINI.md +16 -0
  16. package/conventions/templates/frontend-only/.cursor-rules +16 -0
  17. package/conventions/templates/frontend-only/AGENTS.md +71 -0
  18. package/conventions/templates/frontend-only/CLAUDE.md +16 -0
  19. package/conventions/templates/frontend-only/GEMINI.md +14 -0
  20. package/conventions/templates/fullstack/.cursor-rules +17 -0
  21. package/conventions/templates/fullstack/AGENTS.md +87 -0
  22. package/conventions/templates/fullstack/CLAUDE.md +17 -0
  23. package/conventions/templates/fullstack/GEMINI.md +15 -0
  24. package/package.json +33 -0
  25. package/skills/roll-.changelog/SKILL.md +79 -0
  26. package/skills/roll-.clarify/SKILL.md +59 -0
  27. package/skills/roll-.echo/SKILL.md +113 -0
  28. package/skills/roll-.qa/SKILL.md +204 -0
  29. package/skills/roll-.review/SKILL.md +105 -0
  30. package/skills/roll-build/SKILL.md +559 -0
  31. package/skills/roll-debug/SKILL.md +428 -0
  32. package/skills/roll-design/ENGINEERING_CHECKLIST.md +256 -0
  33. package/skills/roll-design/SKILL.md +276 -0
  34. package/skills/roll-fix/SKILL.md +442 -0
  35. package/skills/roll-jot/SKILL.md +50 -0
  36. package/skills/roll-research/SKILL.md +307 -0
  37. package/skills/roll-research/references/schema.json +162 -0
  38. package/skills/roll-research/scripts/md_to_pdf.py +289 -0
  39. package/skills/roll-sentinel/SKILL.md +355 -0
  40. package/skills/roll-spar/SKILL.md +287 -0
  41. package/template/.env.example +47 -0
  42. package/template/.github/workflows/ci.yml +32 -0
  43. package/template/.github/workflows/sentinel.yml +26 -0
  44. package/template/AGENTS.md +80 -0
  45. package/template/BACKLOG.md +42 -0
  46. package/template/package.json +43 -0
  47. package/tools/roll-fetch/SKILL.md +182 -0
  48. package/tools/roll-fetch/package.json +15 -0
  49. package/tools/roll-fetch/smart-web-fetch.js +558 -0
  50. package/tools/roll-probe/SKILL.md +84 -0
package/README.md ADDED
@@ -0,0 +1,201 @@
1
+ ```
2
+ ██████╗ ██████╗ ██╗ ██╗
3
+ ██╔══██╗██╔═══██╗██║ ██║
4
+ ██████╔╝██║ ██║██║ ██║
5
+ ██╔══██╗██║ ██║██║ ██║
6
+ ██║ ██║╚██████╔╝███████╗███████╗
7
+ ╚═╝ ╚═╝ ╚═════╝ ╚══════╝╚══════╝
8
+ ```
9
+
10
+ > Roll out features with AI agents — _Move fast, no sprints._
11
+
12
+ [![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
+
15
+ ---
16
+
17
+ ## What is Roll?
18
+
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
39
+
40
+ ```bash
41
+ npm install -g @seanyao/roll
42
+ roll setup
43
+ ```
44
+
45
+ **Requirements:** bash 4+, Node.js 16+
46
+
47
+ To update:
48
+
49
+ ```bash
50
+ roll update
51
+ ```
52
+
53
+ > **For contributors** (working on roll itself): `git clone https://github.com/seanyao/roll.git && cd roll && ./install.sh`
54
+
55
+ ---
56
+
57
+ ## Convention Management
58
+
59
+ Unified behavioral conventions for Claude Code / Gemini CLI / Cursor / Codex — all from one source.
60
+
61
+ ### Commands
62
+
63
+ | Command | Description |
64
+ |---------|-------------|
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
+ ---
176
+
177
+ ## Contributing
178
+
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:
193
+
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.
196
+
197
+ ---
198
+
199
+ ## License
200
+
201
+ MIT