runbook-tutorials/workplans/RBT-WP-0002-runbook-pack-spec-and-validator.md
tegwick cdbd61d4a2
All checks were successful
CI Smoke / host-smoke (push) Successful in 1s
CI Smoke / container-smoke (push) Successful in 2s
Work Records / validate (push) Successful in 13s
Sync consistency output
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 00:25:09 +02:00

79 lines
2.2 KiB
Markdown

---
id: RBT-WP-0002
type: workplan
title: "Runbook pack specification and validator"
domain: infotech
repo: runbook-tutorials
status: active
flavor: implementation
owner: claude
topic_slug: stack
created: "2026-09-29"
updated: "2026-09-29"
state_hub_workstream_id: "f72323f4-4ef8-5bcd-9662-09df1c20290e"
---
## Goal
Define what a runbook pack is, so packs can live in the repos that own them and
the engine can load, validate and present them. The pack spec is the contract
between this repo and every pack owner.
## Publish the pack specification
```task
id: RBT-WP-0002-T01
status: done
priority: high
state_hub_task_id: "f9e466d2-9fd1-502e-b2b8-e737068c12d2"
```
`docs/pack-spec.md` v0.1: manifest fields, parameters (never secret), steps with
mandatory verification, rollback for state-changing steps, exercise status per the
attended-procedure standard, and the legacy-command engine.
## Encode the specification as a JSON Schema
```task
id: RBT-WP-0002-T02
status: done
priority: high
state_hub_task_id: "84c0496f-57c1-547a-b831-f4a20b75c0e9"
```
`schema/runbook-pack.schema.json` with conditional requirements per engine.
## Implement discovery, validation and rendering
```task
id: RBT-WP-0002-T03
status: done
priority: high
state_hub_task_id: "2760f95a-5016-5a2e-b25c-b8b67847061c"
```
`rtut/pack.py` and the CLI (`python -m rtut list|validate|show|render`), with
semantic checks the schema cannot express (placeholders, duplicates, rollback,
secret markers, parameter defaults) and 16 tests. Parameter rendering rejects
unsafe characters.
## Review the specification with the operator and freeze v0.1
```task
id: RBT-WP-0002-T04
status: todo
priority: high
state_hub_task_id: "1e1bdfdd-2482-5280-a870-5d823dfa1d34"
```
Walk through the spec with Bernd against the real NetKingdom packs and the
legacy console. Open questions: step branching and conditional steps; whether
`verify` may run a command automatically; how packs declare dependencies on
other packs; signed packs. Record decisions and freeze `runbook-pack/v0.1`, or
raise v0.2 with a migration note.
## Acceptance Criteria
- Every pack in this repo and in `net-kingdom` validates.
- Invalid packs fail with a clear error; tests cover each rule.
- The spec names how the pre-existing console stays working.