Skip to content

docs: add missing command reference pages#114

Merged
djm81 merged 6 commits intodevfrom
feature/docs-09-missing-command-docs
Mar 27, 2026
Merged

docs: add missing command reference pages#114
djm81 merged 6 commits intodevfrom
feature/docs-09-missing-command-docs

Conversation

@djm81
Copy link
Copy Markdown
Contributor

@djm81 djm81 commented Mar 27, 2026

Summary

  • add missing deep-dive command docs for spec, govern, code-review, and codebase bundles
  • add docs coverage tests and update overview pages to link to the new references
  • record OpenSpec spec/tasks/TDD evidence for docs-09

Validation

  • hatch run format
  • hatch run type-check
  • hatch run lint
  • hatch run yaml-lint
  • hatch run verify-modules-signature --require-signature --payload-from-filesystem --enforce-version-bump
  • hatch run contract-test
  • hatch run smart-test
  • hatch run test
  • bundle exec jekyll build --destination ../_site
  • specfact code review run tests/unit/docs/test_missing_command_docs.py

@chatgpt-codex-connector
Copy link
Copy Markdown

You have reached your Codex usage limits for code reviews. You can see your limits in the Codex usage dashboard.
To continue using code reviews, you can upgrade your account or add credits to your account and enable them for code reviews in your settings.

@coderabbitai
Copy link
Copy Markdown

coderabbitai bot commented Mar 27, 2026

Caution

Review failed

Pull request was closed or merged during review

Note

Reviews paused

It looks like this branch is under active development. To avoid overwhelming you with review comments due to an influx of new commits, CodeRabbit has automatically paused this review. You can configure this behavior by changing the reviews.auto_review.auto_pause_after_reviewed_commits setting.

Use the following commands to manage reviews:

  • @coderabbitai resume to resume automatic reviews.
  • @coderabbitai review to trigger a single review.

Use the checkboxes below for quick actions:

  • ▶️ Resume reviews
  • 🔍 Trigger review

No actionable comments were generated in the recent review. 🎉

ℹ️ Recent review info
⚙️ Run configuration

Configuration used: Organization UI

Review profile: ASSERTIVE

Plan: Pro

Run ID: a9a933dd-d82f-450e-8da0-ad2cf04fb298

📥 Commits

Reviewing files that changed from the base of the PR and between 0805801 and 29c31d9.

📒 Files selected for processing (1)
  • docs/bundles/govern/enforce.md

📝 Walkthrough

Summary by CodeRabbit

  • Documentation
    • Added many new command reference and how‑to pages across Code Review (run, ledger, rules), Codebase (analyze, drift, repro), Govern (enforce, patch), and Spec (validate, generate-tests, mock) bundles; updated overviews/see‑also links, added a spec for doc requirements and TDD evidence.
  • Tests
    • Added tests verifying docs/front‑matter/examples/links and improved test logic for validating bundle overview CLI examples.

Walkthrough

Adds many new command-reference documentation pages across Code Review, Codebase, Spec, and Govern bundles; updates bundle overviews to link to those deep dives; and introduces tests, an OpenSpec, TDD evidence, and completed task entries validating the new docs.

Changes

Cohort / File(s) Summary
Code Review Bundle
docs/bundles/code-review/run.md, docs/bundles/code-review/ledger.md, docs/bundles/code-review/rules.md, docs/bundles/code-review/overview.md
Added deep-dive command reference pages for specfact code review (run, ledger, rules) documenting subcommands, flags, examples; updated overview to link to new pages.
Codebase Bundle
docs/bundles/codebase/analyze.md, docs/bundles/codebase/drift.md, docs/bundles/codebase/repro.md, docs/bundles/codebase/overview.md
Added analyze, drift, and repro command reference pages with options, outputs, examples; updated overview to include deep-dive links.
Spec Bundle
docs/bundles/spec/validate.md, docs/bundles/spec/generate-tests.md, docs/bundles/spec/mock.md, docs/bundles/spec/overview.md
Added validate, generate-tests, and mock pages and restructured the Spec overview to reflect the new top-level spec command surface and related links.
Govern Bundle
docs/bundles/govern/enforce.md, docs/bundles/govern/patch.md, docs/bundles/govern/overview.md
Added enforce and patch command pages (presets, SDD validation, patch apply flow) and updated overview to link to these subpages.
Docs Quality & Tests
tests/unit/docs/test_missing_command_docs.py, tests/unit/docs/test_bundle_overview_cli_examples.py, openspec/specs/missing-command-docs/spec.md, openspec/changes/docs-09-missing-command-docs/TDD_EVIDENCE.md, openspec/changes/docs-09-missing-command-docs/tasks.md
Added unit tests asserting presence and content of new command docs, an OpenSpec describing documentation requirements, TDD evidence file, completed task checklist updates; refactored test helper and routing behavior in test_bundle_overview_cli_examples.py.

