Skip to content

Commit 5e39d02

Browse files
Wiki and release tooling
- ado_wiki: page tree, a page as markdown with its version and subpages, search with snippets - ado_wiki_write: create, append, prepend, or replace with the version from the last read; a page changed meanwhile is never overwritten (If-Match) - a refresh right after a refresh fetches the metadata again - release.ps1, release-notes.ps1 and the Release workflow (zip + SHA-256) - README: wiki tools, releasing
1 parent a13641c commit 5e39d02

15 files changed

Lines changed: 865 additions & 19 deletions

File tree

‎.github/workflows/release.yml‎

Lines changed: 55 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,55 @@
1+
name: Release
2+
3+
# Pushing a tag vX.Y.Z publishes the release: tests, package, notes from CHANGELOG.md.
4+
# The tag must match <Version> in src/AdoLens/AdoLens.csproj; release tags cannot be moved afterwards.
5+
on:
6+
push:
7+
tags: ['v*']
8+
9+
permissions:
10+
contents: read
11+
12+
jobs:
13+
release:
14+
name: release
15+
runs-on: windows-latest
16+
timeout-minutes: 30
17+
permissions:
18+
contents: write
19+
env:
20+
DOTNET_CLI_TELEMETRY_OPTOUT: '1'
21+
DOTNET_NOLOGO: '1'
22+
TAG: ${{ github.ref_name }}
23+
steps:
24+
- uses: actions/checkout@v7
25+
26+
- uses: actions/setup-dotnet@v6
27+
with:
28+
dotnet-version: 9.0.x
29+
30+
- name: Check that the tag matches the project version
31+
shell: pwsh
32+
run: |
33+
$version = ([xml](Get-Content src/AdoLens/AdoLens.csproj -Raw)).Project.PropertyGroup.Version | Where-Object { $_ } | Select-Object -First 1
34+
if ("v$version" -ne $env:TAG) { throw "tag $env:TAG does not match <Version>$version</Version> in src/AdoLens/AdoLens.csproj" }
35+
"VERSION=$version" | Out-File -FilePath $env:GITHUB_ENV -Append -Encoding utf8
36+
37+
- name: Test
38+
run: dotnet test AdoLens.sln -c Release
39+
40+
- name: Release notes
41+
shell: powershell
42+
run: .\release-notes.ps1 -Version $env:VERSION -OutFile dist\notes.md
43+
44+
- name: Package
45+
shell: powershell
46+
run: .\pack.ps1 -OutDir dist
47+
48+
# vX.Y.Z-beta.N is a test release: marked as pre-release, never "Latest".
49+
- name: Publish the release
50+
shell: pwsh
51+
env:
52+
GH_TOKEN: ${{ github.token }}
53+
run: |
54+
$kind = if ($env:TAG -match '-') { '--prerelease' } else { '--latest' }
55+
gh release create $env:TAG "dist/ado-lens-$env:VERSION.zip" "dist/ado-lens-$env:VERSION.zip.sha256" --title "ADO Lens $env:VERSION" --notes-file dist/notes.md --verify-tag $kind

‎CHANGELOG.md‎

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22

33
## 0.1.0 — unreleased
44

5-
First skeleton.
5+
First release: work items, sprints, boards, backlogs and the wiki for Claude Desktop and Claude Code.
66

77
- `adolens.exe`: MCP server over stdio and CLI with the same answers.
88
- Connections (several organizations): `login`, `logout`, `connections`, `config`. PATs in Windows Credential Manager
@@ -22,8 +22,13 @@ First skeleton.
2222
limits, cards; moving a card sets the column and the state mapped for its type), `ado_backlog` (priority order,
2323
reordering), `ado_my_day` (mentions, own and followed items changed by others, PRs waiting for review). CLI: `sprint`,
2424
`board`, `backlog`, `myday`.
25+
- Wiki (tool set `wiki`): `ado_wiki` (page tree, a page as markdown with its version and subpages, search with
26+
snippets) and `ado_wiki_write` (create, append, prepend, or replace with the version from the last read — a page
27+
changed meanwhile is never overwritten). CLI: `wiki`, `wiki-write`.
2528
- Modes `po` / `dev` / `full` choose the tool sets Claude sees; `config --add-toolset`, `--confirm-above`.
2629
- Inherited process names, bugs shown on the requirement backlog, disabled types listed by name.
2730
- The PAT is only ever sent to Azure DevOps hosts. `adolens api <path>` for development.
31+
- Releases: `release.ps1` (test or regular release from `dev`, private names and broken characters scan, CI, merge
32+
to `main`, tag, published package check), Release workflow with the package's SHA-256.
2833
- Usage log and `adolens stats` (answer sizes in tokens, times, empty answers); `stats --live` follows the calls as
2934
Claude makes them; `--tokens` on any command and `config --show-tokens true` show the size of each answer.

