@knowttl/ado-axi 0.0.0-stage → 0.4.8

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (169) hide show
  1. package/LICENSE +21 -0
  2. package/README.md +261 -2
  3. package/SKILL.md +334 -0
  4. package/assets/ado-axi-header.png +0 -0
  5. package/dist/bin/ado-axi.d.ts +3 -0
  6. package/dist/bin/ado-axi.d.ts.map +1 -0
  7. package/dist/bin/ado-axi.js +192 -0
  8. package/dist/bin/ado-axi.js.map +1 -0
  9. package/dist/commands/agent.d.ts +3 -0
  10. package/dist/commands/agent.d.ts.map +1 -0
  11. package/dist/commands/agent.js +26 -0
  12. package/dist/commands/agent.js.map +1 -0
  13. package/dist/commands/api.d.ts +2 -0
  14. package/dist/commands/api.d.ts.map +1 -0
  15. package/dist/commands/api.js +161 -0
  16. package/dist/commands/api.js.map +1 -0
  17. package/dist/commands/classification.d.ts +2 -0
  18. package/dist/commands/classification.d.ts.map +1 -0
  19. package/dist/commands/classification.js +54 -0
  20. package/dist/commands/classification.js.map +1 -0
  21. package/dist/commands/config.d.ts +2 -0
  22. package/dist/commands/config.d.ts.map +1 -0
  23. package/dist/commands/config.js +109 -0
  24. package/dist/commands/config.js.map +1 -0
  25. package/dist/commands/doctor.d.ts +2 -0
  26. package/dist/commands/doctor.d.ts.map +1 -0
  27. package/dist/commands/doctor.js +67 -0
  28. package/dist/commands/doctor.js.map +1 -0
  29. package/dist/commands/home.d.ts +2 -0
  30. package/dist/commands/home.d.ts.map +1 -0
  31. package/dist/commands/home.js +132 -0
  32. package/dist/commands/home.js.map +1 -0
  33. package/dist/commands/pipeline.d.ts +2 -0
  34. package/dist/commands/pipeline.d.ts.map +1 -0
  35. package/dist/commands/pipeline.js +572 -0
  36. package/dist/commands/pipeline.js.map +1 -0
  37. package/dist/commands/pipelineAdmin.d.ts +3 -0
  38. package/dist/commands/pipelineAdmin.d.ts.map +1 -0
  39. package/dist/commands/pipelineAdmin.js +152 -0
  40. package/dist/commands/pipelineAdmin.js.map +1 -0
  41. package/dist/commands/pipelineArtifact.d.ts +3 -0
  42. package/dist/commands/pipelineArtifact.d.ts.map +1 -0
  43. package/dist/commands/pipelineArtifact.js +68 -0
  44. package/dist/commands/pipelineArtifact.js.map +1 -0
  45. package/dist/commands/policy.d.ts +3 -0
  46. package/dist/commands/policy.d.ts.map +1 -0
  47. package/dist/commands/policy.js +31 -0
  48. package/dist/commands/policy.js.map +1 -0
  49. package/dist/commands/pool.d.ts +3 -0
  50. package/dist/commands/pool.d.ts.map +1 -0
  51. package/dist/commands/pool.js +19 -0
  52. package/dist/commands/pool.js.map +1 -0
  53. package/dist/commands/pr.d.ts +9 -0
  54. package/dist/commands/pr.d.ts.map +1 -0
  55. package/dist/commands/pr.js +1028 -0
  56. package/dist/commands/pr.js.map +1 -0
  57. package/dist/commands/query.d.ts +2 -0
  58. package/dist/commands/query.d.ts.map +1 -0
  59. package/dist/commands/query.js +29 -0
  60. package/dist/commands/query.js.map +1 -0
  61. package/dist/commands/queue.d.ts +3 -0
  62. package/dist/commands/queue.d.ts.map +1 -0
  63. package/dist/commands/queue.js +21 -0
  64. package/dist/commands/queue.js.map +1 -0
  65. package/dist/commands/ref.d.ts +3 -0
  66. package/dist/commands/ref.d.ts.map +1 -0
  67. package/dist/commands/ref.js +204 -0
  68. package/dist/commands/ref.js.map +1 -0
  69. package/dist/commands/release.d.ts +3 -0
  70. package/dist/commands/release.d.ts.map +1 -0
  71. package/dist/commands/release.js +91 -0
  72. package/dist/commands/release.js.map +1 -0
  73. package/dist/commands/repo.d.ts +3 -0
  74. package/dist/commands/repo.d.ts.map +1 -0
  75. package/dist/commands/repo.js +261 -0
  76. package/dist/commands/repo.js.map +1 -0
  77. package/dist/commands/repoAdmin.d.ts +3 -0
  78. package/dist/commands/repoAdmin.d.ts.map +1 -0
  79. package/dist/commands/repoAdmin.js +195 -0
  80. package/dist/commands/repoAdmin.js.map +1 -0
  81. package/dist/commands/security.d.ts +3 -0
  82. package/dist/commands/security.d.ts.map +1 -0
  83. package/dist/commands/security.js +57 -0
  84. package/dist/commands/security.js.map +1 -0
  85. package/dist/commands/serviceEndpoint.d.ts +3 -0
  86. package/dist/commands/serviceEndpoint.d.ts.map +1 -0
  87. package/dist/commands/serviceEndpoint.js +29 -0
  88. package/dist/commands/serviceEndpoint.js.map +1 -0
  89. package/dist/commands/team.d.ts +3 -0
  90. package/dist/commands/team.d.ts.map +1 -0
  91. package/dist/commands/team.js +33 -0
  92. package/dist/commands/team.js.map +1 -0
  93. package/dist/commands/test.d.ts +2 -0
  94. package/dist/commands/test.d.ts.map +1 -0
  95. package/dist/commands/test.js +183 -0
  96. package/dist/commands/test.js.map +1 -0
  97. package/dist/commands/user.d.ts +3 -0
  98. package/dist/commands/user.d.ts.map +1 -0
  99. package/dist/commands/user.js +20 -0
  100. package/dist/commands/user.js.map +1 -0
  101. package/dist/commands/variableGroup.d.ts +3 -0
  102. package/dist/commands/variableGroup.d.ts.map +1 -0
  103. package/dist/commands/variableGroup.js +23 -0
  104. package/dist/commands/variableGroup.js.map +1 -0
  105. package/dist/commands/workItem.d.ts +12 -0
  106. package/dist/commands/workItem.d.ts.map +1 -0
  107. package/dist/commands/workItem.js +940 -0
  108. package/dist/commands/workItem.js.map +1 -0
  109. package/dist/commands/workItemAttachment.d.ts +3 -0
  110. package/dist/commands/workItemAttachment.d.ts.map +1 -0
  111. package/dist/commands/workItemAttachment.js +136 -0
  112. package/dist/commands/workItemAttachment.js.map +1 -0
  113. package/dist/help.d.ts +4 -0
  114. package/dist/help.d.ts.map +1 -0
  115. package/dist/help.js +383 -0
  116. package/dist/help.js.map +1 -0
  117. package/dist/lib/adoUrl.d.ts +19 -0
  118. package/dist/lib/adoUrl.d.ts.map +1 -0
  119. package/dist/lib/adoUrl.js +104 -0
  120. package/dist/lib/adoUrl.js.map +1 -0
  121. package/dist/lib/args.d.ts +14 -0
  122. package/dist/lib/args.d.ts.map +1 -0
  123. package/dist/lib/args.js +94 -0
  124. package/dist/lib/args.js.map +1 -0
  125. package/dist/lib/argv.d.ts +8 -0
  126. package/dist/lib/argv.d.ts.map +1 -0
  127. package/dist/lib/argv.js +35 -0
  128. package/dist/lib/argv.js.map +1 -0
  129. package/dist/lib/audit.d.ts +21 -0
  130. package/dist/lib/audit.d.ts.map +1 -0
  131. package/dist/lib/audit.js +128 -0
  132. package/dist/lib/audit.js.map +1 -0
  133. package/dist/lib/auth.d.ts +8 -0
  134. package/dist/lib/auth.d.ts.map +1 -0
  135. package/dist/lib/auth.js +127 -0
  136. package/dist/lib/auth.js.map +1 -0
  137. package/dist/lib/client.d.ts +32 -0
  138. package/dist/lib/client.d.ts.map +1 -0
  139. package/dist/lib/client.js +181 -0
  140. package/dist/lib/client.js.map +1 -0
  141. package/dist/lib/config.d.ts +39 -0
  142. package/dist/lib/config.d.ts.map +1 -0
  143. package/dist/lib/config.js +150 -0
  144. package/dist/lib/config.js.map +1 -0
  145. package/dist/lib/context.d.ts +5 -0
  146. package/dist/lib/context.d.ts.map +1 -0
  147. package/dist/lib/context.js +20 -0
  148. package/dist/lib/context.js.map +1 -0
  149. package/dist/lib/format.d.ts +17 -0
  150. package/dist/lib/format.d.ts.map +1 -0
  151. package/dist/lib/format.js +65 -0
  152. package/dist/lib/format.js.map +1 -0
  153. package/dist/lib/paths.d.ts +3 -0
  154. package/dist/lib/paths.d.ts.map +1 -0
  155. package/dist/lib/paths.js +13 -0
  156. package/dist/lib/paths.js.map +1 -0
  157. package/dist/lib/repositoryPath.d.ts +2 -0
  158. package/dist/lib/repositoryPath.d.ts.map +1 -0
  159. package/dist/lib/repositoryPath.js +26 -0
  160. package/dist/lib/repositoryPath.js.map +1 -0
  161. package/dist/lib/stdin.d.ts +2 -0
  162. package/dist/lib/stdin.d.ts.map +1 -0
  163. package/dist/lib/stdin.js +11 -0
  164. package/dist/lib/stdin.js.map +1 -0
  165. package/dist/lib/writes.d.ts +3 -0
  166. package/dist/lib/writes.d.ts.map +1 -0
  167. package/dist/lib/writes.js +37 -0
  168. package/dist/lib/writes.js.map +1 -0
  169. package/package.json +65 -4
