@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.
- package/CHANGELOG.md +717 -0
- package/LICENSE +21 -0
- package/README.md +65 -165
- package/bin/dream-test-quality-scan +110 -0
- package/bin/roll +14897 -815
- package/conventions/config.yaml +17 -1
- package/conventions/global/AGENTS.md +146 -100
- package/conventions/global/CLAUDE.md +1 -21
- package/conventions/global/GEMINI.md +8 -22
- package/conventions/global/project_rules.md +9 -0
- package/conventions/templates/backend-service/AGENTS.md +30 -81
- package/conventions/templates/backend-service/GEMINI.md +3 -3
- package/conventions/templates/backend-service/project_rules.md +16 -0
- package/conventions/templates/cli/AGENTS.md +31 -58
- package/conventions/templates/cli/CLAUDE.md +3 -5
- package/conventions/templates/cli/GEMINI.md +3 -3
- package/conventions/templates/cli/project_rules.md +16 -0
- package/conventions/templates/frontend-only/AGENTS.md +29 -64
- package/conventions/templates/frontend-only/GEMINI.md +3 -3
- package/conventions/templates/frontend-only/project_rules.md +14 -0
- package/conventions/templates/fullstack/AGENTS.md +31 -79
- package/conventions/templates/fullstack/CLAUDE.md +1 -1
- package/conventions/templates/fullstack/GEMINI.md +3 -3
- package/conventions/templates/fullstack/project_rules.md +15 -0
- package/lib/README.md +42 -0
- package/lib/__pycache__/github_sync.cpython-314.pyc +0 -0
- package/lib/__pycache__/loop-fmt.cpython-314.pyc +0 -0
- package/lib/__pycache__/loop_result_eval.cpython-314.pyc +0 -0
- package/lib/__pycache__/loop_unstick.cpython-314.pyc +0 -0
- package/lib/__pycache__/model_prices.cpython-314.pyc +0 -0
- package/lib/__pycache__/prices_fetcher.cpython-314.pyc +0 -0
- package/lib/__pycache__/roll-home.cpython-314.pyc +0 -0
- package/lib/__pycache__/roll-loop-status.cpython-314.pyc +0 -0
- package/lib/__pycache__/roll_git.cpython-314.pyc +0 -0
- package/lib/__pycache__/roll_render.cpython-314.pyc +0 -0
- package/lib/__pycache__/slides-render.cpython-314.pyc +0 -0
- package/lib/agent_usage/README.md +49 -0
- package/lib/agent_usage/__init__.py +108 -0
- package/lib/agent_usage/__pycache__/__init__.cpython-314.pyc +0 -0
- package/lib/agent_usage/__pycache__/gemini.cpython-314.pyc +0 -0
- package/lib/agent_usage/__pycache__/kimi.cpython-314.pyc +0 -0
- package/lib/agent_usage/__pycache__/openai.cpython-314.pyc +0 -0
- package/lib/agent_usage/__pycache__/pi.cpython-314.pyc +0 -0
- package/lib/agent_usage/__pycache__/pi_emit.cpython-314.pyc +0 -0
- package/lib/agent_usage/__pycache__/qwen.cpython-314.pyc +0 -0
- package/lib/agent_usage/gemini.py +127 -0
- package/lib/agent_usage/kimi.py +278 -0
- package/lib/agent_usage/kimi_emit.py +123 -0
- package/lib/agent_usage/openai.py +126 -0
- package/lib/agent_usage/pi.py +200 -0
- package/lib/agent_usage/pi_emit.py +135 -0
- package/lib/agent_usage/qwen.py +128 -0
- package/lib/backfill-pi-usage.py +243 -0
- package/lib/changelog_audit.py +155 -0
- package/lib/changelog_generate.py +263 -0
- package/lib/context_feed_budget.sh +194 -0
- package/lib/github_sync.py +876 -0
- package/lib/i18n/README.md +54 -0
- package/lib/i18n/agent.sh +75 -0
- package/lib/i18n/alert.sh +20 -0
- package/lib/i18n/backlog.sh +96 -0
- package/lib/i18n/brief.sh +5 -0
- package/lib/i18n/changelog.sh +5 -0
- package/lib/i18n/ci.sh +15 -0
- package/lib/i18n/debug.sh +0 -0
- package/lib/i18n/doctor.sh +44 -0
- package/lib/i18n/dream.sh +0 -0
- package/lib/i18n/init.sh +91 -0
- package/lib/i18n/lang.sh +10 -0
- package/lib/i18n/loop.sh +140 -0
- package/lib/i18n/migrate.sh +74 -0
- package/lib/i18n/offboard.sh +31 -0
- package/lib/i18n/onboard.sh +0 -0
- package/lib/i18n/peer.sh +41 -0
- package/lib/i18n/peer_help.sh +25 -0
- package/lib/i18n/peer_reset.sh +7 -0
- package/lib/i18n/peer_status.sh +5 -0
- package/lib/i18n/prices.sh +3 -0
- package/lib/i18n/prices_refresh.sh +17 -0
- package/lib/i18n/prices_show.sh +7 -0
- package/lib/i18n/propose.sh +0 -0
- package/lib/i18n/release.sh +0 -0
- package/lib/i18n/research.sh +0 -0
- package/lib/i18n/review_pr.sh +0 -0
- package/lib/i18n/sentinel.sh +0 -0
- package/lib/i18n/setup.sh +3 -0
- package/lib/i18n/shared.sh +157 -0
- package/lib/i18n/skills/roll-brief.sh +47 -0
- package/lib/i18n/skills/roll-build.sh +97 -0
- package/lib/i18n/skills/roll-design.sh +18 -0
- package/lib/i18n/skills/roll-fix.sh +53 -0
- package/lib/i18n/skills/roll-loop.sh +28 -0
- package/lib/i18n/skills/roll-onboard.sh +33 -0
- package/lib/i18n/skills_catalog.sh +30 -0
- package/lib/i18n/slides.sh +3 -0
- package/lib/i18n/slides_build.sh +38 -0
- package/lib/i18n/slides_delete.sh +19 -0
- package/lib/i18n/slides_list.sh +14 -0
- package/lib/i18n/slides_logs.sh +12 -0
- package/lib/i18n/slides_new.sh +15 -0
- package/lib/i18n/slides_preview.sh +14 -0
- package/lib/i18n/slides_templates.sh +7 -0
- package/lib/i18n/status.sh +21 -0
- package/lib/i18n/update.sh +24 -0
- package/lib/i18n.sh +211 -0
- package/lib/loop-exit-summary.py +393 -0
- package/lib/loop-fmt.py +589 -0
- package/lib/loop_pick_agent.py +316 -0
- package/lib/loop_result_eval.py +469 -0
- package/lib/loop_unstick.py +180 -0
- package/lib/model_prices.py +186 -0
- package/lib/prices/README.md +35 -0
- package/lib/prices/snapshot-2026-05-22.json +22 -0
- package/lib/prices/snapshot-2026-05-23-deepseek.json +15 -0
- package/lib/prices/snapshot-2026-05-23-kimi.json +14 -0
- package/lib/prices_fetcher.py +285 -0
- package/lib/roll-backlog.py +225 -0
- package/lib/roll-brief.py +286 -0
- package/lib/roll-help.py +158 -0
- package/lib/roll-home.py +556 -0
- package/lib/roll-init.py +156 -0
- package/lib/roll-loop-status.py +1683 -0
- package/lib/roll-loop-story.py +191 -0
- package/lib/roll-onboard-render.py +378 -0
- package/lib/roll-peer.py +252 -0
- package/lib/roll-plan-validate.py +386 -0
- package/lib/roll-setup.py +102 -0
- package/lib/roll-status.py +367 -0
- package/lib/roll_git.py +41 -0
- package/lib/roll_render.py +414 -0
- package/lib/slides/components/README.md +123 -0
- package/lib/slides/components/cards-2.html +9 -0
- package/lib/slides/components/cards-3.html +9 -0
- package/lib/slides/components/cards-4.html +9 -0
- package/lib/slides/components/compare.html +22 -0
- package/lib/slides/components/highlight.html +9 -0
- package/lib/slides/components/pipeline.html +12 -0
- package/lib/slides/components/plain.html +7 -0
- package/lib/slides/components/quote.html +4 -0
- package/lib/slides/components/timeline.html +9 -0
- package/lib/slides/templates/introduction-v3.html +571 -0
- package/lib/slides/templates/pitch.html +0 -0
- package/lib/slides-render.py +778 -0
- package/lib/slides-validate.py +357 -0
- package/lib/test_quality_gate.py +143 -0
- package/package.json +8 -7
- package/skills/roll-.changelog/SKILL.md +406 -33
- package/skills/roll-.clarify/SKILL.md +5 -2
- package/skills/roll-.dream/SKILL.md +374 -0
- package/skills/roll-.echo/SKILL.md +5 -2
- package/skills/roll-.qa/SKILL.md +57 -3
- package/skills/roll-.review/SKILL.md +42 -3
- package/skills/roll-brief/SKILL.md +209 -0
- package/skills/roll-build/SKILL.md +308 -63
- package/skills/roll-debug/SKILL.md +341 -162
- package/skills/roll-debug/injectable-bb.js +263 -0
- package/skills/roll-deck/SKILL.md +296 -0
- package/skills/roll-design/ENGINEERING_CHECKLIST.md +1 -1
- package/skills/roll-design/SKILL.md +727 -94
- package/skills/roll-doc/SKILL.md +595 -0
- package/skills/roll-doctor/SKILL.md +192 -0
- package/skills/roll-fix/SKILL.md +149 -32
- package/skills/{roll-jot → roll-idea}/SKILL.md +18 -10
- package/skills/roll-loop/SKILL.md +578 -0
- package/skills/roll-notes/SKILL.md +103 -0
- package/skills/roll-onboard/SKILL.md +234 -0
- package/skills/roll-peer/SKILL.md +336 -0
- package/skills/roll-propose/SKILL.md +157 -0
- package/skills/roll-review-pr/SKILL.md +58 -0
- package/skills/roll-sentinel/SKILL.md +11 -2
- package/skills/roll-spar/SKILL.md +8 -6
- package/template/.github/workflows/ci.yml +5 -2
- package/template/AGENTS.md +20 -74
- package/skills/roll-research/SKILL.md +0 -307
- package/skills/roll-research/references/schema.json +0 -162
- package/skills/roll-research/scripts/md_to_pdf.py +0 -289
- package/tools/roll-fetch/SKILL.md +0 -182
- package/tools/roll-fetch/package.json +0 -15
- package/tools/roll-fetch/smart-web-fetch.js +0 -558
- package/tools/roll-probe/SKILL.md +0 -84
- /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
|
|
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-
|
|
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
|
|
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
|
|
210
|
+
## Integration with roll-build
|
|
209
211
|
|
|
210
|
-
Spar replaces steps 4-5 in
|
|
212
|
+
Spar replaces steps 4-5 in roll-build (Test Design + TCR Implementation):
|
|
211
213
|
|
|
212
214
|
```
|
|
213
|
-
|
|
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
|
|
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
|
|
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@
|
|
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: '
|
|
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
|
package/template/AGENTS.md
CHANGED
|
@@ -1,80 +1,26 @@
|
|
|
1
|
-
#
|
|
1
|
+
# Agent Conventions
|
|
2
2
|
|
|
3
|
-
|
|
3
|
+
> Project template. Customize section 5 with project-specific rules.
|
|
4
4
|
|
|
5
|
-
|
|
6
|
-
|
|
5
|
+
## 1. Communication
|
|
6
|
+
- User's language. Code/Git/Comments: English. UI: Chinese.
|
|
7
|
+
- Concise. No summaries/code-walking. Outcomes only.
|
|
7
8
|
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
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
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
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
|
-
|
|
23
|
-
-
|
|
24
|
-
-
|
|
25
|
-
-
|
|
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
|
-
##
|
|
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. -->
|