@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
@@ -0,0 +1,157 @@
1
+ ---
2
+ name: roll-propose
3
+ license: MIT
4
+ allowed-tools: "Read, Glob, Grep, Write, Bash(git:*)"
5
+ description: |
6
+ Human-triggered product proposal generator. Reads project context (BACKLOG,
7
+ recent commits, existing skills) and generates 1–3 structured US drafts from
8
+ a user-facing perspective. Writes to .roll/proposals.md for human review — never
9
+ directly to BACKLOG. Distinct from roll-.dream (which surfaces technical debt
10
+ from execution experience); roll-propose thinks in user scenarios and feature
11
+ gaps.
12
+ ---
13
+
14
+ # roll-propose
15
+
16
+ > Follows the Architecture Constraints, Development Discipline, and Engineering
17
+ > Common Sense defined in the project AGENTS.md.
18
+
19
+ Human-triggered skill for product-level feature ideation. Generates structured
20
+ User Story drafts from a product/user perspective and queues them in
21
+ .roll/proposals.md for human approval before entering BACKLOG.
22
+
23
+ ## Distinct from roll-.dream
24
+
25
+ | | roll-propose | roll-.dream |
26
+ |---|---|---|
27
+ | Triggered by | Human explicitly | Nightly schedule |
28
+ | Perspective | User-facing / product scenarios | Code health / technical debt |
29
+ | Output | .roll/proposals.md (pending approval) | BACKLOG (REFACTOR-XXX) |
30
+ | Thinking style | "What would users want next?" | "What is the code telling us?" |
31
+
32
+ ## When to Use
33
+
34
+ ```
35
+ $roll-propose # generate proposals from full context
36
+ $roll-propose 用户反馈里提到了XX # provide a focus hint
37
+ ```
38
+
39
+ ## When Not to Use
40
+
41
+ - Describing a known defect or broken behavior (use `$roll-idea`)
42
+ - A story is already well-defined and ready to build (use `$roll-build`)
43
+ - Exploring technical architecture or design (use `$roll-design`)
44
+ - Surfacing code-level technical debt (use `$roll-.dream`)
45
+
46
+ ## Behavior
47
+
48
+ ### Step 1 — Gather Context
49
+
50
+ Read in parallel:
51
+
52
+ 1. `.roll/backlog.md` — all existing US-XXX, FIX-XXX, REFACTOR-XXX, IDEA-XXX entries (both Todo and Done) to avoid proposing duplicates
53
+ 2. `.roll/proposals.md` (if exists) — already-proposed items (avoid re-proposing rejected or pending ones)
54
+ 3. Recent 20 commits via `git log --oneline -20` — what has recently shipped
55
+ 4. `skills/` directory listing — what capabilities roll already has
56
+ 5. Optional: any focus hint passed by the user
57
+
58
+ ### Step 2 — Think from User Perspective
59
+
60
+ Frame proposals from the **product engineer / end user** point of view:
61
+
62
+ - What recurring friction do users of roll face that no current skill addresses?
63
+ - What workflow is partially covered but has visible gaps?
64
+ - What would make the autonomous loop more legible, controllable, or trustworthy to its human owner?
65
+
66
+ Avoid technical-debt reasoning (that is roll-.dream's domain). Focus on:
67
+ - New user-visible commands or behaviors
68
+ - Improvements to existing UX (output clarity, discoverability, onboarding)
69
+ - Integrations that extend reach (new AI tools, editor support, CI patterns)
70
+
71
+ ### Step 3 — Draft 1–3 Proposals
72
+
73
+ Generate between 1 and 3 proposals. For each:
74
+
75
+ ```
76
+ ## PROPOSAL: {Short title}
77
+ ```
78
+
79
+ `{Short title}` 写法:用户看得懂的一句话,说清楚"加什么"或"解决什么问题"。不用技术术语,不提内部实现。这句话批准后会直接成为 BACKLOG 里的描述。
80
+
81
+ ```
82
+ **Motivation (why):**
83
+ One to two sentences from the user's perspective explaining the pain or opportunity.
84
+
85
+ **Target scenario:**
86
+ Concrete usage example — what the user does, what they see, what they gain.
87
+
88
+ **Acceptance Criteria (draft):**
89
+ - [ ] AC 1
90
+ - [ ] AC 2
91
+ - [ ] AC 3
92
+
93
+ **Suggested ID:** US-{EPIC}-{NNN} (best-guess prefix; human assigns final ID)
94
+ **Suggested Epic / Feature:** {name}
95
+ **Estimated complexity:** {S | M | L}
96
+ ```
97
+
98
+ Complexity guide: S = one skill file or small bin/roll change, M = skill + bin/roll + tests, L = multi-file + new infrastructure.
99
+
100
+ ### Step 4 — Write to .roll/proposals.md
101
+
102
+ Append to `.roll/proposals.md` in the project root (create if absent):
103
+
104
+ ```markdown
105
+ ---
106
+ proposed: {YYYY-MM-DD HH:MM}
107
+ status: pending
108
+ ---
109
+
110
+ {proposals from Step 3}
111
+ ```
112
+
113
+ Use `---` as separator between proposal batches. Never overwrite existing content.
114
+
115
+ ### Step 5 — Report
116
+
117
+ ```
118
+ ✅ roll-propose: {N} proposal(s) written to .roll/proposals.md
119
+
120
+ To approve: move the entry to .roll/backlog.md and assign a US-XXX ID.
121
+ To reject: annotate with "Rejected: {reason}" to suppress future re-proposals.
122
+ ```
123
+
124
+ ## Output Rules
125
+
126
+ - Write proposals in the same language as the project's primary documentation (Chinese for this project).
127
+ - Never write directly to .roll/backlog.md — .roll/proposals.md is the staging area.
128
+ - If a similar proposal already exists in .roll/proposals.md (pending or rejected), note similarity and skip or merge rather than creating a duplicate.
129
+ - Aim for 2 proposals by default; generate 1 if context is thin, 3 if focus hint suggests a rich area.
130
+
131
+ ## .roll/proposals.md Format
132
+
133
+ ```markdown
134
+ # Roll Proposals
135
+
136
+ > 待审批提案。批准后手工移入 .roll/backlog.md 并分配 US-XXX 编号。
137
+ > 拒绝时在条目末尾注明拒绝原因,防止 Agent 重复提出相似提案。
138
+
139
+ ---
140
+ proposed: 2026-05-11 11:30
141
+ status: pending
142
+ ---
143
+
144
+ ## PROPOSAL: ...
145
+
146
+ ...
147
+
148
+ ---
149
+ proposed: 2026-05-08 09:00
150
+ status: rejected
151
+ rejected_reason: 与现有 roll-design 功能重叠,不需要单独技能
152
+ ---
153
+
154
+ ## PROPOSAL: ...
155
+
156
+ ...
157
+ ```
@@ -0,0 +1,58 @@
1
+ ---
2
+ name: roll-review-pr
3
+ license: MIT
4
+ allowed-tools: "Read"
5
+ description: "Agent-agnostic PR review skill. Reviews a pull request diff and emits a structured 3-state verdict (APPROVE / REQUEST_CHANGES / UNCERTAIN). Used by `roll review-pr` and `_loop_pr_review_external`."
6
+ ---
7
+
8
+ # PR Review
9
+
10
+ > Follows the Architecture Constraints, Development Discipline, and Engineering
11
+ > Common Sense defined in the project AGENTS.md.
12
+
13
+ You are reviewing a pull request. Your job is to assess code quality,
14
+ correctness, and adherence to project conventions.
15
+
16
+ ## Context
17
+
18
+ **PR Title:** {{PR_TITLE}}
19
+
20
+ **PR Body:**
21
+ {{PR_BODY}}
22
+
23
+ ## Diff
24
+
25
+ ```diff
26
+ {{PR_DIFF}}
27
+ ```
28
+
29
+ ## Review Instructions
30
+
31
+ 1. Read the diff carefully. Focus on:
32
+ - Correctness: logic errors, off-by-one, unhandled edge cases
33
+ - Security: injection, secrets exposure, unsafe operations
34
+ - Conventions: naming, structure, test coverage (as described in AGENTS.md)
35
+ - Scope: changes should match what the PR title/body claims
36
+
37
+ 2. Write your analysis in free text (2-10 sentences). Be specific — cite file
38
+ names and line numbers when pointing out issues.
39
+
40
+ 3. End your response with exactly ONE verdict footer on its own line:
41
+
42
+ - If the code is acceptable:
43
+ `<!--VERDICT:APPROVE-->`
44
+
45
+ - If changes are needed (cite the most important issue):
46
+ `<!--VERDICT:REQUEST_CHANGES:one-line reason-->`
47
+
48
+ - If you cannot confidently judge (e.g., missing context, domain-specific logic):
49
+ `<!--VERDICT:UNCERTAIN:one-line reason-->`
50
+
51
+ ## Rules
52
+
53
+ - The verdict footer MUST appear on the last non-empty line of your response.
54
+ - Choose exactly one verdict. Do not combine them.
55
+ - REQUEST_CHANGES is for real issues — not style nitpicks or personal preferences.
56
+ - When in doubt between APPROVE and UNCERTAIN, prefer UNCERTAIN.
57
+ - If the PR body contains `[skip-ai-review]`, immediately output
58
+ `<!--VERDICT:APPROVE-->` with no analysis.
@@ -1,5 +1,7 @@
1
1
  ---
2
2
  name: roll-sentinel
3
+ license: MIT
4
+ allowed-tools: "Read, Edit, Write, Bash, WebFetch"
3
5
  description: Smart patrol inspector for production systems. Scheduled randomized sampling checks based on BACKLOG requirements. Cost-controlled AI validation with intelligent spot-checking logic.
4
6
  ---
5
7
 
@@ -7,6 +9,13 @@ description: Smart patrol inspector for production systems. Scheduled randomized
7
9
 
8
10
  **Smart Patrol Inspector** - Scheduled, randomized, cost-controlled patrol and acceptance checks for production systems.
9
11
 
12
+ ## When Not to Use
13
+
14
+ - One-off debugging of a reported bug (use `$roll-debug`)
15
+ - Full-coverage regression testing (sentinel samples, does not cover)
16
+ - Dev/staging environment checks (use CI tests instead)
17
+ - Pre-commit self-review of diffs (use `$roll-.review`)
18
+
10
19
  ## Core Principle
11
20
 
12
21
  ```
@@ -309,7 +318,7 @@ async function batchCheck(stories) {
309
318
  │ └── Decision: create FIX-AUDIO-015 │
310
319
  │ │
311
320
  │ 5. Create Backlog Item │
312
- │ └── Add FIX-AUDIO-015 to BACKLOG.md │
321
+ │ └── Add FIX-AUDIO-015 to .roll/backlog.md │
313
322
  │ └── Status: 📋 Todo │
314
323
  │ └── Awaiting human fix │
315
324
  │ │
@@ -341,7 +350,7 @@ async function batchCheck(stories) {
341
350
  │ $roll-debug On-demand deep diagnosis (aux) │
342
351
  │ (When Sentinel finds an issue, manually trigger deep dive) │
343
352
  │ │
344
- │ $roll-story Post-fix regression verify │
353
+ │ $roll-build Post-fix regression verify │
345
354
  │ │
346
355
  └─────────────────────────────────────────────────────────────┘
347
356
  ```
@@ -1,5 +1,7 @@
1
1
  ---
2
2
  name: roll-spar
3
+ license: MIT
4
+ allowed-tools: "Read, Edit, Write, Bash, Agent, Skill"
3
5
  description: Adversarial TDD mode with Attacker/Defender agents. Attacker writes tests to break the system, Defender writes minimal code to pass. Use for high-risk logic like auth, payments, data integrity, or complex state machines.
4
6
  ---
5
7
 
@@ -109,7 +111,7 @@ User: "$roll-spar implement transfer logic" or agent auto-triggers
109
111
  │ - Defender summarizes defense │
110
112
  │ strategy │
111
113
  │ - Merged report │
112
- │ - Continue normal story-build
114
+ │ - Continue normal roll-build
113
115
  │ flow │
114
116
  │ (push → CI → deploy → verify) │
115
117
  └─────────────────────────────────────┘
@@ -205,12 +207,12 @@ Report to the user after each round:
205
207
  4. **Attack intent must be explained** — cannot just write tests without explaining "why this scenario matters"
206
208
  5. **Maximum round limit** — default 5 rounds, prevents infinite loops
207
209
 
208
- ## Integration with story-build
210
+ ## Integration with roll-build
209
211
 
210
- Spar replaces steps 4-5 in story-build (Test Design + TCR Implementation):
212
+ Spar replaces steps 4-5 in roll-build (Test Design + TCR Implementation):
211
213
 
212
214
  ```
213
- story-build normal flow:
215
+ roll-build normal flow:
214
216
  1. Clarify Story
215
217
  2. Split Actions
216
218
  3. Define verification
@@ -223,7 +225,7 @@ story-build normal flow:
223
225
  ...
224
226
  ```
225
227
 
226
- **Auto-switching from story-build to Spar:**
228
+ **Auto-switching from roll-build to Spar:**
227
229
 
228
230
  When the agent assesses an Action as high-risk at step 3:
229
231
  ```
@@ -232,7 +234,7 @@ When the agent assesses an Action as high-risk at step 3:
232
234
  Recommend enabling Spar mode — confirm? [Y/n]
233
235
  ```
234
236
 
235
- After user confirms, enter Spar. Once complete, return to story-build step 6 to continue.
237
+ After user confirms, enter Spar. Once complete, return to roll-build step 6 to continue.
236
238
 
237
239
  ## Example
238
240
 
@@ -11,12 +11,12 @@ jobs:
11
11
  runs-on: ubuntu-latest
12
12
 
13
13
  steps:
14
- - uses: actions/checkout@v4
14
+ - uses: actions/checkout@v6
15
15
 
16
16
  - name: Setup Node.js
17
17
  uses: actions/setup-node@v4
18
18
  with:
19
- node-version: '20'
19
+ node-version: '24'
20
20
  cache: 'npm'
21
21
 
22
22
  - name: Install dependencies
@@ -30,3 +30,6 @@ jobs:
30
30
 
31
31
  - name: Test
32
32
  run: npm run test -- --run
33
+
34
+ - name: E2E Tests
35
+ run: npm run test:e2e --if-present
@@ -1,80 +1,26 @@
1
- # Project Agents Configuration
1
+ # Agent Conventions
2
2
 
3
- ## Workspace Configuration
3
+ > Project template. Customize section 5 with project-specific rules.
4
4
 
5
- ### Plan Documents Location
6
- **All Plan documents must be stored under the project directory. Writing to the `.kimi/` directory is prohibited.**
5
+ ## 1. Communication
6
+ - User's language. Code/Git/Comments: English. UI: Chinese.
7
+ - Concise. No summaries/code-walking. Outcomes only.
7
8
 
8
- ```yaml
9
- # Plan file storage configuration
10
- plans:
11
- base_dir: docs/plans/ # Relative to the project root
12
- auto_create: true # Auto-create directory if it doesn't exist
13
- naming_convention: "{topic}.md" # Naming convention
14
- ```
9
+ ## 2. Standards
10
+ - **TS**: Strict, no `any`. Functional hooks.
11
+ - **Test**: Unit >80%, E2E for flows. No WIP commits.
12
+ - **Done**: Push + CI passes + deployed. Local-only is not done.
15
13
 
16
- **Rules:**
17
- 1. **Preferred location**: `{project_root}/docs/plans/`
18
- 2. **Auto-create**: If `docs/plans/` doesn't exist, create the directory automatically
19
- 3. **Prohibited location**: Absolutely no writing to `~/.kimi/` or any global config directory
20
- 4. **Non-project Plans**: Only allowed to use a temporary location when there is no project context
14
+ ## 3. Roll Workflow
15
+ - **Design**: `$roll-design` -> Stories -> `.roll/backlog.md`
16
+ - **Build**: `$roll-build` / `$roll-fix` -> TCR (Green=Commit, Red=Revert)
17
+ - **Patrol**: `$roll-sentinel` periodic + `$roll-debug` on failure
18
+ - **Workspace**: `.roll/backlog.md` index. `.roll/features/<feat>.md` for details.
21
19
 
22
- **Examples:**
23
- - `my-project/docs/plans/auth-system.md`
24
- - `my-project/docs/plans/api-redesign.md`
25
- - `~/.kimi/skills/some-plan.md`
26
- - ❌ Any global location outside the project
20
+ ## 4. Architecture
21
+ - **Schema First**: Define types before logic.
22
+ - **Domain Driven**: Organize by business domain, not tech layer.
23
+ - **Decoupling**: UI renders only. Logic in hooks/services.
27
24
 
28
- ## Workflow
29
-
30
- ### Design → $roll-design
31
- - Solution exploration, architecture design
32
- - Split into Stories
33
- - Write to BACKLOG.md
34
-
35
- ### Build → $roll-build / $roll-fix
36
- - Read BACKLOG and execute
37
- - TCR development (independent Actions auto-parallelized + Worktree isolation)
38
- - CI/CD deployment
39
-
40
- ### Check → $roll-sentinel / $roll-debug
41
- - Sentinel: Scheduled patrol
42
- - $roll-debug: Deep diagnosis
43
-
44
- ### Fix → $roll-fix / $roll-design
45
- - Fix issues
46
- - Or re-plan
47
-
48
- ## Architecture Constraints
49
-
50
- ### Agent First
51
- - System designed for AI Agents
52
- - Agent is the primary user
53
- - UI is only a supplementary interface
54
-
55
- ### Data Schema
56
- - Clear data structure definitions
57
- - Type/Schema is the contract between humans and Agents
58
- - Define Schema first, then write business logic
59
-
60
- ### Domain Driven
61
- - Model by business domain
62
- - Not database table design
63
- - Help Agents understand the business
64
-
65
- ### Decoupling Rules
66
- - UI layer only handles rendering; logic lives in Hooks
67
- - API calls encapsulated in services/
68
- - Shared types placed in shared/types/
69
-
70
- ### Testing Requirements
71
- - All business logic must have unit tests
72
- - APIs have integration tests
73
- - Critical flows have E2E tests
74
- - Sentinel runs periodic regression tests
75
-
76
- ## Conventions
77
-
78
- - All work tracked in BACKLOG.md
79
- - Sentinel patrols every 6 hours
80
- - TCR required for all changes
25
+ ## 5. Project Specifics
26
+ <!-- Add project-specific stack, structure, and constraints. -->