Scaffold, inspect, and validate Product Requirements Documents from the command line — six subcommands that write and check docs/PRD.md.
pks prd <command> [options]$ pks prd template MyProject --type webWrite a web-flavored PRD skeleton to docs/PRD.md
$ pks prd generate "A mobile app for task management"Scaffold a PRD from a one-line idea
$ pks prd validate --strictFail the build when the PRD skeleton is unfilled
$ pks prd statusShow section and requirement counts for the PRD
$ pks prd load docs/PRD.md --show-metadataParse a PRD file and print its structure
pks prd is the Product Requirements Document branch of the pks CLI: six subcommands that write a conventional PRD skeleton to docs/PRD.md, parse it back, and check that its sections are filled in. It is a document scaffolder and a structural linter — the writing itself stays yours.
The branch registers under pks prd and shares one settings class across every subcommand, so --verbose, --output-format, --config, and --no-color parse on all six. Two subcommands write files (template, generate), three read one (load, status, validate), and one lists requirements (requirements).
template emits a static Markdown archetype with bracketed placeholder prompts. generate does the same and seeds a few sections from words it finds in your idea sentence.load parses a Markdown or JSON PRD and prints project name, template, and section count.validate reports missing pieces and exits non-zero when the document fails, which makes it usable as a pre-commit or CI gate.Note. The branch description in the CLI says "AI-powered generation". No subcommand calls a language model.
generatematches keywords in your idea string;templatesubstitutes three placeholders into a fixed string. Treat this branch as scaffolding and structural checking, not authoring.
standard, technical, mobile, web, api, minimal, and enterprise, accepted case-insensitively by both template --type and generate --template.pks prd validate exits 1 when the document has errors, and --strict promotes a missing description and an empty requirements list from warnings to errors.load --export, status --export, validate --report, and requirements --export each write machine-readable output to a path you choose.status --check-all walks the current directory for PRD*.md, prd*.md, *requirements*.md, *spec*.md, and *.prd.json and tables what it finds.Everything centers on one file path. template and generate both default their output to ./docs/PRD.md, creating docs/ when it is missing. load, status, validate, and requirements all default their input to the same path, so a bare pks prd status in a repository root works with no arguments once a PRD exists.
The parser recognizes two shapes: a JSON PrdDocument, or Markdown whose first heading matches # <Name> - Product Requirements Document and whose sections are ## headings. The Markdown path extracts titles and sections but never populates a requirements array, which is why the numbers you see downstream are structural rather than semantic.
status, the requirement rows from requirements, and the clarity, consistency, and feasibility scores from validate.generate · template · load · validate · status · requirements
| Subcommand | What it does | Trust level |
|---|---|---|
template | Writes a static PRD skeleton for one of seven archetypes. | Deterministic. |
generate | Writes a PRD skeleton seeded from an idea sentence. | Keyword-driven, not AI. |
load | Parses a PRD file and prints a summary panel. | Structural facts only. |
validate | Reports completeness errors and exits non-zero on failure. | Structural checks only. |
status | Prints counts and a breakdown chart, or sweeps the tree. | Counts real, completion synthetic. |
requirements | Lists and filters requirements with CSV or JSON export. | Placeholder rows — see its page. |
Turn a one-line project idea into a docs/PRD.md skeleton with seeded sections, sample requirements, and canned user stories you then edit by hand.
pks prd generate "<IDEA_DESCRIPTION>" [options]
Parse a Markdown or JSON PRD file, print its project name, template and section count, and learn the exact heading conventions the parser expects.
pks prd load <FILE_PATH> [options]
Complete command, argument, flag, and exit-code reference for the pks prd branch — generate, template, load, validate, status, and requirements.
pks prd <command> [options]
Filter and export requirements from a PRD file — and the one known defect that makes its output placeholder rows rather than your document's content.
pks prd requirements [FILE_PATH] [options]
Print section and requirement counts for a PRD file, sweep a repository for every PRD-like document, or watch one file and re-render on change.
pks prd status [FILE_PATH] [options]
Write a static Markdown PRD skeleton for one of seven project archetypes, with the project name, author, and date substituted into the headings.
pks prd template <PROJECT_NAME> [options]
Run structural completeness checks over a PRD file, print errors, warnings and suggestions, and exit non-zero so CI can block an unfilled skeleton.
pks prd validate [FILE_PATH] [options]