Skip to content

Test that every flag in the docs exists in the CLI, and back #55

Closed

Description

@tmashara

What
A unit test that keeps the docs and the CLI in sync: every --flag named in README.md, docs/*.md and skills/**/*.md is accepted by the parser in cli.ts, and every flag the parser accepts is documented in the README usage table.

Why
Agents read these docs and run what they say. A renamed or removed flag in the docs fails a run with exit 2, and a new flag missing from the docs never gets used. testivai-oss guards this with contract tests (packages/playwright/__tests__/unit/readme-contract.spec.ts, action/src/__tests__/docs-links.test.ts).

How
Regex --[a-z][a-z-]+ over the markdown files, minus an allowlist for flags of other tools (npx playwright … --save-storage). Compare it with the parser's option list, exported from cli.ts if it isn't already. Optionally check that relative links in the docs resolve.

Activity

  1. added
    documentation
    on Oct 29, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    documentation

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions