Skip to content

Commit 92b6e3e

Browse files
docs: fix documentation inconsistencies from audit (#227) (#232)
- Remove 10 phantom "built-in MCP" references from create prompt; replace with tools: azure-devops: as the first-class ADO integration - Fix Complete Example and Common Patterns 1-3 (ado: true → azure-devops) - Remove msft-learn and kusto: references from examples - Fix update prompt validation checklist for 1ES MCP guidance - Add categorized reference table of all 21 safe output tools to Step 9 - Add agent_stats.rs to AGENTS.md architecture tree - Document --enabled-tools flag for mcp and mcp-http CLI commands Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
1 parent e1d3735 commit 92b6e3e

3 files changed

Lines changed: 89 additions & 36 deletions

File tree

AGENTS.md

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -40,6 +40,7 @@ Alongside the correctly generated pipeline yaml, an agent file is generated from
4040
│ ├── detect.rs # Agentic pipeline detection (helper for `configure`)
4141
│ ├── ndjson.rs # NDJSON parsing utilities
4242
│ ├── sanitize.rs # Input sanitization for safe outputs
43+
│ ├── agent_stats.rs # OTel-based agent statistics parsing (token usage, duration, turns)
4344
│ ├── safeoutputs/ # Safe-output MCP tool implementations (Stage 1 → NDJSON → Stage 2)
4445
│ │ ├── mod.rs
4546
│ │ ├── add_build_tag.rs
@@ -936,9 +937,11 @@ Global flags (apply to all subcommands): `--verbose, -v` (enable info-level logg
936937
- The source markdown path is auto-detected from the `@ado-aw` header in the pipeline file
937938
- Useful for CI checks to ensure pipelines are regenerated after source changes
938939
- `mcp <output_directory> <bounding_directory>` - Run SafeOutputs as a stdio MCP server
940+
- `--enabled-tools <name>` - Restrict available tools to those named (repeatable)
939941
- `mcp-http <output_directory> <bounding_directory>` - Run SafeOutputs as an HTTP MCP server (for MCPG integration)
940942
- `--port <port>` - Port to listen on (default: 8100)
941943
- `--api-key <key>` - API key for authentication (auto-generated if not provided)
944+
- `--enabled-tools <name>` - Restrict available tools to those named (repeatable)
942945
- `execute` - Execute safe outputs from Stage 1 (Stage 2 of pipeline)
943946
- `--source, -s <path>` - Path to source markdown file
944947
- `--safe-output-dir <path>` - Directory containing safe output NDJSON (default: current directory)

prompts/create-ado-agentic-workflow.md

Lines changed: 85 additions & 35 deletions
Original file line numberDiff line numberDiff line change
@@ -178,29 +178,19 @@ target: 1es
178178

179179
### Step 8 — MCP Servers
180180

181-
MCP servers give the agent tools at runtime. Two kinds:
181+
MCP servers give the agent additional tools at runtime via the MCP Gateway (MCPG). Configure them under `mcp-servers:` with either a `container:` field (containerized stdio) or a `url:` field (HTTP).
182182

183-
**Built-in** (no `container:` field):
183+
**Azure DevOps integration** — use `tools: azure-devops:` (first-class, not an MCP server):
184184
```yaml
185-
mcp-servers:
186-
ado: true # All ADO tools
187-
ado-ext: true # Extended ADO functionality
188-
kusto:
189-
allowed:
190-
- query # Restrict to specific tools
191-
icm:
192-
allowed:
193-
- create_incident
194-
- get_incident
195-
bluebird: true
196-
es-chat: true
197-
msft-learn: true
198-
stack: true
199-
asa: true
200-
calculator: true
185+
tools:
186+
azure-devops: true # Auto-configures ADO MCP container + token mapping
187+
# azure-devops: # Or with scoping options:
188+
# toolsets: [repos, wit, core]
189+
# allowed: [wit_get_work_item]
190+
# org: myorg
201191
```
202192

203-
**Custom** (containerized MCP with `container:` field):
193+
**Custom containerized MCP** (standalone target — requires `container:` field):
204194
```yaml
205195
mcp-servers:
206196
my-tool:
@@ -214,11 +204,22 @@ mcp-servers:
214204
- get_status
215205
```
216206

217-
> **Security**: Custom MCPs must have an explicit `allowed:` list. Built-in MCPs default to all tools when set to `true`.
207+
**Custom HTTP MCP** (remote endpoint — requires `url:` field):
208+
```yaml
209+
mcp-servers:
210+
remote-service:
211+
url: "https://mcp.example.com"
212+
headers:
213+
Authorization: "Bearer $(TOKEN)"
214+
allowed:
215+
- query_data
216+
```
217+
218+
> **Security**: All `mcp-servers:` entries must have an explicit `allowed:` list.
218219
>
219-
> **1ES target**: Custom containerized MCPs are not supported — only built-ins with service connections.
220+
> **Standalone target** (default): Only `mcp-servers:` entries with a `container:` or `url:` field are used. Entries without either field are silently skipped.
220221
>
221-
> **Standalone target** (the default): Built-in MCPs (entries without a `container:` or `url:` field) are silently skipped at compile time — they have no effect and will not be available to the agent. For the standalone target, use only **custom** containerized MCPs with a `container:` field.
222+
> **1ES target**: Custom containerized MCPs are mapped to service connections. Use `tools: azure-devops:` for ADO integration on both targets.
222223

223224
### Step 9 — Safe Outputs
224225

@@ -264,9 +265,60 @@ tools:
264265
- .txt
265266
```
266267

267-
Other safe output tools (no configuration needed): `noop`, `missing-data`, `missing-tool`, `report-incomplete`.
268+
**All configurable safe output tools:**
269+
270+
| Tool | Description | `permissions.write` |
271+
|------|-------------|:-------------------:|
272+
| **Work Items** | | |
273+
| `create-work-item` | Create ADO work items | ✅ |
274+
| `update-work-item` | Update fields on existing work items (each field requires opt-in) | ✅ |
275+
| `comment-on-work-item` | Add comments to work items (requires `target` scoping) | ✅ |
276+
| `link-work-items` | Link two work items (parent/child, related, etc.) | ✅ |
277+
| `upload-attachment` | Upload a workspace file to a work item | ✅ |
278+
| **Pull Requests** | | |
279+
| `create-pull-request` | Create PRs from agent code changes | ✅ |
280+
| `add-pr-comment` | Add a comment thread to a PR | ✅ |
281+
| `reply-to-pr-comment` | Reply to an existing PR review thread | ✅ |
282+
| `resolve-pr-thread` | Resolve or update status of a PR thread | ✅ |
283+
| `submit-pr-review` | Submit a review vote on a PR | ✅ |
284+
| `update-pr` | Update PR metadata (reviewers, labels, auto-complete, vote) | ✅ |
285+
| **Builds & Branches** | | |
286+
| `queue-build` | Queue an ADO pipeline build by definition ID | ✅ |
287+
| `create-branch` | Create a new branch from an existing ref | ✅ |
288+
| `create-git-tag` | Create a git tag on a repository ref | ✅ |
289+
| `add-build-tag` | Add a tag to an ADO build | ✅ |
290+
| **Wiki** | | |
291+
| `create-wiki-page` | Create a new ADO wiki page (requires `wiki-name`) | ✅ |
292+
| `update-wiki-page` | Update an existing ADO wiki page (requires `wiki-name`) | ✅ |
293+
| **Diagnostics** | | |
294+
| `noop` | Report no action needed | — |
295+
| `missing-data` | Report missing data/information | — |
296+
| `missing-tool` | Report a missing tool or capability | — |
297+
| `report-incomplete` | Report that a task could not be completed | — |
298+
299+
Example configuration for additional tools:
300+
```yaml
301+
safe-outputs:
302+
comment-on-work-item:
303+
target: "TeamProject\\AreaPath" # Required — scopes which work items can be commented on
304+
max: 3
305+
update-work-item:
306+
status: true # Each updatable field requires explicit opt-in
307+
title: true
308+
max: 5
309+
target: "*"
310+
add-pr-comment:
311+
max: 10
312+
queue-build:
313+
allowed-pipelines: [42, 99] # Required — pipeline definition IDs that can be triggered
314+
max: 1
315+
```
316+
317+
> See `AGENTS.md` → "Available Safe Output Tools" for full configuration reference of every tool.
318+
319+
Diagnostic tools (`noop`, `missing-data`, `missing-tool`, `report-incomplete`) are always available and require no configuration.
268320

269-
> **Validation**: The compiler enforces that if `create-pull-request` or `create-work-item` are configured, `permissions.write` must be set.
321+
> **Validation**: The compiler enforces that if write-requiring safe outputs are configured, `permissions.write` must be set.
270322

271323
### Step 10 — Permissions
272324

@@ -378,8 +430,8 @@ name: "Dependency Updater"
378430
description: "Checks for outdated npm dependencies and opens PRs to update them"
379431
engine: claude-sonnet-4.5
380432
schedule: weekly on monday around 9:00
381-
mcp-servers:
382-
ado: true
433+
tools:
434+
azure-devops: true
383435
permissions:
384436
read: my-read-arm-sc
385437
write: my-write-arm-sc
@@ -402,7 +454,7 @@ Scan this repository for outdated npm dependencies and open a pull request to up
402454
### Analysis
403455

404456
1. Run `npm outdated --json` to identify packages with newer versions available.
405-
2. For each outdated package, check whether the new version introduces any breaking changes by reviewing its changelog or release notes (use `msft-learn` if relevant documentation is available).
457+
2. For each outdated package, check whether the new version introduces any breaking changes by reviewing its changelog or release notes.
406458
3. Focus on patch and minor updates first; flag major version bumps separately.
407459

408460
### Action
@@ -463,10 +515,8 @@ Agent reads data (Kusto, ADO) and files a work item if action is needed.
463515

464516
```yaml
465517
schedule: daily around 10:00
466-
mcp-servers:
467-
ado: true
468-
kusto:
469-
allowed: [query]
518+
tools:
519+
azure-devops: true
470520
permissions:
471521
read: my-read-sc
472522
write: my-write-sc
@@ -485,8 +535,8 @@ triggers:
485535
pipeline:
486536
name: "CI Build"
487537
branches: [main, feature/*]
488-
mcp-servers:
489-
ado: true
538+
tools:
539+
azure-devops: true
490540
permissions:
491541
read: my-read-sc
492542
write: my-write-sc
@@ -501,8 +551,8 @@ Agent makes code changes and proposes them via PR.
501551
502552
```yaml
503553
schedule: weekly on sunday
504-
mcp-servers:
505-
ado: true
554+
tools:
555+
azure-devops: true
506556
permissions:
507557
read: my-read-sc
508558
write: my-write-sc

prompts/update-ado-agentic-workflow.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -250,7 +250,7 @@ Before finalizing any update, verify:
250250

251251
6. **Network domains**: If new MCPs or external services are added, ensure required domains are in `network.allowed`.
252252

253-
7. **Target compatibility**: If `target: 1es`, custom MCPs (with `container:`) are not supported — only built-in MCPs with service connections.
253+
7. **Target compatibility**: If `target: 1es`, custom containerized MCPs (with `container:`) are not supported — use `mcp-servers:` entries mapped to service connections instead.
254254

255255
8. **Safe output `target` fields**: `comment-on-work-item` requires an explicit `target` field. `update-work-item` fields require explicit opt-in (`status: true`, `title: true`, etc.).
256256

0 commit comments

Comments
 (0)