@seanyao/roll 2026.524.2 → 2026.526.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 (62) hide show
  1. package/CHANGELOG.md +38 -8
  2. package/README.md +4 -2
  3. package/bin/roll +1022 -442
  4. package/conventions/config.yaml +9 -0
  5. package/lib/__pycache__/roll-home.cpython-314.pyc +0 -0
  6. package/lib/__pycache__/roll-loop-status.cpython-314.pyc +0 -0
  7. package/lib/__pycache__/roll_render.cpython-314.pyc +0 -0
  8. package/lib/i18n/agent.sh +21 -0
  9. package/lib/i18n/alert.sh +20 -0
  10. package/lib/i18n/backlog.sh +96 -0
  11. package/lib/i18n/brief.sh +5 -0
  12. package/lib/i18n/changelog.sh +3 -0
  13. package/lib/i18n/ci.sh +15 -0
  14. package/lib/i18n/init.sh +52 -0
  15. package/lib/i18n/lang.sh +10 -0
  16. package/lib/i18n/loop.sh +140 -0
  17. package/lib/i18n/migrate.sh +74 -0
  18. package/lib/i18n/offboard.sh +16 -0
  19. package/lib/i18n/peer.sh +34 -0
  20. package/lib/i18n/peer_help.sh +21 -0
  21. package/lib/i18n/peer_reset.sh +7 -0
  22. package/lib/i18n/peer_status.sh +5 -0
  23. package/lib/i18n/prices.sh +3 -0
  24. package/lib/i18n/prices_refresh.sh +17 -0
  25. package/lib/i18n/prices_show.sh +7 -0
  26. package/lib/i18n/setup.sh +3 -0
  27. package/lib/i18n/shared.sh +74 -0
  28. package/lib/i18n/skills/roll-brief.sh +27 -0
  29. package/lib/i18n/skills/roll-fix.sh +39 -0
  30. package/lib/i18n/skills/roll-onboard.sh +17 -0
  31. package/lib/i18n/slides.sh +3 -0
  32. package/lib/i18n/slides_build.sh +38 -0
  33. package/lib/i18n/slides_delete.sh +19 -0
  34. package/lib/i18n/slides_list.sh +14 -0
  35. package/lib/i18n/slides_logs.sh +12 -0
  36. package/lib/i18n/slides_new.sh +15 -0
  37. package/lib/i18n/slides_preview.sh +14 -0
  38. package/lib/i18n/slides_templates.sh +7 -0
  39. package/lib/i18n/status.sh +19 -0
  40. package/lib/i18n/update.sh +7 -0
  41. package/lib/i18n.sh +85 -4
  42. package/lib/roll-home.py +55 -0
  43. package/lib/roll-loop-status.py +196 -19
  44. package/lib/roll-loop-story.py +191 -0
  45. package/lib/roll_render.py +15 -1
  46. package/lib/slides/components/README.md +117 -0
  47. package/lib/slides/components/cards-2.html +9 -0
  48. package/lib/slides/components/cards-3.html +9 -0
  49. package/lib/slides/components/cards-4.html +9 -0
  50. package/lib/slides/components/compare.html +22 -0
  51. package/lib/slides/components/highlight.html +9 -0
  52. package/lib/slides/components/pipeline.html +12 -0
  53. package/lib/slides/components/plain.html +7 -0
  54. package/lib/slides/components/quote.html +4 -0
  55. package/lib/slides/components/timeline.html +9 -0
  56. package/lib/slides/templates/pitch.html +0 -0
  57. package/package.json +1 -1
  58. package/skills/roll-brief/SKILL.md +2 -2
  59. package/skills/roll-build/SKILL.md +40 -40
  60. package/skills/roll-fix/SKILL.md +22 -22
  61. package/skills/roll-loop/SKILL.md +26 -15
  62. package/skills/roll-onboard/SKILL.md +6 -6
