@seanyao/roll 3.624.1 → 3.624.2

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 (69) hide show
  1. package/CHANGELOG.md +66 -0
  2. package/README.md +4 -1
  3. package/dist/roll.mjs +17410 -14352
  4. package/lib/__pycache__/changelog_audit.cpython-314.pyc +0 -0
  5. package/lib/__pycache__/changelog_generate.cpython-314.pyc +0 -0
  6. package/lib/__pycache__/github_sync.cpython-314.pyc +0 -0
  7. package/lib/__pycache__/loop-fmt.cpython-314.pyc +0 -0
  8. package/lib/__pycache__/loop_result_eval.cpython-314.pyc +0 -0
  9. package/lib/__pycache__/loop_unstick.cpython-314.pyc +0 -0
  10. package/lib/__pycache__/model_prices.cpython-314.pyc +0 -0
  11. package/lib/__pycache__/prices_fetcher.cpython-314.pyc +0 -0
  12. package/lib/__pycache__/roll-home.cpython-314.pyc +0 -0
  13. package/lib/__pycache__/roll-loop-status.cpython-314.pyc +0 -0
  14. package/lib/__pycache__/roll_git.cpython-314.pyc +0 -0
  15. package/lib/__pycache__/roll_render.cpython-314.pyc +0 -0
  16. package/lib/__pycache__/slides-render.cpython-314.pyc +0 -0
  17. package/lib/agent_usage/__pycache__/__init__.cpython-314.pyc +0 -0
  18. package/lib/agent_usage/__pycache__/gemini.cpython-314.pyc +0 -0
  19. package/lib/agent_usage/__pycache__/kimi.cpython-314.pyc +0 -0
  20. package/lib/agent_usage/__pycache__/openai.cpython-314.pyc +0 -0
  21. package/lib/agent_usage/__pycache__/pi.cpython-314.pyc +0 -0
  22. package/lib/agent_usage/__pycache__/pi_emit.cpython-314.pyc +0 -0
  23. package/lib/agent_usage/__pycache__/qwen.cpython-314.pyc +0 -0
  24. package/package.json +1 -1
  25. package/skills/README.md +64 -0
  26. package/skills/docs/skill-authoring.md +74 -0
  27. package/skills/reports/skill-audit-summary.md +53 -0
  28. package/skills/roll-.changelog/SKILL.md +47 -0
  29. package/skills/roll-.changelog/references/full-contract.md +462 -0
  30. package/skills/roll-.clarify/SKILL.md +64 -0
  31. package/skills/roll-.dream/SKILL.md +47 -0
  32. package/skills/roll-.dream/references/full-contract.md +365 -0
  33. package/skills/roll-.echo/SKILL.md +118 -0
  34. package/skills/roll-.qa/SKILL.md +47 -0
  35. package/skills/roll-.qa/references/full-contract.md +256 -0
  36. package/skills/roll-.review/SKILL.md +148 -0
  37. package/skills/roll-build/SKILL.md +49 -0
  38. package/skills/roll-build/references/full-contract.md +968 -0
  39. package/skills/roll-debug/SKILL.md +48 -0
  40. package/skills/roll-debug/assets/injectable-bb.js +263 -0
  41. package/skills/roll-debug/references/full-contract.md +607 -0
  42. package/skills/roll-design/SKILL.md +52 -0
  43. package/skills/roll-design/references/engineering-checklist.md +298 -0
  44. package/skills/roll-design/references/full-contract.md +940 -0
  45. package/skills/roll-doc-audit/SKILL.md +51 -0
  46. package/skills/roll-doc-audit/references/full-contract.md +796 -0
  47. package/skills/roll-doctor/SKILL.md +209 -0
  48. package/skills/roll-fix/SKILL.md +49 -0
  49. package/skills/roll-fix/references/full-contract.md +672 -0
  50. package/skills/roll-idea/SKILL.md +62 -0
  51. package/skills/roll-loop/SKILL.md +50 -0
  52. package/skills/roll-loop/references/full-contract.md +534 -0
  53. package/skills/roll-notes/SKILL.md +107 -0
  54. package/skills/roll-onboard/SKILL.md +238 -0
  55. package/skills/roll-peer/SKILL.md +47 -0
  56. package/skills/roll-peer/references/full-contract.md +313 -0
  57. package/skills/roll-propose/SKILL.md +155 -0
  58. package/skills/roll-review-pr/SKILL.md +62 -0
  59. package/skills/roll-spar/SKILL.md +47 -0
  60. package/skills/roll-spar/references/full-contract.md +288 -0
  61. package/skills/route-cases/skills.json +216 -0
  62. package/skills/scripts/audit-skills.mjs +272 -0
  63. package/skills/scripts/test-audit-skills.mjs +39 -0
  64. package/skills/tests/fixtures/skill-audit/block-skill/SKILL.md +12 -0
  65. package/skills/tests/fixtures/skill-audit/minimal-skill/SKILL.md +8 -0
  66. package/skills/tests/fixtures/skill-audit/quoted-skill/SKILL.md +10 -0
  67. package/skills/tests/fixtures/skill-audit/route-cases.json +21 -0
  68. package/skills/tests/fixtures/skill-audit/spoke-skill/SKILL.md +12 -0
  69. package/skills/tests/fixtures/skill-audit/spoke-skill/references/runbook.md +3 -0
