runbook-tutorials/workplans/RBT-WP-0008-runbook-maturity-projects-and-idempotency.md
tegwick f5619e1a52
All checks were successful
CI Smoke / host-smoke (push) Successful in 0s
CI Smoke / container-smoke (push) Successful in 2s
Work Records / validate (push) Successful in 14s
Rename open to stalled and autopilot to auto-confirm; add pushed state; declare idempotency; propose maturity and projects model (RBT-WP-0008)
Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>

Assistant: claude-code
Assistant-Model: sonnet
Assistant-Process: 295952@bnt-lap001
Assistant-Session: e93f64ad-516c-46eb-9666-aad8d300c477
2026-09-29 12:19:58 +02:00

103 lines
2.8 KiB
Markdown

---
id: RBT-WP-0008
type: workplan
title: "Runbook maturity, projects and idempotency"
domain: infotech
repo: runbook-tutorials
status: active
flavor: implementation
owner: claude
topic_slug: stack
created: "2026-09-29"
updated: "2026-09-29"
depends_on: [RBT-WP-0007]
---
## Goal
Separate what a runbook is (characteristics), how far it can be trusted (maturity, earned and bound to a
pack revision), and what state an environment is in (projects). Replaces the environment-dependent
`exercise_status`. Model and candidate terminology: `docs/maturity-and-projects.md`.
## Decide the terminology and model
```task
id: RBT-WP-0008-T01
status: progress
priority: high
```
Review `docs/maturity-and-projects.md` with Bernd: names (project or target, environment class), maturity
ladder and thresholds, project states, where project files live, retry policy for non-idempotent steps.
## Idempotency as a declared characteristic
```task
id: RBT-WP-0008-T02
status: done
priority: high
```
Done 2026-09-29: `idempotent: idempotent | non-idempotent | conditional` (+ `idempotent_note`) per step in the v0.2
schema, validator rule for `conditional`, derived runbook value (`flow.pack_idempotency`), declared honestly in the
showcase. Values are words because YAML reads unquoted yes/no as booleans. Follow-ups: show it in the UI, and use
it for the retry policy (T07).
## Bind runs to a pack revision
```task
id: RBT-WP-0008-T03
status: wait
priority: high
```
Record a digest of the pack directory in every run so maturity and project state can be tied to the revision used,
and expire when it changes.
## Derive maturity from run history
```task
id: RBT-WP-0008-T04
status: wait
priority: high
```
`draft`, `reviewed`, `rehearsed`, `proven`, `stale`, derived from clean runs (no deviations) in rehearsal and other
environments, replacing `exercise_status` and the "Record pack as exercised" click.
## Project specification and shared datapoints
```task
id: RBT-WP-0008-T05
status: wait
priority: high
```
`project.yaml`: environment class, shared non-secret datapoints provided as defaults to member runbooks, member
runbooks and ordering. Validator, and runs that belong to a project.
## Project state
```task
id: RBT-WP-0008-T06
status: wait
priority: medium
```
Derive `planned`, `applying`, `applied`, `stale` (later `drifted`) from each member's latest run at the current revision.
## Retry policy for non-idempotent steps
```task
id: RBT-WP-0008-T07
status: wait
priority: medium
```
Retrying a failed non-idempotent step requires the operator to confirm the earlier attempt did not partly apply.
## Acceptance Criteria
- "Exercised" has a precise, environment-aware meaning; a production project is never called "exercised".
- Maturity is derived from runs, bound to a revision, and expires when the pack changes.
- A value shared by several runbooks is entered once, in the project.