revdeck 0.10.0 → 0.12.0

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.
@@ -9,8 +9,8 @@
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-B4DH7Rhe.js"></script>
13
- <link rel="stylesheet" crossorigin href="/assets/index-eGRjYBke.css">
12
+ <script type="module" crossorigin src="/assets/index-D8mhPoZx.js"></script>
13
+ <link rel="stylesheet" crossorigin href="/assets/index-CRfqS0g3.css">
14
14
  </head>
15
15
  <body>
16
16
  <div id="app"></div>
@@ -69,6 +69,12 @@ is not stored in the review, the daemon or the database.
69
69
  - `ReviewRef` — platform, host, project, number. `reviewId` — `platform:host/project!number`.
70
70
  - `DiffFile`/`Hunk`/`DiffLine` — line numbers in the old and new versions; a finding's `line` always
71
71
  refers to the new file.
72
+ - `previews` — in-memory, TTL-limited snapshots for read-only MR/PR viewing; they reuse provider
73
+ `info`/`diff`/`threads` and never enter SQLite or the review list.
74
+ - `review_events` — append-only quality log (actor, type, finding/thread/rule, payload); metrics read
75
+ it instead of relying on the current snapshot.
76
+ - `ReviewInfo.merge` — mergeability at the last sync: target branch, diff base/head, platform detail
77
+ and `clean`/`conflict`/`behind`/`unknown`/`unavailable`. It is separate from the merge-base diff.
72
78
  - `Thread`/`Note` — shared discussion model.
73
79
  - `Finding` — a review finding with `id`, `fingerprint`, severity, file/line, text, and status
74
80
  (`draft`, `accepted`, `rejected`, `published`, `fixed`, `stale`).
@@ -42,6 +42,24 @@ The core guarantees:
42
42
  opening never waits for `glab`/`gh`. Background reloads merge into the current review, so tab loaders
43
43
  such as Rules, Analytics and Diff are not restarted on every SSE/poll tick. SSE heartbeats gate the
44
44
  polling fallback, and review, feature and project events reload only their own scope.
45
+ - The UI has a cross-project Open MRs/PRs page with client-side scope/search/author/target/draft
46
+ filters; it uses the existing `reviews.remoteList` per registered project and can open either the
47
+ read-only preview or a full review.
48
+ - Theme, interface language, command reference and Features-section visibility live on a separate
49
+ Settings page; theme and visibility are stored locally.
50
+ - Read-only MR/PR preview: `POST /api/previews/open` fetches info, diff and threads into a short-lived in-memory
51
+ cache; the preview route hides findings, comments, reactions and publishing, and never creates a
52
+ review record or metrics event.
53
+ - Project-level quality metrics are computed from an append-only `review_events` log: acceptance,
54
+ publish and rule-grounded rates, coverage completeness, time to first finding, review cycle, duplicates/rule candidates and
55
+ actor counts. Findings may carry a `rule` reference; review events include opened/synced, summary,
56
+ findings, decisions, publish and checks.
57
+ - Review context carries a conservative risk profile (`low`/`medium`/`high`, `fast`/`full`) derived from
58
+ the changed paths and diff size. The summary records `coverage` and `unknowns`, so an empty findings
59
+ list is not mistaken for a fully checked review.
60
+ - Reviews keep their merge context: target branch, diff base/head and platform mergeability
61
+ (`clean`/`conflict`/`behind`/`unknown`/`unavailable`). Context and UI surface conflicts or a branch
62
+ behind target before the agent draws conclusions.
45
63
  - Threads and findings are virtualized above 30 cards: measured pages of 10 render only when visible,
46
64
  focused cards stay mounted, and deep links scroll to the target page.
47
65
  - Unified diff with per-file hunks, line numbers in old/new versions, changed-file filters and
@@ -66,7 +84,8 @@ The core guarantees:
66
84
  ## Agent interfaces
67
85
 
68
86
  - **MCP server** over stdio with tools for status, list, open, context, threads, diff, rules, draft
69
- replies, draft findings, summary, line notes, feature context/notes, publish preview and publish.
87
+ replies, draft findings, summary, line notes, review messages to the agent, feature context/notes,
88
+ publish preview and publish.
70
89
  - **CLI** with the same capabilities for harnesses without MCP.
