revdeck 0.8.0 → 0.9.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.
@@ -11,7 +11,7 @@
11
11
  revdeck open 42</pre></div>`),pl=G(`<section class="projects-home"><header class="projects-home-head"><div class="projects-home-intro"><h1> </h1> <p class="muted"> </p></div> <div class="projects-home-actions"><input class="project-home-search" autocomplete="off"/> <button class="btn" type="button"> </button> <button class="btn primary" type="button"> </button></div></header> <!></section>`);function ml(e,t){Ve(t,!0);let n=I(``),r=P(()=>Q.projects.filter(e=>{let t=U(n).trim().toLowerCase();return!t||`${e.key} ${e.title} ${e.host}/${e.project} ${e.roots.join(` `)}`.toLowerCase().includes(t)}));var i=pl(),a=R(i),o=R(a),s=R(o),c=z(s,!0),l=z(B(s,2),!0);N(o);var u=B(o,2),d=R(u);pi(d);var f=B(d,2),p=z(f,!0),m=B(f,2),h=z(m,!0);N(u),N(a);var g=B(a,2),_=e=>{var n=ul();Y(n,21,()=>U(r),e=>e.key,(e,n)=>{var r=ll(),i=R(r),a=R(i),o=R(a),s=B(o,2),c=z(s,!0),l=z(B(s,2));N(a);var u=B(a,2),d=z(u),f=z(B(u,2),!0);N(i);var p=B(i,2),m=R(p),h=z(m),g=B(m,2),_=z(g);N(p),N(r),V((e,t,r,i,a,s,u,p)=>{ti(o,e),q(c,t),q(l,`${U(n).reviews??``} ${r??``}`),q(d,`${U(n).host??``}/${U(n).project??``}`),q(f,i),X(m,`title`,a),q(h,`✎ ${s??``}`),X(g,`title`,u),q(_,`× ${p??``}`)},[()=>`--project-color:${ka(U(n).key)}`,()=>Aa(U(n),Q.projects),()=>Z(`ревью`,`reviews`),()=>U(n).roots[0]??Z(`Нет рабочей копии`,`No working copy`),()=>Z(`Изменить проект`,`Edit project`),()=>Z(`Изменить`,`Edit`),()=>Z(`Удалить проект из revdeck`,`Remove project from revdeck`),()=>Z(`Удалить`,`Delete`)]),W(`click`,i,()=>t.onselect(U(n).key)),W(`click`,m,()=>t.onedit(U(n))),W(`click`,g,()=>t.onremove(U(n))),K(e,r)}),N(n),K(e,n)},v=e=>{var t=dl(),n=z(t,!0);V(e=>q(n,e),[()=>Z(`Проекты не найдены.`,`No projects found.`)]),K(e,t)},y=e=>{var t=fl(),n=R(t),r=z(n,!0),i=z(B(n,2),!0);xe(2),N(t),V((e,t)=>{q(r,e),q(i,t)},[()=>Z(`Пока нет проектов`,`No projects yet`),()=>Z(`Добавьте проект кнопкой выше или откройте ревью из репозитория.`,`Add a project with the button above or open a review from a repository.`)]),K(e,t)};J(g,e=>{U(r).length?e(_):Q.projects.length?e(v,1):e(y,-1)}),N(i),V((e,t,n,r,i)=>{q(c,e),q(l,t),X(d,`placeholder`,n),q(p,r),q(h,i)},[()=>Z(`Проекты`,`Projects`),()=>Z(`Каждый проект — отдельный репозиторий со своими правилами и ревью. Агент видит только проект своей сессии.`,`Each project is a separate repository with its own rules and reviews. An agent sees only the project of its session.`),()=>Z(`Найти проект…`,`Find a project…`),()=>Z(`+ Добавить проект`,`+ Add project`),()=>Z(`Открыть ревью`,`Open review`)]),yi(d,()=>U(n),e=>L(n,e)),W(`click`,f,function(...e){t.onadd?.apply(this,e)}),W(`click`,m,function(...e){t.onopen?.apply(this,e)}),K(e,i),He()}_r([`click`]);var hl=G(`<div class="alert error"> </div>`),gl=G(`<div class="overlay"><button class="backdrop" type="button"></button> <div class="dialog" role="dialog" aria-modal="true"><form><div class="spread"><h2 style="margin: 0; font-size: 16px"> </h2> <button class="btn" type="button"> </button></div> <label class="field"><span> </span> <input placeholder="/path/to/repository" autocomplete="off"/> <small class="muted"> </small></label> <!> <div class="row end" style="margin-top: 14px"><button class="btn" type="button"> </button> <button class="btn primary" type="submit"> </button></div></form></div></div>`);function _l(e,t){Ve(t,!0);let n=I(``),r=I(!1),i=I(``),a=I(void 0);Oi(()=>{L(n,Q.projects.find(e=>e.key===Q.activeProject)?.roots[0]??(()=>{try{return localStorage.getItem(`revdeck.root`)??``}catch{return``}})(),!0),U(a)?.focus()});async function o(e){if(e.preventDefault(),U(r))return;if(!U(n).trim()){L(i,Z(`Укажите путь к рабочей копии репозитория`,`Pass the repository working-copy path`),!0);return}L(r,!0),L(i,``);let a=Q.projectsHome||!Q.projects.length;try{let e=await Vi(U(n).trim());if(!e.project){L(i,Z(`Не удалось определить проект: проверьте git remote и .revdeck.yml`,`Could not determine the project: check the git remote and .revdeck.yml`),!0);return}Q.projects=e.projects,await Ya(),await Xa(),await Za(),a&&io(!1);try{localStorage.setItem(`revdeck.root`,U(n).trim())}catch{}$(Z(`Проект добавлен: ${e.project.title}`,`Project added: ${e.project.title}`),`ok`),t.onclose()}catch(e){L(i,Va(e),!0)}finally{L(r,!1)}}var s=gl();gr(`keydown`,Yt,e=>e.key===`Escape`&&t.onclose());var c=R(s),l=B(c,2),u=R(l),d=R(u),f=R(d),p=z(f,!0),m=B(f,2),h=z(m,!0);N(d);var g=B(d,2),_=R(g),v=z(_,!0),y=B(_,2);pi(y),wi(y,e=>L(a,e),()=>U(a));var b=z(B(y,2),!0);N(g);var x=B(g,2),S=e=>{var t=hl(),n=z(t,!0);V(()=>q(n,U(i))),K(e,t)};J(x,e=>{U(i)&&e(S)});var C=B(x,2),w=R(C),T=z(w,!0),E=B(w,2),D=z(E,!0);N(C),N(u),N(l),N(s),V((e,t,n,i,a,o,s,u,d)=>{X(c,`aria-label`,e),X(l,`aria-label`,t),q(p,n),q(h,i),q(v,a),q(b,o),w.disabled=U(r),q(T,s),E.disabled=u,q(D,d)},[()=>Z(`Закрыть`,`Close`),()=>Z(`Добавить проект`,`Add project`),()=>Z(`Добавить проект`,`Add project`),()=>Z(`Закрыть`,`Close`),()=>Z(`Корень рабочей копии`,`Working-copy root`),()=>Z(`revdeck прочитает git remote и .revdeck.yml, чтобы определить платформу, хост и проект.`,`revdeck reads the git remote and .revdeck.yml to determine the platform, host and project.`),()=>Z(`Отмена`,`Cancel`),()=>U(r)||!U(n).trim(),()=>U(r)?Z(`Добавляю…`,`Adding…`):Z(`Добавить`,`Add`)]),W(`click`,c,function(...e){t.onclose?.apply(this,e)}),gr(`submit`,u,o),W(`click`,m,function(...e){t.onclose?.apply(this,e)}),yi(y,()=>U(n),e=>L(n,e)),W(`click`,w,function(...e){t.onclose?.apply(this,e)}),K(e,s),He()}_r([`click`]);var vl=G(`<div class="alert error"> </div>`),yl=G(`<div class="overlay"><button class="backdrop" type="button"></button> <div class="dialog" role="dialog" aria-modal="true"><form><div class="spread"><h2 style="margin: 0; font-size: 16px"> </h2> <button class="btn" type="button"> </button></div> <div class="muted small project-edit-key"> </div> <label class="field"><span> </span> <input maxlength="120" autocomplete="off"/></label> <label class="field"><span> </span> <textarea rows="5" placeholder="/path/to/repository
12
12
  /path/to/another-clone"></textarea> <small class="muted"> </small></label> <!> <div class="row end" style="margin-top: 14px"><button class="btn" type="button"> </button> <button class="btn primary" type="submit"> </button></div></form></div></div>`);function bl(e,t){Ve(t,!0);let n=I(Kt(t.project.title)),r=I(Kt(t.project.roots.join(`
13
13
  `))),i=I(!1),a=I(``);async function o(e){if(e.preventDefault(),U(n).trim()&&!U(i)){L(i,!0),L(a,``);try{Q.projects=(await Hi(t.project.key,{title:U(n).trim(),roots:U(r).split(`
