revdeck 0.5.0 → 0.6.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.
Files changed (40) hide show
  1. package/CHANGELOG.md +58 -1
  2. package/README.md +57 -8
  3. package/README.ru.md +58 -11
  4. package/dist/cli.js +1202 -481
  5. package/dist/cli.js.map +4 -4
  6. package/dist/daemon.js +1389 -203
  7. package/dist/daemon.js.map +4 -4
  8. package/dist/mcp.js +947 -112
  9. package/dist/mcp.js.map +4 -4
  10. package/dist/ui/assets/index-BH0dNFhd.css +1 -0
  11. package/dist/ui/assets/index-Wz1DYbiv.js +14 -0
  12. package/dist/ui/index.html +2 -2
  13. package/docs/README.md +1 -1
  14. package/docs/architecture.md +51 -6
  15. package/docs/capabilities.md +227 -0
  16. package/docs/configuration.md +63 -0
  17. package/docs/integrations.md +35 -0
  18. package/docs/protocol.md +52 -2
  19. package/docs/ru/README.md +1 -1
  20. package/docs/ru/architecture.md +51 -5
  21. package/docs/ru/capabilities.md +227 -0
  22. package/docs/ru/configuration.md +54 -0
  23. package/docs/ru/integrations.md +36 -0
  24. package/docs/ru/protocol.md +51 -2
  25. package/docs/ru/threat-model.md +28 -0
  26. package/docs/screenshot.png +0 -0
  27. package/docs/screenshot.ru.png +0 -0
  28. package/docs/threat-model.md +29 -0
  29. package/examples/analytics-platform.yml +40 -0
  30. package/examples/monorepo.yml +1 -1
  31. package/package.json +1 -1
  32. package/skills/revdeck/en/Feature.md +61 -0
  33. package/skills/revdeck/en/SKILL.md +17 -1
  34. package/skills/revdeck/ru/Feature.md +61 -0
  35. package/skills/revdeck/ru/SKILL.md +18 -1
  36. package/dist/ui/assets/index-CcmcJhhu.css +0 -1
  37. package/dist/ui/assets/index-CuvK5owY.js +0 -10
  38. package/docs/adr/0001-daemon-first.md +0 -65
  39. package/docs/ru/adr/0001-daemon-first.md +0 -63
  40. package/examples/web-chat-core.yml +0 -45
package/CHANGELOG.md CHANGED
@@ -6,6 +6,63 @@ All notable changes to this project are documented here. The format is based on
6
6
 
7
7
  ## [Unreleased]
8
8
 