71
90
  - **Explicit scenario entry points**: `revdeck review` / `revdeck feedback` and `/revdeck review|feedback`
72
91
  fix "someone else's MR" or "your own MR" before the agent starts. `revdeck_context` takes
@@ -77,7 +77,11 @@ output:
77
77
  | `type` | `auto` | `auto` — inferred from the git remote; otherwise an explicit platform. `revdeck init` writes the remote platform, or `gitlab` when the host is not recognized (`--provider` overrides it) |
78
78
  | `host` | from the remote | host without a scheme |
79
79
  | `project` | from the remote | GitLab `group/project`, GitHub `owner/repo` |
80
- | `base` | `develop`/`main` | base for the local diff |
80
+ | `base` | `develop`/`main` | base for the local diff; an open MR always uses its target branch from the platform |
81
+
82
+ For an open MR the target is taken from the MR, not from `base`. The review context shows the target
83
+ branch, the diff base/head and the platform merge status. `base` is only a fallback for reviewing a
84
+ local branch/diff without an MR.
81
85
 
82
86
  Explicit CLI arguments (`--platform`, `--project`, `--host`) take precedence over the config, and the
83
87
  config takes precedence over the git remote. This way, tampering with `.git/config` cannot redirect the
package/docs/protocol.md CHANGED
@@ -83,6 +83,9 @@ bridge is authorized by transport capability: `agent` may read and draft, but hu
83
83
  | `comments.delete` | `review`, `noteId` | delete an own platform comment |
84
84
  | `attachments.upload` | `review`, `name`, `contentType`, `data` (base64) | `name`, absolute `url`, `markdown` |
85
85
  | `notes.delete` | `review`, `noteId` | `{ok}` |
86
+ | `messages.list` | `review` | review-level messages to the agent |
87
+ | `messages.add` | `review`, `text` | new message; the role follows the client policy (`human`/`agent`) |
88
+ | `metrics.get` | `project`, `from`, `to` | project-level quality metrics |
86
89
  | `publish.preview` | `review`, `kind`, `ids[]` | plan + warnings |
87
90
  | `publish.approve` | `review`, `kind`, `ids[]`, `hash` | `approvalId`, `expiresAt` |
88
91
  | `publish.commit` | `review`, `approvalId` | per-item results |
@@ -96,7 +99,7 @@ bridge is authorized by transport capability: `agent` may read and draft, but hu
96
99
  `reviews.*` (read/open/refresh), `diff.get`, `rules.get`, `features.list/get/context/forReview`,
97
100
  `features.addNote/updateNote/deleteNote` (author forced to `agent`; only own notes),
98
101
  `drafts.put`, `findings.put/list`, `summary.put`, `notes.*` (server-only publication fields ignored),
99
- `publish.preview`, `projects.list`, `versions.*`, `analytics.get`, `secrets.get`.
102
+ `publish.preview`, `projects.list`, `versions.*`, `analytics.get`, `metrics.get`, `messages.list/add`, `secrets.get`.
100
103
 
101
104
  Human-only methods return `CAPABILITY` on the bridge: `publish.approve`, `publish.commit`,
102
105
  `checks.run`, `decisions.put`, `comments.update/delete`, `reactions.*`, `attachments.upload`,
@@ -160,10 +163,13 @@ human socket.
160
163
  | GET | `/api/reviews?project=` | review list, optionally scoped |
161
164
  | POST | `/api/projects/register`, `/update`, `/remove` | register, edit or delete a project |
162
165
  | GET | `/api/state?review=` | snapshot for the UI |
163
- | GET | `/api/diff?review=&file=` | file hunks |
166
+ | GET | `/api/diff?review=&file=` | file hunks (including preview) |
164
167
  | GET | `/api/rules?review=` | rules |
165
168
  | GET | `/api/events` | SSE: `review`, `feature`, `project`, `heartbeat` |
166
169
  | POST | `/api/reviews/open`, `/api/reviews/refresh` | open/refresh |
170
+ | POST | `/api/previews/open` | read-only MR/PR preview without creating a review |
171
+ | GET | `/api/metrics?project=&from=&to=` | quality metrics |
172
+ | GET/POST | `/api/messages?review=` | messages to the agent |
167
173
  | POST | `/api/drafts`, `/api/findings`, `/api/summary`, `/api/decisions` | drafts |