package/LICENSE ADDED
@@ -0,0 +1,21 @@
1
+ MIT License
2
+
3
+ Copyright (c) 2025 Jeffrey Haen
4
+
5
+ Permission is hereby granted, free of charge, to any person obtaining a copy
6
+ of this software and associated documentation files (the "Software"), to deal
7
+ in the Software without restriction, including without limitation the rights
8
+ to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
9
+ copies of the Software, and to permit persons to whom the Software is
10
+ furnished to do so, subject to the following conditions:
11
+
12
+ The above copyright notice and this permission notice shall be included in all
13
+ copies or substantial portions of the Software.
14
+
15
+ THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
16
+ IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
17
+ FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
18
+ AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
19
+ LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
20
+ OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
21
+ SOFTWARE.
package/README.md CHANGED
@@ -1,3 +1,262 @@
1
- # Temporary Holding Version
1
+ # ado-axi (Azure DevOps axi)
2
2
 
3
- This version is a temporary placeholder for this package. An operational version to replace this has been submitted for review and is awaiting a staged release.
3
+ This is a fork of [jeffreyhaen/ado-axi](https://github.com/jeffreyhaen/ado-axi), maintained at [knowttl/ado-axi](https://github.com/knowttl/ado-axi).
4
+
5
+ [![npm](https://img.shields.io/npm/v/%40knowttl%2Fado-axi.svg)](https://www.npmjs.com/package/@knowttl/ado-axi)
6
+ [![license](https://img.shields.io/badge/license-MIT-blue.svg)](LICENSE)
7
+ [![node](https://img.shields.io/badge/node-%3E%3D20-brightgreen.svg)](package.json)
8
+
9
+ <p align="center">
10
+ <img src="assets/ado-axi-header.png" alt="ado-axi for Azure DevOps">
11
+ </p>
12
+
13
+ Agent-ergonomic CLI for **Azure DevOps** - work items, pull requests, repositories, Git refs, pipelines,
14
+ and a raw REST escape hatch, in token-efficient [TOON](https://toonformat.dev/) output.
15
+
16
+ `ado-axi` is an Azure DevOps [AXI](https://github.com/kunchenguid/axi) (Agent eXperience Interface): a CLI
17
+ designed for autonomous agents rather than humans. It talks to the Azure DevOps REST API
18
+ directly (no `az` round trips except for token acquisition), supports multiple organizations
19
+ with different authentication through profiles, and answers with minimal schemas plus
20
+ contextual next-step hints.
21
+
22
+ ## Why AXI: CLI vs MCP vs AXI
23
+
24
+ Across extensive [AXI benchmark studies](https://axi.md/) (over 900 runs), agent-first CLIs achieve **100% task success** at **~50% fewer turns** and **50–66% lower cost** than MCP.
25
+
26
+ This repository ships the harness behind its own measurements: 19 Azure DevOps scenarios, recorded
27
+ against a private organization and replayed offline with the `o200k_base` tokenizer. The recordings
28
+ stay local — see [`BENCHMARK.md`](BENCHMARK.md) for the method and for how to reproduce these
29
+ numbers against your own organization.
30
+
31
+ | Interface | Context (Turn 0) | Output | Measured payload | Write Safety | Guidance |
32
+ |---|---|---|---|---|---|
33
+ | **`ado-axi`** | Skill frontmatter always; body loaded on demand (see [recorded surface measurements](BENCHMARK.md#tool-surface-benchmark)) | **TOON** | **-94.5%** vs raw REST JSON (-90.0% mean per scenario) | ✅ **Opt-in writes; idempotent + CAS guards; no policy bypass** | Structured hints (`help[]`) |
34
+ | **Raw CLI** (`az devops`) | ~0 tokens | JSON / ASCII | Baseline (full REST payloads, slow startup) | ❌ Direct mutations | Human text / exit codes |
35
+ | **Azure DevOps MCP** | **16,356 tokens** (40 tool schemas, v2.10.0) | JSON-RPC | Highest overhead (full schemas resent every turn) | Varies | Schema validation errors |
36
+
37
+ ## Install
38
+
39
+ Install globally (recommended for repeated use):
40
+
41
+ ```sh
42
+ npm install -g @knowttl/ado-axi
43
+ ado-axi --help
44
+ ```
45
+
46
+ For a one-off invocation without installing:
47
+
48
+ ```sh
49
+ npx -y @knowttl/ado-axi --help
50
+ ```
51
+
52
+ ## Agent integration
53
+
54
+ Install the skill globally so an agent loads the usage guide on demand:
55
+
56
+ ```sh
57
+ npx skills add knowttl/ado-axi --skill ado-axi -g
58
+ ```
59
+
60
+ Omit `-g` to install the skill for the current project only.
61
+
62
+ ## Configure
63
+
64
+ Profiles live in `~/.ado-axi/config.json` (override with `./ado-axi.config.json` or
65
+ `$ADO_AXI_CONFIG`):
66
+
67
+ Configuration writes require [write enablement](#behavior).
68
+
69
+ ```sh
70
+ ADO_AXI_WRITES=1 ado-axi config init --org acme --project Platform --name acme --auth az
71
+ ADO_AXI_WRITES=1 ado-axi config init --org contoso --project Web --name contoso --auth pat --pat-env ADO_CONTOSO_PAT
72
+ ado-axi doctor
73
+ ```
74
+
75
+ ```json
76
+ {
77
+ "defaultProfile": "acme",
78
+ "profiles": {
79
+ "acme": { "org": "acme", "project": "Platform", "auth": "az" },
80
+ "contoso": { "org": "contoso", "project": "Web", "auth": "pat", "patEnv": "ADO_CONTOSO_PAT" }
81
+ }
82
+ }
83
+ ```
84
+
85
+ - `org` — the Azure DevOps organization name or organization-root URL (`acme` or `https://dev.azure.com/acme`).
86
+ - `project` — the default project inside that organization. Saves passing `--project` on commands requiring project context.
87
+ - `auth: "az"` — uses the Azure CLI (`az account get-access-token`). Add `"tenant": "<id>"`
88
+ when the organization lives in another Entra tenant.
89
+ - `auth: "pat"` — reads a personal access token from the env var named in `patEnv`.
90
+ - Any command accepts `--profile <name>`, `--org <org>`, `--project <project>` — before or
91
+ after the command — and `$ADO_AXI_ORG` / `$ADO_AXI_PROJECT` work too. An org that matches a
92
+ configured profile inherits that profile's authentication. Organization-root URLs such as
93
+ `https://dev.azure.com/acme` or `https://acme.visualstudio.com` are normalized to the org name,
94
+ including in environment variables and profiles; project/API paths in `--org` are rejected.
95
+ - Project context is never guessed. Pass `--project`, set `$ADO_AXI_PROJECT`, or use a
96
+ project-specific profile. Use `ado-axi project list --org <org>` to discover projects.
97
+
98
+ ## Use
99
+
100
+ For the mutating examples below, first enable writes as described in [Behavior](#behavior).
101
+
102
+ ```sh
103
+ ado-axi # dashboard: your work items, active project PRs, recent runs
104
+ ado-axi work-item list --assigned-to @me # open work items
105
+ ado-axi work-item get 4211 --comments
106
+ ado-axi work-item list --fields id,created,System.AssignedTo,Custom.EventSeverity
107
+ ado-axi work-item get 4211 --full
108
+ ado-axi work-item comment 4211 --body "**Status:** ready"
109
+ ado-axi work-item update 4211 --state "In Progress"
110
+ ado-axi work-item update 4211 --add-tags agent-claimed --if-rev 7 # compare-and-swap claim
111
+ ado-axi work-item link add 4211 --pr 812 # attach the pull request
112
+ ado-axi work-item link list 4211
113
+ ado-axi work-item link types
114
+ ADO_AXI_WRITES=1 ado-axi work-item attach 4211 --file ./evidence.png --comment "Test evidence" --if-rev 7
115
+ ado-axi work-item attachment get 4211 --name evidence.png --out ./download.png
116
+ ado-axi query run "Shared Queries/Open bugs" --limit 10
117
+ ado-axi area list --depth 2
118
+ ado-axi iteration list --depth 2
119
+ ado-axi pr list --reviewer @me
120
+ ado-axi pr comments 812 --full
121
+ ado-axi pr thread list 812
122
+ ado-axi pr thread reply 812 --thread 5 --body "Fixed in 3f2a1c9" --resolve
123
+ ado-axi pr update 812 --draft false --auto-complete true
124
+ ado-axi pr checks 812
125
+ ado-axi pr diff 812 --limit 50
126
+ ado-axi pr reviewer add 812 --reviewer jane@example.com
127
+ ado-axi pr complete 812 --squash --delete-source-branch
128
+ ado-axi pr abandon 812
129
+ ado-axi pr approve 812
130
+ ado-axi repo file /src/Program.cs --repo Web --ref main
131
+ ado-axi ref list --repo Web --limit 50
132
+ ado-axi repo create --name SyntheticRepo
133
+ ado-axi repo update --repo SyntheticRepo --default-branch main
134
+ ado-axi repo policy update 7 --policy-json '{"isEnabled":false}' --if-rev 3
135
+ ado-axi ref create --repo Web --name feature/agent --source main
136
+ ado-axi ref delete --repo Web --name feature/agent --old-object-id <40-hex>
137
+ ado-axi pipeline runs --result failed
138
+ ado-axi pipeline update 42 --definition '{"name":"CI"}' --if-rev 7
139
+ ado-axi pipeline build tag add 98231 --tag verified
140
+ ado-axi pipeline folder list --limit 20
141
+ ado-axi pipeline runs artifact list 98231 --limit 20
142
+ ado-axi pipeline runs artifact download 98231 --name drop --out ./drop.zip
143
+ ado-axi pipeline release list --limit 20
144
+ ado-axi pipeline timeline 98231
145
+ ado-axi pipeline logs 98231 --failed-only --tail 200
146
+ ado-axi pipeline logs 98231 --tail 200
147
+ ado-axi pipeline watch 98231 --interval 10 --timeout 1800
148
+ ado-axi test results 98231 # failing tests of a run, with error messages
149
+ ado-axi api _apis/wiki/wikis # anything not covered by a command
150
+ cat payload.bin | ado-axi api POST _apis/wit/attachments --query 'fileName=payload.bin' --content-type application/octet-stream
151
+ ```
152
+
153
+ Use `work-item attach` to upload and link a local file, and `work-item attachment get` to download it by name.
154
+ See [attachment usage and recovery](doc/work-item-writes.md#attachments-td-062) for file requirements, size limits, revision guards, output fields, and overwrite behavior.
155
+
156
+ `work-item list --limit` bounds the WIQL request and displayed items; the count reports only the number shown because WIQL results may not be exhaustive.
157
+
158
+ See [Boards read commands](doc/boards-reads.md) for relation type discovery, saved queries, area and iteration paths, and their limit and count semantics.
159
+
160
+ `work-item list --fields` accepts `id,type,title,state,assignee,created,changed` and any field reference name, including `System.*`, `Microsoft.VSTS.*`, and `Custom.*`.
161
+ Unknown aliases and API-rejected reference names produce errors.
162
+ `work-item get --full` includes the complete description plus every non-System field, keyed by reference name under `fields`; extra text fields are limited to 1200 characters with a truncation marker.
163
+
164
+ ## Behavior
165
+
166
+ - **Idempotent mutations.** `work-item update`, `pr update`, reviewer changes, `pr thread resolve`,
167
+ `pr complete`, `pr abandon`, `work-item link add`, and `ref create|delete` report an already
168
+ applied request as a no-op and exit 0.
169
+ - **Compare-and-swap.** `--if-rev <n>` on `work-item update|link add` fails instead of overwriting a
170
+ concurrently changed item. Calculated `--add-tags`/`--remove-tags` changes automatically test the
171
+ revision read before merging, even without `--if-rev`; conflicts fail without retrying.
172
+ `ref delete` sends the branch's current object ID as its guard.
173
+ - **Work-item deletion and link removal (TD-068, TD-063).** See [work-item writes](https://github.com/knowttl/ado-axi/blob/main/doc/work-item-writes.md) for commands, revision guards, permanent destruction confirmation, and the DELETE race window.
174
+ - **Pipeline administration (TD-065).** Definition create/update/delete, build and run tags, cancellation, and folder administration are available.
175
+ See [pipeline administration](https://github.com/knowttl/ado-axi/blob/main/doc/pipeline-admin.md) for JSON definitions, revision guards, delete confirmations, and bounded folder reads.
176
+ - **Artifacts and releases (TD-065 slice 2 of 4).** List run artifacts, download a named ZIP to explicit `--out`, and list/show/create Classic releases.
177
+ Downloads cap at 100 MiB, report byte counts, and never overwrite without `--force`.
178
+ Artifact reads/downloads and release list/show work with writes disabled; release create requires `ADO_AXI_WRITES=1`.
179
+ See [artifacts and releases](https://github.com/knowttl/ado-axi/blob/main/doc/artifacts-releases.md) for commands, deployment behavior, and the artifact upload limitation.
180
+ - **Repository and policy administration (TD-065 slice 3 of 4).** Repository create/update/delete/import and policy create/update/delete use the same default-off write boundary.
181
+ See [repository administration](https://github.com/knowttl/ado-axi/blob/main/doc/repository-admin.md) for JSON policy settings, revision behavior, import authentication, and concurrency limits.
182
+ - **BREAKING CHANGE: writes default off.** Set `ADO_AXI_WRITES=1` to enable work-item, PR, pipeline, repository, and policy mutations, `ref create|delete`, and `config init|add`.
183
+ Without that exact value, the CLI refuses these commands before any request or local write with code `WRITES_DISABLED` and an enablement hint.
184
+ Raw `api` requests also require enablement for methods other than GET, HEAD, and OPTIONS, including implicit POST from a body or piped stdin.
185
+ Native read commands, including WIQL queries, and help remain available without enablement.
186
+ - **Missing flag values fail.** Value-taking flags such as `--if-rev`, `--old-object-id`, and context
187
+ selectors require a value; a bare flag is a usage error (exit 2), not an omitted guard or selector.
188
+ - **Policy is never bypassed.** `pr complete` sends the current source commit and separates
189
+ completed, queued, conflict, policy-blocked, and failed outcomes — run `pr checks` first.
190
+ - **Failure triage in one call.** `pipeline timeline` names the failing stage/job/step with its
191
+ error issue and log id, `pipeline logs --failed-only` opens that log, and `test results`
192
+ summarizes test totals and failing tests with their error messages.
193
+ - **Bounded output.** Lists take `--limit`/`--fields`, detail views truncate with a `--full` escape
194
+ hatch, and `repo file` refuses folders and binaries.
195
+ - **ADO REST URLs.** `api` accepts relative paths or full HTTPS REST URLs on `dev.azure.com`, `vsrm.dev.azure.com`, `vssps.dev.azure.com`, `almsearch.dev.azure.com`, and `vsaex.dev.azure.com`.
196
+ For relative paths, `--host` accepts `dev` (default), `vsrm`, `vssps`, `almsearch`, or `vsaex`.
197
+ Full URLs supply org/project/host/query, select matching profile authentication, and do not inherit default project context.
198
+ Conflicting flags or profiles from another org fail locally; credentials, custom ports, fragments, dot segments, and duplicate query keys in URLs are rejected.
199
+ - **Piped input.** `api` sends piped stdin as the raw request body when `--body` is omitted;
200
+ work-item and PR descriptions plus every comment command read stdin when their content flag is omitted.
201
+ For Markdown or multiline comments, use a quoted heredoc — never `--body "..."` with backticks,
202
+ `$`, `!`, or quotes. See [safe shell-input guidance](SKILL.md#safe-shell-input).
203
+ - **Markdown comments.** Work item comments use Markdown by default; pass `--format html` only for raw HTML.
204
+ - **Exit codes.** 0 success (including no-ops), 1 runtime error, 2 usage error. `pipeline watch`
205
+ exits non-zero on failed, cancelled, timed-out, and unexpected runs (poll interval and timeout in
206
+ seconds, 10s/1800s by default). It stops when the configured timeout is reached.
207
+
208
+ Every command takes `--help` and answers with a concise reference; that is where per-command
209
+ detail lives, alongside the agent-facing guide in [SKILL.md](SKILL.md).
210
+
211
+ ### Read-only audit evidence (TD-064)
212
+
213
+ Audit reads cover repository policies, security groups and permissions, service endpoints, variable groups, pipeline variables and definitions, agents, pools, queues, users, teams, projects, and repositories.
214
+ Lists use TOON, default to `--limit 100`, and report both the total and how many records were omitted.
215
+ `--full` expands fields without lifting collection limits or revealing secret variables, service connection credentials, or agent capabilities.
216
+
217
+ ```sh
218
+ ado-axi repo policy list --repo <repository-id> --limit 10
219
+ ado-axi security group list
220
+ ado-axi service-endpoint show <endpoint-id> --full
221
+ ado-axi pipeline variable-group list --limit 10
222
+ ado-axi pipeline variable list --pipeline <definition-id>
223
+ ado-axi pipeline agent list --pool <pool-id>
224
+ ado-axi user list --limit 10
225
+ ado-axi team member list --team <team-id>
226
+ ado-axi project show
227
+ ado-axi repo show <repository-id>
228
+ ```
229
+
230
+ See [audit command reference](docs/AUDIT_READS.md) for every list/show command, required selectors, pagination, and masking rules.
231
+
232
+ ## Design
233
+
234
+ Built against the ten AXI principles: TOON output, 3-4 field default schemas, truncation with
235
+ `--full`, pre-computed aggregates (review tallies, run failure counts, totals), definitive
236
+ empty states, structured errors on stdout with exit code 2 for usage errors, a content-first
237
+ no-argument dashboard, contextual next-step hints, and concise per-command help.
238
+
239
+ ## Development
240
+
241
+ ```sh
242
+ pnpm install
243
+ pnpm run build
244
+ pnpm test
245
+ ```
246
+
247
+ ### Releasing
248
+
249
+ The `.github/workflows/release-please.yml` workflow manages release pull requests from conventional commits on `main`.
250
+ Merging a release pull request creates the tag and GitHub release, then builds and tests that tag before publishing the packed tarball to npm using OIDC trusted publishing with provenance.
251
+ GitHub Actions checks run only for release publication; run the development checks locally for other changes.
252
+
253
+ ## License
254
+
255
+ MIT
256
+
257
+ See [CHANGELOG.md](CHANGELOG.md) for release notes.
258
+
259
+ ## See also
260
+
261
+ - [AXI — agent eXperience interface](https://axi.md/) · [kunchenguid/axi](https://github.com/kunchenguid/axi)
262
+ - [TOON — token-optimized object notation](https://toonformat.dev/) · [toonformat/toon](https://github.com/toonformat/toon)
package/SKILL.md ADDED
@@ -0,0 +1,334 @@
1
+ ---
2
+ name: ado-axi
3
+ description: Use ado-axi to work with Azure DevOps — work items, pull requests, pipelines, repositories, and raw REST calls — through token-efficient TOON output. Use when the task involves Azure DevOps, ADO, boards, work items, WIQL, pull requests, code reviews, build pipelines, or Azure Repos.
4
+ user-invocable: false
5
+ ---
6
+
7
+ # ado-axi
8
+
9
+ Agent-ergonomic CLI over the Azure DevOps REST API. Multiple organizations are handled with
10
+ profiles; each profile carries its own org, project, and authentication (Azure CLI login or a
11
+ personal access token).
12
+
13
+ Install globally for normal use with `npm install -g @knowttl/ado-axi`. If `ado-axi` is not on PATH, prefix commands with `npx -y @knowttl/ado-axi`.
14
+
15
+ Before running mutations, follow [write enablement](README.md#behavior).
16
+
17
+ ## Orientation
18
+
19
+ Run `ado-axi` with no arguments first. It prints the active profile plus your open work items,
20
+ project-active pull requests (`active-pull-requests`), and recent pipeline runs.
21
+
22
+ ```sh
23
+ ado-axi # dashboard
24
+ ado-axi config list # configured profiles
25
+ ado-axi doctor # authentication check per profile
26
+ ado-axi project list # projects (30 most recently updated; --name <filter>, --limit N)
27
+ ```
28
+
29
+ ## Selecting org, project, and profile
30
+
31
+ Every command accepts these, and they never count as unknown flags:
32
+
33
+ - `--profile <name>` — a configured profile (`ado-axi config list`); may also be written
34
+ *before* the command (`ado-axi --profile acme pr list`), including on the bare dashboard
35
+ - `--org <org>` / `--project <project>` — one-off overrides; an `--org` that matches a
36
+ configured profile inherits that profile's authentication. Organization-root URLs
37
+ (`https://dev.azure.com/<org>` or `https://<org>.visualstudio.com`) also work; no project/API path
38
+ - `$ADO_AXI_ORG` / `$ADO_AXI_PROJECT` — environment overrides
39
+
40
+ For pasted PR web URLs, extract org, project, repo, and id and pass them explicitly.
41
+ Establish org/project from the task or a project-specific profile and reuse them for the session.
42
+ If project context is missing, use `ado-axi project list --org <org>`; ask the user if the intended
43
+ project remains unclear. Never select a project arbitrarily, especially for mutations.
44
+
45
+ ## Read-only audit evidence (TD-064)
46
+
47
+ Use these GET-only commands for bounded TOON audit evidence.
48
+ Lists default to `--limit 100`, report `count` and `omitted`, and accept `--fields a,b`.
49
+ `--full` expands fields while preserving list limits and masking.
50
+
51
+ ```sh
52
+ ado-axi repo policy list --repo <repository-id> [--branch <branch>]
53
+ ado-axi repo policy show <policy-id>
54
+ ado-axi security group list [--scope <descriptor>]
55
+ ado-axi security group show <descriptor>
56
+ ado-axi security membership list <descriptor> [--direction up|down]
57
+ ado-axi security permission list --namespace <namespace-id> [--token <resource-token>] [--subject <descriptor>]
58
+ ado-axi security permission show --namespace <namespace-id> --token <resource-token> [--subject <descriptor>]
59
+ ado-axi service-endpoint list
60
+ ado-axi service-endpoint show <endpoint-id> --full
61
+ ado-axi pipeline variable-group list
62
+ ado-axi pipeline variable-group show <group-id> --full
63
+ ado-axi pipeline variable list --pipeline <definition-id>
64
+ ado-axi pipeline show <definition-id> --full
65
+ ado-axi pipeline agent list --pool <pool-id>
66
+ ado-axi pipeline agent show <agent-id> --pool <pool-id>
67
+ ado-axi pipeline pool list
68
+ ado-axi pipeline pool show <pool-id>
69
+ ado-axi pipeline queue list
70
+ ado-axi pipeline queue show <queue-id>
71
+ ado-axi user list
72
+ ado-axi user show <entitlement-id>
73
+ ado-axi team list
74
+ ado-axi team member list --team <team-id>
75
+ ado-axi project show [<project-name-or-id>]
76
+ ado-axi repo show <repository-name-or-id>
77
+ ```
78
+
79
+ `variable-group`, `agent`, `pool`, and `queue` also work as top-level commands.
80
+ `security group membership list` aliases `security membership list`; `team list-member` aliases `team member list`.
81
+ Secret variable values show `***` even under `--full` or `--fields value`.
82
+ Service endpoint authorization, data, and URLs are withheld because they may embed credentials.
83
+ Agent capabilities and API error details are withheld for the same reason.
84
+ Lists count all server pages before returning, so small display limits can still require multiple GET requests.
85
+ See [audit command reference](docs/AUDIT_READS.md).
86
+
87
+ ## Work items
88
+
89
+ ```sh
90
+ ado-axi work-item list [--state open|all|<State>] [--type <type>] [--assigned-to @me|<name>]
91
+ [--iteration @current|<path>] [--area <path>] [--tag <tag>] [--search <text>]
92
+ [--query "<raw WIQL>"] [--limit 30]
93
+ ado-axi work-item get <id> [--comments] [--full] # includes `rev` for compare-and-swap
94
+ ado-axi work-item create --type Task --title "..." [--description "..."] [--description-format markdown|html]
95
+ [--assigned-to <user>] [--parent <id>] [--area <path>] [--iteration <path>] [--tags "a; b"]
96
+ ado-axi work-item update <id> [--state <state>] [--title "..."] [--assigned-to <user>]
97
+ [--description "..."] [--description-format markdown|html]
98
+ [--add-tags a,b] [--remove-tags c] [--if-rev <n>]
99
+ [--set '{"Microsoft.VSTS.Common.Priority": 1}']
100
+ ado-axi work-item comment <id> [--body "..."] [--format markdown|html]
101
+ ado-axi work-item delete <id> --if-rev <n> [--destroy --confirm-destroy]
102
+ ado-axi work-item link list <id> [--limit 50]
103
+ ado-axi work-item link remove <id> --index <n> --if-rev <n>
104
+ ado-axi work-item link types [--limit 50] [--full]
105
+ ado-axi work-item attach <id> --file <path> [--comment "..."] [--if-rev <n>]
106
+ ado-axi work-item attachment get <id> --name <file> [--out <path>] [--force]
107
+ ado-axi query run <id|path> [--limit 30] [--fields id,title,state]
108
+ ado-axi area list [--depth 10] [--limit 50] [--full]
109
+ ado-axi iteration list [--depth 10] [--limit 50] [--full]
110
+ ado-axi work-item link add <id> (--parent <id> | --child <id> | --related <id> | --pr <id>
111
+ | --commit <40-hex> --repo <name> | --branch <name> --repo <name>)
112
+ [--comment "..."] [--if-rev <n>]
113
+ ```
114
+
115
+ See [attachment usage and recovery](https://github.com/knowttl/ado-axi/blob/main/doc/work-item-writes.md#attachments-td-062) for file requirements, size limits, revision guards, recovery, and download behavior.
116
+
117
+ `link list` resolves hierarchy links to work item ids and artifact links to pull request ids,
118
+ short commit SHAs, and branch names. `link add` builds the `vstfs://` artifact URI for you — pass
119
+ the pull request id, not a URL — and treats an already-present link as a no-op.
120
+
121
+ See [work-item writes](https://github.com/knowttl/ado-axi/blob/main/doc/work-item-writes.md) for `delete` and `link remove` examples, revision guards, permanent destruction confirmation, and the DELETE race window.
122
+
123
+ `list` builds WIQL for you; drop to `--query` for anything the flags do not express.
124
+ `--description-format markdown` renders a Markdown description; use `html` only when supplying HTML. The format is only applied when a description is supplied.
125
+ See [README usage](README.md#use) for work-item list counts, field selection, and full-detail output limits.
126
+
127
+ See [Boards read commands](doc/boards-reads.md) for saved query selectors, historical results, tree depth, and limit and count semantics.
128
+
129
+ `work-item comment` stores comments as Markdown by default; use `--format html` only when supplying raw HTML. The comments API requires `7.1-preview.4` or later for this format selection.
130
+ `update` is idempotent — setting a field to its current value reports a no-op and exits 0.
131
+
132
+ ### Safe concurrent updates
133
+
134
+ `--if-rev <n>` turns an update into a compare-and-swap: the patch carries a JSON-Patch
135
+ `{"op":"test","path":"/rev"}`, so the write either applies to exactly that revision or fails with
136
+ `PRECONDITION_FAILED` — never a silent double-claim. Read `rev` from `work-item get`.
137
+ `--if-rev` also disables the idempotent no-op skip, so the intended fields are always written.
138
+
139
+ `--add-tags` / `--remove-tags` mutate the tag list in place (case-insensitive, deduplicated)
140
+ instead of replacing `System.Tags`, so unrelated tags survive. They cannot be combined with
141
+ `--tags`, which replaces the whole string.
142
+
143
+ ```sh
144
+ ado-axi work-item get 4211 # read `rev` from the output
145
+ ado-axi work-item update 4211 --assigned-to me@corp.com --add-tags agent-claimed --if-rev 7
146
+ ```
147
+
148
+ ## Pull requests
149
+
150
+ ```sh
151
+ ado-axi pr list [--repo <repo>] [--status active|draft|completed|abandoned|all] [--creator @me]
152
+ [--reviewer @me] [--target <branch>] [--limit 30]
153
+ ado-axi pr get <id> [--threads] [--full] # --full = complete description AND comment text
154
+ ado-axi pr comments <id> [--full] # alias for `pr get <id> --threads`
155
+ ado-axi pr create --repo <repo> --source <branch> [--target main] --title "..." [--description "..."]
156
+ [--reviewers a,b] [--draft] [--work-items 1,2]
157
+ ado-axi pr update <id> [--title "..."] [--description "..."] [--draft true|false]
158
+ [--auto-complete true|false]
159
+ ado-axi pr complete <id> [--squash true|false] [--delete-source-branch true|false]
160
+ ado-axi pr abandon <id>
161
+ ado-axi pr checks <id> [--limit 10] [--full]
162
+ ado-axi pr diff <id> [--limit 20] [--full]
163
+ ado-axi pr reviewer list <id>
164
+ ado-axi pr reviewer add|remove <id> --reviewer <identity> [--required]
165
+ ado-axi pr approve <id> [--vote approve|approve-with-suggestions|wait-for-author|reject|reset]
166
+ ado-axi pr comment <id> [--body "..."] [--file <path> --line <n>] [--thread <id>]
167
+ ado-axi pr thread list <id> [--limit 20] [--full]
168
+ ado-axi pr thread reply <id> --thread <n> [--body "..."] [--resolve]
169
+ ado-axi pr thread resolve|reopen <id> --thread <n> [--status active|fixed|wont-fix|closed|by-design|pending]
170
+ ```
171
+
172
+ Finish review feedback with `pr thread`: `list` gives thread ids plus an `unresolved` count,
173
+ `reply --resolve` answers and closes a thread in one call, and `resolve`/`reopen` report an
174
+ already-set status as a no-op.
175
+
176
+ ### Safe shell input
177
+
178
+ For Markdown or multiline comment content, pipe a quoted heredoc to stdin for
179
+ `work-item comment`, `pr comment`, and `pr thread reply`; omit `--body`:
180
+
181
+ ```sh
182
+ ado-axi pr thread reply 812 --thread 5 --resolve <<'EOF'
183
+ Fixed in `3f2a1c9`: `$value` is now validated.
184
+ EOF
185
+ ```
186
+
187
+ Never double-quote a flag value containing backticks, `$`, `!`, or quotes. Git Bash expands these
188
+ before `ado-axi` starts, so the CLI receives valid but mangled input and cannot detect it. The
189
+ same applies to `--title`, `--description`, `--set`, `--variables`, `--parameters`, and `--query`:
190
+ use stdin where the command supports it, or pipe a complete JSON payload to `ado-axi api`.
191
+
192
+ `pr list` shows a review tally (`2/3 approved`) so no follow-up call is needed to judge status.
193
+ Work-item and PR descriptions may be piped when `--description` is omitted. `pr update` and reviewer
194
+ mutations report safely detected retries as no-ops. `pr complete` uses the current source commit, never bypasses policy, and treats
195
+ an already completed PR as a no-op. `pr abandon` treats an already abandoned PR as a no-op. Run `pr checks` before completion to see concise policy/status
196
+ counts; use `--full` only when the bounded actionable list is insufficient.
197
+
198
+ ### Git Bash repository paths
199
+
200
+ On Windows, Git Bash converts repository paths beginning with `/` even when quoted. Prefix inline
201
+ comment commands with `MSYS_NO_PATHCONV=1` so `--file` reaches Azure DevOps unchanged.
202
+
203
+ Example:
204
+ ```sh
205
+ MSYS_NO_PATHCONV=1 ado-axi pr comment 812 --file '/src/Project/File.cs' --line 10 --body '...'
206
+ ```
207
+
208
+ Without the prefix, the CLI restores paths converted by Git for Windows. It rejects other Windows
209
+ paths, and paths under `/bin` or `/usr/bin`, before creating a thread.
210
+
211
+ ## Pipelines
212
+
213
+ ```sh
214
+ ado-axi pipeline list [--name <filter>]
215
+ ado-axi pipeline create --definition '<BuildDefinition JSON object>'
216
+ ado-axi pipeline update <id> --definition '<changed fields JSON object>' [--if-rev <n>]
217
+ ado-axi pipeline delete <id> --if-rev <n> --confirm-delete
218
+ ado-axi pipeline build tag add|remove <run-id> --tag <tag>
219
+ ado-axi pipeline runs tag add|remove <run-id> --tag <tag>
220
+ ado-axi pipeline build cancel <run-id>
221
+ ado-axi pipeline folder list [--path <folder>] [--limit 100] [--full]
222
+ ado-axi pipeline folder create --path '<absolute-folder>'
223
+ ado-axi pipeline folder delete --path '<absolute-folder>' --confirm-delete
224
+ ado-axi pipeline runs artifact list <run-id> [--limit 100] [--full]
225
+ ado-axi pipeline runs artifact download <run-id> --name <name> --out <path> [--force]
226
+ ado-axi pipeline release list [--definition <id>] [--limit 100] [--full]
227
+ ado-axi pipeline release show <id> [--limit 100] [--full]
228
+ ado-axi pipeline release create --definition <id> [--description <text>] [--draft true|false] [--artifacts '<JSON array>']
229
+ ado-axi pipeline runs [--pipeline <id>] [--branch <branch>] [--result failed] [--limit 20]
230
+ ado-axi pipeline run --pipeline <id> [--branch <branch>] [--variables '{"k":"v"}']
231
+ ado-axi pipeline logs <run-id> [--log <log-id>] [--tail 120] [--full] [--failed-only]
232
+ ado-axi pipeline timeline <run-id> [--limit 20] [--full]
233
+ ado-axi pipeline watch <run-id> [--interval 10] [--timeout 1800]
234
+ ```
235
+
236
+ See [pipeline administration](https://github.com/knowttl/ado-axi/blob/main/doc/pipeline-admin.md) for JSON definition requirements, revision guards, delete safety, tag aliases, folder limits, and examples (TD-065).
237
+
238
+ Artifact list/download and Classic release list/show stay read-only remotely and work with writes disabled.
239
+ Artifact download requires a user-selected `--out` file, caps at 100 MiB, reports bytes, and never overwrites without `--force`.
240
+ Lists stay bounded under `--full`; release detail masks secret variables and URLs.
241
+ Release create requires `ADO_AXI_WRITES=1` and may trigger deployments unless `--draft true` is selected.
242
+ Optional `--artifacts` selects release artifact versions, for example `[{"alias":"_CI","instanceReference":{"id":"42"}}]`.
243
+ Artifact upload is omitted because the Build Artifacts create API registers existing resources rather than accepting local file bytes.
244
+ See [artifacts and releases](https://github.com/knowttl/ado-axi/blob/main/doc/artifacts-releases.md) for TD-065 slice 2 of 4.
245
+
246
+ `watch` uses seconds, refuses intervals below 2 seconds, and enforces its deadline across
247
+ authentication, HTTP requests, and response bodies (30 minutes by default). Failed, cancelled,
248
+ timed-out, and unexpected outcomes exit non-zero with TOON output.
249
+
250
+ `logs` returns the tail of the last log by default — pass `--log <id>` for a specific step.
251
+
252
+ When a run failed, start with `timeline`: it names the failing stage/job/step, includes the first
253
+ error issue, and gives the log id to read. `logs --failed-only` goes straight to that step's log.
254
+
255
+ ## Tests
256
+
257
+ ```sh
258
+ ado-axi test results <run-id> [--outcome failed|passed|aborted|not-executed|all] [--limit 20] [--full]
259
+ ado-axi test results --run <test-run-id>
260
+ ```
261
+
262
+ `<run-id>` is the pipeline run id. All pages of published test runs contribute to totals;
263
+ result counts match `--outcome`. `--limit` bounds displayed results, not totals. `--full` expands
264
+ error messages without increasing that limit. When a build is red, `test results` usually answers
265
+ *what* broke and `pipeline logs --failed-only` *why*.
266
+
267
+ ## Repositories
268
+
269
+ ```sh
270
+ ado-axi repo list [--name <filter>]
271
+ ado-axi repo branches --repo <name> [--name <filter>]
272
+ ado-axi repo file <path> --repo <name> [--ref <branch> | --commit <40-hex>] [--limit <lines>] [--full]
273
+ ado-axi ref list --repo <name> [--name <prefix>] [--limit 50] [--full]
274
+ ado-axi ref create --repo <name> --name <branch> (--source <branch> | --source-object-id <40-hex>)
275
+ ado-axi ref delete --repo <name> --name <branch> [--old-object-id <40-hex>]
276
+ ado-axi repo create --name <name>
277
+ ado-axi repo update --repo <id|name> [--name <name>] [--default-branch <branch>] [--disabled true|false]
278
+ ado-axi repo delete --repo <id|name> --confirm-delete
279
+ ado-axi repo import --repo <id|name> --source-url <https-git-url> [--service-endpoint <id>]
280
+ ado-axi repo policy create --policy-json '<JSON object>'
281
+ ado-axi repo policy update <id> --policy-json '<changed fields JSON object>' [--if-rev <n>]
282
+ ado-axi repo policy delete <id> --if-rev <n> --confirm-delete
283
+ ```
284
+
285
+ See [repository administration](https://github.com/knowttl/ado-axi/blob/main/doc/repository-admin.md) for write enablement, profile selection, policy JSON, import authentication, output masking, and concurrency limits.
286
+
287
+ `repo file` reads a single file straight from Azure DevOps: the default branch, a branch tip
288
+ (`--ref`), or an exact revision (`--commit`). Use it for files outside the working copy — another
289
+ repository, or the target-branch version of a file under review. Folders and binaries are refused,
290
+ and paths follow the same `/src/Project/File.cs` form as `pr comment --file`.
291
+
292
+ Ref creation never overwrites an existing branch. Deletion resolves the exact branch and uses its
293
+ current object ID as the Azure DevOps concurrency guard; `--old-object-id` additionally asserts a
294
+ previously observed version. Existing-at-the-intended-object and already-absent requests are no-ops.
295
+
296
+ ## Escape hatch
297
+
298
+ Anything without a dedicated command, such as wikis, test plans, or code search, goes through the raw REST bridge:
299
+
300
+ ```sh
301
+ ado-axi api _apis/wiki/wikis
302
+ ado-axi api _apis/testplan/plans --query 'filterActivePlans=true'
303
+ ado-axi api POST _apis/search/codesearchresults --host almsearch --body '{"searchText":"TODO"}'
304
+ cat payload.bin | ado-axi api POST _apis/wit/attachments --query 'fileName=payload.bin' --content-type application/octet-stream
305
+ ado-axi api _apis/projects --no-project # organization-level path
306
+ ado-axi api 'https://vsrm.dev.azure.com/acme/Platform/_apis/release/releases?api-version=7.1'
307
+ ado-axi api PATCH _apis/wit/workitems/4211 --content-type json-patch \
308
+ --body '[{"op":"test","path":"/rev","value":7},{"op":"add","path":"/fields/System.State","value":"Active"}]'
309
+ ```
310
+
311
+ Relative paths use `https://dev.azure.com/<org>/<project>/`.
312
+ See [README behavior](README.md#behavior) for supported REST hosts and `--host` values.
313
+ Full HTTPS REST URLs supply org/project/host/query, replace default context, and use matching profile authentication.
314
+ Conflicting flags or a `--profile` from another org are rejected; do not override URL context.
315
+ Quote URLs with query parameters. When `--body` is omitted and stdin is piped,
316
+ stdin is sent unchanged as the request body. `--content-type` accepts the shorthands
317
+ `json` (default), `json-patch`, `merge-patch`, `text`, or any media type — work item writes
318
+ require `json-patch`. Use `--raw` for endpoints that return plain text, such as build logs.
319
+
320
+ ## Conventions
321
+
322
+ - In ADO descriptions/comments, `#123` references a work item, `!123` an Azure DevOps PR;
323
+ for GitHub PRs use the full URL, never bare `#123` or `!123`, even when Boards/pipelines run in ADO.
324
+ - Output is TOON on stdout; errors are TOON too, with a `help` list of next steps.
325
+ - Exit codes: 0 success (including no-ops), 1 runtime error, 2 usage error.
326
+ - Unknown flags are rejected by name — read the `help` line and retry once.
327
+ - Lists take `--limit` and `--fields a,b`; detail views truncate and take `--full`.
328
+ - On Windows/Git Bash, never pass large or multiline content through a `.cmd` shim as an
329
+ interpolated CLI argument such as `--description "$(cat file)"`; `cmd.exe` can truncate it.
330
+ Pipe it instead: `cat file | ado-axi work-item update <id>` or
331
+ `cat file | ado-axi api POST <path> --content-type <media-type>`.
332
+ - Mutating commands (`create`, `update`, `complete`, reviewer add/remove, ref create/delete,
333
+ `comment`, `approve`, `pipeline run`) change real state — only run them when the user asked.
334
+ - Never use PR completion to bypass policy and never delete a ref whose exact target is ambiguous.
Binary file
@@ -0,0 +1,3 @@
1
+ #!/usr/bin/env node
2
+ export {};
3
+ //# sourceMappingURL=ado-axi.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"ado-axi.d.ts","sourceRoot":"","sources":["../../src/bin/ado-axi.ts"],"names":[],"mappings":""}