Estimated code review effort

🎯 3 (Moderate) | ⏱️ ~20 minutes

Possibly related issues

Possibly related PRs

Suggested labels

openspec

🚥 Pre-merge checks | ✅ 2 | ❌ 1

❌ Failed checks (1 warning)

Check name Status Explanation Resolution
Docstring Coverage ⚠️ Warning Docstring coverage is 25.00% which is insufficient. The required threshold is 80.00%. Write docstrings for the functions missing them to satisfy the coverage threshold.
✅ Passed checks (2 passed)
Check name Status Explanation
Title check ✅ Passed The title 'docs: add missing command reference pages' directly and concisely describes the main change: adding documentation pages for missing command references across multiple bundles.
Description check ✅ Passed The description covers key changes (deep-dive docs, test coverage, OpenSpec records) and provides comprehensive validation evidence including local gates and Jekyll build verification, though it omits bundle impact version details and doesn't fully align with the template structure.

✏️ Tip: You can configure your own custom pre-merge checks in the settings.

✨ Finishing Touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Commit unit tests in branch feature/docs-09-missing-command-docs

Comment @coderabbitai help to get the list of available commands and usage tips.

@djm81 djm81 self-assigned this Mar 27, 2026
@djm81 djm81 added documentation Improvements or additions to documentation enhancement New feature or request labels Mar 27, 2026
@djm81 djm81 moved this from Todo to In Progress in SpecFact CLI Mar 27, 2026
Copy link
Copy Markdown

@coderabbitai coderabbitai bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Actionable comments posted: 7

🤖 Prompt for all review comments with AI agents
Verify each finding against the current code and only fix it if needed.

Inline comments:
In `@docs/bundles/code-review/run.md`:
- Line 22: The table row containing the option string `--scope changed|full` is
being parsed as extra Markdown columns; update the cell value for the `--scope
changed|full` entry (the exact token `--scope changed|full`) so the pipe is
escaped (e.g., `\|`) within the code span or otherwise escape the pipe character
in that table cell to restore valid table rendering.

In `@docs/bundles/codebase/drift.md`:
- Line 23: The table cell containing the option literal --format
<table|json|yaml> uses raw pipe characters which break the Markdown table;
update that cell to escape the pipes (e.g., replace | with \| or HTML entity
&#124;) so the literal remains a single cell; locate the occurrence of the
--format option in drift.md and apply the escaping to the <table|json|yaml>
part.

In `@docs/bundles/govern/enforce.md`:
- Around line 25-42: Table cells contain raw pipe characters inside option
literals like `--preset <minimal|balanced|strict>` and `--output-format
<yaml|json|markdown>` which can break Markdown tables; update these literals to
escape the pipes (e.g., change `|` to `\|` inside the backticks) so they render
as a single cell (e.g., `--preset <minimal\|balanced\|strict>` and
`--output-format <yaml\|json\|markdown>`), leaving surrounding text and examples
unchanged.

In `@docs/bundles/spec/generate-tests.md`:
- Around line 12-17: overview.md incorrectly documents commands under a
non-existent "specfact spec api" subgroup; update docs/bundles/spec/overview.md
to list the commands (validate, backward-compat, generate-tests, mock) directly
under "specfact spec" to match the actual CLI registration (e.g., the correct
command shown in generate-tests.md is "specfact spec generate-tests"); remove
the "api" subgroup heading/mentions and ensure each command entry uses the
"specfact spec <command>" form so the docs align with the code.

In `@docs/bundles/spec/mock.md`:
- Around line 12-17: The docs show a mismatch: the spec overview documents
commands under the "specfact spec api" subgroup but the implementation/registers
the command as "specfact spec mock" (the identity strings 'specfact spec mock'
and 'specfact spec api' appear in the diff); fix by making them
consistent—either update the CLI registration to register the mock commands
under the "api" subgroup (rename the command registration from 'spec mock' to
'spec api mock' or add an alias) or update the documentation to reference
'specfact spec mock' everywhere; ensure you change all occurrences of the
command string used in the command registry (the code that defines the command
name/aliases) and the docs (the spec overview text) so both match exactly.

In `@docs/bundles/spec/validate.md`:
- Around line 57-59: The relative links on the validate.md page point to
subpaths under /bundles/spec/validate/ instead of the intended /bundles/spec/;
update each link (the "Spec bundle overview", "Generate Specmatic tests", and
"Run a mock server" list items) to use parent-relative paths (e.g. ../overview/,
../generate-tests/, ../mock/) or absolute paths (e.g. /bundles/spec/overview/)
so they resolve correctly from the page permalink /bundles/spec/validate/.

In `@openspec/specs/missing-command-docs/spec.md`:
- Around line 1-31: The markdown headings (e.g., "## ADDED Requirements", "###
Requirement: Missing command reference pages SHALL document the implemented
command surface", and each "#### Scenario:" heading) need a blank line
immediately after them to follow project markdown conventions; update spec.md so
there is an empty line after each heading line (including the top-level "##",
the "### Requirement:" block header, and every "#### Scenario:" header) so that
subsequent paragraph text or list items start on their own paragraph lines and
the lists render correctly.
🪄 Autofix (Beta)

Fix all unresolved CodeRabbit comments on this PR:

  • Push a commit to this branch (recommended)
  • Create a new PR with the fixes

ℹ️ Review info
⚙️ Run configuration

Configuration used: Organization UI

Review profile: ASSERTIVE

Plan: Pro

Run ID: 7858d74d-1432-437d-99fa-3548a8842b8c

📥 Commits

Reviewing files that changed from the base of the PR and between 4bea73e and a45934f.

📒 Files selected for processing (19)
  • docs/bundles/code-review/ledger.md
  • docs/bundles/code-review/overview.md
  • docs/bundles/code-review/rules.md
  • docs/bundles/code-review/run.md
  • docs/bundles/codebase/analyze.md
  • docs/bundles/codebase/drift.md
  • docs/bundles/codebase/overview.md
  • docs/bundles/codebase/repro.md
  • docs/bundles/govern/enforce.md
  • docs/bundles/govern/overview.md
  • docs/bundles/govern/patch.md
  • docs/bundles/spec/generate-tests.md
  • docs/bundles/spec/mock.md
  • docs/bundles/spec/overview.md
  • docs/bundles/spec/validate.md
  • openspec/changes/docs-09-missing-command-docs/TDD_EVIDENCE.md
  • openspec/changes/docs-09-missing-command-docs/tasks.md
  • openspec/specs/missing-command-docs/spec.md
  • tests/unit/docs/test_missing_command_docs.py

Copy link
Copy Markdown

@coderabbitai coderabbitai bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Actionable comments posted: 3

♻️ Duplicate comments (1)
docs/bundles/govern/enforce.md (1)

60-61: ⚠️ Potential issue | 🟠 Major

Related links are path-broken from this page URL.

On Line 60 and Line 61, these relative links are nested under /bundles/govern/enforce/. They should target sibling pages under /bundles/govern/.

🔗 Proposed fix
-- [Govern patch](patch/)
-- [Govern bundle overview](overview/)
+- [Govern patch](/bundles/govern/patch/)
+- [Govern bundle overview](/bundles/govern/overview/)
🤖 Prompt for AI Agents
Verify each finding against the current code and only fix it if needed.

In `@docs/bundles/govern/enforce.md` around lines 60 - 61, The two relative links
"[Govern patch](patch/)" and "[Govern bundle overview](overview/)" are resolving
under /bundles/govern/enforce/ and should point to sibling pages under
/bundles/govern/; update those link targets to reference the sibling paths (for
example change to "../patch/" and "../overview/" or absolute
"/bundles/govern/patch/" and "/bundles/govern/overview/") so they resolve
correctly from the enforce page.
🤖 Prompt for all review comments with AI agents
Verify each finding against the current code and only fix it if needed.

Inline comments:
In `@docs/bundles/code-review/run.md`:
- Around line 49-51: Update the child-relative links "ledger/" and "rules/" so
they point to the sibling pages under the code-review bundle (use
parent-relative "../ledger/" and "../rules/" or absolute
"/bundles/code-review/ledger/" and "/bundles/code-review/rules/"); modify the
link targets in the document where "ledger/" and "rules/" appear and leave the
existing "../../modules/code-review/" link unchanged.

In `@docs/bundles/codebase/drift.md`:
- Around line 42-43: The two markdown links "Code analyze contracts" and "Code
repro" use relative paths ("analyze/" and "repro/") that resolve under the
current nested permalink; update those link targets to parent-relative or
absolute paths so they point to the intended pages (for example change
"analyze/" and "repro/" to "../analyze/" and "../repro/" or to their absolute
equivalents) ensuring the link texts remain the same.

In `@docs/bundles/spec/overview.md`:
- Around line 72-74: The "See-also" links (targets validate/, generate-tests/,
mock/) resolve one level too deep because they are relative to the current
overview folder; update those link targets to point to the sibling pages (e.g.,
change validate/ → ../validate/, generate-tests/ → ../generate-tests/, mock/ →
../mock/) so the links resolve to the intended sibling pages rather than nested
paths.

---

Duplicate comments:
In `@docs/bundles/govern/enforce.md`:
- Around line 60-61: The two relative links "[Govern patch](patch/)" and
"[Govern bundle overview](overview/)" are resolving under
/bundles/govern/enforce/ and should point to sibling pages under
/bundles/govern/; update those link targets to reference the sibling paths (for
example change to "../patch/" and "../overview/" or absolute
"/bundles/govern/patch/" and "/bundles/govern/overview/") so they resolve
correctly from the enforce page.
🪄 Autofix (Beta)

Fix all unresolved CodeRabbit comments on this PR:

  • Push a commit to this branch (recommended)
  • Create a new PR with the fixes

ℹ️ Review info
⚙️ Run configuration

Configuration used: Organization UI

Review profile: ASSERTIVE

Plan: Pro

Run ID: 07f3f66f-7600-4be9-bdb2-5298fc0b09d7

📥 Commits

Reviewing files that changed from the base of the PR and between a45934f and 1779ffd.

📒 Files selected for processing (6)
  • docs/bundles/code-review/run.md
  • docs/bundles/codebase/drift.md
  • docs/bundles/govern/enforce.md
  • docs/bundles/spec/overview.md
  • docs/bundles/spec/validate.md
  • openspec/specs/missing-command-docs/spec.md

Copy link
Copy Markdown

@coderabbitai coderabbitai bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Actionable comments posted: 1

🤖 Prompt for all review comments with AI agents
Verify each finding against the current code and only fix it if needed.

Inline comments:
In `@docs/bundles/govern/enforce.md`:
- Line 35: Update the section heading `## \`specfact govern enforce sdd\`` to
match the documented command signature and examples by changing it to `##
\`specfact govern enforce sdd [BUNDLE]\``, so the heading aligns with Line 17
and the usage examples; locate the heading text in enforce.md and replace it
accordingly.
🪄 Autofix (Beta)

Fix all unresolved CodeRabbit comments on this PR:

  • Push a commit to this branch (recommended)
  • Create a new PR with the fixes

ℹ️ Review info
⚙️ Run configuration

Configuration used: Organization UI

Review profile: ASSERTIVE

Plan: Pro

Run ID: c32f8f3a-3795-4fd3-b02a-52072a6d53d4

📥 Commits

Reviewing files that changed from the base of the PR and between 7d05c2f and 0805801.

📒 Files selected for processing (4)
  • docs/bundles/code-review/run.md
  • docs/bundles/codebase/drift.md
  • docs/bundles/govern/enforce.md
  • docs/bundles/spec/overview.md

@djm81 djm81 merged commit 1ef18ab into dev Mar 27, 2026
9 of 10 checks passed
@github-project-automation github-project-automation bot moved this from In Progress to Done in SpecFact CLI Mar 27, 2026
This was referenced Mar 27, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

documentation Improvements or additions to documentation enhancement New feature or request

Projects

Status: Done

Development

Successfully merging this pull request may close these issues.

docs-09: Write Missing Command Docs For Spec, Govern, Code-Review, Codebase

1 participant