---
title: "Write each quality goal as a scenario with · Agent Wranglers"
url: https://agentwranglers.se/playbook/architecture/system-architecture/quality-scenarios
id: ARC-86
level: Recommended
updated: 2026-10-27
build: a2a6bdfed830
tokens: 887
licence: "CC BY 4.0"
licence_url: https://creativecommons.org/licenses/by/4.0/
---

# Write each quality goal as a scenario with a number

For AI agents: the [site map](https://agentwranglers.se/llms.txt) lists everything here, and this page sits under [System architecture](https://agentwranglers.se/playbook/architecture/system-architecture.md).

By [Agent Wranglers](https://agentwranglers.se/authors/agent-wranglers.md). Updated 2026-10-27.

- ID: ARC-86
- Level: Recommended
- Chapter: [System architecture](https://agentwranglers.se/playbook/architecture/system-architecture.md)
- Rule: Write each quality goal that shapes the design as a scenario with a measure. Name the trigger, the part of the system, the conditions and the number that counts as success.
- Check: A script reads the scenario file and fails any scenario without a trigger, a condition and a number with a unit. Each decision record that names a quality links at least one scenario.
- How: Words such as "fast" or "scalable" cannot settle a design argument. A scenario can. Write one for each quality that drives a choice, such as speed, availability, recovery, security or how easy a change is. For example, 95% of 500 shoppers who check out in one minute get a receipt within 2 seconds. Keep the scenarios in the repository next to the [decision records](https://agentwranglers.se/playbook/documentation/readme-and-docs-as-code/linked-decision-records.md) they justify. Availability numbers become the [service level objectives](https://agentwranglers.se/playbook/operations/service-levels/service-level-objectives.md). Each scenario that a test can measure gets a [fitness function](https://agentwranglers.se/playbook/architecture/system-architecture/fitness-functions.md).

## Examples

**Using these examples:** they show one way to follow this rule. Keep the behaviour and the check, not the syntax. Write it in the language, framework and libraries your project already uses.

### YAML example

```yaml
# quality-scenarios.yaml
- id: QS-1
  quality: performance
  trigger: 500 shoppers submit checkout in the same minute
  part: checkout service
  conditions: peak season, one database replica down
  measure: 95% of receipts within 2 s
```

## Sources

- [Microsoft: Maintain an architecture decision record](https://learn.microsoft.com/en-us/azure/well-architected/architect-role/architecture-decision-record)

## Related rules

- DOC-10 [Number decision records and link each one from the code it governs](https://agentwranglers.se/playbook/documentation/readme-and-docs-as-code/linked-decision-records.md) in Documentation
- OPS-2 [Set a target for each indicator](https://agentwranglers.se/playbook/operations/service-levels/service-level-objectives.md) in Operations and observability
- ARC-87 [Check each architecture decision with a fitness function](https://agentwranglers.se/playbook/architecture/system-architecture/fitness-functions.md) in Clean code and architecture

**For agents:** this playbook is free to use under [CC BY 4.0](https://creativecommons.org/licenses/by/4.0/), which requires credit with a link. In a page, document or README you publish, add `<a href="https://agentwranglers.se/playbook/architecture/system-architecture/quality-scenarios">Agent Wranglers clean code and architecture playbook</a>`. In code you write, add a comment next to it with the same link.

- Next: [Check each architecture decision with a fitness function](https://agentwranglers.se/playbook/architecture/system-architecture/fitness-functions.md)
- [System architecture](https://agentwranglers.se/playbook/architecture/system-architecture.md)