@@ -0,0 +1,12 @@
1
+ <!-- pipeline: requires stages[].{title_en,title_zh,desc_en,desc_zh,css_class} -->
2
+ <div class="pipeline-bar">
3
+ {{#stages}}
4
+ <div class="pipe-stage {{css_class}}">
5
+ <h4><span class="lang-en">{{title_en}}</span><span class="lang-zh">{{title_zh}}</span></h4>
6
+ <p><span class="lang-en">{{desc_en}}</span><span class="lang-zh">{{desc_zh}}</span></p>
7
+ </div>
8
+ {{^last}}
9
+ <div class="pipe-arrow">→</div>
10
+ {{/last}}
11
+ {{/stages}}
12
+ </div>
@@ -0,0 +1,7 @@
1
+ <!-- plain: requires body_en (raw HTML), body_zh (raw HTML) -->
2
+ <div class="lang-en">
3
+ {{{body_en}}}
4
+ </div>
5
+ <div class="lang-zh">
6
+ {{{body_zh}}}
7
+ </div>
@@ -0,0 +1,4 @@
1
+ <!-- quote: requires text_en, text_zh -->
2
+ <div class="quote-block">
3
+ <p><span class="lang-en">{{text_en}}</span><span class="lang-zh">{{text_zh}}</span></p>
4
+ </div>
@@ -0,0 +1,9 @@
1
+ <!-- timeline: requires items[].{title_en,title_zh,body_en,body_zh} -->
2
+ <div class="timeline">
3
+ {{#items}}
4
+ <div class="timeline-item">
5
+ <h4><span class="lang-en">{{title_en}}</span><span class="lang-zh">{{title_zh}}</span></h4>
6
+ <p><span class="lang-en">{{{body_en}}}</span><span class="lang-zh">{{{body_zh}}}</span></p>
7
+ </div>
8
+ {{/items}}
9
+ </div>
File without changes
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@seanyao/roll",
3
- "version": "2026.524.2",
3
+ "version": "2026.526.1",
4
4
  "description": "Roll — Roll out features with AI agents",
5
5
  "scripts": {
6
6
  "test": "bash tests/run.sh"
@@ -179,8 +179,8 @@ git push origin main
179
179
  写完文件后在终端或 CI 日志中打印简报路径:
180
180
 
181
181
  ```
182
- 📋 简报已生成:.roll/briefs/2026-05-10-01.md
183
- 发布就绪:✅ 可发版
182
+ 📋 $(msg brief.generated ".roll/briefs/YYYY-MM-DD-NN.md")
183
+ $(msg brief.release_readiness): ✅ $(msg brief.release_ready_status)
184
184
  ```
185
185
 
186
186
  有升级事项时须显著打印,不得遗漏。
@@ -90,16 +90,16 @@ git worktree add .worktrees/{action-id} -b dispatch/{action-id}
90
90
  **Status notifications (required):**
91
91
 
92
92
  ```
93
- 🔀 Parallel Dispatch: N Actions running in parallel
93
+ 🔀 $(msg build.parallel_dispatch N)
94
94
 
95
- Agent 1 [Action: ...] ⏳ Running...
96
- Agent 2 [Action: ...] ⏳ Running...
95
+ $(msg build.agent_running 1 "...")
96
+ $(msg build.agent_running 2 "...")
97
97
 
98
- Agent 1 [Action: ...] ✅ Done (N TCR commits)
99
- Agent 2 [Action: ...] ✅ Done (N TCR commits)
98
+ $(msg build.agent_done 1 "..." N)
99
+ $(msg build.agent_done 2 "..." N)
100
100
 
101
- 🔀 Merge: N/N succeeded, merging...
102
- 🧪 Integration tests: running...
101
+ 🔀 $(msg build.merge_summary N N)
102
+ 🧪 $(msg build.integration_tests)
103
103
  ```
104
104
 
105
105
  When parallel conditions are not met, execute Actions sequentially.
@@ -123,9 +123,9 @@ Activate when input does not match any `US-XXX` / `FIX-XXX` pattern, or when no
123
123
  Before any code, assess clarity:
124
124
 
125
125
  ```
126
- 🎯 Clarified Goal: {1-2 sentences capturing user intent}
127
- 📏 Complexity Assessment: {small|medium|large}
128
- 🔍 Uncertainty Areas: {list what needs investigation/decision}
126
+ 🎯 $(msg build.clarified_goal): {1-2 sentences capturing user intent}
127
+ 📏 $(msg build.complexity_assessment): {small|medium|large}
128
+ 🔍 $(msg build.uncertainty_areas): {list what needs investigation/decision}
129
129
  ```
130
130
 
131
131
  **If uncertainty areas are non-empty or the request is vague, auto-trigger `$roll-.clarify`:**
@@ -138,11 +138,11 @@ Before any code, assess clarity:
138
138
  If the request involves any of: output format, layout, automation level (manual vs automatic), or architecture structure — output a confirmation block **before writing any code**:
139
139
 
140
140
  ```
141
- 📐 Approach Confirmation
141
+ 📐 $(msg build.approach_confirmation)
142
142
 
143
- 1. What changes: {what will be built or modified}
144
- 2. The approach: {specific format / automation level / structure chosen}
145
- 3. Files touched: {list of files}
143
+ 1. $(msg build.what_changes): {what will be built or modified}
144
+ 2. $(msg build.the_approach): {specific format / automation level / structure chosen}
145
+ 3. $(msg build.files_touched): {list of files}
146
146
 
147
147
  Proceeding unless you say otherwise.
148
148
  ```
@@ -205,14 +205,14 @@ Press Enter to launch peer review, or type 'n' to skip. Auto-executing in 10s...
205
205
  Before writing implementation code:
206
206
 
207
207
  ```
208
- 🧪 Test Design for Action: {Action name}
208
+ 🧪 $(msg build.test_design): {Action name}
209
209
 
210
- Scenarios:
210
+ $(msg build.scenarios):
211
211
  ├── {Happy path scenario}
212
212
  ├── {Edge case scenario}
213
213
  └── {Failure/regression scenario}
214
214
 
215
- Test Types:
215
+ $(msg build.test_types):
216
216
  ├── Unit tests for: {logic components}
217
217
  ├── Integration tests for: {API/data flows}
218
218
  └── Manual verification for: {UI/visual elements}
@@ -231,10 +231,10 @@ Reference `$roll-.qa` for coverage requirements and test pyramid strategy.
231
231
 
232
232
  ```
233
233
  ┌────────────────────────────────────────────────────────────┐
234
- TCR CYCLE (Test && Commit || Revert)
234
+ $(msg build.tcr_cycle)
235
235
  └────────────────────────────────────────────────────────────┘
236
236
 
237
- MICRO-STEP {N}: {description of smallest testable change}
237
+ $(msg build.micro_step {N} "{description of smallest testable change}")
238
238
 
239
239
  Step 1: Write/Update Test
240
240
  └── Run test → Confirm RED (expected failure)
@@ -485,17 +485,17 @@ Follow the repo's deployment path (Vercel / Railway / etc.) and record the deplo
485
485
  **Before marking as DONE, fresh evidence must be provided.**
486
486
 
487
487
  ```
488
- 🚦 Verification Gate
488
+ 🚦 $(msg build.verification_gate)
489
489
 
490
- Evidence checklist (each item must have actual output):
491
- ├── [ ] Tests passed: paste actual test run output
492
- ├── [ ] Build succeeded: paste build output
493
- ├── [ ] Online verification: screenshot / curl output / log snippet
494
- └── [ ] No regression: verify at least one existing feature still works
490
+ $(msg build.evidence_checklist):
491
+ ├── [ ] $(msg build.tests_passed)
492
+ ├── [ ] $(msg build.build_succeeded)
493
+ ├── [ ] $(msg build.online_verification)
494
+ └── [ ] $(msg build.no_regression)
495
495
 
496
- Gate Decision:
497
- ├── ✅ All items have evidence → Can mark as DONE
498
- └── ❌ Any item missing evidence → Gather evidence before passing the gate
496
+ $(msg build.gate_decision):
497
+ ├── ✅ $(msg build.gate_pass)
498
+ └── ❌ $(msg build.gate_fail)
499
499
  ```
500
500
 
501
501
  **Hard Rule**: "I confirmed the tests passed" does not count as evidence. Must be **freshly run** command output from this session.
@@ -552,20 +552,20 @@ git push
552
552
  ### Phase 12: Report & Celebrate
553
553
 
554
554
  ```
555
- Pushed to GitHub: origin/main
556
- 🚀 Deployed: <url>
557
- Verified: <what was checked>
558
- 📦 Changes: <summary>
559
- 🔢 Commits: <count> micro-commits via TCR
560
- 🧪 Tests: <what tests were added/modified>
561
- 📊 TCR Stats: <success rate, revert count if any>
562
- 📋 Review Gate: <self-review findings summary>
563
- 📝 BACKLOG: <US-ID> marked ✅ Done
564
- 📄 CHANGELOG: bundled into completion commit (Phase 11)
555
+ $(msg build.pushed_to)
556
+ 🚀 $(msg build.deployed): <url>
557
+ $(msg build.verified): <what was checked>
558
+ 📦 $(msg build.changes_summary): <summary>
559
+ 🔢 $(msg build.commits_count): <count> micro-commits via TCR
560
+ 🧪 $(msg build.tests_added): <what tests were added/modified>
561
+ 📊 $(msg build.tcr_stats): <success rate, revert count if any>
562
+ 📋 $(msg build.review_gate): <self-review findings summary>
563
+ 📝 $(msg build.backlog_updated "<US-ID>")
564
+ 📄 $(msg build.changelog_bundled)
565
565
 
566
- 🎉 Shipped.
566
+ 🎉 $(msg build.shipped)
567
567
 
568
- 🔄 Next Options:
568
+ 🔄 $(msg build.next_options):
569
569
  1. Continue to next Action (if Story has more)
570
570
  2. Start next US (if Fly mode created multiple)
571
571
  3. Done (if all completed)
@@ -100,13 +100,13 @@ Before creating any file or directory:
100
100
  ### 3. Test Design Review (TCR Core)
101
101
 
102
102
  ```
103
- 🧪 Test Design for Fix:
103
+ 🧪 $(msg fix.test_design):
104
104
 
105
- Verification Approach: {unit test | integration test | manual check}
105
+ $(msg fix.verification_approach): {unit test | integration test | manual check}
106
106
 
107
- Test Scenarios:
108
- ├── Fix verification: {how to confirm the fix works}
109
- └── Regression check: {how to ensure we didn't break anything}
107
+ $(msg fix.test_scenarios):
108
+ ├── $(msg fix.fix_verification): {how to confirm the fix works}
109
+ └── $(msg fix.regression_check): {how to ensure we didn't break anything}
110
110
  ```
111
111
 
112
112
  **Reference `$roll-.qa` for test strategy:**
@@ -122,10 +122,10 @@ Before creating any file or directory:
122
122
 
123
123
  ```
124
124
  ┌─────────────────────────────────────────────────────────────────────┐
125
- TCR CYCLE FOR FIX
125
+ $(msg fix.tcr_cycle)
126
126
  └─────────────────────────────────────────────────────────────────────┘
127
127
 
128
- MICRO-STEP 1: {description of the fix}
128
+ $(msg fix.micro_step 1 "{description of the fix}")
129
129
 
130
130
  Step 1: Write/Update Test
131
131
  └── Run test → Confirm RED (bug reproduced or test fails)
@@ -198,12 +198,12 @@ $roll-.review staged
198
198
 
199
199
  **Review Output:**
200
200
  ```
201
- 🔍 Self Review Report
202
- ├── Scope: X files (+Y/-Z lines)
203
- ├── 🔴 Critical: N issues (must fix)
204
- ├── 🟡 Warnings: N issues (should fix)
205
- ├── 🟢 Suggestions: N items (optional)
206
- └── ✅ Passed dimensions: [...]
201
+ 🔍 $(msg fix.self_review)
202
+ ├── $(msg fix.scope): X files (+Y/-Z lines)
203
+ ├── 🔴 $(msg fix.critical): N issues (must fix)
204
+ ├── 🟡 $(msg fix.warnings): N issues (should fix)
205
+ ├── 🟢 $(msg fix.suggestions): N items (optional)
206
+ └── ✅ $(msg fix.passed_dimensions): [...]
207
207
  ```
208
208
 
209
209
  **Review Dimensions** (correctness guaranteed by TCR):
@@ -269,17 +269,17 @@ Verify the shipped fix on the deployed target:
269
269
  **Fresh evidence** must be provided — claiming completion based on assumptions is not acceptable.
270
270
 
271
271
  ```
272
- 🚦 Verification Gate
272
+ 🚦 $(msg build.verification_gate)
273
273
 
274
- Evidence checklist (each item must have actual output):
275
- ├── [ ] Tests pass: paste actual test run output
276
- ├── [ ] Build succeeds: paste build output
277
- ├── [ ] Issue resolved: screenshot / curl output / log excerpt as proof
278
- └── [ ] No regression: verify at least one existing feature still works
274
+ $(msg build.evidence_checklist):
275
+ ├── [ ] $(msg build.tests_passed)
276
+ ├── [ ] $(msg build.build_succeeded)
277
+ ├── [ ] $(msg fix.issue_resolved): screenshot / curl output / log excerpt as proof
278
+ └── [ ] $(msg build.no_regression)
279
279
 
280
- Gate Decision:
281
- ├── ✅ All items have evidence → Can mark as DONE
282
- └── ❌ Any item lacks evidence → Provide evidence before passing the gate
280
+ $(msg build.gate_decision):
281
+ ├── ✅ $(msg build.gate_pass)
282
+ └── ❌ $(msg build.gate_fail)
283
283
  ```
284
284
 
285
285
  **Hard Rule**: "I confirm tests passed" does not count as evidence. It must be **freshly run** command output from this session.
@@ -6,7 +6,8 @@ description: |
6
6
  Autonomous BACKLOG executor. Runs on a schedule (hourly via cron or GitHub
7
7
  Actions), scans .roll/backlog.md for 📋 Todo items, and routes each to the
8
8
  appropriate skill: US-XXX → $roll-build, FIX-XXX → $roll-fix,
9
- REFACTOR-XXX → $roll-build. Handles agent fallback on token/network failure.
9
+ REFACTOR-XXX → $roll-build. Retries the primary agent up to 3 times on
10
+ transient failure; pauses with ALERT on persistent failure.
10
11
  Never cuts a release autonomously — release is always a human decision.
11
12
  Triggers roll-brief when a Feature completes.
12
13
  ---
@@ -73,8 +74,7 @@ denied operations and the cycle will idle-exit.
73
74
  ```yaml
74
75
  # ~/.roll/config.yaml
75
76
  loop:
76
- primary_agent: claude # claude | deepseek | kimi
77
- fallback_agent: deepseek # used when primary fails
77
+ primary_agent: claude # claude | deepseek | kimi | pi | ...
78
78
  max_items_per_run: 1 # one story per cycle — atomic delivery, predictable cycle time
79
79
  brief_on_feature_complete: true
80
80
  retry_backoff: [2, 4, 8, 16] # seconds, exponential
@@ -103,12 +103,24 @@ this point, any `🔨 In Progress` row in `.roll/backlog.md` belongs to a
103
103
  previous cycle that crashed before flipping it back; reclaim it before
104
104
  scanning.
105
105
 
106
+ **Important — skip `manual-only:*` rows.** A row tagged `manual-only:*`
107
+ means a human (or another non-loop process) has explicitly claimed it;
108
+ it is not loop's to reclaim. Reverting it would silently undo the
109
+ human's claim and cause confusing churn for `roll-brief` / dashboard
110
+ readers. The rule mirrors the gate in Step 2.
111
+
106
112
  1. Scan .roll/backlog.md for all rows whose Status column contains `🔨 In Progress`.
107
- 2. For each row found: revert the status back to `📋 Todo`, commit
108
- `chore: revert orphan 🔨 US-XXX to 📋`, and append a line to
109
- `~/.shared/roll/loop/ALERT-<slug>.md` recording the orphan id and time
110
- so the next brief surfaces it.
111
- 3. After orphan sweep, proceed to Step 1.5 (Pre-run CI health check) before scanning.
113
+ 2. For each candidate row, run the manual-only gate before touching it:
114
+ ```bash
115
+ bash -c 'source "$(command -v roll)"; _loop_is_manual_only "<story-id>" .roll/backlog.md'
116
+ # exit 0 row has `manual-only:*` → SKIP (human-claimed; not orphan)
117
+ # exit 1 → reclaimable orphan; continue to step 3
118
+ ```
119
+ 3. For each row that passes the gate: revert the status back to
120
+ `📋 Todo`, commit `chore: revert orphan 🔨 US-XXX to 📋`, and append
121
+ a line to `~/.shared/roll/loop/ALERT-<slug>.md` recording the orphan
122
+ id and time so the next brief surfaces it.
123
+ 4. After orphan sweep, proceed to Step 1.5 (Pre-run CI health check) before scanning.
112
124
 
113
125
  ### Step 1.5 — Pre-run CI Health Check
114
126
 
@@ -427,21 +439,20 @@ Attempt 1 fails
427
439
 
428
440
  ```
429
441
  Primary agent fails (non-network error)
430
- switch to fallback_agent from config
431
- retry current item with fallback
432
- → if fallback also fails → PAUSE
442
+ 3 attempts at the agent_invoke phase (with 30s back-off between)
443
+ still failing PAUSE
433
444
  ```
434
445
 
435
446
  ### Pause + Alert
436
447
 
437
- When both agents fail:
448
+ When the primary agent exhausts its retry budget:
438
449
 
439
450
  1. Write state:
440
451
  ```yaml
441
452
  status: paused
442
453
  paused_at: "2026-05-10T02:07:00+08:00"
443
454
  paused_on: US-AUTH-003
444
- reason: "both primary (claude) and fallback (deepseek) unavailable"
455
+ reason: "primary agent (claude) unavailable after 3 attempts"
445
456
  ```
446
457
 
447
458
  2. Write alert:
@@ -450,11 +461,11 @@ reason: "both primary (claude) and fallback (deepseek) unavailable"
450
461
 
451
462
  **Time**: 2026-05-10 02:07
452
463
  **Paused on**: US-AUTH-003
453
- **Reason**: claude: token exhausted; deepseek: network error after 5 retries
464
+ **Reason**: claude exited non-zero on 3 consecutive attempts
454
465
 
455
466
  **Action required** (choose one):
456
467
  - Top up credits and run: `roll loop resume`
457
- - Switch agent: edit `~/.roll/config.yaml` → `loop.primary_agent`
468
+ - Switch agent: edit `~/.roll/config.yaml` → `primary_agent`
458
469
  - Take over manually: `$roll-build US-AUTH-003`
459
470
  ```
460
471
 
@@ -65,15 +65,15 @@ Run `roll-doc --dry-run` (READ-ONLY mode). This reports:
65
65
 
66
66
  Present these in chat. **Aim for total time ≤ 3 minutes.** Group 1 confirms your understanding; group 2 scopes the work; group 3 handles privacy and next steps.
67
67
 
68
- **Group 1 — Project cognition check**
68
+ **$(msg onboard.questions_group1)**
69
69
 
70
- 1. I see this is a **[type]** project doing **[description]** — correct?
71
- 2. The main business domains look like **[domain A, domain B, …]** — anything to add or correct?
72
- 3. The key modules are **[X, Y, Z]** — any missed or mis-identified?
70
+ 1. $(msg onboard.q1 "[type]" "[description]")
71
+ 2. $(msg onboard.q2 "[domain A, domain B, …]")
72
+ 3. $(msg onboard.q3 "[X, Y, Z]")
73
73
 
74
- **Group 2 — Generation scope**
74
+ **$(msg onboard.questions_group2)**
75
75
 
76
- 4. Which artifacts should I generate? Multi-select:
76
+ 4. $(msg onboard.q4) Multi-select:
77
77
  - `backlog` — initial BACKLOG with seeded stories
78
78
  - `features` — features index + per-feature spec stubs
79
79
  - `domain` — DDD context map