‎README.md‎

Lines changed: 30 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@ not thousands. Changes between versions: [CHANGELOG.md](CHANGELOG.md). The road
1313
Azure DevOps is a trademark of Microsoft.
1414

1515
> Status: **0.x — in development.** Connections, Claude registration, the local work item structure, work items,
16-
> sprints, boards and backlogs work; wiki, pull requests and pipelines follow the plan.
16+
> sprints, boards, backlogs and the wiki work; tracing work to code, pull requests and pipelines follow the plan.
1717
1818
## What it does differently
1919

@@ -106,7 +106,8 @@ never a permission.
106106
| `core` | `ado_status`, `ado_fields` | ✓ | ✓ | ✓ |
107107
| `work` | `ado_work_item`, `ado_query`, `ado_create`, `ado_update`, `ado_comment`, `ado_link` | ✓ | ✓ | ✓ |
108108
| `boards` | `ado_sprint`, `ado_board`, `ado_backlog`, `ado_my_day` | ✓ | – | ✓ |
109-
| `wiki`, `trace`, `test`, `recipes` | planned | ✓ | (wiki, trace, recipes) | ✓ |
109+
| `wiki` | `ado_wiki`, `ado_wiki_write` | ✓ | ✓ | ✓ |
110+
| `trace`, `test`, `recipes` | planned | ✓ | (trace, recipes) | ✓ |
110111
| `code`, `pr`, `pipelines` | planned | – | ✓ | ✓ |
111112

112113
## Tool map
@@ -126,6 +127,8 @@ What each MCP tool answers, when Claude should reach for it, and the CLI command
126127
| `ado_sprint` | a team's sprint (`current`, `next`, `previous` or by name): dates and working day, items by state, estimates, remaining work against the capacity left, items needing attention (no change for days, blocked, no estimate, no criteria, unassigned), task progress per item; says plainly when the sprint has ended | stand-up, sprint review, "will we make it" | `adolens sprint`, `adolens sprint next --team "Demo Team" --detail summary` |
127128
| `ado_board` | a team's board: columns with WIP limits (over-limit flagged) and their cards; `move` + `column` moves a card — the state follows the column's mapping for the item's type | "what is in progress", moving cards | `adolens board`, `adolens board --move 123 --column "In Progress"` |
128129
| `ado_backlog` | a team's backlog in priority order (requirement, portfolio, task, or by name); `move` + `above`/`below` reorders | refinement, priorities | `adolens backlog --top 20`, `adolens backlog --move 123 --above 456` |
130+
| `ado_wiki` | the project wiki: page tree (`depth`), one page as markdown with its version and subpages, or search across the project's wikis with snippets; long pages are cut unless `detail=full` | "how does X work", finding documentation | `adolens wiki`, `adolens wiki "Team/Setup"`, `adolens wiki --search "dual write"` |
131+
| `ado_wiki_write` | `create` a page, `append` / `prepend` to it, or `replace` it with the version from the last full read — a page changed by someone else in the meantime is never overwritten; optional change comment | release notes, keeping docs current | `adolens wiki-write "Team/Release notes" --file notes.md --mode append` |
129132
| `ado_my_day` | since the previous working day (or `since`): where you were mentioned (all projects), your items and followed items changed by others, pull requests waiting for your review | the start of the day | `adolens myday --since 3d` |
130133

131134
### Writing rules built in
@@ -155,7 +158,7 @@ Estimates are characters / 4; Claude's tokenizer differs a little (Polish text r
155158
## CLI
156159

157160
```
158-
adolens item|query|create|update|comment|link|fields|sprint|board|backlog|myday …
161+
adolens item|query|create|update|comment|link|fields|sprint|board|backlog|myday|wiki|wiki-write …
159162
adolens login|logout|connections|config|status|register|unregister|refresh|stats|api|mcp|version
160163
```
161164

@@ -173,6 +176,7 @@ src\AdoLens\*.cs code
173176
tests\AdoLens.Tests\ xUnit tests; Azure DevOps is simulated (FakeAdo), no network
174177
build.ps1 compile; -Deploy replaces the installed binaries, -Test runs the tests first
175178
pack.ps1 release package (ZIP + SHA-256)
179+
release.ps1 release-notes.ps1 releases (see below); .github\ CI and Release workflows, issue forms
176180
install.ps1 uninstall.ps1 installation
177181
docs\PLAN.md road map
178182
build\ dist\ output (keep nothing of your own there)
@@ -189,13 +193,35 @@ dotnet test # tests (a few seconds)
189193