9
+ ## [0.6.0] - 2026-11-16
10
+
11
+ ### Added
12
+
13
+ - Cross-project features: human-created bundles of reviews with a Markdown brief/contract, roles and
14
+ order (`features`, `feature_reviews`), combined read-only context, and feature UI (`#/features`,
15
+ review badges, add-to-feature flow).
16
+ - Feature-scoped MCP sessions via `REVDECK_FEATURE`: only feature members are visible; drafts may be
17
+ written to any member, while publishing remains per review and requires human approval.
18
+ - Feature-level contract (Markdown or OpenAPI): OpenAPI is parsed into operations, parameters,
19
+ request bodies, responses and schemas; context marks which changed reviews mention each operation.
20
+ - Application profiles via `context.sources` / `context.maxBytes` in `.revdeck.yml`, included per
21
+ project in the feature context.
22
+ - Feature notes/findings: stored on the feature, visible in UI/context, writable by humans and by an
23
+ agent in a feature session (`revdeck_feature_note`); never published.
24
+ - Feature UI reorder (up/down) and delete, plus contract and notes editors.
25
+ - `revdeck_feature` MCP tool and `review-feature` prompt; `revdeck feature list|create|get|add|remove|context|update|archive|delete`.
26
+ - Capabilities and design documentation for features in English and Russian.
27
+ - Removing a tracked review that belongs to a feature is blocked until it is removed from the feature.
28
+ - Project separation: a `projects` registry with working-copy roots, a normalized
29
+ `platform:host/project` key and a `reviews.project_key` column; existing databases are backfilled.
30
+ - Project switcher and projects home in the UI; the review queue is scoped to the selected project
31
+ and the choice is kept in the URL and local storage.
32
+ - Project-scoped MCP server: it resolves the project from the repository root, lists only that
33
+ project and rejects review ids/URLs from other projects. `REVDECK_ROOT` supports multi-root
34
+ workspaces and devcontainers.
35
+ - `revdeck projects` and `revdeck projects add <path>`; `revdeck list --all` for a human-wide list.
36
+ - Project-isolation documentation (capabilities, architecture, protocol, configuration, integrations,
37
+ threat model) in English and Russian.
38
+
39
+ ### Fixed
40
+
41
+ - Config, rules and profile reads now resolve real paths and reject symlinked files or directories
42
+ that escape the repository; all reads use `O_NOFOLLOW` for the final component.
43
+ - Feature notes written by an agent can only be updated/deleted by MCP when they were authored by an
44
+ agent; human notes are read-only to MCP. Notes and profiles are quoted as data in feature context.
45
+ - Feature-context `maxBytes` is now a real cap (including brief, contract, profiles, notes and review
46
+ sections); `context.maxBytes` is an aggregate per-project profile limit.
47
+ - A review URL from another configured project is rejected when opened from the wrong checkout.
48
+ - Feature member roles can be cleared; reorder rejects duplicate ids; up/down arrows move within the
49
+ visible project group.
50
+ - UI navigation uses `pushState` for user transitions, ignores stale feature/review requests, resets
51
+ feature-local forms when switching features, refreshes an open feature page on SSE, and exposes the
52
+ sidebar on mobile project/feature pages.
53
+ - Feature badges and the active sidebar row use theme variables in dark mode.
54
+
55
+ ### Changed
56
+
57
+ - Consolidated the daemon-first, project-scope and feature decision records into
58
+ `docs/capabilities.md` / `docs/ru/capabilities.md`; the `docs/adr` directories were removed.
59
+ - Replaced the retired internal monorepo example with a neutral analytics-platform example and added
60
+ tests for every example config.
61
+ - `revdeck list` and `revdeck status` default to the current repository's project; `--all` restores the
62
+ previous global list.
63
+ - MCP `revdeck_open`, `revdeck_context` and the review tools no longer accept a working-copy `root` or
64
+ project overrides; cross-project access is rejected unless it is opened through an explicit feature.
65
+
9
66
  ## [0.5.0] - 2026-11-13
10
67
 
11
68
  ### Added
@@ -247,5 +304,5 @@ First public release.
247
304
  - English documentation as the canonical set under `docs/`, with Russian translations under `docs/ru/`.
248
305
  - Security: token scrubbing, redaction, publish sanitizer, loopback-only UI, one-time launch token,
249
306
  cookie/Origin/Host checks, CSP.
250
- - Docs: architecture, configuration, protocol, threat model, integrations, ADR.
307
+ - Docs: architecture, configuration, protocol, threat model and integrations.
251
308
  - Tests: diff parser, core helpers, providers with recorded responses, service with a fake provider.
package/README.md CHANGED
@@ -25,7 +25,11 @@ and a web UI. Platform tokens stay on the host.
25
25
  - **Tokens never reach the agent.** The daemon calls `glab`/`gh` on the host and scrubs platform tokens
26
26
  from child environments. A sandboxed agent only gets an RPC.
27
27
  - **GitLab and GitHub.** One model: MR/PR, threads, diff, resolve, reactions, line comments, attachments.
28
- - **Many reviews.** The daemon keeps them in SQLite; the UI is a triage queue with keyboard shortcuts.
28
+ - **Many projects, separated contexts.** A project is a repository. The UI switches between projects and
29
+ shows only the current one's reviews; an MCP server is scoped to its repository.
30
+ - **Explicit cross-project features.** A human bundles MRs from several projects into a feature with a
31
+ brief and contract. A project session reads the combined context; a feature session can draft across its
32
+ members. Publishing stays per review and per human approval.
29
33
  - **Any harness.** MCP tools for MCP clients, the same capabilities over CLI, and a skill that carries
30
34
  the review procedure.
31
35
 
@@ -104,7 +108,9 @@ Russian READMEs live in this repository; translation fixes are welcome.
104
108
  | `revdeck eject [--yes]` | remove revdeck-owned config, adapters and MCP entry |
105
109
  | `revdeck devcontainer [--write]` | mount the host daemon socket/state into a devcontainer |
106
110
  | `revdeck doctor` | environment, `glab`/`gh` auth, daemon, adapters |
107
- | `revdeck list [--remote]` | tracked reviews or open ones from the platform |
111
+ | `revdeck projects [add <path>]` | projects, their roots and review counts; register a repository |
112
+ | `revdeck list [--all] [--remote]` | reviews of the current project, or all projects with `--all` |
113
+ | `revdeck feature …` | list/create/add/remove/context/update/archive/delete features |
108
114
  | `revdeck open <N\|URL>` | load a review |
109
115
  | `revdeck context <N>` | agent context: rules, files, threads, findings |
110
116
  | `revdeck diff <N> [--file]` | files and hunks |
@@ -122,10 +128,52 @@ Russian READMEs live in this repository; translation fixes are welcome.
122
128
  | `revdeck daemon <start\|stop\|restart\|status\|logs\|install\|uninstall>` | daemon lifecycle |
123
129
  | `revdeck mcp` | MCP server over stdio |
124
130
 
125
- Common flags: `--json`, `--root`, `--review`, `--platform`, `--project`, `--host`, `--lang ru|en`.
131
+ Common flags: `--json`, `--root`, `--review`, `--platform`, `--project`, `--host`, `--all`, `--lang ru|en`.
132
+
133
+ ## Projects
134
+
135
+ A project is a repository. revdeck keeps a project registry (`projects`, `project_roots`) and a
136
+ `projectKey` on every review, so the UI can switch between projects and show only the current one's
137
+ reviews. The daemon still runs as one process with one SQLite database; project separation is about
138
+ context, not tenants.
139
+
140
+ Each repository's MCP server resolves its project from the working copy and lists only that project.
141
+ An id or URL from another project is rejected with a hint to open a separate session. Devcontainers and
142
+ separate agent sessions work naturally: each container mounts the same host daemon bridge and stays
143
+ scoped to its repository.
144
+
145
+ An agent never sees another project implicitly. Cross-project work goes through a human-created
146
+ feature (below), which is the only explicit door. See [capabilities](docs/capabilities.md#project-scopes) and
147
+ [architecture](docs/architecture.md#projects-and-isolation).
148
+
149
+ ## Features
150
+
151
+ A feature is a named bundle of MRs from one or more projects, with a Markdown brief, a separate
152
+ contract (Markdown or OpenAPI), and a free-form role per review. OpenAPI is parsed into operations and
153
+ schemas; the context marks which changed reviews mention each path. Application profiles come from
154
+ `context.sources` in each repository. Feature notes/findings are a non-published cross-project
155
+ scratchpad. Projects are not linked permanently; a project appears in the feature only while one of
156
+ its MRs is a member.
157
+
158
+ ```bash
159
+ # open the MRs first (in their projects), then:
160
+ revdeck feature create "Checkout v2" --brief brief.md --contract openapi.yaml \
161
+ gitlab:gitlab.com/acme/api!1 \
162
+ gitlab:gitlab.com/acme/web!2
163
+ revdeck feature context ft-a1b2c3
164
+ revdeck feature note ft-a1b2c3 --title "Contract gap" --body "Web sends no Idempotency-Key" --kind finding --level major
165
+ ```
166
+
167
+ In the UI, add a review from its header, or open **All features**, choose a feature and add tracked
168
+ reviews; reorder and delete are on the feature page. A project session sees features that include its
169
+ project and can read the combined context, but writes only in its own project. To let one agent write across a feature's
170
+ members, start the MCP server from a member repository with `REVDECK_FEATURE=<feature id>`; publishing
171
+ still needs approval per review. Feature notes written by the agent stay local and are never published.
172
+ See [capabilities](docs/capabilities.md#features).
126
173
 
127
174
  UI shortcuts: `1`–`5` switch tabs, `o` opens a review, `r` refreshes, `s` hides/shows the
128
- sidebar, `p` opens publishing, `?` opens the command palette. The sidebar choice is stored in
175
+ sidebar, `p` opens the project switcher (or publishing when a plan is ready), `?` opens the command
176
+ palette. The sidebar and the active project are stored in
129
177
  `localStorage`.
130
178
 
131
179
  The UI shows the MR/PR description, supports deep links to threads, findings and diff lines (with
@@ -243,11 +291,12 @@ otherwise it can start a second daemon inside the container.
243
291
 
244
292
  Tools: `revdeck_status`, `revdeck_list`, `revdeck_open`, `revdeck_context`, `revdeck_threads`,
245
293
  `revdeck_diff`, `revdeck_rules`, `revdeck_draft_reply`, `revdeck_draft_findings`,
246
- `revdeck_set_summary`, `revdeck_notes`, `revdeck_publish_preview`, `revdeck_publish`.
294
+ `revdeck_set_summary`, `revdeck_notes`, `revdeck_feature`, `revdeck_feature_note`,
295
+ `revdeck_publish_preview`, `revdeck_publish`.
247
296
 
248
297
  Publishing requires an `approval_id` that only a human can create (UI or CLI `--yes`). The MCP tool
249
- does not create one. Prompts `review-mr` and `close-feedback` are available in clients that support
250
- MCP prompts.
298
+ does not create one. Prompts `review-mr`, `close-feedback` and `review-feature` are available in
299
+ clients that support MCP prompts.
251
300
 
252
301
  Harness matrix and slash commands: [docs/integrations.md](docs/integrations.md).
253
302
 
@@ -316,7 +365,7 @@ read the CLI configuration — isolate the agent.
316
365
  | `skills/revdeck` | review procedures (SKILL, Review, Feedback, Criteria, Rules, Sources, `agents/openai.yaml`) |
317
366
 
318
367
  More: [docs/architecture.md](docs/architecture.md), [docs/protocol.md](docs/protocol.md),
319
- [ADR-0001](docs/adr/0001-daemon-first.md).
368
+ [capabilities](docs/capabilities.md#daemon-first).
320
369
 
321
370
  ## Development
322
371
 
package/README.ru.md CHANGED
@@ -26,7 +26,11 @@
26
26
  дочерних процессов. Агент в песочнице получает только RPC и не видит ни токена, ни конфигурации
27
27
  платформы.
28
28
  - **GitLab и GitHub.** Одна модель: MR/PR, треды, diff, резолв, реакции, комментарии к строкам, вложения.
29
- - **Несколько ревью.** Демон хранит открытые ревью в SQLite; UI — очередь с горячими клавишами.
29
+ - **Много проектов, раздельные контексты.** Проект — это репозиторий. UI переключается между
30
+ проектами и показывает только ревью текущего; MCP-сервер привязан к своему репозиторию.
31
+ - **Явные кросс-проектные фичи.** Человек собирает MR из нескольких проектов в фичу с брифом и
32
+ контрактом. Project-сессия читает общий контекст; feature-сессия может писать черновики по
33
+ участникам. Публикация — по каждому ревью и после подтверждения.
30
34
 
31
35
  ## Установка
32
36
 
@@ -89,7 +93,9 @@ revdeck ui # ссылка на локальный интерфейс
89
93
  | `revdeck eject [--yes]` | удалить конфиг, адаптеры и MCP-запись revdeck |
90
94
  | `revdeck devcontainer [--write]` | смонтировать сокет/state демона хоста в devcontainer |
91
95
  | `revdeck doctor` | окружение, `glab`/`gh`, демон, адаптеры |
92
- | `revdeck list [--remote]` | локальные или открытые на платформе ревью |
96
+ | `revdeck projects [add <путь>]` | проекты, их root'ы и число ревью; зарегистрировать репозиторий |
97
+ | `revdeck list [--all] [--remote]` | ревью текущего проекта или все проекты с `--all` |
98
+ | `revdeck feature …` | list/create/add/remove/context/update/archive/delete фич |
93
99
  | `revdeck open <N│URL>` | загрузить ревью |
94
100
  | `revdeck context <N>` | контекст для агента: правила, файлы, треды, замечания |
95
101
  | `revdeck diff <N> [--file]` | файлы и hunks |
@@ -107,11 +113,52 @@ revdeck ui # ссылка на локальный интерфейс
107
113
  | `revdeck daemon <start│stop│restart│status│logs│install│uninstall>` | управление демоном |
108
114
  | `revdeck mcp` | MCP-сервер (stdio) |
109
115
 
110
- Общие флаги: `--json`, `--root`, `--review`, `--platform`, `--project`, `--host`, `--lang ru|en`.
116
+ Общие флаги: `--json`, `--root`, `--review`, `--platform`, `--project`, `--host`, `--all`, `--lang ru|en`.
117
+
118
+ ## Проекты
119
+
120
+ Проект — это репозиторий. revdeck ведёт реестр проектов (`projects`, `project_roots`) и хранит
121
+ `projectKey` у каждого ревью, поэтому UI переключается между проектами и показывает только ревью
122
+ текущего. Демон по-прежнему один процесс с одной SQLite; разделение проектов — про контекст, а не
123
+ про тенантов.
124
+
125
+ MCP-сервер каждого репозитория определяет свой проект по рабочей копии и показывает только его.
126
+ Id или URL чужого проекта отклоняется с подсказкой открыть отдельную сессию. Devcontainer'ы и
127
+ отдельные сессии агента работают естественно: каждый контейнер монтирует общий мост к демону хоста
128
+ и остаётся в скоупе своего репозитория.
129
+
130
+ Агент не видит другой проект неявно. Кросс-проектная работа идёт через созданную человеком фичу
131
+ (ниже) — это единственная явная дверь. См. [возможности](docs/ru/capabilities.md#скоупы-проектов) и
132
+ [архитектуру](docs/ru/architecture.md#проекты-и-изоляция).
133
+
134
+ ## Фичи
135
+
136
+ Фича — именованный набор MR из одного или нескольких проектов с Markdown-брифом, отдельным
137
+ контрактом (Markdown или OpenAPI) и свободной ролью у каждого ревью. OpenAPI разбирается на операции
138
+ и схемы; контекст отмечает, какие изменённые ревью упоминают каждый путь. Профили приложений берутся
139
+ из `context.sources` каждого репозитория. Заметки/находки фичи — непубликуемый кросс-проектный
140
+ блокнот. Проекты не связываются навсегда; проект присутствует в фиче, пока в ней есть хотя бы один
141
+ его MR.
142
+
143
+ ```bash
144
+ # сначала откройте MR в их проектах, затем:
145
+ revdeck feature create "Checkout v2" --brief brief.md --contract openapi.yaml \
146
+ gitlab:gitlab.com/acme/api!1 \
147
+ gitlab:gitlab.com/acme/web!2
148
+ revdeck feature context ft-a1b2c3
149
+ revdeck feature note ft-a1b2c3 --title "Contract gap" --body "Web sends no Idempotency-Key" --kind finding --level major
150
+ ```
151
+
152
+ В UI ревью добавляется из шапки, а также через **Все фичи** и список отслеживаемых ревью; порядок
153
+ и удаление — на странице выбранной фичи. Project-сессия видит фичи, куда входит её проект, и может
154
+ читать общий контекст, но пишет только в свой проект. Чтобы один агент писал по всей фиче, запустите
155
+ MCP-сервер из репозитория-участника с `REVDECK_FEATURE=<id>`; публикация всё равно требует
156
+ подтверждения по каждому ревью. Заметки, написанные агентом, остаются локальными и не публикуются.
157
+ См. [возможности](docs/ru/capabilities.md#фичи).
111
158
 
112
159
  Горячие клавиши UI: `1`–`5` переключают вкладки, `o` открывает ревью, `r` обновляет, `s`
113
- скрывает/показывает сайдбар, `p` открывает публикацию, `?` — палитру команд. Выбор сайдбара
114
- запоминается в `localStorage`.
160
+ скрывает/показывает сайдбар, `p` открывает переключатель проектов (или публикацию, если готов
161
+ план), `?` — палитру команд. Выбор сайдбара и активный проект запоминаются в `localStorage`.
115
162
 
116
163
  UI показывает описание MR/PR, поддерживает deep links на треды, замечания и строки diff (с рабочей
117
164
  кнопкой «назад»), а в diff — фильтр файлов и отметку «просмотрено» для каждого ревью. Ревью можно убрать
@@ -229,12 +276,12 @@ HTTP: достаточно `revdeck daemon restart`, потому что `daemon
229
276
 
230
277
  Инструменты: `revdeck_status`, `revdeck_list`, `revdeck_open`, `revdeck_context`,
231
278
  `revdeck_threads`, `revdeck_diff`, `revdeck_rules`, `revdeck_draft_reply`,
232
- `revdeck_draft_findings`, `revdeck_set_summary`, `revdeck_notes`, `revdeck_publish_preview`,
233
- `revdeck_publish`. Публикация требует `approval_id`, который агент получить не может: его выдаёт
234
- человек в UI или CLI с `--yes`.
279
+ `revdeck_draft_findings`, `revdeck_set_summary`, `revdeck_notes`, `revdeck_feature`,
280
+ `revdeck_feature_note`, `revdeck_publish_preview`, `revdeck_publish`. Публикация требует
281
+ `approval_id`, который агент получить не может: его выдаёт человек в UI или CLI с `--yes`.
235
282
 
236
- Промпты `review-mr` и `close-feedback` доступны в клиентах, поддерживающих MCP prompts. В харнессах
237
- без MCP используйте CLI — возможности те же. Матрица адаптеров и `/`-команд: [docs/ru/integrations.md](docs/ru/integrations.md).
283
+ Промпты `review-mr`, `close-feedback` и `review-feature` доступны в клиентах, поддерживающих
284
+ MCP prompts. В харнессах без MCP используйте CLI — возможности те же. Матрица адаптеров и `/`-команд: [docs/ru/integrations.md](docs/ru/integrations.md).
238
285
 
239
286
  ## Правила проекта
240
287
 
@@ -303,7 +350,7 @@ revdeck ищет `AGENTS.md`, `CLAUDE.md`, `CONTRIBUTING.md` и `docs/*` и пр
303
350
  | `skills/revdeck` | процедуры ревью (SKILL, Review, Feedback, Criteria, Rules, Sources, `agents/openai.yaml`) |
304
351
 
305
352
  Подробно: [docs/ru/architecture.md](docs/ru/architecture.md), [docs/ru/protocol.md](docs/ru/protocol.md),
306
- [ADR-0001](docs/ru/adr/0001-daemon-first.md).
353
+ [возможности](docs/ru/capabilities.md#демон-first).
307
354
 
308
355
  ## Разработка
309
356