168
174
  | POST | `/api/notes` | `action: add/update/delete` |
169
175
  | GET | `/api/reactions?review=&notes=` | reactions for comment ids |
@@ -68,6 +68,12 @@ agent (MCP/CLI) ──▶ revdeck daemon ──glab/gh──▶ GitLab/GitHub
68
68
  - `ReviewRef` — платформа, хост, проект, номер. `reviewId` — `platform:host/project!number`.
69
69
  - `DiffFile`/`Hunk`/`DiffLine` — номера строк по старой и новой версии; `line` замечания всегда по
70
70
  новому файлу.
71
+ - `previews` — in-memory снимки с TTL для просмотра MR/PR; используют `info`/`diff`/`threads`
72
+ провайдера и не попадают в SQLite или список ревью.
73
+ - `review_events` — append-only журнал качества (актор, тип, finding/thread/rule, payload); метрики
74
+ читают его, а не только текущий снимок.
75
+ - `ReviewInfo.merge` — mergeability на момент sync: target, база/head diff, детали платформы и
76
+ `clean`/`conflict`/`behind`/`unknown`/`unavailable`. Это отдельно от merge-base diff.
71
77
  - `Thread`/`Note` — общая модель обсуждений.
72
78
  - `Finding` — замечание с `id`, `fingerprint`, уровнем, файлом/строкой, текстом и статусом
73
79
  (`draft`, `accepted`, `rejected`, `published`, `fixed`, `stale`).
@@ -42,6 +42,24 @@ agent (MCP/CLI) ──unix socket──▶ revdeck daemon ──glab/gh──▶
42
42
  вливаются в текущее ревью, поэтому загрузчики вкладок (Rules, Analytics, Diff) не перезапускаются на
43
43
  каждый SSE/поллинг. Heartbeat'ы SSE отключают поллинг-страховку, а события review/feature/project
44
44
  обновляют только свою часть.
45
+ - В UI есть кросс-проектная страница открытых MR/PR с клиентскими фильтрами по scope, поиску,
46
+ автору, target и draft; она использует существующий `reviews.remoteList` по каждому
47
+ зарегистрированному проекту и открывает read-only preview или полное ревью.
48
+ - Тема, язык интерфейса, справка и видимость раздела «Фичи» находятся на отдельной странице
49
+ настроек; тема и видимость сохраняются локально.
50
+ - Просмотр MR/PR без ревью: `POST /api/previews/open` получает info, diff и треды в короткоживущий кэш;
51
+ preview-маршрут скрывает замечания, комментарии, реакции и публикацию и не создаёт запись ревью
52
+ или событие метрик.
53
+ - Метрики качества по проекту считаются из append-only журнала `review_events`: acceptance,
54
+ publish и rule-grounded, полнота coverage, время до первого замечания, цикл ревью, дубли/кандидаты в правила и акторы.
55
+ Замечание может нести ссылку `rule`; события включают opened/synced, summary, findings, decisions,
56
+ publish и checks.
57
+ - Контекст ревью несёт консервативный профиль риска (`low`/`medium`/`high`, режим `fast`/`full`) по
58
+ путям и размеру diff. Выжимка хранит `coverage` и `unknowns`, поэтому пустой список замечаний не
59
+ принимается за полностью проверенное ревью.
60
+ - Ревью сохраняет контекст мержа: target, базу/head diff и mergeability платформы
61
+ (`clean`/`conflict`/`behind`/`unknown`/`unavailable`). Контекст и UI показывают конфликт или
62
+ отставание от target до того, как агент сделает выводы.
45
63
  - Треды и замечания виртуализируются после 30 карточек: измеренные страницы по 10 рендерятся только
46
64
  при попадании во viewport, карточка с фокусом остаётся в DOM, deep-link прокручивает к нужной странице.
47
65
  - Unified diff с hunks по файлам, номерами строк в старой/новой версии, фильтром файлов и отметкой
@@ -66,7 +84,7 @@ agent (MCP/CLI) ──unix socket──▶ revdeck daemon ──glab/gh──▶
66
84
  ## Интерфейсы агента
67
85
 
