@seanyao/roll 3.620.1 → 3.624.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 +46 -0
- package/dist/roll.mjs +4563 -3369
- package/package.json +1 -1
- package/lib/__pycache__/changelog_audit.cpython-314.pyc +0 -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/__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/skills/README.md +0 -64
- package/skills/docs/skill-authoring.md +0 -74
- package/skills/reports/skill-audit-summary.md +0 -53
- package/skills/roll-.changelog/SKILL.md +0 -47
- package/skills/roll-.changelog/references/full-contract.md +0 -462
- package/skills/roll-.clarify/SKILL.md +0 -64
- package/skills/roll-.dream/SKILL.md +0 -47
- package/skills/roll-.dream/references/full-contract.md +0 -365
- package/skills/roll-.echo/SKILL.md +0 -118
- package/skills/roll-.qa/SKILL.md +0 -47
- package/skills/roll-.qa/references/full-contract.md +0 -256
- package/skills/roll-.review/SKILL.md +0 -148
- package/skills/roll-build/SKILL.md +0 -49
- package/skills/roll-build/references/full-contract.md +0 -968
- package/skills/roll-debug/SKILL.md +0 -48
- package/skills/roll-debug/assets/injectable-bb.js +0 -263
- package/skills/roll-debug/references/full-contract.md +0 -607
- package/skills/roll-design/SKILL.md +0 -52
- package/skills/roll-design/references/engineering-checklist.md +0 -298
- package/skills/roll-design/references/full-contract.md +0 -940
- package/skills/roll-doc-audit/SKILL.md +0 -51
- package/skills/roll-doc-audit/references/full-contract.md +0 -796
- package/skills/roll-doctor/SKILL.md +0 -211
- package/skills/roll-fix/SKILL.md +0 -49
- package/skills/roll-fix/references/full-contract.md +0 -672
- package/skills/roll-idea/SKILL.md +0 -62
- package/skills/roll-loop/SKILL.md +0 -50
- package/skills/roll-loop/references/full-contract.md +0 -534
- package/skills/roll-notes/SKILL.md +0 -107
- package/skills/roll-onboard/SKILL.md +0 -238
- package/skills/roll-peer/SKILL.md +0 -47
- package/skills/roll-peer/references/full-contract.md +0 -323
- package/skills/roll-propose/SKILL.md +0 -155
- package/skills/roll-review-pr/SKILL.md +0 -62
- package/skills/roll-spar/SKILL.md +0 -47
- package/skills/roll-spar/references/full-contract.md +0 -288
- package/skills/route-cases/skills.json +0 -216
- package/skills/scripts/audit-skills.mjs +0 -272
- package/skills/scripts/test-audit-skills.mjs +0 -39
- package/skills/tests/fixtures/skill-audit/block-skill/SKILL.md +0 -12
- package/skills/tests/fixtures/skill-audit/minimal-skill/SKILL.md +0 -8
- package/skills/tests/fixtures/skill-audit/quoted-skill/SKILL.md +0 -10
- package/skills/tests/fixtures/skill-audit/route-cases.json +0 -21
- package/skills/tests/fixtures/skill-audit/spoke-skill/SKILL.md +0 -12
- package/skills/tests/fixtures/skill-audit/spoke-skill/references/runbook.md +0 -3
|
@@ -1,672 +0,0 @@
|
|
|
1
|
-
# Full Contract Reference
|
|
2
|
-
|
|
3
|
-
This file preserves the detailed contract extracted from SKILL.md. Read it when the hub points here for exact workflow steps, templates, rubrics, or recovery branches.
|
|
4
|
-
|
|
5
|
-
---
|
|
6
|
-
|
|
7
|
-
# Fix Ship (TCR Edition)
|
|
8
|
-
|
|
9
|
-
> Follows the Architecture Constraints, Development Discipline, and Engineering Common Sense defined in the project AGENTS.md.
|
|
10
|
-
|
|
11
|
-
Execute a single `FIX-XXX` / `BUG-XXX`, suitable for small-scope fixes or hotfixes.
|
|
12
|
-
|
|
13
|
-
## Trigger
|
|
14
|
-
|
|
15
|
-
Use when:
|
|
16
|
-
|
|
17
|
-
- There is a clearly defined `FIX-XXX` or `BUG-XXX`
|
|
18
|
-
- It is a single issue, single hotfix, or single small enhancement
|
|
19
|
-
- It does not need to be split into multiple Stories / Actions to deliver
|
|
20
|
-
|
|
21
|
-
**Workflow:**
|
|
22
|
-
1. Read .roll/backlog.md index → Find FIX/BUG row → Follow link to `.roll/features/<epic>/<story>/spec.md`
|
|
23
|
-
2. Single Action (no splitting)
|
|
24
|
-
3. Execute via TCR workflow
|
|
25
|
-
4. Write back: update .roll/backlog.md status column + update FIX section in Feature file
|
|
26
|
-
|
|
27
|
-
Do not use for:
|
|
28
|
-
|
|
29
|
-
- Multi-step feature development
|
|
30
|
-
- Large changes spanning multiple subsystems
|
|
31
|
-
- Requirements that need planning and splitting first
|
|
32
|
-
- Roadmap work that should be tracked as Stories
|
|
33
|
-
|
|
34
|
-
If the issue expands beyond a single bounded change, switch to `roll-build`.
|
|
35
|
-
|
|
36
|
-
## Project Context Rule
|
|
37
|
-
|
|
38
|
-
Before creating any file or directory:
|
|
39
|
-
|
|
40
|
-
1. **Read existing project structure** — check for `package.json`, `go.mod`, `Cargo.toml`, `pyproject.toml`, existing `src/`, `api/`, `cmd/` directories
|
|
41
|
-
2. **Infer conventions from evidence** — don't assume a project type; observe what already exists
|
|
42
|
-
3. **Follow what already exists** — introduce new patterns only when the current structure has no precedent
|
|
43
|
-
|
|
44
|
-
> `roll init` no longer asks for project type. Skills are responsible for reading context and acting accordingly.
|
|
45
|
-
|
|
46
|
-
---
|
|
47
|
-
|
|
48
|
-
## Hard Rules
|
|
49
|
-
|
|
50
|
-
0. **Worktree-first, PR-at-end (ALWAYS)**
|
|
51
|
-
Before editing, work in a dedicated git worktree on its own branch
|
|
52
|
-
(`git worktree add ../wt-<id> -b <branch>`), never the shared checkout —
|
|
53
|
-
concurrent cycles/sessions must not collide. Finish by pushing the branch
|
|
54
|
-
and opening a PR; `main` is PR-protected — NEVER `git push origin main`.
|
|
55
|
-
(Under `roll-loop` the runner handles the worktree + PR; this rule is the
|
|
56
|
-
manual-path equivalent and holds either way.)
|
|
57
|
-
|
|
58
|
-
1. **No local-only "done"**
|
|
59
|
-
Even for a minor change, the work is not complete until it reaches:
|
|
60
|
-
- TCR micro-commits (test-guaranteed working states)
|
|
61
|
-
- local verification
|
|
62
|
-
- Quality review (post-TCR, via code-reviewer skill)
|
|
63
|
-
- commit
|
|
64
|
-
- push
|
|
65
|
-
- CI signal
|
|
66
|
-
- deploy
|
|
67
|
-
- online verification
|
|
68
|
-
|
|
69
|
-
2. **Keep it to one issue**
|
|
70
|
-
This skill is for one user-visible issue, one hotfix, or one tightly related enhancement bundle.
|
|
71
|
-
|
|
72
|
-
3. **Test Design Review first**
|
|
73
|
-
- Design the test/verification approach before implementation
|
|
74
|
-
- Run `code-reviewer` on test design for coverage validation
|
|
75
|
-
- Ensure we're testing the right thing before TCR begins
|
|
76
|
-
|
|
77
|
-
4. **TCR for all changes**
|
|
78
|
-
- Follow Test → Green=Commit / Red=Revert for each micro-step
|
|
79
|
-
- Even "one-liner" fixes get a TCR cycle
|
|
80
|
-
- Each commit is a guaranteed working state
|
|
81
|
-
|
|
82
|
-
5. **Quality Review before final commit** (Post-TCR)
|
|
83
|
-
After TCR cycles complete:
|
|
84
|
-
- Run `code-reviewer` skill on the diff
|
|
85
|
-
- Review focuses on **quality** (naming, patterns, scope)
|
|
86
|
-
- Correctness already guaranteed by TCR
|
|
87
|
-
- blocking findings (Critical issues) must be fixed via new TCR cycle
|
|
88
|
-
|
|
89
|
-
6. **Do not force backlog churn**
|
|
90
|
-
By default, do not update backlog or project status files.
|
|
91
|
-
Only write back project tracking if:
|
|
92
|
-
- the user asked for it
|
|
93
|
-
- the change affects roadmap-visible behavior
|
|
94
|
-
- the fix should be tracked for follow-up work
|
|
95
|
-
|
|
96
|
-
7. **Docs/code/product stay aligned**
|
|
97
|
-
- User-visible behavior, command, output-copy, site, or delivery-view changes update the touched README/docs/guide/site/help in the same delivery
|
|
98
|
-
- Registry drift from FIX-242 remains a hard red line; `roll attest` doc-gap is a shadow warning and should be resolved before Done
|
|
99
|
-
|
|
100
|
-
## TCR Workflow
|
|
101
|
-
|
|
102
|
-
### 0. Pre-flight self-check (US-AGENT-007)
|
|
103
|
-
|
|
104
|
-
Before locking the issue, read the FIX's Agent profile (est_min / chain_depth) from the linked feature md and decide whether this cycle should attempt the fix:
|
|
105
|
-
|
|
106
|
-
```
|
|
107
|
-
inputs:
|
|
108
|
-
fix.est_min (from **Agent profile:** block on the FIX row's feature md)
|
|
109
|
-
fix.chain_depth (0 unless already a downgrade product)
|
|
110
|
-
|
|
111
|
-
verdict:
|
|
112
|
-
too_big when:
|
|
113
|
-
fix.est_min > 20 (lands in the `hard` complexity tier)
|
|
114
|
-
ok otherwise
|
|
115
|
-
```
|
|
116
|
-
|
|
117
|
-
Routing is a single axis now (US-AGENT-022): `est_min` maps to one of three
|
|
118
|
-
complexity tiers — `easy` (≤8), `default` (8<x≤20), `hard` (>20) — and each
|
|
119
|
-
tier binds to a locally-installed agent slot in `.roll/agents.yaml` (model =
|
|
120
|
-
the agent's own default; a `fallback` slot mechanically covers an unavailable
|
|
121
|
-
agent). The retired v1 model (three-dimension type/est/risk_zone matching
|
|
122
|
-
against `agent-routes.yaml`, soft history hit-rate preference, per-agent
|
|
123
|
-
`max_est_min`/`risk`) no longer applies. The pre-flight verdict here is just
|
|
124
|
-
the `hard`-tier boundary: a FIX estimated past it is a sanity signal that the
|
|
125
|
-
"single small fix" assumption may be wrong.
|
|
126
|
-
|
|
127
|
-
Emit `verdict: ok` or `verdict: too_big` (with `reason:`) as the first cycle output line.
|
|
128
|
-
|
|
129
|
-
- `ok` → continue with step 1 below normally
|
|
130
|
-
- `too_big` → **self-downgrade** rather than TCR a half fix:
|
|
131
|
-
|
|
132
|
-
1. Invoke `roll-design --from-story FIX-XXX` to mint ≥2 smaller sub-stories.
|
|
133
|
-
Each inherits the original FIX's inbound dependencies — never the FIX itself
|
|
134
|
-
(the parked parent would deadlock its children).
|
|
135
|
-
2. Hand the split to the loop:
|
|
136
|
-
|
|
137
|
-
```bash
|
|
138
|
-
roll loop self-downgrade FIX-XXX "<one-line reason>" <subA,subB,...>
|
|
139
|
-
```
|
|
140
|
-
|
|
141
|
-
It parks the FIX at 🚫 Hold, appends the sub-stories as 📋 Todo rows (correct
|
|
142
|
-
`depends-on`, `chain_depth + 1`, never the parent), closes any open PR for
|
|
143
|
-
the FIX and deletes its branch (invariant I3), and records a `story:split`
|
|
144
|
-
event.
|
|
145
|
-
3. Exit cleanly — **no TCR commits this cycle**.
|
|
146
|
-
|
|
147
|
-
The command enforces the chain-depth cap (US-AGENT-009): a FIX whose chain has
|
|
148
|
-
already auto-split twice, or one that yields fewer than 2 sub-stories, is parked
|
|
149
|
-
at 🚫 Hold with an ALERT for human triage (a `story:split` with `capped: true`)
|
|
150
|
-
rather than recursing. Do NOT TCR a half fix.
|
|
151
|
-
|
|
152
|
-
Bug fixes are usually small (est_min ≤ 5), so pre-flight is mostly a sanity barrier for FIXes whose underlying issue turns out structural — e.g. a "simple null check" that requires touching 12 files. Catching that upfront is cheaper than burning a cycle.
|
|
153
|
-
|
|
154
|
-
### 1. Lock the issue
|
|
155
|
-
- state the user-visible issue or requested enhancement
|
|
156
|
-
- define the scope boundary and non-goals
|
|
157
|
-
|
|
158
|
-
### 2. Define verification
|
|
159
|
-
- pick the narrowest local check that proves the fix
|
|
160
|
-
- define the online verification target
|
|
161
|
-
- for hotfixes: include regression test to prevent recurrence
|
|
162
|
-
- reference `$roll-.qa` for appropriate test type (unit/integration/E2E)
|
|
163
|
-
- **Test-quality self-check (US-QA-011)** — for any new test the fix adds:
|
|
164
|
-
1. The test must call project functions / public command entry points,
|
|
165
|
-
not inline `sed`/`awk`/`grep -o`/`find`/`cut` pipelines that
|
|
166
|
-
re-implement what `lib/` or `bin/` already does — rubric ❼.
|
|
167
|
-
2. The test must sandbox filesystem state via `BATS_TMPDIR` or an
|
|
168
|
-
equivalent helper; never assert on or write to paths outside this
|
|
169
|
-
repo (`~/.codex`, `~/.kimi`, `~/.roll/`, system paths) — rubric ❽.
|
|
170
|
-
3. If you can't satisfy (1) or (2), extract a project helper or
|
|
171
|
-
redirect the env var to a tmp dir before writing the test.
|
|
172
|
-
|
|
173
|
-
### 3. Test Design Review (TCR Core)
|
|
174
|
-
|
|
175
|
-
```
|
|
176
|
-
🧪 $(msg fix.test_design):
|
|
177
|
-
|
|
178
|
-
$(msg fix.verification_approach): {unit test | integration test | manual check}
|
|
179
|
-
|
|
180
|
-
$(msg fix.test_scenarios):
|
|
181
|
-
├── $(msg fix.fix_verification): {how to confirm the fix works}
|
|
182
|
-
└── $(msg fix.regression_check): {how to ensure we didn't break anything}
|
|
183
|
-
```
|
|
184
|
-
|
|
185
|
-
**Reference `$roll-.qa` for test strategy:**
|
|
186
|
-
- Even for fixes, follow `$roll-.qa` test pyramid
|
|
187
|
-
- Hotfixes may skip visual regression but must have E2E smoke test
|
|
188
|
-
|
|
189
|
-
**Run self-review on test design:**
|
|
190
|
-
- Is the verification approach appropriate for this fix?
|
|
191
|
-
- Are edge cases covered?
|
|
192
|
-
- Is the regression check sufficient?
|
|
193
|
-
|
|
194
|
-
### 4. TCR Implementation
|
|
195
|
-
|
|
196
|
-
```
|
|
197
|
-
┌─────────────────────────────────────────────────────────────────────┐
|
|
198
|
-
│ $(msg fix.tcr_cycle) │
|
|
199
|
-
└─────────────────────────────────────────────────────────────────────┘
|
|
200
|
-
|
|
201
|
-
$(msg fix.micro_step 1 "{description of the fix}")
|
|
202
|
-
|
|
203
|
-
Step 1: Write/Update Test
|
|
204
|
-
└── Run test → Confirm RED (bug reproduced or test fails)
|
|
205
|
-
|
|
206
|
-
Step 2: Implement Fix
|
|
207
|
-
└── Write minimal code to fix the issue
|
|
208
|
-
|
|
209
|
-
Step 3: TCR Decision
|
|
210
|
-
└── Run test
|
|
211
|
-
├── ✅ GREEN → git commit -m "tcr: fix {issue description}"
|
|
212
|
-
└── ❌ RED → git checkout -- . → Retry
|
|
213
|
-
|
|
214
|
-
For simple fixes, this may be a single TCR cycle.
|
|
215
|
-
For complex fixes, use multiple micro-steps.
|
|
216
|
-
```
|
|
217
|
-
|
|
218
|
-
### 5. Local integration check (Pre-Push CI Gate)
|
|
219
|
-
|
|
220
|
-
Run the repo's full CI check locally to catch issues before push:
|
|
221
|
-
|
|
222
|
-
```bash
|
|
223
|
-
# Run local CI (format + lint + build + test)
|
|
224
|
-
npm run ci:local 2>/dev/null || (npm run lint && npm run build && npm test -- --run)
|
|
225
|
-
```
|
|
226
|
-
|
|
227
|
-
**Reference `$roll-.qa` for coverage requirements:**
|
|
228
|
-
- Fixes must not reduce overall coverage
|
|
229
|
-
- Hotfixes need at least regression test coverage
|
|
230
|
-
|
|
231
|
-
**If failures:**
|
|
232
|
-
```
|
|
233
|
-
❌ Local CI check failed
|
|
234
|
-
├── Run 'npm run ci:fix' to auto-fix formatting issues
|
|
235
|
-
├── Fix lint/build/test errors
|
|
236
|
-
└── Re-run checks until passing
|
|
237
|
-
```
|
|
238
|
-
|
|
239
|
-
**Setup ci:local script (if not exists):**
|
|
240
|
-
Add to `package.json`:
|
|
241
|
-
```json
|
|
242
|
-
{
|
|
243
|
-
"scripts": {
|
|
244
|
-
"ci:local": "npm run format:check && npm run lint && npm run build && npm run test -- --run",
|
|
245
|
-
"ci:fix": "npm run format && npm run lint -- --fix"
|
|
246
|
-
}
|
|
247
|
-
}
|
|
248
|
-
```
|
|
249
|
-
|
|
250
|
-
**Setup pre-push hook (optional but recommended):**
|
|
251
|
-
```bash
|
|
252
|
-
cat > .git/hooks/pre-push << 'EOF'
|
|
253
|
-
#!/bin/bash
|
|
254
|
-
echo "🔍 Running local CI checks..."
|
|
255
|
-
if ! npm run ci:local 2>/dev/null && ! (npm run lint && npm run build); then
|
|
256
|
-
echo "❌ CI check failed, push blocked"
|
|
257
|
-
exit 1
|
|
258
|
-
fi
|
|
259
|
-
echo "✅ CI check passed"
|
|
260
|
-
EOF
|
|
261
|
-
chmod +x .git/hooks/pre-push
|
|
262
|
-
```
|
|
263
|
-
|
|
264
|
-
### 6. Quality Review (Post-TCR)
|
|
265
|
-
|
|
266
|
-
**Run self-code-review on staged changes:**
|
|
267
|
-
|
|
268
|
-
```bash
|
|
269
|
-
$roll-.review staged
|
|
270
|
-
```
|
|
271
|
-
|
|
272
|
-
**Review Output:**
|
|
273
|
-
```
|
|
274
|
-
🔍 $(msg fix.self_review)
|
|
275
|
-
├── $(msg fix.scope): X files (+Y/-Z lines)
|
|
276
|
-
├── 🔴 $(msg fix.critical): N issues (must fix)
|
|
277
|
-
├── 🟡 $(msg fix.warnings): N issues (should fix)
|
|
278
|
-
├── 🟢 $(msg fix.suggestions): N items (optional)
|
|
279
|
-
└── ✅ $(msg fix.passed_dimensions): [...]
|
|
280
|
-
```
|
|
281
|
-
|
|
282
|
-
**Review Dimensions** (correctness guaranteed by TCR):
|
|
283
|
-
- 🎯 **Code Quality**: Naming clarity, KISS, readability
|
|
284
|
-
- 📐 **Design**: Appropriate abstraction, codebase consistency
|
|
285
|
-
- ⚠️ **Scope**: Fix is minimal, no opportunistic changes
|
|
286
|
-
- 📝 **Hotfix-specific**: Root cause addressed
|
|
287
|
-
|
|
288
|
-
**Decision:**
|
|
289
|
-
```
|
|
290
|
-
🔴 Critical > 0 → Fix via new TCR cycle → Re-review
|
|
291
|
-
🟡 Warnings > 0 → Fix if quick or document
|
|
292
|
-
🟢/✅ All clear → Proceed to push
|
|
293
|
-
```
|
|
294
|
-
|
|
295
|
-
**Note:** `code-reviewer` placeholder replaced with `$roll-.review` for local execution.
|
|
296
|
-
|
|
297
|
-
### 7. Commit and push (branch + PR — NEVER direct to main)
|
|
298
|
-
|
|
299
|
-
`main` is PR-protected. Push the worktree's branch and open a PR — never
|
|
300
|
-
`git push origin main`. (Under `roll-loop` the runner already made the
|
|
301
|
-
worktree + branch and opens the PR; this is the manual-path equivalent.)
|
|
302
|
-
|
|
303
|
-
```bash
|
|
304
|
-
# TCR commits already made on the worktree's branch (see Hard Rule 0).
|
|
305
|
-
git push -u origin <branch>
|
|
306
|
-
gh pr create --title "{fix|hotfix}: …" --body "…"
|
|
307
|
-
# After CI is green: gh pr merge --rebase
|
|
308
|
-
```
|
|
309
|
-
|
|
310
|
-
Commit message:
|
|
311
|
-
```
|
|
312
|
-
{fix|hotfix|feat}: {description}
|
|
313
|
-
|
|
314
|
-
- {what was fixed}
|
|
315
|
-
- {root cause if known}
|
|
316
|
-
- {test coverage}
|
|
317
|
-
```
|
|
318
|
-
|
|
319
|
-
### 8. Watch CI and resolve
|
|
320
|
-
|
|
321
|
-
```
|
|
322
|
-
⏳ CI Running...
|
|
323
|
-
├── ✅ PASS → Proceed to deploy
|
|
324
|
-
└── ❌ FAIL →
|
|
325
|
-
├── Diagnose
|
|
326
|
-
├── TCR cycle to fix
|
|
327
|
-
└── Push and retry
|
|
328
|
-
```
|
|
329
|
-
|
|
330
|
-
### 9. Deploy
|
|
331
|
-
|
|
332
|
-
Follow the repo's normal deployment path.
|
|
333
|
-
|
|
334
|
-
### 10. Online verification
|
|
335
|
-
|
|
336
|
-
Verify the shipped fix on the deployed target:
|
|
337
|
-
- confirm the issue is resolved
|
|
338
|
-
- confirm the previously working path still works
|
|
339
|
-
- for hotfixes: verify in production environment
|
|
340
|
-
|
|
341
|
-
### 10.5. Verification Gate (MANDATORY)
|
|
342
|
-
|
|
343
|
-
**Before marking as DONE, the verification gate must be passed.**
|
|
344
|
-
|
|
345
|
-
**Fresh evidence** must be provided — claiming completion based on assumptions is not acceptable.
|
|
346
|
-
|
|
347
|
-
```
|
|
348
|
-
🚦 $(msg build.verification_gate)
|
|
349
|
-
|
|
350
|
-
$(msg build.evidence_checklist):
|
|
351
|
-
├── [ ] $(msg build.tests_passed)
|
|
352
|
-
├── [ ] $(msg build.build_succeeded)
|
|
353
|
-
├── [ ] $(msg fix.issue_resolved): screenshot / curl output / log excerpt as proof
|
|
354
|
-
└── [ ] $(msg build.no_regression)
|
|
355
|
-
|
|
356
|
-
$(msg build.gate_decision):
|
|
357
|
-
├── ✅ $(msg build.gate_pass)
|
|
358
|
-
└── ❌ $(msg build.gate_fail)
|
|
359
|
-
```
|
|
360
|
-
|
|
361
|
-
**Hard Rule**: "I confirm tests passed" does not count as evidence. It must be **freshly run** command output from this session.
|
|
362
|
-
|
|
363
|
-
### 10.6: Acceptance Evidence (after Gate PASS)
|
|
364
|
-
|
|
365
|
-
Runs ONLY on a ✅ Gate PASS (a FAIL retry must not mint a misleading report). Non-blocking: any failure here → WARN, continue to Step 11.
|
|
366
|
-
|
|
367
|
-
0. **Before/after pairing (owner ruling 2026-06-06)**: for a FIX, capture the
|
|
368
|
-
BROKEN state at reproduction time (screenshot when the surface is visible —
|
|
369
|
-
terminal run, panel, page) into `screenshots/before-*.png`; after the fix
|
|
370
|
-
passes, capture the SAME surface into `screenshots/after-*.png`. The pair is
|
|
371
|
-
the strongest possible fix evidence — reviewers see the delta, not a claim.
|
|
372
|
-
Behavior-changing stories: same pattern where a prior state exists.
|
|
373
|
-
Brand-new capability with nothing to contrast: skip — never stage a fake
|
|
374
|
-
"before".
|
|
375
|
-
|
|
376
|
-
1. **Dump raw evidence** produced in this session to story-level dirs:
|
|
377
|
-
`.roll/features/<epic>/{ID}/screenshots/*.png` — the DEFAULT evidence class for
|
|
378
|
-
every surface, **CLI included** (US-ATTEST-010): text evidence is the agent's
|
|
379
|
-
own report (nothing stops a fabricated `echo "✓ passed" > evidence.txt`); a
|
|
380
|
-
screenshot is an OS-level capture of really-rendered pixels — an independent
|
|
381
|
-
channel with a categorically higher forgery cost. Combined with the
|
|
382
|
-
never-overwritten run dirs (D4) and the render-layer red line, it is the
|
|
383
|
-
strongest link in the evidence chain.
|
|
384
|
-
`.roll/features/<epic>/{ID}/evidence/*.txt` (resolve `<epic>` via `.roll/index.json`; `roll attest` writes the report there as `{ID}-report.html`) — supplementary (searchable,
|
|
385
|
-
copyable); keep raw command outputs here, but do not let a text file be the
|
|
386
|
-
ONLY evidence for an AC that has a visible surface.
|
|
387
|
-
|
|
388
|
-
**CLI capture recipe**: run the verifying command in a REAL terminal (the
|
|
389
|
-
tmux observation window `roll-loop-<slug>` is a natural target — display the
|
|
390
|
-
proof there), then `screencapture -x -R <window-rect>` (macOS) into
|
|
391
|
-
`screenshots/`. Capture ONLY the relevant work area — a focused window, not
|
|
392
|
-
the whole desktop. Unattended cycles: drive the capture from the dispatcher
|
|
393
|
-
(deterministic), never hand-craft an image; if the capture channel is
|
|
394
|
-
unavailable (no GUI session / no permission), fall back to text evidence and
|
|
395
|
-
mark the AC `partial` with a note — never fake a screenshot.
|
|
396
|
-
2. **Write the intent map** `.roll/features/<epic>/{ID}/ac-map.json` — for EVERY AC (ids `{ID}:AC1..n`) pick `pass|readonly|partial|claimed|missing` and reference only evidence that exists (paths relative to the run dir; story-level dirs are reachable as `../evidence/...` / `../screenshots/...`):
|
|
397
|
-
|
|
398
|
-
```json
|
|
399
|
-
[{ "ac": "{ID}:AC1", "status": "pass",
|
|
400
|
-
"evidence": [
|
|
401
|
-
{ "kind": "screenshot", "label": "terminal run (real pixels)", "href": "../screenshots/ac1-terminal.png" },
|
|
402
|
-
{ "kind": "text", "label": "vitest (supplementary)", "textFile": "../evidence/vitest.txt" }
|
|
403
|
-
] }]
|
|
404
|
-
```
|
|
405
|
-
|
|
406
|
-
No evidence for an AC → say `claimed` yourself; the renderer enforces that downgrade anyway (red line) and lists it under Discrepancies.
|
|
407
|
-
3. **Run** `roll attest {ID}` (add `--deploy-url <url>` when one exists). The report lands at `.roll/features/<epic>/{ID}/latest/{ID}-report.html` (archive-per-card layout, US-META-001). The report is now layered (US-ATTEST-013): card context + conclusion/business badges + key screenshots up front, technical ANSI/command output folded into collapsed `<details>`, and a closing block (quality gate + evidence index + Review Score). A FIX usually carries a before/after pair (`screenshots/before-*.png` + `after-*.png`) — the坏态/好态 contrast is the clearest proof a bug is gone.
|
|
408
|
-
4. **Design QA checklist (US-ATTEST-013) — READABILITY ONLY**. After the report
|
|
409
|
-
renders, open it and run the checklist below. This is a presentation review of
|
|
410
|
-
the rendered HTML, NOT an evidence review.
|
|
411
|
-
**HARD RULE: this checklist NEVER changes any AC's status, evidence, or
|
|
412
|
-
`pass|readonly|partial|fail|blocked|claimed|missing` verdict.** Those are
|
|
413
|
-
fixed at step 2 (the ac-map) and enforced by the render-layer red line. If a
|
|
414
|
-
readability item fails, fix the *presentation* (a missing context field, an
|
|
415
|
-
uncropped screenshot, a layout overflow) — never edit a verdict to make the
|
|
416
|
-
report look cleaner.
|
|
417
|
-
- [ ] **首屏 10s 可懂** — a reviewer grasps what was fixed and whether it passed
|
|
418
|
-
within ten seconds, without scrolling into the technical fold.
|
|
419
|
-
- [ ] **390 / 320px 无横滚** — no horizontal scroll at mobile widths; before/after
|
|
420
|
-
pairs stack rather than overflow.
|
|
421
|
-
- [ ] **打印可读** — print preview (or print-to-PDF) is legible; AC cards don't
|
|
422
|
-
split awkwardly across pages.
|
|
423
|
-
- [ ] **状态不只靠颜色** — every status reads from its icon + bilingual word, not
|
|
424
|
-
color alone (colorblind-safe).
|
|
425
|
-
- [ ] **截图裁切与清晰度** — screenshots are cropped to the relevant work area and
|
|
426
|
-
legible; no full-desktop captures, no blurry/half-rendered frames.
|
|
427
|
-
If you cannot open the report (headless cycle), note that the design QA was
|
|
428
|
-
deferred and say so in the cycle report — do NOT silently skip it, and do NOT
|
|
429
|
-
substitute it for an evidence judgement.
|
|
430
|
-
|
|
431
|
-
### 11. Write Back Status (when tracking is needed)
|
|
432
|
-
|
|
433
|
-
Only update when Hard Rule #6 conditions are met (user requested, affects roadmap-visible behavior, or needs follow-up tracking).
|
|
434
|
-
|
|
435
|
-
Both locations must be updated — neither can be skipped:
|
|
436
|
-
|
|
437
|
-
**① Update .roll/backlog.md index row (Status column):**
|
|
438
|
-
|
|
439
|
-
**Location rule (FIX-198)**: edit the MAIN project's backlog by ABSOLUTE path — `${ROLL_MAIN_PROJECT:-$PWD}/.roll/backlog.md`. In ordinary projects the cycle worktree has NO `.roll/` (gitignored, never checked out): a relative `.roll/backlog.md` edit writes into the void and the flip silently vanishes.
|
|
440
|
-
|
|
441
|
-
|
|
442
|
-
```markdown
|
|
443
|
-
| [FIX-{ID}](.roll/features/<epic>/FIX-{ID}/spec.md) | {Title} | ✅ Done · [evidence](.roll/features/<epic>/FIX-{ID}/latest/FIX-{ID}-report.html) |
|
|
444
|
-
```
|
|
445
|
-
|
|
446
|
-
Change the Status of the corresponding row from `📋 Todo` or `🔨 In Progress` (whichever the row currently shows) to `✅ Done`. When invoked by `roll-loop`, the row will already be `🔨 In Progress` — that is the expected starting state.
|
|
447
|
-
|
|
448
|
-
**② Update `.roll/features/<epic>/<story>/spec.md`:**
|
|
449
|
-
|
|
450
|
-
```markdown
|
|
451
|
-
## FIX-{ID} {description} ✅
|
|
452
|
-
|
|
453
|
-
**Fixed**: {YYYY-MM-DD}
|
|
454
|
-
|
|
455
|
-
**Problem**: {problem description}
|
|
456
|
-
**Root Cause**: {root cause}
|
|
457
|
-
**Solution**: {solution}
|
|
458
|
-
|
|
459
|
-
**Files:**
|
|
460
|
-
- `{modified file}`
|
|
461
|
-
```
|
|
462
|
-
|
|
463
|
-
- Add ✅ to the title
|
|
464
|
-
- Add `**Fixed**` date
|
|
465
|
-
- Change AC (if any) from `[ ]` to `[x]`
|
|
466
|
-
- Update Files to reflect actual changed files
|
|
467
|
-
|
|
468
|
-
### 12. Update Changelog
|
|
469
|
-
|
|
470
|
-
**Mandatory** — the release (GitHub Release body = this version's changelog section) depends on this step. Do not skip.
|
|
471
|
-
|
|
472
|
-
```bash
|
|
473
|
-
$roll-.changelog
|
|
474
|
-
```
|
|
475
|
-
|
|
476
|
-
### 13. Report
|
|
477
|
-
|
|
478
|
-
Summarize:
|
|
479
|
-
- shipped fix/enhancement
|
|
480
|
-
- TCR statistics
|
|
481
|
-
- quality review outcome
|
|
482
|
-
- verification results
|
|
483
|
-
- any residual risk
|
|
484
|
-
- **.roll/backlog.md updated** ✅
|
|
485
|
-
- **CHANGELOG.md updated** ✅
|
|
486
|
-
|
|
487
|
-
## Required Artifacts
|
|
488
|
-
|
|
489
|
-
The agent must explicitly output before or during execution:
|
|
490
|
-
|
|
491
|
-
- **Current Issue**: one sentence describing the bug, hotfix, or small enhancement
|
|
492
|
-
- **Current Fix**: the smallest shippable fix
|
|
493
|
-
- **Acceptance criteria**: measurable outcomes
|
|
494
|
-
- **Write scope**: expected files or areas
|
|
495
|
-
- **Test Design**: verification approach and scenarios
|
|
496
|
-
- **Test Design Review**: coverage validation
|
|
497
|
-
- **TCR Log**: micro-step(s) and commit(s)
|
|
498
|
-
- **Quality Review**: post-TCR review results
|
|
499
|
-
- **Deployment target**: where it will be verified
|
|
500
|
-
|
|
501
|
-
## Definition of Done
|
|
502
|
-
|
|
503
|
-
A minor change is only "done" when all are true:
|
|
504
|
-
|
|
505
|
-
- [ ] Issue clearly defined and scoped
|
|
506
|
-
- [ ] Test design reviewed and approved
|
|
507
|
-
- [ ] **TCR cycle(s) completed** (fix via Test && Commit)
|
|
508
|
-
- [ ] All commits are green states
|
|
509
|
-
- [ ] Local integration checks pass
|
|
510
|
-
- [ ] **Docs/code/product aligned** (user-visible changes updated touched README/docs/guide/site/help, or the delivery records why no doc surface changed)
|
|
511
|
-
- [ ] Quality review (code-reviewer) passed, blocking issues resolved via TCR
|
|
512
|
-
- [ ] Changes pushed
|
|
513
|
-
- [ ] CI is green (or explicit, recorded exception exists)
|
|
514
|
-
- [ ] Deployment completed
|
|
515
|
-
- [ ] Online verification performed
|
|
516
|
-
- [ ] **Verification Gate passed** (fresh evidence for tests, build, fix confirmation, no regression)
|
|
517
|
-
### Review Score (FIX-343)
|
|
518
|
-
|
|
519
|
-
The Review Score is **not** produced by this skill. The fixing agent **does NOT
|
|
520
|
-
self-score**. The quality score is produced SOLELY by the runner's peer score
|
|
521
|
-
stage — a Reviewer running in a FRESH, separate session (never a sub-agent of
|
|
522
|
-
the builder's session). The agent's job is to deliver clean evidence (report +
|
|
523
|
-
ac-map + attest); the runner then casts a fresh-session Reviewer that mints the
|
|
524
|
-
Review Score (1..10 + verdict + rationale), recorded with `scoredBy` and the
|
|
525
|
-
fresh-session id so independence is verifiable.
|
|
526
|
-
|
|
527
|
-
Independence is about session/context, not vendor: a fresh same-vendor session
|
|
528
|
-
is the minimum acceptable; a different agent+model+session (non-sub-agent) is
|
|
529
|
-
encouraged (absolute heterogeneity). A score sharing the builder's session
|
|
530
|
-
(including any sub-agent of it) is rejected as a self-score.
|
|
531
|
-
|
|
532
|
-
Score guidance the Reviewer applies (integer 1..10):
|
|
533
|
-
- **9..10** — clean root-cause fix; regression test added; TCR cycle smooth.
|
|
534
|
-
- **6..8** — fix shipped but with caveats (e.g. workaround, partial coverage,
|
|
535
|
-
or repeated TCR red iterations); rationale explains the trade-off.
|
|
536
|
-
- **1..5** — fix landed but quality is below the bar (test coverage missing,
|
|
537
|
-
fix only narrows blast radius, repeated agent re-tries). Verdict should be
|
|
538
|
-
`ok` or `regression` if a related test broke.
|
|
539
|
-
|
|
540
|
-
Verdict values:
|
|
541
|
-
- `good` — fix is the proper root-cause fix; no caveats.
|
|
542
|
-
- `ok` — shipped but with documented trade-offs (use rationale to explain).
|
|
543
|
-
- `regression` — the fix re-broke something else (rare; consider re-opening).
|
|
544
|
-
|
|
545
|
-
#### Reviewer-triggered resize (US-AGENT-041)
|
|
546
|
-
|
|
547
|
-
A low score (≤ 5) splits two ways. A **quality** shortfall (weak test, narrow
|
|
548
|
-
fix) just scores low and the loop retries. But when the FIX turned out
|
|
549
|
-
**structurally too large for one cycle** (whole sub-problems uncovered, not
|
|
550
|
-
defects), the Reviewer ALSO emits, beside SCORE/VERDICT/RATIONALE:
|
|
551
|
-
|
|
552
|
-
```
|
|
553
|
-
RESIZE: <one line — why the scope exceeds one cycle>
|
|
554
|
-
GAPS: <gap one; gap two; ...>
|
|
555
|
-
```
|
|
556
|
-
|
|
557
|
-
On a RESIZE signal (low score) the loop runs `roll loop review-resize FIX-XXX`:
|
|
558
|
-
`$roll-design` mints sub-stories from the gaps, ≥2 **heterogeneous** reviewers
|
|
559
|
-
gate the split by consensus (all agree → auto-land via `roll loop self-downgrade`,
|
|
560
|
-
parking the FIX at 🚫 Hold + appending sub-stories; any objection → pause +
|
|
561
|
-
ALERT, backlog unchanged), with the chain-depth cap (US-AGENT-009) stopping
|
|
562
|
-
runaway splits. The human is on the loop (alerted only on consensus failure or
|
|
563
|
-
the cap), not in it. Never emit RESIZE for a pure quality problem.
|
|
564
|
-
|
|
565
|
-
## Rubric
|
|
566
|
-
|
|
567
|
-
Quality evaluation for a completed fix. Score each dimension independently.
|
|
568
|
-
|
|
569
|
-
| 维度 | ❌ Miss (0) | ⚠️ Partial (1) | ✅ Hit (2) |
|
|
570
|
-
|------|------------|----------------|-----------|
|
|
571
|
-
| **根因定位** | 只修了表象,未说明根因 | 描述了直接原因 | 追溯根本原因并有代码/日志证据 |
|
|
572
|
-
| **最小范围** | 改动超出 fix 边界,含机会主义修改 | 范围合理但有冗余改动 | 最小改动,非 fix 相关代码零触碰 |
|
|
573
|
-
| **回归测试** | 无测试,或测试与 bug 无关 | 有测试但未复现原始 bug | 先写复现测试(RED)再修复(GREEN) |
|
|
574
|
-
| **验证证据** | 仅声称通过,无实际输出 | 有部分截图/日志但不完整 | 贴出完整命令输出,覆盖 fix + 回归 |
|
|
575
|
-
| **无新破坏** | CI 红,或已知回归未处理 | CI 绿但有 warning 未说明 | CI 全绿,覆盖率不降,warning 清零 |
|
|
576
|
-
|
|
577
|
-
**评分解读**
|
|
578
|
-
|
|
579
|
-
| 总分 | 结论 |
|
|
580
|
-
|------|------|
|
|
581
|
-
| 9–10 | Exemplary — 可作为参考案例 |
|
|
582
|
-
| 7–8 | Acceptable — 可交付,有小瑕疵 |
|
|
583
|
-
| 5–6 | Needs Work — 需补充证据或补测试 |
|
|
584
|
-
| ≤ 4 | Redo — 根因或验证存在根本缺失 |
|
|
585
|
-
|
|
586
|
-
> 用法:fix 完成后由 `$roll-eval`(或人工)对照此表打分,结果写入 `roll-notes`。
|
|
587
|
-
|
|
588
|
-
---
|
|
589
|
-
|
|
590
|
-
## TCR Patterns for Common Fixes
|
|
591
|
-
|
|
592
|
-
### Pattern: Bug Fix with Regression Test
|
|
593
|
-
|
|
594
|
-
```
|
|
595
|
-
Issue: "Search returns no results for special characters"
|
|
596
|
-
|
|
597
|
-
🧪 Test Design:
|
|
598
|
-
├── Fix verification: Search with "@#$%" returns results
|
|
599
|
-
└── Regression: Normal search still works
|
|
600
|
-
|
|
601
|
-
TCR CYCLE 1: Regression test
|
|
602
|
-
├── Write test: Normal search works
|
|
603
|
-
├── Run → ✅ GREEN (expected, feature currently works)
|
|
604
|
-
└── Commit: "tcr: add regression test for normal search"
|
|
605
|
-
|
|
606
|
-
TCR CYCLE 2: Bug reproduction
|
|
607
|
-
├── Write test: Special character search works
|
|
608
|
-
├── Run → ❌ RED (bug reproduced)
|
|
609
|
-
└── No commit (test fails, but we keep it)
|
|
610
|
-
|
|
611
|
-
TCR CYCLE 3: Fix implementation
|
|
612
|
-
├── Fix special character handling in search query
|
|
613
|
-
├── Run tests → ✅ GREEN (both tests pass)
|
|
614
|
-
└── Commit: "tcr: fix special character handling in search"
|
|
615
|
-
```
|
|
616
|
-
|
|
617
|
-
### Pattern: One-Liner Fix
|
|
618
|
-
|
|
619
|
-
```
|
|
620
|
-
Issue: "Button color is wrong"
|
|
621
|
-
|
|
622
|
-
🧪 Test Design:
|
|
623
|
-
└── Verification: Visual check + CSS property assertion
|
|
624
|
-
|
|
625
|
-
TCR CYCLE:
|
|
626
|
-
├── Test: CSS property assertion
|
|
627
|
-
├── Run → ❌ RED
|
|
628
|
-
├── Fix: Change color value
|
|
629
|
-
├── Run → ✅ GREEN
|
|
630
|
-
└── Commit: "tcr: fix button color"
|
|
631
|
-
```
|
|
632
|
-
|
|
633
|
-
### Pattern: Hotfix (Production Issue)
|
|
634
|
-
|
|
635
|
-
```
|
|
636
|
-
Issue: "Critical: Payment processing fails"
|
|
637
|
-
|
|
638
|
-
🧪 Test Design:
|
|
639
|
-
├── Fix verification: Payment API returns 200
|
|
640
|
-
└── Regression: Invalid payments still rejected
|
|
641
|
-
|
|
642
|
-
TCR CYCLE 1: Regression test for invalid payments
|
|
643
|
-
└── Commit: "tcr: ensure invalid payments are rejected"
|
|
644
|
-
|
|
645
|
-
TCR CYCLE 2: Fix payment processing
|
|
646
|
-
└── Commit: "tcr: hotfix payment processing failure"
|
|
647
|
-
|
|
648
|
-
🔍 Quality Review (extra scrutiny for hotfix):
|
|
649
|
-
├── Is this the minimal safe fix?
|
|
650
|
-
├── Is there a safer workaround?
|
|
651
|
-
└── Should we roll back instead?
|
|
652
|
-
```
|
|
653
|
-
|
|
654
|
-
## Escalation Rule
|
|
655
|
-
|
|
656
|
-
Switch from `minor-ship` to `story-ship` when:
|
|
657
|
-
|
|
658
|
-
- the issue turns into multiple shippable Actions
|
|
659
|
-
- the change touches multiple domains or risky integrations
|
|
660
|
-
- project tracking and backlog state now matter
|
|
661
|
-
- the user asks for a full story-driven loop
|
|
662
|
-
|
|
663
|
-
## TCR Recovery
|
|
664
|
-
|
|
665
|
-
If TCR repeatedly fails (3+ attempts on same micro-step):
|
|
666
|
-
|
|
667
|
-
```
|
|
668
|
-
1. Revert to clean state
|
|
669
|
-
2. Re-examine: Is this really a "minor" fix?
|
|
670
|
-
3. If not → Escalate to story-ship
|
|
671
|
-
4. If yes → Break into smaller micro-steps
|
|
672
|
-
```
|