Appendix: how to read this figure
This figure shows one part of the AI-native SDLC playbook: 06 Maintain → Closing the loop. This appendix uses ASD-STE100 Simplified Technical English. Each statement shows its source: playbook or our figure.
A. The loop, step by step
- Each metric has a baseline: the mean and the standard deviation (σ) over a rolling 30-day window. playbook
- A deterministic script compares each new reading with the bands. No model is used for detection. playbook In the figure, the lamps are this script.
- Rules catch slow drift as well as spikes. The playbook names “Western Electric or similar” rules. playbook
- The tier sets what Claude may do. At 1σ, the script only logs. At 2σ, the script calls Claude read-only to diagnose. At 3σ, Claude may propose a PR into the review gate or a pre-approved runbook. playbook In the figure, the selector shows the tier.
- Claude writes its diagnosis as
intent.md, in the 01 Plan format. playbook In the figure, the ticket comes out of the console. - The service owner or the on-call engineer triages the queue: fix now, schedule, or dismiss. Findings that affect the product go to the product owner. playbook In the figure, you do this in the queue.
- Each dismissal has a reason. Dismissals tune the bands and decrease noise. playbook
- When a fix ships, the team adds an eval for the incident. Then the same fault cannot return without a test failure. playbook
B. The terms
| Term | Meaning | In the figure |
|---|---|---|
| Metric | A number that the team measures in production on a schedule. Examples: CI test failure rate, post-deploy 5xx rate, PR cycle time. | The paper. One chart in σ units. |
| Reading | One value of the metric. | One dot. |
| Baseline | The mean and σ of the metric over the last 30 days. In bands.yaml: baseline: rolling_30d. | The center line and the band lines. |
| σ (sigma) | The standard deviation. It shows how far readings usually move from the mean because of normal noise. | The space between two lines. |
| Control band | The area between two lines at the same distance from the mean, for example ±2σ. | The ruled lines. |
| Breach | A reading or a pattern of readings that goes outside a band. | A lamp comes on. The dots become large. |
| Drift | A slow change in one direction. No single reading is unusual. The figure uses one Western Electric run rule: 8 readings in a row on the same side of the mean. | The DRIFT lamp. |
| Tier | The level of the breach. It sets what Claude may do: log, diagnose or propose. | The selector. |
intent.md | The file that starts work in 01 Plan. It says what is wanted, why, and the constraints. In Maintain, Claude writes it from its diagnosis. | The ticket and the queue. |
| Triage | A person reads each intent.md and decides: fix now, schedule, or dismiss. | The three buttons on each queue item. |
| Review gate | The PR review step. A code owner must approve. The agent that wrote the code cannot approve it. | Not drawn. The queue names it. |
| Runbook | A set of steps that the team approved in advance, for example rollback-deploy. | Not drawn. Key 2 names it. |
| Eval | An automatic test of behavior. The team adds one after each fixed incident. | Not drawn. “Fix now” names it. |
bands.yaml | The version-controlled file that sets the metric, the baseline, the rules and the tiers. | The wiring between the lamps and the selector. |
C. The people and agents in the loop
| Actor | What they do in 06 Maintain | In the figure |
|---|---|---|
| Detection script | It compares readings with the bands and calls Claude. It uses no model. | The lamps and the selector. |
| Claude | It diagnoses read-only at 2σ. At 3σ, it may propose a PR or a pre-approved runbook. It writes intent.md. | The “Claude may” field and the ticket. |
| Service owner or on-call engineer | They triage the queue: fix now, schedule, or dismiss. They give a reason for each dismissal. | You, in the queue. |
| Product owner | They receive findings that affect the product. In 01 Plan, they review and correct each intent.md before it is committed. | Not drawn. |
| Code owner (reviewer) | They approve or reject the PR at the review gate. | Not drawn. “Fix now” names the gate. |
D. The readout
The readout at the bottom right of the card has four parts. Example: CI +3.52σ · 1σ + 2σ + 3σ → propose.
CIis the metric.+3.52σis the last reading. It is 3.52σ above the 30-day mean. A minus sign (−) shows a reading below the mean.1σ + 2σ + 3σare the bands that the reading breached.proposeis the tier. The selector points to the same tier.
A lamp stays on for some seconds after a breach. The readout shows only the last reading.
E. The tiers
| Tier | When | Claude may | bands.yaml |
|---|---|---|---|
| OK | The reading is less than 1σ from the mean. | Nothing. Claude is not called. | — |
| LOG | The reading is between 1σ and 2σ. | Nothing. The script logs the reading. | 1sigma: { action: log } |
| DIAG | The reading is between 2σ and 3σ, or the drift rule fires. | Read the code and logs. Write a diagnosis. Change nothing. | 2sigma: { action: diagnose, tools: "Read,Grep,Bash(gh run view *)" } |
| PROPOSE | The reading is more than 3σ from the mean. | Open a PR into the review gate, or trigger a pre-approved runbook. | 3sigma: { action: propose, routes: [pull_request, runbook:rollback-deploy] } |
On a stable metric, normal noise alone breaches 1σ on approximately 1 reading in 3, 2σ on 1 in 22, and 3σ on 1 in 370. The drift rule fires on approximately 1 reading in 128. That is why dismissals must tune the bands.
F. The keys: the playbook's three examples
1 CI test failure rate
playbook “When the CI test failure rate breaches 3σ, the agent quarantines the flaky test.” The example also allows a revert PR, and the review gate decides.
The figure feeds: one reading at +3.5σ.
- The 1σ, 2σ and 3σ lamps come on. The selector goes to PROPOSE.
- Claude finds the flaky test. It proposes a PR that quarantines the test, or a revert PR.
- An intent.md ticket comes out. The service owner triages it.
- A code owner reviews the PR at the review gate. After the fix ships, the team adds an eval.
2 Post-deploy 5xx rate
playbook “When the post-deploy 5xx rate breaches 3σ with a deployment in the window,” the agent triggers the existing rollback pipeline.
The figure feeds: one reading at +3.6σ, with a deploy in the window.
- The 1σ, 2σ and 3σ lamps come on. The selector goes to PROPOSE.
- A deploy is in the window, so Claude triggers the pre-approved rollback-deploy runbook. Claude cannot change production directly.
- An intent.md ticket comes out. The on-call engineer triages it.
3 PR cycle time
playbook “When PR cycle time trips a drift rule,” the agent writes a report. The playbook gives no σ tier for this example.
The figure feeds: eight readings between +0.7σ and +1.5σ. No reading reaches 2σ.
- Some readings light the 1σ lamp. The selector goes to LOG.
- On the 8th reading in a row above the mean, the DRIFT lamp comes on. The selector goes to DIAG.
- Claude diagnoses read-only and writes a report as intent.md. It changes nothing.
- The service owner triages it. A slow process change is usually scheduled, not fixed now.
G. Where the figure simplifies
- our figure One chart shows all three metrics. The chart uses σ units, so the shape of a breach is the same for each metric.
- our figure The playbook gives no tier for a drift rule. Its drift example writes a report, which is read-only. Thus the figure puts drift in the diagnose tier.
- our figure The playbook says “Western Electric or similar”. The figure uses one rule for drift: 8 readings in a row on the same side of the mean.
- our figure One breach episode makes one
intent.md. A later breach in the same episode raises its tier. - our figure The noise in the figure is a little smaller than the band σ. Thus false alarms occur less often than on a real metric.
- our figure A dismissal does not change the band lines in the figure. The review gate, the runbook and the eval are not drawn.
H. Where control bands come from
Walter Shewhart made the first control charts at Bell Labs in the 1920s. Western Electric published its run rules in its Statistical Quality Control Handbook in 1956. The playbook uses this method for production metrics. Clinical laboratories use the same method for quality control: the Levey-Jennings chart and the Westgard rules. The playbook does not refer to these laboratory methods.
I. Applying the loop to a clinical data repository
our figure This section is our advice. The playbook does not give it.
- Example metrics: rows per load, the null rate in a key FHIR element, the terminology-mapping failure rate, cohort size for each phenotype at each refresh.
- With many metrics, false alarms add up. At 1,000 metrics each day, noise alone breaches 3σ approximately 3 times each day. Put metrics into groups, and use dismissals to tune the bands.
- Many loads change with the day of the week or the end of the month. Compare each load with the same day in earlier weeks.
- A null rate or a failure rate is a proportion. Set its band from the number of rows in each load.
- A small, slow change can stay inside 2σ for a long time. EWMA and CUSUM charts find such changes sooner than a single-point limit.