14
- `).map(e=>e.trim()).filter(Boolean)})).projects,await Ya(),$(Z(`Проект обновлён`,`Project updated`),`ok`),t.onclose()}catch(e){L(a,Va(e),!0)}finally{L(i,!1)}}}var s=yl();gr(`keydown`,Yt,e=>e.key===`Escape`&&t.onclose());var c=R(s),l=B(c,2),u=R(l),d=R(u),f=R(d),p=z(f,!0),m=B(f,2),h=z(m,!0);N(d);var g=B(d,2),_=z(g,!0),v=B(g,2),y=R(v),b=z(y,!0),x=B(y,2);pi(x),N(v);var S=B(v,2),C=R(S),w=z(C,!0),T=B(C,2);$e(T);var E=z(B(T,2),!0);N(S);var D=B(S,2),O=e=>{var t=vl(),n=z(t,!0);V(()=>q(n,U(a))),K(e,t)};J(D,e=>{U(a)&&e(O)});var ee=B(D,2),k=R(ee),te=z(k,!0),ne=B(k,2),re=z(ne,!0);N(ee),N(u),N(l),N(s),V((e,n,r,a,o,s,u,d,f,m)=>{X(c,`aria-label`,e),X(l,`aria-label`,n),q(p,r),q(h,a),q(_,t.project.key),q(b,o),q(w,s),q(E,u),k.disabled=U(i),q(te,d),ne.disabled=f,q(re,m)},[()=>Z(`Закрыть`,`Close`),()=>Z(`Изменить проект`,`Edit project`),()=>Z(`Изменить проект`,`Edit project`),()=>Z(`Закрыть`,`Close`),()=>Z(`Название`,`Title`),()=>Z(`Корни рабочих копий`,`Working-copy roots`),()=>Z(`По одному пути на строку. Пустой список убирает все рабочие копии у проекта.`,`One path per line. An empty list removes all working copies from the project.`),()=>Z(`Отмена`,`Cancel`),()=>U(i)||!U(n).trim(),()=>U(i)?Z(`Сохранение…`,`Saving…`):Z(`Сохранить`,`Save`)]),W(`click`,c,function(...e){t.onclose?.apply(this,e)}),gr(`submit`,u,o),W(`click`,m,function(...e){t.onclose?.apply(this,e)}),yi(x,()=>U(n),e=>L(n,e)),yi(T,()=>U(r),e=>L(r,e)),W(`click`,k,function(...e){t.onclose?.apply(this,e)}),K(e,s),He()}_r([`click`]);var xl=[{id:`setup`,ru:`Установка и демон`,en:`Setup and daemon`,commands:[{id:`init`,usage:`revdeck init [--force] [--provider gitlab|github|auto] [--adapters a,b]`,ru:`Создаёт .revdeck.yml, ставит скилл, MCP-конфиг и адаптеры харнессов. Провайдер по умолчанию — GitLab, если git remote не распознан.`,en:`Creates .revdeck.yml, installs the skill, MCP config and harness adapters. GitLab is the default provider when the git remote is not recognized.`,example:`revdeck init --provider gitlab`},{id:`doctor`,usage:`revdeck doctor`,ru:`Проверяет Node.js, доступность glab/gh, авторизацию, демон и установленные адаптеры.`,en:`Checks Node.js, glab/gh availability, authentication, the daemon and installed adapters.`},{id:`daemon`,usage:`revdeck daemon <start|stop|restart|status|logs|install|uninstall>`,ru:`Управляет локальным демоном. install создаёт systemd user unit на Linux или launchd plist на macOS.`,en:`Manages the local daemon. install creates a systemd user unit on Linux or a launchd plist on macOS.`},{id:`ui`,usage:`revdeck ui [N]`,ru:`Открывает локальный веб-интерфейс, при необходимости сразу с ревью N.`,en:`Opens the local web UI, optionally focused on review N.`},{id:`eject`,usage:`revdeck eject [--yes] [--keep-config]`,ru:`Удаляет из проекта конфиг, скиллы, файлы команд и MCP-запись revdeck. Без --yes только показывает план.`,en:`Removes the revdeck config, skills, command files and MCP entry from the project. Without --yes it only prints the plan.`},{id:`devcontainer`,usage:`revdeck devcontainer [--write]`,ru:`Подключает devcontainer к демону и state-каталогу хоста.`,en:`Connects a devcontainer to the host daemon and state directory.`}]},{id:`projects`,ru:`Проекты и ревью`,en:`Projects and reviews`,commands:[{id:`projects`,usage:`revdeck projects`,ru:`Показывает реестр проектов, число ревью и корни рабочих копий. В UI здесь же можно добавить, переименовать и удалить проект.`,en:`Lists the project registry, review counts and working-copy roots. The UI can also add, rename and delete projects here.`},{id:`projects-add`,usage:`revdeck projects add <path>`,ru:`Регистрирует проект по рабочей копии до открытия первого ревью. Проект определяется по git remote и .revdeck.yml.`,en:`Registers a project from a working copy before its first review. The project is resolved from the git remote and .revdeck.yml.`,example:`revdeck projects add ~/work/api`},{id:`list`,usage:`revdeck list [--all] [--remote] [--project <key>]`,ru:`Показывает ревью текущего проекта; --all — всех проектов, --remote — запрашивает список с платформы.`,en:`Lists reviews of the current project; --all covers every project, --remote asks the platform.`},{id:`open`,usage:`revdeck open <N|URL> [<N|URL> ...] [--branch <name>]`,ru:`Загружает одно или несколько ревью по номеру, ссылке или текущей ветке. --platform/--project/--host задают контекст явно.`,en:`Loads one or more reviews by number, URL or current branch. --platform/--project/--host set the context explicitly.`,example:`revdeck open https://gitlab.com/group/project/-/merge_requests/42`},{id:`status`,usage:`revdeck status [N]`,ru:`Показывает состояние ревью, ветки, автора и статистику изменений.`,en:`Shows the review state, branches, author and change stats.`}]},{id:`review`,ru:`Контекст и разбор ревью`,en:`Review context and analysis`,commands:[{id:`context`,usage:`revdeck context <N> [--role <role>] [--shard i/N]`,ru:`Собирает контекст для агента: правила проекта, diff, треды, замечания и черновики. Роль и шард делят работу между агентами.`,en:`Builds agent context: project rules, diff, threads, findings and drafts. Role and shard split the work between agents.`,example:`revdeck context 42 --role correctness`},{id:`threads`,usage:`revdeck threads <N>`,ru:`Показывает обсуждения ревью и их состояние.`,en:`Lists review discussions and their state.`},{id:`diff`,usage:`revdeck diff <N> [--file <path>]`,ru:`Показывает файлы и hunks diff, при необходимости только выбранный файл.`,en:`Shows diff files and hunks, optionally for one file.`},{id:`rules`,usage:`revdeck rules [<N>] [--explain <path>]`,ru:`Показывает эффективные правила проекта и объясняет, какие документы выбраны для пути.`,en:`Shows the effective project rules and explains which documents were selected for a path.`},{id:`checks`,usage:`revdeck checks <N> [--run --yes] [--ids a,b]`,ru:`Планирует проверки проекта из .revdeck.yml. Запускает их только с --run --yes.`,en:`Plans project checks from .revdeck.yml. Runs them only with --run --yes.`},{id:`stats`,usage:`revdeck stats <N>`,ru:`Аналитика ревью: решения по замечаниям, acceptance rate, треды и черновики.`,en:`Review analytics: finding decisions, acceptance rate, threads and drafts.`},{id:`scan`,usage:`revdeck scan <N>`,ru:`Сканирует diff на секреты, если включён review.secrets. Превью маскируются.`,en:`Scans the diff for secrets when review.secrets is enabled. Previews are masked.`},{id:`versions`,usage:`revdeck versions <N>`,ru:`История версий ревью по commit SHA, если включён review.history.`,en:`Review version history by commit SHA when review.history is enabled.`}]},{id:`drafting`,ru:`Черновики и публикация`,en:`Drafts and publishing`,commands:[{id:`findings`,usage:`revdeck findings <N> [list|set --file <json>|decide --id <id> --decision accept|reject|discuss]`,ru:`Читает, записывает и размечает замечания. set заменяет набор, decide фиксирует решение человека.`,en:`Reads, writes and triages findings. set replaces the set; decide records the human decision.`},{id:`summary`,usage:`revdeck summary <N> [--file <json>]`,ru:`Показывает или сохраняет выжимку ревью: scope, summary, changes и focus.`,en:`Shows or stores the review summary: scope, summary, changes and focus.`},{id:`reply`,usage:`revdeck reply <N> --thread <id> (--body <text> | --body-file <file> | -) [--resolve]`,ru:`Пишет черновик ответа в тред. --resolve добавляет намерение закрыть тред; публикует человек.`,en:`Drafts a reply in a thread. --resolve marks the intent to close it; a human publishes it.`},{id:`notes`,usage:`revdeck notes <N> <list|add|update|delete|reply>`,ru:`Комментарии человека к строкам diff. add создаёт заметку, reply отвечает агенту.`,en:`Human comments on diff lines. add creates a note; reply answers the agent.`},{id:`react`,usage:`revdeck react <N> --note <id> --emoji <name>`,ru:`Ставит или снимает реакцию на комментарий платформы.`,en:`Adds or removes a reaction on a platform comment.`},{id:`attach`,usage:`revdeck attach <N> --file <path>`,ru:`Загружает картинку или видео в платформу и печатает markdown-ссылку.`,en:`Uploads an image or video to the platform and prints its markdown link.`},{id:`publish`,usage:`revdeck publish <N> [--kind reply|finding|note] [--ids a,b] [--yes]`,ru:`Показывает точный план публикации, а с --yes публикует после подтверждения. Без --yes ничего не отправляется.`,en:`Shows the exact publish plan; with --yes publishes after confirmation. Without --yes nothing is sent.`}]},{id:`features`,ru:`Фичи`,en:`Features`,commands:[{id:`feature`,usage:`revdeck feature list|create|get|add|remove|reorder|notes|note|note-delete|context|update|archive|delete`,ru:`Кросс-проектные фичи: бриф, контракт Markdown/OpenAPI, роли ревью и заметки. Фича не публикуется целиком.`,en:`Cross-project features: brief, Markdown/OpenAPI contract, review roles and notes. A feature is never published as a whole.`,example:`revdeck feature create "Checkout v2" --brief brief.md gitlab:gitlab.com/acme/api!1`},{id:`feature-context`,usage:`revdeck feature context <id>`,ru:`Собирает контекст фичи: бриф, контракт, профили, заметки и секции по каждому ревью.`,en:`Builds feature context: brief, contract, profiles, notes and one section per review.`}]},{id:`data`,ru:`Данные и диагностика`,en:`Data and diagnostics`,commands:[{id:`config`,usage:`revdeck config [--json]`,ru:`Показывает эффективный конфиг проекта с учётом .revdeck.local.yml.`,en:`Shows the effective project config, including .revdeck.local.yml.`},{id:`export`,usage:`revdeck export <N> [--dir .revdeck]`,ru:`Выгружает ревью в старый файловый формат.`,en:`Exports a review to the legacy file format.`},{id:`import`,usage:`revdeck import <N> [--dir .revdeck]`,ru:`Импортирует ревью из старого файлового формата.`,en:`Imports a review from the legacy file format.`},{id:`mcp`,usage:`revdeck mcp`,ru:`Запускает MCP-сервер over stdio. Инструменты доступны агенту, токены остаются у демона.`,en:`Starts the MCP server over stdio. Tools are available to the agent; tokens stay with the daemon.`}]}],Sl=[{flag:`--json`,ru:`машинный вывод`,en:`machine-readable output`},{flag:`--root <path>`,ru:`рабочая копия репозитория`,en:`repository working-copy root`},{flag:`--review <id>`,ru:`id ревью`,en:`review id`},{flag:`--lang ru|en`,ru:`язык CLI`,en:`CLI language`},{flag:`--help`,ru:`справка`,en:`help`}],Cl=[{keys:`1–5`,ru:`вкладки ревью`,en:`review tabs`},{keys:`o`,ru:`открыть ревью`,en:`open a review`},{keys:`r`,ru:`обновить ревью`,en:`refresh the review`},{keys:`s`,ru:`скрыть/показать сайдбар`,en:`hide/show the sidebar`},{keys:`p`,ru:`проекты или публикация`,en:`projects or publish`},{keys:`?`,ru:`палитра команд`,en:`command palette`},{keys:`h`,ru:`справка по командам`,en:`command reference`}],wl=G(`<button class="help-example" type="button"><span class="mono"> </span></button>`),Tl=G(`<article class="help-command"><div class="help-command-head"><button class="help-usage" type="button"><code> </code> <span class="help-copy">⧉</span></button></div> <p> </p> <!></article>`),El=G(`<section class="help-group"><h2> </h2> <div class="help-commands"></div></section>`),Dl=G(`<p class="muted"> </p>`),Ol=G(`<span class="help-chip"><code> </code> </span>`),kl=G(`<span class="help-chip"><kbd> </kbd> </span>`),Al=G(`<section class="help-page"><header class="projects-home-head"><div><h1> </h1> <p class="muted"> </p></div> <button class="btn" type="button"> </button></header> <label class="help-search"><span aria-hidden="true">⌕</span> <input autocomplete="off"/></label> <!> <section class="help-group"><h2> </h2> <div class="help-chips"></div></section> <section class="help-group"><h2> </h2> <div class="help-chips"></div></section></section>`);function jl(e,t){Ve(t,!0);let n=I(``),r=P(()=>xl.map(e=>({...e,commands:e.commands.filter(e=>{let t=U(n).trim().toLowerCase();return!t||`${e.usage} ${e.ru} ${e.en} ${e.example??``}`.toLowerCase().includes(t)})})).filter(e=>e.commands.length));function i(e){return ji.locale===`ru`?e.ru:e.en}function a(e){navigator.clipboard?.writeText(e).then(()=>$(Z(`Команда скопирована`,`Command copied`),`ok`),()=>$(Z(`Не удалось скопировать`,`Could not copy`),`error`))}var o=Al(),s=R(o),c=R(s),l=R(c),u=z(l,!0),d=z(B(l,2),!0);N(c);var f=B(c,2),p=z(f,!0);N(s);var m=B(s,2),h=B(R(m),2);pi(h),N(m);var g=B(m,2);Y(g,17,()=>U(r),e=>e.id,(e,t)=>{var n=El(),r=R(n),o=z(r,!0),s=B(r,2);Y(s,21,()=>U(t).commands,e=>e.id,(e,t)=>{var n=Tl(),r=R(n),o=R(r),s=z(R(o),!0);xe(2),N(o),N(r);var c=B(r,2),l=z(c,!0),u=B(c,2),d=e=>{var n=wl(),r=z(R(n),!0);N(n),V(e=>{X(n,`title`,e),q(r,U(t).example)},[()=>Z(`Скопировать пример`,`Copy example`)]),W(`click`,n,()=>a(U(t).example)),K(e,n)};J(u,e=>{U(t).example&&e(d)}),N(n),V((e,n)=>{X(o,`title`,e),q(s,U(t).usage),q(l,n)},[()=>Z(`Скопировать команду`,`Copy command`),()=>i(U(t))]),W(`click`,o,()=>a(U(t).usage)),K(e,n)}),N(s),N(n),V(e=>q(o,e),[()=>i(U(t))]),K(e,n)},e=>{var t=Dl(),n=z(t,!0);V(e=>q(n,e),[()=>Z(`Ничего не найдено.`,`Nothing found.`)]),K(e,t)});var _=B(g,2),v=R(_),y=z(v,!0),b=B(v,2);Y(b,21,()=>Sl,e=>e.flag,(e,t)=>{var n=Ol(),r=R(n),a=z(r,!0),o=B(r);N(n),V(e=>{q(a,U(t).flag),q(o,` ${e??``}`)},[()=>i(U(t))]),K(e,n)}),N(b),N(_);var x=B(_,2),S=R(x),C=z(S,!0),w=B(S,2);Y(w,21,()=>Cl,e=>e.keys,(e,t)=>{var n=kl(),r=R(n),a=z(r,!0),o=B(r);N(n),V(e=>{q(a,U(t).keys),q(o,` ${e??``}`)},[()=>i(U(t))]),K(e,n)}),N(w),N(x),N(o),V((e,t,n,r,i,a)=>{q(u,e),q(d,t),q(p,n),X(h,`placeholder`,r),q(y,i),q(C,a)},[()=>Z(`Справка по командам`,`Command reference`),()=>Z(`Все команды revdeck для терминала. Клик по команде копирует её. Агент получает те же возможности через MCP.`,`Every revdeck terminal command. Click a command to copy it. Agents get the same capabilities through MCP.`),()=>Z(`К проектам`,`Projects`),()=>Z(`Найти команду или флаг…`,`Find a command or flag…`),()=>Z(`Общие флаги`,`Common flags`),()=>Z(`Горячие клавиши интерфейса`,`UI shortcuts`)]),W(`click`,f,()=>io()),yi(h,()=>U(n),e=>L(n,e)),K(e,o),He()}_r([`click`]);var Ml=G(`<span class="badge"> </span>`),Nl=G(`<label><input type="checkbox"/> <span class="project-dot"></span> <span class="review-picker-text"><span class="review-picker-title"> </span> <span class="review-picker-meta"> </span></span> <!></label>`),Pl=G(`<p class="muted small"> </p>`),Fl=G(`<div class="review-picker"><input class="project-home-search" autocomplete="off"/> <div class="review-picker-list"></div></div>`);function Il(e,t){Ve(t,!0);let n=Di(t,`exclude`,19,()=>[]),r=I(``),i=P(()=>new Set(n())),a=P(()=>t.reviews.filter(e=>{let t=U(r).trim().toLowerCase();return!t||`${e.projectKey} ${e.project} #${e.number} ${e.title}`.toLowerCase().includes(t)}));function o(e){U(i).has(e)||t.onchange(t.selected.includes(e)?t.selected.filter(t=>t!==e):[...t.selected,e])}var s=Fl(),c=R(s);pi(c);var l=B(c,2);Y(l,21,()=>U(a),e=>e.id,(e,n)=>{var r=Nl();let a;var s=R(r);pi(s);var c=B(s,2),l=B(c,2),u=R(l),d=z(u),f=z(B(u,2));N(l);var p=B(l,2),m=e=>{var t=Ml(),n=z(t,!0);V(e=>q(n,e),[()=>Z(`уже в фиче`,`in feature`)]),K(e,t)},h=P(()=>U(i).has(U(n).id));J(p,e=>{U(h)&&e(m)}),N(r),V((e,t,i,o)=>{a=$r(r,1,`review-picker-row`,null,a,{added:e}),hi(s,t),s.disabled=i,ti(c,o),q(d,`#${U(n).number??``} ${U(n).title??``}`),q(f,`${U(n).project??``} · ${U(n).state??``}`)},[()=>U(i).has(U(n).id),()=>t.selected.includes(U(n).id),()=>U(i).has(U(n).id),()=>`--project-color:${ka(U(n).projectKey)}`]),W(`change`,s,()=>o(U(n).id)),K(e,r)},e=>{var t=Pl(),n=z(t,!0);V(e=>q(n,e),[()=>Z(`Ревью не найдены.`,`No reviews found.`)]),K(e,t)}),N(l),N(s),V(e=>X(c,`placeholder`,e),[()=>Z(`Найти ревью…`,`Find a review…`)]),yi(c,()=>U(r),e=>L(r,e)),K(e,s),He()}_r([`change`]);var Ll=G(`<div class="alert error"> </div>`),Rl=G(`<div class="overlay"><button class="backdrop" type="button"></button> <div class="dialog" role="dialog" aria-modal="true"><div class="spread"><h2 style="margin: 0; font-size: 16px"> </h2> <button class="btn" type="button"> </button></div> <!> <!> <div class="row end" style="margin-top: 14px"><button class="btn" type="button"> </button> <button class="btn primary" type="button"> </button></div></div></div>`);function zl(e,t){Ve(t,!0);let n=I(Kt([])),r=I(Kt([])),i=I(!1),a=I(``),o=P(()=>t.feature.members.map(e=>e.review.id));Oi(()=>{Bi().then(e=>{L(n,e.reviews,!0)}).catch(e=>{L(a,Va(e),!0)})});async function s(){if(U(r).length&&!U(i)){L(i,!0),L(a,``);try{await ya(t.feature.id,U(r).map(e=>({review:e}))),await $a(t.feature.id,{push:!1}),await Za(),$(Z(`Ревью добавлены в фичу`,`Reviews added to the feature`),`ok`),t.onclose()}catch(e){L(a,Va(e),!0)}finally{L(i,!1)}}}var c=Rl();gr(`keydown`,Yt,e=>e.key===`Escape`&&t.onclose());var l=R(c),u=B(l,2),d=R(u),f=R(d),p=z(f,!0),m=B(f,2),h=z(m,!0);N(d);var g=B(d,2);Il(g,{get reviews(){return U(n)},get selected(){return U(r)},get exclude(){return U(o)},onchange:e=>L(r,e,!0)});var _=B(g,2),v=e=>{var t=Ll(),n=z(t,!0);V(()=>q(n,U(a))),K(e,t)};J(_,e=>{U(a)&&e(v)});var y=B(_,2),b=R(y),x=z(b,!0),S=B(b,2),C=z(S,!0);N(y),N(u),N(c),V((e,t,n,a,o,s)=>{X(l,`aria-label`,e),X(u,`aria-label`,t),q(p,n),q(h,a),b.disabled=U(i),q(x,o),S.disabled=U(i)||!U(r).length,q(C,s)},[()=>Z(`Закрыть`,`Close`),()=>Z(`Добавить ревью`,`Add reviews`),()=>Z(`Добавить ревью в фичу`,`Add reviews to feature`),()=>Z(`Закрыть`,`Close`),()=>Z(`Отмена`,`Cancel`),()=>U(i)?Z(`Добавление…`,`Adding…`):Z(`Добавить`,`Add`)]),W(`click`,l,function(...e){t.onclose?.apply(this,e)}),W(`click`,m,function(...e){t.onclose?.apply(this,e)}),W(`click`,b,function(...e){t.onclose?.apply(this,e)}),W(`click`,S,s),K(e,c),He()}_r([`click`]);var Bl=G(`<div class="alert error"> </div>`),Vl=G(`<div class="overlay"><button class="backdrop" type="button"></button> <div class="dialog" role="dialog" aria-modal="true"><form><div class="spread"><h2 style="margin: 0; font-size: 16px"> </h2> <button class="btn" type="button"> </button></div> <label class="field"><span> </span> <input autocomplete="off"/></label> <label class="field"><span> </span> <textarea rows="6"></textarea></label> <label class="field"><span> </span> <textarea rows="8"></textarea></label> <!> <div class="row end" style="margin-top: 14px"><button class="btn" type="button"> </button> <button class="btn primary" type="submit"> </button></div></form></div></div>`);function Hl(e,t){Ve(t,!0);let n=I(Kt(t.feature.title)),r=I(Kt(t.feature.brief)),i=I(Kt(t.feature.contract)),a=I(!1),o=I(``);async function s(e){if(e.preventDefault(),U(n).trim()&&!U(a)){L(a,!0);try{await va(t.feature.id,{title:U(n).trim(),brief:U(r),contract:U(i)}),await $a(t.feature.id,{push:!1}),await Za(),$(Z(`Фича обновлена`,`Feature updated`),`ok`),t.onclose()}catch(e){L(o,Va(e),!0)}finally{L(a,!1)}}}var c=Vl();gr(`keydown`,Yt,e=>e.key===`Escape`&&t.onclose());var l=R(c),u=B(l,2),d=R(u),f=R(d),p=R(f),m=z(p,!0),h=B(p,2),g=z(h,!0);N(f);var _=B(f,2),v=R(_),y=z(v,!0),b=B(v,2);pi(b),N(_);var x=B(_,2),S=R(x),C=z(S,!0),w=B(S,2);$e(w),N(x);var T=B(x,2),E=R(T),D=z(E,!0),O=B(E,2);$e(O),N(T);var ee=B(T,2),k=e=>{var t=Bl(),n=z(t,!0);V(()=>q(n,U(o))),K(e,t)};J(ee,e=>{U(o)&&e(k)});var te=B(ee,2),ne=R(te),re=z(ne,!0),ie=B(ne,2),ae=z(ie,!0);N(te),N(d),N(u),N(c),V((e,t,n,r,i,o,s,c,d,f)=>{X(l,`aria-label`,e),X(u,`aria-label`,t),q(m,n),q(g,r),q(y,i),q(C,o),q(D,s),ne.disabled=U(a),q(re,c),ie.disabled=d,q(ae,f)},[()=>Z(`Закрыть`,`Close`),()=>Z(`Редактировать фичу`,`Edit feature`),()=>Z(`Редактировать фичу`,`Edit feature`),()=>Z(`Закрыть`,`Close`),()=>Z(`Название`,`Title`),()=>Z(`Бриф`,`Brief`),()=>Z(`Контракт API (OpenAPI или Markdown)`,`API contract (OpenAPI or Markdown)`),()=>Z(`Отмена`,`Cancel`),()=>U(a)||!U(n).trim(),()=>U(a)?Z(`Сохранение…`,`Saving…`):Z(`Сохранить`,`Save`)]),W(`click`,l,function(...e){t.onclose?.apply(this,e)}),gr(`submit`,d,s),W(`click`,h,function(...e){t.onclose?.apply(this,e)}),yi(b,()=>U(n),e=>L(n,e)),yi(w,()=>U(r),e=>L(r,e)),yi(O,()=>U(i),e=>L(i,e)),W(`click`,ne,function(...e){t.onclose?.apply(this,e)}),K(e,c),He()}_r([`click`]);var Ul=G(`<p class="feature-note-body"> </p>`),Wl=G(`<article class="feature-note"><div class="row" style="justify-content: space-between; align-items: flex-start"><div class="row" style="gap: 7px; align-items: center"><span> </span> <strong> </strong></div> <button class="btn danger" type="button">×</button></div> <!> <div class="muted small"> </div></article>`),Gl=G(`<div class="feature-note-list"></div>`),Kl=G(`<p class="muted"> </p>`),ql=G(`<select><option>blocker</option><option>major</option><option>minor</option><option>question</option></select>`),Jl=G(`<section class="card feature-notes"><div class="card-title"> </div> <p class="muted small"> </p> <!> <form class="feature-note-form"><div class="row"><select><option> </option><option> </option></select> <!> <input class="feature-note-title" autocomplete="off"/></div> <textarea rows="3"></textarea> <div class="row end"><button class="btn" type="submit"> </button></div></form></section>`);function Yl(e,t){Ve(t,!0);let n=I(``),r=I(``),i=I(`note`),a=I(`major`),o=I(!1);async function s(e){if(e.preventDefault(),U(n).trim()&&!U(o)){L(o,!0);try{await Ca(t.feature.id,{kind:U(i),...U(i)===`finding`?{level:U(a)}:{},title:U(n).trim(),body:U(r)}),L(n,``),L(r,``),await $a(t.feature.id,{push:!1}),await Za()}catch(e){$(Va(e),`error`)}finally{L(o,!1)}}}async function c(e){if(confirm(Z(`Удалить заметку?`,`Delete the note?`)))try{await wa(t.feature.id,e),await $a(t.feature.id,{push:!1}),await Za()}catch(e){$(Va(e),`error`)}}var l=Jl(),u=R(l),d=z(u,!0),f=B(u,2),p=z(f,!0),m=B(f,2),h=e=>{var n=Gl();Y(n,21,()=>t.feature.notes,e=>e.id,(e,t)=>{var n=Wl(),r=R(n),i=R(r),a=R(i),o=z(a),s=z(B(a,2),!0);N(i);var l=B(i,2);N(r);var u=B(r,2),d=e=>{var n=Ul(),r=z(n,!0);V(()=>q(r,U(t).body)),K(e,n)},f=P(()=>U(t).body.trim());J(u,e=>{U(f)&&e(d)});var p=z(B(u,2));N(n),V((e,n,r)=>{$r(a,1,`badge ${(U(t).kind===`finding`?U(t).level||`major`:``)??``}`),q(o,`${U(t).kind??``}${U(t).level&&U(t).kind===`finding`?` · ${U(t).level}`:``}`),q(s,U(t).title),X(l,`title`,e),X(l,`aria-label`,n),q(p,`${U(t).author??``} · ${r??``}`)},[()=>Z(`Удалить`,`Delete`),()=>Z(`Удалить`,`Delete`),()=>new Date(U(t).createdAt).toLocaleString()]),W(`click`,l,()=>void c(U(t).id)),K(e,n)}),N(n),K(e,n)},g=e=>{var t=Kl(),n=z(t,!0);V(e=>q(n,e),[()=>Z(`Заметок пока нет.`,`No notes yet.`)]),K(e,t)};J(m,e=>{t.feature.notes.length?e(h):e(g,-1)});var _=B(m,2),v=R(_),y=R(v),b=R(y),x=z(b,!0);b.value=b.__value=`note`;var S=B(b),C=z(S,!0);S.value=S.__value=`finding`,N(y),ai(y);var w=B(y,2),T=e=>{var t=ql(),n=R(t);n.value=n.__value=`blocker`;var r=B(n);r.value=r.__value=`major`;var i=B(r);i.value=i.__value=`minor`;var o=B(i);o.value=o.__value=`question`,N(t),ai(t),V(e=>X(t,`aria-label`,e),[()=>Z(`Уровень`,`Level`)]),oi(t,()=>U(a),e=>L(a,e)),K(e,t)};J(w,e=>{U(i)===`finding`&&e(T)});var E=B(w,2);pi(E),N(v);var D=B(v,2);$e(D);var O=B(D,2),ee=R(O),k=z(ee,!0);N(O),N(_),N(l),V((e,t,n,r,i,a,o,s,c)=>{q(d,e),q(p,t),X(y,`aria-label`,n),q(x,r),q(C,i),X(E,`placeholder`,a),X(D,`placeholder`,o),ee.disabled=s,q(k,c)},[()=>Z(`Заметки фичи`,`Feature notes`),()=>Z(`Кросс-проектные заметки. Не публикуются; конкретные правки остаются в ревью.`,`Cross-project notes. Never published; actionable changes stay on reviews.`),()=>Z(`Тип заметки`,`Note kind`),()=>Z(`заметка`,`note`),()=>Z(`находка`,`finding`),()=>Z(`Заголовок`,`Title`),()=>Z(`Кросс-проектный вывод, вопрос по контракту…`,`Cross-project observation, contract question…`),()=>U(o)||!U(n).trim(),()=>U(o)?Z(`Сохранение…`,`Saving…`):Z(`Добавить заметку`,`Add note`)]),gr(`submit`,_,s),oi(y,()=>U(i),e=>L(i,e)),yi(E,()=>U(n),e=>L(n,e)),yi(D,()=>U(r),e=>L(r,e)),K(e,l),He()}_r([`click`]);var Xl=G(`<span class="badge"> </span>`),Zl=G(`<div class="alert error"> </div>`),Ql=G(`<p class="muted"> </p>`),$l=G(`<div class="card feature-brief"><div class="card-title"> </div> <pre class="feature-contract"> </pre></div>`),eu=G(`<div class="feature-member"><input class="feature-role-input"/> <div class="feature-member-text"><button class="feature-member-title" type="button"> </button> <div class="muted small"> </div></div> <button class="btn" type="button">↑</button> <button class="btn" type="button">↓</button> <button class="btn" type="button"> </button> <button class="btn danger" type="button">×</button></div>`),tu=G(`<section class="card feature-project"><div class="feature-project-head"><span class="project-dot"></span> <span class="feature-project-name"> </span> <span class="muted small"> </span> <span class="badge"> </span></div> <!></section>`),nu=G(`<div class="card"><p class="muted"> </p></div>`),ru=G(`<div class="card feature-context"><div class="card-head"><div class="card-title"> </div> <button class="btn" type="button"> </button></div> <pre> </pre></div>`),iu=G(`<section class="feature-page"><header class="feature-page-head"><div class="breadcrumbs"><button class="breadcrumb-link" type="button"> </button> <span class="sep">/</span> <span class="cur"> </span></div> <div class="feature-title-row"><div style="min-width: 0; flex: 1"><h1> <!></h1> <div class="feature-meta"><span class="badge"> </span> <span class="badge"> </span> <span class="muted small"> </span></div></div> <div class="feature-actions"><button class="btn" type="button"> </button> <button class="btn primary" type="button"> </button> <button class="btn" type="button"> </button> <button class="btn" type="button"> </button> <button class="btn" type="button"> </button> <button class="btn danger" type="button"> </button></div></div></header> <!> <div class="feature-body"><div class="card feature-brief"><div class="card-title"> </div> <!></div> <!> <div class="feature-projects"></div> <!> <!></div></section>`),au=G(`<!> <!> <!>`,1);function ou(e,t){Ve(t,!0);let n=I(!1),r=I(!1),i=I(!1),a=I(!1),o=P(()=>Q.feature),s=P(()=>{let e=Q.feature;if(!e)return[];let t=new Map;for(let n of e.members){let r=e.projects.find(e=>e.key===n.review.projectKey),i=t.get(n.review.projectKey)??{key:n.review.projectKey,title:r?.title??n.review.project,host:r?.host??``,project:r?.project??n.review.project,members:[]};i.members.push(n),t.set(n.review.projectKey,i)}return[...t.values()]});async function c(e){await oo(e)}async function l(e,t){if(U(o))try{await ya(U(o).id,[{review:e,role:t}]),await $a(U(o).id,{push:!1})}catch(e){$(e instanceof Error?e.message:String(e),`error`)}}async function u(e){if(U(o)&&confirm(Z(`Убрать #${e.review.number} из фичи? Ревью останется в проекте.`,`Remove #${e.review.number} from the feature? The review stays in its project.`)))try{await ba(U(o).id,e.review.id),await $a(U(o).id,{push:!1}),await Za(),$(Z(`Ревью убрано из фичи`,`Review removed from the feature`),`ok`)}catch(e){$(e instanceof Error?e.message:String(e),`error`)}}async function d(){if(U(o)){L(a,!0);try{await eo(U(o).id),L(i,!0),Q.featureContext&&(await navigator.clipboard?.writeText(Q.featureContext),$(Z(`Контекст фичи скопирован`,`Feature context copied`),`ok`))}catch(e){$(e instanceof Error?e.message:String(e),`error`)}finally{L(a,!1)}}}async function f(){if(!U(o))return;let e=`REVDECK_FEATURE=${U(o).id} revdeck mcp`;try{await navigator.clipboard?.writeText(e),$(Z(`Команда для агента скопирована`,`Agent command copied`),`ok`)}catch{$(Z(`Не удалось скопировать`,`Could not copy`),`error`)}}function p(e,t){if(!U(o))return null;let n=U(o).members.find(t=>t.review.id===e);if(!n)return null;let r=U(o).members.filter(e=>e.review.projectKey===n.review.projectKey);return r[r.findIndex(t=>t.review.id===e)+t]?.review.id??null}async function m(e,t){if(!U(o))return;let n=p(e,t);if(!n)return;let r=U(o).members.map(e=>e.review.id),i=r.indexOf(e),a=r.indexOf(n);if(!(i<0||a<0)){[r[i],r[a]]=[r[a],r[i]];try{await Ta(U(o).id,r),await $a(U(o).id,{push:!1})}catch(e){$(e instanceof Error?e.message:String(e),`error`)}}}async function h(){if(U(o)&&confirm(Z(`Удалить фичу «${U(o).title}»? Ревью останутся в проектах.`,`Delete feature “${U(o).title}”? Reviews stay in their projects.`)))try{await Ea(U(o).id),await Za(),await to(!1)}catch(e){$(e instanceof Error?e.message:String(e),`error`)}}async function g(){if(U(o))try{let e=U(o).status===`archived`;await va(U(o).id,{status:e?`open`:`archived`}),await $a(U(o).id,{push:!1}),await Za(),$(e?Z(`Фича возвращена`,`Feature reopened`):Z(`Фича архивирована`,`Feature archived`),`ok`)}catch(e){$(e instanceof Error?e.message:String(e),`error`)}}var _=au(),v=rn(_),y=e=>{var t=iu(),_=R(t),v=R(_),y=R(v),b=z(y,!0),x=z(B(y,4),!0);N(v);var S=B(v,2),C=R(S),w=R(C),T=R(w),E=B(T),D=e=>{var t=Xl(),n=z(t,!0);V(e=>q(n,e),[()=>Z(`архив`,`archived`)]),K(e,t)};J(E,e=>{U(o).status===`archived`&&e(D)}),N(w);var O=B(w,2),ee=R(O),k=z(ee),te=B(ee,2),ne=z(te),re=z(B(te,2),!0);N(O),N(C);var ie=B(C,2),ae=R(ie),oe=z(ae,!0),se=B(ae,2),ce=z(se),le=B(se,2),ue=z(le,!0),A=B(le,2),de=z(A,!0),fe=B(A,2),pe=z(fe,!0),me=B(fe,2),he=z(me,!0);N(ie),N(S),N(_);var ge=B(_,2),_e=e=>{var t=Zl(),n=z(t,!0);V(()=>q(n,Q.error)),K(e,t)};J(ge,e=>{Q.error&&e(_e)});var j=B(ge,2),ve=R(j),M=R(ve),ye=z(M,!0),be=B(M,2),xe=e=>{Fo(e,{get source(){return U(o).brief}})},Se=P(()=>U(o).brief.trim()),Ce=e=>{var t=Ql(),n=z(t,!0);V(e=>q(n,e),[()=>Z(`Бриф не заполнен. Опишите цель, non-goals и порядок выката — агент прочитает это первым.`,`The brief is empty. Describe the goal, non-goals and rollout order; the agent reads it first.`)]),K(e,t)};J(be,e=>{U(Se)?e(xe):e(Ce,-1)}),N(ve);var we=B(ve,2),Te=e=>{var t=$l(),n=R(t),r=z(n,!0),i=z(B(n,2),!0);N(t),V(e=>{q(r,e),q(i,U(o).contract)},[()=>Z(`Контракт API`,`API contract`)]),K(e,t)},Ee=P(()=>U(o).contract.trim());J(we,e=>{U(Ee)&&e(Te)});var De=B(we,2);Y(De,21,()=>U(s),e=>e.key,(e,t)=>{var n=tu(),r=R(n),i=R(r),a=B(i,2),o=z(a,!0),s=B(a,2),d=z(s),f=z(B(s,2),!0);N(r),Y(B(r,2),17,()=>U(t).members,e=>e.review.id,(e,t)=>{var n=eu(),r=R(n);pi(r);var i=B(r,2),a=R(i),o=z(a),s=z(B(a,2));N(i);var d=B(i,2),f=B(d,2),h=B(f,2),g=z(h,!0),_=B(h,2);N(n),V((e,n,i,a,c,l,u,p,m,h,v)=>{mi(r,U(t).role),X(r,`placeholder`,e),X(r,`title`,n),q(o,`#${U(t).review.number??``} ${U(t).review.title??``}`),q(s,`${U(t).review.state??``} · ${U(t).review.webUrl??``}`),X(d,`title`,i),X(d,`aria-label`,a),d.disabled=c,X(f,`title`,l),X(f,`aria-label`,u),f.disabled=p,q(g,m),X(_,`title`,h),X(_,`aria-label`,v)},[()=>Z(`роль`,`role`),()=>Z(`Роль ревью в фиче`,`Review role in the feature`),()=>Z(`Выше`,`Move up`),()=>Z(`Выше`,`Move up`),()=>!p(U(t).review.id,-1),()=>Z(`Ниже`,`Move down`),()=>Z(`Ниже`,`Move down`),()=>!p(U(t).review.id,1),()=>Z(`Открыть`,`Open`),()=>Z(`Убрать из фичи`,`Remove from feature`),()=>Z(`Убрать из фичи`,`Remove from feature`)]),W(`change`,r,e=>void l(U(t).review.id,e.currentTarget.value)),W(`click`,a,()=>void c(U(t).review.id)),W(`click`,d,()=>void m(U(t).review.id,-1)),W(`click`,f,()=>void m(U(t).review.id,1)),W(`click`,h,()=>void c(U(t).review.id)),W(`click`,_,()=>void u(U(t))),K(e,n)}),N(n),V(e=>{ti(i,e),q(o,U(t).title),q(d,`${U(t).host??``}/${U(t).project??``}`),q(f,U(t).members.length)},[()=>`--project-color:${ka(U(t).key)}`]),K(e,n)},e=>{var t=nu(),n=z(R(t),!0);N(t),V(e=>q(n,e),[()=>Z(`В фиче пока нет ревью. Добавьте MR из нужных проектов.`,`No reviews in the feature yet. Add MRs from the projects you need.`)]),K(e,t)}),N(De);var Oe=B(De,2);Yl(Oe,{get feature(){return U(o)}});var ke=B(Oe,2),Ae=e=>{var t=ru(),n=R(t),r=R(n),a=z(r,!0),o=B(r,2),s=z(o,!0);N(n);var c=z(B(n,2),!0);N(t),V((e,t,n)=>{q(a,e),q(s,t),q(c,n)},[()=>Z(`Общий контекст фичи`,`Feature context`),()=>Z(`Скрыть`,`Hide`),()=>Q.featureContext||Z(`Контекст ещё не собран.`,`The context has not been built yet.`)]),W(`click`,o,()=>L(i,!1)),K(e,t)};J(ke,e=>{U(i)&&e(Ae)}),N(j),N(t),V((e,t,n,r,i,s,c,l,u,d)=>{q(b,e),q(x,U(o).title),q(T,`${U(o).title??``} `),q(k,`◇ ${U(o).projects.length??``} ${t??``}`),q(ne,`${U(o).reviews??``} ${n??``}`),q(re,U(o).id),q(oe,r),se.disabled=U(o).status===`archived`,q(ce,`+ ${i??``}`),le.disabled=U(a),q(ue,s),q(de,c),q(pe,l),q(he,u),q(ye,d)},[()=>Z(`Фичи`,`Features`),()=>Ni(U(o).projects.length,[`проект`,`проекта`,`проектов`],[`project`,`projects`]),()=>Ni(U(o).reviews,[`ревью`,`ревью`,`ревью`],[`review`,`reviews`]),()=>Z(`Редактировать`,`Edit`),()=>Z(`Добавить ревью`,`Add reviews`),()=>U(a)?Z(`Сборка…`,`Building…`):Z(`Скопировать контекст`,`Copy context`),()=>Z(`Команда агенту`,`Agent command`),()=>U(o).status===`archived`?Z(`Вернуть`,`Reopen`):Z(`Архивировать`,`Archive`),()=>Z(`Удалить`,`Delete`),()=>Z(`Бриф`,`Brief`)]),W(`click`,y,()=>void to()),W(`click`,ae,()=>L(r,!0)),W(`click`,se,()=>L(n,!0)),W(`click`,le,d),W(`click`,A,f),W(`click`,fe,g),W(`click`,me,h),K(e,t)};J(v,e=>{U(o)&&e(y)});var b=B(v,2),x=e=>{zl(e,{get feature(){return U(o)},onclose:()=>L(n,!1)})};J(b,e=>{U(n)&&U(o)&&e(x)});var S=B(b,2),C=e=>{Hl(e,{get feature(){return U(o)},onclose:()=>L(r,!1)})};J(S,e=>{U(r)&&U(o)&&e(C)}),K(e,_),He()}_r([`click`,`change`]);var su=G(`<div class="alert error"> </div>`),cu=G(`<div class="overlay"><button class="backdrop" type="button"></button> <div class="dialog" role="dialog" aria-modal="true"><form><div class="spread"><h2 style="margin: 0; font-size: 16px"> </h2> <button class="btn" type="button"> </button></div> <label class="field"><span> </span> <input placeholder="Checkout v2" autocomplete="off"/></label> <label class="field"><span> </span> <textarea rows="5"></textarea></label> <label class="field"><span> </span> <textarea rows="7" placeholder="openapi: 3.1.0
14
+ `).map(e=>e.trim()).filter(Boolean)})).projects,await Ya(),$(Z(`Проект обновлён`,`Project updated`),`ok`),t.onclose()}catch(e){L(a,Va(e),!0)}finally{L(i,!1)}}}var s=yl();gr(`keydown`,Yt,e=>e.key===`Escape`&&t.onclose());var c=R(s),l=B(c,2),u=R(l),d=R(u),f=R(d),p=z(f,!0),m=B(f,2),h=z(m,!0);N(d);var g=B(d,2),_=z(g,!0),v=B(g,2),y=R(v),b=z(y,!0),x=B(y,2);pi(x),N(v);var S=B(v,2),C=R(S),w=z(C,!0),T=B(C,2);$e(T);var E=z(B(T,2),!0);N(S);var D=B(S,2),O=e=>{var t=vl(),n=z(t,!0);V(()=>q(n,U(a))),K(e,t)};J(D,e=>{U(a)&&e(O)});var ee=B(D,2),k=R(ee),te=z(k,!0),ne=B(k,2),re=z(ne,!0);N(ee),N(u),N(l),N(s),V((e,n,r,a,o,s,u,d,f,m)=>{X(c,`aria-label`,e),X(l,`aria-label`,n),q(p,r),q(h,a),q(_,t.project.key),q(b,o),q(w,s),q(E,u),k.disabled=U(i),q(te,d),ne.disabled=f,q(re,m)},[()=>Z(`Закрыть`,`Close`),()=>Z(`Изменить проект`,`Edit project`),()=>Z(`Изменить проект`,`Edit project`),()=>Z(`Закрыть`,`Close`),()=>Z(`Название`,`Title`),()=>Z(`Корни рабочих копий`,`Working-copy roots`),()=>Z(`По одному пути на строку. Пустой список убирает все рабочие копии у проекта.`,`One path per line. An empty list removes all working copies from the project.`),()=>Z(`Отмена`,`Cancel`),()=>U(i)||!U(n).trim(),()=>U(i)?Z(`Сохранение…`,`Saving…`):Z(`Сохранить`,`Save`)]),W(`click`,c,function(...e){t.onclose?.apply(this,e)}),gr(`submit`,u,o),W(`click`,m,function(...e){t.onclose?.apply(this,e)}),yi(x,()=>U(n),e=>L(n,e)),yi(T,()=>U(r),e=>L(r,e)),W(`click`,k,function(...e){t.onclose?.apply(this,e)}),K(e,s),He()}_r([`click`]);var xl=[{id:`setup`,ru:`Установка и демон`,en:`Setup and daemon`,commands:[{id:`init`,usage:`revdeck init [--force] [--provider gitlab|github|auto] [--adapters a,b]`,ru:`Создаёт .revdeck.yml, ставит скилл, MCP-конфиг и адаптеры харнессов. Провайдер по умолчанию — GitLab, если git remote не распознан.`,en:`Creates .revdeck.yml, installs the skill, MCP config and harness adapters. GitLab is the default provider when the git remote is not recognized.`,example:`revdeck init --provider gitlab`},{id:`doctor`,usage:`revdeck doctor`,ru:`Проверяет Node.js, доступность glab/gh, авторизацию, демон и установленные адаптеры.`,en:`Checks Node.js, glab/gh availability, authentication, the daemon and installed adapters.`},{id:`daemon`,usage:`revdeck daemon <start|stop|restart|status|logs|install|uninstall>`,ru:`Управляет локальным демоном. install создаёт systemd user unit на Linux или launchd plist на macOS.`,en:`Manages the local daemon. install creates a systemd user unit on Linux or a launchd plist on macOS.`},{id:`ui`,usage:`revdeck ui [N]`,ru:`Открывает локальный веб-интерфейс, при необходимости сразу с ревью N.`,en:`Opens the local web UI, optionally focused on review N.`},{id:`eject`,usage:`revdeck eject [--yes] [--keep-config]`,ru:`Удаляет из проекта конфиг, скиллы, файлы команд и MCP-запись revdeck. Без --yes только показывает план.`,en:`Removes the revdeck config, skills, command files and MCP entry from the project. Without --yes it only prints the plan.`},{id:`devcontainer`,usage:`revdeck devcontainer [--write]`,ru:`Подключает devcontainer к демону и state-каталогу хоста.`,en:`Connects a devcontainer to the host daemon and state directory.`}]},{id:`projects`,ru:`Проекты и ревью`,en:`Projects and reviews`,commands:[{id:`projects`,usage:`revdeck projects`,ru:`Показывает реестр проектов, число ревью и корни рабочих копий. В UI здесь же можно добавить, переименовать и удалить проект.`,en:`Lists the project registry, review counts and working-copy roots. The UI can also add, rename and delete projects here.`},{id:`projects-add`,usage:`revdeck projects add <path>`,ru:`Регистрирует проект по рабочей копии до открытия первого ревью. Проект определяется по git remote и .revdeck.yml.`,en:`Registers a project from a working copy before its first review. The project is resolved from the git remote and .revdeck.yml.`,example:`revdeck projects add ~/work/api`},{id:`list`,usage:`revdeck list [--all] [--remote] [--project <key>]`,ru:`Показывает ревью текущего проекта; --all — всех проектов, --remote — запрашивает список с платформы.`,en:`Lists reviews of the current project; --all covers every project, --remote asks the platform.`},{id:`review`,usage:`revdeck review <N|URL>`,ru:`Ревью чужого MR: открывает ревью и отдаёт контекст с процедурой Review.md. Флаги как у context.`,en:`Reviews someone else's MR: opens the review and returns context with the Review.md procedure. Same flags as context.`,example:`revdeck review 42`},{id:`feedback`,usage:`revdeck feedback <N|URL>`,ru:`Замечания к своему MR: открывает ревью и отдаёт контекст с процедурой Feedback.md. Флаги как у context.`,en:`Works through findings on your own MR: opens the review and returns context with the Feedback.md procedure. Same flags as context.`,example:`revdeck feedback 42`},{id:`open`,usage:`revdeck open <N|URL> [<N|URL> ...] [--branch <name>]`,ru:`Загружает одно или несколько ревью без сценария. Если автор известен, подсказывает review или feedback. --platform/--project/--host задают контекст явно.`,en:`Loads one or more reviews without a scenario. When the author is known, suggests review or feedback. --platform/--project/--host set the context explicitly.`,example:`revdeck open https://gitlab.com/group/project/-/merge_requests/42`},{id:`status`,usage:`revdeck status [N]`,ru:`Показывает состояние ревью, ветки, автора и статистику изменений.`,en:`Shows the review state, branches, author and change stats.`}]},{id:`review`,ru:`Контекст и разбор ревью`,en:`Review context and analysis`,commands:[{id:`context`,usage:`revdeck context <N> [--scenario review|feedback] [--role <role>] [--shard i/N]`,ru:`Собирает контекст для агента: правила проекта, diff, треды, замечания и черновики. Сценарий, роль и шард делят работу между агентами.`,en:`Builds agent context: project rules, diff, threads, findings and drafts. Scenario, role and shard split the work between agents.`,example:`revdeck context 42 --role correctness`},{id:`threads`,usage:`revdeck threads <N>`,ru:`Показывает обсуждения ревью и их состояние.`,en:`Lists review discussions and their state.`},{id:`diff`,usage:`revdeck diff <N> [--file <path>]`,ru:`Показывает файлы и hunks diff, при необходимости только выбранный файл.`,en:`Shows diff files and hunks, optionally for one file.`},{id:`rules`,usage:`revdeck rules [<N>] [--explain <path>]`,ru:`Показывает эффективные правила проекта и объясняет, какие документы выбраны для пути.`,en:`Shows the effective project rules and explains which documents were selected for a path.`},{id:`checks`,usage:`revdeck checks <N> [--run --yes] [--ids a,b]`,ru:`Планирует проверки проекта из .revdeck.yml. Запускает их только с --run --yes.`,en:`Plans project checks from .revdeck.yml. Runs them only with --run --yes.`},{id:`stats`,usage:`revdeck stats <N>`,ru:`Аналитика ревью: решения по замечаниям, acceptance rate, треды и черновики.`,en:`Review analytics: finding decisions, acceptance rate, threads and drafts.`},{id:`scan`,usage:`revdeck scan <N>`,ru:`Сканирует diff на секреты, если включён review.secrets. Превью маскируются.`,en:`Scans the diff for secrets when review.secrets is enabled. Previews are masked.`},{id:`versions`,usage:`revdeck versions <N>`,ru:`История версий ревью по commit SHA, если включён review.history.`,en:`Review version history by commit SHA when review.history is enabled.`}]},{id:`drafting`,ru:`Черновики и публикация`,en:`Drafts and publishing`,commands:[{id:`findings`,usage:`revdeck findings <N> [list|set --file <json>|decide --id <id> --decision accept|reject|discuss]`,ru:`Читает, записывает и размечает замечания. set заменяет набор, decide фиксирует решение человека.`,en:`Reads, writes and triages findings. set replaces the set; decide records the human decision.`},{id:`summary`,usage:`revdeck summary <N> [--file <json>]`,ru:`Показывает или сохраняет выжимку ревью: scope, summary, changes и focus.`,en:`Shows or stores the review summary: scope, summary, changes and focus.`},{id:`reply`,usage:`revdeck reply <N> --thread <id> (--body <text> | --body-file <file> | -) [--resolve]`,ru:`Пишет черновик ответа в тред. --resolve добавляет намерение закрыть тред; публикует человек.`,en:`Drafts a reply in a thread. --resolve marks the intent to close it; a human publishes it.`},{id:`notes`,usage:`revdeck notes <N> <list|add|update|delete|reply>`,ru:`Комментарии человека к строкам diff. add создаёт заметку, reply отвечает агенту.`,en:`Human comments on diff lines. add creates a note; reply answers the agent.`},{id:`react`,usage:`revdeck react <N> --note <id> --emoji <name>`,ru:`Ставит или снимает реакцию на комментарий платформы.`,en:`Adds or removes a reaction on a platform comment.`},{id:`attach`,usage:`revdeck attach <N> --file <path>`,ru:`Загружает картинку или видео в платформу и печатает markdown-ссылку.`,en:`Uploads an image or video to the platform and prints its markdown link.`},{id:`publish`,usage:`revdeck publish <N> [--kind reply|finding|note] [--ids a,b] [--yes]`,ru:`Показывает точный план публикации, а с --yes публикует после подтверждения. Без --yes ничего не отправляется.`,en:`Shows the exact publish plan; with --yes publishes after confirmation. Without --yes nothing is sent.`}]},{id:`features`,ru:`Фичи`,en:`Features`,commands:[{id:`feature`,usage:`revdeck feature list|create|get|add|remove|reorder|notes|note|note-delete|context|update|archive|delete`,ru:`Кросс-проектные фичи: бриф, контракт Markdown/OpenAPI, роли ревью и заметки. Фича не публикуется целиком.`,en:`Cross-project features: brief, Markdown/OpenAPI contract, review roles and notes. A feature is never published as a whole.`,example:`revdeck feature create "Checkout v2" --brief brief.md gitlab:gitlab.com/acme/api!1`},{id:`feature-context`,usage:`revdeck feature context <id>`,ru:`Собирает контекст фичи: бриф, контракт, профили, заметки и секции по каждому ревью.`,en:`Builds feature context: brief, contract, profiles, notes and one section per review.`}]},{id:`data`,ru:`Данные и диагностика`,en:`Data and diagnostics`,commands:[{id:`config`,usage:`revdeck config [--json]`,ru:`Показывает эффективный конфиг проекта с учётом .revdeck.local.yml.`,en:`Shows the effective project config, including .revdeck.local.yml.`},{id:`export`,usage:`revdeck export <N> [--dir .revdeck]`,ru:`Выгружает ревью в старый файловый формат.`,en:`Exports a review to the legacy file format.`},{id:`import`,usage:`revdeck import <N> [--dir .revdeck]`,ru:`Импортирует ревью из старого файлового формата.`,en:`Imports a review from the legacy file format.`},{id:`mcp`,usage:`revdeck mcp`,ru:`Запускает MCP-сервер over stdio. Инструменты доступны агенту, токены остаются у демона.`,en:`Starts the MCP server over stdio. Tools are available to the agent; tokens stay with the daemon.`}]}],Sl=[{flag:`--json`,ru:`машинный вывод`,en:`machine-readable output`},{flag:`--root <path>`,ru:`рабочая копия репозитория`,en:`repository working-copy root`},{flag:`--review <id>`,ru:`id ревью`,en:`review id`},{flag:`--lang ru|en`,ru:`язык CLI`,en:`CLI language`},{flag:`--help`,ru:`справка`,en:`help`}],Cl=[{keys:`1–5`,ru:`вкладки ревью`,en:`review tabs`},{keys:`o`,ru:`открыть ревью`,en:`open a review`},{keys:`r`,ru:`обновить ревью`,en:`refresh the review`},{keys:`s`,ru:`скрыть/показать сайдбар`,en:`hide/show the sidebar`},{keys:`p`,ru:`проекты или публикация`,en:`projects or publish`},{keys:`?`,ru:`палитра команд`,en:`command palette`},{keys:`h`,ru:`справка по командам`,en:`command reference`}],wl=G(`<button class="help-example" type="button"><span class="mono"> </span></button>`),Tl=G(`<article class="help-command"><div class="help-command-head"><button class="help-usage" type="button"><code> </code> <span class="help-copy">⧉</span></button></div> <p> </p> <!></article>`),El=G(`<section class="help-group"><h2> </h2> <div class="help-commands"></div></section>`),Dl=G(`<p class="muted"> </p>`),Ol=G(`<span class="help-chip"><code> </code> </span>`),kl=G(`<span class="help-chip"><kbd> </kbd> </span>`),Al=G(`<section class="help-page"><header class="projects-home-head"><div><h1> </h1> <p class="muted"> </p></div> <button class="btn" type="button"> </button></header> <label class="help-search"><span aria-hidden="true">⌕</span> <input autocomplete="off"/></label> <!> <section class="help-group"><h2> </h2> <div class="help-chips"></div></section> <section class="help-group"><h2> </h2> <div class="help-chips"></div></section></section>`);function jl(e,t){Ve(t,!0);let n=I(``),r=P(()=>xl.map(e=>({...e,commands:e.commands.filter(e=>{let t=U(n).trim().toLowerCase();return!t||`${e.usage} ${e.ru} ${e.en} ${e.example??``}`.toLowerCase().includes(t)})})).filter(e=>e.commands.length));function i(e){return ji.locale===`ru`?e.ru:e.en}function a(e){navigator.clipboard?.writeText(e).then(()=>$(Z(`Команда скопирована`,`Command copied`),`ok`),()=>$(Z(`Не удалось скопировать`,`Could not copy`),`error`))}var o=Al(),s=R(o),c=R(s),l=R(c),u=z(l,!0),d=z(B(l,2),!0);N(c);var f=B(c,2),p=z(f,!0);N(s);var m=B(s,2),h=B(R(m),2);pi(h),N(m);var g=B(m,2);Y(g,17,()=>U(r),e=>e.id,(e,t)=>{var n=El(),r=R(n),o=z(r,!0),s=B(r,2);Y(s,21,()=>U(t).commands,e=>e.id,(e,t)=>{var n=Tl(),r=R(n),o=R(r),s=z(R(o),!0);xe(2),N(o),N(r);var c=B(r,2),l=z(c,!0),u=B(c,2),d=e=>{var n=wl(),r=z(R(n),!0);N(n),V(e=>{X(n,`title`,e),q(r,U(t).example)},[()=>Z(`Скопировать пример`,`Copy example`)]),W(`click`,n,()=>a(U(t).example)),K(e,n)};J(u,e=>{U(t).example&&e(d)}),N(n),V((e,n)=>{X(o,`title`,e),q(s,U(t).usage),q(l,n)},[()=>Z(`Скопировать команду`,`Copy command`),()=>i(U(t))]),W(`click`,o,()=>a(U(t).usage)),K(e,n)}),N(s),N(n),V(e=>q(o,e),[()=>i(U(t))]),K(e,n)},e=>{var t=Dl(),n=z(t,!0);V(e=>q(n,e),[()=>Z(`Ничего не найдено.`,`Nothing found.`)]),K(e,t)});var _=B(g,2),v=R(_),y=z(v,!0),b=B(v,2);Y(b,21,()=>Sl,e=>e.flag,(e,t)=>{var n=Ol(),r=R(n),a=z(r,!0),o=B(r);N(n),V(e=>{q(a,U(t).flag),q(o,` ${e??``}`)},[()=>i(U(t))]),K(e,n)}),N(b),N(_);var x=B(_,2),S=R(x),C=z(S,!0),w=B(S,2);Y(w,21,()=>Cl,e=>e.keys,(e,t)=>{var n=kl(),r=R(n),a=z(r,!0),o=B(r);N(n),V(e=>{q(a,U(t).keys),q(o,` ${e??``}`)},[()=>i(U(t))]),K(e,n)}),N(w),N(x),N(o),V((e,t,n,r,i,a)=>{q(u,e),q(d,t),q(p,n),X(h,`placeholder`,r),q(y,i),q(C,a)},[()=>Z(`Справка по командам`,`Command reference`),()=>Z(`Все команды revdeck для терминала. Клик по команде копирует её. Агент получает те же возможности через MCP.`,`Every revdeck terminal command. Click a command to copy it. Agents get the same capabilities through MCP.`),()=>Z(`К проектам`,`Projects`),()=>Z(`Найти команду или флаг…`,`Find a command or flag…`),()=>Z(`Общие флаги`,`Common flags`),()=>Z(`Горячие клавиши интерфейса`,`UI shortcuts`)]),W(`click`,f,()=>io()),yi(h,()=>U(n),e=>L(n,e)),K(e,o),He()}_r([`click`]);var Ml=G(`<span class="badge"> </span>`),Nl=G(`<label><input type="checkbox"/> <span class="project-dot"></span> <span class="review-picker-text"><span class="review-picker-title"> </span> <span class="review-picker-meta"> </span></span> <!></label>`),Pl=G(`<p class="muted small"> </p>`),Fl=G(`<div class="review-picker"><input class="project-home-search" autocomplete="off"/> <div class="review-picker-list"></div></div>`);function Il(e,t){Ve(t,!0);let n=Di(t,`exclude`,19,()=>[]),r=I(``),i=P(()=>new Set(n())),a=P(()=>t.reviews.filter(e=>{let t=U(r).trim().toLowerCase();return!t||`${e.projectKey} ${e.project} #${e.number} ${e.title}`.toLowerCase().includes(t)}));function o(e){U(i).has(e)||t.onchange(t.selected.includes(e)?t.selected.filter(t=>t!==e):[...t.selected,e])}var s=Fl(),c=R(s);pi(c);var l=B(c,2);Y(l,21,()=>U(a),e=>e.id,(e,n)=>{var r=Nl();let a;var s=R(r);pi(s);var c=B(s,2),l=B(c,2),u=R(l),d=z(u),f=z(B(u,2));N(l);var p=B(l,2),m=e=>{var t=Ml(),n=z(t,!0);V(e=>q(n,e),[()=>Z(`уже в фиче`,`in feature`)]),K(e,t)},h=P(()=>U(i).has(U(n).id));J(p,e=>{U(h)&&e(m)}),N(r),V((e,t,i,o)=>{a=$r(r,1,`review-picker-row`,null,a,{added:e}),hi(s,t),s.disabled=i,ti(c,o),q(d,`#${U(n).number??``} ${U(n).title??``}`),q(f,`${U(n).project??``} · ${U(n).state??``}`)},[()=>U(i).has(U(n).id),()=>t.selected.includes(U(n).id),()=>U(i).has(U(n).id),()=>`--project-color:${ka(U(n).projectKey)}`]),W(`change`,s,()=>o(U(n).id)),K(e,r)},e=>{var t=Pl(),n=z(t,!0);V(e=>q(n,e),[()=>Z(`Ревью не найдены.`,`No reviews found.`)]),K(e,t)}),N(l),N(s),V(e=>X(c,`placeholder`,e),[()=>Z(`Найти ревью…`,`Find a review…`)]),yi(c,()=>U(r),e=>L(r,e)),K(e,s),He()}_r([`change`]);var Ll=G(`<div class="alert error"> </div>`),Rl=G(`<div class="overlay"><button class="backdrop" type="button"></button> <div class="dialog" role="dialog" aria-modal="true"><div class="spread"><h2 style="margin: 0; font-size: 16px"> </h2> <button class="btn" type="button"> </button></div> <!> <!> <div class="row end" style="margin-top: 14px"><button class="btn" type="button"> </button> <button class="btn primary" type="button"> </button></div></div></div>`);function zl(e,t){Ve(t,!0);let n=I(Kt([])),r=I(Kt([])),i=I(!1),a=I(``),o=P(()=>t.feature.members.map(e=>e.review.id));Oi(()=>{Bi().then(e=>{L(n,e.reviews,!0)}).catch(e=>{L(a,Va(e),!0)})});async function s(){if(U(r).length&&!U(i)){L(i,!0),L(a,``);try{await ya(t.feature.id,U(r).map(e=>({review:e}))),await $a(t.feature.id,{push:!1}),await Za(),$(Z(`Ревью добавлены в фичу`,`Reviews added to the feature`),`ok`),t.onclose()}catch(e){L(a,Va(e),!0)}finally{L(i,!1)}}}var c=Rl();gr(`keydown`,Yt,e=>e.key===`Escape`&&t.onclose());var l=R(c),u=B(l,2),d=R(u),f=R(d),p=z(f,!0),m=B(f,2),h=z(m,!0);N(d);var g=B(d,2);Il(g,{get reviews(){return U(n)},get selected(){return U(r)},get exclude(){return U(o)},onchange:e=>L(r,e,!0)});var _=B(g,2),v=e=>{var t=Ll(),n=z(t,!0);V(()=>q(n,U(a))),K(e,t)};J(_,e=>{U(a)&&e(v)});var y=B(_,2),b=R(y),x=z(b,!0),S=B(b,2),C=z(S,!0);N(y),N(u),N(c),V((e,t,n,a,o,s)=>{X(l,`aria-label`,e),X(u,`aria-label`,t),q(p,n),q(h,a),b.disabled=U(i),q(x,o),S.disabled=U(i)||!U(r).length,q(C,s)},[()=>Z(`Закрыть`,`Close`),()=>Z(`Добавить ревью`,`Add reviews`),()=>Z(`Добавить ревью в фичу`,`Add reviews to feature`),()=>Z(`Закрыть`,`Close`),()=>Z(`Отмена`,`Cancel`),()=>U(i)?Z(`Добавление…`,`Adding…`):Z(`Добавить`,`Add`)]),W(`click`,l,function(...e){t.onclose?.apply(this,e)}),W(`click`,m,function(...e){t.onclose?.apply(this,e)}),W(`click`,b,function(...e){t.onclose?.apply(this,e)}),W(`click`,S,s),K(e,c),He()}_r([`click`]);var Bl=G(`<div class="alert error"> </div>`),Vl=G(`<div class="overlay"><button class="backdrop" type="button"></button> <div class="dialog" role="dialog" aria-modal="true"><form><div class="spread"><h2 style="margin: 0; font-size: 16px"> </h2> <button class="btn" type="button"> </button></div> <label class="field"><span> </span> <input autocomplete="off"/></label> <label class="field"><span> </span> <textarea rows="6"></textarea></label> <label class="field"><span> </span> <textarea rows="8"></textarea></label> <!> <div class="row end" style="margin-top: 14px"><button class="btn" type="button"> </button> <button class="btn primary" type="submit"> </button></div></form></div></div>`);function Hl(e,t){Ve(t,!0);let n=I(Kt(t.feature.title)),r=I(Kt(t.feature.brief)),i=I(Kt(t.feature.contract)),a=I(!1),o=I(``);async function s(e){if(e.preventDefault(),U(n).trim()&&!U(a)){L(a,!0);try{await va(t.feature.id,{title:U(n).trim(),brief:U(r),contract:U(i)}),await $a(t.feature.id,{push:!1}),await Za(),$(Z(`Фича обновлена`,`Feature updated`),`ok`),t.onclose()}catch(e){L(o,Va(e),!0)}finally{L(a,!1)}}}var c=Vl();gr(`keydown`,Yt,e=>e.key===`Escape`&&t.onclose());var l=R(c),u=B(l,2),d=R(u),f=R(d),p=R(f),m=z(p,!0),h=B(p,2),g=z(h,!0);N(f);var _=B(f,2),v=R(_),y=z(v,!0),b=B(v,2);pi(b),N(_);var x=B(_,2),S=R(x),C=z(S,!0),w=B(S,2);$e(w),N(x);var T=B(x,2),E=R(T),D=z(E,!0),O=B(E,2);$e(O),N(T);var ee=B(T,2),k=e=>{var t=Bl(),n=z(t,!0);V(()=>q(n,U(o))),K(e,t)};J(ee,e=>{U(o)&&e(k)});var te=B(ee,2),ne=R(te),re=z(ne,!0),ie=B(ne,2),ae=z(ie,!0);N(te),N(d),N(u),N(c),V((e,t,n,r,i,o,s,c,d,f)=>{X(l,`aria-label`,e),X(u,`aria-label`,t),q(m,n),q(g,r),q(y,i),q(C,o),q(D,s),ne.disabled=U(a),q(re,c),ie.disabled=d,q(ae,f)},[()=>Z(`Закрыть`,`Close`),()=>Z(`Редактировать фичу`,`Edit feature`),()=>Z(`Редактировать фичу`,`Edit feature`),()=>Z(`Закрыть`,`Close`),()=>Z(`Название`,`Title`),()=>Z(`Бриф`,`Brief`),()=>Z(`Контракт API (OpenAPI или Markdown)`,`API contract (OpenAPI or Markdown)`),()=>Z(`Отмена`,`Cancel`),()=>U(a)||!U(n).trim(),()=>U(a)?Z(`Сохранение…`,`Saving…`):Z(`Сохранить`,`Save`)]),W(`click`,l,function(...e){t.onclose?.apply(this,e)}),gr(`submit`,d,s),W(`click`,h,function(...e){t.onclose?.apply(this,e)}),yi(b,()=>U(n),e=>L(n,e)),yi(w,()=>U(r),e=>L(r,e)),yi(O,()=>U(i),e=>L(i,e)),W(`click`,ne,function(...e){t.onclose?.apply(this,e)}),K(e,c),He()}_r([`click`]);var Ul=G(`<p class="feature-note-body"> </p>`),Wl=G(`<article class="feature-note"><div class="row" style="justify-content: space-between; align-items: flex-start"><div class="row" style="gap: 7px; align-items: center"><span> </span> <strong> </strong></div> <button class="btn danger" type="button">×</button></div> <!> <div class="muted small"> </div></article>`),Gl=G(`<div class="feature-note-list"></div>`),Kl=G(`<p class="muted"> </p>`),ql=G(`<select><option>blocker</option><option>major</option><option>minor</option><option>question</option></select>`),Jl=G(`<section class="card feature-notes"><div class="card-title"> </div> <p class="muted small"> </p> <!> <form class="feature-note-form"><div class="row"><select><option> </option><option> </option></select> <!> <input class="feature-note-title" autocomplete="off"/></div> <textarea rows="3"></textarea> <div class="row end"><button class="btn" type="submit"> </button></div></form></section>`);function Yl(e,t){Ve(t,!0);let n=I(``),r=I(``),i=I(`note`),a=I(`major`),o=I(!1);async function s(e){if(e.preventDefault(),U(n).trim()&&!U(o)){L(o,!0);try{await Ca(t.feature.id,{kind:U(i),...U(i)===`finding`?{level:U(a)}:{},title:U(n).trim(),body:U(r)}),L(n,``),L(r,``),await $a(t.feature.id,{push:!1}),await Za()}catch(e){$(Va(e),`error`)}finally{L(o,!1)}}}async function c(e){if(confirm(Z(`Удалить заметку?`,`Delete the note?`)))try{await wa(t.feature.id,e),await $a(t.feature.id,{push:!1}),await Za()}catch(e){$(Va(e),`error`)}}var l=Jl(),u=R(l),d=z(u,!0),f=B(u,2),p=z(f,!0),m=B(f,2),h=e=>{var n=Gl();Y(n,21,()=>t.feature.notes,e=>e.id,(e,t)=>{var n=Wl(),r=R(n),i=R(r),a=R(i),o=z(a),s=z(B(a,2),!0);N(i);var l=B(i,2);N(r);var u=B(r,2),d=e=>{var n=Ul(),r=z(n,!0);V(()=>q(r,U(t).body)),K(e,n)},f=P(()=>U(t).body.trim());J(u,e=>{U(f)&&e(d)});var p=z(B(u,2));N(n),V((e,n,r)=>{$r(a,1,`badge ${(U(t).kind===`finding`?U(t).level||`major`:``)??``}`),q(o,`${U(t).kind??``}${U(t).level&&U(t).kind===`finding`?` · ${U(t).level}`:``}`),q(s,U(t).title),X(l,`title`,e),X(l,`aria-label`,n),q(p,`${U(t).author??``} · ${r??``}`)},[()=>Z(`Удалить`,`Delete`),()=>Z(`Удалить`,`Delete`),()=>new Date(U(t).createdAt).toLocaleString()]),W(`click`,l,()=>void c(U(t).id)),K(e,n)}),N(n),K(e,n)},g=e=>{var t=Kl(),n=z(t,!0);V(e=>q(n,e),[()=>Z(`Заметок пока нет.`,`No notes yet.`)]),K(e,t)};J(m,e=>{t.feature.notes.length?e(h):e(g,-1)});var _=B(m,2),v=R(_),y=R(v),b=R(y),x=z(b,!0);b.value=b.__value=`note`;var S=B(b),C=z(S,!0);S.value=S.__value=`finding`,N(y),ai(y);var w=B(y,2),T=e=>{var t=ql(),n=R(t);n.value=n.__value=`blocker`;var r=B(n);r.value=r.__value=`major`;var i=B(r);i.value=i.__value=`minor`;var o=B(i);o.value=o.__value=`question`,N(t),ai(t),V(e=>X(t,`aria-label`,e),[()=>Z(`Уровень`,`Level`)]),oi(t,()=>U(a),e=>L(a,e)),K(e,t)};J(w,e=>{U(i)===`finding`&&e(T)});var E=B(w,2);pi(E),N(v);var D=B(v,2);$e(D);var O=B(D,2),ee=R(O),k=z(ee,!0);N(O),N(_),N(l),V((e,t,n,r,i,a,o,s,c)=>{q(d,e),q(p,t),X(y,`aria-label`,n),q(x,r),q(C,i),X(E,`placeholder`,a),X(D,`placeholder`,o),ee.disabled=s,q(k,c)},[()=>Z(`Заметки фичи`,`Feature notes`),()=>Z(`Кросс-проектные заметки. Не публикуются; конкретные правки остаются в ревью.`,`Cross-project notes. Never published; actionable changes stay on reviews.`),()=>Z(`Тип заметки`,`Note kind`),()=>Z(`заметка`,`note`),()=>Z(`находка`,`finding`),()=>Z(`Заголовок`,`Title`),()=>Z(`Кросс-проектный вывод, вопрос по контракту…`,`Cross-project observation, contract question…`),()=>U(o)||!U(n).trim(),()=>U(o)?Z(`Сохранение…`,`Saving…`):Z(`Добавить заметку`,`Add note`)]),gr(`submit`,_,s),oi(y,()=>U(i),e=>L(i,e)),yi(E,()=>U(n),e=>L(n,e)),yi(D,()=>U(r),e=>L(r,e)),K(e,l),He()}_r([`click`]);var Xl=G(`<span class="badge"> </span>`),Zl=G(`<div class="alert error"> </div>`),Ql=G(`<p class="muted"> </p>`),$l=G(`<div class="card feature-brief"><div class="card-title"> </div> <pre class="feature-contract"> </pre></div>`),eu=G(`<div class="feature-member"><input class="feature-role-input"/> <div class="feature-member-text"><button class="feature-member-title" type="button"> </button> <div class="muted small"> </div></div> <button class="btn" type="button">↑</button> <button class="btn" type="button">↓</button> <button class="btn" type="button"> </button> <button class="btn danger" type="button">×</button></div>`),tu=G(`<section class="card feature-project"><div class="feature-project-head"><span class="project-dot"></span> <span class="feature-project-name"> </span> <span class="muted small"> </span> <span class="badge"> </span></div> <!></section>`),nu=G(`<div class="card"><p class="muted"> </p></div>`),ru=G(`<div class="card feature-context"><div class="card-head"><div class="card-title"> </div> <button class="btn" type="button"> </button></div> <pre> </pre></div>`),iu=G(`<section class="feature-page"><header class="feature-page-head"><div class="breadcrumbs"><button class="breadcrumb-link" type="button"> </button> <span class="sep">/</span> <span class="cur"> </span></div> <div class="feature-title-row"><div style="min-width: 0; flex: 1"><h1> <!></h1> <div class="feature-meta"><span class="badge"> </span> <span class="badge"> </span> <span class="muted small"> </span></div></div> <div class="feature-actions"><button class="btn" type="button"> </button> <button class="btn primary" type="button"> </button> <button class="btn" type="button"> </button> <button class="btn" type="button"> </button> <button class="btn" type="button"> </button> <button class="btn danger" type="button"> </button></div></div></header> <!> <div class="feature-body"><div class="card feature-brief"><div class="card-title"> </div> <!></div> <!> <div class="feature-projects"></div> <!> <!></div></section>`),au=G(`<!> <!> <!>`,1);function ou(e,t){Ve(t,!0);let n=I(!1),r=I(!1),i=I(!1),a=I(!1),o=P(()=>Q.feature),s=P(()=>{let e=Q.feature;if(!e)return[];let t=new Map;for(let n of e.members){let r=e.projects.find(e=>e.key===n.review.projectKey),i=t.get(n.review.projectKey)??{key:n.review.projectKey,title:r?.title??n.review.project,host:r?.host??``,project:r?.project??n.review.project,members:[]};i.members.push(n),t.set(n.review.projectKey,i)}return[...t.values()]});async function c(e){await oo(e)}async function l(e,t){if(U(o))try{await ya(U(o).id,[{review:e,role:t}]),await $a(U(o).id,{push:!1})}catch(e){$(e instanceof Error?e.message:String(e),`error`)}}async function u(e){if(U(o)&&confirm(Z(`Убрать #${e.review.number} из фичи? Ревью останется в проекте.`,`Remove #${e.review.number} from the feature? The review stays in its project.`)))try{await ba(U(o).id,e.review.id),await $a(U(o).id,{push:!1}),await Za(),$(Z(`Ревью убрано из фичи`,`Review removed from the feature`),`ok`)}catch(e){$(e instanceof Error?e.message:String(e),`error`)}}async function d(){if(U(o)){L(a,!0);try{await eo(U(o).id),L(i,!0),Q.featureContext&&(await navigator.clipboard?.writeText(Q.featureContext),$(Z(`Контекст фичи скопирован`,`Feature context copied`),`ok`))}catch(e){$(e instanceof Error?e.message:String(e),`error`)}finally{L(a,!1)}}}async function f(){if(!U(o))return;let e=`REVDECK_FEATURE=${U(o).id} revdeck mcp`;try{await navigator.clipboard?.writeText(e),$(Z(`Команда для агента скопирована`,`Agent command copied`),`ok`)}catch{$(Z(`Не удалось скопировать`,`Could not copy`),`error`)}}function p(e,t){if(!U(o))return null;let n=U(o).members.find(t=>t.review.id===e);if(!n)return null;let r=U(o).members.filter(e=>e.review.projectKey===n.review.projectKey);return r[r.findIndex(t=>t.review.id===e)+t]?.review.id??null}async function m(e,t){if(!U(o))return;let n=p(e,t);if(!n)return;let r=U(o).members.map(e=>e.review.id),i=r.indexOf(e),a=r.indexOf(n);if(!(i<0||a<0)){[r[i],r[a]]=[r[a],r[i]];try{await Ta(U(o).id,r),await $a(U(o).id,{push:!1})}catch(e){$(e instanceof Error?e.message:String(e),`error`)}}}async function h(){if(U(o)&&confirm(Z(`Удалить фичу «${U(o).title}»? Ревью останутся в проектах.`,`Delete feature “${U(o).title}”? Reviews stay in their projects.`)))try{await Ea(U(o).id),await Za(),await to(!1)}catch(e){$(e instanceof Error?e.message:String(e),`error`)}}async function g(){if(U(o))try{let e=U(o).status===`archived`;await va(U(o).id,{status:e?`open`:`archived`}),await $a(U(o).id,{push:!1}),await Za(),$(e?Z(`Фича возвращена`,`Feature reopened`):Z(`Фича архивирована`,`Feature archived`),`ok`)}catch(e){$(e instanceof Error?e.message:String(e),`error`)}}var _=au(),v=rn(_),y=e=>{var t=iu(),_=R(t),v=R(_),y=R(v),b=z(y,!0),x=z(B(y,4),!0);N(v);var S=B(v,2),C=R(S),w=R(C),T=R(w),E=B(T),D=e=>{var t=Xl(),n=z(t,!0);V(e=>q(n,e),[()=>Z(`архив`,`archived`)]),K(e,t)};J(E,e=>{U(o).status===`archived`&&e(D)}),N(w);var O=B(w,2),ee=R(O),k=z(ee),te=B(ee,2),ne=z(te),re=z(B(te,2),!0);N(O),N(C);var ie=B(C,2),ae=R(ie),oe=z(ae,!0),se=B(ae,2),ce=z(se),le=B(se,2),ue=z(le,!0),A=B(le,2),de=z(A,!0),fe=B(A,2),pe=z(fe,!0),me=B(fe,2),he=z(me,!0);N(ie),N(S),N(_);var ge=B(_,2),_e=e=>{var t=Zl(),n=z(t,!0);V(()=>q(n,Q.error)),K(e,t)};J(ge,e=>{Q.error&&e(_e)});var j=B(ge,2),ve=R(j),M=R(ve),ye=z(M,!0),be=B(M,2),xe=e=>{Fo(e,{get source(){return U(o).brief}})},Se=P(()=>U(o).brief.trim()),Ce=e=>{var t=Ql(),n=z(t,!0);V(e=>q(n,e),[()=>Z(`Бриф не заполнен. Опишите цель, non-goals и порядок выката — агент прочитает это первым.`,`The brief is empty. Describe the goal, non-goals and rollout order; the agent reads it first.`)]),K(e,t)};J(be,e=>{U(Se)?e(xe):e(Ce,-1)}),N(ve);var we=B(ve,2),Te=e=>{var t=$l(),n=R(t),r=z(n,!0),i=z(B(n,2),!0);N(t),V(e=>{q(r,e),q(i,U(o).contract)},[()=>Z(`Контракт API`,`API contract`)]),K(e,t)},Ee=P(()=>U(o).contract.trim());J(we,e=>{U(Ee)&&e(Te)});var De=B(we,2);Y(De,21,()=>U(s),e=>e.key,(e,t)=>{var n=tu(),r=R(n),i=R(r),a=B(i,2),o=z(a,!0),s=B(a,2),d=z(s),f=z(B(s,2),!0);N(r),Y(B(r,2),17,()=>U(t).members,e=>e.review.id,(e,t)=>{var n=eu(),r=R(n);pi(r);var i=B(r,2),a=R(i),o=z(a),s=z(B(a,2));N(i);var d=B(i,2),f=B(d,2),h=B(f,2),g=z(h,!0),_=B(h,2);N(n),V((e,n,i,a,c,l,u,p,m,h,v)=>{mi(r,U(t).role),X(r,`placeholder`,e),X(r,`title`,n),q(o,`#${U(t).review.number??``} ${U(t).review.title??``}`),q(s,`${U(t).review.state??``} · ${U(t).review.webUrl??``}`),X(d,`title`,i),X(d,`aria-label`,a),d.disabled=c,X(f,`title`,l),X(f,`aria-label`,u),f.disabled=p,q(g,m),X(_,`title`,h),X(_,`aria-label`,v)},[()=>Z(`роль`,`role`),()=>Z(`Роль ревью в фиче`,`Review role in the feature`),()=>Z(`Выше`,`Move up`),()=>Z(`Выше`,`Move up`),()=>!p(U(t).review.id,-1),()=>Z(`Ниже`,`Move down`),()=>Z(`Ниже`,`Move down`),()=>!p(U(t).review.id,1),()=>Z(`Открыть`,`Open`),()=>Z(`Убрать из фичи`,`Remove from feature`),()=>Z(`Убрать из фичи`,`Remove from feature`)]),W(`change`,r,e=>void l(U(t).review.id,e.currentTarget.value)),W(`click`,a,()=>void c(U(t).review.id)),W(`click`,d,()=>void m(U(t).review.id,-1)),W(`click`,f,()=>void m(U(t).review.id,1)),W(`click`,h,()=>void c(U(t).review.id)),W(`click`,_,()=>void u(U(t))),K(e,n)}),N(n),V(e=>{ti(i,e),q(o,U(t).title),q(d,`${U(t).host??``}/${U(t).project??``}`),q(f,U(t).members.length)},[()=>`--project-color:${ka(U(t).key)}`]),K(e,n)},e=>{var t=nu(),n=z(R(t),!0);N(t),V(e=>q(n,e),[()=>Z(`В фиче пока нет ревью. Добавьте MR из нужных проектов.`,`No reviews in the feature yet. Add MRs from the projects you need.`)]),K(e,t)}),N(De);var Oe=B(De,2);Yl(Oe,{get feature(){return U(o)}});var ke=B(Oe,2),Ae=e=>{var t=ru(),n=R(t),r=R(n),a=z(r,!0),o=B(r,2),s=z(o,!0);N(n);var c=z(B(n,2),!0);N(t),V((e,t,n)=>{q(a,e),q(s,t),q(c,n)},[()=>Z(`Общий контекст фичи`,`Feature context`),()=>Z(`Скрыть`,`Hide`),()=>Q.featureContext||Z(`Контекст ещё не собран.`,`The context has not been built yet.`)]),W(`click`,o,()=>L(i,!1)),K(e,t)};J(ke,e=>{U(i)&&e(Ae)}),N(j),N(t),V((e,t,n,r,i,s,c,l,u,d)=>{q(b,e),q(x,U(o).title),q(T,`${U(o).title??``} `),q(k,`◇ ${U(o).projects.length??``} ${t??``}`),q(ne,`${U(o).reviews??``} ${n??``}`),q(re,U(o).id),q(oe,r),se.disabled=U(o).status===`archived`,q(ce,`+ ${i??``}`),le.disabled=U(a),q(ue,s),q(de,c),q(pe,l),q(he,u),q(ye,d)},[()=>Z(`Фичи`,`Features`),()=>Ni(U(o).projects.length,[`проект`,`проекта`,`проектов`],[`project`,`projects`]),()=>Ni(U(o).reviews,[`ревью`,`ревью`,`ревью`],[`review`,`reviews`]),()=>Z(`Редактировать`,`Edit`),()=>Z(`Добавить ревью`,`Add reviews`),()=>U(a)?Z(`Сборка…`,`Building…`):Z(`Скопировать контекст`,`Copy context`),()=>Z(`Команда агенту`,`Agent command`),()=>U(o).status===`archived`?Z(`Вернуть`,`Reopen`):Z(`Архивировать`,`Archive`),()=>Z(`Удалить`,`Delete`),()=>Z(`Бриф`,`Brief`)]),W(`click`,y,()=>void to()),W(`click`,ae,()=>L(r,!0)),W(`click`,se,()=>L(n,!0)),W(`click`,le,d),W(`click`,A,f),W(`click`,fe,g),W(`click`,me,h),K(e,t)};J(v,e=>{U(o)&&e(y)});var b=B(v,2),x=e=>{zl(e,{get feature(){return U(o)},onclose:()=>L(n,!1)})};J(b,e=>{U(n)&&U(o)&&e(x)});var S=B(b,2),C=e=>{Hl(e,{get feature(){return U(o)},onclose:()=>L(r,!1)})};J(S,e=>{U(r)&&U(o)&&e(C)}),K(e,_),He()}_r([`click`,`change`]);var su=G(`<div class="alert error"> </div>`),cu=G(`<div class="overlay"><button class="backdrop" type="button"></button> <div class="dialog" role="dialog" aria-modal="true"><form><div class="spread"><h2 style="margin: 0; font-size: 16px"> </h2> <button class="btn" type="button"> </button></div> <label class="field"><span> </span> <input placeholder="Checkout v2" autocomplete="off"/></label> <label class="field"><span> </span> <textarea rows="5"></textarea></label> <label class="field"><span> </span> <textarea rows="7" placeholder="openapi: 3.1.0
15
15
  paths:
16
16
  /refunds:
17
17
  post: ..."></textarea></label> <div class="field"><span> </span> <!></div> <!> <div class="row end" style="margin-top: 14px"><button class="btn" type="button"> </button> <button class="btn primary" type="submit"> </button></div></form></div></div>`);function lu(e,t){Ve(t,!0);let n=I(``),r=I(``),i=I(``),a=I(Kt([])),o=I(Kt(t.preselect?[t.preselect]:[])),s=I(!1),c=I(``);Oi(()=>{Bi().then(e=>{L(a,e.reviews,!0)}).catch(e=>{L(c,e instanceof Error?e.message:String(e),!0)})});async function l(e){if(e.preventDefault(),U(n).trim()&&!U(s)){L(s,!0),L(c,``);try{let{feature:e}=await _a({title:U(n).trim(),...U(r).trim()?{brief:U(r)}:{},...U(i).trim()?{contract:U(i)}:{},...U(o).length?{reviews:U(o).map(e=>({review:e}))}:{}});await Za(),await $a(e.id),t.onclose()}catch(e){L(c,e instanceof Error?e.message:String(e),!0)}finally{L(s,!1)}}}var u=cu();gr(`keydown`,Yt,e=>e.key===`Escape`&&t.onclose());var d=R(u),f=B(d,2),p=R(f),m=R(p),h=R(m),g=z(h,!0),_=B(h,2),v=z(_,!0);N(m);var y=B(m,2),b=R(y),x=z(b,!0),S=B(b,2);pi(S),N(y);var C=B(y,2),w=R(C),T=z(w,!0),E=B(w,2);$e(E),N(C);var D=B(C,2),O=R(D),ee=z(O,!0),k=B(O,2);$e(k),N(D);var te=B(D,2),ne=R(te),re=z(ne,!0);Il(B(ne,2),{get reviews(){return U(a)},get selected(){return U(o)},onchange:e=>L(o,e,!0)}),N(te);var ie=B(te,2),ae=e=>{var t=su(),n=z(t,!0);V(()=>q(n,U(c))),K(e,t)};J(ie,e=>{U(c)&&e(ae)});var oe=B(ie,2),se=R(oe),ce=z(se,!0),le=B(se,2),ue=z(le,!0);N(oe),N(p),N(f),N(u),V((e,t,n,r,i,a,o,c,l,u,p,m)=>{X(d,`aria-label`,e),X(f,`aria-label`,t),q(g,n),q(v,r),q(x,i),q(T,a),X(E,`placeholder`,o),q(ee,c),q(re,l),se.disabled=U(s),q(ce,u),le.disabled=p,q(ue,m)},[()=>Z(`Закрыть`,`Close`),()=>Z(`Новая фича`,`New feature`),()=>Z(`Новая фича`,`New feature`),()=>Z(`Закрыть`,`Close`),()=>Z(`Название`,`Title`),()=>Z(`Бриф`,`Brief`),()=>Z(`Цель, non-goals, порядок выката…`,`Goal, non-goals, rollout order…`),()=>Z(`Контракт API (OpenAPI или Markdown)`,`API contract (OpenAPI or Markdown)`),()=>Z(`Ревью в фиче`,`Reviews in the feature`),()=>Z(`Отмена`,`Cancel`),()=>U(s)||!U(n).trim(),()=>U(s)?Z(`Создание…`,`Creating…`):Z(`Создать фичу`,`Create feature`)]),W(`click`,d,function(...e){t.onclose?.apply(this,e)}),gr(`submit`,p,l),W(`click`,_,function(...e){t.onclose?.apply(this,e)}),yi(S,()=>U(n),e=>L(n,e)),yi(E,()=>U(r),e=>L(r,e)),yi(k,()=>U(i),e=>L(i,e)),W(`click`,se,function(...e){t.onclose?.apply(this,e)}),K(e,u),He()}_r([`click`]);var uu=G(`<div class="alert error"> </div>`),du=G(`<span class="badge"> </span>`),fu=G(`<span class="project-dot"></span>`),pu=G(`<button class="feature-list-row" type="button"><span class="feature-list-main"><span class="feature-list-title"> <!></span> <span class="muted small"> </span></span> <span class="feature-list-projects"></span></button>`),mu=G(`<div class="feature-list"></div>`),hu=G(`<p class="muted"> </p>`),gu=G(`<div class="card"><div class="card-title"> </div> <p class="muted"> </p></div>`),_u=G(`<section class="feature-list-page"><header class="feature-page-head"><div class="breadcrumbs"><span class="cur"> </span></div> <div class="feature-title-row"><div style="min-width: 0; flex: 1"><h1> </h1> <p class="muted"> </p></div> <div class="feature-actions"><input class="project-home-search" autocomplete="off"/> <button class="btn primary" type="button"> </button></div></div> <label class="muted small row" style="gap: 6px; margin-top: 8px"><input type="checkbox"/> </label></header> <div class="feature-body"><!> <!> <!></div></section> <!>`,1);function vu(e,t){Ve(t,!0);let n=I(Kt([])),r=I(``),i=I(!1),a=I(!1),o=I(``),s=P(()=>U(n).filter(e=>{if(!U(i)&&e.status===`archived`)return!1;let t=U(r).trim().toLowerCase();return!t||`${e.id} ${e.title} ${e.brief} ${e.projects.map(e=>e.key).join(` `)}`.toLowerCase().includes(t)}));async function c(){try{L(n,(await ha(void 0,!0)).features,!0)}catch(e){L(o,Va(e),!0)}}Oi(()=>{c()}),gn(()=>{Q.featureRevision>0&&c()});var l=_u(),u=rn(l),d=R(u),f=R(d),p=z(R(f),!0);N(f);var m=B(f,2),h=R(m),g=R(h),_=z(g,!0),v=z(B(g,2),!0);N(h);var y=B(h,2),b=R(y);pi(b);var x=B(b,2),S=z(x);N(y),N(m);var C=B(m,2),w=R(C);pi(w);var T=B(w);N(C),N(d);var E=B(d,2),D=R(E),O=e=>{var t=uu(),n=z(t,!0);V(()=>q(n,Q.error)),K(e,t)};J(D,e=>{Q.error&&e(O)});var ee=B(D,2),k=e=>{var t=uu(),n=z(t,!0);V(()=>q(n,U(o))),K(e,t)};J(ee,e=>{U(o)&&e(k)});var te=B(ee,2),ne=e=>{var t=mu();Y(t,21,()=>U(s),e=>e.id,(e,t)=>{var n=pu(),r=R(n),i=R(r),a=R(i),o=B(a),s=e=>{var t=du(),n=z(t,!0);V(e=>q(n,e),[()=>Z(`архив`,`archived`)]),K(e,t)};J(o,e=>{U(t).status===`archived`&&e(s)}),N(i);var c=z(B(i,2));N(r);var l=B(r,2);Y(l,21,()=>U(t).projects.slice(0,4),e=>e.key,(e,t)=>{var n=fu();V(e=>{ti(n,e),X(n,`title`,U(t).key)},[()=>`--project-color:${ka(U(t).key)}`]),K(e,n)}),N(l),N(n),V((e,n)=>{q(a,`${U(t).title??``} `),q(c,`${U(t).projects.length??``} ${e??``} · ${U(t).reviews??``} ${n??``} · ${U(t).id??``}`)},[()=>Ni(U(t).projects.length,[`проект`,`проекта`,`проектов`],[`project`,`projects`]),()=>Ni(U(t).reviews,[`ревью`,`ревью`,`ревью`],[`review`,`reviews`])]),W(`click`,n,()=>void $a(U(t).id)),K(e,n)}),N(t),K(e,t)},re=e=>{var t=hu(),n=z(t,!0);V(e=>q(n,e),[()=>Z(`Фичи не найдены.`,`No features found.`)]),K(e,t)},ie=e=>{var t=gu(),n=R(t),r=z(n,!0),i=z(B(n,2),!0);N(t),V((e,t)=>{q(r,e),q(i,t)},[()=>Z(`Фич пока нет`,`No features yet`),()=>Z(`Создайте фичу и добавьте в неё MR из разных проектов.`,`Create a feature and add MRs from several projects.`)]),K(e,t)};J(te,e=>{U(s).length?e(ne):U(n).length?e(re,1):e(ie,-1)}),N(E),N(u);var ae=B(u,2),oe=e=>{lu(e,{onclose:()=>{L(a,!1),c()}})};J(ae,e=>{U(a)&&e(oe)}),V((e,t,n,r,i,a)=>{q(p,e),q(_,t),q(v,n),X(b,`placeholder`,r),q(S,`+ ${i??``}`),q(T,` ${a??``}`)},[()=>Z(`Фичи`,`Features`),()=>Z(`Фичи`,`Features`),()=>Z(`Явные наборы ревью из разных проектов. Создаёт человек; агент видит только те фичи, где участвует его проект.`,`Explicit review bundles across projects. Created by a human; an agent sees only features that include its project.`),()=>Z(`Найти фичу…`,`Find a feature…`),()=>Z(`Новая фича`,`New feature`),()=>Z(`Показывать архив`,`Show archived`)]),yi(b,()=>U(r),e=>L(r,e)),W(`click`,x,()=>L(a,!0)),bi(w,()=>U(i),e=>L(i,e)),K(e,l),He()}_r([`click`]);var yu=G(`<div class="alert error"> </div>`),bu=G(`<span class="project-dot"></span>`),xu=G(`<button class="feature-list-row" type="button"><span class="feature-list-main"><span class="feature-list-title"> </span> <span class="muted small"> </span></span> <span class="feature-list-projects"></span></button>`),Su=G(`<div class="feature-pick-list"></div>`),Cu=G(`<p class="muted"> </p>`),wu=G(`<div class="overlay"><button class="backdrop" type="button"></button> <div class="dialog" role="dialog" aria-modal="true"><div class="spread"><h2 style="margin: 0; font-size: 16px"> </h2> <button class="btn" type="button"> </button></div> <!> <!> <div class="row end" style="margin-top: 12px"><button class="btn primary" type="button"> </button></div></div></div> <!>`,1);function Tu(e,t){Ve(t,!0);let n=I(Kt([])),r=I(``),i=I(!1),a=I(!1);Oi(()=>{ha(void 0,!1).then(e=>{L(n,e.features,!0)}).catch(e=>{L(r,Va(e),!0)})});async function o(e){L(i,!0);try{await ya(e.id,[{review:t.review}]),await Za(),await Qa(t.review),$(Z(`Ревью добавлено в фичу`,`Review added to the feature`),`ok`),t.onclose()}catch(e){L(r,Va(e),!0)}finally{L(i,!1)}}var s=wu();gr(`keydown`,Yt,e=>e.key===`Escape`&&t.onclose());var c=rn(s),l=R(c),u=B(l,2),d=R(u),f=R(d),p=z(f,!0),m=B(f,2),h=z(m,!0);N(d);var g=B(d,2),_=e=>{var t=yu(),n=z(t,!0);V(()=>q(n,U(r))),K(e,t)};J(g,e=>{U(r)&&e(_)});var v=B(g,2),y=e=>{var t=Su();Y(t,21,()=>U(n),e=>e.id,(e,t)=>{var n=xu(),r=R(n),a=R(r),s=z(a,!0),c=z(B(a,2));N(r);var l=B(r,2);Y(l,21,()=>U(t).projects.slice(0,4),e=>e.key,(e,t)=>{var n=bu();V(e=>ti(n,e),[()=>`--project-color:${ka(U(t).key)}`]),K(e,n)}),N(l),N(n),V((e,r)=>{n.disabled=U(i),q(s,U(t).title),q(c,`${U(t).projects.length??``} ${e??``} · ${U(t).reviews??``} ${r??``}`)},[()=>Ni(U(t).projects.length,[`проект`,`проекта`,`проектов`],[`project`,`projects`]),()=>Ni(U(t).reviews,[`ревью`,`ревью`,`ревью`],[`review`,`reviews`])]),W(`click`,n,()=>void o(U(t))),K(e,n)}),N(t),K(e,t)},b=e=>{var t=Cu(),n=z(t,!0);V(e=>q(n,e),[()=>Z(`Активных фич нет. Создайте новую.`,`No active features. Create one.`)]),K(e,t)};J(v,e=>{U(n).length?e(y):e(b,-1)});var x=B(v,2),S=R(x),C=z(S);N(x),N(u),N(c);var w=B(c,2),T=e=>{lu(e,{get preselect(){return t.review},onclose:()=>{L(a,!1),t.onclose()}})};J(w,e=>{U(a)&&e(T)}),V((e,t,n,r,i)=>{X(l,`aria-label`,e),X(u,`aria-label`,t),q(p,n),q(h,r),q(C,`+ ${i??``}`)},[()=>Z(`Закрыть`,`Close`),()=>Z(`Добавить в фичу`,`Add to feature`),()=>Z(`Добавить в фичу`,`Add to feature`),()=>Z(`Закрыть`,`Close`),()=>Z(`Новая фича`,`New feature`)]),W(`click`,l,function(...e){t.onclose?.apply(this,e)}),W(`click`,m,function(...e){t.onclose?.apply(this,e)}),W(`click`,S,()=>L(a,!0)),K(e,s),He()}_r([`click`]);var Eu=G(`<button class="sidebar-backdrop" type="button"></button>`),Du=G(`<div><button><span class="title"> </span> <span class="meta"> </span></button> <button class="review-remove" type="button">×</button></div>`),Ou=G(`<p class="muted small" style="padding: 8px"> </p>`),ku=G(`<button type="button"><span class="f-icon">◇</span> <span class="sidebar-feature-title"> </span> <span class="sidebar-feature-count"> </span></button>`),Au=G(`<p class="muted small" style="padding: 2px 8px"> </p>`),ju=G(`<span class="mono">revdeck open &lt;N&gt;</span>`),Mu=G(`<button class="btn sidebar-reopen" type="button"> </button>`),Nu=G(`<span class="badge"> </span>`),Pu=G(`<button class="feature-badge" type="button"> </button>`),Fu=G(`<div class="alert readonly-banner"><strong> </strong> </div>`),Iu=G(`<div class="loading-bar" role="progressbar"></div>`),Lu=G(`<span class="count"> </span>`),Ru=G(`<button> <!></button>`),zu=G(`<p class="muted"> </p>`),Bu=G(`<header class="header"><div class="breadcrumbs"><button class="breadcrumb-link" type="button"> </button> <span class="sep">/</span> <span> </span> <span class="sep">/</span> <span class="cur"> </span></div> <div class="title-row"><div style="min-width: 0; flex: 1"><h1> </h1> <div class="meta"><span> </span> <span> </span> <span> </span> <span> </span> <span> </span> <!></div> <div class="review-feature-badges"><!> <button class="feature-add" type="button"> </button></div></div> <div class="header-actions"><button class="btn icon">☰</button> <button class="btn"> </button> <a class="btn" target="_blank" rel="noreferrer noopener"> </a> <button class="btn primary"> </button></div></div></header> <!> <!> <nav class="tabs"></nav> <section class="content"><!></section>`,1),Vu=G(`<div class="alert error"> </div>`),Hu=G(`<div class="empty"><div class="row" style="justify-content: center; margin-bottom: 12px"><button class="btn primary" type="button"> </button></div> <h2> </h2> <p> </p> <pre>revdeck open 42