190194
After `-Deploy`, restart Claude Desktop / start a new Claude Code session — MCP loads the binary at start.
191195

196+
### Releasing a new version
197+
198+
Work happens on the branch `dev`; `main` always holds the last regular release. Add a `## X.Y.Z — unreleased`
199+
section to `CHANGELOG.md`, then on `dev`:
200+
201+
```powershell
202+
.\release.ps1 -Version X.Y.Z -Pre # test release X.Y.Z-beta.N (pre-release)
203+
.\release.ps1 -Version X.Y.Z # regular release: pull request dev -> main, merge, tag, publish
204+
.\release.ps1 -Version X.Y.Z -DryRun # checks, scan, build and tests only
205+
```
206+
207+
Both stop at the first failure. They set `<Version>`, scan every file for private names and broken characters, build
208+
and test, commit and push `dev` and wait for CI. A test release is tagged on `dev`; a regular one dates the CHANGELOG
209+
section, merges `dev` into `main` through a pull request and is tagged on `main`, after which `dev` moves to `main`.
210+
Both wait for the Release workflow and check the published package (SHA-256, layout, kind of release). Private names
211+
(customers, partners, people) come from a local list that never enters the repository: `-ScanList <file>`,
212+
`ADOLENS_SCAN_LIST`, `XPPLENS_SCAN_LIST` or `%USERPROFILE%\.claude\skills\xpp-lens-release\scan-names.txt` — one
213+
regular expression per line, `!word` for allowed words. Without a list the release stops. The Release workflow builds
214+
`ado-lens-X.Y.Z.zip` with `pack.ps1` and publishes it with its `.sha256` and the notes from `CHANGELOG.md`
215+
(preview: `.\release-notes.ps1 -Version X.Y.Z`).
216+
192217
### Tests
193218

194219
| File | What it checks |
195220
|---|---|
196221
| `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 |
197222
| `MetadataTests.cs` | fetching the structure (levels, inherited process name, bugs on the requirement backlog), change history, compact `ado_fields` answers |
198223
| `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 |
224+
| `WikiTests.cs` | page tree, page with version, replace only with the current version (412 never overwrites), append, create over an existing page, search snippets |
199225
| `WorkItemTests.cs` | work item answers, required fields and allowed values before writing, transitions, preview and confirm of bulk updates, mentions, links, queries, HTML ⇄ markdown, PAT never sent to other hosts |
200226

201227
Fixtures use neutral names only (`contoso`, `Demo`, `Anna Nowak`). Never put data from real organizations into tests,
@@ -208,6 +234,7 @@ issues or commits.
208234
| a new MCP tool | a `*Tools` class with `[Toolset]` in `McpTools.cs` (or its own file) + the query in `*Queries.cs` + a CLI command in `Cli.cs`/`Program.cs`/`CommandLine.cs` + a test + a line in the instructions |
209235
| work item reads, writes, checks | `WorkItems.cs`, `WorkQueries.cs`; output in `WorkItemFormat.cs` |
210236
| sprints, capacity, boards, backlogs, my day | `Boards.cs` (API in `Boards`, answers in `BoardQueries`) |
237+
| wiki | `Wiki.cs` |
211238
| work item structure (types, fields, states) | `MetadataService.cs` (fetch), `MetaStore.cs` (SQLite; raise `SchemaVersion` to refetch), `Metadata.cs` (change detection) |
212239
| rich text | `Html.cs` |
213240
| people | `Identities.cs` |

‎README.pl.md‎

Lines changed: 30 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@ a nie tysiące. Zmiany między wersjami: [CHANGELOG.md](CHANGELOG.md). Plan rozw
1313
Azure DevOps jest znakiem towarowym Microsoftu.
1414

1515
> Stan: **0.x — w budowie.** Działają połączenia, rejestracja w Claude, lokalna struktura work itemów, work itemy,
16-
> sprinty, tablice i backlogi; wiki, pull requesty i pipeline'y — według planu.
16+
> sprinty, tablice, backlogi i wiki; śledzenie pracy do kodu, pull requesty i pipeline'y — według planu.
1717
1818
## Czym się różni
1919

