@seanyao/roll 4.630.2 → 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 +64 -0
- package/README.md +65 -56
- package/conventions/global/AGENTS.md +8 -7
- package/dist/roll.mjs +12909 -8532
- 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,98 @@
|
|
|
1
|
+
# roll-doc-audit — Documentation/Product Consistency Audit
|
|
2
|
+
|
|
3
|
+
`roll-doc-audit` checks user-facing documentation surfaces against implemented
|
|
4
|
+
behavior: README, guides, site pages, CLI help, tests, and source. When a
|
|
5
|
+
documentation inventory is requested, it also produces draft documentation: a
|
|
6
|
+
doc index, module READMEs for undocumented directories, and — in Phase 3b —
|
|
7
|
+
deep cross-directory topic docs (data flows, state machines, integrations, and
|
|
8
|
+
more). It never invents behavior without source evidence.
|
|
9
|
+
|
|
10
|
+
```
|
|
11
|
+
$roll-doc-audit # full run (all phases)
|
|
12
|
+
$roll-doc-audit --dry-run # Phases 1–2 only; print the Phase 3 / 3b plan, write nothing
|
|
13
|
+
$roll-doc-audit --force # regenerate drafts even when target files already exist
|
|
14
|
+
```
|
|
15
|
+
|
|
16
|
+
## The Four-Phase Pipeline
|
|
17
|
+
|
|
18
|
+
roll-doc-audit runs four phases in order, plus a deep-read Phase 3b that fires when
|
|
19
|
+
the project has cross-directory structure worth documenting.
|
|
20
|
+
|
|
21
|
+
| Phase | Name | What it does |
|
|
22
|
+
|-------|------|--------------|
|
|
23
|
+
| 1 | Scan & Index | Walk the tree, classify every `*.md` and convention file, (over)write `docs/INDEX.md` with a coverage summary and gap report. |
|
|
24
|
+
| 2 | Gap Analysis | Find module directories with ≥ 3 source files (or imported by ≥ 5 files) and no `README.md`, plus special gaps (domain map, conventions doc). |
|
|
25
|
+
| 3 | Fill | For each directory-level gap, read up to 20 files from that directory and generate a draft `README.md` / context map / conventions doc. Skip existing files unless `--force`. |
|
|
26
|
+
| 3b | Deep Read | Build a full project symbol table (no truncation) and detect six cross-directory topics that Phase 3 alone cannot find. |
|
|
27
|
+
| 4 | Report | Print a per-phase summary: docs indexed, gaps found, drafts generated, Phase 3b symbol-table counts and topic docs. |
|
|
28
|
+
|
|
29
|
+
Phase 3b is the difference between "directory-by-directory" docs and docs that
|
|
30
|
+
follow logic across the whole codebase. Phase 3 reads each gap directory in
|
|
31
|
+
isolation (and only a capped number of files per directory); Phase 3b reads
|
|
32
|
+
every source file in full and reasons across files.
|
|
33
|
+
|
|
34
|
+
## Phase 3b — The Six Topics
|
|
35
|
+
|
|
36
|
+
Phase 3b runs when **either** Phase 2 found a gap **or** the project shows
|
|
37
|
+
code characteristics Phase 3 cannot capture (import chains spanning ≥ 3
|
|
38
|
+
directories, shared state enums, external endpoint calls, or CI config). A
|
|
39
|
+
pure docs-only project with no source gaps skips Phase 3b entirely.
|
|
40
|
+
|
|
41
|
+
After building the symbol table (`exports`, `imports`, `enums`,
|
|
42
|
+
`external_urls`, `configs`), Phase 3b detects six topic types. Each is skipped
|
|
43
|
+
when its detection rule finds nothing, and skipped when its target file already
|
|
44
|
+
exists (unless `--force`).
|
|
45
|
+
|
|
46
|
+
| # | Topic | Trigger condition | Output |
|
|
47
|
+
|---|-------|-------------------|--------|
|
|
48
|
+
| 1 | Data flow / call chain | An import chain from an entry file (`bin/`, `main.*`, `index.*`) spans ≥ 3 distinct source directories | `docs/data-flows.md` |
|
|
49
|
+
| 2 | State machine | An enum named `*State` / `*Status` referenced by ≥ 2 source files | `docs/state-machines.md` |
|
|
50
|
+
| 3 | External integrations | `fetch` / `axios` / `http.*` calls or `*_URL` / `*_HOST` constants (outside comments and test fixtures) | `docs/integrations.md` |
|
|
51
|
+
| 4 | Deployment pipeline | A CI config file (`.github/workflows/*.yml`, `.gitlab-ci.yml`, `circle.yml`, `Jenkinsfile`) plus a deploy URL pattern | `docs/deployment.md` |
|
|
52
|
+
| 5 | Agent entrypoint | No `AGENTS.md` at root AND the source root has ≥ 3 subdirectories | `AGENTS.md` |
|
|
53
|
+
| 6 | High fan-in directory | A directory imported by ≥ 5 other source files, even with < 3 source files | `<dir>/README.md` |
|
|
54
|
+
|
|
55
|
+
Every topic doc cites `file:line` for each claim, sourced from real symbol-table
|
|
56
|
+
records — roll-doc-audit never fabricates a line number.
|
|
57
|
+
|
|
58
|
+
## dry-run / force Behavior
|
|
59
|
+
|
|
60
|
+
**`--dry-run`** runs Phases 1–2, then prints the Phase 3 fill plan and the
|
|
61
|
+
Phase 3b plan (symbol-table summary counts plus the topic docs it *would*
|
|
62
|
+
generate, each tagged `(plan)`). Nothing is written to disk. Use it to preview
|
|
63
|
+
before committing to a full run.
|
|
64
|
+
|
|
65
|
+
**`--force`** regenerates drafts even when the target file already exists. It
|
|
66
|
+
affects only draft generation (Phase 3 and Phase 3b output files); the symbol
|
|
67
|
+
table is rebuilt from scratch on every run regardless of flags. `--force` never
|
|
68
|
+
touches `docs/INDEX.md` behavior (always rebuilt) and never overwrites human
|
|
69
|
+
content outside the draft targets.
|
|
70
|
+
|
|
71
|
+
**Default (no flag)** is idempotent: re-running when no new gaps exist is a
|
|
72
|
+
no-op — no files written, no existing drafts modified.
|
|
73
|
+
|
|
74
|
+
## Typical Output Files
|
|
75
|
+
|
|
76
|
+
A full run on a code-bearing project may produce:
|
|
77
|
+
|
|
78
|
+
```
|
|
79
|
+
docs/INDEX.md # Phase 1 — always (over)written
|
|
80
|
+
src/<module>/README.md # Phase 3 — one per module gap
|
|
81
|
+
docs/CONVENTIONS.md # Phase 3 — when no conventions doc exists
|
|
82
|
+
.roll/domain/context-map.md # Phase 3 — when no domain entries exist
|
|
83
|
+
docs/data-flows.md # Phase 3b — cross-directory call chains
|
|
84
|
+
docs/state-machines.md # Phase 3b — shared state enums
|
|
85
|
+
docs/integrations.md # Phase 3b — external endpoints
|
|
86
|
+
docs/deployment.md # Phase 3b — CI pipeline
|
|
87
|
+
AGENTS.md # Phase 3b — only when none exists
|
|
88
|
+
<dir>/README.md # Phase 3b — high fan-in directories
|
|
89
|
+
```
|
|
90
|
+
|
|
91
|
+
Only `docs/INDEX.md` is ever overwritten — it is a derived artifact. Every
|
|
92
|
+
other file is a draft headed with:
|
|
93
|
+
|
|
94
|
+
```
|
|
95
|
+
> **Draft** — auto-generated by roll-doc-audit on YYYY-MM-DD. Review before treating as authoritative.
|
|
96
|
+
```
|
|
97
|
+
|
|
98
|
+
Review each draft, edit as needed, and commit the ones you want to keep.
|
|
@@ -0,0 +1,206 @@
|
|
|
1
|
+
# Roll Skill Selection Guide
|
|
2
|
+
|
|
3
|
+
Quickly select the right skill or tool.
|
|
4
|
+
|
|
5
|
+
## Core Skills
|
|
6
|
+
|
|
7
|
+
| User Intent | Skill | Description |
|
|
8
|
+
|---------|-----------|------|
|
|
9
|
+
| **"Not sure how to do it"** / **"There are several options"** | `roll-design` | Explore solutions, compare options, human decision-making |
|
|
10
|
+
| **"Help me build a..."** / **"Implement US-001"** / **"Fix FIX-001"** | `roll-build` | Universal entry: US-XXX story mode, FIX-XXX fix mode, or free-text fly mode — all in one skill |
|
|
11
|
+
| **"This logic is critical"** / **"Involves payment"** | `roll-spar` | Adversarial TDD, activate for high-risk scenarios |
|
|
12
|
+
| **"Fix a bug"** / **"Change some copy"** | `roll-fix` | Quick fix, no full workflow |
|
|
13
|
+
| **"Plan requirements"** / **"Split into stories"** | `roll-design` | Plan only, no implementation, outputs BACKLOG.md |
|
|
14
|
+
| **"Run several Actions in parallel"** | `roll-build` | Auto-determines parallelism after splitting Actions |
|
|
15
|
+
| **"What shipped / what's queued?"** | `roll status` / `roll loop cycle` / story reports | CLI-first delivery state, cycle trace, and story-scoped evidence |
|
|
16
|
+
| **"Debug this page"** | `roll-debug` | Deep diagnosis, collect logs/network/DOM |
|
|
17
|
+
|
|
18
|
+
## Support Skills
|
|
19
|
+
|
|
20
|
+
| Scenario | Skill | Trigger Timing |
|
|
21
|
+
|------|-------|---------|
|
|
22
|
+
| Code self-review | `roll-.review` | Before Commit, or manually triggered |
|
|
23
|
+
| Generate Changelog | `roll-.changelog` | Auto-triggered after successful Deploy |
|
|
24
|
+
| QA test reference | `roll-.qa` | Referenced when writing tests |
|
|
25
|
+
| Intent clarification | `roll-.echo` | Auto-activates when user input is vague or unclear |
|
|
26
|
+
| Documentation/product audit | `roll-doc-audit` | Check README, guides, site pages, CLI help and docs against implemented behavior; optionally index docs and fill gaps |
|
|
27
|
+
|
|
28
|
+
## roll-doc-audit — Documentation/Product Consistency Audit
|
|
29
|
+
|
|
30
|
+
`roll-doc-audit` first checks user-facing documentation surfaces against real
|
|
31
|
+
behavior: README, guides, site pages, CLI help, tests, and source. For inventory
|
|
32
|
+
work it still runs the four-phase docs pipeline — scan/index → gap analysis →
|
|
33
|
+
fill → report — plus a deep-read **Phase 3b**. Phase 3 fills directory-level
|
|
34
|
+
gaps; Phase 3b builds a full project symbol table and detects **6
|
|
35
|
+
cross-directory topics** that directory-level filling alone cannot find:
|
|
36
|
+
|
|
37
|
+
| Topic | Triggers when | Output |
|
|
38
|
+
|-------|---------------|--------|
|
|
39
|
+
| Data flow / call chain | An import chain spans ≥ 3 source directories | `docs/data-flows.md` |
|
|
40
|
+
| State machine | A `*State` / `*Status` enum is referenced by ≥ 2 files | `docs/state-machines.md` |
|
|
41
|
+
| External integrations | `fetch` / `axios` / `*_URL` constants are present | `docs/integrations.md` |
|
|
42
|
+
| Deployment pipeline | A CI config file plus a deploy URL pattern exists | `docs/deployment.md` |
|
|
43
|
+
| Agent entrypoint | No `AGENTS.md` and the source root has ≥ 3 subdirs | `AGENTS.md` |
|
|
44
|
+
| High fan-in directory | A directory is imported by ≥ 5 source files | `<dir>/README.md` |
|
|
45
|
+
|
|
46
|
+
`$roll-doc-audit --dry-run` runs Phases 1–2 and prints the Phase 3 / 3b plan without
|
|
47
|
+
writing; `$roll-doc-audit --force` regenerates drafts even when targets already exist.
|
|
48
|
+
Full guide: [roll-doc-audit.md](roll-doc-audit.md).
|
|
49
|
+
|
|
50
|
+
## Quick Decision Tree
|
|
51
|
+
|
|
52
|
+
```
|
|
53
|
+
User Input
|
|
54
|
+
|
|
|
55
|
+
+----------------------+
|
|
56
|
+
| "Unsure about |
|
|
57
|
+
| the approach?" |--> roll-design
|
|
58
|
+
+----------------------+
|
|
59
|
+
| No
|
|
60
|
+
+----------------------+
|
|
61
|
+
| "One-sentence |
|
|
62
|
+
| request?" |--> roll-build (fly mode)
|
|
63
|
+
+----------------------+
|
|
64
|
+
| No
|
|
65
|
+
+----------------------+
|
|
66
|
+
| "Has a US-XXX ID?" |--> roll-build (story mode)
|
|
67
|
+
+----------------------+
|
|
68
|
+
| No
|
|
69
|
+
+----------------------+
|
|
70
|
+
| "Has a FIX-XXX ID?" |--> roll-fix
|
|
71
|
+
+----------------------+
|
|
72
|
+
| No
|
|
73
|
+
+----------------------+
|
|
74
|
+
| "Fix a bug?" |--> roll-fix
|
|
75
|
+
+----------------------+
|
|
76
|
+
| No
|
|
77
|
+
+----------------------+
|
|
78
|
+
| "Plan/split?" |--> roll-design
|
|
79
|
+
+----------------------+
|
|
80
|
+
| No
|
|
81
|
+
+----------------------+
|
|
82
|
+
| "High-risk logic?" |--> roll-spar
|
|
83
|
+
+----------------------+
|
|
84
|
+
| No
|
|
85
|
+
Manual judgment
|
|
86
|
+
```
|
|
87
|
+
|
|
88
|
+
## Review Score (US-SKILL-010..014, FIX-343)
|
|
89
|
+
|
|
90
|
+
Skills do **not** self-score. The working agent never grades its own story;
|
|
91
|
+
the **Review Score** is a runner-side peer outcome, produced by a Reviewer in
|
|
92
|
+
a fresh, separate session (never a sub-agent of the builder). After a
|
|
93
|
+
`roll-build` or `roll-fix` cycle delivers, the runner casts a fresh-session
|
|
94
|
+
Reviewer and writes one structured Review Score note into the story's card
|
|
95
|
+
folder (US-META-008 — the card folder is the story's single home; the flat
|
|
96
|
+
`.roll/notes/` keeps the project diary and pre-migration history, and both
|
|
97
|
+
the dashboard trend and the story archive merge the two sources):
|
|
98
|
+
|
|
99
|
+
```
|
|
100
|
+
.roll/features/<epic>/US-AUTH-001/notes/2026-05-29-roll-build-US-AUTH-001-1717000000.md
|
|
101
|
+
.roll/features/<epic>/FIX-072/notes/2026-05-29-roll-fix-FIX-072-1717000123.md
|
|
102
|
+
```
|
|
103
|
+
|
|
104
|
+
Each note is YAML frontmatter + rationale:
|
|
105
|
+
|
|
106
|
+
```markdown
|
|
107
|
+
---
|
|
108
|
+
skill: roll-build
|
|
109
|
+
story: US-AUTH-001
|
|
110
|
+
score: 8
|
|
111
|
+
verdict: good
|
|
112
|
+
ts: 2026-05-29T03:14:15Z
|
|
113
|
+
---
|
|
114
|
+
|
|
115
|
+
Story shipped cleanly; AC fully met. One TCR retry on the auth-cookie test
|
|
116
|
+
(missing setup). Peer review surfaced one nit, addressed inline.
|
|
117
|
+
```
|
|
118
|
+
|
|
119
|
+
`roll loop status` rolls up the trend at the bottom of the ROLLUP block:
|
|
120
|
+
|
|
121
|
+
```
|
|
122
|
+
review-score: mean 7.8 / min 4 / redo 2 (last 14)
|
|
123
|
+
```
|
|
124
|
+
|
|
125
|
+
`redo` counts entries whose `verdict` is `regression`, or whose `verdict`
|
|
126
|
+
is `ok` with `score < 6` — both signal that a follow-up look is
|
|
127
|
+
warranted. Mean and min cover the whole window so a single bad cycle
|
|
128
|
+
doesn't get hidden by the average.
|
|
129
|
+
|
|
130
|
+
The notes are part of `.roll/` and therefore commit-tracked, so the
|
|
131
|
+
quality trail is reproducible across machines and visible to anyone
|
|
132
|
+
reading the project history.
|
|
133
|
+
|
|
134
|
+
`roll loop status` 状态盘底部会汇总评审分趋势:`review-score: mean 7.8 /
|
|
135
|
+
min 4 / redo 2 (last 14)`,`redo` 包含 `regression` 判定和 `ok` 但分
|
|
136
|
+
数 < 6 的低置信交付,共同标记需要回看的 cycle 数量。评审分由全新独立会话
|
|
137
|
+
的同行 Reviewer 产出,工作 agent 绝不自评。
|
|
138
|
+
|
|
139
|
+
## Adding a New Skill
|
|
140
|
+
|
|
141
|
+
A skill is a directory under `skills/<name>/` with a `SKILL.md` whose YAML
|
|
142
|
+
frontmatter declares at least `name` and `description`. To register a new
|
|
143
|
+
skill, follow these steps — you never hand-maintain a catalog list:
|
|
144
|
+
|
|
145
|
+
1. Create `skills/<name>/SKILL.md` with frontmatter (`name`, `description`,
|
|
146
|
+
`license`, and `allowed-tools` — see below).
|
|
147
|
+
2. Regenerate the capability catalog:
|
|
148
|
+
|
|
149
|
+
```bash
|
|
150
|
+
roll setup skills
|
|
151
|
+
```
|
|
152
|
+
|
|
153
|
+
This rescans every `skills/*/SKILL.md` and rewrites `guide/skills.md` from
|
|
154
|
+
the frontmatter. `guide/skills.md` is a **generated artifact** — its header
|
|
155
|
+
says `GENERATED by roll setup skills — do not edit by hand`. Adding or
|
|
156
|
+
removing a skill is reflected automatically on the next regenerate; never
|
|
157
|
+
edit `guide/skills.md` by hand.
|
|
158
|
+
3. Commit both the new `SKILL.md` and the regenerated `guide/skills.md`.
|
|
159
|
+
|
|
160
|
+
### Drift guard
|
|
161
|
+
|
|
162
|
+
The committed catalog cannot silently drift from the actual skills:
|
|
163
|
+
|
|
164
|
+
- `roll doctor skills` rescans and fails (non-zero exit, prints a diff) if
|
|
165
|
+
`guide/skills.md` no longer matches `skills/*/SKILL.md`. CI runs this gate,
|
|
166
|
+
so a hand-edit or a forgotten regenerate is caught before merge.
|
|
167
|
+
- `roll doctor` prints a non-failing nudge in its skills section when the
|
|
168
|
+
catalog is stale, as a local reminder to run `roll setup skills`.
|
|
169
|
+
|
|
170
|
+
The scan is bash 3.2 compatible (awk-based parser; no `declare -A`, `mapfile`,
|
|
171
|
+
or `${var^^}`), so it runs on the macOS system bash.
|
|
172
|
+
|
|
173
|
+
## Declaring Tool Scope (`allowed-tools`)
|
|
174
|
+
|
|
175
|
+
Every `SKILL.md` frontmatter should declare an `allowed-tools` line listing the
|
|
176
|
+
tools the skill is permitted to use:
|
|
177
|
+
|
|
178
|
+
```yaml
|
|
179
|
+
---
|
|
180
|
+
name: roll-design
|
|
181
|
+
license: MIT
|
|
182
|
+
allowed-tools: "Read, Edit, Write, Glob, Grep, Bash(git:*), WebSearch, WebFetch, Skill"
|
|
183
|
+
description: ...
|
|
184
|
+
---
|
|
185
|
+
```
|
|
186
|
+
|
|
187
|
+
- **What to write**: the comma-separated set of tools the skill actually needs
|
|
188
|
+
(e.g. `Read, Edit, Write, Glob, Grep`), narrowing Bash where possible with
|
|
189
|
+
the `Bash(git:*)` glob form rather than granting unscoped `Bash`.
|
|
190
|
+
- **Why declare it**: the declaration documents each skill's intended tool
|
|
191
|
+
surface so the scope is auditable and reviewable per skill, consistent across
|
|
192
|
+
the catalog.
|
|
193
|
+
- **What this is for Roll**: a **declaration + lint** only. Roll surfaces the
|
|
194
|
+
declaration and lints for its presence; the actual tool **enforcement**
|
|
195
|
+
happens in the inner agent harness, not in Roll. Writing `allowed-tools` does
|
|
196
|
+
not by itself sandbox the skill.
|
|
197
|
+
|
|
198
|
+
## Auto-Trigger Keywords
|
|
199
|
+
|
|
200
|
+
| Skill | Trigger Keywords |
|
|
201
|
+
|-------|-----------|
|
|
202
|
+
| `roll-design` | "discuss", "compare options", "how to choose", "trade-offs", "not sure what to use", "design", "plan", "split", "write stories", "requirements analysis" |
|
|
203
|
+
| `roll-build` | "help me build", "add a feature", "change this", "refactor", "implement US-", "do this story", "complete Action", "parallel", "develop simultaneously" |
|
|
204
|
+
| `roll-fix` | "fix bug", "change copy", "adjust color", "error", "FIX-", "BUG-" |
|
|
205
|
+
| `roll-spar` | "adversarial", "attack-defense", "high-risk", "critical logic", "payment", "permissions", "security" |
|
|
206
|
+
| `roll-debug` | "debug", "diagnose", "page has issues", "black-box analysis" |
|
|
@@ -0,0 +1,51 @@
|
|
|
1
|
+
# Roll — Test Isolation (`roll test`)
|
|
2
|
+
|
|
3
|
+
`roll test` runs your project's test suite through an **isolation adapter**
|
|
4
|
+
selected in `.roll/local.yaml`:
|
|
5
|
+
|
|
6
|
+
```yaml
|
|
7
|
+
test_isolation:
|
|
8
|
+
type: none # default
|
|
9
|
+
```
|
|
10
|
+
|
|
11
|
+
## `type: none` (the only built-in adapter)
|
|
12
|
+
|
|
13
|
+
Direct host execution — the same shell `npm test` would use. `roll test`
|
|
14
|
+
forwards to `npm test -- <args>` with `--affected` as the default argument:
|
|
15
|
+
|
|
16
|
+
```bash
|
|
17
|
+
roll test # npm test -- --affected
|
|
18
|
+
roll test -- tests/ # full suite, explicit
|
|
19
|
+
roll test -- --tier=fast # forward anything to npm test
|
|
20
|
+
```
|
|
21
|
+
|
|
22
|
+
The v3 test suites are hermetic by construction — fabricated `$HOME`s,
|
|
23
|
+
PATH-shimmed binaries, `file://` remotes, blackholed network — so host
|
|
24
|
+
execution does not touch your launchd jobs, shared roll state, or the network.
|
|
25
|
+
|
|
26
|
+
## Routing: `--where`
|
|
27
|
+
|
|
28
|
+
Prints where tests would run, without running them:
|
|
29
|
+
|
|
30
|
+
| Configured type | `--where` prints |
|
|
31
|
+
|---|---|
|
|
32
|
+
| `none` (or no config) | `host` |
|
|
33
|
+
| anything else | `unknown:<type>` |
|
|
34
|
+
|
|
35
|
+
The `<type>:<detail>` token format is the **extension point**: a future
|
|
36
|
+
adapter (say, a container lane) would print `docker:running`-style tokens in
|
|
37
|
+
the same shape.
|
|
38
|
+
|
|
39
|
+
## Unknown types fail loud
|
|
40
|
+
|
|
41
|
+
Any `test_isolation.type` other than `none` makes `roll test` exit non-zero
|
|
42
|
+
with an explicit error listing the supported types. It never silently falls
|
|
43
|
+
back to host execution — a misconfigured isolation lane should stop you, not
|
|
44
|
+
quietly change where your tests run.
|
|
45
|
+
|
|
46
|
+
## `--reset`
|
|
47
|
+
|
|
48
|
+
Resets the isolation environment. For `type: none` there is nothing to reset
|
|
49
|
+
(host execution is stateless): it prints a note and exits 0. A reset holds a
|
|
50
|
+
lockfile at `.roll/.iso-reset.lock`; concurrent `roll test` invocations
|
|
51
|
+
fast-fail with a clear message while it is held.
|