68
86
  - **MCP-сервер** поверх stdio: status, list, open, context, threads, diff, rules, draft replies,
69
- draft findings, summary, line notes, feature context/notes, publish preview и publish.
87
+ draft findings, summary, line notes, сообщения агенту, feature context/notes, publish preview и publish.
70
88
  - **CLI** с теми же возможностями для харнессов без MCP.
71
89
  - **Явные точки входа сценариев**: `revdeck review` / `revdeck feedback` и `/revdeck review|feedback`
72
90
  фиксируют «чужой MR» или «свой MR» до старта агента. `revdeck_context` принимает
@@ -77,7 +77,10 @@ output:
77
77
  | `type` | `auto` | `auto` — по git remote; иначе явная платформа. `revdeck init` пишет платформу remote'а, а если хост не распознан — `gitlab` (`--provider` переопределяет) |
78
78
  | `host` | из remote | хост без схемы |
79
79
  | `project` | из remote | GitLab `group/project`, GitHub `owner/repo` |
80
- | `base` | `develop`/`main` | база для локального diff |
80
+ | `base` | `develop`/`main` | база для локального diff; для открытого MR цель всегда берётся с платформы |
81
+
82
+ Для открытого MR target берётся из MR, а не из `base`. Контекст ревью показывает target, базу/head
83
+ diff и статус мержа платформы. `base` — только запасная база для ревью локальной ветки/diff без MR.
81
84
 
82
85
  Явные аргументы CLI (`--platform`, `--project`, `--host`) важнее конфига, конфиг важнее git remote.
83
86
  Так подмена `.git/config` не перенаправит ревью на чужой проект.
@@ -83,6 +83,9 @@
83
83
  | `comments.delete` | `review`, `noteId` | удалить свой комментарий платформы |
84
84
  | `attachments.upload` | `review`, `name`, `contentType`, `data` (base64) | `name`, абсолютный `url`, `markdown` |
85
85
  | `notes.delete` | `review`, `noteId` | `{ok}` |
86
+ | `messages.list` | `review` | сообщения агенту по ревью |
87
+ | `messages.add` | `review`, `text` | новое сообщение; роль по политике клиента (`human`/`agent`) |
88
+ | `metrics.get` | `project`, `from`, `to` | метрики качества по проекту |
86
89
  | `publish.preview` | `review`, `kind`, `ids[]` | план + предупреждения |
87
90
  | `publish.approve` | `review`, `kind`, `ids[]`, `hash` | `approvalId`, `expiresAt` |
88
91
  | `publish.commit` | `review`, `approvalId` | результаты по пунктам |
@@ -96,7 +99,7 @@
96
99
  `reviews.*` (чтение/open/refresh), `diff.get`, `rules.get`, `features.list/get/context/forReview`,
97
100
  `features.addNote/updateNote/deleteNote` (автор принудительно `agent`; только свои заметки),
98
101
  `drafts.put`, `findings.put/list`, `summary.put`, `notes.*` (серверные поля публикации
99
- игнорируются), `publish.preview`, `projects.list`, `versions.*`, `analytics.get`, `secrets.get`.
102
+ игнорируются), `publish.preview`, `projects.list`, `versions.*`, `analytics.get`, `metrics.get`, `messages.list/add`, `secrets.get`.
100
103
 
101
104
  Human-only методы возвращают `CAPABILITY` на мосту: `publish.approve`, `publish.commit`,
102
105
  `checks.run`, `decisions.put`, `comments.update/delete`, `reactions.*`, `attachments.upload`,
@@ -159,10 +162,13 @@ Human-only методы возвращают `CAPABILITY` на мосту: `publ
159
162
  | GET | `/api/reviews?project=` | список ревью, опционально в скоупе |
160
163
  | POST | `/api/projects/register`, `/update`, `/remove` | зарегистрировать, изменить или удалить проект |
161
164
  | GET | `/api/state?review=` | снимок для UI |
162
- | GET | `/api/diff?review=&file=` | hunks файла |
165
+ | GET | `/api/diff?review=&file=` | hunks файла (включая preview) |
163
166
  | GET | `/api/rules?review=` | правила |
164
167
  | GET | `/api/events` | SSE: `review`, `feature`, `project`, `heartbeat` |
165
168
  | POST | `/api/reviews/open`, `/api/reviews/refresh` | открыть/обновить |
169
+ | POST | `/api/previews/open` | read-only просмотр MR/PR без создания ревью |
170
+ | GET | `/api/metrics?project=&from=&to=` | метрики качества |
171
+ | GET/POST | `/api/messages?review=` | сообщения агенту |
166
172
  | POST | `/api/drafts`, `/api/findings`, `/api/summary`, `/api/decisions` | черновики |
167
173
  | POST | `/api/notes` | `action: add/update/delete` |
168
174
  | GET | `/api/reactions?review=&notes=` | реакции для id комментариев |
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "revdeck",
3
- "version": "0.10.0",
3
+ "version": "0.12.0",
4
4
  "description": "Agent-first code review for GitLab and GitHub: local daemon, CLI, MCP server and a triage UI.",
5
5
  "license": "MIT",
6
6
  "type": "module",
@@ -5,6 +5,11 @@ Command: `/revdeck feedback <N|URL>` (CLI: `revdeck feedback <N|URL>`).
5
5
  The goal is to close every open finding together with the human: fix the code, reply, or disagree
6
6
  with justification.
7
7
 
8
+ Before working through threads, check the "Branch and comparison base" section: target, diff
9
+ snapshot and merge status. If a target is present and status is `conflict` or `behind`, update the
10
+ branch first; with `unknown` or "not checked", verify the target. A local diff without an MR has no
11
+ target.
12
+
8
13
  ## Steps
9
14
 
10
15
  1. Get the context (`revdeck_context` / `revdeck context`) and make sure the working branch matches
@@ -5,6 +5,21 @@ Command: `/revdeck review <N|URL>` (CLI: `revdeck review <N|URL>`).
5
5
  The goal is to find real defects and violations of the repository rules and produce a verifiable list
6
6
  of findings. The human publishes them.
7
7
 
8
+ Before reviewing code, check the "Branch and comparison base" section: target is where the MR
9
+ merges; the diff is a merge-base→head snapshot. If a target is present and status is `conflict` or
10
+ `behind`, update the branch first; with `unknown` or "not checked", verify the target and conflicts.
11
+ Do not claim there are no findings in those cases. A local diff without an MR has no target.
12
+
13
+ ## Fast pass
14
+
15
+ If the context has `risk.mode: fast`, the diff is small and no risky path was detected. A short pass is
16
+ allowed: description, diff, rules, threads, tests and coverage. The full change map, analogue search,
17
+ ADRs and solution assessment may be shortened when the diff shows no risk. Evidence and `file:line`
18
+ are still mandatory. If a sensitive area appears (auth, migrations, CI, public contract, a larger
19
+ diff), switch to the full pass.
20
+
21
+ With `risk.mode: full` or no `risk`, use all steps below without shortcuts.
22
+
8
23
  ## Steps
9
24
 
10
25
  1. Read the MR description from the context (`revdeck_context` / `revdeck context`) before the diff
@@ -25,9 +40,14 @@ of findings. The human publishes them.
25
40
  {"title": "<ticket / title>", "scope": "<base>...<branch> · <N> files · <projects>",
26
41
  "summary": "1-3 sentences: goal and approach",
27
42
  "changes": ["what was changed, one item per change"],
28
- "focus": ["what to look at: risky places, contested decisions"]}
43
+ "focus": ["what to look at: risky places, contested decisions"],
44
+ "coverage": ["what was actually checked: files, commands, manual scenarios"],
45
+ "unknowns": ["what could not be checked and why"],
46
+ "duplicates": ["what already existed in threads and was not added"],
47
+ "ruleCandidates": ["proposed rules"]}
29
48
  ```
30
- If the service is unavailable, output the summary to the chat only.
49
+ `coverage` and `unknowns` are mandatory: "no findings" without them means "not checked", not
50
+ "checked". If the service is unavailable, output the summary to the chat only.
31
51
  3. Read the rules from the context (`rules.markdown`). These are the documents and sections already
32
52
  selected for the changed paths. Build the change map (section 1 of `Criteria.md`) and check that
33
53
  rules were found for every path. If a path is not matched or a document is not found, say so and
@@ -132,10 +152,12 @@ Findings in descending order of importance. For each one:
132
152
  Record via `revdeck_draft_findings` (CLI: `revdeck findings <N> set --file findings.json`):
133
153
  ```json
134
154
  {"findings": [{"id": "f1", "level": "blocker", "file": "<path as in diff>", "line": 42,
135
- "title": "brief", "body": "what is wrong and how it manifests", "comment": "ready-to-use text"}]}
155
+ "title": "brief", "body": "what is wrong and how it manifests", "comment": "ready-to-use text",
156
+ "rule": "docs/Architecture.md#layers"}]}
136
157
  ```
137
158
  `id` is unique and stable; `level` is one of `blocker`, `major`, `minor`, `question`; `line` is the
138
- line number in the new file or `null`. A reference to a rule or precedent goes into `body` as the
159
+ line number in the new file or `null`. `rule` is an optional `document#section` reference when the
160
+ finding is grounded in a rule; it feeds rule-grounded metrics. A reference to a rule or precedent goes into `body` as the
139
161
  last sentence, and into `comment` in wording the author can understand without access to the skill.
140
162
  Do not prefix `comment` with the level: revdeck adds the severity marker to the published message.
141
163
  The text passes the publication check: no platform command lines, HTML comments, invisible
@@ -148,10 +170,10 @@ is needed. Prose of 5–10 sentences, without repeating the findings.
148
170
  Then "Rule candidates" per `Rules.md`, if there are any: these are proposals for the human, not
149
171
  findings for the MR author.
150
172
 
151
- At the end: the change map and the documents read, what was checked by commands and with what
152
- result, what was not checked, which findings were not added because of threads, and the overall
153
- opinion. If there are no findings, say so without inventing nitpicks; the solution assessment is
154
- still given.
173
+ At the end: the change map and the documents read, `coverage` and `unknowns` from the summary, what
174
+ was checked by commands and with what result, which findings were not added because of threads, and
175
+ the overall opinion. If there are no findings, say so without inventing nitpicks; the solution
176
+ assessment is still given. "No findings" without `coverage`/`unknowns` is not enough.
155
177
 
156
178
  ## Limitations
157
179
 
@@ -29,6 +29,7 @@ capabilities.
29
29
  | Findings draft | `revdeck_draft_findings` | `revdeck findings <N> set --file f.json` |
30
30
  | Summary | `revdeck_set_summary` | `revdeck summary` (via `context`) |
31
31
  | Line comments | `revdeck_notes` | `revdeck notes <N> ...` |
32
+ | Messages to the agent | `revdeck_messages` | `revdeck messages <N> [list\|ask\|reply]` |
32
33
  | Publish plan | `revdeck_publish_preview` | `revdeck publish <N> --dry-run` |
33
34
  | Features | `revdeck_feature` | `revdeck feature list\|get\|context` |
34
35
  | Feature notes | `revdeck_feature_note` | `revdeck feature note ...` |
@@ -59,8 +60,18 @@ the context.
59
60
  sections selected for the changed paths), threads, existing findings, and comments from the
60
61
  human. Call the `revdeck_rules` MCP tool separately only if the rules were not included in the
61
62
  context.
62
- 3. Run the procedure of the chosen scenario.
63
- 4. Record findings and reply drafts with the tools. **Do not publish.**
63
+ 3. Check the "Branch and comparison base" section. Target is where the MR merges; the diff is a
64
+ base→head snapshot. If the review has a target and merge status is `conflict`, `behind`, `unknown`
65
+ or "not checked", report it before reviewing code. With `conflict` or `behind`, update the branch
66
+ first; do not claim there are no findings until the target and conflicts are checked. For a local
67
+ diff without an MR the target is not applicable and is not a blocker.
68
+ 4. Read `risk.mode` from the context: `fast` means the short pass ("Fast pass" in `Review.md`),
69
+ `full` means the complete procedure. If a sensitive area appears, switch to full.
70
+ 5. Read the "Messages to the agent" section: these are human questions about the review. Answer the
71
+ latest question via `revdeck_messages` (MCP) or `revdeck messages <N> reply --as-agent --text ...`; the reply
72
+ is not published.
73
+ 6. Run the procedure of the chosen scenario.
74
+ 7. Record findings and reply drafts with the tools. **Do not publish.**
64
75
 
