Johan Alphonso Braga
WorkProjectsReadingStackCraftDesignStatusResume

Utilities

Ask anything

Elsewhere

GitHub

All projects

Tools / 2026 / Runs natively

Workflow CLI Kit

A dependency-free CLI that scaffolds a runbook from a project's own package.json and checks READMEs and runbooks by their real headings, with a score and a CI gate.

Workflow CLI Kit

01

The problem

Doc checks that search text for ## Run pass a README whose only Run heading sits inside a code example, fail one that says Usage, and pass a heading with nothing under it. Runbook templates list npm run dev whether or not the project has that script.

02

How I approached it

Headings are parsed the CommonMark way: ATX headings with up to three leading spaces and optional closing hashes, setext headings, and nothing inside fenced or indented code. Required sections accept the names READMEs use (Usage, Installation, Testing, Layout, from the standard-readme spec and common templates), and a section counts only when something sits under it. The scaffolder picks the package manager from the lockfile or Corepack's packageManager field, writes each tool's lockfile-exact install command (npm ci, pnpm install --frozen-lockfile, yarn install --immutable or --frozen-lockfile for Yarn 1), lists only scripts that exist, and takes the node version from engines or .nvmrc.

03

The outcome

19 tests cover fenced, tilde and indented code, setext headings, aliases, empty sections, CRLF files, each package manager and a broken package.json. The repo's own runbook failed its linter before this and passes now, with a test that keeps it that way. CI runs on Node 20, 22 and 24.

Next projectAutopilot Ops →