@seanyao/roll 4.702.4 → 4.706.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 +75 -0
- package/README.md +43 -1
- package/dist/postinstall.mjs +731 -0
- package/dist/roll.mjs +14309 -7369
- package/docs/verification.md +20 -0
- package/guide/en/acceptance-evidence.md +56 -1
- package/guide/en/configuration.md +15 -0
- package/guide/en/installation.md +16 -1
- package/guide/en/loop.md +132 -1
- package/guide/en/methodology.md +1 -1
- package/guide/zh/acceptance-evidence.md +46 -2
- package/guide/zh/configuration.md +12 -0
- package/guide/zh/installation.md +13 -1
- package/guide/zh/loop.md +116 -1
- package/lib/i18n/init.sh +2 -2
- package/package.json +3 -1
- package/scripts/postinstall-roll-capture.mjs +9 -0
package/docs/verification.md
CHANGED
|
@@ -73,6 +73,26 @@ diff <(v2.0-bash <cmd>) <(v3-ts <cmd>)
|
|
|
73
73
|
- **回收**:`roll loop gc` 按阈值清理陈旧 run(保最近 N 次 + M 天内,二者满足其一即留;只删「又旧又超额」的尾部)。阈值 `--keep-latest`(默认 10)/`--keep-days`(默认 30),`--dry-run` 预演。
|
|
74
74
|
- **读取兼容**:迁移窗口内旧布局 `.roll/verification/<ID>/` 仍可读(attest gate、ac-map、报告解析都先查卡夹再回落旧树);存量迁移与兼容代码移除由 US-META-002 收尾。
|
|
75
75
|
|
|
76
|
+
## 证据可见性模型(US-PHYSICAL-008)
|
|
77
|
+
|
|
78
|
+
截图/图片类证据涉及隐私,因此在 `git add` 之前必须确认目标仓库的远程可见性:
|
|
79
|
+
|
|
80
|
+
| 布局 | 目标仓库 | 判定策略 | 图片证据 |
|
|
81
|
+
|------|----------|----------|----------|
|
|
82
|
+
| 独立 roll-meta | `.roll` 自身所在的私有仓 | `gh api repos/<slug>` 或 `git ls-remote`;判定为 private 则放行 | 私有仓放行 |
|
|
83
|
+
| 公开产品仓 + 独立 roll-meta | 产品仓本身不接收 `.roll` 证据;证据进私有 roll-meta | 同 roll-meta | 私有仓放行 |
|
|
84
|
+
| in-repo `.roll` | 产品主仓(`.roll` 随代码一起 tracked) | 检查主仓 remote 可见性 | public / 未知 一律拒绝 |
|
|
85
|
+
|
|
86
|
+
保守规则:判定失败(无 remote、`gh` 不可用、API 失败、非 GitHub 且无法推断可见性)一律按 **public** 处理,拒绝图片证据并触发 ALERT。
|
|
87
|
+
|
|
88
|
+
逃生口:owner 可在 `.roll/local.yaml` 中显式声明
|
|
89
|
+
|
|
90
|
+
```yaml
|
|
91
|
+
evidence_public_waiver: true
|
|
92
|
+
```
|
|
93
|
+
|
|
94
|
+
放行公开仓的图片证据,同时留下审计痕迹。in-repo 项目首次成功判定后会把 `evidence_visibility` + `evidence_remote` 写入同一文件;remote URL 变化时自动重判。
|
|
95
|
+
|
|
76
96
|
## 门
|
|
77
97
|
|
|
78
98
|
| 门 | 条件 | 频率 |
|
|
@@ -67,6 +67,36 @@ loop_safety:
|
|
|
67
67
|
Soft mode records the gap and raises the same audit signal, but it does not
|
|
68
68
|
block the delivery cycle. Treat it as temporary compatibility, not the default.
|
|
69
69
|
|
|
70
|
+
The merge gate reads structured evidence, not prose. A delivery can be refused
|
|
71
|
+
when any of these facts are true:
|
|
72
|
+
|
|
73
|
+
- `attest render` exits non-zero;
|
|
74
|
+
- `ac-map.json` references a path that does not resolve under the story run or
|
|
75
|
+
card archive, except allowed GitHub PR/commit/check URLs for this repository;
|
|
76
|
+
- an AC remains `claimed`, which means the Builder asserted completion without
|
|
77
|
+
pass/fail evidence;
|
|
78
|
+
- a positive AC has no real evidence reference;
|
|
79
|
+
- a non-exempt visual card has no captured screenshot or recorded machine
|
|
80
|
+
capture skip;
|
|
81
|
+
- a declared `deliverable_url`, `deliverable_cmd`, or `physical_terminal`
|
|
82
|
+
surface was not really captured;
|
|
83
|
+
- an AC is `fail`, which means a check ran and went red.
|
|
84
|
+
|
|
85
|
+
The PR body carries a `Roll-Evidence` trailer that points reviewers to the
|
|
86
|
+
story-scoped evidence. Treat that trailer as the entry point for human review:
|
|
87
|
+
open the Acceptance Review Page, then follow the AC map and referenced files.
|
|
88
|
+
|
|
89
|
+
Use the audit command before release or when a Done row looks suspicious:
|
|
90
|
+
|
|
91
|
+
```bash
|
|
92
|
+
roll attest audit
|
|
93
|
+
roll attest audit --json
|
|
94
|
+
```
|
|
95
|
+
|
|
96
|
+
It scans Done stories for missing reports, missing or empty `ac-map.json`,
|
|
97
|
+
dangling evidence references, and `evidence_debt` rows. A clean audit exits 0;
|
|
98
|
+
any issue exits 1 and lists the story IDs and missing references.
|
|
99
|
+
|
|
70
100
|
## The red line
|
|
71
101
|
|
|
72
102
|
An AC with **zero evidence** can never claim `pass`: the renderer forces it
|
|
@@ -77,6 +107,11 @@ down to 🟧 Claimed and lists it under **Discrepancies**. Verbal completion
|
|
|
77
107
|
|
|
78
108
|
`roll story validate` checks, at design time, that a spec is *born* with a
|
|
79
109
|
visual-evidence AC (and, for a web surface, a declared product page to capture).
|
|
110
|
+
If the spec has a visual-evidence AC but no declared surface
|
|
111
|
+
(`deliverable_url`, `deliverable_cmd`, `physical_terminal`, or
|
|
112
|
+
`screenshot_exempt`), validation prints a soft must-declare warning and still
|
|
113
|
+
exits 0. Runtime gates carry the same must-declare signal as a diagnostic only;
|
|
114
|
+
they do not block or mark the delivery skipped for that reason alone.
|
|
80
115
|
Two rules decide what the validator recognises:
|
|
81
116
|
|
|
82
117
|
- **The `[visual-evidence]` marker is authoritative.** An AC item that opens with
|
|
@@ -96,7 +131,10 @@ Two rules decide what the validator recognises:
|
|
|
96
131
|
- a declared `physical_terminal:` ⇒ **terminal** with a stricter contract — the
|
|
97
132
|
report must contain a real macOS `Terminal.app` screenshot captured from
|
|
98
133
|
screen pixels. Headless stdout, transcript-rendered images, and HTML replays
|
|
99
|
-
are rejected for this contract
|
|
134
|
+
are rejected for this contract. `roll attest` also asks the
|
|
135
|
+
`physical.screenshot` provider for this evidence when available, copies the
|
|
136
|
+
returned PNG into the story run, and shows the status chain
|
|
137
|
+
`requested -> taken/skipped/failed/timeout -> attached/not-attached`;
|
|
100
138
|
- else a declared `deliverable_cmd:` ⇒ **terminal** — a CLI deliverable that
|
|
101
139
|
rides the terminal-capture lane;
|
|
102
140
|
- else the AC text decides (web / terminal / ambiguous).
|
|
@@ -142,6 +180,23 @@ at startup:
|
|
|
142
180
|
repeated `roll doctor` / setup checks do not keep re-triggering the macOS
|
|
143
181
|
prompt; if permission was just granted, restart Terminal.app before trusting
|
|
144
182
|
the cache.
|
|
183
|
+
- `Roll Capture.app` / `physical.screenshot` — the provider path for physical
|
|
184
|
+
screenshot requests. If readiness is unavailable, `roll attest` records an
|
|
185
|
+
honest skip with the setup reason instead of blocking report generation; if
|
|
186
|
+
the provider times out, the report surfaces timeout as its own failure reason.
|
|
187
|
+
On macOS npm installs, Roll tries to install the app from the latest
|
|
188
|
+
`seanyao/roll-capture` Release into `~/Applications`; `roll setup` can retry
|
|
189
|
+
that repair unless `--no-capture-install` is set.
|
|
190
|
+
|
|
191
|
+
**Capture default strategy (US-PHYSICAL-006):** Physical screenshot requests
|
|
192
|
+
default to **window-level** capture — they only capture the tested application's
|
|
193
|
+
window (Terminal.app for terminal/CLI evidence, Google Chrome for web evidence),
|
|
194
|
+
not the full screen. Full-screen capture requires an explicit
|
|
195
|
+
`capture_fullscreen: true` frontmatter declaration in the card spec. This
|
|
196
|
+
privacy-first design prevents evidence chains from including irrelevant on-screen
|
|
197
|
+
content (chat, email, other projects). If the target window is not found, Roll
|
|
198
|
+
Capture.app returns a documented fallback with the reason recorded in the
|
|
199
|
+
response and evidence ledger — no silent expansion of capture scope.
|
|
145
200
|
- `Playwright Chromium` — optional headless web capture for `roll attest` and
|
|
146
201
|
archive screenshots. Install with `npx playwright install chromium`.
|
|
147
202
|
|
|
@@ -21,6 +21,7 @@ shared conventions.
|
|
|
21
21
|
| `ROLL_LOOP_GC_RETENTION_DAYS` | `30` | Override the GC retention period for `roll loop gc`. Takes precedence over `loop_gc.retention_days` in `.roll/local.yaml`. |
|
|
22
22
|
| `ROLL_FEED_BUDGET_BYTES` | `16384` | Byte budget for the context feed handed to the inner agent each cycle. Set it to a positive integer to dial the feed to the inner agent's capacity; non-numeric or non-positive values fall back to the default. |
|
|
23
23
|
| `ROLL_AGENT_NUDGE` | `1` (on) | Compatibility agent preference switch. The scoped role binding is the primary selector; set this to `0` (or `off`/`false`/`no`) to disable legacy history preference. |
|
|
24
|
+
| `ROLL_SKIP_CAPTURE_INSTALL` | unset | Set to `1` to skip the best-effort macOS `Roll Capture.app` install during npm postinstall and setup repair. |
|
|
24
25
|
| `ROLL_RUN_DIR` | unset | Canonical acceptance-evidence run directory. The loop runner sets it before agent spawn; `roll attest --run-dir` and standalone `roll attest` can also consume it. |
|
|
25
26
|
| `ROLL_EVIDENCE_DIR` | derived from `ROLL_RUN_DIR` | Directory for raw command/test artifacts inside the open evidence frame. Normally set by the runner or `roll test`, not by hand. |
|
|
26
27
|
| `ROLL_SCREENSHOTS_DIR` | derived from `ROLL_RUN_DIR` | Directory for visual proof inside the open evidence frame. Normally set by the runner or capture lane, not by hand. |
|
|
@@ -86,6 +87,20 @@ loop_safety:
|
|
|
86
87
|
Use `attest_gate: soft` only for an explicit migration window. Soft mode keeps
|
|
87
88
|
the audit trail and alert, but it does not block the delivery cycle.
|
|
88
89
|
|
|
90
|
+
Automatic card picking also has an advisory semantic ranking layer. It is on by
|
|
91
|
+
default and can be disabled explicitly:
|
|
92
|
+
|
|
93
|
+
```yaml
|
|
94
|
+
pick:
|
|
95
|
+
semantic_ranking: off
|
|
96
|
+
```
|
|
97
|
+
|
|
98
|
+
When enabled, Roll asks the default agent to rank the current candidate backlog
|
|
99
|
+
only when the backlog/candidate hash changes, caches the result in
|
|
100
|
+
`.roll/loop/pick-ranking.json`, and then still applies the normal picker gates.
|
|
101
|
+
If the agent times out or returns bad JSON, Roll records `harness_failure` and
|
|
102
|
+
falls back to the deterministic order.
|
|
103
|
+
|
|
89
104
|
## Verifying
|
|
90
105
|
|
|
91
106
|
`roll status` prints the resolved paths so you can confirm overrides took
|
package/guide/en/installation.md
CHANGED
|
@@ -22,7 +22,18 @@ curl -fsSL https://seanyao.github.io/roll/install | ROLL_VERSION=v3.610.1 bash
|
|
|
22
22
|
npm install -g @seanyao/roll
|
|
23
23
|
```
|
|
24
24
|
|
|
25
|
-
Requires Node.js
|
|
25
|
+
Requires Node.js 22+.
|
|
26
|
+
|
|
27
|
+
On macOS, the npm package runs a best-effort postinstall that downloads
|
|
28
|
+
`Roll-Capture.app.zip` from the latest `seanyao/roll-capture` GitHub Release,
|
|
29
|
+
validates the asset, and installs `Roll Capture.app` into `~/Applications`.
|
|
30
|
+
Open the app once and grant Screen Recording permission before relying on
|
|
31
|
+
physical screenshots. CI, headless sessions, non-macOS hosts, offline failures,
|
|
32
|
+
sudo/root shells, and `ROLL_SKIP_CAPTURE_INSTALL=1` skip the app install without
|
|
33
|
+
failing npm. If npm ran under sudo/root, run `roll setup` again as a regular user
|
|
34
|
+
so Roll installs the app into that user's `~/Applications`, not `/var/root`.
|
|
35
|
+
GitHub download requests respect `HTTP_PROXY`/`HTTPS_PROXY`/`NO_PROXY` when the
|
|
36
|
+
current Node runtime exposes the matching fetch dispatcher.
|
|
26
37
|
|
|
27
38
|
After installation via either method, run setup to sync conventions and skills into your AI tools:
|
|
28
39
|
|
|
@@ -30,6 +41,10 @@ After installation via either method, run setup to sync conventions and skills i
|
|
|
30
41
|
roll setup
|
|
31
42
|
```
|
|
32
43
|
|
|
44
|
+
`roll setup --no-capture-install` keeps setup from attempting the same Roll
|
|
45
|
+
Capture.app repair. `roll doctor tools` reports whether the app, permission
|
|
46
|
+
proxy, and inbox are ready.
|
|
47
|
+
|
|
33
48
|
## Verify
|
|
34
49
|
|
|
35
50
|
```bash
|
package/guide/en/loop.md
CHANGED
|
@@ -22,6 +22,76 @@ agent bindings.
|
|
|
22
22
|
Loop runs inside a **tmux session** named `roll-loop-<project-slug>`.
|
|
23
23
|
When not muted, a terminal window pops up automatically so you can watch in real time.
|
|
24
24
|
|
|
25
|
+
## North Star Readings
|
|
26
|
+
|
|
27
|
+
`roll status` starts with a one-line North Star summary so the owner can see the
|
|
28
|
+
system trend before reading the rest of the health panel. The row is the compact
|
|
29
|
+
form of `roll north`: autonomy, delivery rate, fix tax, and attribution errors.
|
|
30
|
+
Each value is followed by a status dot; run `roll north` when you need the
|
|
31
|
+
target, trend, and reason text.
|
|
32
|
+
|
|
33
|
+
`roll north [--json]` reads the last 14 days of runs, events, backlog, card
|
|
34
|
+
metadata, and delivery truth. The four targets are:
|
|
35
|
+
|
|
36
|
+
| Metric | Target | Anti-gaming rule | `null` means |
|
|
37
|
+
|--------|--------|------------------|--------------|
|
|
38
|
+
| Autonomy | >=72h autonomous runtime | An effective autonomous day needs at least 6 non-idle attempts; backlog-empty days pause the clock and do not count as missed time. | There is not enough qualifying run history yet, or the backlog was empty for the window. |
|
|
39
|
+
| Delivery rate | >=60% | Delivery is counted from merge truth, not self-reported cycle exits. | No eligible delivery denominator exists yet. |
|
|
40
|
+
| Fix tax | <1x | The denominator is US cards only; FIX work is not allowed to improve its own ratio. | There is no US-card denominator in the window. |
|
|
41
|
+
| Attribution errors | =0 | `unknown` is not guessed into env, harness, or card; missing envelopes stay visible. | No attribution sample exists yet. |
|
|
42
|
+
|
|
43
|
+
Machine consumers should use `roll north --json`, which emits
|
|
44
|
+
`roll.north.v1` with the same current values, targets, reasons, and daily
|
|
45
|
+
series used by the terminal panel.
|
|
46
|
+
|
|
47
|
+
## Failure Attribution and Pauses
|
|
48
|
+
|
|
49
|
+
Every failed cycle is assigned one of four classes:
|
|
50
|
+
|
|
51
|
+
| Class | Meaning | Owner action |
|
|
52
|
+
|-------|---------|--------------|
|
|
53
|
+
| `env` | Machine, checkout, auth, network, sandbox, or worktree condition. | Repair the named environment problem, then resume dispatch. |
|
|
54
|
+
| `harness` | A Roll component failed, such as score parsing, attest render, publish, or rescue. | Inspect the component and open a focused FIX when needed. |
|
|
55
|
+
| `card` | The Builder reached the story and failed during actual card work. | Investigate the story, split it, or change routing after reading evidence. |
|
|
56
|
+
| `unknown` | There is not enough envelope evidence to charge a card honestly. | Add a deterministic failure envelope before blaming the card. |
|
|
57
|
+
|
|
58
|
+
Root-cause counting is by `root_cause_key`, not by card. Repeated `env`,
|
|
59
|
+
`harness`, or `unknown` causes pause dispatch and write a diagnostic snapshot
|
|
60
|
+
under `.roll/loop/diagnostics/`. When the terminal says dispatch is paused,
|
|
61
|
+
open that snapshot first: it includes the class, root cause, recent events, and
|
|
62
|
+
playbook. Fix the named machine or Roll component, then run `roll loop resume`.
|
|
63
|
+
|
|
64
|
+
If earlier env/harness failures pushed a card into the skip list, rebuild that
|
|
65
|
+
state from the durable evidence:
|
|
66
|
+
|
|
67
|
+
```bash
|
|
68
|
+
roll loop pardon-skip-list --dry-run
|
|
69
|
+
roll loop pardon-skip-list
|
|
70
|
+
roll loop pardon-skip-list --include-unknown # also pardons unknown/no-evidence rows
|
|
71
|
+
```
|
|
72
|
+
|
|
73
|
+
Use `--include-unknown` only after reading the rows; older zero-usage `gave_up`
|
|
74
|
+
entries may be real card failures.
|
|
75
|
+
|
|
76
|
+
## Builder Isolation and Rescue
|
|
77
|
+
|
|
78
|
+
During Builder execution the main checkout is physically write-protected. The
|
|
79
|
+
Builder works in its cycle worktree; the shared checkout is treated as a sensor,
|
|
80
|
+
not a scratchpad. Roll releases the write protection when the cycle exits.
|
|
81
|
+
|
|
82
|
+
If dirty or ahead changes appear in the main checkout anyway, Roll quarantines
|
|
83
|
+
them before continuing:
|
|
84
|
+
|
|
85
|
+
- dirty files become a `rescue/leaked-*` ref that can be restored with the
|
|
86
|
+
manifest's `git stash apply <ref>` command;
|
|
87
|
+
- ahead commits become a `rescue/leaked-*` branch that can be restored with the
|
|
88
|
+
manifest's `git cherry-pick <ref>` command;
|
|
89
|
+
- the manifest is written under `.roll/loop/quarantine/` and records the cycle,
|
|
90
|
+
story, phase, files, ref, and exact restore command.
|
|
91
|
+
|
|
92
|
+
Claim the rescued work from the manifest, then reset or resume the loop from a
|
|
93
|
+
clean main checkout.
|
|
94
|
+
|
|
25
95
|
## Scheduling
|
|
26
96
|
|
|
27
97
|
Loop is scheduled via **launchd** (macOS). By default, every hour at a
|
|
@@ -193,6 +263,13 @@ roll agent # Show scopes, roles, agent pool, and legac
|
|
|
193
263
|
roll agent list # Show agents installed on this machine
|
|
194
264
|
```
|
|
195
265
|
|
|
266
|
+
When semantic pick ranking is enabled, `roll loop watch --events` includes a
|
|
267
|
+
`pick:ranked` line such as `picked US-123 (rank 1/5: unblocks the release lane)`.
|
|
268
|
+
`roll supervisor next` and `roll supervisor next --json` show the latest top
|
|
269
|
+
three ranking suggestions and reasons. The ranking is advisory only; Hold, Cut,
|
|
270
|
+
unsatisfied dependencies, skip-list, open PR, merged-delivery, and pending-publish
|
|
271
|
+
gates still decide eligibility.
|
|
272
|
+
|
|
196
273
|
### Goal Mode vs Scheduled Mode
|
|
197
274
|
|
|
198
275
|
`roll loop go` is a manual goal session, not a launchd scheduler tick. While it
|
|
@@ -1013,6 +1090,60 @@ This keeps `git worktree list` clean and prevents `.claude/worktrees/` from
|
|
|
1013
1090
|
accumulating old entries over time. Active worktrees (branches ahead of `main`)
|
|
1014
1091
|
are left untouched.
|
|
1015
1092
|
|
|
1093
|
+
## Main Checkout Guard
|
|
1094
|
+
|
|
1095
|
+
During the Builder process, Roll makes the shared main checkout read-only at the
|
|
1096
|
+
filesystem boundary while leaving the cycle worktree writable. If a previous
|
|
1097
|
+
cycle left product files dirty or local commits ahead of `origin/main`, Roll
|
|
1098
|
+
moves that pollution to a `rescue/leaked-*` ref plus a
|
|
1099
|
+
`.roll/loop/quarantine/*.json` manifest, restores main to the trusted state, and
|
|
1100
|
+
continues the cycle.
|
|
1101
|
+
|
|
1102
|
+
The event stream records `sandbox:write_protected` and `sandbox:quarantined`.
|
|
1103
|
+
`roll loop watch --events`, `roll loop cycle <id> --activity`, and supervisor output
|
|
1104
|
+
surface those facts. Each quarantine manifest includes the ref, file list, and a
|
|
1105
|
+
one-line restore command for owner/supervisor recovery.
|
|
1106
|
+
|
|
1107
|
+
## Post-cycle Environment Cleanup
|
|
1108
|
+
|
|
1109
|
+
Before the cycle worktree is removed, loop runs a declarative environment
|
|
1110
|
+
cleanup step. It targets only transient toolchain/scratch artifacts produced
|
|
1111
|
+
inside the worktree — e.g. `.scratch`, `tmp`, `node_modules/.cache`, `.vite`,
|
|
1112
|
+
`__pycache__`, `.build` — and leaves source files and uncommitted work alone.
|
|
1113
|
+
|
|
1114
|
+
Each rule emits a `cycle:cleanup` event to `events.ndjson`, so the cleanup is
|
|
1115
|
+
observable and auditable. Cleanup failures are downgraded to warning events,
|
|
1116
|
+
also summarized in `ALERT.md` under the independent `harness:env_cleanup` root
|
|
1117
|
+
cause, and never block the next cycle.
|
|
1118
|
+
|
|
1119
|
+
You can override or extend the default rules by creating
|
|
1120
|
+
`.roll/loop/cleanup-manifest.yaml`:
|
|
1121
|
+
|
|
1122
|
+
```yaml
|
|
1123
|
+
rules:
|
|
1124
|
+
- name: my-scratch
|
|
1125
|
+
kind: rm
|
|
1126
|
+
paths:
|
|
1127
|
+
- .my-tmp
|
|
1128
|
+
- "**/roll-cleanup.log"
|
|
1129
|
+
- name: my-cache
|
|
1130
|
+
kind: isolate
|
|
1131
|
+
paths:
|
|
1132
|
+
- .my-cache
|
|
1133
|
+
```
|
|
1134
|
+
|
|
1135
|
+
`kind: rm` deletes the path; `kind: isolate` moves it into a cycle-local
|
|
1136
|
+
`.roll-cleanup/<cycle-id>/<rule>/` directory inside the worktree (so it is
|
|
1137
|
+
removed along with the worktree).
|
|
1138
|
+
|
|
1139
|
+
Supported path forms are deliberately small: literal relative paths such as
|
|
1140
|
+
`.my-tmp` and recursive suffix matches of the form `prefix/**/literal-suffix`,
|
|
1141
|
+
including `**/roll-cleanup.log` or `src/**/__pycache__`. Shell globs are not
|
|
1142
|
+
expanded; a `*` inside the recursive suffix, such as `**/*.log`, makes that rule
|
|
1143
|
+
invalid, emits a warning, and skips the rule. Use `rules: []` or
|
|
1144
|
+
`enabled: false` to disable cleanup explicitly. The default manifest is used
|
|
1145
|
+
only when no override file is present.
|
|
1146
|
+
|
|
1016
1147
|
## Cycle phases
|
|
1017
1148
|
|
|
1018
1149
|
Every cycle is sliced into seven named phases. Each phase emits a `phase_start`
|
|
@@ -1027,7 +1158,7 @@ so the tmux viewer never looks frozen.
|
|
|
1027
1158
|
| 3 | `worktree_setup` | fetch origin + worktree create + meta sync | 2 – 10 s |
|
|
1028
1159
|
| 4 | `agent_invoke` | Agent executes with up to 3 retries | 5 – 45 min |
|
|
1029
1160
|
| 5 | `publish_push` | push branch + open PR (or doc-only merge) | 5 – 30 s |
|
|
1030
|
-
| 6 | `cleanup` | emit PR final state + worktree teardown | < 1 s |
|
|
1161
|
+
| 6 | `cleanup` | env cleanup + emit PR final state + worktree teardown | < 1 s |
|
|
1031
1162
|
|
|
1032
1163
|
> **US-AUTO-044**: the main loop exits after opening the PR and **no longer waits for merge**. Merge / rebase / close is handled asynchronously by the dedicated PR Loop (`com.roll.pr.<slug>`, every 5 min); a story with an open PR is skipped by the eligibility gate, so it is neither re-opened nor falsely marked Done.
|
|
1033
1164
|
|
package/guide/en/methodology.md
CHANGED
|
@@ -590,7 +590,7 @@ It is off by default. Enabling it requires an explicit `roll loop on`.
|
|
|
590
590
|
|
|
591
591
|
### 9.2 Components
|
|
592
592
|
|
|
593
|
-
**`roll-loop`** — Runs on a configurable schedule via macOS launchd (Linux: crontab). Scans BACKLOG for `📋 Todo` items and routes them: `US-XXX → $roll-build`, `FIX-XXX → $roll-fix`, `REFACTOR-XXX → $roll-build`. Caps items per run to limit blast radius. Rebuilds the
|
|
593
|
+
**`roll-loop`** — Runs on a configurable schedule via macOS launchd (Linux: crontab). Scans BACKLOG for `📋 Todo` items and routes them: `US-XXX → $roll-build`, `FIX-XXX → $roll-fix`, `REFACTOR-XXX → $roll-build`. Caps items per run to limit blast radius. Rebuilds the Loop Digest from windowed `events.ndjson` / `runs.jsonl` facts as it goes; contradictory digest data is marked degraded and emits an ALERT instead of being reported as normal. Built-in TCR enforcement: after a story completes, checks for `tcr:` micro-commits — if zero are found, reverts the story to Todo with an ALERT, preventing agents from skipping the TCR rhythm.
|
|
594
594
|
|
|
595
595
|
**`roll-.dream`** — Runs nightly (03:00 local) via macOS launchd (Linux: crontab). Scans the codebase for dead code, architectural drift against `.roll/domain/`, pruning candidates, and emerging patterns. Outputs `REFACTOR-XXX` entries to BACKLOG and a log to `.roll/dream/YYYY-MM-DD.md`.
|
|
596
596
|
|
|
@@ -59,6 +59,31 @@ loop_safety:
|
|
|
59
59
|
soft 模式会记录缺口并发出同一类审计信号,但不阻塞本轮交付。它是临时兼容口,
|
|
60
60
|
不是默认行为。
|
|
61
61
|
|
|
62
|
+
合并闸读取结构化证据,不读口头说明。出现以下事实时,交付可能被拒合:
|
|
63
|
+
|
|
64
|
+
- `attest render` 退出码非零;
|
|
65
|
+
- `ac-map.json` 引用的路径无法在本次 story run 或卡片归档下解析,除非是本仓允许的
|
|
66
|
+
GitHub PR/commit/check URL;
|
|
67
|
+
- AC 仍是 `claimed`,表示 Builder 只有完成声明,没有 pass/fail 证据;
|
|
68
|
+
- positive AC 没有真实证据引用;
|
|
69
|
+
- 无豁免的可视卡没有截图,也没有记录化的机器采集 skip;
|
|
70
|
+
- 声明了 `deliverable_url`、`deliverable_cmd` 或 `physical_terminal`,但对应
|
|
71
|
+
surface 没有真实采集;
|
|
72
|
+
- AC 是 `fail`,表示检查执行过并变红。
|
|
73
|
+
|
|
74
|
+
PR body 会带 `Roll-Evidence` trailer,指向这张 Story 的证据入口。人工评审从这里开始:
|
|
75
|
+
打开验收 Review Page,再沿 AC map 和引用文件检查。
|
|
76
|
+
|
|
77
|
+
发版前或发现 Done 行可疑时,运行审计命令:
|
|
78
|
+
|
|
79
|
+
```bash
|
|
80
|
+
roll attest audit
|
|
81
|
+
roll attest audit --json
|
|
82
|
+
```
|
|
83
|
+
|
|
84
|
+
它会扫描 Done stories,查缺失报告、缺失或空的 `ac-map.json`、悬空证据引用和
|
|
85
|
+
`evidence_debt` 行。无问题退出 0;发现问题退出 1,并列出 story ID 与缺失引用。
|
|
86
|
+
|
|
62
87
|
## 红线
|
|
63
88
|
|
|
64
89
|
**零证据**的 AC 永远不能是 `pass`:渲染层强制降级为 🟧 仅声明,并列入
|
|
@@ -68,7 +93,11 @@ soft 模式会记录缺口并发出同一类审计信号,但不阻塞本轮交
|
|
|
68
93
|
## 设计期声明可视证据
|
|
69
94
|
|
|
70
95
|
`roll story validate` 在设计期就检查一张卡是否**生而诚实**——带可视证据 AC,
|
|
71
|
-
且 web
|
|
96
|
+
且 web 面要声明可截的产品页。若卡有可视证据 AC,但没有声明任何交付面
|
|
97
|
+
(`deliverable_url`、`deliverable_cmd`、`physical_terminal` 或
|
|
98
|
+
`screenshot_exempt`),validate 只打印 must-declare 软警告,仍以 0 退出。
|
|
99
|
+
运行时 gate 也只把同一信号作为诊断携带,不会仅因此阻断或把交付标成 skipped。
|
|
100
|
+
校验器靠两条规则识别:
|
|
72
101
|
|
|
73
102
|
- **`[visual-evidence]` 标记即定论。** 以字面 `[visual-evidence]` 标记开头的 AC
|
|
74
103
|
条目**本身**就是可视证据 AC,无论后面写什么词——不必再额外写"截图 / screenshot":
|
|
@@ -84,7 +113,10 @@ soft 模式会记录缺口并发出同一类审计信号,但不阻塞本轮交
|
|
|
84
113
|
产品页,就该截 web 图;
|
|
85
114
|
- 声明了 `physical_terminal:` ⇒ **terminal**,但合同更严格——报告必须包含从 macOS
|
|
86
115
|
`Terminal.app` 真实屏幕像素截下来的图。headless stdout、transcript 渲染图、
|
|
87
|
-
HTML replay
|
|
116
|
+
HTML replay 图都不能满足这个合同。`roll attest` 会在可用时请求
|
|
117
|
+
`physical.screenshot` provider,把返回的 PNG 复制进本 story 的 run 目录,
|
|
118
|
+
并在报告里展示 `requested -> taken/skipped/failed/timeout -> attached/not-attached`
|
|
119
|
+
状态链;
|
|
88
120
|
- 否则声明了 `deliverable_cmd:` ⇒ **terminal**——走终端截屏通道的 CLI 交付;
|
|
89
121
|
- 否则由 AC 文本判定(web / terminal / 含糊)。
|
|
90
122
|
|
|
@@ -122,6 +154,18 @@ evidence、已有证据暴露 rendering/layout 风险;升级原因必须记录
|
|
|
122
154
|
复现图都不算截图证据。交互式 `Terminal.app` 授权探针一旦成功,会缓存在
|
|
123
155
|
`ROLL_HOME` 下,后续 `roll doctor` / setup 检查不会反复触发 macOS 权限弹窗;
|
|
124
156
|
如果刚刚授权,先重启 Terminal.app 再信任缓存。
|
|
157
|
+
- `Roll Capture.app` / `physical.screenshot` —— 物理截图请求的 provider 通道。
|
|
158
|
+
就绪度不可用时,`roll attest` 记录带设置原因的 honest skip,不阻断报告生成;
|
|
159
|
+
provider 超时时,报告把 timeout 作为独立失败原因展示。
|
|
160
|
+
macOS npm 安装会尝试从 `seanyao/roll-capture` 最新 Release 安装 app 到
|
|
161
|
+
`~/Applications`;`roll setup` 可重试这条修复路径,除非传入
|
|
162
|
+
`--no-capture-install`。
|
|
163
|
+
|
|
164
|
+
**截图默认策略 (US-PHYSICAL-006):** 物理截图请求默认使用**窗口级**截取——
|
|
165
|
+
只截被测应用的窗口(终端/CLI 证据截 Terminal.app,网页证据截 Google Chrome),
|
|
166
|
+
不再默认全屏。全屏截图必须在卡片 spec 中显式声明 `capture_fullscreen: true`。
|
|
167
|
+
这个隐私优先的设计防止证据链夹带屏幕上无关的隐私内容(聊天记录、邮件、其他项目)。
|
|
168
|
+
如果目标窗口找不到,Roll Capture.app 会返回带有原因的降级记录——不允许静默扩大截取范围。
|
|
125
169
|
- `Playwright Chromium` —— 可选的 headless web 截图工具,用于 `roll attest`
|
|
126
170
|
和归档截图。安装命令是 `npx playwright install chromium`。
|
|
127
171
|
|
|
@@ -20,6 +20,7 @@ Roll 在启动时解析三个环境变量。在运行 `roll` 之前覆盖任意
|
|
|
20
20
|
| `ROLL_LOOP_GC_RETENTION_DAYS` | `30` | 覆盖 `roll loop gc` 的保留天数。优先级高于 `.roll/local.yaml` 中的 `loop_gc.retention_days`。 |
|
|
21
21
|
| `ROLL_FEED_BUDGET_BYTES` | `16384` | 每个周期交给内层 agent 的上下文 feed 字节预算。设为正整数即可调节容量;非数字或非正数回落默认值。 |
|
|
22
22
|
| `ROLL_AGENT_NUDGE` | `1`(开启) | 兼容期的 agent 偏好开关。新模型优先通过 scoped role binding 选择候选;设为 `0`(或 `off`/`false`/`no`)关闭历史偏好。 |
|
|
23
|
+
| `ROLL_SKIP_CAPTURE_INSTALL` | 未设置 | 设为 `1` 时,跳过 npm postinstall 和 setup 修复里的 macOS `Roll Capture.app` 尽力安装。 |
|
|
23
24
|
| `ROLL_RUN_DIR` | 未设置 | 验收证据 run 目录的标准入口。loop runner 在 agent 启动前设置;`roll attest --run-dir` 与独立 `roll attest` 也会读取它。 |
|
|
24
25
|
| `ROLL_EVIDENCE_DIR` | 从 `ROLL_RUN_DIR` 派生 | 已打开证据框中的原始命令/测试产物目录。通常由 runner 或 `roll test` 设置,不需要手写。 |
|
|
25
26
|
| `ROLL_SCREENSHOTS_DIR` | 从 `ROLL_RUN_DIR` 派生 | 已打开证据框中的视觉证据目录。通常由 runner 或截图通道设置,不需要手写。 |
|
|
@@ -76,6 +77,17 @@ loop_safety:
|
|
|
76
77
|
只有显式迁移窗口才应使用 `attest_gate: soft`。soft 模式保留审计记录和告警,
|
|
77
78
|
但不阻塞本轮交付。
|
|
78
79
|
|
|
80
|
+
自动选卡还有一层 advisory 语义排序。它默认开启,也可以显式关闭:
|
|
81
|
+
|
|
82
|
+
```yaml
|
|
83
|
+
pick:
|
|
84
|
+
semantic_ranking: off
|
|
85
|
+
```
|
|
86
|
+
|
|
87
|
+
开启后,Roll 只在 backlog / candidate hash 变化时让默认 agent 排序一次,并把结果
|
|
88
|
+
缓存到 `.roll/loop/pick-ranking.json`;最终仍由既有 picker gates 决定能不能选。
|
|
89
|
+
如果 agent 超时或返回坏 JSON,Roll 记录 `harness_failure` 并回落到确定性顺序。
|
|
90
|
+
|
|
79
91
|
## 验证
|
|
80
92
|
|
|
81
93
|
`roll status` 会打印解析后的路径,便于确认覆盖是否生效;
|
package/guide/zh/installation.md
CHANGED
|
@@ -22,7 +22,16 @@ curl -fsSL https://seanyao.github.io/roll/install | ROLL_VERSION=v3.610.1 bash
|
|
|
22
22
|
npm install -g @seanyao/roll
|
|
23
23
|
```
|
|
24
24
|
|
|
25
|
-
需要 Node.js
|
|
25
|
+
需要 Node.js 22+。
|
|
26
|
+
|
|
27
|
+
macOS 上,npm 包会在 postinstall 中尽力从 `seanyao/roll-capture` 最新 GitHub
|
|
28
|
+
Release 下载 `Roll-Capture.app.zip`,校验后安装 `Roll Capture.app` 到
|
|
29
|
+
`~/Applications`。使用物理截图前,请打开一次应用并授予 Screen Recording 权限。
|
|
30
|
+
CI、headless、非 macOS、sudo/root shell、离线失败以及
|
|
31
|
+
`ROLL_SKIP_CAPTURE_INSTALL=1` 都会跳过 app 安装,且不会让 npm 安装失败。若 npm
|
|
32
|
+
是在 sudo/root 下运行,请再以普通用户跑 `roll setup` 安装,避免装进
|
|
33
|
+
`/var/root`。当前 Node runtime 暴露对应 fetch dispatcher 时,GitHub 下载请求会遵守
|
|
34
|
+
`HTTP_PROXY`/`HTTPS_PROXY`/`NO_PROXY`。
|
|
26
35
|
|
|
27
36
|
无论哪种方式安装,完成后运行 setup 将约定和技能同步到你的 AI 工具:
|
|
28
37
|
|
|
@@ -30,6 +39,9 @@ npm install -g @seanyao/roll
|
|
|
30
39
|
roll setup
|
|
31
40
|
```
|
|
32
41
|
|
|
42
|
+
`roll setup --no-capture-install` 会禁止 setup 尝试同一套 Roll Capture.app 修复。
|
|
43
|
+
`roll doctor tools` 会报告 app、权限代理和 inbox 是否就绪。
|
|
44
|
+
|
|
33
45
|
## 验证
|
|
34
46
|
|
|
35
47
|
```bash
|
package/guide/zh/loop.md
CHANGED
|
@@ -20,6 +20,67 @@ autonomous,不改变 agent binding。
|
|
|
20
20
|
Loop 在名为 **`roll-loop-<project-slug>`** 的 **tmux session** 里运行。
|
|
21
21
|
未静音时,终端窗口会自动弹出,你可以实时旁观 AI 干活。
|
|
22
22
|
|
|
23
|
+
## 北极星读数
|
|
24
|
+
|
|
25
|
+
`roll status` 顶部先显示一行北极星摘要,让 owner 在读完整健康面板前先看到系统趋势。
|
|
26
|
+
这行是 `roll north` 的压缩版:自主运行时长、交付率、修复税、归因错误。每个值后面
|
|
27
|
+
有状态点;需要目标、趋势和原因时运行 `roll north`。
|
|
28
|
+
|
|
29
|
+
`roll north [--json]` 读取最近 14 天的 runs、events、backlog、卡片元数据与交付真相。
|
|
30
|
+
四项目标如下:
|
|
31
|
+
|
|
32
|
+
| 指标 | 目标 | 防应试口径 | `null` 含义 |
|
|
33
|
+
|------|------|------------|-------------|
|
|
34
|
+
| 自主运行时长 | ≥72 小时 | 有效自主日需要至少 6 次非 idle 尝试;backlog 空的日期只停表,不计为未达标时间。 | 暂无足够合格运行历史,或窗口内 backlog 为空。 |
|
|
35
|
+
| 交付率 | ≥60% | 交付按 merge truth 统计,不按 cycle 自报退出码。 | 暂无可作为分母的交付样本。 |
|
|
36
|
+
| 修复税 | <1x | 分母仅统计 US 卡;FIX 工作不能改善自己的比值。 | 窗口内没有 US 卡分母。 |
|
|
37
|
+
| 归因错误 | =0 | `unknown` 不猜成 env、harness 或 card;缺失 envelope 保持可见。 | 暂无归因样本。 |
|
|
38
|
+
|
|
39
|
+
脚本消费用 `roll north --json`,它输出 `roll.north.v1`,字段与终端面板使用的当前值、
|
|
40
|
+
目标、原因和每日序列一致。
|
|
41
|
+
|
|
42
|
+
## 失败归因与暂停
|
|
43
|
+
|
|
44
|
+
每个失败 cycle 都归到四类之一:
|
|
45
|
+
|
|
46
|
+
| 类别 | 含义 | owner 动作 |
|
|
47
|
+
|------|------|------------|
|
|
48
|
+
| `env` | 机器、checkout、auth、network、sandbox 或 worktree 条件。 | 修复点名的环境问题,再恢复派工。 |
|
|
49
|
+
| `harness` | Roll 组件失败,例如 score 解析、attest render、publish 或 rescue。 | 检查对应组件,必要时开聚焦 FIX。 |
|
|
50
|
+
| `card` | Builder 已进入 story,并在真实卡片工作中失败。 | 读证据后调查 story、拆卡或调整路由。 |
|
|
51
|
+
| `unknown` | 没有足够 envelope 证据诚实归因给卡片。 | 先补确定性失败 envelope,再考虑归因。 |
|
|
52
|
+
|
|
53
|
+
根因计数按 `root_cause_key`,不是按卡片。同一个 `env`、`harness` 或 `unknown`
|
|
54
|
+
根因反复出现时,Roll 会暂停派工,并在 `.roll/loop/diagnostics/` 写诊断快照。
|
|
55
|
+
终端提示派工暂停时,先打开快照:里面有归因类别、根因、最近事件和 playbook。
|
|
56
|
+
修复点名的机器或 Roll 组件后,再运行 `roll loop resume`。
|
|
57
|
+
|
|
58
|
+
如果早先的 env/harness 失败把卡片错误推入 skip list,可以从持久证据重建:
|
|
59
|
+
|
|
60
|
+
```bash
|
|
61
|
+
roll loop pardon-skip-list --dry-run
|
|
62
|
+
roll loop pardon-skip-list
|
|
63
|
+
roll loop pardon-skip-list --include-unknown # 同时平反 unknown/no-evidence 行
|
|
64
|
+
```
|
|
65
|
+
|
|
66
|
+
`--include-unknown` 只应在读过记录后使用;较早的零用量 `gave_up` 行可能是真实 card 失败。
|
|
67
|
+
|
|
68
|
+
## Builder 隔离与救援区
|
|
69
|
+
|
|
70
|
+
Builder 执行期间,主 checkout 会被物理写保护。Builder 在自己的 cycle worktree 中工作;
|
|
71
|
+
共享 checkout 是传感器,不是草稿区。cycle 退出时 Roll 会释放写保护。
|
|
72
|
+
|
|
73
|
+
如果 dirty 或 ahead 改动仍然出现在主 checkout,Roll 会先隔离再继续:
|
|
74
|
+
|
|
75
|
+
- dirty 文件写成 `rescue/leaked-*` ref,可按 manifest 里的
|
|
76
|
+
`git stash apply <ref>` 还原;
|
|
77
|
+
- ahead commits 写成 `rescue/leaked-*` 分支,可按 manifest 里的
|
|
78
|
+
`git cherry-pick <ref>` 还原;
|
|
79
|
+
- manifest 写在 `.roll/loop/quarantine/`,记录 cycle、story、phase、文件列表、
|
|
80
|
+
ref 和精确还原命令。
|
|
81
|
+
|
|
82
|
+
按 manifest 认领隔离内容,然后把主 checkout 恢复干净,再恢复 loop。
|
|
83
|
+
|
|
23
84
|
## 调度配置
|
|
24
85
|
|
|
25
86
|
Loop 通过 **launchd**(macOS)调度。默认每小时在一个根据项目路径推导出的分钟触发
|
|
@@ -172,6 +233,12 @@ roll agent # 查看 scope、role、agent pool 与 lega
|
|
|
172
233
|
roll agent list # 查看本机已装的 agent
|
|
173
234
|
```
|
|
174
235
|
|
|
236
|
+
开启语义选卡排序时,`roll loop watch --events` 会显示 `pick:ranked` 行,例如
|
|
237
|
+
`picked US-123 (rank 1/5: unblocks the release lane)`。`roll supervisor next` 和
|
|
238
|
+
`roll supervisor next --json` 会展示最近一次 top3 排序建议与理由。该排序只作建议;
|
|
239
|
+
Hold、Cut、未满足依赖、skip-list、open PR、已合并交付和 pending-publish gate 仍决定
|
|
240
|
+
卡片是否可选。
|
|
241
|
+
|
|
175
242
|
### Goal Mode 与定时模式
|
|
176
243
|
|
|
177
244
|
`roll loop go` 是手动 goal session,不是 launchd 定时 tick。运行期间 Roll 会持有
|
|
@@ -897,6 +964,54 @@ API key secret — 你配置的 agent 对应的那个。
|
|
|
897
964
|
这样可以保持 `git worktree list` 干净,防止 `.claude/worktrees/` 随时间积累。
|
|
898
965
|
分支仍领先于 `main` 的活跃 worktree 不受影响。
|
|
899
966
|
|
|
967
|
+
## 主 checkout 保护
|
|
968
|
+
|
|
969
|
+
Builder 进程运行期间,Roll 会在文件系统边界把共享主 checkout 设为只读,
|
|
970
|
+
同时保持 cycle worktree 可写。如果上一轮 cycle 把产品文件留脏,或让本地
|
|
971
|
+
`main` 领先 `origin/main`,Roll 会把污染物移入 `rescue/leaked-*` ref 和
|
|
972
|
+
`.roll/loop/quarantine/*.json` 清单,随后把主 checkout 恢复到可信状态并继续
|
|
973
|
+
本轮 cycle。
|
|
974
|
+
|
|
975
|
+
事件流会记录 `sandbox:write_protected` 和 `sandbox:quarantined`。
|
|
976
|
+
`roll loop watch --events`、`roll loop cycle <id> --activity` 和 supervisor 输出都会
|
|
977
|
+
展示这些事实。每个 quarantine 清单都包含 ref、文件列表,以及供 owner /
|
|
978
|
+
supervisor 认领恢复的一行命令。
|
|
979
|
+
|
|
980
|
+
## Cycle 结束后环境清理
|
|
981
|
+
|
|
982
|
+
在拆除 cycle worktree 之前,loop 会先执行一次声明式的环境清理。它只清理
|
|
983
|
+
worktree 内部产生的临时/工具链缓存产物——例如 `.scratch`、`tmp`、
|
|
984
|
+
`node_modules/.cache`、`.vite`、`__pycache__`、`.build`——不会触碰源码和
|
|
985
|
+
未提交的改动。
|
|
986
|
+
|
|
987
|
+
每条规则都会向 `events.ndjson` 写入一条 `cycle:cleanup` 事件,因此清理过程
|
|
988
|
+
可观测、可审计。清理失败会降级为 warning 事件,同时汇总写入 `ALERT.md`,
|
|
989
|
+
并按独立的 `harness:env_cleanup` 根因计数;它不会阻塞下一轮 cycle。
|
|
990
|
+
|
|
991
|
+
你可以通过 `.roll/loop/cleanup-manifest.yaml` 覆盖或扩展默认规则:
|
|
992
|
+
|
|
993
|
+
```yaml
|
|
994
|
+
rules:
|
|
995
|
+
- name: my-scratch
|
|
996
|
+
kind: rm
|
|
997
|
+
paths:
|
|
998
|
+
- .my-tmp
|
|
999
|
+
- "**/roll-cleanup.log"
|
|
1000
|
+
- name: my-cache
|
|
1001
|
+
kind: isolate
|
|
1002
|
+
paths:
|
|
1003
|
+
- .my-cache
|
|
1004
|
+
```
|
|
1005
|
+
|
|
1006
|
+
`kind: rm` 删除目标;`kind: isolate` 把目标移进 worktree 内的
|
|
1007
|
+
`.roll-cleanup/<cycle-id>/<rule>/`(随 worktree 一起被删除)。
|
|
1008
|
+
|
|
1009
|
+
支持的路径形态刻意很小:字面相对路径,例如 `.my-tmp`;以及
|
|
1010
|
+
`prefix/**/literal-suffix` 形式的递归后缀匹配,例如 `**/roll-cleanup.log`
|
|
1011
|
+
或 `src/**/__pycache__`。不会展开 shell glob;递归后缀里包含 `*`(例如
|
|
1012
|
+
`**/*.log`)会让该规则无效,记录 warning,并跳过该规则。用 `rules: []`
|
|
1013
|
+
或 `enabled: false` 可以显式关闭 cleanup。只有没有覆盖文件时才使用默认清单。
|
|
1014
|
+
|
|
900
1015
|
## 阶段计时(Cycle phases)
|
|
901
1016
|
|
|
902
1017
|
每轮 cycle 在内部切成七个命名阶段。每个阶段进入时 emit `phase_start`,
|
|
@@ -910,7 +1025,7 @@ PR 等合并)每 30–60s 还会 emit 一次 `phase_tick` 心跳,tmux 不再
|
|
|
910
1025
|
| 3 | `worktree_setup` | fetch origin + 建 worktree + 同步 meta | 2 – 10 秒 |
|
|
911
1026
|
| 4 | `agent_invoke` | 调起 agent(最多三次重试) | 5 – 45 分钟 |
|
|
912
1027
|
| 5 | `publish_push` | push 分支 + 建 PR(doc-only 直接合) | 5 – 30 秒 |
|
|
913
|
-
| 6 | `cleanup` | 落 PR 终态 + 拆 worktree | < 1 秒 |
|
|
1028
|
+
| 6 | `cleanup` | 环境清理 + 落 PR 终态 + 拆 worktree | < 1 秒 |
|
|
914
1029
|
|
|
915
1030
|
> **US-AUTO-044**:主 loop 开完 PR 即退,**不再等合并**。合并 / rebase / 关 PR 交给专职 PR Loop(`com.roll.pr.<slug>`,每 5 分钟)异步处理;有 open PR 的 story 由资格闸跳过,不会重复开,也不会假 Done。
|
|
916
1031
|
|
package/lib/i18n/init.sh
CHANGED
|
@@ -46,8 +46,8 @@ _i18n_set en init.plan_validation_failed_see_errors_above "Plan validation faile
|
|
|
46
46
|
_i18n_set zh init.plan_validation_failed_see_errors_above "校验失败。"
|
|
47
47
|
_i18n_set en init.applying_onboard_plan "Applying onboard plan..."
|
|
48
48
|
_i18n_set zh init.applying_onboard_plan "正在应用 onboard 计划..."
|
|
49
|
-
_i18n_set en init.added_roll_to_gitignore "Added
|
|
50
|
-
_i18n_set zh init.added_roll_to_gitignore "已将
|
|
49
|
+
_i18n_set en init.added_roll_to_gitignore "Added Roll runtime ignores to .gitignore"
|
|
50
|
+
_i18n_set zh init.added_roll_to_gitignore "已将 Roll 运行时忽略项加入 .gitignore"
|
|
51
51
|
_i18n_set en init.syncing_conventions_to_ai_tools "Syncing conventions to AI tools..."
|
|
52
52
|
_i18n_set zh init.syncing_conventions_to_ai_tools "正在同步约定到 AI 工具..."
|
|
53
53
|
_i18n_set en init.onboard_apply_complete_onboard "Onboard apply complete. Onboard"
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@seanyao/roll",
|
|
3
|
-
"version": "4.
|
|
3
|
+
"version": "4.706.1",
|
|
4
4
|
"description": "Roll — Roll out features with AI agents",
|
|
5
5
|
"packageManager": "pnpm@11.1.3",
|
|
6
6
|
"scripts": {
|
|
@@ -10,6 +10,7 @@
|
|
|
10
10
|
"test:e2e": "pnpm -r build && pnpm --filter @roll/cli exec vitest run test/critical-flows.e2e.test.ts",
|
|
11
11
|
"test:cov": "pnpm -r exec vitest run --coverage.enabled --coverage.provider=v8 --coverage.include='src/**' --coverage.reporter=text-summary --coverage.reporter=text",
|
|
12
12
|
"bundle": "node scripts/bundle.mjs",
|
|
13
|
+
"postinstall": "node scripts/postinstall-roll-capture.mjs",
|
|
13
14
|
"prepack": "pnpm -r build && pnpm bundle"
|
|
14
15
|
},
|
|
15
16
|
"keywords": [
|
|
@@ -35,6 +36,7 @@
|
|
|
35
36
|
"docs/",
|
|
36
37
|
"guide/",
|
|
37
38
|
"lib/",
|
|
39
|
+
"scripts/postinstall-roll-capture.mjs",
|
|
38
40
|
"skills/",
|
|
39
41
|
"template/",
|
|
40
42
|
"README.md",
|