@@ -0,0 +1,209 @@
1
+ ---
2
+ name: roll-doctor
3
+ license: MIT
4
+ allowed-tools: "Read, Bash, Edit"
5
+ description: "Load when diagnosing Roll toolchain health, conventions sync, skill file health, templates, symlinks, config validity, or installation integrity."
6
+ ---
7
+ # Roll Doctor
8
+
9
+ ## Gotchas
10
+
11
+ - Doctor diagnoses toolchain and convention health; it should fail loud on broken contracts rather than hiding drift.
12
+ - Skill health checks belong here only as diagnostics; changing skill content still happens in roll-skills.
13
+
14
+ 诊断 Roll 工具链健康状态。快速定位 skill 不工作、convention 不同步、symlink 断裂等问题。
15
+
16
+ ## When to Use
17
+
18
+ - "roll 怎么不工作了"
19
+ - "skill 找不到了"
20
+ - "convention 没有同步"
21
+ - "$roll-debug 不响应"
22
+ - 任何 Roll 相关功能异常
23
+
24
+ ## Checks
25
+
26
+ ### 1. Roll Installation
27
+
28
+ ```bash
29
+ # Verify ROLL_HOME structure
30
+ ls -la ~/.roll/
31
+ ls -la ~/.roll/skills/
32
+ ls -la ~/.roll/conventions/
33
+ ```
34
+
35
+ Expected:
36
+ - `~/.roll/` exists
37
+ - `~/.roll/skills/` has roll-* directories
38
+ - `~/.roll/conventions/global/` has AGENTS.md, CLAUDE.md, etc.
39
+ - `~/.roll/conventions/templates/` has backend-service, cli, frontend-only, fullstack
40
+
41
+ ### 2. Skill Health
42
+
43
+ ```bash
44
+ # List all skills and check YAML frontmatter
45
+ for f in ~/.roll/skills/*/SKILL.md; do
46
+ echo "=== $(basename $(dirname $f)) ==="
47
+ head -5 "$f"
48
+ done
49
+ ```
50
+
51
+ Check:
52
+ - Each skill directory has `SKILL.md`
53
+ - YAML frontmatter has `name:` and `description:`
54
+ - No duplicate `name` values across skills
55
+ - File is readable markdown
56
+
57
+ When diagnosing a roll-skills checkout, run the first-class skill audit:
58
+
59
+ ```bash
60
+ node scripts/audit-skills.mjs
61
+ node scripts/audit-skills.mjs --json
62
+ node scripts/audit-skills.mjs --strict
63
+ ```
64
+
65
+ Check:
66
+ - Every description starts with `Load when...` and stays at 50 words or fewer
67
+ - Every skill has positive and negative route cases in `route-cases/skills.json`
68
+ - Every skill has Gotchas / Known Failure Modes coverage
69
+ - Hub/spoke integrity has no missing or unreferenced `references/`, `assets/`, or `scripts/` files
70
+ - Oversized hubs either split below 250 lines or carry an explicit reviewed waiver
71
+
72
+ ### 3. Symlinks
73
+
74
+ ```bash
75
+ # Claude Code
76
+ ls -la ~/.claude/skills/roll-*
77
+
78
+ # Antigravity (agy — reuses ~/.gemini/, if exists)
79
+ ls -la ~/.gemini/skills/roll-* 2>/dev/null
80
+
81
+ ```
82
+
83
+ Check:
84
+ - Each symlink exists
85
+ - Each symlink points to valid target in `~/.roll/skills/`
86
+ - No broken symlinks (red in ls output)
87
+
88
+ ### 4. Conventions Sync
89
+
90
+ ```bash
91
+ # Check roll.md sync
92
+ diff ~/.roll/conventions/global/CLAUDE.md ~/.claude/roll.md
93
+
94
+ # Check CLAUDE.md includes @roll.md
95
+ grep "@roll.md" ~/.claude/CLAUDE.md
96
+ ```
97
+
98
+ Check:
99
+ - `~/.claude/roll.md` exists and matches `~/.roll/conventions/global/CLAUDE.md`
100
+ - `~/.claude/CLAUDE.md` contains `@roll.md` reference
101
+ - `~/.claude/CLAUDE.md` is not missing or stale
102
+
103
+ ### 5. Template Integrity
104
+
105
+ ```bash
106
+ # Global conventions
107
+ ls ~/.roll/conventions/global/
108
+
109
+ # Project type templates
110
+ for t in backend-service cli frontend-only fullstack; do
111
+ ls ~/.roll/conventions/templates/$t/
112
+ done
113
+
114
+ # New project template
115
+ ls ~/.roll/template/
116
+ ```
117
+
118
+ Check:
119
+ - All expected files present in each directory
120
+ - No missing AGENTS.md, CLAUDE.md, or GEMINI.md
121
+
122
+ ### 6. Config
123
+
124
+ ```bash
125
+ cat ~/.roll/config.yaml
126
+ ```
127
+
128
+ Check:
129
+ - File exists and is valid YAML
130
+ - Has required `ai_tool_name` or `ai_claude` entries
131
+
132
+ ### 7. Peer Review
133
+
134
+ ```bash
135
+ # Peer state directory
136
+ ls -la ~/.roll/.peer-state/ 2>/dev/null || echo "missing"
137
+
138
+ # Peer config in config.yaml
139
+ grep "peer_" ~/.roll/config.yaml 2>/dev/null || echo "no peer config"
140
+
141
+ # Available peer CLIs
142
+ for tool in claude kimi pi codex; do
143
+ command -v "$tool" &>/dev/null && echo "✓ $tool" || echo "✗ $tool"
144
+ done
145
+
146
+ # roll-peer skill
147
+ ls ~/.roll/skills/roll-peer/SKILL.md 2>/dev/null || echo "missing"
148
+ ```
149
+
150
+ Check:
151
+ - `~/.roll/.peer-state/` exists and is writable
152
+ - `~/.roll/config.yaml` contains `peer_call_timeout` (default: 180)
153
+ - At least one peer CLI (claude / kimi / pi) is installed
154
+ - `roll-peer` skill exists
155
+
156
+ ## Report Format
157
+
158
+ ```
159
+ 🔬 Roll Doctor Report
160
+
161
+ [✓/✗] Roll installation
162
+ [✓/✗] Skills (N skills checked)
163
+ [✓/✗] Symlinks (N tools checked)
164
+ [✓/✗] Conventions sync
165
+ [✓/✗] Templates integrity
166
+ [✓/✗] Config
167
+ [✓/✗] Peer Review
168
+
169
+ ---
170
+ Issues found: N
171
+
172
+ 1. [severity] description → fix command
173
+ 2. [severity] description → fix command
174
+
175
+ Recommendation: ...
176
+ ```
177
+
178
+ ## Severity Levels
179
+
180
+ | Level | Meaning | Example |
181
+ |-------|---------|---------|
182
+ | 🔴 Critical | Skill completely broken | Broken symlink, missing SKILL.md |
183
+ | 🟡 Warning | Partial functionality | Stale convention, outdated roll.md |
184
+ | 🟢 Info | Recommendations | Missing optional tool symlink |
185
+
186
+ ## Auto-Fix
187
+
188
+ If user confirms, automatically fix safe issues:
189
+
190
+ - **Broken/missing symlinks** → `roll setup` (recreates all)
191
+ - **Stale conventions** → `roll sync conventions`
192
+ - **Missing template files** → warn user to re-install
193
+
194
+ Never auto-fix without user confirmation for:
195
+ - Overwriting `~/.claude/CLAUDE.md` (may have user customizations)
196
+ - Deleting files
197
+
198
+ ## Quick Fix Commands
199
+
200
+ ```bash
201
+ # Recreate all symlinks and sync conventions
202
+ roll setup
203
+
204
+ # Sync only conventions
205
+ roll sync conventions
206
+
207
+ # Reinstall (nuclear option)
208
+ curl -fsSL https://raw.githubusercontent.com/seanyao/roll/main/install.sh | bash
209
+ ```
@@ -0,0 +1,49 @@
1
+ ---
2
+ name: roll-fix
3
+ license: MIT
4
+ allowed-tools: "Read, Edit, Write, Glob, Grep, Bash, Skill"
5
+ description: "Load when the user provides a FIX-XXX or BUG-XXX item, or asks for a focused hotfix/bugfix through Roll lighter TCR repair workflow."
6
+ ---
7
+ # Roll Fix
8
+
9
+ 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.
10
+
11
+ ## Load
12
+
13
+ Load when the user provides a FIX-XXX or BUG-XXX item, or asks for a focused hotfix/bugfix through Roll lighter TCR repair workflow.
14
+
15
+ ## When Not to Use
16
+
17
+ - Broad feature delivery; load roll-build.
18
+ - Discussion-only design work; load roll-design.
19
+
20
+ ## Read On Demand
21
+
22
+ - Read [the full contract](references/full-contract.md) before executing the workflow end to end, recovering from failures, or checking exact output templates.
23
+ - Keep this hub in context for trigger boundaries and hard gates.
24
+
25
+ ## Workflow Skeleton
26
+
27
+ 1. Read the FIX/BUG row and root-cause context.
28
+ 2. Reproduce or explain why reproduction is impossible.
29
+ 3. Add the failing/regression test first.
30
+ 4. Patch through TCR, run focused and local CI checks.
31
+ 5. Self-review, update backlog/evidence, and open PR.
32
+
33
+ ## Hard Gates
34
+
35
+ - Every fix gets a regression signal or documented exception.
36
+ - Blocking review findings are fixed in another TCR cycle.
37
+ - The Review Score is produced by the runner's fresh-session peer Reviewer — the agent does NOT self-score.
38
+ - Docs/code/product alignment is a DoD gate: user-visible behavior, command, output-copy, site, or delivery-view changes update the touched README/docs/guide/site/help in the same delivery.
39
+
40
+ ## Gotchas
41
+
42
+ - Use for narrow FIX/BUG work; broad feature delivery belongs in roll-build.
43
+ - Never patch without a regression signal or explicit reason why the bug cannot be reproduced locally.
44
+
45
+ ## Maintenance
46
+
47
+ - Description changes require updates in `route-cases/skills.json`.
48
+ - New observed failures should add a gotcha and the matching positive or negative route case.
49
+ - Heavy examples, templates, recovery paths, and deterministic snippets belong in `references/`, `assets/`, or `scripts/`, not in this hub.