65
76
  For a feature, first read the brief and contract, then every member review with its own rules; keep
66
77
  findings on their owning review. The full procedure is in `Feature.md`.
@@ -5,6 +5,10 @@
5
5
  Цель — вместе с человеком закрыть каждое открытое замечание: исправить код, ответить или
6
6
  обоснованно не согласиться.
7
7
 
8
+ Перед разбором проверьте раздел «Ветка и база сравнения»: target, снимок diff и статус мержа.
9
+ Если target указан и статус `conflict` или `behind`, сначала обновите ветку; при `unknown`/
10
+ «не проверялся» проверьте target. Для локального diff без MR target не применим.
11
+
8
12
  ## Шаги
9
13
 
10
14
  1. Получить контекст (`revdeck_context` / `revdeck context`) и убедиться, что рабочая ветка
@@ -5,6 +5,21 @@
5
5
  Цель — найти реальные дефекты и нарушения правил репозитория и выдать проверяемый список замечаний.
6
6
  Публикует их человек.
7
7
 
8
+ Перед оценкой кода проверьте раздел «Ветка и база сравнения»: target — куда мержится MR, diff —
9
+ снимок merge-base→head. Если target указан и статус `conflict` или `behind`, сначала обновите ветку;
10
+ при `unknown` или «не проверялся» проверьте target и конфликты. В этих случаях нельзя выдавать
11
+ «замечаний нет». Для локального diff без MR target не применим.
12
+
13
+ ## Быстрый проход
14
+
15
+ Если в контексте `risk.mode: fast` — это маленький diff без рискованных путей. Разрешён короткий
16
+ проход: описание, diff, правила, треды, тесты и coverage. Полную карту изменений, поиск аналогов,
17
+ ADR и оценку решения можно сократить, если diff не подсказывает риск. Evidence и `file:line` всё
18
+ равно обязательны. Если по ходу нашлась чувствительная зона (auth, миграции, CI, публичный контракт,
19
+ крупный diff) — переходите к полному проходу.
20
+
21
+ При `risk.mode: full` или при отсутствии `risk` используйте все шаги ниже без сокращений.
22
+
8
23
  ## Шаги
9
24
 
10
25
  1. Прочитать описание MR из контекста (`revdeck_context` / `revdeck context`) до diff и
@@ -23,8 +38,13 @@
23
38
  {"title": "<тикет / название>", "scope": "<база>...<ветка> · <N> файлов · <проекты>",
24
39
  "summary": "1-3 предложения: цель и подход",
25
40
  "changes": ["что изменено, по одному пункту"],
26
- "focus": ["на что смотреть: рискованные места, спорные решения"]}
41
+ "focus": ["на что смотреть: рискованные места, спорные решения"],
42
+ "coverage": ["что реально проверено: файлы, команды, ручные сценарии"],
43
+ "unknowns": ["что проверить не удалось и почему"],
44
+ "duplicates": ["что уже было в тредах и не добавлено"],
45
+ "ruleCandidates": ["предложения в правила"]}
27
46
  ```
47
+ `coverage` и `unknowns` обязательны: «замечаний нет» без них означает «не проверял», а не «проверено».
28
48
  Если сервис недоступен, выдать выжимку только в чат.
29
49
  3. Прочитать правила из контекста (`rules.markdown`). Это уже выбранные документы и секции для
30
50
  изменённых путей. Составить карту изменений (раздел 1 `Criteria.md`) и проверить, что для каждого
@@ -123,10 +143,12 @@
123
143
  Записать через `revdeck_draft_findings` (CLI: `revdeck findings <N> set --file findings.json`):
124
144
  ```json
125
145
  {"findings": [{"id": "f1", "level": "blocker", "file": "<путь как в diff>", "line": 42,
126
- "title": "кратко", "body": "что не так и как проявляется", "comment": "готовый текст"}]}
146
+ "title": "кратко", "body": "что не так и как проявляется", "comment": "готовый текст",
147
+ "rule": "docs/Architecture.md#слои"}]}
127
148
  ```
128
149
  `id` уникален и стабилен; `level` — одно из `blocker`, `major`, `minor`, `question`; `line` — номер
129
- строки нового файла или `null`. Ссылка на правило или прецедент входит в `body` последним
150
+ строки нового файла или `null`. `rule` — необязательная ссылка `документ#раздел`, если замечание
151
+ основано на правиле; она нужна для метрик rule-grounded. Ссылка на правило или прецедент входит в `body` последним
130
152
  предложением, а в `comment` — в формулировке, понятной автору без доступа к скиллу. Текст проходит