@@ -106,7 +106,8 @@ Nigdy nie jest uprawnieniem.
106106
| `core` | `ado_status`, `ado_fields` | ✓ | ✓ | ✓ |
107107
| `work` | `ado_work_item`, `ado_query`, `ado_create`, `ado_update`, `ado_comment`, `ado_link` | ✓ | ✓ | ✓ |
108108
| `boards` | `ado_sprint`, `ado_board`, `ado_backlog`, `ado_my_day` | ✓ | – | ✓ |
109-
| `wiki`, `trace`, `test`, `recipes` | w planie | ✓ | (wiki, trace, recipes) | ✓ |
109+
| `wiki` | `ado_wiki`, `ado_wiki_write` | ✓ | ✓ | ✓ |
110+
| `trace`, `test`, `recipes` | w planie | ✓ | (trace, recipes) | ✓ |
110111
| `code`, `pr`, `pipelines` | w planie | – | ✓ | ✓ |
111112

112113
## Mapa narzędzi
@@ -126,6 +127,8 @@ Na co odpowiada każde narzędzie MCP, kiedy Claude powinien po nie sięgnąć i
126127
| `ado_sprint` | sprint zespołu (`current`, `next`, `previous` albo po nazwie): daty i dzień roboczy, elementy według stanu, szacunki, pozostała praca wobec pozostałej pojemności, elementy do uwagi (bez zmian od kilku dni, zablokowane, bez szacunku, bez kryteriów, bez osoby), postęp zadań per element; mówi wprost, gdy sprint się skończył | daily, przegląd sprintu, „czy zdążymy” | `adolens sprint`, `adolens sprint next --team "Demo Team" --detail summary` |
127128
| `ado_board` | tablica zespołu: kolumny z limitami WIP (przekroczenia oznaczone) i ich karty; `move` + `column` przesuwa kartę — stan wynika z mapowania kolumny dla typu elementu | „co jest w toku”, przesuwanie kart | `adolens board`, `adolens board --move 123 --column "In Progress"` |
128129
| `ado_backlog` | backlog zespołu w kolejności priorytetu (wymagania, portfolio, zadania albo po nazwie); `move` + `above`/`below` zmienia kolejność | refinement, priorytety | `adolens backlog --top 20`, `adolens backlog --move 123 --above 456` |
130+
| `ado_wiki` | wiki projektu: drzewo stron (`depth`), strona jako markdown z wersją i podstronami albo wyszukiwanie we wszystkich wiki projektu z fragmentami; długie strony są ucinane, chyba że `detail=full` | „jak działa X”, szukanie dokumentacji | `adolens wiki`, `adolens wiki "Team/Setup"`, `adolens wiki --search "dual write"` |
131+
| `ado_wiki_write` | `create` — nowa strona, `append` / `prepend` — dopisanie, `replace` — zastąpienie z wersją z ostatniego pełnego odczytu (strony zmienionej w międzyczasie przez kogoś innego nigdy nie nadpisze); opcjonalny komentarz zmiany | notatki wydania, aktualna dokumentacja | `adolens wiki-write "Team/Release notes" --file notes.md --mode append` |
129132
| `ado_my_day` | od poprzedniego dnia roboczego (albo `since`): gdzie cię oznaczono (wszystkie projekty), twoje i obserwowane elementy zmienione przez innych, pull requesty czekające na twój przegląd | początek dnia | `adolens myday --since 3d` |
130133

131134
### Wbudowane zasady pisania
@@ -155,7 +158,7 @@ Szacunek to znaki / 4; tokenizer Claude'a liczy trochę inaczej (polski tekst wy
155158
## CLI
156159

157160
```
158-
adolens item|query|create|update|comment|link|fields|sprint|board|backlog|myday …
161+
adolens item|query|create|update|comment|link|fields|sprint|board|backlog|myday|wiki|wiki-write …
159162
adolens login|logout|connections|config|status|register|unregister|refresh|stats|api|mcp|version
160163
```
161164

@@ -173,6 +176,7 @@ src\AdoLens\*.cs kod
173176
tests\AdoLens.Tests\ testy xUnit; Azure DevOps jest symulowane (FakeAdo), bez sieci
174177
build.ps1 kompilacja; -Deploy podmienia binaria w instalacji, -Test najpierw uruchamia testy
175178
pack.ps1 paczka wydania (ZIP + SHA-256)
179+
release.ps1 release-notes.ps1 wydania (zob. niżej); .github\ workflowy CI i Release, formularze zgłoszeń
176180
install.ps1 uninstall.ps1 instalacja
177181
docs\PLAN.md plan rozwoju
178182
build\ dist\ wyniki (nie trzymaj tu niczego własnego)
@@ -189,13 +193,35 @@ dotnet test # testy (kilka sekund)
189193

