diff --git a/CHANGELOG.md b/CHANGELOG.md index 38d05d8..47045ea 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,5 +1,24 @@ # Changelog +## 0.8.0 — 2026-10-18 + +Fewer tokens in every Claude Code session: about 1.6k instead of 5.5–7k. + +- Tool groups loaded on demand: a session starts with the core (`ado_status`, `ado_settings`, `ado_upgrade`, + `ado_work_item`, `ado_query`, `ado_search`, `ado_trace` and the new `ado_tools`), and Claude loads a group with + `ado_tools enable=write` (or `"write;boards"`) when the conversation needs it; the client is told about the new tools + (MCP `tools/list_changed`). Groups: `write`, `boards`, `wiki`, `code`, `tests`, `recipes`, `pr`, `pipelines`. The mode + says which groups may be loaded. Skills and prompts load the groups they use. +- `adolens config --tool-loading auto|demand|all` (or *Tools at start* in the settings menu). `auto`, the default: on + demand in Claude Code; every group of the mode at start in other clients (Claude Desktop), which may not take new + tools during a conversation. `demand`: on demand everywhere. `all`: everything at start. +- Tool sets renamed to groups: `work` → `write`, `trace` → `code`, `test` → `tests` (old names in the settings still work). +- Shorter descriptions of `ado_update`, `ado_create` and `ado_pr_update`. +- Pull request tags (labels): `ado_pr_update action=tag tags="R349; -old"`, tags when creating a PR, and tags shown in + PR lists, details and merged PRs. +- Product Owner mode: no pull request or pipeline tools and no developer prompts (`dev_*`); they stay in the dev and + full modes. + ## 0.7.3 — 2026-10-16 Fixes from a real question: "pull requests merged into staging after release X, with their work items and tags". diff --git a/README.md b/README.md index 728c8c2..70f96f5 100644 --- a/README.md +++ b/README.md @@ -133,7 +133,8 @@ adolens config # show settings adolens config --connection contoso --project Demo --team "Demo Team" adolens config --default-connection fabrikam adolens config --mode dev # po | dev | full -adolens config --add-toolset pipelines # one more tool set on top of the mode +adolens config --add-toolset pipelines # one more tool group on top of the mode +adolens config --tool-loading auto # auto | demand | all: when tool groups are loaded adolens config --confirm-above 3 # updates of more items are previewed first (0: always) adolens config --usage-log false adolens config --show-tokens true # end every answer with [~N tokens] @@ -168,24 +169,32 @@ staging → UAT, master → PROD). Claude asks the user once how they call these Settings live in `%LOCALAPPDATA%\ado-lens\adolens.json` (no secrets) — they can be edited by hand too. -### Modes and tool sets +### Modes and tool groups -A mode only chooses which tools Claude sees: fewer tools mean better choices and fewer tokens in every session. It is -never a permission. +Every tool definition costs tokens in every session, so a session starts with a small core (about 1.5k tokens) and +Claude loads a group with `ado_tools enable=` when the conversation needs it — a question about the sprint +loads `boards`, a new story loads `write`. The skills and prompts load what they use. A mode only chooses which groups +may be loaded; it is never a permission (the PAT decides). -| Tool set | Tools | po | dev | full | +| Group | Tools | po | dev | full | |---|---|:-:|:-:|:-:| -| `core` | `ado_status`, `ado_settings`, `ado_upgrade`, `ado_fields` | ✓ | ✓ | ✓ | -| `work` | `ado_work_item`, `ado_query`, `ado_create`, `ado_update`, `ado_comment`, `ado_link`, `ado_search`, `ado_undo`, `ado_attachments`, `ado_create_tree` | ✓ | ✓ | ✓ | -| `pr` | `ado_pr_update` | – | ✓ | ✓ | -| `pipelines` | `ado_pipeline_run` | – | ✓ | ✓ | -| `boards` | `ado_sprint`, `ado_board`, `ado_backlog`, `ado_my_day`, `ado_health`, `ado_release_notes`, `ado_metrics` | ✓ | – | ✓ | +| `core` (always) | `ado_status`, `ado_settings`, `ado_upgrade`, `ado_tools`, `ado_work_item`, `ado_query`, `ado_search`, `ado_trace` | ✓ | ✓ | ✓ | +| `write` | `ado_fields`, `ado_create`, `ado_update`, `ado_comment`, `ado_link`, `ado_create_tree`, `ado_undo` | ✓ | ✓ | ✓ | +| `boards` | `ado_sprint`, `ado_board`, `ado_backlog`, `ado_my_day`, `ado_health`, `ado_metrics`, `ado_release_notes` | ✓ | – | ✓ | | `wiki` | `ado_wiki`, `ado_wiki_write` | ✓ | ✓ | ✓ | -| `trace` | `ado_trace`, `ado_changes`, `ado_file`, `ado_label`, `ado_review`, `ado_pr`, `ado_pipeline` | ✓ | ✓ | ✓ | +| `code` | `ado_changes`, `ado_file`, `ado_label`, `ado_review`, `ado_attachments` | ✓ | ✓ | ✓ | +| `tests` | `ado_tests`, `ado_test_create` | ✓ | – | ✓ | | `recipes` | `ado_recipe` | ✓ | ✓ | ✓ | -| `test` | `ado_tests`, `ado_test_create` | ✓ | – | ✓ | -| `test`, `recipes` | planned | ✓ | (recipes) | ✓ | -| `code` | planned | – | ✓ | ✓ | +| `pr` | `ado_pr`, `ado_pr_update` | – | ✓ | ✓ | +| `pipelines` | `ado_pipeline`, `ado_pipeline_run` | – | ✓ | ✓ | + +`adolens config --add-toolset ` allows one more group on top of the mode. When groups are loaded is +`adolens config --tool-loading` (or *Tools at start* in the settings menu): + +- `auto` (default): on demand in Claude Code, which takes new tools during a conversation; every group of the mode + at start in other clients, Claude Desktop among them (about 6–7k tokens), so nothing is missing there; +- `demand`: on demand in every client (about 1.3k tokens at start) — for a client known to take new tools; +- `all`: every group of the mode at start everywhere. ## Tool map @@ -342,7 +351,7 @@ regular expression per line, `!word` for allowed words. Without a list the relea | File | What it checks | |---|---| -| `SetupTests.cs` | settings, connections and PAT order (Credential Manager first), command line, Claude configuration edits, Credential Manager, HTTP retries and errors, tool definition budget per mode | +| `SetupTests.cs` | settings, connections and PAT order (Credential Manager first), command line, Claude configuration edits, Credential Manager, HTTP retries and errors, tool definition budget at start and per mode, the session core, tool groups | | `MetadataTests.cs` | fetching the structure (levels, inherited process name, bugs on the requirement backlog), change history, compact `ado_fields` answers | | `BoardTests.cs` | sprint progress, capacity left with days off, attention list, picking sprints, ended sprints, board columns and WIP, moving cards with the state mapping, backlog order and reordering, my day | | `SetupFlowTests.cs` | release versions and packages for updates, the team's wiki table (round trip, hand-edited pages), detecting the flow from releases and branches, the team map on the wiki with its version, local map over the team's | @@ -375,7 +384,7 @@ issues or commits. | rich text | `Html.cs` | | people | `Identities.cs` | | connections, PAT, Claude registration | `Settings.cs`, `CredentialStore.cs`, `ClaudeConfigs.cs`, `Cli.cs` | -| modes and tool sets | `Toolsets.cs` | +| modes and tool groups, loading them | `Toolsets.cs`, `ToolGroups.cs` | | HTTP, retries, errors | `AdoClient.cs` | Documentation is bilingual: every change to `README.md` goes to `README.pl.md` in the same commit. diff --git a/README.pl.md b/README.pl.md index fa1fc64..d16313f 100644 --- a/README.pl.md +++ b/README.pl.md @@ -136,7 +136,8 @@ adolens config # pokaż ustawienia adolens config --connection contoso --project Demo --team "Demo Team" adolens config --default-connection fabrikam adolens config --mode dev # po | dev | full -adolens config --add-toolset pipelines # dodatkowy zestaw narzędzi ponad tryb +adolens config --add-toolset pipelines # dodatkowa grupa narzędzi ponad tryb +adolens config --tool-loading auto # auto | demand | all: kiedy ładować grupy narzędzi adolens config --confirm-above 3 # zmiany większej liczby elementów najpierw jako podgląd (0: zawsze) adolens config --usage-log false adolens config --show-tokens true # każda odpowiedź kończy się [~N tokens] @@ -169,24 +170,32 @@ staging → UAT, master → PROD). Claude raz pyta użytkownika, jak nazywa te Ustawienia siedzą w `%LOCALAPPDATA%\ado-lens\adolens.json` (bez sekretów) — można je też edytować ręcznie. -### Tryby i zestawy narzędzi +### Tryby i grupy narzędzi -Tryb wybiera tylko, które narzędzia widzi Claude: mniej narzędzi to trafniejszy wybór i mniej tokenów w każdej sesji. -Nigdy nie jest uprawnieniem. +Każda definicja narzędzia kosztuje tokeny w każdej sesji, więc sesja startuje z małym rdzeniem (ok. 1,5 tys. tokenów), +a Claude dociąga grupę przez `ado_tools enable=`, gdy rozmowa jej potrzebuje — pytanie o sprint ładuje `boards`, +nowa historyjka `write`. Skille i prompty same ładują to, czego używają. Tryb wybiera tylko, które grupy wolno załadować; +nigdy nie jest uprawnieniem (o tym decyduje PAT). -| Zestaw | Narzędzia | po | dev | full | +| Grupa | Narzędzia | po | dev | full | |---|---|:-:|:-:|:-:| -| `core` | `ado_status`, `ado_settings`, `ado_upgrade`, `ado_fields` | ✓ | ✓ | ✓ | -| `work` | `ado_work_item`, `ado_query`, `ado_create`, `ado_update`, `ado_comment`, `ado_link`, `ado_search`, `ado_undo`, `ado_attachments`, `ado_create_tree` | ✓ | ✓ | ✓ | -| `pr` | `ado_pr_update` | – | ✓ | ✓ | -| `pipelines` | `ado_pipeline_run` | – | ✓ | ✓ | -| `boards` | `ado_sprint`, `ado_board`, `ado_backlog`, `ado_my_day`, `ado_health`, `ado_release_notes`, `ado_metrics` | ✓ | – | ✓ | +| `core` (zawsze) | `ado_status`, `ado_settings`, `ado_upgrade`, `ado_tools`, `ado_work_item`, `ado_query`, `ado_search`, `ado_trace` | ✓ | ✓ | ✓ | +| `write` | `ado_fields`, `ado_create`, `ado_update`, `ado_comment`, `ado_link`, `ado_create_tree`, `ado_undo` | ✓ | ✓ | ✓ | +| `boards` | `ado_sprint`, `ado_board`, `ado_backlog`, `ado_my_day`, `ado_health`, `ado_metrics`, `ado_release_notes` | ✓ | – | ✓ | | `wiki` | `ado_wiki`, `ado_wiki_write` | ✓ | ✓ | ✓ | -| `trace` | `ado_trace`, `ado_changes`, `ado_file`, `ado_label`, `ado_review`, `ado_pr`, `ado_pipeline` | ✓ | ✓ | ✓ | +| `code` | `ado_changes`, `ado_file`, `ado_label`, `ado_review`, `ado_attachments` | ✓ | ✓ | ✓ | +| `tests` | `ado_tests`, `ado_test_create` | ✓ | – | ✓ | | `recipes` | `ado_recipe` | ✓ | ✓ | ✓ | -| `test` | `ado_tests`, `ado_test_create` | ✓ | – | ✓ | -| `test`, `recipes` | w planie | ✓ | (recipes) | ✓ | -| `code` | w planie | – | ✓ | ✓ | +| `pr` | `ado_pr`, `ado_pr_update` | – | ✓ | ✓ | +| `pipelines` | `ado_pipeline`, `ado_pipeline_run` | – | ✓ | ✓ | + +`adolens config --add-toolset ` dopuszcza jeszcze jedną grupę ponad tryb. Kiedy ładować grupy, ustawia +`adolens config --tool-loading` (albo *Narzędzia na start* w menu ustawień): + +- `auto` (domyślnie): na żądanie w Claude Code, który przyjmuje nowe narzędzia w trakcie rozmowy; w innych klientach, + także w Claude Desktop, wszystkie grupy trybu od startu (ok. 6–7 tys. tokenów), żeby niczego tam nie brakowało; +- `demand`: na żądanie w każdym kliencie (ok. 1,3 tys. tokenów na start) — dla klienta, o którym wiadomo, że przyjmuje nowe narzędzia; +- `all`: wszystkie grupy trybu od startu wszędzie. ## Mapa narzędzi @@ -342,7 +351,7 @@ i publikuje go razem z `.sha256` i opisem z `CHANGELOG.md` (podgląd: `.\release | Plik | Co sprawdza | |---|---| -| `SetupTests.cs` | ustawienia, połączenia i kolejność PAT (najpierw Menedżer poświadczeń), linia poleceń, edycja konfiguracji Claude'a, Menedżer poświadczeń, ponawianie i błędy HTTP, budżet definicji narzędzi na tryb, faktyczna rejestracja narzędzi | +| `SetupTests.cs` | ustawienia, połączenia i kolejność PAT (najpierw Menedżer poświadczeń), linia poleceń, edycja konfiguracji Claude'a, Menedżer poświadczeń, ponawianie i błędy HTTP, budżet definicji narzędzi na start i na tryb, rdzeń sesji, grupy narzędzi | | `MetadataTests.cs` | pobieranie struktury (poziomy, nazwa procesu dziedziczonego, bugi na backlogu wymagań), historia zmian, zwięzłe odpowiedzi `ado_fields` | | `BoardTests.cs` | postęp sprintu, pozostała pojemność z dniami wolnymi, lista do uwagi, wybór sprintu, zakończone sprinty, kolumny tablicy i WIP, przesuwanie kart z mapowaniem stanów, kolejność backlogu i jej zmiana, mój dzień | | `SetupFlowTests.cs` | wersje i paczki wydań do aktualizacji, tabela zespołu na wiki (w obie strony, strony poprawiane ręcznie), wykrywanie przepływu z release'ów i gałęzi, mapa zespołu na wiki z wersją, mapa lokalna ponad zespołową | @@ -375,7 +384,7 @@ organizacji do testów, zgłoszeń ani commitów. | tekst sformatowany | `Html.cs` | | osoby | `Identities.cs` | | połączenia, PAT, rejestracja w Claude | `Settings.cs`, `CredentialStore.cs`, `ClaudeConfigs.cs`, `Cli.cs` | -| tryby i zestawy narzędzi | `Toolsets.cs` | +| tryby i grupy narzędzi, ich ładowanie | `Toolsets.cs`, `ToolGroups.cs` | | HTTP, ponawianie, błędy | `AdoClient.cs` | Dokumentacja jest w dwóch językach: każdą zmianę w `README.md` trzeba odzwierciedlić w `README.pl.md` w tym samym commicie. diff --git a/packaging/inno/ado-lens.iss b/packaging/inno/ado-lens.iss index 24b5832..f364d55 100644 --- a/packaging/inno/ado-lens.iss +++ b/packaging/inno/ado-lens.iss @@ -14,6 +14,8 @@ #ifndef OutDir #define OutDir "..\..\dist" #endif +; The file version is numbers only: 0.8.0 for a test release 0.8.0-beta.1. +#define FileVersion Copy(Version, 1, Pos("-", Version + "-") - 1) [Setup] AppId={{6F1C2B9E-4D7A-4E21-9B8C-3A5D0E7F1A42} @@ -45,7 +47,7 @@ LicenseFile={#Source}\LICENSE ; Users choose: Polish or English (the choice is kept for the settings console too). ShowLanguageDialog=yes CloseApplications=no -VersionInfoVersion={#Version} +VersionInfoVersion={#FileVersion} [Languages] Name: "en"; MessagesFile: "compiler:Default.isl" diff --git a/skills/dev-build/SKILL.md b/skills/dev-build/SKILL.md index 4f17f97..855fecb 100644 --- a/skills/dev-build/SKILL.md +++ b/skills/dev-build/SKILL.md @@ -5,6 +5,8 @@ description: Diagnoses a failed build or release for a developer - the failing s # A red build +First load the tools this needs: `ado_tools enable="code;pipelines"` (one call; skip it when they are already there). + ## Steps 1. `ado_pipeline` (recent runs; `definition` / `branch` to narrow) → the failed run; `ado_pipeline build=` for the diff --git a/skills/dev-pr/SKILL.md b/skills/dev-pr/SKILL.md index bb29b9e..65754ae 100644 --- a/skills/dev-pr/SKILL.md +++ b/skills/dev-pr/SKILL.md @@ -5,6 +5,8 @@ description: Writes a pull request description from its work item, or reviews a # Pull requests +First load the tools this needs: `ado_tools enable="code;pr"` (one call; skip it when they are already there). + ## Writing a description (work item given) 1. `ado_work_item ids=` for the goal and criteria; `ado_changes` of the branch's commits or the PR for what diff --git a/skills/dev-start/SKILL.md b/skills/dev-start/SKILL.md index 45d86e4..1c6036a 100644 --- a/skills/dev-start/SKILL.md +++ b/skills/dev-start/SKILL.md @@ -7,6 +7,8 @@ description: Starts a developer's work on a work item - what is asked (criteria The reader is a developer: technical and short - objects, methods, paths, ids. +First load the tools this needs: `ado_tools enable="code;write"` (one call; skip it when they are already there). + ## Steps 1. `ado_work_item ids= include=comments` and its parent (for a task the criteria are there); specifications, diff --git a/skills/dev-why/SKILL.md b/skills/dev-why/SKILL.md index 8f1c585..95655e5 100644 --- a/skills/dev-why/SKILL.md +++ b/skills/dev-why/SKILL.md @@ -5,6 +5,8 @@ description: Explains why a piece of code is the way it is - the history of a fi # Why the code is like this +First load the tools this needs: `ado_tools enable="code"` (one call; skip it when they are already there). + ## Steps 1. `ado_file path= history=true` - changes newest first, with pull requests and work items. diff --git a/skills/po-explain/SKILL.md b/skills/po-explain/SKILL.md index faf952c..fa1b732 100644 --- a/skills/po-explain/SKILL.md +++ b/skills/po-explain/SKILL.md @@ -8,6 +8,8 @@ description: Explains how a feature works and why it works that way, in business The reader is a Product Owner or a business user: answer in plain language, in the language the user writes in. Technical names (objects, methods, files) only in brackets, or when asked for "details". +First load the tools this needs: `ado_tools enable="code;wiki"` (one call; skip it when they are already there). + ## Steps 1. `ado_search text=` — work items, wiki pages and code at once. Try a second wording diff --git a/skills/po-refine/SKILL.md b/skills/po-refine/SKILL.md index 2fe8841..657c22f 100644 --- a/skills/po-refine/SKILL.md +++ b/skills/po-refine/SKILL.md @@ -7,6 +7,8 @@ description: Prepares backlog refinement for a Product Owner - what is not ready The reader is a Product Owner: plain language, in the user's language; ids in brackets. +First load the tools this needs: `ado_tools enable="write;boards;code"` (one call; skip it when they are already there). + ## Steps 1. `ado_health` (the team's open backlog) — items without acceptance criteria, description, estimate or parent, diff --git a/skills/po-sprint/SKILL.md b/skills/po-sprint/SKILL.md index c5b082f..f508ee7 100644 --- a/skills/po-sprint/SKILL.md +++ b/skills/po-sprint/SKILL.md @@ -8,6 +8,8 @@ description: Summarizes a sprint or a period for a Product Owner and stakeholder The reader is a Product Owner or a stakeholder: plain business language, in the user's language; ids and technical names only in brackets. +First load the tools this needs: `ado_tools enable="boards;wiki"` (one call; skip it when they are already there). + ## How is the sprint going 1. `ado_sprint` (the team's current sprint; `sprint=next|previous|` when asked). If the sprint has ended, say so diff --git a/skills/po-story/SKILL.md b/skills/po-story/SKILL.md index 1bfd2ff..0d5686f 100644 --- a/skills/po-story/SKILL.md +++ b/skills/po-story/SKILL.md @@ -8,6 +8,8 @@ description: Writes a work item for a Product Owner - a requirement (user story, The reader of the item is a developer and a tester; the writer is a Product Owner. Goal: after reading it, everyone knows what to do and how to check it — nothing more. Write in the language the user writes in. +First load the tools this needs: `ado_tools enable="write"` (one call; skip it when they are already there). + ## Steps 1. Find out what is needed — ask only what is missing, at most 3 short questions at once: diff --git a/skills/po-test/SKILL.md b/skills/po-test/SKILL.md index 6a1ab29..e75c4ae 100644 --- a/skills/po-test/SKILL.md +++ b/skills/po-test/SKILL.md @@ -7,6 +7,8 @@ description: Writes acceptance test cases from a work item's acceptance criteria Plain language, in the user's language; steps a business tester can follow on UAT. +First load the tools this needs: `ado_tools enable="tests;code"` (one call; skip it when they are already there). + ## Steps 1. `ado_work_item ids=` — the acceptance criteria (from the parent for a task). No criteria: look at the diff --git a/skills/po-verify/SKILL.md b/skills/po-verify/SKILL.md index 4c0349f..769d824 100644 --- a/skills/po-verify/SKILL.md +++ b/skills/po-verify/SKILL.md @@ -8,6 +8,8 @@ description: Checks whether a work item was done as asked and where the change i The reader is a Product Owner, not a developer: answer in plain business language, in the language the user writes in. Technical names (objects, methods, files, ids of commits) only in brackets or when asked for "details". +First load the tools this needs: `ado_tools enable="code;write"` (one call; skip it when they are already there). + ## Steps 1. `ado_trace id=` — what was asked (acceptance criteria), what code is linked, builds, where it is deployed, signals. diff --git a/skills/po-wiki/SKILL.md b/skills/po-wiki/SKILL.md index 2649e2e..517f380 100644 --- a/skills/po-wiki/SKILL.md +++ b/skills/po-wiki/SKILL.md @@ -8,6 +8,8 @@ description: Writes or updates a documentation page on the project wiki for a Pr Write for the people who will read the page (users, testers, new colleagues): plain language, in the language the wiki is written in (look at its other pages), short sections, examples. +First load the tools this needs: `ado_tools enable="wiki;code;boards"` (one call; skip it when they are already there). + ## Steps 1. Facts first: diff --git a/src/AdoLens/AdoLens.csproj b/src/AdoLens/AdoLens.csproj index 5465e6f..56b0a77 100644 --- a/src/AdoLens/AdoLens.csproj +++ b/src/AdoLens/AdoLens.csproj @@ -23,7 +23,7 @@ ADO Lens for Azure DevOps Azure DevOps (work items, boards, wiki, Git and TFVC, pipelines) served to AI assistants over MCP Copyright © 2026 WillowDev - 0.7.3 + 0.8.0 diff --git a/src/AdoLens/Cli.cs b/src/AdoLens/Cli.cs index 22d041f..da20e41 100644 --- a/src/AdoLens/Cli.cs +++ b/src/AdoLens/Cli.cs @@ -28,7 +28,7 @@ connections list the connections config show or change settings --connection --project --team (defaults of a connection) --default-connection --mode po|dev|full --usage-log true|false - --show-tokens true|false --add-toolset --remove-toolset --confirm-above + --show-tokens true|false --tool-loading auto|demand|all --add-toolset --remove-toolset --confirm-above --language pl|en|auto (settings console and installer texts) --download-dir |default (where save=true puts files; default Downloads\ADO Lens) --connection --label-languages "en-US, pl"|all (languages review and label require) @@ -323,6 +323,11 @@ public int Config() settings.ShowTokens = bool.TryParse(st, out var b) ? b : throw new ArgumentException("--show-tokens takes true or false"); changed = true; } + if (cl.Opt("tool-loading") is { } tl) + { + settings.ToolLoading = Settings.NormalizeToolLoading(tl); + changed = true; + } if (cl.Opt("confirm-above") is { } ca) { settings.ConfirmBulkAbove = int.TryParse(ca, out var n) && n >= 0 ? n : throw new ArgumentException("--confirm-above takes a number (0 previews every update)"); @@ -336,7 +341,13 @@ public int Config() } if (changed) settings.Save(SettingsPath); Console.WriteLine($"settings: {SettingsPath}{(changed ? " (saved)" : "")}"); - Console.WriteLine($"mode: {settings.Mode} (tool sets: {string.Join(", ", Toolsets.Active(settings).OrderBy(t => Array.IndexOf(Toolsets.All, t)))})"); + Console.WriteLine($"mode: {settings.Mode} (tool groups: {string.Join(", ", Toolsets.Active(settings).OrderBy(t => Array.IndexOf(Toolsets.All, t)))}; " + + settings.ToolLoading switch + { + "all" => "all loaded at start)", + "demand" => "core at start, the rest when Claude needs them)", + _ => "auto: on demand in Claude Code, all at start in other clients)", + }); Console.WriteLine($"usage log: {(settings.UsageLog ? "on" : "off")} token footer: {(settings.ShowTokens ? "on" : "off")} preview updates of more than {settings.ConfirmBulkAbove} items default connection: {settings.DefaultConnection ?? "-"}"); return Connections(); } @@ -743,6 +754,7 @@ async Task SetupMenuAsync() Console.WriteLine(Ui.T(" 6. Language: Polish / English", " 6. Język: polski / angielski")); Console.WriteLine(Ui.T(" 7. Required label languages (checks of D365 changes)", " 7. Wymagane języki etykiet (kontrola zmian D365)")); Console.WriteLine(Ui.T($" 8. Download folder: {Downloads.BaseDir(settings)}", $" 8. Folder pobierania: {Downloads.BaseDir(settings)}")); + Console.WriteLine(Ui.T($" 9. Tools at start: {settings.ToolLoading}", $" 9. Narzędzia na start: {settings.ToolLoading}")); var choice = Prompt(Ui.T("Choice (Enter = done): ", "Wybór (Enter = koniec): ")); switch (choice?.Trim()) { @@ -782,6 +794,18 @@ async Task SetupMenuAsync() settings.Save(SettingsPath); Ui.Polish = settings.Language == "pl" || settings.Language is null && Ui.Polish; break; + case "9": + Console.WriteLine(Ui.T(" 1. auto - on demand in Claude Code, all at start in other clients (Claude Desktop)", + " 1. auto - na żądanie w Claude Code, wszystkie od startu w innych klientach (Claude Desktop)")); + Console.WriteLine(Ui.T(" 2. demand - core at start, Claude loads the other groups when the conversation needs them (fewest tokens)", + " 2. demand - podstawowe na start, Claude dociąga pozostałe grupy, gdy rozmowa ich wymaga (najmniej tokenów)")); + Console.WriteLine(Ui.T(" 3. all - every tool of the mode at start", " 3. all - wszystkie narzędzia trybu od startu")); + var cur = settings.ToolLoading switch { "demand" => "2", "all" => "3", _ => "1" }; + var t = Prompt(Ui.T($" choice [{cur}]: ", $" wybór [{cur}]: ")); + settings.ToolLoading = (string.IsNullOrWhiteSpace(t) ? cur : t.Trim()) switch { "2" => "demand", "3" => "all", _ => "auto" }; + settings.Save(SettingsPath); + Console.WriteLine(Ui.T(" new Claude sessions use it", " obowiązuje w nowych sesjach Claude'a")); + break; case "8": var folder = Prompt(Ui.T(" folder for saved files ('default' = Downloads\\ADO Lens, Enter = keep): ", " folder na pobrane pliki ('default' = Pobrane\\ADO Lens, Enter = bez zmian): ")); diff --git a/src/AdoLens/CommandLine.cs b/src/AdoLens/CommandLine.cs index e96dc3f..6067b3a 100644 --- a/src/AdoLens/CommandLine.cs +++ b/src/AdoLens/CommandLine.cs @@ -23,7 +23,7 @@ public sealed partial class CommandLine ["pr"] = ["connection=", "project=", "repo=", "list=", "detail=", "merged=", "since=", "top="], ["pipeline"] = ["connection=", "project=", "definition=", "branch=", "top=", "detail=", "artifacts", "artifact=", "part=", "save", "to=", "deployments", "stage="], ["changes"] = ["connection=", "repo=", "file=", "detail="], - ["config"] = ["env=", "remove-env=", "connection=", "default-connection=", "project=", "team=", "mode=", "usage-log=", "add-toolset=", "remove-toolset=", "confirm-above=", "show-tokens=", "language=", "label-languages=", "download-dir="], + ["config"] = ["env=", "remove-env=", "connection=", "default-connection=", "project=", "team=", "mode=", "usage-log=", "add-toolset=", "remove-toolset=", "confirm-above=", "show-tokens=", "tool-loading=", "language=", "label-languages=", "download-dir="], ["item"] = ["connection=", "include=", "detail="], ["query"] = ["connection=", "project=", "wiql=", "query=", "top="], ["create"] = ["connection=", "project=", "type=", "title=", "description=", "criteria=", "assign=", "parent=", "iteration=", "area=", "tags=", "state=", "field=", "template="], diff --git a/src/AdoLens/McpTools.cs b/src/AdoLens/McpTools.cs index c0ea5a2..4203c1a 100644 --- a/src/AdoLens/McpTools.cs +++ b/src/AdoLens/McpTools.cs @@ -16,16 +16,17 @@ public static class McpTools static readonly Dictionary Lines = new() { [Toolsets.Core] = """ - - Field names, values and states differ per process and company: check them with ado_fields before writing. + - Checking work against what was asked: ado_trace, then read the diffs with ado_changes - never assume. + - "How does X work": ado_search, then read the sources; say what comes from code and what from documentation. """, - [Toolsets.Work] = """ + [Toolsets.Write] = """ + - Field names, values and states differ per process and company: check them with ado_fields before writing. - ado_update on many items returns a preview: show it, then repeat the call with confirm. - Writing: short and complete - what to do or what was done, no filler. Requirement: goal in 1-2 sentences, scope as bullets, testable acceptance criteria in their own field. Bug: what happens, what should, numbered steps, where. Task: one sentence. Comment: decision or question first. - - "How does X work": ado_search, then read the sources; say what comes from code and what from documentation. """, - [Toolsets.Test] = """ + [Toolsets.Tests] = """ - Test Cases from acceptance criteria: one case per criterion, short steps with an expected result each; show them before creating. """, [Toolsets.Recipes] = """ @@ -34,13 +35,13 @@ public static class McpTools [Toolsets.Boards] = """ - Say plainly when a sprint has ended or a column is over its WIP limit. """, - [Toolsets.Trace] = """ - - Checking work against what was asked: ado_trace, then read the diffs with ado_changes - never assume. - - What went into a branch or an environment: ado_pr merged= since=