Success Metrics: Turn a Business Goal into a Testable Query
Choose outcome and guardrail metrics, define their clocks, and verify AI-assisted Azure Boards queries against actual records.
A busy kitchen is not necessarily a good restaurant
Counting chopped vegetables does not tell you whether customers received the right meal on time. Similarly, commits, generated code, and agent sessions measure activity. They are not automatically customer value.
Start with a business question: βCan customers complete bookings reliably while we deliver changes faster?β Derive a small set of outcome metrics and counterbalancing guardrails. Faster delivery that doubles failed bookings is not success.
| Area | Candidate measure | Important boundary |
|---|---|---|
| Planning | Time from request to accepted work | Define creation and acceptance events |
| Development | PR review waiting time | Separate author time from reviewer queue |
| Testing | Failed checks and escaped defects | A pass rate without test scope is incomplete |
| Delivery | Deployment frequency and change lead time | Define production deployment, not every CI run |
| Operations | Availability, latency, recovery time | Define customer impact and restoration |
| Security | Time to remediate serious findings | State severity, start event, and exclusions |
These are example choices, not Microsoftβs mandated targets. Do not publish a team ranking from raw counts without checking workload, service criticality, and measurement coverage.
Write the metric contract before the query
For the booking service, a metric contract might say:
Question: Are accepted booking fixes reaching customers sooner?
Population: completed bugs in the booking team's area path.
Start: work item created.
Finish: final completed transition.
Window: completed during the selected reporting month.
Group: priority and service.
Guardrail: customer-impacting incidents after release.
This defines a work-item lead-time measure, not commit-to-production lead time. Those clocks answer different questions.
In Azure Boards Analytics widgets, lead time runs from work-item creation to completion. Cycle time runs from the first transition into an In Progress state category to final completion. Reopening an item does not simply restart the original cycle-time clock. Team configuration, workflow state categories, and the selected population affect interpretation.
Use percentiles and a distribution as well as an average. A mean can hide a small set of long-blocked items. A shorter average can also result from closing small tasks while old high-impact bugs remain open.
Let AI draft the query, not define reality
With an approved assistant and the appropriate Azure DevOps MCP access, ask for a read-only query:
In the sandbox Booking project, draft a WIQL query for completed bugs
in the team's area path that changed during the last 30 days.
Return the query, the project/area filters, and the fields used.
Do not update work items. Explain what this query cannot measure.
An illustrative WIQL starting point is:
SELECT [System.Id], [System.Title], [System.State], [System.ChangedDate]
FROM WorkItems
WHERE [System.TeamProject] = @project
AND [System.WorkItemType] = 'Bug'
AND [System.State] = 'Closed'
AND [System.ChangedDate] >= @Today - 30
ORDER BY [System.ChangedDate] DESC
Replace Closed with the actual completed state in your process and add the real area-path filter. This is a candidate list, not a cycle-time calculation. ChangedDate means any qualifying recent change; it is not guaranteed to be the completion date. A bug closed earlier and edited yesterday can appear.
To measure time in states, use the appropriate Analytics data or built-in lead/cycle-time widgets, not a fabricated arithmetic formula over ChangedDate. The assistant should identify that limitation before producing a chart.
Validate one record all the way through
Open several returned items, including an old item edited recently and a reopened bug. Compare state history, team, completion event, and query result. Inspect the generated filter for accidentally omitted area paths or broad project scope.
If a result is zero, distinguish βno matching recordsβ from βwrong state name,β βmissing permission,β βwrong team,β and βno Analytics history.β Missing data is not a measured zero. If an AI summary says delivery improved, ask which exact population and baseline support that claim.
Keep source query, reporting window, data refresh time, and exclusions alongside the result. A reproducible metric is more useful than a persuasive paragraph.
An assistant calculates cycle time as ClosedDate minus ChangedDate. What should you do first?
Try it: prove a reporting filter
Prerequisites: read access to a sandbox Azure Boards project; Analytics access for the optional widget comparison. An AI tool is optional, not a requirement to understand WIQL.
- Write a metric contract with population, start, finish, and reporting window.
- Use Query Editor or an approved assistant to draft a flat-list query.
- Check three actual work items against its filters. Include a reopened or recently edited item if one exists.
- Compare the candidate list with a configured lead-time or cycle-time widget. Explain why the two outputs need not match.
Expected observation: you can show why each sampled record belongs or does not belong. The queryβs inability to compute a transition-based duration is explicit.
Cleanup: remove the disposable query/widget if you created one. Do not modify real work-item dates to make a chart look correct. If your sandbox has no suitable history, document the untested case rather than inventing records presented as real evidence.
Decision check: what if deployment frequency increases?
Check change failure, customer outcomes, and recovery alongside frequency. More deployments can be healthy small batches, or repeated failed retries. The count alone cannot distinguish them.