131
153
  проверку публикации: без строк-команд платформы, HTML-комментариев, невидимых символов, `@all` и
132
154
  внешних картинок. Не добавляйте уровень в начало `comment`: revdeck сам ставит маркер важности в
@@ -139,9 +161,10 @@
139
161
  Затем — «Кандидаты в правила» по `Rules.md`, если они есть: это предложения человеку, а не
140
162
  замечания автору MR.
141
163
 
142
- В конце: карта изменений и прочитанные документы, что проверено командами и с каким результатом,
143
- что не проверялось, какие замечания не добавлены из-за тредов, общее мнение. Если замечаний нет,
144
- так и сказать без выдуманных придирок; оценка решения даётся всё равно.
164
+ В конце: карта изменений и прочитанные документы, `coverage` и `unknowns` из выжимки, что
165
+ проверено командами и с каким результатом, какие замечания не добавлены из-за тредов, общее мнение.
166
+ Если замечаний нет, так и сказать без выдуманных придирок; оценка решения даётся всё равно. Фразы
167
+ «замечаний нет» без `coverage`/`unknowns` недостаточно.
145
168
 
146
169
  ## Ограничения
147
170
 
@@ -28,6 +28,7 @@ description: "Ревью merge/pull request через локальный revdec
28
28
  | Черновик замечаний | `revdeck_draft_findings` | `revdeck findings <N> set --file f.json` |
29
29
  | Выжимка | `revdeck_set_summary` | `revdeck summary` (через `context`) |
30
30
  | Комментарии к строкам | `revdeck_notes` | `revdeck notes <N> ...` |
31
+ | Вопросы агенту | `revdeck_messages` | `revdeck messages <N> [list\|ask\|reply]` |
31
32
  | План публикации | `revdeck_publish_preview` | `revdeck publish <N> --dry-run` |
32
33
  | Фичи | `revdeck_feature` | `revdeck feature list\|get\|context` |
33
34
  | Заметки фичи | `revdeck_feature_note` | `revdeck feature note ...` |
@@ -57,8 +58,17 @@ feature-сессии скоуп ограничен участниками фич
57
58
  Контекст уже содержит выжимку, файлы, **эффективные правила проекта** (документы и секции,
58
59
  выбранные для изменённых путей), треды, существующие замечания и комментарии человека.
59
60
  Отдельно вызывать MCP-инструмент `revdeck_rules` нужно только если правила не вошли в контекст.
60
- 3. Выполнить процедуру выбранного сценария.
61
- 4. Черновики замечаний и ответов записать инструментами. **Не публиковать.**
61
+ 3. Проверить раздел «Ветка и база сравнения». Target — куда мержится MR, diff — снимок base→head.
62
+ Если у ревью есть target и статус мержа `conflict`, `behind`, `unknown` или «не проверялся»,
63
+ сообщите об этом до оценки кода. При `conflict` или `behind` сначала нужно обновить ветку; не
64
+ выдавайте «замечаний нет», пока target и конфликты не проверены. Для локального diff без MR
65
+ target не применим — это не блокер.
66
+ 4. Посмотреть `risk.mode` в контексте: `fast` — короткий проход (раздел «Быстрый проход» в
67
+ `Review.md`), `full` — полная процедура. Если появилась чувствительная зона, переходите к full.
68
+ 5. Прочитать раздел «Сообщения агенту»: это вопросы человека к ревью. Ответить на последний вопрос
69
+ через `revdeck_messages` (MCP) или `revdeck messages <N> reply --as-agent --text ...`; ответ не публикуется.
70
+ 6. Выполнить процедуру выбранного сценария.
71
+ 7. Черновики замечаний и ответов записать инструментами. **Не публиковать.**
62
72
 
63
73
  Для фичи сначала прочитайте бриф и контракт, затем каждое ревью с его собственными правилами;
64
74
  замечания держите на ревью-владельце. Полная процедура — в `Feature.md`.