okfreq CLI reference¶
okfreq creates and maintains the requirements subset. Commands accept either
a project root or a requirements-bundle root; bundle discovery finds
.agents/requirements/ or requirements/ where applicable.
okfreq COMMAND --help
Inspect and validate¶
Command |
Purpose |
|---|---|
|
Validate metadata, configuration, IDs, hierarchy, exemptions, derivation links, and optionally annotated file targets. Prose and skipped-root findings are advisory. |
`okfreq lint [PATH] [–prose] [–check-links] [–project-root DIR] [–check |
–diff]` |
|
Print the stable requirement ID index. |
|
Search IDs, titles, and descriptions. |
|
Print one requirement document. |
|
Print configured scope-to-source/test mappings as JSON. |
|
Show authored |
|
Scan configured source and test locations for markers. |
|
Print lifecycle counts and structural health. |
trace separates valid leaf coverage, unknown IDs, repeated markers in one
file, non-leaf markers, and scan warnings. Marker spellings and the ID regular
expression come from config.yml.
Every non-reserved Markdown document under tiers/ must have mapping
frontmatter and a non-empty string id. Missing or malformed documents fail
with their file path before indexing or reporting; they are never silently
omitted from requirement counts. Repair them rather than deleting them to
make validation pass. index.md, log.md, schemas and guidelines are excluded.
Check annotated file targets¶
okfreq init writes x-okf-link annotations into the generated requirement
schemas. The defaults include filename-stem links for requirement relationships,
project-relative links for generated source and test evidence, marker navigation
hints, requirement description hints for tooltips/previews, and line-number
hints for source/test markers. These presentation hints are advisory: okfreq
does not render the UI. Existing schemas are preserved and are not migrated.
Checking targets is deliberately opt-in:
okfreq validate . --check-links --project-root .
The --project-root option controls project-relative source and test paths.
Without it, the containing Git root of each requirement document is used. The
checker does not use the current working directory or an editor workspace as an
implicit root. Requirement relationships use case-sensitive Markdown filename
stems; source and test evidence uses exact project-relative paths. E10 reports
malformed annotations, missing exact files, root escapes, and ambiguous stems.
W15 reports a skipped check when a required root or filename-stem workspace is
unavailable. A missing stem in a known bundle is E10. Warnings do not make okfreq lint fail on their own.
Generated coverage and reports¶
Command |
Purpose |
|---|---|
`okfreq update-coverage [PATH] [–check |
–diff]` |
|
Generate a detailed JSON report and concise Markdown summary with SwRS source/test-link coverage, configured StRS test coverage, and combined leaf traceability coverage. StRS source coverage is not applicable. |
Without output options, the command writes JSON, JSON Schema and Markdown
under the resolved bundle’s parent directory in dist/ and prints their paths.
Use explicit output paths when reports must live in the project root’s dist/.
Generated artifacts should be regenerated rather than edited manually.
Lifecycle changes¶
Command |
Purpose |
|---|---|
|
Set the target lifecycle to |
|
Set the target to |
Lifecycle mutations require explicit --yes. They preserve the requirement
body, stable ID, UUID, and unrelated frontmatter.
See also¶
Configuration — hierarchy, scopes, markers, and generated fields.
Frontmatter — authored and generated field ownership.
Requirements traceability tutorial — end-to-end workflow.
Coverage boundaries — why test execution and pass/fail results are not parsed yet.