@seanyao/roll 4.630.1 → 4.702.2
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 +74 -0
- package/README.md +65 -55
- package/conventions/global/AGENTS.md +8 -7
- package/dist/roll.mjs +13277 -8746
- package/docs/INDEX.md +32 -0
- package/docs/architecture.md +444 -0
- package/docs/difftest-freeze-paradigm.md +113 -0
- package/docs/live-console.md +203 -0
- package/docs/manifesto.md +65 -0
- package/docs/migration/role-taxonomy-v4.md +60 -0
- package/docs/verification.md +83 -0
- package/guide/INDEX.md +86 -0
- package/guide/assets/layouts/cards-2.png +0 -0
- package/guide/assets/layouts/cards-3.png +0 -0
- package/guide/assets/layouts/cards-4.png +0 -0
- package/guide/assets/layouts/compare.png +0 -0
- package/guide/assets/layouts/highlight.png +0 -0
- package/guide/assets/layouts/pipeline.png +0 -0
- package/guide/assets/layouts/plain.png +0 -0
- package/guide/assets/layouts/quote.png +0 -0
- package/guide/assets/layouts/timeline.png +0 -0
- package/guide/en/acceptance-evidence.md +231 -0
- package/guide/en/ai-agents.md +185 -0
- package/guide/en/backlog-github-sync.md +108 -0
- package/guide/en/changelog.md +66 -0
- package/guide/en/configuration.md +112 -0
- package/guide/en/consistency.md +58 -0
- package/guide/en/conventions.md +113 -0
- package/guide/en/dream.md +121 -0
- package/guide/en/faq.md +855 -0
- package/guide/en/feedback.md +31 -0
- package/guide/en/getting-started.md +103 -0
- package/guide/en/installation.md +86 -0
- package/guide/en/legacy-onboarding.md +195 -0
- package/guide/en/loop-data-layout.md +256 -0
- package/guide/en/loop-driven-architecture.md +186 -0
- package/guide/en/loop.md +1324 -0
- package/guide/en/methodology.md +715 -0
- package/guide/en/migration-2.0.md +154 -0
- package/guide/en/overview.md +190 -0
- package/guide/en/pairing.md +151 -0
- package/guide/en/patterns/README.md +76 -0
- package/guide/en/patterns/graft-pattern.md +110 -0
- package/guide/en/patterns/replant-pattern.md +114 -0
- package/guide/en/patterns/seed-pattern.md +132 -0
- package/guide/en/peer.md +71 -0
- package/guide/en/pr-review.md +62 -0
- package/guide/en/practices/engineering-common-sense.md +395 -0
- package/guide/en/pricing.md +116 -0
- package/guide/en/project-setup.md +126 -0
- package/guide/en/roll-doc-audit.md +98 -0
- package/guide/en/skills.md +206 -0
- package/guide/en/test-isolation.md +51 -0
- package/guide/en/testing/quality-rubric.md +340 -0
- package/guide/en/testing.md +123 -0
- package/guide/en/tools.md +173 -0
- package/guide/skills.md +30 -0
- package/guide/zh/acceptance-evidence.md +194 -0
- package/guide/zh/ai-agents.md +170 -0
- package/guide/zh/backlog-github-sync.md +105 -0
- package/guide/zh/changelog.md +57 -0
- package/guide/zh/configuration.md +99 -0
- package/guide/zh/consistency.md +48 -0
- package/guide/zh/conventions.md +96 -0
- package/guide/zh/dream.md +97 -0
- package/guide/zh/faq.md +773 -0
- package/guide/zh/feedback.md +30 -0
- package/guide/zh/getting-started.md +96 -0
- package/guide/zh/installation.md +83 -0
- package/guide/zh/legacy-onboarding.md +192 -0
- package/guide/zh/loop-data-layout.md +236 -0
- package/guide/zh/loop-driven-architecture.md +186 -0
- package/guide/zh/loop.md +1124 -0
- package/guide/zh/methodology.md +702 -0
- package/guide/zh/migration-2.0.md +154 -0
- package/guide/zh/overview.md +186 -0
- package/guide/zh/pairing.md +117 -0
- package/guide/zh/patterns/README.md +74 -0
- package/guide/zh/patterns/graft-pattern.md +108 -0
- package/guide/zh/patterns/replant-pattern.md +112 -0
- package/guide/zh/patterns/seed-pattern.md +130 -0
- package/guide/zh/peer.md +63 -0
- package/guide/zh/pr-review.md +54 -0
- package/guide/zh/practices/engineering-common-sense.md +393 -0
- package/guide/zh/pricing.md +97 -0
- package/guide/zh/project-setup.md +114 -0
- package/guide/zh/roll-doc-audit.md +90 -0
- package/guide/zh/skills.md +191 -0
- package/guide/zh/test-isolation.md +46 -0
- package/guide/zh/testing/quality-rubric.md +284 -0
- package/guide/zh/testing.md +116 -0
- package/guide/zh/tools.md +173 -0
- package/package.json +4 -1
- package/skills/README.md +1 -0
- package/skills/roll-.qa/SKILL.md +1 -1
- package/skills/roll-.review/SKILL.md +1 -1
- package/skills/roll-build/SKILL.md +1 -1
- package/skills/roll-build/references/full-contract.md +16 -13
- package/skills/roll-design/SKILL.md +3 -3
- package/skills/roll-design/references/full-contract.md +17 -13
- package/skills/roll-fix/SKILL.md +1 -1
- package/skills/roll-fix/references/full-contract.md +13 -10
- package/skills/roll-peer/SKILL.md +1 -1
- package/skills/roll-prime/SKILL.md +77 -0
- package/skills/roll-prime/references/explorer-annex.md +39 -0
- package/skills/roll-prime/references/supervisor-prompt.md +165 -0
- package/skills/route-cases/skills.json +10 -0
- package/template/AGENTS.md +3 -1
|
@@ -0,0 +1,31 @@
|
|
|
1
|
+
# Feedback And Issue Capture
|
|
2
|
+
|
|
3
|
+
Roll keeps two feedback paths deliberately separate:
|
|
4
|
+
|
|
5
|
+
- Use `roll idea "<one sentence>"` when the input should become a local Roll backlog card.
|
|
6
|
+
- Use `gh issue create` when the input belongs in GitHub Issues for a public repo or cross-project tracker.
|
|
7
|
+
|
|
8
|
+
## Local Roll Backlog
|
|
9
|
+
|
|
10
|
+
```bash
|
|
11
|
+
roll idea "Safari login fails after the session cookie expires"
|
|
12
|
+
roll idea "Add dark mode to the story report archive"
|
|
13
|
+
```
|
|
14
|
+
|
|
15
|
+
`roll idea` classifies the note, assigns the next ID, infers the epic, mints
|
|
16
|
+
the card folder, appends the backlog row, and refreshes the index. It is the
|
|
17
|
+
normal project-owner entry for turning quick feedback into tracked Roll work.
|
|
18
|
+
|
|
19
|
+
## GitHub Issues
|
|
20
|
+
|
|
21
|
+
For public bug reports or external collaboration, call GitHub directly:
|
|
22
|
+
|
|
23
|
+
```bash
|
|
24
|
+
gh issue create \
|
|
25
|
+
--repo owner/repo \
|
|
26
|
+
--title "Login fails on Safari" \
|
|
27
|
+
--body "Repro: 1. ... 2. ..."
|
|
28
|
+
```
|
|
29
|
+
|
|
30
|
+
Use labels such as `bug`, `idea`, `enhancement`, `FIX`, or `US` if your project
|
|
31
|
+
board routes issues into Roll backlog work.
|
|
@@ -0,0 +1,103 @@
|
|
|
1
|
+
# Roll — Getting Started
|
|
2
|
+
|
|
3
|
+
This path gets one Roll-managed project from install to acceptance evidence in
|
|
4
|
+
about five minutes. Run it in a git repository.
|
|
5
|
+
|
|
6
|
+
## 1. Install
|
|
7
|
+
|
|
8
|
+
```bash
|
|
9
|
+
curl -fsSL https://seanyao.github.io/roll/install | bash
|
|
10
|
+
# or
|
|
11
|
+
npm install -g @seanyao/roll
|
|
12
|
+
```
|
|
13
|
+
|
|
14
|
+
Roll needs Node.js 22 or newer and at least one supported local AI agent.
|
|
15
|
+
|
|
16
|
+
## 2. Initialize The Project
|
|
17
|
+
|
|
18
|
+
```bash
|
|
19
|
+
cd your-project
|
|
20
|
+
roll setup
|
|
21
|
+
roll init
|
|
22
|
+
```
|
|
23
|
+
|
|
24
|
+
`roll init` diagnoses the directory before it writes anything. Empty projects use
|
|
25
|
+
the fresh scaffold path; existing codebases route to `$roll-onboard`; PRD/docs-only
|
|
26
|
+
projects point to design as a new-project path; partial or old Roll layouts print
|
|
27
|
+
repair/migration guidance without changing files.
|
|
28
|
+
|
|
29
|
+
## 3. Go from Requirements to a Backlog
|
|
30
|
+
|
|
31
|
+
If you have requirement docs (a PRD, sketches, notes) but no source yet, `roll
|
|
32
|
+
init` classifies that as a PRD-only new project and points you toward design.
|
|
33
|
+
`roll status` and `roll doctor` still show the design nudge after a Roll scaffold
|
|
34
|
+
exists with an empty backlog.
|
|
35
|
+
|
|
36
|
+
To start an interactive design session right away:
|
|
37
|
+
|
|
38
|
+
```bash
|
|
39
|
+
roll design --from-file docs/PRD.md
|
|
40
|
+
```
|
|
41
|
+
|
|
42
|
+
Use the exact `roll design --from-file ...` command printed by `roll init` when
|
|
43
|
+
it detects a PRD. Without a file, `roll design` still launches the same
|
|
44
|
+
`roll-design` skill in your AI agent. You talk through the domain model, the
|
|
45
|
+
agent writes INVEST stories into `.roll/backlog.md`, and detailed design notes
|
|
46
|
+
get a self-contained `design-review.html` Design Review Page — then `roll loop`
|
|
47
|
+
takes over.
|
|
48
|
+
|
|
49
|
+
You can also run `$roll-design` directly inside your agent if you prefer.
|
|
50
|
+
|
|
51
|
+
If you already have a story in mind and just want to add it fast, skip to step 4.
|
|
52
|
+
|
|
53
|
+
## 4. Add One Backlog Item
|
|
54
|
+
|
|
55
|
+
Add a small story card with one sentence:
|
|
56
|
+
|
|
57
|
+
```bash
|
|
58
|
+
roll idea "Add a health check endpoint"
|
|
59
|
+
```
|
|
60
|
+
|
|
61
|
+
`roll idea` auto-classifies, assigns an id, infers the epic, and creates the
|
|
62
|
+
card folder — you get both the backlog row and the story folder in one step.
|
|
63
|
+
|
|
64
|
+
Then edit `.roll/features/<epic>/<ID>/spec.md` so the ACs describe what
|
|
65
|
+
"done" means.
|
|
66
|
+
|
|
67
|
+
Keep the first story tiny: one visible behavior, one clear test path.
|
|
68
|
+
|
|
69
|
+
## 5. Start The Loop
|
|
70
|
+
|
|
71
|
+
```bash
|
|
72
|
+
roll loop on
|
|
73
|
+
roll loop status
|
|
74
|
+
```
|
|
75
|
+
|
|
76
|
+
`roll loop status` is the normal snapshot view. If a cycle is running and you
|
|
77
|
+
want the live view, start with the read-only watch command:
|
|
78
|
+
|
|
79
|
+
```bash
|
|
80
|
+
roll loop watch
|
|
81
|
+
```
|
|
82
|
+
|
|
83
|
+
Use `roll loop watch --events` for compact event debugging and
|
|
84
|
+
`roll loop watch --raw-events` only when you need raw audit JSON. All watch
|
|
85
|
+
modes are read-only; Ctrl-C stops only the view.
|
|
86
|
+
|
|
87
|
+
For an immediate local cycle instead of waiting for the schedule:
|
|
88
|
+
|
|
89
|
+
```bash
|
|
90
|
+
roll loop now
|
|
91
|
+
```
|
|
92
|
+
|
|
93
|
+
## 6. Render Acceptance Evidence
|
|
94
|
+
|
|
95
|
+
After the story lands and the backlog row is `✅ Done`, render the offline
|
|
96
|
+
acceptance report:
|
|
97
|
+
|
|
98
|
+
```bash
|
|
99
|
+
roll attest US-DEMO-001
|
|
100
|
+
```
|
|
101
|
+
|
|
102
|
+
The report is written into that story folder under `.roll/features/`. Each AC
|
|
103
|
+
should have a verdict and evidence link before a release.
|
|
@@ -0,0 +1,86 @@
|
|
|
1
|
+
# Roll — Installation & Updates
|
|
2
|
+
|
|
3
|
+
## Install
|
|
4
|
+
|
|
5
|
+
### curl (recommended)
|
|
6
|
+
|
|
7
|
+
```bash
|
|
8
|
+
curl -fsSL https://seanyao.github.io/roll/install | bash
|
|
9
|
+
```
|
|
10
|
+
|
|
11
|
+
No prerequisites beyond bash 3.2+, curl, and tar — all preinstalled on macOS and Linux.
|
|
12
|
+
|
|
13
|
+
To pin a specific version:
|
|
14
|
+
|
|
15
|
+
```bash
|
|
16
|
+
curl -fsSL https://seanyao.github.io/roll/install | ROLL_VERSION=v3.610.1 bash
|
|
17
|
+
```
|
|
18
|
+
|
|
19
|
+
### npm
|
|
20
|
+
|
|
21
|
+
```bash
|
|
22
|
+
npm install -g @seanyao/roll
|
|
23
|
+
```
|
|
24
|
+
|
|
25
|
+
Requires Node.js 16+.
|
|
26
|
+
|
|
27
|
+
After installation via either method, run setup to sync conventions and skills into your AI tools:
|
|
28
|
+
|
|
29
|
+
```bash
|
|
30
|
+
roll setup
|
|
31
|
+
```
|
|
32
|
+
|
|
33
|
+
## Verify
|
|
34
|
+
|
|
35
|
+
```bash
|
|
36
|
+
roll --version # print installed version
|
|
37
|
+
roll status # show resolved paths and convention state
|
|
38
|
+
```
|
|
39
|
+
|
|
40
|
+
## Update
|
|
41
|
+
|
|
42
|
+
```bash
|
|
43
|
+
roll update
|
|
44
|
+
```
|
|
45
|
+
|
|
46
|
+
Roll detects how it was installed and acts accordingly:
|
|
47
|
+
|
|
48
|
+
| Install mode | What `roll update` does |
|
|
49
|
+
|---|---|
|
|
50
|
+
| curl (default) | Re-downloads the latest tarball, extracts atomically, then `roll sync` |
|
|
51
|
+
| npm | `npm update -g @seanyao/roll`, then `roll sync` |
|
|
52
|
+
| git clone (contributors) | `git pull` in the package directory, then `roll sync` |
|
|
53
|
+
|
|
54
|
+
## Automatic Version Nudge
|
|
55
|
+
|
|
56
|
+
After each `roll` command, a background check queries the GitHub releases API
|
|
57
|
+
(at most once per 24 h, cached at `~/.roll/.update-check`). If a newer version
|
|
58
|
+
is available, a one-line nudge appears at the end of the next command's output.
|
|
59
|
+
The check is fire-and-forget — it never delays your command.
|
|
60
|
+
|
|
61
|
+
## Uninstall
|
|
62
|
+
|
|
63
|
+
### curl
|
|
64
|
+
|
|
65
|
+
```bash
|
|
66
|
+
rm -rf ~/.local/share/roll ~/.local/bin/roll
|
|
67
|
+
```
|
|
68
|
+
|
|
69
|
+
### npm
|
|
70
|
+
|
|
71
|
+
```bash
|
|
72
|
+
npm uninstall -g @seanyao/roll
|
|
73
|
+
```
|
|
74
|
+
|
|
75
|
+
Remove state files afterward if you no longer need them:
|
|
76
|
+
|
|
77
|
+
```bash
|
|
78
|
+
rm -rf ~/.roll ~/.shared/roll
|
|
79
|
+
```
|
|
80
|
+
|
|
81
|
+
## See Also
|
|
82
|
+
|
|
83
|
+
- [overview.md](overview.md) — what roll is
|
|
84
|
+
- [project-setup.md](project-setup.md) — `roll init` for a new project
|
|
85
|
+
- [configuration.md](configuration.md) — environment variables
|
|
86
|
+
- [SECURITY.md](../../SECURITY.md) — curl|bash trust boundary and version pinning
|
|
@@ -0,0 +1,195 @@
|
|
|
1
|
+
# Existing Codebase Onboarding
|
|
2
|
+
|
|
3
|
+
> Adopt Roll on an existing codebase without breaking your team's current workflow.
|
|
4
|
+
|
|
5
|
+
This page keeps the `legacy-onboarding.md` path for link stability. The visible
|
|
6
|
+
workflow name is **Existing Codebase Onboarding**.
|
|
7
|
+
|
|
8
|
+
If you have a real project that's been alive for a while — code, tests, history, conventions, the works — and you want to start using Roll on it, this is your path.
|
|
9
|
+
|
|
10
|
+
## Three modes of adoption
|
|
11
|
+
|
|
12
|
+
| Mode | Use when | Trade-off |
|
|
13
|
+
|------|----------|-----------|
|
|
14
|
+
| **Seed** | You're starting a brand-new project | Lowest friction; specs/backlog from day 1 |
|
|
15
|
+
| **Graft** (this page) | You have a live existing codebase that keeps evolving | Zero intrusion on existing code; Roll layered on top |
|
|
16
|
+
| **Replant** | You want a clean rewrite, debt cleared | Higher effort; you reverse-engineer specs first |
|
|
17
|
+
|
|
18
|
+
This page covers **graft**. For seed vs. replant, see [adoption patterns](https://github.com/seanyao/roll-meta) (maintainer-only repo, public summary in the README).
|
|
19
|
+
|
|
20
|
+
## What graft does
|
|
21
|
+
|
|
22
|
+
- **Reads** your project to understand type, domains, and key modules
|
|
23
|
+
- **Asks** you 9 questions in ≤ 3 minutes
|
|
24
|
+
- **Generates** a `.roll/` directory alongside your existing code (no source files touched)
|
|
25
|
+
- **Syncs** Roll conventions to whichever AI tools you use
|
|
26
|
+
- Leaves you with a project that has BOTH its original workflow AND Roll's project-management capabilities
|
|
27
|
+
|
|
28
|
+
The graft is **fully reversible**: run `roll setup offboard` and Roll undoes exactly what it added (see [How to exit](#how-to-exit) below).
|
|
29
|
+
|
|
30
|
+
## Step by step
|
|
31
|
+
|
|
32
|
+
### 1. Install Roll
|
|
33
|
+
|
|
34
|
+
```bash
|
|
35
|
+
curl -fsSL https://seanyao.github.io/roll/install | bash
|
|
36
|
+
```
|
|
37
|
+
|
|
38
|
+
Or via npm:
|
|
39
|
+
|
|
40
|
+
```bash
|
|
41
|
+
npm install -g @seanyao/roll@latest
|
|
42
|
+
```
|
|
43
|
+
|
|
44
|
+
Then:
|
|
45
|
+
|
|
46
|
+
```bash
|
|
47
|
+
roll setup
|
|
48
|
+
```
|
|
49
|
+
|
|
50
|
+
### 2. Run `roll init` in your project
|
|
51
|
+
|
|
52
|
+
```bash
|
|
53
|
+
cd your-project
|
|
54
|
+
roll init
|
|
55
|
+
```
|
|
56
|
+
|
|
57
|
+
Roll detects this as an existing codebase without Roll (source/manifests exist, but no current Roll markers). It will print something like:
|
|
58
|
+
|
|
59
|
+
```
|
|
60
|
+
Detected: existing codebase without Roll
|
|
61
|
+
Recommended path: agentic-onboard
|
|
62
|
+
Facts:
|
|
63
|
+
- manifests: package.json
|
|
64
|
+
- source dirs: src
|
|
65
|
+
- test dirs: tests
|
|
66
|
+
- source files: 47
|
|
67
|
+
- Roll markers: none
|
|
68
|
+
- facts hash: sha256:...
|
|
69
|
+
Next: $roll-onboard
|
|
70
|
+
Agent status: available: claude, codex
|
|
71
|
+
Run `$roll-onboard` with an available agent, review the artifacts, then run `roll init --apply`.
|
|
72
|
+
No files changed.
|
|
73
|
+
```
|
|
74
|
+
|
|
75
|
+
### 3. Run `$roll-onboard` in your AI agent
|
|
76
|
+
|
|
77
|
+
Open the agent of your choice (Claude Code, Codex CLI, Cursor, etc.) and run:
|
|
78
|
+
|
|
79
|
+
```
|
|
80
|
+
$roll-onboard
|
|
81
|
+
```
|
|
82
|
+
|
|
83
|
+
The skill will:
|
|
84
|
+
1. Walk your repository and tell you what it sees
|
|
85
|
+
2. Confirm the inferred project type, domains, key modules (group 1: 3 questions)
|
|
86
|
+
3. Ask which `.roll/` artifacts to generate and which existing docs to include (group 2: 3 questions)
|
|
87
|
+
4. Ask about `.gitignore`, AI tool sync, and loop activation (group 3: 3 questions)
|
|
88
|
+
5. Write exactly two structured artifacts: `.roll/init-diagnosis.yaml` and `.roll/onboard-plan.yaml`
|
|
89
|
+
|
|
90
|
+
Total time: under 3 minutes.
|
|
91
|
+
|
|
92
|
+
### 4. Apply the plan
|
|
93
|
+
|
|
94
|
+
Back in your terminal, review `.roll/init-diagnosis.yaml` and `.roll/onboard-plan.yaml`, then run:
|
|
95
|
+
|
|
96
|
+
```bash
|
|
97
|
+
roll init --apply
|
|
98
|
+
```
|
|
99
|
+
|
|
100
|
+
This validates the paired diagnosis/plan artifacts before writing anything. It rejects unsupported schema versions, stale facts hashes, non-idempotent file operations, path traversal, and shell-command keys.
|
|
101
|
+
|
|
102
|
+
After validation, Roll prints an apply review checkpoint. The table lists every
|
|
103
|
+
planned operation with action, target path, merge/create mode, and whether owner
|
|
104
|
+
content is preserved. In an interactive terminal, Roll waits for confirmation
|
|
105
|
+
before writing any reviewed mutation.
|
|
106
|
+
|
|
107
|
+
For non-interactive automation, use the explicit review acknowledgement after you have reviewed the artifacts:
|
|
108
|
+
|
|
109
|
+
```bash
|
|
110
|
+
roll init --apply --auto
|
|
111
|
+
```
|
|
112
|
+
|
|
113
|
+
After validation passes, Roll:
|
|
114
|
+
- Creates `.roll/` subdirectories per your scope choices
|
|
115
|
+
- Generates a starter `.roll/backlog.md` if you said yes
|
|
116
|
+
- Includes (not regenerates) the existing docs you flagged
|
|
117
|
+
- Adds `.roll/` to `.gitignore` if you said yes
|
|
118
|
+
- Syncs Roll conventions to the AI tools you picked
|
|
119
|
+
|
|
120
|
+
Done. Run `roll next` to continue with the next action.
|
|
121
|
+
|
|
122
|
+
### 5. (Optional) Turn on autonomous loop
|
|
123
|
+
|
|
124
|
+
If you said "yes" to Q9, `roll loop on` activates the autonomous executor on a cron schedule. It picks up `📋 Todo` items from `BACKLOG.md` and runs `$roll-build` / `$roll-fix` on them.
|
|
125
|
+
|
|
126
|
+
## The graft boundary
|
|
127
|
+
|
|
128
|
+
Roll only touches **its own** files inside your project:
|
|
129
|
+
|
|
130
|
+
| Touched by Roll | Not touched by Roll |
|
|
131
|
+
|-----------------|---------------------|
|
|
132
|
+
| `.roll/` (all contents) | `src/`, `lib/`, `tests/`, etc. — your code |
|
|
133
|
+
| `AGENTS.md` (created if missing; section-merged if exists) | `README.md` |
|
|
134
|
+
| `.gitignore` (only if you said yes to Q7) | `package.json`, `pyproject.toml`, etc. |
|
|
135
|
+
|
|
136
|
+
If you've already got a `CONTRIBUTING.md` or a `.github/` workflow, Roll won't reach into them. If you want Roll's workflow integrated with yours, that's a manual step you do later.
|
|
137
|
+
|
|
138
|
+
`$roll-onboard` itself has a stricter boundary than `roll init --apply`: the agent may only write `.roll/init-diagnosis.yaml` and `.roll/onboard-plan.yaml`. The apply command owns `AGENTS.md`, `.gitignore`, backlog, features, docs, and offboard changesets.
|
|
139
|
+
|
|
140
|
+
## How to exit
|
|
141
|
+
|
|
142
|
+
`roll init --apply` records every Roll-owned file, directory, merged marker block, and `.gitignore` line it adds into `.roll/onboard-changeset.yaml`. Re-running the same plan keeps that metadata and deduplicates entries instead of losing the original offboard record. If apply fails midway, inspect the changeset and run `roll setup offboard --confirm` after review to reverse Roll-owned artifacts.
|
|
143
|
+
|
|
144
|
+
Existing `AGENTS.md` files are preserved. Roll appends its managed sections between stable `<!-- roll:onboard:start -->` / `<!-- roll:onboard:end -->` markers so offboard can strip only those sections later.
|
|
145
|
+
|
|
146
|
+
**Preview what will be undone (default):**
|
|
147
|
+
|
|
148
|
+
```bash
|
|
149
|
+
cd your-project
|
|
150
|
+
roll setup offboard
|
|
151
|
+
```
|
|
152
|
+
|
|
153
|
+
This is a dry-run — no files are removed. The output lists every artefact the changeset recorded and the `.gitignore` lines that will be reverted.
|
|
154
|
+
|
|
155
|
+
**Apply the rollback:**
|
|
156
|
+
|
|
157
|
+
```bash
|
|
158
|
+
roll setup offboard --confirm
|
|
159
|
+
```
|
|
160
|
+
|
|
161
|
+
Files and directories that Roll did not create are left untouched. Marker-wrapped Roll sections are removed from existing owner files without deleting the file. Lines you added to `.gitignore` yourself are preserved. The changeset file itself is removed at the end of a successful apply.
|
|
162
|
+
|
|
163
|
+
Safety:
|
|
164
|
+
|
|
165
|
+
- If `.roll/onboard-changeset.yaml` is missing (e.g. you ran an earlier Roll version that didn't track it, or the project was never onboarded with `roll init --apply`), `roll setup offboard` refuses and prints the manual `rm` commands instead. It will never guess.
|
|
166
|
+
- If the changeset names paths that resolve outside the current project (cross-project contamination), `roll setup offboard` refuses and tells you to run it in the right directory.
|
|
167
|
+
|
|
168
|
+
**Full uninstall (machine-wide):**
|
|
169
|
+
|
|
170
|
+
```bash
|
|
171
|
+
roll setup offboard --confirm
|
|
172
|
+
npm uninstall -g @seanyao/roll
|
|
173
|
+
```
|
|
174
|
+
|
|
175
|
+
Your project is now exactly as it was before adoption.
|
|
176
|
+
|
|
177
|
+
## FAQ
|
|
178
|
+
|
|
179
|
+
**Q: What if I don't have an AI agent installed?**
|
|
180
|
+
You need at least one. Install Claude Code, Codex CLI, or Cursor — they're free to install (the AI calls cost tokens via your account).
|
|
181
|
+
|
|
182
|
+
**Q: What if I already have a `BACKLOG.md` from another tool?**
|
|
183
|
+
Roll detects this as a pre-2.0 Roll project (not an existing-codebase onboard target) and tells you to run `npx @seanyao/roll@2 migrate`. If the file came from a totally different tool, rename it first (`mv BACKLOG.md old-backlog.md`) then run `roll init`.
|
|
184
|
+
|
|
185
|
+
**Q: Roll-onboard infers my project type wrong — what do I do?**
|
|
186
|
+
Tell the skill in chat. Group 1 questions exist specifically so you can correct misidentification. The skill writes the corrected understanding into the plan; bash trusts the plan.
|
|
187
|
+
|
|
188
|
+
**Q: Can I edit `.roll/onboard-plan.yaml` manually?**
|
|
189
|
+
Yes, but keep it paired with `.roll/init-diagnosis.yaml`. `roll init --apply` requires matching `factsHash` values, recomputes the current facts hash, allows no shell-command keys, and only accepts the two idempotent `file_operations` entries rooted inside the project. Plans older than 24 hours, stale against the current project, or generated by older `$roll-onboard` contracts should be regenerated.
|
|
190
|
+
|
|
191
|
+
Manual edits still pass through the same review checkpoint; without interactive
|
|
192
|
+
confirmation or explicit `--auto`, no files are changed.
|
|
193
|
+
|
|
194
|
+
**Q: My team uses GitHub Issues / Jira / Linear — does Roll replace them?**
|
|
195
|
+
No. Roll's `BACKLOG.md` is for AI-driven autonomous execution. Your team's external tracker stays where it is. Some teams use Roll only for new stories that are AI-loop-executable and keep human-only work in their existing tracker.
|
|
@@ -0,0 +1,256 @@
|
|
|
1
|
+
# Loop Data Layout (Phase 2.0)
|
|
2
|
+
|
|
3
|
+
Starting with Phase 2.0, a project's own loop runtime data lives **inside the
|
|
4
|
+
project** at `<project>/.roll/loop/`, not under your home directory. Only the
|
|
5
|
+
machine-level binding files (launchd runners, attach scripts) stay in
|
|
6
|
+
`~/.shared/roll/loop/`.
|
|
7
|
+
|
|
8
|
+
从 Phase 2.0 起,项目自己的 loop 运行时数据搬进了**项目目录** `<project>/.roll/loop/`,
|
|
9
|
+
不再放在家目录下。只有机器级的绑定文件(launchd runner、attach 脚本)留在
|
|
10
|
+
`~/.shared/roll/loop/`。
|
|
11
|
+
|
|
12
|
+
This means: move the project, the state moves with it. Delete the project, the
|
|
13
|
+
state goes too. `git status` and your IDE can see the loop's control and data
|
|
14
|
+
files alongside your code.
|
|
15
|
+
|
|
16
|
+
也就是说:项目挪走,状态跟着走;项目删掉,状态也一起没了。`git status` 和你的
|
|
17
|
+
IDE 能在代码旁边看到 loop 的控制与数据文件。
|
|
18
|
+
|
|
19
|
+
---
|
|
20
|
+
|
|
21
|
+
## What lives in `<project>/.roll/loop/`
|
|
22
|
+
|
|
23
|
+
What lives in `<project>/.roll/loop/`:
|
|
24
|
+
|
|
25
|
+
`<project>/.roll/loop/` 里放什么:
|
|
26
|
+
|
|
27
|
+
| File | Plane | Content |
|
|
28
|
+
|------|-------|---------|
|
|
29
|
+
| `state-<slug>.yaml` | control | Current/last run: status, story, agent, run_id |
|
|
30
|
+
| `ALERT-<slug>.md` | control | Accumulated alerts (failures, TCR violations) |
|
|
31
|
+
| `PAUSE-<slug>` | control | Pause marker (created by `roll loop pause`) |
|
|
32
|
+
| `mute-<slug>` | control | Per-project auto-attach mute marker |
|
|
33
|
+
| `.LOCK-<slug>` | control | Single-runner lock for this project |
|
|
34
|
+
| `heartbeat` | control | Liveness timestamp for the running cycle |
|
|
35
|
+
| `runs.jsonl` | data | Append-only run history (one JSON line per cycle) |
|
|
36
|
+
| `events.ndjson` | data | Per-cycle event stream (phase_start/phase_end, …) |
|
|
37
|
+
| `cron.log` | data | Legacy aggregate cycle log (see deprecation note below) |
|
|
38
|
+
|
|
39
|
+
The control plane (what the outer runner touches before spawning tmux) and the
|
|
40
|
+
data plane (what the inner cycle script writes) ship independently, but both now
|
|
41
|
+
resolve to the same project-local directory.
|
|
42
|
+
|
|
43
|
+
控制平面(outer runner 在 spawn tmux 之前接触的)和数据平面(inner cycle 脚本写
|
|
44
|
+
入的)各自独立演进,但现在都解析到同一个项目本地目录。
|
|
45
|
+
|
|
46
|
+
---
|
|
47
|
+
|
|
48
|
+
## Dream cron logs
|
|
49
|
+
|
|
50
|
+
`roll-.dream` (the nightly code-health scan) also writes its cron stdout capture
|
|
51
|
+
project-local:
|
|
52
|
+
|
|
53
|
+
| Service | Path |
|
|
54
|
+
|---------|------|
|
|
55
|
+
| dream | `<project>/.roll/dream/cron.log` |
|
|
56
|
+
|
|
57
|
+
Previously this lived in `~/.shared/roll/dream/cron-<slug>.log`.
|
|
58
|
+
Moving it project-local means it is naturally garbage-collected when
|
|
59
|
+
the project is deleted, and concurrent projects never interleave.
|
|
60
|
+
|
|
61
|
+
`roll-.dream`(每晚代码健康扫描)的 cron stdout 捕获日志也改为项目本地:
|
|
62
|
+
|
|
63
|
+
| 服务 | 路径 |
|
|
64
|
+
|------|------|
|
|
65
|
+
| dream | `<project>/.roll/dream/cron.log` |
|
|
66
|
+
|
|
67
|
+
以前放在 `~/.shared/roll/dream/cron-<slug>.log`。项目本地后,删项目即
|
|
68
|
+
清日志,并发项目也不会互相穿插。
|
|
69
|
+
|
|
70
|
+
---
|
|
71
|
+
|
|
72
|
+
## What is left in `~/.shared/roll/loop/`
|
|
73
|
+
|
|
74
|
+
What is left in `~/.shared/roll/loop/`:
|
|
75
|
+
|
|
76
|
+
`~/.shared/roll/loop/` 现在只剩:
|
|
77
|
+
|
|
78
|
+
| File | Why it stays |
|
|
79
|
+
|------|--------------|
|
|
80
|
+
| `run-<slug>.sh` / `run-<slug>-inner.sh` | launchd `WorkingDirectory` / `ProgramArguments` bind to absolute home paths |
|
|
81
|
+
| `attach-<slug>.command` | LaunchServices double-click target; must be a stable home path |
|
|
82
|
+
| `worktrees/` | machine-scoped scratch, not project-intrinsic |
|
|
83
|
+
| `changelog-audit*` | machine-level audit log |
|
|
84
|
+
| `archived/` | `roll loop gc` parking lot for retired slugs |
|
|
85
|
+
|
|
86
|
+
`~/.shared/roll/mute` (the global mute switch shared across all projects and all
|
|
87
|
+
autonomous activity) also stays in home — it is intentionally machine-wide.
|
|
88
|
+
|
|
89
|
+
`~/.shared/roll/mute`(所有项目、所有自动化活动共享的全局静音开关)也留在家目录 ——
|
|
90
|
+
它本来就是机器级的。
|
|
91
|
+
|
|
92
|
+
---
|
|
93
|
+
|
|
94
|
+
## Cross-project dashboard
|
|
95
|
+
|
|
96
|
+
`roll loop runs --all` no longer reads one machine-wide `runs.jsonl`. Instead it:
|
|
97
|
+
|
|
98
|
+
`roll loop runs --all` 不再读单个机器级的 `runs.jsonl`,而是:
|
|
99
|
+
|
|
100
|
+
1. Enumerates installed slugs from launchd plists.
|
|
101
|
+
2. Resolves each slug to its project path, reads that project's
|
|
102
|
+
`.roll/loop/runs.jsonl`.
|
|
103
|
+
3. Merges every project's rows with `jq` and sorts by timestamp.
|
|
104
|
+
|
|
105
|
+
1. 从 launchd plist 枚举已安装的 slug。
|
|
106
|
+
2. 把每个 slug 解析到它的项目路径,读该项目的 `.roll/loop/runs.jsonl`。
|
|
107
|
+
3. 用 `jq` 把所有项目的行归并,按时间排序。
|
|
108
|
+
|
|
109
|
+
So you still get a machine-wide overview, computed live from per-project files —
|
|
110
|
+
no central file to drift out of sync.
|
|
111
|
+
|
|
112
|
+
所以你照样能看到机器级总览,只是改为从各项目文件实时聚合 —— 没有会失同步的中心文件。
|
|
113
|
+
|
|
114
|
+
The optional cache hook `ROLL_LOOP_RUNS_CACHE_TTL` (default `0` = no cache) is
|
|
115
|
+
reserved for future use; aggregation is live today.
|
|
116
|
+
|
|
117
|
+
可选的缓存钩子 `ROLL_LOOP_RUNS_CACHE_TTL`(默认 `0` = 不缓存)为未来预留;目前是
|
|
118
|
+
实时聚合。
|
|
119
|
+
|
|
120
|
+
---
|
|
121
|
+
|
|
122
|
+
## Automatic migration (7-day dual-path window)
|
|
123
|
+
|
|
124
|
+
If you upgrade an existing project, **you do not need to do anything**. The
|
|
125
|
+
outer runner migrates legacy files automatically on the next cycle.
|
|
126
|
+
|
|
127
|
+
如果你升级一个既有项目,**无需任何手动操作**。outer runner 会在下一个 cycle 自动
|
|
128
|
+
迁移老文件。
|
|
129
|
+
|
|
130
|
+
**How it works:**
|
|
131
|
+
|
|
132
|
+
**工作原理:**
|
|
133
|
+
|
|
134
|
+
1. Before reading any control state, the runner calls
|
|
135
|
+
`the legacy-path migration helper <slug>`. It copies `state-<slug>.yaml`,
|
|
136
|
+
`ALERT-<slug>.md`, `PAUSE-<slug>`, and `mute-<slug>` from
|
|
137
|
+
`~/.shared/roll/loop/` into `<project>/.roll/loop/`, then renames each legacy
|
|
138
|
+
file to `<name>.migrated-<timestamp>`.
|
|
139
|
+
2. `runs.jsonl` is migrated by `the legacy-runs migration helper`: the machine-wide
|
|
140
|
+
file is split by each row's `project` slug into the matching project's
|
|
141
|
+
`.roll/loop/runs.jsonl`, then renamed `runs.jsonl.migrated-<timestamp>`. Rows
|
|
142
|
+
whose slug cannot be resolved are left behind so no history is lost.
|
|
143
|
+
3. Migration is **idempotent** — the `.migrated-*` rename makes a re-run a
|
|
144
|
+
no-op, and an existing newer target is never overwritten.
|
|
145
|
+
|
|
146
|
+
1. 读任何控制状态之前,runner 调用 `the legacy-path migration helper <slug>`,把
|
|
147
|
+
`state-<slug>.yaml`、`ALERT-<slug>.md`、`PAUSE-<slug>`、`mute-<slug>` 从
|
|
148
|
+
`~/.shared/roll/loop/` 复制进 `<project>/.roll/loop/`,再把每个老文件改名为
|
|
149
|
+
`<name>.migrated-<时间戳>`。
|
|
150
|
+
2. `runs.jsonl` 由 `the legacy-runs migration helper` 迁移:机器级文件按每行的 `project`
|
|
151
|
+
slug 拆分进对应项目的 `.roll/loop/runs.jsonl`,再改名
|
|
152
|
+
`runs.jsonl.migrated-<时间戳>`。无法解析 slug 的行会留在原处,不丢历史。
|
|
153
|
+
3. 迁移**幂等** —— `.migrated-*` 改名让重跑变成 no-op,已存在的更新目标永不被覆盖。
|
|
154
|
+
|
|
155
|
+
**During the 7-day window**, reads of control-plane files use dual-path lookup
|
|
156
|
+
(`the control-state path resolver`): the project-local path is preferred, falling back
|
|
157
|
+
to the legacy home path. After the window, a separate FIX removes the fallback.
|
|
158
|
+
|
|
159
|
+
**在 7 天窗口期内**,控制平面文件的读取走双路查找(`the control-state path resolver`):
|
|
160
|
+
优先项目本地路径,回退到家目录老路径。窗口结束后由单独的 FIX 移除回退。
|
|
161
|
+
|
|
162
|
+
The `.migrated-*` and `runs.jsonl.migrated-*` artifacts are reaped by
|
|
163
|
+
`roll loop gc` after they age out (see below), so home never accumulates debris.
|
|
164
|
+
|
|
165
|
+
`.migrated-*` 和 `runs.jsonl.migrated-*` 残骸到期后由 `roll loop gc` 回收(见下),
|
|
166
|
+
家目录不会堆积。
|
|
167
|
+
|
|
168
|
+
---
|
|
169
|
+
|
|
170
|
+
## `roll loop gc` — garbage collection
|
|
171
|
+
|
|
172
|
+
`roll loop gc` retires slugs whose project directory no longer exists, and
|
|
173
|
+
sweeps migration/backup debris.
|
|
174
|
+
|
|
175
|
+
`roll loop gc` 退役那些项目目录已不存在的 slug,并清扫迁移/备份残骸。
|
|
176
|
+
|
|
177
|
+
```bash
|
|
178
|
+
roll loop gc # GC orphan slugs + debris (default: keep 30 days)
|
|
179
|
+
roll loop gc --dry-run # Preview what would be removed — touches nothing
|
|
180
|
+
roll loop gc --keep-days 14 # Override retention for this run
|
|
181
|
+
```
|
|
182
|
+
|
|
183
|
+
**What it cleans:**
|
|
184
|
+
|
|
185
|
+
**它清什么:**
|
|
186
|
+
|
|
187
|
+
- Orphan slugs — `run-<slug>.sh` / `-inner.sh` / `attach-*.command` are moved to
|
|
188
|
+
`~/.shared/roll/loop/archived/<slug>-<timestamp>/`; the launchd plist is
|
|
189
|
+
booted out first.
|
|
190
|
+
- `runs.jsonl.tmp.*` write-interrupted leftovers.
|
|
191
|
+
- `backup-before-merge-*.tgz` older than 5 days.
|
|
192
|
+
- `*.migrated-<ts>` markers older than 7 days.
|
|
193
|
+
|
|
194
|
+
- 孤儿 slug —— `run-<slug>.sh` / `-inner.sh` / `attach-*.command` 移到
|
|
195
|
+
`~/.shared/roll/loop/archived/<slug>-<时间戳>/`,先 bootout launchd plist。
|
|
196
|
+
- `runs.jsonl.tmp.*` 写中断残留。
|
|
197
|
+
- 5 天前的 `backup-before-merge-*.tgz`。
|
|
198
|
+
- 7 天前的 `*.migrated-<时间戳>` 标记。
|
|
199
|
+
|
|
200
|
+
**Retention precedence** (highest first):
|
|
201
|
+
|
|
202
|
+
**保留期优先级**(从高到低):
|
|
203
|
+
|
|
204
|
+
1. `ROLL_LOOP_GC_RETENTION_DAYS` environment variable.
|
|
205
|
+
2. `loop_gc.retention_days` in `.roll/local.yaml`.
|
|
206
|
+
3. Default: 30 days.
|
|
207
|
+
|
|
208
|
+
1. 环境变量 `ROLL_LOOP_GC_RETENTION_DAYS`。
|
|
209
|
+
2. `.roll/local.yaml` 里的 `loop_gc.retention_days`。
|
|
210
|
+
3. 默认 30 天。
|
|
211
|
+
|
|
212
|
+
`--dry-run` lists the full plan without executing — safe to run anytime.
|
|
213
|
+
|
|
214
|
+
`--dry-run` 列出完整计划但不执行 —— 随时可放心运行。
|
|
215
|
+
|
|
216
|
+
---
|
|
217
|
+
|
|
218
|
+
## Troubleshooting
|
|
219
|
+
|
|
220
|
+
**Where did my ALERT go?**
|
|
221
|
+
|
|
222
|
+
**我的 ALERT 跑到哪去了?**
|
|
223
|
+
|
|
224
|
+
It is now at `<project>/.roll/loop/ALERT-<slug>.md`. Run `roll loop alert` from
|
|
225
|
+
inside the project, or open the file directly.
|
|
226
|
+
|
|
227
|
+
现在在 `<project>/.roll/loop/ALERT-<slug>.md`。在项目里跑 `roll loop alert`,或直
|
|
228
|
+
接打开文件。
|
|
229
|
+
|
|
230
|
+
**How do I migrate manually?**
|
|
231
|
+
|
|
232
|
+
**怎么手动迁移?**
|
|
233
|
+
|
|
234
|
+
You normally never need to — the next cycle does it. To force it without waiting,
|
|
235
|
+
run `roll loop now` (or `roll loop test`) once; the runner migrates before
|
|
236
|
+
reading state.
|
|
237
|
+
|
|
238
|
+
正常你永远不需要 —— 下一个 cycle 会做。要不等就触发,跑一次 `roll loop now`(或
|
|
239
|
+
`roll loop test`);runner 在读状态前会先迁移。
|
|
240
|
+
|
|
241
|
+
**How do I roll back?**
|
|
242
|
+
|
|
243
|
+
**怎么回滚?**
|
|
244
|
+
|
|
245
|
+
The legacy files are preserved as `<name>.migrated-<timestamp>` for 7 days. To
|
|
246
|
+
revert a single file, rename it back (drop the `.migrated-<ts>` suffix) and
|
|
247
|
+
remove the project-local copy. After 7 days `roll loop gc` reaps the markers, so
|
|
248
|
+
roll back within the window.
|
|
249
|
+
|
|
250
|
+
老文件以 `<name>.migrated-<时间戳>` 形式保留 7 天。要回退某个文件,把它改名回去
|
|
251
|
+
(去掉 `.migrated-<时间戳>` 后缀)并删掉项目本地副本。7 天后 `roll loop gc` 会
|
|
252
|
+
回收这些标记,所以请在窗口期内回滚。
|
|
253
|
+
|
|
254
|
+
See also: [roll loop](loop.md) · [Migration 2.0](migration-2.0.md) · [FAQ](faq.md)
|
|
255
|
+
|
|
256
|
+
另见:[roll loop](loop.md) · [Migration 2.0](migration-2.0.md) · [FAQ](faq.md)
|