Skip to content

Commit 1914078

Browse files
feat(instructions): add ADO backlog shared infrastructure (#786)
# Pull Request ## Description Added shared infrastructure required by all ADO Backlog Manager workflows. This is the first PR in the ADO Backlog Manager sequence (IS002/Foundation), establishing the autonomy model, content safety guards, format detection protocol, and reusable interaction templates that subsequent PRs depend on. ### Copilot Instructions Three instruction files were created or updated to support ADO backlog management capabilities. **ado-interaction-templates.instructions.md** (new) provides 19 reusable templates organized into two categories: - 6 Category A **Markdown** description templates (User Story, Bug, Task, Epic, Feature, Acceptance Criteria) for Azure DevOps Services - 6 Category A **HTML** description templates for Azure DevOps Server on-premises instances - 7 Category B comment templates (status update, state transition, duplicate closure, blocking, request info, sprint rollover, PR linked) **ado-wit-planning.instructions.md** received three new sections: - **Three-Tier Autonomy Model** defining Full-Autonomous, Partial-Autonomous, and Manual modes with a gate matrix controlling which operations require user confirmation - **Content Sanitization Guards** with two mandatory rules: a local-only path guard that strips workspace paths before writing to ADO, and a planning reference ID guard that removes internal tracking identifiers - **Content Format Detection** protocol with four detection rules resolving whether to use Markdown or HTML format based on the ADO instance type (Services vs Server) **ado-update-wit-items.instructions.md** was updated with a dynamic `format` parameter in MCP tool call examples, showing both Markdown and HTML variants, and an autonomy hook referencing the planning file's gate matrix. ### Collections & Plugins Updated *ado.collection.yml* and *hve-core-all.collection.yml* with the new interaction-templates entry. Regenerated plugin outputs via `npm run plugin:generate`. ## Related Issue(s) Closes #776 Part of #774 ## Type of Change Select all that apply: **Code & Documentation:** - [ ] Bug fix (non-breaking change fixing an issue) - [x] New feature (non-breaking change adding functionality) - [ ] Breaking change (fix or feature causing existing functionality to change) - [ ] Documentation update **Infrastructure & Configuration:** - [ ] GitHub Actions workflow - [ ] Linting configuration (markdown, PowerShell, etc.) - [ ] Security configuration - [ ] DevContainer configuration - [ ] Dependency update **AI Artifacts:** - [ ] Reviewed contribution with `prompt-builder` agent and addressed all feedback - [x] Copilot instructions (`.github/instructions/*.instructions.md`) - [ ] Copilot prompt (`.github/prompts/*.prompt.md`) - [ ] Copilot agent (`.github/agents/*.agent.md`) - [ ] Copilot skill (`.github/skills/*/SKILL.md`) > **Note for AI Artifact Contributors**: > > - **Agents**: Research, indexing/referencing other project (using standard VS Code GitHub Copilot/MCP tools), planning, and general implementation agents likely already exist. Review `.github/agents/` before creating new ones. > - **Skills**: Must include both bash and PowerShell scripts. See [Skills](../docs/contributing/skills.md). > - **Model Versions**: Only contributions targeting the **latest Anthropic and OpenAI models** will be accepted. Older model versions (e.g., GPT-3.5, Claude 3) will be rejected. > - See [Agents Not Accepted](../docs/contributing/custom-agents.md#agents-not-accepted) and [Model Version Requirements](../docs/contributing/ai-artifacts-common.md#model-version-requirements). **Other:** - [ ] Script/automation (`.ps1`, `.sh`, `.py`) - [ ] Other (please describe): ## Sample Prompts (for AI Artifact Contributions) **User Request:** "Create a User Story work item in ADO with the title 'Add retry logic to pipeline runner' and standard acceptance criteria." The interaction templates are referenced by backlog management agents when constructing ADO work item descriptions and comments. They are not invoked directly by users. **Execution Flow:** 1. Agent receives a work item creation or update request 2. Agent reads `ado-wit-planning.instructions.md` to determine autonomy mode and format 3. Content Format Detection resolves the target format (Markdown or HTML) based on the ADO instance 4. Agent selects the appropriate Category A template from `ado-interaction-templates.instructions.md` 5. Template variables are populated from the work item context 6. Content Sanitization Guards strip local paths and planning reference IDs 7. Agent calls MCP tool with the formatted content and detected format parameter **Output Artifacts:** Work item descriptions and comments written to Azure DevOps via MCP tools. No local file artifacts are produced. **Success Indicators:** - Work item descriptions in ADO render correctly in both Markdown (Services) and HTML (Server) formats - No local workspace paths or internal tracking IDs appear in ADO content - Autonomy gates prompt for user confirmation at the correct threshold ## Testing - **Markdown linting**: `npm run lint:md` — Passed (0 errors, 253 files) - **Frontmatter validation**: `npm run lint:frontmatter` — Passed (0 errors, 0 warnings) - **Skill structure validation**: `npm run validate:skills` — Passed - **Plugin generation**: `npm run plugin:generate` — Passed (exit 0) - **Plugin validation**: `npm run plugin:validate` — Passed (confirmed by contributor) - **Security analysis**: No sensitive data, API keys, or credentials detected in changes. No dependency changes. No privilege escalation patterns. - **Diff-based assessment**: All changed files follow repository naming conventions. No unintended file modifications. Commit message follows conventional commits format. - Manual testing was not performed. ## Checklist ### Required Checks - [x] Documentation is updated (if applicable) - [x] Files follow existing naming conventions - [x] Changes are backwards compatible (if applicable) - [ ] Tests added for new functionality (if applicable) (N/A — instruction files do not have unit tests) ### AI Artifact Contributions <!-- If contributing an agent, prompt, instruction, or skill, complete these checks --> - [ ] Used `/prompt-analyze` to review contribution - [ ] Addressed all feedback from `prompt-builder` review - [ ] Verified contribution follows common standards and type-specific requirements ### Required Automated Checks The following validation commands must pass before merging: - [x] Markdown linting: `npm run lint:md` - [ ] Spell checking: `npm run spell-check` - [x] Frontmatter validation: `npm run lint:frontmatter` - [x] Skill structure validation: `npm run validate:skills` - [ ] Link validation: `npm run lint:md-links` - [ ] PowerShell analysis: `npm run lint:ps` - [x] Plugin freshness: `npm run plugin:generate` ## Security Considerations <!-- ⚠️ WARNING: Do not commit sensitive information such as API keys, passwords, or personal data --> - [x] This PR does not contain any sensitive or NDA information - [ ] Any new dependencies have been reviewed for security issues (N/A — no dependency changes) - [ ] Security-related scripts follow the principle of least privilege (N/A — no security script changes) ## Additional Notes This is PR 1 of 5 in the ADO Backlog Manager sequence. Subsequent PRs depend on the infrastructure established here: - PR 2 (IS003/#777): Triage workflow - PR 3 (IS004/#778): Sprint planning workflow - PR 4 (IS005/#779): Discovery workflow + prompts - PR 5 (IS006/#775): Orchestrator agent --------- Co-authored-by: Bill Berry <WilliamBerryiii@users.noreply.github.com>
1 parent 68b04bc commit 1914078

File tree

9 files changed

+539
-11
lines changed

9 files changed

+539
-11
lines changed
Lines changed: 396 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,396 @@
1+
---
2+
description: "Work item description and comment templates for consistent Azure DevOps content formatting - Brought to you by microsoft/hve-core"
3+
applyTo: '**/.github/instructions/ado/**'
4+
---
5+
6+
# ADO Interaction Templates
7+
8+
Work item description and comment templates for consistent formatting across Azure DevOps operations. These templates replace the GitHub community interaction model with patterns suited to internal team workflows.
9+
10+
Templates are provided in Markdown (default for Azure DevOps Services) and HTML (for Azure DevOps Server). Select the format matching the detected content format per [Content Format Detection](./ado-wit-planning.instructions.md#content-format-detection). The content structure is identical across formats; only the syntax differs.
11+
12+
## Voice Foundation
13+
14+
Every work item field value and comment follows these conventions:
15+
16+
* Professional and concise. No emoji in work item content.
17+
* Every comment provides information or requests action. Omit warmth-building preambles, hedging language, or filler phrases.
18+
* Comments reference specific work item IDs, PR numbers, or iteration paths.
19+
* State what happened factually. Avoid narrative commentary or reasoning chains.
20+
* Use `{{placeholder}}` syntax where agents substitute values at execution time.
21+
22+
## Category A: Work Item Description Templates (Markdown)
23+
24+
Templates for `System.Description`, `Microsoft.VSTS.Common.AcceptanceCriteria`, and `Microsoft.VSTS.TCM.ReproSteps` fields. Use these templates when the detected content format is Markdown.
25+
26+
### A1: User Story Description
27+
28+
Field: `System.Description`
29+
30+
```markdown
31+
As a {{persona}}, I want {{capability}} so that {{outcome}}.
32+
33+
## Requirements
34+
35+
1. {{requirement_1}}
36+
2. {{requirement_2}}
37+
3. {{requirement_3}}
38+
39+
## Context
40+
41+
{{background_information}}
42+
43+
Related work items: {{related_ids}}
44+
```
45+
46+
### A2: User Story Acceptance Criteria
47+
48+
Field: `Microsoft.VSTS.Common.AcceptanceCriteria`
49+
50+
```markdown
51+
- [ ] {{functional_criterion_1}}
52+
- [ ] {{functional_criterion_2}}
53+
- [ ] {{edge_case_criterion}}
54+
- [ ] {{performance_criterion}}
55+
```
56+
57+
### A3: Bug Description
58+
59+
Field: `Microsoft.VSTS.TCM.ReproSteps`
60+
61+
```markdown
62+
## Summary
63+
64+
{{summary_paragraph}}
65+
66+
## Repro Steps
67+
68+
1. {{step_1}}
69+
2. {{step_2}}
70+
3. {{step_3}}
71+
72+
## Expected Behavior
73+
74+
{{expected_behavior}}
75+
76+
## Actual Behavior
77+
78+
{{actual_behavior}}
79+
80+
## Environment
81+
82+
* OS: {{os}}
83+
* Browser: {{browser}}
84+
* Version: {{version}}
85+
86+
## Additional Context
87+
88+
{{screenshots_logs_or_notes}}
89+
```
90+
91+
### A4: Task Description
92+
93+
Field: `System.Description`
94+
95+
```markdown
96+
## Objective
97+
98+
{{objective_paragraph}}
99+
100+
## Approach
101+
102+
1. {{step_1}}
103+
2. {{step_2}}
104+
3. {{step_3}}
105+
106+
## Definition of Done
107+
108+
- [ ] {{done_criterion_1}}
109+
- [ ] {{done_criterion_2}}
110+
- [ ] {{done_criterion_3}}
111+
```
112+
113+
### A5: Epic Description
114+
115+
Field: `System.Description`
116+
117+
```markdown
118+
## Business Goal
119+
120+
{{business_goal_paragraph}}
121+
122+
## Scope
123+
124+
**In scope:**
125+
126+
* {{in_scope_item_1}}
127+
* {{in_scope_item_2}}
128+
129+
**Out of scope:**
130+
131+
* {{out_of_scope_item_1}}
132+
* {{out_of_scope_item_2}}
133+
134+
## Success Metrics
135+
136+
* {{metric_1}}
137+
* {{metric_2}}
138+
139+
## Dependencies
140+
141+
* {{dependency_1}}
142+
* {{dependency_2}}
143+
```
144+
145+
### A6: Feature Description
146+
147+
Field: `System.Description`
148+
149+
```markdown
150+
## Overview
151+
152+
{{overview_paragraph}}
153+
154+
## User Impact
155+
156+
{{user_impact_statement}}
157+
158+
## Technical Approach
159+
160+
{{technical_approach_paragraph}}
161+
162+
## Acceptance Criteria
163+
164+
- [ ] {{criterion_1}}
165+
- [ ] {{criterion_2}}
166+
- [ ] {{criterion_3}}
167+
```
168+
169+
## Category A-HTML: Work Item Description Templates (HTML)
170+
171+
HTML equivalents of the Category A templates. Use these templates when the detected content format is HTML (Azure DevOps Server). The content structure matches the Markdown templates; only the syntax differs.
172+
173+
### A1-HTML: User Story Description
174+
175+
Field: `System.Description`
176+
177+
```html
178+
<p>As a {{persona}}, I want {{capability}} so that {{outcome}}.</p>
179+
180+
<h2>Requirements</h2>
181+
<ol>
182+
<li>{{requirement_1}}</li>
183+
<li>{{requirement_2}}</li>
184+
<li>{{requirement_3}}</li>
185+
</ol>
186+
187+
<h2>Context</h2>
188+
<p>{{background_information}}</p>
189+
<p>Related work items: {{related_ids}}</p>
190+
```
191+
192+
### A2-HTML: User Story Acceptance Criteria
193+
194+
Field: `Microsoft.VSTS.Common.AcceptanceCriteria`
195+
196+
```html
197+
<ul>
198+
<li>&#9744; {{functional_criterion_1}}</li>
199+
<li>&#9744; {{functional_criterion_2}}</li>
200+
<li>&#9744; {{edge_case_criterion}}</li>
201+
<li>&#9744; {{performance_criterion}}</li>
202+
</ul>
203+
```
204+
205+
### A3-HTML: Bug Description
206+
207+
Field: `Microsoft.VSTS.TCM.ReproSteps`
208+
209+
```html
210+
<h2>Summary</h2>
211+
<p>{{summary_paragraph}}</p>
212+
213+
<h2>Repro Steps</h2>
214+
<ol>
215+
<li>{{step_1}}</li>
216+
<li>{{step_2}}</li>
217+
<li>{{step_3}}</li>
218+
</ol>
219+
220+
<h2>Expected Behavior</h2>
221+
<p>{{expected_behavior}}</p>
222+
223+
<h2>Actual Behavior</h2>
224+
<p>{{actual_behavior}}</p>
225+
226+
<h2>Environment</h2>
227+
<ul>
228+
<li>OS: {{os}}</li>
229+
<li>Browser: {{browser}}</li>
230+
<li>Version: {{version}}</li>
231+
</ul>
232+
233+
<h2>Additional Context</h2>
234+
<p>{{screenshots_logs_or_notes}}</p>
235+
```
236+
237+
### A4-HTML: Task Description
238+
239+
Field: `System.Description`
240+
241+
```html
242+
<h2>Objective</h2>
243+
<p>{{objective_paragraph}}</p>
244+
245+
<h2>Approach</h2>
246+
<ol>
247+
<li>{{step_1}}</li>
248+
<li>{{step_2}}</li>
249+
<li>{{step_3}}</li>
250+
</ol>
251+
252+
<h2>Definition of Done</h2>
253+
<ul>
254+
<li>&#9744; {{done_criterion_1}}</li>
255+
<li>&#9744; {{done_criterion_2}}</li>
256+
<li>&#9744; {{done_criterion_3}}</li>
257+
</ul>
258+
```
259+
260+
### A5-HTML: Epic Description
261+
262+
Field: `System.Description`
263+
264+
```html
265+
<h2>Business Goal</h2>
266+
<p>{{business_goal_paragraph}}</p>
267+
268+
<h2>Scope</h2>
269+
<p><strong>In scope:</strong></p>
270+
<ul>
271+
<li>{{in_scope_item_1}}</li>
272+
<li>{{in_scope_item_2}}</li>
273+
</ul>
274+
<p><strong>Out of scope:</strong></p>
275+
<ul>
276+
<li>{{out_of_scope_item_1}}</li>
277+
<li>{{out_of_scope_item_2}}</li>
278+
</ul>
279+
280+
<h2>Success Metrics</h2>
281+
<ul>
282+
<li>{{metric_1}}</li>
283+
<li>{{metric_2}}</li>
284+
</ul>
285+
286+
<h2>Dependencies</h2>
287+
<ul>
288+
<li>{{dependency_1}}</li>
289+
<li>{{dependency_2}}</li>
290+
</ul>
291+
```
292+
293+
### A6-HTML: Feature Description
294+
295+
Field: `System.Description`
296+
297+
```html
298+
<h2>Overview</h2>
299+
<p>{{overview_paragraph}}</p>
300+
301+
<h2>User Impact</h2>
302+
<p>{{user_impact_statement}}</p>
303+
304+
<h2>Technical Approach</h2>
305+
<p>{{technical_approach_paragraph}}</p>
306+
307+
<h2>Acceptance Criteria</h2>
308+
<ul>
309+
<li>&#9744; {{criterion_1}}</li>
310+
<li>&#9744; {{criterion_2}}</li>
311+
<li>&#9744; {{criterion_3}}</li>
312+
</ul>
313+
```
314+
315+
## Category B: Work Item Comment Templates
316+
317+
Templates for `mcp_ado_wit_add_work_item_comment`.
318+
319+
### B1: Status Update
320+
321+
```text
322+
**Status Update**: {{action_taken}}
323+
324+
{{details}}
325+
```
326+
327+
### B2: State Transition
328+
329+
```text
330+
**State Change**: {{previous_state}} → {{new_state}}
331+
332+
Reason: {{reason}}
333+
```
334+
335+
### B3: Duplicate Closure
336+
337+
```text
338+
**Duplicate**: Closing as duplicate of work item #{{original_id}}.
339+
340+
Details merged into the original item.
341+
```
342+
343+
### B4: Blocking/Dependency
344+
345+
```text
346+
**Blocked**: This item is blocked by #{{blocker_id}}.
347+
348+
Context: {{why_this_blocks_progress}}
349+
```
350+
351+
### B5: Request Information
352+
353+
```text
354+
**Information Needed**: {{specific_question}}
355+
356+
Context: {{why_this_information_is_required_to_proceed}}
357+
```
358+
359+
### B6: Sprint Rollover
360+
361+
```text
362+
**Sprint Rollover**: Moved from {{previous_iteration}} to {{new_iteration}}.
363+
364+
Reason: {{reason_for_rollover}}
365+
```
366+
367+
### B7: PR Linked
368+
369+
```text
370+
**PR Linked**: PR #{{pr_id}} in {{repository}} (branch: {{branch_name}})
371+
```
372+
373+
## Integration Instructions
374+
375+
Consuming files reference these templates via:
376+
377+
```markdown
378+
#file:./ado-interaction-templates.instructions.md
379+
```
380+
381+
Primary consumers:
382+
383+
* `ado-update-wit-items.instructions.md` for work item creation and updates
384+
* `ado-wit-discovery.instructions.md` for discovered work item descriptions
385+
* `ado-backlog-triage.instructions.md` for triage result comments
386+
387+
Template conventions:
388+
389+
* All templates use `{{placeholder}}` syntax for agent substitution at execution time.
390+
* Agents select the appropriate template based on work item type and operation context.
391+
* PR descriptions are excluded from this file; see `ado-create-pull-request.instructions.md` for PR content templates.
392+
* PR comment templates are excluded; no `mcp_ado_repo_add_pr_comment` tool exists in the current tooling.
393+
394+
---
395+
396+
Brought to you by microsoft/hve-core

0 commit comments

Comments
 (0)