@@ -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-BcvEWwhI.js"></script>
12
+ <script type="module" crossorigin src="/assets/index-CP-jcwGi.js"></script>
13
13
  <link rel="stylesheet" crossorigin href="/assets/index-BIVPy49b.css">
14
14
  </head>
15
15
  <body>
@@ -54,6 +54,10 @@ agent (MCP/CLI) ──▶ revdeck daemon ──glab/gh──▶ GitLab/GitHub
54
54
  executes only the items included in the approved plan.
55
55
  6. Background sync every 2 minutes refreshes open reviews and broadcasts SSE events to the UI.
56
56
 
57
+ `revdeck review 42` and `revdeck feedback 42` are thin CLI wrappers over the same `reviews.open` +
58
+ `rules.get` path. The scenario is a client-side context option: it shapes the agent instructions but
59
+ is not stored in the review, the daemon or the database.
60
+
57
61
  ## Data model
58
62
 
59
63
  - `Project` — a repository: `key = platform:host/project` (normalized for comparison), display values,
@@ -62,9 +62,14 @@ The core guarantees:
62
62
  - **MCP server** over stdio with tools for status, list, open, context, threads, diff, rules, draft
63
63
  replies, draft findings, summary, line notes, feature context/notes, publish preview and publish.
64
64
  - **CLI** with the same capabilities for harnesses without MCP.
