Repository navigation
Docs overhaul: tutorial, guides, generated reference, strict build - #57
Merged
Merged
Conversation
Every manifest shown in the new guides lives in docs/snippets and carries its own tests section, so the pages can include it instead of copying YAML that nobody runs. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
scripts/docs.py renders docs/reference/cli.md from the click command tree, manifest.md from the pydantic models and examples.md from examples/*.yaml. Its check mode fails when those pages are stale, and loads, compiles and tests every manifest in docs/snippets. New Makefile targets: docs-generate, docs-check, docs-build. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Replace the four-page site with Home, Installation, a Quickstart tutorial, thirteen task guides, the generated reference and project pages (changelog, contributing, migration notes, known issues). mkdocs.yaml gets an explicit nav, edit links, site_url, navigation tabs and strict mode with link and anchor validation. The git-committers plugin only runs in CI, so local builds no longer call the GitHub API. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
The examples gallery embeds examples/*.yaml at build time. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
examples/hello.yaml has no hello command; use python, which exists. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
A pipe inside a code span does not need escaping in a Markdown table; the backslash was rendered literally. Also say which environment cli load writes the launcher into. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
- mkdocs.yaml: the restructured nav, with the two reserved slots filled: "Blueprints and callbacks" (docs/blueprints.md) and "AI commands" (docs/ai.md) at the end of the guides. - docs/features.md: removed with the restructuring. Its AI section, which main had rewritten, moved to the new docs/ai.md. - scripts/docs.py: descriptions for the blueprint commands, the Callback model and examples/callbacks.yaml; anchors for aliases of subcommands. Notes that the merged fixes made untrue are corrected (exit code of `cli test`, `cli docs` for a loaded CLI, include paths, what `cli build` bundles and prints). - docs/reference/*.md regenerated from the merged code. - Guides, known issues and changelog: statements about behavior that the fixes branch changed are updated (Click backend, global params, include paths, test exit codes, builds), and the Click snippet no longer has to require rich-click. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
|
Sorry @jaykv, your pull request is larger than the review limit of 150,000 diff characters |
Contributor
|
Important Review skippedAuto reviews are disabled on base/target branches other than the default branch. Please check the settings in the CodeRabbit UI or the ⚙️ Run configuration
You can disable this status message by setting the Use the checkbox below for a quick retry:
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. Comment |
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Replaces the four-page docs site with a structured mkdocs-material site whose examples are run, not just written.
mkdocs build --strictpasses with zero warnings, andmake docs-checkloads, compiles and tests every manifest the guides show.Based on
chore/python-3.11-3.15. No library behaviour changes; the only edit undercliffy/is one line of thecli devdocstring.What changed
Site structure (
docs/,mkdocs.yaml)uv tool, extras, Python 3.11-3.15) and a Quickstart that builds anotesCLI in nine steps.mkdocs.yaml: explicit nav,site_url, edit links, navigation tabs/sections/footer,strict: truewith link and anchor validation. The git-committers plugin now runs only whenCIis set, so local builds no longer call the GitHub API.blueprints.mdandai.md. Neither file is created here, so the owning MRs add them without a conflict.docs/features.md,docs/getting-started.md,docs/schema.md.Docs that run (
docs/snippets/,scripts/docs.py,Makefile)docs/snippets/(11 files, 69 test cases) withpymdownx.snippetsinstead of copying YAML.scripts/docs.py generatewritesdocs/reference/cli.mdfrom the click command tree,manifest.mdfrom the pydantic models andexamples.mdfromexamples/*.yaml. It stops with a message when a new command, argument, model field or example has no description.scripts/docs.py checkfails if those pages are stale, if a snippet include points at a missing file, if the README example drifts from the tested snippet, or if a snippet manifest fails to load, compile or pass its tests.docs-generate,docs-check,docs-build.Other
README.mdtrimmed from 280 lines to an overview that links into the site..github/workflows/docs.yaml: also triggers onexamples/*.yaml, which the gallery embeds at build time.cliffy/cli.py: thecli devhelp example named ahellocommand thatexamples/hello.yamldoes not have; it now usespython.Things the old docs got wrong
Found by running every claim against the base branch:
cli init myclithencli load mycli.yaml(the old Getting Started) produces a CLI that fails to import.name: str = typer.Option(...)params lose thetyper.Option(...)part. The old home page, features page and README all used this form.global_paramsexample used a command without params, which raisesNameError.examples/todo.yamlno longer produces.features#ai-features,examples/), a Python 3.10 docs link, unprefixed AI model names, and the removed[dev]extra.The new pages recommend the forms that work. The bugs themselves are listed in
docs/project/known-issues.mdand under Unresolved.Breaking changes
/features/,/getting-started/and/schema/now 404. No redirects were added, because that needs a new docs dependency inpyproject.toml/uv.lock.strict: trueapplies to the deploy workflow too. A broken link, or a git-committers API error, now failsmkdocs gh-deploy.Deviations from the brief
repo_urlstayshttps://github.com/jaykv/cliffy, notcliffy-sh/cliffy.github.com/cliffy-sh/cliffyreturns a 301 tojaykv/cliffy, the API answers "Moved Permanently", andcliffy-sh.github.io/cliffyis a 404 whilejaykv.github.io/cliffyserves the site. This matchespyproject.tomlon the base branch. To flip it, changerepo_url,repo_name,site_urland the git-committersrepositoryinmkdocs.yaml, plus the links inREADME.mdandscripts/docs.py.docs-overhaul, notdocs/overhaul: a branch nameddocsalready exists, so git cannot createdocs/overhaul.docs/ai.mdstub. AI usage that is true on the base branch is in Installation and in the generated CLI reference.How verified
Run locally on macOS arm64 with uv 0.13.0, one environment per Python, synced with
uv sync --locked --all-extras --group docs:scripts/docs.pyis also ruff- and mypy-clean, although the Makefilelinttarget does not coverscripts/.mkdocs build --strictprints only the Material team's MkDocs 2.0 notice andINFOlines, thenDocumentation built in 0.70 seconds, exit 0.cli load/update/list/info/remove,cli dev(including recovery from a broken manifest),cli build(manifest and loaded CLI,--python),cli docs(md/rst/html),uv tool installanduvxwere exercised by hand on 3.13.🤖 Generated with Claude Code