190194
Po `-Deploy` zrestartuj Claude Desktop / zacznij nową sesję Claude Code — MCP ładuje binarium przy starcie.
191195

196+
### Wydanie nowej wersji
197+
198+
Praca idzie na gałęzi `dev`; `main` zawsze zawiera ostatnie zwykłe wydanie. Dopisz w `CHANGELOG.md` sekcję
199+
`## X.Y.Z — unreleased`, potem na `dev`:
200+
201+
```powershell
202+
.\release.ps1 -Version X.Y.Z -Pre # wydanie testowe X.Y.Z-beta.N (pre-release)
203+
.\release.ps1 -Version X.Y.Z # zwykłe wydanie: pull request dev -> main, scalenie, tag, publikacja
204+
.\release.ps1 -Version X.Y.Z -DryRun # tylko kontrole, skan, build i testy
205+
```
206+
207+
Oba warianty stają na pierwszym błędzie. Ustawiają `<Version>`, skanują wszystkie pliki pod nazwy prywatne i zepsute
208+
znaki, budują i testują, robią commit i push `dev` i czekają na CI. Wydanie testowe dostaje tag na `dev`; zwykłe wstawia
209+
datę w sekcji CHANGELOG, scala `dev` do `main` przez pull request i dostaje tag na `main`, po czym `dev` przesuwa się do
210+
`main`. Oba czekają na workflow Release i sprawdzają opublikowaną paczkę (SHA-256, układ, rodzaj wydania). Nazwy
211+
prywatne (klienci, partnerzy, ludzie) pochodzą z lokalnej listy, która nigdy nie trafia do repozytorium:
212+
`-ScanList <plik>`, `ADOLENS_SCAN_LIST`, `XPPLENS_SCAN_LIST` albo
213+
`%USERPROFILE%\.claude\skills\xpp-lens-release\scan-names.txt` — jedno wyrażenie regularne w linii, `!słowo` dla
214+
dozwolonych słów. Bez listy wydanie się zatrzymuje. Workflow Release buduje `ado-lens-X.Y.Z.zip` przez `pack.ps1`
215+
i publikuje go razem z `.sha256` i opisem z `CHANGELOG.md` (podgląd: `.\release-notes.ps1 -Version X.Y.Z`).
216+
192217
### Testy
193218

194219
| Plik | Co sprawdza |
195220
|---|---|
196221
| `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 |
197222
| `MetadataTests.cs` | pobieranie struktury (poziomy, nazwa procesu dziedziczonego, bugi na backlogu wymagań), historia zmian, zwięzłe odpowiedzi `ado_fields` |
198223
| `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ń |
224+
| `WikiTests.cs` | drzewo stron, strona z wersją, zastąpienie tylko z aktualną wersją (412 nigdy nie nadpisuje), dopisywanie, tworzenie na istniejącej stronie, fragmenty wyszukiwania |
199225
| `WorkItemTests.cs` | odpowiedzi o work itemach, pola wymagane i dozwolone wartości przed zapisem, przejścia stanów, podgląd i potwierdzanie zmian wsadowych, wzmianki, linki, zapytania, HTML ⇄ markdown, PAT nigdy do innych hostów |
200226

201227
Dane testowe mają wyłącznie neutralne nazwy (`contoso`, `Demo`, `Anna Nowak`). Nigdy nie wkładaj danych z prawdziwych
@@ -208,6 +234,7 @@ organizacji do testów, zgłoszeń ani commitów.
208234
| nowe narzędzie MCP | klasa `*Tools` z `[Toolset]` w `McpTools.cs` (albo własnym pliku) + zapytanie w `*Queries.cs` + polecenie CLI w `Cli.cs`/`Program.cs`/`CommandLine.cs` + test + linijka w instrukcjach |
209235
| odczyt, zapis i kontrole work itemów | `WorkItems.cs`, `WorkQueries.cs`; wyjście w `WorkItemFormat.cs` |
210236
| sprinty, pojemność, tablice, backlogi, mój dzień | `Boards.cs` (API w `Boards`, odpowiedzi w `BoardQueries`) |
237+
| wiki | `Wiki.cs` |
211238
| struktura work itemów (typy, pola, stany) | `MetadataService.cs` (pobieranie), `MetaStore.cs` (SQLite; podnieś `SchemaVersion`, żeby pobrać od nowa), `Metadata.cs` (wykrywanie zmian) |
212239
| tekst sformatowany | `Html.cs` |
213240
| osoby | `Identities.cs` |

0 commit comments

Comments
 (0)