generate-docs-from-source
Installation
SKILL.md
Generate Docs from Source
Build documentation from evidence in the repository, not assumptions. Produce a navigable Markdown tree that DocsPress can convert into WordPress Pages, then hand publication setup to $docspress-install.
1. Establish the source of truth
- Resolve the repository root and preserve unrelated working-tree changes.
- Inventory the project with
rg --files. Inspect package manifests, lockfiles, entrypoints, exports, command definitions, schemas, environment examples, tests, examples, release configuration, and existing docs. - Identify the intended audience and supported public surface from repository evidence.
- Determine whether the project currently supports multiple API releases. Require explicit evidence such as maintained release branches, versioned schemas, compatibility tests, or existing versioned docs; do not treat package history as a reason to publish old documentation.
- Build an internal coverage map before writing:
- installation commands → package manifests and lockfiles;
- configuration and environment variables → schemas, defaults, and code reads;
- API signatures → exported source and type declarations;
- CLI commands and flags → parser definitions and help output;
- behavior and edge cases → tests;
- operational steps → scripts and CI workflows.
- Treat tests and executable examples as stronger evidence than comments. Mark contradictions for resolution instead of choosing silently.