@seanyao/roll 3.610.1 → 3.611.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 +69 -0
- package/README.md +30 -19
- package/dist/roll.mjs +10485 -11206
- package/package.json +3 -1
- package/skills/README.md +14 -1
- package/skills/docs/skill-authoring.md +66 -0
- package/skills/reports/skill-audit-summary.md +53 -0
- package/skills/roll-.changelog/SKILL.md +25 -443
- package/skills/roll-.changelog/references/full-contract.md +462 -0
- package/skills/roll-.clarify/SKILL.md +6 -4
- package/skills/roll-.dream/SKILL.md +26 -353
- package/skills/roll-.dream/references/full-contract.md +365 -0
- package/skills/roll-.echo/SKILL.md +6 -4
- package/skills/roll-.qa/SKILL.md +25 -236
- package/skills/roll-.qa/references/full-contract.md +256 -0
- package/skills/roll-.review/SKILL.md +6 -2
- package/skills/roll-brief/SKILL.md +6 -8
- package/skills/roll-build/SKILL.md +28 -864
- package/skills/roll-build/references/full-contract.md +883 -0
- package/skills/roll-debug/SKILL.md +26 -585
- package/skills/roll-debug/references/full-contract.md +607 -0
- package/skills/roll-design/SKILL.md +28 -903
- package/skills/roll-design/references/full-contract.md +923 -0
- package/skills/roll-doc/SKILL.md +25 -574
- package/skills/roll-doc/references/full-contract.md +594 -0
- package/skills/roll-doctor/SKILL.md +21 -2
- package/skills/roll-fix/SKILL.md +28 -621
- package/skills/roll-fix/references/full-contract.md +640 -0
- package/skills/roll-idea/SKILL.md +6 -2
- package/skills/roll-loop/SKILL.md +29 -542
- package/skills/roll-loop/references/full-contract.md +555 -0
- package/skills/roll-notes/SKILL.md +6 -2
- package/skills/roll-onboard/SKILL.md +6 -2
- package/skills/roll-peer/SKILL.md +27 -316
- package/skills/roll-peer/references/full-contract.md +329 -0
- package/skills/roll-propose/SKILL.md +6 -8
- package/skills/roll-review-pr/SKILL.md +6 -2
- package/skills/roll-sentinel/SKILL.md +26 -344
- package/skills/roll-sentinel/references/full-contract.md +363 -0
- package/skills/roll-spar/SKILL.md +27 -269
- package/skills/roll-spar/references/full-contract.md +288 -0
- package/skills/route-cases/skills.json +235 -0
- package/skills/scripts/audit-skills.mjs +272 -0
- package/skills/scripts/test-audit-skills.mjs +39 -0
- package/skills/tests/fixtures/skill-audit/block-skill/SKILL.md +12 -0
- package/skills/tests/fixtures/skill-audit/minimal-skill/SKILL.md +8 -0
- package/skills/tests/fixtures/skill-audit/quoted-skill/SKILL.md +10 -0
- package/skills/tests/fixtures/skill-audit/route-cases.json +21 -0
- package/skills/tests/fixtures/skill-audit/spoke-skill/SKILL.md +12 -0
- package/skills/tests/fixtures/skill-audit/spoke-skill/references/runbook.md +3 -0
- package/lib/i18n/slides.sh +0 -3
- package/lib/i18n/slides_build.sh +0 -38
- package/lib/i18n/slides_delete.sh +0 -19
- package/lib/i18n/slides_list.sh +0 -14
- package/lib/i18n/slides_logs.sh +0 -12
- package/lib/i18n/slides_new.sh +0 -15
- package/lib/i18n/slides_preview.sh +0 -14
- package/lib/i18n/slides_templates.sh +0 -7
- package/lib/slides/components/README.md +0 -123
- package/lib/slides/components/cards-2.html +0 -9
- package/lib/slides/components/cards-3.html +0 -9
- package/lib/slides/components/cards-4.html +0 -9
- package/lib/slides/components/compare.html +0 -22
- package/lib/slides/components/highlight.html +0 -9
- package/lib/slides/components/pipeline.html +0 -12
- package/lib/slides/components/plain.html +0 -7
- package/lib/slides/components/quote.html +0 -4
- package/lib/slides/components/timeline.html +0 -9
- package/lib/slides/templates/introduction-v3.html +0 -571
- package/lib/slides/templates/pitch.html +0 -0
- package/skills/roll-deck/SKILL.md +0 -296
- /package/skills/roll-debug/{injectable-bb.js → assets/injectable-bb.js} +0 -0
- /package/skills/roll-design/{ENGINEERING_CHECKLIST.md → references/engineering-checklist.md} +0 -0
|
@@ -2,335 +2,46 @@
|
|
|
2
2
|
name: roll-peer
|
|
3
3
|
license: MIT
|
|
4
4
|
allowed-tools: "Read, Bash, Write, Edit"
|
|
5
|
-
description:
|
|
6
|
-
Cross-agent peer review skill. When a task enters a decision phase (planning,
|
|
7
|
-
high-risk, ambiguous, destructive), triggers a bidirectional negotiation with
|
|
8
|
-
another AI agent via a unified protocol. Up to 3 rounds. If consensus is not
|
|
9
|
-
reached, escalates to the human user. Includes adaptive peer routing based on
|
|
10
|
-
task type and historical success rate.
|
|
11
|
-
Trigger: /peer, "叫上 peer", "peer review", or auto-triggered at workflow gates.
|
|
5
|
+
description: "Load when the user explicitly asks for peer review, cross-agent negotiation, /peer, or a high-risk decision needs an external agent perspective."
|
|
12
6
|
---
|
|
7
|
+
# Roll Peer
|
|
13
8
|
|
|
14
|
-
|
|
9
|
+
This hub keeps the routing boundary, hard gates, and execution skeleton in the initial context. Load the heavier runbook only when the task actually needs the detailed contract.
|
|
15
10
|
|
|
16
|
-
|
|
17
|
-
> Common Sense defined in the project AGENTS.md.
|
|
11
|
+
## Load
|
|
18
12
|
|
|
19
|
-
|
|
13
|
+
Load when the user explicitly asks for peer review, cross-agent negotiation, /peer, or a high-risk decision needs an external agent perspective.
|
|
20
14
|
|
|
21
|
-
|
|
22
|
-
[friend-skill](https://github.com/fpyluck/friend-skill) (MIT) by fpyluck.
|
|
23
|
-
Independent implementation for the Roll toolchain.
|
|
15
|
+
## When Not to Use
|
|
24
16
|
|
|
25
|
-
|
|
17
|
+
- Local self-review; load roll-.review.
|
|
18
|
+
- PR-only review; load roll-review-pr.
|
|
26
19
|
|
|
27
|
-
|
|
28
|
-
- `/peer`
|
|
29
|
-
- "叫上 peer"
|
|
30
|
-
- "peer review 一下"
|
|
31
|
-
- "和 peer 商量"
|
|
20
|
+
## Read On Demand
|
|
32
21
|
|
|
33
|
-
|
|
34
|
-
-
|
|
35
|
-
- `roll-spar` Attacker and Defender disagree
|
|
36
|
-
- High context pressure (large number of files read / tools executed)
|
|
37
|
-
- Destructive / irreversible operations (`rm -rf`, production deploy, global config changes)
|
|
38
|
-
- High-risk signal words ("重要 / 关键 / 别搞砸 / important / critical")
|
|
39
|
-
- Cross-repository / cross-toolchain / ambiguous permission boundaries
|
|
22
|
+
- Read [the full contract](references/full-contract.md) before executing the workflow end to end, recovering from failures, or checking exact output templates.
|
|
23
|
+
- Keep this hub in context for trigger boundaries and hard gates.
|
|
40
24
|
|
|
41
|
-
|
|
42
|
-
- Single-file changes
|
|
43
|
-
- Clear, well-defined fixes
|
|
44
|
-
- Simple refactoring
|
|
25
|
+
## Workflow Skeleton
|
|
45
26
|
|
|
46
|
-
|
|
27
|
+
1. Confirm peer review is explicitly requested or required by a documented gate.
|
|
28
|
+
2. Route to an appropriate external agent.
|
|
29
|
+
3. Run bounded negotiation rounds.
|
|
30
|
+
4. Record consensus, disagreement, and unresolved questions.
|
|
31
|
+
5. Escalate to human when consensus fails.
|
|
47
32
|
|
|
48
|
-
|
|
33
|
+
## Hard Gates
|
|
49
34
|
|
|
50
|
-
|
|
35
|
+
- Do not spawn subagents without explicit permission/tool availability.
|
|
36
|
+
- Peer output is advisory unless local gates accept it.
|
|
51
37
|
|
|
52
|
-
|
|
53
|
-
[PEER_REVIEW round=N tool=<from>→<to>]
|
|
54
|
-
```
|
|
38
|
+
## Gotchas
|
|
55
39
|
|
|
56
|
-
-
|
|
57
|
-
-
|
|
40
|
+
- Only invoke cross-agent work when explicitly requested or at documented gates; do not surprise the user with extra delegation.
|
|
41
|
+
- Consensus does not override local evidence, tests, or the owner decision.
|
|
58
42
|
|
|
59
|
-
|
|
43
|
+
## Maintenance
|
|
60
44
|
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
-
|
|
64
|
-
- **REFINE**: Direction is correct, but specific changes are needed. Proceed to next round.
|
|
65
|
-
- **OBJECT**: The proposal is wrong. Provide an alternative. Proceed to next round.
|
|
66
|
-
- **ESCALATE**: Round 3 reached without AGREE, or a round fails due to API/token error. Hand off to the human user.
|
|
67
|
-
|
|
68
|
-
After each round decision, emit a `peer` event to the cycle event stream:
|
|
69
|
-
|
|
70
|
-
```bash
|
|
71
|
-
# $round = current round number, $total = max rounds, $verdict = AGREE/REFINE/OBJECT/ESCALATE
|
|
72
|
-
# $agents = e.g. "claude→deepseek"
|
|
73
|
-
_loop_event peer "${round}/${total}" "$verdict" "$agents" 2>/dev/null || true
|
|
74
|
-
```
|
|
75
|
-
|
|
76
|
-
If information is insufficient:
|
|
77
|
-
```
|
|
78
|
-
REFINE: Need to confirm X/Y/Z with the user first.
|
|
79
|
-
```
|
|
80
|
-
|
|
81
|
-
### Context Handoff Card (required for round=1)
|
|
82
|
-
|
|
83
|
-
When the task involves a local project, the first message must include:
|
|
84
|
-
|
|
85
|
-
```markdown
|
|
86
|
-
## Project Handoff (round=1 required)
|
|
87
|
-
- Project root: <absolute path>
|
|
88
|
-
- Execution environment: <shell / container / devcontainer / remote / N/A>
|
|
89
|
-
- Project type: <language + framework>
|
|
90
|
-
- Virtual environment: <absolute path / conda env / container name / N/A>
|
|
91
|
-
- Activation command: <one-line executable string, or N/A>
|
|
92
|
-
- Key tool calls:
|
|
93
|
-
- test: <one-line command or N/A>
|
|
94
|
-
- build: <one-line command or N/A>
|
|
95
|
-
- run: <one-line command or N/A>
|
|
96
|
-
- lint: <one-line command or N/A>
|
|
97
|
-
- Key conventions / constraints: <2–3 items, or N/A>
|
|
98
|
-
- Related file pointers: <absolute paths or @references, or N/A>
|
|
99
|
-
```
|
|
100
|
-
|
|
101
|
-
Rules:
|
|
102
|
-
- Paths must be **absolute**.
|
|
103
|
-
- Commands must be **one-line executable strings**, not descriptions.
|
|
104
|
-
- Prefer commands that do **not** require an activated environment (absolute interpreter paths, `uv run`, `docker compose exec`).
|
|
105
|
-
- Do not copy README text. List file pointers only.
|
|
106
|
-
- Never include secrets, tokens, credentials, or `.env` content.
|
|
107
|
-
- Even if logically a continuation, treat as round=1 if the peer has **no prior context**.
|
|
108
|
-
- **Do NOT** prefill the peer with your own root-cause analysis, proposed fix, or leading questions — see the *Independent Judgment Rule* below. The handoff card is for context, not conclusions.
|
|
109
|
-
|
|
110
|
-
### Anti-Hallucination Rule
|
|
111
|
-
|
|
112
|
-
When mentioning specific paths, function names, commands, line numbers, or tool results, **must cite the source** ("I read X at line Y"). If unverified, state "unverified" explicitly.
|
|
113
|
-
|
|
114
|
-
### Independent Judgment Rule (round=1)
|
|
115
|
-
|
|
116
|
-
The whole point of peer review is to surface a **second, independent** read. If
|
|
117
|
-
the reviewer's own root-cause analysis, fix diff, and leading questions are sent
|
|
118
|
-
to the peer up front, the peer can only AGREE inside the reviewer's frame — and
|
|
119
|
-
that AGREE carries no signal. The reviewer **must complete their own analysis
|
|
120
|
-
before opening round=1**; skipping that step turns peer review into a search for
|
|
121
|
-
endorsement.
|
|
122
|
-
|
|
123
|
-
Round=1 message **must NOT include**:
|
|
124
|
-
|
|
125
|
-
- The reviewer's own root-cause analysis ("the bug is in function X at line Y because…").
|
|
126
|
-
- The reviewer's own proposed fix, patch, or diff.
|
|
127
|
-
- Leading questions of the form "do you agree with my conclusion on X?" / "is the change I made on Y safe?" — these lock the peer into the reviewer's framing.
|
|
128
|
-
- Specific line numbers, function names, or branch points the reviewer has already identified as relevant — let the peer locate them.
|
|
129
|
-
|
|
130
|
-
Round=1 message **should include**:
|
|
131
|
-
|
|
132
|
-
- The Project Handoff Card (above).
|
|
133
|
-
- Symptoms exactly as observed: the user's reported error, terminal output verbatim, the precise commands that triggered it.
|
|
134
|
-
- Necessary external context: the goal of the work, the date / version under test, anything the peer cannot infer from the repo alone.
|
|
135
|
-
- Key file pointers as **entry points** (paths only — let the peer choose what to read and how deep).
|
|
136
|
-
- An open invitation: "independently identify the root cause, propose a fix, and call out any test gaps."
|
|
137
|
-
|
|
138
|
-
After receiving the peer's round=1 reply, the reviewer **compares** their own
|
|
139
|
-
conclusion to the peer's and routes the next action:
|
|
140
|
-
|
|
141
|
-
| Reviewer's own conclusion vs. peer's conclusion | Next action |
|
|
142
|
-
|---|---|
|
|
143
|
-
| Same root cause + same fix direction | High confidence — AGREE and proceed to execution |
|
|
144
|
-
| Same root cause, different fix direction | REFINE — open round=2 to reconcile the fix |
|
|
145
|
-
| Different root cause | OBJECT — open round=2; at least one of the two analyses is wrong |
|
|
146
|
-
| Peer asks for more context | REFINE — supply the missing context, then re-evaluate |
|
|
147
|
-
|
|
148
|
-
#### Example (bad — endorsement-seeking)
|
|
149
|
-
|
|
150
|
-
```
|
|
151
|
-
Bug is in `cmd_init` at line 932 — the v2 demo renderer fires unconditionally.
|
|
152
|
-
My fix: gate it behind `--demo`. Q1: is this over-killed? Q2: should I
|
|
153
|
-
refactor the renderer instead? Q3: are the tests strong enough?
|
|
154
|
-
```
|
|
155
|
-
|
|
156
|
-
The peer can only AGREE or quibble inside the reviewer's framing.
|
|
157
|
-
|
|
158
|
-
#### Example (good — independent analysis)
|
|
159
|
-
|
|
160
|
-
```
|
|
161
|
-
Symptoms: user ran `roll init` on /path/X and saw [verbatim terminal output A];
|
|
162
|
-
then ran `roll backlog` and saw [verbatim terminal output B]. Project background:
|
|
163
|
-
[project shape]. Entry points: `bin/roll`, `lib/roll-init.py`, `tests/`.
|
|
164
|
-
Independently identify the root cause and propose a fix.
|
|
165
|
-
```
|
|
166
|
-
|
|
167
|
-
The peer reads, locates, and proposes on its own. The reviewer then compares.
|
|
168
|
-
|
|
169
|
-
## State Machine
|
|
170
|
-
|
|
171
|
-
### Per Negotiation (Single Task)
|
|
172
|
-
|
|
173
|
-
```
|
|
174
|
-
Running
|
|
175
|
-
├── AGREE (any round) → Execute proposal
|
|
176
|
-
├── Round == 3, no AGREE → ESCALATE (failed_max_rounds)
|
|
177
|
-
├── API/token error → ESCALATE (failed_api_error)
|
|
178
|
-
└── User aborts → ESCALATE (user_abort)
|
|
179
|
-
```
|
|
180
|
-
|
|
181
|
-
### Per Peer Pair (e.g., kimi→claude)
|
|
182
|
-
|
|
183
|
-
Stored in `~/.roll/.peer-state/` (flat key files per pair):
|
|
184
|
-
|
|
185
|
-
```yaml
|
|
186
|
-
kimi→claude:
|
|
187
|
-
status: active # active | degraded | abandoned
|
|
188
|
-
streak: 0 # consecutive failure count
|
|
189
|
-
last_outcome: agreed
|
|
190
|
-
history:
|
|
191
|
-
- { time: "2026-05-08T23:30:00+08:00", outcome: agreed, rounds: 2, tag: architecture }
|
|
192
|
-
```
|
|
193
|
-
|
|
194
|
-
Rules:
|
|
195
|
-
- `streak >= 3` → automatically mark as `abandoned`
|
|
196
|
-
- `abandoned` peer pairs are skipped by the bridge script
|
|
197
|
-
- Human can reset via `roll peer reset <from> <to>` or `roll peer reset --all`
|
|
198
|
-
- If a peer pair is abandoned, the bridge falls back to the next candidate in the capability map
|
|
199
|
-
|
|
200
|
-
## Peer Routing (Adaptive)
|
|
201
|
-
|
|
202
|
-
### Capability Map (Task Type → Preferred Peer Order)
|
|
203
|
-
|
|
204
|
-
```yaml
|
|
205
|
-
peer:
|
|
206
|
-
capability_map:
|
|
207
|
-
architecture: [claude, deepseek, kimi, pi]
|
|
208
|
-
security: [claude, deepseek, pi, kimi]
|
|
209
|
-
test: [codex, kimi, deepseek, claude]
|
|
210
|
-
refactor: [deepseek, kimi, claude, pi]
|
|
211
|
-
default: [deepseek, kimi, claude, pi]
|
|
212
|
-
```
|
|
213
|
-
|
|
214
|
-
### Adaptive Adjustment
|
|
215
|
-
|
|
216
|
-
After each negotiation, record:
|
|
217
|
-
- `outcome`: agreed / failed_max_rounds / failed_api_error
|
|
218
|
-
- `rounds`: number of rounds consumed
|
|
219
|
-
- `tag`: task type
|
|
220
|
-
|
|
221
|
-
If `streak` for a peer pair reaches the configured threshold (default: 3 consecutive failures), mark as `abandoned`. The next task of the same type will try the next candidate in `capability_map`.
|
|
222
|
-
|
|
223
|
-
### Peer Detection
|
|
224
|
-
|
|
225
|
-
The bridge script detects installed peers via `command -v <tool>`. Only installed tools are considered. The current running tool is excluded (`exclude_self: true`).
|
|
226
|
-
|
|
227
|
-
For `deepseek`, also check if serve mode is available as a more reliable alternative:
|
|
228
|
-
```bash
|
|
229
|
-
command -v deepseek && { deepseek serve --help 2>/dev/null; true; } | grep -q "\-\-http" && echo "serve_mode"
|
|
230
|
-
```
|
|
231
|
-
If serve mode is available, prefer HTTP transport over direct CLI invocation.
|
|
232
|
-
|
|
233
|
-
### Peer Invocation Reference
|
|
234
|
-
|
|
235
|
-
| Peer | Non-interactive command | Reliability | Notes |
|
|
236
|
-
|------|------------------------|-------------|-------|
|
|
237
|
-
| `claude` | `claude -p "<prompt>"` | ✅ Verified | Native, stable |
|
|
238
|
-
| `deepseek` | `deepseek "<prompt>"` | ✅ Verified | No TTY dependency |
|
|
239
|
-
| `deepseek` (serve) | `curl localhost:<port>/v1/...` | ✅ High | Start with `deepseek serve --http`; preferred over direct CLI |
|
|
240
|
-
| `kimi` | `kimi --quiet -p "<prompt>"` | ✅ Verified | `--quiet` is alias for `--print --output-format text --final-message-only`; prompt via `-p` |
|
|
241
|
-
| `pi` | `pi -p "<prompt>"` | ✅ Verified | Clean non-interactive output |
|
|
242
|
-
| `opencode` | `opencode run "<prompt>"` | ✅ Verified | Works non-interactively |
|
|
243
|
-
| `codex` | `codex exec "<prompt>"` | ⚠️ Auth required | Token must be valid; re-login with `codex login` if expired |
|
|
244
|
-
|
|
245
|
-
**CLI vs. API Key**: `claude`, `deepseek`, `kimi`, `codex` CLIs authenticate via existing subscription accounts — no separate API key required. This is the primary advantage of CLI transport over the MCP/HTTP approach.
|
|
246
|
-
|
|
247
|
-
## Inline Display Mode (Manual Triggers)
|
|
248
|
-
|
|
249
|
-
When peer review is manually triggered by a human (via `/peer`, "叫上 peer", etc.), the executing agent **must display each round inline in the current conversation**. This applies regardless of which agent is executing — Claude, DeepSeek, Kimi, PI, or any other.
|
|
250
|
-
|
|
251
|
-
**Per-round display format:**
|
|
252
|
-
|
|
253
|
-
```
|
|
254
|
-
─── Peer Review · Round N ───────────────────────────────
|
|
255
|
-
→ Sending to [peer]:
|
|
256
|
-
{full message sent to peer}
|
|
257
|
-
|
|
258
|
-
← [peer] responds:
|
|
259
|
-
{peer's full response, verbatim}
|
|
260
|
-
|
|
261
|
-
◆ My analysis: {Claude/executing agent's reaction and position for this round}
|
|
262
|
-
─────────────────────────────────────────────────────────
|
|
263
|
-
```
|
|
264
|
-
|
|
265
|
-
**Rules:**
|
|
266
|
-
- Peer CLI calls must be **synchronous** (do NOT use background/async execution).
|
|
267
|
-
- The outgoing round=1 message must follow the *Independent Judgment Rule* above — no root-cause analysis, no fix diff, no leading questions.
|
|
268
|
-
- Show the outgoing message **before** calling the peer, so the user sees what's being asked.
|
|
269
|
-
- Relay the peer's response **verbatim** before adding your own analysis.
|
|
270
|
-
- After the peer's reply, the reviewer's own analysis block must explicitly state whether the peer's root cause and fix direction match the reviewer's own (independent) conclusion — that comparison is what determines the next round's action.
|
|
271
|
-
- If a peer call fails or times out, report it immediately inline and either retry or ESCALATE.
|
|
272
|
-
- Negotiation log is written to `<project>/.roll/peer/logs/` as usual.
|
|
273
|
-
|
|
274
|
-
**Why inline, not tmux:** When a human manually triggers peer review inside an agent's interactive session, the conversation IS the visible interface. tmux auto-attach is only relevant for CLI-launched background sessions (`bin/roll peer`), not for skill invocations.
|
|
275
|
-
|
|
276
|
-
## Workflow Integration
|
|
277
|
-
|
|
278
|
-
### `roll-build` Plan Mode
|
|
279
|
-
|
|
280
|
-
After generating an executable plan, before proceeding to TCR:
|
|
281
|
-
|
|
282
|
-
1. Assess plan complexity (file count, cross-module impact, risk level)
|
|
283
|
-
2. If complexity > threshold, prompt user:
|
|
284
|
-
```
|
|
285
|
-
This plan affects 5 files across 3 modules. Estimated peer review: 2–3 rounds, ~X tokens.
|
|
286
|
-
Press Enter to launch peer review, or type 'n' to skip. Auto-executing in 10s...
|
|
287
|
-
```
|
|
288
|
-
3. If user does not abort within 10s, invoke `roll peer` with `--tag architecture`
|
|
289
|
-
4. Wait for result:
|
|
290
|
-
- AGREE → proceed to TCR
|
|
291
|
-
- REFINE/OBJECT → incorporate feedback and regenerate plan
|
|
292
|
-
- ESCALATE → present both proposals to user for final decision
|
|
293
|
-
|
|
294
|
-
### `roll-spar`
|
|
295
|
-
|
|
296
|
-
When Attacker and Defender reach a stalemate (both tests pass but interpretations differ):
|
|
297
|
-
|
|
298
|
-
1. Auto-invoke `roll peer` with `--tag test`
|
|
299
|
-
2. Use the peer's verdict as tie-breaker
|
|
300
|
-
|
|
301
|
-
## Output Artifacts
|
|
302
|
-
|
|
303
|
-
- **Negotiation log**: `<project>/.roll/peer/logs/<timestamp>_<from>_<to>.md`
|
|
304
|
-
- **Structured record**: `<project>/.roll/peer/runs.jsonl`
|
|
305
|
-
- **State file**: `~/.roll/.peer-state/`
|
|
306
|
-
- **Decision record**: If AGREE, append summary to `docs/decisions/` or `.roll/backlog.md` (optional)
|
|
307
|
-
|
|
308
|
-
## Configuration
|
|
309
|
-
|
|
310
|
-
User overrides in `~/.roll/config.yaml`:
|
|
311
|
-
|
|
312
|
-
```yaml
|
|
313
|
-
peer:
|
|
314
|
-
max_rounds: 3
|
|
315
|
-
opt_out_seconds: 10
|
|
316
|
-
call_timeout: 180 # seconds per round; configure based on your API latency
|
|
317
|
-
fallback: file_mailbox # direct_cli | file_mailbox | auto
|
|
318
|
-
capability_map:
|
|
319
|
-
architecture: [claude, deepseek, kimi, pi]
|
|
320
|
-
security: [claude, deepseek, pi, kimi]
|
|
321
|
-
test: [codex, kimi, deepseek, claude]
|
|
322
|
-
refactor: [deepseek, kimi, claude, pi]
|
|
323
|
-
default: [deepseek, kimi, claude, pi]
|
|
324
|
-
adaptive:
|
|
325
|
-
streak_threshold: 3
|
|
326
|
-
min_samples: 3
|
|
327
|
-
```
|
|
328
|
-
|
|
329
|
-
## Limitations
|
|
330
|
-
|
|
331
|
-
1. **Reverse link reliability**: Direct CLI calls are preferred. Reliability varies by tool — see Peer Invocation Reference table. If a peer fails consistently, the adaptive streak tracker marks it `abandoned` and falls back to the next candidate. File mailbox (`<project>/.roll/peer/mailbox/`) is the last-resort fallback.
|
|
332
|
-
- `deepseek serve --http` is the most reliable option when available — prefer it over direct `deepseek` CLI invocation.
|
|
333
|
-
- `codex exec` has known TTY/Ink issues in non-interactive environments; treat as low-priority fallback.
|
|
334
|
-
2. **Cost**: Every peer review consumes tokens on both sides. Only trigger for tasks where the cost of a wrong decision exceeds the cost of peer review. DeepSeek is the most cost-effective peer for general use.
|
|
335
|
-
3. **Context window**: Large project handoff cards may consume significant context. Keep file pointers concise.
|
|
336
|
-
4. **Tool differences**: Claude, DeepSeek, Kimi, Codex, and Pi interpret skills and AGENTS.md differently. The peer may apply the protocol slightly differently. This is expected and acceptable — the protocol is designed to tolerate variation.
|
|
45
|
+
- Description changes require updates in `route-cases/skills.json`.
|
|
46
|
+
- New observed failures should add a gotcha and the matching positive or negative route case.
|
|
47
|
+
- Heavy examples, templates, recovery paths, and deterministic snippets belong in `references/`, `assets/`, or `scripts/`, not in this hub.
|