Skip to content

feat: zeeker runbook — generate an operational RUNBOOK.md for data projects - #11

Merged
houfu merged 1 commit into
mainfrom
claude/runbook-generator
Jul 16, 2026
Merged

feat: zeeker runbook — generate an operational RUNBOOK.md for data projects#11
houfu merged 1 commit into
mainfrom
claude/runbook-generator

Conversation

@houfu

@houfu houfu commented Jul 16, 2026

Copy link
Copy Markdown
Collaborator

Stacked PR — based on claude/status-contract (#10). Merge order: #9#10 → this. GitHub retargets automatically as base branches merge and are deleted.

What

New zeeker runbook command (--output PATH, --force) that generates RUNBOOK.md — the operational document humans and AI monitoring agents read to run, monitor, and interpret builds of a data project.

The generated file has two kinds of content:

Auto-generated facts from zeeker.toml and this zeeker version:

  • project/database names, resource table (fragments, fragments_on_skip, FTS fields, facets, sort, etc.)
  • the standard command reference (build, --sync-from-s3, --setup-fts, --json, --progress-file, --fail-on-blocked, deploy)
  • the 0.9.0 status contract baked in verbatim: exit codes 0/1/2, the non-TTY line grammar ([OK]/[FAIL]/[SKIP], [SKIP] name <reason> (kind), WARN[resource]:/WARN[build]:, the SUMMARY footer with counters), the skip-kind table with _zeeker_updates freshness semantics and monitor guidance, __zeeker_report__ counter semantics, and the full --json/--progress-file payload field tables

Six TODO placeholder sections (<!-- TODO: fill in --> + hint blockquotes) for per-project content: run narrative, environment variables, cadence & expected yield, failure modes & recovery, backlog/progress SQL, escalation.

Refuses to overwrite without --force (which replaces the entire file — documented, with a --output RUNBOOK.new.md + manual-merge recipe for refreshing facts). Version-stamped header makes template drift visible.

Tests

14 new CliRunner tests (generation, flag rendering, overwrite policy, outside-project error, exact status-contract grammar strings). Full suite: 461 passed, 5 pre-existing skips.

Note

The status-contract text is a maintained copy inside runbook.py, not runtime introspection — if the line grammar changes in a future version, update the template in step (the header version stamp exposes drift).

The five Bucket-4 adoption PRs each contain a RUNBOOK.md generated by this command and hand-filled.

🤖 Generated with Claude Code

https://claude.ai/code/session_01Cuh5eJDfVowgpp22s7siE1


Generated by Claude Code

New CLI command that generates the operational document humans and AI
monitoring agents read to run, monitor, and interpret builds:

- zeeker/commands/runbook.py — modular command following the existing
  commands/ style; requires a zeeker project (clean error + exit 1
  outside one); writes RUNBOOK.md (--output PATH; refuses to overwrite
  without --force).
- Auto-generated facts: project/database names and rich metadata from
  zeeker.toml, per-resource table (description, fragments,
  fragments_on_skip, FTS fields) plus detail bullets (facets, sort,
  size, ...), the standard build/deploy command reference, and the
  0.9.0 status contract baked in verbatim: exit codes 0/1/2, the
  non-TTY line grammar ([OK]/[FAIL]/[SKIP], WARN[resource]:/WARN[build]:,
  SUMMARY footer with extra_counts), Skip kinds
  (up_to_date/blocked/disabled) with monitor guidance,
  __zeeker_report__ enrichment counters, and the full --json /
  --progress-file payload field list.
- Six TODO placeholder sections marked "<!-- TODO: fill in -->" for
  per-project content (run narrative, env vars, cadence & yield,
  failure modes & recovery, backlog SQL, escalation).
- Regeneration policy documented in the file header: --force
  overwrites the ENTIRE file, nothing is preserved.
- Tests: packages/zeeker/tests/test_runbook.py (14 CliRunner tests)
  covering generation, overwrite protection, outside-project error,
  and the status-contract grammar strings.
- CLAUDE.md command list updated. No version bump (rides 0.9.0).

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01Cuh5eJDfVowgpp22s7siE1
Base automatically changed from claude/status-contract to main July 16, 2026 15:24
@houfu
houfu merged commit b6cf081 into main Jul 16, 2026
2 checks passed
@houfu
houfu deleted the claude/runbook-generator branch July 16, 2026 15:25
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants