Skip to main content

skillsaw plugin: lint operational runbooks as agent content

Project description

skillsaw-runbooks

A skillsaw plugin that lints operational runbooks as agent content. Runbooks are step-by-step procedures executed under pressure — increasingly by AI agents as well as on-call engineers — so they deserve the same lint coverage as any other instruction file.

This plugin also serves as a complete, published example of every skillsaw plugin extension point: rules, a custom repository type with content paths, a lint tree contributor, and a plugin CLI.

What it does

When a repository has markdown files under runbooks/, the plugin:

  • detects the runbook repository type, which activates the rules below and pulls runbooks/**/*.md into skillsaw's content linting (so every builtin content-* rule covers your runbooks too);
  • attaches runbooks/catalog.json (if present) to the lint tree so the catalog rule can check it.

Rules

Rule Default severity Checks
runbook-required-sections warning Every runbook has the required headings (default: Steps, Rollback)
runbook-frontmatter warning Every runbook has YAML frontmatter with the required fields (default: title, owner)
runbook-catalog warning runbooks/catalog.json, when present, lists every runbook and only runbooks that exist

A passing runbook:

---
title: Database failover to the replica
owner: storage-team
---

# Database failover

## Steps

1. Freeze writes ...

## Rollback

Repeat with the old primary as the candidate ...

A failing one — no owner, no Rollback section:

---
title: Flush the Redis cache
---

# Cache flush

## Steps

1. redis-cli --scan --pattern 'rates:*' | xargs redis-cli del
$ skillsaw lint
⚠ WARNING (runbook-required-sections) [runbooks/cache-flush.md]: Runbook is missing a 'Rollback' section
⚠ WARNING (runbook-frontmatter) [runbooks/cache-flush.md]: Runbook frontmatter is missing 'owner'

Catalog

Optionally keep an index of your runbooks in runbooks/catalog.json:

{
    "runbooks": [
        "db-failover.md",
        "cache-flush.md"
    ]
}

Paths are relative to runbooks/. The runbook-catalog rule warns when a runbook on disk is missing from the catalog or a catalog entry has no file. Without a catalog file the rule stays quiet — it is opt-in by presence.

Install

$ pip install skillsaw-runbooks
$ skillsaw lint

That's it — skillsaw discovers the plugin automatically. Requires a skillsaw new enough to support plugins (>= 0.15).

CLI

The plugin ships a small companion CLI, dispatched through skillsaw:

$ skillsaw runbooks list
runbooks/db-failover.md: Database failover to the replica — storage-team
runbooks/cache-flush.md: Flush the Redis cache — (no owner)

$ skillsaw runbooks rules
runbook-required-sections — Runbooks must contain the required sections (default: Steps, Rollback)
...

Configuration

Configure rules by ID in .skillsaw.yaml, like any builtin rule:

rules:
  runbook-required-sections:
    severity: error
    sections: ["Steps", "Rollback", "Verification"]
  runbook-frontmatter:
    fields: ["title", "owner", "last-reviewed"]

Disable a single rule, the whole plugin, or all plugins:

rules:
  runbook-catalog:
    enabled: false
plugins:
  disable: [runbooks]
$ skillsaw lint --no-plugins

Development

$ python -m venv .venv
$ .venv/bin/pip install -e '.[dev]'
$ .venv/bin/pytest

To develop against an unreleased skillsaw, install it first: .venv/bin/pip install -e ../skillsaw.

License

Apache-2.0

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

skillsaw_runbooks-0.1.0.tar.gz (13.8 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

skillsaw_runbooks-0.1.0-py3-none-any.whl (12.2 kB view details)

Uploaded Python 3

File details

Details for the file skillsaw_runbooks-0.1.0.tar.gz.

File metadata

  • Download URL: skillsaw_runbooks-0.1.0.tar.gz
  • Upload date:
  • Size: 13.8 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/6.1.0 CPython/3.13.12

File hashes

Hashes for skillsaw_runbooks-0.1.0.tar.gz
Algorithm Hash digest
SHA256 c427057b11060dcadd5b0b63fbec1defb20e1b2e9e32cceb307736ba48caac69
MD5 3f1ecd21ec92a4ce37eb7541e3accc79
BLAKE2b-256 08ebb7b9ab004e2f6c68268e1ca34f20a507c0d791396e6609d8cb4cfa99d8df

See more details on using hashes here.

Provenance

The following attestation bundles were made for skillsaw_runbooks-0.1.0.tar.gz:

Publisher: release.yml on stbenjam/skillsaw-runbooks

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

File details

Details for the file skillsaw_runbooks-0.1.0-py3-none-any.whl.

File metadata

File hashes

Hashes for skillsaw_runbooks-0.1.0-py3-none-any.whl
Algorithm Hash digest
SHA256 22be829cadd33329489fb469cc55eb98a76df1c5dbd466fe6ed9b88058d64295
MD5 da16d67ff77c7e78d1c55d560cae315f
BLAKE2b-256 06e3b677923bccf883d97043df669003ea1d26cc94e67e0b44949ddb39bccc0b

See more details on using hashes here.

Provenance

The following attestation bundles were made for skillsaw_runbooks-0.1.0-py3-none-any.whl:

Publisher: release.yml on stbenjam/skillsaw-runbooks

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page