65
+ - **Explicit scenario entry points**: `revdeck review` / `revdeck feedback` and `/revdeck review|feedback`
66
+ fix "someone else's MR" or "your own MR" before the agent starts. `revdeck_context` takes
67
+ `scenario=review|feedback`; `revdeck open` stays neutral and suggests the matching command. Context
68
+ carries `scenario` and `suggestedScenario` and marks whether the MR belongs to the current user.
65
69
  - **Skill** (`skills/revdeck`) carrying the review procedure, criteria, feedback workflow and
66
70
  cross-project feature workflow.
67
- - MCP prompts `review-mr`, `close-feedback` and `review-feature`.
71
+ - MCP prompts `review-mr`, `close-feedback` and `review-feature`; they mirror the `review`, `feedback`
72
+ and feature commands.
68
73
  - Context is deterministic and size-limited: summary, changed files, effective rules, threads,
69
74
  findings, drafts and next actions.
70
75
  - The agent cannot publish, resolve threads, approve/merge or call platform CLIs directly.
@@ -353,7 +353,7 @@ reviews disable the runner. The agent can only show the plan; the bridge returns
353
353
  | `REVDECK_RUNTIME_DIR` | socket directory (default `$XDG_RUNTIME_DIR/revdeck`) |
354
354
  | `REVDECK_URL` + `REVDECK_TOKEN` | connect to the daemon over HTTP (container/port forwarding); the token is agent-scoped, not the UI token |
355
355
  | `REVDECK_DEV_CONTAINER=1` | do not start a local daemon; fail with a host-daemon hint instead |
356
- | `REVDECK_HOST_ROOT` | host path of the worktree mounted into a devcontainer; the container client maps its root to it before RPC |
356
+ | `REVDECK_HOST_ROOT` | host path of the worktree mounted into a devcontainer; `revdeck devcontainer --write` sets `${localWorkspaceFolder}`, and the container client maps its root to it before RPC |
357
357
  | `REVDECK_UI_HOST` | host used by `revdeck ui` from a container (for example `host.docker.internal`) |
358
358
  | `REVDECK_ROOT` | project root for the MCP server |
359
359
  | `REVDECK_FEATURE` | feature id for a feature-scoped MCP session; the current project must be a member |
@@ -5,7 +5,7 @@
5
5
  revdeck has two portable layers and one adapter layer:
6
6
 
7
7
  - **MCP** (stdio) — the `revdeck_*` tools work in any MCP-capable client.
8
- - **CLI** — the same capabilities without MCP: `revdeck open/context/findings/reply/publish`.
8
+ - **CLI** — the same capabilities without MCP: `revdeck review/feedback/open/context/findings/reply/publish`.
9
9
  - **`/` command** — each harness has its own; `revdeck init` creates the right file.
10
10
 
11
11
  A full integration = MCP + skill (procedures) + command (entry point). Without MCP, the CLI and
@@ -28,7 +28,23 @@ Comment attachments are uploaded by the host daemon. GitLab uses project uploads
28
28
  absolute URL; GitHub has no public attachment API, so the editor asks for a URL instead.
29
29
 
30
30
  `revdeck init --adapters dsh,claude` explicitly enables the adapters you need. A repeated `init`
31
- does not overwrite existing command files and does not clobber other keys in `.mcp.json`.
31
+ upgrades a command file that still matches the old generated template and leaves a customized file
32
+ alone; it does not clobber other keys in `.mcp.json`.
33
+
34
+ ## Explicit scenario commands
35
+
36
+ The generated `/revdeck` command takes the mode as its first argument:
37
+
38
+ | Invocation | Scenario |
39
+ |---|---|
40
+ | `/revdeck review 442` | Someone else's MR: follow `Review.md` |
41
+ | `/revdeck feedback 442` | Your own MR: follow `Feedback.md` |
42
+ | `/revdeck open 442` | Neutral load; the context marks whether the MR is yours |
43
+
44
+ The same verbs exist in the CLI (`revdeck review 442`, `revdeck feedback 442`) and in MCP as
45
+ `revdeck_context` with `scenario=review|feedback`. `revdeck open` prints the matching next command when
46
+ the platform user and the MR author are known. The scenario is not persisted: it is an argument of the
47
+ call, not a property of the review.
32
48
 
33
49
  The skill has one canonical copy: `.agents/skills/revdeck` (including `agents/openai.yaml` for OpenAI
34
50
  harnesses). Claude gets only `.claude/skills/revdeck/SKILL.md`, a symlink to
@@ -150,12 +166,14 @@ and the `REVDECK_*` keys are managed.
150
166
 
151
167
  `REVDECK_HOST_ROOT` closes the path gap between the two sides: the daemon reads `.revdeck.yml` and rule
152
168
  documents on the host, while the container sees the same worktree under `/workspaces/...`. `--write`
153
- derives it from the repository root as `${localEnv:HOME}/relative/path`; a repository outside `$HOME`
154
- needs the variable set manually. The CLI and MCP server in the container map their worktree path (and
155
- paths under it) to the host path before `reviews.open`, `reviews.remoteList` and `projects.register`.
156
- Without the mapping the review still opens (platform calls run on the host), but the UI shows
157
- auto-discovery and a "directory is not visible" warning instead of the project config. Reviews opened
158
- before the mapping keep the old container root; reopen them.
169
+ writes `${localWorkspaceFolder}`, which the devcontainer tooling expands to the host path of the
170
+ opened folder, so no user-specific path is committed. If the repository is a subfolder of the opened
171
+ workspace, set `REVDECK_HOST_ROOT` manually (for example `${localWorkspaceFolder}/subdir`). The CLI and
172
+ MCP server in the container map their worktree path (and paths under it) to the host path before
173
+ `reviews.open`, `reviews.remoteList` and `projects.register`. Without the mapping the review still opens
174
+ (platform calls run on the host), but the UI shows auto-discovery and a "directory is not visible"
175
+ warning instead of the project config. Reviews opened before the mapping keep the old container root;
176
+ reopen them.
159
177
 
160
178
  The daemon creates the bridge socket on startup. On the host run `revdeck daemon restart`, then rebuild
161
179
  the container. Inside the container `revdeck` never starts its own daemon: if the socket is unreachable
@@ -173,10 +191,11 @@ expose the UI token to the container; `--host 0.0.0.0` is for a browser on anoth
173
191
  not for giving the agent more rights.
174
192
 
175
193
  `revdeck devcontainer --write` adds the `REVDECK_*` variables to the `revdeck` MCP server in `.mcp.json`
176
- and `.cursor/mcp.json` inside the repository. `REVDECK_HOST_ROOT` is the exception: `${localEnv:...}` is
177
- expanded only in `devcontainer.json`, so it is set in `containerEnv`/`remoteEnv` and inherited by the MCP
178
- server. A user-level MCP configuration outside the repository needs the same variables manually (with
179
- an absolute `REVDECK_HOST_ROOT`), otherwise it may start a second daemon in the container.
194
+ and `.cursor/mcp.json` inside the repository. `REVDECK_HOST_ROOT` is the exception: `${localEnv:...}`
195
+ and `${localWorkspaceFolder}` are expanded only in `devcontainer.json`, so it is set in
196
+ `containerEnv`/`remoteEnv` and inherited by the MCP server. A user-level MCP configuration outside the
197
+ repository needs the same variables manually (with an absolute `REVDECK_HOST_ROOT`), otherwise it may
198
+ start a second daemon in the container.
180
199
 
181
200
  The container user must be able to connect to the host bridge socket (the bridge socket is `0666`
182
201
  inside the mounted directory `0755`; its methods are limited by the `read`/`draft` capability). The UI
@@ -53,6 +53,10 @@ agent (MCP/CLI) ──▶ revdeck daemon ──glab/gh──▶ GitLab/GitHub
53
53
  только пункты, вошедшие в подтверждённый план.
54
54
  6. Фоновый sync раз в 2 минуты обновляет открытые ревью и рассылает SSE-события UI.
55
55
 
56
+ `revdeck review 42` и `revdeck feedback 42` — тонкие CLI-обёртки над тем же путём `reviews.open` +
57
+ `rules.get`. Сценарий — клиентская опция контекста: она задаёт инструкции агенту, но не сохраняется в
58
+ ревью, демоне или базе.
59
+
56
60
  ## Модель данных
57
61
 
58
62
  - `Project` — репозиторий: `key = platform:host/project` (нормализован для сравнения), отображаемые
@@ -62,9 +62,14 @@ agent (MCP/CLI) ──unix socket──▶ revdeck daemon ──glab/gh──▶
62
62
  - **MCP-сервер** поверх stdio: status, list, open, context, threads, diff, rules, draft replies,
63
63
  draft findings, summary, line notes, feature context/notes, publish preview и publish.
64
64
  - **CLI** с теми же возможностями для харнессов без MCP.
65
+ - **Явные точки входа сценариев**: `revdeck review` / `revdeck feedback` и `/revdeck review|feedback`
66
+ фиксируют «чужой MR» или «свой MR» до старта агента. `revdeck_context` принимает
67
+ `scenario=review|feedback`; `revdeck open` остаётся нейтральным и подсказывает подходящую команду.
68
+ В контексте есть `scenario`, `suggestedScenario` и отметка, ваш ли это MR.
65
69
  - **Skill** (`skills/revdeck`) с процедурой ревью, критериями, разбором фидбека и кросс-проектным
66
70
  workflow.
67
- - MCP-промпты `review-mr`, `close-feedback` и `review-feature`.
71
+ - MCP-промпты `review-mr`, `close-feedback` и `review-feature`; они соответствуют командам `review`,
72
+ `feedback` и работе с фичей.
68
73
  - Детерминированный контекст с ограничением размера: выжимка, изменённые файлы, эффективные правила,
69
74
  треды, замечания, черновики и следующие действия.
70
75
  - Агент не публикует, не резолвит треды, не делает approve/merge и не вызывает платформенные CLI
@@ -349,7 +349,7 @@ argv) или выполняет `revdeck checks <N> --run --yes` на хосте
349
349
  | `REVDECK_RUNTIME_DIR` | каталог сокета (по умолчанию `$XDG_RUNTIME_DIR/revdeck`) |
350
350
  | `REVDECK_URL` + `REVDECK_TOKEN` | подключение к демону по HTTP (контейнер/проброс порта); токен агентский, не UI |
351
351
  | `REVDECK_DEV_CONTAINER=1` | не запускать локальный демон, а подсказать про демон хоста |
352
- | `REVDECK_HOST_ROOT` | путь рабочей копии на хосте для devcontainer: клиент в контейнере заменяет на него свой root перед RPC |
352
+ | `REVDECK_HOST_ROOT` | путь рабочей копии на хосте для devcontainer: `revdeck devcontainer --write` ставит `${localWorkspaceFolder}`, клиент в контейнере заменяет на него свой root перед RPC |
353
353
  | `REVDECK_UI_HOST` | хост для `revdeck ui` из контейнера (например, `host.docker.internal`) |
354
354
  | `REVDECK_ROOT` | корень проекта для MCP-сервера |
355
355
  | `REVDECK_FEATURE` | id фичи для MCP-сессии; текущий проект должен быть участником |
@@ -5,7 +5,7 @@
5
5
  У revdeck два переносимых слоя и один адаптерный:
6
6
 
7
7
  - **MCP** (stdio) — инструменты `revdeck_*` работают в любом клиенте с MCP.
8
- - **CLI** — те же возможности без MCP: `revdeck open/context/findings/reply/publish`.
8
+ - **CLI** — те же возможности без MCP: `revdeck review/feedback/open/context/findings/reply/publish`.
9
9
  - **`/`-команда** — у каждого харнесса своя; `revdeck init` создаёт нужный файл.
10
10
 
11
11
  Полноценная интеграция = MCP + skill (процедуры) + команда (точка входа). Без MCP остаются CLI и
@@ -24,8 +24,24 @@ skill: агент вызывает команды через shell.
24
24
  | DSH | плагин (см. ниже) | `.agents/skills/revdeck/*` (включая `agents/openai.yaml`) + YAML-сниппет в выводе |
25
25
  | Универсальный | — | `.agents/skills/revdeck/*` (включая `agents/openai.yaml`) + MCP |
26
26
 
27
- `revdeck init --adapters dsh,claude` включает нужные явно. Повторный `init` не перезаписывает
28
- существующие командные файлы и не затирает чужие ключи `.mcp.json`.
27
+ `revdeck init --adapters dsh,claude` включает нужные явно. Повторный `init` обновляет командный
28
+ файл, если он всё ещё совпадает со старым сгенерированным шаблоном; изменённый вручную файл не
29
+ трогает. Чужие ключи `.mcp.json` сохраняются.
30
+
31
+ ## Явные команды сценариев
32
+
33
+ Сгенерированная команда `/revdeck` принимает режим первым аргументом:
34
+
35
+ | Вызов | Сценарий |
36
+ |---|---|
37
+ | `/revdeck review 442` | чужой MR: процедура `Review.md` |
38
+ | `/revdeck feedback 442` | свой MR: процедура `Feedback.md` |
39
+ | `/revdeck open 442` | нейтральная загрузка; контекст отметит, ваш ли это MR |
40
+
41
+ Те же глаголы есть в CLI (`revdeck review 442`, `revdeck feedback 442`) и в MCP —
42
+ `revdeck_context` с `scenario=review|feedback`. `revdeck open` печатает подходящую следующую команду,
43
+ если пользователь платформы и автор MR известны. Сценарий не сохраняется: это аргумент вызова, а не
44
+ свойство ревью.
29
45
 
30
46
  Скилл хранится в одном каноническом месте: `.agents/skills/revdeck` (включая `agents/openai.yaml`
31
47
  для OpenAI-харнессов). Харнессы со своим каталогом скиллов получают ссылку на него:
@@ -151,13 +167,14 @@ revdeck devcontainer --write # добавить их в .devcontainer/devcontai
151
167
  и ключи сохраняются; revdeck управляет только двумя своими mounts и ключами `REVDECK_*`.
152
168
 
153
169
  `REVDECK_HOST_ROOT` закрывает разрыв путей между сторонами: демон читает `.revdeck.yml` и документы
154
- правил на хосте, а контейнер видит ту же рабочую копию в `/workspaces/...`. `--write` выводит его из
155
- корня репозитория как `${localEnv:HOME}/относительный/путь`; для репозитория вне `$HOME` переменную
156
- нужно задать вручную. CLI и MCP-сервер в контейнере заменяют свой путь (и пути внутри него) на путь
157
- хоста перед `reviews.open`, `reviews.remoteList` и `projects.register`. Без этого ревью всё равно
158
- открывается (платформенные вызовы идут на хосте), но UI показывает автообнаружение и предупреждение
159
- «каталог не виден» вместо конфига проекта. Ревью, открытые до появления маппинга, хранят путь
160
- контейнера — откройте их заново.
170
+ правил на хосте, а контейнер видит ту же рабочую копию в `/workspaces/...`. `--write` записывает
171
+ `${localWorkspaceFolder}`; клиент devcontainer раскрывает его в путь открытой папки на хосте, поэтому
172
+ личный путь не коммитится. Если репозиторий — подпапка открытого workspace, задайте
173
+ `REVDECK_HOST_ROOT` вручную (например, `${localWorkspaceFolder}/subdir`). CLI и MCP-сервер в
174
+ контейнере заменяют свой путь (и пути внутри него) на путь хоста перед `reviews.open`,
175
+ `reviews.remoteList` и `projects.register`. Без этого ревью всё равно открывается (платформенные
176
+ вызовы идут на хосте), но UI показывает автообнаружение и предупреждение «каталог не виден» вместо
177
+ конфига проекта. Ревью, открытые до появления маппинга, хранят путь контейнера — откройте их заново.
161
178
 
162
179
  Демон создаёт сокет моста при старте. На хосте выполните `revdeck daemon restart`, затем пересоберите
163
180
  контейнер. В контейнере revdeck никогда не запускает свой демон: если сокет недоступен, команда
@@ -173,10 +190,11 @@ revdeck devcontainer --write # добавить их в .devcontainer/devcontai
173
190
  расширения прав агента.
174
191
 
175
192
  `revdeck devcontainer --write` добавляет `REVDECK_*` в MCP-сервер `revdeck` в `.mcp.json` и
176
- `.cursor/mcp.json` внутри репозитория. Исключение — `REVDECK_HOST_ROOT`: `${localEnv:...}` раскрывается
177
- только в `devcontainer.json`, поэтому переменная задаётся в `containerEnv`/`remoteEnv`, а MCP-сервер
178
- наследует её. Пользовательский MCP вне репозитория нужно снабдить теми же переменными вручную
179
- (`REVDECK_HOST_ROOT` — абсолютным путём), иначе он может поднять второй демон в контейнере.
193
+ `.cursor/mcp.json` внутри репозитория. Исключение — `REVDECK_HOST_ROOT`: `${localEnv:...}` и
194
+ `${localWorkspaceFolder}` раскрываются только в `devcontainer.json`, поэтому переменная задаётся в
195
+ `containerEnv`/`remoteEnv`, а MCP-сервер наследует её. Пользовательский MCP вне репозитория нужно
196
+ снабдить теми же переменными вручную (`REVDECK_HOST_ROOT` — абсолютным путём), иначе он может поднять
197
+ второй демон в контейнере.
180
198
 
181
199
  Пользователь контейнера должен иметь доступ к сокету моста (сокет `0666` в смонтированном каталоге
182
200
  `0755`; методы ограничены капабилити `read`/`draft`). UI открывается на хосте через `revdeck ui`;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "revdeck",
3
- "version": "0.8.0",
3
+ "version": "0.9.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",
@@ -1,5 +1,7 @@
1
1
  # Scenario: findings on your own MR
2
2
 
3
+ Command: `/revdeck feedback <N|URL>` (CLI: `revdeck feedback <N|URL>`).
4
+
3
5
  The goal is to close every open finding together with the human: fix the code, reply, or disagree
4
6
  with justification.
5
7
 
@@ -1,5 +1,7 @@
1
1
  # Scenario: reviewing someone else's MR, branch, or diff
2
2
 
3
+ Command: `/revdeck review <N|URL>` (CLI: `revdeck review <N|URL>`).
4
+
3
5
  The goal is to find real defects and violations of the repository rules and produce a verifiable list
4
6
  of findings. The human publishes them.
5
7
 
@@ -1,6 +1,6 @@
1
1
  ---
2
2
  name: revdeck
3
- description: "Review a merge/pull request with the local revdeck. Two scenarios: work through and close the findings on your own MR/PR, or review someone else's. Use when asked to work through review comments, respond to findings, fix code according to review, or check an MR/PR/branch/diff."
3
+ description: "Review a merge/pull request with the local revdeck. Two scenarios: `review` for someone else's MR/PR, `feedback` for findings on your own. Use when asked to work through review comments, respond to findings, fix code according to review, or check an MR/PR/branch/diff."
4
4
  ---
5
5
 
6
6
  # MR/PR code review
@@ -20,6 +20,8 @@ capabilities.
20
20
  | Task | MCP | CLI |
21
21
  |---|---|---|
22
22
  | Open a review | `revdeck_open` | `revdeck open <N\|URL>` |
23
+ | Your own MR (feedback) | `revdeck_context scenario=feedback` | `revdeck feedback <N\|URL>` |
24
+ | Someone else's MR (review) | `revdeck_context scenario=review` | `revdeck review <N\|URL>` |
23
25
  | Context and rules | `revdeck_context` | `revdeck context <N>` |
24
26
  | Threads | `revdeck_threads` | `revdeck threads <N>` |
25
27
  | Diff | `revdeck_diff` | `revdeck diff <N> [--file]` |
@@ -43,11 +45,16 @@ raw `root`, another server, the daemon database, or the CLI `--all` flag.
43
45
 
44
46
  ## Workflow
45
47
 
46
- 1. Determine the scenario. If the request is unclear, ask one question:
47
- - **Findings on your own MR** — `Feedback.md`.
48
- - **Reviewing someone else's MR, branch, or diff** — `Review.md`.
49
- - **A feature spanning several projects** — `Feature.md`; call `revdeck_feature` first.
50
- 2. Open the review and get the context: `revdeck_open`, then `revdeck_context`.
48
+ An explicit invocation fixes the scenario: `/revdeck review 442` for someone else's MR,
49
+ `/revdeck feedback 442` for your own. Without a mode, the scenario comes from the MR author line in
50
+ the context.
51
+
52
+ 1. Determine the scenario:
53
+ - **your own MR** — the `feedback <N|URL>` command or the "your MR" line in the context → `Feedback.md`;
54
+ - **someone else's MR, branch, or diff** — the `review <N|URL>` command or the "someone else's MR" line → `Review.md`;
55
+ - **a feature spanning several projects** — `Feature.md`; call `revdeck_feature` first;
56
+ - the author and the current user are unknown — ask one question.
57
+ 2. Open the review and get the context: `revdeck_open`, then `revdeck_context` with `scenario=review|feedback`.
51
58
  The context already contains the summary, files, **effective project rules** (documents and
52
59
  sections selected for the changed paths), threads, existing findings, and comments from the
53
60
  human. Call the `revdeck_rules` MCP tool separately only if the rules were not included in the
@@ -65,9 +72,9 @@ Act as the lead:
65
72
 
66
73
  1. Read `agents` and `roles` from the context.
67
74
  2. Spawn one subagent per role/shard if the harness supports subagents (`Task` in Claude Code, a
68
- workflow in DSH, or the equivalent). Give each: `revdeck_context` with the `role` and `shard` from
69
- the plan, and tell it to return a JSON findings array plus a short summary. A worker must **not**
70
- call `revdeck_draft_findings`, `revdeck_set_summary` or `revdeck_draft_reply`.
75
+ workflow in DSH, or the equivalent). Give each: `revdeck_context` with the same `scenario`, `role`
76
+ and `shard` from the plan, and tell it to return a JSON findings array plus a short summary. A
77
+ worker must **not** call `revdeck_draft_findings`, `revdeck_set_summary` or `revdeck_draft_reply`.
71
78
  3. If there is no subagent support, run the roles sequentially and keep their results separate.
72
79
  4. Deduplicate by `file:line:title` (prefer the higher level), then write the final summary and findings
73
80
  **once** as the lead. The UI shows that single merged result.
@@ -1,4 +1,4 @@
1
1
  interface:
2
2
  display_name: "revdeck — MR/PR review"
3
- short_description: "Review GitLab/GitHub merge and pull requests, work through findings"
4
- default_prompt: "Use $revdeck to open the review, read the project rules and work through the findings."
3
+ short_description: "Review someone else's MR and work through findings on your own"
4
+ default_prompt: "Use $revdeck: run review for someone else's MR or feedback for your own, then open the review, read the project rules and work through the findings."
@@ -1,5 +1,7 @@
1
1
  # Сценарий: замечания к своему MR
2
2
 
3
+ Команда: `/revdeck feedback <N|URL>` (CLI: `revdeck feedback <N|URL>`).
4
+
3
5
  Цель — вместе с человеком закрыть каждое открытое замечание: исправить код, ответить или
4
6
  обоснованно не согласиться.
5
7