dsh-switchman 1.3.1 → 1.5.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.
package/README.md CHANGED
@@ -2,29 +2,45 @@
2
2
 
3
3
  **English** | [简体中文](./README.zh.md) | [繁體中文](./README.zh-TW.md) | [日本語](./README.ja.md) | [한국어](./README.ko.md) | [Español](./README.es.md) | [Français](./README.fr.md) | [Deutsch](./README.de.md) | [Italiano](./README.it.md) | [Português](./README.pt.md) | [Русский](./README.ru.md)
4
4
 
5
- > **The switchman family**, same author, same orchestration: [opencode-switchman](https://github.com/mrzturn/opencode-switchman) (the OpenCode original) · [zcode-switchman](https://github.com/mrzturn/zcode-switchman) (the ZCode port) · **dsh-switchman** (this repo, for DeepSeek Harness).
5
+ > **The switchman family**, same author, same orchestration: [opencode-switchman](https://github.com/mrzturn/opencode-switchman) (the OpenCode original) · [zcode-switchman](https://github.com/mrzturn/zcode-switchman) (the ZCode port) · **dsh-switchman** (this repo, the DeepSeek Harness edition).
6
6
 
7
- ![dsh-switchman — the context water level drives the switchman and throws the route](docs/assets/hero.svg)
7
+ ![dsh-switchman — the context water level throws the switch and routes every task into the right lane](docs/assets/hero.svg)
8
8
 
9
- > Context on a meter. Tasks dispatch themselves.
9
+ > Meter the context, and every task finds its own lane.
10
10
 
11
- A plugin for [DeepSeek Harness](https://github.com/deepseek-ai/deepseek-harness) (DSH). Once installed, your primary model stops doing everything itself and becomes a dispatcher: measure the water level, pick the lane, hand out the task, check the work. Four things:
11
+ ## Why you need it
12
12
 
13
- **1. Context water-level control.** Every turn measures live session tokens. Soft (default 50k) advises delegating, hard (90k) tightens the per-turn read budget and nudges wrap-up, force (130k) backs the session up and hands it over to compaction — automatically. Run a session all day; your context never drowns in its own history. Every dispatched subagent carries its own hard cap and exits with a HANDOFF summary when it's reached.
13
+ Work in DSH long enough and you run into two things:
14
14
 
15
- **2. Six-lane dispatch.** economy / mechanical / main / hard / vision / review — six cognitive lanes. Pick candidate models per lane in the settings page, rank them strongest-first (optional S/A/B/C tier anchoring), and pin a reasoning effort per route — the dropdown lists the levels each model *actually* supports, not a generic three. A `[SWITCHMAN:POOLS]` table ships with every prompt so the model knows who to call; `enforce` mode rejects out-of-pool models outright.
15
+ 1. **Sessions get heavier the longer they run.** History balloons the context to hundreds of thousands of tokens; the model starts forgetting, slowing down, getting expensive — until a manual /compact is your only option, and the moment it compresses, detail is lost.
16
+ 2. **Your primary model does everything itself.** Looking up a file, running a test, reconciling data — it chews through all of it alone, slow and costly, when most of that work really belongs on a cheaper model.
16
17
 
17
- **3. Language preferences.** One dropdown each for replies, code comments, and authored docs. Unset? You get asked once, it's remembered forever, and every later session follows it.
18
+ dsh-switchman is a plugin for [DeepSeek Harness](https://github.com/deepseek-ai/deepseek-harness) (DSH). Once installed, the primary model goes from "doing everything itself" to working as a dispatcher: measure the water level, pick the lane, hand out the task, check the work. It is not a new model — it is an orchestration doctrine hooked onto DSH plus a settings page. Concretely, it does six things:
18
19
 
19
- **4. Delegate-by-default doctrine.** Replaces DSH's shipped conservative team policy ("only create teammates when asked"): trivia stays hands-on (<200 lines read, <50 changed), real work gets delegated by default; every change gets verified — >20 lines goes to a tester, >300 lines or core logic goes to a reviewer. Say "don't use teams" and it steps aside instantly.
20
+ **1. Context water level: long sessions never burst.** Every turn counts live session tokens against three water marks that ratchet up: 50k (soft, adjustable) nudges "time to delegate"; 90k (hard) tightens the per-read file budget and steers toward wrap-up; 130k (force) hands over automatically — forking a backup of the session, compacting the context, and waking the continuation, so the task never drops. Background subagents still running at that moment are not lost either: their ids, task descriptions, and report paths are written into the handover document, so the resumed session knows where to collect reports instead of dispatching duplicates. Every dispatched subagent carries its own hard cap; on reaching it, the subagent writes its HANDOFF summary and exits.
20
21
 
21
- Only one model? Still worth it — water-level control and the doctrine don't care how many models you have.
22
+ **2. Six dispatch pools: the right model for every job.** An economy pool (batch chores), a mechanical pool (templated rewrites), a main pool (day-to-day coding), a hard pool (tough reasoning and large-scale refactors), a vision pool (reading images), and a review pool (independent verification). In the settings page you tick candidates, rank them (optional S/A/B/C tiers), and pin a reasoning effort to each individual route — the effort dropdown lists the levels that model actually supports, not a generic three. Every prompt sent to the primary model carries a `[SWITCHMAN:POOLS]` recommendation table, and it dispatches by that table. Execution mode has three states: off / advice / enforce (enforce = out-of-pool models are rejected outright).
23
+
24
+ **3. Agent Teams mode: from working solo to running a team.** Off by default — right after install you get lightweight subagent dispatch. Two independent toggles live in the settings page:
25
+
26
+ - **Agent teams mode** — turning it on injects the team doctrine (delegate-by-default + tiered verification + shared-task-board discipline) and automatically enables DSH's Agent Teams: the primary model can pull in durable teammates (`spawn_teammate`), assign work on the shared task board (`team_task_*`), and trade messages with teammates (`send_message`). When to build a team follows a clear discipline: parallelizable independent subtasks, bulky self-contained work, a primary context already running high, or a need for role separation; one-off single-point investigations still go through a subagent. DSH's shipped policy is "no team unless the user names one" — here it flips to "use one when it fits". Turning the toggle off again leaves zero residue of the team clauses, and it never strips the team tools from sessions that are already running.
27
+ - **Subagent model whitelist sync** — DSH keeps an authorization whitelist of "models agents may pick for subagents": routes selected in a pool but never authorized get denied when the primary model names them explicitly (in teams mode, the pools table and the settings page flag those routes with ⚠). Flip this toggle and the union of all six pools is written into that whitelist wholesale — no configuring the same thing on both sides, switchman stays the single source of truth, and the fork-dispatch path is covered as well. The whitelist takes effect as a per-new-session snapshot, so the sync only applies to sessions opened afterwards.
28
+
29
+ The session header keeps you posted at a glance: an ⚡ "autonomous team" badge and a ◇ chip showing the session's actual model; while an automatic handover is running, a live "handover in progress · backing up session / compacting context / waking continuation" banner appears.
30
+
31
+ **4. Language preferences: asked once, remembered for good.** One dropdown each for replies, code comments, and documentation, with a scope of global or per project (`.switchman/lang.json`). Leaving them unset is fine — the first time it matters, you are asked once in your DSH UI's language, the answer is remembered, and every session afterwards follows it automatically.
32
+
33
+ **5. Tiered verification: every change gets checked.** Changes over 20 lines go to a tester; over 300 lines, or anything touching core / security / data-consistency logic, also gets an independent reviewer pass. The reviewer's model is chosen to avoid the model used by "the agent that wrote the diff" — as far as the pools allow; when they truly cannot, the conclusion declares DOWNGRADED. Say "don't use teams" once and it instantly drops back to solo.
34
+
35
+ **6. `/vision`: text-only models can still work with images.** When your primary model cannot read images, DSH refuses image-bearing messages right at the gate. Attach the image, type `/vision what's wrong with this image`, and the image is resolved to a file path and handed to a vision-pool model to read, with the findings returned to the current session. A hint appears above the composer early on — "the current model can't read images"; when a plain image send is refused, the draft is rewritten once as `/vision` and resubmitted on its own, no manual redo; if no vision pool is configured, the command refuses with setup guidance.
36
+
37
+ Only one model? Still worth installing — water-level control and tiered verification do not care how many models you have, and long single-model sessions benefit all the same.
22
38
 
23
39
  ## Bundled skills
24
40
 
25
- - **db-query** — read-only MySQL/Redis verification: run SQL to check records, cache keys / TTLs, cross-store consistency. Refuses all writes. One-time setup below.
26
- - **git-commit-message** — convention-compliant commit text. Text only; never touches git.
27
- - **requirement-docs** — one spec for requirements / PRD / design docs, archived to `docs/requirements-and-design/`.
41
+ - **db-query** — read-only MySQL / Redis verification: run SQL to reconcile records, check cache keys / TTLs, and audit cross-store consistency; refuses all writes. One-time setup below.
42
+ - **git-commit-message** — generates convention-compliant commit text. Text only; it never runs git for you.
43
+ - **requirement-docs** — one spec for requirements analysis / PRD / design documents, with output archived to `docs/requirements-and-design/`.
28
44
 
29
45
  ## Quick start
30
46
 
@@ -40,23 +56,38 @@ Only one model? Still worth it — water-level control and the doctrine don't ca
40
56
  plugin_manager: install_bundle target=/path/to/dsh-switchman
41
57
  ```
42
58
 
59
+ or from a terminal via the `dsh` CLI — pick the profile that matches how you run DSH:
60
+
61
+ ```bash
62
+ dsh plugin --profile web add dsh-switchman # Web GUI
63
+ dsh plugin --profile desktop add dsh-switchman # desktop app
64
+ ```
65
+
43
66
  2. **Restart DSH** — quit the app entirely and reopen (a page reload is not enough) so the client-module table picks up the bundle.
44
67
 
45
- 3. **Open the settings page** — Settings → dsh-switchman. The first screen is language preferences: one dropdown each for replies / comments / docs, each with a live `current: …` line. Skip them if you like — you'll be asked once and remembered.
68
+ 3. **Language preferences** — Settings → dsh-switchman, or "Switchman Control Center" in the home sidebar. The first screen sets the scope: global (this profile) or per project (each project's `.switchman/lang.json`); then three dropdowns set the reply / comment / doc languages, each with a live "current: …" line underneath. Skipping is fine — you will be asked once on first use and remembered (the question is asked in your DSH UI language).
69
+
70
+ ![Language preferences: scope and the three languages](docs/assets/conf-language-en.png)
71
+
72
+ 4. **Fill the dispatch pools** — each pool card lists candidate models grouped by provider; tick the ones you want. Tick "manual order" and the card becomes a numbered priority list you reorder with ↑ ↓ ×; next to each route you can also pin a reasoning effort (it defaults to "follow lane"; pinning it lists the levels that model actually supports). A summary line at the top tracks progress live, e.g. "6/6 pools set · 2 ranked · advice mode".
73
+
74
+ ![Dispatch pools: the economy / mechanical / main / hard pools](docs/assets/conf-pool-1-en.png)
75
+
76
+ The vision and review pools live below; further down sit **capability ranking** (the union of the models selected across the six pools — the index is the capability order, strongest first, with optional S/A/B/C tiers) and **execution mode** (advice / enforce).
46
77
 
47
- ![Settings page and language preferences](docs/assets/conf-demo1.png)
78
+ ![Vision pool, review pool, capability ranking, and execution mode](docs/assets/conf-pool-2-en.png)
48
79
 
49
- 4. **Fill the six pools** — each pool card lists candidates grouped by provider; tick the ones you want. Tick **manual order** and the card becomes a numbered priority list with ↑ ↓ × controls. The effort dropdown beside each selected route defaults to *follow lane*; pinning it lists the levels that model actually supports (Low / High / Max…). A summary line tracks progress live: “6/6 pools set · 3 ranked · mode advice”.
80
+ 5. **Agent teams** — both toggles are off by default; start with plain subagent dispatch. To let the model pull teams in on its own, turn on "agent teams mode"; to skip authorizing the same routes twice, turn on "subagent model whitelist sync" — a "synced N routes + time" status line under the toggle confirms what was written.
50
81
 
51
- ![Dispatch pools](docs/assets/conf-demo2.png)
82
+ ![Agent teams: the two toggles and the whitelist-sync status](docs/assets/conf-team-en.png)
52
83
 
53
- 5. **Ranking and watermark** — the ranking table's order is capability order (strongest first), with optional S/A/B/C tiers; execution mode is `off` / advice / enforce (enforce = out-of-pool models are rejected). Below it, the watermark section tightens behavior by token usage: three thresholds, a per-call read budget, hard-mode behavior (cap / deny), an auto-handover toggle, and a separate cap for subagents. The bottom line carries the commands: `/ctx-pause` to stop intervening · `/ctx-resume` to resume · `/ctx-handover` to back up and hand over now.
84
+ 6. **Context water level** — the three thresholds (defaults 50000 / 90000 / 130000), the per-read budget, hard-mode behavior (throttled pass / block), the auto-handover toggle, and the subagent-specific cap all live in this section. The bottom line carries the commands: `/ctx-pause` to pause intervening · `/ctx-resume` to resume · `/ctx-handover` to back up and hand over now (it steers the session to an idle boundary and waits out the compaction retry window, so the result can take a few minutes).
54
85
 
55
- ![Ranking and context watermark](docs/assets/conf-demo3.png)
86
+ ![Context water level: thresholds, budgets, and commands](docs/assets/conf-ctx-en.png)
56
87
 
57
- 6. **Verify** — the ⚡ badge appears beside the preset chip in any session header; ask the model “what does the last section of your system prompt say?” — it should mention the dsh-switchman doctrine.
88
+ 7. **Verify** — an ⚡ "autonomous team" badge appears in the session header (with a ◇ beside it showing the current session model); or simply ask the model "what is the heading of the last section of your system prompt" — the answer should mention the dsh-switchman doctrine.
58
89
 
59
- **db-query one-time setup** (script dependencies live inside the skill directory):
90
+ **db-query one-time setup** (script dependencies install inside the skill directory — your project stays clean):
60
91
 
61
92
  ```bash
62
93
  bash <install-dir>/skills/db-query/scripts/setup.sh
@@ -64,15 +95,16 @@ bash <install-dir>/skills/db-query/scripts/setup.sh
64
95
 
65
96
  ## How it works
66
97
 
67
- - The Host half (`index.js` + `host/`) injects three dynamic system-prompt sections, the read-budget and enforce gates, automatic answer capture, and three slash commands. All settings are volatile fields — saved changes apply to the next prompt assembly, no restart.
68
- - The Client half (`client.js`) renders the ⚡ badge beside the preset chip and the settings page, through official settings-form services.
69
- - `cordis.patch.yml` restates each shipped preset's plugin list verbatim and only extends the persona suffix; the Agent Teams tools themselves still come from the shipped `@deepseek-ai/dsh-experimental-agent-team-profile`.
98
+ - The Host half (`index.js` + `host/`) injects the dynamic system-prompt sections (language / lanes / water level / teams), the read-budget and enforce gates, and four slash commands (the ctx trio + `/vision`). Save a setting and it applies to the next prompt assembly — no restart needed.
99
+ - The Client half (`client.js`) renders the settings page, the ⚡ badge and ◇ model chip in the session header, and the live handover-in-progress banner, through official settings-form services.
100
+ - The "Switchman Control Center" entry in the home sidebar opens the same configuration page (language preferences, dispatch pools & ranking, water level) as a central panel with one click; the original settings entry stays.
101
+ - `cordis.patch.yml` keeps the shipped preset plugin list verbatim and extends only the persona suffix; the Agent Teams tools themselves come from the shipped bundle and are enabled automatically when teams mode is turned on.
70
102
 
71
103
  ## Maintenance
72
104
 
73
105
  - After a DSH upgrade that changes shipped preset plugin lists, re-sync `cordis.patch.yml` from the new `presets/*.patch.yml` (keep the doctrine suffix), then reinstall.
74
- - Model-facing protocol lines (`[SWITCHMAN:LANG|POOLS|WATERMARK]`) are deliberately English and byte-stable — do not localize them.
75
- - `npm pack --dry-run` must stay at the audited 43-file / ~138 kB shape (the `docs/` screenshots never ship).
106
+ - Protocol lines (`[SWITCHMAN:LANG|POOLS|WATERMARK|TEAMS]`) are deliberately English and byte-stable — do not localize them.
107
+ - `npm pack --dry-run` must stay at the audited 50 files / ~205 kB shape (`docs/` screenshots never ship).
76
108
 
77
109
  ## License
78
110
 
package/README.pt.md CHANGED
@@ -6,19 +6,35 @@
6
6
 
7
7
  ![dsh-switchman — o nível de água do contexto comanda o switchman, que desvia a rota](docs/assets/hero.svg)
8
8
 
9
- > Contexto no medidor. Tarefas que se distribuem sozinhas.
9
+ > Contexto no medidor: cada tarefa encontra sozinha a faixa certa.
10
10
 
11
- Um plugin para o [DeepSeek Harness](https://github.com/deepseek-ai/deepseek-harness) (DSH). Depois de instalado, seu modelo primário para de fazer tudo sozinho e vira um dispatcher: mede o nível da água, escolhe a faixa, entrega a tarefa, confere o trabalho. Quatro coisas:
11
+ ## Por que você precisa disso
12
12
 
13
- **1. Controle do nível de água do contexto.** A cada turno mede os tokens ao vivo da sessão. Soft (50k por padrão) recomenda delegar, hard (90k) aperta o orçamento de leitura por turno e empurra para encerrar, force (130k) faz backup da sessão e a entrega à compactação — automaticamente. Rode uma sessão o dia inteiro; seu contexto nunca se afoga na própria história. Cada subagent despachado carrega o próprio hard cap e sai com um resumo HANDOFF ao atingi-lo.
13
+ Se você trabalha com o DSH, com o tempo esbarra em duas coisas:
14
14
 
15
- **2. Dispatch em seis faixas.** economy / mechanical / main / hard / vision / review — seis faixas cognitivas. Escolha os modelos candidatos por faixa na página de configurações, ordine-os do mais forte (ancoragem opcional em tiers S/A/B/C) e fixe um reasoning effort por rota — o dropdown lista os níveis que cada modelo *realmente* suporta, não três níveis genéricos. Uma tabela `[SWITCHMAN:POOLS]` vai junto com cada prompt para o modelo saber a quem chamar; o modo `enforce` rejeita na hora modelos fora do pool.
15
+ 1. **A sessão fica cada vez mais pesada.** O histórico empurra o contexto para centenas de milhares de tokens: o modelo começa a esquecer, fica lento e caro, e no fim não sobra opção além do /compact manual — que compacta e perde detalhes no processo.
16
+ 2. **O modelo principal faz tudo sozinho.** Consultar um arquivo, rodar um teste, conferir dados: é sempre ele que mastiga tudo — lento e caro, sendo que a maior parte desse trabalho caberia a um modelo barato.
16
17
 
17
- **3. Preferências de idioma.** Um dropdown para respostas, um para comentários de código e um para documentos escritos. Não definiu? Perguntam uma vez, fica guardado para sempre e toda sessão seguinte o segue.
18
+ dsh-switchman é um plugin para o [DeepSeek Harness](https://github.com/deepseek-ai/deepseek-harness) (DSH). Depois de instalado, o modelo principal deixa de “fazer tudo sozinho” e vira um dispatcher: mede o nível de água, escolhe a faixa, entrega as tarefas, confere o resultado. Não é um modelo novo: é um regulamento de despacho plugado ao DSH mais uma interface de configuração. Em concreto, ele faz seis coisas:
18
19
 
19
- **4. Doutrina delegate-by-default.** Substitui a política de equipe conservadora de fábrica do DSH ("crie teammates apenas quando pedido"): o trabalho miúdo fica nas suas mãos (<200 linhas lidas, <50 alteradas), o trabalho de verdade é delegado por padrão; toda alteração é verificada — acima de 20 linhas vai para um tester, acima de 300 linhas ou lógica central vai para um reviewer. Diga "não use equipes" e ela sai de cena na hora.
20
+ **1. Nível de água do contexto: sessões longas não estouram.** A cada turno ele conta os tokens da sessão em tempo real, e três limiares apertam em degraus: 50k (soft, ajustável) lembra que “é hora de delegar”; 90k (hard) aperta o orçamento de leitura por chamada e empurra para encerrar; 130k (force) dispara o handover automático — fork da sessão como cópia de segurança, contexto compactado, continuação despertada: a tarefa não cai no meio. Nem os subagents em segundo plano que ainda estiverem rodando no momento da entrega se perdem: id, descrição da tarefa e caminho do relatório vão para o documento de handover, e a sessão retomada sabe onde coletar os relatórios em vez de despachar o mesmo trabalho de novo. Cada subagent enviado carrega um teto próprio e independente e, ao atingi-lo, sai depois de escrever o resumo HANDOFF.
20
21
 
21
- Só um modelo? Ainda vale a pena — o controle de nível de água e a doutrina não ligam para quantos modelos você tem.
22
+ **2. Seis pools de despacho: a cada trabalho, o seu modelo.** Pool leve (economy, trabalho pequeno em lote), pool mecânico (mechanical, reescritas de molde), pool principal (main, codificação do dia a dia), pool difícil (hard, raciocínio pesado e refatoração em grande escala), pool multimodal (vision, leitura de imagens), pool de revisão (review, verificação independente). Na página de configurações você marca os candidatos, ordena as prioridades (com níveis opcionais S/A/B/C) e fixa um reasoning effort por rota — o dropdown lista os níveis que aquele modelo realmente suporta, não três níveis genéricos. A cada turno, o prompt do modelo principal carrega uma tabela de recomendações `[SWITCHMAN:POOLS]`: o trabalho é despachado seguindo a tabela. O modo de execução tem três estados: off / advice / enforce (enforce = modelos fora do pool são recusados na hora).
23
+
24
+ **3. Modo Agent Teams: do trabalho solo para comandar uma equipe.** Desligado por padrão: recém-instalado, o trabalho corre no despacho leve via subagent. Na página de configurações, duas chaves independentes:
25
+
26
+ - **Modo Agent Teams** — ao ligar, injeta a doutrina de equipe (delegar por padrão + verificação em níveis + disciplina do quadro de tarefas compartilhado) e habilita automaticamente os Agent Teams do DSH: o modelo principal pode recrutar colegas permanentes (`spawn_teammate`), despachar trabalho para o quadro compartilhado (`team_task_*`) e trocar mensagens com eles (`send_message`). Há uma disciplina clara sobre quando formar a equipe: subtarefas independentes paralelizáveis, trabalho volumoso e autossuficiente, nível de água do contexto principal já alto, necessidade de separar papéis; investigações pontuais de uma vez só continuam pelo subagent. A política de fábrica do DSH é “sem equipe se o usuário não pedir”: aqui ela se inverte para “use quando fizer sentido”. Desligando a chave de novo, as cláusulas de equipe somem sem resíduo, e as ferramentas de equipe nas sessões em andamento não são recolhidas.
27
+ - **Sincronização da whitelist de modelos de subagent** — o DSH tem uma whitelist de autorização “Permitir que os agents escolham modelos para os subagents”: rotas escolhidas nos pools mas não autorizadas são recusadas quando o modelo principal as nomeia explicitamente (no modo equipe, a tabela de recomendações e a página de configurações marcam essas rotas com ⚠). Com esta chave ligada, a união dos seis pools é gravada de uma vez nessa whitelist — sem configurar dos dois lados: o switchman é a única fonte da verdade, e o caminho de despacho via fork entra junto. A whitelist vale como snapshot por “nova sessão”: a sincronização só alcança as sessões abertas depois.
28
+
29
+ O cabeçalho da sessão dá um retorno imediato: badge ⚡ “Equipe autônoma”, ◇ modelo em uso na sessão atual; durante um handover automático aparece um aviso em tempo real do tipo “Handover em andamento · backup da sessão / compactação do contexto / despertar da continuação”.
30
+
31
+ **4. Preferências de idioma: pergunta uma vez, lembra para sempre.** Um dropdown para cada um dos três idiomas — respostas, comentários de código, documentos — com escopo à escolha: global ou por projeto (`.switchman/lang.json`). Pode deixar em branco: no primeiro uso perguntam uma vez, no idioma da interface do DSH, e daí em diante toda sessão segue sozinha.
32
+
33
+ **5. Verificação em níveis: mudou, testa.** Alterações acima de 20 linhas vão para um tester validar; acima de 300 linhas, ou quando tocam lógica central / segurança / consistência de dados, entra também um reviewer com revisão independente. O modelo do reviewer é escolhido ancorando no modelo do “agent que escreveu o diff”, evitando-o sempre que possível; se no pool não dá para evitá-lo, a conclusão declara DOWNGRADED. Basta dizer “não use equipes” e ele volta na hora a trabalhar sozinho.
34
+
35
+ **6. `/vision`: até modelo somente texto lida com imagens.** Quando o modelo principal não sabe ler imagens, o DSH recusa na entrada as mensagens que as trazem. Você anexa a imagem e digita `/vision onde está o erro nesta imagem`: a imagem é resolvida em um caminho de arquivo e entregue à leitura de um modelo do pool multimodal, e a conclusão volta para a sessão atual. Acima da caixa de entrada aparece antes o aviso “o modelo atual não suporta leitura de imagens”; se um envio direto da imagem for recusado, a mensagem é reescrita uma vez para `/vision` e reenviada sozinha, sem precisar refazer à mão; sem pool multimodal configurado, o comando recusa e indica como configurar.
36
+
37
+ Só um modelo? Ainda vale a pena instalar — o controle do nível de água e a verificação em níveis não ligam para quantos modelos você tem, e sessões longas de modelo único se beneficiam do mesmo jeito.
22
38
 
23
39
  ## Skills embutidas
24
40
 
@@ -40,23 +56,38 @@ Só um modelo? Ainda vale a pena — o controle de nível de água e a doutrina
40
56
  plugin_manager: install_bundle target=/path/to/dsh-switchman
41
57
  ```
42
58
 
43
- 2. **Reinicie o DSH** — feche o app por completo e reabra (recarregar a página não basta) para que a tabela de módulos do cliente reconheça o bundle.
59
+ ou pelo terminal via CLI `dsh` — escolha o perfil que corresponde a como você executa o DSH:
60
+
61
+ ```bash
62
+ dsh plugin --profile web add dsh-switchman # Web GUI
63
+ dsh plugin --profile desktop add dsh-switchman # app desktop
64
+ ```
65
+
66
+ 2. **Reinicie o DSH** — feche o app por completo e reabra (recarregar a página não basta), para que a tabela de módulos do cliente reconheça o bundle.
67
+
68
+ 3. **Preferências de idioma** — Settings → dsh-switchman, ou a entrada “Switchman Control Center” na barra lateral da página inicial. Na primeira tela escolhe-se primeiro o escopo: global (este perfil) ou por projeto (o `.switchman/lang.json` de cada projeto); depois, três dropdowns definem respectivamente o idioma de respostas / comentários / documentos, cada um com uma linha de status “Atual: …” embaixo. Pode pular: no primeiro uso perguntam uma vez e fica guardado (a pergunta segue o idioma da interface do DSH).
69
+
70
+ ![Preferências de idioma: escopo e três idiomas](docs/assets/conf-language-en.png)
71
+
72
+ 4. **Configure os pools de despacho** — em cada card de pool você marca os modelos candidatos agrupados por provider; ao marcar “ordem manual” o card vira uma lista de prioridade numerada, reordenável com ↑ ↓ ×, e ao lado de cada rota dá para fixar o reasoning effort (padrão “seguir a faixa”; ao fixar, ele lista as faixas que aquele modelo realmente suporta). A linha de resumo no topo acompanha o progresso em tempo real, por exemplo “6/6 pools configurados · 2 no ranking · modo advice”.
73
+
74
+ ![Pools de despacho: os quatro pools economy / mechanical / main / hard](docs/assets/conf-pool-1-en.png)
44
75
 
45
- 3. **Abra a página de configurações** — Settings → dsh-switchman. A primeira tela é a preferência de idioma: um dropdown para respostas / comentários / documentos, cada um com uma linha ao vivo `current: …`. Pode pular — perguntam uma vez e fica guardado.
76
+ O pool multimodal e o de revisão ficam mais abaixo; ainda mais abaixo vêm o **ranking de capacidade** (a união dos modelos escolhidos nos seis pools: a numeração é a ordem de capacidade, os mais fortes primeiro, com níveis opcionais S/A/B/C) e o **modo de execução** (advice / enforce).
46
77
 
47
- ![Página de configurações e preferência de idioma](docs/assets/conf-demo1.png)
78
+ ![Pool multimodal e pool de revisão, ranking de capacidade e modo de execução](docs/assets/conf-pool-2-en.png)
48
79
 
49
- 4. **Preencha os seis pools** — cada card de pool lista os candidatos agrupados por provider; marque os que quiser. Marque **manual order** e o card vira uma lista de prioridade numerada com controles ↑ ↓ ×. O dropdown de effort ao lado de cada rota selecionada vem em *follow lane* por padrão; ao fixá-lo, ele lista os níveis que aquele modelo realmente suporta (Low / High / Max…). Uma linha de resumo acompanha o progresso ao vivo: “6/6 pools definidos · 3 ranqueados · modo advice”.
80
+ 5. **Agent Teams** — as duas chaves começam desligadas: rode primeiro no modo puro de subagent. Para deixar que ele recrute a equipe sozinho, ligue “Modo Agent Teams”; para poupar a autorização duplicada dos dois lados, ligue “Sincronização da whitelist de modelos de subagent” — abaixo da chave, uma linha de status do tipo “N registros sincronizados + horário” confirma o resultado da gravação.
50
81
 
51
- ![Pools de dispatch](docs/assets/conf-demo2.png)
82
+ ![Agent Teams: as duas chaves e o status de sincronização da whitelist](docs/assets/conf-team-en.png)
52
83
 
53
- 5. **Ranking e watermark** — a ordem da tabela de ranking é a ordem de capacidade (mais forte primeiro), com tiers opcionais S/A/B/C; o modo de execução é `off` / advice / enforce (enforce = modelos fora do pool são rejeitados). Abaixo, a seção de watermark endurece o comportamento conforme o uso de tokens: três limiares, um orçamento de leitura por chamada, o comportamento do modo hard (cap / deny), uma chave de handover automático e um cap separado para subagents. A linha de baixo traz os comandos: `/ctx-pause` para parar de intervir · `/ctx-resume` para retomar · `/ctx-handover` para fazer backup e entregar agora.
84
+ 6. **Nível de água do contexto** — os três limiares (padrão 50000 / 90000 / 130000), o orçamento de leitura por chamada, o comportamento do limiar hard (deixa passar com limitação / bloqueia), a chave do handover automático e o teto independente dos subagents ficam todos nesta área. Uma linha de comandos embaixo: `/ctx-pause` pausa as intervenções · `/ctx-resume` retoma · `/ctx-handover` faz backup e entrega na hora (ele conduz a sessão até o limite de inatividade e espera a janela de nova tentativa da compactação: o resultado pode levar alguns minutos).
54
85
 
55
- ![Ranking e watermark de contexto](docs/assets/conf-demo3.png)
86
+ ![Nível de água do contexto: limiares, orçamento e comandos](docs/assets/conf-ctx-en.png)
56
87
 
57
- 6. **Verifique** — o badge ⚡ aparece ao lado do chip de preset no cabeçalho de qualquer sessão; pergunte ao modelo “o que diz a última seção do seu system prompt?” — ele deve mencionar a doutrina dsh-switchman.
88
+ 7. **Verifique** — no cabeçalho da sessão aparece o badge ⚡ “Equipe autônoma” (ao lado, o ◇ mostra o modelo da sessão atual); ou pergunte direto ao modelo “qual é o título da última seção do seu system prompt?” — a resposta deve mencionar a doutrina dsh-switchman.
58
89
 
59
- **Configuração única do db-query** (as dependências dos scripts vivem dentro do diretório da skill):
90
+ **Configuração única do db-query** (as dependências dos scripts vivem dentro do diretório da skill, sem sujar o projeto):
60
91
 
61
92
  ```bash
62
93
  bash <install-dir>/skills/db-query/scripts/setup.sh
@@ -64,15 +95,16 @@ bash <install-dir>/skills/db-query/scripts/setup.sh
64
95
 
65
96
  ## Como funciona
66
97
 
67
- - A metade Host (`index.js` + `host/`) injeta três seções dinâmicas no system prompt, os gates de orçamento de leitura e enforce, a captura automática de respostas e três comandos slash. Todas as configurações são campos voláteis — mudanças salvas valem a partir da próxima montagem de prompt, sem reinício.
68
- - A metade Client (`client.js`) renderiza o badge ⚡ ao lado do chip de preset e a página de configurações, pelos serviços oficiais de settings-form.
69
- - `cordis.patch.yml` reafirma verbatim a lista de plugins de cada preset de fábrica e só estende o sufixo de persona; as ferramentas Agent Teams em si continuam vindo do `@deepseek-ai/dsh-experimental-agent-team-profile` de fábrica.
98
+ - A metade Host (`index.js` + `host/`) injeta as seções dinâmicas do system prompt (idiomas / faixas / nível de água / equipe), a dupla trava de orçamento de leitura + enforce e os quatro comandos slash (o trio ctx mais `/vision`). Toda configuração salva já vale na montagem do prompt seguinte, sem reinício.
99
+ - A metade Client (`client.js`) renderiza a página de configurações, o badge ⚡ e o identificador ◇ do modelo no cabeçalho da sessão e o aviso dinâmico durante o handover, pelos serviços oficiais de settings-form.
100
+ - A entrada “Switchman Control Center” na barra lateral da página inicial abre com um clique a mesma página de configuração (preferências de idioma, pools de despacho e ranking, nível de água) como painel central; a entrada nas configurações permanece.
101
+ - `cordis.patch.yml` conserva integralmente a lista de plugins dos presets de fábrica e intervém só no persona suffix; as ferramentas Agent Teams em si vêm do bundle de fábrica e são habilitadas automaticamente ao ligar o modo equipe.
70
102
 
71
103
  ## Manutenção
72
104
 
73
- - Depois de um upgrade do DSH que mude as listas de plugins dos presets de fábrica, ressincronize `cordis.patch.yml` a partir dos novos `presets/*.patch.yml` (mantenha o sufixo da doutrina) e reinstale.
74
- - As linhas de protocolo voltadas ao modelo (`[SWITCHMAN:LANG|POOLS|WATERMARK]`) são deliberadamente em inglês e estáveis a byte — não as localize.
75
- - `npm pack --dry-run` deve continuar na forma auditada de 34 arquivos / ~111 kB (os screenshots de `docs/` nunca vão no pacote).
105
+ - Depois de um upgrade do DSH que mude a lista de plugins dos presets de fábrica, ressincronize `cordis.patch.yml` a partir dos novos `presets/*.patch.yml` (mantenha o doctrine suffix) e reinstale.
106
+ - As linhas de protocolo (`[SWITCHMAN:LANG|POOLS|WATERMARK|TEAMS]`) ficam deliberadamente em inglês e estáveis a byte — não as localize.
107
+ - `npm pack --dry-run` deve continuar na forma auditada de 50 arquivos / ~205 kB (os screenshots de `docs/` não vão no pacote).
76
108
 
77
109
  ## License
78
110
 
package/README.ru.md CHANGED
@@ -2,61 +2,92 @@
2
2
 
3
3
  [English](./README.md) | [简体中文](./README.zh.md) | [繁體中文](./README.zh-TW.md) | [日本語](./README.ja.md) | [한국어](./README.ko.md) | [Español](./README.es.md) | [Français](./README.fr.md) | [Deutsch](./README.de.md) | [Italiano](./README.it.md) | [Português](./README.pt.md) | **Русский**
4
4
 
5
- > **Семейство switchman**, один автор, одна оркестрация: [opencode-switchman](https://github.com/mrzturn/opencode-switchman) (оригинал для OpenCode) · [zcode-switchman](https://github.com/mrzturn/zcode-switchman) (порт для ZCode) · **dsh-switchman** (этот репозиторий, для DeepSeek Harness).
5
+ > **Семейство switchman**, один автор, одна и та же философия диспетчеризации: [opencode-switchman](https://github.com/mrzturn/opencode-switchman) (оригинал для OpenCode) · [zcode-switchman](https://github.com/mrzturn/zcode-switchman) (порт для ZCode) · **dsh-switchman** (этот репозиторий, версия для DeepSeek Harness).
6
6
 
7
- ![dsh-switchman — уровень воды в контексте управляет стрелочником, и тот переводит маршрут](docs/assets/hero.svg)
7
+ ![dsh-switchman — уровень воды в контексте дёргает стрелку, и задачи уходят на нужный путь](docs/assets/hero.svg)
8
8
 
9
- > Контекст под счётчиком. Задачи распределяются сами.
9
+ > Контекст под счётчиком. Задачи сами находят свою полосу.
10
10
 
11
- Плагин для [DeepSeek Harness](https://github.com/deepseek-ai/deepseek-harness) (DSH). После установки ваша основная модель перестаёт всё делать сама и становится диспетчером: измеряет уровень воды, выбирает полосу, раздаёт задачи, проверяет работу. Четыре вещи:
11
+ ## Зачем это нужно
12
12
 
13
- **1. Контроль уровня воды в контексте.** Каждый ход замеряет фактическое потребление токенов сессии. Soft (по умолчанию 50k) советует делегировать, hard (90k) урезает бюджет чтения на ход и подталкивает к завершению, force (130k) делает бэкап сессии и передаёт её компакции — автоматически. Держите сессию открытой хоть весь день; ваш контекст не утонет в собственной истории. Каждый отправленный субагент несёт собственный hard cap и по его достижении выходит с резюме HANDOFF.
13
+ Если работать в DSH подольше, рано или поздно упираешься в две вещи:
14
14
 
15
- **2. Диспетчеризация по шести полосам.** economy / mechanical / main / hard / vision / review — шесть когнитивных полос. Выберите модели-кандидаты по каждой полосе на странице настроек, расставьте от сильнейшей (опциональная привязка к tier-ам S/A/B/C) и зафиксируйте reasoning effort для каждого маршрута — в выпадающем списке те уровни, которые каждая модель *реально* поддерживает, а не три универсальных. Таблица `[SWITCHMAN:POOLS]` уходит с каждым промптом, чтобы модель знала, кого вызывать; режим `enforce` наотрез отвергает модели вне пула.
15
+ 1. **Сессия тяжелеет с каждым сообщением.** История раздувает контекст до сотен тысяч токенов — модель начинает забывать, тормозить и дорожать; в конце концов остаётся ручной /compact, а каждое сжатие ещё и теряет детали.
16
+ 2. **Главная модель всё делает сама.** Прочитать файл, прогнать тест, сверить данные — всё она грызёт сама: медленно и дорого, хотя большая часть этой работы по праву досталась бы дешёвой модели.
16
17
 
17
- **3. Языковые предпочтения.** По одному выпадающему списку для ответов, комментариев в коде и создаваемых документов. Не задано? Спросят один раз, запомнят навсегда, и каждая следующая сессия будет этому следовать.
18
+ dsh-switchman — плагин для [DeepSeek Harness](https://github.com/deepseek-ai/deepseek-harness) (DSH). После установки главная модель перестаёт «делать всё сама» и становится диспетчером: замеряет уровень воды, выбирает полосу, раздаёт задачи, принимает работу. Это не новая модель, а свод правил диспетчеризации, пристёгнутый к DSH, плюс страница настроек. Конкретно он делает шесть вещей:
18
19
 
19
- **4. Доктрина delegate-by-default.** Заменяет поставляемую в DSH консервативную политику команд («создавайте teammates только по прямой просьбе»): мелочёвка остаётся ручной работой (<200 прочитанных строк, <50 изменённых), настоящая работа по умолчанию делегируется; каждое изменение проверяется — больше 20 строк уходит тестировщику, больше 300 строк или ядро логики — ревьюеру. Скажите «не использовать команды» — и она мгновенно отойдёт в сторону.
20
+ **1. Уровень воды в контексте: длинная сессия не переполняется.** Каждый ход подсчитывает токены сессии в реальном времени, и три линии уровня ужесточаются по нарастающей: 50k (soft, настраивается) подсказывает «пора делегировать»; 90k (hard) урезает бюджет разового чтения файла и подталкивает к завершению; 130k (force) запускает автоматическую передачу — форкает копию сессии в архив, сжимает контекст и будит продолжение, работа не обрывается. Фоновые субагенты, которые ещё бегут в момент передачи, тоже не теряются: id, описания задач и пути к отчётам записываются в документ передачи, и продолжившаяся сессия знает, куда идти за отчётами, а не раздаёт работу заново. У каждого отправленного субагента свой жёсткий потолок: доработав до него, он завершается резюме HANDOFF.
20
21
 
21
- Всего одна модель? Всё равно стоит — контролю уровня воды и доктрине всё равно, сколько у вас моделей.
22
+ **2. Шесть пулов диспетчеризации: под каждую работу — своя модель.** Лёгкий пул (economy — мелкие массовые задачи), механический (mechanical — шаблонные переработки), основной (main — повседневный кодинг), пул высокой сложности (hard — тяжёлые рассуждения и крупные рефакторинги), мультимодальный (vision — чтение картинок), пул ревью (review — независимая проверка). На странице настроек отмечаете кандидатов, расставляете приоритеты (можно с привязкой к ступеням S/A/B/C) и для каждого маршрута отдельно фиксируете reasoning effort — выпадающий список ступеней берётся из уровней, которые модель реально поддерживает, а не из трёх универсальных. Каждый ход промпт главной модели несёт с собой таблицу рекомендаций `[SWITCHMAN:POOLS]`, и работа раздаётся по ней. У режима исполнения три состояния: off / advice / enforce (enforce = модель вне пула просто отклоняется).
23
+
24
+ **3. Режим Agent Teams: от работы в одиночку — к своей команде.** По умолчанию выключен: сразу после установки это просто лёгкая диспетчеризация через subagent. На странице настроек два независимых переключателя:
25
+
26
+ - **Режим команды агентов** — при включении внедряет командный регламент (делегирование по умолчанию + многоуровневая проверка + дисциплина общей доски задач) и автоматически включает Agent Teams в DSH: главная модель может нанимать постоянных товарищей по команде (`spawn_teammate`), ставить им задачи на общей доске (`team_task_*`) и обмениваться с ними сообщениями (`send_message`). Когда заводить команду, решает чёткая дисциплина: параллельные независимые подзадачи, объёмная самодостаточная работа, уже высокий уровень воды в главном контексте, потребность разделить роли; разовая точечная разведка по-прежнему идёт через subagent. Заводская политика DSH — «пока пользователь прямо не попросил, команду не создавать»; здесь она перевёрнута в «когда нужно — создавай». Если выключить переключатель обратно, от командных пунктов не останется и следа, а инструменты команды из уже работающих сессий не изымаются.
27
+ - **Синхронизация белого списка моделей субагентов** — в DSH есть белый список авторизации «разрешить агентам выбирать модели для субагентов»: если маршрут выбран в пуле, но не авторизован, явное назначение его главной моделью будет отклонено (в командном режиме и таблица рекомендаций, и страница настроек помечают такие маршруты ⚠). Включите этот переключатель — и объединение шести пулов целиком запишется в белый список: настраивать дважды не нужно, switchman остаётся единственным источником истины, и путь dispatch через fork тоже охвачен. Белый список применяется по снимку «новая сессия»: синхронизация действует только на сессии, открытые после неё.
28
+
29
+ В шапке сессии — наглядная обратная связь: значок ⚡ «автономная команда», ◇ с фактической моделью текущей сессии; когда идёт автоматическая передача, появляется живая подсказка «идёт передача · резервная сессия / сжатие контекста / пробуждение продолжения».
30
+
31
+ **4. Языковые предпочтения: спросит один раз — запомнит навсегда.** Три выпадающих списка: язык ответов, комментариев в коде и документов; область действия — глобальная или по проекту (`.switchman/lang.json`). Настраивать не обязательно: при первом использовании спросят один раз — на языке интерфейса вашего DSH — и запомнят; дальше каждая сессия соблюдает выбор автоматически.
32
+
33
+ **5. Многоуровневая проверка: изменено — проверено.** Изменения больше 20 строк уходят тестировщику на проверку; изменения больше 300 строк или затрагивающие ядро / безопасность / согласованность данных — дополнительно независимому ревьюеру. Модель ревьюера подбирают, привязываясь к модели агента, написавшего этот diff, и стараются её обойти; если пул другого выхода не оставляет, в заключении прямо заявляется DOWNGRADED. Скажете «не использовать команду» — всё мгновенно вернётся к одиночной работе.
34
+
35
+ **6. `/vision`: картинки по зубам даже чисто текстовой модели.** Когда главная модель не читает изображения, DSH прямо на входе отклоняет сообщения с картинками. Прикрепите картинку и введите `/vision что не так на этой картинке` — изображение будет сведено к пути файла и отдано на чтение модели из мультимодального пула, а вывод вернётся в текущую сессию. Над полем ввода заранее подсказывают: «текущая модель не умеет читать изображения»; если прямая отправка картинки отклонена, она один раз автоматически переоформляется в `/vision` и уходит повторно — вручную ничего переписывать не нужно; если мультимодальный пул не настроен, команда откажется и подскажет, что настроить.
36
+
37
+ Всего одна модель? Всё равно стоит поставить — контроль уровня воды и многоуровневая проверка от числа моделей не зависят, и длинная сессия на одной модели выигрывает от них ничуть не меньше.
22
38
 
23
39
  ## Встроенные навыки
24
40
 
25
- - **db-query** — верификация MySQL/Redis только на чтение: выполните SQL, чтобы проверить записи, ключи кэша / TTL, согласованность между хранилищами. Отклоняет любую запись. Разовая настройка — ниже.
26
- - **git-commit-message** — текст коммита по конвенции. Только текст; git не трогает.
27
- - **requirement-docs** — единая спецификация для требований / PRD / дизайн-документов, архивируется в `docs/requirements-and-design/`.
41
+ - **db-query** — верификация MySQL / Redis только на чтение: выполнить SQL для сверки данных, проверить ключи кэша / TTL и согласованность между хранилищами; любую запись отклоняет. При первом использовании нужна инициализация (см. ниже).
42
+ - **git-commit-message** — генерирует выдержанный в конвенциях текст коммита: только текст, git за вас не трогает.
43
+ - **requirement-docs** — единая спецификация для анализа требований / PRD / проектных документов; результаты архивируются в `docs/requirements-and-design/`.
28
44
 
29
45
  ## Быстрый старт
30
46
 
31
- 1. **Установите** — из любой сессии агента или через веб-менеджер плагинов:
47
+ 1. **Установите** — попросите agent выполнить установку в любой сессии, или откройте веб-страницу управления плагинами:
32
48
 
33
49
  ```
34
50
  plugin_manager: install_bundle target=dsh-switchman
35
51
  ```
36
52
 
37
- или из локального checkout'а (в режиме link; после подтягивания изменений снова выполните `remove_bundle` + `install_bundle`):
53
+ или установите из локального checkout'а (режим link; после обновления нужно переустановить: `remove_bundle` + `install_bundle`):
38
54
 
39
55
  ```
40
56
  plugin_manager: install_bundle target=/path/to/dsh-switchman
41
57
  ```
42
58
 
43
- 2. **Перезапустите DSH** — полностью закройте приложение и откройте заново (перезагрузки страницы недостаточно), чтобы таблица клиентских модулей подхватила бандл.
59
+ или установите из терминала командой `dsh` — профиль выбирайте по способу запуска:
60
+
61
+ ```bash
62
+ dsh plugin --profile web add dsh-switchman # Web GUI
63
+ dsh plugin --profile desktop add dsh-switchman # десктоп-приложение
64
+ ```
65
+
66
+ 2. **Перезапустите DSH** — полностью закройте приложение и откройте снова (перезагрузка страницы не считается) — только тогда таблица клиентских модулей распознает этот bundle.
67
+
68
+ 3. **Языковые предпочтения** — Настройки → dsh-switchman, или пункт «Диспетчерская Switchman» в боковой панели главной страницы. На первом экране сначала выбирается область действия: глобально (этот profile) или по проектам (`.switchman/lang.json` каждого проекта); затем тремя выпадающими списками задаются языки ответов / комментариев / документов, под каждым — строка состояния «сейчас: …». Пропустить не страшно: при первом использовании спросят один раз и запомнят (вопрос зададут на языке интерфейса DSH).
69
+
70
+ ![Языковые предпочтения: область действия и три языка](docs/assets/conf-language-en.png)
71
+
72
+ 4. **Настройте пулы диспетчеризации** — на каждой карточке пула отмечайте модели-кандидаты, сгруппированные по поставщикам; отметьте «ручной порядок» — и карточка превратится в нумерованный список приоритетов, порядок меняется кнопками ↑ ↓ ×, а рядом с каждым маршрутом можно зафиксировать reasoning effort (по умолчанию «следовать полосе», после фиксации в списке — ступени, которые эта модель реально поддерживает). Сводная строка сверху отражает прогресс в реальном времени, например: «пулов настроено: 6/6 · позиций в рейтинге: 2 · режим advice».
73
+
74
+ ![Пулы диспетчеризации: четыре пула — лёгкий / механический / основной / высокой сложности](docs/assets/conf-pool-1-en.png)
44
75
 
45
- 3. **Откройте страницу настроек** — Settings → dsh-switchman. Первый экран — языковые предпочтения: по выпадающему списку на ответы / комментарии / документы, у каждого живая строка `current: …`. Можете пропустить — спросят один раз и запомнят.
76
+ Мультимодальный пул и пул ревью — ниже; ещё ниже — **рейтинг по способностям** (объединение моделей, выбранных в шести пулах; номер в списке и есть место по способности, сильнейшие впереди, с возможной привязкой к ступеням S/A/B/C) и **режим исполнения** (advice / enforce).
46
77
 
47
- ![Страница настроек и языковые предпочтения](docs/assets/conf-demo1.png)
78
+ ![Мультимодальный пул, пул ревью, рейтинг по способностям и режим исполнения](docs/assets/conf-pool-2-en.png)
48
79
 
49
- 4. **Заполните шесть пулов** — каждая карточка пула перечисляет кандидатов, сгруппированных по провайдеру; отметьте нужные. Отметьте **manual order**, и карточка станет нумерованным списком приоритетов с кнопками ↑ ↓ ×. Выпадающий список effort рядом с каждым выбранным маршрутом по умолчанию стоит на *follow lane*; если его зафиксировать, он покажет уровни, которые эта модель реально поддерживает (Low / High / Max…). Строка сводки в реальном времени показывает прогресс: «6/6 пулов задано · 3 в рейтинге · режим advice».
80
+ 5. **Команда агентов** — оба переключателя по умолчанию выключены: сначала поработайте в чистом режиме subagent. Хотите, чтобы команда собиралась сама, — включите «режим команды агентов»; хотите избавиться от двойной настройки авторизации, — включите «синхронизацию белого списка моделей субагентов»: под переключателем есть строка состояния «синхронизировано N записей + время», подтверждающая результат записи.
50
81
 
51
- ![Пулы диспетчеризации](docs/assets/conf-demo2.png)
82
+ ![Команда агентов: два переключателя и состояние синхронизации белого списка](docs/assets/conf-team-en.png)
52
83
 
53
- 5. **Рейтинг и watermark** — порядок в таблице рейтинга — это порядок по возможностям (сильнейшие первыми), с опциональными tier-ами S/A/B/C; режим исполнения — `off` / advice / enforce (enforce = модели вне пула отклоняются). Ниже секция watermark ужесточает поведение по мере расхода токенов: три порога, бюджет чтения на вызов, поведение жёсткого режима (cap / deny), переключатель автоматической передачи управления и отдельный лимит для субагентов. Нижняя строка несёт команды: `/ctx-pause` — прекратить вмешательство · `/ctx-resume` — возобновить · `/ctx-handover` — сделать бэкап и передать управление прямо сейчас.
84
+ 6. **Уровень воды в контексте** — три порога (по умолчанию 50000 / 90000 / 130000), бюджет разового чтения, поведение жёсткого порога (пропустить с ограничением / заблокировать), переключатель автоматической передачи и отдельный потолок для субагентов — всё в этом разделе. Внизу строка команд: `/ctx-pause` приостановить вмешательство · `/ctx-resume` возобновить · `/ctx-handover` сделать резервную копию и передать управление прямо сейчас (команда подводит сессию к границе простоя и ждёт окно повторной попытки компакции, результат может занять несколько минут).
54
85
 
55
- ![Рейтинг и watermark контекста](docs/assets/conf-demo3.png)
86
+ ![Уровень воды в контексте: пороги, бюджет и команды](docs/assets/conf-ctx-en.png)
56
87
 
57
- 6. **Проверьте** — значок ⚡ появляется рядом с чипом пресета в шапке любой сессии; спросите у модели «что написано в последней секции твоего системного промпта?» — она должна упомянуть доктрину dsh-switchman.
88
+ 7. **Проверьте** — в шапке сессии появился значок ⚡ «автономная команда» (рядом ◇ показывает модель текущей сессии); либо спросите модель напрямую: «как называется последний раздел твоего системного промпта?» — в ответе должен прозвучать регламент dsh-switchman.
58
89
 
59
- **Разовая настройка db-query** (зависимости скриптов живут внутри каталога навыка):
90
+ **Инициализация db-query при первом использовании** (зависимости скриптов ставятся внутрь каталога навыка и не засоряют проект):
60
91
 
61
92
  ```bash
62
93
  bash <install-dir>/skills/db-query/scripts/setup.sh
@@ -64,15 +95,16 @@ bash <install-dir>/skills/db-query/scripts/setup.sh
64
95
 
65
96
  ## Как это работает
66
97
 
67
- - Host-половина (`index.js` + `host/`) внедряет три динамические секции системного промпта, шлюзы бюджета чтения и enforce, автоматический захват ответов и три слэш-команды. Все настройки — volatile-поля: сохранённые изменения вступают в силу при следующей сборке промпта, без перезапуска.
68
- - Client-половина (`client.js`) отрисовывает значок ⚡ рядом с чипом пресета и страницу настроек — через официальные сервисы settings-form.
69
- - `cordis.patch.yml` дословно повторяет список плагинов каждого штатного пресета и расширяет только суффикс персоны; сами инструменты Agent Teams по-прежнему приходят из штатного `@deepseek-ai/dsh-experimental-agent-team-profile`.
98
+ - Host-половина (`index.js` + `host/`) внедряет динамические секции системного промпта (язык / полосы / уровень воды / команда), двойной шлюз бюджета чтения и enforce и четыре слэш-команды (ctx-тройка + `/vision`). Все настройки после сохранения вступают в силу при следующей сборке промпта — без перезапуска.
99
+ - Client-половина (`client.js`) отрисовывает страницу настроек, значок ⚡ и метку модели ◇ в шапке сессии, живую подсказку во время передачи управления — всё через официальные сервисы settings-form.
100
+ - Пункт «Диспетчерская Switchman» в боковой панели главной страницы: один клик открывает ту же страницу настроек (языковые предпочтения, пулы и рейтинг, уровень воды) в виде центральной панели; прежний вход в настройки остаётся на месте.
101
+ - `cordis.patch.yml` целиком сохраняет список плагинов заводских пресетов и расширяет только persona suffix; сами инструменты Agent Teams приходят из заводского bundle и автоматически включаются вместе с командным режимом.
70
102
 
71
103
  ## Обслуживание
72
104
 
73
- - После обновления DSH, меняющего списки плагинов штатных пресетов, пересинхронизируйте `cordis.patch.yml` из новых `presets/*.patch.yml` (сохраните суффикс доктрины) и переустановите.
74
- - Строки протокола, адресованные модели (`[SWITCHMAN:LANG|POOLS|WATERMARK]`), намеренно на английском и стабильны побайтово — не локализуйте их.
75
- - `npm pack --dry-run` должен оставаться в аудитированной форме: 34 файла / ~111 kB (скриншоты из `docs/` в пакет никогда не попадают).
105
+ - Если после обновления DSH изменился список плагинов заводских пресетов, пересинхронизируйте `cordis.patch.yml` из новых `presets/*.patch.yml` (сохранив doctrine suffix) и переустановите.
106
+ - Строки протокола (`[SWITCHMAN:LANG|POOLS|WATERMARK|TEAMS]`) намеренно оставлены на английском и стабильны побайтово — не локализуйте их.
107
+ - `npm pack --dry-run` должен сохранять аудированную форму: 50 файла / ~205 kB (скриншоты из `docs/` в пакет не входят).
76
108
 
77
109
  ## License
78
110