revdeck 0.18.0 → 0.19.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 +52 -0
- package/README.md +25 -6
- package/README.ru.md +27 -5
- package/dist/cli.js +488 -39
- package/dist/cli.js.map +4 -4
- package/dist/daemon.js +581 -101
- package/dist/daemon.js.map +4 -4
- package/dist/mcp.js +277 -19
- package/dist/mcp.js.map +4 -4
- package/dist/ui/assets/index-BPQZSbvp.js +21 -0
- package/dist/ui/index.html +1 -1
- package/docs/architecture.md +8 -0
- package/docs/capabilities.md +13 -6
- package/docs/configuration.md +26 -1
- package/docs/integrations.md +1 -0
- package/docs/protocol.md +7 -4
- package/docs/ru/architecture.md +9 -0
- package/docs/ru/capabilities.md +13 -4
- package/docs/ru/configuration.md +25 -1
- package/docs/ru/integrations.md +1 -0
- package/docs/ru/protocol.md +7 -4
- package/docs/ru/threat-model.md +3 -0
- package/docs/threat-model.md +3 -0
- package/package.json +1 -1
- package/skills/revdeck/en/Feedback.md +3 -1
- package/skills/revdeck/en/Review.md +6 -1
- package/skills/revdeck/en/SKILL.md +12 -1
- package/skills/revdeck/ru/Feedback.md +3 -1
- package/skills/revdeck/ru/Review.md +5 -1
- package/skills/revdeck/ru/SKILL.md +11 -1
- package/dist/ui/assets/index-D3hJTLAL.js +0 -21
package/dist/ui/index.html
CHANGED
|
@@ -9,7 +9,7 @@
|
|
|
9
9
|
<link rel="icon" href="/icon-32.png" type="image/png" sizes="32x32" />
|
|
10
10
|
<link rel="apple-touch-icon" href="/icon-128.png" />
|
|
11
11
|
<title>revdeck</title>
|
|
12
|
-
<script type="module" crossorigin src="/assets/index-
|
|
12
|
+
<script type="module" crossorigin src="/assets/index-BPQZSbvp.js"></script>
|
|
13
13
|
<link rel="stylesheet" crossorigin href="/assets/index-ahIeys_y.css">
|
|
14
14
|
</head>
|
|
15
15
|
<body>
|
package/docs/architecture.md
CHANGED
|
@@ -76,6 +76,11 @@ is not stored in the review, the daemon or the database.
|
|
|
76
76
|
`info`/`diff`/`threads` and never enter SQLite or the review list.
|
|
77
77
|
- `review_events` — append-only quality log (actor, type, finding/thread/rule, payload); metrics read
|
|
78
78
|
it instead of relying on the current snapshot.
|
|
79
|
+
- Review evidence (`revdeck evidence`) is derived on request from the snapshot, the rule excerpts and
|
|
80
|
+
the event log; it is never stored as a second source of truth.
|
|
81
|
+
- `check_runs` — executed check artifacts (argv, exit code, redacted output, measured commit, timings).
|
|
82
|
+
Only runs with a real exit code are stored: `skipped` and spawn failures are not; the latest run per check is injected into the agent context and
|
|
83
|
+
shown in the Rules tab, so `coverage` can cite evidence instead of an intention.
|
|
79
84
|
- `ReviewInfo.merge` — mergeability at the last sync: target branch, diff base/head, platform detail
|
|
80
85
|
and `clean`/`conflict`/`behind`/`unknown`/`unavailable`. It is separate from the merge-base diff.
|
|
81
86
|
- `Thread`/`Note` — shared discussion model.
|
|
@@ -164,6 +169,9 @@ documents declared in `context.sources` of each repository (`context.maxBytes` c
|
|
|
164
169
|
one-entry parsed-snapshot cache and one snippet index per view keep large reviews cheap.
|
|
165
170
|
- SSE heartbeats gate the polling fallback; review/feature/project events reload only their scope, and
|
|
166
171
|
unchanged lists are not reassigned in the UI.
|
|
172
|
+
- Idle browser connections stay open for 65 seconds, and a request that fails on the network is retried
|
|
173
|
+
or probed against `/api/health` before the UI treats the daemon as lost: a keep-alive socket the
|
|
174
|
+
server closed must not look like an outage.
|
|
167
175
|
- Threads and findings use a measured, page-windowed virtual list in the UI; only visible pages are in
|
|
168
176
|
the DOM, while focus, editors and deep links stay pinned.
|
|
169
177
|
- Snippets for threads and findings are computed on the server and size-limited.
|
package/docs/capabilities.md
CHANGED
|
@@ -104,22 +104,25 @@ The core guarantees:
|
|
|
104
104
|
GitHub attachments are not supported by its public API.
|
|
105
105
|
- Review summary, findings with severity (`blocker`/`major`/`minor`/`question`), stable finding ids,
|
|
106
106
|
decisions (`accept`/`reject`/`discuss`), private agent notes and publish status.
|
|
107
|
-
- Multi-agent review roles and shards (`review.agents`, `review.roles`, custom roles)
|
|
108
|
-
|
|
107
|
+
- Multi-agent review roles and shards (`review.agents`, `review.roles`, custom roles), plus an
|
|
108
|
+
ad-hoc `verifier` role for an adversarial pass over the lead's candidates; the daemon stores the
|
|
109
|
+
lead's merged result.
|
|
110
|
+
- Portable review evidence (`revdeck evidence`): rule documents with excerpt hashes, actual check runs
|
|
111
|
+
with commits, findings with human decisions, publication counts and the event timeline.
|
|
109
112
|
- Analytics: accepted/rejected/pending findings, acceptance rate, threads, drafts, rejected
|
|
110
113
|
suggestions.
|
|
111
114
|
- Optional secret scan with masked previews only.
|
|
112
115
|
- Optional review version history by head/base SHA.
|
|
113
116
|
- Change groups: explicit or derived by file kind/module.
|
|
114
|
-
- Project checks: argv, path scoping; the agent only plans, a human runs them in the UI or host CLI with the full command shown.
|
|
117
|
+
- Project checks: argv, path scoping; the agent only plans, a human runs them in the UI or host CLI with the full command shown. Every executed run is stored with the working-copy commit it ran on, exit code and redacted output, and the latest run per check reaches the agent context as evidence; spawn failures and skipped runs are not stored.
|
|
115
118
|
- Read-only reviews: drafts, findings, comments, reactions, checks and publishing are disabled.
|
|
116
119
|
- Export/import of the legacy file format.
|
|
117
120
|
|
|
118
121
|
## Agent interfaces
|
|
119
122
|
|
|
120
|
-
- **MCP server** over stdio with tools for status, list, open, context, threads, diff, rules,
|
|
121
|
-
replies, draft findings, summary, line notes, review messages to the agent,
|
|
122
|
-
publish preview and publish.
|
|
123
|
+
- **MCP server** over stdio with tools for status, list, open, context, threads, diff, rules, checks
|
|
124
|
+
and last check runs, draft replies, draft findings, summary, line notes, review messages to the agent,
|
|
125
|
+
feature context/notes, publish preview and publish.
|
|
123
126
|
- **CLI** with the same capabilities for harnesses without MCP.
|
|
124
127
|
- **Explicit scenario entry points**: `revdeck review` / `revdeck feedback` and `/revdeck review|feedback`
|
|
125
128
|
fix "someone else's MR" or "your own MR" before the agent starts. `revdeck_context` takes
|
|
@@ -218,6 +221,10 @@ a permanent project link; a project appears in a feature while at least one of i
|
|
|
218
221
|
`/api/health` answers with a fresh session. An open tab shows the same explanation as an in-app card
|
|
219
222
|
instead of raw `Failed to fetch`/401 errors; it probes the daemon, listens to `online`/visibility
|
|
220
223
|
changes and recovers by itself. The page follows the browser language and the system theme.
|
|
224
|
+
- A single network blip is not reported as a loss: idle browser connections stay open for 65 seconds
|
|
225
|
+
(Node's five-second default let a request race into a socket the server was closing), an idempotent
|
|
226
|
+
request is retried once on a fresh connection, and a request that may have reached the daemon is
|
|
227
|
+
checked against `/api/health` first. The full-screen card needs a daemon that does not answer at all.
|
|
221
228
|
- A connection loss does not lose work: replies and finding comments that did not reach the daemon are
|
|
222
229
|
backed up in `localStorage` and restored (then saved) after the tab reconnects.
|
|
223
230
|
- Responsive sidebar and mobile backdrop; dark/light theme via CSS variables.
|
package/docs/configuration.md
CHANGED
|
@@ -190,6 +190,7 @@ Available roles:
|
|
|
190
190
|
| `build` | CI, build, packaging, reproducibility | §8, §9 |
|
|
191
191
|
| `privacy` | PII, personal data, logs and leaks | §9, §10 |
|
|
192
192
|
| `general` | full review across all sections | §1–§12 |
|
|
193
|
+
| `verifier` | confirms or refutes lead-provided candidates; never adds findings | §7, §12 |
|
|
193
194
|
|
|
194
195
|
Custom roles live in `review.customRoles`; `roles` may reference built-ins or those keys:
|
|
195
196
|
|
|
@@ -206,6 +207,13 @@ review:
|
|
|
206
207
|
Report only accessibility problems; do not repeat general architecture findings.
|
|
207
208
|
```
|
|
208
209
|
|
|
210
|
+
`verifier` is not part of the default plan and normally should not be listed in `roles`: the lead
|
|
211
|
+
spawns it after collecting candidates, passes them the findings JSON, and asks for a verdict per item
|
|
212
|
+
(`confirmed` / `refuted` / `needs-evidence`) with a citation. Refuted candidates are dropped,
|
|
213
|
+
`needs-evidence` becomes a question, and the lead records the verification pass in `coverage`. The
|
|
214
|
+
verdict payload is JSON:
|
|
215
|
+
`{"verdicts":[{"id":"f1","verdict":"confirmed","reason":"...","citation":"file:line or doc#section"}]}`.
|
|
216
|
+
|
|
209
217
|
Custom ids cannot override a built-in role. `review.readOnly: true` disables all writes and publishing
|
|
210
218
|
for that review (the UI shows a banner, the daemon rejects mutations).
|
|
211
219
|
|
|
@@ -217,6 +225,15 @@ for those files), plus a reminder not to write findings. The MCP tool accepts th
|
|
|
217
225
|
arguments. The lead agent should collect the workers' JSON, deduplicate by `file:line:title`, and only
|
|
218
226
|
then call `revdeck_set_summary` / `revdeck_draft_findings`.
|
|
219
227
|
|
|
228
|
+
A shard is a coverage unit, not an ensemble. Files are split by cohesion — a module directory stays
|
|
229
|
+
together and a test file follows the shard of the file it tests — and then balanced by changed lines.
|
|
230
|
+
A shard receives rules only for its own paths, sees the names of the other files without their diff, and
|
|
231
|
+
must flag cross-shard contracts for the lead instead of writing them as findings. The lead runs a
|
|
232
|
+
cross-cut pass over the full file list and changed public contracts and records the run axes in
|
|
233
|
+
`coverage`. Replication of one lens (independent full runs) is `agents: 3, roles: [correctness]`.
|
|
234
|
+
When there are fewer cohesion groups than shards, the largest group is split by file, so a test can end
|
|
235
|
+
up in a different shard from its subject; the shard count is bounded by `min(32, files in the diff)`.
|
|
236
|
+
|
|
220
237
|
## rules
|
|
221
238
|
|
|
222
239
|
- `sources` — exact document paths (optional `#section`), not glob patterns. Use `map.match` to select
|
|
@@ -339,10 +356,18 @@ command before confirming.
|
|
|
339
356
|
| `timeoutMs` | timeout (default 300,000) |
|
|
340
357
|
|
|
341
358
|
Running: a human uses **Run matching** in the Rules tab (the dialog shows the full argv) or
|
|
342
|
-
`revdeck checks <N> --run --yes` on the host; `revdeck checks` prints the commands first.
|
|
359
|
+
`revdeck checks <N> --run --yes` on the host; `revdeck checks` prints the commands first.
|
|
360
|
+
`revdeck checks <N> --last --json` returns `{runs: [{checkId, status, exitCode, commitSha, startedAt,
|
|
361
|
+
durationMs, output}]}`; `--last` and `--run` are mutually exclusive. Read-only
|
|
343
362
|
reviews disable the runner. The agent can only show the plan; the bridge returns `CAPABILITY` for
|
|
344
363
|
`checks.run`. Host checks are not sandboxed yet.
|
|
345
364
|
|
|
365
|
+
Every executed check is stored as a run artifact: argv, exit code, redacted output and the commit. The
|
|
366
|
+
latest run per check is shown in the Rules tab, printed by `revdeck checks --last`, and injected into
|
|
367
|
+
`revdeck_context`; the agent reads it with `revdeck_checks` and cannot execute checks itself. A run on an
|
|
368
|
+
older commit is marked stale, so it cannot serve as proof for the current diff. Unconfirmed (`skipped`)
|
|
369
|
+
runs are not stored: only actual executions are evidence.
|
|
370
|
+
|
|
346
371
|
## publish
|
|
347
372
|
|
|
348
373
|
- `requireApproval` — kept for backward compatibility; approval is always required when publishing is
|
package/docs/integrations.md
CHANGED
|
@@ -90,6 +90,7 @@ For Claude Code, add the tools to `.claude/settings.local.json` (personal) or `.
|
|
|
90
90
|
"mcp__revdeck__revdeck_threads",
|
|
91
91
|
"mcp__revdeck__revdeck_diff",
|
|
92
92
|
"mcp__revdeck__revdeck_rules",
|
|
93
|
+
"mcp__revdeck__revdeck_checks",
|
|
93
94
|
"mcp__revdeck__revdeck_notes",
|
|
94
95
|
"mcp__revdeck__revdeck_feature",
|
|
95
96
|
"mcp__revdeck__revdeck_feature_note",
|
package/docs/protocol.md
CHANGED
|
@@ -93,8 +93,10 @@ bridge is authorized by transport capability: `agent` may read and draft, but hu
|
|
|
93
93
|
| `publish.preview` | `review`, `kind`, `ids[]` | plan + warnings |
|
|
94
94
|
| `publish.approve` | `review`, `kind`, `ids[]`, `hash` | `approvalId`, `expiresAt` |
|
|
95
95
|
| `publish.commit` | `review`, `approvalId` | per-item results |
|
|
96
|
-
| `rules.get` | `review` | rules markdown, checks, warnings |
|
|
97
|
-
| `checks.
|
|
96
|
+
| `rules.get` | `review`, `shard?` | rules markdown, checks, warnings; with `shard: {index, count}` only the shard paths (`1 ≤ index ≤ count ≤ min(32, files)`) |
|
|
97
|
+
| `checks.list` | `review` | last recorded run per check (read scope) |
|
|
98
|
+
| `evidence.get` | `review` | portable review evidence (rules hashes, runs, findings, decisions, timeline) |
|
|
99
|
+
| `checks.run` | `review`, `allowRun`, `ids[]` | check results; executed runs are persisted (human-only) |
|
|
98
100
|
|
|
99
101
|
## Capabilities
|
|
100
102
|
|
|
@@ -103,10 +105,11 @@ bridge is authorized by transport capability: `agent` may read and draft, but hu
|
|
|
103
105
|
`reviews.*` (read/open/refresh), `diff.get`, `rules.get`, `features.list/get/context/forReview`,
|
|
104
106
|
`features.addNote/updateNote/deleteNote` (author forced to `agent`; only own notes),
|
|
105
107
|
`drafts.put`, `findings.put/list`, `summary.put`, `notes.*` (server-only publication fields ignored),
|
|
106
|
-
`publish.preview`, `projects.list`, `versions.*`, `analytics.get`, `metrics.get`,
|
|
108
|
+
`publish.preview`, `checks.list`, `projects.list`, `versions.*`, `analytics.get`, `metrics.get`,
|
|
109
|
+
`messages.list/add`, `secrets.get`.
|
|
107
110
|
|
|
108
111
|
Human-only methods return `CAPABILITY` on the bridge: `publish.approve`, `publish.commit`,
|
|
109
|
-
`checks.run`, `decisions.put`, `comments.update/delete`, `reactions.*`, `attachments.upload`,
|
|
112
|
+
`checks.run`, `evidence.get`, `decisions.put`, `comments.update/delete`, `reactions.*`, `attachments.upload`,
|
|
110
113
|
`reviews.remove`, `projects.register/update/remove`, `auth.status`/`auth.login`,
|
|
111
114
|
`settings.get`/`settings.put`, and feature administration
|
|
112
115
|
(`features.create/update/delete/addReviews/removeReview/reorder`).
|
package/docs/ru/architecture.md
CHANGED
|
@@ -76,6 +76,12 @@ agent (MCP/CLI) ──▶ revdeck daemon ──glab/gh──▶ GitLab/GitHub
|
|
|
76
76
|
провайдера и не попадают в SQLite или список ревью.
|
|
77
77
|
- `review_events` — append-only журнал качества (актор, тип, finding/thread/rule, payload); метрики
|
|
78
78
|
читают его, а не только текущий снимок.
|
|
79
|
+
- Паспорт ревью (`revdeck evidence`) собирается по запросу из снимка, выдержек правил и журнала
|
|
80
|
+
событий и не хранится вторым источником правды.
|
|
81
|
+
- `check_runs` — артефакты выполненных проверок (argv, код выхода, очищенный вывод, коммит, тайминги).
|
|
82
|
+
Сохраняются только запуски с реальным кодом выхода: `skipped` и сбои запуска — нет; последний прогон по каждой проверке
|
|
83
|
+
попадает в контекст агента и на вкладку «Правила», поэтому `coverage` ссылается на доказательство,
|
|
84
|
+
а не на намерение.
|
|
79
85
|
- `ReviewInfo.merge` — mergeability на момент sync: target, база/head diff, детали платформы и
|
|
80
86
|
`clean`/`conflict`/`behind`/`unknown`/`unavailable`. Это отдельно от merge-base diff.
|
|
81
87
|
- `Thread`/`Note` — общая модель обсуждений.
|
|
@@ -166,6 +172,9 @@ OpenAPI разбирается на операции и схемы, а конт
|
|
|
166
172
|
разобранного снимка и один индекс сниппетов на view удешевляют большие ревью.
|
|
167
173
|
- Heartbeat'ы SSE отключают поллинг-страховку; события review/feature/project обновляют только свою
|
|
168
174
|
часть, а неизменившиеся списки в UI не переприсваиваются.
|
|
175
|
+
- Простаивающие соединения браузера живут 65 секунд, а запрос, упавший на сетевом уровне,
|
|
176
|
+
повторяется или проверяется через `/api/health` раньше, чем UI покажет потерю связи: закрытый
|
|
177
|
+
сервером keep-alive-сокет не должен выглядеть как недоступный демон.
|
|
169
178
|
- Треды и замечания используют измеряемый page-windowed virtual list в UI: в DOM только видимые
|
|
170
179
|
страницы, а фокус, редакторы и deep-link'и остаются рабочими.
|
|
171
180
|
- Сниппеты для тредов и замечаний считаются на сервере и ограничены по размеру.
|
package/docs/ru/capabilities.md
CHANGED
|
@@ -104,20 +104,24 @@ agent (MCP/CLI) ──unix socket──▶ revdeck daemon ──glab/gh──▶
|
|
|
104
104
|
не поддерживает публичный API загрузки.
|
|
105
105
|
- Выжимка ревью, замечания с уровнем (`blocker`/`major`/`minor`/`question`), стабильные id,
|
|
106
106
|
решения (`accept`/`reject`/`discuss`), приватные заметки агента и статус публикации.
|
|
107
|
-
- Многоагентные роли и шарды (`review.agents`, `review.roles`, кастомные роли)
|
|
108
|
-
итоговый результат лида.
|
|
107
|
+
- Многоагентные роли и шарды (`review.agents`, `review.roles`, кастомные роли), а также роль
|
|
108
|
+
`verifier` для состязательного прохода по кандидатам лида; демон хранит итоговый результат лида.
|
|
109
|
+
- Переносимый паспорт ревью (`revdeck evidence`): документы правил с хэшами выдержек, фактические
|
|
110
|
+
прогоны проверок с коммитами, замечания с решениями человека, счётчики публикации и таймлайн
|
|
111
|
+
событий.
|
|
109
112
|
- Аналитика: принятые/отклонённые/ожидающие замечания, acceptance rate, треды, черновики,
|
|
110
113
|
отклонённые предложения.
|
|
111
114
|
- Опциональный скан секретов с маскированными превью.
|
|
112
115
|
- Опциональная история версий ревью по head/base SHA.
|
|
113
116
|
- Группы изменений: явные или автоматические по типу файла/модулю.
|
|
114
|
-
- Проверки проекта: argv, привязка к путям; агент только планирует, человек запускает в UI или CLI на хосте с показом полной команды.
|
|
117
|
+
- Проверки проекта: argv, привязка к путям; агент только планирует, человек запускает в UI или CLI на хосте с показом полной команды. Каждый выполненный прогон сохраняется с коммитом рабочей копии, на котором он выполнялся, кодом выхода и очищенным выводом, а последний прогон по каждой проверке попадает в контекст агента как доказательство; сбои запуска и `skipped` не сохраняются.
|
|
115
118
|
- Read-only ревью: черновики, замечания, комментарии, реакции, проверки и публикация отключены.
|
|
116
119
|
- Экспорт/импорт старого файлового формата.
|
|
117
120
|
|
|
118
121
|
## Интерфейсы агента
|
|
119
122
|
|
|
120
|
-
- **MCP-сервер** поверх stdio: status, list, open, context, threads, diff, rules,
|
|
123
|
+
- **MCP-сервер** поверх stdio: status, list, open, context, threads, diff, rules, checks и последние
|
|
124
|
+
прогоны, draft replies,
|
|
121
125
|
draft findings, summary, line notes, сообщения агенту, feature context/notes, publish preview и publish.
|
|
122
126
|
- **CLI** с теми же возможностями для харнессов без MCP.
|
|
123
127
|
- **Явные точки входа сценариев**: `revdeck review` / `revdeck feedback` и `/revdeck review|feedback`
|
|
@@ -222,6 +226,11 @@ agent (MCP/CLI) ──unix socket──▶ revdeck daemon ──glab/gh──▶
|
|
|
222
226
|
новой сессией. Открытая вкладка показывает то же объяснение карточкой вместо сырых
|
|
223
227
|
`Failed to fetch`/401, слушает `online`/смену видимости, сама проверяет демон и восстанавливается.
|
|
224
228
|
Язык страницы — по браузеру, тема — системная.
|
|
229
|
+
- Одиночный сетевой обрыв не считается потерей связи: простаивающие соединения браузера живут
|
|
230
|
+
65 секунд (пять секунд по умолчанию в Node давали гонку с закрывающимся сокетом), идемпотентный
|
|
231
|
+
запрос повторяется один раз на новом соединении, а запрос, который мог дойти до демона,
|
|
232
|
+
проверяется через `/api/health`. Полноэкранная карточка появляется только когда демон не отвечает
|
|
233
|
+
вообще.
|
|
225
234
|
- Обрыв связи не теряет работу: ответы и комментарии к замечаниям, не дошедшие до демона,
|
|
226
235
|
сохраняются в `localStorage` и восстанавливаются (а затем отправляются) после переподключения.
|
|
227
236
|
- Адаптивный сайдбар и мобильный backdrop; светлая/тёмная тема через CSS-переменные.
|
package/docs/ru/configuration.md
CHANGED
|
@@ -184,6 +184,7 @@ review:
|
|
|
184
184
|
| `build` | CI, сборка, упаковка, воспроизводимость | §8, §9 |
|
|
185
185
|
| `privacy` | PII, персональные данные, логи и утечки | §9, §10 |
|
|
186
186
|
| `general` | полное ревью по всем разделам | §1–§12 |
|
|
187
|
+
| `verifier` | подтверждает или опровергает кандидатов от лида; новых замечаний не добавляет | §7, §12 |
|
|
187
188
|
|
|
188
189
|
Кастомные роли задаются в `review.customRoles`; `roles` может ссылаться на встроенные роли или на
|
|
189
190
|
эти ключи:
|
|
@@ -201,6 +202,12 @@ review:
|
|
|
201
202
|
Сообщай только о проблемах доступности; не повторяй общие замечания по архитектуре.
|
|
202
203
|
```
|
|
203
204
|
|
|
205
|
+
`verifier` не входит в план по умолчанию и обычно не должен попадать в `roles`: лид вызывает его
|
|
206
|
+
после сбора кандидатов, отдаёт JSON замечаний и просит вердикт по каждому пункту (`confirmed` /
|
|
207
|
+
`refuted` / `needs-evidence`) с цитатой. Опровергнутые выбрасываются, `needs-evidence` превращается в
|
|
208
|
+
вопрос, а факт верификации лид отмечает в `coverage`. Ответ — JSON:
|
|
209
|
+
`{"verdicts":[{"id":"f1","verdict":"confirmed","reason":"...","citation":"файл:строка или документ#раздел"}]}`.
|
|
210
|
+
|
|
204
211
|
Кастомный id не может переопределить встроенную роль. `review.readOnly: true` запрещает изменения и
|
|
205
212
|
публикацию для этого ревью (UI показывает баннер, демон отклоняет мутации).
|
|
206
213
|
|
|
@@ -212,6 +219,15 @@ review:
|
|
|
212
219
|
Лид-агент собирает JSON воркеров, дедуплицирует по `file:line:title` и только потом вызывает
|
|
213
220
|
`revdeck_set_summary` / `revdeck_draft_findings`.
|
|
214
221
|
|
|
222
|
+
Шард — единица покрытия, а не ансамбль. Файлы делятся по сцеплению: каталог модуля остаётся вместе, а
|
|
223
|
+
тестовый файл уходит в шард того файла, который он тестирует; внутри групп работает балансировка по
|
|
224
|
+
изменённым строкам. Шард получает правила только по своим путям, видит имена остальных файлов без diff
|
|
225
|
+
и обязан выносить межшардовые контракты лиду отдельным пунктом, а не замечанием. Лид делает
|
|
226
|
+
cross-cut проход по полному списку файлов и изменённым публичным контрактам и пишет в `coverage`, какими
|
|
227
|
+
осями шёл прогон. Репликация одной линзы (независимые полные прогоны) — `agents: 3, roles: [correctness]`.
|
|
228
|
+
Если групп сцепления меньше, чем шардов, крупнейшая группа дробится по файлам, поэтому тест может
|
|
229
|
+
оказаться не в шарде своего исходника; число шардов ограничено `min(32, файлов в diff)`.
|
|
230
|
+
|
|
215
231
|
## rules
|
|
216
232
|
|
|
217
233
|
- `sources` — точные пути к документам (можно с `#секцией`), не glob-шаблоны. Для выбора документов по
|
|
@@ -335,9 +351,17 @@ review:
|
|
|
335
351
|
|
|
336
352
|
Запуск: человек нажимает **Запустить подходящие** на вкладке «Правила» (диалог показывает полный
|
|
337
353
|
argv) или выполняет `revdeck checks <N> --run --yes` на хосте; `revdeck checks` сначала печатает
|
|
338
|
-
команды.
|
|
354
|
+
команды. `revdeck checks <N> --last --json` возвращает `{runs: [{checkId, status, exitCode, commitSha,
|
|
355
|
+
startedAt, durationMs, output}]}`; `--last` и `--run` несовместимы. В read-only проверки отключены. Агент может только показать план; мост возвращает
|
|
339
356
|
`CAPABILITY` для `checks.run`. Host-checks пока не в песочнице.
|
|
340
357
|
|
|
358
|
+
Каждый выполненный прогон сохраняется как артефакт: argv, код выхода, очищенный вывод и коммит.
|
|
359
|
+
Последний прогон по каждой проверке виден на вкладке «Правила», печатается `revdeck checks --last` и
|
|
360
|
+
попадает в `revdeck_context`; агент читает его через `revdeck_checks` и не может запускать проверки
|
|
361
|
+
сам. Прогон на устаревшем коммите помечается как устаревший и не может служить доказательством для
|
|
362
|
+
текущего diff. Неподтверждённые (`skipped`) прогоны не сохраняются: доказательство — только реальный
|
|
363
|
+
запуск.
|
|
364
|
+
|
|
341
365
|
## publish
|
|
342
366
|
|
|
343
367
|
- `requireApproval` — оставлен для совместимости; approval требуется всегда, когда публикует не
|
package/docs/ru/integrations.md
CHANGED
|
@@ -91,6 +91,7 @@ revdeck в основном только читают; черновики и п
|
|
|
91
91
|
"mcp__revdeck__revdeck_threads",
|
|
92
92
|
"mcp__revdeck__revdeck_diff",
|
|
93
93
|
"mcp__revdeck__revdeck_rules",
|
|
94
|
+
"mcp__revdeck__revdeck_checks",
|
|
94
95
|
"mcp__revdeck__revdeck_notes",
|
|
95
96
|
"mcp__revdeck__revdeck_feature",
|
|
96
97
|
"mcp__revdeck__revdeck_feature_note",
|
package/docs/ru/protocol.md
CHANGED
|
@@ -93,8 +93,10 @@
|
|
|
93
93
|
| `publish.preview` | `review`, `kind`, `ids[]` | план + предупреждения |
|
|
94
94
|
| `publish.approve` | `review`, `kind`, `ids[]`, `hash` | `approvalId`, `expiresAt` |
|
|
95
95
|
| `publish.commit` | `review`, `approvalId` | результаты по пунктам |
|
|
96
|
-
| `rules.get` | `review` | markdown правил, проверки,
|
|
97
|
-
| `checks.
|
|
96
|
+
| `rules.get` | `review`, `shard?` | markdown правил, проверки, предупреждения; с `shard: {index, count}` — только пути шарда (`1 ≤ index ≤ count ≤ min(32, файлов)`) |
|
|
97
|
+
| `checks.list` | `review` | последний записанный прогон по каждой проверке (read) |
|
|
98
|
+
| `evidence.get` | `review` | переносимый паспорт ревью (хэши правил, прогоны, замечания, решения, таймлайн) |
|
|
99
|
+
| `checks.run` | `review`, `allowRun`, `ids[]` | результаты проверок; выполненные прогоны сохраняются (human-only) |
|
|
98
100
|
|
|
99
101
|
## Капабилити
|
|
100
102
|
|
|
@@ -103,10 +105,11 @@
|
|
|
103
105
|
`reviews.*` (чтение/open/refresh), `diff.get`, `rules.get`, `features.list/get/context/forReview`,
|
|
104
106
|
`features.addNote/updateNote/deleteNote` (автор принудительно `agent`; только свои заметки),
|
|
105
107
|
`drafts.put`, `findings.put/list`, `summary.put`, `notes.*` (серверные поля публикации
|
|
106
|
-
игнорируются), `publish.preview`, `projects.list`, `versions.*`, `analytics.get`,
|
|
108
|
+
игнорируются), `publish.preview`, `checks.list`, `projects.list`, `versions.*`, `analytics.get`,
|
|
109
|
+
`metrics.get`, `messages.list/add`, `secrets.get`.
|
|
107
110
|
|
|
108
111
|
Human-only методы возвращают `CAPABILITY` на мосту: `publish.approve`, `publish.commit`,
|
|
109
|
-
`checks.run`, `decisions.put`, `comments.update/delete`, `reactions.*`, `attachments.upload`,
|
|
112
|
+
`checks.run`, `evidence.get`, `decisions.put`, `comments.update/delete`, `reactions.*`, `attachments.upload`,
|
|
110
113
|
`reviews.remove`, `projects.register/update/remove`, `auth.status`/`auth.login`,
|
|
111
114
|
`settings.get`/`settings.put` и администрирование фич
|
|
112
115
|
(`features.create/update/delete/addReviews/removeReview/reorder`).
|
package/docs/ru/threat-model.md
CHANGED
|
@@ -83,4 +83,7 @@ SQLite. MCP-сервер определяет один проект по сво
|
|
|
83
83
|
(или из GitLab `/uploads/`); вложения ограничены растровыми картинками и видео и проверяются по
|
|
84
84
|
расширению, MIME и сигнатуре файла.
|
|
85
85
|
- Публикация невозможна без `approval_id`; MCP-инструмент публикации его не создаёт.
|
|
86
|
+
- Вывод проверок хранится локально после best-effort `redact` (только известные шаблоны токенов),
|
|
87
|
+
читается агентом через `checks.list` и попадает в JSON-паспорт ревью. Такой артефакт считается
|
|
88
|
+
чувствительным, прежде чем прикладывать его к платформе: маскировка — эвристика, не гарантия.
|
|
86
89
|
- `revdeck doctor` показывает, какие права и адаптеры активны.
|
package/docs/threat-model.md
CHANGED
|
@@ -86,4 +86,7 @@ context isolation, not a security boundary.
|
|
|
86
86
|
(or GitLab project `/uploads/`); attachments are restricted to raster images and videos and are
|
|
87
87
|
checked by extension, MIME and file signature.
|
|
88
88
|
- Publishing is impossible without an `approval_id`; the MCP publish tool does not create one.
|
|
89
|
+
- Check output is stored locally after best-effort `redact` (known token patterns only), is readable by
|
|
90
|
+
the agent through `checks.list`, and is included in the JSON evidence artifact. Treat that artifact as
|
|
91
|
+
sensitive before attaching it to a platform: masking is a heuristic, not a guarantee.
|
|
89
92
|
- `revdeck doctor` shows which permissions and adapters are active.
|
package/package.json
CHANGED
|
@@ -35,7 +35,9 @@ target.
|
|
|
35
35
|
- "unclear" — ask the human a question.
|
|
36
36
|
Do not move to the next thread without confirmation.
|
|
37
37
|
7. After the edits, show the checks from `rules.checks` to the human and ask them to run them in the
|
|
38
|
-
UI or on the host.
|
|
38
|
+
UI or on the host. The context already carries the latest recorded run per check (`rules.runs`); cite
|
|
39
|
+
a run on the current commit, and treat a run on an older commit as stale. Do not run
|
|
40
|
+
`revdeck checks --run --yes` from the container: the bridge denies it.
|
|
39
41
|
Report the result as is, including failures.
|
|
40
42
|
8. Produce the result: a list of threads with the action and ready-made reply texts, then "Rule
|
|
41
43
|
candidates" per `Rules.md` if the reviewers demanded something that is not in the documents.
|
|
@@ -82,6 +82,9 @@ With `risk.mode: full` or no `risk`, use all steps below without shortcuts.
|
|
|
82
82
|
outside the task; discrepancies from `focus` become findings only when confirmed by the diff.
|
|
83
83
|
Evaluate legacy code by the Migration rule: a finding only on added and changed lines.
|
|
84
84
|
6. Checks for the affected projects, in order:
|
|
85
|
+
- the context already contains the latest recorded run per check (`rules.runs`): a run on the current
|
|
86
|
+
commit is evidence, a run on an older commit is stale. Say which one you relied on; a stale run does
|
|
87
|
+
not prove the current diff was checked;
|
|
85
88
|
- first see whether the diff changes `package.json`, the lock file, `.npmrc`, lint/test/build
|
|
86
89
|
configs, or CI. Such changes execute the branch's code, so in someone else's MR run checks only
|
|
87
90
|
after explicit confirmation from the human; always state the result in the final output;
|
|
@@ -90,7 +93,9 @@ With `risk.mode: full` or no `risk`, use all steps below without shortcuts.
|
|
|
90
93
|
report the result they return as is;
|
|
91
94
|
- if the branch is not checked out, state that checks were not performed and types were not
|
|
92
95
|
verified.
|
|
93
|
-
7. Discard what is not proven.
|
|
96
|
+
7. Discard what is not proven. If a verifier subagent is available (`role=verifier`, see `SKILL.md`),
|
|
97
|
+
hand it the candidates and process the verdicts before writing. Only a finding with a specific
|
|
98
|
+
`file:line` and a scenario of how it
|
|
94
99
|
manifests goes into the list. Mark doubts as a question, not a defect. Before writing, go through
|
|
95
100
|
each finding again as the author's opponent:
|
|
96
101
|
- open the file (or the text reconstructed from the diff) and make sure the line exists and
|
|
@@ -30,6 +30,8 @@ capabilities.
|
|
|
30
30
|
| Summary | `revdeck_set_summary` | `revdeck summary` (via `context`) |
|
|
31
31
|
| Line comments | `revdeck_notes` | `revdeck notes <N> ...` |
|
|
32
32
|
| Messages to the agent | `revdeck_messages` | `revdeck messages <N> [list\|ask\|reply]` |
|
|
33
|
+
| Checks and last runs | `revdeck_checks` | `revdeck checks <N> --last` |
|
|
34
|
+
| Review evidence (host-only) | — | `revdeck evidence <N> [--format md\|json] [--out <file>]` |
|
|
33
35
|
| Publish plan | `revdeck_publish_preview` | `revdeck publish <N> --dry-run` |
|
|
34
36
|
| Features | `revdeck_feature` | `revdeck feature list\|get\|context` |
|
|
35
37
|
| Feature notes | `revdeck_feature_note` | `revdeck feature note ...` |
|
|
@@ -87,7 +89,16 @@ Act as the lead:
|
|
|
87
89
|
and `shard` from the plan, and tell it to return a JSON findings array plus a short summary. A
|
|
88
90
|
worker must **not** call `revdeck_draft_findings`, `revdeck_set_summary` or `revdeck_draft_reply`.
|
|
89
91
|
3. If there is no subagent support, run the roles sequentially and keep their results separate.
|
|
90
|
-
4.
|
|
92
|
+
4. Shards are coverage, not a second opinion: a worker sees only its files (plus the names of the
|
|
93
|
+
others), must report cross-shard contracts to you as a separate item, and must not turn them into
|
|
94
|
+
findings. After collecting the JSON, run a cross-cut pass over the full file list and the changed
|
|
95
|
+
public contracts, and record the run axes in `coverage` (role, shard count, what the seam check
|
|
96
|
+
covered).
|
|
97
|
+
5. Verification: before writing the final set, run one pass with `role=verifier` and give it the
|
|
98
|
+
candidates JSON. Every item gets `confirmed` / `refuted` / `needs-evidence` with a citation; drop
|
|
99
|
+
`refuted`, turn `needs-evidence` into a question, and note disagreements briefly in the summary.
|
|
100
|
+
Without subagents, run the same check yourself following the role protocol.
|
|
101
|
+
6. Deduplicate by `file:line:title` (prefer the higher level), then write the final summary and findings
|
|
91
102
|
**once** as the lead. The UI shows that single merged result.
|
|
92
103
|
|
|
93
104
|
Several reviews can be opened in one call (`revdeck_open` accepts an array; CLI: `revdeck open 345 344
|
|
@@ -34,7 +34,9 @@
|
|
|
34
34
|
- «неясно» — задать вопрос человеку.
|
|
35
35
|
Не переходить к следующему треду без подтверждения.
|
|
36
36
|
7. После правок покажите человеку проверки из `rules.checks` и попросите запустить их в UI или на
|
|
37
|
-
хосте.
|
|
37
|
+
хосте. В контексте уже есть последний прогон по каждой проверке (`rules.runs`): ссылайтесь на
|
|
38
|
+
прогон актуального коммита, а прогон на старом считайте устаревшим. Не запускайте
|
|
39
|
+
`revdeck checks --run --yes` из контейнера: мост это запрещает. Результат
|
|
38
40
|
приведите как есть, включая падения.
|
|
39
41
|
8. Выдать итог: список тредов с действием и готовыми текстами ответов, затем «Кандидаты в правила»
|
|
40
42
|
по `Rules.md`, если ревьюеры требовали того, чего нет в документах. Черновики ответов записать
|
|
@@ -79,13 +79,17 @@ ADR и оценку решения можно сократить, если diff
|
|
|
79
79
|
вне задачи; расхождения из `focus` попадают в замечания только с подтверждением по diff.
|
|
80
80
|
Legacy-код оценивать по Migration rule: замечание только на добавленные и изменённые строки.
|
|
81
81
|
6. Проверки затронутых проектов, по порядку:
|
|
82
|
+
- в контексте уже есть последний записанный прогон по каждой проверке (`rules.runs`): прогон на
|
|
83
|
+
актуальном коммите — доказательство, на старом — устаревший. Скажите, на какой вы опирались;
|
|
84
|
+
устаревший прогон не доказывает, что текущий diff проверен;
|
|
82
85
|
- сначала посмотреть, меняет ли diff `package.json`, lock-файл, `.npmrc`, конфиги линта/тестов/
|
|
83
86
|
сборки или CI. Такие изменения исполняют код ветки, поэтому в чужом MR запускать проверки
|
|
84
87
|
только после явного подтверждения человека; результат указать в итоге всегда;
|
|
85
88
|
- не запускайте `--run --yes` из песочницы: мост запрещает `checks.run`. Покажите человеку точные
|
|
86
89
|
команды из `rules.checks` и попросите запустить их в UI или на хосте; результат приведите как есть;
|
|
87
90
|
- если ветка не извлечена — указать, что проверки не выполнялись и типы не проверены.
|
|
88
|
-
7. Отбросить недоказанное.
|
|
91
|
+
7. Отбросить недоказанное. Если доступен субагент-верификатор (`role=verifier`, см. `SKILL.md`),
|
|
92
|
+
отдайте ему кандидатов и разберите вердикты до записи. В список попадает замечание только с конкретным `file:line` и сценарием,
|
|
89
93
|
как оно проявляется. Сомнения помечать вопросом, а не дефектом. Перед записью пройти по каждому
|
|
90
94
|
замечанию повторно, как оппонент автора:
|
|
91
95
|
- открыть файл (или восстановленный из diff текст) и убедиться, что строка существует и содержит
|
|
@@ -29,6 +29,8 @@ description: "Ревью merge/pull request через локальный revdec
|
|
|
29
29
|
| Выжимка | `revdeck_set_summary` | `revdeck summary` (через `context`) |
|
|
30
30
|
| Комментарии к строкам | `revdeck_notes` | `revdeck notes <N> ...` |
|
|
31
31
|
| Вопросы агенту | `revdeck_messages` | `revdeck messages <N> [list\|ask\|reply]` |
|
|
32
|
+
| Проверки и прогоны | `revdeck_checks` | `revdeck checks <N> --last` |
|
|
33
|
+
| Паспорт ревью (формирует человек) | — | `revdeck evidence <N> [--format md\|json] [--out <файл>]` |
|
|
32
34
|
| План публикации | `revdeck_publish_preview` | `revdeck publish <N> --dry-run` |
|
|
33
35
|
| Фичи | `revdeck_feature` | `revdeck feature list\|get\|context` |
|
|
34
36
|
| Заметки фичи | `revdeck_feature_note` | `revdeck feature note ...` |
|
|
@@ -84,7 +86,15 @@ feature-сессии скоуп ограничен участниками фич
|
|
|
84
86
|
и попросите вернуть JSON с замечаниями и короткой выжимкой. Воркер **не должен** вызывать
|
|
85
87
|
`revdeck_draft_findings`, `revdeck_set_summary` и `revdeck_draft_reply`.
|
|
86
88
|
3. Если субагентов нет, пройдите роли последовательно, сохраняя результаты отдельно.
|
|
87
|
-
4.
|
|
89
|
+
4. Шард — это покрытие, а не второе мнение: воркер видит только свои файлы (и имена остальных),
|
|
90
|
+
межшардовые контракты выносит вам отдельным пунктом и не превращает их в замечания. После сбора
|
|
91
|
+
JSON сделайте cross-cut проход по полному списку файлов и изменённым публичным контрактам и
|
|
92
|
+
запишите в `coverage` оси прогона: роль, число шардов и что проверено на швах.
|
|
93
|
+
5. Верификация: перед записью финального набора запустите один прогон с `role=verifier` и отдайте ему
|
|
94
|
+
JSON кандидатов. Каждый пункт получает `confirmed` / `refuted` / `needs-evidence` с цитатой;
|
|
95
|
+
`refuted` выбросьте, `needs-evidence` переведите в вопрос, расхождения кратко отметьте в выжимке.
|
|
96
|
+
Субагента нет — проведите ту же проверку сами по протоколу роли.
|
|
97
|
+
6. Уберите дубли по `file:line:title` (оставляйте более высокий уровень) и только потом один раз
|
|
88
98
|
запишите итоговые summary и findings как лид. UI покажет один общий результат.
|
|
89
99
|
|
|
90
100
|
Несколько ревью можно открыть одним вызовом (`revdeck_open` принимает массив; CLI:
|