harn docs
harn docsharn docs meta <path> [key] [--json]harn docs frontmatter-migrate [--repo <name>] [--yes]harn docs lint [--fast] [--repo <name>]harn docs sweep [--repo <name>]harn docs index [--dry-run] [--repo <name>]The docs command group gives an embedding host one documentation maintenance
surface. The host supplies its repository root, submodule list, exclusions, and
any project-specific root allowlist through HarneryProgramContext.
Read frontmatter
Section titled “Read frontmatter”docs meta reads a markdown file’s leading YAML block:
harn docs meta docs/plans/cache-redesign.md# {"status":"in-progress","date":"2026-07-13","tags":["cache"]}
harn docs meta docs/plans/cache-redesign.md status# in-progressRelative paths resolve from the configured repository root. Absolute paths also
work. The command exits nonzero when the file, frontmatter block, or requested
top-level key is missing. A requested scalar prints plainly in an interactive
terminal; piped output and --json use JSON.
Migrate lifecycle files
Section titled “Migrate lifecycle files”docs frontmatter-migrate converts recognized opening bold fields in
docs/plans, docs/issues, and docs/handoffs into leading YAML frontmatter.
It scans archives too. The default is a dry-run:
harn docs frontmatter-migrate --repo .harn docs frontmatter-migrate --repo . --yesThe converter leaves narrative bold labels and body examples alone, merges into
existing frontmatter that has no status, and skips files that already carry
YAML status:. Unsupported status values and conflicting fields are errors; the
command exits nonzero without guessing or writing any file. --yes is the only
mode that writes, and the apply is all-or-nothing for the selected repository set.
Other subcommands
Section titled “Other subcommands”docs lintchecks directory layout, filenames, and lifecycle status.--fastskips content checks for pre-commit use.docs sweepreports stalled plans, cold issues and handoffs, stale topic docs, and unverified runbooks.docs indexrebuilds marker-delimited audit and issue index tables.- Bare
docsreports markdown freshness from Git history.
Lint, sweep, and index read lifecycle status: only from leading YAML
frontmatter. Legacy **Status:** lines are accepted only as input to the
explicit docs frontmatter-migrate conversion command.