Skip to content

docs: publish llms.txt index - #1272

Merged
jdx merged 2 commits into
mainfrom
docs/llms-txt
Aug 27, 2026
Merged

jdx merged 2 commits into
mainfrom
docs/llms-txt

Conversation

@jdx

@jdx jdx commented Aug 27, 2026 •

Copy link
Copy Markdown
Owner

Summary

  • generate docs/public/llms.txt from the VitePress sidebar and page introductions
  • share the sidebar between VitePress and the generator
  • integrate generation with mise run render and publish it through the existing docs build

Implements the request in Discussion #1271.

Testing

  • mise run render (run twice; second run produced no diff)
  • mise run docs:build
  • verified docs/.vitepress/dist/llms.txt matches docs/public/llms.txt
  • PATH="$PWD/target/debug:$PATH" mise x shellcheck@0.11.0 -- target/debug/hk check --all

AI-assisted β€” Tool: Codex; model: openai/gpt-5; version: unavailable.


Note

Low Risk
Docs-only tooling and static asset generation; no runtime or security-sensitive code paths.

Overview
Adds a machine-readable llms.txt index at https://hk.jdx.dev/llms.txt so coding agents can discover hk docs with short blurbs per page.

Sidebar is moved from config.mts into shared sidebar.ts (still driven by commands.json for CLI pages). VitePress imports that module; a new llms.ts script walks the same tree, maps links to Markdown, pulls the first prose paragraph after each H1 (with stripping/truncation), and writes docs/public/llms.txt. Generation is wired as mise run render:llms (depends on render:usage) so it runs with the rest of render; the committed file ships via VitePress public/. docs/package.json sets "type": "module" for the JSON import attribute in sidebar.ts.

Reviewed by Cursor Bugbot for commit 511f51c. Bugbot is set up for automated code reviews on this repo. Configure here.

Summary by CodeRabbit

  • New Features

    • Added a plain-text llms.txt documentation index covering guides, configuration, CLI commands, reference material, and project documentation.
    • Added automatic generation of the index with organized sections, page links, and descriptions.
    • Updated the documentation sidebar to dynamically include available CLI commands while excluding hidden subcommands.
  • Chores

    • Configured the documentation package for modern module support.
    • Added a task for regenerating the documentation index.

@coderabbitai

coderabbitai Bot commented Aug 27, 2026 •

Copy link
Copy Markdown
Contributor

Review Change Stack

No actionable comments were generated in the recent review. πŸŽ‰

ℹ️ Recent review info
βš™οΈ Run configuration

Configuration used: Repository YAML (base), Central YAML (inherited), Organization UI (inherited)

Review profile: CHILL

Plan: Pro Plus

Run ID: 162bb3bc-7f48-4ccb-9fa1-26d1e7108510

πŸ“₯ Commits

Reviewing files that changed from the base of the PR and between 69b18f0 and 511f51c.

πŸ“’ Files selected for processing (3)
  • docs/.vitepress/llms.ts
  • docs/.vitepress/sidebar.ts
  • docs/public/llms.txt
🚧 Files skipped from review as they are similar to previous changes (2)
  • docs/.vitepress/sidebar.ts
  • docs/public/llms.txt

Included review availability: Your plan provides up to 4 included reviews per hour; 2 remain after this review.


πŸ“ Walkthrough

Walkthrough

Changes

The VitePress sidebar now lives in a separate module. A generator creates docs/public/llms.txt from sidebar links and page descriptions. A mise task runs the generator, and the docs package uses ES modules.

Documentation index

Layer / File(s) Summary
Sidebar modularization
docs/.vitepress/sidebar.ts, docs/.vitepress/config.mts
The CLI-aware sidebar moves to sidebar.ts. VitePress imports and uses the exported sidebar.
llms.txt generator
docs/.vitepress/llms.ts, docs/package.json
The generator flattens sidebar links, extracts and cleans lead descriptions, groups links, and writes llms.txt. The docs package is marked as an ES module.
Generation task and checked-in index
mise-tasks/render/llms, docs/public/llms.txt
The mise task invokes the generator. The checked-in index contains Getting Started, Configuration, Guides, CLI Reference, Reference, and Project sections.

Estimated code review effort: 3 (Moderate) | ~20 minutes

Merge Risk: βšͺ Minimal Β· up to 511f5

This localized documentation change generates and publishes an llms.txt index while sharing the existing sidebar configuration; no actionable merge-blocking risk remains after normal checks and review.

Sequence Diagram(s)

sequenceDiagram
  participant Sidebar
  participant LLMGenerator
  participant DocumentationSources
  participant LLMIndex
  Sidebar->>LLMGenerator: Provide linked sidebar pages
  LLMGenerator->>DocumentationSources: Read page sources
  DocumentationSources-->>LLMGenerator: Return lead descriptions
  LLMGenerator->>LLMIndex: Write grouped documentation links
Loading

Poem

A rabbit sees the sidebar split,
Commands hop into ordered rows.
Page summaries fill the index,
A mise task starts the flow.
llms.txt grows ears and goes.

πŸš₯ Pre-merge checks | βœ… 5
βœ… Passed checks (5 passed)
Check name Status Explanation
Description Check βœ… Passed Check skipped - CodeRabbit’s high-level summary is enabled.
Title check βœ… Passed The title clearly and concisely describes the main change: generating and publishing the docs/public/llms.txt index.
Docstring Coverage βœ… Passed Docstring coverage is 100.00% which is sufficient. The required threshold is 80.00%. Docstring coverage is scoped to functions touched by this diff. Analyzed 6 functions across 3 files. (1 skipped: 1 …
Linked Issues check βœ… Passed Check skipped because no linked issues were found for this pull request.
Out of Scope Changes check βœ… Passed Check skipped because no linked issues were found for this pull request.
Full details: Docstring Coverage

Explanation

Docstring coverage is 100.00% which is sufficient. The required threshold is 80.00%. Docstring coverage is scoped to functions touched by this diff. Analyzed 6 functions across 3 files. (1 skipped: 1 unsupported.)


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.

❀️ Share

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

@greptile-apps

greptile-apps Bot commented Aug 27, 2026 •

Copy link
Copy Markdown

Greptile Summary

The PR adds a generated llms.txt documentation index and shares sidebar metadata between VitePress and the generator.

  • Extracts the VitePress sidebar into a reusable module.
  • Generates page links and introductory summaries in docs/public/llms.txt.
  • Integrates generation into the repository’s render task graph.

Confidence Score: 5/5

The PR appears safe to merge.

No blocking failure remains.

Important Files Changed

Filename Overview
docs/.vitepress/llms.ts Adds the generator that converts shared sidebar entries and Markdown introductions into the published documentation index.
docs/.vitepress/sidebar.ts Extracts the existing navigation structure and generated CLI command links into a shared typed module.
docs/.vitepress/config.mts Replaces the inline sidebar definition with the shared sidebar import.
mise-tasks/render/llms Adds an incremental render task ordered after CLI usage documentation generation.
docs/package.json Marks the documentation package as ESM for the new generator modules.
docs/public/llms.txt Adds the generated public index covering the documentation sidebar pages.

Reviews (2): Last reviewed commit: "fix(docs): preserve CLI placeholders in ..." | Re-trigger Greptile

greptile-apps[bot]
greptile-apps Bot previously approved these changes Aug 27, 2026

@cursor cursor Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

Cursor Bugbot has reviewed your changes and found 1 potential issue.

Fix All in Cursor

❌ Bugbot Autofix is OFF. To automatically fix reported issues with cloud agents, enable autofix in the Cursor dashboard.

Reviewed by Cursor Bugbot for commit 69b18f0. Configure here.

Comment thread docs/.vitepress/llms.ts Resolved
@greptile-apps
greptile-apps Bot dismissed their stale review August 27, 2026 11:50

Dismissed because a newer commit was pushed; Greptile will re-review the current head.

@github-actions

github-actions Bot commented Aug 27, 2026 •

Copy link
Copy Markdown
Contributor

Instruction counts

benchmark trend instructions Ξ” wall (min) Ξ”
builtins β–…β–„β–…β–ƒβ–ƒβ–„β–‚β–†β–β–‚β–‚β–„β–„β–…β–‡β–‡β–ˆ 1,989,871 β†’ 1,990,767 +0.05% 2.92 β†’ 3.14ms +7.50%
check β€” β€” β€” 21.50 β†’ 21.30ms -0.94%
usage β–†β–†β–†β–„β–„β–†β–‚β–ˆβ–β–β–β–…β–…β–…β–ˆβ–ˆβ–ˆ 4,650,086 β†’ 4,650,350 +0.01% 3.16 β†’ 3.31ms +4.72%
validate β€” β€” β€” 5.48 β†’ 5.44ms -0.62%

No instruction-count regression above 1%.

Only instruction counts gate. Wall clock is shown for context β€” on identical hardware it moves 4-20% run to run.

Measured by tak β€” instruction-counted CLI benchmarks, stored in this repository's git notes.

511f51c2e877 vs a15fcdfb197f Β· measured on the runner, not pushed to the history.

@jdx
jdx merged commit 87d31e2 into main Aug 27, 2026
27 checks passed
@jdx
jdx deleted the docs/llms-txt branch August 27, 2026 12:22
@jdx jdx mentioned this pull request Aug 27, 2026
jdx added a commit that referenced this pull request Aug 30, 2026
### πŸš€ Features

- **(builtins)** add go_fix linter by
[@sahidvelji](https://github.com/sahidvelji) in
[#1224](#1224)
- **(builtins)** add ls_lint linter by
[@sahidvelji](https://github.com/sahidvelji) in
[#1238](#1238)
- **(builtins)** add golangci_lint_fmt formatter by
[@sahidvelji](https://github.com/sahidvelji) in
[#1244](#1244)
- **(builtins)** add shellcheck fix via check_diff by
[@sahidvelji](https://github.com/sahidvelji) in
[#1237](#1237)
- **(pkl)** embed the matching-version pkl package by
[@sahidvelji](https://github.com/sahidvelji) in
[#1218](#1218)
- **(step)** render `dir` through tera by
[@sahidvelji](https://github.com/sahidvelji) in
[#1219](#1219)
- **(step)** recheck applied diffs by [@jdx](https://github.com/jdx) in
[#1243](#1243)
- **(step)** allow configured command failures by
[@jdx](https://github.com/jdx) in
[#1291](#1291)

### πŸ› Bug Fixes

- **(builtins)** repair Go linters that report success on bad code by
[@sahidvelji](https://github.com/sahidvelji) in
[#1225](#1225)
- **(builtins)** broaden gomod_tidy glob to run tidy on .go changes by
[@sahidvelji](https://github.com/sahidvelji) in
[#1236](#1236)
- **(builtins)** stage gomod_tidy manifest updates by
[@jdx](https://github.com/jdx) in
[#1240](#1240)
- **(builtins)** recheck partial diff fixes by
[@jdx](https://github.com/jdx) in
[#1245](#1245)
- **(builtins)** correct gitleaks scan modes by
[@jdx](https://github.com/jdx) in
[#1248](#1248)
- **(stash)** skip empty pathspec stashes by
[@jdx](https://github.com/jdx) in
[#1283](#1283)
- **(step)** resolve Windows command shims by
[@jdx](https://github.com/jdx) in
[#1221](#1221)
- **(step)** relativize workspace paths to step directory by
[@jdx](https://github.com/jdx) in
[#1242](#1242)

### πŸ“š Documentation

- clarify subproject monorepo setup by [@jdx](https://github.com/jdx) in
[#1239](#1239)
- improve onboarding and navigation by [@jdx](https://github.com/jdx) in
[#1247](#1247)
- disable code ligatures by [@jdx](https://github.com/jdx) in
[#1264](#1264)
- publish llms.txt index by [@jdx](https://github.com/jdx) in
[#1272](#1272)

### πŸ›‘οΈ Security

- add sponsor logos to readme by [@jdx](https://github.com/jdx) in
[#1250](#1250)

### πŸ” Other Changes

- **(ci)** adopt mbx for Rust builds by [@jdx](https://github.com/jdx)
in [#1229](#1229)
- **(ci)** restrict trusted mbx runs to jdx by
[@jdx](https://github.com/jdx) in
[#1254](#1254)
- **(ci)** isolate mbx OIDC permissions by
[@jdx](https://github.com/jdx) in
[#1258](#1258)
- **(ci)** compare mbx with rust-cache by [@jdx](https://github.com/jdx)
in [#1267](#1267)
- **(ci)** adopt mbx 0.5.4 by [@jdx](https://github.com/jdx) in
[#1279](#1279)
- **(ci)** pin mr-boxington-action v1.0.1 by
[@jdx](https://github.com/jdx) in
[#1280](#1280)
- **(ci)** use default Rust for cache benchmark by
[@jdx](https://github.com/jdx) in
[#1284](#1284)
- **(ci)** bump mr-boxington action by [@jdx](https://github.com/jdx) in
[#1282](#1282)
- **(ci)** use server cache for dispatched benchmarks by
[@jdx](https://github.com/jdx) in
[#1285](#1285)
- **(ci)** adopt mbx 0.7.0 by [@jdx](https://github.com/jdx) in
[#1286](#1286)
- **(sponsors)** replace 37signals with omacom foundation by
[@jdx](https://github.com/jdx) in
[#1249](#1249)
- generate release notes before publishing by
[@jdx](https://github.com/jdx) in
[#1227](#1227)
- automate generated cli versions by [@jdx](https://github.com/jdx) in
[#1252](#1252)
- seed mbx cache for fork PRs by [@jdx](https://github.com/jdx) in
[#1262](#1262)
- notarize the macOS release binary by [@jdx](https://github.com/jdx) in
[#1266](#1266)
- benchmark mbx against rust-cache on Linux by
[@jdx](https://github.com/jdx) in
[#1275](#1275)
- remove pinned rust toolchain by [@jdx](https://github.com/jdx) in
[#1235](#1235)
- back mbx with the GitHub Actions cache alone by
[@jdx](https://github.com/jdx) in
[#1287](#1287)

### πŸ“¦οΈ Dependency Updates

- update rust crate pklr to v1.5.0 by
[@renovate[bot]](https://github.com/renovate[bot]) in
[#1222](#1222)
- lock file maintenance by
[@renovate[bot]](https://github.com/renovate[bot]) in
[#1226](#1226)
- bump usage to 6.4.0 by [@jdx](https://github.com/jdx) in
[#1228](#1228)
- update anthropics/claude-code-action action to v1.0.194 by
[@renovate[bot]](https://github.com/renovate[bot]) in
[#1230](#1230)
- update jdx/mise-action action to v4.2.5 by
[@renovate[bot]](https://github.com/renovate[bot]) in
[#1231](#1231)
- update rust crate demand to v2.1.0 by
[@renovate[bot]](https://github.com/renovate[bot]) in
[#1241](#1241)
- update anthropics/claude-code-action action to v1.0.195 by
[@renovate[bot]](https://github.com/renovate[bot]) in
[#1251](#1251)
- update rust crate pklr to v1.5.1 by
[@renovate[bot]](https://github.com/renovate[bot]) in
[#1260](#1260)
- bump usage to 6.4.1 by [@jdx](https://github.com/jdx) in
[#1273](#1273)
- bump tak and mbx by [@jdx](https://github.com/jdx) in
[#1274](#1274)
- remove rust toolchain pins by [@jdx](https://github.com/jdx) in
[#1276](#1276)

### New Contributors

- @sahidvelji made their first contribution in
[#1237](#1237)

<!-- CURSOR_SUMMARY -->
---

> [!NOTE]
> **Low Risk**
> Mechanical version and documentation URL updates with no runtime code
changes in the diff.
> 
> **Overview**
> **Cuts release v1.57.0** by bumping the `hk` crate and CLI metadata
from **1.56.1** to **1.57.0** (`Cargo.toml`, `Cargo.lock`,
`hk.usage.kdl`, generated CLI docs).
> 
> Adds the **[1.57.0] CHANGELOG** entry (features, fixes, CI/release
work, and dependency updates since 1.56.1) and updates every **Pkl
`amends` / `import` package URL** in README, docs, examples, and
`hk-example.pkl` to point at the new GitHub release artifacts.
> 
> No application logic changes in this diff; it packages already-merged
work. Notable themes called out in the new changelog include new
builtins (`go_fix`, `ls_lint`, `golangci_lint_fmt`, shellcheck fix),
step-engine improvements (Tera `dir`, diff recheck, optional command
failures), embedded matching-version Pkl, and assorted
builtin/stash/Windows path fixes.
> 
> <sup>Reviewed by [Cursor Bugbot](https://cursor.com/bugbot) for commit
57fec76. Bugbot is set up for automated
code reviews on this repo. Configure
[here](https://www.cursor.com/dashboard/bugbot).</sup>
<!-- /CURSOR_SUMMARY -->

Co-authored-by: mise-en-dev <123107610+mise-en-dev@users.noreply.github.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant